Skip to content

Commit 227686b

Browse files
Ioana Radulescugregkh
authored andcommitted
staging: fsl-dpaa2/eth: Update default hash key
In our documentation, we claim to use a 5-tuple key for Rx hash distribution of flows. The code however configures a key composed of all supported header fields. Update the Rx hash key to contain only the documented fields: {IP src, IP dst, IP nextproto, L4 src, L4 dst}, which was the original intention and makes most sense as a default. Signed-off-by: Ioana Radulescu <ruxandra.radulescu@nxp.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent ff5c379 commit 227686b

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2195,10 +2195,10 @@ static int bind_dpni(struct dpaa2_eth_priv *priv)
21952195
return err;
21962196
}
21972197

2198-
/* have the interface implicitly distribute traffic based on supported
2199-
* header fields
2198+
/* have the interface implicitly distribute traffic based on
2199+
* the default hash key
22002200
*/
2201-
err = dpaa2_eth_set_hash(net_dev, DPAA2_RXH_SUPPORTED);
2201+
err = dpaa2_eth_set_hash(net_dev, DPAA2_RXH_DEFAULT);
22022202
if (err)
22032203
dev_err(dev, "Failed to configure hashing\n");
22042204

drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.h

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -377,11 +377,14 @@ struct dpaa2_eth_priv {
377377
u64 rx_hash_fields;
378378
};
379379

380-
/* default Rx hash options, set during probing */
381380
#define DPAA2_RXH_SUPPORTED (RXH_L2DA | RXH_VLAN | RXH_L3_PROTO \
382381
| RXH_IP_SRC | RXH_IP_DST | RXH_L4_B_0_1 \
383382
| RXH_L4_B_2_3)
384383

384+
/* default Rx hash options, set during probing */
385+
#define DPAA2_RXH_DEFAULT (RXH_L3_PROTO | RXH_IP_SRC | RXH_IP_DST | \
386+
RXH_L4_B_0_1 | RXH_L4_B_2_3)
387+
385388
#define dpaa2_eth_hash_enabled(priv) \
386389
((priv)->dpni_attrs.num_queues > 1)
387390

0 commit comments

Comments
 (0)