Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/netbsd-8]: src/sys/dev/pci Pull up the following revisions, requested by...



details:   https://anonhg.NetBSD.org/src/rev/9861caaa67eb
branches:  netbsd-8
changeset: 373192:9861caaa67eb
user:      martin <martin%NetBSD.org@localhost>
date:      Mon Jan 23 14:07:24 2023 +0000

description:
Pull up the following revisions, requested by msaitoh in ticket #1796:

        sys/dev/pci/files.pci                           1.442
        sys/dev/pci/ixgbe/ix_txrx.c                     1.99-1.100
        sys/dev/pci/ixgbe/ixgbe.c                       1.320-1.324 via patch
        sys/dev/pci/ixgbe/ixgbe_82598.c                 1.19
        sys/dev/pci/ixgbe/ixgbe_api.c                   1.28
        sys/dev/pci/ixgbe/ixgbe_common.c                1.43
        sys/dev/pci/ixgbe/ixgbe_netbsd.h                1.17
        sys/dev/pci/ixgbe/ixv.c                         1.183

- Add an option for Tx to use deferred softint regardless of whether
  can get txq lock or not. It's off by default.
- Call txeof first, then rxeof for the consistency.
- Make three "Unsupported SFP+ module..." messages the same.
- KNF. Modify comment. Fix typo.

diffstat:

 sys/dev/pci/files.pci            |   3 ++-
 sys/dev/pci/ixgbe/ix_txrx.c      |  14 ++++++++++----
 sys/dev/pci/ixgbe/ixgbe.c        |  15 ++++++++-------
 sys/dev/pci/ixgbe/ixgbe_82598.c  |   6 +++---
 sys/dev/pci/ixgbe/ixgbe_api.c    |   6 +++---
 sys/dev/pci/ixgbe/ixgbe_common.c |   6 +++---
 sys/dev/pci/ixgbe/ixgbe_netbsd.h |   6 +++++-
 sys/dev/pci/ixgbe/ixv.c          |   8 ++++----
 8 files changed, 38 insertions(+), 26 deletions(-)

diffs (276 lines):

diff -r 9c1fb0bc2f1c -r 9861caaa67eb sys/dev/pci/files.pci
--- a/sys/dev/pci/files.pci     Mon Jan 23 14:01:25 2023 +0000
+++ b/sys/dev/pci/files.pci     Mon Jan 23 14:07:24 2023 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: files.pci,v 1.388.4.7 2021/10/23 11:49:22 martin Exp $
+#      $NetBSD: files.pci,v 1.388.4.8 2023/01/23 14:07:24 martin Exp $
 #
 # Config file and device description for machine-independent PCI code.
 # Included by ports that need it.  Requires that the SCSI files be
@@ -687,6 +687,7 @@
 file   dev/pci/ixgbe/ixgbe_vf.c        ixg | ixv
 file   dev/pci/ixgbe/if_bypass.c       ixg | ixv
 file   dev/pci/ixgbe/if_fdir.c         ixg | ixv
+defflag        opt_if_ixg.h    IXGBE_ALWAYS_TXDEFER
 
 # This appears to be the driver for virtual instances of i82599.
 device ixv: ether, ifnet, arp, mii, mii_phy
diff -r 9c1fb0bc2f1c -r 9861caaa67eb sys/dev/pci/ixgbe/ix_txrx.c
--- a/sys/dev/pci/ixgbe/ix_txrx.c       Mon Jan 23 14:01:25 2023 +0000
+++ b/sys/dev/pci/ixgbe/ix_txrx.c       Mon Jan 23 14:07:24 2023 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ix_txrx.c,v 1.24.2.26 2022/06/03 12:31:09 martin Exp $ */
+/* $NetBSD: ix_txrx.c,v 1.24.2.27 2023/01/23 14:07:24 martin Exp $ */
 
 /******************************************************************************
 
@@ -64,7 +64,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ix_txrx.c,v 1.24.2.26 2022/06/03 12:31:09 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ix_txrx.c,v 1.24.2.27 2023/01/23 14:07:24 martin Exp $");
 
 #include "opt_inet.h"
 #include "opt_inet6.h"
@@ -250,6 +250,11 @@
                IXGBE_EVC_ADD(&txr->pcq_drops, 1);
                return ENOBUFS;
        }
+#ifdef IXGBE_ALWAYS_TXDEFER
+       kpreempt_disable();
+       softint_schedule(txr->txr_si);
+       kpreempt_enable();
+#else
        if (IXGBE_TX_TRYLOCK(txr)) {
                ixgbe_mq_start_locked(ifp, txr);
                IXGBE_TX_UNLOCK(txr);
@@ -279,6 +284,7 @@
                        kpreempt_enable();
                }
        }
+#endif
 
        return (0);
 } /* ixgbe_mq_start */
@@ -316,7 +322,7 @@
 #if __FreeBSD_version >= 1100036
                /*
                 * Since we're looking at the tx ring, we can check
-                * to see if we're a VF by examing our tail register
+                * to see if we're a VF by examining our tail register
                 * address.
                 */
                if ((txr->adapter->feat_en & IXGBE_FEATURE_VF) &&
@@ -1977,7 +1983,7 @@
                 * not be fragmented across sequential
                 * descriptors, rather the next descriptor
                 * is indicated in bits of the descriptor.
-                * This also means that we might proceses
+                * This also means that we might process
                 * more than one packet at a time, something
                 * that has never been true before, it
                 * required eliminating global chain pointers
diff -r 9c1fb0bc2f1c -r 9861caaa67eb sys/dev/pci/ixgbe/ixgbe.c
--- a/sys/dev/pci/ixgbe/ixgbe.c Mon Jan 23 14:01:25 2023 +0000
+++ b/sys/dev/pci/ixgbe/ixgbe.c Mon Jan 23 14:07:24 2023 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ixgbe.c,v 1.88.2.53 2022/06/06 11:09:16 martin Exp $ */
+/* $NetBSD: ixgbe.c,v 1.88.2.54 2023/01/23 14:07:24 martin Exp $ */
 
 /******************************************************************************
 
@@ -64,7 +64,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ixgbe.c,v 1.88.2.53 2022/06/06 11:09:16 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ixgbe.c,v 1.88.2.54 2023/01/23 14:07:24 martin Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_inet.h"
@@ -963,7 +963,8 @@
                adapter->sfp_probe = TRUE;
                error = IXGBE_SUCCESS;
        } else if (error == IXGBE_ERR_SFP_NOT_SUPPORTED) {
-               aprint_error_dev(dev, "Unsupported SFP+ module detected!\n");
+               aprint_error_dev(dev,
+                   "Unsupported SFP+ module detected!\n");
                unsupported_sfp = true;
                error = IXGBE_SUCCESS;
        } else if (error) {
@@ -2582,7 +2583,7 @@
 } /* ixgbe_get_slot_info */
 
 /************************************************************************
- * ixgbe_enable_queue - Interrupt Enabler
+ * ixgbe_enable_queue - Queue Interrupt Enabler
  ************************************************************************/
 static inline void
 ixgbe_enable_queue(struct adapter *adapter, u32 vector)
@@ -6466,9 +6467,8 @@
        IXGBE_EVC_ADD(&que->handleq, 1);
 
        if (ifp->if_flags & IFF_RUNNING) {
-               more = ixgbe_rxeof(que);
                IXGBE_TX_LOCK(txr);
-               more |= ixgbe_txeof(txr);
+               more = ixgbe_txeof(txr);
                if (!(adapter->feat_en & IXGBE_FEATURE_LEGACY_TX))
                        if (!ixgbe_mq_ring_empty(ifp, txr->txr_interq))
                                ixgbe_mq_start_locked(ifp, txr);
@@ -6478,6 +6478,7 @@
                    && (!ixgbe_legacy_ring_empty(ifp, NULL)))
                        ixgbe_legacy_start_locked(ifp, txr);
                IXGBE_TX_UNLOCK(txr);
+               more |= ixgbe_rxeof(que);
        }
 
        if (more) {
@@ -6727,7 +6728,7 @@
                if (error == 0) {
 #if 1 /* def IXGBE_DEBUG */
 #ifdef RSS
-                       aprintf_normal(", bound RSS bucket %d to CPU %d", i,
+                       aprint_normal(", bound RSS bucket %d to CPU %d", i,
                            cpu_id % ncpu);
 #else
                        aprint_normal(", bound queue %d to cpu %d", i,
diff -r 9c1fb0bc2f1c -r 9861caaa67eb sys/dev/pci/ixgbe/ixgbe_82598.c
--- a/sys/dev/pci/ixgbe/ixgbe_82598.c   Mon Jan 23 14:01:25 2023 +0000
+++ b/sys/dev/pci/ixgbe/ixgbe_82598.c   Mon Jan 23 14:07:24 2023 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ixgbe_82598.c,v 1.8.8.7 2022/01/30 16:06:35 martin Exp $ */
+/* $NetBSD: ixgbe_82598.c,v 1.8.8.8 2023/01/23 14:07:24 martin Exp $ */
 
 /******************************************************************************
   SPDX-License-Identifier: BSD-3-Clause
@@ -36,7 +36,7 @@
 /*$FreeBSD: head/sys/dev/ixgbe/ixgbe_82598.c 331224 2018-03-19 20:55:05Z erj $*/
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ixgbe_82598.c,v 1.8.8.7 2022/01/30 16:06:35 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ixgbe_82598.c,v 1.8.8.8 2023/01/23 14:07:24 martin Exp $");
 
 #include "ixgbe_type.h"
 #include "ixgbe_82598.h"
@@ -1053,7 +1053,7 @@
  * ixgbe_clear_vfta_82598 - Clear VLAN filter table
  * @hw: pointer to hardware structure
  *
- * Clears the VLAN filer table, and the VMDq index associated with the filter
+ * Clears the VLAN filter table, and the VMDq index associated with the filter
  **/
 static s32 ixgbe_clear_vfta_82598(struct ixgbe_hw *hw)
 {
diff -r 9c1fb0bc2f1c -r 9861caaa67eb sys/dev/pci/ixgbe/ixgbe_api.c
--- a/sys/dev/pci/ixgbe/ixgbe_api.c     Mon Jan 23 14:01:25 2023 +0000
+++ b/sys/dev/pci/ixgbe/ixgbe_api.c     Mon Jan 23 14:07:24 2023 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ixgbe_api.c,v 1.15.8.8 2022/01/30 16:06:35 martin Exp $ */
+/* $NetBSD: ixgbe_api.c,v 1.15.8.9 2023/01/23 14:07:24 martin Exp $ */
 
 /******************************************************************************
   SPDX-License-Identifier: BSD-3-Clause
@@ -36,7 +36,7 @@
 /*$FreeBSD: head/sys/dev/ixgbe/ixgbe_api.c 331224 2018-03-19 20:55:05Z erj $*/
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ixgbe_api.c,v 1.15.8.8 2022/01/30 16:06:35 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ixgbe_api.c,v 1.15.8.9 2023/01/23 14:07:24 martin Exp $");
 
 #include "ixgbe_api.h"
 #include "ixgbe_common.h"
@@ -1062,7 +1062,7 @@
  * ixgbe_clear_vfta - Clear VLAN filter table
  * @hw: pointer to hardware structure
  *
- * Clears the VLAN filer table, and the VMDq index associated with the filter
+ * Clears the VLAN filter table, and the VMDq index associated with the filter
  **/
 s32 ixgbe_clear_vfta(struct ixgbe_hw *hw)
 {
diff -r 9c1fb0bc2f1c -r 9861caaa67eb sys/dev/pci/ixgbe/ixgbe_common.c
--- a/sys/dev/pci/ixgbe/ixgbe_common.c  Mon Jan 23 14:01:25 2023 +0000
+++ b/sys/dev/pci/ixgbe/ixgbe_common.c  Mon Jan 23 14:07:24 2023 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ixgbe_common.c,v 1.13.2.12 2022/01/30 16:06:35 martin Exp $ */
+/* $NetBSD: ixgbe_common.c,v 1.13.2.13 2023/01/23 14:07:24 martin Exp $ */
 
 /******************************************************************************
   SPDX-License-Identifier: BSD-3-Clause
@@ -36,7 +36,7 @@
 /*$FreeBSD: head/sys/dev/ixgbe/ixgbe_common.c 331224 2018-03-19 20:55:05Z erj $*/
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ixgbe_common.c,v 1.13.2.12 2022/01/30 16:06:35 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ixgbe_common.c,v 1.13.2.13 2023/01/23 14:07:24 martin Exp $");
 
 #include "ixgbe_common.h"
 #include "ixgbe_phy.h"
@@ -4142,7 +4142,7 @@
  * ixgbe_clear_vfta_generic - Clear VLAN filter table
  * @hw: pointer to hardware structure
  *
- * Clears the VLAN filer table, and the VMDq index associated with the filter
+ * Clears the VLAN filter table, and the VMDq index associated with the filter
  **/
 s32 ixgbe_clear_vfta_generic(struct ixgbe_hw *hw)
 {
diff -r 9c1fb0bc2f1c -r 9861caaa67eb sys/dev/pci/ixgbe/ixgbe_netbsd.h
--- a/sys/dev/pci/ixgbe/ixgbe_netbsd.h  Mon Jan 23 14:01:25 2023 +0000
+++ b/sys/dev/pci/ixgbe/ixgbe_netbsd.h  Mon Jan 23 14:07:24 2023 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ixgbe_netbsd.h,v 1.7.6.5 2022/06/03 12:31:10 martin Exp $ */
+/* $NetBSD: ixgbe_netbsd.h,v 1.7.6.6 2023/01/23 14:07:25 martin Exp $ */
 /*
  * Copyright (c) 2011 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -31,6 +31,10 @@
 #ifndef _IXGBE_NETBSD_H
 #define _IXGBE_NETBSD_H
 
+#ifdef _KERNEL_OPT
+#include "opt_if_ixg.h"
+#endif
+
 #if 0 /* Enable this if you don't want to use TX multiqueue function */
 #define        IXGBE_LEGACY_TX 1
 #endif
diff -r 9c1fb0bc2f1c -r 9861caaa67eb sys/dev/pci/ixgbe/ixv.c
--- a/sys/dev/pci/ixgbe/ixv.c   Mon Jan 23 14:01:25 2023 +0000
+++ b/sys/dev/pci/ixgbe/ixv.c   Mon Jan 23 14:07:24 2023 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ixv.c,v 1.56.2.39 2022/06/03 12:31:10 martin Exp $ */
+/* $NetBSD: ixv.c,v 1.56.2.40 2023/01/23 14:07:25 martin Exp $ */
 
 /******************************************************************************
 
@@ -35,7 +35,7 @@
 /*$FreeBSD: head/sys/dev/ixgbe/if_ixv.c 331224 2018-03-19 20:55:05Z erj $*/
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ixv.c,v 1.56.2.39 2022/06/03 12:31:10 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ixv.c,v 1.56.2.40 2023/01/23 14:07:25 martin Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_inet.h"
@@ -3159,9 +3159,8 @@
        IXGBE_EVC_ADD(&que->handleq, 1);
 
        if (ifp->if_flags & IFF_RUNNING) {
-               more = ixgbe_rxeof(que);
                IXGBE_TX_LOCK(txr);
-               more |= ixgbe_txeof(txr);
+               more = ixgbe_txeof(txr);
                if (!(adapter->feat_en & IXGBE_FEATURE_LEGACY_TX))
                        if (!ixgbe_mq_ring_empty(ifp, txr->txr_interq))
                                ixgbe_mq_start_locked(ifp, txr);
@@ -3171,6 +3170,7 @@
                    && (!ixgbe_legacy_ring_empty(ifp, NULL)))
                        ixgbe_legacy_start_locked(ifp, txr);
                IXGBE_TX_UNLOCK(txr);
+               more |= ixgbe_rxeof(que);
                if (more) {
                        IXGBE_EVC_ADD(&que->req, 1);
                        if (adapter->txrx_use_workqueue) {



Home | Main Index | Thread Index | Old Index