DPDK patches and discussions
 help / color / mirror / Atom feed
* [PATCH] baseband/la12xx: fix issue with secondary process
@ 2024-07-02  6:09 Hemant Agrawal
  2024-07-02  7:38 ` Maxime Coquelin
  0 siblings, 1 reply; 2+ messages in thread
From: Hemant Agrawal @ 2024-07-02  6:09 UTC (permalink / raw)
  To: dev, g.singh, maxime.coquelin; +Cc: stable

The la12xx driver do not have any checks for secondary process
and it causes the system to try to initialize the driver, causing
segmentation faults.
LA12xx driver do not support multi-processing.
Return when not called from Primary process.

Fixes: f218a1f92017 ("baseband/la12xx: introduce NXP LA12xx driver")
Cc: stable@dpdk.org

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
---
 drivers/baseband/la12xx/bbdev_la12xx.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/baseband/la12xx/bbdev_la12xx.c b/drivers/baseband/la12xx/bbdev_la12xx.c
index bb754a5395..1a56e73abd 100644
--- a/drivers/baseband/la12xx/bbdev_la12xx.c
+++ b/drivers/baseband/la12xx/bbdev_la12xx.c
@@ -1084,6 +1084,9 @@ la12xx_bbdev_remove(struct rte_vdev_device *vdev)
 
 	PMD_INIT_FUNC_TRACE();
 
+	if (rte_eal_process_type() != RTE_PROC_PRIMARY)
+		return 0;
+
 	if (vdev == NULL)
 		return -EINVAL;
 
-- 
2.25.1


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] baseband/la12xx: fix issue with secondary process
  2024-07-02  6:09 [PATCH] baseband/la12xx: fix issue with secondary process Hemant Agrawal
@ 2024-07-02  7:38 ` Maxime Coquelin
  0 siblings, 0 replies; 2+ messages in thread
From: Maxime Coquelin @ 2024-07-02  7:38 UTC (permalink / raw)
  To: Hemant Agrawal, dev, g.singh; +Cc: stable



On 7/2/24 08:09, Hemant Agrawal wrote:
> The la12xx driver do not have any checks for secondary process
> and it causes the system to try to initialize the driver, causing
> segmentation faults.
> LA12xx driver do not support multi-processing.
> Return when not called from Primary process.
> 
> Fixes: f218a1f92017 ("baseband/la12xx: introduce NXP LA12xx driver")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
> ---
>   drivers/baseband/la12xx/bbdev_la12xx.c | 3 +++
>   1 file changed, 3 insertions(+)
> 
> diff --git a/drivers/baseband/la12xx/bbdev_la12xx.c b/drivers/baseband/la12xx/bbdev_la12xx.c
> index bb754a5395..1a56e73abd 100644
> --- a/drivers/baseband/la12xx/bbdev_la12xx.c
> +++ b/drivers/baseband/la12xx/bbdev_la12xx.c
> @@ -1084,6 +1084,9 @@ la12xx_bbdev_remove(struct rte_vdev_device *vdev)
>   
>   	PMD_INIT_FUNC_TRACE();
>   
> +	if (rte_eal_process_type() != RTE_PROC_PRIMARY)
> +		return 0;
> +
>   	if (vdev == NULL)
>   		return -EINVAL;
>   

Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>

Thanks,
Maxime


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-07-02  7:39 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-07-02  6:09 [PATCH] baseband/la12xx: fix issue with secondary process Hemant Agrawal
2024-07-02  7:38 ` Maxime Coquelin

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).