The branch main has been updated by imp:

URL: 
https://cgit.FreeBSD.org/src/commit/?id=bd78d17c333ca44c1a0ed714cd1a4ca140ef3759

commit bd78d17c333ca44c1a0ed714cd1a4ca140ef3759
Author:     Elliott Mitchell <[email protected]>
AuthorDate: 2022-06-23 00:53:47 +0000
Commit:     Warner Losh <[email protected]>
CommitDate: 2023-02-04 16:13:08 +0000

    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
---
 sys/dev/qlxgbe/ql_hw.c  | 19 -------------------
 sys/dev/qlxgbe/ql_isr.c | 37 ++-----------------------------------
 sys/dev/qlxgbe/ql_os.c  |  4 ----
 sys/dev/qlxgbe/ql_os.h  |  4 ----
 4 files changed, 2 insertions(+), 62 deletions(-)

diff --git a/sys/dev/qlxgbe/ql_hw.c b/sys/dev/qlxgbe/ql_hw.c
index 340fc779b10c..119f22ad4137 100644
--- a/sys/dev/qlxgbe/ql_hw.c
+++ b/sys/dev/qlxgbe/ql_hw.c
@@ -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
 
diff --git a/sys/dev/qlxgbe/ql_isr.c b/sys/dev/qlxgbe/ql_isr.c
index 0d1ae164c7ae..0ccc1cbb84c9 100644
--- a/sys/dev/qlxgbe/ql_isr.c
+++ b/sys/dev/qlxgbe/ql_isr.c
@@ -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
 
diff --git a/sys/dev/qlxgbe/ql_os.c b/sys/dev/qlxgbe/ql_os.c
index f0cee6e080b1..298de1693b66 100644
--- a/sys/dev/qlxgbe/ql_os.c
+++ b/sys/dev/qlxgbe/ql_os.c
@@ -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];
diff --git a/sys/dev/qlxgbe/ql_os.h b/sys/dev/qlxgbe/ql_os.h
index fcee6e740828..678eff63520e 100644
--- a/sys/dev/qlxgbe/ql_os.h
+++ b/sys/dev/qlxgbe/ql_os.h
@@ -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>

Reply via email to