mbox series

[net,v2,0/2] bnxt: Fix failure to report RSS context in ntuple rule

Message ID cover.1731377399.git.dxu@dxuuu.xyz
Headers show
Series bnxt: Fix failure to report RSS context in ntuple rule | expand

Message

Daniel Xu Nov. 12, 2024, 2:23 a.m. UTC
This patchset fixes a bug where bnxt driver was failing to report that
an ntuple rule is redirecting to an RSS context. First commit is the
fix, then second commit extends selftests to detect if other/new drivers
are compliant with ntuple/rss_ctx API.

Daniel Xu (2):
  bnxt_en: ethtool: Supply ntuple rss context action
  selftests: drv-net: rss_ctx: Add test for ntuple rule

 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c |  8 ++++++--
 tools/testing/selftests/drivers/net/hw/rss_ctx.py | 13 ++++++++++++-
 2 files changed, 18 insertions(+), 3 deletions(-)

Comments

Jakub Kicinski Nov. 13, 2024, 1:44 a.m. UTC | #1
On Mon, 11 Nov 2024 19:23:31 -0700 Daniel Xu wrote:
> Extend the rss_ctx test suite to test that an ntuple action that
> redirects to an RSS context contains that information in `ethtool -n`.
> Otherwise the output from ethtool is highly deceiving. This test helps
> ensure drivers are compliant with the API.

Looks like it doesn't apply, please base the v3 on net rather than
net-next, I'll deal with the merge.
Daniel Xu Nov. 13, 2024, 1:51 a.m. UTC | #2
Hi Ed,

On Tue, Nov 12, 2024, at 3:10 AM, Edward Cree wrote:
> On 12/11/2024 02:23, Daniel Xu wrote:
>> Extend the rss_ctx test suite to test that an ntuple action that
>> redirects to an RSS context contains that information in `ethtool -n`.
>> Otherwise the output from ethtool is highly deceiving. This test helps
>> ensure drivers are compliant with the API.
>> 
>> Signed-off-by: Daniel Xu <dxu@dxuuu.xyz>
> ...
>> +def _ntuple_rule_check(cfg, rule_id, ctx_id):
>> +    """Check that ntuple rule references RSS context ID"""
>> +    text = ethtool(f"-n {cfg.ifname} rule {rule_id}").stdout
>> +    pattern = f"RSS Context ID: {ctx_id}"
>> +    ksft_true(re.search(pattern, text, re.IGNORECASE),
>
> This won't match the output from your ethtool patch, because that
>  removes the colon.  Probably want to wait until the patch is
>  finalised and then write a regex that matches both versions.

Argh, I meant to have wildcards here. But yeah, makes sense, will wait
until the other patch is finalized.

Thanks,
Daniel
Daniel Xu Nov. 13, 2024, 1:58 a.m. UTC | #3
Hi Jakub,

On Tue, Nov 12, 2024, at 5:44 PM, Jakub Kicinski wrote:
> On Mon, 11 Nov 2024 19:23:31 -0700 Daniel Xu wrote:
>> Extend the rss_ctx test suite to test that an ntuple action that
>> redirects to an RSS context contains that information in `ethtool -n`.
>> Otherwise the output from ethtool is highly deceiving. This test helps
>> ensure drivers are compliant with the API.
>
> Looks like it doesn't apply, please base the v3 on net rather than
> net-next, I'll deal with the merge.

Sorry about that. Will think on how to make my workflow not involve
manually retyping patches between different machines...
Jakub Kicinski Nov. 13, 2024, 1:59 a.m. UTC | #4
On Tue, 12 Nov 2024 17:51:50 -0800 Daniel Xu wrote:
> > This won't match the output from your ethtool patch, because that
> >  removes the colon.  Probably want to wait until the patch is
> >  finalised and then write a regex that matches both versions.  
> 
> Argh, I meant to have wildcards here. But yeah, makes sense, will wait
> until the other patch is finalized.

Keep in mind Michal scans ethtool patches once every week or two,
so there may be a bit of a delay there.