mlx4: purge EOL release compatibility
Remove FreeBSD 10 support code. Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/603 Differential Revision: https://reviews.freebsd.org/D35560
This commit is contained in:
parent
b02a397789
commit
026babd427
@ -2067,7 +2067,6 @@ static int mlx4_en_ioctl(struct ifnet *dev, u_long command, caddr_t data)
|
||||
mutex_unlock(&mdev->state_lock);
|
||||
VLAN_CAPABILITIES(dev);
|
||||
break;
|
||||
#if __FreeBSD_version >= 1100036
|
||||
case SIOCGI2C: {
|
||||
struct ifi2creq i2c;
|
||||
|
||||
@ -2091,7 +2090,6 @@ static int mlx4_en_ioctl(struct ifnet *dev, u_long command, caddr_t data)
|
||||
error = copyout(&i2c, ifr_data_get_ptr(ifr), sizeof(i2c));
|
||||
break;
|
||||
}
|
||||
#endif
|
||||
case SIOCGIFRSSKEY:
|
||||
ifrk = (struct ifrsskey *)data;
|
||||
ifrk->ifrk_func = RSS_FUNC_TOEPLITZ;
|
||||
@ -2263,12 +2261,10 @@ int mlx4_en_init_netdev(struct mlx4_en_dev *mdev, int port,
|
||||
if (mdev->LSO_support)
|
||||
dev->if_capabilities |= IFCAP_TSO4 | IFCAP_TSO6 | IFCAP_VLAN_HWTSO;
|
||||
|
||||
#if __FreeBSD_version >= 1100000
|
||||
/* set TSO limits so that we don't have to drop TX packets */
|
||||
dev->if_hw_tsomax = MLX4_EN_TX_MAX_PAYLOAD_SIZE - (ETHER_HDR_LEN + ETHER_VLAN_ENCAP_LEN) /* hdr */;
|
||||
dev->if_hw_tsomaxsegcount = MLX4_EN_TX_MAX_MBUF_FRAGS - 1 /* hdr */;
|
||||
dev->if_hw_tsomaxsegsize = MLX4_EN_TX_MAX_MBUF_SIZE;
|
||||
#endif
|
||||
|
||||
dev->if_capenable = dev->if_capabilities;
|
||||
|
||||
|
@ -346,7 +346,6 @@ int mlx4_en_DUMP_ETH_STATS(struct mlx4_en_dev *mdev, u8 port, u8 reset)
|
||||
vport_stats->tx_frames = be64_to_cpu(tmp_vport_stats.tx_frames);
|
||||
}
|
||||
|
||||
#if __FreeBSD_version >= 1100000
|
||||
if (reset == 0) {
|
||||
if_inc_counter(dev, IFCOUNTER_IPACKETS,
|
||||
priv->pkstats.rx_packets - priv->pkstats_last.rx_packets);
|
||||
@ -366,17 +365,6 @@ int mlx4_en_DUMP_ETH_STATS(struct mlx4_en_dev *mdev, u8 port, u8 reset)
|
||||
priv->pkstats.tx_multicast_packets - priv->pkstats_last.tx_multicast_packets);
|
||||
}
|
||||
priv->pkstats_last = priv->pkstats;
|
||||
#else
|
||||
dev->if_ipackets = priv->pkstats.rx_packets;
|
||||
dev->if_opackets = priv->pkstats.tx_packets;
|
||||
dev->if_ibytes = priv->pkstats.rx_bytes;
|
||||
dev->if_obytes = priv->pkstats.tx_bytes;
|
||||
dev->if_ierrors = priv->pkstats.rx_errors;
|
||||
dev->if_iqdrops = priv->pkstats.rx_dropped;
|
||||
dev->if_imcasts = priv->pkstats.rx_multicast_packets;
|
||||
dev->if_omcasts = priv->pkstats.tx_multicast_packets;
|
||||
dev->if_collisions = 0;
|
||||
#endif
|
||||
|
||||
spin_unlock(&priv->stats_lock);
|
||||
|
||||
|
@ -981,10 +981,9 @@ mlx4_en_transmit(struct ifnet *dev, struct mbuf *m)
|
||||
/* Poll CQ here */
|
||||
mlx4_en_xmit_poll(priv, i);
|
||||
|
||||
#if __FreeBSD_version >= 1100000
|
||||
if (unlikely(err != 0))
|
||||
if_inc_counter(dev, IFCOUNTER_IQDROPS, 1);
|
||||
#endif
|
||||
|
||||
return (err);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user