]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commitdiff
IB/core: Remove smac and vlan id from path record
authorMatan Barak <matanb@mellanox.com>
Thu, 15 Oct 2015 15:38:54 +0000 (18:38 +0300)
committerDoug Ledford <dledford@redhat.com>
Thu, 22 Oct 2015 03:48:18 +0000 (23:48 -0400)
The GID cache accompanies every GID with attributes.
The GID attributes link the GID with its netdevice, which could be
resolved to smac and vlan id easily. Since we've added the netdevice
(ifindex and net) to the path record, storing the L2 attributes is
duplicated data and hence these attributes are removed.

Signed-off-by: Matan Barak <matanb@mellanox.com>
Reviewed-By: Devesh Sharma <devesh.sharma@avagotech.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
drivers/infiniband/core/cma.c
drivers/infiniband/core/sa_query.c
drivers/infiniband/core/uverbs_marshall.c
include/rdma/ib_sa.h

index 09ddff8cc2acf75783c7c41093c5c4cb62ba1c0b..be41784a62e4816926c63c066af3b8e878d8f642 100644 (file)
@@ -2307,9 +2307,7 @@ static int cma_resolve_iboe_route(struct rdma_id_private *id_priv)
                goto err2;
        }
 
-       route->path_rec->vlan_id = rdma_vlan_dev_vlan_id(ndev);
        memcpy(route->path_rec->dmac, addr->dev_addr.dst_dev_addr, ETH_ALEN);
-       memcpy(route->path_rec->smac, ndev->dev_addr, ndev->addr_len);
 
        rdma_ip2gid((struct sockaddr *)&id_priv->id.route.addr.src_addr,
                    &route->path_rec->sgid);
index 77f5afc297c622d49429824e134b7668714c6835..dcdaa79e3f0faa0dcd9288a0f14cf9e4e996210c 100644 (file)
@@ -1153,11 +1153,9 @@ static void ib_sa_path_rec_callback(struct ib_sa_query *sa_query,
 
                ib_unpack(path_rec_table, ARRAY_SIZE(path_rec_table),
                          mad->data, &rec);
-               rec.vlan_id = 0xffff;
                rec.net = NULL;
                rec.ifindex = 0;
                memset(rec.dmac, 0, ETH_ALEN);
-               memset(rec.smac, 0, ETH_ALEN);
                query->callback(status, &rec, query->context);
        } else
                query->callback(status, NULL, query->context);
index 484698c94d7f9e7435bd752f65b0c06a0526e051..7d2f14c9bbefaf1f3c28eac11b7bcefbc2802927 100644 (file)
@@ -141,9 +141,7 @@ void ib_copy_path_rec_from_user(struct ib_sa_path_rec *dst,
        dst->preference         = src->preference;
        dst->packet_life_time_selector = src->packet_life_time_selector;
 
-       memset(dst->smac, 0, sizeof(dst->smac));
        memset(dst->dmac, 0, sizeof(dst->dmac));
-       dst->vlan_id = 0xffff;
        dst->net = NULL;
        dst->ifindex = 0;
 }
index 406ecf177f21b7ed703c286c743103315ef15788..301969552d0a51e34dcd872daa303a6339721916 100644 (file)
@@ -155,9 +155,7 @@ struct ib_sa_path_rec {
        u8           packet_life_time_selector;
        u8           packet_life_time;
        u8           preference;
-       u8           smac[ETH_ALEN];
        u8           dmac[ETH_ALEN];
-       u16          vlan_id;
        /* ignored in IB */
        int          ifindex;
        /* ignored in IB */