net: mana: Add handling of CQE_RX_TRUNCATED and a cleanup
Haiyang Zhang
maintainercover net: mana: Add handling of CQE_RX_TRUNCATED and a cleanup
Add handling of CQE_RX_TRUNCATED and a cleanup patch
Haiyang Zhang (2):
net: mana: Add handling of CQE_RX_TRUNCATED
net: mana: Remove unnecessary check of cqe_type in mana_process_rx_cqe()
drivers/net/ethernet/microsoft/mana/mana_en.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)
Signature · 1 line
2.25.1
Haiyang Zhang
maintainerPATCH 1/2 net: mana: Add handling of CQE_RX_TRUNCATED
The proper way to drop this kind of CQE is advancing rxq tail without indicating the packet to the upper network layer.
--- drivers/net/ethernet/microsoft/mana/mana_en.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-)
drivers/net/ethernet/microsoft/mana/mana_en.c +5 -2
@@ -1085,8 +1085,10 @@ static void mana_process_rx_cqe(struct mana_rxq *rxq, struct mana_cq *cq,break ;case CQE_RX_TRUNCATED : -netdev_err (ndev,"Dropped a truncated packet\n" ); -return ; + ++ndev->stats.rx_dropped; + rxbuf_oob = &rxq->rx_oobs[rxq->buf_index]; +netdev_warn_once (ndev,"Dropped a truncated packet\n" ); + goto drop;case CQE_RX_COALESCED_4 :netdev_err (ndev,"RX coalescing is unsupported\n" );
@@ -1154,6 +1156,7 @@ static void mana_process_rx_cqe(struct mana_rxq *rxq, struct mana_cq *cq,mana_rx_skb (old_buf, oob, rxq); +drop:mana_move_wq_tail (rxq->gdma_rq, rxbuf_oob->wqe_inf.wqe_size_in_bu);mana_post_pkt_rxq (rxq);
Signature · 1 line
2.25.1
Haiyang Zhang
maintainerPATCH 2/2 net: mana: Remove unnecessary check of cqe_type in mana_process_rx_cqe()
In reply to Haiyang ZhangThe switch statement already ensures cqe_type == CQE_RX_OKAY at that point.
--- drivers/net/ethernet/microsoft/mana/mana_en.c | 3 --- 1 file changed, 3 deletions(-)
drivers/net/ethernet/microsoft/mana/mana_en.c +0 -3
@@ -1104,9 +1104,6 @@ static void mana_process_rx_cqe(struct mana_rxq *rxq, struct mana_cq *cq,return ; } -if (oob->cqe_hdr.cqe_type !=CQE_RX_OKAY ) -return ; - pktlen = oob->ppi[0 ].pkt_len;if (pktlen ==0 ) {
Signature · 1 line
2.25.1
RE: [PATCH net-next, 1/2] net: mana: Add handling of CQE_RX_TRUNCATED
In reply to Haiyang ZhangQuoted 7 lines
From: LKML haiyangz <[email protected]> On Behalf Of Haiyang Zhang
Sent: Friday, February 4, 2022 2:46 PM
..
The proper way to drop this kind of CQE is advancing rxq tail without indicating the packet to the upper network layer.Signed-off-by Haiyang Zhang <[email protected]>
RE: [PATCH net-next, 2/2] net: mana: Remove unnecessary check of cqe_type in mana_process_rx_cqe()
In reply to Haiyang ZhangQuoted 7 lines
From: LKML haiyangz <[email protected]> On Behalf Of Haiyang Zhang
Sent: Friday, February 4, 2022 2:46 PM
...
The switch statement already ensurescqe_type==CQE_RX_OKAYat that point.Signed-off-by Haiyang Zhang <[email protected]>
This series was applied to netdev/net-next.git (master) by David S. Miller <[email protected]>:
Hello:
This series was applied to netdev/net-next.git (master) by David S. Miller <[email protected]>:
Quoted 8 lines · On Fri, 4 Feb 2022 14:45:43 -0800 you wrote:
Add handling of
CQE_RX_TRUNCATEDand a cleanup patchHaiyang Zhang (2):
net: mana: Add handling ofCQE_RX_TRUNCATED
net: mana: Remove unnecessary check ofcqe_typeinmana_process_rx_cqe()drivers/net/ethernet/microsoft/mana/mana_en.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)
Here is the summary with links:
- [net-next,1/2] net: mana: Add handling of CQE_RX_TRUNCATED
https://git.kernel.org/netdev/net-next/c/e4b7621982d2 - [net-next,2/2] net: mana: Remove unnecessary check of cqe_type in mana_process_rx_cqe() https://git.kernel.org/netdev/net-next/c/68f831355052
You are awesome, thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html
Haiyang Zhang
maintainerRE: [PATCH net-next, 1/2] net: mana: Add handling of CQE_RX_TRUNCATED
In reply to Haiyang ZhangQuoted 47 lines
-----Original Message-----
From: LKML haiyangz <[email protected]> On Behalf Of Haiyang Zhang
Sent: Friday, February 4, 2022 5:46 PM
To: [email protected]; [email protected]
Cc: Haiyang Zhang <[email protected]>; Dexuan Cui <[email protected]>; KY Srinivasan <[email protected]>; Stephen Hemminger <[email protected]>; Paul Rosswurm <[email protected]>; Shachar Raindel <[email protected]>; [email protected]; vkuznets <[email protected]>; [email protected]; [email protected]
Subject: [PATCH net-next, 1/2] net: mana: Add handling ofCQE_RX_TRUNCATEDThe proper way to drop this kind of CQE is advancing rxq tail without indicating the packet to the upper network layer.
Signed-off-by Haiyang Zhang <[email protected]>--- drivers/net/ethernet/microsoft/mana/mana_en.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-)drivers/net/ethernet/microsoft/mana/mana_en.c +4
-2@@ -1085,8 +1085,10 @@ static void mana_process_rx_cqe(struct mana_rxq *rxq, structmana_cq *cq, break;case CQE_RX_TRUNCATED : -netdev_err (ndev,"Dropped a truncated packet\n" ); -return ; + ++ndev->stats.rx_dropped; + rxbuf_oob = &rxq->rx_oobs[rxq->buf_index]; +netdev_warn_once (ndev,"Dropped a truncated packet\n" ); + goto drop;case CQE_RX_COALESCED_4 :drivers/net/ethernet/microsoft/mana/mana_en.c +1
-0netdev_err (ndev,"RX coalescing is unsupported\n" );@@ -1154,6 +1156,7 @@ static void mana_process_rx_cqe(struct mana_rxq *rxq, struct mana_cq *cq,mana_rx_skb (old_buf, oob, rxq); +drop:mana_move_wq_tail (rxq->gdma_rq, rxbuf_oob->wqe_inf.wqe_size_in_bu);
Quoted 2 lines
mana_post_pkt_rxq(rxq);
--
To netdev maintainers:
Since the proper handling of CQE_RX_TRUNCATED type is important, could any of you backport this patch to the stable branches: 5.16 & 5.15?
Thanks,
- Haiyang
Jakub Kicinski
maintainerRe: [PATCH net-next, 1/2] net: mana: Add handling of CQE_RX_TRUNCATED
Quoted 2 lines · On Sat, 5 Feb 2022 22:32:41 +0000 Haiyang Zhang wrote:
Since the proper handling of
CQE_RX_TRUNCATEDtype is important, could any of you backport this patch to the stable branches: 5.16 & 5.15?
Only patches which are in Linus's tree can be backported to stable. You sent this change for -next so no, it can't be backported now. You need to wait until 5.17 final is released and then ask Greg KH to backport it.
Haiyang Zhang
maintainerRE: [PATCH net-next, 1/2] net: mana: Add handling of CQE_RX_TRUNCATED
Quoted 12 lines
-----Original Message-----
From: Jakub Kicinski <[email protected]>
Sent: Monday, February 7, 2022 12:12 PM
To: Haiyang Zhang <[email protected]>
Cc: [email protected]; [email protected]; Dexuan Cui <[email protected]>; KY Srinivasan <[email protected]>; Stephen Hemminger <[email protected]>; Paul Rosswurm <[email protected]>; Shachar Raindel <[email protected]>; [email protected]; vkuznets <[email protected]>; [email protected]; [email protected]
Subject: Re: [PATCH net-next, 1/2] net: mana: Add handling ofCQE_RX_TRUNCATED
Quoted 8 lines
Quoted 2 lines · On Sat, 5 Feb 2022 22:32:41 +0000 Haiyang Zhang wrote:
Since the proper handling of
CQE_RX_TRUNCATEDtype is important, could any of you backport this patch to the stable branches: 5.16 & 5.15?Only patches which are in Linus's tree can be backported to stable. You sent this change for -next so no, it can't be backported now. You need to wait until 5.17 final is released and then ask Greg KH to backport it.
Will do.
Thanks!
Haiyang Zhang
maintainerRE: [PATCH net-next, 1/2] net: mana: Add handling of CQE_RX_TRUNCATED
In reply to Jakub KicinskiQuoted 16 lines
-----Original Message-----
From: Jakub Kicinski <[email protected]>
Sent: Monday, February 7, 2022 12:12 PM
To: Haiyang Zhang <[email protected]>
Cc: [email protected]; [email protected]; Dexuan Cui <[email protected]>; KY Srinivasan <[email protected]>; Stephen Hemminger <[email protected]>; Paul Rosswurm <[email protected]>; Shachar Raindel <[email protected]>; [email protected]; vkuznets <[email protected]>; [email protected]; [email protected]
Subject: Re: [PATCH net-next, 1/2] net: mana: Add handling ofCQE_RX_TRUNCATEDOn Sat, 5 Feb 2022 22:32:41 +0000 Haiyang Zhang wrote:
Quoted 8 lines
Quoted 1 line
Since the proper handling of
CQE_RX_TRUNCATEDtype is important, couldany
Quoted 1 line
of you backport this patch to the stable branches: 5.16 & 5.15?
Only patches which are in Linus's tree can be backported to stable. You sent this change for -next so no, it can't be backported now. You need to wait until 5.17 final is released and then ask Greg KH to backport it.
@Greg KH <[email protected]>
Hi Greg,
This patch is on 5.18 now:
net: mana: Add handling of CQE_RX_TRUNCATED https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.18.5&id=e4b7621982d29f26ff4d39af389e5e675a4ffed4
Could you backport it to 5.15?
Thanks,
- Haiyang
Re: [PATCH net-next, 1/2] net: mana: Add handling of CQE_RX_TRUNCATED
Quoted 27 lines · Haiyang Zhang
Quoted 16 lines
-----Original Message-----
From: Jakub Kicinski <[email protected]>
Sent: Monday, February 7, 2022 12:12 PM
To: Haiyang Zhang <[email protected]>
Cc: [email protected]; [email protected]; Dexuan Cui <[email protected]>; KY Srinivasan <[email protected]>; Stephen Hemminger <[email protected]>; Paul Rosswurm <[email protected]>; Shachar Raindel <[email protected]>; [email protected]; vkuznets <[email protected]>; [email protected]; [email protected]
Subject: Re: [PATCH net-next, 1/2] net: mana: Add handling ofCQE_RX_TRUNCATEDOn Sat, 5 Feb 2022 22:32:41 +0000 Haiyang Zhang wrote:
Quoted 8 lines
Quoted 1 line
Since the proper handling of
CQE_RX_TRUNCATEDtype is important, couldany
Quoted 1 line
of you backport this patch to the stable branches: 5.16 & 5.15?
Only patches which are in Linus's tree can be backported to stable. You sent this change for -next so no, it can't be backported now. You need to wait until 5.17 final is released and then ask Greg KH to backport it.
@Greg KH <[email protected]>
Quoted 7 lines
Hi Greg,
This patch is on 5.18 now:
net: mana: Add handling of CQE_RX_TRUNCATED https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.18.5&id=e4b7621982d29f26ff4d39af389e5e675a4ffed4Could you backport it to 5.15?
<formletter>
This is not the correct way to submit patches for inclusion in the stable kernel tree. Please read:
https://www.kernel.org/doc/html/latest/process/stable-kernel-rules.html
for how to do this properly.
</formletter>
Haiyang Zhang
maintainerRE: [PATCH net-next, 1/2] net: mana: Add handling of CQE_RX_TRUNCATED
Quoted 30 lines
-----Original Message-----
From: Greg KH <[email protected]>
Sent: Tuesday, June 21, 2022 4:27 PM
To: Haiyang Zhang <[email protected]>
Cc: Jakub Kicinski <[email protected]>; [email protected]; [email protected]; Dexuan Cui <[email protected]>; KY Srinivasan <[email protected]>; Stephen Hemminger <[email protected]>; Paul Rosswurm <[email protected]>; Shachar Raindel <[email protected]>; [email protected]; vkuznets <[email protected]>; [email protected]; [email protected]
Subject: Re: [PATCH net-next, 1/2] net: mana: Add handling ofCQE_RX_TRUNCATED<formletter>
This is not the correct way to submit patches for inclusion in the stable kernel tree. Please read:
https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.ker
nel.org%2Fdoc%2Fhtml%2Flatest%2Fprocess%2Fstable-kernel- rules.html&data=05%7C01%7Chaiyangz%40microsoft.com%7C9ecaef20f4 c04a77741e08da53c45e7d%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0 %7C637914400166157108%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAw MDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7 C&sdata=Lgg0cEUxQf3uhKHqAF0pTFcQvHj4NKkUCEuQ9elePvw%3D& reserved=0
for how to do this properly.
Quoted 1 line
</formletter>
Thanks. I will do.
- Haiyang