Message ID | e9de21b76807da310658dbfd46d6177c1c592fe7.1731462244.git.dxu@dxuuu.xyz (mailing list archive) |
---|---|
State | New |
Delegated to: | Michal Kubecek |
Headers | show |
Series | [ethtool-next,v3] rxclass: Make output for RSS context action explicit | expand |
Context | Check | Description |
---|---|---|
netdev/tree_selection | success | Not a local patch |
On Tue, 12 Nov 2024 18:45:43 -0700 Daniel Xu wrote: > # ./ethtool -n eth0 rule 0 > Filter: 0 > Rule Type: Raw IPv6 > Src IP addr: :: mask: ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff > Dest IP addr: <redacted> mask: :: > Traffic Class: 0x0 mask: 0xff > Protocol: 0 mask: 0xff > L4 bytes: 0x0 mask: 0xffffffff > Action: Direct to RSS context id 1 Acked-by: Jakub Kicinski <kuba@kernel.org>
On 13/11/2024 01:45, Daniel Xu wrote: > Fix by making output more clear. Also suppress base offset queue for the > common case of 0. Example of new output: > > # ./ethtool -n eth0 rule 0 > Filter: 0 > Rule Type: Raw IPv6 > Src IP addr: :: mask: ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff > Dest IP addr: <redacted> mask: :: > Traffic Class: 0x0 mask: 0xff > Protocol: 0 mask: 0xff > L4 bytes: 0x0 mask: 0xffffffff > Action: Direct to RSS context id 1 Commit comment hasn't been updated to match the current patch.
diff --git a/rxclass.c b/rxclass.c index f17e3a5..1e202cc 100644 --- a/rxclass.c +++ b/rxclass.c @@ -248,13 +248,17 @@ static void rxclass_print_nfc_rule(struct ethtool_rx_flow_spec *fsp, rxclass_print_nfc_spec_ext(fsp); - if (fsp->flow_type & FLOW_RSS) - fprintf(stdout, "\tRSS Context ID: %u\n", rss_context); - if (fsp->ring_cookie == RX_CLS_FLOW_DISC) { fprintf(stdout, "\tAction: Drop\n"); } else if (fsp->ring_cookie == RX_CLS_FLOW_WAKE) { fprintf(stdout, "\tAction: Wake-on-LAN\n"); + } else if (fsp->flow_type & FLOW_RSS) { + u64 queue = ethtool_get_flow_spec_ring(fsp->ring_cookie); + + fprintf(stdout, "\tAction: Direct to RSS Context %u", rss_context); + if (queue) + fprintf(stdout, " (queue base offset: %llu)", queue); + fprintf(stdout, "\n"); } else { u64 vf = ethtool_get_flow_spec_ring_vf(fsp->ring_cookie); u64 queue = ethtool_get_flow_spec_ring(fsp->ring_cookie);