Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/pci/ixgbe Use percpuq.
details: https://anonhg.NetBSD.org/src/rev/885f7c337739
branches: trunk
changeset: 351440:885f7c337739
user: msaitoh <msaitoh%NetBSD.org@localhost>
date: Mon Feb 13 10:13:54 2017 +0000
description:
Use percpuq.
diffstat:
sys/dev/pci/ixgbe/ix_txrx.c | 9 +++------
sys/dev/pci/ixgbe/ixgbe.c | 4 +++-
sys/dev/pci/ixgbe/ixgbe.h | 3 ++-
sys/dev/pci/ixgbe/ixv.c | 4 +++-
4 files changed, 11 insertions(+), 9 deletions(-)
diffs (111 lines):
diff -r 34b6d225bc29 -r 885f7c337739 sys/dev/pci/ixgbe/ix_txrx.c
--- a/sys/dev/pci/ixgbe/ix_txrx.c Mon Feb 13 09:46:29 2017 +0000
+++ b/sys/dev/pci/ixgbe/ix_txrx.c Mon Feb 13 10:13:54 2017 +0000
@@ -59,7 +59,7 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
/*$FreeBSD: head/sys/dev/ixgbe/ix_txrx.c 301538 2016-06-07 04:51:50Z sephe $*/
-/*$NetBSD: ix_txrx.c,v 1.19 2017/02/10 06:35:22 msaitoh Exp $*/
+/*$NetBSD: ix_txrx.c,v 1.20 2017/02/13 10:13:54 msaitoh Exp $*/
#include "opt_inet.h"
#include "opt_inet6.h"
@@ -1704,10 +1704,9 @@
static __inline void
ixgbe_rx_input(struct rx_ring *rxr, struct ifnet *ifp, struct mbuf *m, u32 ptype)
{
- int s;
+ struct adapter *adapter = ifp->if_softc;
#ifdef LRO
- struct adapter *adapter = ifp->if_softc;
struct ethercom *ec = &adapter->osdep.ec;
/*
@@ -1738,9 +1737,7 @@
IXGBE_RX_UNLOCK(rxr);
- s = splnet();
- if_input(ifp, m);
- splx(s);
+ if_percpuq_enqueue(adapter->ipq, m);
IXGBE_RX_LOCK(rxr);
}
diff -r 34b6d225bc29 -r 885f7c337739 sys/dev/pci/ixgbe/ixgbe.c
--- a/sys/dev/pci/ixgbe/ixgbe.c Mon Feb 13 09:46:29 2017 +0000
+++ b/sys/dev/pci/ixgbe/ixgbe.c Mon Feb 13 10:13:54 2017 +0000
@@ -59,7 +59,7 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
/*$FreeBSD: head/sys/dev/ixgbe/if_ix.c 302384 2016-07-07 03:39:18Z sbruno $*/
-/*$NetBSD: ixgbe.c,v 1.74 2017/02/13 06:38:45 msaitoh Exp $*/
+/*$NetBSD: ixgbe.c,v 1.75 2017/02/13 10:13:54 msaitoh Exp $*/
#include "opt_inet.h"
#include "opt_inet6.h"
@@ -780,6 +780,7 @@
bus_generic_detach(dev);
#endif
if_detach(adapter->ifp);
+ if_percpuq_destroy(adapter->ipq);
sysctl_teardown(&adapter->sysctllog);
evcnt_detach(&adapter->handleq);
@@ -3001,6 +3002,7 @@
IFQ_SET_READY(&ifp->if_snd);
if_initialize(ifp);
+ adapter->ipq = if_percpuq_create(&adapter->osdep.ec.ec_if);
ether_ifattach(ifp, adapter->hw.mac.addr);
/*
* We use per TX queue softint, so if_deferred_start_init() isn't
diff -r 34b6d225bc29 -r 885f7c337739 sys/dev/pci/ixgbe/ixgbe.h
--- a/sys/dev/pci/ixgbe/ixgbe.h Mon Feb 13 09:46:29 2017 +0000
+++ b/sys/dev/pci/ixgbe/ixgbe.h Mon Feb 13 10:13:54 2017 +0000
@@ -59,7 +59,7 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
/*$FreeBSD: head/sys/dev/ixgbe/ixgbe.h 303890 2016-08-09 19:32:06Z dumbbell $*/
-/*$NetBSD: ixgbe.h,v 1.23 2017/02/10 06:35:22 msaitoh Exp $*/
+/*$NetBSD: ixgbe.h,v 1.24 2017/02/13 10:13:54 msaitoh Exp $*/
#ifndef _IXGBE_H_
@@ -475,6 +475,7 @@
device_t dev;
struct ifnet *ifp;
+ struct if_percpuq *ipq; /* softint-based input queues */
struct resource *pci_mem;
struct resource *msix_mem;
diff -r 34b6d225bc29 -r 885f7c337739 sys/dev/pci/ixgbe/ixv.c
--- a/sys/dev/pci/ixgbe/ixv.c Mon Feb 13 09:46:29 2017 +0000
+++ b/sys/dev/pci/ixgbe/ixv.c Mon Feb 13 10:13:54 2017 +0000
@@ -31,7 +31,7 @@
******************************************************************************/
/*$FreeBSD: head/sys/dev/ixgbe/if_ixv.c 302384 2016-07-07 03:39:18Z sbruno $*/
-/*$NetBSD: ixv.c,v 1.51 2017/02/13 06:38:45 msaitoh Exp $*/
+/*$NetBSD: ixv.c,v 1.52 2017/02/13 10:13:54 msaitoh Exp $*/
#include "opt_inet.h"
#include "opt_inet6.h"
@@ -530,6 +530,7 @@
bus_generic_detach(dev);
#endif
if_detach(adapter->ifp);
+ if_percpuq_destroy(adapter->ipq);
sysctl_teardown(&adapter->sysctllog);
evcnt_detach(&adapter->handleq);
@@ -1676,6 +1677,7 @@
IFQ_SET_READY(&ifp->if_snd);
if_initialize(ifp);
+ adapter->ipq = if_percpuq_create(&adapter->osdep.ec.ec_if);
ether_ifattach(ifp, adapter->hw.mac.addr);
/*
* We use per TX queue softint, so if_deferred_start_init() isn't
Home |
Main Index |
Thread Index |
Old Index