* [dpdk-stable] [PATCH 27/38] net/sfc: free MAE lock once switch domain is assigned [not found] <20210827065717.1838258-1-andrew.rybchenko@oktetlabs.ru> @ 2021-08-27 6:57 ` Andrew Rybchenko 2021-08-27 6:57 ` [dpdk-stable] [PATCH 38/38] net/sfc: update comment about representor support Andrew Rybchenko [not found] ` <20211011144857.446802-1-andrew.rybchenko@oktetlabs.ru> 2 siblings, 0 replies; 4+ messages in thread From: Andrew Rybchenko @ 2021-08-27 6:57 UTC (permalink / raw) To: dev; +Cc: Viacheslav Galaktionov, stable, Andy Moreton From: Viacheslav Galaktionov <viacheslav.galaktionov@oktetlabs.ru> If for some reason the hardware switch ID initialization function fails, MAE lock is still held after the function finishes. This patch fixes that. Fixes: 1e7fbdf0ba19 ("net/sfc: support concept of switch domains/ports") Cc: stable@dpdk.org Signed-off-by: Viacheslav Galaktionov <viacheslav.galaktionov@oktetlabs.ru> Signed-off-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru> Reviewed-by: Andy Moreton <amoreton@xilinx.com> --- drivers/net/sfc/sfc_switch.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/sfc/sfc_switch.c b/drivers/net/sfc/sfc_switch.c index c37cdf4a61..80c884a599 100644 --- a/drivers/net/sfc/sfc_switch.c +++ b/drivers/net/sfc/sfc_switch.c @@ -214,9 +214,9 @@ sfc_mae_assign_switch_domain(struct sfc_adapter *sa, fail_mem_alloc: sfc_hw_switch_id_fini(sa, hw_switch_id); - rte_spinlock_unlock(&sfc_mae_switch.lock); fail_hw_switch_id_init: + rte_spinlock_unlock(&sfc_mae_switch.lock); return rc; } -- 2.30.2 ^ permalink raw reply [flat|nested] 4+ messages in thread
* [dpdk-stable] [PATCH 38/38] net/sfc: update comment about representor support [not found] <20210827065717.1838258-1-andrew.rybchenko@oktetlabs.ru> 2021-08-27 6:57 ` [dpdk-stable] [PATCH 27/38] net/sfc: free MAE lock once switch domain is assigned Andrew Rybchenko @ 2021-08-27 6:57 ` Andrew Rybchenko [not found] ` <20211011144857.446802-1-andrew.rybchenko@oktetlabs.ru> 2 siblings, 0 replies; 4+ messages in thread From: Andrew Rybchenko @ 2021-08-27 6:57 UTC (permalink / raw) To: dev; +Cc: Viacheslav Galaktionov, stable, Andy Moreton From: Viacheslav Galaktionov <viacheslav.galaktionov@oktetlabs.ru> The representor support has been implemented to some extent, and the fact that ethdev mport is equivalent to entity mport is by design. Fixes: 1fb65e4dae8 ("net/sfc: support flow action port ID in transfer rules") Cc: stable@dpdk.org Signed-off-by: Viacheslav Galaktionov <viacheslav.galaktionov@oktetlabs.ru> Signed-off-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru> Reviewed-by: Andy Moreton <amoreton@xilinx.com> --- drivers/net/sfc/sfc_mae.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/net/sfc/sfc_mae.c b/drivers/net/sfc/sfc_mae.c index 7be77054ab..fa60c948ca 100644 --- a/drivers/net/sfc/sfc_mae.c +++ b/drivers/net/sfc/sfc_mae.c @@ -228,10 +228,7 @@ sfc_mae_attach(struct sfc_adapter *sa) sfc_log_init(sa, "assign RTE switch port"); switch_port_request.type = SFC_MAE_SWITCH_PORT_INDEPENDENT; switch_port_request.entity_mportp = &entity_mport; - /* - * As of now, the driver does not support representors, so - * RTE ethdev MPORT simply matches that of the entity. - */ + /* RTE ethdev MPORT matches that of the entity for independent ports. */ switch_port_request.ethdev_mportp = &entity_mport; switch_port_request.ethdev_port_id = sas->port_id; rc = sfc_mae_assign_switch_port(mae->switch_domain_id, -- 2.30.2 ^ permalink raw reply [flat|nested] 4+ messages in thread
[parent not found: <20211011144857.446802-1-andrew.rybchenko@oktetlabs.ru>]
* [dpdk-stable] [PATCH v2 27/38] net/sfc: free MAE lock once switch domain is assigned [not found] ` <20211011144857.446802-1-andrew.rybchenko@oktetlabs.ru> @ 2021-10-11 14:48 ` Andrew Rybchenko 2021-10-11 14:48 ` [dpdk-stable] [PATCH v2 38/38] net/sfc: update comment about representor support Andrew Rybchenko 1 sibling, 0 replies; 4+ messages in thread From: Andrew Rybchenko @ 2021-10-11 14:48 UTC (permalink / raw) To: dev; +Cc: Viacheslav Galaktionov, stable, Andy Moreton From: Viacheslav Galaktionov <viacheslav.galaktionov@oktetlabs.ru> If for some reason the hardware switch ID initialization function fails, MAE lock is still held after the function finishes. This patch fixes that. Fixes: 1e7fbdf0ba19 ("net/sfc: support concept of switch domains/ports") Cc: stable@dpdk.org Signed-off-by: Viacheslav Galaktionov <viacheslav.galaktionov@oktetlabs.ru> Signed-off-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru> Reviewed-by: Andy Moreton <amoreton@xilinx.com> --- drivers/net/sfc/sfc_switch.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/sfc/sfc_switch.c b/drivers/net/sfc/sfc_switch.c index c37cdf4a61..80c884a599 100644 --- a/drivers/net/sfc/sfc_switch.c +++ b/drivers/net/sfc/sfc_switch.c @@ -214,9 +214,9 @@ sfc_mae_assign_switch_domain(struct sfc_adapter *sa, fail_mem_alloc: sfc_hw_switch_id_fini(sa, hw_switch_id); - rte_spinlock_unlock(&sfc_mae_switch.lock); fail_hw_switch_id_init: + rte_spinlock_unlock(&sfc_mae_switch.lock); return rc; } -- 2.30.2 ^ permalink raw reply [flat|nested] 4+ messages in thread
* [dpdk-stable] [PATCH v2 38/38] net/sfc: update comment about representor support [not found] ` <20211011144857.446802-1-andrew.rybchenko@oktetlabs.ru> 2021-10-11 14:48 ` [dpdk-stable] [PATCH v2 27/38] net/sfc: free MAE lock once switch domain is assigned Andrew Rybchenko @ 2021-10-11 14:48 ` Andrew Rybchenko 1 sibling, 0 replies; 4+ messages in thread From: Andrew Rybchenko @ 2021-10-11 14:48 UTC (permalink / raw) To: dev; +Cc: Viacheslav Galaktionov, stable, Andy Moreton From: Viacheslav Galaktionov <viacheslav.galaktionov@oktetlabs.ru> The representor support has been implemented to some extent, and the fact that ethdev mport is equivalent to entity mport is by design. Fixes: 1fb65e4dae8 ("net/sfc: support flow action port ID in transfer rules") Cc: stable@dpdk.org Signed-off-by: Viacheslav Galaktionov <viacheslav.galaktionov@oktetlabs.ru> Signed-off-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru> Reviewed-by: Andy Moreton <amoreton@xilinx.com> --- drivers/net/sfc/sfc_mae.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/net/sfc/sfc_mae.c b/drivers/net/sfc/sfc_mae.c index 7be77054ab..fa60c948ca 100644 --- a/drivers/net/sfc/sfc_mae.c +++ b/drivers/net/sfc/sfc_mae.c @@ -228,10 +228,7 @@ sfc_mae_attach(struct sfc_adapter *sa) sfc_log_init(sa, "assign RTE switch port"); switch_port_request.type = SFC_MAE_SWITCH_PORT_INDEPENDENT; switch_port_request.entity_mportp = &entity_mport; - /* - * As of now, the driver does not support representors, so - * RTE ethdev MPORT simply matches that of the entity. - */ + /* RTE ethdev MPORT matches that of the entity for independent ports. */ switch_port_request.ethdev_mportp = &entity_mport; switch_port_request.ethdev_port_id = sas->port_id; rc = sfc_mae_assign_switch_port(mae->switch_domain_id, -- 2.30.2 ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2021-10-11 14:50 UTC | newest] Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- [not found] <20210827065717.1838258-1-andrew.rybchenko@oktetlabs.ru> 2021-08-27 6:57 ` [dpdk-stable] [PATCH 27/38] net/sfc: free MAE lock once switch domain is assigned Andrew Rybchenko 2021-08-27 6:57 ` [dpdk-stable] [PATCH 38/38] net/sfc: update comment about representor support Andrew Rybchenko [not found] ` <20211011144857.446802-1-andrew.rybchenko@oktetlabs.ru> 2021-10-11 14:48 ` [dpdk-stable] [PATCH v2 27/38] net/sfc: free MAE lock once switch domain is assigned Andrew Rybchenko 2021-10-11 14:48 ` [dpdk-stable] [PATCH v2 38/38] net/sfc: update comment about representor support Andrew Rybchenko
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).