• Maciej Fijalkowski's avatar
    ice: remove redundant xdp_rxq_info registration · 2ee788c0
    Maciej Fijalkowski authored
    xdp_rxq_info struct can be registered by drivers via two functions -
    xdp_rxq_info_reg() and __xdp_rxq_info_reg(). The latter one allows
    drivers that support XDP multi-buffer to set up xdp_rxq_info::frag_size
    which in turn will make it possible to grow the packet via
    bpf_xdp_adjust_tail() BPF helper.
    
    Currently, ice registers xdp_rxq_info in two spots:
    1) ice_setup_rx_ring() // via xdp_rxq_info_reg(), BUG
    2) ice_vsi_cfg_rxq()   // via __xdp_rxq_info_reg(), OK
    
    Cited commit under fixes tag took care of setting up frag_size and
    updated registration scheme in 2) but it did not help as
    1) is called before 2) and as shown above it uses old registration
    function. This means that 2) sees that xdp_rxq_info is already
    registered and never calls __xdp_rxq_info_reg() which leaves us with
    xdp_rxq_info::frag_size being set to 0.
    
    To fix this misbehavior, simply remove xdp_rxq_info_reg() call from
    ice_setup_rx_ring().
    
    Fixes: 2fba7dc5 ("ice: Add support for XDP multi-buffer on Rx side")
    Acked-by: default avatarMagnus Karlsson <magnus.karlsson@intel.com>
    Signed-off-by: default avatarMaciej Fijalkowski <maciej.fijalkowski@intel.com>
    Link: https://lore.kernel.org/r/20240124191602.566724-7-maciej.fijalkowski@intel.comSigned-off-by: default avatarAlexei Starovoitov <ast@kernel.org>
    2ee788c0
ice_txrx.c 69.4 KB