summaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authorknakahara <knakahara@NetBSD.org>2022-09-16 03:12:03 +0000
committerknakahara <knakahara@NetBSD.org>2022-09-16 03:12:03 +0000
commit99edb8627565b32908032a4eb12186f741b8aeeb (patch)
tree7fe48359154bd68700dd8e0b00c2ce64ca0dc0b8 /sys/dev
parente6c8f4dcad635a0e173b964042d35434a9e3bba4 (diff)
Add ALWAYS_TXDEFER option to ixl(4), too.
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/pci/files.pci4
-rw-r--r--sys/dev/pci/if_ixl.c10
2 files changed, 10 insertions, 4 deletions
diff --git a/sys/dev/pci/files.pci b/sys/dev/pci/files.pci
index 65375f39949..f9a97bc43b5 100644
--- a/sys/dev/pci/files.pci
+++ b/sys/dev/pci/files.pci
@@ -1,4 +1,4 @@
-# $NetBSD: files.pci,v 1.443 2022/09/16 03:10:12 knakahara Exp $
+# $NetBSD: files.pci,v 1.444 2022/09/16 03:12:03 knakahara Exp $
#
# Config file and device description for machine-independent PCI code.
# Included by ports that need it. Requires that the SCSI files be
@@ -1166,7 +1166,7 @@ file dev/pci/qat/qat_d15xx.c qat
device ixl: ether, ifnet, arp
attach ixl at pci
file dev/pci/if_ixl.c ixl
-defflag opt_if_ixl.h IXL_DEBUG
+defflag opt_if_ixl.h IXL_DEBUG IXL_ALWAYS_TXDEFER
defparam opt_if_ixl.h IXL_STATS_INTERVAL_MSEC
IXL_QUEUE_NUM
diff --git a/sys/dev/pci/if_ixl.c b/sys/dev/pci/if_ixl.c
index 8e2e641ce00..367817767bf 100644
--- a/sys/dev/pci/if_ixl.c
+++ b/sys/dev/pci/if_ixl.c
@@ -1,4 +1,4 @@
-/* $NetBSD: if_ixl.c,v 1.87 2022/08/28 07:54:03 skrll Exp $ */
+/* $NetBSD: if_ixl.c,v 1.88 2022/09/16 03:12:03 knakahara Exp $ */
/*
* Copyright (c) 2013-2015, Intel Corporation
@@ -74,7 +74,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_ixl.c,v 1.87 2022/08/28 07:54:03 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_ixl.c,v 1.88 2022/09/16 03:12:03 knakahara Exp $");
#ifdef _KERNEL_OPT
#include "opt_net_mpsafe.h"
@@ -2883,6 +2883,11 @@ ixl_transmit(struct ifnet *ifp, struct mbuf *m)
return ENOBUFS;
}
+#ifdef IXL_ALWAYS_TXDEFER
+ kpreempt_disable();
+ softint_schedule(txr->txr_si);
+ kpreempt_enable();
+#else
if (mutex_tryenter(&txr->txr_lock)) {
ixl_tx_common_locked(ifp, txr, true);
mutex_exit(&txr->txr_lock);
@@ -2891,6 +2896,7 @@ ixl_transmit(struct ifnet *ifp, struct mbuf *m)
softint_schedule(txr->txr_si);
kpreempt_enable();
}
+#endif
return 0;
}