• Maciej Fijalkowski's avatar
    ice: Store page count inside ice_rx_buf · ac075339
    Maciej Fijalkowski authored
    This will allow us to avoid carrying additional auxiliary array of page
    counts when dealing with XDP multi buffer support. Previously combining
    fragmented frame to skb was not affected in the same way as XDP would be
    as whole frame is needed to be in place before executing XDP prog.
    Therefore, when going through HW Rx descriptors one-by-one, calls to
    ice_put_rx_buf() need to be taken *after* running XDP prog on a
    potentially multi buffered frame, so some additional storage of
    page count is needed.
    
    By adding page count to rx buf, it will make it easier to walk through
    processed entries at the end of rx cleaning routine and decide whether
    or not buffers should be recycled.
    
    While at it, bump ice_rx_buf::pagecnt_bias from u16 up to u32. It was
    proven many times that calculations on variables smaller than standard
    register size are harmful. This was also the case during experiments
    with embedding page count to ice_rx_buf - when this was added as u16 it
    had a performance impact.
    Signed-off-by: default avatarMaciej Fijalkowski <maciej.fijalkowski@intel.com>
    Signed-off-by: default avatarDaniel Borkmann <daniel@iogearbox.net>
    Reviewed-by: default avatarAlexander Lobakin <alexandr.lobakin@intel.com>
    Link: https://lore.kernel.org/bpf/20230131204506.219292-4-maciej.fijalkowski@intel.com
    ac075339
ice_txrx.h 13.1 KB