• Camelia Groza's avatar
    dpaa_eth: add basic XDP support · 86c0c196
    Camelia Groza authored
    Implement the XDP_DROP and XDP_PASS actions.
    
    Avoid draining and reconfiguring the buffer pool at each XDP
    setup/teardown by increasing the frame headroom and reserving
    XDP_PACKET_HEADROOM bytes from the start. Since we always reserve an
    entire page per buffer, this change only impacts Jumbo frame scenarios
    where the maximum linear frame size is reduced by 256 bytes. Multi
    buffer Scatter/Gather frames are now used instead in these scenarios.
    
    Allow XDP programs to access the entire buffer.
    
    The data in the received frame's headroom can be overwritten by the XDP
    program. Extract the relevant fields from the headroom while they are
    still available, before running the XDP program.
    
    Since the headroom might be resized before the frame is passed up to the
    stack, remove the check for a fixed headroom value when building an skb.
    
    Allow the meta data to be updated and pass the information up the stack.
    
    Scatter/Gather frames are dropped when XDP is enabled.
    Acked-by: default avatarMadalin Bucur <madalin.bucur@oss.nxp.com>
    Signed-off-by: default avatarCamelia Groza <camelia.groza@nxp.com>
    Reviewed-by: default avatarMaciej Fijalkowski <maciej.fijalkowski@intel.com>
    Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
    86c0c196
dpaa_eth.h 6.47 KB