Re: [dpdk-dev] [PATCH v8 2/2] app/testpmd: fix testpmd doesn't show RSS hash offload
From: Wang, Jie1X <hidden>
Date: 2021-09-22 02:52:15
-----Original Message----- From: Yigit, Ferruh <redacted> Sent: Monday, September 20, 2021 5:48 PM To: Wang, Jie1X <redacted>; dev@dpdk.org Cc: Li, Xiaoyun <redacted>; andrew.rybchenko@oktetlabs.ru; thomas@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:quoted
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 <redacted><...>quoted
+ /* 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.