From b400111d07574e87799197984c47dbba7c10d9bb Mon Sep 17 00:00:00 2001 From: Alexander Duyck Date: Thu, 21 Apr 2011 13:40:20 -0700 Subject: Add support for ESP as a separate protocol from AH This change is mostly cosmetic. NIU had supported AH and ESP seperately. As such it is possible that a return value of ESP or AH may be returned for a has request instead of the AH_ESP combined value. To resolve that the inputs are combined for AH and ESP into the AH_ESP value and return values for AH and ESP will display the combined string info. Signed-off-by: Alexander Duyck --- ethtool.c | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) (limited to 'ethtool.c') diff --git a/ethtool.c b/ethtool.c index 32df0ee..cfdac65 100644 --- a/ethtool.c +++ b/ethtool.c @@ -32,7 +32,6 @@ #include #include #include -#include #include #include #include @@ -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", @@ -783,7 +782,7 @@ static int rxflow_str_to_type(const char *str) flow_type = TCP_V4_FLOW; else if (!strcmp(str, "udp4")) flow_type = UDP_V4_FLOW; - else if (!strcmp(str, "ah4")) + else if (!strcmp(str, "ah4") || !strcmp(str, "esp4")) flow_type = AH_ESP_V4_FLOW; else if (!strcmp(str, "sctp4")) flow_type = SCTP_V4_FLOW; @@ -791,7 +790,7 @@ static int rxflow_str_to_type(const char *str) flow_type = TCP_V6_FLOW; else if (!strcmp(str, "udp6")) flow_type = UDP_V6_FLOW; - else if (!strcmp(str, "ah6")) + else if (!strcmp(str, "ah6") || !strcmp(str, "esp6")) flow_type = AH_ESP_V6_FLOW; else if (!strcmp(str, "sctp6")) flow_type = SCTP_V6_FLOW; @@ -1941,7 +1940,9 @@ static int dump_rxfhash(int fhash, u64 val) fprintf(stdout, "SCTP over IPV4 flows"); break; case AH_ESP_V4_FLOW: - fprintf(stdout, "IPSEC AH over IPV4 flows"); + case AH_V4_FLOW: + case ESP_V4_FLOW: + fprintf(stdout, "IPSEC AH/ESP over IPV4 flows"); break; case TCP_V6_FLOW: fprintf(stdout, "TCP over IPV6 flows"); @@ -1953,7 +1954,9 @@ static int dump_rxfhash(int fhash, u64 val) fprintf(stdout, "SCTP over IPV6 flows"); break; case AH_ESP_V6_FLOW: - fprintf(stdout, "IPSEC AH over IPV6 flows"); + case AH_V6_FLOW: + case ESP_V6_FLOW: + fprintf(stdout, "IPSEC AH/ESP over IPV6 flows"); break; default: break; -- cgit v1.2.1