Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/pci Add ALWAYS_TXDEFER option to ixl(4), too.



details:   https://anonhg.NetBSD.org/src/rev/1a5a336379fd
branches:  trunk
changeset: 370079:1a5a336379fd
user:      knakahara <knakahara%NetBSD.org@localhost>
date:      Fri Sep 16 03:12:03 2022 +0000

description:
Add ALWAYS_TXDEFER option to ixl(4), too.

diffstat:

 sys/dev/pci/files.pci |   4 ++--
 sys/dev/pci/if_ixl.c  |  10 ++++++++--
 2 files changed, 10 insertions(+), 4 deletions(-)

diffs (56 lines):

diff -r f717a19d965a -r 1a5a336379fd sys/dev/pci/files.pci
--- a/sys/dev/pci/files.pci     Fri Sep 16 03:10:12 2022 +0000
+++ b/sys/dev/pci/files.pci     Fri Sep 16 03:12:03 2022 +0000
@@ -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 @@
 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 -r f717a19d965a -r 1a5a336379fd sys/dev/pci/if_ixl.c
--- a/sys/dev/pci/if_ixl.c      Fri Sep 16 03:10:12 2022 +0000
+++ b/sys/dev/pci/if_ixl.c      Fri Sep 16 03:12:03 2022 +0000
@@ -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 @@
                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 @@
                softint_schedule(txr->txr_si);
                kpreempt_enable();
        }
+#endif
 
        return 0;
 }



Home | Main Index | Thread Index | Old Index