lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <aJsjpyqVrEh6P26W@dcaratti.users.ipa.redhat.com>
Date: Tue, 12 Aug 2025 13:21:11 +0200
From: Davide Caratti <dcaratti@...hat.com>
To: Victor Nogueira <victor@...atatu.com>
Cc: Jamal Hadi Salim <jhs@...atatu.com>,
	Cong Wang <xiyou.wangcong@...il.com>, Jiri Pirko <jiri@...nulli.us>,
	"David S. Miller" <davem@...emloft.net>,
	Eric Dumazet <edumazet@...gle.com>,
	Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>,
	Simon Horman <horms@...nel.org>, Lion Ackermann <nnamrec@...il.com>,
	Petr Machata <petrm@...lanox.com>, netdev@...r.kernel.org,
	Ivan Vecera <ivecera@...hat.com>, Li Shuang <shuali@...hat.com>
Subject: Re: [PATCH net] net/sched: ets: use old 'nbands' while purging
 unused classes

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


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ