From: Simon Horman <simon.horman@netronome.com>
To: Ido Schimmel <idosch@idosch.org>
Cc: David Miller <davem@davemloft.net>,
Jakub Kicinski <kuba@kernel.org>,
netdev@vger.kernel.org, oss-drivers@netronome.com,
Xingfeng Hu <xingfeng.hu@corigine.com>,
Baowen Zheng <baowen.zheng@corigine.com>,
Louis Peens <louis.peens@netronome.com>
Subject: Re: [PATCH v3 net-next 0/3] net/sched: act_police: add support for packet-per-second policing
Date: Tue, 16 Mar 2021 11:42:23 +0100 [thread overview]
Message-ID: <20210316104223.GA16688@netronome.com> (raw)
In-Reply-To: <YFBt19zVIH6Dgw8w@shredder.lan>
Hi Ido,
On Tue, Mar 16, 2021 at 10:35:35AM +0200, Ido Schimmel wrote:
> Sorry for the delay. Was AFK yesterday
No problem at all.
...
> > > > As follow-ups we plan to provide:
> > > > * Corresponding updates to iproute2
> > > > * Corresponding self tests (which depend on the iproute2 changes)
> > >
> > > I was about to ask :)
> > >
> > > FYI, there is this selftest:
> > > tools/testing/selftests/net/forwarding/tc_police.sh
> > >
> > > Which can be extended to also test packet rate policing
> >
> > Thanks Ido,
> >
> > The approach we have taken is to add tests to
> > tools/testing/selftests/tc-testing/tc-tests/actions/police.json
> >
> > Do you think adding a test to tc_police.sh is also worthwhile? Or should be
> > done instead of updating police.json?
>
> IIUC, police.json only performs configuration tests. tc_police.sh on the
> other hand, configures a topology, injects traffic and validates that
> the bandwidth after the police action is according to user
> configuration. You can test the software data path by using veth pairs
> or the hardware data path by using physical ports looped to each other.
>
> So I think that extending both tests is worthwhile.
Thanks, we'll see about making it so.
> > Lastly, my assumption is that the tests should be posted once iproute2
> > changes they depend on have been accepted. Is this correct in your opinion?
>
> Personally, I prefer selftests to be posted together with the
> implementation, regardless if they depend on new iproute2 functionality.
> In the unlikely case that the kernel patches were accepted, but changes
> were requested for the command line interface, you can always patch the
> selftests later.
>
> Jakub recently added this section:
> https://www.kernel.org/doc/html/latest/networking/netdev-FAQ.html#how-do-i-post-corresponding-changes-to-user-space-components
>
> He writes "User space code exercising kernel features should be posted
> alongside kernel patches."
>
> And you can see that in the example the last patch is a selftest:
>
> ```
> [PATCH net-next 0/3] net: some feature cover letter
> └─ [PATCH net-next 1/3] net: some feature prep
> └─ [PATCH net-next 2/3] net: some feature do it
> └─ [PATCH net-next 3/3] selftest: net: some feature
>
> [PATCH iproute2-next] ip: add support for some feature
> ```
Thanks, we'll try to follow this in our next feature submission.
...
prev parent reply other threads:[~2021-03-16 10:43 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-12 14:08 [PATCH v3 net-next 0/3] net/sched: act_police: add support for packet-per-second policing Simon Horman
2021-03-12 14:08 ` [PATCH v3 net-next 1/3] flow_offload: " Simon Horman
2021-03-12 14:08 ` [PATCH v3 net-next 2/3] flow_offload: reject configuration of packet-per-second policing in offload drivers Simon Horman
2021-03-12 14:08 ` [PATCH v3 net-next 3/3] net/sched: act_police: add support for packet-per-second policing Simon Horman
2021-03-12 14:22 ` [PATCH v3 net-next 0/3] " Simon Horman
2021-03-16 13:53 ` Jamal Hadi Salim
2021-03-16 16:40 ` Simon Horman
2021-03-13 22:40 ` patchwork-bot+netdevbpf
2021-03-14 8:17 ` Ido Schimmel
2021-03-15 14:41 ` Simon Horman
2021-03-16 8:35 ` Ido Schimmel
2021-03-16 10:42 ` Simon Horman [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=20210316104223.GA16688@netronome.com \
--to=simon.horman@netronome.com \
--cc=baowen.zheng@corigine.com \
--cc=davem@davemloft.net \
--cc=idosch@idosch.org \
--cc=kuba@kernel.org \
--cc=louis.peens@netronome.com \
--cc=netdev@vger.kernel.org \
--cc=oss-drivers@netronome.com \
--cc=xingfeng.hu@corigine.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).