Subject: Re: [PATCH net-next v2 12/12] selftests: drv-net: rss_ctx: test dumping RSS contexts

From: Jakub Kicinski <[email-masked]>
Date: Tue, 6 Aug 2024 11:28:33 -0700

On Tue, 6 Aug 2024 17:48:27 +0100 Edward Cree wrote:
> > +    expect_tuples = set([(cfg.ifname, -1)] + [(cfg.ifname, ctx_id) for ctx_id in ids])
> > +
> > +    # Dump all
> > +    ctxs = cfg.ethnl.rss_get({}, dump=True)
> > +    ctx_tuples = set([(c['header']['dev-name'], c.get('context', -1)) for c in ctxs])  
> 
> Won't this return all ctxes on all netdevs in the system?
> 
> > +    ksft_eq(expect_tuples, ctx_tuples)  
> 
> Whereas expect_tuples only contains cfg.ifname, so this
>  assertion will fail if you have more than one RSS-
>  supporting netdev.

And RSS contexts are actively used on another interface, yes.
Will fix. More importantly we should check that there are no
duplicates.