Deleted Added
full compact
if_igb.c (250370) if_igb.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/e1000/if_igb.c 250370 2013-05-08 15:55:29Z sbruno $*/
33/*$FreeBSD: stable/9/sys/dev/e1000/if_igb.c 250458 2013-05-10 16:16:33Z luigi $*/
34
35
36#ifdef HAVE_KERNEL_OPTION_HEADERS
37#include "opt_device_polling.h"
38#include "opt_inet.h"
39#include "opt_inet6.h"
40#include "opt_altq.h"
41#endif

--- 3825 unchanged lines hidden (view full) ---

3867 int first, last, done, processed;
3868 struct igb_tx_buffer *tx_buffer;
3869 struct e1000_tx_desc *tx_desc, *eop_desc;
3870 struct ifnet *ifp = adapter->ifp;
3871
3872 IGB_TX_LOCK_ASSERT(txr);
3873
3874#ifdef DEV_NETMAP
34
35
36#ifdef HAVE_KERNEL_OPTION_HEADERS
37#include "opt_device_polling.h"
38#include "opt_inet.h"
39#include "opt_inet6.h"
40#include "opt_altq.h"
41#endif

--- 3825 unchanged lines hidden (view full) ---

3867 int first, last, done, processed;
3868 struct igb_tx_buffer *tx_buffer;
3869 struct e1000_tx_desc *tx_desc, *eop_desc;
3870 struct ifnet *ifp = adapter->ifp;
3871
3872 IGB_TX_LOCK_ASSERT(txr);
3873
3874#ifdef DEV_NETMAP
3875 if (ifp->if_capenable & IFCAP_NETMAP) {
3876 struct netmap_adapter *na = NA(ifp);
3877
3878 selwakeuppri(&na->tx_rings[txr->me].si, PI_NET);
3879 IGB_TX_UNLOCK(txr);
3880 IGB_CORE_LOCK(adapter);
3881 selwakeuppri(&na->tx_si, PI_NET);
3882 IGB_CORE_UNLOCK(adapter);
3883 IGB_TX_LOCK(txr);
3884 return FALSE;
3885 }
3875 if (netmap_tx_irq(ifp, txr->me |
3876 (NETMAP_LOCKED_ENTER|NETMAP_LOCKED_EXIT)))
3877 return (FALSE);
3886#endif /* DEV_NETMAP */
3887 if (txr->tx_avail == adapter->num_tx_desc) {
3888 txr->queue_status = IGB_QUEUE_IDLE;
3889 return FALSE;
3890 }
3891
3892 processed = 0;
3893 first = txr->next_to_clean;

--- 837 unchanged lines hidden (view full) ---

4731 union e1000_adv_rx_desc *cur;
4732
4733 IGB_RX_LOCK(rxr);
4734 /* Sync the ring. */
4735 bus_dmamap_sync(rxr->rxdma.dma_tag, rxr->rxdma.dma_map,
4736 BUS_DMASYNC_POSTREAD | BUS_DMASYNC_POSTWRITE);
4737
4738#ifdef DEV_NETMAP
3878#endif /* DEV_NETMAP */
3879 if (txr->tx_avail == adapter->num_tx_desc) {
3880 txr->queue_status = IGB_QUEUE_IDLE;
3881 return FALSE;
3882 }
3883
3884 processed = 0;
3885 first = txr->next_to_clean;

--- 837 unchanged lines hidden (view full) ---

4723 union e1000_adv_rx_desc *cur;
4724
4725 IGB_RX_LOCK(rxr);
4726 /* Sync the ring. */
4727 bus_dmamap_sync(rxr->rxdma.dma_tag, rxr->rxdma.dma_map,
4728 BUS_DMASYNC_POSTREAD | BUS_DMASYNC_POSTWRITE);
4729
4730#ifdef DEV_NETMAP
4739 if (ifp->if_capenable & IFCAP_NETMAP) {
4740 struct netmap_adapter *na = NA(ifp);
4741
4742 na->rx_rings[rxr->me].nr_kflags |= NKR_PENDINTR;
4743 selwakeuppri(&na->rx_rings[rxr->me].si, PI_NET);
4744 IGB_RX_UNLOCK(rxr);
4745 IGB_CORE_LOCK(adapter);
4746 selwakeuppri(&na->rx_si, PI_NET);
4747 IGB_CORE_UNLOCK(adapter);
4748 return (0);
4749 }
4731 if (netmap_rx_irq(ifp, rxr->me | NETMAP_LOCKED_ENTER, &processed))
4732 return (FALSE);
4750#endif /* DEV_NETMAP */
4751
4752 /* Main clean loop */
4753 for (i = rxr->next_to_check; count != 0;) {
4754 struct mbuf *sendmp, *mh, *mp;
4755 struct igb_rx_buf *rxbuf;
4756 u16 hlen, plen, hdr, vtag;
4757 bool eop = FALSE;

--- 1284 unchanged lines hidden ---
4733#endif /* DEV_NETMAP */
4734
4735 /* Main clean loop */
4736 for (i = rxr->next_to_check; count != 0;) {
4737 struct mbuf *sendmp, *mh, *mp;
4738 struct igb_rx_buf *rxbuf;
4739 u16 hlen, plen, hdr, vtag;
4740 bool eop = FALSE;

--- 1284 unchanged lines hidden ---