* [PATCH net-next v2] octeontx2-af: consolidate RVU AFVF device id definitions
@ 2026-09-10 10:41 Jiangshan Yi
2026-09-11 10:53 ` Simon Horman
2026-09-15 2:30 ` patchwork-bot+netdevbpf
0 siblings, 2 replies; 3+ messages in thread
From: Jiangshan Yi @ 2026-09-10 10:41 UTC (permalink / raw)
To: sgoutham, rkannoth, gakula, sbhatta, andrew+netdev, davem,
edumazet, kuba, pabeni
Cc: netdev, linux-kernel, 13667453960, Jiangshan Yi
commit f695390ea639 ("octeontx2-af: Fix limiting SRIOV VF count logic")
added a local PCI_DEVID_OCTEONTX2_RVU_AFVF define in rvu.c, although
the same value was already defined twice elsewhere: as RVU_LBK_VF_DEVID
in af/rvu.h and as PCI_DEVID_OCTEONTX2_RVU_AFVF in nic/otx2_common.h.
Move the definition into the "PCI device IDs" block in af/rvu.h, rename
RVU_LBK_VF_DEVID to match the PCI_DEVID_* naming convention of its
peers, and drop the redundant copies in rvu.c and nic/otx2_common.h,
the latter already including <rvu.h> through the af include path.
No functional change.
Signed-off-by: Jiangshan Yi <yijiangshan@kylinos.cn>
Acked-by: Ratheesh Kannoth <rkannoth@marvell.com>
---
Changes in v2:
- also drop the duplicate PCI_DEVID_OCTEONTX2_RVU_AFVF define in
nic/otx2_common.h, which already includes <rvu.h>, so that all three
definitions of this device id are consolidated into af/rvu.h
(suggested by the Sashiko netdev review).
Link: https://lore.kernel.org/r/20260908094051.666769-1-yijiangshan@kylinos.cn
drivers/net/ethernet/marvell/octeontx2/af/rvu.c | 2 --
drivers/net/ethernet/marvell/octeontx2/af/rvu.h | 4 ++--
drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.h | 1 -
3 files changed, 2 insertions(+), 5 deletions(-)
diff --git a/drivers/net/ethernet/marvell/octeontx2/af/rvu.c b/drivers/net/ethernet/marvell/octeontx2/af/rvu.c
index 937b085582b5..65e08ad9d82e 100644
--- a/drivers/net/ethernet/marvell/octeontx2/af/rvu.c
+++ b/drivers/net/ethernet/marvell/octeontx2/af/rvu.c
@@ -3468,8 +3468,6 @@ int rvu_get_num_lbk_chans(void)
return ret;
}
-#define PCI_DEVID_OCTEONTX2_RVU_AFVF 0xA0F8
-
static int rvu_enable_sriov(struct rvu *rvu)
{
struct pci_dev *pdev = rvu->pdev;
diff --git a/drivers/net/ethernet/marvell/octeontx2/af/rvu.h b/drivers/net/ethernet/marvell/octeontx2/af/rvu.h
index 094227404ef9..16846eeb793d 100644
--- a/drivers/net/ethernet/marvell/octeontx2/af/rvu.h
+++ b/drivers/net/ethernet/marvell/octeontx2/af/rvu.h
@@ -22,6 +22,7 @@
/* PCI device IDs */
#define PCI_DEVID_OCTEONTX2_RVU_AF 0xA065
+#define PCI_DEVID_OCTEONTX2_RVU_AFVF 0xA0F8
#define PCI_DEVID_OCTEONTX2_LBK 0xA061
/* Subsystem Device ID */
@@ -882,11 +883,10 @@ static inline bool is_rvu_supports_nix1(struct rvu *rvu)
/* Function Prototypes
* RVU
*/
-#define RVU_LBK_VF_DEVID 0xA0F8
static inline bool is_lbk_vf(struct rvu *rvu, u16 pcifunc)
{
return (!(pcifunc & ~RVU_PFVF_FUNC_MASK) &&
- (rvu->vf_devid == RVU_LBK_VF_DEVID));
+ (rvu->vf_devid == PCI_DEVID_OCTEONTX2_RVU_AFVF));
}
static inline bool is_vf(u16 pcifunc)
diff --git a/drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.h b/drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.h
index eecee612b7b2..5850bc1870a1 100644
--- a/drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.h
+++ b/drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.h
@@ -42,7 +42,6 @@
/* PCI device IDs */
#define PCI_DEVID_OCTEONTX2_RVU_PF 0xA063
#define PCI_DEVID_OCTEONTX2_RVU_VF 0xA064
-#define PCI_DEVID_OCTEONTX2_RVU_AFVF 0xA0F8
#define PCI_SUBSYS_DEVID_96XX_RVU_PFVF 0xB200
#define PCI_SUBSYS_DEVID_CN10K_A_RVU_PFVF 0xB900
--
2.25.1
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH net-next v2] octeontx2-af: consolidate RVU AFVF device id definitions
2026-09-10 10:41 [PATCH net-next v2] octeontx2-af: consolidate RVU AFVF device id definitions Jiangshan Yi
@ 2026-09-11 10:53 ` Simon Horman
2026-09-15 2:30 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 3+ messages in thread
From: Simon Horman @ 2026-09-11 10:53 UTC (permalink / raw)
To: Jiangshan Yi
Cc: sgoutham, rkannoth, gakula, sbhatta, andrew+netdev, davem,
edumazet, kuba, pabeni, netdev, linux-kernel, 13667453960
On Thu, Sep 10, 2026 at 06:41:02PM +0800, Jiangshan Yi wrote:
> commit f695390ea639 ("octeontx2-af: Fix limiting SRIOV VF count logic")
> added a local PCI_DEVID_OCTEONTX2_RVU_AFVF define in rvu.c, although
> the same value was already defined twice elsewhere: as RVU_LBK_VF_DEVID
> in af/rvu.h and as PCI_DEVID_OCTEONTX2_RVU_AFVF in nic/otx2_common.h.
>
> Move the definition into the "PCI device IDs" block in af/rvu.h, rename
> RVU_LBK_VF_DEVID to match the PCI_DEVID_* naming convention of its
> peers, and drop the redundant copies in rvu.c and nic/otx2_common.h,
> the latter already including <rvu.h> through the af include path.
>
> No functional change.
>
> Signed-off-by: Jiangshan Yi <yijiangshan@kylinos.cn>
> Acked-by: Ratheesh Kannoth <rkannoth@marvell.com>
> ---
> Changes in v2:
> - also drop the duplicate PCI_DEVID_OCTEONTX2_RVU_AFVF define in
> nic/otx2_common.h, which already includes <rvu.h>, so that all three
> definitions of this device id are consolidated into af/rvu.h
> (suggested by the Sashiko netdev review).
>
> Link: https://lore.kernel.org/r/20260908094051.666769-1-yijiangshan@kylinos.cn
Reviewed-by: Simon Horman <horms@kernel.org>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH net-next v2] octeontx2-af: consolidate RVU AFVF device id definitions
2026-09-10 10:41 [PATCH net-next v2] octeontx2-af: consolidate RVU AFVF device id definitions Jiangshan Yi
2026-09-11 10:53 ` Simon Horman
@ 2026-09-15 2:30 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+netdevbpf @ 2026-09-15 2:30 UTC (permalink / raw)
To: Jiangshan Yi
Cc: sgoutham, rkannoth, gakula, sbhatta, andrew+netdev, davem,
edumazet, kuba, pabeni, netdev, linux-kernel, 13667453960
Hello:
This patch was applied to netdev/net-next.git (main)
by Jakub Kicinski <kuba@kernel.org>:
On Thu, 10 Sep 2026 18:41:02 +0800 you wrote:
> commit f695390ea639 ("octeontx2-af: Fix limiting SRIOV VF count logic")
> added a local PCI_DEVID_OCTEONTX2_RVU_AFVF define in rvu.c, although
> the same value was already defined twice elsewhere: as RVU_LBK_VF_DEVID
> in af/rvu.h and as PCI_DEVID_OCTEONTX2_RVU_AFVF in nic/otx2_common.h.
>
> Move the definition into the "PCI device IDs" block in af/rvu.h, rename
> RVU_LBK_VF_DEVID to match the PCI_DEVID_* naming convention of its
> peers, and drop the redundant copies in rvu.c and nic/otx2_common.h,
> the latter already including <rvu.h> through the af include path.
>
> [...]
Here is the summary with links:
- [net-next,v2] octeontx2-af: consolidate RVU AFVF device id definitions
https://git.kernel.org/netdev/net-next/c/ce71c433395e
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:[~2026-09-15 2:31 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-09-10 10:41 [PATCH net-next v2] octeontx2-af: consolidate RVU AFVF device id definitions Jiangshan Yi
2026-09-11 10:53 ` Simon Horman
2026-09-15 2:30 ` 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
all inboxes | Powered by JetHome®