qede: Support XDP adjustment of headers
authorMintz, Yuval <Yuval.Mintz@cavium.com>
Fri, 7 Apr 2017 08:05:01 +0000 (11:05 +0300)
committerDavid S. Miller <davem@davemloft.net>
Fri, 7 Apr 2017 13:26:14 +0000 (06:26 -0700)
commit059eeb07e175086db1f84c1d8d29bb9aa8057797
treefd69702322ca50528093e42bd87167809e3f3c5e
parent15ed8a47ff0571dd268e37002511993b47e996bd
qede: Support XDP adjustment of headers

In case an XDP program is attached, reserve XDP_PACKET_HEADROOM
bytes at the beginning of the packet for the program to play
with.

Modify the XDP logic in the driver to fill-in the missing bits
and re-calculate offsets and length after the program has finished
running to properly reflect the current status of the packet.

We can then go and remove the limitation of not supporting XDP programs
where xdp_adjust_head is set.

Signed-off-by: Yuval Mintz <Yuval.Mintz@cavium.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/qlogic/qede/qede_filter.c
drivers/net/ethernet/qlogic/qede/qede_fp.c
drivers/net/ethernet/qlogic/qede/qede_main.c