提交 b3133329 编写于 作者: A Andre Guedes 提交者: Daniel Borkmann

samples/bpf: Add missing option to xdpsock usage

Commit 743e568c (samples/bpf: Add a "force" flag to XDP samples)
introduced the '-F' option but missed adding it to the usage() and the
'long_option' array.

Fixes: 743e568c (samples/bpf: Add a "force" flag to XDP samples)
Signed-off-by: NAndre Guedes <andre.guedes@intel.com>
Signed-off-by: NDaniel Borkmann <daniel@iogearbox.net>
Link: https://lore.kernel.org/bpf/20191114162847.221770-2-andre.guedes@intel.com
上级 110b2263
...@@ -374,6 +374,7 @@ static struct option long_options[] = { ...@@ -374,6 +374,7 @@ static struct option long_options[] = {
{"no-need-wakeup", no_argument, 0, 'm'}, {"no-need-wakeup", no_argument, 0, 'm'},
{"unaligned", no_argument, 0, 'u'}, {"unaligned", no_argument, 0, 'u'},
{"shared-umem", no_argument, 0, 'M'}, {"shared-umem", no_argument, 0, 'M'},
{"force", no_argument, 0, 'F'},
{0, 0, 0, 0} {0, 0, 0, 0}
}; };
...@@ -397,6 +398,7 @@ static void usage(const char *prog) ...@@ -397,6 +398,7 @@ static void usage(const char *prog)
" -f, --frame-size=n Set the frame size (must be a power of two in aligned mode, default is %d).\n" " -f, --frame-size=n Set the frame size (must be a power of two in aligned mode, default is %d).\n"
" -u, --unaligned Enable unaligned chunk placement\n" " -u, --unaligned Enable unaligned chunk placement\n"
" -M, --shared-umem Enable XDP_SHARED_UMEM\n" " -M, --shared-umem Enable XDP_SHARED_UMEM\n"
" -F, --force Force loading the XDP prog\n"
"\n"; "\n";
fprintf(stderr, str, prog, XSK_UMEM__DEFAULT_FRAME_SIZE); fprintf(stderr, str, prog, XSK_UMEM__DEFAULT_FRAME_SIZE);
exit(EXIT_FAILURE); exit(EXIT_FAILURE);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册