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 54F2E42925 for ; Wed, 12 Apr 2023 10:27:13 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 4C20542B71; Wed, 12 Apr 2023 10:27:13 +0200 (CEST) Received: from NAM11-BN8-obe.outbound.protection.outlook.com (mail-bn8nam11on2041.outbound.protection.outlook.com [40.107.236.41]) by mails.dpdk.org (Postfix) with ESMTP id 37CC6410FA; Wed, 12 Apr 2023 10:27:11 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=W51Rjwo3lWKmy+WI69WEU5AUBBxVHjF/yVBJoWpKvNkFpH1Dgg/y91ZPC7aWmPurBr7Z9zGFAVBcZ9B/KjgZ2OE68Ke3DFfhJHBJZG5PD6lXXtAAMDYIdKEqH9c0bEIwrBlPwslc40esJHJRJCTg9ilu0VW2cnNURRHGuZNFximQ3GJhXlCZ7OhCdwboas5R7pRqWjuCBmM2cDtiI9UXBIlbQ6LOO125Gf8efQdaEFdjpERL+1+PK8yBusQ5wsgWQ64WKPS+35z6G9AH9AoQn4Wec9N6Uj2LNX1wieYGi+38wXOXpM4AUsPyp2QwCfEth38KLjUhn3fg9Th69BTAwQ== 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=nDViJwiJluwWwzzLqxFMw52iRVSt2WQNpMFXN9N71xU=; b=V4+lWI0iJfZnlY+tnO5dvPKl5jstTZwefb5hfhsQPK9pP4dWrcU7+Y2xgX29a14g/Hj7r3TQfLA0EUYMnkLFdSmsDCpHDUjX7z1IEdmzIh3xgHjU96hGklz73rX116pv8LEB1eSUj/mc1Z+6cL6u+wfY7r9gfLjWEAYa+8rJEOi21E9EVXmiMEJid9zebYezOzCUFm9I3uizQxgdwGW8BHfXfJvB7dAnwERjV6YPefUCY5DXT/vgDkBAmZ64dNehDRREHf1SNJkVex1BVBhmA5qoErpWT6jYifkhSWYHJwML5AkZfdQtG+f0YUbJLsEcvF8KaxF4BeQQhmyI3SS8Tg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.160) smtp.rcpttodomain=dpdk.org 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=nDViJwiJluwWwzzLqxFMw52iRVSt2WQNpMFXN9N71xU=; b=E+WwKJA8/1gMCbeUNn2ntwWzm1q4Q4SR0j4W63MrD+zzVT6RI7oncWMXH4eDAla57h8jetffnDYZI412pcHJkTYlM3mtXL3/sA5s2zkP7hYURVjAoW0LtjnzAk7ByufHC+b9FeMss8LNNXnrmngy0OOCX3l4ypmRRhvl0PJ5rc5o5m/QgwFgq/2j3zB470tCLUDSAaYe/O0Ie7r0+l0mtzcMRDPqFYbK0qXZyDUWA3WCUiLWWn9nbnPHBHL/MyJzZRzv7vS5zRbhf9+OMKyfVcyRnO0ef8wwKVyuvGBXgPdi/3jfhHV+nKiWnwJtauCc6XkzJmzDCmbAkbuTZnfogA== Received: from BN9PR03CA0890.namprd03.prod.outlook.com (2603:10b6:408:13c::25) by DM6PR12MB4313.namprd12.prod.outlook.com (2603:10b6:5:21e::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6277.34; Wed, 12 Apr 2023 08:27:09 +0000 Received: from BN8NAM11FT082.eop-nam11.prod.protection.outlook.com (2603:10b6:408:13c:cafe::65) by BN9PR03CA0890.outlook.office365.com (2603:10b6:408:13c::25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6298.30 via Frontend Transport; Wed, 12 Apr 2023 08:27:09 +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 BN8NAM11FT082.mail.protection.outlook.com (10.13.176.94) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6298.30 via Frontend Transport; Wed, 12 Apr 2023 08:27:09 +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; Wed, 12 Apr 2023 01:26:57 -0700 Received: from nvidia.com (10.126.231.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; Wed, 12 Apr 2023 01:26:57 -0700 From: To: CC: , , Elena Agostini , Subject: [PATCH v3] net: fix return type of IPv4 L4 packet checksum Date: Wed, 12 Apr 2023 08:24:41 +0000 Message-ID: <20230412082441.1096231-1-eagostini@nvidia.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230406094944.821106-1-eagostini@nvidia.com> References: <20230406094944.821106-1-eagostini@nvidia.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [10.126.231.37] X-ClientProxiedBy: rnnvmail203.nvidia.com (10.129.68.9) To rnnvmail201.nvidia.com (10.129.68.8) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BN8NAM11FT082:EE_|DM6PR12MB4313:EE_ X-MS-Office365-Filtering-Correlation-Id: 51bd9721-bd11-48dd-f486-08db3b2fb545 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: 25Pd0IxEaI7oPctQctV8GPg/MZrDwAi1LPQSLsWjY3Tk/K8nCXeKSxneLe4c66fabaNi5ejz3kHb+35DzoNr67t9kbhtkIP169GcJLNy74S/Q8FDiUOzRTSnby38ZQ3AkRKxB/RQnlAA8ozXqKLqHFCW+I6sFrBq17cq1K3PvNznTTfg76vwcQTNl0l73+7WwlU42ycaSnWgqZQT7uRrdgguBiGeT6yPuAd20UXcDZOCSLjpGRjAiTDYHSPhSNh4pXjc3i2+CxFuwhhiTozbc8o7Lh23r3uqJeScJnDSzdFydTCabHDHF8QKSDssSSfzoIYhKZnpFLeqJiXQiBnwapHKEt2mpGRq1jWzDn82KKoga9XXwavvAo+ShbUiCSjXVdPlTQduVgT2fN0PfneSYux/0EB/S/z8hhIZkAWjsC3q7na6dgFlJEKLD3AVPQWXgH+rT77ZMeynONmuV7EOMunx4+KfJ38089b2K4+d5Sz9w30BRGVYC2oEfodKYVBVU6t0PMjLHMH6DDNjXRm+fa/vMIsWjuNdpaIe9fqGIMB6U/elVrK+Vo3SEhjxyNu6ItAtcefW1X8oGIanuXZinmsm7flr9gQ6ZL/wAwbyCWp/7OnWGUDlA8B6cSO8Bwcu+8L5SN1LfrJmd9hRtuh/dNyaiGm3eFaL2qETZSmX5B31V3iyBdW7Za342qioQ/LA4XB5fdAaZFEwlgBE5N8wQIxocftn5JmNAVw66Nmrpyd1Mr3XPgAarOxAld8QEKD9S5QAnnmI52d6ZCY2pSWF32jzt3bC+Lur8NnkMzhwoms= 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)(346002)(376002)(136003)(39860400002)(396003)(451199021)(36840700001)(40470700004)(46966006)(82310400005)(40460700003)(26005)(55016003)(7636003)(82740400003)(16526019)(356005)(6666004)(6286002)(7696005)(4326008)(70586007)(8676002)(6916009)(41300700001)(54906003)(86362001)(70206006)(478600001)(36756003)(316002)(83380400001)(1076003)(40480700001)(186003)(336012)(5660300002)(8936002)(2876002)(36860700001)(4744005)(426003)(47076005)(2906002)(34070700002)(2616005); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Apr 2023 08:27:09.1788 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 51bd9721-bd11-48dd-f486-08db3b2fb545 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: BN8NAM11FT082.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR12MB4313 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 From: Elena Agostini Function returns 0 or -1 but the return type is uint16_t. Fixes: d178f693bbfe ("net: add UDP/TCP checksum in mbuf segments") Cc: xiaoyun.li@intel.com Signed-off-by: Elena Agostini --- V2: added fixline and fixed cc address V3: title changed --- lib/net/rte_ip.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/net/rte_ip.h b/lib/net/rte_ip.h index a310e9d498..e7106256aa 100644 --- a/lib/net/rte_ip.h +++ b/lib/net/rte_ip.h @@ -514,7 +514,7 @@ rte_ipv4_udptcp_cksum_verify(const struct rte_ipv4_hdr *ipv4_hdr, * Return 0 if the checksum is correct, else -1. */ __rte_experimental -static inline uint16_t +static inline int rte_ipv4_udptcp_cksum_mbuf_verify(const struct rte_mbuf *m, const struct rte_ipv4_hdr *ipv4_hdr, uint16_t l4_off) -- 2.34.1