OFED: migrate LinuxKPI net_device/ifnet macros into ofed
The LinuxKPI net_device actually is an ifnet; in order to further clean that up so we can extend "net_device" migrate the few macros left into ofed and make sure the header is included in all files which need access to the macros. Sponsored by: The FreeBSD Foundation MFC after: 12 days Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D30477
This commit is contained in:
parent
60afad6fc3
commit
825b7d4c9d
@ -45,6 +45,7 @@ __FBSDID("$FreeBSD$");
|
||||
#include <linux/netdevice.h>
|
||||
#include <linux/in6.h>
|
||||
|
||||
#include <rdma/ib_addr.h>
|
||||
#include <rdma/ib_cache.h>
|
||||
|
||||
#include "core_priv.h"
|
||||
|
@ -56,6 +56,7 @@ __FBSDID("$FreeBSD$");
|
||||
|
||||
#include <asm/atomic-long.h>
|
||||
|
||||
#include <rdma/ib_addr.h>
|
||||
#include <rdma/ib_cache.h>
|
||||
#include <rdma/ib_cm.h>
|
||||
#include "cm_msgs.h"
|
||||
|
@ -45,6 +45,7 @@ __FBSDID("$FreeBSD$");
|
||||
#include <linux/fs.h>
|
||||
#include <linux/printk.h>
|
||||
|
||||
#include <rdma/ib_addr.h>
|
||||
#include <rdma/ib_mad.h>
|
||||
#include <rdma/ib_pma.h>
|
||||
|
||||
|
@ -50,6 +50,7 @@ __FBSDID("$FreeBSD$");
|
||||
|
||||
#include <net/infiniband.h>
|
||||
|
||||
#include <rdma/ib_addr.h>
|
||||
#include <rdma/ib_cache.h>
|
||||
|
||||
MODULE_AUTHOR("Roland Dreier");
|
||||
|
@ -51,6 +51,13 @@
|
||||
#include <rdma/ib_pack.h>
|
||||
#include <rdma/ib_addr_freebsd.h>
|
||||
|
||||
/* Linux netdevice.h but for working on an ifnet rather than a net_device. */
|
||||
#define dev_hold(d) if_ref(d)
|
||||
#define dev_put(d) if_rele(d)
|
||||
#define dev_net(d) ((d)->if_vnet)
|
||||
#define net_eq(a,b) ((a) == (b))
|
||||
|
||||
|
||||
struct rdma_addr_client {
|
||||
atomic_t refcount;
|
||||
struct completion comp;
|
||||
|
Loading…
Reference in New Issue
Block a user