2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2025-01-14 00:24:15 +08:00

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>
This commit is contained in:
Ioana Radulescu 2018-07-27 09:12:59 -05:00 committed by Greg Kroah-Hartman
parent ff5c37987b
commit 227686b652
2 changed files with 7 additions and 4 deletions

View File

@ -2195,10 +2195,10 @@ static int bind_dpni(struct dpaa2_eth_priv *priv)
return err;
}
/* have the interface implicitly distribute traffic based on supported
* header fields
/* have the interface implicitly distribute traffic based on
* the default hash key
*/
err = dpaa2_eth_set_hash(net_dev, DPAA2_RXH_SUPPORTED);
err = dpaa2_eth_set_hash(net_dev, DPAA2_RXH_DEFAULT);
if (err)
dev_err(dev, "Failed to configure hashing\n");

View File

@ -377,11 +377,14 @@ struct dpaa2_eth_priv {
u64 rx_hash_fields;
};
/* default Rx hash options, set during probing */
#define DPAA2_RXH_SUPPORTED (RXH_L2DA | RXH_VLAN | RXH_L3_PROTO \
| RXH_IP_SRC | RXH_IP_DST | RXH_L4_B_0_1 \
| RXH_L4_B_2_3)
/* default Rx hash options, set during probing */
#define DPAA2_RXH_DEFAULT (RXH_L3_PROTO | RXH_IP_SRC | RXH_IP_DST | \
RXH_L4_B_0_1 | RXH_L4_B_2_3)
#define dpaa2_eth_hash_enabled(priv) \
((priv)->dpni_attrs.num_queues > 1)