summaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/core/uverbs_marshall.c
diff options
context:
space:
mode:
authorMatan Barak <matanb@mellanox.com>2015-10-15 18:38:47 +0300
committerDoug Ledford <dledford@redhat.com>2015-10-21 23:48:17 -0400
commitba36e37fd3ca3dc8f215b14bcfdccf9f41b65767 (patch)
tree82da7f56ca3c414f27913a26c816449e8be9be7b /drivers/infiniband/core/uverbs_marshall.c
parentd300ec528b799ca87935b3667f5563f397f00f85 (diff)
downloadlinux-ba36e37fd3ca3dc8f215b14bcfdccf9f41b65767.tar.bz2
IB/core: Add netdev to path record
In order to find the sgid_index, one could just query the IB cache with the correct GID and netdevice. Therefore, instead of storing the L2 attributes directly in the path, we only store the ifindex and net and use them later to get the sgid_index. The vlan_id and smac L2 attributes are removed in a later patch. Signed-off-by: Matan Barak <matanb@mellanox.com> Reviewed-By: Devesh Sharma <devesh.sharma@avagotech.com> Signed-off-by: Doug Ledford <dledford@redhat.com>
Diffstat (limited to 'drivers/infiniband/core/uverbs_marshall.c')
-rw-r--r--drivers/infiniband/core/uverbs_marshall.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/infiniband/core/uverbs_marshall.c b/drivers/infiniband/core/uverbs_marshall.c
index abd97247443e..484698c94d7f 100644
--- a/drivers/infiniband/core/uverbs_marshall.c
+++ b/drivers/infiniband/core/uverbs_marshall.c
@@ -144,5 +144,7 @@ void ib_copy_path_rec_from_user(struct ib_sa_path_rec *dst,
memset(dst->smac, 0, sizeof(dst->smac));
memset(dst->dmac, 0, sizeof(dst->dmac));
dst->vlan_id = 0xffff;
+ dst->net = NULL;
+ dst->ifindex = 0;
}
EXPORT_SYMBOL(ib_copy_path_rec_from_user);