ixgbe.c (248287) | ixgbe.c (250458) |
---|---|
1/****************************************************************************** 2 3 Copyright (c) 2001-2013, Intel Corporation 4 All rights reserved. 5 6 Redistribution and use in source and binary forms, with or without 7 modification, are permitted provided that the following conditions are met: 8 --- 16 unchanged lines hidden (view full) --- 25 CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 26 SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 27 INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 28 CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 29 ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 30 POSSIBILITY OF SUCH DAMAGE. 31 32******************************************************************************/ | 1/****************************************************************************** 2 3 Copyright (c) 2001-2013, Intel Corporation 4 All rights reserved. 5 6 Redistribution and use in source and binary forms, with or without 7 modification, are permitted provided that the following conditions are met: 8 --- 16 unchanged lines hidden (view full) --- 25 CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 26 SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 27 INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 28 CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 29 ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 30 POSSIBILITY OF SUCH DAMAGE. 31 32******************************************************************************/ |
33/*$FreeBSD: stable/9/sys/dev/ixgbe/ixgbe.c 248287 2013-03-14 21:39:39Z jfv $*/ | 33/*$FreeBSD: stable/9/sys/dev/ixgbe/ixgbe.c 250458 2013-05-10 16:16:33Z luigi $*/ |
34 35#ifdef HAVE_KERNEL_OPTION_HEADERS 36#include "opt_inet.h" 37#include "opt_inet6.h" 38#endif 39 40#include "ixgbe.h" 41 --- 3526 unchanged lines hidden (view full) --- 3568 * 3569 * When the driver has separate locks, we need to 3570 * release and re-acquire txlock to avoid deadlocks. 3571 * XXX see if we can find a better way. 3572 */ 3573 if (!netmap_mitigate || 3574 (kring->nr_kflags < kring->nkr_num_slots && 3575 txd[kring->nr_kflags].wb.status & IXGBE_TXD_STAT_DD)) { | 34 35#ifdef HAVE_KERNEL_OPTION_HEADERS 36#include "opt_inet.h" 37#include "opt_inet6.h" 38#endif 39 40#include "ixgbe.h" 41 --- 3526 unchanged lines hidden (view full) --- 3568 * 3569 * When the driver has separate locks, we need to 3570 * release and re-acquire txlock to avoid deadlocks. 3571 * XXX see if we can find a better way. 3572 */ 3573 if (!netmap_mitigate || 3574 (kring->nr_kflags < kring->nkr_num_slots && 3575 txd[kring->nr_kflags].wb.status & IXGBE_TXD_STAT_DD)) { |
3576 kring->nr_kflags = kring->nkr_num_slots; 3577 selwakeuppri(&na->tx_rings[txr->me].si, PI_NET); 3578 IXGBE_TX_UNLOCK(txr); 3579 IXGBE_CORE_LOCK(adapter); 3580 selwakeuppri(&na->tx_si, PI_NET); 3581 IXGBE_CORE_UNLOCK(adapter); 3582 IXGBE_TX_LOCK(txr); | 3576 netmap_tx_irq(ifp, txr->me | 3577 (NETMAP_LOCKED_ENTER|NETMAP_LOCKED_EXIT)); |
3583 } 3584 return FALSE; 3585 } 3586#endif /* DEV_NETMAP */ 3587 3588 if (txr->tx_avail == txr->num_desc) { 3589 txr->queue_status = IXGBE_QUEUE_IDLE; 3590 return FALSE; --- 768 unchanged lines hidden (view full) --- 4359 u32 staterr = 0; 4360 u16 count = rxr->process_limit; 4361 union ixgbe_adv_rx_desc *cur; 4362 struct ixgbe_rx_buf *rbuf, *nbuf; 4363 4364 IXGBE_RX_LOCK(rxr); 4365 4366#ifdef DEV_NETMAP | 3578 } 3579 return FALSE; 3580 } 3581#endif /* DEV_NETMAP */ 3582 3583 if (txr->tx_avail == txr->num_desc) { 3584 txr->queue_status = IXGBE_QUEUE_IDLE; 3585 return FALSE; --- 768 unchanged lines hidden (view full) --- 4354 u32 staterr = 0; 4355 u16 count = rxr->process_limit; 4356 union ixgbe_adv_rx_desc *cur; 4357 struct ixgbe_rx_buf *rbuf, *nbuf; 4358 4359 IXGBE_RX_LOCK(rxr); 4360 4361#ifdef DEV_NETMAP |
4367 if (ifp->if_capenable & IFCAP_NETMAP) { 4368 /* 4369 * Same as the txeof routine: only wakeup clients on intr. 4370 * NKR_PENDINTR in nr_kflags is used to implement interrupt 4371 * mitigation (ixgbe_rxsync() will not look for new packets 4372 * unless NKR_PENDINTR is set). 4373 */ 4374 struct netmap_adapter *na = NA(ifp); 4375 4376 na->rx_rings[rxr->me].nr_kflags |= NKR_PENDINTR; 4377 selwakeuppri(&na->rx_rings[rxr->me].si, PI_NET); 4378 IXGBE_RX_UNLOCK(rxr); 4379 IXGBE_CORE_LOCK(adapter); 4380 selwakeuppri(&na->rx_si, PI_NET); 4381 IXGBE_CORE_UNLOCK(adapter); | 4362 /* Same as the txeof routine: wakeup clients on intr. */ 4363 if (netmap_rx_irq(ifp, rxr->me | NETMAP_LOCKED_ENTER, &processed)) |
4382 return (FALSE); | 4364 return (FALSE); |
4383 } | |
4384#endif /* DEV_NETMAP */ 4385 for (i = rxr->next_to_check; count != 0;) { 4386 struct mbuf *sendmp, *mp; 4387 u32 rsc, ptype; 4388 u16 len; 4389 u16 vtag = 0; 4390 bool eop; 4391 --- 1290 unchanged lines hidden --- | 4365#endif /* DEV_NETMAP */ 4366 for (i = rxr->next_to_check; count != 0;) { 4367 struct mbuf *sendmp, *mp; 4368 u32 rsc, ptype; 4369 u16 len; 4370 u16 vtag = 0; 4371 bool eop; 4372 --- 1290 unchanged lines hidden --- |