summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/aquantia/atlantic/aq_cfg.h
diff options
context:
space:
mode:
authorTaehee Yoo <ap420073@gmail.com>2022-04-17 13:12:45 +0300
committerDavid S. Miller <davem@davemloft.net>2022-04-20 12:42:57 +0300
commit0d14657f40830243266f972766f1e4d00436e648 (patch)
treefa3bf90b0daeb22ff4eb355eefa7116b5c1ee398 /drivers/net/ethernet/aquantia/atlantic/aq_cfg.h
parent8ab38ed779857fd6d739dacac928dd8df82c4655 (diff)
downloadlinux-0d14657f40830243266f972766f1e4d00436e648.tar.xz
net: atlantic: Implement xdp control plane
aq_xdp() is a xdp setup callback function for Atlantic driver. When XDP is attached or detached, the device will be restarted because it uses different headroom, tailroom, and page order value. If XDP enabled, it switches default page order value from 0 to 2. Because the default maximum frame size is still 2K and it needs additional area for headroom and tailroom. The total size(headroom + frame size + tailroom) is 2624. So, 1472Bytes will be always wasted for every frame. But when order-2 is used, these pages can be used 6 times with flip strategy. It means only about 106Bytes per frame will be wasted. Also, It supports xdp fragment feature. MTU can be 16K if xdp prog supports xdp fragment. If not, MTU can not exceed 2K - ETH_HLEN - ETH_FCS. And a static key is added and It will be used to call the xdp_clean handler in ->poll(). data plane implementation will be contained the followed patch. Signed-off-by: Taehee Yoo <ap420073@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/aquantia/atlantic/aq_cfg.h')
-rw-r--r--drivers/net/ethernet/aquantia/atlantic/aq_cfg.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/ethernet/aquantia/atlantic/aq_cfg.h b/drivers/net/ethernet/aquantia/atlantic/aq_cfg.h
index 52b9833fda99..8bcda2cb3a2e 100644
--- a/drivers/net/ethernet/aquantia/atlantic/aq_cfg.h
+++ b/drivers/net/ethernet/aquantia/atlantic/aq_cfg.h
@@ -40,6 +40,7 @@
#define AQ_CFG_RX_HDR_SIZE 256U
#define AQ_CFG_RX_PAGEORDER 0U
+#define AQ_CFG_XDP_PAGEORDER 2U
/* LRO */
#define AQ_CFG_IS_LRO_DEF 1U