net/nfp: fix skip reload firmware issue
Checks
Commit Message
From: Peng Zhang <peng.zhang@corigine.com>
When the beat value of all ports are 0, which represent all
ports are unused. But the current port starts beat before
the check process, so it needs to sleep 1 second waiting
the beat value change and to ignore the current port.
Fixes: 8b9a83ea2af2 ("net/nfp: enlarge range of skipping loading firmware")
Cc: stable@dpdk.org
Signed-off-by: Peng Zhang <peng.zhang@corigine.com>
Reviewed-by: Chaoyong He <chaoyong.he@corigine.com>
---
drivers/net/nfp/nfp_ethdev.c | 6 ++++++
1 file changed, 6 insertions(+)
Comments
On 3/8/2024 10:50 AM, Chaoyong He wrote:
> From: Peng Zhang <peng.zhang@corigine.com>
>
> When the beat value of all ports are 0, which represent all
> ports are unused. But the current port starts beat before
> the check process, so it needs to sleep 1 second waiting
> the beat value change and to ignore the current port.
>
> Fixes: 8b9a83ea2af2 ("net/nfp: enlarge range of skipping loading firmware")
> Cc: stable@dpdk.org
>
> Signed-off-by: Peng Zhang <peng.zhang@corigine.com>
> Reviewed-by: Chaoyong He <chaoyong.he@corigine.com>
>
Applied to dpdk-next-net/main, thanks.
@@ -1193,7 +1193,13 @@ nfp_fw_skip_load(const struct nfp_dev_info *dev_info,
uint32_t offset[dev_info->pf_num_per_unit];
uint8_t abnormal = dev_info->pf_num_per_unit;
+ sleep(1);
for (port_num = 0; port_num < dev_info->pf_num_per_unit; port_num++) {
+ if (port_num == multi_pf->function_id) {
+ abnormal--;
+ continue;
+ }
+
offset[port_num] = NFP_BEAT_OFFSET(port_num);
beat[port_num] = nn_readq(multi_pf->beat_addr + offset[port_num]);
if (beat[port_num] == 0)