Module Name: src
Committed By: martin
Date: Mon Jan 23 14:07:25 UTC 2023
Modified Files:
src/sys/dev/pci [netbsd-8]: files.pci
src/sys/dev/pci/ixgbe [netbsd-8]: ix_txrx.c ixgbe.c ixgbe_82598.c
ixgbe_api.c ixgbe_common.c ixgbe_netbsd.h ixv.c
Log Message:
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.
To generate a diff of this commit:
cvs rdiff -u -r1.388.4.7 -r1.388.4.8 src/sys/dev/pci/files.pci
cvs rdiff -u -r1.24.2.26 -r1.24.2.27 src/sys/dev/pci/ixgbe/ix_txrx.c
cvs rdiff -u -r1.88.2.53 -r1.88.2.54 src/sys/dev/pci/ixgbe/ixgbe.c
cvs rdiff -u -r1.8.8.7 -r1.8.8.8 src/sys/dev/pci/ixgbe/ixgbe_82598.c
cvs rdiff -u -r1.15.8.8 -r1.15.8.9 src/sys/dev/pci/ixgbe/ixgbe_api.c
cvs rdiff -u -r1.13.2.12 -r1.13.2.13 src/sys/dev/pci/ixgbe/ixgbe_common.c
cvs rdiff -u -r1.7.6.5 -r1.7.6.6 src/sys/dev/pci/ixgbe/ixgbe_netbsd.h
cvs rdiff -u -r1.56.2.39 -r1.56.2.40 src/sys/dev/pci/ixgbe/ixv.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/dev/pci/files.pci
diff -u src/sys/dev/pci/files.pci:1.388.4.7 src/sys/dev/pci/files.pci:1.388.4.8
--- src/sys/dev/pci/files.pci:1.388.4.7 Sat Oct 23 11:49:22 2021
+++ src/sys/dev/pci/files.pci Mon Jan 23 14:07:24 2023
@@ -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_phy.c ixg | ixv
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
Index: src/sys/dev/pci/ixgbe/ix_txrx.c
diff -u src/sys/dev/pci/ixgbe/ix_txrx.c:1.24.2.26 src/sys/dev/pci/ixgbe/ix_txrx.c:1.24.2.27
--- src/sys/dev/pci/ixgbe/ix_txrx.c:1.24.2.26 Fri Jun 3 12:31:09 2022
+++ src/sys/dev/pci/ixgbe/ix_txrx.c Mon Jan 23 14:07:24 2023
@@ -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_mq_start(struct ifnet *ifp, struct
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 @@ ixgbe_mq_start(struct ifnet *ifp, struct
kpreempt_enable();
}
}
+#endif
return (0);
} /* ixgbe_mq_start */
@@ -316,7 +322,7 @@ ixgbe_mq_start_locked(struct ifnet *ifp,
#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 @@ ixgbe_rxeof(struct ix_queue *que)
* 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
Index: src/sys/dev/pci/ixgbe/ixgbe.c
diff -u src/sys/dev/pci/ixgbe/ixgbe.c:1.88.2.53 src/sys/dev/pci/ixgbe/ixgbe.c:1.88.2.54
--- src/sys/dev/pci/ixgbe/ixgbe.c:1.88.2.53 Mon Jun 6 11:09:16 2022
+++ src/sys/dev/pci/ixgbe/ixgbe.c Mon Jan 23 14:07:24 2023
@@ -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 @@ ixgbe_attach(device_t parent, device_t d
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 @@ display:
} /* 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_handle_que(void *context)
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_handle_que(void *context)
&& (!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 @@ ixgbe_allocate_msix(struct adapter *adap
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,
Index: src/sys/dev/pci/ixgbe/ixgbe_82598.c
diff -u src/sys/dev/pci/ixgbe/ixgbe_82598.c:1.8.8.7 src/sys/dev/pci/ixgbe/ixgbe_82598.c:1.8.8.8
--- src/sys/dev/pci/ixgbe/ixgbe_82598.c:1.8.8.7 Sun Jan 30 16:06:35 2022
+++ src/sys/dev/pci/ixgbe/ixgbe_82598.c Mon Jan 23 14:07:24 2023
@@ -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 @@ s32 ixgbe_set_vfta_82598(struct ixgbe_hw
* 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)
{
Index: src/sys/dev/pci/ixgbe/ixgbe_api.c
diff -u src/sys/dev/pci/ixgbe/ixgbe_api.c:1.15.8.8 src/sys/dev/pci/ixgbe/ixgbe_api.c:1.15.8.9
--- src/sys/dev/pci/ixgbe/ixgbe_api.c:1.15.8.8 Sun Jan 30 16:06:35 2022
+++ src/sys/dev/pci/ixgbe/ixgbe_api.c Mon Jan 23 14:07:24 2023
@@ -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 @@ s32 ixgbe_disable_mc(struct ixgbe_hw *hw
* 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)
{
Index: src/sys/dev/pci/ixgbe/ixgbe_common.c
diff -u src/sys/dev/pci/ixgbe/ixgbe_common.c:1.13.2.12 src/sys/dev/pci/ixgbe/ixgbe_common.c:1.13.2.13
--- src/sys/dev/pci/ixgbe/ixgbe_common.c:1.13.2.12 Sun Jan 30 16:06:35 2022
+++ src/sys/dev/pci/ixgbe/ixgbe_common.c Mon Jan 23 14:07:24 2023
@@ -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 @@ vlvf_update:
* 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)
{
Index: src/sys/dev/pci/ixgbe/ixgbe_netbsd.h
diff -u src/sys/dev/pci/ixgbe/ixgbe_netbsd.h:1.7.6.5 src/sys/dev/pci/ixgbe/ixgbe_netbsd.h:1.7.6.6
--- src/sys/dev/pci/ixgbe/ixgbe_netbsd.h:1.7.6.5 Fri Jun 3 12:31:10 2022
+++ src/sys/dev/pci/ixgbe/ixgbe_netbsd.h Mon Jan 23 14:07:25 2023
@@ -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
Index: src/sys/dev/pci/ixgbe/ixv.c
diff -u src/sys/dev/pci/ixgbe/ixv.c:1.56.2.39 src/sys/dev/pci/ixgbe/ixv.c:1.56.2.40
--- src/sys/dev/pci/ixgbe/ixv.c:1.56.2.39 Fri Jun 3 12:31:10 2022
+++ src/sys/dev/pci/ixgbe/ixv.c Mon Jan 23 14:07:25 2023
@@ -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 @@ ixv_handle_que(void *context)
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 @@ ixv_handle_que(void *context)
&& (!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) {