From: Sridhar Samudrala <sridhar.samudrala@intel.com>
To: magnus.karlsson@intel.com, bjorn.topel@intel.com,
netdev@vger.kernel.org, bpf@vger.kernel.org,
sridhar.samudrala@intel.com, intel-wired-lan@lists.osuosl.org,
maciej.fijalkowski@intel.com, tom.herbert@intel.com
Subject: [PATCH bpf-next 5/5] xdpsock_user: Add skip_bpf option
Date: Wed, 14 Aug 2019 20:46:23 -0700 [thread overview]
Message-ID: <1565840783-8269-6-git-send-email-sridhar.samudrala@intel.com> (raw)
In-Reply-To: <1565840783-8269-1-git-send-email-sridhar.samudrala@intel.com>
Signed-off-by: Sridhar Samudrala <sridhar.samudrala@intel.com>
---
samples/bpf/xdpsock_user.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/samples/bpf/xdpsock_user.c b/samples/bpf/xdpsock_user.c
index 93eaaf7239b2..509fc6a18af9 100644
--- a/samples/bpf/xdpsock_user.c
+++ b/samples/bpf/xdpsock_user.c
@@ -123,6 +123,9 @@ static void print_benchmark(bool running)
if (opt_poll)
printf("poll() ");
+ if (opt_xdp_bind_flags & XDP_SKIP_BPF)
+ printf("skip-bpf ");
+
if (running) {
printf("running...");
fflush(stdout);
@@ -352,6 +355,7 @@ static struct option long_options[] = {
{"zero-copy", no_argument, 0, 'z'},
{"copy", no_argument, 0, 'c'},
{"frame-size", required_argument, 0, 'f'},
+ {"skip-bpf", no_argument, 0, 's'},
{0, 0, 0, 0}
};
@@ -372,6 +376,7 @@ static void usage(const char *prog)
" -z, --zero-copy Force zero-copy mode.\n"
" -c, --copy Force copy mode.\n"
" -f, --frame-size=n Set the frame size (must be a power of two, default is %d).\n"
+ " -s, --skip-bpf Skip running bpf program.\n"
"\n";
fprintf(stderr, str, prog, XSK_UMEM__DEFAULT_FRAME_SIZE);
exit(EXIT_FAILURE);
@@ -430,6 +435,9 @@ static void parse_command_line(int argc, char **argv)
case 'f':
opt_xsk_frame_size = atoi(optarg);
break;
+ case 's':
+ opt_xdp_bind_flags |= XDP_SKIP_BPF;
+ break;
default:
usage(basename(argv[0]));
}
--
2.20.1
next prev parent reply other threads:[~2019-08-15 3:46 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-15 3:46 [PATCH bpf-next 0/5] Add support for SKIP_BPF flag for AF_XDP sockets Sridhar Samudrala
2019-08-15 3:46 ` [PATCH bpf-next 1/5] xsk: Convert bool 'zc' field in struct xdp_umem to a u32 bitmap Sridhar Samudrala
2019-08-15 3:46 ` [PATCH bpf-next 2/5] xsk: Introduce XDP_SKIP_BPF bind option Sridhar Samudrala
2019-08-15 3:46 ` [PATCH bpf-next 3/5] i40e: Enable XDP_SKIP_BPF option for AF_XDP sockets Sridhar Samudrala
2019-08-16 9:21 ` kbuild test robot
2019-08-15 3:46 ` [PATCH bpf-next 4/5] ixgbe: " Sridhar Samudrala
2019-08-15 3:46 ` Sridhar Samudrala [this message]
2019-08-15 11:12 ` [PATCH bpf-next 0/5] Add support for SKIP_BPF flag " Toke Høiland-Jørgensen
2019-08-15 16:25 ` Samudrala, Sridhar
2019-08-15 17:11 ` Toke Høiland-Jørgensen
2019-08-16 6:12 ` Samudrala, Sridhar
2019-08-15 12:51 ` Björn Töpel
2019-08-15 16:46 ` Samudrala, Sridhar
2019-08-16 13:32 ` [Intel-wired-lan] " Björn Töpel
2019-08-16 22:08 ` Jonathan Lemon
2019-08-19 7:39 ` Björn Töpel
2019-08-15 19:28 ` Jakub Kicinski
2019-08-16 6:25 ` Samudrala, Sridhar
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1565840783-8269-6-git-send-email-sridhar.samudrala@intel.com \
--to=sridhar.samudrala@intel.com \
--cc=bjorn.topel@intel.com \
--cc=bpf@vger.kernel.org \
--cc=intel-wired-lan@lists.osuosl.org \
--cc=maciej.fijalkowski@intel.com \
--cc=magnus.karlsson@intel.com \
--cc=netdev@vger.kernel.org \
--cc=tom.herbert@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).