@@ -358,7 +358,7 @@ ethtool \- query or control network driver and hardware settings
.RB ...\ | \ default \ ]
.RB [ hfunc
.IR FUNC ]
-.B2 xfrm symmetric-xor none
+.B3 xfrm symmetric-xor symmetric-or-xor none
.RB [ context
.I CTX
.RB |\ new ]
@@ -1253,15 +1253,15 @@ List of RSS hash functions which kernel supports is shown as a part of the --sho
.TP
.BI xfrm
Sets the RSS input transformation. Currently, only the
-.B symmetric-xor
-transformation is supported where the NIC XORs the L3 and/or L4 source and
-destination fields (as selected by
+.B symmetric-xor and symmetric-or-xor
+transformations are supported where the NIC XORs/ORs the L3 and/or L4 source
+and destination fields (as selected by
.B --config-nfc rx-flow-hash
) before passing them to the hash algorithm. The RSS hash function will
then yield the same hash for the other flow direction where the source and
-destination fields are swapped (i.e. Symmetric RSS). Note that XORing the
-input parameters reduces the entropy of the input set and the hash algorithm
-could potentially be exploited. Switch off (default) by
+destination fields are swapped (i.e. Symmetric RSS). Note that this operation
+reduces the entropy of the input set and the hash algorithm could potentially
+be exploited. Switch off (default) by
.B xfrm none.
.TP
.BI start\ N
@@ -4119,6 +4119,9 @@ static int do_grxfh(struct cmd_context *ctx)
printf(" symmetric-xor: %s\n",
(rss->input_xfrm & RXH_XFRM_SYM_XOR) ? "on" : "off");
rss->input_xfrm &= ~RXH_XFRM_SYM_XOR;
+ printf(" symmetric-or-xor: %s\n",
+ (rss->input_xfrm & RXH_XFRM_SYM_OR_XOR) ? "on" : "off");
+ rss->input_xfrm &= ~RXH_XFRM_SYM_OR_XOR;
if (rss->input_xfrm)
printf(" Unknown bits in RSS input transformation: 0x%x\n",
@@ -4291,6 +4294,8 @@ static int do_srxfh(struct cmd_context *ctx)
exit_bad_args();
if (!strcmp(ctx->argp[arg_num], "symmetric-xor"))
req_input_xfrm = RXH_XFRM_SYM_XOR;
+ else if (!strcmp(ctx->argp[arg_num], "symmetric-or-xor"))
+ req_input_xfrm = RXH_XFRM_SYM_OR_XOR;
else if (!strcmp(ctx->argp[arg_num], "none"))
req_input_xfrm = 0;
else
@@ -6001,7 +6006,7 @@ static const struct option args[] = {
" [ equal N | weight W0 W1 ... | default ]\n"
" [ hkey %x:%x:%x:%x:%x:.... ]\n"
" [ hfunc FUNC ]\n"
- " [ xfrm symmetric-xor|none ]\n"
+ " [ xfrm symmetric-xor | symmetric-or-xor | none ]\n"
" [ delete ]\n"
},
{
@@ -58,7 +58,9 @@ void dump_json_rss_info(struct cmd_context *ctx, u32 *indir_table,
open_json_object("rss-input-transformation");
print_bool(PRINT_JSON, "symmetric-xor", NULL,
(input_xfrm & RXH_XFRM_SYM_XOR) ? true : false);
- if (input_xfrm & ~RXH_XFRM_SYM_XOR)
+ print_bool(PRINT_JSON, "symmetric-or-xor", NULL,
+ (input_xfrm & RXH_XFRM_SYM_OR_XOR) ? true : false);
+ if (input_xfrm & ~(RXH_XFRM_SYM_XOR | RXH_XFRM_SYM_OR_XOR))
print_uint(PRINT_JSON, "raw", NULL, input_xfrm);
close_json_object();
@@ -177,6 +179,9 @@ int rss_reply_cb(const struct nlmsghdr *nlhdr, void *data)
printf(" symmetric-xor: %s\n",
(input_xfrm & RXH_XFRM_SYM_XOR) ? "on" : "off");
input_xfrm &= ~RXH_XFRM_SYM_XOR;
+ printf(" symmetric-or-xor: %s\n",
+ (input_xfrm & RXH_XFRM_SYM_OR_XOR) ? "on" : "off");
+ input_xfrm &= ~RXH_XFRM_SYM_OR_XOR;
if (input_xfrm)
printf(" Unknown bits in RSS input transformation: 0x%x\n", input_xfrm);