Skip to content

Commit

Permalink
bpf: make netronome nfp compatible w/ bpf_xdp_adjust_tail
Browse files Browse the repository at this point in the history
w/ bpf_xdp_adjust_tail helper xdp's data_end pointer could be changed as
well (only "decrease" of pointer's location is going to be supported).
changing of this pointer will change packet's size.
for nfp driver we will just calculate packet's length unconditionally

Acked-by: Alexei Starovoitov <ast@kernel.org>
Acked-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Signed-off-by: Nikita V. Shirokov <tehnerd@tehnerd.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
  • Loading branch information
Nikita V. Shirokov authored and Daniel Borkmann committed Apr 18, 2018
1 parent a48ce00 commit 5a6a22e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/ethernet/netronome/nfp/nfp_net_common.c
Original file line number Diff line number Diff line change
Expand Up @@ -1722,7 +1722,7 @@ static int nfp_net_rx(struct nfp_net_rx_ring *rx_ring, int budget)

act = bpf_prog_run_xdp(xdp_prog, &xdp);

pkt_len -= xdp.data - orig_data;
pkt_len = xdp.data_end - xdp.data;
pkt_off += xdp.data - orig_data;

switch (act) {
Expand Down

0 comments on commit 5a6a22e

Please sign in to comment.