Skip to contentSkip to conversation

octeontx2-af: Send Link events one by one

PATCH Superseded Subbaraya Sundeep 3 participants 7 messages May 14, 2025 – May 15, 2025

Subsystems (3)

v2 of 3 Superseded Latest is v3 →

lore
Share & tools
lore

Subbaraya Sundeep

author maintainer
#0 lore raw

PATCH v2 1/1 octeontx2-af: Send Link events one by one

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

---
v2:
No changes. Added subject prefix net.

 drivers/net/ethernet/marvell/octeontx2/af/rvu_cgx.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/net/ethernet/marvell/octeontx2/af/rvu_cgx.c +2 -0
index 992fa0b..ebb56eb 100644
@@ -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);
 }
Signature · 1 line
2.7.4
Reviewed-by on v2 1/1
#1 lore raw
Quoted 17 lines · 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")

---
v2:
No changes. Added subject prefix net.

 drivers/net/ethernet/marvell/octeontx2/af/rvu_cgx.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/net/ethernet/marvell/octeontx2/af/rvu_cgx.c +0 -0
index 992fa0b..ebb56eb 100644

drivers/net/ethernet/marvell/octeontx2/af/rvu_cgx.c static void cgx_notify_pfs(struct cgx_link_event *event, struct rvu *rvu) · line 277

Quoted 6 lines
drivers/net/ethernet/marvell/octeontx2/af/rvu_cgx.c +2 -0
@@ -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);

Fix looks fine.

In rvu_rep_up_notify() the same send function is called (and rvu_rep_up_notify() is called in do, while loop in rvu_rep_wq_handler()). Doesn't it also need waiting for response? Are there a message that don't need waiting? Maybe it will be best to always wait for response if another call can overwrite.

Thanks

Quoted 4 lines
drivers/net/ethernet/marvell/octeontx2/af/rvu_cgx.c +0 -0
 	} while (pfmap);
 }
Signature · 1 line
2.7.4
author maintainer
#2 lore raw

Hi Michal,

Quoted 28 lines · Michal Swiatkowski
Quoted 17 lines · 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")

---
v2:
No changes. Added subject prefix net.

 drivers/net/ethernet/marvell/octeontx2/af/rvu_cgx.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/net/ethernet/marvell/octeontx2/af/rvu_cgx.c +0 -0
index 992fa0b..ebb56eb 100644

drivers/net/ethernet/marvell/octeontx2/af/rvu_cgx.c static void cgx_notify_pfs(struct cgx_link_event *event, struct rvu *rvu) · line 277

Quoted 6 lines
drivers/net/ethernet/marvell/octeontx2/af/rvu_cgx.c +2 -0
@@ -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);

Fix looks fine.

Quoted 8 lines

In rvu_rep_up_notify() the same send function is called (and rvu_rep_up_notify() is called in do, while loop in rvu_rep_wq_handler()). Doesn't it also need waiting for response? Are there a message that don't need waiting? Maybe it will be best to always wait for response if another call can overwrite.

Thanks

Okay I will modify rvu_rep_up_notify, test and send next version along with this.

Thanks,
Sundeep

Quoted 4 lines
Quoted 4 lines
drivers/net/ethernet/marvell/octeontx2/af/rvu_cgx.c +0 -0
 	} while (pfmap);
 }
Signature · 1 line
2.7.4
maintainer
#3 lore raw
In reply to Subbaraya Sundeep
Quoted 2 lines · On Wed, 14 May 2025 11:58:28 +0530 Subbaraya Sundeep wrote:

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

Please respond to reviewers in a timely fashion.

author maintainer
#4 lore raw

Hi Jakub,

Quoted 5 lines · Jakub Kicinski
Quoted 2 lines · On Wed, 14 May 2025 11:58:28 +0530 Subbaraya Sundeep wrote:

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

Please respond to reviewers in a timely fashion.

Just want to know is it you or bot? What is the time limit here? Have to respond within 24hr?

Thanks,
Sundeep

maintainer
#5 lore raw
Quoted 8 lines · On Thu, 15 May 2025 16:41:18 +0000 Subbaraya Sundeep wrote:
Quoted 5 lines · Jakub Kicinski
Quoted 2 lines · On Wed, 14 May 2025 11:58:28 +0530 Subbaraya Sundeep wrote:

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

Please respond to reviewers in a timely fashion.

Just want to know is it you or bot?

Have you seen me reply with the same text to someone else? Oh, that's right, you don't read the list, how would you know..

Quoted 2 lines

What is the time limit here?
Have to respond within 24hr?

The review cadence on netdev is 24h.

author maintainer
#6 lore raw
Quoted 6 lines · Jakub Kicinski
Quoted 5 lines · On Thu, 15 May 2025 16:41:18 +0000 Subbaraya Sundeep wrote:
Quoted 4 lines · Jakub Kicinski
Quoted 2 lines · On Wed, 14 May 2025 11:58:28 +0530 Subbaraya Sundeep wrote:

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

Quoted 7 lines
Quoted 3 lines
Quoted 1 line

Please respond to reviewers in a timely fashion.

Just want to know is it you or bot?

Have you seen me reply with the same text to someone else? Oh, that's right, you don't read the list, how would you know..

:)

Quoted 4 lines
Quoted 2 lines

What is the time limit here?
Have to respond within 24hr?

The review cadence on netdev is 24h.

Got it this patch missed your recent pull request because of my delay in response.

Thanks,
Sundeep