mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git
synced 2026-04-18 03:23:53 -04:00
i40e: add support for XDP_TX action
This patch adds proper XDP_TX action support. For each Tx ring, an additional XDP Tx ring is allocated and setup. This version does the DMA mapping in the fast-path, which will penalize performance for IOMMU enabled systems. Further, debugfs support is not wired up for the XDP Tx rings. Signed-off-by: Björn Töpel <bjorn.topel@intel.com> Tested-by: Andrew Bowers <andrewx.bowers@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
This commit is contained in:
committed by
Jeff Kirsher
parent
0c8493d90b
commit
74608d17fe
@@ -396,6 +396,7 @@ struct i40e_ring {
|
||||
u16 flags;
|
||||
#define I40E_TXR_FLAGS_WB_ON_ITR BIT(0)
|
||||
#define I40E_RXR_FLAGS_BUILD_SKB_ENABLED BIT(1)
|
||||
#define I40E_TXR_FLAGS_XDP BIT(2)
|
||||
|
||||
/* stats structs */
|
||||
struct i40e_queue_stats stats;
|
||||
@@ -438,6 +439,16 @@ static inline void clear_ring_build_skb_enabled(struct i40e_ring *ring)
|
||||
ring->flags &= ~I40E_RXR_FLAGS_BUILD_SKB_ENABLED;
|
||||
}
|
||||
|
||||
static inline bool ring_is_xdp(struct i40e_ring *ring)
|
||||
{
|
||||
return !!(ring->flags & I40E_TXR_FLAGS_XDP);
|
||||
}
|
||||
|
||||
static inline void set_ring_xdp(struct i40e_ring *ring)
|
||||
{
|
||||
ring->flags |= I40E_TXR_FLAGS_XDP;
|
||||
}
|
||||
|
||||
enum i40e_latency_range {
|
||||
I40E_LOWEST_LATENCY = 0,
|
||||
I40E_LOW_LATENCY = 1,
|
||||
|
||||
Reference in New Issue
Block a user