From: Jakub Kicinski <jakub.kicinski@netronome.com>
To: Saeed Mahameed <saeedm@mellanox.com>
Cc: "toke@redhat.com" <toke@redhat.com>,
"daniel@iogearbox.net" <daniel@iogearbox.net>,
"ast@kernel.org" <ast@kernel.org>,
"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
"bjorn.topel@gmail.com" <bjorn.topel@gmail.com>,
"magnus.karlsson@intel.com" <magnus.karlsson@intel.com>,
"bjorn.topel@intel.com" <bjorn.topel@intel.com>,
"brouer@redhat.com" <brouer@redhat.com>,
"bpf@vger.kernel.org" <bpf@vger.kernel.org>
Subject: Re: [PATCH bpf-next v2 1/2] net: xdp: refactor XDP_QUERY_PROG{,_HW} to netdev
Date: Sat, 1 Jun 2019 12:42:33 -0700 [thread overview]
Message-ID: <20190601124233.5a130838@cakuba.netronome.com> (raw)
In-Reply-To: <b0a9c3b198bdefd145c34e52aa89d33aa502aaf5.camel@mellanox.com>
On Fri, 31 May 2019 19:18:17 +0000, Saeed Mahameed wrote:
> On Fri, 2019-05-31 at 11:42 +0200, Björn Töpel wrote:
> > From: Björn Töpel <bjorn.topel@intel.com>
> >
> > All XDP capable drivers need to implement the XDP_QUERY_PROG{,_HW}
> > command of ndo_bpf. The query code is fairly generic. This commit
> > refactors the query code up from the drivers to the netdev level.
> >
> > The struct net_device has gained two new members: xdp_prog_hw and
> > xdp_flags. The former is the offloaded XDP program, if any, and the
> > latter tracks the flags that the supplied when attaching the XDP
> > program. The flags only apply to SKB_MODE or DRV_MODE, not HW_MODE.
> >
> > The xdp_prog member, previously only used for SKB_MODE, is shared
> > with
> > DRV_MODE. This is OK, due to the fact that SKB_MODE and DRV_MODE are
> > mutually exclusive. To differentiate between the two modes, a new
> > internal flag is introduced as well.
>
> Just thinking out loud, why can't we allow any combination of
> HW/DRV/SKB modes? they are totally different attach points in a totally
> different checkpoints in a frame life cycle.
FWIW see Message-ID: <20190201080236.446d84d4@redhat.com>
> Down the road i think we will utilize this fact and start introducing
> SKB helpers for SKB mode and driver helpers for DRV mode..
Any reason why we would want the extra complexity? There is cls_bpf
if someone wants skb features after all..
next prev parent reply other threads:[~2019-06-01 19:42 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-31 9:42 [PATCH bpf-next v2 0/2] net: xdp: refactor the XDP_QUERY_PROG and XDP_QUERY_PROG_HW code Björn Töpel
2019-05-31 9:42 ` [PATCH bpf-next v2 1/2] net: xdp: refactor XDP_QUERY_PROG{,_HW} to netdev Björn Töpel
2019-05-31 19:18 ` Saeed Mahameed
2019-06-01 19:42 ` Jakub Kicinski [this message]
2019-06-03 9:04 ` Björn Töpel
2019-06-03 21:20 ` Saeed Mahameed
2019-06-04 5:18 ` Björn Töpel
2019-06-04 10:17 ` Jesper Dangaard Brouer
2019-06-01 19:57 ` Jakub Kicinski
2019-06-03 9:04 ` Björn Töpel
2019-06-03 17:03 ` Jakub Kicinski
2019-06-04 5:16 ` Björn Töpel
2019-06-01 9:50 ` kbuild test robot
2019-06-01 18:12 ` Jonathan Lemon
2019-06-03 8:39 ` Björn Töpel
2019-06-03 14:58 ` Jonathan Lemon
2019-06-03 23:11 ` Daniel Borkmann
2019-06-04 5:37 ` Björn Töpel
2019-06-01 20:02 ` Jakub Kicinski
2019-06-03 9:07 ` Björn Töpel
2019-06-03 10:56 ` Toke Høiland-Jørgensen
2019-05-31 9:42 ` [PATCH bpf-next v2 2/2] net: xdp: remove XDP_QUERY_PROG{,_HW} Björn Töpel
2019-05-31 9:45 ` [PATCH bpf-next v2 0/2] net: xdp: refactor the XDP_QUERY_PROG and XDP_QUERY_PROG_HW code Björn Töpel
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=20190601124233.5a130838@cakuba.netronome.com \
--to=jakub.kicinski@netronome.com \
--cc=ast@kernel.org \
--cc=bjorn.topel@gmail.com \
--cc=bjorn.topel@intel.com \
--cc=bpf@vger.kernel.org \
--cc=brouer@redhat.com \
--cc=daniel@iogearbox.net \
--cc=magnus.karlsson@intel.com \
--cc=netdev@vger.kernel.org \
--cc=saeedm@mellanox.com \
--cc=toke@redhat.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