* [net-next PATCH v2] octeontx2-pf: cn10k/cn20k: Update count_eot in NPA_LF_AURA_BATCH_FREE0
@ 2026-01-28 2:24 Geetha sowjanya
2026-01-29 16:36 ` Simon Horman
2026-01-30 3:40 ` patchwork-bot+netdevbpf
0 siblings, 2 replies; 3+ messages in thread
From: Geetha sowjanya @ 2026-01-28 2:24 UTC (permalink / raw)
To: netdev, linux-kernel
Cc: kuba, davem, pabeni, edumazet, andrew+netdev, sgoutham, gakula,
sbhatta, hkelam
This patch updates the count_eot calculation for CN20K devices.
Where the count_eot feild extended to 2 bits, while maintaining
CN10K compatibility where only bit 0 is used.
Signed-off-by: Geetha sowjanya <gakula@marvell.com>
---
v1-v2: Fix size value based on count_eot
.../ethernet/marvell/octeontx2/nic/otx2_common.h | 13 ++++++++++---
1 file changed, 10 insertions(+), 3 deletions(-)
diff --git a/drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.h b/drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.h
index 8cdfc36d79d2..255c7e2633bb 100644
--- a/drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.h
+++ b/drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.h
@@ -789,8 +789,15 @@ static inline void __cn10k_aura_freeptr(struct otx2_nic *pfvf, u64 aura,
tar_addr = (__force u64)otx2_get_regaddr(pfvf, NPA_LF_AURA_BATCH_FREE0);
/* LMTID is same as AURA Id */
val = (lmt_info->lmt_id & 0x7FF) | BIT_ULL(63);
- /* Set if [127:64] of last 128bit word has a valid pointer */
- count_eot = (num_ptrs % 2) ? 0ULL : 1ULL;
+ /* Meaning of count_eot
+ * CN10K: count_eot = 0 if the number of pointers to free is even,
+ * count_eot = 1 if the number of pointers to free is odd.
+ *
+ * CN20K: count_eot represents the least significant 2 bits of the
+ * total number of valid pointers to free.
+ * Example: if 7 pointers are freed (0b111), count_eot = 0b11.
+ */
+ count_eot = (num_ptrs - 1) & 0x3ULL;
/* Set AURA ID to free pointer */
ptrs[0] = (count_eot << 32) | (aura & 0xFFFFF);
/* Target address for LMTST flush tells HW how many 128bit
@@ -800,7 +807,7 @@ static inline void __cn10k_aura_freeptr(struct otx2_nic *pfvf, u64 aura,
*/
if (num_ptrs > 2) {
size = (sizeof(u64) * num_ptrs) / 16;
- if (!count_eot)
+ if (!(count_eot & 1))
size++;
tar_addr |= ((size - 1) & 0x7) << 4;
}
--
2.25.1
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [net-next PATCH v2] octeontx2-pf: cn10k/cn20k: Update count_eot in NPA_LF_AURA_BATCH_FREE0
2026-01-28 2:24 [net-next PATCH v2] octeontx2-pf: cn10k/cn20k: Update count_eot in NPA_LF_AURA_BATCH_FREE0 Geetha sowjanya
@ 2026-01-29 16:36 ` Simon Horman
2026-01-30 3:40 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 3+ messages in thread
From: Simon Horman @ 2026-01-29 16:36 UTC (permalink / raw)
To: Geetha sowjanya
Cc: netdev, linux-kernel, kuba, davem, pabeni, edumazet,
andrew+netdev, sgoutham, sbhatta, hkelam
On Wed, Jan 28, 2026 at 07:54:48AM +0530, Geetha sowjanya wrote:
> This patch updates the count_eot calculation for CN20K devices.
> Where the count_eot feild extended to 2 bits, while maintaining
> CN10K compatibility where only bit 0 is used.
>
> Signed-off-by: Geetha sowjanya <gakula@marvell.com>
> ---
> v1-v2: Fix size value based on count_eot
Reviewed-by: Simon Horman <horms@kernel.org>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [net-next PATCH v2] octeontx2-pf: cn10k/cn20k: Update count_eot in NPA_LF_AURA_BATCH_FREE0
2026-01-28 2:24 [net-next PATCH v2] octeontx2-pf: cn10k/cn20k: Update count_eot in NPA_LF_AURA_BATCH_FREE0 Geetha sowjanya
2026-01-29 16:36 ` Simon Horman
@ 2026-01-30 3:40 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+netdevbpf @ 2026-01-30 3:40 UTC (permalink / raw)
To: Geetha sowjanya
Cc: netdev, linux-kernel, kuba, davem, pabeni, edumazet,
andrew+netdev, sgoutham, sbhatta, hkelam
Hello:
This patch was applied to netdev/net-next.git (main)
by Jakub Kicinski <kuba@kernel.org>:
On Wed, 28 Jan 2026 07:54:48 +0530 you wrote:
> This patch updates the count_eot calculation for CN20K devices.
> Where the count_eot feild extended to 2 bits, while maintaining
> CN10K compatibility where only bit 0 is used.
>
> Signed-off-by: Geetha sowjanya <gakula@marvell.com>
> ---
> v1-v2: Fix size value based on count_eot
>
> [...]
Here is the summary with links:
- [net-next,v2] octeontx2-pf: cn10k/cn20k: Update count_eot in NPA_LF_AURA_BATCH_FREE0
https://git.kernel.org/netdev/net-next/c/988719c5eafd
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-01-30 3:40 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-01-28 2:24 [net-next PATCH v2] octeontx2-pf: cn10k/cn20k: Update count_eot in NPA_LF_AURA_BATCH_FREE0 Geetha sowjanya
2026-01-29 16:36 ` Simon Horman
2026-01-30 3:40 ` 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