Source-Changes-HG archive

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

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



details:   https://anonhg.NetBSD.org/src/rev/99cac760bb97
branches:  netbsd-9
changeset: 373197:99cac760bb97
user:      martin <martin%NetBSD.org@localhost>
date:      Mon Jan 23 14:04:41 2023 +0000

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

        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        |  22 +++++++++++-----------
 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, 41 insertions(+), 30 deletions(-)

diffs (truncated from 311 to 300 lines):

diff -r 325bd48c4efe -r 99cac760bb97 sys/dev/pci/files.pci
--- a/sys/dev/pci/files.pci     Mon Jan 23 13:59:04 2023 +0000
+++ b/sys/dev/pci/files.pci     Mon Jan 23 14:04:41 2023 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: files.pci,v 1.413.2.5 2021/10/21 14:30:10 martin Exp $
+#      $NetBSD: files.pci,v 1.413.2.6 2023/01/23 14:04:41 martin Exp $
 #
 # Config file and device description for machine-independent PCI code.
 # Included by ports that need it.  Requires that the SCSI files be
@@ -691,6 +691,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 325bd48c4efe -r 99cac760bb97 sys/dev/pci/ixgbe/ix_txrx.c
--- a/sys/dev/pci/ixgbe/ix_txrx.c       Mon Jan 23 13:59:04 2023 +0000
+++ b/sys/dev/pci/ixgbe/ix_txrx.c       Mon Jan 23 14:04:41 2023 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ix_txrx.c,v 1.54.2.10 2022/05/30 17:01:06 martin Exp $ */
+/* $NetBSD: ix_txrx.c,v 1.54.2.11 2023/01/23 14:04:42 martin Exp $ */
 
 /******************************************************************************
 
@@ -64,7 +64,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ix_txrx.c,v 1.54.2.10 2022/05/30 17:01:06 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ix_txrx.c,v 1.54.2.11 2023/01/23 14:04:42 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 325bd48c4efe -r 99cac760bb97 sys/dev/pci/ixgbe/ixgbe.c
--- a/sys/dev/pci/ixgbe/ixgbe.c Mon Jan 23 13:59:04 2023 +0000
+++ b/sys/dev/pci/ixgbe/ixgbe.c Mon Jan 23 14:04:41 2023 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ixgbe.c,v 1.199.2.24 2022/06/03 04:00:49 snj Exp $ */
+/* $NetBSD: ixgbe.c,v 1.199.2.25 2023/01/23 14:04:42 martin Exp $ */
 
 /******************************************************************************
 
@@ -64,7 +64,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ixgbe.c,v 1.199.2.24 2022/06/03 04:00:49 snj Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ixgbe.c,v 1.199.2.25 2023/01/23 14:04:42 martin Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_inet.h"
@@ -968,7 +968,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) {
@@ -1562,7 +1563,6 @@
                        err = hw->mac.ops.setup_link(hw, autoneg,
                            adapter->link_up);
        }
-
 } /* ixgbe_config_link */
 
 /************************************************************************
@@ -2631,7 +2631,7 @@
 } /* ixgbe_get_slot_info */
 
 /************************************************************************
- * ixgbe_enable_queue - MSI-X Interrupt Handlers and Tasklets
+ * ixgbe_enable_queue - Queue Interrupt Enabler
  ************************************************************************/
 static inline void
 ixgbe_enable_queue(struct adapter *adapter, u32 vector)
@@ -3079,7 +3079,7 @@
 } /* ixgbe_media_change */
 
 /************************************************************************
- * ixgbe_msix_admin - Link status change ISR (MSI/MSI-X)
+ * ixgbe_msix_admin - Link status change ISR (MSI-X)
  ************************************************************************/
 static int
 ixgbe_msix_admin(void *arg)
@@ -5232,7 +5232,6 @@
                    adapter->osdep.mem_bus_space_handle,
                    adapter->osdep.mem_size);
        }
-
 } /* ixgbe_free_pci_resources */
 
 /************************************************************************
@@ -6226,7 +6225,8 @@
                if (adapter->feat_cap & IXGBE_FEATURE_FDIR)
                        adapter->feat_en |= IXGBE_FEATURE_FDIR;
                else
-                       device_printf(adapter->dev, "Device does not support Flow Director. Leaving disabled.");
+                       device_printf(adapter->dev, "Device does not support "
+                           "Flow Director. Leaving disabled.");
        }
        /* Legacy (single queue) transmit */
        if ((adapter->feat_cap & IXGBE_FEATURE_LEGACY_TX) &&
@@ -6520,9 +6520,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);
@@ -6532,6 +6531,7 @@
                    && (!ixgbe_legacy_ring_empty(ifp, NULL)))
                        ixgbe_legacy_start_locked(ifp, txr);
                IXGBE_TX_UNLOCK(txr);
+               more |= ixgbe_rxeof(que);
        }
 
        if (more) {
@@ -6781,7 +6781,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 325bd48c4efe -r 99cac760bb97 sys/dev/pci/ixgbe/ixgbe_82598.c
--- a/sys/dev/pci/ixgbe/ixgbe_82598.c   Mon Jan 23 13:59:04 2023 +0000
+++ b/sys/dev/pci/ixgbe/ixgbe_82598.c   Mon Jan 23 14:04:41 2023 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ixgbe_82598.c,v 1.12.8.5 2022/01/30 15:58:28 martin Exp $ */
+/* $NetBSD: ixgbe_82598.c,v 1.12.8.6 2023/01/23 14:04:42 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.12.8.5 2022/01/30 15:58:28 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ixgbe_82598.c,v 1.12.8.6 2023/01/23 14:04:42 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 325bd48c4efe -r 99cac760bb97 sys/dev/pci/ixgbe/ixgbe_api.c
--- a/sys/dev/pci/ixgbe/ixgbe_api.c     Mon Jan 23 13:59:04 2023 +0000
+++ b/sys/dev/pci/ixgbe/ixgbe_api.c     Mon Jan 23 14:04:41 2023 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ixgbe_api.c,v 1.23.2.3 2022/01/30 15:58:28 martin Exp $ */
+/* $NetBSD: ixgbe_api.c,v 1.23.2.4 2023/01/23 14:04:42 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.23.2.3 2022/01/30 15:58:28 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ixgbe_api.c,v 1.23.2.4 2023/01/23 14:04:42 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 325bd48c4efe -r 99cac760bb97 sys/dev/pci/ixgbe/ixgbe_common.c
--- a/sys/dev/pci/ixgbe/ixgbe_common.c  Mon Jan 23 13:59:04 2023 +0000
+++ b/sys/dev/pci/ixgbe/ixgbe_common.c  Mon Jan 23 14:04:41 2023 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ixgbe_common.c,v 1.25.2.5 2022/01/30 15:58:28 martin Exp $ */
+/* $NetBSD: ixgbe_common.c,v 1.25.2.6 2023/01/23 14:04:42 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.25.2.5 2022/01/30 15:58:28 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ixgbe_common.c,v 1.25.2.6 2023/01/23 14:04:42 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 325bd48c4efe -r 99cac760bb97 sys/dev/pci/ixgbe/ixgbe_netbsd.h
--- a/sys/dev/pci/ixgbe/ixgbe_netbsd.h  Mon Jan 23 13:59:04 2023 +0000
+++ b/sys/dev/pci/ixgbe/ixgbe_netbsd.h  Mon Jan 23 14:04:41 2023 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ixgbe_netbsd.h,v 1.11.4.3 2022/02/02 14:25:49 martin Exp $ */
+/* $NetBSD: ixgbe_netbsd.h,v 1.11.4.4 2023/01/23 14:04:42 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 325bd48c4efe -r 99cac760bb97 sys/dev/pci/ixgbe/ixv.c
--- a/sys/dev/pci/ixgbe/ixv.c   Mon Jan 23 13:59:04 2023 +0000
+++ b/sys/dev/pci/ixgbe/ixv.c   Mon Jan 23 14:04:41 2023 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ixv.c,v 1.125.2.20 2022/06/02 10:45:12 martin Exp $ */
+/* $NetBSD: ixv.c,v 1.125.2.21 2023/01/23 14:04:42 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.125.2.20 2022/06/02 10:45:12 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ixv.c,v 1.125.2.21 2023/01/23 14:04:42 martin Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_inet.h"
@@ -3245,9 +3245,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);



Home | Main Index | Thread Index | Old Index