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 23DF71B4B6 for ; Thu, 29 Nov 2018 14:24:42 +0100 (CET) Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 8B35D369CF; Thu, 29 Nov 2018 13:24:41 +0000 (UTC) Received: from ktraynor.remote.csb (ovpn-117-230.ams2.redhat.com [10.36.117.230]) by smtp.corp.redhat.com (Postfix) with ESMTP id 4B9851019626; Thu, 29 Nov 2018 13:24:39 +0000 (UTC) From: Kevin Traynor To: Ferruh Yigit Cc: Andrew Rybchenko , dpdk stable Date: Thu, 29 Nov 2018 13:21:28 +0000 Message-Id: <20181129132128.7609-88-ktraynor@redhat.com> In-Reply-To: <20181129132128.7609-1-ktraynor@redhat.com> References: <20181129132128.7609-1-ktraynor@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.30]); Thu, 29 Nov 2018 13:24:41 +0000 (UTC) Subject: [dpdk-stable] patch 'ethdev: eliminate interim variable' 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: Thu, 29 Nov 2018 13:24:42 -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 12/08/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 e2e9e2f24918125b531f81a8d9782fa3b289057f Mon Sep 17 00:00:00 2001 From: Ferruh Yigit Date: Tue, 13 Nov 2018 11:12:38 +0000 Subject: [PATCH] ethdev: eliminate interim variable [ upstream commit 68b931bff2872044258ffa16030ac83eb9fbd6b0 ] `local_conf` variable was needed for offload conversions but no more required. No functional difference, only interim variable eliminated. Fixes: ab3ce1e0c193 ("ethdev: remove old offload API") Signed-off-by: Ferruh Yigit Reviewed-by: Andrew Rybchenko --- lib/librte_ethdev/rte_ethdev.c | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/lib/librte_ethdev/rte_ethdev.c b/lib/librte_ethdev/rte_ethdev.c index 196b27c95..84e868c31 100644 --- a/lib/librte_ethdev/rte_ethdev.c +++ b/lib/librte_ethdev/rte_ethdev.c @@ -1021,5 +1021,4 @@ rte_eth_dev_configure(uint16_t port_id, uint16_t nb_rx_q, uint16_t nb_tx_q, struct rte_eth_dev_info dev_info; struct rte_eth_conf orig_conf; - struct rte_eth_conf local_conf = *dev_conf; int diag; int ret; @@ -1046,5 +1045,5 @@ rte_eth_dev_configure(uint16_t port_id, uint16_t nb_rx_q, uint16_t nb_tx_q, * rte_eth_dev_info_get() requires dev_conf, copy it before dev_info get */ - memcpy(&dev->data->dev_conf, &local_conf, sizeof(dev->data->dev_conf)); + memcpy(&dev->data->dev_conf, dev_conf, sizeof(dev->data->dev_conf)); rte_eth_dev_info_get(port_id, &dev_info); @@ -1120,5 +1119,5 @@ rte_eth_dev_configure(uint16_t port_id, uint16_t nb_rx_q, uint16_t nb_tx_q, * length is supported by the configured device. */ - if (local_conf.rxmode.offloads & DEV_RX_OFFLOAD_JUMBO_FRAME) { + if (dev_conf->rxmode.offloads & DEV_RX_OFFLOAD_JUMBO_FRAME) { if (dev_conf->rxmode.max_rx_pkt_len > dev_info.max_rx_pktlen) { RTE_ETHDEV_LOG(ERR, @@ -1145,10 +1144,10 @@ rte_eth_dev_configure(uint16_t port_id, uint16_t nb_rx_q, uint16_t nb_tx_q, /* Any requested offloading must be within its device capabilities */ - if ((local_conf.rxmode.offloads & dev_info.rx_offload_capa) != - local_conf.rxmode.offloads) { + if ((dev_conf->rxmode.offloads & dev_info.rx_offload_capa) != + dev_conf->rxmode.offloads) { RTE_ETHDEV_LOG(ERR, "Ethdev port_id=%u requested Rx offloads 0x%"PRIx64" doesn't match Rx offloads " "capabilities 0x%"PRIx64" in %s()\n", - port_id, local_conf.rxmode.offloads, + port_id, dev_conf->rxmode.offloads, dev_info.rx_offload_capa, __func__); @@ -1156,10 +1155,10 @@ rte_eth_dev_configure(uint16_t port_id, uint16_t nb_rx_q, uint16_t nb_tx_q, goto rollback; } - if ((local_conf.txmode.offloads & dev_info.tx_offload_capa) != - local_conf.txmode.offloads) { + if ((dev_conf->txmode.offloads & dev_info.tx_offload_capa) != + dev_conf->txmode.offloads) { RTE_ETHDEV_LOG(ERR, "Ethdev port_id=%u requested Tx offloads 0x%"PRIx64" doesn't match Tx offloads " "capabilities 0x%"PRIx64" in %s()\n", - port_id, local_conf.txmode.offloads, + port_id, dev_conf->txmode.offloads, dev_info.tx_offload_capa, __func__); @@ -1168,6 +1167,6 @@ rte_eth_dev_configure(uint16_t port_id, uint16_t nb_rx_q, uint16_t nb_tx_q, } - if ((local_conf.rxmode.offloads & DEV_RX_OFFLOAD_CRC_STRIP) && - (local_conf.rxmode.offloads & DEV_RX_OFFLOAD_KEEP_CRC)) { + if ((dev_conf->rxmode.offloads & DEV_RX_OFFLOAD_CRC_STRIP) && + (dev_conf->rxmode.offloads & DEV_RX_OFFLOAD_KEEP_CRC)) { RTE_ETHDEV_LOG(ERR, "Port id=%u not allowed to set both CRC STRIP and KEEP CRC offload flags\n", -- 2.19.0 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2018-11-29 13:11:37.216273129 +0000 +++ 0087-ethdev-eliminate-interim-variable.patch 2018-11-29 13:11:35.000000000 +0000 @@ -1,45 +1,46 @@ -From 68b931bff2872044258ffa16030ac83eb9fbd6b0 Mon Sep 17 00:00:00 2001 +From e2e9e2f24918125b531f81a8d9782fa3b289057f Mon Sep 17 00:00:00 2001 From: Ferruh Yigit Date: Tue, 13 Nov 2018 11:12:38 +0000 Subject: [PATCH] ethdev: eliminate interim variable +[ upstream commit 68b931bff2872044258ffa16030ac83eb9fbd6b0 ] + `local_conf` variable was needed for offload conversions but no more required. No functional difference, only interim variable eliminated. Fixes: ab3ce1e0c193 ("ethdev: remove old offload API") -Cc: stable@dpdk.org Signed-off-by: Ferruh Yigit Reviewed-by: Andrew Rybchenko --- - lib/librte_ethdev/rte_ethdev.c | 17 ++++++++--------- - 1 file changed, 8 insertions(+), 9 deletions(-) + lib/librte_ethdev/rte_ethdev.c | 21 ++++++++++----------- + 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/lib/librte_ethdev/rte_ethdev.c b/lib/librte_ethdev/rte_ethdev.c -index 0f01138ea..5f858174b 100644 +index 196b27c95..84e868c31 100644 --- a/lib/librte_ethdev/rte_ethdev.c +++ b/lib/librte_ethdev/rte_ethdev.c -@@ -1094,5 +1094,4 @@ rte_eth_dev_configure(uint16_t port_id, uint16_t nb_rx_q, uint16_t nb_tx_q, +@@ -1021,5 +1021,4 @@ rte_eth_dev_configure(uint16_t port_id, uint16_t nb_rx_q, uint16_t nb_tx_q, struct rte_eth_dev_info dev_info; struct rte_eth_conf orig_conf; - struct rte_eth_conf local_conf = *dev_conf; int diag; int ret; -@@ -1119,5 +1118,5 @@ rte_eth_dev_configure(uint16_t port_id, uint16_t nb_rx_q, uint16_t nb_tx_q, +@@ -1046,5 +1045,5 @@ rte_eth_dev_configure(uint16_t port_id, uint16_t nb_rx_q, uint16_t nb_tx_q, * rte_eth_dev_info_get() requires dev_conf, copy it before dev_info get */ - memcpy(&dev->data->dev_conf, &local_conf, sizeof(dev->data->dev_conf)); + memcpy(&dev->data->dev_conf, dev_conf, sizeof(dev->data->dev_conf)); rte_eth_dev_info_get(port_id, &dev_info); -@@ -1193,5 +1192,5 @@ rte_eth_dev_configure(uint16_t port_id, uint16_t nb_rx_q, uint16_t nb_tx_q, +@@ -1120,5 +1119,5 @@ rte_eth_dev_configure(uint16_t port_id, uint16_t nb_rx_q, uint16_t nb_tx_q, * length is supported by the configured device. */ - if (local_conf.rxmode.offloads & DEV_RX_OFFLOAD_JUMBO_FRAME) { + if (dev_conf->rxmode.offloads & DEV_RX_OFFLOAD_JUMBO_FRAME) { if (dev_conf->rxmode.max_rx_pkt_len > dev_info.max_rx_pktlen) { RTE_ETHDEV_LOG(ERR, -@@ -1218,10 +1217,10 @@ rte_eth_dev_configure(uint16_t port_id, uint16_t nb_rx_q, uint16_t nb_tx_q, +@@ -1145,10 +1144,10 @@ rte_eth_dev_configure(uint16_t port_id, uint16_t nb_rx_q, uint16_t nb_tx_q, /* Any requested offloading must be within its device capabilities */ - if ((local_conf.rxmode.offloads & dev_info.rx_offload_capa) != @@ -53,7 +54,7 @@ + port_id, dev_conf->rxmode.offloads, dev_info.rx_offload_capa, __func__); -@@ -1229,10 +1228,10 @@ rte_eth_dev_configure(uint16_t port_id, uint16_t nb_rx_q, uint16_t nb_tx_q, +@@ -1156,10 +1155,10 @@ rte_eth_dev_configure(uint16_t port_id, uint16_t nb_rx_q, uint16_t nb_tx_q, goto rollback; } - if ((local_conf.txmode.offloads & dev_info.tx_offload_capa) != @@ -67,6 +68,15 @@ + port_id, dev_conf->txmode.offloads, dev_info.tx_offload_capa, __func__); +@@ -1168,6 +1167,6 @@ rte_eth_dev_configure(uint16_t port_id, uint16_t nb_rx_q, uint16_t nb_tx_q, + } + +- if ((local_conf.rxmode.offloads & DEV_RX_OFFLOAD_CRC_STRIP) && +- (local_conf.rxmode.offloads & DEV_RX_OFFLOAD_KEEP_CRC)) { ++ if ((dev_conf->rxmode.offloads & DEV_RX_OFFLOAD_CRC_STRIP) && ++ (dev_conf->rxmode.offloads & DEV_RX_OFFLOAD_KEEP_CRC)) { + RTE_ETHDEV_LOG(ERR, + "Port id=%u not allowed to set both CRC STRIP and KEEP CRC offload flags\n", -- 2.19.0