Deleted Added
full compact
ixgbe.c (229767) ixgbe.c (229939)
1/******************************************************************************
2
3 Copyright (c) 2001-2011, 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-2011, 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: head/sys/dev/ixgbe/ixgbe.c 229767 2012-01-07 09:41:57Z kevlo $*/
33/*$FreeBSD: head/sys/dev/ixgbe/ixgbe.c 229939 2012-01-10 19:57:23Z 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

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

2871 * (not here) nkr_hwofs can be negative. When computing
2872 * si = i + kring->nkr_hwofs make sure to handle wraparounds.
2873 */
2874 if (slot) {
2875 int si = i + na->tx_rings[txr->me].nkr_hwofs;
2876
2877 if (si >= na->num_tx_desc)
2878 si -= na->num_tx_desc;
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

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

2871 * (not here) nkr_hwofs can be negative. When computing
2872 * si = i + kring->nkr_hwofs make sure to handle wraparounds.
2873 */
2874 if (slot) {
2875 int si = i + na->tx_rings[txr->me].nkr_hwofs;
2876
2877 if (si >= na->num_tx_desc)
2878 si -= na->num_tx_desc;
2879 netmap_load_map(txr->txtag, txbuf->map,
2880 NMB(slot + si), na->buff_size);
2879 netmap_load_map(txr->txtag, txbuf->map, NMB(slot + si));
2881 }
2882#endif /* DEV_NETMAP */
2883 /* Clear the EOP index */
2884 txbuf->eop_index = -1;
2885 }
2886
2887#ifdef IXGBE_FDIR
2888 /* Set the rate at which we sample packets */

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

3805 * In netmap mode, fill the map and set the buffer
3806 * address in the NIC ring, considering the offset
3807 * between the netmap and NIC rings (see comment in
3808 * ixgbe_setup_transmit_ring() ). No need to allocate
3809 * an mbuf, so end the block with a continue;
3810 */
3811 if (slot) {
3812 int sj = j + na->rx_rings[rxr->me].nkr_hwofs;
2880 }
2881#endif /* DEV_NETMAP */
2882 /* Clear the EOP index */
2883 txbuf->eop_index = -1;
2884 }
2885
2886#ifdef IXGBE_FDIR
2887 /* Set the rate at which we sample packets */

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

3804 * In netmap mode, fill the map and set the buffer
3805 * address in the NIC ring, considering the offset
3806 * between the netmap and NIC rings (see comment in
3807 * ixgbe_setup_transmit_ring() ). No need to allocate
3808 * an mbuf, so end the block with a continue;
3809 */
3810 if (slot) {
3811 int sj = j + na->rx_rings[rxr->me].nkr_hwofs;
3812 uint64_t paddr;
3813 void *addr;
3814
3815 if (sj >= na->num_rx_desc)
3816 sj -= na->num_rx_desc;
3813 void *addr;
3814
3815 if (sj >= na->num_rx_desc)
3816 sj -= na->num_rx_desc;
3817 addr = NMB(slot + sj);
3818 netmap_load_map(rxr->ptag,
3819 rxbuf->pmap, addr, na->buff_size);
3817 addr = PNMB(slot + sj, &paddr);
3818 netmap_load_map(rxr->ptag, rxbuf->pmap, addr);
3820 /* Update descriptor */
3819 /* Update descriptor */
3821 rxr->rx_base[j].read.pkt_addr =
3822 htole64(vtophys(addr));
3820 rxr->rx_base[j].read.pkt_addr = htole64(paddr);
3823 continue;
3824 }
3825#endif /* DEV_NETMAP */
3826 /*
3827 ** Don't allocate mbufs if not
3828 ** doing header split, its wasteful
3829 */
3830 if (rxr->hdr_split == FALSE)

--- 1714 unchanged lines hidden ---
3821 continue;
3822 }
3823#endif /* DEV_NETMAP */
3824 /*
3825 ** Don't allocate mbufs if not
3826 ** doing header split, its wasteful
3827 */
3828 if (rxr->hdr_split == FALSE)

--- 1714 unchanged lines hidden ---