From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 5A522A050D for ; Tue, 26 Apr 2022 23:57:06 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 547F2427FC; Tue, 26 Apr 2022 23:57:06 +0200 (CEST) Received: from NAM12-MW2-obe.outbound.protection.outlook.com (mail-mw2nam12on2043.outbound.protection.outlook.com [40.107.244.43]) by mails.dpdk.org (Postfix) with ESMTP id 51D7C40691; Tue, 26 Apr 2022 23:57:03 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ZNQqu/pGBqSAxgXBfcDb+Sg4Rh4PoZqoqQN1oX96jXGeRJls09gOQ+VAeOxwxSTkWlHdSXlGXZVpZvT/64ysk8/v2OhD6e/rvUc1zUWERuUcPRHZOJ1S6rL/p+TWvHTR/JzipgI4UmFQvoDYlfl1ufzN0rSapULNFTML5p+nX1e/7BT76PDSjJjUBcx38vEIybYRJdZoT3hWO2xf3h2fWghqYCSkgwo31C+0wCy25Q1ie2AgXCZ67TemWfgfdukyhtEHQZ+dMiuQSE+nP+yu8uaooWwg17qXbf3v2cSeELS/5jAl6sFn4GkvKagtpfARqpJ6bcazRp5zrIPQGKsJQw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=AQTGsftmU4o1PjFIeUuHX4fk88MyyaYcDODwcOl4aj0=; b=BwYmAuXskn8D9toyt5QRE/9OKJ04dWIm6ErbVQ48CmExOdGVhDRFgLUdNj70K43wqPmmfnkkxT5puLMLtBMYUjb4AVRpAczNErLrYhxsyZSN7Zp8TgDpUJ+m3QA7M1FropAgqcPxdvmoDVsq5A14ks7XHbXTYV3qUkqnPuhrHdx8tMaoeY+6U9eZTjEF+YUQ1GXVyp5zEYHj32LS9TUZDJlFhwsSJTsifdWFGK73bYJxNJirrOohBGdhP7/O7jXlGwe/GxOuZXo00FnxwHYhnfUyOVx77ujm/02vEETFFU/enIEJiT3TWB5RFFG21GwDADMQgznW5W7xJvPil91w7Q== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 149.199.80.198) smtp.rcpttodomain=broadcom.com smtp.mailfrom=xilinx.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=xilinx.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=xilinx.onmicrosoft.com; s=selector2-xilinx-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=AQTGsftmU4o1PjFIeUuHX4fk88MyyaYcDODwcOl4aj0=; b=sEqjCPk8HicEfgeoR2vveHw2x+xnPdDLmTZ+nEg/DTnBwDKowxykuJtnthInWkoBPsQ/KsDmBuEDmvKUc7uej49q/ZWaYX0g7j4ptY3gtzbL3M+AQJF5Z20UODEaLPqB09NueeFOx7t6QP5Js4SM+lKk4eRuT9TPtnh71shcyBA= Received: from DM6PR08CA0065.namprd08.prod.outlook.com (2603:10b6:5:1e0::39) by BYAPR02MB4696.namprd02.prod.outlook.com (2603:10b6:a03:43::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5186.14; Tue, 26 Apr 2022 21:57:00 +0000 Received: from DM3NAM02FT064.eop-nam02.prod.protection.outlook.com (2603:10b6:5:1e0:cafe::cc) by DM6PR08CA0065.outlook.office365.com (2603:10b6:5:1e0::39) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5186.13 via Frontend Transport; Tue, 26 Apr 2022 21:56:59 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 149.199.80.198) smtp.mailfrom=xilinx.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=xilinx.com; Received-SPF: Pass (protection.outlook.com: domain of xilinx.com designates 149.199.80.198 as permitted sender) receiver=protection.outlook.com; client-ip=149.199.80.198; helo=xir-pvapexch01.xlnx.xilinx.com; Received: from xir-pvapexch01.xlnx.xilinx.com (149.199.80.198) by DM3NAM02FT064.mail.protection.outlook.com (10.13.4.192) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.5186.14 via Frontend Transport; Tue, 26 Apr 2022 21:56:59 +0000 Received: from xir-pvapexch02.xlnx.xilinx.com (172.21.17.17) by xir-pvapexch01.xlnx.xilinx.com (172.21.17.15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2176.14; Tue, 26 Apr 2022 22:56:58 +0100 Received: from smtp.xilinx.com (172.21.105.198) by xir-pvapexch02.xlnx.xilinx.com (172.21.17.17) with Microsoft SMTP Server id 15.1.2176.14 via Frontend Transport; Tue, 26 Apr 2022 22:56:58 +0100 Envelope-to: ajit.khaparde@broadcom.com, somnath.kotur@broadcom.com, hemant.agrawal@nxp.com, sachin.saxena@oss.nxp.com, xuanziyang2@huawei.com, cloud.wangxiaoyun@huawei.com, zhouguoyang@huawei.com, aboyer@pensando.io, sthotton@marvell.com, srinivasan@marvell.com, matan@nvidia.com, viacheslavo@nvidia.com, zr@semihalf.com, lironh@marvell.com, rmody@marvell.com, dsinghrawat@marvell.com, longli@microsoft.com, stable@dpdk.org, longli@linuxonhyperv.com, sthemmin@microsoft.com, dev@dpdk.org Received: from [10.71.118.71] (port=57425) by smtp.xilinx.com with esmtp (Exim 4.90) (envelope-from ) id 1njTB4-00063v-Ah; Tue, 26 Apr 2022 22:56:58 +0100 Message-ID: <2f759901-4b8f-c273-0c36-50fa12e984a6@xilinx.com> Date: Tue, 26 Apr 2022 22:56:57 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.8.1 Subject: Re: [Patch v2] net/netvsc: fix the calculation of checksums based on mbuf flag Content-Language: en-US To: Ajit Khaparde , Somnath Kotur , Hemant Agrawal , Sachin Saxena , Ziyang Xuan , Xiaoyun Wang , Guoyang Zhou , Andrew Boyer , Shijith Thotton , Srisivasubramanian Srinivasan , Matan Azrad , Viacheslav Ovsiienko , Zyta Szpak , Liron Himi , Rasesh Mody , Devendra Singh Rawat CC: Long Li , , , Stephen Hemminger , References: <1648143968-17947-1-git-send-email-longli@linuxonhyperv.com> From: Ferruh Yigit In-Reply-To: <1648143968-17947-1-git-send-email-longli@linuxonhyperv.com> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 8f41ad5b-d186-4f86-130a-08da27cfb068 X-MS-TrafficTypeDiagnostic: BYAPR02MB4696:EE_ X-Microsoft-Antispam-PRVS: X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: tdpnandXacw08WJd/tEShemq/e8PQxHjTle7gd/nvsrDGTX3dQk1V6DHlEMo/Xqp78pZ/ZYKGiPPn6t2FCeoDh9D8hSORKdcLm/llD+czG7Ivadq4JBoB9RgWPp81iXfdIF8mPlWTCJ2G644JyQwflziKU1zqRX3PRXOYEoTfO5xeYlnwef3uCD58TkiqC11FE2KK/7op0MfcUasaB/ntGycpGpO3XgpcSPcnUynzoltdET9K5x3biHqe7pEh7JncqWTN2S1PNL97WPCUXv8asefTbO32PEu9yNSquYVrIwPkMgdPTos/Usd+x3J7AhMZeJlhAoKtpMNc9igYV1xN7kl5ZOj3Qluu9MwZi/EDMJN8o3OUQIVEENYtRSbVRjZyG6+2HuAjU9rCGrGiC33xis1dv4PqsmBLXjKp8o4qLFyJLz+WvNuP5o1WcydiqXHEp3ZBkK7KPw4rWQeKfIFbTLsu+dl1FcxoEThPO86lx7tjoNawiWkGy3ap8vgkzVzSV1d6dpjRPrQOBI5kwxSxUuiXD2I1PD2EE7m1XJX8Sa/hQ9XjmV5+lbsKH8ZFb0qmWL9exFZNzsV3LvECLAp8UBvzEjc/Lsm5vnP2qb3iqgnWKRNjUESPoxODkNJ8HgR/dD/UelWw/WIuuP66urEZiH4fvCL5/7cejyq9fLPEdu+QY/nuxsS5p+koP7W0HMIMiyDOFrvHG6P/yeqwRIuGbTxD9qAyFHsGbecoP0QsZpP0ghcScy7nI4APpYG/Ypf X-Forefront-Antispam-Report: CIP:149.199.80.198; CTRY:IE; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:xir-pvapexch01.xlnx.xilinx.com; PTR:unknown-80-198.xilinx.com; CAT:NONE; SFS:(13230001)(4636009)(36840700001)(46966006)(40470700004)(4326008)(2616005)(53546011)(44832011)(26005)(45080400002)(5660300002)(2906002)(83380400001)(921005)(356005)(31696002)(8676002)(8936002)(9786002)(40460700003)(7416002)(36860700001)(508600001)(316002)(82310400005)(36756003)(186003)(31686004)(110136005)(336012)(426003)(70586007)(70206006)(47076005)(54906003)(7636003)(50156003)(43740500002); DIR:OUT; SFP:1101; X-OriginatorOrg: xilinx.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Apr 2022 21:56:59.5483 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 8f41ad5b-d186-4f86-130a-08da27cfb068 X-MS-Exchange-CrossTenant-Id: 657af505-d5df-48d0-8300-c31994686c5c X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=657af505-d5df-48d0-8300-c31994686c5c; Ip=[149.199.80.198]; Helo=[xir-pvapexch01.xlnx.xilinx.com] X-MS-Exchange-CrossTenant-AuthSource: DM3NAM02FT064.eop-nam02.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BYAPR02MB4696 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org On 3/24/2022 5:46 PM, longli@linuxonhyperv.com wrote: > From: Long Li > > The netvsc should use RTE_MBUF_F_TX_L4_MASK and check the masked value to > decide the correct way to calculate checksums. > > Not checking for RTE_MBUF_F_TX_L4_MASK results in incorrect RNDIS packets > sent to VSP and incorrect checksums calculated by the VSP. > > Fixes: 4e9c73e96e ("net/netvsc: add Hyper-V network device") > Cc: stable@dpdk.org > Signed-off-by: Long Li > --- > drivers/net/netvsc/hn_rxtx.c | 13 +++++++++---- > 1 file changed, 9 insertions(+), 4 deletions(-) > > diff --git a/drivers/net/netvsc/hn_rxtx.c b/drivers/net/netvsc/hn_rxtx.c > index 028f176c7e..34f40be5b8 100644 > --- a/drivers/net/netvsc/hn_rxtx.c > +++ b/drivers/net/netvsc/hn_rxtx.c > @@ -1348,8 +1348,11 @@ static void hn_encap(struct rndis_packet_msg *pkt, > *pi_data = NDIS_LSO2_INFO_MAKEIPV4(hlen, > m->tso_segsz); > } > - } else if (m->ol_flags & > - (RTE_MBUF_F_TX_TCP_CKSUM | RTE_MBUF_F_TX_UDP_CKSUM | RTE_MBUF_F_TX_IP_CKSUM)) { > + } else if ((m->ol_flags & RTE_MBUF_F_TX_L4_MASK) == > + RTE_MBUF_F_TX_TCP_CKSUM || > + (m->ol_flags & RTE_MBUF_F_TX_L4_MASK) == > + RTE_MBUF_F_TX_UDP_CKSUM || > + (m->ol_flags & RTE_MBUF_F_TX_IP_CKSUM)) { As far as I can see following drivers also has similar issue, can maintainers (cc'ed) of below drivers check: bnxt dpaa hnic ionic liquidio mlx4 mvneta mvpp2 qede