[ethtool] 13/20: Revert "ethtool: print hash function with ethtool -x|--show-rxfh-indir"

debian-kernel at lists.debian.org debian-kernel at lists.debian.org
Wed Aug 30 12:59:25 UTC 2017


This is an automated email from the git hooks/post-receive script.

benh pushed a commit to branch master
in repository ethtool.

commit 1ebdf6b0309f88c5b78d143a7751c5cc08d0d91a
Author: John W. Linville <linville at tuxdriver.com>
Date:   Wed Mar 29 10:42:05 2017 -0400

    Revert "ethtool: print hash function with ethtool -x|--show-rxfh-indir"
    
    As documented here:
    
        http://marc.info/?l=linux-netdev&m=149079962822607&w=2
    
    First, I accidentally merged two somewhat similar patches that aren't really
    meant to go together. Then, I got confused about which was which, and I
    reverted the wrong one! In this patch I'll revert the proper one, and in
    the next patch I'll clean things up by reapplying the correct patch.
    
    This reverts commit b932835d2302ccbb3e7c0cf708a9c3fd25868de6.
---
 ethtool.8.in |  3 +--
 ethtool.c    | 31 -------------------------------
 2 files changed, 1 insertion(+), 33 deletions(-)

diff --git a/ethtool.8.in b/ethtool.8.in
index 9d94b7d..12e2b79 100644
--- a/ethtool.8.in
+++ b/ethtool.8.in
@@ -863,8 +863,7 @@ Show the device's time stamping capabilities and associated PTP
 hardware clock.
 .TP
 .B \-x \-\-show\-rxfh\-indir \-\-show\-rxfh
-Retrieves the receive flow hash indirection table, hash function and RSS hash
-key.
+Retrieves the receive flow hash indirection table and/or RSS hash key.
 .TP
 .B \-X \-\-set\-rxfh\-indir \-\-rxfh
 Configures the receive flow hash indirection table and/or RSS hash key.
diff --git a/ethtool.c b/ethtool.c
index 8b03aaf..669bc36 100644
--- a/ethtool.c
+++ b/ethtool.c
@@ -3644,35 +3644,6 @@ static int do_grxfhindir(struct cmd_context *ctx,
 	return 0;
 }
 
-static void print_grxfh_hfunc(struct cmd_context *ctx, __u8 hfunc)
-{
-	unsigned int func_id = ffs(hfunc) - 1;
-	struct ethtool_gstrings *strings;
-
-	printf("RSS hash function: ");
-	if (!hfunc) {
-		printf("unknown\n");
-		return;
-	}
-
-	strings = get_stringset(ctx, ETH_SS_RSS_HASH_FUNCS, 0, 1);
-	if (!strings) {
-		if (errno != EOPNOTSUPP)
-			printf("%s\n", strerror(errno));
-		else
-			printf("unnamed (%d)\n", func_id);
-		return;
-	}
-
-	if (func_id < strings->len)
-		printf("%s\n",
-		       (char *)strings->data + func_id * ETH_GSTRING_LEN);
-	else
-		printf("unnamed (%d)\n", func_id);
-
-	free(strings);
-}
-
 static int do_grxfh(struct cmd_context *ctx)
 {
 	struct ethtool_rxfh rss_head = {0};
@@ -3718,8 +3689,6 @@ static int do_grxfh(struct cmd_context *ctx)
 
 	print_indir_table(ctx, &ring_count, rss->indir_size, rss->rss_config);
 
-	print_grxfh_hfunc(ctx, rss->hfunc);
-
 	indir_bytes = rss->indir_size * sizeof(rss->rss_config[0]);
 	hkey = ((char *)rss->rss_config + indir_bytes);
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/kernel/ethtool.git



More information about the Kernel-svn-changes mailing list