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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <6040a96c-514d-45e5-8970-5c0f524d4a82@davidwei.uk>
Date: Tue, 20 Jan 2026 17:57:50 -0800
From: David Wei <dw@...idwei.uk>
To: Jakub Kicinski <kuba@...nel.org>, Daniel Borkmann <daniel@...earbox.net>
Cc: netdev@...r.kernel.org, bpf@...r.kernel.org, davem@...emloft.net,
 razor@...ckwall.org, pabeni@...hat.com, willemb@...gle.com, sdf@...ichev.me,
 john.fastabend@...il.com, martin.lau@...nel.org, jordan@...fe.io,
 maciej.fijalkowski@...el.com, magnus.karlsson@...el.com, toke@...hat.com,
 yangzhenze@...edance.com, wangdongdong.6@...edance.com
Subject: Re: [PATCH net-next v7 15/16] selftests/net: Make NetDrvContEnv
 support queue leasing

On 2026-01-20 17:51, Jakub Kicinski wrote:
> On Thu, 15 Jan 2026 09:26:02 +0100 Daniel Borkmann wrote:
>> +    def _lease_queues(self):
>> +        channels = self.ethnl.channels_get({'header': {'dev-index': self.ifindex}})
>> +        channels = channels['combined-count']
>> +        if channels < 2:
>> +            raise KsftSkipEx('Test requires NETIF with at least 2 combined channels')
>> +
>> +        rings = self.ethnl.rings_get({'header': {'dev-index': self.ifindex}})
>> +        self._rx_rings = rings['rx']
>> +        self._hds_thresh = rings.get('hds-thresh', 0)
>> +        self.ethnl.rings_set({'header': {'dev-index': self.ifindex},
>> +                            'tcp-data-split': 'enabled',
>> +                            'hds-thresh': 0,
>> +                            'rx': 64})
>> +        self.src_queue = channels - 1
>> +        bind_result = self.netdevnl.queue_create(
>> +            {
>> +                "ifindex": self.nk_guest_ifindex,
>> +                "type": "rx",
>> +                "lease": {
>> +                    "ifindex": self.ifindex,
>> +                    "queue": {"id": self.src_queue, "type": "rx"},
>> +                },
>> +            }
>> +        )
>> +        self.nk_queue = bind_result['id']
>> +        self._leased = True
> 
> No frameworks, please, this belongs in the test itself.

The timing of this is challenging. It has to be done after creating the
netns/netkit, but before moving one of the netkits into the netns.

I could make this a functor that a test caller passes in. Would you be
okay with that?

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ