[dpdk-stable] patch 'ethdev: eliminate interim variable' has been queued to stable release 18.08.1
Kevin Traynor
ktraynor at redhat.com
Thu Nov 29 14:21:28 CET 2018
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 <ferruh.yigit at intel.com>
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 <ferruh.yigit at intel.com>
Reviewed-by: Andrew Rybchenko <arybchenko at solarflare.com>
---
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 <ferruh.yigit at intel.com>
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 at dpdk.org
Signed-off-by: Ferruh Yigit <ferruh.yigit at intel.com>
Reviewed-by: Andrew Rybchenko <arybchenko at solarflare.com>
---
- 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
More information about the stable
mailing list