2022-02-07 11:05:02

by Haiyang Zhang

[permalink] [raw]
Subject: [PATCH net-next, 0/2] 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(-)

--
2.25.1



2022-02-07 17:34:56

by Haiyang Zhang

[permalink] [raw]
Subject: [PATCH net-next, 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.

Signed-off-by: Haiyang Zhang <[email protected]>
---
drivers/net/ethernet/microsoft/mana/mana_en.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/drivers/net/ethernet/microsoft/mana/mana_en.c b/drivers/net/ethernet/microsoft/mana/mana_en.c
index 69e791e6abc4..d2481a500654 100644
--- a/drivers/net/ethernet/microsoft/mana/mana_en.c
+++ b/drivers/net/ethernet/microsoft/mana/mana_en.c
@@ -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);
--
2.25.1


2022-02-07 18:38:47

by patchwork-bot+netdevbpf

[permalink] [raw]
Subject: Re: [PATCH net-next, 0/2] net: mana: Add handling of CQE_RX_TRUNCATED and a cleanup

Hello:

This series was applied to netdev/net-next.git (master)
by David S. Miller <[email protected]>:

On Fri, 4 Feb 2022 14:45:43 -0800 you wrote:
> 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(-)

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!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



2022-02-09 09:41:39

by Haiyang Zhang

[permalink] [raw]
Subject: RE: [PATCH net-next, 1/2] net: mana: Add handling of CQE_RX_TRUNCATED



> -----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 of CQE_RX_TRUNCATED
>
> On Sat, 5 Feb 2022 22:32:41 +0000 Haiyang Zhang wrote:
> > 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?
>
> 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!

2022-06-21 20:41:34

by Haiyang Zhang

[permalink] [raw]
Subject: RE: [PATCH net-next, 1/2] net: mana: Add handling of CQE_RX_TRUNCATED



> -----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 of
> CQE_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&amp;data=05%7C01%7Chaiyangz%40microsoft.com%7C9ecaef20f4
> c04a77741e08da53c45e7d%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0
> %7C637914400166157108%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAw
> MDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7
> C&amp;sdata=Lgg0cEUxQf3uhKHqAF0pTFcQvHj4NKkUCEuQ9elePvw%3D&amp;
> reserved=0
> for how to do this properly.
>
> </formletter>

Thanks. I will do.

- Haiyang