net: thunderx: Add basic XDP support
authorSunil Goutham <sgoutham@cavium.com>
Tue, 2 May 2017 13:06:54 +0000 (18:36 +0530)
committerDavid S. Miller <davem@davemloft.net>
Tue, 2 May 2017 19:41:21 +0000 (15:41 -0400)
commit05c773f52b96ef3fbc7d9bfa21caadc6247ef7a8
tree9d20a83f0b3f08bd3fcd3d0c00920abaa19dfb8c
parent927987f39f116db477fcd74ced2a2aea940e585c
net: thunderx: Add basic XDP support

Adds basic XDP support i.e attaching a BPF program to an
interface. Also takes care of allocating separate Tx queues
for XDP path and for network stack packet transmission.

This patch doesn't support handling of any of the XDP actions,
all are treated as XDP_PASS i.e packets will be handed over to
the network stack.

Changes also involve allocating one receive buffer per page in XDP
mode and multiple in normal mode i.e when no BPF program is attached.

Signed-off-by: Sunil Goutham <sgoutham@cavium.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/cavium/thunder/nic.h
drivers/net/ethernet/cavium/thunder/nicvf_ethtool.c
drivers/net/ethernet/cavium/thunder/nicvf_main.c
drivers/net/ethernet/cavium/thunder/nicvf_queues.c
drivers/net/ethernet/cavium/thunder/nicvf_queues.h