• Marek Behún's avatar
    net: marvell: mvpp2: increase MTU limit when XDP enabled · 7b1b62bc
    Marek Behún authored
    Currently mvpp2_xdp_setup won't allow attaching XDP program if
      mtu > ETH_DATA_LEN (1500).
    
    The mvpp2_change_mtu on the other hand checks whether
      MVPP2_RX_PKT_SIZE(mtu) > MVPP2_BM_LONG_PKT_SIZE.
    
    These two checks are semantically different.
    
    Moreover this limit can be increased to MVPP2_MAX_RX_BUF_SIZE, since in
    mvpp2_rx we have
      xdp.data = data + MVPP2_MH_SIZE + MVPP2_SKB_HEADROOM;
      xdp.frame_sz = PAGE_SIZE;
    
    Change the checks to check whether
      mtu > MVPP2_MAX_RX_BUF_SIZE
    
    Fixes: 07dd0a7a ("mvpp2: add basic XDP support")
    Signed-off-by: default avatarMarek Behún <kabel@kernel.org>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    7b1b62bc
mvpp2_main.c 208 KB