netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [v2 net PATCH 0/5] octeontx2-pf: RVU Mailbox fixes
@ 2024-03-18  9:29 Subbaraya Sundeep
  2024-03-18  9:29 ` [v2 net PATCH 1/5] octeontx2: Detect the mbox up or down message via register Subbaraya Sundeep
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: Subbaraya Sundeep @ 2024-03-18  9:29 UTC (permalink / raw)
  To: netdev, linux-kernel
  Cc: davem, edumazet, kuba, pabeni, sgoutham, lcherian, gakula,
	hkelam, naveenm, horms, Subbaraya Sundeep

This patchset fixes the problems related to RVU mailbox.
During long run tests some times VF commands like setting
MTU or toggling interface fails because VF mailbox is timedout
waiting for response from PF.

Below are the fixes
Patch 1: There are two types of messages in RVU mailbox namely up and down
messages. Down messages are synchronous messages where a PF/VF sends
a message to AF and AF replies back with response. UP messages are
notifications and are asynchronous like AF sending link events to
PF. When VF sends a down message to PF, PF forwards to AF and sends
the response from AF back to VF. PF has to forward VF messages since
there is no path in hardware for VF to send directly to AF.
There is one mailbox interrupt from AF to PF when raised could mean
two scenarios one is where AF sending reply to PF for a down message
sent by PF and another one is AF sending up message asynchronously
when link changed for that PF. Receiving the up message interrupt while
PF is in middle of forwarding down message causes mailbox errors.
Fix this by receiver detecting the type of message from the mbox data register
set by sender.

Patch 2:
During VF driver remove, VF has to wait until last message is
completed and then turn off mailbox interrupts from PF.

Patch 3:
Do not use ordered workqueue for message processing since multiple works are
queued simultaneously by all the VFs and PF link UP messages.

Patch 4:
When sending link event to VF by PF check whether VF is really up to
receive this message.

Patch 5:
In AF driver, use separate interrupt handlers for the AF-VF interrupt and
AF-PF interrupt. Sometimes both interrupts are raised to two CPUs at same
time and both CPUs execute same function at same time corrupting the data.

v2 changes:
	Added missing mutex unlock in error path in patch 1
	Refactored if else logic in patch 1 as suggested by Paolo Abeni


Subbaraya Sundeep (5):
  octeontx2: Detect the mbox up or down message via register
  octeontx2-pf: Wait till detach_resources msg is complete
  octeontx2-pf: Use default max_active works instead of one
  octeontx2-pf: Send UP messages to VF only when VF is up.
  octeontx2-af: Use separate handlers for interrupts

 drivers/net/ethernet/marvell/octeontx2/af/mbox.c   |  43 +++++++-
 drivers/net/ethernet/marvell/octeontx2/af/mbox.h   |   6 ++
 .../net/ethernet/marvell/octeontx2/af/mcs_rvu_if.c |  17 +--
 drivers/net/ethernet/marvell/octeontx2/af/rvu.c    |  31 ++++--
 drivers/net/ethernet/marvell/octeontx2/af/rvu.h    |   2 +
 .../net/ethernet/marvell/octeontx2/af/rvu_cgx.c    |  20 ++--
 .../ethernet/marvell/octeontx2/nic/otx2_common.c   |   2 +-
 .../ethernet/marvell/octeontx2/nic/otx2_common.h   |   2 +-
 .../net/ethernet/marvell/octeontx2/nic/otx2_pf.c   | 119 ++++++++++++++-------
 .../net/ethernet/marvell/octeontx2/nic/otx2_vf.c   |  71 +++++++-----
 10 files changed, 225 insertions(+), 88 deletions(-)

-- 
2.7.4


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

end of thread, other threads:[~2024-03-20 10:50 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-03-18  9:29 [v2 net PATCH 0/5] octeontx2-pf: RVU Mailbox fixes Subbaraya Sundeep
2024-03-18  9:29 ` [v2 net PATCH 1/5] octeontx2: Detect the mbox up or down message via register Subbaraya Sundeep
2024-03-18  9:29 ` [v2 net PATCH 2/5] octeontx2-pf: Wait till detach_resources msg is complete Subbaraya Sundeep
2024-03-18  9:29 ` [v2 net PATCH 3/5] octeontx2-pf: Use default max_active works instead of one Subbaraya Sundeep
2024-03-18  9:29 ` [v2 net PATCH 4/5] octeontx2-pf: Send UP messages to VF only when VF is up Subbaraya Sundeep
2024-03-18  9:29 ` [v2 net PATCH 5/5] octeontx2-af: Use separate handlers for interrupts Subbaraya Sundeep
2024-03-20 10:50 ` [v2 net PATCH 0/5] octeontx2-pf: RVU Mailbox fixes 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).