summaryrefslogtreecommitdiff
path: root/include/rdma
diff options
context:
space:
mode:
authorNiranjana Vishwanathapura <niranjana.vishwanathapura@intel.com>2017-04-10 11:22:25 +0300
committerDoug Ledford <dledford@redhat.com>2017-04-20 22:19:41 +0300
commitf0ad83ac58468e3807e72e929317519b69bcde1c (patch)
treeaacd59f4263a83996cba05627ac21f823ba57693 /include/rdma
parent64551ede6cd1c9f814951914e23ef1d2a9498f71 (diff)
downloadlinux-f0ad83ac58468e3807e72e929317519b69bcde1c.tar.xz
IB/IPoIB: Introduce RDMA netdev interface and IPoIB structs
Add RDMA netdev interface to ib device structure allowing RDMA netdev devices to be allocated by ib clients. The idea is to allow to providers to optimize IPoIB data path. New struct that includes functions and data member is exposed. It exposes set of callback functions for handling data path flows in IPoIB driver. Each provider can support these set of functions in order to optimize its specific data path, and let IPoIB to leverage its data path. There is an assumption, that providers should give the full set of functions and not only part of them, in order to work properly. Signed-off-by: Erez Shitrit <erezsh@mellanox.com> Signed-off-by: Niranjana Vishwanathapura <niranjana.vishwanathapura@intel.com> Signed-off-by: Leon Romanovsky <leon@kernel.org> Signed-off-by: Doug Ledford <dledford@redhat.com>
Diffstat (limited to 'include/rdma')
-rw-r--r--include/rdma/ib_verbs.h12
1 files changed, 11 insertions, 1 deletions
diff --git a/include/rdma/ib_verbs.h b/include/rdma/ib_verbs.h
index 5d5c0a918798..16f15ea8606e 100644
--- a/include/rdma/ib_verbs.h
+++ b/include/rdma/ib_verbs.h
@@ -1881,7 +1881,8 @@ struct ib_port_immutable {
/* rdma netdev type - specifies protocol type */
enum rdma_netdev_t {
- RDMA_NETDEV_OPA_VNIC
+ RDMA_NETDEV_OPA_VNIC,
+ RDMA_NETDEV_IPOIB,
};
/**
@@ -1895,6 +1896,15 @@ struct rdma_netdev {
/* control functions */
void (*set_id)(struct net_device *netdev, int id);
+ /* send packet */
+ int (*send)(struct net_device *dev, struct sk_buff *skb,
+ struct ib_ah *address, u32 dqpn);
+ /* multicast */
+ int (*attach_mcast)(struct net_device *dev, struct ib_device *hca,
+ union ib_gid *gid, u16 mlid,
+ int set_qkey, u32 qkey);
+ int (*detach_mcast)(struct net_device *dev, struct ib_device *hca,
+ union ib_gid *gid, u16 mlid);
};
struct ib_device {