* Re: [PATCH 1/5] ethtool: Update ethtool-copy.h
2009-04-30 12:33 [PATCH 1/5] ethtool: Update ethtool-copy.h Ben Hutchings
@ 2009-04-30 12:35 ` Ben Hutchings
2009-04-30 12:36 ` [PATCH 1/5] ethtool: Remove support for RX hashing by port Ben Hutchings
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: Ben Hutchings @ 2009-04-30 12:35 UTC (permalink / raw)
To: Jeff Garzik; +Cc: netdev
Sorry, this should be the second patch not the first.
Ben.
--
Ben Hutchings, Senior Software Engineer, Solarflare Communications
Not speaking for my employer; that's the marketing department's job.
They asked us to note that Solarflare product names are trademarked.
^ permalink raw reply [flat|nested] 6+ messages in thread* [PATCH 1/5] ethtool: Remove support for RX hashing by port
2009-04-30 12:33 [PATCH 1/5] ethtool: Update ethtool-copy.h Ben Hutchings
2009-04-30 12:35 ` Ben Hutchings
@ 2009-04-30 12:36 ` Ben Hutchings
2009-04-30 12:37 ` [PATCH 3/5] ethtool: Decode PORT_OTHER Ben Hutchings
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: Ben Hutchings @ 2009-04-30 12:36 UTC (permalink / raw)
To: Jeff Garzik; +Cc: netdev
The kernel-side support for this was removed by:
commit 59089d8d162ddcb5c434672e915331964d38a754
Author: Santwona Behera <santwona.behera@sun.com>
Date: Fri Feb 20 00:58:13 2009 -0800
ethtool: Add RX pkt classification interface
Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
---
ethtool.8 | 3 ---
ethtool.c | 8 +-------
2 files changed, 1 insertions(+), 10 deletions(-)
diff --git a/ethtool.8 b/ethtool.8
index 178f6ea..7a6f52b 100644
--- a/ethtool.8
+++ b/ethtool.8
@@ -473,9 +473,6 @@ Configures the hash options for the specified network traffic type.
.RS
.PD 0
.TP 3
-.B p
-Hash on the device port number on which the packet was received.
-.TP 3
.B m
Hash on the Layer 2 destination address of the rx packet.
.TP 3
diff --git a/ethtool.c b/ethtool.c
index 43ec2bf..5c45b2d 100644
--- a/ethtool.c
+++ b/ethtool.c
@@ -191,7 +191,7 @@ static struct option {
{ "-N", "--config-nfc", MODE_SNFC, "Configure Rx network flow "
"classification options",
" [ rx-flow-hash tcp4|udp4|ah4|sctp4|"
- "tcp6|udp6|ah6|sctp6 p|m|v|t|s|d|f|n|r... ]\n" },
+ "tcp6|udp6|ah6|sctp6 m|v|t|s|d|f|n|r... ]\n" },
{ "-h", "--help", MODE_HELP, "Show this help" },
{}
};
@@ -1090,9 +1090,6 @@ static int parse_rxfhashopts(char *optstr, u32 *data)
*data = 0;
while (*optstr) {
switch (*optstr) {
- case 'p':
- *data |= RXH_DEV_PORT;
- break;
case 'm':
*data |= RXH_L2DA;
break;
@@ -1132,9 +1129,6 @@ static char *unparse_rxfhashopts(u64 opts)
memset(buf, 0, sizeof(buf));
if (opts) {
- if (opts & RXH_DEV_PORT) {
- strcat(buf, "Dev port\n");
- }
if (opts & RXH_L2DA) {
strcat(buf, "L2DA\n");
}
--
Ben Hutchings, Senior Software Engineer, Solarflare Communications
Not speaking for my employer; that's the marketing department's job.
They asked us to note that Solarflare product names are trademarked.
^ permalink raw reply related [flat|nested] 6+ messages in thread* [PATCH 3/5] ethtool: Decode PORT_OTHER
2009-04-30 12:33 [PATCH 1/5] ethtool: Update ethtool-copy.h Ben Hutchings
2009-04-30 12:35 ` Ben Hutchings
2009-04-30 12:36 ` [PATCH 1/5] ethtool: Remove support for RX hashing by port Ben Hutchings
@ 2009-04-30 12:37 ` Ben Hutchings
2009-04-30 12:37 ` [PATCH 4/5] ethtool: Report link partner advertising Ben Hutchings
2009-04-30 12:38 ` [PATCH 5/5] ethtool: Report pause auto-negotiation flags Ben Hutchings
4 siblings, 0 replies; 6+ messages in thread
From: Ben Hutchings @ 2009-04-30 12:37 UTC (permalink / raw)
To: Jeff Garzik; +Cc: netdev
Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
---
ethtool.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/ethtool.c b/ethtool.c
index 5c45b2d..08165eb 100644
--- a/ethtool.c
+++ b/ethtool.c
@@ -941,6 +941,9 @@ static int dump_ecmd(struct ethtool_cmd *ep)
case PORT_FIBRE:
fprintf(stdout, "FIBRE\n");
break;
+ case PORT_OTHER:
+ fprintf(stdout, "Other\n");
+ break;
default:
fprintf(stdout, "Unknown! (%i)\n", ep->port);
break;
--
Ben Hutchings, Senior Software Engineer, Solarflare Communications
Not speaking for my employer; that's the marketing department's job.
They asked us to note that Solarflare product names are trademarked.
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 4/5] ethtool: Report link partner advertising
2009-04-30 12:33 [PATCH 1/5] ethtool: Update ethtool-copy.h Ben Hutchings
` (2 preceding siblings ...)
2009-04-30 12:37 ` [PATCH 3/5] ethtool: Decode PORT_OTHER Ben Hutchings
@ 2009-04-30 12:37 ` Ben Hutchings
2009-04-30 12:38 ` [PATCH 5/5] ethtool: Report pause auto-negotiation flags Ben Hutchings
4 siblings, 0 replies; 6+ messages in thread
From: Ben Hutchings @ 2009-04-30 12:37 UTC (permalink / raw)
To: Jeff Garzik; +Cc: netdev
Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
---
ethtool.c | 20 +++++++++++---------
1 files changed, 11 insertions(+), 9 deletions(-)
diff --git a/ethtool.c b/ethtool.c
index 08165eb..0d188af 100644
--- a/ethtool.c
+++ b/ethtool.c
@@ -839,12 +839,13 @@ static void dump_supported(struct ethtool_cmd *ep)
fprintf(stdout, "No\n");
}
-static void dump_advertised(struct ethtool_cmd *ep)
+static void dump_advertised(struct ethtool_cmd *ep,
+ const char *prefix, u_int32_t mask)
{
- u_int32_t mask = ep->advertising;
+ int indent = strlen(prefix) + 14;
int did1;
- fprintf(stdout, " Advertised link modes: ");
+ fprintf(stdout, " %s link modes: ", prefix);
did1 = 0;
if (mask & ADVERTISED_10baseT_Half) {
did1++; fprintf(stdout, "10baseT/Half ");
@@ -854,7 +855,7 @@ static void dump_advertised(struct ethtool_cmd *ep)
}
if (did1 && (mask & (ADVERTISED_100baseT_Half|ADVERTISED_100baseT_Full))) {
fprintf(stdout, "\n");
- fprintf(stdout, " ");
+ fprintf(stdout, " %*s", indent, "");
}
if (mask & ADVERTISED_100baseT_Half) {
did1++; fprintf(stdout, "100baseT/Half ");
@@ -864,7 +865,7 @@ static void dump_advertised(struct ethtool_cmd *ep)
}
if (did1 && (mask & (ADVERTISED_1000baseT_Half|ADVERTISED_1000baseT_Full))) {
fprintf(stdout, "\n");
- fprintf(stdout, " ");
+ fprintf(stdout, " %*s", indent, "");
}
if (mask & ADVERTISED_1000baseT_Half) {
did1++; fprintf(stdout, "1000baseT/Half ");
@@ -874,14 +875,14 @@ static void dump_advertised(struct ethtool_cmd *ep)
}
if (did1 && (mask & ADVERTISED_2500baseX_Full)) {
fprintf(stdout, "\n");
- fprintf(stdout, " ");
+ fprintf(stdout, " %*s", indent, "");
}
if (mask & ADVERTISED_2500baseX_Full) {
did1++; fprintf(stdout, "2500baseX/Full ");
}
if (did1 && (mask & ADVERTISED_10000baseT_Full)) {
fprintf(stdout, "\n");
- fprintf(stdout, " ");
+ fprintf(stdout, " %*s", indent, "");
}
if (mask & ADVERTISED_10000baseT_Full) {
did1++; fprintf(stdout, "10000baseT/Full ");
@@ -890,7 +891,7 @@ static void dump_advertised(struct ethtool_cmd *ep)
fprintf(stdout, "Not reported");
fprintf(stdout, "\n");
- fprintf(stdout, " Advertised auto-negotiation: ");
+ fprintf(stdout, " %s auto-negotiation: ", prefix);
if (mask & ADVERTISED_Autoneg)
fprintf(stdout, "Yes\n");
else
@@ -902,7 +903,8 @@ static int dump_ecmd(struct ethtool_cmd *ep)
u32 speed;
dump_supported(ep);
- dump_advertised(ep);
+ dump_advertised(ep, "Advertised", ep->advertising);
+ dump_advertised(ep, "Link partner advertised", ep->lp_advertising);
fprintf(stdout, " Speed: ");
speed = ethtool_cmd_speed(ep);
--
Ben Hutchings, Senior Software Engineer, Solarflare Communications
Not speaking for my employer; that's the marketing department's job.
They asked us to note that Solarflare product names are trademarked.
^ permalink raw reply related [flat|nested] 6+ messages in thread* [PATCH 5/5] ethtool: Report pause auto-negotiation flags
2009-04-30 12:33 [PATCH 1/5] ethtool: Update ethtool-copy.h Ben Hutchings
` (3 preceding siblings ...)
2009-04-30 12:37 ` [PATCH 4/5] ethtool: Report link partner advertising Ben Hutchings
@ 2009-04-30 12:38 ` Ben Hutchings
4 siblings, 0 replies; 6+ messages in thread
From: Ben Hutchings @ 2009-04-30 12:38 UTC (permalink / raw)
To: Jeff Garzik; +Cc: netdev
Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
---
ethtool.c | 13 +++++++++++++
1 files changed, 13 insertions(+), 0 deletions(-)
diff --git a/ethtool.c b/ethtool.c
index 0d188af..c40603c 100644
--- a/ethtool.c
+++ b/ethtool.c
@@ -891,6 +891,19 @@ static void dump_advertised(struct ethtool_cmd *ep,
fprintf(stdout, "Not reported");
fprintf(stdout, "\n");
+ fprintf(stdout, " %s pause frame use: ", prefix);
+ if (mask & ADVERTISED_Pause) {
+ fprintf(stdout, "Symmetric");
+ if (mask & ADVERTISED_Asym_Pause)
+ fprintf(stdout, " Receive-only");
+ fprintf(stdout, "\n");
+ } else {
+ if (mask & ADVERTISED_Asym_Pause)
+ fprintf(stdout, "Transmit-only\n");
+ else
+ fprintf(stdout, "No\n");
+ }
+
fprintf(stdout, " %s auto-negotiation: ", prefix);
if (mask & ADVERTISED_Autoneg)
fprintf(stdout, "Yes\n");
--
Ben Hutchings, Senior Software Engineer, Solarflare Communications
Not speaking for my employer; that's the marketing department's job.
They asked us to note that Solarflare product names are trademarked.
^ permalink raw reply related [flat|nested] 6+ messages in thread