Skip to content

Commit 10e07f1

Browse files
matanb10dledford
authored andcommitted
IB/core: Remove smac and vlan id from path record
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 <[email protected]> Reviewed-By: Devesh Sharma <[email protected]> Signed-off-by: Doug Ledford <[email protected]>
1 parent aa744cc commit 10e07f1

File tree

4 files changed

+0
-8
lines changed

4 files changed

+0
-8
lines changed

drivers/infiniband/core/cma.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2307,9 +2307,7 @@ static int cma_resolve_iboe_route(struct rdma_id_private *id_priv)
23072307
goto err2;
23082308
}
23092309

2310-
route->path_rec->vlan_id = rdma_vlan_dev_vlan_id(ndev);
23112310
memcpy(route->path_rec->dmac, addr->dev_addr.dst_dev_addr, ETH_ALEN);
2312-
memcpy(route->path_rec->smac, ndev->dev_addr, ndev->addr_len);
23132311

23142312
rdma_ip2gid((struct sockaddr *)&id_priv->id.route.addr.src_addr,
23152313
&route->path_rec->sgid);

drivers/infiniband/core/sa_query.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1153,11 +1153,9 @@ static void ib_sa_path_rec_callback(struct ib_sa_query *sa_query,
11531153

11541154
ib_unpack(path_rec_table, ARRAY_SIZE(path_rec_table),
11551155
mad->data, &rec);
1156-
rec.vlan_id = 0xffff;
11571156
rec.net = NULL;
11581157
rec.ifindex = 0;
11591158
memset(rec.dmac, 0, ETH_ALEN);
1160-
memset(rec.smac, 0, ETH_ALEN);
11611159
query->callback(status, &rec, query->context);
11621160
} else
11631161
query->callback(status, NULL, query->context);

drivers/infiniband/core/uverbs_marshall.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -141,9 +141,7 @@ void ib_copy_path_rec_from_user(struct ib_sa_path_rec *dst,
141141
dst->preference = src->preference;
142142
dst->packet_life_time_selector = src->packet_life_time_selector;
143143

144-
memset(dst->smac, 0, sizeof(dst->smac));
145144
memset(dst->dmac, 0, sizeof(dst->dmac));
146-
dst->vlan_id = 0xffff;
147145
dst->net = NULL;
148146
dst->ifindex = 0;
149147
}

include/rdma/ib_sa.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -155,9 +155,7 @@ struct ib_sa_path_rec {
155155
u8 packet_life_time_selector;
156156
u8 packet_life_time;
157157
u8 preference;
158-
u8 smac[ETH_ALEN];
159158
u8 dmac[ETH_ALEN];
160-
u16 vlan_id;
161159
/* ignored in IB */
162160
int ifindex;
163161
/* ignored in IB */

0 commit comments

Comments
 (0)