From: Jiong Wang <jiong.wang@netronome.com>
To: ast@kernel.org, daniel@iogearbox.net
Cc: netdev@vger.kernel.org, oss-drivers@netronome.com,
Jiong Wang <jiong.wang@netronome.com>
Subject: [PATCH bpf-next 0/2] bpf: offer maximum packet offset info
Date: Thu, 8 Nov 2018 04:08:41 -0500 [thread overview]
Message-ID: <1541668123-9571-1-git-send-email-jiong.wang@netronome.com> (raw)
The maximum packet offset accessed by one BPF program is useful
information.
Because sometimes there could be packet split and it is possible for some
reasons (for example performance) we want to reject the BPF program if the
maximum packet size would trigger such split. Normally, MTU value is
treated as the maximum packet size, but one BPF program does not always
access the whole packet, it could only access the head portion of the data.
We could let verifier calculate the maximum packet offset ever used and
record it inside prog auxiliar information structure as a new field
"max_pkt_offset".
Jiong Wang (2):
bpf: let verifier to calculate and record max_pkt_offset
nfp: bpf: relax prog rejection through max_pkt_offset
drivers/net/ethernet/netronome/nfp/bpf/offload.c | 9 +++++----
include/linux/bpf.h | 1 +
kernel/bpf/verifier.c | 12 ++++++++++++
3 files changed, 18 insertions(+), 4 deletions(-)
--
2.7.4
next reply other threads:[~2018-11-08 18:43 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-11-08 9:08 Jiong Wang [this message]
2018-11-08 9:08 ` [PATCH bpf-next 1/2] bpf: let verifier to calculate and record max_pkt_offset Jiong Wang
2018-11-08 9:08 ` [PATCH bpf-next 2/2] nfp: bpf: relax prog rejection through max_pkt_offset Jiong Wang
2018-11-09 8:20 ` [PATCH bpf-next 0/2] bpf: offer maximum packet offset info Daniel Borkmann
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=1541668123-9571-1-git-send-email-jiong.wang@netronome.com \
--to=jiong.wang@netronome.com \
--cc=ast@kernel.org \
--cc=daniel@iogearbox.net \
--cc=netdev@vger.kernel.org \
--cc=oss-drivers@netronome.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).