netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [net-next PATCH] octeontx2-af: Enable hardware timestamping for VFs
@ 2023-10-11 12:15 Sai Krishna
  2023-10-13 15:29 ` Simon Horman
  2023-10-14  0:10 ` patchwork-bot+netdevbpf
  0 siblings, 2 replies; 3+ messages in thread
From: Sai Krishna @ 2023-10-11 12:15 UTC (permalink / raw)
  To: davem, edumazet, kuba, pabeni, netdev, linux-kernel, sgoutham,
	gakula, richardcochran, lcherian, jerinj, hkelam, sbhatta
  Cc: Sai Krishna

From: Subbaraya Sundeep <sbhatta@marvell.com>

Currently for VFs, mailbox returns ENODEV error when hardware timestamping
enable is requested. This patch fixes this issue. Modified this patch to
return EPERM error for the PF/VFs which are not attached to CGX/RPM.

Signed-off-by: Subbaraya Sundeep <sbhatta@marvell.com>
Signed-off-by: Sunil Kovvuri Goutham <sgoutham@marvell.com>
Signed-off-by: Sai Krishna <saikrishnag@marvell.com>
---
 drivers/net/ethernet/marvell/octeontx2/af/rvu_cgx.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/drivers/net/ethernet/marvell/octeontx2/af/rvu_cgx.c b/drivers/net/ethernet/marvell/octeontx2/af/rvu_cgx.c
index f2b1edf1bb43..15a319684ed3 100644
--- a/drivers/net/ethernet/marvell/octeontx2/af/rvu_cgx.c
+++ b/drivers/net/ethernet/marvell/octeontx2/af/rvu_cgx.c
@@ -756,12 +756,11 @@ static int rvu_cgx_ptp_rx_cfg(struct rvu *rvu, u16 pcifunc, bool enable)
 	if (!is_mac_feature_supported(rvu, pf, RVU_LMAC_FEAT_PTP))
 		return 0;
 
-	/* This msg is expected only from PFs that are mapped to CGX LMACs,
+	/* This msg is expected only from PF/VFs that are mapped to CGX/RPM LMACs,
 	 * if received from other PF/VF simply ACK, nothing to do.
 	 */
-	if ((pcifunc & RVU_PFVF_FUNC_MASK) ||
-	    !is_pf_cgxmapped(rvu, pf))
-		return -ENODEV;
+	if (!is_pf_cgxmapped(rvu, pf))
+		return -EPERM;
 
 	rvu_get_cgx_lmac_id(rvu->pf2cgxlmac_map[pf], &cgx_id, &lmac_id);
 	cgxd = rvu_cgx_pdata(cgx_id, rvu);
-- 
2.25.1


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

* Re: [net-next PATCH] octeontx2-af: Enable hardware timestamping for VFs
  2023-10-11 12:15 [net-next PATCH] octeontx2-af: Enable hardware timestamping for VFs Sai Krishna
@ 2023-10-13 15:29 ` Simon Horman
  2023-10-14  0:10 ` patchwork-bot+netdevbpf
  1 sibling, 0 replies; 3+ messages in thread
From: Simon Horman @ 2023-10-13 15:29 UTC (permalink / raw)
  To: Sai Krishna
  Cc: davem, edumazet, kuba, pabeni, netdev, linux-kernel, sgoutham,
	gakula, richardcochran, lcherian, jerinj, hkelam, sbhatta

On Wed, Oct 11, 2023 at 05:45:51PM +0530, Sai Krishna wrote:
> From: Subbaraya Sundeep <sbhatta@marvell.com>
> 
> Currently for VFs, mailbox returns ENODEV error when hardware timestamping
> enable is requested. This patch fixes this issue. Modified this patch to
> return EPERM error for the PF/VFs which are not attached to CGX/RPM.
> 
> Signed-off-by: Subbaraya Sundeep <sbhatta@marvell.com>
> Signed-off-by: Sunil Kovvuri Goutham <sgoutham@marvell.com>
> Signed-off-by: Sai Krishna <saikrishnag@marvell.com>

Thanks for addressing my review of v1.

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

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

* Re: [net-next PATCH] octeontx2-af: Enable hardware timestamping for VFs
  2023-10-11 12:15 [net-next PATCH] octeontx2-af: Enable hardware timestamping for VFs Sai Krishna
  2023-10-13 15:29 ` Simon Horman
@ 2023-10-14  0:10 ` patchwork-bot+netdevbpf
  1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+netdevbpf @ 2023-10-14  0:10 UTC (permalink / raw)
  To: Sai Krishna
  Cc: davem, edumazet, kuba, pabeni, netdev, linux-kernel, sgoutham,
	gakula, richardcochran, lcherian, jerinj, hkelam, sbhatta

Hello:

This patch was applied to netdev/net-next.git (main)
by Jakub Kicinski <kuba@kernel.org>:

On Wed, 11 Oct 2023 17:45:51 +0530 you wrote:
> From: Subbaraya Sundeep <sbhatta@marvell.com>
> 
> Currently for VFs, mailbox returns ENODEV error when hardware timestamping
> enable is requested. This patch fixes this issue. Modified this patch to
> return EPERM error for the PF/VFs which are not attached to CGX/RPM.
> 
> Signed-off-by: Subbaraya Sundeep <sbhatta@marvell.com>
> Signed-off-by: Sunil Kovvuri Goutham <sgoutham@marvell.com>
> Signed-off-by: Sai Krishna <saikrishnag@marvell.com>
> 
> [...]

Here is the summary with links:
  - [net-next] octeontx2-af: Enable hardware timestamping for VFs
    https://git.kernel.org/netdev/net-next/c/5ee0a3bd1509

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] 3+ messages in thread

end of thread, other threads:[~2023-10-14  0:10 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-10-11 12:15 [net-next PATCH] octeontx2-af: Enable hardware timestamping for VFs Sai Krishna
2023-10-13 15:29 ` Simon Horman
2023-10-14  0:10 ` 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).