From: Victor Julien <vic...@inliniac.net> Add 'x' flag for setting a symmetric hash option.
The Intel X(L)710 supports symmetric RSS hashing. See "7.1.9.3 Symmetric hash" in the "IntelĀ® Ethernet Controller XL710 Datasheet". Set: # ethtool -N $DEV rx-flow-hash tcp4 sdfnx Get: # ethtool -n ens2f1 rx-flow-hash tcp4 TCP over IPV4 flows use these fields for computing Hash flow key: IP SA IP DA L4 bytes 0 & 1 [TCP/UDP src port] L4 bytes 2 & 3 [TCP/UDP dst port] Symmetric RSS hash --- ethtool-copy.h | 1 + ethtool.c | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/ethtool-copy.h b/ethtool-copy.h index 7c581ea..38ccf8c 100644 --- a/ethtool-copy.h +++ b/ethtool-copy.h @@ -1557,6 +1557,7 @@ static __inline__ int ethtool_validate_duplex(__u8 duplex) #define RXH_IP_DST (1 << 5) #define RXH_L4_B_0_1 (1 << 6) /* src port in case of TCP/UDP/SCTP */ #define RXH_L4_B_2_3 (1 << 7) /* dst port in case of TCP/UDP/SCTP */ +#define RXH_RSS_SYM (1 << 8) /* symmetric RSS */ #define RXH_DISCARD (1 << 31) #define RX_CLS_FLOW_DISC 0xffffffffffffffffULL diff --git a/ethtool.c b/ethtool.c index 4aa4762..9bc3677 100644 --- a/ethtool.c +++ b/ethtool.c @@ -939,6 +939,9 @@ static int parse_rxfhashopts(char *optstr, u32 *data) case 'n': *data |= RXH_L4_B_2_3; break; + case 'x': + *data |= RXH_RSS_SYM; + break; case 'r': *data |= RXH_DISCARD; break; @@ -978,6 +981,9 @@ static char *unparse_rxfhashopts(u64 opts) if (opts & RXH_L4_B_2_3) { strcat(buf, "L4 bytes 2 & 3 [TCP/UDP dst port]\n"); } + if (opts & RXH_RSS_SYM) { + strcat(buf, "Symmetric RSS hash\n"); + } } else { sprintf(buf, "None"); } -- 2.7.4 ------------------------------------------------------------------------------ Attend Shape: An AT&T Tech Expo July 15-16. Meet us at AT&T Park in San Francisco, CA to explore cutting-edge tech and listen to tech luminaries present their vision of the future. This family event has something for everyone, including kids. Get more information and register today. http://sdm.link/attshape _______________________________________________ E1000-devel mailing list E1000-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/e1000-devel To learn more about Intel® Ethernet, visit http://communities.intel.com/community/wired