diff options
| author | knakahara <knakahara@NetBSD.org> | 2022-09-16 03:05:51 +0000 |
|---|---|---|
| committer | knakahara <knakahara@NetBSD.org> | 2022-09-16 03:05:51 +0000 |
| commit | 8a7dc0ab515ac52c3bea8e0d0cb146522df1e40d (patch) | |
| tree | e9208ec0be264b54ab6545b703390fcf4b1c902e /sys/dev | |
| parent | bbc3ce0bfa888af5e7db3d6216cabe9f308d4d0e (diff) | |
ixg(4) add an option for Tx to use deferred softint regardless of whether can get txq lock or not.
That imporve (7%) and stabilize throughput. But that can cause
latency degradation, so off by default.
ok'ed by msaitoh@n.o.
Diffstat (limited to 'sys/dev')
| -rw-r--r-- | sys/dev/pci/files.pci | 3 | ||||
| -rw-r--r-- | sys/dev/pci/ixgbe/ix_txrx.c | 10 | ||||
| -rw-r--r-- | sys/dev/pci/ixgbe/ixgbe_netbsd.h | 6 |
3 files changed, 15 insertions, 4 deletions
diff --git a/sys/dev/pci/files.pci b/sys/dev/pci/files.pci index 267fb39778b..3dcf72375d4 100644 --- a/sys/dev/pci/files.pci +++ b/sys/dev/pci/files.pci @@ -1,4 +1,4 @@ -# $NetBSD: files.pci,v 1.441 2022/09/07 06:37:04 martin Exp $ +# $NetBSD: files.pci,v 1.442 2022/09/16 03:05:51 knakahara Exp $ # # Config file and device description for machine-independent PCI code. # Included by ports that need it. Requires that the SCSI files be @@ -665,6 +665,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 diff --git a/sys/dev/pci/ixgbe/ix_txrx.c b/sys/dev/pci/ixgbe/ix_txrx.c index fd79da538a6..2e491af98de 100644 --- a/sys/dev/pci/ixgbe/ix_txrx.c +++ b/sys/dev/pci/ixgbe/ix_txrx.c @@ -1,4 +1,4 @@ -/* $NetBSD: ix_txrx.c,v 1.99 2022/08/07 09:37:47 andvar Exp $ */ +/* $NetBSD: ix_txrx.c,v 1.100 2022/09/16 03:05:51 knakahara Exp $ */ /****************************************************************************** @@ -64,7 +64,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: ix_txrx.c,v 1.99 2022/08/07 09:37:47 andvar Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ix_txrx.c,v 1.100 2022/09/16 03:05:51 knakahara Exp $"); #include "opt_inet.h" #include "opt_inet6.h" @@ -250,6 +250,11 @@ ixgbe_mq_start(struct ifnet *ifp, struct mbuf *m) 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 mbuf *m) kpreempt_enable(); } } +#endif return (0); } /* ixgbe_mq_start */ diff --git a/sys/dev/pci/ixgbe/ixgbe_netbsd.h b/sys/dev/pci/ixgbe/ixgbe_netbsd.h index 2ee1302c674..54bd36553ca 100644 --- a/sys/dev/pci/ixgbe/ixgbe_netbsd.h +++ b/sys/dev/pci/ixgbe/ixgbe_netbsd.h @@ -1,4 +1,4 @@ -/* $NetBSD: ixgbe_netbsd.h,v 1.16 2022/01/25 03:40:29 msaitoh Exp $ */ +/* $NetBSD: ixgbe_netbsd.h,v 1.17 2022/09/16 03:05:51 knakahara 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 |
