• Adham Faris's avatar
    net/mlx5e: Lower maximum allowed MTU in XSK to match XDP prerequisites · 78dee7be
    Adham Faris authored
    XSK redirecting XDP programs require linearity, hence applies
    restrictions on the MTU. For PAGE_SIZE=4K, MTU shouldn't exceed 3498.
    
    Features that contradict with XDP such HW-LRO and HW-GRO are enforced
    by the driver in advance, during XSK params validation, except for MTU,
    which was not enforced before this patch.
    
    This has been spotted during test scenario described below:
    Attaching xdpsock program (PAGE_SIZE=4K), with MTU < 3498, detaching
    XDP program, changing the MTU to arbitrary value in the range
    [3499, 3754], attaching XDP program again, which ended up with failure
    since MTU is > 3498.
    
    This commit lowers the XSK MTU limitation to be aligned with XDP MTU
    limitation, since XSK socket is meaningless without XDP program.
    Signed-off-by: default avatarAdham Faris <afaris@nvidia.com>
    Reviewed-by: default avatarTariq Toukan <tariqt@nvidia.com>
    Signed-off-by: default avatarSaeed Mahameed <saeedm@nvidia.com>
    78dee7be
en_main.c 155 KB