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 EC754428A3; Sun, 2 Apr 2023 14:26:48 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 7C0DE40EDE; Sun, 2 Apr 2023 14:26:48 +0200 (CEST) Received: from NAM12-BN8-obe.outbound.protection.outlook.com (mail-bn8nam12on2063.outbound.protection.outlook.com [40.107.237.63]) by mails.dpdk.org (Postfix) with ESMTP id 29DB240ED5; Sun, 2 Apr 2023 14:26:47 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=VJyT98GQyy6EiyUFvv6QpYjhoK54aGb6pFv6tpuAUU1B1ar8xzMHBEB2FDy4YXtoiyHnrdI5YtnxWbxWulAigG1ciskofORMv/GIpNkUSN8pr/hEKEC6jnTyqaXRL3vMpoqhyt25gIPPzgKU6H7ssaq+na54oOGf6XdTdtgAfjU/eeqR1SnbOIvTBDIUqhzqBWoqBgURk0TdIkMKLrB2QVCO2Zq6eH0nEVoj7+ajJAuppWqv3oVnkszKRgFWq/j3n1bEk5ntum6rDXMDlaCB+/2Ho0RqPaYlaaeYjxR/QiCr7LTp/90OhvpsboiOcdoXWSGtVQGfde0vBQz8Yu3jQg== 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=Yptff2f9OAN5nZqJ5G1D+DF8Zsfm8mCeYn5IH2pSVY4=; b=JUNaThCKr6F0IvkFOlDtekOfvTzz6ED9Lfm03DNPfrkaUBlpHdiq994efoW8epyQVgrfn1TJPR9tbGRS55R9lkraEgh8b1aap4LwcTN59plS/xD/8DWrn8aZnDuF4WhEUJhh/8Te+6YRRRRolrblz1h3gmU/nhBesbmqK2IdCuWDbCDMDam7vlza5D9S5qTqHsJBIWhexN7n2y1C0P95VD9EC2ey5bfXbytjvZZt8yLA1FEBelv4hz1D6VN3oWEYhTS7hSyxfoWietb9hteEzh02K2bMXmk21kLEj/3EhHsZTpn2ufh2WqNLNBfcHLuEgB1jfn46h3rA8V3GJ0oLZg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.160) smtp.rcpttodomain=monjalon.net smtp.mailfrom=nvidia.com; dmarc=pass (p=reject sp=reject pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Yptff2f9OAN5nZqJ5G1D+DF8Zsfm8mCeYn5IH2pSVY4=; b=UYqcPMAUokdp3H3PjtRTooHRL15xOHKuiDrdHSKttDXHA8r5SIKezpU0xqSWSVPQHTcZuevVnqmyilGm+jH2yjypwE2/hbWjKxNJpZlezbjvedN7VCbghWBZEcJB5cyeHmR6Y3HKvcj5orkXh4+BN61EpXX5gVoBHLK/1h7F5BdVa9sdH3z+605Tp4rOw3yRvXknnxQc/L7qLLovlyP4HWnsSR/3/Gl7/IfbPVsc2C+f/ZiGvRyD9TGvZ9riEt0IrFzCXt5SwU5c9IbuwP38/kQfojO0wWtK3YAQRj1IlDbC8UjSZ/VzGDc2dNQQE9kHyLD+T53eq47h8zjRNPsF1Q== Received: from DM6PR05CA0055.namprd05.prod.outlook.com (2603:10b6:5:335::24) by MN2PR12MB4224.namprd12.prod.outlook.com (2603:10b6:208:1dd::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6254.26; Sun, 2 Apr 2023 12:26:45 +0000 Received: from DM6NAM11FT050.eop-nam11.prod.protection.outlook.com (2603:10b6:5:335:cafe::4d) by DM6PR05CA0055.outlook.office365.com (2603:10b6:5:335::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6277.21 via Frontend Transport; Sun, 2 Apr 2023 12:26:45 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.117.160) smtp.mailfrom=nvidia.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 216.228.117.160 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.117.160; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.117.160) by DM6NAM11FT050.mail.protection.outlook.com (10.13.173.111) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6277.26 via Frontend Transport; Sun, 2 Apr 2023 12:26:45 +0000 Received: from rnnvmail201.nvidia.com (10.129.68.8) by mail.nvidia.com (10.129.200.66) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.5; Sun, 2 Apr 2023 05:26:39 -0700 Received: from nvidia.com (10.126.230.37) by rnnvmail201.nvidia.com (10.129.68.8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.37; Sun, 2 Apr 2023 05:26:36 -0700 From: Raslan Darawsheh To: CC: , , , Aman Singh , Yuying Zhang Subject: [PATCH] app/testpmd: fix GTP L2 len in checksum engine Date: Sun, 2 Apr 2023 15:26:19 +0300 Message-ID: <20230402122619.10078-1-rasland@nvidia.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [10.126.230.37] X-ClientProxiedBy: rnnvmail202.nvidia.com (10.129.68.7) To rnnvmail201.nvidia.com (10.129.68.8) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DM6NAM11FT050:EE_|MN2PR12MB4224:EE_ X-MS-Office365-Filtering-Correlation-Id: b98b0c56-fa03-4895-246d-08db337585d3 X-LD-Processed: 43083d15-7273-40c1-b7db-39efd9ccc17a,ExtAddr X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: A0kENyUIGuB/GBwIbdOnC51azTe+GapMEk/+nL4UJgoF+LeAYcIwVpj31hQc04eNT1kBVPc4o38cE0TteUTsvk92uJioBAxLVMrpPfKyqwf2Xc41YSc0wK4jSYXr1+ZZkCl0JBzTwrVoQyt5NGJBelX0pxMYavUsVznV0bX+Q5gZwZJixehoj1+M4dfWabDPsJBc8dgVk9xuSb+1FRnxM3wlKHrmb8NEXqVqAVx7lN0WQ5tXlTUs8vXSxLi68c4OiwQYqS+B0UjWDo/g0wB1GUJzQGg1gbzlaztsJEMJnPSuumcf0e8ThnUxMWUhjgliR/sBLWhr0B/i/OJ0f/s1btPZ5QjMagVDaP3cX4aY1awRYZXNmd591romdvutW4rQZsvxACLeky/6xT6w/3c7+bYpoKpYI3IDPbNAIj+ctGON5uxqBsjBUTGIwAhrGXr6LOmKtCg5oi3rd4COjWdjhsPXre0OCwuoD3tH/Q/nVU6T5nm8FtMgysbFLZVB0Du9mLuUOfnt3p6+bTdrlPTNryGlzvc87JWjcO4qYAb5ydLF0TArNBR92JlbqtZFtWiakCeFODIsfxJI2DyC2cqVRR/X6Py84nlooj/7Z4iGrhrAmfR1uPius+wxMJd4ZnIuYhON511bYGHYuKnPycRmKmKrgdyjVcYZacKdHyVneVlVK0mKUjlH3QYlaR29zYa2a0uKKcINjhLTt9BhczwLBLADhKelFVFoeAhVYaN+SO7WfO5ITtLkUAZTxVmo6UBfME+Y0ekIWwuKGoqkESVyMg== X-Forefront-Antispam-Report: CIP:216.228.117.160; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:dc6edge1.nvidia.com; CAT:NONE; SFS:(13230028)(4636009)(376002)(396003)(39860400002)(136003)(346002)(451199021)(46966006)(36840700001)(40470700004)(47076005)(426003)(336012)(83380400001)(36860700001)(34020700004)(54906003)(478600001)(7696005)(316002)(16526019)(6286002)(2616005)(186003)(6666004)(26005)(1076003)(2906002)(4744005)(5660300002)(82310400005)(7636003)(356005)(40460700003)(36756003)(82740400003)(4326008)(86362001)(6916009)(70586007)(55016003)(41300700001)(70206006)(8676002)(40480700001)(8936002); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 Apr 2023 12:26:45.1048 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: b98b0c56-fa03-4895-246d-08db337585d3 X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[216.228.117.160]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: DM6NAM11FT050.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR12MB4224 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org GTP header can be followed by an optional 32 bits extension. But, l2_len value statically set to RTE_ETHER_GTP_HLEN which is defined to be (sizeof(struct rte_udp_hdr) + sizeof(struct rte_gtp_hdr)) This fixes the l2_len to take into consideration the extension size. Fixes: d8e5e69f3a9b ("app/testpmd: add GTP parsing and Tx checksum offload") Cc: ting.xu@intel.com Cc: stable@dpdk.org Signed-off-by: Raslan Darawsheh --- app/test-pmd/csumonly.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/test-pmd/csumonly.c b/app/test-pmd/csumonly.c index fc85c22a77..b50b89367a 100644 --- a/app/test-pmd/csumonly.c +++ b/app/test-pmd/csumonly.c @@ -250,7 +250,7 @@ parse_gtp(struct rte_udp_hdr *udp_hdr, info->l4_proto = 0; } - info->l2_len += RTE_ETHER_GTP_HLEN; + info->l2_len += gtp_len + sizeof(udp_hdr); } /* Parse a vxlan header */ -- 2.25.1