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:
Bjoern A. Zeeb 2021-05-26 17:51:24 +00:00
parent 60afad6fc3
commit 825b7d4c9d
5 changed files with 11 additions and 0 deletions

View File

@ -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"

View File

@ -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"

View File

@ -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>

View File

@ -50,6 +50,7 @@ __FBSDID("$FreeBSD$");
#include <net/infiniband.h>
#include <rdma/ib_addr.h>
#include <rdma/ib_cache.h>
MODULE_AUTHOR("Roland Dreier");

View File

@ -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;