public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
From: Davide Caratti <dcaratti@redhat.com>
To: Victor Nogueira <victor@mojatatu.com>
Cc: Jamal Hadi Salim <jhs@mojatatu.com>,
	Cong Wang <xiyou.wangcong@gmail.com>,
	Jiri Pirko <jiri@resnulli.us>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	Simon Horman <horms@kernel.org>,
	Lion Ackermann <nnamrec@gmail.com>,
	Petr Machata <petrm@mellanox.com>,
	netdev@vger.kernel.org, Ivan Vecera <ivecera@redhat.com>,
	Li Shuang <shuali@redhat.com>
Subject: Re: [PATCH net] net/sched: ets: use old 'nbands' while purging unused classes
Date: Tue, 12 Aug 2025 13:21:11 +0200	[thread overview]
Message-ID: <aJsjpyqVrEh6P26W@dcaratti.users.ipa.redhat.com> (raw)
In-Reply-To: <2ac9d393-a87b-4b55-87d6-0b76542e63c9@mojatatu.com>

On Mon, Aug 11, 2025 at 02:35:50PM -0300, Victor Nogueira wrote:
> On 8/11/25 13:09, Davide Caratti wrote:
> > On Mon, Aug 11, 2025 at 10:52:08AM -0300, Victor Nogueira wrote:
> > > On 8/11/25 06:53, Victor Nogueira wrote:
> > > > On 8/11/25 04:49, Davide Caratti wrote:

[...]
  
> > so, including "plug" children in the tree should make kselftest feasible either with 'net/forwarding'
> > or with TDC + scapy plugin superpowers.
> 
> I see, so I think it would be better to use the 'net/forwarding' approach
> with
> "plug" children mainly because it looks simpler.

AFAIS the problem with TDC scapy plugin is: it doesn't work well with nsPlugin.
At the moment it can only inject packets in $DEV0 transmit, assuming that $DEV1
will do something with received packets. So, some TC mirred trickery is needed to
test qdiscs (or alternatively, qdiscs with traffic should be tested in the main
namespace using $DEV0 - but this is not friendly to other tests)

(some mirred trickery be like: adding 1 tc-mirred line at the end of "setup")

    {
        "id": "1027",
        "name": "purge DWRR classes with non-empty backlog",
        "category": [
            "qdisc",
            "ets"
        ],
        "plugins": {
            "requires": [
                "nsPlugin",
                "scapyPlugin"
            ]
        },
        "setup": [
            "$TC qdisc add dev $DUMMY root handle 1: ets bands 4 strict 2 priomap 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3",
            "$TC qdisc add dev $DUMMY handle 10: parent 1:4 plug",
            "$TC qdisc add dev $DEV1 clsact",
            "$TC filter add dev $DEV1 ingress protocol ip matchall action mirred egress redirect dev $DUMMY"
        ],
        "scapy": [
            {
                "iface": "$DEV0",
                "count": 1,
                "packet": "Ether(type=0x800)/IP(src='10.10.10.1',dst='10.10.10.2')/UDP(sport=5000,dport=10)"
            }
        ],
        "cmdUnderTest": "true",
        "expExitCode": "0",
        "verifyCmd": "$TC qdisc change dev $DUMMY handle 1: ets bands 2 strict 0",
        "matchPattern": "match_pattern_not_relevant",
        "matchCount": "0",
        "teardown": []
    }


yes, net/forwarding should take less lines: will post a patch in the next hours. thanks,

-- 
davide


      parent reply	other threads:[~2025-08-12 11:21 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-08-07 15:48 [PATCH net] net/sched: ets: use old 'nbands' while purging unused classes Davide Caratti
2025-08-08 11:44 ` Petr Machata
2025-08-08 18:15 ` Victor Nogueira
2025-08-11  7:49   ` Davide Caratti
2025-08-11  9:53     ` Victor Nogueira
2025-08-11 13:52       ` Victor Nogueira
2025-08-11 16:09         ` Davide Caratti
2025-08-11 17:35           ` Victor Nogueira
2025-08-12  1:26             ` Jakub Kicinski
2025-08-12 11:21             ` Davide Caratti [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=aJsjpyqVrEh6P26W@dcaratti.users.ipa.redhat.com \
    --to=dcaratti@redhat.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=horms@kernel.org \
    --cc=ivecera@redhat.com \
    --cc=jhs@mojatatu.com \
    --cc=jiri@resnulli.us \
    --cc=kuba@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=nnamrec@gmail.com \
    --cc=pabeni@redhat.com \
    --cc=petrm@mellanox.com \
    --cc=shuali@redhat.com \
    --cc=victor@mojatatu.com \
    --cc=xiyou.wangcong@gmail.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