* [PATCH] net/mana: fix counter overflow for posted WQE
@ 2023-07-10 21:34 longli
2023-07-10 23:51 ` [Patch v2] " longli
0 siblings, 1 reply; 3+ messages in thread
From: longli @ 2023-07-10 21:34 UTC (permalink / raw)
To: Ferruh Yigit, Andrew Rybchenko
Cc: dev, Ajay Sharma, Xinhao Kong, Long Li, stable
From: Long Li <longli@microsoft.com>
This counter should set to uint16_t, the same type as pkt_received.
Otherwise, it may overflow when pkt_received goes over 256.
Thanks Xinhao Kong <t-kongxinhao@microsoft.com> for debugging.
Fixes: 517ed6e2d590 ("net/mana: add basic driver with build environment")
Cc: stable@dpdk.org
---
drivers/net/mana/rx.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/mana/rx.c b/drivers/net/mana/rx.c
index 1047ac1743..b840e402f9 100644
--- a/drivers/net/mana/rx.c
+++ b/drivers/net/mana/rx.c
@@ -399,7 +399,7 @@ uint16_t
mana_rx_burst(void *dpdk_rxq, struct rte_mbuf **pkts, uint16_t pkts_n)
{
uint16_t pkt_received = 0;
- uint8_t wqe_posted = 0;
+ uint16_t wqe_posted = 0;
struct mana_rxq *rxq = dpdk_rxq;
struct mana_priv *priv = rxq->priv;
struct rte_mbuf *mbuf;
--
2.34.1
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Patch v2] net/mana: fix counter overflow for posted WQE
2023-07-10 21:34 [PATCH] net/mana: fix counter overflow for posted WQE longli
@ 2023-07-10 23:51 ` longli
2023-07-11 10:18 ` Ferruh Yigit
0 siblings, 1 reply; 3+ messages in thread
From: longli @ 2023-07-10 23:51 UTC (permalink / raw)
To: Ferruh Yigit, Andrew Rybchenko; +Cc: dev, Ajay Sharma, Long Li, stable
From: Long Li <longli@microsoft.com>
This counter should set to uint16_t, the same type as pkt_received.
Otherwise, it may overflow when pkt_received goes over 256.
Thanks Xinhao Kong <t-kongxinhao@microsoft.com> for debugging this.
Fixes: 517ed6e2d590 ("net/mana: add basic driver with build environment")
Cc: stable@dpdk.org
Signed-off-by: Long Li <longli@microsoft.com>
---
Change log:
v2: added "Signed-off-by"
drivers/net/mana/rx.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/mana/rx.c b/drivers/net/mana/rx.c
index 1047ac1743..b840e402f9 100644
--- a/drivers/net/mana/rx.c
+++ b/drivers/net/mana/rx.c
@@ -399,7 +399,7 @@ uint16_t
mana_rx_burst(void *dpdk_rxq, struct rte_mbuf **pkts, uint16_t pkts_n)
{
uint16_t pkt_received = 0;
- uint8_t wqe_posted = 0;
+ uint16_t wqe_posted = 0;
struct mana_rxq *rxq = dpdk_rxq;
struct mana_priv *priv = rxq->priv;
struct rte_mbuf *mbuf;
--
2.34.1
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Patch v2] net/mana: fix counter overflow for posted WQE
2023-07-10 23:51 ` [Patch v2] " longli
@ 2023-07-11 10:18 ` Ferruh Yigit
0 siblings, 0 replies; 3+ messages in thread
From: Ferruh Yigit @ 2023-07-11 10:18 UTC (permalink / raw)
To: longli, Andrew Rybchenko; +Cc: dev, Ajay Sharma, Long Li, stable
On 7/11/2023 12:51 AM, longli@linuxonhyperv.com wrote:
> From: Long Li <longli@microsoft.com>
>
> This counter should set to uint16_t, the same type as pkt_received.
> Otherwise, it may overflow when pkt_received goes over 256.
>
> Thanks Xinhao Kong <t-kongxinhao@microsoft.com> for debugging this.
>
> Fixes: 517ed6e2d590 ("net/mana: add basic driver with build environment")
> Cc: stable@dpdk.org
>
> Signed-off-by: Long Li <longli@microsoft.com>
>
Applied to dpdk-next-net/main, thanks.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-07-11 10:18 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-07-10 21:34 [PATCH] net/mana: fix counter overflow for posted WQE longli
2023-07-10 23:51 ` [Patch v2] " longli
2023-07-11 10:18 ` Ferruh Yigit
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).