diff options
author | David S. Miller <davem@davemloft.net> | 2018-10-03 14:44:22 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-10-03 14:44:22 -0700 |
commit | 7bdaae270cb55d40b7fb73744c7e00a7108ee5b6 (patch) | |
tree | 32a5f81f9d4858948d5d61ca70c774360b8559ef /drivers/net/ethernet/intel/ixgbe/ixgbe.h | |
parent | 072eff2d9e2d64c3a95572f0326de3563f26c392 (diff) | |
parent | 37ebb5fa6fc9be0eb80dcd3d17984cc36006a21c (diff) | |
download | linux-7bdaae270cb55d40b7fb73744c7e00a7108ee5b6.tar.gz linux-7bdaae270cb55d40b7fb73744c7e00a7108ee5b6.tar.bz2 linux-7bdaae270cb55d40b7fb73744c7e00a7108ee5b6.zip |
Merge branch '10GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/next-queue
Jeff Kirsher says:
====================
10GbE Intel Wired LAN Driver Updates 2018-10-03
This series contains updates to ixgbe/ixgbevf and few fixes for i40e & iavf.
Shannon Nelson fixes the message length for IPsec mailbox messages.
Radoslaw fixes a transmit hang that occurs when XDP_TX exceeds the queue
limit. Fixes a crash when we restor flow director filters after a reset.
YueHaibing cleans up dead code, which did not have any callers.
Dan Carpenter fixes an "off by one" error in IPsec for ixgbe.
Nathan Chancellor fixes the i40e driver to use the correct enum for link
speed. Also remove a debug statement since it was not producing useful
information and equated to always "TRUE".
Most notably, Björn introduces zero-copy AF_XDP support for the ixgbe
driver. The ixgbe zero-copy code is located in its own file ixgbe_xsk.[ch],
analogous to the i40e ZC support. Again, as in i40e, code paths have
been copied from the XDP path to the zero-copy path. Going forward we
will try to generalize more code between the AF_XDP ZC drivers, and
also reduce the heavy C&P.
====================
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/intel/ixgbe/ixgbe.h')
-rw-r--r-- | drivers/net/ethernet/intel/ixgbe/ixgbe.h | 28 |
1 files changed, 21 insertions, 7 deletions
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe.h b/drivers/net/ethernet/intel/ixgbe/ixgbe.h index 5c6fd42e90ed..7a7679e7be84 100644 --- a/drivers/net/ethernet/intel/ixgbe/ixgbe.h +++ b/drivers/net/ethernet/intel/ixgbe/ixgbe.h @@ -228,13 +228,17 @@ struct ixgbe_tx_buffer { struct ixgbe_rx_buffer { struct sk_buff *skb; dma_addr_t dma; - struct page *page; -#if (BITS_PER_LONG > 32) || (PAGE_SIZE >= 65536) - __u32 page_offset; -#else - __u16 page_offset; -#endif - __u16 pagecnt_bias; + union { + struct { + struct page *page; + __u32 page_offset; + __u16 pagecnt_bias; + }; + struct { + void *addr; + u64 handle; + }; + }; }; struct ixgbe_queue_stats { @@ -271,6 +275,7 @@ enum ixgbe_ring_state_t { __IXGBE_TX_DETECT_HANG, __IXGBE_HANG_CHECK_ARMED, __IXGBE_TX_XDP_RING, + __IXGBE_TX_DISABLED, }; #define ring_uses_build_skb(ring) \ @@ -347,6 +352,10 @@ struct ixgbe_ring { struct ixgbe_rx_queue_stats rx_stats; }; struct xdp_rxq_info xdp_rxq; + struct xdp_umem *xsk_umem; + struct zero_copy_allocator zca; /* ZC allocator anchor */ + u16 ring_idx; /* {rx,tx,xdp}_ring back reference idx */ + u16 rx_buf_len; } ____cacheline_internodealigned_in_smp; enum ixgbe_ring_f_enum { @@ -764,6 +773,11 @@ struct ixgbe_adapter { #ifdef CONFIG_XFRM_OFFLOAD struct ixgbe_ipsec *ipsec; #endif /* CONFIG_XFRM_OFFLOAD */ + + /* AF_XDP zero-copy */ + struct xdp_umem **xsk_umems; + u16 num_xsk_umems_used; + u16 num_xsk_umems; }; static inline u8 ixgbe_max_rss_indices(struct ixgbe_adapter *adapter) |