* [ethtool PATCH 0/2] Minor ethtool cleanups
@ 2011-04-08 22:12 Alexander Duyck
2011-04-08 22:12 ` [ethtool PATCH 1/2] ethtool: fix manpage so that it will display tables again Alexander Duyck
2011-04-08 22:12 ` [ethtool PATCH 2/2] Add support for ESP as a separate protocol from AH Alexander Duyck
0 siblings, 2 replies; 5+ messages in thread
From: Alexander Duyck @ 2011-04-08 22:12 UTC (permalink / raw)
To: jeffrey.t.kirsher, bhutchings; +Cc: netdev
These changes address a few minor issues I noticed in ethtool.
---
Alexander Duyck (2):
Add support for ESP as a separate protocol from AH
ethtool: fix manpage so that it will display tables again
ethtool.8.in | 18 ++++++++++--------
ethtool.c | 21 ++++++++++++++++-----
2 files changed, 26 insertions(+), 13 deletions(-)
--
^ permalink raw reply [flat|nested] 5+ messages in thread
* [ethtool PATCH 1/2] ethtool: fix manpage so that it will display tables again
2011-04-08 22:12 [ethtool PATCH 0/2] Minor ethtool cleanups Alexander Duyck
@ 2011-04-08 22:12 ` Alexander Duyck
2011-04-08 22:45 ` Ben Hutchings
2011-04-08 22:12 ` [ethtool PATCH 2/2] Add support for ESP as a separate protocol from AH Alexander Duyck
1 sibling, 1 reply; 5+ messages in thread
From: Alexander Duyck @ 2011-04-08 22:12 UTC (permalink / raw)
To: jeffrey.t.kirsher, bhutchings; +Cc: netdev
The current ethtool manpage is not displaying tables. After trying to pass
the manpage through tbl I repeatedly saw the error:
tbl:ethtool.8.in:707: unrecognised format `x'
tbl:ethtool.8.in:707: giving up on this table
By dropping the 'x' the errors went away and when I built the manpage the
tables reappeared so I am assuming this is the correct approach.
Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
---
ethtool.8.in | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/ethtool.8.in b/ethtool.8.in
index ed24d4c..714486e 100644
--- a/ethtool.8.in
+++ b/ethtool.8.in
@@ -540,7 +540,7 @@ names the type of message to enable or disable; \fIN\fR specifies the
new flags numerically. The defined type names and numbers are:
.TS
nokeep;
-lB l lx.
+lB l l.
drv 0x0001 General driver status
probe 0x0002 Hardware probing
link 0x0004 Link state
@@ -569,7 +569,7 @@ Retrieves the receive network flow classification configurations.
Retrieves the hash options for the specified network traffic type.
.TS
nokeep;
-lB lx.
+lB l.
tcp4 TCP over IPv4
udp4 UDP over IPv4
ah4 IPSEC AH/ESP over IPv4
@@ -587,7 +587,7 @@ Configures the receive network flow classification.
Configures the hash options for the specified network traffic type.
.TS
nokeep;
-lB lx.
+lB l.
m Hash on the Layer 2 destination address of the rx packet.
v Hash on the VLAN tag of the rx packet.
t Hash on the Layer 3 protocol field of the rx packet.
@@ -637,7 +637,7 @@ Configure Rx ntuple filters and actions
.B flow\-type tcp4|udp4|sctp4|ether
.TS
nokeep;
-lB lx.
+lB l.
tcp4 TCP over IPv4
udp4 UDP over IPv4
sctp4 SCTP over IPv4
@@ -704,7 +704,7 @@ Specify a mask for the user-specific data.
Specifies the Rx queue to send packets to, or some other action.
.TS
nokeep;
-lB lx.
+lB l.
-2 Clear the filter
-1 Drop the matched flow
0 or higher Rx queue to route the flow
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [ethtool PATCH 2/2] Add support for ESP as a separate protocol from AH
2011-04-08 22:12 [ethtool PATCH 0/2] Minor ethtool cleanups Alexander Duyck
2011-04-08 22:12 ` [ethtool PATCH 1/2] ethtool: fix manpage so that it will display tables again Alexander Duyck
@ 2011-04-08 22:12 ` Alexander Duyck
2011-04-08 23:10 ` Ben Hutchings
1 sibling, 1 reply; 5+ messages in thread
From: Alexander Duyck @ 2011-04-08 22:12 UTC (permalink / raw)
To: jeffrey.t.kirsher, bhutchings; +Cc: netdev
This change is meant to split out ESP from AH. Currently they are present
as both a combined value, and two separate values. In order to try and
support eventually splitting the two out into separate values this change
makes it so that ESP can be called out separately in ethtool.
Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
---
ethtool.8.in | 8 +++++---
ethtool.c | 21 ++++++++++++++++-----
2 files changed, 21 insertions(+), 8 deletions(-)
diff --git a/ethtool.8.in b/ethtool.8.in
index 714486e..12a1d1d 100644
--- a/ethtool.8.in
+++ b/ethtool.8.in
@@ -52,7 +52,7 @@
.\"
.\" \(*FL - flow type values
.\"
-.ds FL \fBtcp4\fP|\fBudp4\fP|\fBah4\fP|\fBsctp4\fP|\fBtcp6\fP|\fBudp6\fP|\fBah6\fP|\fBsctp6\fP
+.ds FL \fBtcp4\fP|\fBudp4\fP|\fBah4\fP|\fBesp4\fP|\fBsctp4\fP|\fBtcp6\fP|\fBudp6\fP|\fBah6\fP|\fBesp6\fP|\fBsctp6\fP
.\"
.\" \(*HO - hash options
.\"
@@ -572,11 +572,13 @@ nokeep;
lB l.
tcp4 TCP over IPv4
udp4 UDP over IPv4
-ah4 IPSEC AH/ESP over IPv4
+ah4 IPSEC AH over IPv4
+esp4 IPSEC ESP over IPv4
sctp4 SCTP over IPv4
tcp6 TCP over IPv6
udp6 UDP over IPv6
-ah6 IPSEC AH/ESP over IPv6
+ah6 IPSEC AH over IPv6
+esp6 IPSEC ESP over IPv6
sctp6 SCTP over IPv6
.TE
.TP
diff --git a/ethtool.c b/ethtool.c
index 32df0ee..1ebf562 100644
--- a/ethtool.c
+++ b/ethtool.c
@@ -32,7 +32,6 @@
#include <sys/ioctl.h>
#include <sys/stat.h>
#include <stdio.h>
-#include <string.h>
#include <errno.h>
#include <net/if.h>
#include <sys/utsname.h>
@@ -233,15 +232,15 @@ static struct option {
{ "-S", "--statistics", MODE_GSTATS, "Show adapter statistics" },
{ "-n", "--show-nfc", MODE_GNFC, "Show Rx network flow classification "
"options",
- " [ rx-flow-hash tcp4|udp4|ah4|sctp4|"
- "tcp6|udp6|ah6|sctp6 ]\n" },
+ " [ rx-flow-hash tcp4|udp4|ah4|esp4|sctp4|"
+ "tcp6|udp6|ah6|esp6|sctp6 ]\n" },
{ "-f", "--flash", MODE_FLASHDEV, "FILENAME " "Flash firmware image "
"from the specified file to a region on the device",
" [ REGION-NUMBER-TO-FLASH ]\n" },
{ "-N", "--config-nfc", MODE_SNFC, "Configure Rx network flow "
"classification options",
- " [ rx-flow-hash tcp4|udp4|ah4|sctp4|"
- "tcp6|udp6|ah6|sctp6 m|v|t|s|d|f|n|r... ]\n" },
+ " [ rx-flow-hash tcp4|udp4|ah4|esp4|sctp4|"
+ "tcp6|udp6|ah6|esp6|sctp6 m|v|t|s|d|f|n|r... ]\n" },
{ "-x", "--show-rxfh-indir", MODE_GRXFHINDIR, "Show Rx flow hash "
"indirection" },
{ "-X", "--set-rxfh-indir", MODE_SRXFHINDIR, "Set Rx flow hash indirection",
@@ -785,6 +784,8 @@ static int rxflow_str_to_type(const char *str)
flow_type = UDP_V4_FLOW;
else if (!strcmp(str, "ah4"))
flow_type = AH_ESP_V4_FLOW;
+ else if (!strcmp(str, "esp4"))
+ flow_type = ESP_V4_FLOW;
else if (!strcmp(str, "sctp4"))
flow_type = SCTP_V4_FLOW;
else if (!strcmp(str, "tcp6"))
@@ -793,6 +794,8 @@ static int rxflow_str_to_type(const char *str)
flow_type = UDP_V6_FLOW;
else if (!strcmp(str, "ah6"))
flow_type = AH_ESP_V6_FLOW;
+ else if (!strcmp(str, "esp6"))
+ flow_type = ESP_V6_FLOW;
else if (!strcmp(str, "sctp6"))
flow_type = SCTP_V6_FLOW;
else if (!strcmp(str, "ether"))
@@ -1941,8 +1944,12 @@ static int dump_rxfhash(int fhash, u64 val)
fprintf(stdout, "SCTP over IPV4 flows");
break;
case AH_ESP_V4_FLOW:
+ case AH_V4_FLOW:
fprintf(stdout, "IPSEC AH over IPV4 flows");
break;
+ case ESP_V4_FLOW:
+ fprintf(stdout, "IPSEC ESP over IPV4 flows");
+ break;
case TCP_V6_FLOW:
fprintf(stdout, "TCP over IPV6 flows");
break;
@@ -1953,8 +1960,12 @@ static int dump_rxfhash(int fhash, u64 val)
fprintf(stdout, "SCTP over IPV6 flows");
break;
case AH_ESP_V6_FLOW:
+ case AH_V6_FLOW:
fprintf(stdout, "IPSEC AH over IPV6 flows");
break;
+ case ESP_V6_FLOW:
+ fprintf(stdout, "IPSEC ESP over IPV6 flows");
+ break;
default:
break;
}
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [ethtool PATCH 1/2] ethtool: fix manpage so that it will display tables again
2011-04-08 22:12 ` [ethtool PATCH 1/2] ethtool: fix manpage so that it will display tables again Alexander Duyck
@ 2011-04-08 22:45 ` Ben Hutchings
0 siblings, 0 replies; 5+ messages in thread
From: Ben Hutchings @ 2011-04-08 22:45 UTC (permalink / raw)
To: Alexander Duyck; +Cc: jeffrey.t.kirsher, netdev
On Fri, 2011-04-08 at 15:12 -0700, Alexander Duyck wrote:
> The current ethtool manpage is not displaying tables. After trying to pass
> the manpage through tbl I repeatedly saw the error:
> tbl:ethtool.8.in:707: unrecognised format `x'
> tbl:ethtool.8.in:707: giving up on this table
>
> By dropping the 'x' the errors went away and when I built the manpage the
> tables reappeared so I am assuming this is the correct approach.
[...]
I think this must depend somewhat on the version of tbl. I must admit I
haven't yet tested with a range of versions.
In groff 1.20.1, the 'x' column flag requested an 'expanded' column
which will be as wide as possible (after allowing for the other column
contents) with its contents word-wrapped if necessary. Without this
flag, tbl wraps some columns poorly and complains about some tables
being too wide (though I don't think they are). Clearly that is less
bad than having it discard the tables altogether, so I will apply this.
Ben.
--
Ben Hutchings, Senior Software Engineer, Solarflare
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] 5+ messages in thread
* Re: [ethtool PATCH 2/2] Add support for ESP as a separate protocol from AH
2011-04-08 22:12 ` [ethtool PATCH 2/2] Add support for ESP as a separate protocol from AH Alexander Duyck
@ 2011-04-08 23:10 ` Ben Hutchings
0 siblings, 0 replies; 5+ messages in thread
From: Ben Hutchings @ 2011-04-08 23:10 UTC (permalink / raw)
To: Alexander Duyck; +Cc: jeffrey.t.kirsher, netdev
On Fri, 2011-04-08 at 15:12 -0700, Alexander Duyck wrote:
> This change is meant to split out ESP from AH. Currently they are present
> as both a combined value, and two separate values. In order to try and
> support eventually splitting the two out into separate values this change
> makes it so that ESP can be called out separately in ethtool.
[...]
The split between AH and ESP flows is one of several backward-
incompatible changes that Santwona made to RXNFC when adding flow
steering (originally it just dealt with hashing).
1. cxgb4, sfc and earlier versions of niu recognise AH_ESP_V{4,6}_FLOW
class codes for reporting of flow hashing. niu also allowed it to be
controlled.
2. Later versions of niu recognise the separate AH and ESP flow class
codes. gianfar also recognises them, but silently ignores any attempt
to control them!
We should make niu accept AH_ESP_V{4,6}_FLOW again for reporting and
control of flow hashing. ethtool should use class codes
{AH,ESP}_V{4,6}_FLOW for flow steering, but not for flow hashing.
Ben.
--
Ben Hutchings, Senior Software Engineer, Solarflare
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] 5+ messages in thread
end of thread, other threads:[~2011-04-08 23:10 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-04-08 22:12 [ethtool PATCH 0/2] Minor ethtool cleanups Alexander Duyck
2011-04-08 22:12 ` [ethtool PATCH 1/2] ethtool: fix manpage so that it will display tables again Alexander Duyck
2011-04-08 22:45 ` Ben Hutchings
2011-04-08 22:12 ` [ethtool PATCH 2/2] Add support for ESP as a separate protocol from AH Alexander Duyck
2011-04-08 23:10 ` Ben Hutchings
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).