netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [net PATCH v3] octeontx2-af: Send Link events one by one
@ 2025-05-21 10:30 Subbaraya Sundeep
  2025-05-21 11:00 ` Michal Swiatkowski
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Subbaraya Sundeep @ 2025-05-21 10:30 UTC (permalink / raw)
  To: andrew+netdev, davem, edumazet, kuba, pabeni, horms,
	michal.swiatkowski, gakula, hkelam, sgoutham, lcherian, bbhushan2,
	jerinj
  Cc: netdev, Subbaraya Sundeep

Send link events one after another otherwise new message
is overwriting the message which is being processed by PF.

Fixes: a88e0f936ba9 ("octeontx2: Detect the mbox up or down message via register")
Signed-off-by: Subbaraya Sundeep <sbhatta@marvell.com>
---
v3:
 Modifid to wait for response at other places mcs_notify_pfvf
 and rvu_rep_up_notify as suggested by Simon Hormon and Michal Swiatkowski.
v2:
 No changes. Added subject prefix net.

 drivers/net/ethernet/marvell/octeontx2/af/mcs_rvu_if.c | 2 ++
 drivers/net/ethernet/marvell/octeontx2/af/rvu_cgx.c    | 2 ++
 drivers/net/ethernet/marvell/octeontx2/af/rvu_rep.c    | 2 ++
 3 files changed, 6 insertions(+)

diff --git a/drivers/net/ethernet/marvell/octeontx2/af/mcs_rvu_if.c b/drivers/net/ethernet/marvell/octeontx2/af/mcs_rvu_if.c
index 655dd47..0277d22 100644
--- a/drivers/net/ethernet/marvell/octeontx2/af/mcs_rvu_if.c
+++ b/drivers/net/ethernet/marvell/octeontx2/af/mcs_rvu_if.c
@@ -143,6 +143,8 @@ static int mcs_notify_pfvf(struct mcs_intr_event *event, struct rvu *rvu)
 
 	otx2_mbox_msg_send_up(&rvu->afpf_wq_info.mbox_up, pf);
 
+	otx2_mbox_wait_for_rsp(&rvu->afpf_wq_info.mbox_up, pf);
+
 	mutex_unlock(&rvu->mbox_lock);
 
 	return 0;
diff --git a/drivers/net/ethernet/marvell/octeontx2/af/rvu_cgx.c b/drivers/net/ethernet/marvell/octeontx2/af/rvu_cgx.c
index 992fa0b..ebb56eb 100644
--- a/drivers/net/ethernet/marvell/octeontx2/af/rvu_cgx.c
+++ b/drivers/net/ethernet/marvell/octeontx2/af/rvu_cgx.c
@@ -272,6 +272,8 @@ static void cgx_notify_pfs(struct cgx_link_event *event, struct rvu *rvu)
 
 		otx2_mbox_msg_send_up(&rvu->afpf_wq_info.mbox_up, pfid);
 
+		otx2_mbox_wait_for_rsp(&rvu->afpf_wq_info.mbox_up, pfid);
+
 		mutex_unlock(&rvu->mbox_lock);
 	} while (pfmap);
 }
diff --git a/drivers/net/ethernet/marvell/octeontx2/af/rvu_rep.c b/drivers/net/ethernet/marvell/octeontx2/af/rvu_rep.c
index 052ae59..32953cc 100644
--- a/drivers/net/ethernet/marvell/octeontx2/af/rvu_rep.c
+++ b/drivers/net/ethernet/marvell/octeontx2/af/rvu_rep.c
@@ -60,6 +60,8 @@ static int rvu_rep_up_notify(struct rvu *rvu, struct rep_event *event)
 
 	otx2_mbox_msg_send_up(&rvu->afpf_wq_info.mbox_up, pf);
 
+	otx2_mbox_wait_for_rsp(&rvu->afpf_wq_info.mbox_up, pf);
+
 	mutex_unlock(&rvu->mbox_lock);
 	return 0;
 }
-- 
2.7.4


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

* Re: [net PATCH v3] octeontx2-af: Send Link events one by one
  2025-05-21 10:30 [net PATCH v3] octeontx2-af: Send Link events one by one Subbaraya Sundeep
@ 2025-05-21 11:00 ` Michal Swiatkowski
  2025-05-22 12:51 ` Simon Horman
  2025-05-26 16:20 ` patchwork-bot+netdevbpf
  2 siblings, 0 replies; 4+ messages in thread
From: Michal Swiatkowski @ 2025-05-21 11:00 UTC (permalink / raw)
  To: Subbaraya Sundeep
  Cc: andrew+netdev, davem, edumazet, kuba, pabeni, horms,
	michal.swiatkowski, gakula, hkelam, sgoutham, lcherian, bbhushan2,
	jerinj, netdev

On Wed, May 21, 2025 at 04:00:43PM +0530, Subbaraya Sundeep wrote:
> Send link events one after another otherwise new message
> is overwriting the message which is being processed by PF.
> 
> Fixes: a88e0f936ba9 ("octeontx2: Detect the mbox up or down message via register")
> Signed-off-by: Subbaraya Sundeep <sbhatta@marvell.com>
> ---
> v3:
>  Modifid to wait for response at other places mcs_notify_pfvf
>  and rvu_rep_up_notify as suggested by Simon Hormon and Michal Swiatkowski.
> v2:
>  No changes. Added subject prefix net.
> 
>  drivers/net/ethernet/marvell/octeontx2/af/mcs_rvu_if.c | 2 ++
>  drivers/net/ethernet/marvell/octeontx2/af/rvu_cgx.c    | 2 ++
>  drivers/net/ethernet/marvell/octeontx2/af/rvu_rep.c    | 2 ++
>  3 files changed, 6 insertions(+)
> 
> diff --git a/drivers/net/ethernet/marvell/octeontx2/af/mcs_rvu_if.c b/drivers/net/ethernet/marvell/octeontx2/af/mcs_rvu_if.c
> index 655dd47..0277d22 100644
> --- a/drivers/net/ethernet/marvell/octeontx2/af/mcs_rvu_if.c
> +++ b/drivers/net/ethernet/marvell/octeontx2/af/mcs_rvu_if.c
> @@ -143,6 +143,8 @@ static int mcs_notify_pfvf(struct mcs_intr_event *event, struct rvu *rvu)
>  
>  	otx2_mbox_msg_send_up(&rvu->afpf_wq_info.mbox_up, pf);
>  
> +	otx2_mbox_wait_for_rsp(&rvu->afpf_wq_info.mbox_up, pf);
> +
>  	mutex_unlock(&rvu->mbox_lock);
>  
>  	return 0;
> diff --git a/drivers/net/ethernet/marvell/octeontx2/af/rvu_cgx.c b/drivers/net/ethernet/marvell/octeontx2/af/rvu_cgx.c
> index 992fa0b..ebb56eb 100644
> --- a/drivers/net/ethernet/marvell/octeontx2/af/rvu_cgx.c
> +++ b/drivers/net/ethernet/marvell/octeontx2/af/rvu_cgx.c
> @@ -272,6 +272,8 @@ static void cgx_notify_pfs(struct cgx_link_event *event, struct rvu *rvu)
>  
>  		otx2_mbox_msg_send_up(&rvu->afpf_wq_info.mbox_up, pfid);
>  
> +		otx2_mbox_wait_for_rsp(&rvu->afpf_wq_info.mbox_up, pfid);
> +
>  		mutex_unlock(&rvu->mbox_lock);
>  	} while (pfmap);
>  }
> diff --git a/drivers/net/ethernet/marvell/octeontx2/af/rvu_rep.c b/drivers/net/ethernet/marvell/octeontx2/af/rvu_rep.c
> index 052ae59..32953cc 100644
> --- a/drivers/net/ethernet/marvell/octeontx2/af/rvu_rep.c
> +++ b/drivers/net/ethernet/marvell/octeontx2/af/rvu_rep.c
> @@ -60,6 +60,8 @@ static int rvu_rep_up_notify(struct rvu *rvu, struct rep_event *event)
>  
>  	otx2_mbox_msg_send_up(&rvu->afpf_wq_info.mbox_up, pf);
>  
> +	otx2_mbox_wait_for_rsp(&rvu->afpf_wq_info.mbox_up, pf);
> +
>  	mutex_unlock(&rvu->mbox_lock);
>  	return 0;

Thanks for the change
Reviewed-by: Michal Swiatkowski <michal.swiatkowski@linux.intel.com>

>  }
> -- 
> 2.7.4
> 

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

* Re: [net PATCH v3] octeontx2-af: Send Link events one by one
  2025-05-21 10:30 [net PATCH v3] octeontx2-af: Send Link events one by one Subbaraya Sundeep
  2025-05-21 11:00 ` Michal Swiatkowski
@ 2025-05-22 12:51 ` Simon Horman
  2025-05-26 16:20 ` patchwork-bot+netdevbpf
  2 siblings, 0 replies; 4+ messages in thread
From: Simon Horman @ 2025-05-22 12:51 UTC (permalink / raw)
  To: Subbaraya Sundeep
  Cc: andrew+netdev, davem, edumazet, kuba, pabeni, michal.swiatkowski,
	gakula, hkelam, sgoutham, lcherian, bbhushan2, jerinj, netdev

On Wed, May 21, 2025 at 04:00:43PM +0530, Subbaraya Sundeep wrote:
> Send link events one after another otherwise new message
> is overwriting the message which is being processed by PF.
> 
> Fixes: a88e0f936ba9 ("octeontx2: Detect the mbox up or down message via register")
> Signed-off-by: Subbaraya Sundeep <sbhatta@marvell.com>
> ---
> v3:
>  Modifid to wait for response at other places mcs_notify_pfvf
>  and rvu_rep_up_notify as suggested by Simon Hormon and Michal Swiatkowski.
> v2:
>  No changes. Added subject prefix net.

Reviewed-by: Simon Horman <horms@kernel.org>


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

* Re: [net PATCH v3] octeontx2-af: Send Link events one by one
  2025-05-21 10:30 [net PATCH v3] octeontx2-af: Send Link events one by one Subbaraya Sundeep
  2025-05-21 11:00 ` Michal Swiatkowski
  2025-05-22 12:51 ` Simon Horman
@ 2025-05-26 16:20 ` patchwork-bot+netdevbpf
  2 siblings, 0 replies; 4+ messages in thread
From: patchwork-bot+netdevbpf @ 2025-05-26 16:20 UTC (permalink / raw)
  To: Subbaraya Sundeep
  Cc: andrew+netdev, davem, edumazet, kuba, pabeni, horms,
	michal.swiatkowski, gakula, hkelam, sgoutham, lcherian, bbhushan2,
	jerinj, netdev

Hello:

This patch was applied to netdev/net.git (main)
by Paolo Abeni <pabeni@redhat.com>:

On Wed, 21 May 2025 16:00:43 +0530 you wrote:
> Send link events one after another otherwise new message
> is overwriting the message which is being processed by PF.
> 
> Fixes: a88e0f936ba9 ("octeontx2: Detect the mbox up or down message via register")
> Signed-off-by: Subbaraya Sundeep <sbhatta@marvell.com>
> ---
> v3:
>  Modifid to wait for response at other places mcs_notify_pfvf
>  and rvu_rep_up_notify as suggested by Simon Hormon and Michal Swiatkowski.
> v2:
>  No changes. Added subject prefix net.
> 
> [...]

Here is the summary with links:
  - [net,v3] octeontx2-af: Send Link events one by one
    https://git.kernel.org/netdev/net/c/ba5cb47b56e5

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



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

end of thread, other threads:[~2025-05-26 16:19 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-05-21 10:30 [net PATCH v3] octeontx2-af: Send Link events one by one Subbaraya Sundeep
2025-05-21 11:00 ` Michal Swiatkowski
2025-05-22 12:51 ` Simon Horman
2025-05-26 16:20 ` patchwork-bot+netdevbpf

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