* [dpdk-stable] patch 'net/bnx2x: cleanup info logs' has been queued to stable release 18.08.1
2018-12-14 17:51 [dpdk-stable] patch 'net/ixgbe/base: add LHA ID' has been queued to stable release 18.08.1 Kevin Traynor
@ 2018-12-14 17:51 ` Kevin Traynor
2018-12-14 17:51 ` [dpdk-stable] patch 'examples/bond: fix crash when there is no active slave' " Kevin Traynor
` (16 subsequent siblings)
17 siblings, 0 replies; 19+ messages in thread
From: Kevin Traynor @ 2018-12-14 17:51 UTC (permalink / raw)
To: Rasesh Mody; +Cc: dpdk stable
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/18/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 8570d267a87e533e058dc6cd0b7e3ef4297021ad Mon Sep 17 00:00:00 2001
From: Rasesh Mody <rasesh.mody@cavium.com>
Date: Sat, 17 Nov 2018 09:37:40 +0000
Subject: [PATCH] net/bnx2x: cleanup info logs
[ upstream commit 4dd60a7a935257f66e8a29cf11e7ca404041c013 ]
Reduced number of INFO logs in BNX2X PMD by converting some INFO
logs to DEBUG and few NOTICE logs to INFO, removing extra new lines,
printing banner bar once for the adapter and device specific info.
Fixes: ba7eeb035a5f ("net/bnx2x: fix logging to include device name")
Fixes: 540a211084a7 ("bnx2x: driver core")
Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
---
drivers/net/bnx2x/bnx2x.c | 144 +++++++++++++++----------------
drivers/net/bnx2x/bnx2x.h | 3 +-
drivers/net/bnx2x/bnx2x_ethdev.c | 20 ++---
drivers/net/bnx2x/bnx2x_ethdev.h | 1 +
drivers/net/bnx2x/ecore_sp.c | 8 +-
5 files changed, 87 insertions(+), 89 deletions(-)
diff --git a/drivers/net/bnx2x/bnx2x.c b/drivers/net/bnx2x/bnx2x.c
index a6d2687a2..c80f84c67 100644
--- a/drivers/net/bnx2x/bnx2x.c
+++ b/drivers/net/bnx2x/bnx2x.c
@@ -5810,5 +5810,5 @@ static int bnx2x_set_power_state(struct bnx2x_softc *sc, uint8_t state)
/* If there is no power capability, silently succeed */
if (!(sc->devinfo.pcie_cap_flags & BNX2X_PM_CAPABLE_FLAG)) {
- PMD_DRV_LOG(WARNING, sc, "No power capability");
+ PMD_DRV_LOG(INFO, sc, "No power capability");
return 0;
}
@@ -6919,11 +6919,11 @@ static void bnx2x_link_report_locked(struct bnx2x_softc *sc)
}
- PMD_DRV_LOG(INFO, sc, "Change in link status : cur_data = %lx, last_reported_link = %lx\n",
- cur_data.link_report_flags,
- sc->last_reported_link.link_report_flags);
+ ELINK_DEBUG_P2(sc, "Change in link status : cur_data = %lx, last_reported_link = %lx",
+ cur_data.link_report_flags,
+ sc->last_reported_link.link_report_flags);
sc->link_cnt++;
- PMD_DRV_LOG(INFO, sc, "link status change count = %x\n", sc->link_cnt);
+ ELINK_DEBUG_P1(sc, "link status change count = %x", sc->link_cnt);
/* report new link params and remember the state for the next time */
rte_memcpy(&sc->last_reported_link, &cur_data, sizeof(cur_data));
@@ -6931,5 +6931,5 @@ static void bnx2x_link_report_locked(struct bnx2x_softc *sc)
if (bnx2x_test_bit(BNX2X_LINK_REPORT_LINK_DOWN,
&cur_data.link_report_flags)) {
- PMD_DRV_LOG(INFO, sc, "NIC Link is Down");
+ ELINK_DEBUG_P0(sc, "NIC Link is Down");
} else {
__rte_unused const char *duplex;
@@ -6939,6 +6939,8 @@ static void bnx2x_link_report_locked(struct bnx2x_softc *sc)
&cur_data.link_report_flags)) {
duplex = "full";
+ ELINK_DEBUG_P0(sc, "link set to full duplex");
} else {
duplex = "half";
+ ELINK_DEBUG_P0(sc, "link set to half duplex");
}
@@ -7124,5 +7126,5 @@ void bnx2x_periodic_callout(struct bnx2x_softc *sc)
if ((sc->state != BNX2X_STATE_OPEN) ||
(atomic_load_acq_long(&sc->periodic_flags) == PERIODIC_STOP)) {
- PMD_DRV_LOG(INFO, sc, "periodic callout exit (state=0x%x)",
+ PMD_DRV_LOG(DEBUG, sc, "periodic callout exit (state=0x%x)",
sc->state);
return;
@@ -8318,5 +8320,5 @@ static int bnx2x_get_device_info(struct bnx2x_softc *sc)
((sc->devinfo.bc_ver >> 16) & 0xff),
((sc->devinfo.bc_ver >> 8) & 0xff));
- PMD_DRV_LOG(INFO, sc, "Bootcode version: %s", sc->devinfo.bc_ver_str);
+ PMD_DRV_LOG(DEBUG, sc, "Bootcode version: %s", sc->devinfo.bc_ver_str);
/* get the bootcode shmem address */
@@ -11744,40 +11746,34 @@ static const char *get_bnx2x_flags(uint32_t flags)
}
-/*
- * Prints useful adapter info.
- */
+/* Prints useful adapter info. */
void bnx2x_print_adapter_info(struct bnx2x_softc *sc)
{
int i = 0;
- __rte_unused uint32_t ext_phy_type;
- PMD_INIT_FUNC_TRACE(sc);
- if (sc->link_vars.phy_flags & PHY_XGXS_FLAG)
- ext_phy_type = ELINK_XGXS_EXT_PHY_TYPE(REG_RD(sc,
- sc->
- devinfo.shmem_base
- + offsetof(struct
- shmem_region,
- dev_info.port_hw_config
- [0].external_phy_config)));
- else
- ext_phy_type = ELINK_SERDES_EXT_PHY_TYPE(REG_RD(sc,
- sc->
- devinfo.shmem_base
- +
- offsetof(struct
- shmem_region,
- dev_info.port_hw_config
- [0].external_phy_config)));
-
- PMD_DRV_LOG(INFO, sc, "\n\n===================================\n");
+ PMD_DRV_LOG(INFO, sc, "========================================");
+ /* DPDK and Driver versions */
+ PMD_DRV_LOG(INFO, sc, "%12s : %s", "DPDK",
+ rte_version());
+ PMD_DRV_LOG(INFO, sc, "%12s : %s", "Driver",
+ bnx2x_pmd_version());
+ /* Firmware versions. */
+ PMD_DRV_LOG(INFO, sc, "%12s : %d.%d.%d",
+ "Firmware",
+ BNX2X_5710_FW_MAJOR_VERSION,
+ BNX2X_5710_FW_MINOR_VERSION,
+ BNX2X_5710_FW_REVISION_VERSION);
+ PMD_DRV_LOG(INFO, sc, "%12s : %s",
+ "Bootcode", sc->devinfo.bc_ver_str);
/* Hardware chip info. */
PMD_DRV_LOG(INFO, sc, "%12s : %#08x", "ASIC", sc->devinfo.chip_id);
PMD_DRV_LOG(INFO, sc, "%12s : %c%d", "Rev", (CHIP_REV(sc) >> 12) + 'A',
(CHIP_METAL(sc) >> 4));
-
- /* Bus info. */
- PMD_DRV_LOG(INFO, sc,
- "%12s : %d, ", "Bus PCIe", sc->devinfo.pcie_link_width);
+ /* Bus PCIe info. */
+ PMD_DRV_LOG(INFO, sc, "%12s : 0x%x", "Vendor Id",
+ sc->devinfo.vendor_id);
+ PMD_DRV_LOG(INFO, sc, "%12s : 0x%x", "Device Id",
+ sc->devinfo.device_id);
+ PMD_DRV_LOG(INFO, sc, "%12s : width x%d, ", "Bus PCIe",
+ sc->devinfo.pcie_link_width);
switch (sc->devinfo.pcie_link_speed) {
case 1:
@@ -11793,8 +11789,6 @@ void bnx2x_print_adapter_info(struct bnx2x_softc *sc)
PMD_DRV_LOG(INFO, sc, "%33s", "Unknown link speed");
}
-
/* Device features. */
PMD_DRV_LOG(INFO, sc, "%12s : ", "Flags");
-
/* Miscellaneous flags. */
if (sc->devinfo.pcie_cap_flags & BNX2X_MSI_CAPABLE_FLAG) {
@@ -11802,5 +11796,4 @@ void bnx2x_print_adapter_info(struct bnx2x_softc *sc)
i++;
}
-
if (sc->devinfo.pcie_cap_flags & BNX2X_MSIX_CAPABLE_FLAG) {
if (i > 0)
@@ -11809,37 +11802,25 @@ void bnx2x_print_adapter_info(struct bnx2x_softc *sc)
i++;
}
+ PMD_DRV_LOG(INFO, sc, "%12s : %s", "OVLAN", (OVLAN(sc) ? "YES" : "NO"));
+ PMD_DRV_LOG(INFO, sc, "%12s : %s", "MF", (IS_MF(sc) ? "YES" : "NO"));
+ PMD_DRV_LOG(INFO, sc, "========================================");
+}
- if (IS_PF(sc)) {
- PMD_DRV_LOG(INFO, sc, "%12s : ", "Queues");
- switch (sc->sp->rss_rdata.rss_mode) {
- case ETH_RSS_MODE_DISABLED:
- PMD_DRV_LOG(INFO, sc, "%19s", "None");
- break;
- case ETH_RSS_MODE_REGULAR:
- PMD_DRV_LOG(INFO, sc,
- "%18s : %d", "RSS", sc->num_queues);
- break;
- default:
- PMD_DRV_LOG(INFO, sc, "%22s", "Unknown");
- break;
- }
- }
+/* Prints useful device info. */
+void bnx2x_print_device_info(struct bnx2x_softc *sc)
+{
+ __rte_unused uint32_t ext_phy_type;
+ uint32_t offset, reg_val;
- /* RTE and Driver versions */
- PMD_DRV_LOG(INFO, sc, "%12s : %s", "DPDK",
- rte_version());
- PMD_DRV_LOG(INFO, sc, "%12s : %s", "Driver",
- bnx2x_pmd_version());
+ PMD_INIT_FUNC_TRACE(sc);
+ offset = offsetof(struct shmem_region,
+ dev_info.port_hw_config[0].external_phy_config);
+ reg_val = REG_RD(sc, sc->devinfo.shmem_base + offset);
+ if (sc->link_vars.phy_flags & PHY_XGXS_FLAG)
+ ext_phy_type = ELINK_XGXS_EXT_PHY_TYPE(reg_val);
+ else
+ ext_phy_type = ELINK_SERDES_EXT_PHY_TYPE(reg_val);
- /* Firmware versions and device features. */
- PMD_DRV_LOG(INFO, sc, "%12s : %d.%d.%d",
- "Firmware",
- BNX2X_5710_FW_MAJOR_VERSION,
- BNX2X_5710_FW_MINOR_VERSION,
- BNX2X_5710_FW_REVISION_VERSION);
- PMD_DRV_LOG(INFO, sc, "%12s : %s",
- "Bootcode", sc->devinfo.bc_ver_str);
-
- PMD_DRV_LOG(INFO, sc, "\n\n===================================\n");
+ /* Device features. */
PMD_DRV_LOG(INFO, sc, "%12s : %u", "Bnx2x Func", sc->pcie_func);
PMD_DRV_LOG(INFO, sc,
@@ -11847,6 +11828,4 @@ void bnx2x_print_adapter_info(struct bnx2x_softc *sc)
PMD_DRV_LOG(INFO, sc, "%12s : %s", "DMAE Is",
(sc->dmae_ready ? "Ready" : "Not Ready"));
- PMD_DRV_LOG(INFO, sc, "%12s : %s", "OVLAN", (OVLAN(sc) ? "YES" : "NO"));
- PMD_DRV_LOG(INFO, sc, "%12s : %s", "MF", (IS_MF(sc) ? "YES" : "NO"));
PMD_DRV_LOG(INFO, sc, "%12s : %u", "MTU", sc->mtu);
PMD_DRV_LOG(INFO, sc,
@@ -11864,8 +11843,29 @@ void bnx2x_print_adapter_info(struct bnx2x_softc *sc)
PMD_DRV_LOG(INFO, sc, "%12s : %s", "Recovery",
get_recovery_state(sc->recovery_state));
+ /* Queue info. */
+ if (IS_PF(sc)) {
+ switch (sc->sp->rss_rdata.rss_mode) {
+ case ETH_RSS_MODE_DISABLED:
+ PMD_DRV_LOG(INFO, sc, "%12s : %s", "Queues", "RSS mode - None");
+ break;
+ case ETH_RSS_MODE_REGULAR:
+ PMD_DRV_LOG(INFO, sc, "%12s : %s,", "Queues", "RSS mode - Regular");
+ PMD_DRV_LOG(INFO, sc, "%16d", sc->num_queues);
+ break;
+ default:
+ PMD_DRV_LOG(INFO, sc, "%12s : %s", "Queues", "RSS mode - Unknown");
+ break;
+ }
+ }
PMD_DRV_LOG(INFO, sc, "%12s : CQ = %lx, EQ = %lx", "SPQ Left",
sc->cq_spq_left, sc->eq_spq_left);
+
PMD_DRV_LOG(INFO, sc,
"%12s : %x", "Switch", sc->link_params.switch_cfg);
- PMD_DRV_LOG(INFO, sc, "\n\n===================================\n");
+ PMD_DRV_LOG(INFO, sc, "pcie_bus=%d, pcie_device=%d",
+ sc->pcie_bus, sc->pcie_device);
+ PMD_DRV_LOG(INFO, sc, "bar0.addr=%p, bar1.addr=%p",
+ sc->bar[BAR0].base_addr, sc->bar[BAR1].base_addr);
+ PMD_DRV_LOG(INFO, sc, "port=%d, path=%d, vnic=%d, func=%d",
+ PORT_ID(sc), PATH_ID(sc), VNIC_ID(sc), FUNC_ID(sc));
}
diff --git a/drivers/net/bnx2x/bnx2x.h b/drivers/net/bnx2x/bnx2x.h
index a51fd79d4..1a52daad7 100644
--- a/drivers/net/bnx2x/bnx2x.h
+++ b/drivers/net/bnx2x/bnx2x.h
@@ -1935,4 +1935,5 @@ int bnx2x_tx_encap(struct bnx2x_tx_queue *txq, struct rte_mbuf *m0);
uint8_t bnx2x_txeof(struct bnx2x_softc *sc, struct bnx2x_fastpath *fp);
void bnx2x_print_adapter_info(struct bnx2x_softc *sc);
+void bnx2x_print_device_info(struct bnx2x_softc *sc);
int bnx2x_intr_legacy(struct bnx2x_softc *sc, int scan_fp);
void bnx2x_link_status_update(struct bnx2x_softc *sc);
@@ -1982,5 +1983,5 @@ bnx2x_set_rx_mode(struct bnx2x_softc *sc)
}
} else {
- PMD_DRV_LOG(NOTICE, sc, "Card is not ready to change mode");
+ PMD_DRV_LOG(INFO, sc, "Card is not ready to change mode");
}
}
diff --git a/drivers/net/bnx2x/bnx2x_ethdev.c b/drivers/net/bnx2x/bnx2x_ethdev.c
index 0057843b5..cc7816dd5 100644
--- a/drivers/net/bnx2x/bnx2x_ethdev.c
+++ b/drivers/net/bnx2x/bnx2x_ethdev.c
@@ -246,6 +246,5 @@ bnx2x_dev_start(struct rte_eth_dev *dev)
}
- /* Print important adapter info for the user. */
- bnx2x_print_adapter_info(sc);
+ bnx2x_print_device_info(sc);
return ret;
@@ -575,4 +574,5 @@ bnx2x_common_dev_init(struct rte_eth_dev *eth_dev, int is_vf)
struct rte_pci_addr pci_addr;
struct bnx2x_softc *sc;
+ static bool adapter_info = true;
/* Extract key data structures */
@@ -633,6 +633,13 @@ bnx2x_common_dev_init(struct rte_eth_dev *eth_dev, int is_vf)
}
+ /* Print important adapter info for the user. */
+ if (adapter_info) {
+ bnx2x_print_adapter_info(sc);
+ adapter_info = false;
+ }
+
/* schedule periodic poll for slowpath link events */
if (IS_PF(sc)) {
+ PMD_DRV_LOG(DEBUG, sc, "Scheduling periodic poll for slowpath link events");
ret = rte_eal_alarm_set(BNX2X_SP_TIMER_PERIOD,
bnx2x_periodic_start, (void *)eth_dev);
@@ -646,13 +653,4 @@ bnx2x_common_dev_init(struct rte_eth_dev *eth_dev, int is_vf)
eth_dev->data->mac_addrs = (struct ether_addr *)sc->link_params.mac_addr;
- PMD_DRV_LOG(INFO, sc, "pcie_bus=%d, pcie_device=%d",
- sc->pcie_bus, sc->pcie_device);
- PMD_DRV_LOG(INFO, sc, "bar0.addr=%p, bar1.addr=%p",
- sc->bar[BAR0].base_addr, sc->bar[BAR1].base_addr);
- PMD_DRV_LOG(INFO, sc, "port=%d, path=%d, vnic=%d, func=%d",
- PORT_ID(sc), PATH_ID(sc), VNIC_ID(sc), FUNC_ID(sc));
- PMD_DRV_LOG(INFO, sc, "portID=%d vendorID=0x%x deviceID=0x%x",
- eth_dev->data->port_id, pci_dev->id.vendor_id, pci_dev->id.device_id);
-
if (IS_VF(sc)) {
rte_spinlock_init(&sc->vf2pf_lock);
diff --git a/drivers/net/bnx2x/bnx2x_ethdev.h b/drivers/net/bnx2x/bnx2x_ethdev.h
index 807ba1780..45958db9a 100644
--- a/drivers/net/bnx2x/bnx2x_ethdev.h
+++ b/drivers/net/bnx2x/bnx2x_ethdev.h
@@ -48,4 +48,5 @@
#define TRUE 1
+typedef int bool;
#define false 0
#define true 1
diff --git a/drivers/net/bnx2x/ecore_sp.c b/drivers/net/bnx2x/ecore_sp.c
index ab730abea..6d2bb815c 100644
--- a/drivers/net/bnx2x/ecore_sp.c
+++ b/drivers/net/bnx2x/ecore_sp.c
@@ -531,7 +531,6 @@ static void __ecore_vlan_mac_h_read_unlock(struct bnx2x_softc *sc,
} else {
o->head_reader--;
- PMD_DRV_LOG(INFO, sc,
- "vlan_mac_lock - decreased readers to %d",
- o->head_reader);
+ ECORE_MSG(sc, "vlan_mac_lock - decreased readers to %d",
+ o->head_reader);
}
@@ -540,6 +539,5 @@ static void __ecore_vlan_mac_h_read_unlock(struct bnx2x_softc *sc,
*/
if (!o->head_reader && o->head_exe_request) {
- PMD_DRV_LOG(INFO, sc,
- "vlan_mac_lock - reader release encountered a pending request");
+ ECORE_MSG(sc, "vlan_mac_lock - reader release encountered a pending request");
/* Writer release will do the trick */
--
2.19.0
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2018-12-14 17:49:47.738398521 +0000
+++ 0002-net-bnx2x-cleanup-info-logs.patch 2018-12-14 17:49:47.000000000 +0000
@@ -1,15 +1,16 @@
-From 4dd60a7a935257f66e8a29cf11e7ca404041c013 Mon Sep 17 00:00:00 2001
+From 8570d267a87e533e058dc6cd0b7e3ef4297021ad Mon Sep 17 00:00:00 2001
From: Rasesh Mody <rasesh.mody@cavium.com>
Date: Sat, 17 Nov 2018 09:37:40 +0000
Subject: [PATCH] net/bnx2x: cleanup info logs
+[ upstream commit 4dd60a7a935257f66e8a29cf11e7ca404041c013 ]
+
Reduced number of INFO logs in BNX2X PMD by converting some INFO
logs to DEBUG and few NOTICE logs to INFO, removing extra new lines,
printing banner bar once for the adapter and device specific info.
Fixes: ba7eeb035a5f ("net/bnx2x: fix logging to include device name")
Fixes: 540a211084a7 ("bnx2x: driver core")
-Cc: stable@dpdk.org
Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
---
@@ -21,7 +22,7 @@
5 files changed, 87 insertions(+), 89 deletions(-)
diff --git a/drivers/net/bnx2x/bnx2x.c b/drivers/net/bnx2x/bnx2x.c
-index 86c79c289..4c775c163 100644
+index a6d2687a2..c80f84c67 100644
--- a/drivers/net/bnx2x/bnx2x.c
+++ b/drivers/net/bnx2x/bnx2x.c
@@ -5810,5 +5810,5 @@ static int bnx2x_set_power_state(struct bnx2x_softc *sc, uint8_t state)
@@ -250,16 +251,16 @@
+ PORT_ID(sc), PATH_ID(sc), VNIC_ID(sc), FUNC_ID(sc));
}
diff --git a/drivers/net/bnx2x/bnx2x.h b/drivers/net/bnx2x/bnx2x.h
-index 74780725b..32a12294b 100644
+index a51fd79d4..1a52daad7 100644
--- a/drivers/net/bnx2x/bnx2x.h
+++ b/drivers/net/bnx2x/bnx2x.h
-@@ -1938,4 +1938,5 @@ int bnx2x_tx_encap(struct bnx2x_tx_queue *txq, struct rte_mbuf *m0);
+@@ -1935,4 +1935,5 @@ int bnx2x_tx_encap(struct bnx2x_tx_queue *txq, struct rte_mbuf *m0);
uint8_t bnx2x_txeof(struct bnx2x_softc *sc, struct bnx2x_fastpath *fp);
void bnx2x_print_adapter_info(struct bnx2x_softc *sc);
+void bnx2x_print_device_info(struct bnx2x_softc *sc);
int bnx2x_intr_legacy(struct bnx2x_softc *sc, int scan_fp);
void bnx2x_link_status_update(struct bnx2x_softc *sc);
-@@ -1985,5 +1986,5 @@ bnx2x_set_rx_mode(struct bnx2x_softc *sc)
+@@ -1982,5 +1983,5 @@ bnx2x_set_rx_mode(struct bnx2x_softc *sc)
}
} else {
- PMD_DRV_LOG(NOTICE, sc, "Card is not ready to change mode");
^ permalink raw reply [flat|nested] 19+ messages in thread
* [dpdk-stable] patch 'examples/bond: fix crash when there is no active slave' has been queued to stable release 18.08.1
2018-12-14 17:51 [dpdk-stable] patch 'net/ixgbe/base: add LHA ID' has been queued to stable release 18.08.1 Kevin Traynor
2018-12-14 17:51 ` [dpdk-stable] patch 'net/bnx2x: cleanup info logs' " Kevin Traynor
@ 2018-12-14 17:51 ` Kevin Traynor
2018-12-14 17:51 ` [dpdk-stable] patch 'net/mlx5: fix function documentation' " Kevin Traynor
` (15 subsequent siblings)
17 siblings, 0 replies; 19+ messages in thread
From: Kevin Traynor @ 2018-12-14 17:51 UTC (permalink / raw)
To: Radu Nicolau; +Cc: Chas Williams, dpdk stable
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/18/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 f70ae36fa1ff238804ca8193f43559788a14b398 Mon Sep 17 00:00:00 2001
From: Radu Nicolau <radu.nicolau@intel.com>
Date: Wed, 14 Nov 2018 12:19:09 +0000
Subject: [PATCH] examples/bond: fix crash when there is no active slave
[ upstream commit 292fdb76024fce3263e3c33009d37f46c10eddc5 ]
If bond_ethdev_rx_burst() called more times with no active slaves
the active slave index will point out of bounds, resulting in a
segfault.
The configured slaves needs to be checked, and if none became active
there is no point going further.
Do not start the packet processing threads until all configured
slaves become active.
Fixes: cc7e8ae84faa ("examples/bond: add example application for link bonding mode 6")
Signed-off-by: Radu Nicolau <radu.nicolau@intel.com>
Acked-by: Chas Williams <chas3@att.com>
---
examples/bond/main.c | 15 +++++++++++++++
1 file changed, 15 insertions(+)
diff --git a/examples/bond/main.c b/examples/bond/main.c
index 23d0981ab..314d85747 100644
--- a/examples/bond/main.c
+++ b/examples/bond/main.c
@@ -222,4 +222,5 @@ bond_port_init(struct rte_mempool *mbuf_pool)
struct rte_eth_txconf txq_conf;
struct rte_eth_conf local_port_conf = port_conf;
+ uint16_t wait_counter = 20;
retval = rte_eth_bond_create("net_bonding0", BONDING_MODE_ALB,
@@ -276,4 +277,18 @@ bond_port_init(struct rte_mempool *mbuf_pool)
rte_exit(retval, "Start port %d failed (res=%d)", BOND_PORT, retval);
+ printf("Waiting for slaves to become active...");
+ while (wait_counter) {
+ uint16_t act_slaves[16] = {0};
+ if (rte_eth_bond_active_slaves_get(BOND_PORT, act_slaves, 16) ==
+ slaves_count) {
+ printf("\n");
+ break;
+ }
+ sleep(1);
+ printf("...");
+ if (--wait_counter == 0)
+ rte_exit(-1, "\nFailed to activate slaves\n");
+ }
+
rte_eth_promiscuous_enable(BOND_PORT);
--
2.19.0
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2018-12-14 17:49:47.787217930 +0000
+++ 0003-examples-bond-fix-crash-when-there-is-no-active-slav.patch 2018-12-14 17:49:47.000000000 +0000
@@ -1,8 +1,10 @@
-From 292fdb76024fce3263e3c33009d37f46c10eddc5 Mon Sep 17 00:00:00 2001
+From f70ae36fa1ff238804ca8193f43559788a14b398 Mon Sep 17 00:00:00 2001
From: Radu Nicolau <radu.nicolau@intel.com>
Date: Wed, 14 Nov 2018 12:19:09 +0000
Subject: [PATCH] examples/bond: fix crash when there is no active slave
+[ upstream commit 292fdb76024fce3263e3c33009d37f46c10eddc5 ]
+
If bond_ethdev_rx_burst() called more times with no active slaves
the active slave index will point out of bounds, resulting in a
segfault.
@@ -13,7 +15,6 @@
slaves become active.
Fixes: cc7e8ae84faa ("examples/bond: add example application for link bonding mode 6")
-Cc: stable@dpdk.org
Signed-off-by: Radu Nicolau <radu.nicolau@intel.com>
Acked-by: Chas Williams <chas3@att.com>
@@ -22,16 +23,16 @@
1 file changed, 15 insertions(+)
diff --git a/examples/bond/main.c b/examples/bond/main.c
-index 65f3c3980..ef86194ff 100644
+index 23d0981ab..314d85747 100644
--- a/examples/bond/main.c
+++ b/examples/bond/main.c
-@@ -221,4 +221,5 @@ bond_port_init(struct rte_mempool *mbuf_pool)
+@@ -222,4 +222,5 @@ bond_port_init(struct rte_mempool *mbuf_pool)
struct rte_eth_txconf txq_conf;
struct rte_eth_conf local_port_conf = port_conf;
+ uint16_t wait_counter = 20;
retval = rte_eth_bond_create("net_bonding0", BONDING_MODE_ALB,
-@@ -275,4 +276,18 @@ bond_port_init(struct rte_mempool *mbuf_pool)
+@@ -276,4 +277,18 @@ bond_port_init(struct rte_mempool *mbuf_pool)
rte_exit(retval, "Start port %d failed (res=%d)", BOND_PORT, retval);
+ printf("Waiting for slaves to become active...");
^ permalink raw reply [flat|nested] 19+ messages in thread
* [dpdk-stable] patch 'net/mlx5: fix function documentation' has been queued to stable release 18.08.1
2018-12-14 17:51 [dpdk-stable] patch 'net/ixgbe/base: add LHA ID' has been queued to stable release 18.08.1 Kevin Traynor
2018-12-14 17:51 ` [dpdk-stable] patch 'net/bnx2x: cleanup info logs' " Kevin Traynor
2018-12-14 17:51 ` [dpdk-stable] patch 'examples/bond: fix crash when there is no active slave' " Kevin Traynor
@ 2018-12-14 17:51 ` Kevin Traynor
2018-12-14 17:51 ` [dpdk-stable] patch 'net/ifcvf: fix typo on struct name' " Kevin Traynor
` (14 subsequent siblings)
17 siblings, 0 replies; 19+ messages in thread
From: Kevin Traynor @ 2018-12-14 17:51 UTC (permalink / raw)
To: Asaf Penso; +Cc: Ferruh Yigit, dpdk stable
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/18/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 6f37e89edd00ef821ad5f67de93aec551cfa7c54 Mon Sep 17 00:00:00 2001
From: Asaf Penso <asafp@mellanox.com>
Date: Thu, 29 Nov 2018 11:39:32 +0000
Subject: [PATCH] net/mlx5: fix function documentation
[ upstream commit 16a25aa1b73f1a2249979c226c9ced24802e87a6 ]
tso and vlan parameters were removed from the signature
of txq_mbuf_to_swp function.
The documentation of the function was not updated accordingly.
Remove the tso and vlan documentation to match the function signature.
Fixes: 8f6d9e13a98c ("net/mlx5: remove redundant checks")
Signed-off-by: Asaf Penso <asafp@mellanox.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
drivers/net/mlx5/mlx5_rxtx.h | 4 ----
1 file changed, 4 deletions(-)
diff --git a/drivers/net/mlx5/mlx5_rxtx.h b/drivers/net/mlx5/mlx5_rxtx.h
index 9281750e9..d5ce21b2b 100644
--- a/drivers/net/mlx5/mlx5_rxtx.h
+++ b/drivers/net/mlx5/mlx5_rxtx.h
@@ -733,8 +733,4 @@ mlx5_tx_dbrec(struct mlx5_txq_data *txq, volatile struct mlx5_wqe *wqe)
* @param buf
* Pointer to the mbuf.
- * @param tso
- * TSO offloads enabled.
- * @param vlan
- * VLAN offloads enabled
* @param offsets
* Pointer to the SWP header offsets.
--
2.19.0
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2018-12-14 17:49:47.810841443 +0000
+++ 0004-net-mlx5-fix-function-documentation.patch 2018-12-14 17:49:47.000000000 +0000
@@ -1,8 +1,10 @@
-From 16a25aa1b73f1a2249979c226c9ced24802e87a6 Mon Sep 17 00:00:00 2001
+From 6f37e89edd00ef821ad5f67de93aec551cfa7c54 Mon Sep 17 00:00:00 2001
From: Asaf Penso <asafp@mellanox.com>
Date: Thu, 29 Nov 2018 11:39:32 +0000
Subject: [PATCH] net/mlx5: fix function documentation
+[ upstream commit 16a25aa1b73f1a2249979c226c9ced24802e87a6 ]
+
tso and vlan parameters were removed from the signature
of txq_mbuf_to_swp function.
@@ -11,7 +13,6 @@
Remove the tso and vlan documentation to match the function signature.
Fixes: 8f6d9e13a98c ("net/mlx5: remove redundant checks")
-Cc: stable@dpdk.org
Signed-off-by: Asaf Penso <asafp@mellanox.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
@@ -20,10 +21,10 @@
1 file changed, 4 deletions(-)
diff --git a/drivers/net/mlx5/mlx5_rxtx.h b/drivers/net/mlx5/mlx5_rxtx.h
-index f47d327cf..75194a3fa 100644
+index 9281750e9..d5ce21b2b 100644
--- a/drivers/net/mlx5/mlx5_rxtx.h
+++ b/drivers/net/mlx5/mlx5_rxtx.h
-@@ -734,8 +734,4 @@ mlx5_tx_dbrec(struct mlx5_txq_data *txq, volatile struct mlx5_wqe *wqe)
+@@ -733,8 +733,4 @@ mlx5_tx_dbrec(struct mlx5_txq_data *txq, volatile struct mlx5_wqe *wqe)
* @param buf
* Pointer to the mbuf.
- * @param tso
^ permalink raw reply [flat|nested] 19+ messages in thread
* [dpdk-stable] patch 'net/ifcvf: fix typo on struct name' has been queued to stable release 18.08.1
2018-12-14 17:51 [dpdk-stable] patch 'net/ixgbe/base: add LHA ID' has been queued to stable release 18.08.1 Kevin Traynor
` (2 preceding siblings ...)
2018-12-14 17:51 ` [dpdk-stable] patch 'net/mlx5: fix function documentation' " Kevin Traynor
@ 2018-12-14 17:51 ` Kevin Traynor
2018-12-14 17:51 ` [dpdk-stable] patch 'net/i40e: fix getting RSS configuration' " Kevin Traynor
` (13 subsequent siblings)
17 siblings, 0 replies; 19+ messages in thread
From: Kevin Traynor @ 2018-12-14 17:51 UTC (permalink / raw)
To: Xiaolong Ye; +Cc: Xiao Wang, dpdk stable
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/18/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 e343f0d3c36cccf190f398b68bd03606cb00f341 Mon Sep 17 00:00:00 2001
From: Xiaolong Ye <xiaolong.ye@intel.com>
Date: Thu, 29 Nov 2018 16:22:19 +0800
Subject: [PATCH] net/ifcvf: fix typo on struct name
[ upstream commit 2b1d1e97dc5fff821985547deeaeddb6ce16c323 ]
The struct should be ifcvf_net_config other than ifcvf_net_device_config
The variable is used as named opaque variable, struct fields are not
accessed at all, so using wrong struct type has no effect but it should
be fixed.
Fixes: a3f8150eac6d ("net/ifcvf: add ifcvf vDPA driver")
Signed-off-by: Xiaolong Ye <xiaolong.ye@intel.com>
Acked-by: Xiao Wang <xiao.w.wang@intel.com>
---
drivers/net/ifc/base/ifcvf.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ifc/base/ifcvf.h b/drivers/net/ifc/base/ifcvf.h
index badacb615..c04a1d0f7 100644
--- a/drivers/net/ifc/base/ifcvf.h
+++ b/drivers/net/ifc/base/ifcvf.h
@@ -121,5 +121,5 @@ struct ifcvf_hw {
u32 notify_off_multiplier;
struct ifcvf_pci_common_cfg *common_cfg;
- struct ifcvf_net_device_config *dev_cfg;
+ struct ifcvf_net_config *dev_cfg;
u8 *isr;
u16 *notify_base;
--
2.19.0
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2018-12-14 17:49:47.836178848 +0000
+++ 0005-net-ifcvf-fix-typo-on-struct-name.patch 2018-12-14 17:49:47.000000000 +0000
@@ -1,8 +1,10 @@
-From 2b1d1e97dc5fff821985547deeaeddb6ce16c323 Mon Sep 17 00:00:00 2001
+From e343f0d3c36cccf190f398b68bd03606cb00f341 Mon Sep 17 00:00:00 2001
From: Xiaolong Ye <xiaolong.ye@intel.com>
Date: Thu, 29 Nov 2018 16:22:19 +0800
Subject: [PATCH] net/ifcvf: fix typo on struct name
+[ upstream commit 2b1d1e97dc5fff821985547deeaeddb6ce16c323 ]
+
The struct should be ifcvf_net_config other than ifcvf_net_device_config
The variable is used as named opaque variable, struct fields are not
@@ -10,7 +12,6 @@
be fixed.
Fixes: a3f8150eac6d ("net/ifcvf: add ifcvf vDPA driver")
-Cc: stable@dpdk.org
Signed-off-by: Xiaolong Ye <xiaolong.ye@intel.com>
Acked-by: Xiao Wang <xiao.w.wang@intel.com>
@@ -19,10 +20,10 @@
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ifc/base/ifcvf.h b/drivers/net/ifc/base/ifcvf.h
-index f026c70ab..c15c69107 100644
+index badacb615..c04a1d0f7 100644
--- a/drivers/net/ifc/base/ifcvf.h
+++ b/drivers/net/ifc/base/ifcvf.h
-@@ -122,5 +122,5 @@ struct ifcvf_hw {
+@@ -121,5 +121,5 @@ struct ifcvf_hw {
u32 notify_off_multiplier;
struct ifcvf_pci_common_cfg *common_cfg;
- struct ifcvf_net_device_config *dev_cfg;
^ permalink raw reply [flat|nested] 19+ messages in thread
* [dpdk-stable] patch 'net/i40e: fix getting RSS configuration' has been queued to stable release 18.08.1
2018-12-14 17:51 [dpdk-stable] patch 'net/ixgbe/base: add LHA ID' has been queued to stable release 18.08.1 Kevin Traynor
` (3 preceding siblings ...)
2018-12-14 17:51 ` [dpdk-stable] patch 'net/ifcvf: fix typo on struct name' " Kevin Traynor
@ 2018-12-14 17:51 ` Kevin Traynor
2018-12-14 17:51 ` [dpdk-stable] patch 'net/ixgbe: fix Rx LRO capability offload for x550' " Kevin Traynor
` (12 subsequent siblings)
17 siblings, 0 replies; 19+ messages in thread
From: Kevin Traynor @ 2018-12-14 17:51 UTC (permalink / raw)
To: Qiming Yang; +Cc: Ferruh Yigit, dpdk stable
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/18/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 4c38932136f7eafedfb201e9c9d2e91144cacf09 Mon Sep 17 00:00:00 2001
From: Qiming Yang <qiming.yang@intel.com>
Date: Fri, 30 Nov 2018 17:05:58 +0800
Subject: [PATCH] net/i40e: fix getting RSS configuration
[ upstream commit e5584414817f3fb79655d38c728b675e4fcc1db4 ]
RSS hash configure get API (i40e_dev_rss_hash_conf_get()) didn't check
the return value of i40e_get_rss_key().
i40e_dev_rss_hash_conf_get() will return success even getting RSS hash
key failed. This patch fixes the issue.
Fixes: d0a349409bd7 ("i40e: support AQ based RSS config")
Signed-off-by: Qiming Yang <qiming.yang@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
drivers/net/i40e/i40e_ethdev.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c
index a26c72829..c4097394c 100644
--- a/drivers/net/i40e/i40e_ethdev.c
+++ b/drivers/net/i40e/i40e_ethdev.c
@@ -7328,7 +7328,10 @@ i40e_dev_rss_hash_conf_get(struct rte_eth_dev *dev,
struct i40e_hw *hw = I40E_DEV_PRIVATE_TO_HW(dev->data->dev_private);
uint64_t hena;
+ int ret;
- i40e_get_rss_key(pf->main_vsi, rss_conf->rss_key,
+ ret = i40e_get_rss_key(pf->main_vsi, rss_conf->rss_key,
&rss_conf->rss_key_len);
+ if (ret)
+ return ret;
hena = (uint64_t)i40e_read_rx_ctl(hw, I40E_PFQF_HENA(0));
--
2.19.0
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2018-12-14 17:49:47.862046715 +0000
+++ 0006-net-i40e-fix-getting-RSS-configuration.patch 2018-12-14 17:49:47.000000000 +0000
@@ -1,15 +1,16 @@
-From e5584414817f3fb79655d38c728b675e4fcc1db4 Mon Sep 17 00:00:00 2001
+From 4c38932136f7eafedfb201e9c9d2e91144cacf09 Mon Sep 17 00:00:00 2001
From: Qiming Yang <qiming.yang@intel.com>
Date: Fri, 30 Nov 2018 17:05:58 +0800
Subject: [PATCH] net/i40e: fix getting RSS configuration
+[ upstream commit e5584414817f3fb79655d38c728b675e4fcc1db4 ]
+
RSS hash configure get API (i40e_dev_rss_hash_conf_get()) didn't check
the return value of i40e_get_rss_key().
i40e_dev_rss_hash_conf_get() will return success even getting RSS hash
key failed. This patch fixes the issue.
Fixes: d0a349409bd7 ("i40e: support AQ based RSS config")
-Cc: stable@dpdk.org
Signed-off-by: Qiming Yang <qiming.yang@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
@@ -18,10 +19,10 @@
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c
-index 7030eb1fa..552a7a566 100644
+index a26c72829..c4097394c 100644
--- a/drivers/net/i40e/i40e_ethdev.c
+++ b/drivers/net/i40e/i40e_ethdev.c
-@@ -7460,7 +7460,10 @@ i40e_dev_rss_hash_conf_get(struct rte_eth_dev *dev,
+@@ -7328,7 +7328,10 @@ i40e_dev_rss_hash_conf_get(struct rte_eth_dev *dev,
struct i40e_hw *hw = I40E_DEV_PRIVATE_TO_HW(dev->data->dev_private);
uint64_t hena;
+ int ret;
^ permalink raw reply [flat|nested] 19+ messages in thread
* [dpdk-stable] patch 'net/ixgbe: fix Rx LRO capability offload for x550' has been queued to stable release 18.08.1
2018-12-14 17:51 [dpdk-stable] patch 'net/ixgbe/base: add LHA ID' has been queued to stable release 18.08.1 Kevin Traynor
` (4 preceding siblings ...)
2018-12-14 17:51 ` [dpdk-stable] patch 'net/i40e: fix getting RSS configuration' " Kevin Traynor
@ 2018-12-14 17:51 ` Kevin Traynor
2018-12-14 17:51 ` [dpdk-stable] patch 'net/i40e: fix overwriting RSS RETA' " Kevin Traynor
` (11 subsequent siblings)
17 siblings, 0 replies; 19+ messages in thread
From: Kevin Traynor @ 2018-12-14 17:51 UTC (permalink / raw)
To: Wei Zhao; +Cc: Qi Zhang, dpdk stable
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/18/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 9ed35b6dda00c193248dd337d1c34defe4f4fd9b Mon Sep 17 00:00:00 2001
From: Wei Zhao <wei.zhao1@intel.com>
Date: Fri, 30 Nov 2018 15:50:30 +0800
Subject: [PATCH] net/ixgbe: fix Rx LRO capability offload for x550
[ upstream commit b8ffdcc0ba163a173e969b2d8bce5d41132a561d ]
X550 does support LRO offload.
Fixes: 8eecb3295aed ("ixgbe: add LRO support")
Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
Reviewed-by: Qi Zhang <qi.z.zhang@intel.com>
---
drivers/net/ixgbe/ixgbe_rxtx.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/net/ixgbe/ixgbe_rxtx.c b/drivers/net/ixgbe/ixgbe_rxtx.c
index 4bfd2a422..1ea7ae59f 100644
--- a/drivers/net/ixgbe/ixgbe_rxtx.c
+++ b/drivers/net/ixgbe/ixgbe_rxtx.c
@@ -2870,5 +2870,6 @@ ixgbe_get_rx_port_offloads(struct rte_eth_dev *dev)
*/
if ((hw->mac.type == ixgbe_mac_82599EB ||
- hw->mac.type == ixgbe_mac_X540) &&
+ hw->mac.type == ixgbe_mac_X540 ||
+ hw->mac.type == ixgbe_mac_X550) &&
!RTE_ETH_DEV_SRIOV(dev).active)
offloads |= DEV_RX_OFFLOAD_TCP_LRO;
--
2.19.0
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2018-12-14 17:49:47.899995558 +0000
+++ 0007-net-ixgbe-fix-Rx-LRO-capability-offload-for-x550.patch 2018-12-14 17:49:47.000000000 +0000
@@ -1,12 +1,13 @@
-From b8ffdcc0ba163a173e969b2d8bce5d41132a561d Mon Sep 17 00:00:00 2001
+From 9ed35b6dda00c193248dd337d1c34defe4f4fd9b Mon Sep 17 00:00:00 2001
From: Wei Zhao <wei.zhao1@intel.com>
Date: Fri, 30 Nov 2018 15:50:30 +0800
Subject: [PATCH] net/ixgbe: fix Rx LRO capability offload for x550
+[ upstream commit b8ffdcc0ba163a173e969b2d8bce5d41132a561d ]
+
X550 does support LRO offload.
Fixes: 8eecb3295aed ("ixgbe: add LRO support")
-Cc: stable@dpdk.org
Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
Reviewed-by: Qi Zhang <qi.z.zhang@intel.com>
@@ -15,10 +16,10 @@
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/net/ixgbe/ixgbe_rxtx.c b/drivers/net/ixgbe/ixgbe_rxtx.c
-index ddc7efa87..7771d0e6d 100644
+index 4bfd2a422..1ea7ae59f 100644
--- a/drivers/net/ixgbe/ixgbe_rxtx.c
+++ b/drivers/net/ixgbe/ixgbe_rxtx.c
-@@ -2868,5 +2868,6 @@ ixgbe_get_rx_port_offloads(struct rte_eth_dev *dev)
+@@ -2870,5 +2870,6 @@ ixgbe_get_rx_port_offloads(struct rte_eth_dev *dev)
*/
if ((hw->mac.type == ixgbe_mac_82599EB ||
- hw->mac.type == ixgbe_mac_X540) &&
^ permalink raw reply [flat|nested] 19+ messages in thread
* [dpdk-stable] patch 'net/i40e: fix overwriting RSS RETA' has been queued to stable release 18.08.1
2018-12-14 17:51 [dpdk-stable] patch 'net/ixgbe/base: add LHA ID' has been queued to stable release 18.08.1 Kevin Traynor
` (5 preceding siblings ...)
2018-12-14 17:51 ` [dpdk-stable] patch 'net/ixgbe: fix Rx LRO capability offload for x550' " Kevin Traynor
@ 2018-12-14 17:51 ` Kevin Traynor
2018-12-14 17:51 ` [dpdk-stable] patch 'net/ixgbe: " Kevin Traynor
` (10 subsequent siblings)
17 siblings, 0 replies; 19+ messages in thread
From: Kevin Traynor @ 2018-12-14 17:51 UTC (permalink / raw)
To: Xiaoyun Li; +Cc: Qi Zhang, dpdk stable
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/18/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 5407bd8510903f6fbdc4b505f10363d5b190b3b1 Mon Sep 17 00:00:00 2001
From: Xiaoyun Li <xiaoyun.li@intel.com>
Date: Mon, 3 Dec 2018 16:26:32 +0800
Subject: [PATCH] net/i40e: fix overwriting RSS RETA
[ upstream commit 36c5dc8e5d3c73824fc962abd26d013f00c55cb3 ]
When starting the device, the RSS table is initialized. So the RSS
update before dev_start would be overwritten. This patch allows users
to update the RSS reta table before dev_start and adjusts the order
to set entries sequentially.
Fixes: 4861cde46116 ("i40e: new poll mode driver")
Signed-off-by: Xiaoyun Li <xiaoyun.li@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
---
drivers/net/i40e/i40e_ethdev.c | 21 ++++++++++++++-------
drivers/net/i40e/i40e_ethdev.h | 3 +++
2 files changed, 17 insertions(+), 7 deletions(-)
diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c
index c4097394c..d822f30d3 100644
--- a/drivers/net/i40e/i40e_ethdev.c
+++ b/drivers/net/i40e/i40e_ethdev.c
@@ -2364,4 +2364,6 @@ i40e_dev_stop(struct rte_eth_dev *dev)
hw->adapter_stopped = 1;
+
+ pf->adapter->rss_reta_updated = 0;
}
@@ -4170,4 +4172,6 @@ i40e_dev_rss_reta_update(struct rte_eth_dev *dev,
ret = i40e_set_rss_lut(pf->main_vsi, lut, reta_size);
+ pf->adapter->rss_reta_updated = 1;
+
out:
rte_free(lut);
@@ -8361,11 +8365,14 @@ i40e_pf_config_rss(struct i40e_pf *pf)
}
- for (i = 0, j = 0; i < hw->func_caps.rss_table_size; i++, j++) {
- if (j == num)
- j = 0;
- lut = (lut << 8) | (j & ((0x1 <<
- hw->func_caps.rss_table_entry_width) - 1));
- if ((i & 3) == 3)
- I40E_WRITE_REG(hw, I40E_PFQF_HLUT(i >> 2), lut);
+ if (pf->adapter->rss_reta_updated == 0) {
+ for (i = 0, j = 0; i < hw->func_caps.rss_table_size; i++, j++) {
+ if (j == num)
+ j = 0;
+ lut = (lut << 8) | (j & ((0x1 <<
+ hw->func_caps.rss_table_entry_width) - 1));
+ if ((i & 3) == 3)
+ I40E_WRITE_REG(hw, I40E_PFQF_HLUT(i >> 2),
+ rte_bswap32(lut));
+ }
}
diff --git a/drivers/net/i40e/i40e_ethdev.h b/drivers/net/i40e/i40e_ethdev.h
index b876933e5..edabf0771 100644
--- a/drivers/net/i40e/i40e_ethdev.h
+++ b/drivers/net/i40e/i40e_ethdev.h
@@ -1079,4 +1079,7 @@ struct i40e_adapter {
uint64_t flow_types_mask;
uint64_t pctypes_mask;
+
+ /* For RSS reta table update */
+ uint8_t rss_reta_updated;
};
--
2.19.0
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2018-12-14 17:49:47.932173626 +0000
+++ 0008-net-i40e-fix-overwriting-RSS-RETA.patch 2018-12-14 17:49:47.000000000 +0000
@@ -1,15 +1,16 @@
-From 36c5dc8e5d3c73824fc962abd26d013f00c55cb3 Mon Sep 17 00:00:00 2001
+From 5407bd8510903f6fbdc4b505f10363d5b190b3b1 Mon Sep 17 00:00:00 2001
From: Xiaoyun Li <xiaoyun.li@intel.com>
Date: Mon, 3 Dec 2018 16:26:32 +0800
Subject: [PATCH] net/i40e: fix overwriting RSS RETA
+[ upstream commit 36c5dc8e5d3c73824fc962abd26d013f00c55cb3 ]
+
When starting the device, the RSS table is initialized. So the RSS
update before dev_start would be overwritten. This patch allows users
to update the RSS reta table before dev_start and adjusts the order
to set entries sequentially.
Fixes: 4861cde46116 ("i40e: new poll mode driver")
-Cc: stable@dpdk.org
Signed-off-by: Xiaoyun Li <xiaoyun.li@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
@@ -19,24 +20,24 @@
2 files changed, 17 insertions(+), 7 deletions(-)
diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c
-index f61a12eb2..c1934d9c1 100644
+index c4097394c..d822f30d3 100644
--- a/drivers/net/i40e/i40e_ethdev.c
+++ b/drivers/net/i40e/i40e_ethdev.c
-@@ -2454,4 +2454,6 @@ i40e_dev_stop(struct rte_eth_dev *dev)
+@@ -2364,4 +2364,6 @@ i40e_dev_stop(struct rte_eth_dev *dev)
hw->adapter_stopped = 1;
+
+ pf->adapter->rss_reta_updated = 0;
}
-@@ -4265,4 +4267,6 @@ i40e_dev_rss_reta_update(struct rte_eth_dev *dev,
+@@ -4170,4 +4172,6 @@ i40e_dev_rss_reta_update(struct rte_eth_dev *dev,
ret = i40e_set_rss_lut(pf->main_vsi, lut, reta_size);
+ pf->adapter->rss_reta_updated = 1;
+
out:
rte_free(lut);
-@@ -8502,11 +8506,14 @@ i40e_pf_config_rss(struct i40e_pf *pf)
+@@ -8361,11 +8365,14 @@ i40e_pf_config_rss(struct i40e_pf *pf)
}
- for (i = 0, j = 0; i < hw->func_caps.rss_table_size; i++, j++) {
@@ -59,12 +60,12 @@
}
diff --git a/drivers/net/i40e/i40e_ethdev.h b/drivers/net/i40e/i40e_ethdev.h
-index 11ecfc30d..930eb9aba 100644
+index b876933e5..edabf0771 100644
--- a/drivers/net/i40e/i40e_ethdev.h
+++ b/drivers/net/i40e/i40e_ethdev.h
-@@ -1082,4 +1082,7 @@ struct i40e_adapter {
- /* For devargs */
- uint8_t use_latest_vec;
+@@ -1079,4 +1079,7 @@ struct i40e_adapter {
+ uint64_t flow_types_mask;
+ uint64_t pctypes_mask;
+
+ /* For RSS reta table update */
+ uint8_t rss_reta_updated;
^ permalink raw reply [flat|nested] 19+ messages in thread
* [dpdk-stable] patch 'net/ixgbe: fix overwriting RSS RETA' has been queued to stable release 18.08.1
2018-12-14 17:51 [dpdk-stable] patch 'net/ixgbe/base: add LHA ID' has been queued to stable release 18.08.1 Kevin Traynor
` (6 preceding siblings ...)
2018-12-14 17:51 ` [dpdk-stable] patch 'net/i40e: fix overwriting RSS RETA' " Kevin Traynor
@ 2018-12-14 17:51 ` Kevin Traynor
2018-12-14 17:51 ` [dpdk-stable] patch 'net/i40e: fix port close' " Kevin Traynor
` (9 subsequent siblings)
17 siblings, 0 replies; 19+ messages in thread
From: Kevin Traynor @ 2018-12-14 17:51 UTC (permalink / raw)
To: Xiaoyun Li; +Cc: Qi Zhang, dpdk stable
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/18/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 3e3c5bb1e4761a17fc11c2f4630f7ef455b59d37 Mon Sep 17 00:00:00 2001
From: Xiaoyun Li <xiaoyun.li@intel.com>
Date: Tue, 4 Dec 2018 12:37:57 +0800
Subject: [PATCH] net/ixgbe: fix overwriting RSS RETA
[ upstream commit 8832837c6e64a75be31f32c49da261db15054c0d ]
When starting the device, the RSS table is initialized. So the RSS
update before device_start would be overwritten. This patch allows users
to update the RSS reta table before device_start.
Fixes: db5b65301dde ("ethdev: allow to set RSS hash computation flags and/or key")
Signed-off-by: Xiaoyun Li <xiaoyun.li@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
---
drivers/net/ixgbe/ixgbe_ethdev.c | 11 +++++++++++
drivers/net/ixgbe/ixgbe_ethdev.h | 3 +++
drivers/net/ixgbe/ixgbe_rxtx.c | 22 +++++++++++++---------
3 files changed, 27 insertions(+), 9 deletions(-)
diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c
index 9de9c0c3e..15cf47c24 100644
--- a/drivers/net/ixgbe/ixgbe_ethdev.c
+++ b/drivers/net/ixgbe/ixgbe_ethdev.c
@@ -2794,4 +2794,6 @@ ixgbe_dev_stop(struct rte_eth_dev *dev)
{
struct rte_eth_link link;
+ struct ixgbe_adapter *adapter =
+ (struct ixgbe_adapter *)dev->data->dev_private;
struct ixgbe_hw *hw =
IXGBE_DEV_PRIVATE_TO_HW(dev->data->dev_private);
@@ -2854,4 +2856,6 @@ ixgbe_dev_stop(struct rte_eth_dev *dev)
/* reset hierarchy commit */
tm_conf->committed = false;
+
+ adapter->rss_reta_updated = 0;
}
@@ -4785,4 +4789,6 @@ ixgbe_dev_rss_reta_update(struct rte_eth_dev *dev,
uint32_t reta, r;
uint16_t idx, shift;
+ struct ixgbe_adapter *adapter =
+ (struct ixgbe_adapter *)dev->data->dev_private;
struct ixgbe_hw *hw = IXGBE_DEV_PRIVATE_TO_HW(dev->data->dev_private);
uint32_t reta_reg;
@@ -4826,4 +4832,5 @@ ixgbe_dev_rss_reta_update(struct rte_eth_dev *dev,
IXGBE_WRITE_REG(hw, reta_reg, reta);
}
+ adapter->rss_reta_updated = 1;
return 0;
@@ -5149,4 +5156,6 @@ ixgbevf_dev_stop(struct rte_eth_dev *dev)
{
struct ixgbe_hw *hw = IXGBE_DEV_PRIVATE_TO_HW(dev->data->dev_private);
+ struct ixgbe_adapter *adapter =
+ (struct ixgbe_adapter *)dev->data->dev_private;
struct rte_pci_device *pci_dev = RTE_ETH_DEV_TO_PCI(dev);
struct rte_intr_handle *intr_handle = &pci_dev->intr_handle;
@@ -5178,4 +5187,6 @@ ixgbevf_dev_stop(struct rte_eth_dev *dev)
intr_handle->intr_vec = NULL;
}
+
+ adapter->rss_reta_updated = 0;
}
diff --git a/drivers/net/ixgbe/ixgbe_ethdev.h b/drivers/net/ixgbe/ixgbe_ethdev.h
index d0b93968b..565c69c9e 100644
--- a/drivers/net/ixgbe/ixgbe_ethdev.h
+++ b/drivers/net/ixgbe/ixgbe_ethdev.h
@@ -491,4 +491,7 @@ struct ixgbe_adapter {
struct rte_timecounter tx_tstamp_tc;
struct ixgbe_tm_conf tm_conf;
+
+ /* For RSS reta table update */
+ uint8_t rss_reta_updated;
};
diff --git a/drivers/net/ixgbe/ixgbe_rxtx.c b/drivers/net/ixgbe/ixgbe_rxtx.c
index 1ea7ae59f..337a1a50c 100644
--- a/drivers/net/ixgbe/ixgbe_rxtx.c
+++ b/drivers/net/ixgbe/ixgbe_rxtx.c
@@ -3421,4 +3421,5 @@ ixgbe_rss_configure(struct rte_eth_dev *dev)
{
struct rte_eth_rss_conf rss_conf;
+ struct ixgbe_adapter *adapter;
struct ixgbe_hw *hw;
uint32_t reta;
@@ -3429,4 +3430,5 @@ ixgbe_rss_configure(struct rte_eth_dev *dev)
PMD_INIT_FUNC_TRACE();
+ adapter = (struct ixgbe_adapter *)dev->data->dev_private;
hw = IXGBE_DEV_PRIVATE_TO_HW(dev->data->dev_private);
@@ -3438,14 +3440,16 @@ ixgbe_rss_configure(struct rte_eth_dev *dev)
* little-endian order.
*/
- reta = 0;
- for (i = 0, j = 0; i < sp_reta_size; i++, j++) {
- reta_reg = ixgbe_reta_reg_get(hw->mac.type, i);
+ if (adapter->rss_reta_updated == 0) {
+ reta = 0;
+ for (i = 0, j = 0; i < sp_reta_size; i++, j++) {
+ reta_reg = ixgbe_reta_reg_get(hw->mac.type, i);
- if (j == dev->data->nb_rx_queues)
- j = 0;
- reta = (reta << 8) | j;
- if ((i & 3) == 3)
- IXGBE_WRITE_REG(hw, reta_reg,
- rte_bswap32(reta));
+ if (j == dev->data->nb_rx_queues)
+ j = 0;
+ reta = (reta << 8) | j;
+ if ((i & 3) == 3)
+ IXGBE_WRITE_REG(hw, reta_reg,
+ rte_bswap32(reta));
+ }
}
--
2.19.0
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2018-12-14 17:49:47.967073482 +0000
+++ 0009-net-ixgbe-fix-overwriting-RSS-RETA.patch 2018-12-14 17:49:47.000000000 +0000
@@ -1,14 +1,15 @@
-From 8832837c6e64a75be31f32c49da261db15054c0d Mon Sep 17 00:00:00 2001
+From 3e3c5bb1e4761a17fc11c2f4630f7ef455b59d37 Mon Sep 17 00:00:00 2001
From: Xiaoyun Li <xiaoyun.li@intel.com>
Date: Tue, 4 Dec 2018 12:37:57 +0800
Subject: [PATCH] net/ixgbe: fix overwriting RSS RETA
+[ upstream commit 8832837c6e64a75be31f32c49da261db15054c0d ]
+
When starting the device, the RSS table is initialized. So the RSS
update before device_start would be overwritten. This patch allows users
to update the RSS reta table before device_start.
Fixes: db5b65301dde ("ethdev: allow to set RSS hash computation flags and/or key")
-Cc: stable@dpdk.org
Signed-off-by: Xiaoyun Li <xiaoyun.li@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
@@ -19,44 +20,44 @@
3 files changed, 27 insertions(+), 9 deletions(-)
diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c
-index 91ba6201d..749311048 100644
+index 9de9c0c3e..15cf47c24 100644
--- a/drivers/net/ixgbe/ixgbe_ethdev.c
+++ b/drivers/net/ixgbe/ixgbe_ethdev.c
-@@ -2791,4 +2791,6 @@ ixgbe_dev_stop(struct rte_eth_dev *dev)
+@@ -2794,4 +2794,6 @@ ixgbe_dev_stop(struct rte_eth_dev *dev)
{
struct rte_eth_link link;
+ struct ixgbe_adapter *adapter =
+ (struct ixgbe_adapter *)dev->data->dev_private;
struct ixgbe_hw *hw =
IXGBE_DEV_PRIVATE_TO_HW(dev->data->dev_private);
-@@ -2851,4 +2853,6 @@ ixgbe_dev_stop(struct rte_eth_dev *dev)
+@@ -2854,4 +2856,6 @@ ixgbe_dev_stop(struct rte_eth_dev *dev)
/* reset hierarchy commit */
tm_conf->committed = false;
+
+ adapter->rss_reta_updated = 0;
}
-@@ -4780,4 +4784,6 @@ ixgbe_dev_rss_reta_update(struct rte_eth_dev *dev,
+@@ -4785,4 +4789,6 @@ ixgbe_dev_rss_reta_update(struct rte_eth_dev *dev,
uint32_t reta, r;
uint16_t idx, shift;
+ struct ixgbe_adapter *adapter =
+ (struct ixgbe_adapter *)dev->data->dev_private;
struct ixgbe_hw *hw = IXGBE_DEV_PRIVATE_TO_HW(dev->data->dev_private);
uint32_t reta_reg;
-@@ -4821,4 +4827,5 @@ ixgbe_dev_rss_reta_update(struct rte_eth_dev *dev,
+@@ -4826,4 +4832,5 @@ ixgbe_dev_rss_reta_update(struct rte_eth_dev *dev,
IXGBE_WRITE_REG(hw, reta_reg, reta);
}
+ adapter->rss_reta_updated = 1;
return 0;
-@@ -5144,4 +5151,6 @@ ixgbevf_dev_stop(struct rte_eth_dev *dev)
+@@ -5149,4 +5156,6 @@ ixgbevf_dev_stop(struct rte_eth_dev *dev)
{
struct ixgbe_hw *hw = IXGBE_DEV_PRIVATE_TO_HW(dev->data->dev_private);
+ struct ixgbe_adapter *adapter =
+ (struct ixgbe_adapter *)dev->data->dev_private;
struct rte_pci_device *pci_dev = RTE_ETH_DEV_TO_PCI(dev);
struct rte_intr_handle *intr_handle = &pci_dev->intr_handle;
-@@ -5173,4 +5182,6 @@ ixgbevf_dev_stop(struct rte_eth_dev *dev)
+@@ -5178,4 +5187,6 @@ ixgbevf_dev_stop(struct rte_eth_dev *dev)
intr_handle->intr_vec = NULL;
}
+
@@ -76,22 +77,22 @@
};
diff --git a/drivers/net/ixgbe/ixgbe_rxtx.c b/drivers/net/ixgbe/ixgbe_rxtx.c
-index 7771d0e6d..9a79d18e4 100644
+index 1ea7ae59f..337a1a50c 100644
--- a/drivers/net/ixgbe/ixgbe_rxtx.c
+++ b/drivers/net/ixgbe/ixgbe_rxtx.c
-@@ -3419,4 +3419,5 @@ ixgbe_rss_configure(struct rte_eth_dev *dev)
+@@ -3421,4 +3421,5 @@ ixgbe_rss_configure(struct rte_eth_dev *dev)
{
struct rte_eth_rss_conf rss_conf;
+ struct ixgbe_adapter *adapter;
struct ixgbe_hw *hw;
uint32_t reta;
-@@ -3427,4 +3428,5 @@ ixgbe_rss_configure(struct rte_eth_dev *dev)
+@@ -3429,4 +3430,5 @@ ixgbe_rss_configure(struct rte_eth_dev *dev)
PMD_INIT_FUNC_TRACE();
+ adapter = (struct ixgbe_adapter *)dev->data->dev_private;
hw = IXGBE_DEV_PRIVATE_TO_HW(dev->data->dev_private);
-@@ -3436,14 +3438,16 @@ ixgbe_rss_configure(struct rte_eth_dev *dev)
+@@ -3438,14 +3440,16 @@ ixgbe_rss_configure(struct rte_eth_dev *dev)
* little-endian order.
*/
- reta = 0;
^ permalink raw reply [flat|nested] 19+ messages in thread
* [dpdk-stable] patch 'net/i40e: fix port close' has been queued to stable release 18.08.1
2018-12-14 17:51 [dpdk-stable] patch 'net/ixgbe/base: add LHA ID' has been queued to stable release 18.08.1 Kevin Traynor
` (7 preceding siblings ...)
2018-12-14 17:51 ` [dpdk-stable] patch 'net/ixgbe: " Kevin Traynor
@ 2018-12-14 17:51 ` Kevin Traynor
2018-12-14 17:51 ` [dpdk-stable] patch 'net/mlx5: fix validation of Rx queue number' " Kevin Traynor
` (8 subsequent siblings)
17 siblings, 0 replies; 19+ messages in thread
From: Kevin Traynor @ 2018-12-14 17:51 UTC (permalink / raw)
To: Zhirun Yan; +Cc: Haiyue Wang, Qi Zhang, dpdk stable
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/18/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 22e11f05cf58469e61da7ceba7d61a1b00aad365 Mon Sep 17 00:00:00 2001
From: Zhirun Yan <zhirun.yan@intel.com>
Date: Mon, 10 Dec 2018 14:08:58 +0000
Subject: [PATCH] net/i40e: fix port close
[ upstream commit 38827a04812c232ef10ec2d7cde1ca133923c225 ]
Port reset will call i40evf_uninit_vf() to release resource. It wants
to call i40evf_dev_close() to release resources. Before this patch,
hw->adapter_stopped was used to mark the status about start/stop and
close. So it will never call i40evf_dev_close() after stopping the port.
This patch added hw->adapter_closed flag in i40evf_dev_close() and
i40e_dev_close() to control the status of close.
Fixes: 4861cde46116 ("i40e: new poll mode driver")
Signed-off-by: Zhirun Yan <zhirun.yan@intel.com>
Signed-off-by: Haiyue Wang <haiyue.wang@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
---
drivers/net/i40e/base/i40e_type.h | 1 +
drivers/net/i40e/i40e_ethdev.c | 5 ++++-
drivers/net/i40e/i40e_ethdev_vf.c | 4 +++-
3 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/drivers/net/i40e/base/i40e_type.h b/drivers/net/i40e/base/i40e_type.h
index 39275074e..a0fa67903 100644
--- a/drivers/net/i40e/base/i40e_type.h
+++ b/drivers/net/i40e/base/i40e_type.h
@@ -682,4 +682,5 @@ struct i40e_hw {
u8 port;
bool adapter_stopped;
+ bool adapter_closed;
/* capabilities for entire device and PCI func */
diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c
index d822f30d3..7d26f3045 100644
--- a/drivers/net/i40e/i40e_ethdev.c
+++ b/drivers/net/i40e/i40e_ethdev.c
@@ -1254,4 +1254,5 @@ eth_i40e_dev_init(struct rte_eth_dev *dev, void *init_params __rte_unused)
hw->bus.func = pci_dev->addr.function;
hw->adapter_stopped = 0;
+ hw->adapter_closed = 0;
/*
@@ -1640,5 +1641,5 @@ eth_i40e_dev_uninit(struct rte_eth_dev *dev)
PMD_INIT_LOG(WARNING, "failed to free switch domain: %d", ret);
- if (hw->adapter_stopped == 0)
+ if (hw->adapter_closed == 0)
i40e_dev_close(dev);
@@ -2440,4 +2441,6 @@ i40e_dev_close(struct rte_eth_dev *dev)
(reg | I40E_PFGEN_CTRL_PFSWR_MASK));
I40E_WRITE_FLUSH(hw);
+
+ hw->adapter_closed = 1;
}
diff --git a/drivers/net/i40e/i40e_ethdev_vf.c b/drivers/net/i40e/i40e_ethdev_vf.c
index 28b6543cd..21cd42055 100644
--- a/drivers/net/i40e/i40e_ethdev_vf.c
+++ b/drivers/net/i40e/i40e_ethdev_vf.c
@@ -1257,5 +1257,5 @@ i40evf_uninit_vf(struct rte_eth_dev *dev)
PMD_INIT_FUNC_TRACE();
- if (hw->adapter_stopped == 0)
+ if (hw->adapter_closed == 0)
i40evf_dev_close(dev);
rte_free(vf->vf_res);
@@ -1441,4 +1441,5 @@ i40evf_dev_init(struct rte_eth_dev *eth_dev)
hw->hw_addr = (void *)pci_dev->mem_resource[0].addr;
hw->adapter_stopped = 0;
+ hw->adapter_closed = 0;
if(i40evf_init_vf(eth_dev) != 0) {
@@ -2283,4 +2284,5 @@ i40evf_dev_close(struct rte_eth_dev *dev)
i40evf_disable_irq0(hw);
rte_eal_alarm_cancel(i40evf_dev_alarm_handler, dev);
+ hw->adapter_closed = 1;
}
--
2.19.0
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2018-12-14 17:49:48.003144211 +0000
+++ 0010-net-i40e-fix-port-close.patch 2018-12-14 17:49:47.000000000 +0000
@@ -1,8 +1,10 @@
-From 38827a04812c232ef10ec2d7cde1ca133923c225 Mon Sep 17 00:00:00 2001
+From 22e11f05cf58469e61da7ceba7d61a1b00aad365 Mon Sep 17 00:00:00 2001
From: Zhirun Yan <zhirun.yan@intel.com>
Date: Mon, 10 Dec 2018 14:08:58 +0000
Subject: [PATCH] net/i40e: fix port close
+[ upstream commit 38827a04812c232ef10ec2d7cde1ca133923c225 ]
+
Port reset will call i40evf_uninit_vf() to release resource. It wants
to call i40evf_dev_close() to release resources. Before this patch,
hw->adapter_stopped was used to mark the status about start/stop and
@@ -12,7 +14,6 @@
i40e_dev_close() to control the status of close.
Fixes: 4861cde46116 ("i40e: new poll mode driver")
-Cc: stable@dpdk.org
Signed-off-by: Zhirun Yan <zhirun.yan@intel.com>
Signed-off-by: Haiyue Wang <haiyue.wang@intel.com>
@@ -24,33 +25,33 @@
3 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/drivers/net/i40e/base/i40e_type.h b/drivers/net/i40e/base/i40e_type.h
-index 77562f24e..7ba62cc12 100644
+index 39275074e..a0fa67903 100644
--- a/drivers/net/i40e/base/i40e_type.h
+++ b/drivers/net/i40e/base/i40e_type.h
-@@ -671,4 +671,5 @@ struct i40e_hw {
+@@ -682,4 +682,5 @@ struct i40e_hw {
u8 port;
bool adapter_stopped;
+ bool adapter_closed;
/* capabilities for entire device and PCI func */
diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c
-index c1934d9c1..501c30cc3 100644
+index d822f30d3..7d26f3045 100644
--- a/drivers/net/i40e/i40e_ethdev.c
+++ b/drivers/net/i40e/i40e_ethdev.c
-@@ -1317,4 +1317,5 @@ eth_i40e_dev_init(struct rte_eth_dev *dev, void *init_params __rte_unused)
+@@ -1254,4 +1254,5 @@ eth_i40e_dev_init(struct rte_eth_dev *dev, void *init_params __rte_unused)
hw->bus.func = pci_dev->addr.function;
hw->adapter_stopped = 0;
+ hw->adapter_closed = 0;
/*
-@@ -1714,5 +1715,5 @@ eth_i40e_dev_uninit(struct rte_eth_dev *dev)
+@@ -1640,5 +1641,5 @@ eth_i40e_dev_uninit(struct rte_eth_dev *dev)
PMD_INIT_LOG(WARNING, "failed to free switch domain: %d", ret);
- if (hw->adapter_stopped == 0)
+ if (hw->adapter_closed == 0)
i40e_dev_close(dev);
-@@ -2535,4 +2536,6 @@ i40e_dev_close(struct rte_eth_dev *dev)
+@@ -2440,4 +2441,6 @@ i40e_dev_close(struct rte_eth_dev *dev)
(reg | I40E_PFGEN_CTRL_PFSWR_MASK));
I40E_WRITE_FLUSH(hw);
+
@@ -58,7 +59,7 @@
}
diff --git a/drivers/net/i40e/i40e_ethdev_vf.c b/drivers/net/i40e/i40e_ethdev_vf.c
-index ae55b9b18..05dc6596b 100644
+index 28b6543cd..21cd42055 100644
--- a/drivers/net/i40e/i40e_ethdev_vf.c
+++ b/drivers/net/i40e/i40e_ethdev_vf.c
@@ -1257,5 +1257,5 @@ i40evf_uninit_vf(struct rte_eth_dev *dev)
@@ -68,13 +69,13 @@
+ if (hw->adapter_closed == 0)
i40evf_dev_close(dev);
rte_free(vf->vf_res);
-@@ -1439,4 +1439,5 @@ i40evf_dev_init(struct rte_eth_dev *eth_dev)
+@@ -1441,4 +1441,5 @@ i40evf_dev_init(struct rte_eth_dev *eth_dev)
hw->hw_addr = (void *)pci_dev->mem_resource[0].addr;
hw->adapter_stopped = 0;
+ hw->adapter_closed = 0;
if(i40evf_init_vf(eth_dev) != 0) {
-@@ -2261,4 +2262,5 @@ i40evf_dev_close(struct rte_eth_dev *dev)
+@@ -2283,4 +2284,5 @@ i40evf_dev_close(struct rte_eth_dev *dev)
i40evf_disable_irq0(hw);
rte_eal_alarm_cancel(i40evf_dev_alarm_handler, dev);
+ hw->adapter_closed = 1;
^ permalink raw reply [flat|nested] 19+ messages in thread
* [dpdk-stable] patch 'net/mlx5: fix validation of Rx queue number' has been queued to stable release 18.08.1
2018-12-14 17:51 [dpdk-stable] patch 'net/ixgbe/base: add LHA ID' has been queued to stable release 18.08.1 Kevin Traynor
` (8 preceding siblings ...)
2018-12-14 17:51 ` [dpdk-stable] patch 'net/i40e: fix port close' " Kevin Traynor
@ 2018-12-14 17:51 ` Kevin Traynor
2018-12-14 17:51 ` [dpdk-stable] patch 'ethdev: fix typo in queue setup error log' " Kevin Traynor
` (7 subsequent siblings)
17 siblings, 0 replies; 19+ messages in thread
From: Kevin Traynor @ 2018-12-14 17:51 UTC (permalink / raw)
To: Dekel Peled; +Cc: Shahaf Shuler, dpdk stable
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/18/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 469db59b9259d5943faa5235638293dbe043d11f Mon Sep 17 00:00:00 2001
From: Dekel Peled <dekelp@mellanox.com>
Date: Wed, 28 Nov 2018 11:16:17 +0200
Subject: [PATCH] net/mlx5: fix validation of Rx queue number
[ upstream commit 8dd569abad0802f2e5adb0a4ac2483a07555ac89 ]
Function mlx5_ctrl_flow_vlan() is used to set the rss rule in
MLX5 PMD, using priv->reta_idx_n as number of Rx queues.
This number is passed to mlx5_flow_validate_action_rss(), which
attempts to access the Rx queues at priv->rxqs.
In case priv->rxqs_n is 0, priv->rxqs is empty, and
mlx5_flow_validate_action_rss() will crash with segmentation fault.
priv->reta_idx_n can never be 0, even if priv->rxqs_n is set to 0.
But when priv->rxqs_n is set to 0, setting the rss rule is invalid.
This patch updates mlx5_ctrl_flow_vlan(), if priv->rxqs_n is 0 the
function will fail with EINVAL errno.
Fixes: 8086cf08b2f0 ("net/mlx5: handle RSS hash configuration in RSS flow")
Signed-off-by: Dekel Peled <dekelp@mellanox.com>
Acked-by: Shahaf Shuler <shahafs@mellanox.com>
---
drivers/net/mlx5/mlx5_flow.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c
index fee6f693e..c09378de4 100644
--- a/drivers/net/mlx5/mlx5_flow.c
+++ b/drivers/net/mlx5/mlx5_flow.c
@@ -3266,5 +3266,5 @@ mlx5_ctrl_flow_vlan(struct rte_eth_dev *dev,
unsigned int i;
- if (!priv->reta_idx_n) {
+ if (!priv->reta_idx_n || !priv->rxqs_n) {
rte_errno = EINVAL;
return -rte_errno;
--
2.19.0
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2018-12-14 17:49:48.041074592 +0000
+++ 0011-net-mlx5-fix-validation-of-Rx-queue-number.patch 2018-12-14 17:49:47.000000000 +0000
@@ -1,8 +1,10 @@
-From 8dd569abad0802f2e5adb0a4ac2483a07555ac89 Mon Sep 17 00:00:00 2001
+From 469db59b9259d5943faa5235638293dbe043d11f Mon Sep 17 00:00:00 2001
From: Dekel Peled <dekelp@mellanox.com>
Date: Wed, 28 Nov 2018 11:16:17 +0200
Subject: [PATCH] net/mlx5: fix validation of Rx queue number
+[ upstream commit 8dd569abad0802f2e5adb0a4ac2483a07555ac89 ]
+
Function mlx5_ctrl_flow_vlan() is used to set the rss rule in
MLX5 PMD, using priv->reta_idx_n as number of Rx queues.
This number is passed to mlx5_flow_validate_action_rss(), which
@@ -17,7 +19,6 @@
function will fail with EINVAL errno.
Fixes: 8086cf08b2f0 ("net/mlx5: handle RSS hash configuration in RSS flow")
-Cc: stable@dpdk.org
Signed-off-by: Dekel Peled <dekelp@mellanox.com>
Acked-by: Shahaf Shuler <shahafs@mellanox.com>
@@ -26,10 +27,10 @@
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c
-index 97dc3e1f8..ee129b97b 100644
+index fee6f693e..c09378de4 100644
--- a/drivers/net/mlx5/mlx5_flow.c
+++ b/drivers/net/mlx5/mlx5_flow.c
-@@ -2315,5 +2315,5 @@ mlx5_ctrl_flow_vlan(struct rte_eth_dev *dev,
+@@ -3266,5 +3266,5 @@ mlx5_ctrl_flow_vlan(struct rte_eth_dev *dev,
unsigned int i;
- if (!priv->reta_idx_n) {
^ permalink raw reply [flat|nested] 19+ messages in thread
* [dpdk-stable] patch 'ethdev: fix typo in queue setup error log' has been queued to stable release 18.08.1
2018-12-14 17:51 [dpdk-stable] patch 'net/ixgbe/base: add LHA ID' has been queued to stable release 18.08.1 Kevin Traynor
` (9 preceding siblings ...)
2018-12-14 17:51 ` [dpdk-stable] patch 'net/mlx5: fix validation of Rx queue number' " Kevin Traynor
@ 2018-12-14 17:51 ` Kevin Traynor
2018-12-14 17:51 ` [dpdk-stable] patch 'doc: fix a typo in testpmd guide' " Kevin Traynor
` (6 subsequent siblings)
17 siblings, 0 replies; 19+ messages in thread
From: Kevin Traynor @ 2018-12-14 17:51 UTC (permalink / raw)
To: Yaroslav Brustinov; +Cc: Ferruh Yigit, dpdk stable
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/18/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 b3ef805281865b12f8abdb49176b2021eaa387a0 Mon Sep 17 00:00:00 2001
From: Yaroslav Brustinov <ybrustin@cisco.com>
Date: Mon, 3 Dec 2018 11:54:04 +0200
Subject: [PATCH] ethdev: fix typo in queue setup error log
[ upstream commit b4b896fcfe9bc9f079698442697aa8e1d4a6dc3f ]
'=' should be '>=" for '[rt]x_desc_lim.nb_min' check.
Fixes: 386c993e95f1 ("ethdev: add a missing sanity check for Tx queue setup")
Fixes: 80a1deb4c77a ("ethdev: add API to retrieve queue information")
Signed-off-by: Yaroslav Brustinov <ybrustin@cisco.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
lib/librte_ethdev/rte_ethdev.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/lib/librte_ethdev/rte_ethdev.c b/lib/librte_ethdev/rte_ethdev.c
index 84e868c31..e1d3c5215 100644
--- a/lib/librte_ethdev/rte_ethdev.c
+++ b/lib/librte_ethdev/rte_ethdev.c
@@ -1520,5 +1520,5 @@ rte_eth_rx_queue_setup(uint16_t port_id, uint16_t rx_queue_id,
RTE_ETHDEV_LOG(ERR,
- "Invalid value for nb_rx_desc(=%hu), should be: <= %hu, = %hu, and a product of %hu\n",
+ "Invalid value for nb_rx_desc(=%hu), should be: <= %hu, >= %hu, and a product of %hu\n",
nb_rx_desc, dev_info.rx_desc_lim.nb_max,
dev_info.rx_desc_lim.nb_min,
@@ -1624,5 +1624,5 @@ rte_eth_tx_queue_setup(uint16_t port_id, uint16_t tx_queue_id,
nb_tx_desc % dev_info.tx_desc_lim.nb_align != 0) {
RTE_ETHDEV_LOG(ERR,
- "Invalid value for nb_tx_desc(=%hu), should be: <= %hu, = %hu, and a product of %hu\n",
+ "Invalid value for nb_tx_desc(=%hu), should be: <= %hu, >= %hu, and a product of %hu\n",
nb_tx_desc, dev_info.tx_desc_lim.nb_max,
dev_info.tx_desc_lim.nb_min,
--
2.19.0
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2018-12-14 17:49:48.065148623 +0000
+++ 0012-ethdev-fix-typo-in-queue-setup-error-log.patch 2018-12-14 17:49:47.000000000 +0000
@@ -1,13 +1,14 @@
-From b4b896fcfe9bc9f079698442697aa8e1d4a6dc3f Mon Sep 17 00:00:00 2001
+From b3ef805281865b12f8abdb49176b2021eaa387a0 Mon Sep 17 00:00:00 2001
From: Yaroslav Brustinov <ybrustin@cisco.com>
Date: Mon, 3 Dec 2018 11:54:04 +0200
Subject: [PATCH] ethdev: fix typo in queue setup error log
+[ upstream commit b4b896fcfe9bc9f079698442697aa8e1d4a6dc3f ]
+
'=' should be '>=" for '[rt]x_desc_lim.nb_min' check.
Fixes: 386c993e95f1 ("ethdev: add a missing sanity check for Tx queue setup")
Fixes: 80a1deb4c77a ("ethdev: add API to retrieve queue information")
-Cc: stable@dpdk.org
Signed-off-by: Yaroslav Brustinov <ybrustin@cisco.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
@@ -16,17 +17,17 @@
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/lib/librte_ethdev/rte_ethdev.c b/lib/librte_ethdev/rte_ethdev.c
-index 5f858174b..9d5107dce 100644
+index 84e868c31..e1d3c5215 100644
--- a/lib/librte_ethdev/rte_ethdev.c
+++ b/lib/librte_ethdev/rte_ethdev.c
-@@ -1595,5 +1595,5 @@ rte_eth_rx_queue_setup(uint16_t port_id, uint16_t rx_queue_id,
+@@ -1520,5 +1520,5 @@ rte_eth_rx_queue_setup(uint16_t port_id, uint16_t rx_queue_id,
RTE_ETHDEV_LOG(ERR,
- "Invalid value for nb_rx_desc(=%hu), should be: <= %hu, = %hu, and a product of %hu\n",
+ "Invalid value for nb_rx_desc(=%hu), should be: <= %hu, >= %hu, and a product of %hu\n",
nb_rx_desc, dev_info.rx_desc_lim.nb_max,
dev_info.rx_desc_lim.nb_min,
-@@ -1699,5 +1699,5 @@ rte_eth_tx_queue_setup(uint16_t port_id, uint16_t tx_queue_id,
+@@ -1624,5 +1624,5 @@ rte_eth_tx_queue_setup(uint16_t port_id, uint16_t tx_queue_id,
nb_tx_desc % dev_info.tx_desc_lim.nb_align != 0) {
RTE_ETHDEV_LOG(ERR,
- "Invalid value for nb_tx_desc(=%hu), should be: <= %hu, = %hu, and a product of %hu\n",
^ permalink raw reply [flat|nested] 19+ messages in thread
* [dpdk-stable] patch 'doc: fix a typo in testpmd guide' has been queued to stable release 18.08.1
2018-12-14 17:51 [dpdk-stable] patch 'net/ixgbe/base: add LHA ID' has been queued to stable release 18.08.1 Kevin Traynor
` (10 preceding siblings ...)
2018-12-14 17:51 ` [dpdk-stable] patch 'ethdev: fix typo in queue setup error log' " Kevin Traynor
@ 2018-12-14 17:51 ` Kevin Traynor
2018-12-14 17:51 ` [dpdk-stable] patch 'net/cxgbe: fix control queue mbuf pool naming convention' " Kevin Traynor
` (5 subsequent siblings)
17 siblings, 0 replies; 19+ messages in thread
From: Kevin Traynor @ 2018-12-14 17:51 UTC (permalink / raw)
To: Rami Rosen; +Cc: Bernard Iremonger, Marko Kovacevic, dpdk stable
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/18/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 03ad422c3f0f8559c338c02cfaf2d746c8d5e87e Mon Sep 17 00:00:00 2001
From: Rami Rosen <ramirose@gmail.com>
Date: Wed, 5 Dec 2018 19:05:04 +0200
Subject: [PATCH] doc: fix a typo in testpmd guide
[ upstream commit 10ad83d0f0ae2b01618c673055f2cf6901eaec7b ]
This patch fixes a typo in testpmd guide (should be ICMP and not IMCP).
Fixes: ac718398f477 ("doc: testpmd application user guide")
Signed-off-by: Rami Rosen <ramirose@gmail.com>
Acked-by: Bernard Iremonger <bernard.iremonger@intel.com>
Acked-by: Marko Kovacevic <marko.kovacevic@intel.com>
---
doc/guides/testpmd_app_ug/testpmd_funcs.rst | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/doc/guides/testpmd_app_ug/testpmd_funcs.rst b/doc/guides/testpmd_app_ug/testpmd_funcs.rst
index c82094eca..e01f9894c 100644
--- a/doc/guides/testpmd_app_ug/testpmd_funcs.rst
+++ b/doc/guides/testpmd_app_ug/testpmd_funcs.rst
@@ -317,5 +317,5 @@ The available information categories are:
* ``csum``: Changes the checksum field with hardware or software methods depending on the offload flags on the packet.
-* ``icmpecho``: Receives a burst of packets, lookup for IMCP echo requests and, if any, send back ICMP echo replies.
+* ``icmpecho``: Receives a burst of packets, lookup for ICMP echo requests and, if any, send back ICMP echo replies.
* ``ieee1588``: Demonstrate L2 IEEE1588 V2 PTP timestamping for RX and TX. Requires ``CONFIG_RTE_LIBRTE_IEEE1588=y``.
--
2.19.0
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2018-12-14 17:49:48.090513463 +0000
+++ 0013-doc-fix-a-typo-in-testpmd-guide.patch 2018-12-14 17:49:47.000000000 +0000
@@ -1,12 +1,13 @@
-From 10ad83d0f0ae2b01618c673055f2cf6901eaec7b Mon Sep 17 00:00:00 2001
+From 03ad422c3f0f8559c338c02cfaf2d746c8d5e87e Mon Sep 17 00:00:00 2001
From: Rami Rosen <ramirose@gmail.com>
Date: Wed, 5 Dec 2018 19:05:04 +0200
Subject: [PATCH] doc: fix a typo in testpmd guide
+[ upstream commit 10ad83d0f0ae2b01618c673055f2cf6901eaec7b ]
+
This patch fixes a typo in testpmd guide (should be ICMP and not IMCP).
Fixes: ac718398f477 ("doc: testpmd application user guide")
-Cc: stable@dpdk.org
Signed-off-by: Rami Rosen <ramirose@gmail.com>
Acked-by: Bernard Iremonger <bernard.iremonger@intel.com>
@@ -16,10 +17,10 @@
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/doc/guides/testpmd_app_ug/testpmd_funcs.rst b/doc/guides/testpmd_app_ug/testpmd_funcs.rst
-index 056f8bb32..63e4a2d19 100644
+index c82094eca..e01f9894c 100644
--- a/doc/guides/testpmd_app_ug/testpmd_funcs.rst
+++ b/doc/guides/testpmd_app_ug/testpmd_funcs.rst
-@@ -319,5 +319,5 @@ The available information categories are:
+@@ -317,5 +317,5 @@ The available information categories are:
* ``csum``: Changes the checksum field with hardware or software methods depending on the offload flags on the packet.
-* ``icmpecho``: Receives a burst of packets, lookup for IMCP echo requests and, if any, send back ICMP echo replies.
^ permalink raw reply [flat|nested] 19+ messages in thread
* [dpdk-stable] patch 'net/cxgbe: fix control queue mbuf pool naming convention' has been queued to stable release 18.08.1
2018-12-14 17:51 [dpdk-stable] patch 'net/ixgbe/base: add LHA ID' has been queued to stable release 18.08.1 Kevin Traynor
` (11 preceding siblings ...)
2018-12-14 17:51 ` [dpdk-stable] patch 'doc: fix a typo in testpmd guide' " Kevin Traynor
@ 2018-12-14 17:51 ` Kevin Traynor
2018-12-14 17:51 ` [dpdk-stable] patch 'drivers/net: fix several Tx prepare functions' " Kevin Traynor
` (4 subsequent siblings)
17 siblings, 0 replies; 19+ messages in thread
From: Kevin Traynor @ 2018-12-14 17:51 UTC (permalink / raw)
To: Rahul Lakkireddy; +Cc: dpdk stable
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/18/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 c81824fb2b357743d53a7ea63c1e6c3ffa97cdfa Mon Sep 17 00:00:00 2001
From: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>
Date: Thu, 6 Dec 2018 15:43:20 +0530
Subject: [PATCH] net/cxgbe: fix control queue mbuf pool naming convention
[ upstream commit 46df488b270a81a9353cac9374b8c338fcf7dfeb ]
When multiple Chelsio adapters are present, the current naming
convention of using underlying physical port number of the adapter
creates conflicts when allocating control queue mbuf pool for
multiple adapters and hence results in allocation failure. Fix by
using port_id from rte_eth_dev_data, instead of physical port number.
Fixes: 3a3aaabc7c77 ("net/cxgbe: add control queue to communicate filter requests")
Signed-off-by: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>
---
drivers/net/cxgbe/cxgbe_main.c | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)
diff --git a/drivers/net/cxgbe/cxgbe_main.c b/drivers/net/cxgbe/cxgbe_main.c
index d8705163c..4cef8d04a 100644
--- a/drivers/net/cxgbe/cxgbe_main.c
+++ b/drivers/net/cxgbe/cxgbe_main.c
@@ -117,4 +117,5 @@ int setup_sge_ctrl_txq(struct adapter *adapter)
for_each_port(adapter, i) {
+ struct port_info *pi = adap2pinfo(adapter, i);
char name[RTE_ETH_NAME_MAX_LEN];
struct sge_ctrl_txq *q = &s->ctrlq[i];
@@ -130,5 +131,7 @@ int setup_sge_ctrl_txq(struct adapter *adapter)
goto out;
}
- snprintf(name, sizeof(name), "cxgbe_ctrl_pool_%d", i);
+ snprintf(name, sizeof(name), "%s_ctrl_pool_%d",
+ pi->eth_dev->device->driver->name,
+ pi->eth_dev->data->port_id);
q->mb_pool = rte_pktmbuf_pool_create(name, s->ctrlq[i].q.size,
RTE_CACHE_LINE_SIZE,
@@ -137,7 +140,8 @@ int setup_sge_ctrl_txq(struct adapter *adapter)
SOCKET_ID_ANY);
if (!q->mb_pool) {
- dev_err(adapter, "Can't create ctrl pool for port: %d",
- i);
- err = -ENOMEM;
+ err = -rte_errno;
+ dev_err(adapter,
+ "Can't create ctrl pool for port %d. Err: %d\n",
+ pi->eth_dev->data->port_id, err);
goto out;
}
--
2.19.0
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2018-12-14 17:49:48.116843116 +0000
+++ 0014-net-cxgbe-fix-control-queue-mbuf-pool-naming-convent.patch 2018-12-14 17:49:47.000000000 +0000
@@ -1,8 +1,10 @@
-From 46df488b270a81a9353cac9374b8c338fcf7dfeb Mon Sep 17 00:00:00 2001
+From c81824fb2b357743d53a7ea63c1e6c3ffa97cdfa Mon Sep 17 00:00:00 2001
From: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>
Date: Thu, 6 Dec 2018 15:43:20 +0530
Subject: [PATCH] net/cxgbe: fix control queue mbuf pool naming convention
+[ upstream commit 46df488b270a81a9353cac9374b8c338fcf7dfeb ]
+
When multiple Chelsio adapters are present, the current naming
convention of using underlying physical port number of the adapter
creates conflicts when allocating control queue mbuf pool for
@@ -10,7 +12,6 @@
using port_id from rte_eth_dev_data, instead of physical port number.
Fixes: 3a3aaabc7c77 ("net/cxgbe: add control queue to communicate filter requests")
-Cc: stable@dpdk.org
Signed-off-by: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>
---
@@ -18,16 +19,16 @@
1 file changed, 8 insertions(+), 4 deletions(-)
diff --git a/drivers/net/cxgbe/cxgbe_main.c b/drivers/net/cxgbe/cxgbe_main.c
-index ec080e5d3..0368db509 100644
+index d8705163c..4cef8d04a 100644
--- a/drivers/net/cxgbe/cxgbe_main.c
+++ b/drivers/net/cxgbe/cxgbe_main.c
-@@ -123,4 +123,5 @@ int setup_sge_ctrl_txq(struct adapter *adapter)
+@@ -117,4 +117,5 @@ int setup_sge_ctrl_txq(struct adapter *adapter)
for_each_port(adapter, i) {
+ struct port_info *pi = adap2pinfo(adapter, i);
char name[RTE_ETH_NAME_MAX_LEN];
struct sge_ctrl_txq *q = &s->ctrlq[i];
-@@ -136,5 +137,7 @@ int setup_sge_ctrl_txq(struct adapter *adapter)
+@@ -130,5 +131,7 @@ int setup_sge_ctrl_txq(struct adapter *adapter)
goto out;
}
- snprintf(name, sizeof(name), "cxgbe_ctrl_pool_%d", i);
@@ -36,7 +37,7 @@
+ pi->eth_dev->data->port_id);
q->mb_pool = rte_pktmbuf_pool_create(name, s->ctrlq[i].q.size,
RTE_CACHE_LINE_SIZE,
-@@ -143,7 +146,8 @@ int setup_sge_ctrl_txq(struct adapter *adapter)
+@@ -137,7 +140,8 @@ int setup_sge_ctrl_txq(struct adapter *adapter)
SOCKET_ID_ANY);
if (!q->mb_pool) {
- dev_err(adapter, "Can't create ctrl pool for port: %d",
^ permalink raw reply [flat|nested] 19+ messages in thread
* [dpdk-stable] patch 'drivers/net: fix several Tx prepare functions' has been queued to stable release 18.08.1
2018-12-14 17:51 [dpdk-stable] patch 'net/ixgbe/base: add LHA ID' has been queued to stable release 18.08.1 Kevin Traynor
` (12 preceding siblings ...)
2018-12-14 17:51 ` [dpdk-stable] patch 'net/cxgbe: fix control queue mbuf pool naming convention' " Kevin Traynor
@ 2018-12-14 17:51 ` Kevin Traynor
2018-12-14 17:52 ` [dpdk-stable] patch 'vhost: fix crash after mmap failure' " Kevin Traynor
` (3 subsequent siblings)
17 siblings, 0 replies; 19+ messages in thread
From: Kevin Traynor @ 2018-12-14 17:51 UTC (permalink / raw)
To: Didier Pallard; +Cc: Ferruh Yigit, dpdk stable
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/18/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 4cfe313616b9db796d02ee8e5cbbcf70a0a4d446 Mon Sep 17 00:00:00 2001
From: Didier Pallard <didier.pallard@6wind.com>
Date: Tue, 11 Dec 2018 14:00:28 +0100
Subject: [PATCH] drivers/net: fix several Tx prepare functions
[ upstream commit d6db681bf9b8095da2fed653ec5b89e5f165eaa8 ]
Since below commit, several tx_prep functions are broken, they fail to
pass supported Tx offload features check:
PKT_TX_IPVx must be set when any PKT_TX_L4 checksum is requested,
but these values are not present in the mask of supported Tx offloads
of several drivers that advertise PKT_TX_L4_MASK.
So any packet sent to those drivers with a L4 checksum request and
one of PKT_TX_IPVx bit set is rejected by the tx prepare function.
Fixes: 1037ed842c37 ("mbuf: fix Tx offload mask")
Signed-off-by: Didier Pallard <didier.pallard@6wind.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
drivers/net/e1000/em_rxtx.c | 2 ++
drivers/net/ena/ena_ethdev.c | 2 ++
drivers/net/fm10k/fm10k_rxtx.c | 2 ++
drivers/net/vmxnet3/vmxnet3_rxtx.c | 2 ++
4 files changed, 8 insertions(+)
diff --git a/drivers/net/e1000/em_rxtx.c b/drivers/net/e1000/em_rxtx.c
index 46bdf519c..8913a7a99 100644
--- a/drivers/net/e1000/em_rxtx.c
+++ b/drivers/net/e1000/em_rxtx.c
@@ -51,4 +51,6 @@
#define E1000_TX_OFFLOAD_MASK ( \
+ PKT_TX_IPV6 | \
+ PKT_TX_IPV4 | \
PKT_TX_IP_CKSUM | \
PKT_TX_L4_MASK | \
diff --git a/drivers/net/ena/ena_ethdev.c b/drivers/net/ena/ena_ethdev.c
index 87c95b2e7..e57e4baa2 100644
--- a/drivers/net/ena/ena_ethdev.c
+++ b/drivers/net/ena/ena_ethdev.c
@@ -190,4 +190,6 @@ static const struct ena_stats ena_stats_ena_com_strings[] = {
#define ENA_TX_OFFLOAD_MASK (\
PKT_TX_L4_MASK | \
+ PKT_TX_IPV6 | \
+ PKT_TX_IPV4 | \
PKT_TX_IP_CKSUM | \
PKT_TX_TCP_SEG)
diff --git a/drivers/net/fm10k/fm10k_rxtx.c b/drivers/net/fm10k/fm10k_rxtx.c
index 4a5b46ec8..1d0f09d25 100644
--- a/drivers/net/fm10k/fm10k_rxtx.c
+++ b/drivers/net/fm10k/fm10k_rxtx.c
@@ -40,4 +40,6 @@ static inline void dump_rxd(union fm10k_rx_desc *rxd)
#define FM10K_TX_OFFLOAD_MASK ( \
PKT_TX_VLAN_PKT | \
+ PKT_TX_IPV6 | \
+ PKT_TX_IPV4 | \
PKT_TX_IP_CKSUM | \
PKT_TX_L4_MASK | \
diff --git a/drivers/net/vmxnet3/vmxnet3_rxtx.c b/drivers/net/vmxnet3/vmxnet3_rxtx.c
index cf85f3d61..d30914a8a 100644
--- a/drivers/net/vmxnet3/vmxnet3_rxtx.c
+++ b/drivers/net/vmxnet3/vmxnet3_rxtx.c
@@ -51,4 +51,6 @@
#define VMXNET3_TX_OFFLOAD_MASK ( \
PKT_TX_VLAN_PKT | \
+ PKT_TX_IPV6 | \
+ PKT_TX_IPV4 | \
PKT_TX_L4_MASK | \
PKT_TX_TCP_SEG)
--
2.19.0
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2018-12-14 17:49:48.139710023 +0000
+++ 0015-drivers-net-fix-several-Tx-prepare-functions.patch 2018-12-14 17:49:47.000000000 +0000
@@ -1,8 +1,10 @@
-From d6db681bf9b8095da2fed653ec5b89e5f165eaa8 Mon Sep 17 00:00:00 2001
+From 4cfe313616b9db796d02ee8e5cbbcf70a0a4d446 Mon Sep 17 00:00:00 2001
From: Didier Pallard <didier.pallard@6wind.com>
Date: Tue, 11 Dec 2018 14:00:28 +0100
Subject: [PATCH] drivers/net: fix several Tx prepare functions
+[ upstream commit d6db681bf9b8095da2fed653ec5b89e5f165eaa8 ]
+
Since below commit, several tx_prep functions are broken, they fail to
pass supported Tx offload features check:
PKT_TX_IPVx must be set when any PKT_TX_L4 checksum is requested,
@@ -12,31 +14,18 @@
one of PKT_TX_IPVx bit set is rejected by the tx prepare function.
Fixes: 1037ed842c37 ("mbuf: fix Tx offload mask")
-Cc: stable@dpdk.org
Signed-off-by: Didier Pallard <didier.pallard@6wind.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
- drivers/net/atlantic/atl_rxtx.c | 2 ++
drivers/net/e1000/em_rxtx.c | 2 ++
drivers/net/ena/ena_ethdev.c | 2 ++
drivers/net/fm10k/fm10k_rxtx.c | 2 ++
drivers/net/vmxnet3/vmxnet3_rxtx.c | 2 ++
- 5 files changed, 10 insertions(+)
+ 4 files changed, 8 insertions(+)
-diff --git a/drivers/net/atlantic/atl_rxtx.c b/drivers/net/atlantic/atl_rxtx.c
-index fd909476c..40c913795 100644
---- a/drivers/net/atlantic/atl_rxtx.c
-+++ b/drivers/net/atlantic/atl_rxtx.c
-@@ -22,4 +22,6 @@
- #define ATL_TX_OFFLOAD_MASK ( \
- PKT_TX_VLAN | \
-+ PKT_TX_IPV6 | \
-+ PKT_TX_IPV4 | \
- PKT_TX_IP_CKSUM | \
- PKT_TX_L4_MASK | \
diff --git a/drivers/net/e1000/em_rxtx.c b/drivers/net/e1000/em_rxtx.c
-index a9cd76518..005e1ea96 100644
+index 46bdf519c..8913a7a99 100644
--- a/drivers/net/e1000/em_rxtx.c
+++ b/drivers/net/e1000/em_rxtx.c
@@ -51,4 +51,6 @@
@@ -47,7 +36,7 @@
PKT_TX_IP_CKSUM | \
PKT_TX_L4_MASK | \
diff --git a/drivers/net/ena/ena_ethdev.c b/drivers/net/ena/ena_ethdev.c
-index a07bd2b49..709ad2edb 100644
+index 87c95b2e7..e57e4baa2 100644
--- a/drivers/net/ena/ena_ethdev.c
+++ b/drivers/net/ena/ena_ethdev.c
@@ -190,4 +190,6 @@ static const struct ena_stats ena_stats_ena_com_strings[] = {
^ permalink raw reply [flat|nested] 19+ messages in thread
* [dpdk-stable] patch 'vhost: fix crash after mmap failure' has been queued to stable release 18.08.1
2018-12-14 17:51 [dpdk-stable] patch 'net/ixgbe/base: add LHA ID' has been queued to stable release 18.08.1 Kevin Traynor
` (13 preceding siblings ...)
2018-12-14 17:51 ` [dpdk-stable] patch 'drivers/net: fix several Tx prepare functions' " Kevin Traynor
@ 2018-12-14 17:52 ` Kevin Traynor
2018-12-14 17:52 ` [dpdk-stable] patch 'vhost: fix double read of descriptor flags' " Kevin Traynor
` (2 subsequent siblings)
17 siblings, 0 replies; 19+ messages in thread
From: Kevin Traynor @ 2018-12-14 17:52 UTC (permalink / raw)
To: Maxime Coquelin; +Cc: Tiwei Bie, Jens Freimann, dpdk stable
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/18/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 72c7adc36db4aaca11ee4787335ffc8115bcfc2e Mon Sep 17 00:00:00 2001
From: Maxime Coquelin <maxime.coquelin@redhat.com>
Date: Tue, 27 Nov 2018 10:54:51 +0100
Subject: [PATCH] vhost: fix crash after mmap failure
[ upstream commit cf14478d775cadbaed4f5aa96e3812b44a2383c1 ]
If mmap() call fails in vhost_user_set_mem_table, dev->mem
is set to NULL. If later, qva_to_vva() is called, a segfault
occurs.
Fixes: 8f972312b8f4 ("vhost: support vhost-user")
Reviewed-by: Tiwei Bie <tiwei.bie@intel.com>
Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Reviewed-by: Jens Freimann <jfreimann@redhat.com>
---
lib/librte_vhost/vhost_user.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/lib/librte_vhost/vhost_user.c b/lib/librte_vhost/vhost_user.c
index ba92d1650..68e9bf8c4 100644
--- a/lib/librte_vhost/vhost_user.c
+++ b/lib/librte_vhost/vhost_user.c
@@ -447,4 +447,7 @@ qva_to_vva(struct virtio_net *dev, uint64_t qva, uint64_t *len)
uint32_t i;
+ if (unlikely(!dev || !dev->mem))
+ goto out_error;
+
/* Find the region where the address lives. */
for (i = 0; i < dev->mem->nregions; i++) {
@@ -461,4 +464,5 @@ qva_to_vva(struct virtio_net *dev, uint64_t qva, uint64_t *len)
}
}
+out_error:
*len = 0;
--
2.19.0
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2018-12-14 17:49:48.167558800 +0000
+++ 0016-vhost-fix-crash-after-mmap-failure.patch 2018-12-14 17:49:47.000000000 +0000
@@ -1,14 +1,15 @@
-From cf14478d775cadbaed4f5aa96e3812b44a2383c1 Mon Sep 17 00:00:00 2001
+From 72c7adc36db4aaca11ee4787335ffc8115bcfc2e Mon Sep 17 00:00:00 2001
From: Maxime Coquelin <maxime.coquelin@redhat.com>
Date: Tue, 27 Nov 2018 10:54:51 +0100
Subject: [PATCH] vhost: fix crash after mmap failure
+[ upstream commit cf14478d775cadbaed4f5aa96e3812b44a2383c1 ]
+
If mmap() call fails in vhost_user_set_mem_table, dev->mem
is set to NULL. If later, qva_to_vva() is called, a segfault
occurs.
Fixes: 8f972312b8f4 ("vhost: support vhost-user")
-Cc: stable@dpdk.org
Reviewed-by: Tiwei Bie <tiwei.bie@intel.com>
Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
@@ -18,10 +19,10 @@
1 file changed, 4 insertions(+)
diff --git a/lib/librte_vhost/vhost_user.c b/lib/librte_vhost/vhost_user.c
-index 3ea64eba6..557213491 100644
+index ba92d1650..68e9bf8c4 100644
--- a/lib/librte_vhost/vhost_user.c
+++ b/lib/librte_vhost/vhost_user.c
-@@ -490,4 +490,7 @@ qva_to_vva(struct virtio_net *dev, uint64_t qva, uint64_t *len)
+@@ -447,4 +447,7 @@ qva_to_vva(struct virtio_net *dev, uint64_t qva, uint64_t *len)
uint32_t i;
+ if (unlikely(!dev || !dev->mem))
@@ -29,7 +30,7 @@
+
/* Find the region where the address lives. */
for (i = 0; i < dev->mem->nregions; i++) {
-@@ -504,4 +507,5 @@ qva_to_vva(struct virtio_net *dev, uint64_t qva, uint64_t *len)
+@@ -461,4 +464,5 @@ qva_to_vva(struct virtio_net *dev, uint64_t qva, uint64_t *len)
}
}
+out_error:
^ permalink raw reply [flat|nested] 19+ messages in thread
* [dpdk-stable] patch 'vhost: fix double read of descriptor flags' has been queued to stable release 18.08.1
2018-12-14 17:51 [dpdk-stable] patch 'net/ixgbe/base: add LHA ID' has been queued to stable release 18.08.1 Kevin Traynor
` (14 preceding siblings ...)
2018-12-14 17:52 ` [dpdk-stable] patch 'vhost: fix crash after mmap failure' " Kevin Traynor
@ 2018-12-14 17:52 ` Kevin Traynor
2018-12-14 17:52 ` [dpdk-stable] patch 'net/i40e: revert fix offload not supported mask' " Kevin Traynor
2018-12-14 17:52 ` [dpdk-stable] patch 'net/i40e: remove redundant reset of queue number' " Kevin Traynor
17 siblings, 0 replies; 19+ messages in thread
From: Kevin Traynor @ 2018-12-14 17:52 UTC (permalink / raw)
To: Ilya Maximets; +Cc: Maxime Coquelin, dpdk stable
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/18/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 162166cae7ce59efb5b7086ad6837143ab5e5298 Mon Sep 17 00:00:00 2001
From: Ilya Maximets <i.maximets@samsung.com>
Date: Wed, 5 Dec 2018 18:09:26 +0300
Subject: [PATCH] vhost: fix double read of descriptor flags
[ upstream commit 48cae0bfa60c451c5d9c0d5be932300aadc7e676 ]
Flags could be updated in a separate process leading to the
inconsistent check.
Additionally, read marked as 'volatile' to highlight the shared
nature of the variable and avoid such issues in the future.
Fixes: d3211c98c456 ("vhost: add helpers for packed virtqueues")
Signed-off-by: Ilya Maximets <i.maximets@samsung.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
---
lib/librte_vhost/vhost.h | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/lib/librte_vhost/vhost.h b/lib/librte_vhost/vhost.h
index 9ac607bad..bdbea68d2 100644
--- a/lib/librte_vhost/vhost.h
+++ b/lib/librte_vhost/vhost.h
@@ -385,6 +385,8 @@ static inline bool
desc_is_avail(struct vring_packed_desc *desc, bool wrap_counter)
{
- return wrap_counter == !!(desc->flags & VRING_DESC_F_AVAIL) &&
- wrap_counter != !!(desc->flags & VRING_DESC_F_USED);
+ uint16_t flags = *((volatile uint16_t *) &desc->flags);
+
+ return wrap_counter == !!(flags & VRING_DESC_F_AVAIL) &&
+ wrap_counter != !!(flags & VRING_DESC_F_USED);
}
--
2.19.0
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2018-12-14 17:49:48.190692519 +0000
+++ 0017-vhost-fix-double-read-of-descriptor-flags.patch 2018-12-14 17:49:47.000000000 +0000
@@ -1,8 +1,10 @@
-From 48cae0bfa60c451c5d9c0d5be932300aadc7e676 Mon Sep 17 00:00:00 2001
+From 162166cae7ce59efb5b7086ad6837143ab5e5298 Mon Sep 17 00:00:00 2001
From: Ilya Maximets <i.maximets@samsung.com>
Date: Wed, 5 Dec 2018 18:09:26 +0300
Subject: [PATCH] vhost: fix double read of descriptor flags
+[ upstream commit 48cae0bfa60c451c5d9c0d5be932300aadc7e676 ]
+
Flags could be updated in a separate process leading to the
inconsistent check.
@@ -10,7 +12,6 @@
nature of the variable and avoid such issues in the future.
Fixes: d3211c98c456 ("vhost: add helpers for packed virtqueues")
-Cc: stable@dpdk.org
Signed-off-by: Ilya Maximets <i.maximets@samsung.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
@@ -19,10 +20,10 @@
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/lib/librte_vhost/vhost.h b/lib/librte_vhost/vhost.h
-index 5218f1b12..552b9298d 100644
+index 9ac607bad..bdbea68d2 100644
--- a/lib/librte_vhost/vhost.h
+++ b/lib/librte_vhost/vhost.h
-@@ -394,6 +394,8 @@ static inline bool
+@@ -385,6 +385,8 @@ static inline bool
desc_is_avail(struct vring_packed_desc *desc, bool wrap_counter)
{
- return wrap_counter == !!(desc->flags & VRING_DESC_F_AVAIL) &&
^ permalink raw reply [flat|nested] 19+ messages in thread
* [dpdk-stable] patch 'net/i40e: revert fix offload not supported mask' has been queued to stable release 18.08.1
2018-12-14 17:51 [dpdk-stable] patch 'net/ixgbe/base: add LHA ID' has been queued to stable release 18.08.1 Kevin Traynor
` (15 preceding siblings ...)
2018-12-14 17:52 ` [dpdk-stable] patch 'vhost: fix double read of descriptor flags' " Kevin Traynor
@ 2018-12-14 17:52 ` Kevin Traynor
2018-12-14 17:52 ` [dpdk-stable] patch 'net/i40e: remove redundant reset of queue number' " Kevin Traynor
17 siblings, 0 replies; 19+ messages in thread
From: Kevin Traynor @ 2018-12-14 17:52 UTC (permalink / raw)
To: Didier Pallard; +Cc: Qi Zhang, dpdk stable
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/18/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 0fcd6b608ec0130804824d080bd4cdaf5574cb0f Mon Sep 17 00:00:00 2001
From: Didier Pallard <didier.pallard@6wind.com>
Date: Tue, 11 Dec 2018 18:25:01 +0100
Subject: [PATCH] net/i40e: revert fix offload not supported mask
[ upstream commit e51da4bbaf3584e16cbd0ea0b1b85343b777134f ]
This reverts
commit 09a62d75691f ("net/i40e: fix offload not supported mask")
Contrary to what is said in above patch commit log,
I40E_TX_OFFLOAD_NOTSUP_MASK is the mask of Tx offload bits that are part
of PKT_TX_OFFLOAD_MASK but not included in I40E_TX_OFFLOAD_MASK.
Above patch erroneously includes all PKT_RX_OFFLOAD_ bits in the
I40E_TX_OFFLOAD_NOTSUP_MASK, this is not what is expected.
Restore the initial xor that gives the expected result.
Fixes: 09a62d75691f ("net/i40e: fix offload not supported mask")
Signed-off-by: Didier Pallard <didier.pallard@6wind.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
---
drivers/net/i40e/i40e_rxtx.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/i40e/i40e_rxtx.c b/drivers/net/i40e/i40e_rxtx.c
index e0d53d022..7cc35c19c 100644
--- a/drivers/net/i40e/i40e_rxtx.c
+++ b/drivers/net/i40e/i40e_rxtx.c
@@ -70,5 +70,5 @@
#define I40E_TX_OFFLOAD_NOTSUP_MASK \
- ~(PKT_TX_OFFLOAD_MASK & I40E_TX_OFFLOAD_MASK)
+ (PKT_TX_OFFLOAD_MASK ^ I40E_TX_OFFLOAD_MASK)
static inline void
--
2.19.0
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2018-12-14 17:49:48.213901542 +0000
+++ 0018-net-i40e-revert-fix-offload-not-supported-mask.patch 2018-12-14 17:49:47.000000000 +0000
@@ -1,8 +1,10 @@
-From e51da4bbaf3584e16cbd0ea0b1b85343b777134f Mon Sep 17 00:00:00 2001
+From 0fcd6b608ec0130804824d080bd4cdaf5574cb0f Mon Sep 17 00:00:00 2001
From: Didier Pallard <didier.pallard@6wind.com>
Date: Tue, 11 Dec 2018 18:25:01 +0100
Subject: [PATCH] net/i40e: revert fix offload not supported mask
+[ upstream commit e51da4bbaf3584e16cbd0ea0b1b85343b777134f ]
+
This reverts
commit 09a62d75691f ("net/i40e: fix offload not supported mask")
@@ -14,7 +16,6 @@
Restore the initial xor that gives the expected result.
Fixes: 09a62d75691f ("net/i40e: fix offload not supported mask")
-Cc: stable@dpdk.org
Signed-off-by: Didier Pallard <didier.pallard@6wind.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
@@ -23,7 +24,7 @@
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/i40e/i40e_rxtx.c b/drivers/net/i40e/i40e_rxtx.c
-index e1152ff0e..ab74a488f 100644
+index e0d53d022..7cc35c19c 100644
--- a/drivers/net/i40e/i40e_rxtx.c
+++ b/drivers/net/i40e/i40e_rxtx.c
@@ -70,5 +70,5 @@
^ permalink raw reply [flat|nested] 19+ messages in thread
* [dpdk-stable] patch 'net/i40e: remove redundant reset of queue number' has been queued to stable release 18.08.1
2018-12-14 17:51 [dpdk-stable] patch 'net/ixgbe/base: add LHA ID' has been queued to stable release 18.08.1 Kevin Traynor
` (16 preceding siblings ...)
2018-12-14 17:52 ` [dpdk-stable] patch 'net/i40e: revert fix offload not supported mask' " Kevin Traynor
@ 2018-12-14 17:52 ` Kevin Traynor
17 siblings, 0 replies; 19+ messages in thread
From: Kevin Traynor @ 2018-12-14 17:52 UTC (permalink / raw)
To: Zhirun Yan; +Cc: Haiyue Wang, Qi Zhang, dpdk stable
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/18/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 c78b49bd6d7f047588db6010636fe6c248a500ab Mon Sep 17 00:00:00 2001
From: Zhirun Yan <zhirun.yan@intel.com>
Date: Thu, 13 Dec 2018 12:49:28 +0000
Subject: [PATCH] net/i40e: remove redundant reset of queue number
[ upstream commit ef8b7c505f10897621c0801d8ef3e961385246f8 ]
Before this patch, there are two functions will call
i40e_dev_free_queues to free queues. For rte_eth_dev_close(), its
redundant because of duplication. For rte_eth_dev_reset() its
redundant because of not necessary, since following dev_configure
is required after dev_reset and it will be updated correctly.
This patch removes redundant code in i40e_dev_free_queues().
Fixes: 6b4537128394 ("i40e: free queue memory when closing")
Signed-off-by: Zhirun Yan <zhirun.yan@intel.com>
Signed-off-by: Haiyue Wang <haiyue.wang@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
---
drivers/net/i40e/i40e_rxtx.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/net/i40e/i40e_rxtx.c b/drivers/net/i40e/i40e_rxtx.c
index 7cc35c19c..cdc14b918 100644
--- a/drivers/net/i40e/i40e_rxtx.c
+++ b/drivers/net/i40e/i40e_rxtx.c
@@ -2753,5 +2753,4 @@ i40e_dev_free_queues(struct rte_eth_dev *dev)
dev->data->rx_queues[i] = NULL;
}
- dev->data->nb_rx_queues = 0;
for (i = 0; i < dev->data->nb_tx_queues; i++) {
@@ -2761,5 +2760,4 @@ i40e_dev_free_queues(struct rte_eth_dev *dev)
dev->data->tx_queues[i] = NULL;
}
- dev->data->nb_tx_queues = 0;
}
--
2.19.0
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2018-12-14 17:49:48.238205568 +0000
+++ 0019-net-i40e-remove-redundant-reset-of-queue-number.patch 2018-12-14 17:49:47.000000000 +0000
@@ -1,8 +1,10 @@
-From ef8b7c505f10897621c0801d8ef3e961385246f8 Mon Sep 17 00:00:00 2001
+From c78b49bd6d7f047588db6010636fe6c248a500ab Mon Sep 17 00:00:00 2001
From: Zhirun Yan <zhirun.yan@intel.com>
Date: Thu, 13 Dec 2018 12:49:28 +0000
Subject: [PATCH] net/i40e: remove redundant reset of queue number
+[ upstream commit ef8b7c505f10897621c0801d8ef3e961385246f8 ]
+
Before this patch, there are two functions will call
i40e_dev_free_queues to free queues. For rte_eth_dev_close(), its
redundant because of duplication. For rte_eth_dev_reset() its
@@ -12,7 +14,6 @@
This patch removes redundant code in i40e_dev_free_queues().
Fixes: 6b4537128394 ("i40e: free queue memory when closing")
-Cc: stable@dpdk.org
Signed-off-by: Zhirun Yan <zhirun.yan@intel.com>
Signed-off-by: Haiyue Wang <haiyue.wang@intel.com>
@@ -22,16 +23,16 @@
1 file changed, 2 deletions(-)
diff --git a/drivers/net/i40e/i40e_rxtx.c b/drivers/net/i40e/i40e_rxtx.c
-index ab74a488f..82a170929 100644
+index 7cc35c19c..cdc14b918 100644
--- a/drivers/net/i40e/i40e_rxtx.c
+++ b/drivers/net/i40e/i40e_rxtx.c
-@@ -2754,5 +2754,4 @@ i40e_dev_free_queues(struct rte_eth_dev *dev)
+@@ -2753,5 +2753,4 @@ i40e_dev_free_queues(struct rte_eth_dev *dev)
dev->data->rx_queues[i] = NULL;
}
- dev->data->nb_rx_queues = 0;
for (i = 0; i < dev->data->nb_tx_queues; i++) {
-@@ -2762,5 +2761,4 @@ i40e_dev_free_queues(struct rte_eth_dev *dev)
+@@ -2761,5 +2760,4 @@ i40e_dev_free_queues(struct rte_eth_dev *dev)
dev->data->tx_queues[i] = NULL;
}
- dev->data->nb_tx_queues = 0;
^ permalink raw reply [flat|nested] 19+ messages in thread