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 DD97AA0A0E for ; Mon, 10 May 2021 18:15:01 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id D7B0540140; Mon, 10 May 2021 18:15:01 +0200 (CEST) Received: from NAM12-MW2-obe.outbound.protection.outlook.com (mail-mw2nam12on2051.outbound.protection.outlook.com [40.107.244.51]) by mails.dpdk.org (Postfix) with ESMTP id 23423410FF for ; Mon, 10 May 2021 18:15:00 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=GXI6J9bvHjQDCKoRwU4G618pPeTcmSxz+TUsy4jmuIBJ2QmWNGS92dVmDRi8FJx0O8wyc3jTi19pWCz/hUU9nN6l41RdqKzISbKTSMMRsUorQGiWE66ns8gAFC7l39oiIkRXjoXvB5meuKkZsw/xgg2NUXLIpELPrV3/0sbSN5XvAoDLM70N+MPgH9VGICg0PxEHLxnWSOlERW7XRWlSQKVIhjlP6O3hrKaE0tVWhf89+5vXo2PK9UXkRYIYlkxjoYE8SM9U9XONjwYaT3ufTefL16Xb0SuIgAqeIbNFnh5TKsZJA/4X6aAbWzr6YvQyw9ht10yE30O1eFKx0US0wQ== 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=Gmo6322y6ZXZU3ty7V+pj29tvYU9krZx3ggKHskuH/Q=; b=kfWwX+vrtPNPx9kTwtLoEtpJPCTmLc9G61G8QcyaGuOe11wvWpISC2okEIGO/y8ePEWMBglwiuk2yupMAkJAVNsfTuxdVPErHtnHC91lZLbbIn2k8ld5/IDODl6n8YEhw5eZacQKcIKtqg2GKoI7J6ITse/FAOGdu9yuJ8Ip+2kGKmPYbgc37HAJWWGyPpWoTf2CJvyaMedQGGCYMO+oXlZCkdaIYrQ6R4dEL5HuzeeeL2lThH9rMopl4ukZC/g+8dQqvO3lwYdQ4wlKGxgOFxcLs5uVNCWwYaF4zTGoqHdn6PMvq92ZKMXH9zazXp4y/5dlLlF09yDIezQhpMlOag== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.112.34) smtp.rcpttodomain=redhat.com 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=Gmo6322y6ZXZU3ty7V+pj29tvYU9krZx3ggKHskuH/Q=; b=KgFX1NzYBbYA4pmC+XOsXrWxzXZZUffSWTxb7KsC/UVuTyfdf8kShQxSRFLqQdiuqz6gy2ktSkUA30tcgx9GrGR8ZeGRStjJGPnfYsK+WK2iwhKzoOe3H5TPAJ4ejpEnIsnJJRgtToM7c7+9l6iR0LPohMSCcpp797+WLQVttqH08cHS1gZOR5uafvVjTRe0/VR6FzovdEJ5EzQeswjHDZMwIdF2ZJ2hg40okMYV7cptlOkwdSRyM+6KvT8Cx4TtompCZISFfxn2jFMZuylspjD+zo0yG9avZmzUXW5pzQSQ6QRsJyrck9ElQ+KrWndXuWbqlin8S3yWO76m1DP1wA== Received: from MWHPR22CA0048.namprd22.prod.outlook.com (2603:10b6:300:69::34) by MN2PR12MB4045.namprd12.prod.outlook.com (2603:10b6:208:1d6::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4108.27; Mon, 10 May 2021 16:14:58 +0000 Received: from CO1NAM11FT043.eop-nam11.prod.protection.outlook.com (2603:10b6:300:69:cafe::4) by MWHPR22CA0048.outlook.office365.com (2603:10b6:300:69::34) 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:14:58 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.112.34) smtp.mailfrom=nvidia.com; redhat.com; dkim=none (message not signed) header.d=none;redhat.com; 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 CO1NAM11FT043.mail.protection.outlook.com (10.13.174.193) 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:14:58 +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:14:56 +0000 From: Xueming Li To: Chenbo Xia CC: Luca Boccassi , Maxime Coquelin , dpdk stable Date: Tue, 11 May 2021 00:01:09 +0800 Message-ID: <20210510160258.30982-120-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: cbb83adb-2a2d-45ad-b57a-08d913cec1b4 X-MS-TrafficTypeDiagnostic: MN2PR12MB4045: 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: VEFZ8eSOzxWlEG75kucDL2OvR1TBx1N9VNg82UwfP0w8azLTC8p1sccgjANUWFjEKGl/YvBt3zo9B9ltH4lZJPDzk2xq47RacEaOCJPqG8jF8HMABF7QNdkvmiYuicSdLgmjnd2sp0IqbP7IyKOcD0LSbmektSf6DZP5t8zNc7Oxaz94czYb+kTWD6rS805kL0YV0Alowlkqec/FWnGRDjzn1j5t60AsJqeZWqO+WT6tZ6rA07+6+dpdJupPbKsS2xzuTPuv84kYsFUg/ZDCkPxFshbYvkMtCbcUJaLgo1w4AZj0/vrpJKNHJ0ZC6n+7lFTzsGod5mciDdJU5vjlDy5983GtDUJax8V9zfVnjm1k1qijU36enbi4AZhnrlr72p8vN5D2z8osJ6PsDeauZ9I4UE0Y/pJuC103ge0Co2xq5KANUbkhl8etdqLv7Oq1EPJtAiwFHYUbl7GGHGdVxJqYfJ7MhzyoC3VedztTFUEUD9FOHCB93EEcvR3qvRvF2eZKmBPWmm8ZI1XL9dL5MUEDad41b5JuFq+OrkcOUangN+c9UgMdt9wg82C6jibluXLOgWDfQgmu3itjrKDMXGIqdiW3gXbiJL26nJAvmVQU+O8apqKPGKD/ouQe0hylW6H13/KkM1gBF5gtNnrRGOVE6zXLv22jMX5Qg0XPdi/YBdWLXXWnizc+DNTIi+DFH5LLcMGRA2+paZYpCw46YcHDkWm5Pw1RK4XKKtlL4XLcvkrDUvkWbst9/F78UjG3Nsu9WCq9NX8FagkkCwFe7Q== 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)(39860400002)(376002)(396003)(136003)(36840700001)(46966006)(2906002)(6666004)(8676002)(82310400003)(6286002)(5660300002)(426003)(8936002)(83380400001)(26005)(53546011)(54906003)(36906005)(316002)(36860700001)(1076003)(2616005)(7636003)(86362001)(336012)(478600001)(82740400003)(966005)(47076005)(70206006)(70586007)(7696005)(356005)(36756003)(55016002)(186003)(6916009)(4326008)(16526019); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 May 2021 16:14:58.2532 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: cbb83adb-2a2d-45ad-b57a-08d913cec1b4 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: CO1NAM11FT043.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR12MB4045 Subject: [dpdk-stable] patch 'examples/vhost: check memory table query' 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/1716e668784eb5d2e42bd7d2489990c09c49998b Thanks. Xueming Li --- >From 1716e668784eb5d2e42bd7d2489990c09c49998b Mon Sep 17 00:00:00 2001 From: Chenbo Xia Date: Fri, 19 Feb 2021 10:40:11 +0800 Subject: [PATCH] examples/vhost: check memory table query Cc: Luca Boccassi [ upstream commit 1739f814258cf7f4e25d55710918fa0ecc4d828e ] This patch fixes unchecked return value for rte_vhost_get_mem_table(), which is reported by coverity. Coverity issue: 364233 Fixes: ca059fa5e290 ("examples/vhost: demonstrate the new generic APIs") Signed-off-by: Chenbo Xia Reviewed-by: Maxime Coquelin --- examples/vhost/virtio_net.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/examples/vhost/virtio_net.c b/examples/vhost/virtio_net.c index 8ea6b36d59..28e4b00960 100644 --- a/examples/vhost/virtio_net.c +++ b/examples/vhost/virtio_net.c @@ -23,6 +23,7 @@ vs_vhost_net_setup(struct vhost_dev *dev) uint16_t i; int vid = dev->vid; struct vhost_queue *queue; + int ret; RTE_LOG(INFO, VHOST_CONFIG, "setting builtin vhost-user net driver\n"); @@ -33,7 +34,12 @@ vs_vhost_net_setup(struct vhost_dev *dev) else dev->hdr_len = sizeof(struct virtio_net_hdr); - rte_vhost_get_mem_table(vid, &dev->mem); + ret = rte_vhost_get_mem_table(vid, &dev->mem); + if (ret < 0) { + RTE_LOG(ERR, VHOST_CONFIG, "Failed to get " + "VM memory layout for device(%d)\n", vid); + return; + } dev->nr_vrings = rte_vhost_get_vring_num(vid); for (i = 0; i < dev->nr_vrings; i++) { -- 2.25.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2021-05-10 23:59:29.725083200 +0800 +++ 0121-examples-vhost-check-memory-table-query.patch 2021-05-10 23:59:26.520000000 +0800 @@ -1 +1 @@ -From 1739f814258cf7f4e25d55710918fa0ecc4d828e Mon Sep 17 00:00:00 2001 +From 1716e668784eb5d2e42bd7d2489990c09c49998b Mon Sep 17 00:00:00 2001 @@ -4,0 +5,3 @@ +Cc: Luca Boccassi + +[ upstream commit 1739f814258cf7f4e25d55710918fa0ecc4d828e ] @@ -11 +13,0 @@ -Cc: stable@dpdk.org @@ -20 +22 @@ -index 64bf3d19ff..9064fc3a82 100644 +index 8ea6b36d59..28e4b00960 100644