* [PATCH] net/nfp: fix the allocate of switch domain
@ 2024-06-19 9:51 Chaoyong He
2024-07-07 18:54 ` Ferruh Yigit
0 siblings, 1 reply; 2+ messages in thread
From: Chaoyong He @ 2024-06-19 9:51 UTC (permalink / raw)
To: dev; +Cc: oss-drivers, Chaoyong He, stable, Long Wu, Peng Zhang
The check of 'RTE_ETH_DEV_SWITCH_DOMAIN_ID_INVALID' cause the following
call of 'rte_eth_switch_domain_alloc()' never trigger.
Fix this by just remove the check logic.
Fixes: e1124c4f8a45 ("net/nfp: add flower representor framework")
Cc: stable@dpdk.org
Signed-off-by: Chaoyong He <chaoyong.he@corigine.com>
Reviewed-by: Long Wu <long.wu@corigine.com>
Reviewed-by: Peng Zhang <peng.zhang@corigine.com>
---
drivers/net/nfp/flower/nfp_flower_representor.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/drivers/net/nfp/flower/nfp_flower_representor.c b/drivers/net/nfp/flower/nfp_flower_representor.c
index 700957f945..e7550ce9ef 100644
--- a/drivers/net/nfp/flower/nfp_flower_representor.c
+++ b/drivers/net/nfp/flower/nfp_flower_representor.c
@@ -907,10 +907,9 @@ nfp_flower_repr_create(struct nfp_app_fw_flower *app_fw_flower,
pci_dev = pf_dev->pci_dev;
/* Allocate a switch domain for the flower app */
- if (app_fw_flower->switch_domain_id == RTE_ETH_DEV_SWITCH_DOMAIN_ID_INVALID &&
- rte_eth_switch_domain_alloc(&app_fw_flower->switch_domain_id) != 0) {
+ ret = rte_eth_switch_domain_alloc(&app_fw_flower->switch_domain_id);
+ if (ret != 0)
PMD_INIT_LOG(WARNING, "failed to allocate switch domain for device");
- }
/* Now parse PCI device args passed for representor info */
if (pci_dev->device.devargs != NULL) {
--
2.39.1
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] net/nfp: fix the allocate of switch domain
2024-06-19 9:51 [PATCH] net/nfp: fix the allocate of switch domain Chaoyong He
@ 2024-07-07 18:54 ` Ferruh Yigit
0 siblings, 0 replies; 2+ messages in thread
From: Ferruh Yigit @ 2024-07-07 18:54 UTC (permalink / raw)
To: Chaoyong He, dev; +Cc: oss-drivers, stable, Long Wu, Peng Zhang
On 6/19/2024 10:51 AM, Chaoyong He wrote:
> The check of 'RTE_ETH_DEV_SWITCH_DOMAIN_ID_INVALID' cause the following
> call of 'rte_eth_switch_domain_alloc()' never trigger.
>
> Fix this by just remove the check logic.
>
> Fixes: e1124c4f8a45 ("net/nfp: add flower representor framework")
> Cc: stable@dpdk.org
>
> Signed-off-by: Chaoyong He <chaoyong.he@corigine.com>
> Reviewed-by: Long Wu <long.wu@corigine.com>
> Reviewed-by: Peng Zhang <peng.zhang@corigine.com>
>
Applied to dpdk-next-net/main, thanks.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-07-07 18:54 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-06-19 9:51 [PATCH] net/nfp: fix the allocate of switch domain Chaoyong He
2024-07-07 18:54 ` Ferruh Yigit
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).