qlxgbe: purge EOL release compatibility

Drop code that differentiated between FreeBSD 10 and 11.

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:
Elliott Mitchell 2022-06-22 17:53:47 -07:00 committed by Warner Losh
parent af0e1ece37
commit bd78d17c33
4 changed files with 2 additions and 62 deletions

View File

@ -2761,21 +2761,12 @@ qla_config_soft_lro(qla_host_t *ha)
bzero(lro, sizeof(struct lro_ctrl));
#if (__FreeBSD_version >= 1100101)
if (tcp_lro_init_args(lro, ha->ifp, 0, NUM_RX_DESCRIPTORS)) {
device_printf(ha->pci_dev,
"%s: tcp_lro_init_args [%d] failed\n",
__func__, i);
return (-1);
}
#else
if (tcp_lro_init(lro)) {
device_printf(ha->pci_dev,
"%s: tcp_lro_init [%d] failed\n",
__func__, i);
return (-1);
}
#endif /* #if (__FreeBSD_version >= 1100101) */
lro->ifp = ha->ifp;
}
@ -2796,17 +2787,7 @@ qla_drain_soft_lro(qla_host_t *ha)
for (i = 0; i < hw->num_sds_rings; i++) {
lro = &hw->sds[i].lro;
#if (__FreeBSD_version >= 1100101)
tcp_lro_flush_all(lro);
#else
struct lro_entry *queued;
while ((!SLIST_EMPTY(&lro->lro_active))) {
queued = SLIST_FIRST(&lro->lro_active);
SLIST_REMOVE_HEAD(&lro->lro_active, next);
tcp_lro_flush(lro, queued);
}
#endif /* #if (__FreeBSD_version >= 1100101) */
}
#endif

View File

@ -165,33 +165,14 @@ qla_rx_intr(qla_host_t *ha, qla_sgl_rcv_t *sgc, uint32_t sds_idx)
mpf->m_pkthdr.flowid = sgc->rss_hash;
#if __FreeBSD_version >= 1100000
M_HASHTYPE_SET(mpf, M_HASHTYPE_OPAQUE_HASH);
#else
#if (__FreeBSD_version >= 903511 && __FreeBSD_version < 1100000)
M_HASHTYPE_SET(mpf, M_HASHTYPE_OPAQUE);
#else
M_HASHTYPE_SET(mpf, M_HASHTYPE_NONE);
#endif
#endif /* #if __FreeBSD_version >= 1100000 */
#if defined(INET) || defined(INET6)
if (ha->hw.enable_soft_lro) {
#if (__FreeBSD_version >= 1100101)
if (ha->hw.enable_soft_lro)
tcp_lro_queue_mbuf(lro, mpf);
#else
if (tcp_lro_rx(lro, mpf, 0))
(*ifp->if_input)(ifp, mpf);
#endif /* #if (__FreeBSD_version >= 1100101) */
} else
else
#endif
{
(*ifp->if_input)(ifp, mpf);
}
if (sdsp->rx_free > ha->std_replenish)
qla_replenish_normal_rx(ha, sdsp, r_idx);
@ -735,21 +716,7 @@ ql_rcv_isr(qla_host_t *ha, uint32_t sds_idx, uint32_t count)
struct lro_ctrl *lro;
lro = &ha->hw.sds[sds_idx].lro;
#if (__FreeBSD_version >= 1100101)
tcp_lro_flush_all(lro);
#else
struct lro_entry *queued;
while ((!SLIST_EMPTY(&lro->lro_active))) {
queued = SLIST_FIRST(&lro->lro_active);
SLIST_REMOVE_HEAD(&lro->lro_active, next);
tcp_lro_flush(lro, queued);
}
#endif /* #if (__FreeBSD_version >= 1100101) */
}
#endif

View File

@ -1583,11 +1583,7 @@ qla_transmit(struct ifnet *ifp, struct mbuf *mp)
QL_DPRINT2(ha, (ha->pci_dev, "%s: enter\n", __func__));
#if __FreeBSD_version >= 1100000
if (M_HASHTYPE_GET(mp) != M_HASHTYPE_NONE)
#else
if (mp->m_flags & M_FLOWID)
#endif
rss_id = (mp->m_pkthdr.flowid & Q8_RSS_IND_TBL_MAX_IDX) %
ha->hw.num_sds_rings;
fp = &ha->tx_fp[rss_id];

View File

@ -52,10 +52,6 @@
#include <machine/_inttypes.h>
#include <sys/conf.h>
#if __FreeBSD_version < 900044
#error FreeBSD Version not supported - use version >= 900044
#endif
#include <net/if.h>
#include <net/if_var.h>
#include <net/if_arp.h>