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 F3B17A0A0E for ; Mon, 10 May 2021 18:09:25 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id EBA4E4003E; Mon, 10 May 2021 18:09:25 +0200 (CEST) Received: from NAM12-DM6-obe.outbound.protection.outlook.com (mail-dm6nam12on2050.outbound.protection.outlook.com [40.107.243.50]) by mails.dpdk.org (Postfix) with ESMTP id 8D7434003E for ; Mon, 10 May 2021 18:09:24 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=K7SOSABYP0jUTbyY+2EIcGnR01oxdu3vmuiePndq/Os7o9mcoZ+RgRdt0rmHOVz639b1dNgD5uQIXL8lUsnTHGpKjO6xUN5DqtPyT+KU6f7+8u9qRB7NbFOI2TJE0S1Q4VzOmolothH8k3mAPDH5EnhBjbbIJQOlnJZTYyCbLSBkNoYSoGTcDV7kF5Eq1sQFlYsIHv/nsIa4NIBNxJS2JA4LmcgLsLp/OJOfwDpftorqUCtRDXyHcRZWqyeSyCFwU0D/PvZi84lLw6pH5lpBnO5aSYhYotbwcbraQ9T3E5fmFQIg5eENs9fwY34h9ldkw0QFhW7+HFinCaX4edu8fQ== 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-SenderADCheck; bh=SzK0VdX2ldBXnOnLrSqFp7apFZNaYBMWLGsUtgKBNNs=; b=Gxdyyd+kOXBgM/IOpXjvn3P+pD+176Gd53decNvs0+/x3KGOt9+bgLmZ0S7FsMTERY3CQcPybL6UJtLDf518W2yuZ5+N5TP7cXVzz8wkW933Xmd6wfKhXvWHBCP1dg7bjczS6DAcMlHaiucEdOdDfAjEigB6VVbDI3L96Q4o4ORrNY/bjPsiPDSathAD/ANPwE9DF6At88sHlmT3XBL7ZU/vJRuGkUtrPzD+CcmcctwPBRz6i1ZAl5QI8U30h4nGMkD6TosUr7ZGDIl2pBzpJyRjPBAXF554QKpDckXiURJxFXLTtq/amNfqncAIK7c6SNHX1t6u/NJjIuzzMA2zEw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.112.34) smtp.rcpttodomain=dpdk.org smtp.mailfrom=nvidia.com; dmarc=pass (p=none sp=none 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=SzK0VdX2ldBXnOnLrSqFp7apFZNaYBMWLGsUtgKBNNs=; b=RyB+VXjVYwGN+x7gojsiQSriQTohhwXo1XAdUt4FW+e4Bu4BexSFJTA+q7SF0G91e9kN3eRCRNma8sGLSWmHNI/oVsP5IcJIBULdG+zqGrn+5BwdgttGq9/FGEQ4ZEdBiwi0i8Mqz+xQX3Jd/VlyyZsUDrs3/B4Dw/buFliyNGjW9EKecK8OzuQQFoAZVqeL0G4KaWOc3+IWZELs55TypJOI98nyld4UBOBnGnAbCB1eth1UBDE7V84rEpFuafi0MpTLhTqyjGzHLieRgd0YEvazi/tcLq1822HycJoKQ2UsK3WdzSeExbYsKTJciB/pt4SgerAmtsOkYICCueJv+Q== Received: from BN9PR03CA0231.namprd03.prod.outlook.com (2603:10b6:408:f8::26) by BY5PR12MB4834.namprd12.prod.outlook.com (2603:10b6:a03:1b2::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4108.26; Mon, 10 May 2021 16:09:23 +0000 Received: from BN8NAM11FT045.eop-nam11.prod.protection.outlook.com (2603:10b6:408:f8:cafe::c6) by BN9PR03CA0231.outlook.office365.com (2603:10b6:408:f8::26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4108.25 via Frontend Transport; Mon, 10 May 2021 16:09:23 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.112.34) smtp.mailfrom=nvidia.com; dpdk.org; dkim=none (message not signed) header.d=none;dpdk.org; dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 216.228.112.34 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.112.34; helo=mail.nvidia.com; Received: from mail.nvidia.com (216.228.112.34) by BN8NAM11FT045.mail.protection.outlook.com (10.13.177.47) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.4108.25 via Frontend Transport; Mon, 10 May 2021 16:09:22 +0000 Received: from nvidia.com (172.20.145.6) by HQMAIL107.nvidia.com (172.20.187.13) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Mon, 10 May 2021 16:09:21 +0000 From: Xueming Li To: Wenjun Wu CC: Luca Boccassi , dpdk stable Date: Tue, 11 May 2021 00:00:11 +0800 Message-ID: <20210510160258.30982-62-xuemingl@nvidia.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210510160258.30982-1-xuemingl@nvidia.com> References: <20210510160258.30982-1-xuemingl@nvidia.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [172.20.145.6] X-ClientProxiedBy: HQMAIL111.nvidia.com (172.20.187.18) To HQMAIL107.nvidia.com (172.20.187.13) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 665a65c4-6634-40bd-9fe1-08d913cdf9cd X-MS-TrafficTypeDiagnostic: BY5PR12MB4834: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:10000; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: oNCT4rUyHyWMeZKm4WUH/oWmx5GshuG0o7wT9bsEsclSJ4Gliqpq8vw73Llh+vDp5p9ckvG2p+DwGHtRF3DHOsHXYfrB/qJplWMtcSol65Q4CtX+R8j7AuEhh7HDNYqvU9s4g5SvrOWXFo+K7/oUb8zLSuT7R82wZFyddF5FyK+6PjtvvNw4x2F4xsnHYix6uTWkGqTatC7e9HMtbrBKXXubsrvBnMGiThBDb9LwuelR80lMIUjRMJJ6Ik1T9PS79gmTyhULe7mT66vvTN0JmrLoIDkUhpqlKWo+SrZrWD9CRuIFjvpC4XnIRMZw86Jjn3kF8xoXoid5LUXSa7t2KGzEI/G5S+uxSqYyAQAsduw+FDA11ifc5/EHJaKiVIVamq2o8MeEQhOU08YapXt/ahgxc8/7Z9sfpdhZWKXYqcf9CU8v52stvGXdNYnc6vLH8Ykv7j0hz5vdtwrgVk5v6nrl31v7aMS84xCZ9sxoZoRWtz8EMeELjmwALJE7zkWtbvrsXLxUuyKQRWCvKEfOeIpmPsU6Dc28SbQmxUQ5awulNad8He8qvnwKqHqvc4vm+jtmE3waCnawpCys4Drz7E6uPm9R1ptr6AdP38JRXplGdRp8w9ljXGFnMP5VxGEvoVcVrmqZyM0vf22Cudvv++2KiNgVbTjXK3pw8k4VXn8wHNqvwNSEH4xacIhXrlKyd3M5zj9rAbUvr+LKLcGIN8HKMJPELIs9OGb7Gy5IF6POIkd2cDiB/rT7FgQKMMsTmu8WM22ex71w3kxNVxw6KA== X-Forefront-Antispam-Report: CIP:216.228.112.34; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:schybrid03.nvidia.com; CAT:NONE; SFS:(4636009)(346002)(376002)(396003)(39860400002)(136003)(46966006)(36840700001)(26005)(1076003)(53546011)(966005)(36860700001)(55016002)(47076005)(6286002)(36756003)(7696005)(6916009)(82740400003)(2616005)(16526019)(426003)(316002)(478600001)(5660300002)(2906002)(4326008)(8936002)(6666004)(83380400001)(54906003)(70586007)(86362001)(70206006)(356005)(82310400003)(36906005)(186003)(7636003)(336012)(8676002); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 May 2021 16:09:22.8082 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 665a65c4-6634-40bd-9fe1-08d913cdf9cd X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[216.228.112.34]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: BN8NAM11FT045.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY5PR12MB4834 Subject: [dpdk-stable] patch 'net/ice: check some functions return' has been queued to stable release 20.11.2 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 Sender: "stable" Hi, FYI, your patch has been queued to stable release 20.11.2 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 05/12/21. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/steevenlee/dpdk This queued commit can be viewed at: https://github.com/steevenlee/dpdk/commit/604068df872c511a76b059e7d006a1e200b4a810 Thanks. Xueming Li --- >From 604068df872c511a76b059e7d006a1e200b4a810 Mon Sep 17 00:00:00 2001 From: Wenjun Wu Date: Fri, 26 Feb 2021 15:22:00 +0800 Subject: [PATCH] net/ice: check some functions return Cc: Luca Boccassi [ upstream commit 32667f5b48a371cd65c35d26c61ea293745e1b44 ] Fix unchecked return values reported by coverity. Coverity issue: 349907 Fixes: 03a05924dad0 ("net/ice: support device-specific DDP package loading") Signed-off-by: Wenjun Wu --- drivers/net/ice/ice_ethdev.c | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/drivers/net/ice/ice_ethdev.c b/drivers/net/ice/ice_ethdev.c index d789650652..626ebfac5b 100644 --- a/drivers/net/ice/ice_ethdev.c +++ b/drivers/net/ice/ice_ethdev.c @@ -1768,8 +1768,14 @@ ice_pkg_file_search_path(struct rte_pci_device *pci_dev, char *pkg_file) pos = rte_pci_find_ext_capability(pci_dev, RTE_PCI_EXT_CAP_ID_DSN); if (pos) { - rte_pci_read_config(pci_dev, &dsn_low, 4, pos + 4); - rte_pci_read_config(pci_dev, &dsn_high, 4, pos + 8); + if (rte_pci_read_config(pci_dev, &dsn_low, 4, pos + 4) < 0) { + PMD_INIT_LOG(ERR, "Failed to read pci config space\n"); + return -1; + } + if (rte_pci_read_config(pci_dev, &dsn_high, 4, pos + 8) < 0) { + PMD_INIT_LOG(ERR, "Failed to read pci config space\n"); + return -1; + } snprintf(opt_ddp_filename, ICE_MAX_PKG_FILENAME_SIZE, "ice-%08x%08x.pkg", dsn_high, dsn_low); } else { @@ -1831,7 +1837,11 @@ static int ice_load_pkg(struct rte_eth_dev *dev) struct ice_adapter *ad = ICE_DEV_PRIVATE_TO_ADAPTER(dev->data->dev_private); - ice_pkg_file_search_path(pci_dev, pkg_file); + err = ice_pkg_file_search_path(pci_dev, pkg_file); + if (err) { + PMD_INIT_LOG(ERR, "failed to search file path\n"); + return err; + } file = fopen(pkg_file, "rb"); if (!file) { -- 2.25.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2021-05-10 23:59:28.264165500 +0800 +++ 0063-net-ice-check-some-functions-return.patch 2021-05-10 23:59:26.420000000 +0800 @@ -1 +1 @@ -From 32667f5b48a371cd65c35d26c61ea293745e1b44 Mon Sep 17 00:00:00 2001 +From 604068df872c511a76b059e7d006a1e200b4a810 Mon Sep 17 00:00:00 2001 @@ -4,0 +5,3 @@ +Cc: Luca Boccassi + +[ upstream commit 32667f5b48a371cd65c35d26c61ea293745e1b44 ] @@ -10 +12,0 @@ -Cc: stable@dpdk.org @@ -18 +20 @@ -index 8999d441ac..9c9b84a938 100644 +index d789650652..626ebfac5b 100644 @@ -21 +23 @@ -@@ -1663,8 +1663,14 @@ ice_pkg_file_search_path(struct rte_pci_device *pci_dev, char *pkg_file) +@@ -1768,8 +1768,14 @@ ice_pkg_file_search_path(struct rte_pci_device *pci_dev, char *pkg_file) @@ -38 +40 @@ -@@ -1727,7 +1733,11 @@ static int ice_load_pkg(struct rte_eth_dev *dev) +@@ -1831,7 +1837,11 @@ static int ice_load_pkg(struct rte_eth_dev *dev)