]> git.baikalelectronics.ru Git - kernel.git/commit
net: thunderx: don't allow jumbo frames with XDP
authorMatteo Croce <mcroce@redhat.com>
Thu, 11 Apr 2019 10:26:33 +0000 (12:26 +0200)
committerDavid S. Miller <davem@davemloft.net>
Thu, 11 Apr 2019 18:10:34 +0000 (11:10 -0700)
commit960f0e6bbd4c8cabc7fec82dceae402c7eaf8cc5
tree607673dfc7cbfa106a6ae87456502a475c9beee8
parent1c2b53f1b34446f793da705eda3c6c736dad167a
net: thunderx: don't allow jumbo frames with XDP

The thunderx driver forbids to load an eBPF program if the MTU is too high,
but this can be circumvented by loading the eBPF, then raising the MTU.

Fix this by limiting the MTU if an eBPF program is already loaded.

Fixes: cf7916084dece ("net: thunderx: Add basic XDP support")
Signed-off-by: Matteo Croce <mcroce@redhat.com>
Acked-by: Jesper Dangaard Brouer <brouer@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/cavium/thunder/nicvf_main.c