• Taehee Yoo's avatar
    net: atlantic: Implement xdp control plane · 0d14657f
    Taehee Yoo authored
    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: default avatarTaehee Yoo <ap420073@gmail.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    0d14657f
aq_vec.h 1.52 KB