From: Jiri Pirko <jiri@resnulli.us>
To: Jakub Kicinski <jakub.kicinski@netronome.com>
Cc: Alexei Starovoitov <alexei.starovoitov@gmail.com>,
netdev@vger.kernel.org, oss-drivers@netronome.com,
daniel@iogearbox.net
Subject: Re: [RFC net-next 0/6] xdp: make stack perform remove and tests
Date: Sun, 26 Nov 2017 08:43:23 +0100 [thread overview]
Message-ID: <20171126074323.GA2023@nanopsycho> (raw)
In-Reply-To: <20171125174304.477246c5@cakuba.netronome.com>
Sun, Nov 26, 2017 at 02:43:04AM CET, jakub.kicinski@netronome.com wrote:
>On Sat, 25 Nov 2017 17:02:09 -0800, Alexei Starovoitov wrote:
>> On Thu, Nov 23, 2017 at 06:36:07PM -0800, Jakub Kicinski wrote:
>> > Hi!
>> >
>> > The purpose of this series is to add a software model of BPF offloads
>> > to make it easier for everyone to test them and make some of the more
>> > arcane rules and assumptions more clear.
>> >
>> > The series starts with 3 patches aiming to make XDP handling in the
>> > drivers less error prone. Currently driver authors have to remember
>> > to free XDP programs if XDP is active during unregister. With this
>> > series the core will disable XDP on its own. It will take place
>> > after close, drivers are not expected to perform reconfiguration
>> > when disabling XDP on a downed device.
>> >
>> > Next two patches add the software netdev driver. Last but not least
>> > there is a python test which exercises all the corner cases which
>> > came to my mind.
>> >
>> > Test needs to be run as root. It will print basic information to
>> > stdout, but can also create a more detailed log of all commands
>> > when --log option is passed. Log is in Emacs Org-mode format.
>> >
>> > ./tools/testing/selftests/bpf/test_offload.py --log /tmp/log
>> >
>> > Something I'm still battling with, and would appreciate help of
>> > wiser people is that occasionally during the test something makes
>> > the refcount of init_net drop to 0 :S I tried to create a simple
>> > reproducer, but seems like just running the script in the loop is
>> > the easiest way to go... Could it have something to do with the
>> > recent TC work? The driver is pretty simple and never touches
>> > ref counts. The only slightly unusual thing is that the BPF code
>> > sleeps for a bit on remove in the netdev notifier.
>>
>> I like the direction.
>> Patch 3 in particular with auto prog_put is a great idea!
>> Patch 4 - if you want to do dual gpl+bsd. It's ok and really your call as an author.
Sure. I was just curious if it is really necessary. That's all.
>> Patch 5 - I'm only not excited about debugfs. Can you do the same with tracepoints?
>
>I would prefer to stick to DebugFS, if you don't mind. Some of the
>knobs are writeable. I look at DebugFS as a back door. We throw
>standard API commands at the device and want to inspect its internal
>state. And cross check the standard reporting APIs. As such DebugFS
>is completely inappropriate but for API-test-drivers.
I agree. This is one of few exceptions where debugfs is good to be used.
>
>On that topic - is there a way to trigger and wait for an rcu barrier
>from user space? Quentin pointed out that selftest is shaky unless run
>with RCU debug enabled. To wait for deletion of programs I need a
>barrier :S
>
>> Patch 6 - python 3 is a requirement? or can work with 2.7 ? I don't mind if it's 3+ only.
>> Just trying to understand the dependencies.
>
>Am a python noob so I defaulted to version 3 and proceeded to look
>things I needed up in the python 3 docs. Which perhaps resulted in
>using more python3 only features than necessary...
>
>Upon a quick inspection, the only python3 feature I seem to be using
>is the Popen.args member.
>
>> and thanks for adding it to selftests.
>
>Thanks for the comments!
prev parent reply other threads:[~2017-11-26 7:43 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-24 2:36 [RFC net-next 0/6] xdp: make stack perform remove and tests Jakub Kicinski
2017-11-24 2:36 ` [RFC net-next 1/6] net: xdp: avoid output parameters when querying XDP prog Jakub Kicinski
2017-11-24 2:36 ` [RFC net-next 2/6] net: xdp: report flags program was installed with on query Jakub Kicinski
2017-11-24 2:36 ` [RFC net-next 3/6] net: xdp: make the stack take care of the tear down Jakub Kicinski
2017-11-24 23:24 ` Daniel Borkmann
2017-11-25 3:28 ` Jakub Kicinski
2017-11-24 2:36 ` [RFC net-next 4/6] netdevsim: add software driver for testing offloads Jakub Kicinski
2017-11-24 7:24 ` Jiri Pirko
2017-11-24 7:49 ` Jakub Kicinski
2017-11-24 8:07 ` Jiri Pirko
2017-11-27 19:30 ` David Miller
2017-11-27 19:42 ` Jakub Kicinski
2017-11-28 14:55 ` Phil Sutter
2017-11-28 16:20 ` Jiri Pirko
2017-11-24 2:36 ` [RFC net-next 5/6] netdevsim: add bpf offload support Jakub Kicinski
2017-11-24 2:36 ` [RFC net-next 6/6] selftests/bpf: add offload test based on netdevsim Jakub Kicinski
2017-11-24 7:45 ` [RFC net-next 0/6] xdp: make stack perform remove and tests Jiri Pirko
2017-11-24 8:02 ` Jakub Kicinski
2017-11-25 4:55 ` Jakub Kicinski
2017-11-26 1:02 ` Alexei Starovoitov
2017-11-26 1:43 ` Jakub Kicinski
2017-11-26 7:43 ` Jiri Pirko [this message]
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=20171126074323.GA2023@nanopsycho \
--to=jiri@resnulli.us \
--cc=alexei.starovoitov@gmail.com \
--cc=daniel@iogearbox.net \
--cc=jakub.kicinski@netronome.com \
--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).