patches for DPDK stable branches
 help / color / mirror / Atom feed
* [dpdk-stable] [PATCH v1] net/iavf: fix RSS key access out of index
@ 2021-05-19  7:59 Haiyue Wang
  2021-05-20  1:23 ` Xing, Beilei
  0 siblings, 1 reply; 3+ messages in thread
From: Haiyue Wang @ 2021-05-19  7:59 UTC (permalink / raw)
  To: dev; +Cc: qi.z.zhang, Haiyue Wang, stable, Jingjing Wu, Beilei Xing

The array rss_key has size 'vf->vf_res->rss_key_size', the array index
should be less than that.

Cc: stable@dpdk.org
Fixes: 69dd4c3d0898 ("net/avf: enable queue and device")

Signed-off-by: Haiyue Wang <haiyue.wang@intel.com>
---
 drivers/net/iavf/iavf_ethdev.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/iavf/iavf_ethdev.c b/drivers/net/iavf/iavf_ethdev.c
index d688c31cfb..cb38fe81e1 100644
--- a/drivers/net/iavf/iavf_ethdev.c
+++ b/drivers/net/iavf/iavf_ethdev.c
@@ -366,7 +366,7 @@ iavf_init_rss(struct iavf_adapter *adapter)
 	/* configure RSS key */
 	if (!rss_conf->rss_key) {
 		/* Calculate the default hash key */
-		for (i = 0; i <= vf->vf_res->rss_key_size; i++)
+		for (i = 0; i < vf->vf_res->rss_key_size; i++)
 			vf->rss_key[i] = (uint8_t)rte_rand();
 	} else
 		rte_memcpy(vf->rss_key, rss_conf->rss_key,
-- 
2.31.1


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

* Re: [dpdk-stable] [PATCH v1] net/iavf: fix RSS key access out of index
  2021-05-19  7:59 [dpdk-stable] [PATCH v1] net/iavf: fix RSS key access out of index Haiyue Wang
@ 2021-05-20  1:23 ` Xing, Beilei
  2021-05-27  9:51   ` Zhang, Qi Z
  0 siblings, 1 reply; 3+ messages in thread
From: Xing, Beilei @ 2021-05-20  1:23 UTC (permalink / raw)
  To: Wang, Haiyue, dev; +Cc: Zhang, Qi Z, stable, Wu, Jingjing



> -----Original Message-----
> From: Wang, Haiyue <haiyue.wang@intel.com>
> Sent: Wednesday, May 19, 2021 4:00 PM
> To: dev@dpdk.org
> Cc: Zhang, Qi Z <qi.z.zhang@intel.com>; Wang, Haiyue
> <haiyue.wang@intel.com>; stable@dpdk.org; Wu, Jingjing
> <jingjing.wu@intel.com>; Xing, Beilei <beilei.xing@intel.com>
> Subject: [PATCH v1] net/iavf: fix RSS key access out of index
> 
> The array rss_key has size 'vf->vf_res->rss_key_size', the array index should
> be less than that.
> 
> Cc: stable@dpdk.org
> Fixes: 69dd4c3d0898 ("net/avf: enable queue and device")
> 
> Signed-off-by: Haiyue Wang <haiyue.wang@intel.com>
> ---
>  drivers/net/iavf/iavf_ethdev.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/net/iavf/iavf_ethdev.c b/drivers/net/iavf/iavf_ethdev.c
> index d688c31cfb..cb38fe81e1 100644
> --- a/drivers/net/iavf/iavf_ethdev.c
> +++ b/drivers/net/iavf/iavf_ethdev.c
> @@ -366,7 +366,7 @@ iavf_init_rss(struct iavf_adapter *adapter)
>  	/* configure RSS key */
>  	if (!rss_conf->rss_key) {
>  		/* Calculate the default hash key */
> -		for (i = 0; i <= vf->vf_res->rss_key_size; i++)
> +		for (i = 0; i < vf->vf_res->rss_key_size; i++)
>  			vf->rss_key[i] = (uint8_t)rte_rand();
>  	} else
>  		rte_memcpy(vf->rss_key, rss_conf->rss_key,
> --
> 2.31.1

Acked-by: Beilei Xing <beilei.xing@intel.com>

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

* Re: [dpdk-stable] [PATCH v1] net/iavf: fix RSS key access out of index
  2021-05-20  1:23 ` Xing, Beilei
@ 2021-05-27  9:51   ` Zhang, Qi Z
  0 siblings, 0 replies; 3+ messages in thread
From: Zhang, Qi Z @ 2021-05-27  9:51 UTC (permalink / raw)
  To: Xing, Beilei, Wang, Haiyue, dev; +Cc: stable, Wu, Jingjing



> -----Original Message-----
> From: Xing, Beilei <beilei.xing@intel.com>
> Sent: Thursday, May 20, 2021 9:24 AM
> To: Wang, Haiyue <haiyue.wang@intel.com>; dev@dpdk.org
> Cc: Zhang, Qi Z <qi.z.zhang@intel.com>; stable@dpdk.org; Wu, Jingjing
> <jingjing.wu@intel.com>
> Subject: RE: [PATCH v1] net/iavf: fix RSS key access out of index
> 
> 
> 
> > -----Original Message-----
> > From: Wang, Haiyue <haiyue.wang@intel.com>
> > Sent: Wednesday, May 19, 2021 4:00 PM
> > To: dev@dpdk.org
> > Cc: Zhang, Qi Z <qi.z.zhang@intel.com>; Wang, Haiyue
> > <haiyue.wang@intel.com>; stable@dpdk.org; Wu, Jingjing
> > <jingjing.wu@intel.com>; Xing, Beilei <beilei.xing@intel.com>
> > Subject: [PATCH v1] net/iavf: fix RSS key access out of index
> >
> > The array rss_key has size 'vf->vf_res->rss_key_size', the array index
> > should be less than that.
> >
> > Cc: stable@dpdk.org
> > Fixes: 69dd4c3d0898 ("net/avf: enable queue and device")
> >
> > Signed-off-by: Haiyue Wang <haiyue.wang@intel.com>
> > ---
> >  drivers/net/iavf/iavf_ethdev.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/net/iavf/iavf_ethdev.c
> > b/drivers/net/iavf/iavf_ethdev.c index d688c31cfb..cb38fe81e1 100644
> > --- a/drivers/net/iavf/iavf_ethdev.c
> > +++ b/drivers/net/iavf/iavf_ethdev.c
> > @@ -366,7 +366,7 @@ iavf_init_rss(struct iavf_adapter *adapter)
> >  	/* configure RSS key */
> >  	if (!rss_conf->rss_key) {
> >  		/* Calculate the default hash key */
> > -		for (i = 0; i <= vf->vf_res->rss_key_size; i++)
> > +		for (i = 0; i < vf->vf_res->rss_key_size; i++)
> >  			vf->rss_key[i] = (uint8_t)rte_rand();
> >  	} else
> >  		rte_memcpy(vf->rss_key, rss_conf->rss_key,
> > --
> > 2.31.1
> 
> Acked-by: Beilei Xing <beilei.xing@intel.com>

Applied to dpdk-next-net-intel.

Thanks
Qi


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

end of thread, other threads:[~2021-05-27  9:51 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-19  7:59 [dpdk-stable] [PATCH v1] net/iavf: fix RSS key access out of index Haiyue Wang
2021-05-20  1:23 ` Xing, Beilei
2021-05-27  9:51   ` 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