> -----Original Message-----
> From: Yigit, Ferruh <ferruh.yi...@intel.com>
> Sent: Monday, September 20, 2021 5:48 PM
> To: Wang, Jie1X <jie1x.w...@intel.com>; dev@dpdk.org
> Cc: Li, Xiaoyun <xiaoyun...@intel.com>; andrew.rybche...@oktetlabs.ru;
> tho...@monjalon.net
> Subject: Re: [PATCH v8 2/2] app/testpmd: fix testpmd doesn't show RSS hash
> offload
> 
> On 8/27/2021 9:17 AM, Jie Wang wrote:
> > The driver may change offloads info into dev->data->dev_conf in
> > dev_configure which may cause port->dev_conf and port->rx_conf contain
> > outdated values.
> >
> > This patch updates the offloads info if it changes to fix this issue.
> >
> > Fixes: ce8d561418d4 ("app/testpmd: add port configuration settings")
> >
> > Signed-off-by: Jie Wang <jie1x.w...@intel.com>
> 
> <...>
> 
> > +                   /* Apply Rx offloads configuration */
> > +                   if (dev_conf_info.rxmode.offloads !=
> > +                           port->dev_conf.rxmode.offloads) {
> > +                           port->dev_conf.rxmode.offloads =
> > +                                   dev_conf_info.rxmode.offloads;
> > +                           for (k = 0;
> > +                                k < port->dev_info.max_rx_queues;
> > +                                k++)
> > +                                   port->rx_conf[k].offloads =
> > +
>       dev_conf_info.rxmode.offloads;
> 
> If queue specific offloads are used, won't this overwrite it with port 
> offload?
> 
> Should we get queue config from device and update queue offloads with it?

Only the first time the driver configures the port, 
"dev_conf_info.rxmode.offloads" is not equal to 
"port->dev_conf.rxmode.offloads". So the added code just run 1 time.

But your suggestion is correct, I should update the queue offloads instead of 
overwriting it.

Reply via email to