Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f0ad83ac authored by Niranjana Vishwanathapura's avatar Niranjana Vishwanathapura Committed by Doug Ledford
Browse files

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: default avatarErez Shitrit <erezsh@mellanox.com>
Signed-off-by: default avatarNiranjana Vishwanathapura <niranjana.vishwanathapura@intel.com>
Signed-off-by: default avatarLeon Romanovsky <leon@kernel.org>
Signed-off-by: default avatarDoug Ledford <dledford@redhat.com>
parent 64551ede
Loading
Loading
Loading
Loading
+11 −1
Original line number Diff line number Diff line
@@ -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 {