mirror of
https://github.com/xdp-project/bpf-examples.git
synced 2024-05-06 15:54:53 +00:00
AF_XDP-example: fix XDP prog attach for xdp-skb mode
The attach mode is by default set to XDP_MODE_NATIVE and needs to be overwritten to XDP_MODE_SKB when '-S' option is used. Instead of overwriting the attach mode was ORed and so was always running in NATIVE mode. This patch fixes that. Signed-off-by: Tirthendu Sarkar <tirthendu.sarkar@intel.com>
This commit is contained in:
committed by
Toke Høiland-Jørgensen
parent
54a31ceabc
commit
f27b9881bf
@@ -1177,7 +1177,7 @@ static void parse_command_line(int argc, char **argv)
|
|||||||
opt_poll = 1;
|
opt_poll = 1;
|
||||||
break;
|
break;
|
||||||
case 'S':
|
case 'S':
|
||||||
opt_attach_mode |= XDP_MODE_SKB;
|
opt_attach_mode = XDP_MODE_SKB;
|
||||||
opt_xdp_bind_flags |= XDP_COPY;
|
opt_xdp_bind_flags |= XDP_COPY;
|
||||||
break;
|
break;
|
||||||
case 'N':
|
case 'N':
|
||||||
|
Reference in New Issue
Block a user