From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by dpdk.org (Postfix) with ESMTP id 0BECB326C for ; Tue, 20 Nov 2018 20:14:47 +0100 (CET) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 64CD9C04A5B1; Tue, 20 Nov 2018 19:14:46 +0000 (UTC) Received: from ktraynor.remote.csb (unknown [10.36.118.7]) by smtp.corp.redhat.com (Postfix) with ESMTP id 73B5C60141; Tue, 20 Nov 2018 19:14:45 +0000 (UTC) From: Kevin Traynor To: Stephen Hemminger Cc: Matan Azrad , dpdk stable Date: Tue, 20 Nov 2018 19:12:09 +0000 Message-Id: <20181120191252.30277-19-ktraynor@redhat.com> In-Reply-To: <20181120191252.30277-1-ktraynor@redhat.com> References: <20181120191252.30277-1-ktraynor@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.32]); Tue, 20 Nov 2018 19:14:46 +0000 (UTC) Subject: [dpdk-stable] patch 'ethdev: fix port ownership logs' has been queued to stable release 18.08.1 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Nov 2018 19:14:47 -0000 Hi, FYI, your patch has been queued to stable release 18.08.1 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 11/23/18. 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. If the code is different (ie: not only metadata diffs), due for example to a change in context or macro names, please double check it. Thanks. Kevin Traynor --- >>From 255637fd67dc81bdbe6f3047d24b5efb48f6ef4f Mon Sep 17 00:00:00 2001 From: Stephen Hemminger Date: Thu, 16 Aug 2018 15:37:14 -0700 Subject: [PATCH] ethdev: fix port ownership logs [ upstream commit 40d96ffbd1f61533a19f2df5673f378d166ff11a ] The rte_eth_dev_owner_unset function always generates a log message because the unset value for owner id is 0. Also, when rte_eth_dev_owner_delete is called with a valid owner id, the log message should be at NOTICE not ERROR severity. Fixes: 5b7ba31148a8 ("ethdev: add port ownership") Signed-off-by: Stephen Hemminger Acked-by: Matan Azrad --- lib/librte_ethdev/rte_ethdev.c | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/lib/librte_ethdev/rte_ethdev.c b/lib/librte_ethdev/rte_ethdev.c index ee6bb0552..850d0c1b5 100644 --- a/lib/librte_ethdev/rte_ethdev.c +++ b/lib/librte_ethdev/rte_ethdev.c @@ -394,9 +394,6 @@ rte_eth_is_valid_owner_id(uint64_t owner_id) { if (owner_id == RTE_ETH_DEV_NO_OWNER || - rte_eth_dev_shared_data->next_owner_id <= owner_id) { - RTE_ETHDEV_LOG(ERR, "Invalid owner_id=%016"PRIx64"\n", - owner_id); + rte_eth_dev_shared_data->next_owner_id <= owner_id) return 0; - } return 1; } @@ -445,6 +442,10 @@ _rte_eth_dev_owner_set(const uint16_t port_id, const uint64_t old_owner_id, if (!rte_eth_is_valid_owner_id(new_owner->id) && - !rte_eth_is_valid_owner_id(old_owner_id)) + !rte_eth_is_valid_owner_id(old_owner_id)) { + RTE_ETHDEV_LOG(ERR, + "Invalid owner old_id=%016"PRIx64" new_id=%016"PRIx64"\n", + old_owner_id, new_owner->id); return -EINVAL; + } port_owner = &rte_eth_devices[port_id].data->owner; @@ -517,7 +518,11 @@ rte_eth_dev_owner_delete(const uint64_t owner_id) memset(&rte_eth_devices[port_id].data->owner, 0, sizeof(struct rte_eth_dev_owner)); - RTE_ETHDEV_LOG(ERR, + RTE_ETHDEV_LOG(NOTICE, "All port owners owned by %016"PRIx64" identifier have removed\n", owner_id); + } else { + RTE_ETHDEV_LOG(ERR, + "Invalid owner id=%016"PRIx64"\n", + owner_id); } -- 2.19.0 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2018-11-20 17:53:07.926145657 +0000 +++ 0019-ethdev-fix-port-ownership-logs.patch 2018-11-20 17:53:07.000000000 +0000 @@ -1,8 +1,10 @@ -From 40d96ffbd1f61533a19f2df5673f378d166ff11a Mon Sep 17 00:00:00 2001 +From 255637fd67dc81bdbe6f3047d24b5efb48f6ef4f Mon Sep 17 00:00:00 2001 From: Stephen Hemminger Date: Thu, 16 Aug 2018 15:37:14 -0700 Subject: [PATCH] ethdev: fix port ownership logs +[ upstream commit 40d96ffbd1f61533a19f2df5673f378d166ff11a ] + The rte_eth_dev_owner_unset function always generates a log message because the unset value for owner id is 0. @@ -11,7 +13,6 @@ severity. Fixes: 5b7ba31148a8 ("ethdev: add port ownership") -Cc: stable@dpdk.org Signed-off-by: Stephen Hemminger Acked-by: Matan Azrad @@ -20,7 +21,7 @@ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/lib/librte_ethdev/rte_ethdev.c b/lib/librte_ethdev/rte_ethdev.c -index 16825bf3c..3f8de9341 100644 +index ee6bb0552..850d0c1b5 100644 --- a/lib/librte_ethdev/rte_ethdev.c +++ b/lib/librte_ethdev/rte_ethdev.c @@ -394,9 +394,6 @@ rte_eth_is_valid_owner_id(uint64_t owner_id)