Page MenuHomeFreeBSD

D30515.diff
No OneTemporary

D30515.diff

Index: sys/dev/mlx4/mlx4_en/en.h
===================================================================
--- sys/dev/mlx4/mlx4_en/en.h
+++ sys/dev/mlx4/mlx4_en/en.h
@@ -385,7 +385,7 @@
struct mlx4_hwq_resources wqres;
int ring;
spinlock_t lock;
- struct net_device *dev;
+ struct ifnet *dev;
/* Per-core Tx cq processing support */
struct timer_list timer;
int size;
@@ -445,7 +445,7 @@
struct mlx4_dev *dev;
struct pci_dev *pdev;
struct mutex state_lock;
- struct net_device *pndev[MLX4_MAX_PORTS + 1];
+ struct ifnet *pndev[MLX4_MAX_PORTS + 1];
u32 port_cnt;
bool device_up;
struct mlx4_en_profile profile;
@@ -536,7 +536,7 @@
struct mlx4_en_priv {
struct mlx4_en_dev *mdev;
struct mlx4_en_port_profile *prof;
- struct net_device *dev;
+ struct ifnet *dev;
unsigned long active_vlans[BITS_TO_LONGS(VLAN_N_VID)];
struct mlx4_en_port_state port_state;
spinlock_t stats_lock;
@@ -655,7 +655,7 @@
};
static inline void *
-netdev_priv(const struct net_device *dev)
+netdev_priv(const struct ifnet *dev)
{
return (dev->if_softc);
}
@@ -709,7 +709,7 @@
int rc = true;
spin_lock_bh(&cq->poll_lock);
if ((cq->state & MLX4_CQ_LOCKED)) {
- struct net_device *dev = cq->dev;
+ struct ifnet *dev = cq->dev;
struct mlx4_en_priv *priv = netdev_priv(dev);
struct mlx4_en_rx_ring *rx_ring = priv->rx_ring[cq->ring];
@@ -778,12 +778,12 @@
#define MLX4_EN_WOL_DO_MODIFY (1ULL << 63)
-void mlx4_en_destroy_netdev(struct net_device *dev);
+void mlx4_en_destroy_netdev(struct ifnet *dev);
int mlx4_en_init_netdev(struct mlx4_en_dev *mdev, int port,
struct mlx4_en_port_profile *prof);
-int mlx4_en_start_port(struct net_device *dev);
-void mlx4_en_stop_port(struct net_device *dev);
+int mlx4_en_start_port(struct ifnet *dev);
+void mlx4_en_stop_port(struct ifnet *dev);
void mlx4_en_free_resources(struct mlx4_en_priv *priv);
int mlx4_en_alloc_resources(struct mlx4_en_priv *priv);
@@ -799,7 +799,7 @@
int mlx4_en_arm_cq(struct mlx4_en_priv *priv, struct mlx4_en_cq *cq);
void mlx4_en_tx_irq(struct mlx4_cq *mcq);
-u16 mlx4_en_select_queue(struct net_device *dev, struct mbuf *mb);
+u16 mlx4_en_select_queue(struct ifnet *dev, struct mbuf *mb);
int mlx4_en_xmit(struct mlx4_en_priv *priv, int tx_ind, struct mbuf **mbp);
int mlx4_en_transmit(struct ifnet *dev, struct mbuf *m);
@@ -826,7 +826,7 @@
int mlx4_en_activate_rx_rings(struct mlx4_en_priv *priv);
void mlx4_en_deactivate_rx_ring(struct mlx4_en_priv *priv,
struct mlx4_en_rx_ring *ring);
-int mlx4_en_process_rx_cq(struct net_device *dev,
+int mlx4_en_process_rx_cq(struct ifnet *dev,
struct mlx4_en_cq *cq,
int budget);
void mlx4_en_poll_tx_cq(unsigned long data);
@@ -836,7 +836,7 @@
void mlx4_en_sqp_event(struct mlx4_qp *qp, enum mlx4_event event);
int mlx4_en_map_buffer(struct mlx4_buf *buf);
void mlx4_en_unmap_buffer(struct mlx4_buf *buf);
-void mlx4_en_calc_rx_buf(struct net_device *dev);
+void mlx4_en_calc_rx_buf(struct ifnet *dev);
const u32 *mlx4_en_get_rss_key(struct mlx4_en_priv *priv, u16 *keylen);
u8 mlx4_en_get_rss_mask(struct mlx4_en_priv *priv);
@@ -844,7 +844,7 @@
void mlx4_en_release_rss_steer(struct mlx4_en_priv *priv);
int mlx4_en_create_drop_qp(struct mlx4_en_priv *priv);
void mlx4_en_destroy_drop_qp(struct mlx4_en_priv *priv);
-int mlx4_en_free_tx_buf(struct net_device *dev, struct mlx4_en_tx_ring *ring);
+int mlx4_en_free_tx_buf(struct ifnet *dev, struct mlx4_en_tx_ring *ring);
void mlx4_en_rx_irq(struct mlx4_cq *mcq);
int mlx4_SET_VLAN_FLTR(struct mlx4_dev *dev, struct mlx4_en_priv *priv);
@@ -862,7 +862,7 @@
extern const struct dcbnl_rtnl_ops mlx4_en_dcbnl_pfc_ops;
#endif
-int mlx4_en_setup_tc(struct net_device *dev, u8 up);
+int mlx4_en_setup_tc(struct ifnet *dev, u8 up);
#ifdef CONFIG_RFS_ACCEL
void mlx4_en_cleanup_filters(struct mlx4_en_priv *priv,
@@ -870,7 +870,7 @@
#endif
#define MLX4_EN_NUM_SELF_TEST 5
-void mlx4_en_ex_selftest(struct net_device *dev, u32 *flags, u64 *buf);
+void mlx4_en_ex_selftest(struct ifnet *dev, u32 *flags, u64 *buf);
void mlx4_en_ptp_overflow_check(struct mlx4_en_dev *mdev);
/*
@@ -882,7 +882,7 @@
u64 mlx4_en_get_cqe_ts(struct mlx4_cqe *cqe);
/* Functions for caching and restoring statistics */
-int mlx4_en_get_sset_count(struct net_device *dev, int sset);
+int mlx4_en_get_sset_count(struct ifnet *dev, int sset);
void mlx4_en_restore_ethtool_stats(struct mlx4_en_priv *priv,
u64 *data);
Index: sys/dev/mlx4/mlx4_en/mlx4_en_netdev.c
===================================================================
--- sys/dev/mlx4/mlx4_en/mlx4_en_netdev.c
+++ sys/dev/mlx4/mlx4_en/mlx4_en_netdev.c
@@ -64,7 +64,7 @@
static int mlx4_en_low_latency_recv(struct napi_struct *napi)
{
struct mlx4_en_cq *cq = container_of(napi, struct mlx4_en_cq, napi);
- struct net_device *dev = cq->dev;
+ struct ifnet *dev = cq->dev;
struct mlx4_en_priv *priv = netdev_priv(dev);
struct mlx4_en_rx_ring *rx_ring = priv->rx_ring[cq->ring];
int done;
@@ -288,7 +288,7 @@
}
static int
-mlx4_en_filter_rfs(struct net_device *net_dev, const struct sk_buff *skb,
+mlx4_en_filter_rfs(struct ifnet *net_dev, const struct sk_buff *skb,
u16 rxq_index, u32 flow_id)
{
struct mlx4_en_priv *priv = netdev_priv(net_dev);
@@ -400,7 +400,7 @@
}
#endif
-static void mlx4_en_vlan_rx_add_vid(void *arg, struct net_device *dev, u16 vid)
+static void mlx4_en_vlan_rx_add_vid(void *arg, struct ifnet *dev, u16 vid)
{
struct mlx4_en_priv *priv = netdev_priv(dev);
struct mlx4_en_dev *mdev = priv->mdev;
@@ -427,7 +427,7 @@
}
-static void mlx4_en_vlan_rx_kill_vid(void *arg, struct net_device *dev, u16 vid)
+static void mlx4_en_vlan_rx_kill_vid(void *arg, struct ifnet *dev, u16 vid)
{
struct mlx4_en_priv *priv = netdev_priv(dev);
struct mlx4_en_dev *mdev = priv->mdev;
@@ -606,7 +606,7 @@
}
}
-static void mlx4_en_clear_uclist(struct net_device *dev)
+static void mlx4_en_clear_uclist(struct ifnet *dev)
{
struct mlx4_en_priv *priv = netdev_priv(dev);
struct mlx4_en_addr_list *tmp, *uc_to_del;
@@ -635,7 +635,7 @@
return (1);
}
-static void mlx4_en_cache_uclist(struct net_device *dev)
+static void mlx4_en_cache_uclist(struct ifnet *dev)
{
struct mlx4_en_priv *priv = netdev_priv(dev);
@@ -643,7 +643,7 @@
if_foreach_lladdr(dev, mlx4_copy_addr, priv);
}
-static void mlx4_en_clear_mclist(struct net_device *dev)
+static void mlx4_en_clear_mclist(struct ifnet *dev)
{
struct mlx4_en_priv *priv = netdev_priv(dev);
struct mlx4_en_addr_list *tmp, *mc_to_del;
@@ -671,7 +671,7 @@
return (1);
}
-static void mlx4_en_cache_mclist(struct net_device *dev)
+static void mlx4_en_cache_mclist(struct ifnet *dev)
{
struct mlx4_en_priv *priv = netdev_priv(dev);
@@ -728,7 +728,7 @@
}
}
-static void mlx4_en_set_rx_mode(struct net_device *dev)
+static void mlx4_en_set_rx_mode(struct ifnet *dev)
{
struct mlx4_en_priv *priv = netdev_priv(dev);
@@ -842,7 +842,7 @@
}
static void mlx4_en_do_multicast(struct mlx4_en_priv *priv,
- struct net_device *dev,
+ struct ifnet *dev,
struct mlx4_en_dev *mdev)
{
struct mlx4_en_addr_list *addr_list, *tmp;
@@ -977,7 +977,7 @@
}
static void mlx4_en_do_unicast(struct mlx4_en_priv *priv,
- struct net_device *dev,
+ struct ifnet *dev,
struct mlx4_en_dev *mdev)
{
struct mlx4_en_addr_list *addr_list, *tmp;
@@ -1011,7 +1011,7 @@
struct mlx4_en_priv *priv = container_of(work, struct mlx4_en_priv,
rx_mode_task);
struct mlx4_en_dev *mdev = priv->mdev;
- struct net_device *dev = priv->dev;
+ struct ifnet *dev = priv->dev;
mutex_lock(&mdev->state_lock);
if (!mdev->device_up) {
@@ -1258,7 +1258,7 @@
}
-int mlx4_en_start_port(struct net_device *dev)
+int mlx4_en_start_port(struct ifnet *dev)
{
struct mlx4_en_priv *priv = netdev_priv(dev);
struct mlx4_en_dev *mdev = priv->mdev;
@@ -1451,7 +1451,7 @@
}
-void mlx4_en_stop_port(struct net_device *dev)
+void mlx4_en_stop_port(struct ifnet *dev)
{
struct mlx4_en_priv *priv = netdev_priv(dev);
struct mlx4_en_dev *mdev = priv->mdev;
@@ -1568,7 +1568,7 @@
struct mlx4_en_priv *priv = container_of(work, struct mlx4_en_priv,
watchdog_task);
struct mlx4_en_dev *mdev = priv->mdev;
- struct net_device *dev = priv->dev;
+ struct ifnet *dev = priv->dev;
struct mlx4_en_tx_ring *ring;
int i;
@@ -1601,7 +1601,7 @@
mutex_unlock(&mdev->state_lock);
}
-static void mlx4_en_clear_stats(struct net_device *dev)
+static void mlx4_en_clear_stats(struct ifnet *dev)
{
struct mlx4_en_priv *priv = netdev_priv(dev);
struct mlx4_en_dev *mdev = priv->mdev;
@@ -1635,7 +1635,7 @@
struct mlx4_en_priv *priv;
struct mlx4_en_dev *mdev;
- struct net_device *dev;
+ struct ifnet *dev;
int err = 0;
priv = arg;
@@ -1760,7 +1760,7 @@
#define EN_PORT_ATTR(_name, _mode, _show, _store) \
struct en_port_attribute en_port_attr_##_name = __ATTR(_name, _mode, _show, _store)
-void mlx4_en_destroy_netdev(struct net_device *dev)
+void mlx4_en_destroy_netdev(struct ifnet *dev)
{
struct mlx4_en_priv *priv = netdev_priv(dev);
struct mlx4_en_dev *mdev = priv->mdev;
@@ -1815,7 +1815,7 @@
}
-static int mlx4_en_change_mtu(struct net_device *dev, int new_mtu)
+static int mlx4_en_change_mtu(struct ifnet *dev, int new_mtu)
{
struct mlx4_en_priv *priv = netdev_priv(dev);
struct mlx4_en_dev *mdev = priv->mdev;
@@ -2137,7 +2137,7 @@
int mlx4_en_init_netdev(struct mlx4_en_dev *mdev, int port,
struct mlx4_en_port_profile *prof)
{
- struct net_device *dev;
+ struct ifnet *dev;
struct mlx4_en_priv *priv;
uint8_t dev_addr[ETHER_ADDR_LEN];
int err;
@@ -2350,7 +2350,7 @@
return err;
}
-static int mlx4_en_set_ring_size(struct net_device *dev,
+static int mlx4_en_set_ring_size(struct ifnet *dev,
int rx_size, int tx_size)
{
struct mlx4_en_priv *priv = netdev_priv(dev);
@@ -2424,7 +2424,7 @@
return (error);
}
-static int mlx4_en_get_module_info(struct net_device *dev,
+static int mlx4_en_get_module_info(struct ifnet *dev,
struct ethtool_modinfo *modinfo)
{
struct mlx4_en_priv *priv = netdev_priv(dev);
@@ -2471,7 +2471,7 @@
return 0;
}
-static int mlx4_en_get_module_eeprom(struct net_device *dev,
+static int mlx4_en_get_module_eeprom(struct ifnet *dev,
struct ethtool_eeprom *ee,
u8 *data)
{
@@ -2539,7 +2539,7 @@
int error;
int result = 0;
struct mlx4_en_priv *priv;
- struct net_device *dev;
+ struct ifnet *dev;
struct ethtool_modinfo modinfo;
struct ethtool_eeprom ee;
@@ -2655,7 +2655,7 @@
static void mlx4_en_sysctl_conf(struct mlx4_en_priv *priv)
{
- struct net_device *dev;
+ struct ifnet *dev;
struct sysctl_ctx_list *ctx;
struct sysctl_oid *node;
struct sysctl_oid_list *node_list;
Index: sys/dev/mlx4/mlx4_en/mlx4_en_port.c
===================================================================
--- sys/dev/mlx4/mlx4_en/mlx4_en_port.c
+++ sys/dev/mlx4/mlx4_en/mlx4_en_port.c
@@ -149,7 +149,7 @@
return ret;
}
-static void mlx4_en_fold_software_stats(struct net_device *dev)
+static void mlx4_en_fold_software_stats(struct ifnet *dev)
{
struct mlx4_en_priv *priv = netdev_priv(dev);
struct mlx4_en_dev *mdev = priv->mdev;
@@ -187,7 +187,7 @@
struct mlx4_counter tmp_vport_stats;
struct mlx4_en_stat_out_mbox *mlx4_en_stats;
struct mlx4_en_stat_out_flow_control_mbox *flowstats;
- struct net_device *dev = mdev->pndev[port];
+ struct ifnet *dev = mdev->pndev[port];
struct mlx4_en_priv *priv = netdev_priv(dev);
struct mlx4_en_vport_stats *vport_stats = &priv->vport_stats;
struct mlx4_cmd_mailbox *mailbox;
Index: sys/dev/mlx4/mlx4_en/mlx4_en_resources.c
===================================================================
--- sys/dev/mlx4/mlx4_en/mlx4_en_resources.c
+++ sys/dev/mlx4/mlx4_en/mlx4_en_resources.c
@@ -43,7 +43,7 @@
int user_prio, struct mlx4_qp_context *context)
{
struct mlx4_en_dev *mdev = priv->mdev;
- struct net_device *dev = priv->dev;
+ struct ifnet *dev = priv->dev;
memset(context, 0, sizeof *context);
context->flags = cpu_to_be32(7 << 16 | rss << MLX4_RSS_QPC_FLAG_OFFSET);
Index: sys/dev/mlx4/mlx4_en/mlx4_en_rx.c
===================================================================
--- sys/dev/mlx4/mlx4_en/mlx4_en_rx.c
+++ sys/dev/mlx4/mlx4_en/mlx4_en_rx.c
@@ -338,7 +338,7 @@
}
}
-void mlx4_en_calc_rx_buf(struct net_device *dev)
+void mlx4_en_calc_rx_buf(struct ifnet *dev)
{
struct mlx4_en_priv *priv = netdev_priv(dev);
int eff_mtu = dev->if_mtu + ETH_HLEN + VLAN_HLEN + ETH_FCS_LEN +
@@ -735,7 +735,7 @@
* The following calc ensures that when factor==1, it means we are aligned to 64B
* and we get the real cqe data*/
#define CQE_FACTOR_INDEX(index, factor) (((index) << (factor)) + (factor))
-int mlx4_en_process_rx_cq(struct net_device *dev, struct mlx4_en_cq *cq, int budget)
+int mlx4_en_process_rx_cq(struct ifnet *dev, struct mlx4_en_cq *cq, int budget)
{
struct mlx4_en_priv *priv = netdev_priv(dev);
struct mlx4_cqe *cqe;
@@ -866,7 +866,7 @@
/* Rx CQ polling - called by NAPI */
static int mlx4_en_poll_rx_cq(struct mlx4_en_cq *cq, int budget)
{
- struct net_device *dev = cq->dev;
+ struct ifnet *dev = cq->dev;
struct epoch_tracker et;
int done;
Index: sys/dev/mlx4/mlx4_en/mlx4_en_tx.c
===================================================================
--- sys/dev/mlx4/mlx4_en/mlx4_en_tx.c
+++ sys/dev/mlx4/mlx4_en/mlx4_en_tx.c
@@ -308,7 +308,7 @@
return (tx_info->nr_txbb);
}
-int mlx4_en_free_tx_buf(struct net_device *dev, struct mlx4_en_tx_ring *ring)
+int mlx4_en_free_tx_buf(struct ifnet *dev, struct mlx4_en_tx_ring *ring)
{
struct mlx4_en_priv *priv = netdev_priv(dev);
int cnt = 0;
@@ -344,7 +344,7 @@
return (wqs < (HEADROOM + (2 * MLX4_EN_TX_WQE_MAX_WQEBBS)));
}
-static int mlx4_en_process_tx_cq(struct net_device *dev,
+static int mlx4_en_process_tx_cq(struct ifnet *dev,
struct mlx4_en_cq *cq)
{
struct mlx4_en_priv *priv = netdev_priv(dev);
@@ -604,7 +604,7 @@
}
SYSINIT(hashrandom_init, SI_SUB_RANDOM, SI_ORDER_ANY, &hashrandom_init, NULL);
-u16 mlx4_en_select_queue(struct net_device *dev, struct mbuf *mb)
+u16 mlx4_en_select_queue(struct ifnet *dev, struct mbuf *mb)
{
struct mlx4_en_priv *priv = netdev_priv(dev);
u32 rings_p_up = priv->num_tx_rings_p_up;
Index: sys/dev/mlx4/mlx4_ib/mlx4_ib.h
===================================================================
--- sys/dev/mlx4/mlx4_ib/mlx4_ib.h
+++ sys/dev/mlx4/mlx4_ib/mlx4_ib.h
@@ -500,7 +500,7 @@
struct mlx4_ib_iboe {
spinlock_t lock;
- struct net_device *netdevs[MLX4_MAX_PORTS];
+ struct ifnet *netdevs[MLX4_MAX_PORTS];
atomic64_t mac[MLX4_MAX_PORTS];
struct notifier_block nb;
struct mlx4_port_gid_table gids[MLX4_MAX_PORTS];
Index: sys/dev/mlx4/mlx4_ib/mlx4_ib_main.c
===================================================================
--- sys/dev/mlx4/mlx4_ib/mlx4_ib_main.c
+++ sys/dev/mlx4/mlx4_ib/mlx4_ib_main.c
@@ -131,10 +131,10 @@
return ib_ports;
}
-static struct net_device *mlx4_ib_get_netdev(struct ib_device *device, u8 port_num)
+static struct ifnet *mlx4_ib_get_netdev(struct ib_device *device, u8 port_num)
{
struct mlx4_ib_dev *ibdev = to_mdev(device);
- struct net_device *dev;
+ struct ifnet *dev;
rcu_read_lock();
dev = mlx4_get_protocol_dev(ibdev->dev, MLX4_PROT_ETH, port_num);
@@ -142,11 +142,11 @@
#if 0
if (dev) {
if (mlx4_is_bonded(ibdev->dev)) {
- struct net_device *upper = NULL;
+ struct ifnet *upper = NULL;
upper = netdev_master_upper_dev_get_rcu(dev);
if (upper) {
- struct net_device *active;
+ struct ifnet *active;
active = bond_option_active_slave_get_rcu(netdev_priv(upper));
if (active)
@@ -693,7 +693,7 @@
struct mlx4_ib_dev *mdev = to_mdev(ibdev);
struct mlx4_ib_iboe *iboe = &mdev->iboe;
- struct net_device *ndev;
+ struct ifnet *ndev;
enum ib_mtu tmp;
struct mlx4_cmd_mailbox *mailbox;
int err = 0;
@@ -1348,7 +1348,7 @@
int mlx4_ib_add_mc(struct mlx4_ib_dev *mdev, struct mlx4_ib_qp *mqp,
union ib_gid *gid)
{
- struct net_device *ndev;
+ struct ifnet *ndev;
int ret = 0;
if (!mqp->port)
@@ -1960,7 +1960,7 @@
struct mlx4_ib_dev *mdev = to_mdev(ibqp->device);
struct mlx4_dev *dev = mdev->dev;
struct mlx4_ib_qp *mqp = to_mqp(ibqp);
- struct net_device *ndev;
+ struct ifnet *ndev;
struct mlx4_ib_gid_entry *ge;
struct mlx4_flow_reg_id reg_id = {0, 0};
enum mlx4_protocol prot = MLX4_PROT_IB_IPV6;
@@ -2284,7 +2284,7 @@
#define MLX4_IB_INVALID_MAC ((u64)-1)
static void mlx4_ib_update_qps(struct mlx4_ib_dev *ibdev,
- struct net_device *dev,
+ struct ifnet *dev,
int port)
{
u64 new_smac = 0;
@@ -2339,7 +2339,7 @@
}
static void mlx4_ib_scan_netdevs(struct mlx4_ib_dev *ibdev,
- struct net_device *dev,
+ struct ifnet *dev,
unsigned long event)
{
@@ -2370,7 +2370,7 @@
static int mlx4_ib_netdev_event(struct notifier_block *this,
unsigned long event, void *ptr)
{
- struct net_device *dev = netdev_notifier_info_to_dev(ptr);
+ struct ifnet *dev = netdev_notifier_info_to_ifp(ptr);
struct mlx4_ib_dev *ibdev;
if (dev->if_vnet != &init_net)
@@ -3105,7 +3105,7 @@
kfree(ew);
spin_lock_bh(&ibdev->iboe.lock);
for (i = 0; i < MLX4_MAX_PORTS; ++i) {
- struct net_device *curr_netdev = ibdev->iboe.netdevs[i];
+ struct ifnet *curr_netdev = ibdev->iboe.netdevs[i];
enum ib_port_state curr_port_state;
if (!curr_netdev)
Index: sys/dev/mlx5/mlx5_ib/mlx5_ib_main.c
===================================================================
--- sys/dev/mlx5/mlx5_ib/mlx5_ib_main.c
+++ sys/dev/mlx5/mlx5_ib/mlx5_ib_main.c
@@ -107,7 +107,7 @@
static int mlx5_netdev_event(struct notifier_block *this,
unsigned long event, void *ptr)
{
- struct ifnet *ndev = netdev_notifier_info_to_dev(ptr);
+ struct ifnet *ndev = netdev_notifier_info_to_ifp(ptr);
struct mlx5_ib_dev *ibdev = container_of(this, struct mlx5_ib_dev,
roce.nb);
Index: sys/ofed/drivers/infiniband/core/core_priv.h
===================================================================
--- sys/ofed/drivers/infiniband/core/core_priv.h
+++ sys/ofed/drivers/infiniband/core/core_priv.h
@@ -79,10 +79,10 @@
void ib_cache_cleanup(void);
typedef void (*roce_netdev_callback)(struct ib_device *device, u8 port,
- struct net_device *idev, void *cookie);
+ struct ifnet *idev, void *cookie);
typedef int (*roce_netdev_filter)(struct ib_device *device, u8 port,
- struct net_device *idev, void *cookie);
+ struct ifnet *idev, void *cookie);
void ib_enum_roce_netdev(struct ib_device *ib_dev,
roce_netdev_filter filter,
@@ -104,7 +104,7 @@
const char *ib_cache_gid_type_str(enum ib_gid_type gid_type);
void ib_cache_gid_set_default_gid(struct ib_device *ib_dev, u8 port,
- struct net_device *ndev,
+ struct ifnet *ndev,
unsigned long gid_type_mask,
enum ib_cache_gid_default_mode mode);
@@ -115,8 +115,8 @@
union ib_gid *gid, struct ib_gid_attr *attr);
int ib_cache_gid_del_all_netdev_gids(struct ib_device *ib_dev, u8 port,
- struct net_device *ndev);
-void ib_cache_gid_del_all_by_netdev(struct net_device *ndev);
+ struct ifnet *ndev);
+void ib_cache_gid_del_all_by_netdev(struct ifnet *ndev);
int roce_gid_mgmt_init(void);
void roce_gid_mgmt_cleanup(void);
Index: sys/ofed/drivers/infiniband/core/ib_addr.c
===================================================================
--- sys/ofed/drivers/infiniband/core/ib_addr.c
+++ sys/ofed/drivers/infiniband/core/ib_addr.c
@@ -139,7 +139,7 @@
memset(dst + min, 0, max - min);
}
-int rdma_copy_addr(struct rdma_dev_addr *dev_addr, struct net_device *dev,
+int rdma_copy_addr(struct rdma_dev_addr *dev_addr, struct ifnet *dev,
const unsigned char *dst_dev_addr)
{
/* check for loopback device */
@@ -172,7 +172,7 @@
int rdma_translate_ip(const struct sockaddr *addr,
struct rdma_dev_addr *dev_addr)
{
- struct net_device *dev;
+ struct ifnet *dev;
int ret;
if (dev_addr->bound_dev_if) {
@@ -662,7 +662,7 @@
struct rdma_dev_addr *addr)
{
struct epoch_tracker et;
- struct net_device *ndev = NULL;
+ struct ifnet *ndev = NULL;
u8 edst[MAX_ADDR_LEN];
int ret;
@@ -852,7 +852,7 @@
int rdma_addr_find_l2_eth_by_grh(const union ib_gid *sgid,
const union ib_gid *dgid,
- u8 *dmac, struct net_device *dev,
+ u8 *dmac, struct ifnet *dev,
int *hoplimit)
{
int ret = 0;
Index: sys/ofed/drivers/infiniband/core/ib_cache.c
===================================================================
--- sys/ofed/drivers/infiniband/core/ib_cache.c
+++ sys/ofed/drivers/infiniband/core/ib_cache.c
@@ -183,7 +183,7 @@
__releases(&table->rwlock) __acquires(&table->rwlock)
{
int ret = 0;
- struct net_device *old_net_dev;
+ struct ifnet *old_net_dev;
enum ib_gid_type old_gid_type;
/* in rdma_cap_roce_gid_table, this funciton should be protected by a
@@ -311,7 +311,7 @@
return found;
}
-static void addrconf_ifid_eui48(u8 *eui, struct net_device *dev)
+static void addrconf_ifid_eui48(u8 *eui, struct ifnet *dev)
{
if (dev->if_addrlen != ETH_ALEN)
return;
@@ -325,7 +325,7 @@
eui[0] ^= 2;
}
-static void make_default_gid(struct net_device *dev, union ib_gid *gid)
+static void make_default_gid(struct ifnet *dev, union ib_gid *gid)
{
gid->global.subnet_prefix = cpu_to_be64(0xfe80000000000000LL);
addrconf_ifid_eui48(&gid->raw[8], dev);
@@ -400,7 +400,7 @@
}
int ib_cache_gid_del_all_netdev_gids(struct ib_device *ib_dev, u8 port,
- struct net_device *ndev)
+ struct ifnet *ndev)
{
struct ib_gid_table **ports_table = ib_dev->cache.gid_cache;
struct ib_gid_table *table;
@@ -490,7 +490,7 @@
static int ib_cache_gid_find(struct ib_device *ib_dev,
const union ib_gid *gid,
enum ib_gid_type gid_type,
- struct net_device *ndev, u8 *port,
+ struct ifnet *ndev, u8 *port,
u16 *index)
{
unsigned long mask = GID_ATTR_FIND_MASK_GID |
@@ -507,7 +507,7 @@
int ib_find_cached_gid_by_port(struct ib_device *ib_dev,
const union ib_gid *gid,
enum ib_gid_type gid_type,
- u8 port, struct net_device *ndev,
+ u8 port, struct ifnet *ndev,
u16 *index)
{
int local_index;
@@ -672,7 +672,7 @@
}
void ib_cache_gid_set_default_gid(struct ib_device *ib_dev, u8 port,
- struct net_device *ndev,
+ struct ifnet *ndev,
unsigned long gid_type_mask,
enum ib_cache_gid_default_mode mode)
{
@@ -899,7 +899,7 @@
int ib_find_cached_gid(struct ib_device *device,
const union ib_gid *gid,
enum ib_gid_type gid_type,
- struct net_device *ndev,
+ struct ifnet *ndev,
u8 *port_num,
u16 *index)
{
Index: sys/ofed/drivers/infiniband/core/ib_cm.c
===================================================================
--- sys/ofed/drivers/infiniband/core/ib_cm.c
+++ sys/ofed/drivers/infiniband/core/ib_cm.c
@@ -429,7 +429,7 @@
unsigned long flags;
int ret;
u8 p;
- struct net_device *ndev = ib_get_ndev_from_path(path);
+ struct ifnet *ndev = ib_get_ndev_from_path(path);
read_lock_irqsave(&cm.device_lock, flags);
list_for_each_entry(cm_dev, &cm.device_list, list) {
Index: sys/ofed/drivers/infiniband/core/ib_cma.c
===================================================================
--- sys/ofed/drivers/infiniband/core/ib_cma.c
+++ sys/ofed/drivers/infiniband/core/ib_cma.c
@@ -444,7 +444,7 @@
hh->ipv_cap = (ip_ver << 4) | (hh->ipv_cap & 0xF);
}
-static int cma_igmp_send(struct net_device *ndev, const union ib_gid *mgid, bool join)
+static int cma_igmp_send(struct ifnet *ndev, const union ib_gid *mgid, bool join)
{
int retval;
@@ -586,7 +586,7 @@
const struct rdma_dev_addr *dev_addr)
{
const int dev_type = dev_addr->dev_type;
- struct net_device *ndev;
+ struct ifnet *ndev;
int ret = -ENODEV;
if ((dev_type == ARPHRD_INFINIBAND) && !rdma_protocol_ib(device, port))
@@ -1346,14 +1346,14 @@
return 0;
}
-static bool validate_ipv4_net_dev(struct net_device *net_dev,
+static bool validate_ipv4_net_dev(struct ifnet *net_dev,
const struct sockaddr_in *dst_addr,
const struct sockaddr_in *src_addr)
{
#ifdef INET
__be32 daddr = dst_addr->sin_addr.s_addr,
saddr = src_addr->sin_addr.s_addr;
- struct net_device *dst_dev;
+ struct ifnet *dst_dev;
struct nhop_object *nh;
bool ret;
@@ -1390,14 +1390,14 @@
#endif
}
-static bool validate_ipv6_net_dev(struct net_device *net_dev,
+static bool validate_ipv6_net_dev(struct ifnet *net_dev,
const struct sockaddr_in6 *dst_addr,
const struct sockaddr_in6 *src_addr)
{
#ifdef INET6
struct sockaddr_in6 src_tmp = *src_addr;
struct sockaddr_in6 dst_tmp = *dst_addr;
- struct net_device *dst_dev;
+ struct ifnet *dst_dev;
struct nhop_object *nh;
bool ret;
@@ -1444,7 +1444,7 @@
#endif
}
-static bool validate_net_dev(struct net_device *net_dev,
+static bool validate_net_dev(struct ifnet *net_dev,
const struct sockaddr *daddr,
const struct sockaddr *saddr)
{
@@ -1467,7 +1467,7 @@
}
}
-static struct net_device *
+static struct ifnet *
roce_get_net_dev_by_cm_event(struct ib_device *device, u8 port_num,
const struct ib_cm_event *ib_event)
{
@@ -1487,13 +1487,13 @@
return (sgid_attr.ndev);
}
-static struct net_device *cma_get_net_dev(struct ib_cm_event *ib_event,
+static struct ifnet *cma_get_net_dev(struct ib_cm_event *ib_event,
const struct cma_req_info *req)
{
struct sockaddr_storage listen_addr_storage, src_addr_storage;
struct sockaddr *listen_addr = (struct sockaddr *)&listen_addr_storage,
*src_addr = (struct sockaddr *)&src_addr_storage;
- struct net_device *net_dev;
+ struct ifnet *net_dev;
const union ib_gid *gid = req->has_gid ? &req->local_gid : NULL;
struct epoch_tracker et;
int err;
@@ -1623,7 +1623,7 @@
}
static bool cma_match_net_dev(const struct rdma_cm_id *id,
- const struct net_device *net_dev,
+ const struct ifnet *net_dev,
u8 port_num)
{
const struct rdma_addr *addr = &id->route.addr;
@@ -1653,7 +1653,7 @@
const struct ib_cm_id *cm_id,
const struct ib_cm_event *ib_event,
const struct cma_req_info *req,
- const struct net_device *net_dev)
+ const struct ifnet *net_dev)
{
struct rdma_id_private *id_priv, *id_priv_dev;
@@ -1680,7 +1680,7 @@
static struct rdma_id_private *cma_id_from_event(struct ib_cm_id *cm_id,
struct ib_cm_event *ib_event,
- struct net_device **net_dev)
+ struct ifnet **net_dev)
{
struct cma_req_info req;
struct rdma_bind_list *bind_list;
@@ -1813,7 +1813,7 @@
if (mc->igmp_joined) {
struct rdma_dev_addr *dev_addr =
&id_priv->id.route.addr.dev_addr;
- struct net_device *ndev = NULL;
+ struct ifnet *ndev = NULL;
if (dev_addr->bound_dev_if)
ndev = dev_get_by_index(dev_addr->net,
@@ -2002,7 +2002,7 @@
static struct rdma_id_private *cma_new_conn_id(struct rdma_cm_id *listen_id,
struct ib_cm_event *ib_event,
- struct net_device *net_dev)
+ struct ifnet *net_dev)
{
struct rdma_id_private *id_priv;
struct rdma_cm_id *id;
@@ -2063,7 +2063,7 @@
static struct rdma_id_private *cma_new_udp_id(struct rdma_cm_id *listen_id,
struct ib_cm_event *ib_event,
- struct net_device *net_dev)
+ struct ifnet *net_dev)
{
struct rdma_id_private *id_priv;
struct rdma_cm_id *id;
@@ -2131,7 +2131,7 @@
{
struct rdma_id_private *listen_id, *conn_id = NULL;
struct rdma_cm_event event;
- struct net_device *net_dev;
+ struct ifnet *net_dev;
int offset, ret;
listen_id = cma_id_from_event(cm_id, ib_event, &net_dev);
@@ -2651,7 +2651,7 @@
return 0;
}
-static int iboe_tos_to_sl(struct net_device *ndev, int tos)
+static int iboe_tos_to_sl(struct ifnet *ndev, int tos)
{
/* get service level, SL, from IPv4 type of service, TOS */
int sl = (tos >> 5) & 0x7;
@@ -2678,7 +2678,7 @@
struct rdma_addr *addr = &route->addr;
struct cma_work *work;
int ret;
- struct net_device *ndev = NULL;
+ struct ifnet *ndev = NULL;
work = kzalloc(sizeof *work, GFP_KERNEL);
@@ -3999,7 +3999,7 @@
if (!status) {
struct rdma_dev_addr *dev_addr =
&id_priv->id.route.addr.dev_addr;
- struct net_device *ndev =
+ struct ifnet *ndev =
dev_get_by_index(dev_addr->net, dev_addr->bound_dev_if);
enum ib_gid_type gid_type =
id_priv->cma_dev->default_gid_type[id_priv->id.port_num -
@@ -4226,7 +4226,7 @@
struct rdma_dev_addr *dev_addr = &id_priv->id.route.addr.dev_addr;
int err = 0;
struct sockaddr *addr = (struct sockaddr *)&mc->addr;
- struct net_device *ndev = NULL;
+ struct ifnet *ndev = NULL;
enum ib_gid_type gid_type;
bool send_only;
@@ -4372,7 +4372,7 @@
if (mc->igmp_joined) {
struct rdma_dev_addr *dev_addr =
&id->route.addr.dev_addr;
- struct net_device *ndev = NULL;
+ struct ifnet *ndev = NULL;
if (dev_addr->bound_dev_if)
ndev = dev_get_by_index(dev_addr->net,
Index: sys/ofed/drivers/infiniband/core/ib_device.c
===================================================================
--- sys/ofed/drivers/infiniband/core/ib_device.c
+++ sys/ofed/drivers/infiniband/core/ib_device.c
@@ -732,7 +732,7 @@
for (port = rdma_start_port(ib_dev); port <= rdma_end_port(ib_dev);
port++)
if (rdma_protocol_roce(ib_dev, port)) {
- struct net_device *idev = NULL;
+ struct ifnet *idev = NULL;
if (ib_dev->get_netdev)
idev = ib_dev->get_netdev(ib_dev, port);
@@ -779,7 +779,7 @@
*
* @ndev: Pointer to netdevice
*/
-void ib_cache_gid_del_all_by_netdev(struct net_device *ndev)
+void ib_cache_gid_del_all_by_netdev(struct ifnet *ndev)
{
struct ib_device *ib_dev;
u8 port;
@@ -872,7 +872,7 @@
* parameter may be NULL.
*/
int ib_find_gid(struct ib_device *device, union ib_gid *gid,
- enum ib_gid_type gid_type, struct net_device *ndev,
+ enum ib_gid_type gid_type, struct ifnet *ndev,
u8 *port_num, u16 *index)
{
union ib_gid tmp_gid;
@@ -956,13 +956,13 @@
* @addr: Contains the IP address that the request specified as its
* destination.
*/
-struct net_device *ib_get_net_dev_by_params(struct ib_device *dev,
+struct ifnet *ib_get_net_dev_by_params(struct ib_device *dev,
u8 port,
u16 pkey,
const union ib_gid *gid,
const struct sockaddr *addr)
{
- struct net_device *net_dev = NULL;
+ struct ifnet *net_dev = NULL;
struct ib_client_data *context;
if (!rdma_protocol_ib(dev, port))
Index: sys/ofed/drivers/infiniband/core/ib_multicast.c
===================================================================
--- sys/ofed/drivers/infiniband/core/ib_multicast.c
+++ sys/ofed/drivers/infiniband/core/ib_multicast.c
@@ -723,7 +723,7 @@
int ib_init_ah_from_mcmember(struct ib_device *device, u8 port_num,
struct ib_sa_mcmember_rec *rec,
- struct net_device *ndev,
+ struct ifnet *ndev,
enum ib_gid_type gid_type,
struct ib_ah_attr *ah_attr)
{
Index: sys/ofed/drivers/infiniband/core/ib_roce_gid_mgmt.c
===================================================================
--- sys/ofed/drivers/infiniband/core/ib_roce_gid_mgmt.c
+++ sys/ofed/drivers/infiniband/core/ib_roce_gid_mgmt.c
@@ -56,7 +56,7 @@
struct roce_netdev_event_work {
struct work_struct work;
- struct net_device *ndev;
+ struct ifnet *ndev;
};
struct roce_rescan_work {
@@ -91,7 +91,7 @@
EXPORT_SYMBOL(roce_gid_type_mask_support);
static void update_gid(enum gid_op_type gid_op, struct ib_device *ib_dev,
- u8 port, union ib_gid *gid, struct net_device *ndev)
+ u8 port, union ib_gid *gid, struct ifnet *ndev)
{
int i;
unsigned long gid_type_mask = roce_gid_type_mask_support(ib_dev, port);
@@ -119,9 +119,9 @@
static int
roce_gid_match_netdev(struct ib_device *ib_dev, u8 port,
- struct net_device *idev, void *cookie)
+ struct ifnet *idev, void *cookie)
{
- struct net_device *ndev = (struct net_device *)cookie;
+ struct ifnet *ndev = (struct ifnet *)cookie;
if (idev == NULL)
return (0);
return (ndev == idev);
@@ -129,7 +129,7 @@
static int
roce_gid_match_all(struct ib_device *ib_dev, u8 port,
- struct net_device *idev, void *cookie)
+ struct ifnet *idev, void *cookie)
{
if (idev == NULL)
return (0);
@@ -138,7 +138,7 @@
static int
roce_gid_enum_netdev_default(struct ib_device *ib_dev,
- u8 port, struct net_device *idev)
+ u8 port, struct ifnet *idev)
{
unsigned long gid_type_mask;
@@ -152,7 +152,7 @@
static void
roce_gid_update_addr_callback(struct ib_device *device, u8 port,
- struct net_device *ndev, void *cookie)
+ struct ifnet *ndev, void *cookie)
{
struct ipx_entry {
STAILQ_ENTRY(ipx_entry) entry;
@@ -161,10 +161,10 @@
struct sockaddr_in v4;
struct sockaddr_in6 v6;
} ipx_addr;
- struct net_device *ndev;
+ struct ifnet *ndev;
};
struct ipx_entry *entry;
- struct net_device *idev;
+ struct ifnet *idev;
#if defined(INET) || defined(INET6)
struct ifaddr *ifa;
#endif
@@ -315,7 +315,7 @@
}
static void
-roce_gid_queue_scan_event(struct net_device *ndev)
+roce_gid_queue_scan_event(struct ifnet *ndev)
{
struct roce_netdev_event_work *work;
@@ -358,7 +358,7 @@
}
static void
-roce_gid_delete_all_event(struct net_device *ndev)
+roce_gid_delete_all_event(struct ifnet *ndev)
{
struct roce_netdev_event_work *work;
@@ -380,7 +380,7 @@
static int
inetaddr_event(struct notifier_block *this, unsigned long event, void *ptr)
{
- struct net_device *ndev = netdev_notifier_info_to_dev(ptr);
+ struct ifnet *ndev = netdev_notifier_info_to_ifp(ptr);
switch (event) {
case NETDEV_UNREGISTER:
Index: sys/ofed/drivers/infiniband/core/ib_sa_query.c
===================================================================
--- sys/ofed/drivers/infiniband/core/ib_sa_query.c
+++ sys/ofed/drivers/infiniband/core/ib_sa_query.c
@@ -652,7 +652,7 @@
int ret;
u16 gid_index;
int use_roce;
- struct net_device *ndev = NULL;
+ struct ifnet *ndev = NULL;
memset(ah_attr, 0, sizeof *ah_attr);
ah_attr->dlid = be16_to_cpu(rec->dlid);
@@ -665,8 +665,8 @@
use_roce = rdma_cap_eth_ah(device, port_num);
if (use_roce) {
- struct net_device *idev;
- struct net_device *resolved_dev;
+ struct ifnet *idev;
+ struct ifnet *resolved_dev;
struct rdma_dev_addr dev_addr = {.bound_dev_if = rec->ifindex,
.net = rec->net ? rec->net :
&init_net};
Index: sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_main.c
===================================================================
--- sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_main.c
+++ sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_main.c
@@ -89,7 +89,7 @@
static void ipoib_add_one(struct ib_device *device);
static void ipoib_remove_one(struct ib_device *device, void *client_data);
-static struct net_device *ipoib_get_net_dev_by_params(
+static struct ifnet *ipoib_get_net_dev_by_params(
struct ib_device *dev, u8 port, u16 pkey,
const union ib_gid *gid, const struct sockaddr *addr,
void *client_data);
@@ -1104,7 +1104,7 @@
}
static int
-ipoib_match_dev_addr(const struct sockaddr *addr, struct net_device *dev)
+ipoib_match_dev_addr(const struct sockaddr *addr, struct ifnet *dev)
{
struct epoch_tracker et;
struct ifaddr *ifa;
@@ -1138,7 +1138,7 @@
static int
ipoib_match_gid_pkey_addr(struct ipoib_dev_priv *priv,
const union ib_gid *gid, u16 pkey_index, const struct sockaddr *addr,
- struct net_device **found_net_dev)
+ struct ifnet **found_net_dev)
{
struct ipoib_dev_priv *child_priv;
int matches = 0;
@@ -1147,7 +1147,7 @@
(!gid || !memcmp(gid, &priv->local_gid, sizeof(*gid)))) {
if (addr == NULL || ipoib_match_dev_addr(addr, priv->dev) != 0) {
if (*found_net_dev == NULL) {
- struct net_device *net_dev;
+ struct ifnet *net_dev;
if (priv->parent != NULL)
net_dev = priv->parent;
@@ -1182,7 +1182,7 @@
static int
__ipoib_get_net_dev_by_params(struct list_head *dev_list, u8 port,
u16 pkey_index, const union ib_gid *gid,
- const struct sockaddr *addr, struct net_device **net_dev)
+ const struct sockaddr *addr, struct ifnet **net_dev)
{
struct ipoib_dev_priv *priv;
int matches = 0;
@@ -1203,11 +1203,11 @@
return matches;
}
-static struct net_device *
+static struct ifnet *
ipoib_get_net_dev_by_params(struct ib_device *dev, u8 port, u16 pkey,
const union ib_gid *gid, const struct sockaddr *addr, void *client_data)
{
- struct net_device *net_dev;
+ struct ifnet *net_dev;
struct list_head *dev_list = client_data;
u16 pkey_index;
int matches;
Index: sys/ofed/include/rdma/ib_addr.h
===================================================================
--- sys/ofed/include/rdma/ib_addr.h
+++ sys/ofed/include/rdma/ib_addr.h
@@ -142,7 +142,7 @@
void rdma_addr_cancel(struct rdma_dev_addr *addr);
-int rdma_copy_addr(struct rdma_dev_addr *dev_addr, struct net_device *dev,
+int rdma_copy_addr(struct rdma_dev_addr *dev_addr, struct ifnet *dev,
const unsigned char *dst_dev_addr);
int rdma_addr_size(struct sockaddr *addr);
@@ -151,7 +151,7 @@
int rdma_addr_find_l2_eth_by_grh(const union ib_gid *sgid,
const union ib_gid *dgid,
- u8 *smac, struct net_device *dev,
+ u8 *smac, struct ifnet *dev,
int *hoplimit);
static inline u16 ib_addr_get_pkey(struct rdma_dev_addr *dev_addr)
@@ -176,7 +176,7 @@
return dev_addr->dev_type == ARPHRD_INFINIBAND ? 4 : 0;
}
-static inline u16 rdma_vlan_dev_vlan_id(const struct net_device *dev)
+static inline u16 rdma_vlan_dev_vlan_id(const struct ifnet *dev)
{
uint16_t tag;
@@ -231,7 +231,7 @@
static inline void iboe_addr_get_sgid(struct rdma_dev_addr *dev_addr,
union ib_gid *gid)
{
- struct net_device *dev;
+ struct ifnet *dev;
struct ifaddr *ifa;
#ifdef VIMAGE
@@ -300,7 +300,7 @@
return 0;
}
-static inline int iboe_get_rate(struct net_device *dev)
+static inline int iboe_get_rate(struct ifnet *dev)
{
uint64_t baudrate = dev->if_baudrate;
#ifdef if_baudrate_pf
@@ -365,7 +365,7 @@
return vid < 0x1000 ? vid : 0xffff;
}
-static inline struct net_device *rdma_vlan_dev_real_dev(struct net_device *dev)
+static inline struct ifnet *rdma_vlan_dev_real_dev(struct ifnet *dev)
{
struct epoch_tracker et;
Index: sys/ofed/include/rdma/ib_cache.h
===================================================================
--- sys/ofed/include/rdma/ib_cache.h
+++ sys/ofed/include/rdma/ib_cache.h
@@ -76,7 +76,7 @@
int ib_find_cached_gid(struct ib_device *device,
const union ib_gid *gid,
enum ib_gid_type gid_type,
- struct net_device *ndev,
+ struct ifnet *ndev,
u8 *port_num,
u16 *index);
@@ -99,7 +99,7 @@
const union ib_gid *gid,
enum ib_gid_type gid_type,
u8 port_num,
- struct net_device *ndev,
+ struct ifnet *ndev,
u16 *index);
int ib_find_gid_by_filter(struct ib_device *device,
Index: sys/ofed/include/rdma/ib_sa.h
===================================================================
--- sys/ofed/include/rdma/ib_sa.h
+++ sys/ofed/include/rdma/ib_sa.h
@@ -181,7 +181,7 @@
enum ib_gid_type gid_type;
};
-static inline struct net_device *ib_get_ndev_from_path(struct ib_sa_path_rec *rec)
+static inline struct ifnet *ib_get_ndev_from_path(struct ib_sa_path_rec *rec)
{
#ifdef VIMAGE
if (rec->net == NULL)
@@ -425,7 +425,7 @@
*/
int ib_init_ah_from_mcmember(struct ib_device *device, u8 port_num,
struct ib_sa_mcmember_rec *rec,
- struct net_device *ndev,
+ struct ifnet *ndev,
enum ib_gid_type gid_type,
struct ib_ah_attr *ah_attr);
Index: sys/ofed/include/rdma/ib_verbs.h
===================================================================
--- sys/ofed/include/rdma/ib_verbs.h
+++ sys/ofed/include/rdma/ib_verbs.h
@@ -92,7 +92,7 @@
#define ROCE_V2_UDP_DPORT 4791
struct ib_gid_attr {
enum ib_gid_type gid_type;
- struct net_device *ndev;
+ struct ifnet *ndev;
};
enum rdma_node_type {
@@ -1892,7 +1892,7 @@
* that this function returns NULL before the net device reaches
* NETDEV_UNREGISTER_FINAL state.
*/
- struct net_device *(*get_netdev)(struct ib_device *device,
+ struct ifnet *(*get_netdev)(struct ib_device *device,
u8 port_num);
int (*query_gid)(struct ib_device *device,
u8 port_num, int index,
@@ -2139,7 +2139,7 @@
*
* The caller is responsible for calling dev_put on the returned
* netdev. */
- struct net_device *(*get_net_dev_by_params)(
+ struct ifnet *(*get_net_dev_by_params)(
struct ib_device *dev,
u8 port,
u16 pkey,
@@ -2564,7 +2564,7 @@
struct ib_port_modify *port_modify);
int ib_find_gid(struct ib_device *device, union ib_gid *gid,
- enum ib_gid_type gid_type, struct net_device *ndev,
+ enum ib_gid_type gid_type, struct ifnet *ndev,
u8 *port_num, u16 *index);
int ib_find_pkey(struct ib_device *device,
@@ -3341,7 +3341,7 @@
int ib_check_mr_status(struct ib_mr *mr, u32 check_mask,
struct ib_mr_status *mr_status);
-struct net_device *ib_get_net_dev_by_params(struct ib_device *dev, u8 port,
+struct ifnet *ib_get_net_dev_by_params(struct ib_device *dev, u8 port,
u16 pkey, const union ib_gid *gid,
const struct sockaddr *addr);
struct ib_wq *ib_create_wq(struct ib_pd *pd,

File Metadata

Mime Type
text/plain
Expires
Tue, Nov 19, 1:11 PM (21 h, 29 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
14717082
Default Alt Text
D30515.diff (40 KB)

Event Timeline