> -----Original Message-----
> From: Xing, Beilei <beilei.x...@intel.com>
> Sent: Thursday, May 20, 2021 9:24 AM
> To: Wang, Haiyue <haiyue.w...@intel.com>; dev@dpdk.org
> Cc: Zhang, Qi Z <qi.z.zh...@intel.com>; sta...@dpdk.org; Wu, Jingjing
> <jingjing...@intel.com>
> Subject: RE: [PATCH v1] net/iavf: fix RSS key access out of index
> 
> 
> 
> > -----Original Message-----
> > From: Wang, Haiyue <haiyue.w...@intel.com>
> > Sent: Wednesday, May 19, 2021 4:00 PM
> > To: dev@dpdk.org
> > Cc: Zhang, Qi Z <qi.z.zh...@intel.com>; Wang, Haiyue
> > <haiyue.w...@intel.com>; sta...@dpdk.org; Wu, Jingjing
> > <jingjing...@intel.com>; Xing, Beilei <beilei.x...@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: sta...@dpdk.org
> > Fixes: 69dd4c3d0898 ("net/avf: enable queue and device")
> >
> > Signed-off-by: Haiyue Wang <haiyue.w...@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.x...@intel.com>

Applied to dpdk-next-net-intel.

Thanks
Qi

Reply via email to