patches for DPDK stable branches
 help / color / mirror / Atom feed
* [dpdk-stable] [PATCH] net/ice: fix default RSS key configuration
@ 2020-07-21  9:02 Xiao Wang
  2020-07-22  5:25 ` Zhang, Qi Z
  0 siblings, 1 reply; 3+ messages in thread
From: Xiao Wang @ 2020-07-21  9:02 UTC (permalink / raw)
  To: qi.z.zhang; +Cc: dev, qiming.yang, lei.a.yao, jingjing.wu, Xiao Wang, stable

There's chance that rte_rand() doesn't provision suitable values for
RSS hash, an extreme example could be a key with a lot of 0s in it.

This patch adds a default RSS key which has been used in ixgbe driver
and fm10k driver.

Fixes: 50370662b727 ("net/ice: support device and queue ops")
Cc: stable@dpdk.org

Signed-off-by: Xiao Wang <xiao.w.wang@intel.com>
---
 drivers/net/ice/ice_ethdev.c | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/drivers/net/ice/ice_ethdev.c b/drivers/net/ice/ice_ethdev.c
index 3534d18..74d37c7 100644
--- a/drivers/net/ice/ice_ethdev.c
+++ b/drivers/net/ice/ice_ethdev.c
@@ -2628,11 +2628,20 @@ static int ice_init_rss(struct ice_pf *pf)
 		vsi->rss_lut = rte_zmalloc(NULL,
 					   vsi->rss_lut_size, 0);
 
+#define RSS_KEY_SIZE ICE_AQC_GET_SET_RSS_KEY_DATA_RSS_KEY_SIZE
+	static uint8_t rss_intel_key[RSS_KEY_SIZE] = {
+		0x6D, 0x5A, 0x56, 0xDA, 0x25, 0x5B, 0x0E, 0xC2,
+		0x41, 0x67, 0x25, 0x3D, 0x43, 0xA3, 0x8F, 0xB0,
+		0xD0, 0xCA, 0x2B, 0xCB, 0xAE, 0x7B, 0x30, 0xB4,
+		0x77, 0xCB, 0x2D, 0xA3, 0x80, 0x30, 0xF2, 0x0C,
+		0x6A, 0x42, 0xB7, 0x3B, 0xBE, 0xAC, 0x01, 0xFA,
+	};
+
 	/* configure RSS key */
 	if (!rss_conf->rss_key) {
 		/* Calculate the default hash key */
 		for (i = 0; i <= vsi->rss_key_size; i++)
-			vsi->rss_key[i] = (uint8_t)rte_rand();
+			vsi->rss_key[i] = rss_intel_key[i];
 	} else {
 		rte_memcpy(vsi->rss_key, rss_conf->rss_key,
 			   RTE_MIN(rss_conf->rss_key_len,
-- 
1.8.3.1


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [dpdk-stable] [PATCH] net/ice: fix default RSS key configuration
  2020-07-21  9:02 [dpdk-stable] [PATCH] net/ice: fix default RSS key configuration Xiao Wang
@ 2020-07-22  5:25 ` Zhang, Qi Z
  2020-07-23 10:25   ` Zhang, Qi Z
  0 siblings, 1 reply; 3+ messages in thread
From: Zhang, Qi Z @ 2020-07-22  5:25 UTC (permalink / raw)
  To: Wang, Xiao W; +Cc: dev, Yang, Qiming, Yao, Lei A, Wu, Jingjing, stable



> -----Original Message-----
> From: Wang, Xiao W <xiao.w.wang@intel.com>
> Sent: Tuesday, July 21, 2020 5:03 PM
> To: Zhang, Qi Z <qi.z.zhang@intel.com>
> Cc: dev@dpdk.org; Yang, Qiming <qiming.yang@intel.com>; Yao, Lei A
> <lei.a.yao@intel.com>; Wu, Jingjing <jingjing.wu@intel.com>; Wang, Xiao W
> <xiao.w.wang@intel.com>; stable@dpdk.org
> Subject: [PATCH] net/ice: fix default RSS key configuration
> 
> There's chance that rte_rand() doesn't provision suitable values for RSS hash, an
> extreme example could be a key with a lot of 0s in it.
> 
> This patch adds a default RSS key which has been used in ixgbe driver and fm10k
> driver.
> 
> Fixes: 50370662b727 ("net/ice: support device and queue ops")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Xiao Wang <xiao.w.wang@intel.com>

Acked-by: Qi Zhang <qi.z.zhang@intel.com>

Applied to dpdk-next-net-intel.

Thanks
Qi

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [dpdk-stable] [PATCH] net/ice: fix default RSS key configuration
  2020-07-22  5:25 ` Zhang, Qi Z
@ 2020-07-23 10:25   ` Zhang, Qi Z
  0 siblings, 0 replies; 3+ messages in thread
From: Zhang, Qi Z @ 2020-07-23 10:25 UTC (permalink / raw)
  To: Wang, Xiao W; +Cc: dev, Yang, Qiming, Yao, Lei A, Wu, Jingjing, stable



> -----Original Message-----
> From: Zhang, Qi Z
> Sent: Wednesday, July 22, 2020 1:26 PM
> To: Wang, Xiao W <xiao.w.wang@intel.com>
> Cc: dev@dpdk.org; Yang, Qiming <qiming.yang@intel.com>; Yao, Lei A
> <lei.a.yao@intel.com>; Wu, Jingjing <jingjing.wu@intel.com>; stable@dpdk.org
> Subject: RE: [PATCH] net/ice: fix default RSS key configuration
> 
> 
> 
> > -----Original Message-----
> > From: Wang, Xiao W <xiao.w.wang@intel.com>
> > Sent: Tuesday, July 21, 2020 5:03 PM
> > To: Zhang, Qi Z <qi.z.zhang@intel.com>
> > Cc: dev@dpdk.org; Yang, Qiming <qiming.yang@intel.com>; Yao, Lei A
> > <lei.a.yao@intel.com>; Wu, Jingjing <jingjing.wu@intel.com>; Wang,
> > Xiao W <xiao.w.wang@intel.com>; stable@dpdk.org
> > Subject: [PATCH] net/ice: fix default RSS key configuration
> >
> > There's chance that rte_rand() doesn't provision suitable values for
> > RSS hash, an extreme example could be a key with a lot of 0s in it.
> >
> > This patch adds a default RSS key which has been used in ixgbe driver
> > and fm10k driver.
> >
> > Fixes: 50370662b727 ("net/ice: support device and queue ops")
> > Cc: stable@dpdk.org
> >
> > Signed-off-by: Xiao Wang <xiao.w.wang@intel.com>
> 
> Acked-by: Qi Zhang <qi.z.zhang@intel.com>
> 
> Applied to dpdk-next-net-intel.

After some internal discussion, we decide to keep the random key as default, and user can use rte_eth_dev_rss_hash_update to update a new key.
So the patch has been removed from dpdk-next-net-intel.


> 
> Thanks
> Qi

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-07-23 10:25 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-21  9:02 [dpdk-stable] [PATCH] net/ice: fix default RSS key configuration Xiao Wang
2020-07-22  5:25 ` Zhang, Qi Z
2020-07-23 10:25   ` Zhang, Qi Z

patches for DPDK stable branches

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://inbox.dpdk.org/stable/0 stable/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 stable stable/ https://inbox.dpdk.org/stable \
		stable@dpdk.org
	public-inbox-index stable

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://inbox.dpdk.org/inbox.dpdk.stable


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git