lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <MN2PR21MB12957F8F10E4B152E26421BBCA2A9@MN2PR21MB1295.namprd21.prod.outlook.com>
Date:   Sat, 5 Feb 2022 22:32:41 +0000
From:   Haiyang Zhang <haiyangz@...rosoft.com>
To:     "linux-hyperv@...r.kernel.org" <linux-hyperv@...r.kernel.org>,
        "netdev@...r.kernel.org" <netdev@...r.kernel.org>
CC:     Dexuan Cui <decui@...rosoft.com>,
        KY Srinivasan <kys@...rosoft.com>,
        Stephen Hemminger <sthemmin@...rosoft.com>,
        Paul Rosswurm <paulros@...rosoft.com>,
        Shachar Raindel <shacharr@...rosoft.com>,
        "olaf@...fle.de" <olaf@...fle.de>, vkuznets <vkuznets@...hat.com>,
        "davem@...emloft.net" <davem@...emloft.net>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: RE: [PATCH net-next, 1/2] net: mana: Add handling of CQE_RX_TRUNCATED



> -----Original Message-----
> From: LKML haiyangz <lkmlhyz@...rosoft.com> On Behalf Of Haiyang Zhang
> Sent: Friday, February 4, 2022 5:46 PM
> To: linux-hyperv@...r.kernel.org; netdev@...r.kernel.org
> Cc: Haiyang Zhang <haiyangz@...rosoft.com>; Dexuan Cui <decui@...rosoft.com>; KY
> Srinivasan <kys@...rosoft.com>; Stephen Hemminger <sthemmin@...rosoft.com>; Paul Rosswurm
> <paulros@...rosoft.com>; Shachar Raindel <shacharr@...rosoft.com>; olaf@...fle.de;
> vkuznets <vkuznets@...hat.com>; davem@...emloft.net; linux-kernel@...r.kernel.org
> 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 <haiyangz@...rosoft.com>
> ---
>  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);
> --

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ