diff mbox series

[ethtool-next,4/6] Move input_xfrm outside of hfunc loop

Message ID 20250303121941.105747-5-gal@nvidia.com (mailing list archive)
State New
Delegated to: Michal Kubecek
Headers show
Series Symmetric OR-XOR RSS hash | expand

Checks

Context Check Description
netdev/tree_selection success Not a local patch, async

Commit Message

Gal Pressman March 3, 2025, 12:19 p.m. UTC
When dumping RSS info JSON, the input_xfrm has nothing to do with the
hash function, move it outside the for loop.

Reviewed-by: Cosmin Ratiu <cratiu@nvidia.com>
Reviewed-by: Tariq Toukan <tariqt@nvidia.com>
Signed-off-by: Gal Pressman <gal@nvidia.com>
---
 netlink/rss.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)
diff mbox series

Patch

diff --git a/netlink/rss.c b/netlink/rss.c
index 7a8c4e5e7379..0207931a5771 100644
--- a/netlink/rss.c
+++ b/netlink/rss.c
@@ -47,12 +47,6 @@  void dump_json_rss_info(struct cmd_context *ctx, u32 *indir_table,
 			if (hfunc & (1 << i)) {
 				print_string(PRINT_JSON, "rss-hash-function",
 					     NULL, get_string(hash_funcs, i));
-				open_json_object("rss-input-transformation");
-				print_bool(PRINT_JSON, "symmetric-xor", NULL,
-					   (input_xfrm & RXH_XFRM_SYM_XOR) ?
-					   true : false);
-
-				close_json_object();
 				break;
 			}
 		}
@@ -61,6 +55,12 @@  void dump_json_rss_info(struct cmd_context *ctx, u32 *indir_table,
 			print_uint(PRINT_JSON, "rss-hash-function-raw", NULL, hfunc);
 	}
 
+	open_json_object("rss-input-transformation");
+	print_bool(PRINT_JSON, "symmetric-xor", NULL,
+		   (input_xfrm & RXH_XFRM_SYM_XOR) ? true : false);
+
+	close_json_object();
+
 	close_json_object();
 }