patches for DPDK stable branches
 help / color / mirror / Atom feed
* [dpdk-stable] patch 'net/bnx2x: cleanup info logs' has been queued to LTS release 17.11.6
@ 2019-03-08 17:46 Yongseok Koh
  2019-03-08 17:46 ` [dpdk-stable] patch 'net/i40e: fix getting RSS configuration' " Yongseok Koh
                   ` (69 more replies)
  0 siblings, 70 replies; 75+ messages in thread
From: Yongseok Koh @ 2019-03-08 17:46 UTC (permalink / raw)
  To: Rasesh Mody; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.6

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objection by 03/13/19. So please
shout if anyone has objection.

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.

Yongseok

---
>From 23077d7ea32672e2a17272df8b2e00f856a28e12 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 42fa510fb..b51a38d22 100644
--- a/drivers/net/bnx2x/bnx2x.c
+++ b/drivers/net/bnx2x/bnx2x.c
@@ -5815,7 +5815,7 @@ 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;
 	}
 
@@ -6924,19 +6924,19 @@ static void bnx2x_link_report_locked(struct bnx2x_softc *sc)
 		return;
 	}
 
-	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));
 
 	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;
 		__rte_unused const char *flow;
@@ -6944,8 +6944,10 @@ static void bnx2x_link_report_locked(struct bnx2x_softc *sc)
 		if (bnx2x_test_and_clear_bit(BNX2X_LINK_REPORT_FULL_DUPLEX,
 					   &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");
 		}
 
 /*
@@ -7129,7 +7131,7 @@ 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;
 	}
@@ -8325,7 +8327,7 @@ static int bnx2x_get_device_info(struct bnx2x_softc *sc)
 		 ((sc->devinfo.bc_ver >> 24) & 0xff),
 		 ((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 */
 	sc->devinfo.mf_cfg_base = bnx2x_get_shmem_mf_cfg_base(sc);
@@ -11753,42 +11755,36 @@ static const char *get_bnx2x_flags(uint32_t flags)
 }
 #endif
 
-/*
- * 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:
 		PMD_DRV_LOG(INFO, sc, "%23s", "2.5 Gbps");
@@ -11802,62 +11798,45 @@ void bnx2x_print_adapter_info(struct bnx2x_softc *sc)
 	default:
 		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) {
 		PMD_DRV_LOG(INFO, sc, "%18s", "MSI");
 		i++;
 	}
-
 	if (sc->devinfo.pcie_cap_flags & BNX2X_MSIX_CAPABLE_FLAG) {
 		if (i > 0)
 			PMD_DRV_LOG(INFO, sc, "|");
 		PMD_DRV_LOG(INFO, sc, "%20s", "MSI-X");
 		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;
-		}
-	}
-
-	/* 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());
+/* 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;
 
-	/* 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_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);
 
-	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,
 		    "%12s : %s", "Bnx2x Flags", get_bnx2x_flags(sc->flags));
 	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,
 		    "%12s : %s", "PHY Type", get_ext_phy_type(ext_phy_type));
@@ -11873,9 +11852,30 @@ void bnx2x_print_adapter_info(struct bnx2x_softc *sc)
 	if (sc->recovery_state)
 		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 2843702e2..2ec7a45c6 100644
--- a/drivers/net/bnx2x/bnx2x.h
+++ b/drivers/net/bnx2x/bnx2x.h
@@ -1936,6 +1936,7 @@ void bnx2x_dump_tx_chain(struct bnx2x_fastpath * fp, int bd_prod, int count);
 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);
 int bnx2x_complete_sp(struct bnx2x_softc *sc);
@@ -1983,7 +1984,7 @@ bnx2x_set_rx_mode(struct bnx2x_softc *sc)
 			bnx2x_vf_set_rx_mode(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 96151d0dd..23f643af0 100644
--- a/drivers/net/bnx2x/bnx2x_ethdev.c
+++ b/drivers/net/bnx2x/bnx2x_ethdev.c
@@ -332,8 +332,7 @@ bnx2x_dev_start(struct rte_eth_dev *dev)
 		return -3;
 	}
 
-	/* Print important adapter info for the user. */
-	bnx2x_print_adapter_info(sc);
+	bnx2x_print_device_info(sc);
 
 	return ret;
 }
@@ -639,6 +638,7 @@ bnx2x_common_dev_init(struct rte_eth_dev *eth_dev, int is_vf)
 	struct rte_pci_device *pci_dev;
 	struct rte_pci_addr pci_addr;
 	struct bnx2x_softc *sc;
+	static bool adapter_info = true;
 
 	/* Extract key data structures */
 	sc = eth_dev->data->dev_private;
@@ -697,8 +697,15 @@ bnx2x_common_dev_init(struct rte_eth_dev *eth_dev, int is_vf)
 		return ret;
 	}
 
+	/* 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);
 		if (ret) {
@@ -710,15 +717,6 @@ 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 a53d437de..9c917b937 100644
--- a/drivers/net/bnx2x/bnx2x_ethdev.h
+++ b/drivers/net/bnx2x/bnx2x_ethdev.h
@@ -50,6 +50,7 @@
 #define FALSE               0
 #define TRUE                1
 
+typedef int bool;
 #define false               0
 #define true                1
 #define min(a,b)        RTE_MIN(a,b)
diff --git a/drivers/net/bnx2x/ecore_sp.c b/drivers/net/bnx2x/ecore_sp.c
index 4e400d519..f000a781b 100644
--- a/drivers/net/bnx2x/ecore_sp.c
+++ b/drivers/net/bnx2x/ecore_sp.c
@@ -532,17 +532,15 @@ static void __ecore_vlan_mac_h_read_unlock(struct bnx2x_softc *sc,
 #endif
 	} 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);
 	}
 
 	/* It's possible a new pending execution was added, and that this reader
 	 * was last - if so we need to execute the command.
 	 */
 	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 */
 		__ecore_vlan_mac_h_write_unlock(sc, o);
-- 
2.11.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2019-03-08 09:46:40.438734532 -0800
+++ 0001-net-bnx2x-cleanup-info-logs.patch	2019-03-08 09:46:39.904396000 -0800
@@ -1,15 +1,16 @@
-From 4dd60a7a935257f66e8a29cf11e7ca404041c013 Mon Sep 17 00:00:00 2001
+From 23077d7ea32672e2a17272df8b2e00f856a28e12 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,10 +22,10 @@
  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 42fa510fb..b51a38d22 100644
 --- a/drivers/net/bnx2x/bnx2x.c
 +++ b/drivers/net/bnx2x/bnx2x.c
-@@ -5809,7 +5809,7 @@ static int bnx2x_set_power_state(struct bnx2x_softc *sc, uint8_t state)
+@@ -5815,7 +5815,7 @@ 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)) {
@@ -33,7 +34,7 @@
  		return 0;
  	}
  
-@@ -6918,19 +6918,19 @@ static void bnx2x_link_report_locked(struct bnx2x_softc *sc)
+@@ -6924,19 +6924,19 @@ static void bnx2x_link_report_locked(struct bnx2x_softc *sc)
  		return;
  	}
  
@@ -58,7 +59,7 @@
  	} else {
  		__rte_unused const char *duplex;
  		__rte_unused const char *flow;
-@@ -6938,8 +6938,10 @@ static void bnx2x_link_report_locked(struct bnx2x_softc *sc)
+@@ -6944,8 +6944,10 @@ static void bnx2x_link_report_locked(struct bnx2x_softc *sc)
  		if (bnx2x_test_and_clear_bit(BNX2X_LINK_REPORT_FULL_DUPLEX,
  					   &cur_data.link_report_flags)) {
  			duplex = "full";
@@ -69,7 +70,7 @@
  		}
  
  /*
-@@ -7123,7 +7125,7 @@ void bnx2x_periodic_callout(struct bnx2x_softc *sc)
+@@ -7129,7 +7131,7 @@ void bnx2x_periodic_callout(struct bnx2x_softc *sc)
  {
  	if ((sc->state != BNX2X_STATE_OPEN) ||
  	    (atomic_load_acq_long(&sc->periodic_flags) == PERIODIC_STOP)) {
@@ -78,7 +79,7 @@
  			    sc->state);
  		return;
  	}
-@@ -8317,7 +8319,7 @@ static int bnx2x_get_device_info(struct bnx2x_softc *sc)
+@@ -8325,7 +8327,7 @@ static int bnx2x_get_device_info(struct bnx2x_softc *sc)
  		 ((sc->devinfo.bc_ver >> 24) & 0xff),
  		 ((sc->devinfo.bc_ver >> 16) & 0xff),
  		 ((sc->devinfo.bc_ver >> 8) & 0xff));
@@ -87,9 +88,9 @@
  
  	/* get the bootcode shmem address */
  	sc->devinfo.mf_cfg_base = bnx2x_get_shmem_mf_cfg_base(sc);
-@@ -11743,42 +11745,36 @@ static const char *get_bnx2x_flags(uint32_t flags)
- 	return flag_str;
+@@ -11753,42 +11755,36 @@ static const char *get_bnx2x_flags(uint32_t flags)
  }
+ #endif
  
 -/*
 - * Prints useful adapter info.
@@ -152,7 +153,7 @@
  	switch (sc->devinfo.pcie_link_speed) {
  	case 1:
  		PMD_DRV_LOG(INFO, sc, "%23s", "2.5 Gbps");
-@@ -11792,62 +11788,45 @@ void bnx2x_print_adapter_info(struct bnx2x_softc *sc)
+@@ -11802,62 +11798,45 @@ void bnx2x_print_adapter_info(struct bnx2x_softc *sc)
  	default:
  		PMD_DRV_LOG(INFO, sc, "%33s", "Unknown link speed");
  	}
@@ -233,7 +234,7 @@
  	PMD_DRV_LOG(INFO, sc, "%12s : %u", "MTU", sc->mtu);
  	PMD_DRV_LOG(INFO, sc,
  		    "%12s : %s", "PHY Type", get_ext_phy_type(ext_phy_type));
-@@ -11863,9 +11842,30 @@ void bnx2x_print_adapter_info(struct bnx2x_softc *sc)
+@@ -11873,9 +11852,30 @@ void bnx2x_print_adapter_info(struct bnx2x_softc *sc)
  	if (sc->recovery_state)
  		PMD_DRV_LOG(INFO, sc, "%12s : %s", "Recovery",
  			     get_recovery_state(sc->recovery_state));
@@ -266,10 +267,10 @@
 +			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 2843702e2..2ec7a45c6 100644
 --- a/drivers/net/bnx2x/bnx2x.h
 +++ b/drivers/net/bnx2x/bnx2x.h
-@@ -1937,6 +1937,7 @@ void bnx2x_dump_tx_chain(struct bnx2x_fastpath * fp, int bd_prod, int count);
+@@ -1936,6 +1936,7 @@ void bnx2x_dump_tx_chain(struct bnx2x_fastpath * fp, int bd_prod, int count);
  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);
@@ -277,7 +278,7 @@
  int bnx2x_intr_legacy(struct bnx2x_softc *sc, int scan_fp);
  void bnx2x_link_status_update(struct bnx2x_softc *sc);
  int bnx2x_complete_sp(struct bnx2x_softc *sc);
-@@ -1984,7 +1985,7 @@ bnx2x_set_rx_mode(struct bnx2x_softc *sc)
+@@ -1983,7 +1984,7 @@ bnx2x_set_rx_mode(struct bnx2x_softc *sc)
  			bnx2x_vf_set_rx_mode(sc);
  		}
  	} else {
@@ -287,10 +288,10 @@
  }
  
 diff --git a/drivers/net/bnx2x/bnx2x_ethdev.c b/drivers/net/bnx2x/bnx2x_ethdev.c
-index 0057843b5..cc7816dd5 100644
+index 96151d0dd..23f643af0 100644
 --- a/drivers/net/bnx2x/bnx2x_ethdev.c
 +++ b/drivers/net/bnx2x/bnx2x_ethdev.c
-@@ -245,8 +245,7 @@ bnx2x_dev_start(struct rte_eth_dev *dev)
+@@ -332,8 +332,7 @@ bnx2x_dev_start(struct rte_eth_dev *dev)
  		return -3;
  	}
  
@@ -300,7 +301,7 @@
  
  	return ret;
  }
-@@ -574,6 +573,7 @@ bnx2x_common_dev_init(struct rte_eth_dev *eth_dev, int is_vf)
+@@ -639,6 +638,7 @@ bnx2x_common_dev_init(struct rte_eth_dev *eth_dev, int is_vf)
  	struct rte_pci_device *pci_dev;
  	struct rte_pci_addr pci_addr;
  	struct bnx2x_softc *sc;
@@ -308,7 +309,7 @@
  
  	/* Extract key data structures */
  	sc = eth_dev->data->dev_private;
-@@ -632,8 +632,15 @@ bnx2x_common_dev_init(struct rte_eth_dev *eth_dev, int is_vf)
+@@ -697,8 +697,15 @@ bnx2x_common_dev_init(struct rte_eth_dev *eth_dev, int is_vf)
  		return ret;
  	}
  
@@ -324,7 +325,7 @@
  		ret = rte_eal_alarm_set(BNX2X_SP_TIMER_PERIOD,
  					bnx2x_periodic_start, (void *)eth_dev);
  		if (ret) {
-@@ -645,15 +652,6 @@ bnx2x_common_dev_init(struct rte_eth_dev *eth_dev, int is_vf)
+@@ -710,15 +717,6 @@ 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;
  
@@ -341,10 +342,10 @@
  		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
+index a53d437de..9c917b937 100644
 --- a/drivers/net/bnx2x/bnx2x_ethdev.h
 +++ b/drivers/net/bnx2x/bnx2x_ethdev.h
-@@ -47,6 +47,7 @@
+@@ -50,6 +50,7 @@
  #define FALSE               0
  #define TRUE                1
  
@@ -353,10 +354,10 @@
  #define true                1
  #define min(a,b)        RTE_MIN(a,b)
 diff --git a/drivers/net/bnx2x/ecore_sp.c b/drivers/net/bnx2x/ecore_sp.c
-index ab730abea..6d2bb815c 100644
+index 4e400d519..f000a781b 100644
 --- a/drivers/net/bnx2x/ecore_sp.c
 +++ b/drivers/net/bnx2x/ecore_sp.c
-@@ -530,17 +530,15 @@ static void __ecore_vlan_mac_h_read_unlock(struct bnx2x_softc *sc,
+@@ -532,17 +532,15 @@ static void __ecore_vlan_mac_h_read_unlock(struct bnx2x_softc *sc,
  #endif
  	} else {
  		o->head_reader--;

^ permalink raw reply	[flat|nested] 75+ messages in thread

* [dpdk-stable] patch 'net/i40e: fix getting RSS configuration' has been queued to LTS release 17.11.6
  2019-03-08 17:46 [dpdk-stable] patch 'net/bnx2x: cleanup info logs' has been queued to LTS release 17.11.6 Yongseok Koh
@ 2019-03-08 17:46 ` Yongseok Koh
  2019-03-08 17:46 ` [dpdk-stable] patch 'net/i40e: fix using recovery mode firmware' " Yongseok Koh
                   ` (68 subsequent siblings)
  69 siblings, 0 replies; 75+ messages in thread
From: Yongseok Koh @ 2019-03-08 17:46 UTC (permalink / raw)
  To: Qiming Yang; +Cc: Ferruh Yigit, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.6

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objection by 03/13/19. So please
shout if anyone has objection.

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.

Yongseok

---
>From c8be9e55ec9b9d37d418ecc6abd8037a8b84fd0d 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 500673a92..4a80405a6 100644
--- a/drivers/net/i40e/i40e_ethdev.c
+++ b/drivers/net/i40e/i40e_ethdev.c
@@ -7089,9 +7089,12 @@ i40e_dev_rss_hash_conf_get(struct rte_eth_dev *dev,
 	struct i40e_pf *pf = I40E_DEV_PRIVATE_TO_PF(dev->data->dev_private);
 	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));
 	hena |= ((uint64_t)i40e_read_rx_ctl(hw, I40E_PFQF_HENA(1))) << 32;
-- 
2.11.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2019-03-08 09:46:40.501856871 -0800
+++ 0002-net-i40e-fix-getting-RSS-configuration.patch	2019-03-08 09:46:39.919395000 -0800
@@ -1,15 +1,16 @@
-From e5584414817f3fb79655d38c728b675e4fcc1db4 Mon Sep 17 00:00:00 2001
+From c8be9e55ec9b9d37d418ecc6abd8037a8b84fd0d 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 500673a92..4a80405a6 100644
 --- a/drivers/net/i40e/i40e_ethdev.c
 +++ b/drivers/net/i40e/i40e_ethdev.c
-@@ -7459,9 +7459,12 @@ i40e_dev_rss_hash_conf_get(struct rte_eth_dev *dev,
+@@ -7089,9 +7089,12 @@ i40e_dev_rss_hash_conf_get(struct rte_eth_dev *dev,
  	struct i40e_pf *pf = I40E_DEV_PRIVATE_TO_PF(dev->data->dev_private);
  	struct i40e_hw *hw = I40E_DEV_PRIVATE_TO_HW(dev->data->dev_private);
  	uint64_t hena;

^ permalink raw reply	[flat|nested] 75+ messages in thread

* [dpdk-stable] patch 'net/i40e: fix using recovery mode firmware' has been queued to LTS release 17.11.6
  2019-03-08 17:46 [dpdk-stable] patch 'net/bnx2x: cleanup info logs' has been queued to LTS release 17.11.6 Yongseok Koh
  2019-03-08 17:46 ` [dpdk-stable] patch 'net/i40e: fix getting RSS configuration' " Yongseok Koh
@ 2019-03-08 17:46 ` Yongseok Koh
  2019-03-08 17:46 ` [dpdk-stable] patch 'net/ixgbe: fix overwriting RSS RETA' " Yongseok Koh
                   ` (67 subsequent siblings)
  69 siblings, 0 replies; 75+ messages in thread
From: Yongseok Koh @ 2019-03-08 17:46 UTC (permalink / raw)
  To: Xiaoyun Li; +Cc: Qi Zhang, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.6

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objection by 03/13/19. So please
shout if anyone has objection.

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.

Yongseok

---
>From 1562db97500391490bc04cca6ea524955e5868c1 Mon Sep 17 00:00:00 2001
From: Xiaoyun Li <xiaoyun.li@intel.com>
Date: Mon, 3 Dec 2018 15:07:46 +0800
Subject: [PATCH] net/i40e: fix using recovery mode firmware

[ upstream commit 81b531cfc235149f68a40842abf0767a4fbfe994 ]

Device can't function properly with a firmware that is in recovery
mode.

Check the firmware status at initialization time. If the firmware is
in recovery mode, alert the user to check it.

Signed-off-by: Xiaoyun Li <xiaoyun.li@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
---
 drivers/net/i40e/i40e_ethdev.c | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c
index 4a80405a6..bcf995ce8 100644
--- a/drivers/net/i40e/i40e_ethdev.c
+++ b/drivers/net/i40e/i40e_ethdev.c
@@ -1167,7 +1167,7 @@ eth_i40e_dev_init(struct rte_eth_dev *dev)
 	struct i40e_hw *hw = I40E_DEV_PRIVATE_TO_HW(dev->data->dev_private);
 	struct i40e_vsi *vsi;
 	int ret;
-	uint32_t len;
+	uint32_t len, val;
 	uint8_t aq_fail = 0;
 
 	PMD_INIT_FUNC_TRACE();
@@ -1218,6 +1218,15 @@ eth_i40e_dev_init(struct rte_eth_dev *dev)
 	 */
 	hw->switch_tag = 0xffff;
 
+	val = I40E_READ_REG(hw, I40E_GL_FWSTS);
+	if (val & I40E_GL_FWSTS_FWS1B_MASK) {
+		PMD_INIT_LOG(ERR, "\nERROR: "
+			"Firmware recovery mode detected. Limiting functionality.\n"
+			"Refer to the Intel(R) Ethernet Adapters and Devices "
+			"User Guide for details on firmware recovery mode.");
+		return -EIO;
+	}
+
 	/* Check if need to support multi-driver */
 	i40e_support_multi_driver(dev);
 
-- 
2.11.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2019-03-08 09:46:40.555108444 -0800
+++ 0003-net-i40e-fix-using-recovery-mode-firmware.patch	2019-03-08 09:46:39.934396000 -0800
@@ -1,16 +1,16 @@
-From 81b531cfc235149f68a40842abf0767a4fbfe994 Mon Sep 17 00:00:00 2001
+From 1562db97500391490bc04cca6ea524955e5868c1 Mon Sep 17 00:00:00 2001
 From: Xiaoyun Li <xiaoyun.li@intel.com>
 Date: Mon, 3 Dec 2018 15:07:46 +0800
 Subject: [PATCH] net/i40e: fix using recovery mode firmware
 
+[ upstream commit 81b531cfc235149f68a40842abf0767a4fbfe994 ]
+
 Device can't function properly with a firmware that is in recovery
 mode.
 
 Check the firmware status at initialization time. If the firmware is
 in recovery mode, alert the user to check it.
 
-Cc: stable@dpdk.org
-
 Signed-off-by: Xiaoyun Li <xiaoyun.li@intel.com>
 Acked-by: Qi Zhang <qi.z.zhang@intel.com>
 ---
@@ -18,10 +18,10 @@
  1 file changed, 10 insertions(+), 1 deletion(-)
 
 diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c
-index 552a7a566..f61a12eb2 100644
+index 4a80405a6..bcf995ce8 100644
 --- a/drivers/net/i40e/i40e_ethdev.c
 +++ b/drivers/net/i40e/i40e_ethdev.c
-@@ -1273,7 +1273,7 @@ eth_i40e_dev_init(struct rte_eth_dev *dev, void *init_params __rte_unused)
+@@ -1167,7 +1167,7 @@ eth_i40e_dev_init(struct rte_eth_dev *dev)
  	struct i40e_hw *hw = I40E_DEV_PRIVATE_TO_HW(dev->data->dev_private);
  	struct i40e_vsi *vsi;
  	int ret;
@@ -30,7 +30,7 @@
  	uint8_t aq_fail = 0;
  
  	PMD_INIT_FUNC_TRACE();
-@@ -1324,6 +1324,15 @@ eth_i40e_dev_init(struct rte_eth_dev *dev, void *init_params __rte_unused)
+@@ -1218,6 +1218,15 @@ eth_i40e_dev_init(struct rte_eth_dev *dev)
  	 */
  	hw->switch_tag = 0xffff;
  
@@ -45,7 +45,7 @@
 +
  	/* Check if need to support multi-driver */
  	i40e_support_multi_driver(dev);
- 	/* Check if users want the latest supported vec path */
+ 
 -- 
 2.11.0
 

^ permalink raw reply	[flat|nested] 75+ messages in thread

* [dpdk-stable] patch 'net/ixgbe: fix overwriting RSS RETA' has been queued to LTS release 17.11.6
  2019-03-08 17:46 [dpdk-stable] patch 'net/bnx2x: cleanup info logs' has been queued to LTS release 17.11.6 Yongseok Koh
  2019-03-08 17:46 ` [dpdk-stable] patch 'net/i40e: fix getting RSS configuration' " Yongseok Koh
  2019-03-08 17:46 ` [dpdk-stable] patch 'net/i40e: fix using recovery mode firmware' " Yongseok Koh
@ 2019-03-08 17:46 ` Yongseok Koh
  2019-03-08 17:46 ` [dpdk-stable] patch 'net/mlx5: fix validation of Rx queue number' " Yongseok Koh
                   ` (66 subsequent siblings)
  69 siblings, 0 replies; 75+ messages in thread
From: Yongseok Koh @ 2019-03-08 17:46 UTC (permalink / raw)
  To: Xiaoyun Li; +Cc: Qi Zhang, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.6

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objection by 03/13/19. So please
shout if anyone has objection.

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.

Yongseok

---
>From 3dc7d6ef3f465c92b8ff8ff6855488adf019be82 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   | 24 ++++++++++++++----------
 3 files changed, 28 insertions(+), 10 deletions(-)

diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c
index f047db83c..ef0613bde 100644
--- a/drivers/net/ixgbe/ixgbe_ethdev.c
+++ b/drivers/net/ixgbe/ixgbe_ethdev.c
@@ -2758,6 +2758,8 @@ static void
 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);
 	struct ixgbe_vf_info *vfinfo =
@@ -2818,6 +2820,8 @@ ixgbe_dev_stop(struct rte_eth_dev *dev)
 
 	/* reset hierarchy commit */
 	tm_conf->committed = false;
+
+	adapter->rss_reta_updated = 0;
 }
 
 /*
@@ -4794,6 +4798,8 @@ ixgbe_dev_rss_reta_update(struct rte_eth_dev *dev,
 	uint8_t j, mask;
 	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;
 
@@ -4835,6 +4841,7 @@ ixgbe_dev_rss_reta_update(struct rte_eth_dev *dev,
 		}
 		IXGBE_WRITE_REG(hw, reta_reg, reta);
 	}
+	adapter->rss_reta_updated = 1;
 
 	return 0;
 }
@@ -5139,6 +5146,8 @@ static void
 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;
 
@@ -5168,6 +5177,8 @@ ixgbevf_dev_stop(struct rte_eth_dev *dev)
 		rte_free(intr_handle->intr_vec);
 		intr_handle->intr_vec = NULL;
 	}
+
+	adapter->rss_reta_updated = 0;
 }
 
 static void
diff --git a/drivers/net/ixgbe/ixgbe_ethdev.h b/drivers/net/ixgbe/ixgbe_ethdev.h
index 762f1ad34..739022e53 100644
--- a/drivers/net/ixgbe/ixgbe_ethdev.h
+++ b/drivers/net/ixgbe/ixgbe_ethdev.h
@@ -504,6 +504,9 @@ struct ixgbe_adapter {
 	struct rte_timecounter      rx_tstamp_tc;
 	struct rte_timecounter      tx_tstamp_tc;
  	struct ixgbe_tm_conf        tm_conf;
+
+	/* For RSS reta table update */
+	uint8_t rss_reta_updated;
 };
 
 #define IXGBE_DEV_PRIVATE_TO_HW(adapter)\
diff --git a/drivers/net/ixgbe/ixgbe_rxtx.c b/drivers/net/ixgbe/ixgbe_rxtx.c
index 651b5e8de..ea6c038e0 100644
--- a/drivers/net/ixgbe/ixgbe_rxtx.c
+++ b/drivers/net/ixgbe/ixgbe_rxtx.c
@@ -3325,6 +3325,7 @@ static void
 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;
 	uint16_t i;
@@ -3333,6 +3334,7 @@ ixgbe_rss_configure(struct rte_eth_dev *dev)
 	uint32_t reta_reg;
 
 	PMD_INIT_FUNC_TRACE();
+	adapter = (struct ixgbe_adapter *)dev->data->dev_private;
 	hw = IXGBE_DEV_PRIVATE_TO_HW(dev->data->dev_private);
 
 	sp_reta_size = ixgbe_reta_size_get(hw->mac.type);
@@ -3342,16 +3344,18 @@ ixgbe_rss_configure(struct rte_eth_dev *dev)
 	 * The byte-swap is needed because NIC registers are in
 	 * 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 (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 (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));
+		}
 	}
 
 	/*
-- 
2.11.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2019-03-08 09:46:40.607675657 -0800
+++ 0004-net-ixgbe-fix-overwriting-RSS-RETA.patch	2019-03-08 09:46:39.954397000 -0800
@@ -1,14 +1,15 @@
-From 8832837c6e64a75be31f32c49da261db15054c0d Mon Sep 17 00:00:00 2001
+From 3dc7d6ef3f465c92b8ff8ff6855488adf019be82 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,10 +20,10 @@
  3 files changed, 28 insertions(+), 10 deletions(-)
 
 diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c
-index 91ba6201d..749311048 100644
+index f047db83c..ef0613bde 100644
 --- a/drivers/net/ixgbe/ixgbe_ethdev.c
 +++ b/drivers/net/ixgbe/ixgbe_ethdev.c
-@@ -2790,6 +2790,8 @@ static void
+@@ -2758,6 +2758,8 @@ static void
  ixgbe_dev_stop(struct rte_eth_dev *dev)
  {
  	struct rte_eth_link link;
@@ -31,7 +32,7 @@
  	struct ixgbe_hw *hw =
  		IXGBE_DEV_PRIVATE_TO_HW(dev->data->dev_private);
  	struct ixgbe_vf_info *vfinfo =
-@@ -2850,6 +2852,8 @@ ixgbe_dev_stop(struct rte_eth_dev *dev)
+@@ -2818,6 +2820,8 @@ ixgbe_dev_stop(struct rte_eth_dev *dev)
  
  	/* reset hierarchy commit */
  	tm_conf->committed = false;
@@ -40,7 +41,7 @@
  }
  
  /*
-@@ -4779,6 +4783,8 @@ ixgbe_dev_rss_reta_update(struct rte_eth_dev *dev,
+@@ -4794,6 +4798,8 @@ ixgbe_dev_rss_reta_update(struct rte_eth_dev *dev,
  	uint8_t j, mask;
  	uint32_t reta, r;
  	uint16_t idx, shift;
@@ -49,7 +50,7 @@
  	struct ixgbe_hw *hw = IXGBE_DEV_PRIVATE_TO_HW(dev->data->dev_private);
  	uint32_t reta_reg;
  
-@@ -4820,6 +4826,7 @@ ixgbe_dev_rss_reta_update(struct rte_eth_dev *dev,
+@@ -4835,6 +4841,7 @@ ixgbe_dev_rss_reta_update(struct rte_eth_dev *dev,
  		}
  		IXGBE_WRITE_REG(hw, reta_reg, reta);
  	}
@@ -57,7 +58,7 @@
  
  	return 0;
  }
-@@ -5143,6 +5150,8 @@ static void
+@@ -5139,6 +5146,8 @@ static void
  ixgbevf_dev_stop(struct rte_eth_dev *dev)
  {
  	struct ixgbe_hw *hw = IXGBE_DEV_PRIVATE_TO_HW(dev->data->dev_private);
@@ -66,7 +67,7 @@
  	struct rte_pci_device *pci_dev = RTE_ETH_DEV_TO_PCI(dev);
  	struct rte_intr_handle *intr_handle = &pci_dev->intr_handle;
  
-@@ -5172,6 +5181,8 @@ ixgbevf_dev_stop(struct rte_eth_dev *dev)
+@@ -5168,6 +5177,8 @@ ixgbevf_dev_stop(struct rte_eth_dev *dev)
  		rte_free(intr_handle->intr_vec);
  		intr_handle->intr_vec = NULL;
  	}
@@ -76,10 +77,10 @@
  
  static void
 diff --git a/drivers/net/ixgbe/ixgbe_ethdev.h b/drivers/net/ixgbe/ixgbe_ethdev.h
-index d0b93968b..565c69c9e 100644
+index 762f1ad34..739022e53 100644
 --- a/drivers/net/ixgbe/ixgbe_ethdev.h
 +++ b/drivers/net/ixgbe/ixgbe_ethdev.h
-@@ -490,6 +490,9 @@ struct ixgbe_adapter {
+@@ -504,6 +504,9 @@ struct ixgbe_adapter {
  	struct rte_timecounter      rx_tstamp_tc;
  	struct rte_timecounter      tx_tstamp_tc;
   	struct ixgbe_tm_conf        tm_conf;
@@ -88,12 +89,12 @@
 +	uint8_t rss_reta_updated;
  };
  
- struct ixgbe_vf_representor {
+ #define IXGBE_DEV_PRIVATE_TO_HW(adapter)\
 diff --git a/drivers/net/ixgbe/ixgbe_rxtx.c b/drivers/net/ixgbe/ixgbe_rxtx.c
-index 7771d0e6d..9a79d18e4 100644
+index 651b5e8de..ea6c038e0 100644
 --- a/drivers/net/ixgbe/ixgbe_rxtx.c
 +++ b/drivers/net/ixgbe/ixgbe_rxtx.c
-@@ -3418,6 +3418,7 @@ static void
+@@ -3325,6 +3325,7 @@ static void
  ixgbe_rss_configure(struct rte_eth_dev *dev)
  {
  	struct rte_eth_rss_conf rss_conf;
@@ -101,7 +102,7 @@
  	struct ixgbe_hw *hw;
  	uint32_t reta;
  	uint16_t i;
-@@ -3426,6 +3427,7 @@ ixgbe_rss_configure(struct rte_eth_dev *dev)
+@@ -3333,6 +3334,7 @@ ixgbe_rss_configure(struct rte_eth_dev *dev)
  	uint32_t reta_reg;
  
  	PMD_INIT_FUNC_TRACE();
@@ -109,7 +110,7 @@
  	hw = IXGBE_DEV_PRIVATE_TO_HW(dev->data->dev_private);
  
  	sp_reta_size = ixgbe_reta_size_get(hw->mac.type);
-@@ -3435,16 +3437,18 @@ ixgbe_rss_configure(struct rte_eth_dev *dev)
+@@ -3342,16 +3344,18 @@ ixgbe_rss_configure(struct rte_eth_dev *dev)
  	 * The byte-swap is needed because NIC registers are in
  	 * little-endian order.
  	 */

^ permalink raw reply	[flat|nested] 75+ messages in thread

* [dpdk-stable] patch 'net/mlx5: fix validation of Rx queue number' has been queued to LTS release 17.11.6
  2019-03-08 17:46 [dpdk-stable] patch 'net/bnx2x: cleanup info logs' has been queued to LTS release 17.11.6 Yongseok Koh
                   ` (2 preceding siblings ...)
  2019-03-08 17:46 ` [dpdk-stable] patch 'net/ixgbe: fix overwriting RSS RETA' " Yongseok Koh
@ 2019-03-08 17:46 ` Yongseok Koh
  2019-03-08 17:46 ` [dpdk-stable] patch 'ethdev: fix typo in queue setup error log' " Yongseok Koh
                   ` (65 subsequent siblings)
  69 siblings, 0 replies; 75+ messages in thread
From: Yongseok Koh @ 2019-03-08 17:46 UTC (permalink / raw)
  To: Dekel Peled; +Cc: Shahaf Shuler, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.6

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objection by 03/13/19. So please
shout if anyone has objection.

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.

Yongseok

---
>From a9ae6b8107f2cc0a3e353ea5b33deaf6af71c0cc 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 1822c2bdb..4202dd6b0 100644
--- a/drivers/net/mlx5/mlx5_flow.c
+++ b/drivers/net/mlx5/mlx5_flow.c
@@ -2490,7 +2490,7 @@ mlx5_ctrl_flow_vlan(struct rte_eth_dev *dev,
 		} local;
 	} action_rss;
 
-	if (!priv->reta_idx_n) {
+	if (!priv->reta_idx_n || !priv->rxqs_n) {
 		rte_errno = EINVAL;
 		return -rte_errno;
 	}
-- 
2.11.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2019-03-08 09:46:40.661540741 -0800
+++ 0005-net-mlx5-fix-validation-of-Rx-queue-number.patch	2019-03-08 09:46:39.961397000 -0800
@@ -1,8 +1,10 @@
-From 8dd569abad0802f2e5adb0a4ac2483a07555ac89 Mon Sep 17 00:00:00 2001
+From a9ae6b8107f2cc0a3e353ea5b33deaf6af71c0cc 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,12 +27,12 @@
  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 1822c2bdb..4202dd6b0 100644
 --- a/drivers/net/mlx5/mlx5_flow.c
 +++ b/drivers/net/mlx5/mlx5_flow.c
-@@ -2314,7 +2314,7 @@ mlx5_ctrl_flow_vlan(struct rte_eth_dev *dev,
- 	struct rte_flow_error error;
- 	unsigned int i;
+@@ -2490,7 +2490,7 @@ mlx5_ctrl_flow_vlan(struct rte_eth_dev *dev,
+ 		} local;
+ 	} action_rss;
  
 -	if (!priv->reta_idx_n) {
 +	if (!priv->reta_idx_n || !priv->rxqs_n) {

^ permalink raw reply	[flat|nested] 75+ messages in thread

* [dpdk-stable] patch 'ethdev: fix typo in queue setup error log' has been queued to LTS release 17.11.6
  2019-03-08 17:46 [dpdk-stable] patch 'net/bnx2x: cleanup info logs' has been queued to LTS release 17.11.6 Yongseok Koh
                   ` (3 preceding siblings ...)
  2019-03-08 17:46 ` [dpdk-stable] patch 'net/mlx5: fix validation of Rx queue number' " Yongseok Koh
@ 2019-03-08 17:46 ` Yongseok Koh
  2019-03-08 17:46 ` [dpdk-stable] patch 'drivers/net: fix several Tx prepare functions' " Yongseok Koh
                   ` (64 subsequent siblings)
  69 siblings, 0 replies; 75+ messages in thread
From: Yongseok Koh @ 2019-03-08 17:46 UTC (permalink / raw)
  To: Yaroslav Brustinov; +Cc: Ferruh Yigit, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.6

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objection by 03/13/19. So please
shout if anyone has objection.

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.

Yongseok

---
>From 4d5d1dfacf0bef79ff12736e6603576016235c0b 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

[ backported from 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_ether/rte_ethdev.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/librte_ether/rte_ethdev.c b/lib/librte_ether/rte_ethdev.c
index 096b35faf..edcf5bc86 100644
--- a/lib/librte_ether/rte_ethdev.c
+++ b/lib/librte_ether/rte_ethdev.c
@@ -1198,7 +1198,7 @@ rte_eth_rx_queue_setup(uint16_t port_id, uint16_t rx_queue_id,
 			nb_rx_desc % dev_info.rx_desc_lim.nb_align != 0) {
 
 		RTE_PMD_DEBUG_TRACE("Invalid value for nb_rx_desc(=%hu), "
-			"should be: <= %hu, = %hu, and a product of %hu\n",
+			"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,
@@ -1320,7 +1320,7 @@ rte_eth_tx_queue_setup(uint16_t port_id, uint16_t tx_queue_id,
 	    nb_tx_desc < dev_info.tx_desc_lim.nb_min ||
 	    nb_tx_desc % dev_info.tx_desc_lim.nb_align != 0) {
 		RTE_PMD_DEBUG_TRACE("Invalid value for nb_tx_desc(=%hu), "
-				"should be: <= %hu, = %hu, and a product of %hu\n",
+				"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.11.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2019-03-08 09:46:40.706540493 -0800
+++ 0006-ethdev-fix-typo-in-queue-setup-error-log.patch	2019-03-08 09:46:39.968398000 -0800
@@ -1,42 +1,43 @@
-From b4b896fcfe9bc9f079698442697aa8e1d4a6dc3f Mon Sep 17 00:00:00 2001
+From 4d5d1dfacf0bef79ff12736e6603576016235c0b 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
 
+[ backported from 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>
 ---
- lib/librte_ethdev/rte_ethdev.c | 4 ++--
+ lib/librte_ether/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 5f858174b..9d5107dce 100644
---- a/lib/librte_ethdev/rte_ethdev.c
-+++ b/lib/librte_ethdev/rte_ethdev.c
-@@ -1594,7 +1594,7 @@ rte_eth_rx_queue_setup(uint16_t port_id, uint16_t rx_queue_id,
+diff --git a/lib/librte_ether/rte_ethdev.c b/lib/librte_ether/rte_ethdev.c
+index 096b35faf..edcf5bc86 100644
+--- a/lib/librte_ether/rte_ethdev.c
++++ b/lib/librte_ether/rte_ethdev.c
+@@ -1198,7 +1198,7 @@ rte_eth_rx_queue_setup(uint16_t port_id, uint16_t rx_queue_id,
  			nb_rx_desc % dev_info.rx_desc_lim.nb_align != 0) {
  
- 		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,
+ 		RTE_PMD_DEBUG_TRACE("Invalid value for nb_rx_desc(=%hu), "
+-			"should be: <= %hu, = %hu, and a product of %hu\n",
++			"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,
- 			dev_info.rx_desc_lim.nb_align);
-@@ -1698,7 +1698,7 @@ rte_eth_tx_queue_setup(uint16_t port_id, uint16_t tx_queue_id,
+@@ -1320,7 +1320,7 @@ rte_eth_tx_queue_setup(uint16_t port_id, uint16_t tx_queue_id,
  	    nb_tx_desc < dev_info.tx_desc_lim.nb_min ||
  	    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,
- 			dev_info.tx_desc_lim.nb_align);
+ 		RTE_PMD_DEBUG_TRACE("Invalid value for nb_tx_desc(=%hu), "
+-				"should be: <= %hu, = %hu, and a product of %hu\n",
++				"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.11.0
 

^ permalink raw reply	[flat|nested] 75+ messages in thread

* [dpdk-stable] patch 'drivers/net: fix several Tx prepare functions' has been queued to LTS release 17.11.6
  2019-03-08 17:46 [dpdk-stable] patch 'net/bnx2x: cleanup info logs' has been queued to LTS release 17.11.6 Yongseok Koh
                   ` (4 preceding siblings ...)
  2019-03-08 17:46 ` [dpdk-stable] patch 'ethdev: fix typo in queue setup error log' " Yongseok Koh
@ 2019-03-08 17:46 ` Yongseok Koh
  2019-03-08 17:46 ` [dpdk-stable] patch 'vhost: fix crash after mmap failure' " Yongseok Koh
                   ` (63 subsequent siblings)
  69 siblings, 0 replies; 75+ messages in thread
From: Yongseok Koh @ 2019-03-08 17:46 UTC (permalink / raw)
  To: Didier Pallard; +Cc: Ferruh Yigit, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.6

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objection by 03/13/19. So please
shout if anyone has objection.

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.

Yongseok

---
>From aa85fc16c2e55eb6b7bee9f0030e51fd330de138 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

[ backported from 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 a15ce222a..32f01f701 100644
--- a/drivers/net/e1000/em_rxtx.c
+++ b/drivers/net/e1000/em_rxtx.c
@@ -79,6 +79,8 @@
 #define E1000_RXDCTL_GRAN	0x01000000 /* RXDCTL Granularity */
 
 #define E1000_TX_OFFLOAD_MASK ( \
+		PKT_TX_IPV6 |           \
+		PKT_TX_IPV4 |           \
 		PKT_TX_IP_CKSUM |       \
 		PKT_TX_L4_MASK |        \
 		PKT_TX_VLAN_PKT)
diff --git a/drivers/net/ena/ena_ethdev.c b/drivers/net/ena/ena_ethdev.c
index 6b96f4042..725e4b373 100644
--- a/drivers/net/ena/ena_ethdev.c
+++ b/drivers/net/ena/ena_ethdev.c
@@ -172,6 +172,8 @@ 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 d6081e485..59459212b 100644
--- a/drivers/net/fm10k/fm10k_rxtx.c
+++ b/drivers/net/fm10k/fm10k_rxtx.c
@@ -68,6 +68,8 @@ 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 |         \
 		PKT_TX_TCP_SEG)
diff --git a/drivers/net/vmxnet3/vmxnet3_rxtx.c b/drivers/net/vmxnet3/vmxnet3_rxtx.c
index 940068ff2..35b39ba47 100644
--- a/drivers/net/vmxnet3/vmxnet3_rxtx.c
+++ b/drivers/net/vmxnet3/vmxnet3_rxtx.c
@@ -79,6 +79,8 @@
 
 #define	VMXNET3_TX_OFFLOAD_MASK	( \
 		PKT_TX_VLAN_PKT | \
+		PKT_TX_IPV6 |     \
+		PKT_TX_IPV4 |     \
 		PKT_TX_L4_MASK |  \
 		PKT_TX_TCP_SEG)
 
-- 
2.11.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2019-03-08 09:46:40.752940512 -0800
+++ 0007-drivers-net-fix-several-Tx-prepare-functions.patch	2019-03-08 09:46:39.982396000 -0800
@@ -1,8 +1,10 @@
-From d6db681bf9b8095da2fed653ec5b89e5f165eaa8 Mon Sep 17 00:00:00 2001
+From aa85fc16c2e55eb6b7bee9f0030e51fd330de138 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
 
+[ backported from 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,36 +14,21 @@
 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
-@@ -21,6 +21,8 @@
- 
- #define ATL_TX_OFFLOAD_MASK (				 \
- 	PKT_TX_VLAN |					 \
-+	PKT_TX_IPV6 |					 \
-+	PKT_TX_IPV4 |					 \
- 	PKT_TX_IP_CKSUM |				 \
- 	PKT_TX_L4_MASK |				 \
- 	PKT_TX_TCP_SEG)
 diff --git a/drivers/net/e1000/em_rxtx.c b/drivers/net/e1000/em_rxtx.c
-index a9cd76518..005e1ea96 100644
+index a15ce222a..32f01f701 100644
 --- a/drivers/net/e1000/em_rxtx.c
 +++ b/drivers/net/e1000/em_rxtx.c
-@@ -50,6 +50,8 @@
+@@ -79,6 +79,8 @@
  #define E1000_RXDCTL_GRAN	0x01000000 /* RXDCTL Granularity */
  
  #define E1000_TX_OFFLOAD_MASK ( \
@@ -51,10 +38,10 @@
  		PKT_TX_L4_MASK |        \
  		PKT_TX_VLAN_PKT)
 diff --git a/drivers/net/ena/ena_ethdev.c b/drivers/net/ena/ena_ethdev.c
-index a07bd2b49..709ad2edb 100644
+index 6b96f4042..725e4b373 100644
 --- a/drivers/net/ena/ena_ethdev.c
 +++ b/drivers/net/ena/ena_ethdev.c
-@@ -189,6 +189,8 @@ static const struct ena_stats ena_stats_ena_com_strings[] = {
+@@ -172,6 +172,8 @@ static const struct ena_stats ena_stats_ena_com_strings[] = {
  
  #define	ENA_TX_OFFLOAD_MASK	(\
  	PKT_TX_L4_MASK |         \
@@ -64,10 +51,10 @@
  	PKT_TX_TCP_SEG)
  
 diff --git a/drivers/net/fm10k/fm10k_rxtx.c b/drivers/net/fm10k/fm10k_rxtx.c
-index 4a5b46ec8..1d0f09d25 100644
+index d6081e485..59459212b 100644
 --- a/drivers/net/fm10k/fm10k_rxtx.c
 +++ b/drivers/net/fm10k/fm10k_rxtx.c
-@@ -39,6 +39,8 @@ static inline void dump_rxd(union fm10k_rx_desc *rxd)
+@@ -68,6 +68,8 @@ static inline void dump_rxd(union fm10k_rx_desc *rxd)
  
  #define FM10K_TX_OFFLOAD_MASK (  \
  		PKT_TX_VLAN_PKT |        \
@@ -77,10 +64,10 @@
  		PKT_TX_L4_MASK |         \
  		PKT_TX_TCP_SEG)
 diff --git a/drivers/net/vmxnet3/vmxnet3_rxtx.c b/drivers/net/vmxnet3/vmxnet3_rxtx.c
-index cf85f3d61..d30914a8a 100644
+index 940068ff2..35b39ba47 100644
 --- a/drivers/net/vmxnet3/vmxnet3_rxtx.c
 +++ b/drivers/net/vmxnet3/vmxnet3_rxtx.c
-@@ -50,6 +50,8 @@
+@@ -79,6 +79,8 @@
  
  #define	VMXNET3_TX_OFFLOAD_MASK	( \
  		PKT_TX_VLAN_PKT | \

^ permalink raw reply	[flat|nested] 75+ messages in thread

* [dpdk-stable] patch 'vhost: fix crash after mmap failure' has been queued to LTS release 17.11.6
  2019-03-08 17:46 [dpdk-stable] patch 'net/bnx2x: cleanup info logs' has been queued to LTS release 17.11.6 Yongseok Koh
                   ` (5 preceding siblings ...)
  2019-03-08 17:46 ` [dpdk-stable] patch 'drivers/net: fix several Tx prepare functions' " Yongseok Koh
@ 2019-03-08 17:46 ` Yongseok Koh
  2019-03-08 17:46 ` [dpdk-stable] patch 'net/i40e: revert fix offload not supported mask' " Yongseok Koh
                   ` (62 subsequent siblings)
  69 siblings, 0 replies; 75+ messages in thread
From: Yongseok Koh @ 2019-03-08 17:46 UTC (permalink / raw)
  To: Maxime Coquelin; +Cc: Tiwei Bie, Jens Freimann, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.6

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objection by 03/13/19. So please
shout if anyone has objection.

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.

Yongseok

---
>From 855eea4e18c11d5a7856adfa570eca1f39863f6f 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 74c286e34..aacf75b13 100644
--- a/lib/librte_vhost/vhost_user.c
+++ b/lib/librte_vhost/vhost_user.c
@@ -334,6 +334,9 @@ qva_to_vva(struct virtio_net *dev, uint64_t qva, uint64_t *len)
 	struct rte_vhost_mem_region *r;
 	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++) {
 		r = &dev->mem->regions[i];
@@ -348,6 +351,7 @@ qva_to_vva(struct virtio_net *dev, uint64_t qva, uint64_t *len)
 			       r->host_user_addr;
 		}
 	}
+out_error:
 	*len = 0;
 
 	return 0;
-- 
2.11.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2019-03-08 09:46:40.801703391 -0800
+++ 0008-vhost-fix-crash-after-mmap-failure.patch	2019-03-08 09:46:39.987396000 -0800
@@ -1,14 +1,15 @@
-From cf14478d775cadbaed4f5aa96e3812b44a2383c1 Mon Sep 17 00:00:00 2001
+From 855eea4e18c11d5a7856adfa570eca1f39863f6f 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 74c286e34..aacf75b13 100644
 --- a/lib/librte_vhost/vhost_user.c
 +++ b/lib/librte_vhost/vhost_user.c
-@@ -489,6 +489,9 @@ qva_to_vva(struct virtio_net *dev, uint64_t qva, uint64_t *len)
+@@ -334,6 +334,9 @@ qva_to_vva(struct virtio_net *dev, uint64_t qva, uint64_t *len)
  	struct rte_vhost_mem_region *r;
  	uint32_t i;
  
@@ -31,7 +32,7 @@
  	/* Find the region where the address lives. */
  	for (i = 0; i < dev->mem->nregions; i++) {
  		r = &dev->mem->regions[i];
-@@ -503,6 +506,7 @@ qva_to_vva(struct virtio_net *dev, uint64_t qva, uint64_t *len)
+@@ -348,6 +351,7 @@ qva_to_vva(struct virtio_net *dev, uint64_t qva, uint64_t *len)
  			       r->host_user_addr;
  		}
  	}

^ permalink raw reply	[flat|nested] 75+ messages in thread

* [dpdk-stable] patch 'net/i40e: revert fix offload not supported mask' has been queued to LTS release 17.11.6
  2019-03-08 17:46 [dpdk-stable] patch 'net/bnx2x: cleanup info logs' has been queued to LTS release 17.11.6 Yongseok Koh
                   ` (6 preceding siblings ...)
  2019-03-08 17:46 ` [dpdk-stable] patch 'vhost: fix crash after mmap failure' " Yongseok Koh
@ 2019-03-08 17:46 ` Yongseok Koh
  2019-03-08 17:46 ` [dpdk-stable] patch 'net/i40e: remove redundant reset of queue number' " Yongseok Koh
                   ` (61 subsequent siblings)
  69 siblings, 0 replies; 75+ messages in thread
From: Yongseok Koh @ 2019-03-08 17:46 UTC (permalink / raw)
  To: Didier Pallard; +Cc: Qi Zhang, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.6

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objection by 03/13/19. So please
shout if anyone has objection.

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.

Yongseok

---
>From 59696fb0848c7fa27056e4d0f6693a2ab9143f7c 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 fb35d1221..ce6a30507 100644
--- a/drivers/net/i40e/i40e_rxtx.c
+++ b/drivers/net/i40e/i40e_rxtx.c
@@ -101,7 +101,7 @@
 		I40E_TX_IEEE1588_TMST)
 
 #define I40E_TX_OFFLOAD_NOTSUP_MASK \
-		~(PKT_TX_OFFLOAD_MASK & I40E_TX_OFFLOAD_MASK)
+		(PKT_TX_OFFLOAD_MASK ^ I40E_TX_OFFLOAD_MASK)
 
 static uint16_t i40e_xmit_pkts_simple(void *tx_queue,
 				      struct rte_mbuf **tx_pkts,
-- 
2.11.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2019-03-08 09:46:40.846687038 -0800
+++ 0009-net-i40e-revert-fix-offload-not-supported-mask.patch	2019-03-08 09:46:39.992397000 -0800
@@ -1,8 +1,10 @@
-From e51da4bbaf3584e16cbd0ea0b1b85343b777134f Mon Sep 17 00:00:00 2001
+From 59696fb0848c7fa27056e4d0f6693a2ab9143f7c 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,18 +24,18 @@
  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 fb35d1221..ce6a30507 100644
 --- a/drivers/net/i40e/i40e_rxtx.c
 +++ b/drivers/net/i40e/i40e_rxtx.c
-@@ -69,7 +69,7 @@
+@@ -101,7 +101,7 @@
  		I40E_TX_IEEE1588_TMST)
  
  #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
- i40e_rxd_to_vlan_tci(struct rte_mbuf *mb, volatile union i40e_rx_desc *rxdp)
+ static uint16_t i40e_xmit_pkts_simple(void *tx_queue,
+ 				      struct rte_mbuf **tx_pkts,
 -- 
 2.11.0
 

^ permalink raw reply	[flat|nested] 75+ messages in thread

* [dpdk-stable] patch 'net/i40e: remove redundant reset of queue number' has been queued to LTS release 17.11.6
  2019-03-08 17:46 [dpdk-stable] patch 'net/bnx2x: cleanup info logs' has been queued to LTS release 17.11.6 Yongseok Koh
                   ` (7 preceding siblings ...)
  2019-03-08 17:46 ` [dpdk-stable] patch 'net/i40e: revert fix offload not supported mask' " Yongseok Koh
@ 2019-03-08 17:46 ` Yongseok Koh
  2019-03-08 17:46 ` [dpdk-stable] patch 'doc: fix garbage text in generated HTML guides' " Yongseok Koh
                   ` (60 subsequent siblings)
  69 siblings, 0 replies; 75+ messages in thread
From: Yongseok Koh @ 2019-03-08 17:46 UTC (permalink / raw)
  To: Zhirun Yan; +Cc: Haiyue Wang, Qi Zhang, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.6

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objection by 03/13/19. So please
shout if anyone has objection.

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.

Yongseok

---
>From feac3e2b6779135da1b450fe269175628e6dbdf4 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 ce6a30507..1725be66e 100644
--- a/drivers/net/i40e/i40e_rxtx.c
+++ b/drivers/net/i40e/i40e_rxtx.c
@@ -2638,7 +2638,6 @@ i40e_dev_free_queues(struct rte_eth_dev *dev)
 		i40e_dev_rx_queue_release(dev->data->rx_queues[i]);
 		dev->data->rx_queues[i] = NULL;
 	}
-	dev->data->nb_rx_queues = 0;
 
 	for (i = 0; i < dev->data->nb_tx_queues; i++) {
 		if (!dev->data->tx_queues[i])
@@ -2646,7 +2645,6 @@ i40e_dev_free_queues(struct rte_eth_dev *dev)
 		i40e_dev_tx_queue_release(dev->data->tx_queues[i]);
 		dev->data->tx_queues[i] = NULL;
 	}
-	dev->data->nb_tx_queues = 0;
 }
 
 #define I40E_FDIR_NUM_TX_DESC  I40E_MIN_RING_DESC
-- 
2.11.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2019-03-08 09:46:40.890614393 -0800
+++ 0010-net-i40e-remove-redundant-reset-of-queue-number.patch	2019-03-08 09:46:39.997397000 -0800
@@ -1,8 +1,10 @@
-From ef8b7c505f10897621c0801d8ef3e961385246f8 Mon Sep 17 00:00:00 2001
+From feac3e2b6779135da1b450fe269175628e6dbdf4 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,10 +23,10 @@
  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 ce6a30507..1725be66e 100644
 --- a/drivers/net/i40e/i40e_rxtx.c
 +++ b/drivers/net/i40e/i40e_rxtx.c
-@@ -2753,7 +2753,6 @@ i40e_dev_free_queues(struct rte_eth_dev *dev)
+@@ -2638,7 +2638,6 @@ i40e_dev_free_queues(struct rte_eth_dev *dev)
  		i40e_dev_rx_queue_release(dev->data->rx_queues[i]);
  		dev->data->rx_queues[i] = NULL;
  	}
@@ -33,7 +34,7 @@
  
  	for (i = 0; i < dev->data->nb_tx_queues; i++) {
  		if (!dev->data->tx_queues[i])
-@@ -2761,7 +2760,6 @@ i40e_dev_free_queues(struct rte_eth_dev *dev)
+@@ -2646,7 +2645,6 @@ i40e_dev_free_queues(struct rte_eth_dev *dev)
  		i40e_dev_tx_queue_release(dev->data->tx_queues[i]);
  		dev->data->tx_queues[i] = NULL;
  	}

^ permalink raw reply	[flat|nested] 75+ messages in thread

* [dpdk-stable] patch 'doc: fix garbage text in generated HTML guides' has been queued to LTS release 17.11.6
  2019-03-08 17:46 [dpdk-stable] patch 'net/bnx2x: cleanup info logs' has been queued to LTS release 17.11.6 Yongseok Koh
                   ` (8 preceding siblings ...)
  2019-03-08 17:46 ` [dpdk-stable] patch 'net/i40e: remove redundant reset of queue number' " Yongseok Koh
@ 2019-03-08 17:46 ` Yongseok Koh
  2019-03-08 17:46 ` [dpdk-stable] patch 'eventdev: fix xstats documentation typo' " Yongseok Koh
                   ` (59 subsequent siblings)
  69 siblings, 0 replies; 75+ messages in thread
From: Yongseok Koh @ 2019-03-08 17:46 UTC (permalink / raw)
  To: Luca Boccassi; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.6

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objection by 03/13/19. So please
shout if anyone has objection.

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.

Yongseok

---
>From ea08f07946672c3520cb641ca819aa1abd83c515 Mon Sep 17 00:00:00 2001
From: Luca Boccassi <bluca@debian.org>
Date: Wed, 5 Dec 2018 14:25:45 +0000
Subject: [PATCH] doc: fix garbage text in generated HTML guides

[ upstream commit 430b35de4a579a7f65eda5c3fd00eaab2bc57aca ]

If the user has MAKEFLAGS set in the environment when building the
documentation, the doc/guides/conf.py script which calls "make"
exclusively to get the project version might pick up garbage from
stdout, like:

<title>FAQ &mdash; Data Plane Development Kit make[2]:
Entering directory &#39;/build/1st/dpdk-18.11/doc/guides&#39;
18.11.0
make[2]: Leaving directory &#39;/build/1st/dpdk-18.11&#39;
documentation</title>

Override MAKEFLAGS in the Python subprocess call to avoid this issue.

Fixes: f7aaae2fe6f7 ("doc: add copyright and version")

Signed-off-by: Luca Boccassi <bluca@debian.org>
---
 doc/guides/conf.py | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/doc/guides/conf.py b/doc/guides/conf.py
index 31f914a89..084512dc7 100644
--- a/doc/guides/conf.py
+++ b/doc/guides/conf.py
@@ -36,6 +36,7 @@ from sphinx import __version__ as sphinx_version
 from sphinx.highlighting import PygmentsBridge
 from pygments.formatters.latex import LatexFormatter
 from os import listdir
+from os import environ
 from os.path import basename
 from os.path import dirname
 from os.path import join as path_join
@@ -64,7 +65,9 @@ html_add_permalinks = ""
 html_show_copyright = False
 highlight_language = 'none'
 
-version = subprocess.check_output(['make', '-sRrC', '../../', 'showversion'])
+# If MAKEFLAGS is exported by the user, garbage text might end up in version
+version = subprocess.check_output(['make', '-sRrC', '../../', 'showversion'],
+                                  env=dict(environ, MAKEFLAGS=""))
 version = version.decode('utf-8').rstrip()
 release = version
 
-- 
2.11.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2019-03-08 09:46:40.936077372 -0800
+++ 0011-doc-fix-garbage-text-in-generated-HTML-guides.patch	2019-03-08 09:46:40.001399000 -0800
@@ -1,8 +1,10 @@
-From 430b35de4a579a7f65eda5c3fd00eaab2bc57aca Mon Sep 17 00:00:00 2001
+From ea08f07946672c3520cb641ca819aa1abd83c515 Mon Sep 17 00:00:00 2001
 From: Luca Boccassi <bluca@debian.org>
 Date: Wed, 5 Dec 2018 14:25:45 +0000
 Subject: [PATCH] doc: fix garbage text in generated HTML guides
 
+[ upstream commit 430b35de4a579a7f65eda5c3fd00eaab2bc57aca ]
+
 If the user has MAKEFLAGS set in the environment when building the
 documentation, the doc/guides/conf.py script which calls "make"
 exclusively to get the project version might pick up garbage from
@@ -17,7 +19,6 @@
 Override MAKEFLAGS in the Python subprocess call to avoid this issue.
 
 Fixes: f7aaae2fe6f7 ("doc: add copyright and version")
-Cc: stable@dpdk.org
 
 Signed-off-by: Luca Boccassi <bluca@debian.org>
 ---
@@ -25,10 +26,10 @@
  1 file changed, 4 insertions(+), 1 deletion(-)
 
 diff --git a/doc/guides/conf.py b/doc/guides/conf.py
-index c883306d7..da99a3f84 100644
+index 31f914a89..084512dc7 100644
 --- a/doc/guides/conf.py
 +++ b/doc/guides/conf.py
-@@ -9,6 +9,7 @@ from sphinx import __version__ as sphinx_version
+@@ -36,6 +36,7 @@ from sphinx import __version__ as sphinx_version
  from sphinx.highlighting import PygmentsBridge
  from pygments.formatters.latex import LatexFormatter
  from os import listdir
@@ -36,7 +37,7 @@
  from os.path import basename
  from os.path import dirname
  from os.path import join as path_join
-@@ -37,7 +38,9 @@ html_add_permalinks = ""
+@@ -64,7 +65,9 @@ html_add_permalinks = ""
  html_show_copyright = False
  highlight_language = 'none'
  

^ permalink raw reply	[flat|nested] 75+ messages in thread

* [dpdk-stable] patch 'eventdev: fix xstats documentation typo' has been queued to LTS release 17.11.6
  2019-03-08 17:46 [dpdk-stable] patch 'net/bnx2x: cleanup info logs' has been queued to LTS release 17.11.6 Yongseok Koh
                   ` (9 preceding siblings ...)
  2019-03-08 17:46 ` [dpdk-stable] patch 'doc: fix garbage text in generated HTML guides' " Yongseok Koh
@ 2019-03-08 17:46 ` Yongseok Koh
  2019-03-08 17:46 ` [dpdk-stable] patch 'crypto/qat: fix block size error handling' " Yongseok Koh
                   ` (58 subsequent siblings)
  69 siblings, 0 replies; 75+ messages in thread
From: Yongseok Koh @ 2019-03-08 17:46 UTC (permalink / raw)
  To: Gage Eads; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.6

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objection by 03/13/19. So please
shout if anyone has objection.

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.

Yongseok

---
>From 9c49c9cd992d04702e6cf0cd5adb9c304dcb6797 Mon Sep 17 00:00:00 2001
From: Gage Eads <gage.eads@intel.com>
Date: Mon, 3 Dec 2018 14:05:04 -0600
Subject: [PATCH] eventdev: fix xstats documentation typo

[ upstream commit 1f7a11026988955b865a2b9f570f5cff087bd9b1 ]

The eventdev extended stats documentation referred to two non-existent
functions, rte_eventdev_xstats_get and rte_eventdev_get_xstats_by_name.

Fixes: 3ed7fc039a ("eventdev: add extended stats")

Signed-off-by: Gage Eads <gage.eads@intel.com>
---
 lib/librte_eventdev/rte_eventdev.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/librte_eventdev/rte_eventdev.h b/lib/librte_eventdev/rte_eventdev.h
index eb1024d95..740da8f3f 100644
--- a/lib/librte_eventdev/rte_eventdev.h
+++ b/lib/librte_eventdev/rte_eventdev.h
@@ -1705,7 +1705,7 @@ rte_event_dev_xstats_names_get(uint8_t dev_id,
  * @param ids
  *   The id numbers of the stats to get. The ids can be got from the stat
  *   position in the stat list from rte_event_dev_get_xstats_names(), or
- *   by using rte_eventdev_get_xstats_by_name()
+ *   by using rte_event_dev_xstats_by_name_get().
  * @param[out] values
  *   The values for each stats request by ID.
  * @param n
@@ -1733,7 +1733,7 @@ rte_event_dev_xstats_get(uint8_t dev_id,
  *   The stat name to retrieve
  * @param[out] id
  *   If non-NULL, the numerical id of the stat will be returned, so that further
- *   requests for the stat can be got using rte_eventdev_xstats_get, which will
+ *   requests for the stat can be got using rte_event_dev_xstats_get, which will
  *   be faster as it doesn't need to scan a list of names for the stat.
  *   If the stat cannot be found, the id returned will be (unsigned)-1.
  * @return
-- 
2.11.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2019-03-08 09:46:40.980119350 -0800
+++ 0012-eventdev-fix-xstats-documentation-typo.patch	2019-03-08 09:46:40.006397000 -0800
@@ -1,13 +1,14 @@
-From 1f7a11026988955b865a2b9f570f5cff087bd9b1 Mon Sep 17 00:00:00 2001
+From 9c49c9cd992d04702e6cf0cd5adb9c304dcb6797 Mon Sep 17 00:00:00 2001
 From: Gage Eads <gage.eads@intel.com>
 Date: Mon, 3 Dec 2018 14:05:04 -0600
 Subject: [PATCH] eventdev: fix xstats documentation typo
 
+[ upstream commit 1f7a11026988955b865a2b9f570f5cff087bd9b1 ]
+
 The eventdev extended stats documentation referred to two non-existent
 functions, rte_eventdev_xstats_get and rte_eventdev_get_xstats_by_name.
 
 Fixes: 3ed7fc039a ("eventdev: add extended stats")
-Cc: stable@dpdk.org
 
 Signed-off-by: Gage Eads <gage.eads@intel.com>
 ---
@@ -15,10 +16,10 @@
  1 file changed, 2 insertions(+), 2 deletions(-)
 
 diff --git a/lib/librte_eventdev/rte_eventdev.h b/lib/librte_eventdev/rte_eventdev.h
-index d7eb69d1f..ef10a855d 100644
+index eb1024d95..740da8f3f 100644
 --- a/lib/librte_eventdev/rte_eventdev.h
 +++ b/lib/librte_eventdev/rte_eventdev.h
-@@ -1893,7 +1893,7 @@ rte_event_dev_xstats_names_get(uint8_t dev_id,
+@@ -1705,7 +1705,7 @@ rte_event_dev_xstats_names_get(uint8_t dev_id,
   * @param ids
   *   The id numbers of the stats to get. The ids can be got from the stat
   *   position in the stat list from rte_event_dev_get_xstats_names(), or
@@ -27,7 +28,7 @@
   * @param[out] values
   *   The values for each stats request by ID.
   * @param n
-@@ -1921,7 +1921,7 @@ rte_event_dev_xstats_get(uint8_t dev_id,
+@@ -1733,7 +1733,7 @@ rte_event_dev_xstats_get(uint8_t dev_id,
   *   The stat name to retrieve
   * @param[out] id
   *   If non-NULL, the numerical id of the stat will be returned, so that further

^ permalink raw reply	[flat|nested] 75+ messages in thread

* [dpdk-stable] patch 'crypto/qat: fix block size error handling' has been queued to LTS release 17.11.6
  2019-03-08 17:46 [dpdk-stable] patch 'net/bnx2x: cleanup info logs' has been queued to LTS release 17.11.6 Yongseok Koh
                   ` (10 preceding siblings ...)
  2019-03-08 17:46 ` [dpdk-stable] patch 'eventdev: fix xstats documentation typo' " Yongseok Koh
@ 2019-03-08 17:46 ` Yongseok Koh
  2019-03-08 17:46 ` [dpdk-stable] patch 'timer: fix race condition' " Yongseok Koh
                   ` (57 subsequent siblings)
  69 siblings, 0 replies; 75+ messages in thread
From: Yongseok Koh @ 2019-03-08 17:46 UTC (permalink / raw)
  To: Arek Kusztal; +Cc: Fiona Trahe, Marko Kovacevic, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.6

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objection by 03/13/19. So please
shout if anyone has objection.

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.

Yongseok

---
>From eee8f9986f01de6e517ea71d624dbc2de653e48b Mon Sep 17 00:00:00 2001
From: Arek Kusztal <arkadiuszx.kusztal@intel.com>
Date: Wed, 12 Dec 2018 20:59:02 +0100
Subject: [PATCH] crypto/qat: fix block size error handling

[ upstream commit 93685b1fbf37d508032a4d640b67cd63075f93b9 ]

Error code of qat_hash_get_block_size needs to be handle properly.

Fixes: 10b49880e3c5 ("crypto/qat: make the session struct variable in size")

Signed-off-by: Arek Kusztal <arkadiuszx.kusztal@intel.com>
Acked-by: Fiona Trahe <fiona.trahe@intel.com>
Tested-by: Marko Kovacevic <marko.kovacevic@intel.com>
Acked-by: Marko Kovacevic <marko.kovacevic@intel.com>
---
 drivers/crypto/qat/qat_adf/qat_algs_build_desc.c | 14 +++++++++-----
 1 file changed, 9 insertions(+), 5 deletions(-)

diff --git a/drivers/crypto/qat/qat_adf/qat_algs_build_desc.c b/drivers/crypto/qat/qat_adf/qat_algs_build_desc.c
index 26f854c21..b9393810b 100644
--- a/drivers/crypto/qat/qat_adf/qat_algs_build_desc.c
+++ b/drivers/crypto/qat/qat_adf/qat_algs_build_desc.c
@@ -413,8 +413,8 @@ static int qat_alg_do_precomputes(enum icp_qat_hw_auth_algo hash_alg,
 	}
 
 	block_size = qat_hash_get_block_size(hash_alg);
-	if (block_size <= 0)
-		return -EFAULT;
+	if (block_size < 0)
+		return block_size;
 	/* init ipad and opad from key and xor with fixed values */
 	memset(ipad, 0, block_size);
 	memset(opad, 0, block_size);
@@ -753,9 +753,13 @@ int qat_alg_aead_session_create_content_desc_auth(struct qat_session *cdesc,
 		|| cdesc->qat_hash_alg == ICP_QAT_HW_AUTH_ALGO_KASUMI_F9
 		|| cdesc->qat_hash_alg == ICP_QAT_HW_AUTH_ALGO_ZUC_3G_128_EIA3)
 		hash->auth_counter.counter = 0;
-	else
-		hash->auth_counter.counter = rte_bswap32(
-				qat_hash_get_block_size(cdesc->qat_hash_alg));
+	else {
+		int block_size = qat_hash_get_block_size(cdesc->qat_hash_alg);
+
+		if (block_size < 0)
+			return block_size;
+		hash->auth_counter.counter = rte_bswap32(block_size);
+	}
 
 	cdesc->cd_cur_ptr += sizeof(struct icp_qat_hw_auth_setup);
 
-- 
2.11.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2019-03-08 09:46:41.024514050 -0800
+++ 0013-crypto-qat-fix-block-size-error-handling.patch	2019-03-08 09:46:40.011398000 -0800
@@ -1,26 +1,27 @@
-From 93685b1fbf37d508032a4d640b67cd63075f93b9 Mon Sep 17 00:00:00 2001
+From eee8f9986f01de6e517ea71d624dbc2de653e48b Mon Sep 17 00:00:00 2001
 From: Arek Kusztal <arkadiuszx.kusztal@intel.com>
 Date: Wed, 12 Dec 2018 20:59:02 +0100
 Subject: [PATCH] crypto/qat: fix block size error handling
 
+[ upstream commit 93685b1fbf37d508032a4d640b67cd63075f93b9 ]
+
 Error code of qat_hash_get_block_size needs to be handle properly.
 
 Fixes: 10b49880e3c5 ("crypto/qat: make the session struct variable in size")
-Cc: stable@dpdk.org
 
 Signed-off-by: Arek Kusztal <arkadiuszx.kusztal@intel.com>
 Acked-by: Fiona Trahe <fiona.trahe@intel.com>
 Tested-by: Marko Kovacevic <marko.kovacevic@intel.com>
 Acked-by: Marko Kovacevic <marko.kovacevic@intel.com>
 ---
- drivers/crypto/qat/qat_sym_session.c | 14 +++++++++-----
+ drivers/crypto/qat/qat_adf/qat_algs_build_desc.c | 14 +++++++++-----
  1 file changed, 9 insertions(+), 5 deletions(-)
 
-diff --git a/drivers/crypto/qat/qat_sym_session.c b/drivers/crypto/qat/qat_sym_session.c
-index 8196e2333..272177f0a 100644
---- a/drivers/crypto/qat/qat_sym_session.c
-+++ b/drivers/crypto/qat/qat_sym_session.c
-@@ -1143,8 +1143,8 @@ static int qat_sym_do_precomputes(enum icp_qat_hw_auth_algo hash_alg,
+diff --git a/drivers/crypto/qat/qat_adf/qat_algs_build_desc.c b/drivers/crypto/qat/qat_adf/qat_algs_build_desc.c
+index 26f854c21..b9393810b 100644
+--- a/drivers/crypto/qat/qat_adf/qat_algs_build_desc.c
++++ b/drivers/crypto/qat/qat_adf/qat_algs_build_desc.c
+@@ -413,8 +413,8 @@ static int qat_alg_do_precomputes(enum icp_qat_hw_auth_algo hash_alg,
  	}
  
  	block_size = qat_hash_get_block_size(hash_alg);
@@ -31,9 +32,9 @@
  	/* init ipad and opad from key and xor with fixed values */
  	memset(ipad, 0, block_size);
  	memset(opad, 0, block_size);
-@@ -1490,9 +1490,13 @@ int qat_sym_session_aead_create_cd_auth(struct qat_sym_session *cdesc,
- 		|| cdesc->qat_hash_alg == ICP_QAT_HW_AUTH_ALGO_AES_XCBC_MAC
- 			)
+@@ -753,9 +753,13 @@ int qat_alg_aead_session_create_content_desc_auth(struct qat_session *cdesc,
+ 		|| cdesc->qat_hash_alg == ICP_QAT_HW_AUTH_ALGO_KASUMI_F9
+ 		|| cdesc->qat_hash_alg == ICP_QAT_HW_AUTH_ALGO_ZUC_3G_128_EIA3)
  		hash->auth_counter.counter = 0;
 -	else
 -		hash->auth_counter.counter = rte_bswap32(

^ permalink raw reply	[flat|nested] 75+ messages in thread

* [dpdk-stable] patch 'timer: fix race condition' has been queued to LTS release 17.11.6
  2019-03-08 17:46 [dpdk-stable] patch 'net/bnx2x: cleanup info logs' has been queued to LTS release 17.11.6 Yongseok Koh
                   ` (11 preceding siblings ...)
  2019-03-08 17:46 ` [dpdk-stable] patch 'crypto/qat: fix block size error handling' " Yongseok Koh
@ 2019-03-08 17:46 ` Yongseok Koh
  2019-03-08 17:46 ` [dpdk-stable] patch 'net/i40e: fix statistics inconsistency' " Yongseok Koh
                   ` (56 subsequent siblings)
  69 siblings, 0 replies; 75+ messages in thread
From: Yongseok Koh @ 2019-03-08 17:46 UTC (permalink / raw)
  To: Erik Gabriel Carrillo; +Cc: Gavin Hu, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.6

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objection by 03/13/19. So please
shout if anyone has objection.

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.

Yongseok

---
>From 692b6919438f84d1fb1f422cb56d7dc275601337 Mon Sep 17 00:00:00 2001
From: Erik Gabriel Carrillo <erik.g.carrillo@intel.com>
Date: Wed, 19 Dec 2018 10:09:34 -0600
Subject: [PATCH] timer: fix race condition

[ upstream commit 7079e29f7f28661b712620f46e6a8514eb0a708a ]

rte_timer_manage() adds expired timers to a "run list", and walks the
list, transitioning each timer from the PENDING to the RUNNING state.
If another lcore resets or stops the timer at precisely this
moment, the timer state would instead be set to CONFIG by that other
lcore, which would cause timer_manage() to skip over it. This is
expected behavior.

However, if a timer expires quickly enough, there exists the
following race condition that causes the timer_manage() routine to
misinterpret a timer in CONFIG state, resulting in lost timers:

- Thread A:
  - starts a timer with rte_timer_reset()
  - the timer is moved to CONFIG state
  - the spinlock associated with the appropriate skiplist is acquired
  - timer is inserted into the skiplist
  - the spinlock is released
- Thread B:
  - executes rte_timer_manage()
  - find above timer as expired, add it to run list
  - walk run list, see above timer still in CONFIG state, unlink it from
    run list and continue on
- Thread A:
  - move timer to PENDING state
  - return from rte_timer_reset()
  - timer is now in PENDING state, but not actually linked into a
    pending list or a run list and will never get processed further
    by rte_timer_manage()

This commit fixes this race condition by only releasing the spinlock
after the timer state has been transitioned from CONFIG to PENDING,
which prevents rte_timer_manage() from seeing an incorrect state.

Fixes: 9b15ba895b9f ("timer: use a skip list")

Signed-off-by: Erik Gabriel Carrillo <erik.g.carrillo@intel.com>
Reviewed-by: Gavin Hu <gavin.hu@arm.com>
---
 lib/librte_timer/rte_timer.c | 28 ++++++++++++++--------------
 1 file changed, 14 insertions(+), 14 deletions(-)

diff --git a/lib/librte_timer/rte_timer.c b/lib/librte_timer/rte_timer.c
index ba436cd87..56f9d6275 100644
--- a/lib/librte_timer/rte_timer.c
+++ b/lib/librte_timer/rte_timer.c
@@ -270,24 +270,17 @@ timer_get_prev_entries_for_node(struct rte_timer *tim, unsigned tim_lcore,
 	}
 }
 
-/*
- * add in list, lock if needed
+/* call with lock held as necessary
+ * add in list
  * timer must be in config state
  * timer must not be in a list
  */
 static void
-timer_add(struct rte_timer *tim, unsigned tim_lcore, int local_is_locked)
+timer_add(struct rte_timer *tim, unsigned int tim_lcore)
 {
-	unsigned lcore_id = rte_lcore_id();
 	unsigned lvl;
 	struct rte_timer *prev[MAX_SKIPLIST_DEPTH+1];
 
-	/* if timer needs to be scheduled on another core, we need to
-	 * lock the list; if it is on local core, we need to lock if
-	 * we are not called from rte_timer_manage() */
-	if (tim_lcore != lcore_id || !local_is_locked)
-		rte_spinlock_lock(&priv_timer[tim_lcore].list_lock);
-
 	/* find where exactly this element goes in the list of elements
 	 * for each depth. */
 	timer_get_prev_entries(tim->expire, tim_lcore, prev);
@@ -311,9 +304,6 @@ timer_add(struct rte_timer *tim, unsigned tim_lcore, int local_is_locked)
 	 * NOTE: this is not atomic on 32-bit*/
 	priv_timer[tim_lcore].pending_head.expire = priv_timer[tim_lcore].\
 			pending_head.sl_next[0]->expire;
-
-	if (tim_lcore != lcore_id || !local_is_locked)
-		rte_spinlock_unlock(&priv_timer[tim_lcore].list_lock);
 }
 
 /*
@@ -408,8 +398,15 @@ __rte_timer_reset(struct rte_timer *tim, uint64_t expire,
 	tim->f = fct;
 	tim->arg = arg;
 
+	/* if timer needs to be scheduled on another core, we need to
+	 * lock the destination list; if it is on local core, we need to lock if
+	 * we are not called from rte_timer_manage()
+	 */
+	if (tim_lcore != lcore_id || !local_is_locked)
+		rte_spinlock_lock(&priv_timer[tim_lcore].list_lock);
+
 	__TIMER_STAT_ADD(pending, 1);
-	timer_add(tim, tim_lcore, local_is_locked);
+	timer_add(tim, tim_lcore);
 
 	/* update state: as we are in CONFIG state, only us can modify
 	 * the state so we don't need to use cmpset() here */
@@ -418,6 +415,9 @@ __rte_timer_reset(struct rte_timer *tim, uint64_t expire,
 	status.owner = (int16_t)tim_lcore;
 	tim->status.u32 = status.u32;
 
+	if (tim_lcore != lcore_id || !local_is_locked)
+		rte_spinlock_unlock(&priv_timer[tim_lcore].list_lock);
+
 	return 0;
 }
 
-- 
2.11.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2019-03-08 09:46:41.076676989 -0800
+++ 0014-timer-fix-race-condition.patch	2019-03-08 09:46:40.015398000 -0800
@@ -1,8 +1,10 @@
-From 7079e29f7f28661b712620f46e6a8514eb0a708a Mon Sep 17 00:00:00 2001
+From 692b6919438f84d1fb1f422cb56d7dc275601337 Mon Sep 17 00:00:00 2001
 From: Erik Gabriel Carrillo <erik.g.carrillo@intel.com>
 Date: Wed, 19 Dec 2018 10:09:34 -0600
 Subject: [PATCH] timer: fix race condition
 
+[ upstream commit 7079e29f7f28661b712620f46e6a8514eb0a708a ]
+
 rte_timer_manage() adds expired timers to a "run list", and walks the
 list, transitioning each timer from the PENDING to the RUNNING state.
 If another lcore resets or stops the timer at precisely this
@@ -37,7 +39,6 @@
 which prevents rte_timer_manage() from seeing an incorrect state.
 
 Fixes: 9b15ba895b9f ("timer: use a skip list")
-Cc: stable@dpdk.org
 
 Signed-off-by: Erik Gabriel Carrillo <erik.g.carrillo@intel.com>
 Reviewed-by: Gavin Hu <gavin.hu@arm.com>
@@ -46,10 +47,10 @@
  1 file changed, 14 insertions(+), 14 deletions(-)
 
 diff --git a/lib/librte_timer/rte_timer.c b/lib/librte_timer/rte_timer.c
-index 590488c7e..30c7b0ab4 100644
+index ba436cd87..56f9d6275 100644
 --- a/lib/librte_timer/rte_timer.c
 +++ b/lib/librte_timer/rte_timer.c
-@@ -241,24 +241,17 @@ timer_get_prev_entries_for_node(struct rte_timer *tim, unsigned tim_lcore,
+@@ -270,24 +270,17 @@ timer_get_prev_entries_for_node(struct rte_timer *tim, unsigned tim_lcore,
  	}
  }
  
@@ -77,7 +78,7 @@
  	/* find where exactly this element goes in the list of elements
  	 * for each depth. */
  	timer_get_prev_entries(tim->expire, tim_lcore, prev);
-@@ -282,9 +275,6 @@ timer_add(struct rte_timer *tim, unsigned tim_lcore, int local_is_locked)
+@@ -311,9 +304,6 @@ timer_add(struct rte_timer *tim, unsigned tim_lcore, int local_is_locked)
  	 * NOTE: this is not atomic on 32-bit*/
  	priv_timer[tim_lcore].pending_head.expire = priv_timer[tim_lcore].\
  			pending_head.sl_next[0]->expire;
@@ -87,7 +88,7 @@
  }
  
  /*
-@@ -379,8 +369,15 @@ __rte_timer_reset(struct rte_timer *tim, uint64_t expire,
+@@ -408,8 +398,15 @@ __rte_timer_reset(struct rte_timer *tim, uint64_t expire,
  	tim->f = fct;
  	tim->arg = arg;
  
@@ -104,7 +105,7 @@
  
  	/* update state: as we are in CONFIG state, only us can modify
  	 * the state so we don't need to use cmpset() here */
-@@ -389,6 +386,9 @@ __rte_timer_reset(struct rte_timer *tim, uint64_t expire,
+@@ -418,6 +415,9 @@ __rte_timer_reset(struct rte_timer *tim, uint64_t expire,
  	status.owner = (int16_t)tim_lcore;
  	tim->status.u32 = status.u32;
  

^ permalink raw reply	[flat|nested] 75+ messages in thread

* [dpdk-stable] patch 'net/i40e: fix statistics inconsistency' has been queued to LTS release 17.11.6
  2019-03-08 17:46 [dpdk-stable] patch 'net/bnx2x: cleanup info logs' has been queued to LTS release 17.11.6 Yongseok Koh
                   ` (12 preceding siblings ...)
  2019-03-08 17:46 ` [dpdk-stable] patch 'timer: fix race condition' " Yongseok Koh
@ 2019-03-08 17:46 ` Yongseok Koh
  2019-03-08 17:46 ` [dpdk-stable] patch 'vhost: fix race condition when adding fd in the fdset' " Yongseok Koh
                   ` (55 subsequent siblings)
  69 siblings, 0 replies; 75+ messages in thread
From: Yongseok Koh @ 2019-03-08 17:46 UTC (permalink / raw)
  To: Xiaoyun Li; +Cc: Qi Zhang, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.6

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objection by 03/13/19. So please
shout if anyone has objection.

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.

Yongseok

---
>From b6ef59fa193ae154f224cd8dbc5aab813e5cccec Mon Sep 17 00:00:00 2001
From: Xiaoyun Li <xiaoyun.li@intel.com>
Date: Thu, 6 Dec 2018 14:03:42 +0800
Subject: [PATCH] net/i40e: fix statistics inconsistency

[ upstream commit 63056c192005336d7c9d2639efe317639dd3baaa ]

While calculating the input packet count per port, discarded packets
should be reduced, right now only PF VSI discarded packets are reduced.
But while calculating the input byte count per port, Rx byte count is
used, which should take all discarded packets into account, including
VF VSI ones.
This will cause inconsistency in stat counters in some cases.

This patch would take all VSI stats as packet and byte count to address
the issue.

Fixes: 763de290cbd1 ("net/i40e: fix packet count for PF")

Signed-off-by: Xiaoyun Li <xiaoyun.li@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
---
 drivers/net/i40e/i40e_ethdev.c | 25 ++++++++++++++++++++-----
 1 file changed, 20 insertions(+), 5 deletions(-)

diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c
index bcf995ce8..06c955858 100644
--- a/drivers/net/i40e/i40e_ethdev.c
+++ b/drivers/net/i40e/i40e_ethdev.c
@@ -3007,20 +3007,20 @@ i40e_dev_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats)
 	struct i40e_pf *pf = I40E_DEV_PRIVATE_TO_PF(dev->data->dev_private);
 	struct i40e_hw *hw = I40E_DEV_PRIVATE_TO_HW(dev->data->dev_private);
 	struct i40e_hw_port_stats *ns = &pf->stats; /* new stats */
+	struct i40e_vsi *vsi;
 	unsigned i;
 
 	/* call read registers - updates values, now write them to struct */
 	i40e_read_stats_registers(pf, hw);
 
-	stats->ipackets = ns->eth.rx_unicast +
-			ns->eth.rx_multicast +
-			ns->eth.rx_broadcast -
-			ns->eth.rx_discards -
+	stats->ipackets = pf->main_vsi->eth_stats.rx_unicast +
+			pf->main_vsi->eth_stats.rx_multicast +
+			pf->main_vsi->eth_stats.rx_broadcast -
 			pf->main_vsi->eth_stats.rx_discards;
 	stats->opackets = ns->eth.tx_unicast +
 			ns->eth.tx_multicast +
 			ns->eth.tx_broadcast;
-	stats->ibytes   = ns->eth.rx_bytes;
+	stats->ibytes   = pf->main_vsi->eth_stats.rx_bytes;
 	stats->obytes   = ns->eth.tx_bytes;
 	stats->oerrors  = ns->eth.tx_errors +
 			pf->main_vsi->eth_stats.tx_errors;
@@ -3032,6 +3032,21 @@ i40e_dev_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats)
 			ns->rx_length_errors + ns->rx_undersize +
 			ns->rx_oversize + ns->rx_fragments + ns->rx_jabber;
 
+	if (pf->vfs) {
+		for (i = 0; i < pf->vf_num; i++) {
+			vsi = pf->vfs[i].vsi;
+			i40e_update_vsi_stats(vsi);
+
+			stats->ipackets += (vsi->eth_stats.rx_unicast +
+					vsi->eth_stats.rx_multicast +
+					vsi->eth_stats.rx_broadcast -
+					vsi->eth_stats.rx_discards);
+			stats->ibytes   += vsi->eth_stats.rx_bytes;
+			stats->oerrors  += vsi->eth_stats.tx_errors;
+			stats->imissed  += vsi->eth_stats.rx_discards;
+		}
+	}
+
 	PMD_DRV_LOG(DEBUG, "***************** PF stats start *******************");
 	PMD_DRV_LOG(DEBUG, "rx_bytes:            %"PRIu64"", ns->eth.rx_bytes);
 	PMD_DRV_LOG(DEBUG, "rx_unicast:          %"PRIu64"", ns->eth.rx_unicast);
-- 
2.11.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2019-03-08 09:46:41.119637860 -0800
+++ 0015-net-i40e-fix-statistics-inconsistency.patch	2019-03-08 09:46:40.030398000 -0800
@@ -1,8 +1,10 @@
-From 63056c192005336d7c9d2639efe317639dd3baaa Mon Sep 17 00:00:00 2001
+From b6ef59fa193ae154f224cd8dbc5aab813e5cccec Mon Sep 17 00:00:00 2001
 From: Xiaoyun Li <xiaoyun.li@intel.com>
 Date: Thu, 6 Dec 2018 14:03:42 +0800
 Subject: [PATCH] net/i40e: fix statistics inconsistency
 
+[ upstream commit 63056c192005336d7c9d2639efe317639dd3baaa ]
+
 While calculating the input packet count per port, discarded packets
 should be reduced, right now only PF VSI discarded packets are reduced.
 But while calculating the input byte count per port, Rx byte count is
@@ -14,7 +16,6 @@
 the issue.
 
 Fixes: 763de290cbd1 ("net/i40e: fix packet count for PF")
-Cc: stable@dpdk.org
 
 Signed-off-by: Xiaoyun Li <xiaoyun.li@intel.com>
 Acked-by: Qi Zhang <qi.z.zhang@intel.com>
@@ -23,10 +24,10 @@
  1 file changed, 20 insertions(+), 5 deletions(-)
 
 diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c
-index 501c30cc3..8dc1a4af8 100644
+index bcf995ce8..06c955858 100644
 --- a/drivers/net/i40e/i40e_ethdev.c
 +++ b/drivers/net/i40e/i40e_ethdev.c
-@@ -3174,20 +3174,20 @@ i40e_dev_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats)
+@@ -3007,20 +3007,20 @@ i40e_dev_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats)
  	struct i40e_pf *pf = I40E_DEV_PRIVATE_TO_PF(dev->data->dev_private);
  	struct i40e_hw *hw = I40E_DEV_PRIVATE_TO_HW(dev->data->dev_private);
  	struct i40e_hw_port_stats *ns = &pf->stats; /* new stats */
@@ -52,7 +53,7 @@
  	stats->obytes   = ns->eth.tx_bytes;
  	stats->oerrors  = ns->eth.tx_errors +
  			pf->main_vsi->eth_stats.tx_errors;
-@@ -3199,6 +3199,21 @@ i40e_dev_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats)
+@@ -3032,6 +3032,21 @@ i40e_dev_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats)
  			ns->rx_length_errors + ns->rx_undersize +
  			ns->rx_oversize + ns->rx_fragments + ns->rx_jabber;
  

^ permalink raw reply	[flat|nested] 75+ messages in thread

* [dpdk-stable] patch 'vhost: fix race condition when adding fd in the fdset' has been queued to LTS release 17.11.6
  2019-03-08 17:46 [dpdk-stable] patch 'net/bnx2x: cleanup info logs' has been queued to LTS release 17.11.6 Yongseok Koh
                   ` (13 preceding siblings ...)
  2019-03-08 17:46 ` [dpdk-stable] patch 'net/i40e: fix statistics inconsistency' " Yongseok Koh
@ 2019-03-08 17:46 ` Yongseok Koh
  2019-03-08 17:46 ` [dpdk-stable] patch 'net/ena: add supported RSS offloads types' " Yongseok Koh
                   ` (54 subsequent siblings)
  69 siblings, 0 replies; 75+ messages in thread
From: Yongseok Koh @ 2019-03-08 17:46 UTC (permalink / raw)
  To: Matthias Gatto; +Cc: Maxime Coquelin, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.6

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objection by 03/13/19. So please
shout if anyone has objection.

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.

Yongseok

---
>From c9e1dc6a57b23f85beee8db9410e2951129629c4 Mon Sep 17 00:00:00 2001
From: Matthias Gatto <matthias.gatto@outscale.com>
Date: Thu, 6 Dec 2018 16:00:07 +0000
Subject: [PATCH] vhost: fix race condition when adding fd in the fdset

[ upstream commit 276d63505be94bb8d5fdf754af0105707ea433c1 ]

fdset_add can call fdset_shrink_nolock which call fdset_move
concurrently to poll that is call in fdset_event_dispatch.

This patch add a mutex to protect poll from been call at the same time
fdset_add call fdset_shrink_nolock.

Fixes: 1b815b89599c ("vhost: try to shrink pfdset when fdset_add fails")

Signed-off-by: Matthias Gatto <matthias.gatto@outscale.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
---
 lib/librte_vhost/fd_man.c | 4 ++++
 lib/librte_vhost/fd_man.h | 1 +
 lib/librte_vhost/socket.c | 1 +
 3 files changed, 6 insertions(+)

diff --git a/lib/librte_vhost/fd_man.c b/lib/librte_vhost/fd_man.c
index 173ec75c8..0ab67c501 100644
--- a/lib/librte_vhost/fd_man.c
+++ b/lib/librte_vhost/fd_man.c
@@ -155,7 +155,9 @@ fdset_add(struct fdset *pfdset, int fd, fd_cb rcb, fd_cb wcb, void *dat)
 	pthread_mutex_lock(&pfdset->fd_mutex);
 	i = pfdset->num < MAX_FDS ? pfdset->num++ : -1;
 	if (i == -1) {
+		pthread_mutex_lock(&pfdset->fd_pooling_mutex);
 		fdset_shrink_nolock(pfdset);
+		pthread_mutex_unlock(&pfdset->fd_pooling_mutex);
 		i = pfdset->num < MAX_FDS ? pfdset->num++ : -1;
 		if (i == -1) {
 			pthread_mutex_unlock(&pfdset->fd_mutex);
@@ -272,7 +274,9 @@ fdset_event_dispatch(void *arg)
 		numfds = pfdset->num;
 		pthread_mutex_unlock(&pfdset->fd_mutex);
 
+		pthread_mutex_lock(&pfdset->fd_pooling_mutex);
 		val = poll(pfdset->rwfds, numfds, 1000 /* millisecs */);
+		pthread_mutex_unlock(&pfdset->fd_pooling_mutex);
 		if (val < 0)
 			continue;
 
diff --git a/lib/librte_vhost/fd_man.h b/lib/librte_vhost/fd_man.h
index c00883882..01882de6c 100644
--- a/lib/librte_vhost/fd_man.h
+++ b/lib/librte_vhost/fd_man.h
@@ -53,6 +53,7 @@ struct fdset {
 	struct pollfd rwfds[MAX_FDS];
 	struct fdentry fd[MAX_FDS];
 	pthread_mutex_t fd_mutex;
+	pthread_mutex_t fd_pooling_mutex;
 	int num;	/* current fd number of this fdset */
 };
 
diff --git a/lib/librte_vhost/socket.c b/lib/librte_vhost/socket.c
index f816601bb..a3fd3dc23 100644
--- a/lib/librte_vhost/socket.c
+++ b/lib/librte_vhost/socket.c
@@ -110,6 +110,7 @@ static struct vhost_user vhost_user = {
 	.fdset = {
 		.fd = { [0 ... MAX_FDS - 1] = {-1, NULL, NULL, NULL, 0} },
 		.fd_mutex = PTHREAD_MUTEX_INITIALIZER,
+		.fd_pooling_mutex = PTHREAD_MUTEX_INITIALIZER,
 		.num = 0
 	},
 	.vsocket_cnt = 0,
-- 
2.11.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2019-03-08 09:46:41.171914945 -0800
+++ 0016-vhost-fix-race-condition-when-adding-fd-in-the-fdset.patch	2019-03-08 09:46:40.036402000 -0800
@@ -1,8 +1,10 @@
-From 276d63505be94bb8d5fdf754af0105707ea433c1 Mon Sep 17 00:00:00 2001
+From c9e1dc6a57b23f85beee8db9410e2951129629c4 Mon Sep 17 00:00:00 2001
 From: Matthias Gatto <matthias.gatto@outscale.com>
 Date: Thu, 6 Dec 2018 16:00:07 +0000
 Subject: [PATCH] vhost: fix race condition when adding fd in the fdset
 
+[ upstream commit 276d63505be94bb8d5fdf754af0105707ea433c1 ]
+
 fdset_add can call fdset_shrink_nolock which call fdset_move
 concurrently to poll that is call in fdset_event_dispatch.
 
@@ -10,7 +12,6 @@
 fdset_add call fdset_shrink_nolock.
 
 Fixes: 1b815b89599c ("vhost: try to shrink pfdset when fdset_add fails")
-Cc: stable@dpdk.org
 
 Signed-off-by: Matthias Gatto <matthias.gatto@outscale.com>
 Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
@@ -21,10 +22,10 @@
  3 files changed, 6 insertions(+)
 
 diff --git a/lib/librte_vhost/fd_man.c b/lib/librte_vhost/fd_man.c
-index 38347ab1d..55d4856f9 100644
+index 173ec75c8..0ab67c501 100644
 --- a/lib/librte_vhost/fd_man.c
 +++ b/lib/librte_vhost/fd_man.c
-@@ -129,7 +129,9 @@ fdset_add(struct fdset *pfdset, int fd, fd_cb rcb, fd_cb wcb, void *dat)
+@@ -155,7 +155,9 @@ fdset_add(struct fdset *pfdset, int fd, fd_cb rcb, fd_cb wcb, void *dat)
  	pthread_mutex_lock(&pfdset->fd_mutex);
  	i = pfdset->num < MAX_FDS ? pfdset->num++ : -1;
  	if (i == -1) {
@@ -34,7 +35,7 @@
  		i = pfdset->num < MAX_FDS ? pfdset->num++ : -1;
  		if (i == -1) {
  			pthread_mutex_unlock(&pfdset->fd_mutex);
-@@ -246,7 +248,9 @@ fdset_event_dispatch(void *arg)
+@@ -272,7 +274,9 @@ fdset_event_dispatch(void *arg)
  		numfds = pfdset->num;
  		pthread_mutex_unlock(&pfdset->fd_mutex);
  
@@ -45,22 +46,22 @@
  			continue;
  
 diff --git a/lib/librte_vhost/fd_man.h b/lib/librte_vhost/fd_man.h
-index 3331bcd97..3ab5cfdd6 100644
+index c00883882..01882de6c 100644
 --- a/lib/librte_vhost/fd_man.h
 +++ b/lib/librte_vhost/fd_man.h
-@@ -24,6 +24,7 @@ struct fdset {
+@@ -53,6 +53,7 @@ struct fdset {
  	struct pollfd rwfds[MAX_FDS];
  	struct fdentry fd[MAX_FDS];
  	pthread_mutex_t fd_mutex;
 +	pthread_mutex_t fd_pooling_mutex;
  	int num;	/* current fd number of this fdset */
+ };
  
- 	union pipefds {
 diff --git a/lib/librte_vhost/socket.c b/lib/librte_vhost/socket.c
-index 01b60ff9e..9cf34ad17 100644
+index f816601bb..a3fd3dc23 100644
 --- a/lib/librte_vhost/socket.c
 +++ b/lib/librte_vhost/socket.c
-@@ -90,6 +90,7 @@ static struct vhost_user vhost_user = {
+@@ -110,6 +110,7 @@ static struct vhost_user vhost_user = {
  	.fdset = {
  		.fd = { [0 ... MAX_FDS - 1] = {-1, NULL, NULL, NULL, 0} },
  		.fd_mutex = PTHREAD_MUTEX_INITIALIZER,

^ permalink raw reply	[flat|nested] 75+ messages in thread

* [dpdk-stable] patch 'net/ena: add supported RSS offloads types' has been queued to LTS release 17.11.6
  2019-03-08 17:46 [dpdk-stable] patch 'net/bnx2x: cleanup info logs' has been queued to LTS release 17.11.6 Yongseok Koh
                   ` (14 preceding siblings ...)
  2019-03-08 17:46 ` [dpdk-stable] patch 'vhost: fix race condition when adding fd in the fdset' " Yongseok Koh
@ 2019-03-08 17:46 ` Yongseok Koh
  2019-03-08 17:46 ` [dpdk-stable] patch 'net/ena: update completion queue after cleanup' " Yongseok Koh
                   ` (53 subsequent siblings)
  69 siblings, 0 replies; 75+ messages in thread
From: Yongseok Koh @ 2019-03-08 17:46 UTC (permalink / raw)
  To: Rafal Kozik; +Cc: Michal Krawczyk, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.6

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objection by 03/13/19. So please
shout if anyone has objection.

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.

Yongseok

---
>From fe73f882f74adec53d925df6181e81ac8a796e5d Mon Sep 17 00:00:00 2001
From: Rafal Kozik <rk@semihalf.com>
Date: Fri, 14 Dec 2018 14:18:38 +0100
Subject: [PATCH] net/ena: add supported RSS offloads types

[ upstream commit b01ead202beb45346d7daeb2f2b1a608006af644 ]

The PMD was not passing RSS offloads values although it was supporting
the RSS. To allow application to probe the PMD for RSS support, the
missing information was added.

Fixes: 1173fca25af9 ("ena: add polling-mode driver")

Signed-off-by: Rafal Kozik <rk@semihalf.com>
Acked-by: Michal Krawczyk <mk@semihalf.com>
---
 drivers/net/ena/ena_ethdev.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/net/ena/ena_ethdev.c b/drivers/net/ena/ena_ethdev.c
index 725e4b373..c6b727e95 100644
--- a/drivers/net/ena/ena_ethdev.c
+++ b/drivers/net/ena/ena_ethdev.c
@@ -1495,6 +1495,9 @@ static void ena_infos_get(struct rte_eth_dev *dev,
 	dev_info->rx_offload_capa = rx_feat;
 	dev_info->tx_offload_capa = tx_feat;
 
+	dev_info->flow_type_rss_offloads = ETH_RSS_IP | ETH_RSS_TCP |
+					   ETH_RSS_UDP;
+
 	dev_info->min_rx_bufsize = ENA_MIN_FRAME_LEN;
 	dev_info->max_rx_pktlen  = adapter->max_mtu;
 	dev_info->max_mac_addrs = 1;
-- 
2.11.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2019-03-08 09:46:41.215896928 -0800
+++ 0017-net-ena-add-supported-RSS-offloads-types.patch	2019-03-08 09:46:40.042398000 -0800
@@ -1,14 +1,15 @@
-From b01ead202beb45346d7daeb2f2b1a608006af644 Mon Sep 17 00:00:00 2001
+From fe73f882f74adec53d925df6181e81ac8a796e5d Mon Sep 17 00:00:00 2001
 From: Rafal Kozik <rk@semihalf.com>
 Date: Fri, 14 Dec 2018 14:18:38 +0100
 Subject: [PATCH] net/ena: add supported RSS offloads types
 
+[ upstream commit b01ead202beb45346d7daeb2f2b1a608006af644 ]
+
 The PMD was not passing RSS offloads values although it was supporting
 the RSS. To allow application to probe the PMD for RSS support, the
 missing information was added.
 
 Fixes: 1173fca25af9 ("ena: add polling-mode driver")
-Cc: stable@dpdk.org
 
 Signed-off-by: Rafal Kozik <rk@semihalf.com>
 Acked-by: Michal Krawczyk <mk@semihalf.com>
@@ -17,12 +18,12 @@
  1 file changed, 3 insertions(+)
 
 diff --git a/drivers/net/ena/ena_ethdev.c b/drivers/net/ena/ena_ethdev.c
-index 5adc87355..3aa32a3bf 100644
+index 725e4b373..c6b727e95 100644
 --- a/drivers/net/ena/ena_ethdev.c
 +++ b/drivers/net/ena/ena_ethdev.c
-@@ -1994,6 +1994,9 @@ static void ena_infos_get(struct rte_eth_dev *dev,
+@@ -1495,6 +1495,9 @@ static void ena_infos_get(struct rte_eth_dev *dev,
+ 	dev_info->rx_offload_capa = rx_feat;
  	dev_info->tx_offload_capa = tx_feat;
- 	dev_info->tx_queue_offload_capa = tx_feat;
  
 +	dev_info->flow_type_rss_offloads = ETH_RSS_IP | ETH_RSS_TCP |
 +					   ETH_RSS_UDP;

^ permalink raw reply	[flat|nested] 75+ messages in thread

* [dpdk-stable] patch 'net/ena: update completion queue after cleanup' has been queued to LTS release 17.11.6
  2019-03-08 17:46 [dpdk-stable] patch 'net/bnx2x: cleanup info logs' has been queued to LTS release 17.11.6 Yongseok Koh
                   ` (15 preceding siblings ...)
  2019-03-08 17:46 ` [dpdk-stable] patch 'net/ena: add supported RSS offloads types' " Yongseok Koh
@ 2019-03-08 17:46 ` Yongseok Koh
  2019-03-08 17:46 ` [dpdk-stable] patch 'net: fix underflow for checksum of invalid IPv4 packets' " Yongseok Koh
                   ` (52 subsequent siblings)
  69 siblings, 0 replies; 75+ messages in thread
From: Yongseok Koh @ 2019-03-08 17:46 UTC (permalink / raw)
  To: Rafal Kozik; +Cc: Michal Krawczyk, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.6

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objection by 03/13/19. So please
shout if anyone has objection.

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.

Yongseok

---
>From 54544c40de6910bc4b51ba6945485731b8075e4a Mon Sep 17 00:00:00 2001
From: Rafal Kozik <rk@semihalf.com>
Date: Fri, 14 Dec 2018 14:18:44 +0100
Subject: [PATCH] net/ena: update completion queue after cleanup

[ upstream commit a45462c507e98b49cb5c2302e0be3c72d2e20a1a ]

After Rx or Tx cleanup update completion queue head by calling
ena_com_update_dev_comp_head().

Fixes: 1daff5260ff8 ("net/ena: use unmasked head and tail")

Signed-off-by: Rafal Kozik <rk@semihalf.com>
Acked-by: Michal Krawczyk <mk@semihalf.com>
---
 drivers/net/ena/ena_ethdev.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/drivers/net/ena/ena_ethdev.c b/drivers/net/ena/ena_ethdev.c
index c6b727e95..f86a60c66 100644
--- a/drivers/net/ena/ena_ethdev.c
+++ b/drivers/net/ena/ena_ethdev.c
@@ -1589,8 +1589,10 @@ static uint16_t eth_ena_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts,
 
 	desc_in_use = desc_in_use - completed + 1;
 	/* Burst refill to save doorbells, memory barriers, const interval */
-	if (ring_size - desc_in_use > ENA_RING_DESCS_RATIO(ring_size))
+	if (ring_size - desc_in_use > ENA_RING_DESCS_RATIO(ring_size)) {
+		ena_com_update_dev_comp_head(rx_ring->ena_com_io_cq);
 		ena_populate_rx_queue(rx_ring, ring_size - desc_in_use);
+	}
 
 	return recv_idx;
 }
@@ -1792,8 +1794,9 @@ static uint16_t eth_ena_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts,
 
 	if (total_tx_descs > 0) {
 		/* acknowledge completion of sent packets */
-		ena_com_comp_ack(tx_ring->ena_com_io_sq, total_tx_descs);
 		tx_ring->next_to_clean = next_to_clean;
+		ena_com_comp_ack(tx_ring->ena_com_io_sq, total_tx_descs);
+		ena_com_update_dev_comp_head(tx_ring->ena_com_io_cq);
 	}
 
 	return sent_idx;
-- 
2.11.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2019-03-08 09:46:41.261176048 -0800
+++ 0018-net-ena-update-completion-queue-after-cleanup.patch	2019-03-08 09:46:40.047400000 -0800
@@ -1,13 +1,14 @@
-From a45462c507e98b49cb5c2302e0be3c72d2e20a1a Mon Sep 17 00:00:00 2001
+From 54544c40de6910bc4b51ba6945485731b8075e4a Mon Sep 17 00:00:00 2001
 From: Rafal Kozik <rk@semihalf.com>
 Date: Fri, 14 Dec 2018 14:18:44 +0100
 Subject: [PATCH] net/ena: update completion queue after cleanup
 
+[ upstream commit a45462c507e98b49cb5c2302e0be3c72d2e20a1a ]
+
 After Rx or Tx cleanup update completion queue head by calling
 ena_com_update_dev_comp_head().
 
 Fixes: 1daff5260ff8 ("net/ena: use unmasked head and tail")
-Cc: stable@dpdk.org
 
 Signed-off-by: Rafal Kozik <rk@semihalf.com>
 Acked-by: Michal Krawczyk <mk@semihalf.com>
@@ -16,10 +17,10 @@
  1 file changed, 5 insertions(+), 2 deletions(-)
 
 diff --git a/drivers/net/ena/ena_ethdev.c b/drivers/net/ena/ena_ethdev.c
-index 0aeb85ff8..a2c8f1e4a 100644
+index c6b727e95..f86a60c66 100644
 --- a/drivers/net/ena/ena_ethdev.c
 +++ b/drivers/net/ena/ena_ethdev.c
-@@ -2128,8 +2128,10 @@ static uint16_t eth_ena_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts,
+@@ -1589,8 +1589,10 @@ static uint16_t eth_ena_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts,
  
  	desc_in_use = desc_in_use - completed + 1;
  	/* Burst refill to save doorbells, memory barriers, const interval */
@@ -31,7 +32,7 @@
  
  	return recv_idx;
  }
-@@ -2440,8 +2442,9 @@ static uint16_t eth_ena_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts,
+@@ -1792,8 +1794,9 @@ static uint16_t eth_ena_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts,
  
  	if (total_tx_descs > 0) {
  		/* acknowledge completion of sent packets */
@@ -41,7 +42,7 @@
 +		ena_com_update_dev_comp_head(tx_ring->ena_com_io_cq);
  	}
  
- 	tx_ring->tx_stats.tx_poll++;
+ 	return sent_idx;
 -- 
 2.11.0
 

^ permalink raw reply	[flat|nested] 75+ messages in thread

* [dpdk-stable] patch 'net: fix underflow for checksum of invalid IPv4 packets' has been queued to LTS release 17.11.6
  2019-03-08 17:46 [dpdk-stable] patch 'net/bnx2x: cleanup info logs' has been queued to LTS release 17.11.6 Yongseok Koh
                   ` (16 preceding siblings ...)
  2019-03-08 17:46 ` [dpdk-stable] patch 'net/ena: update completion queue after cleanup' " Yongseok Koh
@ 2019-03-08 17:46 ` Yongseok Koh
  2019-03-08 17:46 ` [dpdk-stable] patch 'net/tap: add buffer overflow checks before checksum' " Yongseok Koh
                   ` (51 subsequent siblings)
  69 siblings, 0 replies; 75+ messages in thread
From: Yongseok Koh @ 2019-03-08 17:46 UTC (permalink / raw)
  To: Bruce Richardson; +Cc: Hemant Agrawal, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.6

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objection by 03/13/19. So please
shout if anyone has objection.

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.

Yongseok

---
>From 15482f832ef5a7681a18cd486d2e08a8a78c01f6 Mon Sep 17 00:00:00 2001
From: Bruce Richardson <bruce.richardson@intel.com>
Date: Mon, 17 Dec 2018 15:50:04 +0000
Subject: [PATCH] net: fix underflow for checksum of invalid IPv4 packets

[ upstream commit 8743d499a59c3d6a7c743861fd3baf06ed5fe763 ]

If we receive a packet with an invalid IP header, where the total packet
length is reported as less than the IP header length, we would end up
getting an underflow in the length subtraction.

This could cause us to checksum e.g. 4GB of data in the case where the
result of the subtraction was -1.

We fix this by having the function return 0 - an invalid sum - when
the length is less than the header length.

Fixes: af75078fece3 ("first public release")
Fixes: 6006818cfb26 ("net: new checksum functions")

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
---
 lib/librte_net/rte_ip.h | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/lib/librte_net/rte_ip.h b/lib/librte_net/rte_ip.h
index b22c1f800..8d4907f07 100644
--- a/lib/librte_net/rte_ip.h
+++ b/lib/librte_net/rte_ip.h
@@ -372,16 +372,20 @@ rte_ipv4_phdr_cksum(const struct ipv4_hdr *ipv4_hdr, uint64_t ol_flags)
  * @param l4_hdr
  *   The pointer to the beginning of the L4 header.
  * @return
- *   The complemented checksum to set in the IP packet.
+ *   The complemented checksum to set in the IP packet
+ *   or 0 on error
  */
 static inline uint16_t
 rte_ipv4_udptcp_cksum(const struct ipv4_hdr *ipv4_hdr, const void *l4_hdr)
 {
 	uint32_t cksum;
-	uint32_t l4_len;
+	uint32_t l3_len, l4_len;
+
+	l3_len = rte_be_to_cpu_16(ipv4_hdr->total_length);
+	if (l3_len < sizeof(struct ipv4_hdr))
+		return 0;
 
-	l4_len = (uint32_t)(rte_be_to_cpu_16(ipv4_hdr->total_length) -
-		sizeof(struct ipv4_hdr));
+	l4_len = l3_len - sizeof(struct ipv4_hdr);
 
 	cksum = rte_raw_cksum(l4_hdr, l4_len);
 	cksum += rte_ipv4_phdr_cksum(ipv4_hdr, 0);
-- 
2.11.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2019-03-08 09:46:41.305328052 -0800
+++ 0019-net-fix-underflow-for-checksum-of-invalid-IPv4-packe.patch	2019-03-08 09:46:40.051400000 -0800
@@ -1,8 +1,10 @@
-From 8743d499a59c3d6a7c743861fd3baf06ed5fe763 Mon Sep 17 00:00:00 2001
+From 15482f832ef5a7681a18cd486d2e08a8a78c01f6 Mon Sep 17 00:00:00 2001
 From: Bruce Richardson <bruce.richardson@intel.com>
 Date: Mon, 17 Dec 2018 15:50:04 +0000
 Subject: [PATCH] net: fix underflow for checksum of invalid IPv4 packets
 
+[ upstream commit 8743d499a59c3d6a7c743861fd3baf06ed5fe763 ]
+
 If we receive a packet with an invalid IP header, where the total packet
 length is reported as less than the IP header length, we would end up
 getting an underflow in the length subtraction.
@@ -15,7 +17,6 @@
 
 Fixes: af75078fece3 ("first public release")
 Fixes: 6006818cfb26 ("net: new checksum functions")
-Cc: stable@dpdk.org
 
 Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
 Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
@@ -24,10 +25,10 @@
  1 file changed, 8 insertions(+), 4 deletions(-)
 
 diff --git a/lib/librte_net/rte_ip.h b/lib/librte_net/rte_ip.h
-index f2a8904a2..f9b909090 100644
+index b22c1f800..8d4907f07 100644
 --- a/lib/librte_net/rte_ip.h
 +++ b/lib/librte_net/rte_ip.h
-@@ -310,16 +310,20 @@ rte_ipv4_phdr_cksum(const struct ipv4_hdr *ipv4_hdr, uint64_t ol_flags)
+@@ -372,16 +372,20 @@ rte_ipv4_phdr_cksum(const struct ipv4_hdr *ipv4_hdr, uint64_t ol_flags)
   * @param l4_hdr
   *   The pointer to the beginning of the L4 header.
   * @return

^ permalink raw reply	[flat|nested] 75+ messages in thread

* [dpdk-stable] patch 'net/tap: add buffer overflow checks before checksum' has been queued to LTS release 17.11.6
  2019-03-08 17:46 [dpdk-stable] patch 'net/bnx2x: cleanup info logs' has been queued to LTS release 17.11.6 Yongseok Koh
                   ` (17 preceding siblings ...)
  2019-03-08 17:46 ` [dpdk-stable] patch 'net: fix underflow for checksum of invalid IPv4 packets' " Yongseok Koh
@ 2019-03-08 17:46 ` Yongseok Koh
  2019-03-08 17:46 ` [dpdk-stable] patch 'net/af_packet: fix setting MTU decrements sockaddr twice' " Yongseok Koh
                   ` (50 subsequent siblings)
  69 siblings, 0 replies; 75+ messages in thread
From: Yongseok Koh @ 2019-03-08 17:46 UTC (permalink / raw)
  To: Bruce Richardson; +Cc: Ferruh Yigit, Keith Wiles, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.6

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objection by 03/13/19. So please
shout if anyone has objection.

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.

Yongseok

---
>From a9adae365dbc5e7526edfde377a3edd31f820f67 Mon Sep 17 00:00:00 2001
From: Bruce Richardson <bruce.richardson@intel.com>
Date: Mon, 17 Dec 2018 15:50:05 +0000
Subject: [PATCH] net/tap: add buffer overflow checks before checksum

[ upstream commit 1168a4fd193c3bf981c4889cba150a7bb4c1d169 ]

The checksum calculation APIs take only the packet headers pointers as
parameters, so they assume that the lengths reported in those headers
are correct. However, a malicious packet could claim to be far larger
than it is, so we need to check the header lengths in the driver before
calling the checksum API.

A better fix would be to allow the lengths to be passed into the API
function, but that would be an API break, so fixing in TAP driver for
now.

Fixes: 8ae3023387e9 ("net/tap: add Rx/Tx checksum offload support")

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Keith Wiles <keith.wiles@intel.com>
---
 drivers/net/tap/rte_eth_tap.c | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/drivers/net/tap/rte_eth_tap.c b/drivers/net/tap/rte_eth_tap.c
index 466624ae6..bd2b4d995 100644
--- a/drivers/net/tap/rte_eth_tap.c
+++ b/drivers/net/tap/rte_eth_tap.c
@@ -255,13 +255,27 @@ tap_verify_csum(struct rte_mbuf *mbuf)
 		l3_len = 4 * (iph->version_ihl & 0xf);
 		if (unlikely(l2_len + l3_len > rte_pktmbuf_data_len(mbuf)))
 			return;
+		/* check that the total length reported by header is not
+		 * greater than the total received size
+		 */
+		if (l2_len + rte_be_to_cpu_16(iph->total_length) >
+				rte_pktmbuf_data_len(mbuf))
+			return;
 
 		cksum = ~rte_raw_cksum(iph, l3_len);
 		mbuf->ol_flags |= cksum ?
 			PKT_RX_IP_CKSUM_BAD :
 			PKT_RX_IP_CKSUM_GOOD;
 	} else if (l3 == RTE_PTYPE_L3_IPV6) {
+		struct ipv6_hdr *iph = l3_hdr;
+
 		l3_len = sizeof(struct ipv6_hdr);
+		/* check that the total length reported by header is not
+		 * greater than the total received size
+		 */
+		if (l2_len + l3_len + rte_be_to_cpu_16(iph->payload_len) >
+				rte_pktmbuf_data_len(mbuf))
+			return;
 	} else {
 		/* IPv6 extensions are not supported */
 		return;
-- 
2.11.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2019-03-08 09:46:41.347685587 -0800
+++ 0020-net-tap-add-buffer-overflow-checks-before-checksum.patch	2019-03-08 09:46:40.055402000 -0800
@@ -1,8 +1,10 @@
-From 1168a4fd193c3bf981c4889cba150a7bb4c1d169 Mon Sep 17 00:00:00 2001
+From a9adae365dbc5e7526edfde377a3edd31f820f67 Mon Sep 17 00:00:00 2001
 From: Bruce Richardson <bruce.richardson@intel.com>
 Date: Mon, 17 Dec 2018 15:50:05 +0000
 Subject: [PATCH] net/tap: add buffer overflow checks before checksum
 
+[ upstream commit 1168a4fd193c3bf981c4889cba150a7bb4c1d169 ]
+
 The checksum calculation APIs take only the packet headers pointers as
 parameters, so they assume that the lengths reported in those headers
 are correct. However, a malicious packet could claim to be far larger
@@ -14,7 +16,6 @@
 now.
 
 Fixes: 8ae3023387e9 ("net/tap: add Rx/Tx checksum offload support")
-Cc: stable@dpdk.org
 
 Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
 Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
@@ -24,10 +25,10 @@
  1 file changed, 14 insertions(+)
 
 diff --git a/drivers/net/tap/rte_eth_tap.c b/drivers/net/tap/rte_eth_tap.c
-index 49afd38dd..0ec030bef 100644
+index 466624ae6..bd2b4d995 100644
 --- a/drivers/net/tap/rte_eth_tap.c
 +++ b/drivers/net/tap/rte_eth_tap.c
-@@ -281,13 +281,27 @@ tap_verify_csum(struct rte_mbuf *mbuf)
+@@ -255,13 +255,27 @@ tap_verify_csum(struct rte_mbuf *mbuf)
  		l3_len = 4 * (iph->version_ihl & 0xf);
  		if (unlikely(l2_len + l3_len > rte_pktmbuf_data_len(mbuf)))
  			return;

^ permalink raw reply	[flat|nested] 75+ messages in thread

* [dpdk-stable] patch 'net/af_packet: fix setting MTU decrements sockaddr twice' has been queued to LTS release 17.11.6
  2019-03-08 17:46 [dpdk-stable] patch 'net/bnx2x: cleanup info logs' has been queued to LTS release 17.11.6 Yongseok Koh
                   ` (18 preceding siblings ...)
  2019-03-08 17:46 ` [dpdk-stable] patch 'net/tap: add buffer overflow checks before checksum' " Yongseok Koh
@ 2019-03-08 17:46 ` Yongseok Koh
  2019-03-08 17:47 ` [dpdk-stable] patch 'net/tap: fix possible uninitialized variable access' " Yongseok Koh
                   ` (49 subsequent siblings)
  69 siblings, 0 replies; 75+ messages in thread
From: Yongseok Koh @ 2019-03-08 17:46 UTC (permalink / raw)
  To: Tiago Lam; +Cc: Ferruh Yigit, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.6

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objection by 03/13/19. So please
shout if anyone has objection.

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.

Yongseok

---
>From b040291b2dc6c0f064bdd73e929535b9cff6bf63 Mon Sep 17 00:00:00 2001
From: Tiago Lam <tiago.lam@intel.com>
Date: Tue, 20 Nov 2018 10:26:29 +0000
Subject: [PATCH] net/af_packet: fix setting MTU decrements sockaddr twice

[ upstream commit 8020573894a8504da3146af1854c8aca762539fd ]

When setting the MTU, eth_dev_mtu_set() is called to validate the
provided MTU. As part of that, it calculates the useful area to store
data and compares it against the MTU, to guarantee that there's enough
space to store the data. It calculates that as:
    "tp_frame_size - TPACKET2_HDRLEN - sizeof(struct sockaddr_ll)"

However, the TPACKET2_HDRLEN macro already increments sizeof(struct
sockaddr_ll) internally, meaning the useuful area of data above will
have sizeof(struct sockaddr_ll) decremented twice.

Instead, the useful area of data should be calculated as:
    "tp_frame_size - TPACKET2_HDRLEN"

This makes sure that there's enough useful area to fit the provided MTU
after excluding tpacket2_hdr and sockaddr_ll.

Fixes: cc68ac4847bc ("net/af_packet: support MTU change")

Signed-off-by: Tiago Lam <tiago.lam@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
 drivers/net/af_packet/rte_eth_af_packet.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/net/af_packet/rte_eth_af_packet.c b/drivers/net/af_packet/rte_eth_af_packet.c
index 5a101cef9..fba857554 100644
--- a/drivers/net/af_packet/rte_eth_af_packet.c
+++ b/drivers/net/af_packet/rte_eth_af_packet.c
@@ -457,8 +457,7 @@ eth_dev_mtu_set(struct rte_eth_dev *dev, uint16_t mtu)
 	int ret;
 	int s;
 	unsigned int data_size = internals->req.tp_frame_size -
-				 TPACKET2_HDRLEN -
-				 sizeof(struct sockaddr_ll);
+				 TPACKET2_HDRLEN;
 
 	if (mtu > data_size)
 		return -EINVAL;
-- 
2.11.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2019-03-08 09:46:41.391923937 -0800
+++ 0021-net-af_packet-fix-setting-MTU-decrements-sockaddr-tw.patch	2019-03-08 09:46:40.065399000 -0800
@@ -1,8 +1,10 @@
-From 8020573894a8504da3146af1854c8aca762539fd Mon Sep 17 00:00:00 2001
+From b040291b2dc6c0f064bdd73e929535b9cff6bf63 Mon Sep 17 00:00:00 2001
 From: Tiago Lam <tiago.lam@intel.com>
 Date: Tue, 20 Nov 2018 10:26:29 +0000
 Subject: [PATCH] net/af_packet: fix setting MTU decrements sockaddr twice
 
+[ upstream commit 8020573894a8504da3146af1854c8aca762539fd ]
+
 When setting the MTU, eth_dev_mtu_set() is called to validate the
 provided MTU. As part of that, it calculates the useful area to store
 data and compares it against the MTU, to guarantee that there's enough
@@ -20,7 +22,6 @@
 after excluding tpacket2_hdr and sockaddr_ll.
 
 Fixes: cc68ac4847bc ("net/af_packet: support MTU change")
-Cc: stable@dpdk.org
 
 Signed-off-by: Tiago Lam <tiago.lam@intel.com>
 Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
@@ -29,10 +30,10 @@
  1 file changed, 1 insertion(+), 2 deletions(-)
 
 diff --git a/drivers/net/af_packet/rte_eth_af_packet.c b/drivers/net/af_packet/rte_eth_af_packet.c
-index 95a98c6b8..264cfc08f 100644
+index 5a101cef9..fba857554 100644
 --- a/drivers/net/af_packet/rte_eth_af_packet.c
 +++ b/drivers/net/af_packet/rte_eth_af_packet.c
-@@ -433,8 +433,7 @@ eth_dev_mtu_set(struct rte_eth_dev *dev, uint16_t mtu)
+@@ -457,8 +457,7 @@ eth_dev_mtu_set(struct rte_eth_dev *dev, uint16_t mtu)
  	int ret;
  	int s;
  	unsigned int data_size = internals->req.tp_frame_size -

^ permalink raw reply	[flat|nested] 75+ messages in thread

* [dpdk-stable] patch 'net/tap: fix possible uninitialized variable access' has been queued to LTS release 17.11.6
  2019-03-08 17:46 [dpdk-stable] patch 'net/bnx2x: cleanup info logs' has been queued to LTS release 17.11.6 Yongseok Koh
                   ` (19 preceding siblings ...)
  2019-03-08 17:46 ` [dpdk-stable] patch 'net/af_packet: fix setting MTU decrements sockaddr twice' " Yongseok Koh
@ 2019-03-08 17:47 ` Yongseok Koh
  2019-03-08 17:47 ` [dpdk-stable] patch 'app/testpmd: expand RED queue thresholds to 64 bits' " Yongseok Koh
                   ` (48 subsequent siblings)
  69 siblings, 0 replies; 75+ messages in thread
From: Yongseok Koh @ 2019-03-08 17:47 UTC (permalink / raw)
  To: Ferruh Yigit; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.6

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objection by 03/13/19. So please
shout if anyone has objection.

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.

Yongseok

---
>From 1e42aba6fb7caba4f7ca16a3217ce8324ada6aab Mon Sep 17 00:00:00 2001
From: Ferruh Yigit <ferruh.yigit@intel.com>
Date: Mon, 5 Nov 2018 15:31:21 +0000
Subject: [PATCH] net/tap: fix possible uninitialized variable access

[ upstream commit 04d3f6bc97066d355291b56ccdb3e9b11e864852 ]

Fixes: 7c25284e30c2 ("net/tap: add netlink back-end for flow API")

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
 drivers/net/tap/tap_tcmsgs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/tap/tap_tcmsgs.c b/drivers/net/tap/tap_tcmsgs.c
index d74ac805b..838986bc3 100644
--- a/drivers/net/tap/tap_tcmsgs.c
+++ b/drivers/net/tap/tap_tcmsgs.c
@@ -143,7 +143,7 @@ error:
 int
 qdisc_add_multiq(int nlsk_fd, uint16_t ifindex)
 {
-	struct tc_multiq_qopt opt;
+	struct tc_multiq_qopt opt = {0};
 	struct nlmsg msg;
 
 	tc_init_msg(&msg, ifindex, RTM_NEWQDISC,
-- 
2.11.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2019-03-08 09:46:41.435638875 -0800
+++ 0022-net-tap-fix-possible-uninitialized-variable-access.patch	2019-03-08 09:46:40.069404000 -0800
@@ -1,10 +1,11 @@
-From 04d3f6bc97066d355291b56ccdb3e9b11e864852 Mon Sep 17 00:00:00 2001
+From 1e42aba6fb7caba4f7ca16a3217ce8324ada6aab Mon Sep 17 00:00:00 2001
 From: Ferruh Yigit <ferruh.yigit@intel.com>
 Date: Mon, 5 Nov 2018 15:31:21 +0000
 Subject: [PATCH] net/tap: fix possible uninitialized variable access
 
+[ upstream commit 04d3f6bc97066d355291b56ccdb3e9b11e864852 ]
+
 Fixes: 7c25284e30c2 ("net/tap: add netlink back-end for flow API")
-Cc: stable@dpdk.org
 
 Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
 ---
@@ -12,10 +13,10 @@
  1 file changed, 1 insertion(+), 1 deletion(-)
 
 diff --git a/drivers/net/tap/tap_tcmsgs.c b/drivers/net/tap/tap_tcmsgs.c
-index 3c9d03667..b478b5951 100644
+index d74ac805b..838986bc3 100644
 --- a/drivers/net/tap/tap_tcmsgs.c
 +++ b/drivers/net/tap/tap_tcmsgs.c
-@@ -116,7 +116,7 @@ error:
+@@ -143,7 +143,7 @@ error:
  int
  qdisc_add_multiq(int nlsk_fd, uint16_t ifindex)
  {

^ permalink raw reply	[flat|nested] 75+ messages in thread

* [dpdk-stable] patch 'app/testpmd: expand RED queue thresholds to 64 bits' has been queued to LTS release 17.11.6
  2019-03-08 17:46 [dpdk-stable] patch 'net/bnx2x: cleanup info logs' has been queued to LTS release 17.11.6 Yongseok Koh
                   ` (20 preceding siblings ...)
  2019-03-08 17:47 ` [dpdk-stable] patch 'net/tap: fix possible uninitialized variable access' " Yongseok Koh
@ 2019-03-08 17:47 ` Yongseok Koh
  2019-03-08 17:47 ` [dpdk-stable] patch 'net/i40e: fix get RSS conf' " Yongseok Koh
                   ` (47 subsequent siblings)
  69 siblings, 0 replies; 75+ messages in thread
From: Yongseok Koh @ 2019-03-08 17:47 UTC (permalink / raw)
  To: Rosen Xu; +Cc: Jasvinder Singh, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.6

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objection by 03/13/19. So please
shout if anyone has objection.

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.

Yongseok

---
>From f3f26d54d7f763419cce3be50198b3c940bf7bbc Mon Sep 17 00:00:00 2001
From: Rosen Xu <rosen.xu@intel.com>
Date: Mon, 26 Nov 2018 16:35:57 +0800
Subject: [PATCH] app/testpmd: expand RED queue thresholds to 64 bits

[ upstream commit cb43e0b3a94c997a225a4c06f336902922b0cd04 ]

There's very commonly that more than 4G DDR memory in NIC for HQoS,
so right now the queue threshold size of RED needs to expand to
uint64_t. For struct rte_tm_red_params, it has been fixed, but for
test-pmd TM configuration, it hasn't been fixed. This patch fixes it.

Fixes: bddc2f40b594 ("app/testpmd: add commands for shaper and wred profiles")

Signed-off-by: Rosen Xu <rosen.xu@intel.com>
Reviewed-by: Jasvinder Singh <jasvinder.singh@intel.com>
---
 app/test-pmd/cmdline_tm.c | 24 ++++++++++++------------
 1 file changed, 12 insertions(+), 12 deletions(-)

diff --git a/app/test-pmd/cmdline_tm.c b/app/test-pmd/cmdline_tm.c
index 4dcddaff3..a022e28eb 100644
--- a/app/test-pmd/cmdline_tm.c
+++ b/app/test-pmd/cmdline_tm.c
@@ -1176,18 +1176,18 @@ struct cmd_add_port_tm_node_wred_profile_result {
 	uint16_t port_id;
 	uint32_t wred_profile_id;
 	cmdline_fixed_string_t color_g;
-	uint16_t min_th_g;
-	uint16_t max_th_g;
+	uint64_t min_th_g;
+	uint64_t max_th_g;
 	uint16_t maxp_inv_g;
 	uint16_t wq_log2_g;
 	cmdline_fixed_string_t color_y;
-	uint16_t min_th_y;
-	uint16_t max_th_y;
+	uint64_t min_th_y;
+	uint64_t max_th_y;
 	uint16_t maxp_inv_y;
 	uint16_t wq_log2_y;
 	cmdline_fixed_string_t color_r;
-	uint16_t min_th_r;
-	uint16_t max_th_r;
+	uint64_t min_th_r;
+	uint64_t max_th_r;
 	uint16_t maxp_inv_r;
 	uint16_t wq_log2_r;
 };
@@ -1226,11 +1226,11 @@ cmdline_parse_token_string_t cmd_add_port_tm_node_wred_profile_color_g =
 cmdline_parse_token_num_t cmd_add_port_tm_node_wred_profile_min_th_g =
 	TOKEN_NUM_INITIALIZER(
 		struct cmd_add_port_tm_node_wred_profile_result,
-			min_th_g, UINT16);
+			min_th_g, UINT64);
 cmdline_parse_token_num_t cmd_add_port_tm_node_wred_profile_max_th_g =
 	TOKEN_NUM_INITIALIZER(
 		struct cmd_add_port_tm_node_wred_profile_result,
-			max_th_g, UINT16);
+			max_th_g, UINT64);
 cmdline_parse_token_num_t cmd_add_port_tm_node_wred_profile_maxp_inv_g =
 	TOKEN_NUM_INITIALIZER(
 		struct cmd_add_port_tm_node_wred_profile_result,
@@ -1246,11 +1246,11 @@ cmdline_parse_token_string_t cmd_add_port_tm_node_wred_profile_color_y =
 cmdline_parse_token_num_t cmd_add_port_tm_node_wred_profile_min_th_y =
 	TOKEN_NUM_INITIALIZER(
 		struct cmd_add_port_tm_node_wred_profile_result,
-			min_th_y, UINT16);
+			min_th_y, UINT64);
 cmdline_parse_token_num_t cmd_add_port_tm_node_wred_profile_max_th_y =
 	TOKEN_NUM_INITIALIZER(
 		struct cmd_add_port_tm_node_wred_profile_result,
-			max_th_y, UINT16);
+			max_th_y, UINT64);
 cmdline_parse_token_num_t cmd_add_port_tm_node_wred_profile_maxp_inv_y =
 	TOKEN_NUM_INITIALIZER(
 		struct cmd_add_port_tm_node_wred_profile_result,
@@ -1266,11 +1266,11 @@ cmdline_parse_token_string_t cmd_add_port_tm_node_wred_profile_color_r =
 cmdline_parse_token_num_t cmd_add_port_tm_node_wred_profile_min_th_r =
 	TOKEN_NUM_INITIALIZER(
 		struct cmd_add_port_tm_node_wred_profile_result,
-			min_th_r, UINT16);
+			min_th_r, UINT64);
 cmdline_parse_token_num_t cmd_add_port_tm_node_wred_profile_max_th_r =
 	TOKEN_NUM_INITIALIZER(
 		struct cmd_add_port_tm_node_wred_profile_result,
-			max_th_r, UINT16);
+			max_th_r, UINT64);
 cmdline_parse_token_num_t cmd_add_port_tm_node_wred_profile_maxp_inv_r =
 	TOKEN_NUM_INITIALIZER(
 		struct cmd_add_port_tm_node_wred_profile_result,
-- 
2.11.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2019-03-08 09:46:41.478708100 -0800
+++ 0023-app-testpmd-expand-RED-queue-thresholds-to-64-bits.patch	2019-03-08 09:46:40.075398000 -0800
@@ -1,15 +1,16 @@
-From cb43e0b3a94c997a225a4c06f336902922b0cd04 Mon Sep 17 00:00:00 2001
+From f3f26d54d7f763419cce3be50198b3c940bf7bbc Mon Sep 17 00:00:00 2001
 From: Rosen Xu <rosen.xu@intel.com>
 Date: Mon, 26 Nov 2018 16:35:57 +0800
 Subject: [PATCH] app/testpmd: expand RED queue thresholds to 64 bits
 
+[ upstream commit cb43e0b3a94c997a225a4c06f336902922b0cd04 ]
+
 There's very commonly that more than 4G DDR memory in NIC for HQoS,
 so right now the queue threshold size of RED needs to expand to
 uint64_t. For struct rte_tm_red_params, it has been fixed, but for
 test-pmd TM configuration, it hasn't been fixed. This patch fixes it.
 
 Fixes: bddc2f40b594 ("app/testpmd: add commands for shaper and wred profiles")
-Cc: stable@dpdk.org
 
 Signed-off-by: Rosen Xu <rosen.xu@intel.com>
 Reviewed-by: Jasvinder Singh <jasvinder.singh@intel.com>
@@ -18,10 +19,10 @@
  1 file changed, 12 insertions(+), 12 deletions(-)
 
 diff --git a/app/test-pmd/cmdline_tm.c b/app/test-pmd/cmdline_tm.c
-index 4c763482a..101208474 100644
+index 4dcddaff3..a022e28eb 100644
 --- a/app/test-pmd/cmdline_tm.c
 +++ b/app/test-pmd/cmdline_tm.c
-@@ -1156,18 +1156,18 @@ struct cmd_add_port_tm_node_wred_profile_result {
+@@ -1176,18 +1176,18 @@ struct cmd_add_port_tm_node_wred_profile_result {
  	uint16_t port_id;
  	uint32_t wred_profile_id;
  	cmdline_fixed_string_t color_g;
@@ -46,7 +47,7 @@
  	uint16_t maxp_inv_r;
  	uint16_t wq_log2_r;
  };
-@@ -1206,11 +1206,11 @@ cmdline_parse_token_string_t cmd_add_port_tm_node_wred_profile_color_g =
+@@ -1226,11 +1226,11 @@ cmdline_parse_token_string_t cmd_add_port_tm_node_wred_profile_color_g =
  cmdline_parse_token_num_t cmd_add_port_tm_node_wred_profile_min_th_g =
  	TOKEN_NUM_INITIALIZER(
  		struct cmd_add_port_tm_node_wred_profile_result,
@@ -60,7 +61,7 @@
  cmdline_parse_token_num_t cmd_add_port_tm_node_wred_profile_maxp_inv_g =
  	TOKEN_NUM_INITIALIZER(
  		struct cmd_add_port_tm_node_wred_profile_result,
-@@ -1226,11 +1226,11 @@ cmdline_parse_token_string_t cmd_add_port_tm_node_wred_profile_color_y =
+@@ -1246,11 +1246,11 @@ cmdline_parse_token_string_t cmd_add_port_tm_node_wred_profile_color_y =
  cmdline_parse_token_num_t cmd_add_port_tm_node_wred_profile_min_th_y =
  	TOKEN_NUM_INITIALIZER(
  		struct cmd_add_port_tm_node_wred_profile_result,
@@ -74,7 +75,7 @@
  cmdline_parse_token_num_t cmd_add_port_tm_node_wred_profile_maxp_inv_y =
  	TOKEN_NUM_INITIALIZER(
  		struct cmd_add_port_tm_node_wred_profile_result,
-@@ -1246,11 +1246,11 @@ cmdline_parse_token_string_t cmd_add_port_tm_node_wred_profile_color_r =
+@@ -1266,11 +1266,11 @@ cmdline_parse_token_string_t cmd_add_port_tm_node_wred_profile_color_r =
  cmdline_parse_token_num_t cmd_add_port_tm_node_wred_profile_min_th_r =
  	TOKEN_NUM_INITIALIZER(
  		struct cmd_add_port_tm_node_wred_profile_result,

^ permalink raw reply	[flat|nested] 75+ messages in thread

* [dpdk-stable] patch 'net/i40e: fix get RSS conf' has been queued to LTS release 17.11.6
  2019-03-08 17:46 [dpdk-stable] patch 'net/bnx2x: cleanup info logs' has been queued to LTS release 17.11.6 Yongseok Koh
                   ` (21 preceding siblings ...)
  2019-03-08 17:47 ` [dpdk-stable] patch 'app/testpmd: expand RED queue thresholds to 64 bits' " Yongseok Koh
@ 2019-03-08 17:47 ` Yongseok Koh
  2019-03-08 17:47 ` [dpdk-stable] patch 'devtools: fix wrong headline lowercase for arm' " Yongseok Koh
                   ` (46 subsequent siblings)
  69 siblings, 0 replies; 75+ messages in thread
From: Yongseok Koh @ 2019-03-08 17:47 UTC (permalink / raw)
  To: Qiming Yang; +Cc: Qi Zhang, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.6

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objection by 03/13/19. So please
shout if anyone has objection.

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.

Yongseok

---
>From c33f5a216f01985f4846c48a4fef8c1793d08012 Mon Sep 17 00:00:00 2001
From: Qiming Yang <qiming.yang@intel.com>
Date: Mon, 24 Dec 2018 23:34:02 +0800
Subject: [PATCH] net/i40e: fix get RSS conf

[ upstream commit 286a809c99c033f895c6b08c2af4b741f17ae29b ]

rte_eth_dev_rss_hash_conf_get API doesn't force 'rss_conf.rss_key'
to be not NULL, so rss_key = NULL should be alllowed in i40e
driver.

Fixes: 16321de09396 ("ethdev: allow to get RSS hash functions and key")

Signed-off-by: Qiming Yang <qiming.yang@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@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 06c955858..60b63e027 100644
--- a/drivers/net/i40e/i40e_ethdev.c
+++ b/drivers/net/i40e/i40e_ethdev.c
@@ -7041,7 +7041,7 @@ i40e_get_rss_key(struct i40e_vsi *vsi, uint8_t *key, uint8_t *key_len)
 	int ret;
 
 	if (!key || !key_len)
-		return -EINVAL;
+		return 0;
 
 	if (pf->flags & I40E_FLAG_RSS_AQ_CAPABLE) {
 		ret = i40e_aq_get_rss_key(hw, vsi->vsi_id,
@@ -7115,6 +7115,9 @@ i40e_dev_rss_hash_conf_get(struct rte_eth_dev *dev,
 	uint64_t hena;
 	int ret;
 
+	if (!rss_conf)
+		return -EINVAL;
+
 	ret = i40e_get_rss_key(pf->main_vsi, rss_conf->rss_key,
 			 &rss_conf->rss_key_len);
 	if (ret)
-- 
2.11.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2019-03-08 09:46:41.521779870 -0800
+++ 0024-net-i40e-fix-get-RSS-conf.patch	2019-03-08 09:46:40.089399000 -0800
@@ -1,14 +1,15 @@
-From 286a809c99c033f895c6b08c2af4b741f17ae29b Mon Sep 17 00:00:00 2001
+From c33f5a216f01985f4846c48a4fef8c1793d08012 Mon Sep 17 00:00:00 2001
 From: Qiming Yang <qiming.yang@intel.com>
 Date: Mon, 24 Dec 2018 23:34:02 +0800
 Subject: [PATCH] net/i40e: fix get RSS conf
 
+[ upstream commit 286a809c99c033f895c6b08c2af4b741f17ae29b ]
+
 rte_eth_dev_rss_hash_conf_get API doesn't force 'rss_conf.rss_key'
 to be not NULL, so rss_key = NULL should be alllowed in i40e
 driver.
 
 Fixes: 16321de09396 ("ethdev: allow to get RSS hash functions and key")
-Cc: stable@dpdk.org
 
 Signed-off-by: Qiming Yang <qiming.yang@intel.com>
 Acked-by: Qi Zhang <qi.z.zhang@intel.com>
@@ -17,10 +18,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 8dc1a4af8..a6b97e164 100644
+index 06c955858..60b63e027 100644
 --- a/drivers/net/i40e/i40e_ethdev.c
 +++ b/drivers/net/i40e/i40e_ethdev.c
-@@ -7407,7 +7407,7 @@ i40e_get_rss_key(struct i40e_vsi *vsi, uint8_t *key, uint8_t *key_len)
+@@ -7041,7 +7041,7 @@ i40e_get_rss_key(struct i40e_vsi *vsi, uint8_t *key, uint8_t *key_len)
  	int ret;
  
  	if (!key || !key_len)
@@ -29,7 +30,7 @@
  
  	if (pf->flags & I40E_FLAG_RSS_AQ_CAPABLE) {
  		ret = i40e_aq_get_rss_key(hw, vsi->vsi_id,
-@@ -7492,6 +7492,9 @@ i40e_dev_rss_hash_conf_get(struct rte_eth_dev *dev,
+@@ -7115,6 +7115,9 @@ i40e_dev_rss_hash_conf_get(struct rte_eth_dev *dev,
  	uint64_t hena;
  	int ret;
  

^ permalink raw reply	[flat|nested] 75+ messages in thread

* [dpdk-stable] patch 'devtools: fix wrong headline lowercase for arm' has been queued to LTS release 17.11.6
  2019-03-08 17:46 [dpdk-stable] patch 'net/bnx2x: cleanup info logs' has been queued to LTS release 17.11.6 Yongseok Koh
                   ` (22 preceding siblings ...)
  2019-03-08 17:47 ` [dpdk-stable] patch 'net/i40e: fix get RSS conf' " Yongseok Koh
@ 2019-03-08 17:47 ` Yongseok Koh
  2019-03-08 17:47 ` [dpdk-stable] patch 'drivers/crypto: fix PMDs memory leak' " Yongseok Koh
                   ` (45 subsequent siblings)
  69 siblings, 0 replies; 75+ messages in thread
From: Yongseok Koh @ 2019-03-08 17:47 UTC (permalink / raw)
  To: Gavin Hu; +Cc: Jerin Jacob, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.6

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objection by 03/13/19. So please
shout if anyone has objection.

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.

Yongseok

---
>From 4aceb2ab26722b2cb7f28cc7e6747352b20eb375 Mon Sep 17 00:00:00 2001
From: Gavin Hu <gavin.hu@arm.com>
Date: Fri, 21 Dec 2018 14:02:56 +0800
Subject: [PATCH] devtools: fix wrong headline lowercase for arm

[ upstream commit 40fd87486799d50c78e24ff90337ca1dc1debc13 ]

Change to the new wording according to Arm corp:
https://mails.dpdk.org/archives/dev/2018-October/115174.html
otherwise, "Wrong headline lowercase" may be falsely reported.

Fixes: f146ada21d1e ("scripts: add more git log checks")

Signed-off-by: Gavin Hu <gavin.hu@arm.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
---
 devtools/check-git-log.sh | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/devtools/check-git-log.sh b/devtools/check-git-log.sh
index 9014c8241..ee2871743 100755
--- a/devtools/check-git-log.sh
+++ b/devtools/check-git-log.sh
@@ -118,9 +118,10 @@ bad=$(echo "$headlines" | grep -E --color=always \
 	-e ':.*\<[hsf]w\>' \
 	-e ':.*\<l[234]\>' \
 	-e ':.*\<api\>' \
-	-e ':.*\<arm\>' \
-	-e ':.*\<armv7\>' \
-	-e ':.*\<armv8\>' \
+	-e ':.*\<ARM\>' \
+	-e ':.*\<(Aarch64|AArch64|AARCH64|Aarch32|AArch32|AARCH32)\>' \
+	-e ':.*\<(Armv7|ARMv7|ArmV7|armV7|ARMV7)\>' \
+	-e ':.*\<(Armv8|ARMv8|ArmV8|armV8|ARMV8)\>' \
 	-e ':.*\<crc\>' \
 	-e ':.*\<dma\>' \
 	-e ':.*\<freebsd\>' \
-- 
2.11.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2019-03-08 09:46:41.576707197 -0800
+++ 0025-devtools-fix-wrong-headline-lowercase-for-arm.patch	2019-03-08 09:46:40.092403000 -0800
@@ -1,14 +1,15 @@
-From 40fd87486799d50c78e24ff90337ca1dc1debc13 Mon Sep 17 00:00:00 2001
+From 4aceb2ab26722b2cb7f28cc7e6747352b20eb375 Mon Sep 17 00:00:00 2001
 From: Gavin Hu <gavin.hu@arm.com>
 Date: Fri, 21 Dec 2018 14:02:56 +0800
 Subject: [PATCH] devtools: fix wrong headline lowercase for arm
 
+[ upstream commit 40fd87486799d50c78e24ff90337ca1dc1debc13 ]
+
 Change to the new wording according to Arm corp:
 https://mails.dpdk.org/archives/dev/2018-October/115174.html
 otherwise, "Wrong headline lowercase" may be falsely reported.
 
 Fixes: f146ada21d1e ("scripts: add more git log checks")
-Cc: stable@dpdk.org
 
 Signed-off-by: Gavin Hu <gavin.hu@arm.com>
 Acked-by: Jerin Jacob <jerinj@marvell.com>
@@ -17,10 +18,10 @@
  1 file changed, 4 insertions(+), 3 deletions(-)
 
 diff --git a/devtools/check-git-log.sh b/devtools/check-git-log.sh
-index 85d67fb9a..d39064f9d 100755
+index 9014c8241..ee2871743 100755
 --- a/devtools/check-git-log.sh
 +++ b/devtools/check-git-log.sh
-@@ -90,9 +90,10 @@ bad=$(echo "$headlines" | grep -E --color=always \
+@@ -118,9 +118,10 @@ bad=$(echo "$headlines" | grep -E --color=always \
  	-e ':.*\<[hsf]w\>' \
  	-e ':.*\<l[234]\>' \
  	-e ':.*\<api\>' \
@@ -33,7 +34,7 @@
 +	-e ':.*\<(Armv8|ARMv8|ArmV8|armV8|ARMV8)\>' \
  	-e ':.*\<crc\>' \
  	-e ':.*\<dma\>' \
- 	-e ':.*\<eeprom\>' \
+ 	-e ':.*\<freebsd\>' \
 -- 
 2.11.0
 

^ permalink raw reply	[flat|nested] 75+ messages in thread

* [dpdk-stable] patch 'drivers/crypto: fix PMDs memory leak' has been queued to LTS release 17.11.6
  2019-03-08 17:46 [dpdk-stable] patch 'net/bnx2x: cleanup info logs' has been queued to LTS release 17.11.6 Yongseok Koh
                   ` (23 preceding siblings ...)
  2019-03-08 17:47 ` [dpdk-stable] patch 'devtools: fix wrong headline lowercase for arm' " Yongseok Koh
@ 2019-03-08 17:47 ` Yongseok Koh
  2019-03-08 17:47 ` [dpdk-stable] patch 'test/crypto: fix misleading trace message' " Yongseok Koh
                   ` (44 subsequent siblings)
  69 siblings, 0 replies; 75+ messages in thread
From: Yongseok Koh @ 2019-03-08 17:47 UTC (permalink / raw)
  To: Fan Zhang; +Cc: Pablo de Lara, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.6

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objection by 03/13/19. So please
shout if anyone has objection.

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.

Yongseok

---
>From 937d03e131d953eb18df3e7433eee60e8d229d72 Mon Sep 17 00:00:00 2001
From: Fan Zhang <roy.fan.zhang@intel.com>
Date: Fri, 21 Dec 2018 14:11:05 +0000
Subject: [PATCH] drivers/crypto: fix PMDs memory leak

[ upstream commit a4d69a5150e3597df170f595784b4f0472cd98c4 ]

This patch fixes the memory leak during queue pair release.
Originally the operation ring is not freed when releasing
queue pair, causing the next queue_pair configure call fail
and memory leak.

Fixes: eec136f3c54f ("aesni_gcm: add driver for AES-GCM crypto operations")
Fixes: cf7685d68f00 ("crypto/zuc: add driver for ZUC library")
Fixes: d61f70b4c918 ("crypto/libcrypto: add driver for OpenSSL library")
Fixes: 3aafc423cf4d ("snow3g: add driver for SNOW 3G library")
Fixes: 94b0ad8e0aa5 ("null_crypto: add driver for null crypto operations")

Signed-off-by: Fan Zhang <roy.fan.zhang@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
---
 drivers/crypto/aesni_gcm/aesni_gcm_pmd_ops.c | 5 +++++
 drivers/crypto/null/null_crypto_pmd_ops.c    | 5 +++++
 drivers/crypto/openssl/rte_openssl_pmd_ops.c | 5 +++++
 drivers/crypto/snow3g/rte_snow3g_pmd_ops.c   | 5 +++++
 drivers/crypto/zuc/rte_zuc_pmd_ops.c         | 5 +++++
 5 files changed, 25 insertions(+)

diff --git a/drivers/crypto/aesni_gcm/aesni_gcm_pmd_ops.c b/drivers/crypto/aesni_gcm/aesni_gcm_pmd_ops.c
index 0f315f008..3a0e23e43 100644
--- a/drivers/crypto/aesni_gcm/aesni_gcm_pmd_ops.c
+++ b/drivers/crypto/aesni_gcm/aesni_gcm_pmd_ops.c
@@ -180,6 +180,11 @@ static int
 aesni_gcm_pmd_qp_release(struct rte_cryptodev *dev, uint16_t qp_id)
 {
 	if (dev->data->queue_pairs[qp_id] != NULL) {
+		struct aesni_gcm_qp *qp = dev->data->queue_pairs[qp_id];
+
+		if (qp->processed_pkts)
+			rte_ring_free(qp->processed_pkts);
+
 		rte_free(dev->data->queue_pairs[qp_id]);
 		dev->data->queue_pairs[qp_id] = NULL;
 	}
diff --git a/drivers/crypto/null/null_crypto_pmd_ops.c b/drivers/crypto/null/null_crypto_pmd_ops.c
index c427050a6..694c4d892 100644
--- a/drivers/crypto/null/null_crypto_pmd_ops.c
+++ b/drivers/crypto/null/null_crypto_pmd_ops.c
@@ -160,6 +160,11 @@ static int
 null_crypto_pmd_qp_release(struct rte_cryptodev *dev, uint16_t qp_id)
 {
 	if (dev->data->queue_pairs[qp_id] != NULL) {
+		struct null_crypto_qp *qp = dev->data->queue_pairs[qp_id];
+
+		if (qp->processed_pkts)
+			rte_ring_free(qp->processed_pkts);
+
 		rte_free(dev->data->queue_pairs[qp_id]);
 		dev->data->queue_pairs[qp_id] = NULL;
 	}
diff --git a/drivers/crypto/openssl/rte_openssl_pmd_ops.c b/drivers/crypto/openssl/rte_openssl_pmd_ops.c
index c57223991..b050730ed 100644
--- a/drivers/crypto/openssl/rte_openssl_pmd_ops.c
+++ b/drivers/crypto/openssl/rte_openssl_pmd_ops.c
@@ -584,6 +584,11 @@ static int
 openssl_pmd_qp_release(struct rte_cryptodev *dev, uint16_t qp_id)
 {
 	if (dev->data->queue_pairs[qp_id] != NULL) {
+		struct openssl_qp *qp = dev->data->queue_pairs[qp_id];
+
+		if (qp->processed_ops)
+			rte_ring_free(qp->processed_ops);
+
 		rte_free(dev->data->queue_pairs[qp_id]);
 		dev->data->queue_pairs[qp_id] = NULL;
 	}
diff --git a/drivers/crypto/snow3g/rte_snow3g_pmd_ops.c b/drivers/crypto/snow3g/rte_snow3g_pmd_ops.c
index 157a2de36..d96a48cb8 100644
--- a/drivers/crypto/snow3g/rte_snow3g_pmd_ops.c
+++ b/drivers/crypto/snow3g/rte_snow3g_pmd_ops.c
@@ -169,6 +169,11 @@ static int
 snow3g_pmd_qp_release(struct rte_cryptodev *dev, uint16_t qp_id)
 {
 	if (dev->data->queue_pairs[qp_id] != NULL) {
+		struct snow3g_qp *qp = dev->data->queue_pairs[qp_id];
+
+		if (qp->processed_ops)
+			rte_ring_free(qp->processed_ops);
+
 		rte_free(dev->data->queue_pairs[qp_id]);
 		dev->data->queue_pairs[qp_id] = NULL;
 	}
diff --git a/drivers/crypto/zuc/rte_zuc_pmd_ops.c b/drivers/crypto/zuc/rte_zuc_pmd_ops.c
index 243c0991d..8bfab3b87 100644
--- a/drivers/crypto/zuc/rte_zuc_pmd_ops.c
+++ b/drivers/crypto/zuc/rte_zuc_pmd_ops.c
@@ -169,6 +169,11 @@ static int
 zuc_pmd_qp_release(struct rte_cryptodev *dev, uint16_t qp_id)
 {
 	if (dev->data->queue_pairs[qp_id] != NULL) {
+		struct zuc_qp *qp = dev->data->queue_pairs[qp_id];
+
+		if (qp->processed_ops)
+			rte_ring_free(qp->processed_ops);
+
 		rte_free(dev->data->queue_pairs[qp_id]);
 		dev->data->queue_pairs[qp_id] = NULL;
 	}
-- 
2.11.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2019-03-08 09:46:41.622667140 -0800
+++ 0026-drivers-crypto-fix-PMDs-memory-leak.patch	2019-03-08 09:46:40.102403000 -0800
@@ -1,8 +1,10 @@
-From a4d69a5150e3597df170f595784b4f0472cd98c4 Mon Sep 17 00:00:00 2001
+From 937d03e131d953eb18df3e7433eee60e8d229d72 Mon Sep 17 00:00:00 2001
 From: Fan Zhang <roy.fan.zhang@intel.com>
 Date: Fri, 21 Dec 2018 14:11:05 +0000
 Subject: [PATCH] drivers/crypto: fix PMDs memory leak
 
+[ upstream commit a4d69a5150e3597df170f595784b4f0472cd98c4 ]
+
 This patch fixes the memory leak during queue pair release.
 Originally the operation ring is not freed when releasing
 queue pair, causing the next queue_pair configure call fail
@@ -13,7 +15,6 @@
 Fixes: d61f70b4c918 ("crypto/libcrypto: add driver for OpenSSL library")
 Fixes: 3aafc423cf4d ("snow3g: add driver for SNOW 3G library")
 Fixes: 94b0ad8e0aa5 ("null_crypto: add driver for null crypto operations")
-Cc: stable@dpdk.org
 
 Signed-off-by: Fan Zhang <roy.fan.zhang@intel.com>
 Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
@@ -26,10 +27,10 @@
  5 files changed, 25 insertions(+)
 
 diff --git a/drivers/crypto/aesni_gcm/aesni_gcm_pmd_ops.c b/drivers/crypto/aesni_gcm/aesni_gcm_pmd_ops.c
-index c343a393f..cd15245bd 100644
+index 0f315f008..3a0e23e43 100644
 --- a/drivers/crypto/aesni_gcm/aesni_gcm_pmd_ops.c
 +++ b/drivers/crypto/aesni_gcm/aesni_gcm_pmd_ops.c
-@@ -153,6 +153,11 @@ static int
+@@ -180,6 +180,11 @@ static int
  aesni_gcm_pmd_qp_release(struct rte_cryptodev *dev, uint16_t qp_id)
  {
  	if (dev->data->queue_pairs[qp_id] != NULL) {
@@ -42,10 +43,10 @@
  		dev->data->queue_pairs[qp_id] = NULL;
  	}
 diff --git a/drivers/crypto/null/null_crypto_pmd_ops.c b/drivers/crypto/null/null_crypto_pmd_ops.c
-index 2bdcd019e..319ca34e7 100644
+index c427050a6..694c4d892 100644
 --- a/drivers/crypto/null/null_crypto_pmd_ops.c
 +++ b/drivers/crypto/null/null_crypto_pmd_ops.c
-@@ -133,6 +133,11 @@ static int
+@@ -160,6 +160,11 @@ static int
  null_crypto_pmd_qp_release(struct rte_cryptodev *dev, uint16_t qp_id)
  {
  	if (dev->data->queue_pairs[qp_id] != NULL) {
@@ -58,10 +59,10 @@
  		dev->data->queue_pairs[qp_id] = NULL;
  	}
 diff --git a/drivers/crypto/openssl/rte_openssl_pmd_ops.c b/drivers/crypto/openssl/rte_openssl_pmd_ops.c
-index bdaf937a3..d382476a6 100644
+index c57223991..b050730ed 100644
 --- a/drivers/crypto/openssl/rte_openssl_pmd_ops.c
 +++ b/drivers/crypto/openssl/rte_openssl_pmd_ops.c
-@@ -657,6 +657,11 @@ static int
+@@ -584,6 +584,11 @@ static int
  openssl_pmd_qp_release(struct rte_cryptodev *dev, uint16_t qp_id)
  {
  	if (dev->data->queue_pairs[qp_id] != NULL) {
@@ -74,10 +75,10 @@
  		dev->data->queue_pairs[qp_id] = NULL;
  	}
 diff --git a/drivers/crypto/snow3g/rte_snow3g_pmd_ops.c b/drivers/crypto/snow3g/rte_snow3g_pmd_ops.c
-index cfbc9522a..a367ee9a0 100644
+index 157a2de36..d96a48cb8 100644
 --- a/drivers/crypto/snow3g/rte_snow3g_pmd_ops.c
 +++ b/drivers/crypto/snow3g/rte_snow3g_pmd_ops.c
-@@ -142,6 +142,11 @@ static int
+@@ -169,6 +169,11 @@ static int
  snow3g_pmd_qp_release(struct rte_cryptodev *dev, uint16_t qp_id)
  {
  	if (dev->data->queue_pairs[qp_id] != NULL) {
@@ -90,10 +91,10 @@
  		dev->data->queue_pairs[qp_id] = NULL;
  	}
 diff --git a/drivers/crypto/zuc/rte_zuc_pmd_ops.c b/drivers/crypto/zuc/rte_zuc_pmd_ops.c
-index 6da396542..04d45e449 100644
+index 243c0991d..8bfab3b87 100644
 --- a/drivers/crypto/zuc/rte_zuc_pmd_ops.c
 +++ b/drivers/crypto/zuc/rte_zuc_pmd_ops.c
-@@ -142,6 +142,11 @@ static int
+@@ -169,6 +169,11 @@ static int
  zuc_pmd_qp_release(struct rte_cryptodev *dev, uint16_t qp_id)
  {
  	if (dev->data->queue_pairs[qp_id] != NULL) {

^ permalink raw reply	[flat|nested] 75+ messages in thread

* [dpdk-stable] patch 'test/crypto: fix misleading trace message' has been queued to LTS release 17.11.6
  2019-03-08 17:46 [dpdk-stable] patch 'net/bnx2x: cleanup info logs' has been queued to LTS release 17.11.6 Yongseok Koh
                   ` (24 preceding siblings ...)
  2019-03-08 17:47 ` [dpdk-stable] patch 'drivers/crypto: fix PMDs memory leak' " Yongseok Koh
@ 2019-03-08 17:47 ` Yongseok Koh
  2019-03-08 17:47 ` [dpdk-stable] patch 'examples/ipsec-secgw: fix outbound codepath for single SA' " Yongseok Koh
                   ` (43 subsequent siblings)
  69 siblings, 0 replies; 75+ messages in thread
From: Yongseok Koh @ 2019-03-08 17:47 UTC (permalink / raw)
  To: Fiona Trahe; +Cc: Pablo de Lara, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.6

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objection by 03/13/19. So please
shout if anyone has objection.

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.

Yongseok

---
>From 1576909015809048ae08b8723d4ca9d507430d52 Mon Sep 17 00:00:00 2001
From: Fiona Trahe <fiona.trahe@intel.com>
Date: Fri, 21 Dec 2018 00:01:25 +0000
Subject: [PATCH] test/crypto: fix misleading trace message

[ upstream commit 1113ba1dcb7e78a8a839c294523e1939d14aae98 ]

Test was reporting digest verification failed for all operation errors.
Fixed so it only reports this if the PMD actually reports an auth failure.

Fixes: 9c0eed2f06ae ("app/test: rework crypto AES unit test")

Signed-off-by: Fiona Trahe <fiona.trahe@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
---
 test/test/test_cryptodev_blockcipher.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/test/test/test_cryptodev_blockcipher.c b/test/test/test_cryptodev_blockcipher.c
index 20f3296d2..945636b68 100644
--- a/test/test/test_cryptodev_blockcipher.c
+++ b/test/test/test_cryptodev_blockcipher.c
@@ -403,13 +403,14 @@ test_blockcipher_one_case(const struct blockcipher_test_case *t,
 
 	/* Verify results */
 	if (op->status != RTE_CRYPTO_OP_STATUS_SUCCESS) {
-		if (t->op_mask & BLOCKCIPHER_TEST_OP_AUTH_VERIFY)
+		if ((t->op_mask & BLOCKCIPHER_TEST_OP_AUTH_VERIFY) &&
+			(op->status == RTE_CRYPTO_OP_STATUS_AUTH_FAILED))
 			snprintf(test_msg, BLOCKCIPHER_TEST_MSG_LEN, "line %u "
 				"FAILED: Digest verification failed "
 				"(0x%X)", __LINE__, op->status);
 		else
 			snprintf(test_msg, BLOCKCIPHER_TEST_MSG_LEN, "line %u "
-				"FAILED: Digest verification failed "
+				"FAILED: Operation failed "
 				"(0x%X)", __LINE__, op->status);
 		status = TEST_FAILED;
 		goto error_exit;
-- 
2.11.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2019-03-08 09:46:41.669081427 -0800
+++ 0027-test-crypto-fix-misleading-trace-message.patch	2019-03-08 09:46:40.106403000 -0800
@@ -1,13 +1,14 @@
-From 1113ba1dcb7e78a8a839c294523e1939d14aae98 Mon Sep 17 00:00:00 2001
+From 1576909015809048ae08b8723d4ca9d507430d52 Mon Sep 17 00:00:00 2001
 From: Fiona Trahe <fiona.trahe@intel.com>
 Date: Fri, 21 Dec 2018 00:01:25 +0000
 Subject: [PATCH] test/crypto: fix misleading trace message
 
+[ upstream commit 1113ba1dcb7e78a8a839c294523e1939d14aae98 ]
+
 Test was reporting digest verification failed for all operation errors.
 Fixed so it only reports this if the PMD actually reports an auth failure.
 
 Fixes: 9c0eed2f06ae ("app/test: rework crypto AES unit test")
-Cc: stable@dpdk.org
 
 Signed-off-by: Fiona Trahe <fiona.trahe@intel.com>
 Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
@@ -16,10 +17,10 @@
  1 file changed, 3 insertions(+), 2 deletions(-)
 
 diff --git a/test/test/test_cryptodev_blockcipher.c b/test/test/test_cryptodev_blockcipher.c
-index 1c3f29f6b..4f1298ea2 100644
+index 20f3296d2..945636b68 100644
 --- a/test/test/test_cryptodev_blockcipher.c
 +++ b/test/test/test_cryptodev_blockcipher.c
-@@ -401,13 +401,14 @@ test_blockcipher_one_case(const struct blockcipher_test_case *t,
+@@ -403,13 +403,14 @@ test_blockcipher_one_case(const struct blockcipher_test_case *t,
  
  	/* Verify results */
  	if (op->status != RTE_CRYPTO_OP_STATUS_SUCCESS) {

^ permalink raw reply	[flat|nested] 75+ messages in thread

* [dpdk-stable] patch 'examples/ipsec-secgw: fix outbound codepath for single SA' has been queued to LTS release 17.11.6
  2019-03-08 17:46 [dpdk-stable] patch 'net/bnx2x: cleanup info logs' has been queued to LTS release 17.11.6 Yongseok Koh
                   ` (25 preceding siblings ...)
  2019-03-08 17:47 ` [dpdk-stable] patch 'test/crypto: fix misleading trace message' " Yongseok Koh
@ 2019-03-08 17:47 ` Yongseok Koh
  2019-03-08 17:47 ` [dpdk-stable] patch 'examples/ipsec-secgw: make local variables static' " Yongseok Koh
                   ` (42 subsequent siblings)
  69 siblings, 0 replies; 75+ messages in thread
From: Yongseok Koh @ 2019-03-08 17:47 UTC (permalink / raw)
  To: Konstantin Ananyev; +Cc: Radu Nicolau, Akhil Goyal, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.6

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objection by 03/13/19. So please
shout if anyone has objection.

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.

Yongseok

---
>From f253fbcab7690dd6aa8df5e9e4d0ba24cc5e98d9 Mon Sep 17 00:00:00 2001
From: Konstantin Ananyev <konstantin.ananyev@intel.com>
Date: Thu, 10 Jan 2019 21:09:07 +0000
Subject: [PATCH] examples/ipsec-secgw: fix outbound codepath for single SA

[ upstream commit aed6eb10edd12237645d3af7fe116287aefcd7e8 ]

Looking at process_pkts_outbound_nosp() there seems few issues:
- accessing mbuf after it was freed
- invoking ipsec_outbound() for ipv4 packets only
- copying number of packets, but not the mbuf pointers itself

that patch provides fixes for that issues.

Fixes: 906257e965b7 ("examples/ipsec-secgw: support IPv6")

Signed-off-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Acked-by: Radu Nicolau <radu.nicolau@intel.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
---
 examples/ipsec-secgw/ipsec-secgw.c | 33 +++++++++++++++++++++++----------
 1 file changed, 23 insertions(+), 10 deletions(-)

diff --git a/examples/ipsec-secgw/ipsec-secgw.c b/examples/ipsec-secgw/ipsec-secgw.c
index 46af3f05f..f98d529f5 100644
--- a/examples/ipsec-secgw/ipsec-secgw.c
+++ b/examples/ipsec-secgw/ipsec-secgw.c
@@ -561,32 +561,45 @@ process_pkts_outbound_nosp(struct ipsec_ctx *ipsec_ctx,
 		struct ipsec_traffic *traffic)
 {
 	struct rte_mbuf *m;
-	uint32_t nb_pkts_out, i;
+	uint32_t nb_pkts_out, i, n;
 	struct ip *ip;
 
 	/* Drop any IPsec traffic from protected ports */
 	for (i = 0; i < traffic->ipsec.num; i++)
 		rte_pktmbuf_free(traffic->ipsec.pkts[i]);
 
-	traffic->ipsec.num = 0;
+	n = 0;
 
-	for (i = 0; i < traffic->ip4.num; i++)
-		traffic->ip4.res[i] = single_sa_idx;
+	for (i = 0; i < traffic->ip4.num; i++) {
+		traffic->ipsec.pkts[n] = traffic->ip4.pkts[i];
+		traffic->ipsec.res[n++] = single_sa_idx;
+	}
 
-	for (i = 0; i < traffic->ip6.num; i++)
-		traffic->ip6.res[i] = single_sa_idx;
+	for (i = 0; i < traffic->ip6.num; i++) {
+		traffic->ipsec.pkts[n] = traffic->ip6.pkts[i];
+		traffic->ipsec.res[n++] = single_sa_idx;
+	}
+
+	traffic->ip4.num = 0;
+	traffic->ip6.num = 0;
+	traffic->ipsec.num = n;
 
-	nb_pkts_out = ipsec_outbound(ipsec_ctx, traffic->ip4.pkts,
-			traffic->ip4.res, traffic->ip4.num,
+	nb_pkts_out = ipsec_outbound(ipsec_ctx, traffic->ipsec.pkts,
+			traffic->ipsec.res, traffic->ipsec.num,
 			MAX_PKT_BURST);
 
 	/* They all sue the same SA (ip4 or ip6 tunnel) */
 	m = traffic->ipsec.pkts[i];
 	ip = rte_pktmbuf_mtod(m, struct ip *);
-	if (ip->ip_v == IPVERSION)
+	if (ip->ip_v == IPVERSION) {
 		traffic->ip4.num = nb_pkts_out;
-	else
+		for (i = 0; i < nb_pkts_out; i++)
+			traffic->ip4.pkts[i] = traffic->ipsec.pkts[i];
+	} else {
 		traffic->ip6.num = nb_pkts_out;
+		for (i = 0; i < nb_pkts_out; i++)
+			traffic->ip6.pkts[i] = traffic->ipsec.pkts[i];
+	}
 }
 
 static inline int32_t
-- 
2.11.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2019-03-08 09:46:41.712227754 -0800
+++ 0028-examples-ipsec-secgw-fix-outbound-codepath-for-singl.patch	2019-03-08 09:46:40.110403000 -0800
@@ -1,8 +1,10 @@
-From aed6eb10edd12237645d3af7fe116287aefcd7e8 Mon Sep 17 00:00:00 2001
+From f253fbcab7690dd6aa8df5e9e4d0ba24cc5e98d9 Mon Sep 17 00:00:00 2001
 From: Konstantin Ananyev <konstantin.ananyev@intel.com>
 Date: Thu, 10 Jan 2019 21:09:07 +0000
 Subject: [PATCH] examples/ipsec-secgw: fix outbound codepath for single SA
 
+[ upstream commit aed6eb10edd12237645d3af7fe116287aefcd7e8 ]
+
 Looking at process_pkts_outbound_nosp() there seems few issues:
 - accessing mbuf after it was freed
 - invoking ipsec_outbound() for ipv4 packets only
@@ -11,7 +13,6 @@
 that patch provides fixes for that issues.
 
 Fixes: 906257e965b7 ("examples/ipsec-secgw: support IPv6")
-Cc: stable@dpdk.org
 
 Signed-off-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
 Acked-by: Radu Nicolau <radu.nicolau@intel.com>
@@ -21,10 +22,10 @@
  1 file changed, 23 insertions(+), 10 deletions(-)
 
 diff --git a/examples/ipsec-secgw/ipsec-secgw.c b/examples/ipsec-secgw/ipsec-secgw.c
-index 0c2005eea..a5dfd1826 100644
+index 46af3f05f..f98d529f5 100644
 --- a/examples/ipsec-secgw/ipsec-secgw.c
 +++ b/examples/ipsec-secgw/ipsec-secgw.c
-@@ -629,32 +629,45 @@ process_pkts_outbound_nosp(struct ipsec_ctx *ipsec_ctx,
+@@ -561,32 +561,45 @@ process_pkts_outbound_nosp(struct ipsec_ctx *ipsec_ctx,
  		struct ipsec_traffic *traffic)
  {
  	struct rte_mbuf *m;

^ permalink raw reply	[flat|nested] 75+ messages in thread

* [dpdk-stable] patch 'examples/ipsec-secgw: make local variables static' has been queued to LTS release 17.11.6
  2019-03-08 17:46 [dpdk-stable] patch 'net/bnx2x: cleanup info logs' has been queued to LTS release 17.11.6 Yongseok Koh
                   ` (26 preceding siblings ...)
  2019-03-08 17:47 ` [dpdk-stable] patch 'examples/ipsec-secgw: fix outbound codepath for single SA' " Yongseok Koh
@ 2019-03-08 17:47 ` Yongseok Koh
  2019-03-08 17:47 ` [dpdk-stable] patch 'kni: fix build on RHEL 8' " Yongseok Koh
                   ` (41 subsequent siblings)
  69 siblings, 0 replies; 75+ messages in thread
From: Yongseok Koh @ 2019-03-08 17:47 UTC (permalink / raw)
  To: Konstantin Ananyev; +Cc: Radu Nicolau, Akhil Goyal, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.6

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objection by 03/13/19. So please
shout if anyone has objection.

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.

Yongseok

---
>From aa933fd9020e3101488ad12b12633535fa467c6d Mon Sep 17 00:00:00 2001
From: Konstantin Ananyev <konstantin.ananyev@intel.com>
Date: Thu, 10 Jan 2019 21:09:08 +0000
Subject: [PATCH] examples/ipsec-secgw: make local variables static

[ upstream commit d92fc70e14f43d13be4204c51ed7f3a671c1bcc4 ]

in sp4.c and sp6.c there are few globals that used only locally.
Define them as static ones.

Signed-off-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Acked-by: Radu Nicolau <radu.nicolau@intel.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
---
 examples/ipsec-secgw/sp4.c | 10 +++++-----
 examples/ipsec-secgw/sp6.c | 10 +++++-----
 2 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/examples/ipsec-secgw/sp4.c b/examples/ipsec-secgw/sp4.c
index 38c72a927..065cc22e0 100644
--- a/examples/ipsec-secgw/sp4.c
+++ b/examples/ipsec-secgw/sp4.c
@@ -73,7 +73,7 @@ enum {
 	RTE_ACL_IPV4_NUM
 };
 
-struct rte_acl_field_def ip4_defs[NUM_FIELDS_IPV4] = {
+static struct rte_acl_field_def ip4_defs[NUM_FIELDS_IPV4] = {
 	{
 	.type = RTE_ACL_FIELD_TYPE_BITMASK,
 	.size = sizeof(uint8_t),
@@ -114,11 +114,11 @@ struct rte_acl_field_def ip4_defs[NUM_FIELDS_IPV4] = {
 
 RTE_ACL_RULE_DEF(acl4_rules, RTE_DIM(ip4_defs));
 
-struct acl4_rules acl4_rules_out[MAX_ACL_RULE_NUM];
-uint32_t nb_acl4_rules_out;
+static struct acl4_rules acl4_rules_out[MAX_ACL_RULE_NUM];
+static uint32_t nb_acl4_rules_out;
 
-struct acl4_rules acl4_rules_in[MAX_ACL_RULE_NUM];
-uint32_t nb_acl4_rules_in;
+static struct acl4_rules acl4_rules_in[MAX_ACL_RULE_NUM];
+static uint32_t nb_acl4_rules_in;
 
 void
 parse_sp4_tokens(char **tokens, uint32_t n_tokens,
diff --git a/examples/ipsec-secgw/sp6.c b/examples/ipsec-secgw/sp6.c
index 62fb492ce..a197942ad 100644
--- a/examples/ipsec-secgw/sp6.c
+++ b/examples/ipsec-secgw/sp6.c
@@ -63,7 +63,7 @@ enum {
 
 #define IP6_ADDR_SIZE 16
 
-struct rte_acl_field_def ip6_defs[IP6_NUM] = {
+static struct rte_acl_field_def ip6_defs[IP6_NUM] = {
 	{
 	.type = RTE_ACL_FIELD_TYPE_BITMASK,
 	.size = sizeof(uint8_t),
@@ -145,11 +145,11 @@ struct rte_acl_field_def ip6_defs[IP6_NUM] = {
 
 RTE_ACL_RULE_DEF(acl6_rules, RTE_DIM(ip6_defs));
 
-struct acl6_rules acl6_rules_out[MAX_ACL_RULE_NUM];
-uint32_t nb_acl6_rules_out;
+static struct acl6_rules acl6_rules_out[MAX_ACL_RULE_NUM];
+static uint32_t nb_acl6_rules_out;
 
-struct acl6_rules acl6_rules_in[MAX_ACL_RULE_NUM];
-uint32_t nb_acl6_rules_in;
+static struct acl6_rules acl6_rules_in[MAX_ACL_RULE_NUM];
+static uint32_t nb_acl6_rules_in;
 
 void
 parse_sp6_tokens(char **tokens, uint32_t n_tokens,
-- 
2.11.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2019-03-08 09:46:41.755733207 -0800
+++ 0029-examples-ipsec-secgw-make-local-variables-static.patch	2019-03-08 09:46:40.115401000 -0800
@@ -1,13 +1,13 @@
-From d92fc70e14f43d13be4204c51ed7f3a671c1bcc4 Mon Sep 17 00:00:00 2001
+From aa933fd9020e3101488ad12b12633535fa467c6d Mon Sep 17 00:00:00 2001
 From: Konstantin Ananyev <konstantin.ananyev@intel.com>
 Date: Thu, 10 Jan 2019 21:09:08 +0000
 Subject: [PATCH] examples/ipsec-secgw: make local variables static
 
+[ upstream commit d92fc70e14f43d13be4204c51ed7f3a671c1bcc4 ]
+
 in sp4.c and sp6.c there are few globals that used only locally.
 Define them as static ones.
 
-Cc: stable@dpdk.org
-
 Signed-off-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
 Acked-by: Radu Nicolau <radu.nicolau@intel.com>
 Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
@@ -17,10 +17,10 @@
  2 files changed, 10 insertions(+), 10 deletions(-)
 
 diff --git a/examples/ipsec-secgw/sp4.c b/examples/ipsec-secgw/sp4.c
-index 8d3d3d8e0..6b05daaa9 100644
+index 38c72a927..065cc22e0 100644
 --- a/examples/ipsec-secgw/sp4.c
 +++ b/examples/ipsec-secgw/sp4.c
-@@ -44,7 +44,7 @@ enum {
+@@ -73,7 +73,7 @@ enum {
  	RTE_ACL_IPV4_NUM
  };
  
@@ -29,7 +29,7 @@
  	{
  	.type = RTE_ACL_FIELD_TYPE_BITMASK,
  	.size = sizeof(uint8_t),
-@@ -85,11 +85,11 @@ struct rte_acl_field_def ip4_defs[NUM_FIELDS_IPV4] = {
+@@ -114,11 +114,11 @@ struct rte_acl_field_def ip4_defs[NUM_FIELDS_IPV4] = {
  
  RTE_ACL_RULE_DEF(acl4_rules, RTE_DIM(ip4_defs));
  
@@ -46,10 +46,10 @@
  void
  parse_sp4_tokens(char **tokens, uint32_t n_tokens,
 diff --git a/examples/ipsec-secgw/sp6.c b/examples/ipsec-secgw/sp6.c
-index 6002afef3..dc5b94c6a 100644
+index 62fb492ce..a197942ad 100644
 --- a/examples/ipsec-secgw/sp6.c
 +++ b/examples/ipsec-secgw/sp6.c
-@@ -34,7 +34,7 @@ enum {
+@@ -63,7 +63,7 @@ enum {
  
  #define IP6_ADDR_SIZE 16
  
@@ -58,7 +58,7 @@
  	{
  	.type = RTE_ACL_FIELD_TYPE_BITMASK,
  	.size = sizeof(uint8_t),
-@@ -116,11 +116,11 @@ struct rte_acl_field_def ip6_defs[IP6_NUM] = {
+@@ -145,11 +145,11 @@ struct rte_acl_field_def ip6_defs[IP6_NUM] = {
  
  RTE_ACL_RULE_DEF(acl6_rules, RTE_DIM(ip6_defs));
  

^ permalink raw reply	[flat|nested] 75+ messages in thread

* [dpdk-stable] patch 'kni: fix build on RHEL 8' has been queued to LTS release 17.11.6
  2019-03-08 17:46 [dpdk-stable] patch 'net/bnx2x: cleanup info logs' has been queued to LTS release 17.11.6 Yongseok Koh
                   ` (27 preceding siblings ...)
  2019-03-08 17:47 ` [dpdk-stable] patch 'examples/ipsec-secgw: make local variables static' " Yongseok Koh
@ 2019-03-08 17:47 ` Yongseok Koh
  2019-03-08 17:47 ` [dpdk-stable] patch 'kni: fix build on RHEL8 for arm and Power9' " Yongseok Koh
                   ` (40 subsequent siblings)
  69 siblings, 0 replies; 75+ messages in thread
From: Yongseok Koh @ 2019-03-08 17:47 UTC (permalink / raw)
  To: Xiao Liang; +Cc: Ferruh Yigit, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.6

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objection by 03/13/19. So please
shout if anyone has objection.

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.

Yongseok

---
>From f3389b16062d92a27d5a49b5ff59ade99e3c8ac1 Mon Sep 17 00:00:00 2001
From: Xiao Liang <xiliang@redhat.com>
Date: Wed, 19 Dec 2018 15:07:58 +0800
Subject: [PATCH] kni: fix build on RHEL 8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

[ upstream commit 4c820b22c08dea1ff6cd5db8b5a17b6568fcc4a5 ]

'ndo_change_mtu_rh74' was changed to 'ndo_change_mtu' in RHEL8.

Build error log:
/home/dpdk-18.11/kernel/linux/kni/compat.h:107:24: error: ‘const struct
net_device_ops’ has no member named ‘ndo_change_mtu_rh74’; did you mean
‘ndo_change_mtu’?
 #define ndo_change_mtu ndo_change_mtu_rh74
                        ^~~~~~~~~~~~~~~~~~~

Signed-off-by: Xiao Liang <xiliang@redhat.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
 lib/librte_eal/linuxapp/kni/compat.h              | 3 ++-
 lib/librte_eal/linuxapp/kni/ethtool/igb/kcompat.h | 3 ++-
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/lib/librte_eal/linuxapp/kni/compat.h b/lib/librte_eal/linuxapp/kni/compat.h
index 6a6968d93..87d228e53 100644
--- a/lib/librte_eal/linuxapp/kni/compat.h
+++ b/lib/librte_eal/linuxapp/kni/compat.h
@@ -102,7 +102,8 @@
 #endif
 
 #if (defined(RHEL_RELEASE_CODE) && \
-	(RHEL_RELEASE_CODE >= RHEL_RELEASE_VERSION(7, 5)))
+	(RHEL_RELEASE_CODE >= RHEL_RELEASE_VERSION(7, 5)) && \
+	(RHEL_RELEASE_CODE < RHEL_RELEASE_VERSION(8, 0)))
 #define ndo_change_mtu ndo_change_mtu_rh74
 #endif
 
diff --git a/lib/librte_eal/linuxapp/kni/ethtool/igb/kcompat.h b/lib/librte_eal/linuxapp/kni/ethtool/igb/kcompat.h
index 6b738911f..214cc1531 100644
--- a/lib/librte_eal/linuxapp/kni/ethtool/igb/kcompat.h
+++ b/lib/librte_eal/linuxapp/kni/ethtool/igb/kcompat.h
@@ -3945,7 +3945,8 @@ skb_set_hash(struct sk_buff *skb, __u32 hash, __always_unused int type)
 #endif
 
 #if (defined(RHEL_RELEASE_CODE) && \
-	(RHEL_RELEASE_VERSION(7, 5) <= RHEL_RELEASE_CODE))
+	(RHEL_RELEASE_CODE >= RHEL_RELEASE_VERSION(7, 5)) && \
+	(RHEL_RELEASE_CODE < RHEL_RELEASE_VERSION(8, 0)))
 #define ndo_change_mtu ndo_change_mtu_rh74
 #endif
 
-- 
2.11.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2019-03-08 09:46:41.798701323 -0800
+++ 0030-kni-fix-build-on-RHEL-8.patch	2019-03-08 09:46:40.124400000 -0800
@@ -1,4 +1,4 @@
-From 4c820b22c08dea1ff6cd5db8b5a17b6568fcc4a5 Mon Sep 17 00:00:00 2001
+From f3389b16062d92a27d5a49b5ff59ade99e3c8ac1 Mon Sep 17 00:00:00 2001
 From: Xiao Liang <xiliang@redhat.com>
 Date: Wed, 19 Dec 2018 15:07:58 +0800
 Subject: [PATCH] kni: fix build on RHEL 8
@@ -6,6 +6,8 @@
 Content-Type: text/plain; charset=UTF-8
 Content-Transfer-Encoding: 8bit
 
+[ upstream commit 4c820b22c08dea1ff6cd5db8b5a17b6568fcc4a5 ]
+
 'ndo_change_mtu_rh74' was changed to 'ndo_change_mtu' in RHEL8.
 
 Build error log:
@@ -15,20 +17,18 @@
  #define ndo_change_mtu ndo_change_mtu_rh74
                         ^~~~~~~~~~~~~~~~~~~
 
-Cc: stable@dpdk.org
-
 Signed-off-by: Xiao Liang <xiliang@redhat.com>
 Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
 ---
- kernel/linux/kni/compat.h              | 3 ++-
- kernel/linux/kni/ethtool/igb/kcompat.h | 3 ++-
+ lib/librte_eal/linuxapp/kni/compat.h              | 3 ++-
+ lib/librte_eal/linuxapp/kni/ethtool/igb/kcompat.h | 3 ++-
  2 files changed, 4 insertions(+), 2 deletions(-)
 
-diff --git a/kernel/linux/kni/compat.h b/kernel/linux/kni/compat.h
-index 5aadebbcd..bc81d0c8d 100644
---- a/kernel/linux/kni/compat.h
-+++ b/kernel/linux/kni/compat.h
-@@ -103,7 +103,8 @@
+diff --git a/lib/librte_eal/linuxapp/kni/compat.h b/lib/librte_eal/linuxapp/kni/compat.h
+index 6a6968d93..87d228e53 100644
+--- a/lib/librte_eal/linuxapp/kni/compat.h
++++ b/lib/librte_eal/linuxapp/kni/compat.h
+@@ -102,7 +102,8 @@
  #endif
  
  #if (defined(RHEL_RELEASE_CODE) && \
@@ -38,11 +38,11 @@
  #define ndo_change_mtu ndo_change_mtu_rh74
  #endif
  
-diff --git a/kernel/linux/kni/ethtool/igb/kcompat.h b/kernel/linux/kni/ethtool/igb/kcompat.h
-index ae1b53093..2681be684 100644
---- a/kernel/linux/kni/ethtool/igb/kcompat.h
-+++ b/kernel/linux/kni/ethtool/igb/kcompat.h
-@@ -3930,7 +3930,8 @@ skb_set_hash(struct sk_buff *skb, __u32 hash, __always_unused int type)
+diff --git a/lib/librte_eal/linuxapp/kni/ethtool/igb/kcompat.h b/lib/librte_eal/linuxapp/kni/ethtool/igb/kcompat.h
+index 6b738911f..214cc1531 100644
+--- a/lib/librte_eal/linuxapp/kni/ethtool/igb/kcompat.h
++++ b/lib/librte_eal/linuxapp/kni/ethtool/igb/kcompat.h
+@@ -3945,7 +3945,8 @@ skb_set_hash(struct sk_buff *skb, __u32 hash, __always_unused int type)
  #endif
  
  #if (defined(RHEL_RELEASE_CODE) && \

^ permalink raw reply	[flat|nested] 75+ messages in thread

* [dpdk-stable] patch 'kni: fix build on RHEL8 for arm and Power9' has been queued to LTS release 17.11.6
  2019-03-08 17:46 [dpdk-stable] patch 'net/bnx2x: cleanup info logs' has been queued to LTS release 17.11.6 Yongseok Koh
                   ` (28 preceding siblings ...)
  2019-03-08 17:47 ` [dpdk-stable] patch 'kni: fix build on RHEL 8' " Yongseok Koh
@ 2019-03-08 17:47 ` Yongseok Koh
  2019-03-08 17:47 ` [dpdk-stable] patch 'mk: fix scope of disabling AVX512F support' " Yongseok Koh
                   ` (39 subsequent siblings)
  69 siblings, 0 replies; 75+ messages in thread
From: Yongseok Koh @ 2019-03-08 17:47 UTC (permalink / raw)
  To: David Zeng; +Cc: Ferruh Yigit, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.6

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objection by 03/13/19. So please
shout if anyone has objection.

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.

Yongseok

---
>From 183d0500e5d606951a4211429eaed4ca7774def1 Mon Sep 17 00:00:00 2001
From: David Zeng <zengxhsh@cn.ibm.com>
Date: Sat, 22 Dec 2018 00:27:33 +0800
Subject: [PATCH] kni: fix build on RHEL8 for arm and Power9

[ upstream commit 3d5501d568aacbcf71832691278f5656d3a9b649 ]

Signed-off-by: David Zeng <zengxhsh@cn.ibm.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
 lib/librte_eal/linuxapp/kni/compat.h              | 8 +++++++-
 lib/librte_eal/linuxapp/kni/ethtool/igb/kcompat.h | 3 ++-
 2 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/lib/librte_eal/linuxapp/kni/compat.h b/lib/librte_eal/linuxapp/kni/compat.h
index 87d228e53..abd105bf4 100644
--- a/lib/librte_eal/linuxapp/kni/compat.h
+++ b/lib/librte_eal/linuxapp/kni/compat.h
@@ -101,9 +101,15 @@
 #undef NET_NAME_UNKNOWN
 #endif
 
+/*
+ * RHEL has two different version with different kernel version:
+ * 3.10 is for AMD, Intel, IBM POWER7 and POWER8;
+ * 4.14 is for ARM and IBM POWER9
+ */
 #if (defined(RHEL_RELEASE_CODE) && \
 	(RHEL_RELEASE_CODE >= RHEL_RELEASE_VERSION(7, 5)) && \
-	(RHEL_RELEASE_CODE < RHEL_RELEASE_VERSION(8, 0)))
+	(RHEL_RELEASE_CODE < RHEL_RELEASE_VERSION(8, 0)) && \
+	(LINUX_VERSION_CODE < KERNEL_VERSION(4, 14, 0)))
 #define ndo_change_mtu ndo_change_mtu_rh74
 #endif
 
diff --git a/lib/librte_eal/linuxapp/kni/ethtool/igb/kcompat.h b/lib/librte_eal/linuxapp/kni/ethtool/igb/kcompat.h
index 214cc1531..60be8860d 100644
--- a/lib/librte_eal/linuxapp/kni/ethtool/igb/kcompat.h
+++ b/lib/librte_eal/linuxapp/kni/ethtool/igb/kcompat.h
@@ -3946,7 +3946,8 @@ skb_set_hash(struct sk_buff *skb, __u32 hash, __always_unused int type)
 
 #if (defined(RHEL_RELEASE_CODE) && \
 	(RHEL_RELEASE_CODE >= RHEL_RELEASE_VERSION(7, 5)) && \
-	(RHEL_RELEASE_CODE < RHEL_RELEASE_VERSION(8, 0)))
+	(RHEL_RELEASE_CODE < RHEL_RELEASE_VERSION(8, 0)) && \
+	(LINUX_VERSION_CODE < KERNEL_VERSION(4, 14, 0)))
 #define ndo_change_mtu ndo_change_mtu_rh74
 #endif
 
-- 
2.11.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2019-03-08 09:46:41.844734167 -0800
+++ 0031-kni-fix-build-on-RHEL8-for-arm-and-Power9.patch	2019-03-08 09:46:40.135400000 -0800
@@ -1,20 +1,22 @@
-From 3d5501d568aacbcf71832691278f5656d3a9b649 Mon Sep 17 00:00:00 2001
+From 183d0500e5d606951a4211429eaed4ca7774def1 Mon Sep 17 00:00:00 2001
 From: David Zeng <zengxhsh@cn.ibm.com>
 Date: Sat, 22 Dec 2018 00:27:33 +0800
 Subject: [PATCH] kni: fix build on RHEL8 for arm and Power9
 
+[ upstream commit 3d5501d568aacbcf71832691278f5656d3a9b649 ]
+
 Signed-off-by: David Zeng <zengxhsh@cn.ibm.com>
 Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
 ---
- kernel/linux/kni/compat.h              | 8 +++++++-
- kernel/linux/kni/ethtool/igb/kcompat.h | 3 ++-
+ lib/librte_eal/linuxapp/kni/compat.h              | 8 +++++++-
+ lib/librte_eal/linuxapp/kni/ethtool/igb/kcompat.h | 3 ++-
  2 files changed, 9 insertions(+), 2 deletions(-)
 
-diff --git a/kernel/linux/kni/compat.h b/kernel/linux/kni/compat.h
-index bc81d0c8d..3c575c70a 100644
---- a/kernel/linux/kni/compat.h
-+++ b/kernel/linux/kni/compat.h
-@@ -102,9 +102,15 @@
+diff --git a/lib/librte_eal/linuxapp/kni/compat.h b/lib/librte_eal/linuxapp/kni/compat.h
+index 87d228e53..abd105bf4 100644
+--- a/lib/librte_eal/linuxapp/kni/compat.h
++++ b/lib/librte_eal/linuxapp/kni/compat.h
+@@ -101,9 +101,15 @@
  #undef NET_NAME_UNKNOWN
  #endif
  
@@ -31,11 +33,11 @@
  #define ndo_change_mtu ndo_change_mtu_rh74
  #endif
  
-diff --git a/kernel/linux/kni/ethtool/igb/kcompat.h b/kernel/linux/kni/ethtool/igb/kcompat.h
-index 2681be684..430aabafe 100644
---- a/kernel/linux/kni/ethtool/igb/kcompat.h
-+++ b/kernel/linux/kni/ethtool/igb/kcompat.h
-@@ -3931,7 +3931,8 @@ skb_set_hash(struct sk_buff *skb, __u32 hash, __always_unused int type)
+diff --git a/lib/librte_eal/linuxapp/kni/ethtool/igb/kcompat.h b/lib/librte_eal/linuxapp/kni/ethtool/igb/kcompat.h
+index 214cc1531..60be8860d 100644
+--- a/lib/librte_eal/linuxapp/kni/ethtool/igb/kcompat.h
++++ b/lib/librte_eal/linuxapp/kni/ethtool/igb/kcompat.h
+@@ -3946,7 +3946,8 @@ skb_set_hash(struct sk_buff *skb, __u32 hash, __always_unused int type)
  
  #if (defined(RHEL_RELEASE_CODE) && \
  	(RHEL_RELEASE_CODE >= RHEL_RELEASE_VERSION(7, 5)) && \

^ permalink raw reply	[flat|nested] 75+ messages in thread

* [dpdk-stable] patch 'mk: fix scope of disabling AVX512F support' has been queued to LTS release 17.11.6
  2019-03-08 17:46 [dpdk-stable] patch 'net/bnx2x: cleanup info logs' has been queued to LTS release 17.11.6 Yongseok Koh
                   ` (29 preceding siblings ...)
  2019-03-08 17:47 ` [dpdk-stable] patch 'kni: fix build on RHEL8 for arm and Power9' " Yongseok Koh
@ 2019-03-08 17:47 ` Yongseok Koh
  2019-03-08 17:47 ` [dpdk-stable] patch 'net/ixgbe: fix over using multicast table for VF' " Yongseok Koh
                   ` (38 subsequent siblings)
  69 siblings, 0 replies; 75+ messages in thread
From: Yongseok Koh @ 2019-03-08 17:47 UTC (permalink / raw)
  To: Ferruh Yigit; +Cc: Thomas Monjalon, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.6

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objection by 03/13/19. So please
shout if anyone has objection.

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.

Yongseok

---
>From e2e5744253733ce137e780699da00a627a25fc6a Mon Sep 17 00:00:00 2001
From: Ferruh Yigit <ferruh.yigit@intel.com>
Date: Mon, 14 Jan 2019 15:49:35 +0000
Subject: [PATCH] mk: fix scope of disabling AVX512F support

[ backported from upstream commit a32ca9a4ebc1350ce48df0222decef95a72b742b ]

AVX512 was disabled for GCC because of Bugzilla issue 97 [1],
the GCC defect submitted for the issue [2] highlighted that this is
a known binutils version 2.30 issue.

Narrowed the scope of no-avx512 to the this specific binutils version.

[1]
https://bugs.dpdk.org/show_bug.cgi?id=97

[2]
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88096

Fixes: 1bc8541000ff ("mk: disable gcc AVX512F support")

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
---
 doc/guides/rel_notes/known_issues.rst    | 35 ++++++++++++++++++++++++++++++++
 mk/rte.cpuflags.mk                       |  4 ++--
 mk/toolchain/gcc/rte.toolchain-compat.mk | 10 +++++++++
 3 files changed, 47 insertions(+), 2 deletions(-)

diff --git a/doc/guides/rel_notes/known_issues.rst b/doc/guides/rel_notes/known_issues.rst
index 3f6d8cb5f..fa0082137 100644
--- a/doc/guides/rel_notes/known_issues.rst
+++ b/doc/guides/rel_notes/known_issues.rst
@@ -742,3 +742,38 @@ igb_uio can not be used when running l3fwd-power
 
 **Driver/Module**:
    ``igb_uio`` module.
+
+
+AVX-512 support disabled
+------------------------
+
+**Description**:
+   ``AVX-512`` support has been disabled on some conditions.
+   This shouldn't be confused with ``CONFIG_RTE_ENABLE_AVX512`` config option which is already
+   disabled by default. This config option defines if ``AVX-512`` specific implementations of
+   some file to be used or not. What has been disabled is compiler feature to produce ``AVX-512``
+   instructions from any source code.
+
+   On DPDK v18.11 ``AVX-512`` is disabled for all ``GCC`` builds which reported to cause a performance
+   drop.
+
+   On DPDK v19.02 ``AVX-512`` disable scope is reduced to ``GCC`` and ``binutils version 2.30`` based
+   on information accured from the GCC community defect.
+
+**Reason**:
+   Generated ``AVX-512`` code cause crash:
+   https://bugs.dpdk.org/show_bug.cgi?id=97
+   https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88096
+
+**Resolution/Workaround**:
+   * Update ``binutils`` to newer version than ``2.30``.
+
+   OR
+
+   * Use different compiler, like ``clang`` for this case.
+
+**Affected Environment/Platform**:
+    ``GCC`` and ``binutils version 2.30``.
+
+**Driver/Module**:
+    ALL.
diff --git a/mk/rte.cpuflags.mk b/mk/rte.cpuflags.mk
index 2129510c2..eee4868b2 100644
--- a/mk/rte.cpuflags.mk
+++ b/mk/rte.cpuflags.mk
@@ -97,8 +97,8 @@ ifneq ($(filter $(AUTO_CPUFLAGS),__AVX512F__),)
 ifeq ($(CONFIG_RTE_ENABLE_AVX512),y)
 CPUFLAGS += AVX512F
 else
-# disable AVX512F support of gcc as a workaround for Bug 97
-ifeq ($(CONFIG_RTE_TOOLCHAIN_GCC),y)
+# disable AVX512F support for GCC & binutils 2.30 as a workaround for Bug 97
+ifeq ($(FORCE_DISABLE_AVX512),y)
 MACHINE_CFLAGS += -mno-avx512f
 endif
 endif
diff --git a/mk/toolchain/gcc/rte.toolchain-compat.mk b/mk/toolchain/gcc/rte.toolchain-compat.mk
index 8dbd4417e..ad3b68e63 100644
--- a/mk/toolchain/gcc/rte.toolchain-compat.mk
+++ b/mk/toolchain/gcc/rte.toolchain-compat.mk
@@ -47,6 +47,16 @@ HOST_GCC_MINOR = $(shell echo __GNUC_MINOR__ | $(HOSTCC) -E -x c - | tail -n 1)
 HOST_GCC_PATCHLEVEL = $(shell echo __GNUC_PATCHLEVEL__ | $(HOSTCC) -E -x c - | tail -n 1)
 HOST_GCC_VERSION = $(HOST_GCC_MAJOR)$(HOST_GCC_MINOR)
 
+LD_VERSION = $(shell $(LD) -v)
+# disable AVX512F support for GCC & binutils 2.30 as a workaround for Bug 97
+ifneq ($(filter 2.30%,$(LD_VERSION)),)
+FORCE_DISABLE_AVX512 := y
+# print warning only once for librte_eal
+ifneq ($(filter %librte_eal,$(CURDIR)),)
+$(warning AVX512 support disabled because of ld 2.30. See Bug 97)
+endif
+endif
+
 # if GCC is older than 4.x
 ifeq ($(shell test $(GCC_VERSION) -lt 40 && echo 1), 1)
 	MACHINE_CFLAGS =
-- 
2.11.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2019-03-08 09:46:41.889660902 -0800
+++ 0032-mk-fix-scope-of-disabling-AVX512F-support.patch	2019-03-08 09:46:40.143408000 -0800
@@ -1,8 +1,10 @@
-From a32ca9a4ebc1350ce48df0222decef95a72b742b Mon Sep 17 00:00:00 2001
+From e2e5744253733ce137e780699da00a627a25fc6a Mon Sep 17 00:00:00 2001
 From: Ferruh Yigit <ferruh.yigit@intel.com>
 Date: Mon, 14 Jan 2019 15:49:35 +0000
 Subject: [PATCH] mk: fix scope of disabling AVX512F support
 
+[ backported from upstream commit a32ca9a4ebc1350ce48df0222decef95a72b742b ]
+
 AVX512 was disabled for GCC because of Bugzilla issue 97 [1],
 the GCC defect submitted for the issue [2] highlighted that this is
 a known binutils version 2.30 issue.
@@ -15,43 +17,21 @@
 [2]
 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88096
 
-Fixes: 8d07c82b239f ("mk: disable gcc AVX512F support")
-Cc: stable@dpdk.org
+Fixes: 1bc8541000ff ("mk: disable gcc AVX512F support")
 
 Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
 Acked-by: Thomas Monjalon <thomas@monjalon.net>
 ---
- config/meson.build                       |  8 ++++++++
  doc/guides/rel_notes/known_issues.rst    | 35 ++++++++++++++++++++++++++++++++
- doc/guides/rel_notes/release_19_02.rst   | 15 ++++++++++++++
  mk/rte.cpuflags.mk                       |  4 ++--
  mk/toolchain/gcc/rte.toolchain-compat.mk | 10 +++++++++
- 5 files changed, 70 insertions(+), 2 deletions(-)
+ 3 files changed, 47 insertions(+), 2 deletions(-)
 
-diff --git a/config/meson.build b/config/meson.build
-index db32499b3..40802fc88 100644
---- a/config/meson.build
-+++ b/config/meson.build
-@@ -43,6 +43,14 @@ toolchain = cc.get_id()
- dpdk_conf.set_quoted('RTE_TOOLCHAIN', toolchain)
- dpdk_conf.set('RTE_TOOLCHAIN_' + toolchain.to_upper(), 1)
- 
-+# get binutils version for the workaround of Bug 97
-+ldver = run_command('ld', '-v').stdout().strip()
-+if ldver.contains('2.30')
-+	if cc.has_argument('-mno-avx512f')
-+		machine_args += '-mno-avx512f'
-+	endif
-+endif
-+
- add_project_link_arguments('-Wl,--no-as-needed', language: 'c')
- dpdk_extra_ldflags += '-Wl,--no-as-needed'
- 
 diff --git a/doc/guides/rel_notes/known_issues.rst b/doc/guides/rel_notes/known_issues.rst
-index a1face9c1..358dfa321 100644
+index 3f6d8cb5f..fa0082137 100644
 --- a/doc/guides/rel_notes/known_issues.rst
 +++ b/doc/guides/rel_notes/known_issues.rst
-@@ -826,3 +826,38 @@ Kernel crash when hot-unplug igb_uio device while DPDK application is running
+@@ -742,3 +742,38 @@ igb_uio can not be used when running l3fwd-power
  
  **Driver/Module**:
     ``igb_uio`` module.
@@ -90,37 +70,11 @@
 +
 +**Driver/Module**:
 +    ALL.
-diff --git a/doc/guides/rel_notes/release_19_02.rst b/doc/guides/rel_notes/release_19_02.rst
-index 832ac8c2a..5a2f62ca9 100644
---- a/doc/guides/rel_notes/release_19_02.rst
-+++ b/doc/guides/rel_notes/release_19_02.rst
-@@ -334,6 +334,21 @@ Known Issues
-    Also, make sure to start the actual text at the margin.
-    =========================================================
- 
-+* ``AVX-512`` support has been disabled for ``GCC`` builds when ``binutils 2.30``
-+  is detected [1] because of a crash [2]. This can affect ``native`` machine type
-+  build targets on the platforms that support ``AVX512F`` like ``Intel Skylake``
-+  processors, and can cause a possible performance drop. The immediate workaround
-+  is to use ``clang`` compiler on these platforms.
-+  Initial workaround in DPDK v18.11 was to disable ``AVX-512`` support for ``GCC``
-+  completely, but based on information on defect submitted to GCC community [3],
-+  issue has been identified as ``binutils 2.30`` issue. Since currently only GCC
-+  generates ``AVX-512`` instructions, the scope is limited to ``GCC`` and
-+  ``binutils 2.30``
-+
-+  - [1]: Commit ("mk: fix scope of disabling AVX512F support")
-+  - [2]: https://bugs.dpdk.org/show_bug.cgi?id=97
-+  - [3]: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88096
-+
- 
- Tested Platforms
- ----------------
 diff --git a/mk/rte.cpuflags.mk b/mk/rte.cpuflags.mk
-index c3291b17a..541211c61 100644
+index 2129510c2..eee4868b2 100644
 --- a/mk/rte.cpuflags.mk
 +++ b/mk/rte.cpuflags.mk
-@@ -69,8 +69,8 @@ ifneq ($(filter $(AUTO_CPUFLAGS),__AVX512F__),)
+@@ -97,8 +97,8 @@ ifneq ($(filter $(AUTO_CPUFLAGS),__AVX512F__),)
  ifeq ($(CONFIG_RTE_ENABLE_AVX512),y)
  CPUFLAGS += AVX512F
  else
@@ -132,10 +86,10 @@
  endif
  endif
 diff --git a/mk/toolchain/gcc/rte.toolchain-compat.mk b/mk/toolchain/gcc/rte.toolchain-compat.mk
-index 44904295c..dbddc986e 100644
+index 8dbd4417e..ad3b68e63 100644
 --- a/mk/toolchain/gcc/rte.toolchain-compat.mk
 +++ b/mk/toolchain/gcc/rte.toolchain-compat.mk
-@@ -20,6 +20,16 @@ HOST_GCC_MINOR = $(shell echo __GNUC_MINOR__ | $(HOSTCC) -E -x c - | tail -n 1)
+@@ -47,6 +47,16 @@ HOST_GCC_MINOR = $(shell echo __GNUC_MINOR__ | $(HOSTCC) -E -x c - | tail -n 1)
  HOST_GCC_PATCHLEVEL = $(shell echo __GNUC_PATCHLEVEL__ | $(HOSTCC) -E -x c - | tail -n 1)
  HOST_GCC_VERSION = $(HOST_GCC_MAJOR)$(HOST_GCC_MINOR)
  

^ permalink raw reply	[flat|nested] 75+ messages in thread

* [dpdk-stable] patch 'net/ixgbe: fix over using multicast table for VF' has been queued to LTS release 17.11.6
  2019-03-08 17:46 [dpdk-stable] patch 'net/bnx2x: cleanup info logs' has been queued to LTS release 17.11.6 Yongseok Koh
                   ` (30 preceding siblings ...)
  2019-03-08 17:47 ` [dpdk-stable] patch 'mk: fix scope of disabling AVX512F support' " Yongseok Koh
@ 2019-03-08 17:47 ` Yongseok Koh
  2019-03-08 17:47 ` [dpdk-stable] patch 'vhost: fix possible out of bound access in vector filling' " Yongseok Koh
                   ` (37 subsequent siblings)
  69 siblings, 0 replies; 75+ messages in thread
From: Yongseok Koh @ 2019-03-08 17:47 UTC (permalink / raw)
  To: Wei Zhao; +Cc: Qi Zhang, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.6

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objection by 03/13/19. So please
shout if anyone has objection.

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.

Yongseok

---
>From 477a4fffb3473619dfccdab357244e514bcfd884 Mon Sep 17 00:00:00 2001
From: Wei Zhao <wei.zhao1@intel.com>
Date: Mon, 7 Jan 2019 15:22:56 +0800
Subject: [PATCH] net/ixgbe: fix over using multicast table for VF

[ upstream commit dc5a6e74224094ae702fa971c4ce039b4a2e3560 ]

According to the current implementation, all VFs will set bit
IXGBE_VMOLR_ROMPE during initialization, this cause any VF
will accept packets that match the MTA table. Since the MTA
table is shared by all VFs which means if one VF update MTA
table in function ixgbe_vf_set_multicast, then all other VFs
will receive multicast packets which cause unnecessary
performance overhead.

So it's better to set VF's ROPE bit of register VMOLR only
if multicast address filter is required on that VF.
Also, the ROPE bit should be reset when multicast address
filter is requested to clean.

This patch also aligns to the related fix on ixgbe
kernel driver 5.3.7.

Fixes: 00e30184daa0 ("ixgbe: add PF support")

Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
---
 drivers/net/ixgbe/ixgbe_pf.c | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)

diff --git a/drivers/net/ixgbe/ixgbe_pf.c b/drivers/net/ixgbe/ixgbe_pf.c
index 011469417..22ecbad01 100644
--- a/drivers/net/ixgbe/ixgbe_pf.c
+++ b/drivers/net/ixgbe/ixgbe_pf.c
@@ -374,7 +374,7 @@ ixgbe_vf_reset_event(struct rte_eth_dev *dev, uint16_t vf)
 	int rar_entry = hw->mac.num_rar_entries - (vf + 1);
 	uint32_t vmolr = IXGBE_READ_REG(hw, IXGBE_VMOLR(vf));
 
-	vmolr |= (IXGBE_VMOLR_ROPE | IXGBE_VMOLR_ROMPE |
+	vmolr |= (IXGBE_VMOLR_ROPE |
 			IXGBE_VMOLR_BAM | IXGBE_VMOLR_AUPE);
 	IXGBE_WRITE_REG(hw, IXGBE_VMOLR(vf), vmolr);
 
@@ -526,6 +526,7 @@ ixgbe_vf_set_multicast(struct rte_eth_dev *dev, uint32_t vf, uint32_t *msgbuf)
 	const uint32_t IXGBE_MTA_BIT_MASK = (0x1 << IXGBE_MTA_BIT_SHIFT) - 1;
 	uint32_t reg_val;
 	int i;
+	u32 vmolr = IXGBE_READ_REG(hw, IXGBE_VMOLR(vf));
 
 	/* Disable multicast promiscuous first */
 	ixgbe_disable_vf_mc_promisc(dev, vf);
@@ -539,6 +540,12 @@ ixgbe_vf_set_multicast(struct rte_eth_dev *dev, uint32_t vf, uint32_t *msgbuf)
 		vfinfo->vf_mc_hashes[i] = hash_list[i];
 	}
 
+	if (nb_entries == 0) {
+		vmolr &= ~IXGBE_VMOLR_ROMPE;
+		IXGBE_WRITE_REG(hw, IXGBE_VMOLR(vf), vmolr);
+		return 0;
+	}
+
 	for (i = 0; i < vfinfo->num_vf_mc_hashes; i++) {
 		mta_idx = (vfinfo->vf_mc_hashes[i] >> IXGBE_MTA_BIT_SHIFT)
 				& IXGBE_MTA_INDEX_MASK;
@@ -548,6 +555,9 @@ ixgbe_vf_set_multicast(struct rte_eth_dev *dev, uint32_t vf, uint32_t *msgbuf)
 		IXGBE_WRITE_REG(hw, IXGBE_MTA(mta_idx), reg_val);
 	}
 
+	vmolr |= IXGBE_VMOLR_ROMPE;
+	IXGBE_WRITE_REG(hw, IXGBE_VMOLR(vf), vmolr);
+
 	return 0;
 }
 
-- 
2.11.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2019-03-08 09:46:41.935063961 -0800
+++ 0033-net-ixgbe-fix-over-using-multicast-table-for-VF.patch	2019-03-08 09:46:40.148405000 -0800
@@ -1,8 +1,10 @@
-From dc5a6e74224094ae702fa971c4ce039b4a2e3560 Mon Sep 17 00:00:00 2001
+From 477a4fffb3473619dfccdab357244e514bcfd884 Mon Sep 17 00:00:00 2001
 From: Wei Zhao <wei.zhao1@intel.com>
 Date: Mon, 7 Jan 2019 15:22:56 +0800
 Subject: [PATCH] net/ixgbe: fix over using multicast table for VF
 
+[ upstream commit dc5a6e74224094ae702fa971c4ce039b4a2e3560 ]
+
 According to the current implementation, all VFs will set bit
 IXGBE_VMOLR_ROMPE during initialization, this cause any VF
 will accept packets that match the MTA table. Since the MTA
@@ -20,7 +22,6 @@
 kernel driver 5.3.7.
 
 Fixes: 00e30184daa0 ("ixgbe: add PF support")
-Cc: stable@dpdk.org
 
 Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
 Acked-by: Qi Zhang <qi.z.zhang@intel.com>
@@ -29,10 +30,10 @@
  1 file changed, 11 insertions(+), 1 deletion(-)
 
 diff --git a/drivers/net/ixgbe/ixgbe_pf.c b/drivers/net/ixgbe/ixgbe_pf.c
-index 4b833ffab..be0c0768c 100644
+index 011469417..22ecbad01 100644
 --- a/drivers/net/ixgbe/ixgbe_pf.c
 +++ b/drivers/net/ixgbe/ixgbe_pf.c
-@@ -351,7 +351,7 @@ ixgbe_vf_reset_event(struct rte_eth_dev *dev, uint16_t vf)
+@@ -374,7 +374,7 @@ ixgbe_vf_reset_event(struct rte_eth_dev *dev, uint16_t vf)
  	int rar_entry = hw->mac.num_rar_entries - (vf + 1);
  	uint32_t vmolr = IXGBE_READ_REG(hw, IXGBE_VMOLR(vf));
  
@@ -41,7 +42,7 @@
  			IXGBE_VMOLR_BAM | IXGBE_VMOLR_AUPE);
  	IXGBE_WRITE_REG(hw, IXGBE_VMOLR(vf), vmolr);
  
-@@ -503,6 +503,7 @@ ixgbe_vf_set_multicast(struct rte_eth_dev *dev, uint32_t vf, uint32_t *msgbuf)
+@@ -526,6 +526,7 @@ ixgbe_vf_set_multicast(struct rte_eth_dev *dev, uint32_t vf, uint32_t *msgbuf)
  	const uint32_t IXGBE_MTA_BIT_MASK = (0x1 << IXGBE_MTA_BIT_SHIFT) - 1;
  	uint32_t reg_val;
  	int i;
@@ -49,7 +50,7 @@
  
  	/* Disable multicast promiscuous first */
  	ixgbe_disable_vf_mc_promisc(dev, vf);
-@@ -516,6 +517,12 @@ ixgbe_vf_set_multicast(struct rte_eth_dev *dev, uint32_t vf, uint32_t *msgbuf)
+@@ -539,6 +540,12 @@ ixgbe_vf_set_multicast(struct rte_eth_dev *dev, uint32_t vf, uint32_t *msgbuf)
  		vfinfo->vf_mc_hashes[i] = hash_list[i];
  	}
  
@@ -62,7 +63,7 @@
  	for (i = 0; i < vfinfo->num_vf_mc_hashes; i++) {
  		mta_idx = (vfinfo->vf_mc_hashes[i] >> IXGBE_MTA_BIT_SHIFT)
  				& IXGBE_MTA_INDEX_MASK;
-@@ -525,6 +532,9 @@ ixgbe_vf_set_multicast(struct rte_eth_dev *dev, uint32_t vf, uint32_t *msgbuf)
+@@ -548,6 +555,9 @@ ixgbe_vf_set_multicast(struct rte_eth_dev *dev, uint32_t vf, uint32_t *msgbuf)
  		IXGBE_WRITE_REG(hw, IXGBE_MTA(mta_idx), reg_val);
  	}
  

^ permalink raw reply	[flat|nested] 75+ messages in thread

* [dpdk-stable] patch 'vhost: fix possible out of bound access in vector filling' has been queued to LTS release 17.11.6
  2019-03-08 17:46 [dpdk-stable] patch 'net/bnx2x: cleanup info logs' has been queued to LTS release 17.11.6 Yongseok Koh
                   ` (31 preceding siblings ...)
  2019-03-08 17:47 ` [dpdk-stable] patch 'net/ixgbe: fix over using multicast table for VF' " Yongseok Koh
@ 2019-03-08 17:47 ` Yongseok Koh
  2019-03-08 17:47 ` [dpdk-stable] patch 'net/fm10k: fix internal switch initial status' " Yongseok Koh
                   ` (36 subsequent siblings)
  69 siblings, 0 replies; 75+ messages in thread
From: Yongseok Koh @ 2019-03-08 17:47 UTC (permalink / raw)
  To: Tiwei Bie; +Cc: Maxime Coquelin, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.6

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objection by 03/13/19. So please
shout if anyone has objection.

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.

Yongseok

---
>From 7ea44ec66464de70eb339b39d521aa58bd35ad74 Mon Sep 17 00:00:00 2001
From: Tiwei Bie <tiwei.bie@intel.com>
Date: Fri, 4 Jan 2019 12:06:40 +0800
Subject: [PATCH] vhost: fix possible out of bound access in vector filling

[ upstream commit 06fc8545fd6302f70de9ef5008a204e467d8cedb ]

Fixes: 7f74b95c444f ("vhost: pre update used ring for Tx and Rx")

Signed-off-by: Tiwei Bie <tiwei.bie@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
---
 lib/librte_vhost/virtio_net.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/lib/librte_vhost/virtio_net.c b/lib/librte_vhost/virtio_net.c
index 8c0c1b4bb..3e2935992 100644
--- a/lib/librte_vhost/virtio_net.c
+++ b/lib/librte_vhost/virtio_net.c
@@ -569,6 +569,9 @@ fill_vec_buf(struct virtio_net *dev, struct vhost_virtqueue *vq,
 	struct vring_desc *descs = vq->desc;
 	struct vring_desc *idesc = NULL;
 
+	if (unlikely(idx >= vq->size))
+		return -1;
+
 	*desc_chain_head = idx;
 
 	if (vq->desc[idx].flags & VRING_DESC_F_INDIRECT) {
-- 
2.11.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2019-03-08 09:46:41.979464471 -0800
+++ 0034-vhost-fix-possible-out-of-bound-access-in-vector-fil.patch	2019-03-08 09:46:40.153400000 -0800
@@ -1,10 +1,11 @@
-From 06fc8545fd6302f70de9ef5008a204e467d8cedb Mon Sep 17 00:00:00 2001
+From 7ea44ec66464de70eb339b39d521aa58bd35ad74 Mon Sep 17 00:00:00 2001
 From: Tiwei Bie <tiwei.bie@intel.com>
 Date: Fri, 4 Jan 2019 12:06:40 +0800
 Subject: [PATCH] vhost: fix possible out of bound access in vector filling
 
+[ upstream commit 06fc8545fd6302f70de9ef5008a204e467d8cedb ]
+
 Fixes: 7f74b95c444f ("vhost: pre update used ring for Tx and Rx")
-Cc: stable@dpdk.org
 
 Signed-off-by: Tiwei Bie <tiwei.bie@intel.com>
 Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
@@ -13,10 +14,10 @@
  1 file changed, 3 insertions(+)
 
 diff --git a/lib/librte_vhost/virtio_net.c b/lib/librte_vhost/virtio_net.c
-index 474acf64d..d64c355b9 100644
+index 8c0c1b4bb..3e2935992 100644
 --- a/lib/librte_vhost/virtio_net.c
 +++ b/lib/librte_vhost/virtio_net.c
-@@ -312,6 +312,9 @@ fill_vec_buf_split(struct virtio_net *dev, struct vhost_virtqueue *vq,
+@@ -569,6 +569,9 @@ fill_vec_buf(struct virtio_net *dev, struct vhost_virtqueue *vq,
  	struct vring_desc *descs = vq->desc;
  	struct vring_desc *idesc = NULL;
  

^ permalink raw reply	[flat|nested] 75+ messages in thread

* [dpdk-stable] patch 'net/fm10k: fix internal switch initial status' has been queued to LTS release 17.11.6
  2019-03-08 17:46 [dpdk-stable] patch 'net/bnx2x: cleanup info logs' has been queued to LTS release 17.11.6 Yongseok Koh
                   ` (32 preceding siblings ...)
  2019-03-08 17:47 ` [dpdk-stable] patch 'vhost: fix possible out of bound access in vector filling' " Yongseok Koh
@ 2019-03-08 17:47 ` Yongseok Koh
  2019-03-08 17:47 ` [dpdk-stable] patch 'net/dpaa: fix secondary process' " Yongseok Koh
                   ` (35 subsequent siblings)
  69 siblings, 0 replies; 75+ messages in thread
From: Yongseok Koh @ 2019-03-08 17:47 UTC (permalink / raw)
  To: Julien Meunier; +Cc: Xiao Wang, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.6

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objection by 03/13/19. So please
shout if anyone has objection.

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.

Yongseok

---
>From b0682f05b1142808c8b8f53765316ca67bca5743 Mon Sep 17 00:00:00 2001
From: Julien Meunier <julien.meunier@nokia.com>
Date: Wed, 2 Jan 2019 17:57:45 +0200
Subject: [PATCH] net/fm10k: fix internal switch initial status

[ upstream commit 04018a4552e630a2c019bade0c6b5f822aded0c1 ]

sm_down is a boolean in order to check if the internal switch of the
fm10k is up or down. This variable is configured though an interrupt by
fm10k_dev_interrupt_handler_pf.

If sm_down is uninitialized, we are not sure of its value at the first
bring up. For example, if FM10K_EICR_SWITCHREADY is raised, the PMD will
try to reconfigure the switch, but it does not make sense, as it's the
first startup.

The sm_down implementation has been introduced
commit 6c9f37245583 ("net/fm10k: support switch restart on PF").

Fixes: 6f22f2f67268 ("net/fm10k: redefine link status semantics")

Signed-off-by: Julien Meunier <julien.meunier@nokia.com>
Acked-by: Xiao Wang <xiao.w.wang@intel.com>
---
 drivers/net/fm10k/fm10k_ethdev.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/fm10k/fm10k_ethdev.c b/drivers/net/fm10k/fm10k_ethdev.c
index a0263f6d7..9ca57e582 100644
--- a/drivers/net/fm10k/fm10k_ethdev.c
+++ b/drivers/net/fm10k/fm10k_ethdev.c
@@ -2987,6 +2987,7 @@ fm10k_params_init(struct rte_eth_dev *dev)
 	hw->bus.payload = fm10k_bus_payload_256;
 
 	info->rx_vec_allowed = true;
+	info->sm_down = false;
 }
 
 static int
-- 
2.11.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2019-03-08 09:46:42.028024465 -0800
+++ 0035-net-fm10k-fix-internal-switch-initial-status.patch	2019-03-08 09:46:40.159400000 -0800
@@ -1,8 +1,10 @@
-From 04018a4552e630a2c019bade0c6b5f822aded0c1 Mon Sep 17 00:00:00 2001
+From b0682f05b1142808c8b8f53765316ca67bca5743 Mon Sep 17 00:00:00 2001
 From: Julien Meunier <julien.meunier@nokia.com>
 Date: Wed, 2 Jan 2019 17:57:45 +0200
 Subject: [PATCH] net/fm10k: fix internal switch initial status
 
+[ upstream commit 04018a4552e630a2c019bade0c6b5f822aded0c1 ]
+
 sm_down is a boolean in order to check if the internal switch of the
 fm10k is up or down. This variable is configured though an interrupt by
 fm10k_dev_interrupt_handler_pf.
@@ -16,7 +18,6 @@
 commit 6c9f37245583 ("net/fm10k: support switch restart on PF").
 
 Fixes: 6f22f2f67268 ("net/fm10k: redefine link status semantics")
-Cc: stable@dpdk.org
 
 Signed-off-by: Julien Meunier <julien.meunier@nokia.com>
 Acked-by: Xiao Wang <xiao.w.wang@intel.com>
@@ -25,10 +26,10 @@
  1 file changed, 1 insertion(+)
 
 diff --git a/drivers/net/fm10k/fm10k_ethdev.c b/drivers/net/fm10k/fm10k_ethdev.c
-index 85fb6c5cb..caf4d1bc0 100644
+index a0263f6d7..9ca57e582 100644
 --- a/drivers/net/fm10k/fm10k_ethdev.c
 +++ b/drivers/net/fm10k/fm10k_ethdev.c
-@@ -3003,6 +3003,7 @@ fm10k_params_init(struct rte_eth_dev *dev)
+@@ -2987,6 +2987,7 @@ fm10k_params_init(struct rte_eth_dev *dev)
  	hw->bus.payload = fm10k_bus_payload_256;
  
  	info->rx_vec_allowed = true;

^ permalink raw reply	[flat|nested] 75+ messages in thread

* [dpdk-stable] patch 'net/dpaa: fix secondary process' has been queued to LTS release 17.11.6
  2019-03-08 17:46 [dpdk-stable] patch 'net/bnx2x: cleanup info logs' has been queued to LTS release 17.11.6 Yongseok Koh
                   ` (33 preceding siblings ...)
  2019-03-08 17:47 ` [dpdk-stable] patch 'net/fm10k: fix internal switch initial status' " Yongseok Koh
@ 2019-03-08 17:47 ` Yongseok Koh
  2019-03-08 17:47 ` [dpdk-stable] patch 'examples/flow_filtering: fix example documentation' " Yongseok Koh
                   ` (34 subsequent siblings)
  69 siblings, 0 replies; 75+ messages in thread
From: Yongseok Koh @ 2019-03-08 17:47 UTC (permalink / raw)
  To: Hemant Agrawal; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.6

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objection by 03/13/19. So please
shout if anyone has objection.

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.

Yongseok

---
>From b3087191cd55379ec5468ce5c469fda03ed45f44 Mon Sep 17 00:00:00 2001
From: Hemant Agrawal <hemant.agrawal@nxp.com>
Date: Wed, 26 Dec 2018 11:33:51 +0000
Subject: [PATCH] net/dpaa: fix secondary process

[ upstream commit 7c0304f3fae2e900f0fd0332f0e1aeecc66404f6 ]

In order to support I/O from secondary process, the
burst APIs and OPS APIs shall be mapped/plugged. This
patch fixes the code to remap the ops and burst apis.

Fixes: ff9e112d7870 ("net/dpaa: add NXP DPAA PMD driver skeleton")

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
---
 drivers/net/dpaa/dpaa_ethdev.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/drivers/net/dpaa/dpaa_ethdev.c b/drivers/net/dpaa/dpaa_ethdev.c
index 02056bc66..8d3aeda92 100644
--- a/drivers/net/dpaa/dpaa_ethdev.c
+++ b/drivers/net/dpaa/dpaa_ethdev.c
@@ -844,8 +844,12 @@ dpaa_dev_init(struct rte_eth_dev *eth_dev)
 	PMD_INIT_FUNC_TRACE();
 
 	/* For secondary processes, the primary has done all the work */
-	if (rte_eal_process_type() != RTE_PROC_PRIMARY)
+	if (rte_eal_process_type() != RTE_PROC_PRIMARY) {
+		eth_dev->dev_ops = &dpaa_devops;
+		/* Plugging of UCODE burst API not supported in Secondary */
+		eth_dev->rx_pkt_burst = dpaa_eth_queue_rx;
 		return 0;
+	}
 
 	dpaa_device = DEV_TO_DPAA_DEVICE(eth_dev->device);
 	dev_id = dpaa_device->id.dev_id;
-- 
2.11.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2019-03-08 09:46:42.072509496 -0800
+++ 0036-net-dpaa-fix-secondary-process.patch	2019-03-08 09:46:40.163402000 -0800
@@ -1,14 +1,15 @@
-From 7c0304f3fae2e900f0fd0332f0e1aeecc66404f6 Mon Sep 17 00:00:00 2001
+From b3087191cd55379ec5468ce5c469fda03ed45f44 Mon Sep 17 00:00:00 2001
 From: Hemant Agrawal <hemant.agrawal@nxp.com>
 Date: Wed, 26 Dec 2018 11:33:51 +0000
 Subject: [PATCH] net/dpaa: fix secondary process
 
+[ upstream commit 7c0304f3fae2e900f0fd0332f0e1aeecc66404f6 ]
+
 In order to support I/O from secondary process, the
 burst APIs and OPS APIs shall be mapped/plugged. This
 patch fixes the code to remap the ops and burst apis.
 
 Fixes: ff9e112d7870 ("net/dpaa: add NXP DPAA PMD driver skeleton")
-Cc: stable@dpdk.org
 
 Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
 ---
@@ -16,10 +17,10 @@
  1 file changed, 5 insertions(+), 1 deletion(-)
 
 diff --git a/drivers/net/dpaa/dpaa_ethdev.c b/drivers/net/dpaa/dpaa_ethdev.c
-index d0572b3d9..5448a2ca7 100644
+index 02056bc66..8d3aeda92 100644
 --- a/drivers/net/dpaa/dpaa_ethdev.c
 +++ b/drivers/net/dpaa/dpaa_ethdev.c
-@@ -1223,8 +1223,12 @@ dpaa_dev_init(struct rte_eth_dev *eth_dev)
+@@ -844,8 +844,12 @@ dpaa_dev_init(struct rte_eth_dev *eth_dev)
  	PMD_INIT_FUNC_TRACE();
  
  	/* For secondary processes, the primary has done all the work */

^ permalink raw reply	[flat|nested] 75+ messages in thread

* [dpdk-stable] patch 'examples/flow_filtering: fix example documentation' has been queued to LTS release 17.11.6
  2019-03-08 17:46 [dpdk-stable] patch 'net/bnx2x: cleanup info logs' has been queued to LTS release 17.11.6 Yongseok Koh
                   ` (34 preceding siblings ...)
  2019-03-08 17:47 ` [dpdk-stable] patch 'net/dpaa: fix secondary process' " Yongseok Koh
@ 2019-03-08 17:47 ` Yongseok Koh
  2019-03-08 17:47 ` [dpdk-stable] patch 'doc: fix a parameter name in testpmd guide' " Yongseok Koh
                   ` (33 subsequent siblings)
  69 siblings, 0 replies; 75+ messages in thread
From: Yongseok Koh @ 2019-03-08 17:47 UTC (permalink / raw)
  To: Dekel Peled; +Cc: Ori Kam, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.6

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objection by 03/13/19. So please
shout if anyone has objection.

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.

Yongseok

---
>From 1efd83c353c23d516d19ca460e4b4046ee78033a Mon Sep 17 00:00:00 2001
From: Dekel Peled <dekelp@mellanox.com>
Date: Tue, 25 Dec 2018 09:42:18 +0200
Subject: [PATCH] examples/flow_filtering: fix example documentation

[ upstream commit d67b3f11d352544063fbdf2a8232563d88870d6a ]

Previous patch removed the VLAN item from example code.
This patch fixes the code and documentation accordingly.

Code update includes fix of comments, and removal of redundant
variables and their initialization.
Documentation update reflects the code changes done in previous
patch and in this patch.

Fixes: 9af4eb565710 ("examples/flow_filtering: remove VLAN item")

Signed-off-by: Dekel Peled <dekelp@mellanox.com>
Acked-by: Ori Kam <orika@mellanox.com>
---
 doc/guides/sample_app_ug/flow_filtering.rst | 74 +++++++----------------------
 examples/flow_filtering/flow_blocks.c       | 18 ++-----
 2 files changed, 21 insertions(+), 71 deletions(-)

diff --git a/doc/guides/sample_app_ug/flow_filtering.rst b/doc/guides/sample_app_ug/flow_filtering.rst
index 725dcb445..608663229 100644
--- a/doc/guides/sample_app_ug/flow_filtering.rst
+++ b/doc/guides/sample_app_ug/flow_filtering.rst
@@ -81,7 +81,7 @@ applications and the Environment Abstraction Layer (EAL) options.
 Explanation
 -----------
 
-The example is build from 2 main files,
+The example is built from 2 files,
 ``main.c`` which holds the example logic and ``flow_blocks.c`` that holds the
 implementation for building the flow rule.
 
@@ -378,13 +378,9 @@ This function is located in the ``flow_blocks.c`` file.
    {
            struct rte_flow_attr attr;
            struct rte_flow_item pattern[MAX_PATTERN_NUM];
-           struct rte_flow_action action[MAX_PATTERN_NUM];
+           struct rte_flow_action action[MAX_ACTION_NUM];
            struct rte_flow *flow = NULL;
            struct rte_flow_action_queue queue = { .index = rx_q };
-           struct rte_flow_item_eth eth_spec;
-           struct rte_flow_item_eth eth_mask;
-           struct rte_flow_item_vlan vlan_spec;
-           struct rte_flow_item_vlan vlan_mask;
            struct rte_flow_item_ipv4 ip_spec;
            struct rte_flow_item_ipv4 ip_mask;
 
@@ -402,37 +398,19 @@ This function is located in the ``flow_blocks.c`` file.
             * create the action sequence.
             * one action only,  move packet to queue
             */
-
            action[0].type = RTE_FLOW_ACTION_TYPE_QUEUE;
            action[0].conf = &queue;
            action[1].type = RTE_FLOW_ACTION_TYPE_END;
 
            /*
-            * set the first level of the pattern (eth).
+            * set the first level of the pattern (ETH).
             * since in this example we just want to get the
             * ipv4 we set this level to allow all.
             */
-           memset(&eth_spec, 0, sizeof(struct rte_flow_item_eth));
-           memset(&eth_mask, 0, sizeof(struct rte_flow_item_eth));
-           eth_spec.type = 0;
-           eth_mask.type = 0;
            pattern[0].type = RTE_FLOW_ITEM_TYPE_ETH;
-           pattern[0].spec = &eth_spec;
-           pattern[0].mask = &eth_mask;
-
-           /*
-            * setting the second level of the pattern (vlan).
-            * since in this example we just want to get the
-            * ipv4 we also set this level to allow all.
-            */
-           memset(&vlan_spec, 0, sizeof(struct rte_flow_item_vlan));
-           memset(&vlan_mask, 0, sizeof(struct rte_flow_item_vlan));
-           pattern[1].type = RTE_FLOW_ITEM_TYPE_VLAN;
-           pattern[1].spec = &vlan_spec;
-           pattern[1].mask = &vlan_mask;
 
            /*
-            * setting the third level of the pattern (ip).
+            * setting the second level of the pattern (IP).
             * in this example this is the level we care about
             * so we set it according to the parameters.
             */
@@ -442,12 +420,12 @@ This function is located in the ``flow_blocks.c`` file.
            ip_mask.hdr.dst_addr = dest_mask;
            ip_spec.hdr.src_addr = htonl(src_ip);
            ip_mask.hdr.src_addr = src_mask;
-           pattern[2].type = RTE_FLOW_ITEM_TYPE_IPV4;
-           pattern[2].spec = &ip_spec;
-           pattern[2].mask = &ip_mask;
+           pattern[1].type = RTE_FLOW_ITEM_TYPE_IPV4;
+           pattern[1].spec = &ip_spec;
+           pattern[1].mask = &ip_mask;
 
            /* the final level must be always type end */
-           pattern[3].type = RTE_FLOW_ITEM_TYPE_END;
+           pattern[2].type = RTE_FLOW_ITEM_TYPE_END;
 
            int res = rte_flow_validate(port_id, &attr, pattern, action, error);
            if(!res)
@@ -462,14 +440,10 @@ The first part of the function is declaring the structures that will be used.
 
    struct rte_flow_attr attr;
    struct rte_flow_item pattern[MAX_PATTERN_NUM];
-   struct rte_flow_action action[MAX_PATTERN_NUM];
+   struct rte_flow_action action[MAX_ACTION_NUM];
    struct rte_flow *flow;
    struct rte_flow_error error;
    struct rte_flow_action_queue queue = { .index = rx_q };
-   struct rte_flow_item_eth eth_spec;
-   struct rte_flow_item_eth eth_mask;
-   struct rte_flow_item_vlan vlan_spec;
-   struct rte_flow_item_vlan vlan_mask;
    struct rte_flow_item_ipv4 ip_spec;
    struct rte_flow_item_ipv4 ip_mask;
 
@@ -489,33 +463,17 @@ the rule. In this case send the packet to queue.
    action[0].conf = &queue;
    action[1].type = RTE_FLOW_ACTION_TYPE_END;
 
-The forth part is responsible for creating the pattern and is build from
-number of step. In each step we build one level of the pattern starting with
+The fourth part is responsible for creating the pattern and is built from
+number of steps. In each step we build one level of the pattern starting with
 the lowest one.
 
 Setting the first level of the pattern ETH:
 
 .. code-block:: c
 
-   memset(&eth_spec, 0, sizeof(struct rte_flow_item_eth));
-   memset(&eth_mask, 0, sizeof(struct rte_flow_item_eth));
-   eth_spec.type = 0;
-   eth_mask.type = 0;
    pattern[0].type = RTE_FLOW_ITEM_TYPE_ETH;
-   pattern[0].spec = &eth_spec;
-   pattern[0].mask = &eth_mask;
-
-Setting the second level of the pattern VLAN:
-
-.. code-block:: c
-
-   memset(&vlan_spec, 0, sizeof(struct rte_flow_item_vlan));
-   memset(&vlan_mask, 0, sizeof(struct rte_flow_item_vlan));
-   pattern[1].type = RTE_FLOW_ITEM_TYPE_VLAN;
-   pattern[1].spec = &vlan_spec;
-   pattern[1].mask = &vlan_mask;
 
-Setting the third level ip:
+Setting the second level of the pattern IP:
 
 .. code-block:: c
 
@@ -525,15 +483,15 @@ Setting the third level ip:
    ip_mask.hdr.dst_addr = dest_mask;
    ip_spec.hdr.src_addr = htonl(src_ip);
    ip_mask.hdr.src_addr = src_mask;
-   pattern[2].type = RTE_FLOW_ITEM_TYPE_IPV4;
-   pattern[2].spec = &ip_spec;
-   pattern[2].mask = &ip_mask;
+   pattern[1].type = RTE_FLOW_ITEM_TYPE_IPV4;
+   pattern[1].spec = &ip_spec;
+   pattern[1].mask = &ip_mask;
 
 Closing the pattern part.
 
 .. code-block:: c
 
-   pattern[3].type = RTE_FLOW_ITEM_TYPE_END;
+   pattern[2].type = RTE_FLOW_ITEM_TYPE_END;
 
 The last part of the function is to validate the rule and create it.
 
diff --git a/examples/flow_filtering/flow_blocks.c b/examples/flow_filtering/flow_blocks.c
index b71a42ff0..c1e482f04 100644
--- a/examples/flow_filtering/flow_blocks.c
+++ b/examples/flow_filtering/flow_blocks.c
@@ -30,7 +30,8 @@
  *   OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#define MAX_PATTERN_NUM		4
+#define MAX_PATTERN_NUM		3
+#define MAX_ACTION_NUM		2
 
 struct rte_flow *
 generate_ipv4_flow(uint8_t port_id, uint16_t rx_q,
@@ -69,11 +70,9 @@ generate_ipv4_flow(uint8_t port_id, uint16_t rx_q,
 {
 	struct rte_flow_attr attr;
 	struct rte_flow_item pattern[MAX_PATTERN_NUM];
-	struct rte_flow_action action[MAX_PATTERN_NUM];
+	struct rte_flow_action action[MAX_ACTION_NUM];
 	struct rte_flow *flow = NULL;
 	struct rte_flow_action_queue queue = { .index = rx_q };
-	struct rte_flow_item_eth eth_spec;
-	struct rte_flow_item_eth eth_mask;
 	struct rte_flow_item_ipv4 ip_spec;
 	struct rte_flow_item_ipv4 ip_mask;
 	int res;
@@ -92,26 +91,19 @@ generate_ipv4_flow(uint8_t port_id, uint16_t rx_q,
 	 * create the action sequence.
 	 * one action only,  move packet to queue
 	 */
-
 	action[0].type = RTE_FLOW_ACTION_TYPE_QUEUE;
 	action[0].conf = &queue;
 	action[1].type = RTE_FLOW_ACTION_TYPE_END;
 
 	/*
-	 * set the first level of the pattern (eth).
+	 * set the first level of the pattern (ETH).
 	 * since in this example we just want to get the
 	 * ipv4 we set this level to allow all.
 	 */
-	memset(&eth_spec, 0, sizeof(struct rte_flow_item_eth));
-	memset(&eth_mask, 0, sizeof(struct rte_flow_item_eth));
-	eth_spec.type = 0;
-	eth_mask.type = 0;
 	pattern[0].type = RTE_FLOW_ITEM_TYPE_ETH;
-	pattern[0].spec = &eth_spec;
-	pattern[0].mask = &eth_mask;
 
 	/*
-	 * setting the third level of the pattern (ip).
+	 * setting the second level of the pattern (IP).
 	 * in this example this is the level we care about
 	 * so we set it according to the parameters.
 	 */
-- 
2.11.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2019-03-08 09:46:42.117692049 -0800
+++ 0037-examples-flow_filtering-fix-example-documentation.patch	2019-03-08 09:46:40.170404000 -0800
@@ -1,8 +1,10 @@
-From d67b3f11d352544063fbdf2a8232563d88870d6a Mon Sep 17 00:00:00 2001
+From 1efd83c353c23d516d19ca460e4b4046ee78033a Mon Sep 17 00:00:00 2001
 From: Dekel Peled <dekelp@mellanox.com>
 Date: Tue, 25 Dec 2018 09:42:18 +0200
 Subject: [PATCH] examples/flow_filtering: fix example documentation
 
+[ upstream commit d67b3f11d352544063fbdf2a8232563d88870d6a ]
+
 Previous patch removed the VLAN item from example code.
 This patch fixes the code and documentation accordingly.
 
@@ -12,7 +14,6 @@
 patch and in this patch.
 
 Fixes: 9af4eb565710 ("examples/flow_filtering: remove VLAN item")
-Cc: stable@dpdk.org
 
 Signed-off-by: Dekel Peled <dekelp@mellanox.com>
 Acked-by: Ori Kam <orika@mellanox.com>
@@ -22,10 +23,10 @@
  2 files changed, 21 insertions(+), 71 deletions(-)
 
 diff --git a/doc/guides/sample_app_ug/flow_filtering.rst b/doc/guides/sample_app_ug/flow_filtering.rst
-index 840d557c5..9dba85acf 100644
+index 725dcb445..608663229 100644
 --- a/doc/guides/sample_app_ug/flow_filtering.rst
 +++ b/doc/guides/sample_app_ug/flow_filtering.rst
-@@ -53,7 +53,7 @@ applications and the Environment Abstraction Layer (EAL) options.
+@@ -81,7 +81,7 @@ applications and the Environment Abstraction Layer (EAL) options.
  Explanation
  -----------
  
@@ -34,7 +35,7 @@
  ``main.c`` which holds the example logic and ``flow_blocks.c`` that holds the
  implementation for building the flow rule.
  
-@@ -380,13 +380,9 @@ This function is located in the ``flow_blocks.c`` file.
+@@ -378,13 +378,9 @@ This function is located in the ``flow_blocks.c`` file.
     {
             struct rte_flow_attr attr;
             struct rte_flow_item pattern[MAX_PATTERN_NUM];
@@ -49,7 +50,7 @@
             struct rte_flow_item_ipv4 ip_spec;
             struct rte_flow_item_ipv4 ip_mask;
  
-@@ -404,37 +400,19 @@ This function is located in the ``flow_blocks.c`` file.
+@@ -402,37 +398,19 @@ This function is located in the ``flow_blocks.c`` file.
              * create the action sequence.
              * one action only,  move packet to queue
              */
@@ -89,7 +90,7 @@
              * in this example this is the level we care about
              * so we set it according to the parameters.
              */
-@@ -444,12 +422,12 @@ This function is located in the ``flow_blocks.c`` file.
+@@ -442,12 +420,12 @@ This function is located in the ``flow_blocks.c`` file.
             ip_mask.hdr.dst_addr = dest_mask;
             ip_spec.hdr.src_addr = htonl(src_ip);
             ip_mask.hdr.src_addr = src_mask;
@@ -106,7 +107,7 @@
  
             int res = rte_flow_validate(port_id, &attr, pattern, action, error);
             if(!res)
-@@ -464,14 +442,10 @@ The first part of the function is declaring the structures that will be used.
+@@ -462,14 +440,10 @@ The first part of the function is declaring the structures that will be used.
  
     struct rte_flow_attr attr;
     struct rte_flow_item pattern[MAX_PATTERN_NUM];
@@ -122,7 +123,7 @@
     struct rte_flow_item_ipv4 ip_spec;
     struct rte_flow_item_ipv4 ip_mask;
  
-@@ -491,33 +465,17 @@ the rule. In this case send the packet to queue.
+@@ -489,33 +463,17 @@ the rule. In this case send the packet to queue.
     action[0].conf = &queue;
     action[1].type = RTE_FLOW_ACTION_TYPE_END;
  
@@ -159,7 +160,7 @@
  
  .. code-block:: c
  
-@@ -527,15 +485,15 @@ Setting the third level ip:
+@@ -525,15 +483,15 @@ Setting the third level ip:
     ip_mask.hdr.dst_addr = dest_mask;
     ip_spec.hdr.src_addr = htonl(src_ip);
     ip_mask.hdr.src_addr = src_mask;
@@ -180,11 +181,11 @@
  The last part of the function is to validate the rule and create it.
  
 diff --git a/examples/flow_filtering/flow_blocks.c b/examples/flow_filtering/flow_blocks.c
-index bae711699..1edf6f9c6 100644
+index b71a42ff0..c1e482f04 100644
 --- a/examples/flow_filtering/flow_blocks.c
 +++ b/examples/flow_filtering/flow_blocks.c
-@@ -2,7 +2,8 @@
-  * Copyright 2017 Mellanox Technologies, Ltd
+@@ -30,7 +30,8 @@
+  *   OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
   */
  
 -#define MAX_PATTERN_NUM		4
@@ -192,8 +193,8 @@
 +#define MAX_ACTION_NUM		2
  
  struct rte_flow *
- generate_ipv4_flow(uint16_t port_id, uint16_t rx_q,
-@@ -41,11 +42,9 @@ generate_ipv4_flow(uint16_t port_id, uint16_t rx_q,
+ generate_ipv4_flow(uint8_t port_id, uint16_t rx_q,
+@@ -69,11 +70,9 @@ generate_ipv4_flow(uint8_t port_id, uint16_t rx_q,
  {
  	struct rte_flow_attr attr;
  	struct rte_flow_item pattern[MAX_PATTERN_NUM];
@@ -206,7 +207,7 @@
  	struct rte_flow_item_ipv4 ip_spec;
  	struct rte_flow_item_ipv4 ip_mask;
  	int res;
-@@ -64,26 +63,19 @@ generate_ipv4_flow(uint16_t port_id, uint16_t rx_q,
+@@ -92,26 +91,19 @@ generate_ipv4_flow(uint8_t port_id, uint16_t rx_q,
  	 * create the action sequence.
  	 * one action only,  move packet to queue
  	 */

^ permalink raw reply	[flat|nested] 75+ messages in thread

* [dpdk-stable] patch 'doc: fix a parameter name in testpmd guide' has been queued to LTS release 17.11.6
  2019-03-08 17:46 [dpdk-stable] patch 'net/bnx2x: cleanup info logs' has been queued to LTS release 17.11.6 Yongseok Koh
                   ` (35 preceding siblings ...)
  2019-03-08 17:47 ` [dpdk-stable] patch 'examples/flow_filtering: fix example documentation' " Yongseok Koh
@ 2019-03-08 17:47 ` Yongseok Koh
  2019-03-08 17:47 ` [dpdk-stable] patch 'app/testpmd: fix quit to stop all ports before close' " Yongseok Koh
                   ` (32 subsequent siblings)
  69 siblings, 0 replies; 75+ messages in thread
From: Yongseok Koh @ 2019-03-08 17:47 UTC (permalink / raw)
  To: Rami Rosen; +Cc: Bernard Iremonger, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.6

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objection by 03/13/19. So please
shout if anyone has objection.

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.

Yongseok

---
>From 0c41b3df2afa7d1eb0279d03d4288a7ab55f9efe Mon Sep 17 00:00:00 2001
From: Rami Rosen <ramirose@gmail.com>
Date: Fri, 4 Jan 2019 11:10:46 +0200
Subject: [PATCH] doc: fix a parameter name in testpmd guide

[ upstream commit 132a08b5879e4633f5a800c1774b36c26b72c5f3 ]

There is no parameter called "eth-peer-configfile" in testpmd.
It should be "eth-peers-configfile". See the usage() method in
app/test-pmd/parameters.c.

Fixes: a67857e97ba8 ("doc: clarify usage of testpmd MAC forward mode")

Signed-off-by: Rami Rosen <ramirose@gmail.com>
Acked-by: Bernard Iremonger <bernard.iremonger@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 3d7478e5f..2865f24b9 100644
--- a/doc/guides/testpmd_app_ug/testpmd_funcs.rst
+++ b/doc/guides/testpmd_app_ug/testpmd_funcs.rst
@@ -329,7 +329,7 @@ The available information categories are:
 * ``mac``: Changes the source and the destination Ethernet addresses of packets before forwarding them.
   Default application behaviour is to set source Ethernet address to that of the transmitting interface, and destination
   address to a dummy value (set during init). The user may specify a target destination Ethernet address via the 'eth-peer' or
-  'eth-peer-configfile' command-line options. It is not currently possible to specify a specific source Ethernet address.
+  'eth-peers-configfile' command-line options. It is not currently possible to specify a specific source Ethernet address.
 
 * ``macswap``: MAC swap forwarding mode.
   Swaps the source and the destination Ethernet addresses of packets before forwarding them.
-- 
2.11.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2019-03-08 09:46:42.161976918 -0800
+++ 0038-doc-fix-a-parameter-name-in-testpmd-guide.patch	2019-03-08 09:46:40.177400000 -0800
@@ -1,14 +1,15 @@
-From 132a08b5879e4633f5a800c1774b36c26b72c5f3 Mon Sep 17 00:00:00 2001
+From 0c41b3df2afa7d1eb0279d03d4288a7ab55f9efe Mon Sep 17 00:00:00 2001
 From: Rami Rosen <ramirose@gmail.com>
 Date: Fri, 4 Jan 2019 11:10:46 +0200
 Subject: [PATCH] doc: fix a parameter name in testpmd guide
 
+[ upstream commit 132a08b5879e4633f5a800c1774b36c26b72c5f3 ]
+
 There is no parameter called "eth-peer-configfile" in testpmd.
 It should be "eth-peers-configfile". See the usage() method in
 app/test-pmd/parameters.c.
 
 Fixes: a67857e97ba8 ("doc: clarify usage of testpmd MAC forward mode")
-Cc: stable@dpdk.org
 
 Signed-off-by: Rami Rosen <ramirose@gmail.com>
 Acked-by: Bernard Iremonger <bernard.iremonger@intel.com>
@@ -17,10 +18,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 ab40b9f5f..854af2d5f 100644
+index 3d7478e5f..2865f24b9 100644
 --- a/doc/guides/testpmd_app_ug/testpmd_funcs.rst
 +++ b/doc/guides/testpmd_app_ug/testpmd_funcs.rst
-@@ -304,7 +304,7 @@ The available information categories are:
+@@ -329,7 +329,7 @@ The available information categories are:
  * ``mac``: Changes the source and the destination Ethernet addresses of packets before forwarding them.
    Default application behaviour is to set source Ethernet address to that of the transmitting interface, and destination
    address to a dummy value (set during init). The user may specify a target destination Ethernet address via the 'eth-peer' or

^ permalink raw reply	[flat|nested] 75+ messages in thread

* [dpdk-stable] patch 'app/testpmd: fix quit to stop all ports before close' has been queued to LTS release 17.11.6
  2019-03-08 17:46 [dpdk-stable] patch 'net/bnx2x: cleanup info logs' has been queued to LTS release 17.11.6 Yongseok Koh
                   ` (36 preceding siblings ...)
  2019-03-08 17:47 ` [dpdk-stable] patch 'doc: fix a parameter name in testpmd guide' " Yongseok Koh
@ 2019-03-08 17:47 ` Yongseok Koh
  2019-03-08 17:47 ` [dpdk-stable] patch 'net/bonding: fix possible null pointer reference' " Yongseok Koh
                   ` (31 subsequent siblings)
  69 siblings, 0 replies; 75+ messages in thread
From: Yongseok Koh @ 2019-03-08 17:47 UTC (permalink / raw)
  To: Cristian Dumitrescu; +Cc: Bernard Iremonger, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.6

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objection by 03/13/19. So please
shout if anyone has objection.

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.

Yongseok

---
>From bd17e67a250440429cf289513c2fa048f3bd47a7 Mon Sep 17 00:00:00 2001
From: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
Date: Fri, 4 Jan 2019 12:28:33 +0000
Subject: [PATCH] app/testpmd: fix quit to stop all ports before close

[ upstream commit 08fd782b8454ab9019290d35f4e5334b4235923e ]

This patch proposes a slightly different test-pmd quit operation: stop
all devices before starting to close any device. Basically, stop all
moving parts before beginning to remove them. The current test-pmd quit
is stopping and closing each device before moving to the next device.

If all devices in the system are independent of each other, this
difference is usually not important. In case of Soft NIC devices, any
such virtual device typically depends on one or more physical devices
being alive, as it accesses their queues, so this difference becomes
important.

Without this straightforward fix, all the Soft NIC devices need to be
manually stopped before the quit command is issued, otherwise the quit
command can sometimes crash the test-pmd application.

Fixes: d3a274ce9dee ("app/testpmd: handle SIGINT and SIGTERM")

Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
Acked-by: Bernard Iremonger <bernard.iremonger@intel.com>
---
 app/test-pmd/testpmd.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c
index 0adebddc8..2d9ca04df 100644
--- a/app/test-pmd/testpmd.c
+++ b/app/test-pmd/testpmd.c
@@ -1965,9 +1965,13 @@ pmd_test_exit(void)
 	if (ports != NULL) {
 		no_link_check = 1;
 		RTE_ETH_FOREACH_DEV(pt_id) {
-			printf("\nShutting down port %d...\n", pt_id);
+			printf("\nStopping port %d...\n", pt_id);
 			fflush(stdout);
 			stop_port(pt_id);
+		}
+		RTE_ETH_FOREACH_DEV(pt_id) {
+			printf("\nShutting down port %d...\n", pt_id);
+			fflush(stdout);
 			close_port(pt_id);
 		}
 	}
-- 
2.11.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2019-03-08 09:46:42.206967683 -0800
+++ 0039-app-testpmd-fix-quit-to-stop-all-ports-before-close.patch	2019-03-08 09:46:40.183400000 -0800
@@ -1,8 +1,10 @@
-From 08fd782b8454ab9019290d35f4e5334b4235923e Mon Sep 17 00:00:00 2001
+From bd17e67a250440429cf289513c2fa048f3bd47a7 Mon Sep 17 00:00:00 2001
 From: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
 Date: Fri, 4 Jan 2019 12:28:33 +0000
 Subject: [PATCH] app/testpmd: fix quit to stop all ports before close
 
+[ upstream commit 08fd782b8454ab9019290d35f4e5334b4235923e ]
+
 This patch proposes a slightly different test-pmd quit operation: stop
 all devices before starting to close any device. Basically, stop all
 moving parts before beginning to remove them. The current test-pmd quit
@@ -19,7 +21,6 @@
 command can sometimes crash the test-pmd application.
 
 Fixes: d3a274ce9dee ("app/testpmd: handle SIGINT and SIGTERM")
-Cc: stable@dpdk.org
 
 Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
 Acked-by: Bernard Iremonger <bernard.iremonger@intel.com>
@@ -28,10 +29,10 @@
  1 file changed, 5 insertions(+), 1 deletion(-)
 
 diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c
-index 8d584b008..15a948828 100644
+index 0adebddc8..2d9ca04df 100644
 --- a/app/test-pmd/testpmd.c
 +++ b/app/test-pmd/testpmd.c
-@@ -2391,9 +2391,13 @@ pmd_test_exit(void)
+@@ -1965,9 +1965,13 @@ pmd_test_exit(void)
  	if (ports != NULL) {
  		no_link_check = 1;
  		RTE_ETH_FOREACH_DEV(pt_id) {
@@ -44,8 +45,8 @@
 +			printf("\nShutting down port %d...\n", pt_id);
 +			fflush(stdout);
  			close_port(pt_id);
- 
- 			/*
+ 		}
+ 	}
 -- 
 2.11.0
 

^ permalink raw reply	[flat|nested] 75+ messages in thread

* [dpdk-stable] patch 'net/bonding: fix possible null pointer reference' has been queued to LTS release 17.11.6
  2019-03-08 17:46 [dpdk-stable] patch 'net/bnx2x: cleanup info logs' has been queued to LTS release 17.11.6 Yongseok Koh
                   ` (37 preceding siblings ...)
  2019-03-08 17:47 ` [dpdk-stable] patch 'app/testpmd: fix quit to stop all ports before close' " Yongseok Koh
@ 2019-03-08 17:47 ` Yongseok Koh
  2019-03-08 17:47 ` [dpdk-stable] patch 'net/sfc: discard last seen VLAN TCI if Tx packet is dropped' " Yongseok Koh
                   ` (30 subsequent siblings)
  69 siblings, 0 replies; 75+ messages in thread
From: Yongseok Koh @ 2019-03-08 17:47 UTC (permalink / raw)
  To: Declan Doherty; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.6

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objection by 03/13/19. So please
shout if anyone has objection.

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.

Yongseok

---
>From e8201ea3bcd263b67fd09935490393a6cbd24db1 Mon Sep 17 00:00:00 2001
From: Declan Doherty <declan.doherty@intel.com>
Date: Tue, 8 Jan 2019 11:17:56 +0000
Subject: [PATCH] net/bonding: fix possible null pointer reference

[ upstream commit e6b8757bb72caa565d24282ad8e405f28e3a34a9 ]

In function check_for_bonded_ethdev the driver name is used without
validating the pointer references in the passed ethdev object.

Fixes: 740feaf349b1 ("ethdev: remove driver name from device private data")

Signed-off-by: Declan Doherty <declan.doherty@intel.com>
---
 drivers/net/bonding/rte_eth_bond_api.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/drivers/net/bonding/rte_eth_bond_api.c b/drivers/net/bonding/rte_eth_bond_api.c
index e80338aa2..f4ca0a3f6 100644
--- a/drivers/net/bonding/rte_eth_bond_api.c
+++ b/drivers/net/bonding/rte_eth_bond_api.c
@@ -48,7 +48,10 @@ int
 check_for_bonded_ethdev(const struct rte_eth_dev *eth_dev)
 {
 	/* Check valid pointer */
-	if (eth_dev->device->driver->name == NULL)
+	if (eth_dev == NULL ||
+		eth_dev->device == NULL ||
+		eth_dev->device->driver == NULL ||
+		eth_dev->device->driver->name == NULL)
 		return -1;
 
 	/* return 0 if driver name matches */
-- 
2.11.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2019-03-08 09:46:42.253155513 -0800
+++ 0040-net-bonding-fix-possible-null-pointer-reference.patch	2019-03-08 09:46:40.187402000 -0800
@@ -1,13 +1,14 @@
-From e6b8757bb72caa565d24282ad8e405f28e3a34a9 Mon Sep 17 00:00:00 2001
+From e8201ea3bcd263b67fd09935490393a6cbd24db1 Mon Sep 17 00:00:00 2001
 From: Declan Doherty <declan.doherty@intel.com>
 Date: Tue, 8 Jan 2019 11:17:56 +0000
 Subject: [PATCH] net/bonding: fix possible null pointer reference
 
+[ upstream commit e6b8757bb72caa565d24282ad8e405f28e3a34a9 ]
+
 In function check_for_bonded_ethdev the driver name is used without
 validating the pointer references in the passed ethdev object.
 
 Fixes: 740feaf349b1 ("ethdev: remove driver name from device private data")
-Cc: stable@dpdk.org
 
 Signed-off-by: Declan Doherty <declan.doherty@intel.com>
 ---
@@ -15,10 +16,10 @@
  1 file changed, 4 insertions(+), 1 deletion(-)
 
 diff --git a/drivers/net/bonding/rte_eth_bond_api.c b/drivers/net/bonding/rte_eth_bond_api.c
-index 21bcd5044..e5e146540 100644
+index e80338aa2..f4ca0a3f6 100644
 --- a/drivers/net/bonding/rte_eth_bond_api.c
 +++ b/drivers/net/bonding/rte_eth_bond_api.c
-@@ -19,7 +19,10 @@ int
+@@ -48,7 +48,10 @@ int
  check_for_bonded_ethdev(const struct rte_eth_dev *eth_dev)
  {
  	/* Check valid pointer */

^ permalink raw reply	[flat|nested] 75+ messages in thread

* [dpdk-stable] patch 'net/sfc: discard last seen VLAN TCI if Tx packet is dropped' has been queued to LTS release 17.11.6
  2019-03-08 17:46 [dpdk-stable] patch 'net/bnx2x: cleanup info logs' has been queued to LTS release 17.11.6 Yongseok Koh
                   ` (38 preceding siblings ...)
  2019-03-08 17:47 ` [dpdk-stable] patch 'net/bonding: fix possible null pointer reference' " Yongseok Koh
@ 2019-03-08 17:47 ` Yongseok Koh
  2019-03-08 17:47 ` [dpdk-stable] patch 'net/dpaa2: fix device init for secondary process' " Yongseok Koh
                   ` (29 subsequent siblings)
  69 siblings, 0 replies; 75+ messages in thread
From: Yongseok Koh @ 2019-03-08 17:47 UTC (permalink / raw)
  To: Ivan Malov; +Cc: Andrew Rybchenko, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.6

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objection by 03/13/19. So please
shout if anyone has objection.

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.

Yongseok

---
>From 8053aae348e1c7149fd5400cf63a5dc2e6e907b8 Mon Sep 17 00:00:00 2001
From: Ivan Malov <ivan.malov@oktetlabs.ru>
Date: Wed, 9 Jan 2019 11:06:39 +0000
Subject: [PATCH] net/sfc: discard last seen VLAN TCI if Tx packet is dropped

[ upstream commit 649885c08e51bcb8680ed2aa522d0f5160dd8fb1 ]

Early processing of a packet on transmit may change last seen
VLAN TCI in the queue context. If such a packet is eventually
dropped, last seen VLAN TCI must be set to its previous value.

Fixes: 7fd636815a43 ("net/sfc: support VLAN offload on transmit path")

Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
---
 drivers/net/sfc/sfc_tx.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/net/sfc/sfc_tx.c b/drivers/net/sfc/sfc_tx.c
index 9b1e6541e..2f03b8577 100644
--- a/drivers/net/sfc/sfc_tx.c
+++ b/drivers/net/sfc/sfc_tx.c
@@ -709,6 +709,7 @@ sfc_efx_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts, uint16_t nb_pkts)
 	for (pkts_sent = 0, pktp = &tx_pkts[0];
 	     (pkts_sent < nb_pkts) && (fill_level <= soft_max_fill);
 	     pkts_sent++, pktp++) {
+		uint16_t		hw_vlan_tci_prev = txq->hw_vlan_tci;
 		struct rte_mbuf		*m_seg = *pktp;
 		size_t			pkt_len = m_seg->pkt_len;
 		unsigned int		pkt_descs = 0;
@@ -747,6 +748,7 @@ sfc_efx_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts, uint16_t nb_pkts)
 				 * mbuf shouldn't be orphaned
 				 */
 				pend -= pkt_descs;
+				txq->hw_vlan_tci = hw_vlan_tci_prev;
 
 				rte_pktmbuf_free(*pktp);
 
@@ -816,10 +818,12 @@ sfc_efx_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts, uint16_t nb_pkts)
 				fill_level = added - txq->completed;
 				if (fill_level > hard_max_fill) {
 					pend -= pkt_descs;
+					txq->hw_vlan_tci = hw_vlan_tci_prev;
 					break;
 				}
 			} else {
 				pend -= pkt_descs;
+				txq->hw_vlan_tci = hw_vlan_tci_prev;
 				break;
 			}
 		}
-- 
2.11.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2019-03-08 09:46:42.296819856 -0800
+++ 0041-net-sfc-discard-last-seen-VLAN-TCI-if-Tx-packet-is-d.patch	2019-03-08 09:46:40.191405000 -0800
@@ -1,14 +1,15 @@
-From 649885c08e51bcb8680ed2aa522d0f5160dd8fb1 Mon Sep 17 00:00:00 2001
+From 8053aae348e1c7149fd5400cf63a5dc2e6e907b8 Mon Sep 17 00:00:00 2001
 From: Ivan Malov <ivan.malov@oktetlabs.ru>
 Date: Wed, 9 Jan 2019 11:06:39 +0000
 Subject: [PATCH] net/sfc: discard last seen VLAN TCI if Tx packet is dropped
 
+[ upstream commit 649885c08e51bcb8680ed2aa522d0f5160dd8fb1 ]
+
 Early processing of a packet on transmit may change last seen
 VLAN TCI in the queue context. If such a packet is eventually
 dropped, last seen VLAN TCI must be set to its previous value.
 
 Fixes: 7fd636815a43 ("net/sfc: support VLAN offload on transmit path")
-Cc: stable@dpdk.org
 
 Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru>
 Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
@@ -17,10 +18,10 @@
  1 file changed, 4 insertions(+)
 
 diff --git a/drivers/net/sfc/sfc_tx.c b/drivers/net/sfc/sfc_tx.c
-index cce823954..aa73d2642 100644
+index 9b1e6541e..2f03b8577 100644
 --- a/drivers/net/sfc/sfc_tx.c
 +++ b/drivers/net/sfc/sfc_tx.c
-@@ -712,6 +712,7 @@ sfc_efx_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts, uint16_t nb_pkts)
+@@ -709,6 +709,7 @@ sfc_efx_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts, uint16_t nb_pkts)
  	for (pkts_sent = 0, pktp = &tx_pkts[0];
  	     (pkts_sent < nb_pkts) && (fill_level <= soft_max_fill);
  	     pkts_sent++, pktp++) {
@@ -28,7 +29,7 @@
  		struct rte_mbuf		*m_seg = *pktp;
  		size_t			pkt_len = m_seg->pkt_len;
  		unsigned int		pkt_descs = 0;
-@@ -750,6 +751,7 @@ sfc_efx_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts, uint16_t nb_pkts)
+@@ -747,6 +748,7 @@ sfc_efx_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts, uint16_t nb_pkts)
  				 * mbuf shouldn't be orphaned
  				 */
  				pend -= pkt_descs;
@@ -36,7 +37,7 @@
  
  				rte_pktmbuf_free(*pktp);
  
-@@ -819,10 +821,12 @@ sfc_efx_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts, uint16_t nb_pkts)
+@@ -816,10 +818,12 @@ sfc_efx_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts, uint16_t nb_pkts)
  				fill_level = added - txq->completed;
  				if (fill_level > hard_max_fill) {
  					pend -= pkt_descs;

^ permalink raw reply	[flat|nested] 75+ messages in thread

* [dpdk-stable] patch 'net/dpaa2: fix device init for secondary process' has been queued to LTS release 17.11.6
  2019-03-08 17:46 [dpdk-stable] patch 'net/bnx2x: cleanup info logs' has been queued to LTS release 17.11.6 Yongseok Koh
                   ` (39 preceding siblings ...)
  2019-03-08 17:47 ` [dpdk-stable] patch 'net/sfc: discard last seen VLAN TCI if Tx packet is dropped' " Yongseok Koh
@ 2019-03-08 17:47 ` Yongseok Koh
  2019-03-08 17:47 ` [dpdk-stable] patch 'net/sfc: fix typo in preprocessor check' " Yongseok Koh
                   ` (28 subsequent siblings)
  69 siblings, 0 replies; 75+ messages in thread
From: Yongseok Koh @ 2019-03-08 17:47 UTC (permalink / raw)
  To: Shreyansh Jain; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.6

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objection by 03/13/19. So please
shout if anyone has objection.

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.

Yongseok

---
>From 855bafc419002232969887953333e052077f8764 Mon Sep 17 00:00:00 2001
From: Shreyansh Jain <shreyansh.jain@nxp.com>
Date: Fri, 11 Jan 2019 12:24:27 +0000
Subject: [PATCH] net/dpaa2: fix device init for secondary process

[ upstream commit e7b187db191901ebaf6ab0aefe3c13d53bd6ecf1 ]

In order to support I/O from secondary process, the
burst APIs and OPS APIs shall be mapped/plugged.

Fixes: c147eae01cb3 ("net/dpaa2: introduce NXP DPAA2 driver")

Signed-off-by: Shreyansh Jain <shreyansh.jain@nxp.com>
---
 drivers/net/dpaa2/dpaa2_ethdev.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/drivers/net/dpaa2/dpaa2_ethdev.c b/drivers/net/dpaa2/dpaa2_ethdev.c
index 0711baf10..d9f37dafb 100644
--- a/drivers/net/dpaa2/dpaa2_ethdev.c
+++ b/drivers/net/dpaa2/dpaa2_ethdev.c
@@ -1762,8 +1762,15 @@ dpaa2_dev_init(struct rte_eth_dev *eth_dev)
 	PMD_INIT_FUNC_TRACE();
 
 	/* For secondary processes, the primary has done all the work */
-	if (rte_eal_process_type() != RTE_PROC_PRIMARY)
+	if (rte_eal_process_type() != RTE_PROC_PRIMARY) {
+		/* In case of secondary, only burst and ops API need to be
+		 * plugged.
+		 */
+		eth_dev->dev_ops = &dpaa2_ethdev_ops;
+		eth_dev->rx_pkt_burst = dpaa2_dev_prefetch_rx;
+		eth_dev->tx_pkt_burst = dpaa2_dev_tx;
 		return 0;
+	}
 
 	dpaa2_dev = container_of(dev, struct rte_dpaa2_device, device);
 
-- 
2.11.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2019-03-08 09:46:42.339753705 -0800
+++ 0042-net-dpaa2-fix-device-init-for-secondary-process.patch	2019-03-08 09:46:40.202405000 -0800
@@ -1,13 +1,14 @@
-From e7b187db191901ebaf6ab0aefe3c13d53bd6ecf1 Mon Sep 17 00:00:00 2001
+From 855bafc419002232969887953333e052077f8764 Mon Sep 17 00:00:00 2001
 From: Shreyansh Jain <shreyansh.jain@nxp.com>
 Date: Fri, 11 Jan 2019 12:24:27 +0000
 Subject: [PATCH] net/dpaa2: fix device init for secondary process
 
+[ upstream commit e7b187db191901ebaf6ab0aefe3c13d53bd6ecf1 ]
+
 In order to support I/O from secondary process, the
 burst APIs and OPS APIs shall be mapped/plugged.
 
 Fixes: c147eae01cb3 ("net/dpaa2: introduce NXP DPAA2 driver")
-Cc: stable@dpdk.org
 
 Signed-off-by: Shreyansh Jain <shreyansh.jain@nxp.com>
 ---
@@ -15,10 +16,10 @@
  1 file changed, 8 insertions(+), 1 deletion(-)
 
 diff --git a/drivers/net/dpaa2/dpaa2_ethdev.c b/drivers/net/dpaa2/dpaa2_ethdev.c
-index 8d4ea1bca..39f85ae7b 100644
+index 0711baf10..d9f37dafb 100644
 --- a/drivers/net/dpaa2/dpaa2_ethdev.c
 +++ b/drivers/net/dpaa2/dpaa2_ethdev.c
-@@ -1918,8 +1918,15 @@ dpaa2_dev_init(struct rte_eth_dev *eth_dev)
+@@ -1762,8 +1762,15 @@ dpaa2_dev_init(struct rte_eth_dev *eth_dev)
  	PMD_INIT_FUNC_TRACE();
  
  	/* For secondary processes, the primary has done all the work */

^ permalink raw reply	[flat|nested] 75+ messages in thread

* [dpdk-stable] patch 'net/sfc: fix typo in preprocessor check' has been queued to LTS release 17.11.6
  2019-03-08 17:46 [dpdk-stable] patch 'net/bnx2x: cleanup info logs' has been queued to LTS release 17.11.6 Yongseok Koh
                   ` (40 preceding siblings ...)
  2019-03-08 17:47 ` [dpdk-stable] patch 'net/dpaa2: fix device init for secondary process' " Yongseok Koh
@ 2019-03-08 17:47 ` Yongseok Koh
  2019-03-08 17:47 ` [dpdk-stable] patch 'drivers: fix sprintf with snprintf' " Yongseok Koh
                   ` (27 subsequent siblings)
  69 siblings, 0 replies; 75+ messages in thread
From: Yongseok Koh @ 2019-03-08 17:47 UTC (permalink / raw)
  To: Andrew Rybchenko; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.6

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objection by 03/13/19. So please
shout if anyone has objection.

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.

Yongseok

---
>From 32f59d8d82b8facf146b0d3e75450e35c094c7f3 Mon Sep 17 00:00:00 2001
From: Andrew Rybchenko <arybchenko@solarflare.com>
Date: Sun, 13 Jan 2019 14:50:13 +0000
Subject: [PATCH] net/sfc: fix typo in preprocessor check

[ upstream commit c69f5e0cb1944e7699e64f8f476571a4e9b6acb9 ]

ISP2() macro function misspelled in a check just before it.

Fixes: e1b944598579 ("net/sfc: build libefx")

Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
---
 drivers/net/sfc/efsys.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/sfc/efsys.h b/drivers/net/sfc/efsys.h
index 5b52c2224..e858ad592 100644
--- a/drivers/net/sfc/efsys.h
+++ b/drivers/net/sfc/efsys.h
@@ -109,7 +109,7 @@ typedef bool boolean_t;
 #define P2ALIGN(_x, _a)		((_x) & -(_a))
 #endif
 
-#ifndef IS2P
+#ifndef ISP2
 #define ISP2(x)			rte_is_power_of_2(x)
 #endif
 
-- 
2.11.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2019-03-08 09:46:42.382680565 -0800
+++ 0043-net-sfc-fix-typo-in-preprocessor-check.patch	2019-03-08 09:46:40.206407000 -0800
@@ -1,12 +1,13 @@
-From c69f5e0cb1944e7699e64f8f476571a4e9b6acb9 Mon Sep 17 00:00:00 2001
+From 32f59d8d82b8facf146b0d3e75450e35c094c7f3 Mon Sep 17 00:00:00 2001
 From: Andrew Rybchenko <arybchenko@solarflare.com>
 Date: Sun, 13 Jan 2019 14:50:13 +0000
 Subject: [PATCH] net/sfc: fix typo in preprocessor check
 
+[ upstream commit c69f5e0cb1944e7699e64f8f476571a4e9b6acb9 ]
+
 ISP2() macro function misspelled in a check just before it.
 
 Fixes: e1b944598579 ("net/sfc: build libefx")
-Cc: stable@dpdk.org
 
 Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
 ---
@@ -14,10 +15,10 @@
  1 file changed, 1 insertion(+), 1 deletion(-)
 
 diff --git a/drivers/net/sfc/efsys.h b/drivers/net/sfc/efsys.h
-index 0b4795da1..f7bcc74d9 100644
+index 5b52c2224..e858ad592 100644
 --- a/drivers/net/sfc/efsys.h
 +++ b/drivers/net/sfc/efsys.h
-@@ -84,7 +84,7 @@ typedef bool boolean_t;
+@@ -109,7 +109,7 @@ typedef bool boolean_t;
  #define P2ALIGN(_x, _a)		((_x) & -(_a))
  #endif
  

^ permalink raw reply	[flat|nested] 75+ messages in thread

* [dpdk-stable] patch 'drivers: fix sprintf with snprintf' has been queued to LTS release 17.11.6
  2019-03-08 17:46 [dpdk-stable] patch 'net/bnx2x: cleanup info logs' has been queued to LTS release 17.11.6 Yongseok Koh
                   ` (41 preceding siblings ...)
  2019-03-08 17:47 ` [dpdk-stable] patch 'net/sfc: fix typo in preprocessor check' " Yongseok Koh
@ 2019-03-08 17:47 ` Yongseok Koh
  2019-03-08 17:47 ` [dpdk-stable] patch 'net/mlx5: fix instruction hotspot on replenishing Rx buffer' " Yongseok Koh
                   ` (26 subsequent siblings)
  69 siblings, 0 replies; 75+ messages in thread
From: Yongseok Koh @ 2019-03-08 17:47 UTC (permalink / raw)
  To: Pallantla Poornima; +Cc: Akhil Goyal, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.6

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objection by 03/13/19. So please
shout if anyone has objection.

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.

Yongseok

---
>From e2f0b6ae985d09c5c6b50ee9d262b0acb661c6b2 Mon Sep 17 00:00:00 2001
From: Pallantla Poornima <pallantlax.poornima@intel.com>
Date: Mon, 7 Jan 2019 10:46:23 +0000
Subject: [PATCH] drivers: fix sprintf with snprintf

[ backported from upstream commit a1e8241a919f7239d16e63fbc41549b2c951e1ae ]

sprintf function is not secure as it doesn't check the length of string.
More secure function snprintf is used

Fixes: 828d51d8fc ("bus/fslmc: refactor scan and probe functions")
Fixes: e5cbdfc537 ("crypto/dpaa2_sec: add basic operations")
Fixes: b23d4e898a ("crypto/dpaa2_sec: add per dev mempool to store FLE")
Fixes: 623326dded ("crypto/dpaa2_sec: introduce poll mode driver")
Fixes: 7e3e2954e0 ("crypto/dpaa_sec: move mempool allocation to config")
Fixes: c3e85bdcc6 ("crypto/dpaa_sec: add crypto driver for NXP DPAA platform")

Signed-off-by: Pallantla Poornima <pallantlax.poornima@intel.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
---
 drivers/bus/fslmc/fslmc_bus.c               | 4 ++--
 drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c | 8 +++++---
 drivers/crypto/dpaa_sec/dpaa_sec.c          | 3 ++-
 3 files changed, 9 insertions(+), 6 deletions(-)

diff --git a/drivers/bus/fslmc/fslmc_bus.c b/drivers/bus/fslmc/fslmc_bus.c
index 001e56ca1..b33a01e18 100644
--- a/drivers/bus/fslmc/fslmc_bus.c
+++ b/drivers/bus/fslmc/fslmc_bus.c
@@ -216,8 +216,8 @@ rte_fslmc_scan(void)
 		goto scan_fail;
 
 	/* Scan devices on the group */
-	sprintf(fslmc_dirpath, "%s/%d/devices", VFIO_IOMMU_GROUP_PATH,
-		groupid);
+	snprintf(fslmc_dirpath, sizeof(fslmc_dirpath), "%s/%d/devices",
+			VFIO_IOMMU_GROUP_PATH, groupid);
 	dir = opendir(fslmc_dirpath);
 	if (!dir) {
 		FSLMC_BUS_LOG(ERR, "Unable to open VFIO group dir.");
diff --git a/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c b/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
index 67fb6e24c..8de8ef8df 100644
--- a/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
+++ b/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
@@ -2326,14 +2326,15 @@ dpaa2_sec_dev_init(struct rte_cryptodev *cryptodev)
 			     retcode);
 		goto init_error;
 	}
-	sprintf(cryptodev->data->name, "dpsec-%u", hw_id);
+	snprintf(cryptodev->data->name, sizeof(cryptodev->data->name),
+			"dpsec-%u", hw_id);
 
 	internals->max_nb_queue_pairs = attr.num_tx_queues;
 	cryptodev->data->nb_queue_pairs = internals->max_nb_queue_pairs;
 	internals->hw = dpseci;
 	internals->token = token;
 
-	sprintf(str, "fle_pool_%d", cryptodev->data->dev_id);
+	snprintf(str, sizeof(str), "fle_pool_%d", cryptodev->data->dev_id);
 	internals->fle_pool = rte_mempool_create((const char *)str,
 			FLE_POOL_NUM_BUFS,
 			FLE_POOL_BUF_SIZE,
@@ -2364,7 +2365,8 @@ cryptodev_dpaa2_sec_probe(struct rte_dpaa2_driver *dpaa2_drv,
 
 	int retval;
 
-	sprintf(cryptodev_name, "dpsec-%d", dpaa2_dev->object_id);
+	snprintf(cryptodev_name, sizeof(cryptodev_name), "dpsec-%d",
+			dpaa2_dev->object_id);
 
 	cryptodev = rte_cryptodev_pmd_allocate(cryptodev_name, rte_socket_id());
 	if (cryptodev == NULL)
diff --git a/drivers/crypto/dpaa_sec/dpaa_sec.c b/drivers/crypto/dpaa_sec/dpaa_sec.c
index 438dd3bcf..09bce20b8 100644
--- a/drivers/crypto/dpaa_sec/dpaa_sec.c
+++ b/drivers/crypto/dpaa_sec/dpaa_sec.c
@@ -1460,7 +1460,8 @@ cryptodev_dpaa_sec_probe(struct rte_dpaa_driver *dpaa_drv,
 
 	int retval;
 
-	sprintf(cryptodev_name, "dpaa_sec-%d", dpaa_dev->id.dev_id);
+	snprintf(cryptodev_name, sizeof(cryptodev_name), "dpaa_sec-%d",
+			dpaa_dev->id.dev_id);
 
 	cryptodev = rte_cryptodev_pmd_allocate(cryptodev_name, rte_socket_id());
 	if (cryptodev == NULL)
-- 
2.11.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2019-03-08 09:46:42.425688716 -0800
+++ 0044-drivers-fix-sprintf-with-snprintf.patch	2019-03-08 09:46:40.216403000 -0800
@@ -1,38 +1,33 @@
-From a1e8241a919f7239d16e63fbc41549b2c951e1ae Mon Sep 17 00:00:00 2001
+From e2f0b6ae985d09c5c6b50ee9d262b0acb661c6b2 Mon Sep 17 00:00:00 2001
 From: Pallantla Poornima <pallantlax.poornima@intel.com>
 Date: Mon, 7 Jan 2019 10:46:23 +0000
 Subject: [PATCH] drivers: fix sprintf with snprintf
 
+[ backported from upstream commit a1e8241a919f7239d16e63fbc41549b2c951e1ae ]
+
 sprintf function is not secure as it doesn't check the length of string.
 More secure function snprintf is used
 
 Fixes: 828d51d8fc ("bus/fslmc: refactor scan and probe functions")
-Fixes: c22fab9a6c ("raw/dpaa2_qdma: support configuration APIs")
 Fixes: e5cbdfc537 ("crypto/dpaa2_sec: add basic operations")
 Fixes: b23d4e898a ("crypto/dpaa2_sec: add per dev mempool to store FLE")
 Fixes: 623326dded ("crypto/dpaa2_sec: introduce poll mode driver")
-Fixes: e7a45f3cc2 ("crypto/caam_jr: add UIO specific operations")
-Fixes: f44bccadd8 ("crypto/caam_jr: add device basic operations")
 Fixes: 7e3e2954e0 ("crypto/dpaa_sec: move mempool allocation to config")
 Fixes: c3e85bdcc6 ("crypto/dpaa_sec: add crypto driver for NXP DPAA platform")
-Cc: stable@dpdk.org
 
 Signed-off-by: Pallantla Poornima <pallantlax.poornima@intel.com>
 Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
 ---
- drivers/bus/fslmc/fslmc_bus.c               |  4 ++--
- drivers/crypto/caam_jr/caam_jr.c            |  2 +-
- drivers/crypto/caam_jr/caam_jr_uio.c        | 13 ++++++-------
- drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c |  8 +++++---
- drivers/crypto/dpaa_sec/dpaa_sec.c          |  5 +++--
- drivers/raw/dpaa2_qdma/dpaa2_qdma.c         |  2 +-
- 6 files changed, 18 insertions(+), 16 deletions(-)
+ drivers/bus/fslmc/fslmc_bus.c               | 4 ++--
+ drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c | 8 +++++---
+ drivers/crypto/dpaa_sec/dpaa_sec.c          | 3 ++-
+ 3 files changed, 9 insertions(+), 6 deletions(-)
 
 diff --git a/drivers/bus/fslmc/fslmc_bus.c b/drivers/bus/fslmc/fslmc_bus.c
-index fa1505377..44c0827ce 100644
+index 001e56ca1..b33a01e18 100644
 --- a/drivers/bus/fslmc/fslmc_bus.c
 +++ b/drivers/bus/fslmc/fslmc_bus.c
-@@ -297,8 +297,8 @@ rte_fslmc_scan(void)
+@@ -216,8 +216,8 @@ rte_fslmc_scan(void)
  		goto scan_fail;
  
  	/* Scan devices on the group */
@@ -42,57 +37,12 @@
 +			VFIO_IOMMU_GROUP_PATH, groupid);
  	dir = opendir(fslmc_dirpath);
  	if (!dir) {
- 		DPAA2_BUS_ERR("Unable to open VFIO group directory");
-diff --git a/drivers/crypto/caam_jr/caam_jr.c b/drivers/crypto/caam_jr/caam_jr.c
-index 45b281331..0263170fd 100644
---- a/drivers/crypto/caam_jr/caam_jr.c
-+++ b/drivers/crypto/caam_jr/caam_jr.c
-@@ -2011,7 +2011,7 @@ caam_jr_dev_configure(struct rte_cryptodev *dev,
- 	PMD_INIT_FUNC_TRACE();
- 
- 	internals = dev->data->dev_private;
--	sprintf(str, "ctx_pool_%d", dev->data->dev_id);
-+	snprintf(str, sizeof(str), "ctx_pool_%d", dev->data->dev_id);
- 	if (!internals->ctx_pool) {
- 		internals->ctx_pool = rte_mempool_create((const char *)str,
- 						CTX_POOL_NUM_BUFS,
-diff --git a/drivers/crypto/caam_jr/caam_jr_uio.c b/drivers/crypto/caam_jr/caam_jr_uio.c
-index d94101c2f..bf872a220 100644
---- a/drivers/crypto/caam_jr/caam_jr_uio.c
-+++ b/drivers/crypto/caam_jr/caam_jr_uio.c
-@@ -284,11 +284,11 @@ uio_map_registers(int uio_device_fd, int uio_device_id,
- 	memset(uio_map_size_str, 0, sizeof(uio_map_size_str));
- 
- 	/* Compose string: /sys/class/uio/uioX */
--	sprintf(uio_sys_root, "%s/%s%d", SEC_UIO_DEVICE_SYS_ATTR_PATH,
--		"uio", uio_device_id);
-+	snprintf(uio_sys_root, sizeof(uio_sys_root), "%s/%s%d",
-+			SEC_UIO_DEVICE_SYS_ATTR_PATH, "uio", uio_device_id);
- 	/* Compose string: maps/mapY */
--	sprintf(uio_sys_map_subdir, "%s%d", SEC_UIO_DEVICE_SYS_MAP_ATTR,
--		uio_map_id);
-+	snprintf(uio_sys_map_subdir, sizeof(uio_sys_map_subdir), "%s%d",
-+			SEC_UIO_DEVICE_SYS_MAP_ATTR, uio_map_id);
- 
- 	/* Read first (and only) line from file
- 	 * /sys/class/uio/uioX/maps/mapY/size
-@@ -389,9 +389,8 @@ uio_job_ring *config_job_ring(void)
- 
- 	/* Find UIO device created by SEC kernel driver for this job ring. */
- 	memset(uio_device_file_name, 0, sizeof(uio_device_file_name));
--
--	sprintf(uio_device_file_name, "%s%d", SEC_UIO_DEVICE_FILE_NAME,
--		job_ring->uio_minor_number);
-+	snprintf(uio_device_file_name, sizeof(uio_device_file_name), "%s%d",
-+			SEC_UIO_DEVICE_FILE_NAME, job_ring->uio_minor_number);
- 
- 	/* Open device file */
- 	job_ring->uio_fd = open(uio_device_file_name, O_RDWR);
+ 		FSLMC_BUS_LOG(ERR, "Unable to open VFIO group dir.");
 diff --git a/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c b/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
-index ef6e9c151..c2c22515d 100644
+index 67fb6e24c..8de8ef8df 100644
 --- a/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
 +++ b/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
-@@ -3371,14 +3371,15 @@ dpaa2_sec_dev_init(struct rte_cryptodev *cryptodev)
+@@ -2326,14 +2326,15 @@ dpaa2_sec_dev_init(struct rte_cryptodev *cryptodev)
  			     retcode);
  		goto init_error;
  	}
@@ -110,7 +60,7 @@
  	internals->fle_pool = rte_mempool_create((const char *)str,
  			FLE_POOL_NUM_BUFS,
  			FLE_POOL_BUF_SIZE,
-@@ -3409,7 +3410,8 @@ cryptodev_dpaa2_sec_probe(struct rte_dpaa2_driver *dpaa2_drv __rte_unused,
+@@ -2364,7 +2365,8 @@ cryptodev_dpaa2_sec_probe(struct rte_dpaa2_driver *dpaa2_drv,
  
  	int retval;
  
@@ -121,19 +71,10 @@
  	cryptodev = rte_cryptodev_pmd_allocate(cryptodev_name, rte_socket_id());
  	if (cryptodev == NULL)
 diff --git a/drivers/crypto/dpaa_sec/dpaa_sec.c b/drivers/crypto/dpaa_sec/dpaa_sec.c
-index 5caceef3f..39533a9cc 100644
+index 438dd3bcf..09bce20b8 100644
 --- a/drivers/crypto/dpaa_sec/dpaa_sec.c
 +++ b/drivers/crypto/dpaa_sec/dpaa_sec.c
-@@ -2469,7 +2469,7 @@ dpaa_sec_dev_configure(struct rte_cryptodev *dev,
- 	PMD_INIT_FUNC_TRACE();
- 
- 	internals = dev->data->dev_private;
--	sprintf(str, "ctx_pool_%d", dev->data->dev_id);
-+	snprintf(str, sizeof(str), "ctx_pool_%d", dev->data->dev_id);
- 	if (!internals->ctx_pool) {
- 		internals->ctx_pool = rte_mempool_create((const char *)str,
- 							CTX_POOL_NUM_BUFS,
-@@ -2675,7 +2675,8 @@ cryptodev_dpaa_sec_probe(struct rte_dpaa_driver *dpaa_drv __rte_unused,
+@@ -1460,7 +1460,8 @@ cryptodev_dpaa_sec_probe(struct rte_dpaa_driver *dpaa_drv,
  
  	int retval;
  
@@ -143,19 +84,6 @@
  
  	cryptodev = rte_cryptodev_pmd_allocate(cryptodev_name, rte_socket_id());
  	if (cryptodev == NULL)
-diff --git a/drivers/raw/dpaa2_qdma/dpaa2_qdma.c b/drivers/raw/dpaa2_qdma/dpaa2_qdma.c
-index f474442d4..60621eb85 100644
---- a/drivers/raw/dpaa2_qdma/dpaa2_qdma.c
-+++ b/drivers/raw/dpaa2_qdma/dpaa2_qdma.c
-@@ -313,7 +313,7 @@ rte_qdma_vq_create(uint32_t lcore_id, uint32_t flags)
- 		qdma_vqs[i].exclusive_hw_queue = 1;
- 	} else {
- 		/* Allocate a Ring for Virutal Queue in VQ mode */
--		sprintf(ring_name, "status ring %d", i);
-+		snprintf(ring_name, sizeof(ring_name), "status ring %d", i);
- 		qdma_vqs[i].status_ring = rte_ring_create(ring_name,
- 			qdma_dev.fle_pool_count, rte_socket_id(), 0);
- 		if (!qdma_vqs[i].status_ring) {
 -- 
 2.11.0
 

^ permalink raw reply	[flat|nested] 75+ messages in thread

* [dpdk-stable] patch 'net/mlx5: fix instruction hotspot on replenishing Rx buffer' has been queued to LTS release 17.11.6
  2019-03-08 17:46 [dpdk-stable] patch 'net/bnx2x: cleanup info logs' has been queued to LTS release 17.11.6 Yongseok Koh
                   ` (42 preceding siblings ...)
  2019-03-08 17:47 ` [dpdk-stable] patch 'drivers: fix sprintf with snprintf' " Yongseok Koh
@ 2019-03-08 17:47 ` Yongseok Koh
  2019-03-08 17:47 ` [dpdk-stable] patch 'examples/tep_term: remove unused constant' " Yongseok Koh
                   ` (25 subsequent siblings)
  69 siblings, 0 replies; 75+ messages in thread
From: Yongseok Koh @ 2019-03-08 17:47 UTC (permalink / raw)
  To: Yongseok Koh; +Cc: Shahaf Shuler, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.6

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objection by 03/13/19. So please
shout if anyone has objection.

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.

Yongseok

---
>From 11c39d0780379ffd44ba81c9f0f93bd15d4505c8 Mon Sep 17 00:00:00 2001
From: Yongseok Koh <yskoh@mellanox.com>
Date: Mon, 14 Jan 2019 13:16:22 -0800
Subject: [PATCH] net/mlx5: fix instruction hotspot on replenishing Rx buffer

[ backported from upstream commit 12d468a62bc19ca08ee9964dcb923f67f87fba7d ]

On replenishing Rx buffers for vectorized Rx, mbuf->buf_addr isn't needed
to be accessed as it is static and easily calculated from the mbuf address.
Accessing the mbuf content causes unnecessary load stall and it is worsened
on ARM.

Fixes: 545b884b1da3 ("net/mlx5: fix buffer address posting in SSE Rx")

Signed-off-by: Yongseok Koh <yskoh@mellanox.com>
Acked-by: Shahaf Shuler <shahafs@mellanox.com>
---
 drivers/net/mlx5/mlx5_rxtx_vec.h | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/drivers/net/mlx5/mlx5_rxtx_vec.h b/drivers/net/mlx5/mlx5_rxtx_vec.h
index 750559b8d..59ae83b56 100644
--- a/drivers/net/mlx5/mlx5_rxtx_vec.h
+++ b/drivers/net/mlx5/mlx5_rxtx_vec.h
@@ -116,8 +116,12 @@ mlx5_rx_replenish_bulk_mbuf(struct mlx5_rxq_data *rxq, uint16_t n)
 		return;
 	}
 	for (i = 0; i < n; ++i) {
-		wq[i].addr = rte_cpu_to_be_64((uintptr_t)elts[i]->buf_addr +
-					      RTE_PKTMBUF_HEADROOM);
+		uintptr_t buf_addr =
+			(uintptr_t)elts[i] + sizeof(struct rte_mbuf) +
+			rte_pktmbuf_priv_size(rxq->mp);
+
+		assert(buf_addr == (uintptr_t)elts[i]->buf_addr);
+		wq[i].addr = rte_cpu_to_be_64(buf_addr + RTE_PKTMBUF_HEADROOM);
 		/* If there's only one MR, no need to replace LKEY in WQEs. */
 		if (unlikely(!IS_SINGLE_MR(rxq->mr_ctrl.bh_n)))
 			wq[i].lkey = mlx5_rx_mb2mr(rxq, elts[i]);
-- 
2.11.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2019-03-08 09:46:42.476434526 -0800
+++ 0045-net-mlx5-fix-instruction-hotspot-on-replenishing-Rx-.patch	2019-03-08 09:46:40.220409000 -0800
@@ -1,38 +1,42 @@
-From 12d468a62bc19ca08ee9964dcb923f67f87fba7d Mon Sep 17 00:00:00 2001
+From 11c39d0780379ffd44ba81c9f0f93bd15d4505c8 Mon Sep 17 00:00:00 2001
 From: Yongseok Koh <yskoh@mellanox.com>
 Date: Mon, 14 Jan 2019 13:16:22 -0800
 Subject: [PATCH] net/mlx5: fix instruction hotspot on replenishing Rx buffer
 
+[ backported from upstream commit 12d468a62bc19ca08ee9964dcb923f67f87fba7d ]
+
 On replenishing Rx buffers for vectorized Rx, mbuf->buf_addr isn't needed
 to be accessed as it is static and easily calculated from the mbuf address.
 Accessing the mbuf content causes unnecessary load stall and it is worsened
 on ARM.
 
 Fixes: 545b884b1da3 ("net/mlx5: fix buffer address posting in SSE Rx")
-Cc: stable@dpdk.org
 
 Signed-off-by: Yongseok Koh <yskoh@mellanox.com>
 Acked-by: Shahaf Shuler <shahafs@mellanox.com>
 ---
- drivers/net/mlx5/mlx5_rxtx_vec.h | 5 ++++-
- 1 file changed, 4 insertions(+), 1 deletion(-)
+ drivers/net/mlx5/mlx5_rxtx_vec.h | 8 ++++++--
+ 1 file changed, 6 insertions(+), 2 deletions(-)
 
 diff --git a/drivers/net/mlx5/mlx5_rxtx_vec.h b/drivers/net/mlx5/mlx5_rxtx_vec.h
-index fda7004e2..5df8e291e 100644
+index 750559b8d..59ae83b56 100644
 --- a/drivers/net/mlx5/mlx5_rxtx_vec.h
 +++ b/drivers/net/mlx5/mlx5_rxtx_vec.h
-@@ -102,7 +102,10 @@ mlx5_rx_replenish_bulk_mbuf(struct mlx5_rxq_data *rxq, uint16_t n)
+@@ -116,8 +116,12 @@ mlx5_rx_replenish_bulk_mbuf(struct mlx5_rxq_data *rxq, uint16_t n)
  		return;
  	}
  	for (i = 0; i < n; ++i) {
 -		wq[i].addr = rte_cpu_to_be_64((uintptr_t)elts[i]->buf_addr +
-+		void *buf_addr = rte_mbuf_buf_addr(elts[i], rxq->mp);
+-					      RTE_PKTMBUF_HEADROOM);
++		uintptr_t buf_addr =
++			(uintptr_t)elts[i] + sizeof(struct rte_mbuf) +
++			rte_pktmbuf_priv_size(rxq->mp);
 +
-+		assert(buf_addr == elts[i]->buf_addr);
-+		wq[i].addr = rte_cpu_to_be_64((uintptr_t)buf_addr +
- 					      RTE_PKTMBUF_HEADROOM);
- 		/* If there's only one MR, no need to replace LKey in WQE. */
- 		if (unlikely(mlx5_mr_btree_len(&rxq->mr_ctrl.cache_bh) > 1))
++		assert(buf_addr == (uintptr_t)elts[i]->buf_addr);
++		wq[i].addr = rte_cpu_to_be_64(buf_addr + RTE_PKTMBUF_HEADROOM);
+ 		/* If there's only one MR, no need to replace LKEY in WQEs. */
+ 		if (unlikely(!IS_SINGLE_MR(rxq->mr_ctrl.bh_n)))
+ 			wq[i].lkey = mlx5_rx_mb2mr(rxq, elts[i]);
 -- 
 2.11.0
 

^ permalink raw reply	[flat|nested] 75+ messages in thread

* [dpdk-stable] patch 'examples/tep_term: remove unused constant' has been queued to LTS release 17.11.6
  2019-03-08 17:46 [dpdk-stable] patch 'net/bnx2x: cleanup info logs' has been queued to LTS release 17.11.6 Yongseok Koh
                   ` (43 preceding siblings ...)
  2019-03-08 17:47 ` [dpdk-stable] patch 'net/mlx5: fix instruction hotspot on replenishing Rx buffer' " Yongseok Koh
@ 2019-03-08 17:47 ` Yongseok Koh
  2019-03-08 17:47 ` [dpdk-stable] patch 'eal: fix core number validation' " Yongseok Koh
                   ` (24 subsequent siblings)
  69 siblings, 0 replies; 75+ messages in thread
From: Yongseok Koh @ 2019-03-08 17:47 UTC (permalink / raw)
  To: Rami Rosen; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.6

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objection by 03/13/19. So please
shout if anyone has objection.

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.

Yongseok

---
>From 3ad5ad495e67d2818ae15f04fe9448cdcb5a3144 Mon Sep 17 00:00:00 2001
From: Rami Rosen <ramirose@gmail.com>
Date: Sun, 13 Jan 2019 17:02:12 +0200
Subject: [PATCH] examples/tep_term: remove unused constant

[ upstream commit c8516e3caa711ef42132d5b08b7c755b86c6e0c3 ]

The  definition of MAX_PRINT_BUFF in examples/tep_termination/main.c
is not necessary as it is not used. This cleanup patch removes it.

Fixes: a50245ede72a ("examples/tep_term: initialize VXLAN sample")

Signed-off-by: Rami Rosen <ramirose@gmail.com>
---
 examples/tep_termination/main.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/examples/tep_termination/main.c b/examples/tep_termination/main.c
index a14d2e379..83925ec08 100644
--- a/examples/tep_termination/main.c
+++ b/examples/tep_termination/main.c
@@ -100,9 +100,6 @@
 
 #define INVALID_PORT_ID 0xFFFF
 
-/* Size of buffers used for snprintfs. */
-#define MAX_PRINT_BUFF 6072
-
 /* Maximum character device basename size. */
 #define MAX_BASENAME_SZ 20
 
-- 
2.11.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2019-03-08 09:46:42.518743788 -0800
+++ 0046-examples-tep_term-remove-unused-constant.patch	2019-03-08 09:46:40.224402000 -0800
@@ -1,13 +1,14 @@
-From c8516e3caa711ef42132d5b08b7c755b86c6e0c3 Mon Sep 17 00:00:00 2001
+From 3ad5ad495e67d2818ae15f04fe9448cdcb5a3144 Mon Sep 17 00:00:00 2001
 From: Rami Rosen <ramirose@gmail.com>
 Date: Sun, 13 Jan 2019 17:02:12 +0200
 Subject: [PATCH] examples/tep_term: remove unused constant
 
+[ upstream commit c8516e3caa711ef42132d5b08b7c755b86c6e0c3 ]
+
 The  definition of MAX_PRINT_BUFF in examples/tep_termination/main.c
 is not necessary as it is not used. This cleanup patch removes it.
 
 Fixes: a50245ede72a ("examples/tep_term: initialize VXLAN sample")
-Cc: stable@dpdk.org
 
 Signed-off-by: Rami Rosen <ramirose@gmail.com>
 ---
@@ -15,10 +16,10 @@
  1 file changed, 3 deletions(-)
 
 diff --git a/examples/tep_termination/main.c b/examples/tep_termination/main.c
-index 7795d0894..d6379e31e 100644
+index a14d2e379..83925ec08 100644
 --- a/examples/tep_termination/main.c
 +++ b/examples/tep_termination/main.c
-@@ -71,9 +71,6 @@
+@@ -100,9 +100,6 @@
  
  #define INVALID_PORT_ID 0xFFFF
  

^ permalink raw reply	[flat|nested] 75+ messages in thread

* [dpdk-stable] patch 'eal: fix core number validation' has been queued to LTS release 17.11.6
  2019-03-08 17:46 [dpdk-stable] patch 'net/bnx2x: cleanup info logs' has been queued to LTS release 17.11.6 Yongseok Koh
                   ` (44 preceding siblings ...)
  2019-03-08 17:47 ` [dpdk-stable] patch 'examples/tep_term: remove unused constant' " Yongseok Koh
@ 2019-03-08 17:47 ` Yongseok Koh
  2019-03-08 17:47 ` [dpdk-stable] patch 'eal: fix out of bound access when no CPU available' " Yongseok Koh
                   ` (23 subsequent siblings)
  69 siblings, 0 replies; 75+ messages in thread
From: Yongseok Koh @ 2019-03-08 17:47 UTC (permalink / raw)
  To: Hari Kumar Vemula; +Cc: David Marchand, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.6

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objection by 03/13/19. So please
shout if anyone has objection.

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.

Yongseok

---
>From 678ca0f7c98a91b6e032fac0fb2a36839fd3229f Mon Sep 17 00:00:00 2001
From: Hari Kumar Vemula <hari.kumarx.vemula@intel.com>
Date: Thu, 17 Jan 2019 12:13:12 +0000
Subject: [PATCH] eal: fix core number validation

[ upstream commit b38693b612b4cabb7cb38a4eeb036285b2b55b0b ]

When incorrect core value or range provided,
as part of -l command line option, a crash occurs.

Added valid range checks to fix the crash.

Added ut check for negative core values.
Added unit test case for invalid core number range.

Fixes: d888cb8b9613 ("eal: add core list input format")

Signed-off-by: Hari Kumar Vemula <hari.kumarx.vemula@intel.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>
---
 lib/librte_eal/common/eal_common_options.c |  9 ++++-
 test/test/test_eal_flags.c                 | 61 +++++++++++++++++++-----------
 2 files changed, 45 insertions(+), 25 deletions(-)

diff --git a/lib/librte_eal/common/eal_common_options.c b/lib/librte_eal/common/eal_common_options.c
index c7eb056b2..dd446a5ad 100644
--- a/lib/librte_eal/common/eal_common_options.c
+++ b/lib/librte_eal/common/eal_common_options.c
@@ -558,7 +558,9 @@ eal_parse_corelist(const char *corelist)
 		if (*corelist == '\0')
 			return -1;
 		errno = 0;
-		idx = strtoul(corelist, &end, 10);
+		idx = strtol(corelist, &end, 10);
+		if (idx < 0 || idx >= (int)cfg->lcore_count)
+			return -1;
 		if (errno || end == NULL)
 			return -1;
 		while (isblank(*end))
@@ -1000,6 +1002,7 @@ eal_parse_common_option(int opt, const char *optarg,
 {
 	static int b_used;
 	static int w_used;
+	struct rte_config *cfg = rte_eal_get_configuration();
 
 	switch (opt) {
 	/* blacklist */
@@ -1033,7 +1036,9 @@ eal_parse_common_option(int opt, const char *optarg,
 	/* corelist */
 	case 'l':
 		if (eal_parse_corelist(optarg) < 0) {
-			RTE_LOG(ERR, EAL, "invalid core list\n");
+			RTE_LOG(ERR, EAL,
+				"invalid core list, please check core numbers are in [0, %u] range\n",
+					cfg->lcore_count-1);
 			return -1;
 		}
 		core_parsed = 1;
diff --git a/test/test/test_eal_flags.c b/test/test/test_eal_flags.c
index e82bb963a..55bbe717e 100644
--- a/test/test/test_eal_flags.c
+++ b/test/test/test_eal_flags.c
@@ -46,6 +46,7 @@
 #include <sys/file.h>
 #include <limits.h>
 
+#include <rte_per_lcore.h>
 #include <rte_debug.h>
 #include <rte_string_fns.h>
 
@@ -529,40 +530,50 @@ test_missing_c_flag(void)
 				"-n", "3", "-l", "1," };
 	const char *argv10[] = { prgname, prefix, mp_flag,
 				 "-n", "3", "-l", "1#2" };
+	/* core number is negative value */
+	const char * const argv11[] = { prgname, prefix, mp_flag,
+				"-n", "3", "-l", "-5" };
+	const char * const argv12[] = { prgname, prefix, mp_flag,
+				"-n", "3", "-l", "-5-7" };
+	/* core number is maximum value */
+	const char * const argv13[] = { prgname, prefix, mp_flag,
+				"-n", "3", "-l", RTE_STR(RTE_MAX_LCORE) };
+	const char * const argv14[] = { prgname, prefix, mp_flag,
+				"-n", "3", "-l", "1-"RTE_STR(RTE_MAX_LCORE) };
 	/* sanity check test - valid corelist value */
-	const char *argv11[] = { prgname, prefix, mp_flag,
+	const char * const argv15[] = { prgname, prefix, mp_flag,
 				 "-n", "3", "-l", "1-2,3" };
 
 	/* --lcores flag but no lcores value */
-	const char *argv12[] = { prgname, prefix, mp_flag,
+	const char * const argv16[] = { prgname, prefix, mp_flag,
 				 "-n", "3", "--lcores" };
-	const char *argv13[] = { prgname, prefix, mp_flag,
+	const char * const argv17[] = { prgname, prefix, mp_flag,
 				 "-n", "3", "--lcores", " " };
 	/* bad lcores value */
-	const char *argv14[] = { prgname, prefix, mp_flag,
+	const char * const argv18[] = { prgname, prefix, mp_flag,
 				 "-n", "3", "--lcores", "1-3-5" };
-	const char *argv15[] = { prgname, prefix, mp_flag,
+	const char * const argv19[] = { prgname, prefix, mp_flag,
 				 "-n", "3", "--lcores", "0-1,,2" };
-	const char *argv16[] = { prgname, prefix, mp_flag,
+	const char * const argv20[] = { prgname, prefix, mp_flag,
 				 "-n", "3", "--lcores", "0-,1" };
-	const char *argv17[] = { prgname, prefix, mp_flag,
+	const char * const argv21[] = { prgname, prefix, mp_flag,
 				 "-n", "3", "--lcores", "(0-,2-4)" };
-	const char *argv18[] = { prgname, prefix, mp_flag,
+	const char * const argv22[] = { prgname, prefix, mp_flag,
 				 "-n", "3", "--lcores", "(-1,2)" };
-	const char *argv19[] = { prgname, prefix, mp_flag,
+	const char * const argv23[] = { prgname, prefix, mp_flag,
 				 "-n", "3", "--lcores", "(2-4)@(2-4-6)" };
-	const char *argv20[] = { prgname, prefix, mp_flag,
+	const char * const argv24[] = { prgname, prefix, mp_flag,
 				 "-n", "3", "--lcores", "(a,2)" };
-	const char *argv21[] = { prgname, prefix, mp_flag,
+	const char * const argv25[] = { prgname, prefix, mp_flag,
 				 "-n", "3", "--lcores", "1-3@(1,3)" };
-	const char *argv22[] = { prgname, prefix, mp_flag,
+	const char * const argv26[] = { prgname, prefix, mp_flag,
 				 "-n", "3", "--lcores", "3@((1,3)" };
-	const char *argv23[] = { prgname, prefix, mp_flag,
+	const char * const argv27[] = { prgname, prefix, mp_flag,
 				 "-n", "3", "--lcores", "(4-7)=(1,3)" };
-	const char *argv24[] = { prgname, prefix, mp_flag,
+	const char * const argv28[] = { prgname, prefix, mp_flag,
 				 "-n", "3", "--lcores", "[4-7]@(1,3)" };
 	/* sanity check of tests - valid lcores value */
-	const char *argv25[] = { prgname, prefix, mp_flag,
+	const char * const argv29[] = { prgname, prefix, mp_flag,
 				 "-n", "3", "--lcores",
 				 "0-1,2@(5-7),(3-5)@(0,2),(0,6),7"};
 
@@ -590,31 +601,35 @@ test_missing_c_flag(void)
 			|| launch_proc(argv7) == 0
 			|| launch_proc(argv8) == 0
 			|| launch_proc(argv9) == 0
-			|| launch_proc(argv10) == 0) {
+			|| launch_proc(argv10) == 0
+			|| launch_proc(argv11) == 0
+			|| launch_proc(argv12) == 0
+			|| launch_proc(argv13) == 0
+			|| launch_proc(argv14) == 0) {
 		printf("Error - "
 		       "process ran without error with invalid -l flag\n");
 		return -1;
 	}
-	if (launch_proc(argv11) != 0) {
+	if (launch_proc(argv15) != 0) {
 		printf("Error - "
 		       "process did not run ok with valid corelist value\n");
 		return -1;
 	}
 
 	/* start --lcores tests */
-	if (launch_proc(argv12) == 0 || launch_proc(argv13) == 0 ||
-	    launch_proc(argv14) == 0 || launch_proc(argv15) == 0 ||
-	    launch_proc(argv16) == 0 || launch_proc(argv17) == 0 ||
+	if (launch_proc(argv16) == 0 || launch_proc(argv17) == 0 ||
 	    launch_proc(argv18) == 0 || launch_proc(argv19) == 0 ||
 	    launch_proc(argv20) == 0 || launch_proc(argv21) == 0 ||
-	    launch_proc(argv21) == 0 || launch_proc(argv22) == 0 ||
-	    launch_proc(argv23) == 0 || launch_proc(argv24) == 0) {
+	    launch_proc(argv22) == 0 || launch_proc(argv23) == 0 ||
+	    launch_proc(argv24) == 0 || launch_proc(argv25) == 0 ||
+	    launch_proc(argv26) == 0 || launch_proc(argv27) == 0 ||
+	    launch_proc(argv28) == 0) {
 		printf("Error - "
 		       "process ran without error with invalid --lcore flag\n");
 		return -1;
 	}
 
-	if (launch_proc(argv25) != 0) {
+	if (launch_proc(argv29) != 0) {
 		printf("Error - "
 		       "process did not run ok with valid corelist value\n");
 		return -1;
-- 
2.11.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2019-03-08 09:46:42.561491748 -0800
+++ 0047-eal-fix-core-number-validation.patch	2019-03-08 09:46:40.232401000 -0800
@@ -1,8 +1,10 @@
-From b38693b612b4cabb7cb38a4eeb036285b2b55b0b Mon Sep 17 00:00:00 2001
+From 678ca0f7c98a91b6e032fac0fb2a36839fd3229f Mon Sep 17 00:00:00 2001
 From: Hari Kumar Vemula <hari.kumarx.vemula@intel.com>
 Date: Thu, 17 Jan 2019 12:13:12 +0000
 Subject: [PATCH] eal: fix core number validation
 
+[ upstream commit b38693b612b4cabb7cb38a4eeb036285b2b55b0b ]
+
 When incorrect core value or range provided,
 as part of -l command line option, a crash occurs.
 
@@ -12,7 +14,6 @@
 Added unit test case for invalid core number range.
 
 Fixes: d888cb8b9613 ("eal: add core list input format")
-Cc: stable@dpdk.org
 
 Signed-off-by: Hari Kumar Vemula <hari.kumarx.vemula@intel.com>
 Reviewed-by: David Marchand <david.marchand@redhat.com>
@@ -22,10 +23,10 @@
  2 files changed, 45 insertions(+), 25 deletions(-)
 
 diff --git a/lib/librte_eal/common/eal_common_options.c b/lib/librte_eal/common/eal_common_options.c
-index 3796dbf48..4681333ed 100644
+index c7eb056b2..dd446a5ad 100644
 --- a/lib/librte_eal/common/eal_common_options.c
 +++ b/lib/librte_eal/common/eal_common_options.c
-@@ -600,7 +600,9 @@ eal_parse_corelist(const char *corelist)
+@@ -558,7 +558,9 @@ eal_parse_corelist(const char *corelist)
  		if (*corelist == '\0')
  			return -1;
  		errno = 0;
@@ -36,7 +37,7 @@
  		if (errno || end == NULL)
  			return -1;
  		while (isblank(*end))
-@@ -1111,6 +1113,7 @@ eal_parse_common_option(int opt, const char *optarg,
+@@ -1000,6 +1002,7 @@ eal_parse_common_option(int opt, const char *optarg,
  {
  	static int b_used;
  	static int w_used;
@@ -44,7 +45,7 @@
  
  	switch (opt) {
  	/* blacklist */
-@@ -1153,7 +1156,9 @@ eal_parse_common_option(int opt, const char *optarg,
+@@ -1033,7 +1036,9 @@ eal_parse_common_option(int opt, const char *optarg,
  	/* corelist */
  	case 'l':
  		if (eal_parse_corelist(optarg) < 0) {
@@ -54,12 +55,12 @@
 +					cfg->lcore_count-1);
  			return -1;
  		}
- 
+ 		core_parsed = 1;
 diff --git a/test/test/test_eal_flags.c b/test/test/test_eal_flags.c
-index 2acab9d69..e3a60c7ae 100644
+index e82bb963a..55bbe717e 100644
 --- a/test/test/test_eal_flags.c
 +++ b/test/test/test_eal_flags.c
-@@ -18,6 +18,7 @@
+@@ -46,6 +46,7 @@
  #include <sys/file.h>
  #include <limits.h>
  
@@ -67,7 +68,7 @@
  #include <rte_debug.h>
  #include <rte_string_fns.h>
  
-@@ -477,40 +478,50 @@ test_missing_c_flag(void)
+@@ -529,40 +530,50 @@ test_missing_c_flag(void)
  				"-n", "3", "-l", "1," };
  	const char *argv10[] = { prgname, prefix, mp_flag,
  				 "-n", "3", "-l", "1#2" };
@@ -133,7 +134,7 @@
  				 "-n", "3", "--lcores",
  				 "0-1,2@(5-7),(3-5)@(0,2),(0,6),7"};
  
-@@ -538,31 +549,35 @@ test_missing_c_flag(void)
+@@ -590,31 +601,35 @@ test_missing_c_flag(void)
  			|| launch_proc(argv7) == 0
  			|| launch_proc(argv8) == 0
  			|| launch_proc(argv9) == 0

^ permalink raw reply	[flat|nested] 75+ messages in thread

* [dpdk-stable] patch 'eal: fix out of bound access when no CPU available' has been queued to LTS release 17.11.6
  2019-03-08 17:46 [dpdk-stable] patch 'net/bnx2x: cleanup info logs' has been queued to LTS release 17.11.6 Yongseok Koh
                   ` (45 preceding siblings ...)
  2019-03-08 17:47 ` [dpdk-stable] patch 'eal: fix core number validation' " Yongseok Koh
@ 2019-03-08 17:47 ` Yongseok Koh
  2019-03-08 17:47 ` [dpdk-stable] patch 'eal: check string parameter lengths' " Yongseok Koh
                   ` (22 subsequent siblings)
  69 siblings, 0 replies; 75+ messages in thread
From: Yongseok Koh @ 2019-03-08 17:47 UTC (permalink / raw)
  To: David Marchand; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.6

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objection by 03/13/19. So please
shout if anyone has objection.

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.

Yongseok

---
>From f22a700d2f3638f0c9c70e4ca300e21b6d3c03db Mon Sep 17 00:00:00 2001
From: David Marchand <david.marchand@redhat.com>
Date: Thu, 17 Jan 2019 14:12:57 +0100
Subject: [PATCH] eal: fix out of bound access when no CPU available

[ upstream commit 7b55015e1487a5f407a760cfb4d9dbf1ddacd0cc ]

In the unlikely case when the dpdk application is started with no cpu
available in the [0, RTE_MAX_LCORE - 1] range, the master_lcore is
automatically chosen as RTE_MAX_LCORE which triggers an out of bound
access.

Either you have a crash then, or the initialisation fails later when
trying to pin the master thread on it.
In my test, with RTE_MAX_LCORE == 2:

$ taskset -c 2 ./master/app/testpmd --no-huge -m 512 --log-level *:debug
[...]
EAL: pthread_setaffinity_np failed
PANIC in eal_thread_init_master():
cannot set affinity
7: [./master/app/testpmd() [0x47f629]]

Bugzilla ID: 19
Fixes: 2eba8d21f3c9 ("eal: restrict cores auto detection")

Signed-off-by: David Marchand <david.marchand@redhat.com>
---
 lib/librte_eal/common/eal_common_options.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/lib/librte_eal/common/eal_common_options.c b/lib/librte_eal/common/eal_common_options.c
index dd446a5ad..d91104dc0 100644
--- a/lib/librte_eal/common/eal_common_options.c
+++ b/lib/librte_eal/common/eal_common_options.c
@@ -1215,6 +1215,8 @@ eal_adjust_config(struct internal_config *internal_cfg)
 	/* default master lcore is the first one */
 	if (!master_lcore_parsed) {
 		cfg->master_lcore = rte_get_next_lcore(-1, 0, 0);
+		if (cfg->master_lcore >= RTE_MAX_LCORE)
+			return -1;
 		lcore_config[cfg->master_lcore].core_role = ROLE_RTE;
 	}
 
-- 
2.11.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2019-03-08 09:46:42.607514571 -0800
+++ 0048-eal-fix-out-of-bound-access-when-no-CPU-available.patch	2019-03-08 09:46:40.237401000 -0800
@@ -1,8 +1,10 @@
-From 7b55015e1487a5f407a760cfb4d9dbf1ddacd0cc Mon Sep 17 00:00:00 2001
+From f22a700d2f3638f0c9c70e4ca300e21b6d3c03db Mon Sep 17 00:00:00 2001
 From: David Marchand <david.marchand@redhat.com>
 Date: Thu, 17 Jan 2019 14:12:57 +0100
 Subject: [PATCH] eal: fix out of bound access when no CPU available
 
+[ upstream commit 7b55015e1487a5f407a760cfb4d9dbf1ddacd0cc ]
+
 In the unlikely case when the dpdk application is started with no cpu
 available in the [0, RTE_MAX_LCORE - 1] range, the master_lcore is
 automatically chosen as RTE_MAX_LCORE which triggers an out of bound
@@ -21,7 +23,6 @@
 
 Bugzilla ID: 19
 Fixes: 2eba8d21f3c9 ("eal: restrict cores auto detection")
-Cc: stable@dpdk.org
 
 Signed-off-by: David Marchand <david.marchand@redhat.com>
 ---
@@ -29,10 +30,10 @@
  1 file changed, 2 insertions(+)
 
 diff --git a/lib/librte_eal/common/eal_common_options.c b/lib/librte_eal/common/eal_common_options.c
-index 4681333ed..80d790292 100644
+index dd446a5ad..d91104dc0 100644
 --- a/lib/librte_eal/common/eal_common_options.c
 +++ b/lib/librte_eal/common/eal_common_options.c
-@@ -1388,6 +1388,8 @@ eal_adjust_config(struct internal_config *internal_cfg)
+@@ -1215,6 +1215,8 @@ eal_adjust_config(struct internal_config *internal_cfg)
  	/* default master lcore is the first one */
  	if (!master_lcore_parsed) {
  		cfg->master_lcore = rte_get_next_lcore(-1, 0, 0);

^ permalink raw reply	[flat|nested] 75+ messages in thread

* [dpdk-stable] patch 'eal: check string parameter lengths' has been queued to LTS release 17.11.6
  2019-03-08 17:46 [dpdk-stable] patch 'net/bnx2x: cleanup info logs' has been queued to LTS release 17.11.6 Yongseok Koh
                   ` (46 preceding siblings ...)
  2019-03-08 17:47 ` [dpdk-stable] patch 'eal: fix out of bound access when no CPU available' " Yongseok Koh
@ 2019-03-08 17:47 ` Yongseok Koh
  2019-03-08 17:47 ` [dpdk-stable] patch 'gro: check invalid TCP header length' " Yongseok Koh
                   ` (21 subsequent siblings)
  69 siblings, 0 replies; 75+ messages in thread
From: Yongseok Koh @ 2019-03-08 17:47 UTC (permalink / raw)
  To: Anatoly Burakov; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.6

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objection by 03/13/19. So please
shout if anyone has objection.

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.

Yongseok

---
>From 11dabc416169e52ee79731bd6ab920036df0e2f3 Mon Sep 17 00:00:00 2001
From: Anatoly Burakov <anatoly.burakov@intel.com>
Date: Wed, 16 Jan 2019 12:12:53 +0000
Subject: [PATCH] eal: check string parameter lengths

[ backported from upstream commit 2383d8e909275b072145c7addf826e9c8edb6232 ]

When specifying parameters such as hugefile prefix from the
command-line, it is possibly to supply an empty string. This may
lead to various problems: for example, if hugefile prefix is
empty, the runtime config path construction may end up
looking like "/var/run/dpdk//_config", which will technically
work, but is wrong and places files in the wrong place.

To fix it, check lengths of such user-specified parameters for
hugefile prefix, as well as hugepage dir and user-specified
mbuf pool ops string.

Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
---
 lib/librte_eal/common/eal_common_options.c | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/lib/librte_eal/common/eal_common_options.c b/lib/librte_eal/common/eal_common_options.c
index d91104dc0..a3d4d346b 100644
--- a/lib/librte_eal/common/eal_common_options.c
+++ b/lib/librte_eal/common/eal_common_options.c
@@ -1242,6 +1242,16 @@ eal_check_common_options(struct internal_config *internal_cfg)
 		RTE_LOG(ERR, EAL, "Invalid process type specified\n");
 		return -1;
 	}
+	if (internal_cfg->hugefile_prefix != NULL &&
+			strlen(internal_cfg->hugefile_prefix) < 1) {
+		RTE_LOG(ERR, EAL, "Invalid length of --" OPT_FILE_PREFIX " option\n");
+		return -1;
+	}
+	if (internal_cfg->hugepage_dir != NULL &&
+			strlen(internal_cfg->hugepage_dir) < 1) {
+		RTE_LOG(ERR, EAL, "Invalid length of --" OPT_HUGE_DIR" option\n");
+		return -1;
+	}
 	if (index(internal_cfg->hugefile_prefix, '%') != NULL) {
 		RTE_LOG(ERR, EAL, "Invalid char, '%%', in --"OPT_FILE_PREFIX" "
 			"option\n");
-- 
2.11.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2019-03-08 09:46:42.650470157 -0800
+++ 0049-eal-check-string-parameter-lengths.patch	2019-03-08 09:46:40.242402000 -0800
@@ -1,8 +1,10 @@
-From 2383d8e909275b072145c7addf826e9c8edb6232 Mon Sep 17 00:00:00 2001
+From 11dabc416169e52ee79731bd6ab920036df0e2f3 Mon Sep 17 00:00:00 2001
 From: Anatoly Burakov <anatoly.burakov@intel.com>
 Date: Wed, 16 Jan 2019 12:12:53 +0000
 Subject: [PATCH] eal: check string parameter lengths
 
+[ backported from upstream commit 2383d8e909275b072145c7addf826e9c8edb6232 ]
+
 When specifying parameters such as hugefile prefix from the
 command-line, it is possibly to supply an empty string. This may
 lead to various problems: for example, if hugefile prefix is
@@ -14,18 +16,16 @@
 hugefile prefix, as well as hugepage dir and user-specified
 mbuf pool ops string.
 
-Cc: stable@dpdk.org
-
 Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
 ---
- lib/librte_eal/common/eal_common_options.c | 15 +++++++++++++++
- 1 file changed, 15 insertions(+)
+ lib/librte_eal/common/eal_common_options.c | 10 ++++++++++
+ 1 file changed, 10 insertions(+)
 
 diff --git a/lib/librte_eal/common/eal_common_options.c b/lib/librte_eal/common/eal_common_options.c
-index 80d790292..6c96f459c 100644
+index d91104dc0..a3d4d346b 100644
 --- a/lib/librte_eal/common/eal_common_options.c
 +++ b/lib/librte_eal/common/eal_common_options.c
-@@ -1415,6 +1415,21 @@ eal_check_common_options(struct internal_config *internal_cfg)
+@@ -1242,6 +1242,16 @@ eal_check_common_options(struct internal_config *internal_cfg)
  		RTE_LOG(ERR, EAL, "Invalid process type specified\n");
  		return -1;
  	}
@@ -39,12 +39,7 @@
 +		RTE_LOG(ERR, EAL, "Invalid length of --" OPT_HUGE_DIR" option\n");
 +		return -1;
 +	}
-+	if (internal_cfg->user_mbuf_pool_ops_name != NULL &&
-+			strlen(internal_cfg->user_mbuf_pool_ops_name) < 1) {
-+		RTE_LOG(ERR, EAL, "Invalid length of --" OPT_MBUF_POOL_OPS_NAME" option\n");
-+		return -1;
-+	}
- 	if (index(eal_get_hugefile_prefix(), '%') != NULL) {
+ 	if (index(internal_cfg->hugefile_prefix, '%') != NULL) {
  		RTE_LOG(ERR, EAL, "Invalid char, '%%', in --"OPT_FILE_PREFIX" "
  			"option\n");
 -- 

^ permalink raw reply	[flat|nested] 75+ messages in thread

* [dpdk-stable] patch 'gro: check invalid TCP header length' has been queued to LTS release 17.11.6
  2019-03-08 17:46 [dpdk-stable] patch 'net/bnx2x: cleanup info logs' has been queued to LTS release 17.11.6 Yongseok Koh
                   ` (47 preceding siblings ...)
  2019-03-08 17:47 ` [dpdk-stable] patch 'eal: check string parameter lengths' " Yongseok Koh
@ 2019-03-08 17:47 ` Yongseok Koh
  2019-03-08 17:47 ` [dpdk-stable] patch 'net/i40e: fix VF overwrite PF RSS LUT for X722' " Yongseok Koh
                   ` (20 subsequent siblings)
  69 siblings, 0 replies; 75+ messages in thread
From: Yongseok Koh @ 2019-03-08 17:47 UTC (permalink / raw)
  To: Jiayu Hu; +Cc: Yinan Wang, Konstantin Ananyev, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.6

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objection by 03/13/19. So please
shout if anyone has objection.

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.

Yongseok

---
>From 46d6450b79018c3a38634e2fdd8269f9cb262fa4 Mon Sep 17 00:00:00 2001
From: Jiayu Hu <jiayu.hu@intel.com>
Date: Wed, 16 Jan 2019 08:45:33 +0800
Subject: [PATCH] gro: check invalid TCP header length

[ backported from upstream commit 7ccc7a05d6ce57a8db88ccc70d507e7e3d51cd37 ]

When the TCP header length of input packets is invalid (i.e., less
than 20 bytes or greater than 60 bytes), check_seq_option() will
access illegal memory area when compare TCP Options, which may
cause a segmentation fault.

This patch adds missing invalid TCP header length check to avoid
illegal memory accesses.

Fixes: 0d2cbe59b719 ("lib/gro: support TCP/IPv4")
Fixes: 9e0b9d2ec0f4 ("gro: support VxLAN GRO")

Signed-off-by: Jiayu Hu <jiayu.hu@intel.com>
Tested-by: Yinan Wang <yinan.wang@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
---
 lib/librte_gro/gro_tcp4.c | 7 +++++++
 lib/librte_gro/gro_tcp4.h | 5 +++++
 2 files changed, 12 insertions(+)

diff --git a/lib/librte_gro/gro_tcp4.c b/lib/librte_gro/gro_tcp4.c
index d1c6c7ded..5ce5104a4 100644
--- a/lib/librte_gro/gro_tcp4.c
+++ b/lib/librte_gro/gro_tcp4.c
@@ -351,6 +351,13 @@ gro_tcp4_reassemble(struct rte_mbuf *pkt,
 	uint32_t i, max_key_num;
 	int cmp;
 
+	/*
+	 * Don't process the packet whose TCP header length is greater
+	 * than 60 bytes or less than 20 bytes.
+	 */
+	if (unlikely(INVALID_TCP_HDRLEN(pkt->l4_len)))
+		return -1;
+
 	eth_hdr = rte_pktmbuf_mtod(pkt, struct ether_hdr *);
 	ipv4_hdr = (struct ipv4_hdr *)((char *)eth_hdr + pkt->l2_len);
 	tcp_hdr = (struct tcp_hdr *)((char *)ipv4_hdr + pkt->l3_len);
diff --git a/lib/librte_gro/gro_tcp4.h b/lib/librte_gro/gro_tcp4.h
index 0a817162b..f8193d1f3 100644
--- a/lib/librte_gro/gro_tcp4.h
+++ b/lib/librte_gro/gro_tcp4.h
@@ -42,6 +42,11 @@
  */
 #define TCP4_MAX_L3_LENGTH UINT16_MAX
 
+/* The maximum TCP header length */
+#define MAX_TCP_HLEN 60
+#define INVALID_TCP_HDRLEN(len) \
+	(((len) < sizeof(struct tcp_hdr)) || ((len) > MAX_TCP_HLEN))
+
 /* criteria of mergeing packets */
 struct tcp4_key {
 	struct ether_addr eth_saddr;
-- 
2.11.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2019-03-08 09:46:42.693494519 -0800
+++ 0050-gro-check-invalid-TCP-header-length.patch	2019-03-08 09:46:40.248403000 -0800
@@ -1,8 +1,10 @@
-From 7ccc7a05d6ce57a8db88ccc70d507e7e3d51cd37 Mon Sep 17 00:00:00 2001
+From 46d6450b79018c3a38634e2fdd8269f9cb262fa4 Mon Sep 17 00:00:00 2001
 From: Jiayu Hu <jiayu.hu@intel.com>
 Date: Wed, 16 Jan 2019 08:45:33 +0800
 Subject: [PATCH] gro: check invalid TCP header length
 
+[ backported from upstream commit 7ccc7a05d6ce57a8db88ccc70d507e7e3d51cd37 ]
+
 When the TCP header length of input packets is invalid (i.e., less
 than 20 bytes or greater than 60 bytes), check_seq_option() will
 access illegal memory area when compare TCP Options, which may
@@ -13,24 +15,22 @@
 
 Fixes: 0d2cbe59b719 ("lib/gro: support TCP/IPv4")
 Fixes: 9e0b9d2ec0f4 ("gro: support VxLAN GRO")
-Cc: stable@dpdk.org
 
 Signed-off-by: Jiayu Hu <jiayu.hu@intel.com>
 Tested-by: Yinan Wang <yinan.wang@intel.com>
 Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
 ---
- lib/librte_gro/gro_tcp4.c       | 7 +++++++
- lib/librte_gro/gro_tcp4.h       | 5 +++++
- lib/librte_gro/gro_vxlan_tcp4.c | 7 +++++++
- 3 files changed, 19 insertions(+)
+ lib/librte_gro/gro_tcp4.c | 7 +++++++
+ lib/librte_gro/gro_tcp4.h | 5 +++++
+ 2 files changed, 12 insertions(+)
 
 diff --git a/lib/librte_gro/gro_tcp4.c b/lib/librte_gro/gro_tcp4.c
-index 2fe9aab3e..7d128a431 100644
+index d1c6c7ded..5ce5104a4 100644
 --- a/lib/librte_gro/gro_tcp4.c
 +++ b/lib/librte_gro/gro_tcp4.c
-@@ -208,6 +208,13 @@ gro_tcp4_reassemble(struct rte_mbuf *pkt,
+@@ -351,6 +351,13 @@ gro_tcp4_reassemble(struct rte_mbuf *pkt,
+ 	uint32_t i, max_key_num;
  	int cmp;
- 	uint8_t find;
  
 +	/*
 +	 * Don't process the packet whose TCP header length is greater
@@ -43,39 +43,21 @@
  	ipv4_hdr = (struct ipv4_hdr *)((char *)eth_hdr + pkt->l2_len);
  	tcp_hdr = (struct tcp_hdr *)((char *)ipv4_hdr + pkt->l3_len);
 diff --git a/lib/librte_gro/gro_tcp4.h b/lib/librte_gro/gro_tcp4.h
-index 6bb30cdb9..d97924883 100644
+index 0a817162b..f8193d1f3 100644
 --- a/lib/librte_gro/gro_tcp4.h
 +++ b/lib/librte_gro/gro_tcp4.h
-@@ -17,6 +17,11 @@
+@@ -42,6 +42,11 @@
   */
- #define MAX_IPV4_PKT_LENGTH UINT16_MAX
+ #define TCP4_MAX_L3_LENGTH UINT16_MAX
  
 +/* The maximum TCP header length */
 +#define MAX_TCP_HLEN 60
 +#define INVALID_TCP_HDRLEN(len) \
 +	(((len) < sizeof(struct tcp_hdr)) || ((len) > MAX_TCP_HLEN))
 +
- /* Header fields representing a TCP/IPv4 flow */
- struct tcp4_flow_key {
+ /* criteria of mergeing packets */
+ struct tcp4_key {
  	struct ether_addr eth_saddr;
-diff --git a/lib/librte_gro/gro_vxlan_tcp4.c b/lib/librte_gro/gro_vxlan_tcp4.c
-index 955ae4b56..acb9bc919 100644
---- a/lib/librte_gro/gro_vxlan_tcp4.c
-+++ b/lib/librte_gro/gro_vxlan_tcp4.c
-@@ -306,6 +306,13 @@ gro_vxlan_tcp4_reassemble(struct rte_mbuf *pkt,
- 	uint16_t hdr_len;
- 	uint8_t find;
- 
-+	/*
-+	 * Don't process the packet whose TCP header length is greater
-+	 * than 60 bytes or less than 20 bytes.
-+	 */
-+	if (unlikely(INVALID_TCP_HDRLEN(pkt->l4_len)))
-+		return -1;
-+
- 	outer_eth_hdr = rte_pktmbuf_mtod(pkt, struct ether_hdr *);
- 	outer_ipv4_hdr = (struct ipv4_hdr *)((char *)outer_eth_hdr +
- 			pkt->outer_l2_len);
 -- 
 2.11.0
 

^ permalink raw reply	[flat|nested] 75+ messages in thread

* [dpdk-stable] patch 'net/i40e: fix VF overwrite PF RSS LUT for X722' has been queued to LTS release 17.11.6
  2019-03-08 17:46 [dpdk-stable] patch 'net/bnx2x: cleanup info logs' has been queued to LTS release 17.11.6 Yongseok Koh
                   ` (48 preceding siblings ...)
  2019-03-08 17:47 ` [dpdk-stable] patch 'gro: check invalid TCP header length' " Yongseok Koh
@ 2019-03-08 17:47 ` Yongseok Koh
  2019-03-08 17:47 ` [dpdk-stable] patch 'net/sfc: fix VF error/missed stats mapping' " Yongseok Koh
                   ` (19 subsequent siblings)
  69 siblings, 0 replies; 75+ messages in thread
From: Yongseok Koh @ 2019-03-08 17:47 UTC (permalink / raw)
  To: Yanglong Wu; +Cc: Qi Zhang, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.6

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objection by 03/13/19. So please
shout if anyone has objection.

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.

Yongseok

---
>From 370f6ce5643db4dccb2fec3c3c1debfaefcf59f5 Mon Sep 17 00:00:00 2001
From: Yanglong Wu <yanglong.wu@intel.com>
Date: Tue, 15 Jan 2019 10:23:45 +0800
Subject: [PATCH] net/i40e: fix VF overwrite PF RSS LUT for X722

[ upstream commit 1d4b2b4966bbb219afd2d7072ffba51f3a3067a5 ]

i40e_aq_set_rss_lut should set register according
to the vsi->type. if not, VF may overwrite the rigister
of PF.
Note, only X722 is impacted, since flag I40E_FLAG_RSS_AQ_CAPABLE
is only enabled on X722.

Fixes: d0a349409bd7 ("i40e: support AQ based RSS config")

Signed-off-by: Yanglong Wu <yanglong.wu@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
---
 drivers/net/i40e/i40e_ethdev.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c
index 60b63e027..a8d6c9714 100644
--- a/drivers/net/i40e/i40e_ethdev.c
+++ b/drivers/net/i40e/i40e_ethdev.c
@@ -3971,7 +3971,8 @@ i40e_get_rss_lut(struct i40e_vsi *vsi, uint8_t *lut, uint16_t lut_size)
 		return -EINVAL;
 
 	if (pf->flags & I40E_FLAG_RSS_AQ_CAPABLE) {
-		ret = i40e_aq_get_rss_lut(hw, vsi->vsi_id, TRUE,
+		ret = i40e_aq_get_rss_lut(hw, vsi->vsi_id,
+					  vsi->type != I40E_VSI_SRIOV,
 					  lut, lut_size);
 		if (ret) {
 			PMD_DRV_LOG(ERR, "Failed to get RSS lookup table");
@@ -4002,7 +4003,8 @@ i40e_set_rss_lut(struct i40e_vsi *vsi, uint8_t *lut, uint16_t lut_size)
 	hw = I40E_VSI_TO_HW(vsi);
 
 	if (pf->flags & I40E_FLAG_RSS_AQ_CAPABLE) {
-		ret = i40e_aq_set_rss_lut(hw, vsi->vsi_id, TRUE,
+		ret = i40e_aq_set_rss_lut(hw, vsi->vsi_id,
+					  vsi->type != I40E_VSI_SRIOV,
 					  lut, lut_size);
 		if (ret) {
 			PMD_DRV_LOG(ERR, "Failed to set RSS lookup table");
-- 
2.11.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2019-03-08 09:46:42.737614004 -0800
+++ 0051-net-i40e-fix-VF-overwrite-PF-RSS-LUT-for-X722.patch	2019-03-08 09:46:40.262402000 -0800
@@ -1,8 +1,10 @@
-From 1d4b2b4966bbb219afd2d7072ffba51f3a3067a5 Mon Sep 17 00:00:00 2001
+From 370f6ce5643db4dccb2fec3c3c1debfaefcf59f5 Mon Sep 17 00:00:00 2001
 From: Yanglong Wu <yanglong.wu@intel.com>
 Date: Tue, 15 Jan 2019 10:23:45 +0800
 Subject: [PATCH] net/i40e: fix VF overwrite PF RSS LUT for X722
 
+[ upstream commit 1d4b2b4966bbb219afd2d7072ffba51f3a3067a5 ]
+
 i40e_aq_set_rss_lut should set register according
 to the vsi->type. if not, VF may overwrite the rigister
 of PF.
@@ -10,7 +12,6 @@
 is only enabled on X722.
 
 Fixes: d0a349409bd7 ("i40e: support AQ based RSS config")
-Cc: stable@dpdk.org
 
 Signed-off-by: Yanglong Wu <yanglong.wu@intel.com>
 Acked-by: Qi Zhang <qi.z.zhang@intel.com>
@@ -19,10 +20,10 @@
  1 file changed, 4 insertions(+), 2 deletions(-)
 
 diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c
-index a6b97e164..f97cd5348 100644
+index 60b63e027..a8d6c9714 100644
 --- a/drivers/net/i40e/i40e_ethdev.c
 +++ b/drivers/net/i40e/i40e_ethdev.c
-@@ -4183,7 +4183,8 @@ i40e_get_rss_lut(struct i40e_vsi *vsi, uint8_t *lut, uint16_t lut_size)
+@@ -3971,7 +3971,8 @@ i40e_get_rss_lut(struct i40e_vsi *vsi, uint8_t *lut, uint16_t lut_size)
  		return -EINVAL;
  
  	if (pf->flags & I40E_FLAG_RSS_AQ_CAPABLE) {
@@ -32,7 +33,7 @@
  					  lut, lut_size);
  		if (ret) {
  			PMD_DRV_LOG(ERR, "Failed to get RSS lookup table");
-@@ -4222,7 +4223,8 @@ i40e_set_rss_lut(struct i40e_vsi *vsi, uint8_t *lut, uint16_t lut_size)
+@@ -4002,7 +4003,8 @@ i40e_set_rss_lut(struct i40e_vsi *vsi, uint8_t *lut, uint16_t lut_size)
  	hw = I40E_VSI_TO_HW(vsi);
  
  	if (pf->flags & I40E_FLAG_RSS_AQ_CAPABLE) {

^ permalink raw reply	[flat|nested] 75+ messages in thread

* [dpdk-stable] patch 'net/sfc: fix VF error/missed stats mapping' has been queued to LTS release 17.11.6
  2019-03-08 17:46 [dpdk-stable] patch 'net/bnx2x: cleanup info logs' has been queued to LTS release 17.11.6 Yongseok Koh
                   ` (49 preceding siblings ...)
  2019-03-08 17:47 ` [dpdk-stable] patch 'net/i40e: fix VF overwrite PF RSS LUT for X722' " Yongseok Koh
@ 2019-03-08 17:47 ` Yongseok Koh
  2019-03-08 17:47 ` [dpdk-stable] patch 'net/sfc: fix datapath name references in logs' " Yongseok Koh
                   ` (18 subsequent siblings)
  69 siblings, 0 replies; 75+ messages in thread
From: Yongseok Koh @ 2019-03-08 17:47 UTC (permalink / raw)
  To: Andrew Rybchenko; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.6

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objection by 03/13/19. So please
shout if anyone has objection.

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.

Yongseok

---
>From 9be0a39e3d7a488289f1d5796243c279677e948b Mon Sep 17 00:00:00 2001
From: Andrew Rybchenko <arybchenko@solarflare.com>
Date: Wed, 16 Jan 2019 09:43:23 +0000
Subject: [PATCH] net/sfc: fix VF error/missed stats mapping

[ upstream commit 24f8a95917b36b313a49bd604c3958f992893efd ]

VADAPTER_RX_OVERFLOW means Rx statistics overflow, not a missed
packet because of overflow.

VADAPTER_RX_BAD_PACKETS accumulates a number of error conditions,
but mainly impossibility to deliver because of no descriptors
available, so it is better to classify it as imissed.

Fixes: 1caab2f1e684 ("net/sfc: add basic statistics")

Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
---
 drivers/net/sfc/sfc_ethdev.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/net/sfc/sfc_ethdev.c b/drivers/net/sfc/sfc_ethdev.c
index 005df401d..089e8535e 100644
--- a/drivers/net/sfc/sfc_ethdev.c
+++ b/drivers/net/sfc/sfc_ethdev.c
@@ -552,8 +552,7 @@ sfc_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats)
 			mac_stats[EFX_MAC_VADAPTER_TX_UNICAST_BYTES] +
 			mac_stats[EFX_MAC_VADAPTER_TX_MULTICAST_BYTES] +
 			mac_stats[EFX_MAC_VADAPTER_TX_BROADCAST_BYTES];
-		stats->imissed = mac_stats[EFX_MAC_VADAPTER_RX_OVERFLOW];
-		stats->ierrors = mac_stats[EFX_MAC_VADAPTER_RX_BAD_PACKETS];
+		stats->imissed = mac_stats[EFX_MAC_VADAPTER_RX_BAD_PACKETS];
 		stats->oerrors = mac_stats[EFX_MAC_VADAPTER_TX_BAD_PACKETS];
 	} else {
 		stats->ipackets = mac_stats[EFX_MAC_RX_PKTS];
-- 
2.11.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2019-03-08 09:46:42.790714255 -0800
+++ 0052-net-sfc-fix-VF-error-missed-stats-mapping.patch	2019-03-08 09:46:40.267403000 -0800
@@ -1,8 +1,10 @@
-From 24f8a95917b36b313a49bd604c3958f992893efd Mon Sep 17 00:00:00 2001
+From 9be0a39e3d7a488289f1d5796243c279677e948b Mon Sep 17 00:00:00 2001
 From: Andrew Rybchenko <arybchenko@solarflare.com>
 Date: Wed, 16 Jan 2019 09:43:23 +0000
 Subject: [PATCH] net/sfc: fix VF error/missed stats mapping
 
+[ upstream commit 24f8a95917b36b313a49bd604c3958f992893efd ]
+
 VADAPTER_RX_OVERFLOW means Rx statistics overflow, not a missed
 packet because of overflow.
 
@@ -11,7 +13,6 @@
 available, so it is better to classify it as imissed.
 
 Fixes: 1caab2f1e684 ("net/sfc: add basic statistics")
-Cc: stable@dpdk.org
 
 Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
 ---
@@ -19,10 +20,10 @@
  1 file changed, 1 insertion(+), 2 deletions(-)
 
 diff --git a/drivers/net/sfc/sfc_ethdev.c b/drivers/net/sfc/sfc_ethdev.c
-index 3886daf7a..9f59c8db9 100644
+index 005df401d..089e8535e 100644
 --- a/drivers/net/sfc/sfc_ethdev.c
 +++ b/drivers/net/sfc/sfc_ethdev.c
-@@ -537,8 +537,7 @@ sfc_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats)
+@@ -552,8 +552,7 @@ sfc_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats)
  			mac_stats[EFX_MAC_VADAPTER_TX_UNICAST_BYTES] +
  			mac_stats[EFX_MAC_VADAPTER_TX_MULTICAST_BYTES] +
  			mac_stats[EFX_MAC_VADAPTER_TX_BROADCAST_BYTES];

^ permalink raw reply	[flat|nested] 75+ messages in thread

* [dpdk-stable] patch 'net/sfc: fix datapath name references in logs' has been queued to LTS release 17.11.6
  2019-03-08 17:46 [dpdk-stable] patch 'net/bnx2x: cleanup info logs' has been queued to LTS release 17.11.6 Yongseok Koh
                   ` (50 preceding siblings ...)
  2019-03-08 17:47 ` [dpdk-stable] patch 'net/sfc: fix VF error/missed stats mapping' " Yongseok Koh
@ 2019-03-08 17:47 ` Yongseok Koh
  2019-03-08 17:47 ` [dpdk-stable] patch 'vhost: fix memory leak on realloc failure' " Yongseok Koh
                   ` (17 subsequent siblings)
  69 siblings, 0 replies; 75+ messages in thread
From: Yongseok Koh @ 2019-03-08 17:47 UTC (permalink / raw)
  To: Ivan Malov; +Cc: Andrew Rybchenko, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.6

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objection by 03/13/19. So please
shout if anyone has objection.

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.

Yongseok

---
>From aba4ff2ebccfef8515a32549867ad3ee3e203ade Mon Sep 17 00:00:00 2001
From: Ivan Malov <ivan.malov@oktetlabs.ru>
Date: Wed, 16 Jan 2019 12:24:40 +0000
Subject: [PATCH] net/sfc: fix datapath name references in logs

[ upstream commit 7f7bdb5987644dca493573c21cbd02ffdf68c04b ]

Rx and Tx datapath references were mixed up in a couple
of log statements and commentary blocks in the original
commit. Correct datapath name references in said places.

Fixes: f28ede500c2e ("net/sfc: support multi-process")

Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
---
 drivers/net/sfc/sfc.h        | 2 +-
 drivers/net/sfc/sfc_ethdev.c | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/net/sfc/sfc.h b/drivers/net/sfc/sfc.h
index ef980a40f..7bc7a077c 100644
--- a/drivers/net/sfc/sfc.h
+++ b/drivers/net/sfc/sfc.h
@@ -264,7 +264,7 @@ struct sfc_adapter {
 
 	/*
 	 * Shared memory copy of the Tx datapath name to be used by
-	 * the secondary process to find Rx datapath to be used.
+	 * the secondary process to find Tx datapath to be used.
 	 */
 	char				*dp_tx_name;
 	const struct sfc_dp_tx		*dp_tx;
diff --git a/drivers/net/sfc/sfc_ethdev.c b/drivers/net/sfc/sfc_ethdev.c
index 089e8535e..5854fd76a 100644
--- a/drivers/net/sfc/sfc_ethdev.c
+++ b/drivers/net/sfc/sfc_ethdev.c
@@ -1712,13 +1712,13 @@ sfc_eth_dev_secondary_set_ops(struct rte_eth_dev *dev)
 
 	dp_rx = sfc_dp_find_rx_by_name(&sfc_dp_head, sa->dp_rx_name);
 	if (dp_rx == NULL) {
-		sfc_err(sa, "cannot find %s Rx datapath", sa->dp_tx_name);
+		sfc_err(sa, "cannot find %s Rx datapath", sa->dp_rx_name);
 		rc = ENOENT;
 		goto fail_dp_rx;
 	}
 	if (~dp_rx->features & SFC_DP_RX_FEAT_MULTI_PROCESS) {
 		sfc_err(sa, "%s Rx datapath does not support multi-process",
-			sa->dp_tx_name);
+			sa->dp_rx_name);
 		rc = EINVAL;
 		goto fail_dp_rx_multi_process;
 	}
-- 
2.11.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2019-03-08 09:46:42.834601234 -0800
+++ 0053-net-sfc-fix-datapath-name-references-in-logs.patch	2019-03-08 09:46:40.274402000 -0800
@@ -1,14 +1,15 @@
-From 7f7bdb5987644dca493573c21cbd02ffdf68c04b Mon Sep 17 00:00:00 2001
+From aba4ff2ebccfef8515a32549867ad3ee3e203ade Mon Sep 17 00:00:00 2001
 From: Ivan Malov <ivan.malov@oktetlabs.ru>
 Date: Wed, 16 Jan 2019 12:24:40 +0000
 Subject: [PATCH] net/sfc: fix datapath name references in logs
 
+[ upstream commit 7f7bdb5987644dca493573c21cbd02ffdf68c04b ]
+
 Rx and Tx datapath references were mixed up in a couple
 of log statements and commentary blocks in the original
 commit. Correct datapath name references in said places.
 
 Fixes: f28ede500c2e ("net/sfc: support multi-process")
-Cc: stable@dpdk.org
 
 Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru>
 Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
@@ -18,10 +19,10 @@
  2 files changed, 3 insertions(+), 3 deletions(-)
 
 diff --git a/drivers/net/sfc/sfc.h b/drivers/net/sfc/sfc.h
-index 51be44037..0b852340f 100644
+index ef980a40f..7bc7a077c 100644
 --- a/drivers/net/sfc/sfc.h
 +++ b/drivers/net/sfc/sfc.h
-@@ -251,7 +251,7 @@ struct sfc_adapter {
+@@ -264,7 +264,7 @@ struct sfc_adapter {
  
  	/*
  	 * Shared memory copy of the Tx datapath name to be used by
@@ -31,10 +32,10 @@
  	char				*dp_tx_name;
  	const struct sfc_dp_tx		*dp_tx;
 diff --git a/drivers/net/sfc/sfc_ethdev.c b/drivers/net/sfc/sfc_ethdev.c
-index 9f59c8db9..08d3271cb 100644
+index 089e8535e..5854fd76a 100644
 --- a/drivers/net/sfc/sfc_ethdev.c
 +++ b/drivers/net/sfc/sfc_ethdev.c
-@@ -1862,13 +1862,13 @@ sfc_eth_dev_secondary_set_ops(struct rte_eth_dev *dev)
+@@ -1712,13 +1712,13 @@ sfc_eth_dev_secondary_set_ops(struct rte_eth_dev *dev)
  
  	dp_rx = sfc_dp_find_rx_by_name(&sfc_dp_head, sa->dp_rx_name);
  	if (dp_rx == NULL) {

^ permalink raw reply	[flat|nested] 75+ messages in thread

* [dpdk-stable] patch 'vhost: fix memory leak on realloc failure' has been queued to LTS release 17.11.6
  2019-03-08 17:46 [dpdk-stable] patch 'net/bnx2x: cleanup info logs' has been queued to LTS release 17.11.6 Yongseok Koh
                   ` (51 preceding siblings ...)
  2019-03-08 17:47 ` [dpdk-stable] patch 'net/sfc: fix datapath name references in logs' " Yongseok Koh
@ 2019-03-08 17:47 ` Yongseok Koh
  2019-03-08 17:47 ` [dpdk-stable] patch 'examples/vhost: fix path allocation failure handling' " Yongseok Koh
                   ` (16 subsequent siblings)
  69 siblings, 0 replies; 75+ messages in thread
From: Yongseok Koh @ 2019-03-08 17:47 UTC (permalink / raw)
  To: Tiwei Bie; +Cc: Maxime Coquelin, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.6

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objection by 03/13/19. So please
shout if anyone has objection.

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.

Yongseok

---
>From e4b5a49bbad8abbb10b772f78f29ff8f7ef00248 Mon Sep 17 00:00:00 2001
From: Tiwei Bie <tiwei.bie@intel.com>
Date: Tue, 15 Jan 2019 15:13:23 +0800
Subject: [PATCH] vhost: fix memory leak on realloc failure

[ upstream commit e1c0834f95597b1d5a889532281eb2fde6774ddd ]

When realloc() fails, the original block isn't freed.

Fixes: e246896178e6 ("vhost: get guest/host physical address mappings")

Signed-off-by: Tiwei Bie <tiwei.bie@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
---
 lib/librte_vhost/vhost_user.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/lib/librte_vhost/vhost_user.c b/lib/librte_vhost/vhost_user.c
index aacf75b13..61e82d154 100644
--- a/lib/librte_vhost/vhost_user.c
+++ b/lib/librte_vhost/vhost_user.c
@@ -510,13 +510,16 @@ add_one_guest_page(struct virtio_net *dev, uint64_t guest_phys_addr,
 		   uint64_t host_phys_addr, uint64_t size)
 {
 	struct guest_page *page, *last_page;
+	struct guest_page *old_pages;
 
 	if (dev->nr_guest_pages == dev->max_guest_pages) {
 		dev->max_guest_pages *= 2;
+		old_pages = dev->guest_pages;
 		dev->guest_pages = realloc(dev->guest_pages,
 					dev->max_guest_pages * sizeof(*page));
 		if (!dev->guest_pages) {
 			RTE_LOG(ERR, VHOST_CONFIG, "cannot realloc guest_pages\n");
+			free(old_pages);
 			return -1;
 		}
 	}
-- 
2.11.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2019-03-08 09:46:42.879871570 -0800
+++ 0054-vhost-fix-memory-leak-on-realloc-failure.patch	2019-03-08 09:46:40.279403000 -0800
@@ -1,12 +1,13 @@
-From e1c0834f95597b1d5a889532281eb2fde6774ddd Mon Sep 17 00:00:00 2001
+From e4b5a49bbad8abbb10b772f78f29ff8f7ef00248 Mon Sep 17 00:00:00 2001
 From: Tiwei Bie <tiwei.bie@intel.com>
 Date: Tue, 15 Jan 2019 15:13:23 +0800
 Subject: [PATCH] vhost: fix memory leak on realloc failure
 
+[ upstream commit e1c0834f95597b1d5a889532281eb2fde6774ddd ]
+
 When realloc() fails, the original block isn't freed.
 
 Fixes: e246896178e6 ("vhost: get guest/host physical address mappings")
-Cc: stable@dpdk.org
 
 Signed-off-by: Tiwei Bie <tiwei.bie@intel.com>
 Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
@@ -15,10 +16,10 @@
  1 file changed, 3 insertions(+)
 
 diff --git a/lib/librte_vhost/vhost_user.c b/lib/librte_vhost/vhost_user.c
-index f2f30369b..78be6cfa5 100644
+index aacf75b13..61e82d154 100644
 --- a/lib/librte_vhost/vhost_user.c
 +++ b/lib/librte_vhost/vhost_user.c
-@@ -733,13 +733,16 @@ add_one_guest_page(struct virtio_net *dev, uint64_t guest_phys_addr,
+@@ -510,13 +510,16 @@ add_one_guest_page(struct virtio_net *dev, uint64_t guest_phys_addr,
  		   uint64_t host_phys_addr, uint64_t size)
  {
  	struct guest_page *page, *last_page;

^ permalink raw reply	[flat|nested] 75+ messages in thread

* [dpdk-stable] patch 'examples/vhost: fix path allocation failure handling' has been queued to LTS release 17.11.6
  2019-03-08 17:46 [dpdk-stable] patch 'net/bnx2x: cleanup info logs' has been queued to LTS release 17.11.6 Yongseok Koh
                   ` (52 preceding siblings ...)
  2019-03-08 17:47 ` [dpdk-stable] patch 'vhost: fix memory leak on realloc failure' " Yongseok Koh
@ 2019-03-08 17:47 ` Yongseok Koh
  2019-03-08 17:47 ` [dpdk-stable] patch 'net/sfc: fix Rx packets counter' " Yongseok Koh
                   ` (15 subsequent siblings)
  69 siblings, 0 replies; 75+ messages in thread
From: Yongseok Koh @ 2019-03-08 17:47 UTC (permalink / raw)
  To: Tiwei Bie; +Cc: Maxime Coquelin, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.6

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objection by 03/13/19. So please
shout if anyone has objection.

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.

Yongseok

---
>From dc2d27d6a26975543954d4d91f4364136bc5f64c Mon Sep 17 00:00:00 2001
From: Tiwei Bie <tiwei.bie@intel.com>
Date: Tue, 15 Jan 2019 15:13:24 +0800
Subject: [PATCH] examples/vhost: fix path allocation failure handling

[ upstream commit d79035b7dd6e599589552573b53c138f488dead3 ]

Add the missing failure handling for path allocation,
as realloc() may fail.

Fixes: ad0eef4d2203 ("examples/vhost: support multiple socket files")

Signed-off-by: Tiwei Bie <tiwei.bie@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
---
 examples/vhost/main.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/examples/vhost/main.c b/examples/vhost/main.c
index 82660a673..9a1ec0341 100644
--- a/examples/vhost/main.c
+++ b/examples/vhost/main.c
@@ -400,11 +400,19 @@ port_init(uint16_t port)
 static int
 us_vhost_parse_socket_path(const char *q_arg)
 {
+	char *old;
+
 	/* parse number string */
 	if (strnlen(q_arg, PATH_MAX) == PATH_MAX)
 		return -1;
 
+	old = socket_files;
 	socket_files = realloc(socket_files, PATH_MAX * (nb_sockets + 1));
+	if (socket_files == NULL) {
+		free(old);
+		return -1;
+	}
+
 	snprintf(socket_files + nb_sockets * PATH_MAX, PATH_MAX, "%s", q_arg);
 	nb_sockets++;
 
-- 
2.11.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2019-03-08 09:46:42.924680999 -0800
+++ 0055-examples-vhost-fix-path-allocation-failure-handling.patch	2019-03-08 09:46:40.283442000 -0800
@@ -1,13 +1,14 @@
-From d79035b7dd6e599589552573b53c138f488dead3 Mon Sep 17 00:00:00 2001
+From dc2d27d6a26975543954d4d91f4364136bc5f64c Mon Sep 17 00:00:00 2001
 From: Tiwei Bie <tiwei.bie@intel.com>
 Date: Tue, 15 Jan 2019 15:13:24 +0800
 Subject: [PATCH] examples/vhost: fix path allocation failure handling
 
+[ upstream commit d79035b7dd6e599589552573b53c138f488dead3 ]
+
 Add the missing failure handling for path allocation,
 as realloc() may fail.
 
 Fixes: ad0eef4d2203 ("examples/vhost: support multiple socket files")
-Cc: stable@dpdk.org
 
 Signed-off-by: Tiwei Bie <tiwei.bie@intel.com>
 Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
@@ -16,10 +17,10 @@
  1 file changed, 8 insertions(+)
 
 diff --git a/examples/vhost/main.c b/examples/vhost/main.c
-index 645cf51e9..5e914f58e 100644
+index 82660a673..9a1ec0341 100644
 --- a/examples/vhost/main.c
 +++ b/examples/vhost/main.c
-@@ -353,11 +353,19 @@ port_init(uint16_t port)
+@@ -400,11 +400,19 @@ port_init(uint16_t port)
  static int
  us_vhost_parse_socket_path(const char *q_arg)
  {

^ permalink raw reply	[flat|nested] 75+ messages in thread

* [dpdk-stable] patch 'net/sfc: fix Rx packets counter' has been queued to LTS release 17.11.6
  2019-03-08 17:46 [dpdk-stable] patch 'net/bnx2x: cleanup info logs' has been queued to LTS release 17.11.6 Yongseok Koh
                   ` (53 preceding siblings ...)
  2019-03-08 17:47 ` [dpdk-stable] patch 'examples/vhost: fix path allocation failure handling' " Yongseok Koh
@ 2019-03-08 17:47 ` Yongseok Koh
  2019-03-08 17:47 ` [dpdk-stable] patch 'doc: add missing loopback option in testpmd guide' " Yongseok Koh
                   ` (14 subsequent siblings)
  69 siblings, 0 replies; 75+ messages in thread
From: Yongseok Koh @ 2019-03-08 17:47 UTC (permalink / raw)
  To: Andrew Rybchenko; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.6

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objection by 03/13/19. So please
shout if anyone has objection.

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.

Yongseok

---
>From 10498b42efd1f989bbf211dab69de474d4f68169 Mon Sep 17 00:00:00 2001
From: Andrew Rybchenko <arybchenko@solarflare.com>
Date: Thu, 17 Jan 2019 06:17:32 +0000
Subject: [PATCH] net/sfc: fix Rx packets counter

[ upstream commit ab77a0013a811aacdde49e903786eff7abb308ec ]

Errors, missed and pauses should not be included in delivered
good Rx packets reported by ipackets.

Fixes: 1caab2f1e684 ("net/sfc: add basic statistics")

Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
---
 drivers/net/sfc/sfc.h        |  2 ++
 drivers/net/sfc/sfc_ethdev.c | 31 ++++++++++++++++++++++++++++++-
 drivers/net/sfc/sfc_port.c   | 14 ++++++++++++++
 3 files changed, 46 insertions(+), 1 deletion(-)

diff --git a/drivers/net/sfc/sfc.h b/drivers/net/sfc/sfc.h
index 7bc7a077c..b62306512 100644
--- a/drivers/net/sfc/sfc.h
+++ b/drivers/net/sfc/sfc.h
@@ -175,6 +175,8 @@ struct sfc_port {
 	uint64_t			mac_stats_last_request_timestamp;
 
 	uint32_t		mac_stats_mask[EFX_MAC_STATS_MASK_NPAGES];
+
+	uint64_t			ipackets;
 };
 
 /* Adapter private data */
diff --git a/drivers/net/sfc/sfc_ethdev.c b/drivers/net/sfc/sfc_ethdev.c
index 5854fd76a..09ab4ec8a 100644
--- a/drivers/net/sfc/sfc_ethdev.c
+++ b/drivers/net/sfc/sfc_ethdev.c
@@ -518,6 +518,29 @@ sfc_tx_queue_release(void *queue)
 	sfc_adapter_unlock(sa);
 }
 
+/*
+ * Some statistics are computed as A - B where A and B each increase
+ * monotonically with some hardware counter(s) and the counters are read
+ * asynchronously.
+ *
+ * If packet X is counted in A, but not counted in B yet, computed value is
+ * greater than real.
+ *
+ * If packet X is not counted in A at the moment of reading the counter,
+ * but counted in B at the moment of reading the counter, computed value
+ * is less than real.
+ *
+ * However, counter which grows backward is worse evil than slightly wrong
+ * value. So, let's try to guarantee that it never happens except may be
+ * the case when the MAC stats are zeroed as a result of a NIC reset.
+ */
+static void
+sfc_update_diff_stat(uint64_t *stat, uint64_t newval)
+{
+	if ((int64_t)(newval - *stat) > 0 || newval == 0)
+		*stat = newval;
+}
+
 static int
 sfc_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats)
 {
@@ -555,7 +578,6 @@ sfc_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats)
 		stats->imissed = mac_stats[EFX_MAC_VADAPTER_RX_BAD_PACKETS];
 		stats->oerrors = mac_stats[EFX_MAC_VADAPTER_TX_BAD_PACKETS];
 	} else {
-		stats->ipackets = mac_stats[EFX_MAC_RX_PKTS];
 		stats->opackets = mac_stats[EFX_MAC_TX_PKTS];
 		stats->ibytes = mac_stats[EFX_MAC_RX_OCTETS];
 		stats->obytes = mac_stats[EFX_MAC_TX_OCTETS];
@@ -581,6 +603,13 @@ sfc_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats)
 			mac_stats[EFX_MAC_RX_ALIGN_ERRORS] +
 			mac_stats[EFX_MAC_RX_JABBER_PKTS];
 		/* no oerrors counters supported on EF10 */
+
+		/* Exclude missed, errors and pauses from Rx packets */
+		sfc_update_diff_stat(&port->ipackets,
+			mac_stats[EFX_MAC_RX_PKTS] -
+			mac_stats[EFX_MAC_RX_PAUSE_PKTS] -
+			stats->imissed - stats->ierrors);
+		stats->ipackets = port->ipackets;
 	}
 
 unlock:
diff --git a/drivers/net/sfc/sfc_port.c b/drivers/net/sfc/sfc_port.c
index 5254394c9..109981f13 100644
--- a/drivers/net/sfc/sfc_port.c
+++ b/drivers/net/sfc/sfc_port.c
@@ -109,6 +109,18 @@ sfc_port_update_mac_stats(struct sfc_adapter *sa)
 	return 0;
 }
 
+static void
+sfc_port_reset_sw_stats(struct sfc_adapter *sa)
+{
+	struct sfc_port *port = &sa->port;
+
+	/*
+	 * Reset diff stats explicitly since check which does not allow
+	 * the statistics to grow backward could deny it.
+	 */
+	port->ipackets = 0;
+}
+
 int
 sfc_port_reset_mac_stats(struct sfc_adapter *sa)
 {
@@ -117,6 +129,8 @@ sfc_port_reset_mac_stats(struct sfc_adapter *sa)
 
 	rte_spinlock_lock(&port->mac_stats_lock);
 	rc = efx_mac_stats_clear(sa->nic);
+	if (rc == 0)
+		sfc_port_reset_sw_stats(sa);
 	rte_spinlock_unlock(&port->mac_stats_lock);
 
 	return rc;
-- 
2.11.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2019-03-08 09:46:42.973675250 -0800
+++ 0056-net-sfc-fix-Rx-packets-counter.patch	2019-03-08 09:46:40.295402000 -0800
@@ -1,13 +1,14 @@
-From ab77a0013a811aacdde49e903786eff7abb308ec Mon Sep 17 00:00:00 2001
+From 10498b42efd1f989bbf211dab69de474d4f68169 Mon Sep 17 00:00:00 2001
 From: Andrew Rybchenko <arybchenko@solarflare.com>
 Date: Thu, 17 Jan 2019 06:17:32 +0000
 Subject: [PATCH] net/sfc: fix Rx packets counter
 
+[ upstream commit ab77a0013a811aacdde49e903786eff7abb308ec ]
+
 Errors, missed and pauses should not be included in delivered
 good Rx packets reported by ipackets.
 
 Fixes: 1caab2f1e684 ("net/sfc: add basic statistics")
-Cc: stable@dpdk.org
 
 Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
 ---
@@ -17,10 +18,10 @@
  3 files changed, 46 insertions(+), 1 deletion(-)
 
 diff --git a/drivers/net/sfc/sfc.h b/drivers/net/sfc/sfc.h
-index 0b852340f..a94ca8e75 100644
+index 7bc7a077c..b62306512 100644
 --- a/drivers/net/sfc/sfc.h
 +++ b/drivers/net/sfc/sfc.h
-@@ -149,6 +149,8 @@ struct sfc_port {
+@@ -175,6 +175,8 @@ struct sfc_port {
  	uint64_t			mac_stats_last_request_timestamp;
  
  	uint32_t		mac_stats_mask[EFX_MAC_STATS_MASK_NPAGES];
@@ -28,12 +29,12 @@
 +	uint64_t			ipackets;
  };
  
- struct sfc_rss_hf_rte_to_efx {
+ /* Adapter private data */
 diff --git a/drivers/net/sfc/sfc_ethdev.c b/drivers/net/sfc/sfc_ethdev.c
-index 08d3271cb..a7322a1eb 100644
+index 5854fd76a..09ab4ec8a 100644
 --- a/drivers/net/sfc/sfc_ethdev.c
 +++ b/drivers/net/sfc/sfc_ethdev.c
-@@ -503,6 +503,29 @@ sfc_tx_queue_release(void *queue)
+@@ -518,6 +518,29 @@ sfc_tx_queue_release(void *queue)
  	sfc_adapter_unlock(sa);
  }
  
@@ -63,7 +64,7 @@
  static int
  sfc_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats)
  {
-@@ -540,7 +563,6 @@ sfc_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats)
+@@ -555,7 +578,6 @@ sfc_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats)
  		stats->imissed = mac_stats[EFX_MAC_VADAPTER_RX_BAD_PACKETS];
  		stats->oerrors = mac_stats[EFX_MAC_VADAPTER_TX_BAD_PACKETS];
  	} else {
@@ -71,7 +72,7 @@
  		stats->opackets = mac_stats[EFX_MAC_TX_PKTS];
  		stats->ibytes = mac_stats[EFX_MAC_RX_OCTETS];
  		stats->obytes = mac_stats[EFX_MAC_TX_OCTETS];
-@@ -566,6 +588,13 @@ sfc_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats)
+@@ -581,6 +603,13 @@ sfc_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats)
  			mac_stats[EFX_MAC_RX_ALIGN_ERRORS] +
  			mac_stats[EFX_MAC_RX_JABBER_PKTS];
  		/* no oerrors counters supported on EF10 */
@@ -86,10 +87,10 @@
  
  unlock:
 diff --git a/drivers/net/sfc/sfc_port.c b/drivers/net/sfc/sfc_port.c
-index 5384dbbdb..5eb4b3aca 100644
+index 5254394c9..109981f13 100644
 --- a/drivers/net/sfc/sfc_port.c
 +++ b/drivers/net/sfc/sfc_port.c
-@@ -87,6 +87,18 @@ sfc_port_update_mac_stats(struct sfc_adapter *sa)
+@@ -109,6 +109,18 @@ sfc_port_update_mac_stats(struct sfc_adapter *sa)
  	return 0;
  }
  
@@ -108,7 +109,7 @@
  int
  sfc_port_reset_mac_stats(struct sfc_adapter *sa)
  {
-@@ -95,6 +107,8 @@ sfc_port_reset_mac_stats(struct sfc_adapter *sa)
+@@ -117,6 +129,8 @@ sfc_port_reset_mac_stats(struct sfc_adapter *sa)
  
  	rte_spinlock_lock(&port->mac_stats_lock);
  	rc = efx_mac_stats_clear(sa->nic);

^ permalink raw reply	[flat|nested] 75+ messages in thread

* [dpdk-stable] patch 'doc: add missing loopback option in testpmd guide' has been queued to LTS release 17.11.6
  2019-03-08 17:46 [dpdk-stable] patch 'net/bnx2x: cleanup info logs' has been queued to LTS release 17.11.6 Yongseok Koh
                   ` (54 preceding siblings ...)
  2019-03-08 17:47 ` [dpdk-stable] patch 'net/sfc: fix Rx packets counter' " Yongseok Koh
@ 2019-03-08 17:47 ` Yongseok Koh
  2019-03-08 17:47 ` [dpdk-stable] patch 'efd: fix tail queue leak' " Yongseok Koh
                   ` (13 subsequent siblings)
  69 siblings, 0 replies; 75+ messages in thread
From: Yongseok Koh @ 2019-03-08 17:47 UTC (permalink / raw)
  To: Rami Rosen; +Cc: Bernard Iremonger, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.6

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objection by 03/13/19. So please
shout if anyone has objection.

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.

Yongseok

---
>From 51961c669889317c24380263b16eaaa7ac47ae2c Mon Sep 17 00:00:00 2001
From: Rami Rosen <ramirose@gmail.com>
Date: Thu, 17 Jan 2019 13:39:26 +0200
Subject: [PATCH] doc: add missing loopback option in testpmd guide

[ upstream commit 48670ed6f77adb44e696eb2b97592e25a2889fb6 ]

This patch adds a missing topology "loop" mode for port-topology
option in testpmd guide. The testpmd "loop" option
(PORT_TOPOLOGY_LOOP)  was added to testpmd parameter
port-topology back in 2014, but it seems that it was never added
to the testpmd guide. This patch adds it in the testpmd guide.

Fixes: 3e2006d6186c ("app/testpmd: add loopback topology")

Signed-off-by: Rami Rosen <ramirose@gmail.com>
Acked-by: Bernard Iremonger <bernard.iremonger@intel.com>
---
 doc/guides/testpmd_app_ug/run_app.rst | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/doc/guides/testpmd_app_ug/run_app.rst b/doc/guides/testpmd_app_ug/run_app.rst
index e50281376..809936046 100644
--- a/doc/guides/testpmd_app_ug/run_app.rst
+++ b/doc/guides/testpmd_app_ug/run_app.rst
@@ -341,7 +341,7 @@ The commandline options are:
 
 *   ``--port-topology=mode``
 
-    Set port topology, where mode is ``paired`` (the default) or ``chained``.
+    Set port topology, where mode is ``paired`` (the default), ``chained`` or ``loop``.
 
     In ``paired`` mode, the forwarding is between pairs of ports, for example: (0,1), (2,3), (4,5).
 
@@ -349,6 +349,8 @@ The commandline options are:
 
     The ordering of the ports can be changed using the portlist testpmd runtime function.
 
+    In ``loop`` mode, ingress traffic is simply transmitted back on the same interface.
+
 *   ``--forward-mode=mode``
 
     Set the forwarding mode where ``mode`` is one of the following::
-- 
2.11.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2019-03-08 09:46:43.017977806 -0800
+++ 0057-doc-add-missing-loopback-option-in-testpmd-guide.patch	2019-03-08 09:46:40.299402000 -0800
@@ -1,8 +1,10 @@
-From 48670ed6f77adb44e696eb2b97592e25a2889fb6 Mon Sep 17 00:00:00 2001
+From 51961c669889317c24380263b16eaaa7ac47ae2c Mon Sep 17 00:00:00 2001
 From: Rami Rosen <ramirose@gmail.com>
 Date: Thu, 17 Jan 2019 13:39:26 +0200
 Subject: [PATCH] doc: add missing loopback option in testpmd guide
 
+[ upstream commit 48670ed6f77adb44e696eb2b97592e25a2889fb6 ]
+
 This patch adds a missing topology "loop" mode for port-topology
 option in testpmd guide. The testpmd "loop" option
 (PORT_TOPOLOGY_LOOP)  was added to testpmd parameter
@@ -10,7 +12,6 @@
 to the testpmd guide. This patch adds it in the testpmd guide.
 
 Fixes: 3e2006d6186c ("app/testpmd: add loopback topology")
-Cc: stable@dpdk.org
 
 Signed-off-by: Rami Rosen <ramirose@gmail.com>
 Acked-by: Bernard Iremonger <bernard.iremonger@intel.com>
@@ -19,10 +20,10 @@
  1 file changed, 3 insertions(+), 1 deletion(-)
 
 diff --git a/doc/guides/testpmd_app_ug/run_app.rst b/doc/guides/testpmd_app_ug/run_app.rst
-index f717bd3f4..4495ed038 100644
+index e50281376..809936046 100644
 --- a/doc/guides/testpmd_app_ug/run_app.rst
 +++ b/doc/guides/testpmd_app_ug/run_app.rst
-@@ -196,7 +196,7 @@ The commandline options are:
+@@ -341,7 +341,7 @@ The commandline options are:
  
  *   ``--port-topology=mode``
  
@@ -31,7 +32,7 @@
  
      In ``paired`` mode, the forwarding is between pairs of ports, for example: (0,1), (2,3), (4,5).
  
-@@ -204,6 +204,8 @@ The commandline options are:
+@@ -349,6 +349,8 @@ The commandline options are:
  
      The ordering of the ports can be changed using the portlist testpmd runtime function.
  

^ permalink raw reply	[flat|nested] 75+ messages in thread

* [dpdk-stable] patch 'efd: fix tail queue leak' has been queued to LTS release 17.11.6
  2019-03-08 17:46 [dpdk-stable] patch 'net/bnx2x: cleanup info logs' has been queued to LTS release 17.11.6 Yongseok Koh
                   ` (55 preceding siblings ...)
  2019-03-08 17:47 ` [dpdk-stable] patch 'doc: add missing loopback option in testpmd guide' " Yongseok Koh
@ 2019-03-08 17:47 ` Yongseok Koh
  2019-03-08 17:47 ` [dpdk-stable] patch 'net/qede: fix performance bottleneck in Rx path' " Yongseok Koh
                   ` (12 subsequent siblings)
  69 siblings, 0 replies; 75+ messages in thread
From: Yongseok Koh @ 2019-03-08 17:47 UTC (permalink / raw)
  To: Hari Kumar Vemula
  Cc: Honnappa Nagarahalli, Reshma Pattan, Pablo de Lara, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.6

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objection by 03/13/19. So please
shout if anyone has objection.

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.

Yongseok

---
>From 89fde90c4b00da356301aedd80bf70ce27a8e40a Mon Sep 17 00:00:00 2001
From: Hari Kumar Vemula <hari.kumarx.vemula@intel.com>
Date: Fri, 18 Jan 2019 07:40:42 +0000
Subject: [PATCH] efd: fix tail queue leak

[ upstream commit c749c032252997cf50cbe3620a7edd30532423af ]

In rte_efd_create() allocated memory for tail queue entry but
not freed.
Added freeing the tail queue entry.

Fixes: 56b6ef874f80 ("efd: new Elastic Flow Distributor library")

Signed-off-by: Hari Kumar Vemula <hari.kumarx.vemula@intel.com>
Reviewed-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
Acked-by: Reshma Pattan <reshma.pattan@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
---
 lib/librte_efd/rte_efd.c | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/lib/librte_efd/rte_efd.c b/lib/librte_efd/rte_efd.c
index 6b611b555..34e092098 100644
--- a/lib/librte_efd/rte_efd.c
+++ b/lib/librte_efd/rte_efd.c
@@ -769,6 +769,8 @@ void
 rte_efd_free(struct rte_efd_table *table)
 {
 	uint8_t socket_id;
+	struct rte_efd_list *efd_list;
+	struct rte_tailq_entry *te, *temp;
 
 	if (table == NULL)
 		return;
@@ -776,6 +778,18 @@ rte_efd_free(struct rte_efd_table *table)
 	for (socket_id = 0; socket_id < RTE_MAX_NUMA_NODES; socket_id++)
 		rte_free(table->chunks[socket_id]);
 
+	efd_list = RTE_TAILQ_CAST(rte_efd_tailq.head, rte_efd_list);
+	rte_rwlock_write_lock(RTE_EAL_TAILQ_RWLOCK);
+
+	TAILQ_FOREACH_SAFE(te, efd_list, next, temp) {
+		if (te->data == (void *) table) {
+			TAILQ_REMOVE(efd_list, te, next);
+			rte_free(te);
+			break;
+		}
+	}
+
+	rte_rwlock_write_unlock(RTE_EAL_TAILQ_RWLOCK);
 	rte_ring_free(table->free_slots);
 	rte_free(table->offline_chunks);
 	rte_free(table->keys);
-- 
2.11.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2019-03-08 09:46:43.062100406 -0800
+++ 0058-efd-fix-tail-queue-leak.patch	2019-03-08 09:46:40.303403000 -0800
@@ -1,14 +1,15 @@
-From c749c032252997cf50cbe3620a7edd30532423af Mon Sep 17 00:00:00 2001
+From 89fde90c4b00da356301aedd80bf70ce27a8e40a Mon Sep 17 00:00:00 2001
 From: Hari Kumar Vemula <hari.kumarx.vemula@intel.com>
 Date: Fri, 18 Jan 2019 07:40:42 +0000
 Subject: [PATCH] efd: fix tail queue leak
 
+[ upstream commit c749c032252997cf50cbe3620a7edd30532423af ]
+
 In rte_efd_create() allocated memory for tail queue entry but
 not freed.
 Added freeing the tail queue entry.
 
 Fixes: 56b6ef874f80 ("efd: new Elastic Flow Distributor library")
-Cc: stable@dpdk.org
 
 Signed-off-by: Hari Kumar Vemula <hari.kumarx.vemula@intel.com>
 Reviewed-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
@@ -19,10 +20,10 @@
  1 file changed, 14 insertions(+)
 
 diff --git a/lib/librte_efd/rte_efd.c b/lib/librte_efd/rte_efd.c
-index e6e5cfda2..1a97ece05 100644
+index 6b611b555..34e092098 100644
 --- a/lib/librte_efd/rte_efd.c
 +++ b/lib/librte_efd/rte_efd.c
-@@ -740,6 +740,8 @@ void
+@@ -769,6 +769,8 @@ void
  rte_efd_free(struct rte_efd_table *table)
  {
  	uint8_t socket_id;
@@ -31,7 +32,7 @@
  
  	if (table == NULL)
  		return;
-@@ -747,6 +749,18 @@ rte_efd_free(struct rte_efd_table *table)
+@@ -776,6 +778,18 @@ rte_efd_free(struct rte_efd_table *table)
  	for (socket_id = 0; socket_id < RTE_MAX_NUMA_NODES; socket_id++)
  		rte_free(table->chunks[socket_id]);
  

^ permalink raw reply	[flat|nested] 75+ messages in thread

* [dpdk-stable] patch 'net/qede: fix performance bottleneck in Rx path' has been queued to LTS release 17.11.6
  2019-03-08 17:46 [dpdk-stable] patch 'net/bnx2x: cleanup info logs' has been queued to LTS release 17.11.6 Yongseok Koh
                   ` (56 preceding siblings ...)
  2019-03-08 17:47 ` [dpdk-stable] patch 'efd: fix tail queue leak' " Yongseok Koh
@ 2019-03-08 17:47 ` Yongseok Koh
  2019-03-12 17:04   ` [dpdk-stable] [EXT] " Shahed Shaikh
  2019-03-08 17:47 ` [dpdk-stable] patch 'net/qede: remove prefetch in Tx " Yongseok Koh
                   ` (11 subsequent siblings)
  69 siblings, 1 reply; 75+ messages in thread
From: Yongseok Koh @ 2019-03-08 17:47 UTC (permalink / raw)
  To: Shahed Shaikh; +Cc: Rasesh Mody, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.6

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objection by 03/13/19. So please
shout if anyone has objection.

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.

Yongseok

---
>From f4f2aff537e1ff13ed85a9d4e52038ca34e7e005 Mon Sep 17 00:00:00 2001
From: Shahed Shaikh <shshaikh@marvell.com>
Date: Fri, 18 Jan 2019 02:29:29 -0800
Subject: [PATCH] net/qede: fix performance bottleneck in Rx path

[ upstream commit 8f2312474529ad7ff0e4b65b82efc8530e7484ce ]

Allocating replacement buffer per received packet is expensive.
Instead, process received packets first and allocate
replacement buffers in bulk later.

This improves performance by ~25% in terms of PPS on AMD
platforms.

Fixes: 2ea6f76aff40 ("qede: add core driver")

Signed-off-by: Shahed Shaikh <shshaikh@marvell.com>
Acked-by: Rasesh Mody <rmody@marvell.com>
---
 drivers/net/qede/qede_rxtx.c | 97 +++++++++++++++++++++++++++++++++-----------
 drivers/net/qede/qede_rxtx.h |  2 +
 2 files changed, 75 insertions(+), 24 deletions(-)

diff --git a/drivers/net/qede/qede_rxtx.c b/drivers/net/qede/qede_rxtx.c
index cdb85c218..b525075ca 100644
--- a/drivers/net/qede/qede_rxtx.c
+++ b/drivers/net/qede/qede_rxtx.c
@@ -37,6 +37,52 @@ static inline int qede_alloc_rx_buffer(struct qede_rx_queue *rxq)
 	return 0;
 }
 
+#define QEDE_MAX_BULK_ALLOC_COUNT 512
+
+static inline int qede_alloc_rx_bulk_mbufs(struct qede_rx_queue *rxq, int count)
+{
+	void *obj_p[QEDE_MAX_BULK_ALLOC_COUNT] __rte_cache_aligned;
+	struct rte_mbuf *mbuf = NULL;
+	struct eth_rx_bd *rx_bd;
+	dma_addr_t mapping;
+	int i, ret = 0;
+	uint16_t idx;
+
+	idx = rxq->sw_rx_prod & NUM_RX_BDS(rxq);
+
+	if (count > QEDE_MAX_BULK_ALLOC_COUNT)
+		count = QEDE_MAX_BULK_ALLOC_COUNT;
+
+	ret = rte_mempool_get_bulk(rxq->mb_pool, obj_p, count);
+	if (unlikely(ret)) {
+		PMD_RX_LOG(ERR, rxq,
+			   "Failed to allocate %d rx buffers "
+			    "sw_rx_prod %u sw_rx_cons %u mp entries %u free %u",
+			    count, idx, rxq->sw_rx_cons & NUM_RX_BDS(rxq),
+			    rte_mempool_avail_count(rxq->mb_pool),
+			    rte_mempool_in_use_count(rxq->mb_pool));
+		return -ENOMEM;
+	}
+
+	for (i = 0; i < count; i++) {
+		mbuf = obj_p[i];
+		if (likely(i < count - 1))
+			rte_prefetch0(obj_p[i + 1]);
+
+		idx = rxq->sw_rx_prod & NUM_RX_BDS(rxq);
+		rxq->sw_rx_ring[idx].mbuf = mbuf;
+		rxq->sw_rx_ring[idx].page_offset = 0;
+		mapping = rte_mbuf_data_iova_default(mbuf);
+		rx_bd = (struct eth_rx_bd *)
+			ecore_chain_produce(&rxq->rx_bd_ring);
+		rx_bd->addr.hi = rte_cpu_to_le_32(U64_HI(mapping));
+		rx_bd->addr.lo = rte_cpu_to_le_32(U64_LO(mapping));
+		rxq->sw_rx_prod++;
+	}
+
+	return 0;
+}
+
 /* Criterias for calculating Rx buffer size -
  * 1) rx_buf_size should not exceed the size of mbuf
  * 2) In scattered_rx mode - minimum rx_buf_size should be
@@ -1134,7 +1180,7 @@ qede_reuse_page(__rte_unused struct qede_dev *qdev,
 		struct qede_rx_queue *rxq, struct qede_rx_entry *curr_cons)
 {
 	struct eth_rx_bd *rx_bd_prod = ecore_chain_produce(&rxq->rx_bd_ring);
-	uint16_t idx = rxq->sw_rx_cons & NUM_RX_BDS(rxq);
+	uint16_t idx = rxq->sw_rx_prod & NUM_RX_BDS(rxq);
 	struct qede_rx_entry *curr_prod;
 	dma_addr_t new_mapping;
 
@@ -1367,7 +1413,6 @@ qede_recv_pkts(void *p_rxq, struct rte_mbuf **rx_pkts, uint16_t nb_pkts)
 	uint8_t bitfield_val;
 #endif
 	uint8_t tunn_parse_flag;
-	uint8_t j;
 	struct eth_fast_path_rx_tpa_start_cqe *cqe_start_tpa;
 	uint64_t ol_flags;
 	uint32_t packet_type;
@@ -1376,6 +1421,7 @@ qede_recv_pkts(void *p_rxq, struct rte_mbuf **rx_pkts, uint16_t nb_pkts)
 	uint8_t offset, tpa_agg_idx, flags;
 	struct qede_agg_info *tpa_info = NULL;
 	uint32_t rss_hash;
+	int rx_alloc_count = 0;
 
 	hw_comp_cons = rte_le_to_cpu_16(*rxq->hw_cons_ptr);
 	sw_comp_cons = ecore_chain_get_cons_idx(&rxq->rx_comp_ring);
@@ -1385,6 +1431,25 @@ qede_recv_pkts(void *p_rxq, struct rte_mbuf **rx_pkts, uint16_t nb_pkts)
 	if (hw_comp_cons == sw_comp_cons)
 		return 0;
 
+	/* Allocate buffers that we used in previous loop */
+	if (rxq->rx_alloc_count) {
+		if (unlikely(qede_alloc_rx_bulk_mbufs(rxq,
+			     rxq->rx_alloc_count))) {
+			struct rte_eth_dev *dev;
+
+			PMD_RX_LOG(ERR, rxq,
+				   "New buffer allocation failed,"
+				   "dropping incoming packetn");
+			dev = &rte_eth_devices[rxq->port_id];
+			dev->data->rx_mbuf_alloc_failed +=
+							rxq->rx_alloc_count;
+			rxq->rx_alloc_errors += rxq->rx_alloc_count;
+			return 0;
+		}
+		qede_update_rx_prod(qdev, rxq);
+		rxq->rx_alloc_count = 0;
+	}
+
 	while (sw_comp_cons != hw_comp_cons) {
 		ol_flags = 0;
 		packet_type = RTE_PTYPE_UNKNOWN;
@@ -1556,16 +1621,7 @@ qede_recv_pkts(void *p_rxq, struct rte_mbuf **rx_pkts, uint16_t nb_pkts)
 			rx_mb->hash.rss = rss_hash;
 		}
 
-		if (unlikely(qede_alloc_rx_buffer(rxq) != 0)) {
-			PMD_RX_LOG(ERR, rxq,
-				   "New buffer allocation failed,"
-				   "dropping incoming packet\n");
-			qede_recycle_rx_bd_ring(rxq, qdev, fp_cqe->bd_num);
-			rte_eth_devices[rxq->port_id].
-			    data->rx_mbuf_alloc_failed++;
-			rxq->rx_alloc_errors++;
-			break;
-		}
+		rx_alloc_count++;
 		qede_rx_bd_ring_consume(rxq);
 
 		if (!tpa_start_flg && fp_cqe->bd_num > 1) {
@@ -1577,17 +1633,9 @@ qede_recv_pkts(void *p_rxq, struct rte_mbuf **rx_pkts, uint16_t nb_pkts)
 			if (qede_process_sg_pkts(p_rxq, seg1, num_segs,
 						 pkt_len - len))
 				goto next_cqe;
-			for (j = 0; j < num_segs; j++) {
-				if (qede_alloc_rx_buffer(rxq)) {
-					PMD_RX_LOG(ERR, rxq,
-						"Buffer allocation failed");
-					rte_eth_devices[rxq->port_id].
-						data->rx_mbuf_alloc_failed++;
-					rxq->rx_alloc_errors++;
-					break;
-				}
-				rxq->rx_segs++;
-			}
+
+			rx_alloc_count += num_segs;
+			rxq->rx_segs += num_segs;
 		}
 		rxq->rx_segs++; /* for the first segment */
 
@@ -1629,7 +1677,8 @@ next_cqe:
 		}
 	}
 
-	qede_update_rx_prod(qdev, rxq);
+	/* Request number of bufferes to be allocated in next loop */
+	rxq->rx_alloc_count = rx_alloc_count;
 
 	rxq->rcv_pkts += rx_pkt;
 
diff --git a/drivers/net/qede/qede_rxtx.h b/drivers/net/qede/qede_rxtx.h
index fe80237d5..574831e61 100644
--- a/drivers/net/qede/qede_rxtx.h
+++ b/drivers/net/qede/qede_rxtx.h
@@ -196,6 +196,8 @@ struct qede_rx_queue {
 	uint16_t queue_id;
 	uint16_t port_id;
 	uint16_t rx_buf_size;
+	uint16_t rx_alloc_count;
+	uint16_t unused;
 	uint64_t rcv_pkts;
 	uint64_t rx_segs;
 	uint64_t rx_hw_errors;
-- 
2.11.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2019-03-08 09:46:43.105876155 -0800
+++ 0059-net-qede-fix-performance-bottleneck-in-Rx-path.patch	2019-03-08 09:46:40.311403000 -0800
@@ -1,8 +1,10 @@
-From 8f2312474529ad7ff0e4b65b82efc8530e7484ce Mon Sep 17 00:00:00 2001
+From f4f2aff537e1ff13ed85a9d4e52038ca34e7e005 Mon Sep 17 00:00:00 2001
 From: Shahed Shaikh <shshaikh@marvell.com>
 Date: Fri, 18 Jan 2019 02:29:29 -0800
 Subject: [PATCH] net/qede: fix performance bottleneck in Rx path
 
+[ upstream commit 8f2312474529ad7ff0e4b65b82efc8530e7484ce ]
+
 Allocating replacement buffer per received packet is expensive.
 Instead, process received packets first and allocate
 replacement buffers in bulk later.
@@ -11,7 +13,6 @@
 platforms.
 
 Fixes: 2ea6f76aff40 ("qede: add core driver")
-Cc: stable@dpdk.org
 
 Signed-off-by: Shahed Shaikh <shshaikh@marvell.com>
 Acked-by: Rasesh Mody <rmody@marvell.com>
@@ -21,10 +22,10 @@
  2 files changed, 75 insertions(+), 24 deletions(-)
 
 diff --git a/drivers/net/qede/qede_rxtx.c b/drivers/net/qede/qede_rxtx.c
-index 0e33be1a3..684c4aeef 100644
+index cdb85c218..b525075ca 100644
 --- a/drivers/net/qede/qede_rxtx.c
 +++ b/drivers/net/qede/qede_rxtx.c
-@@ -35,6 +35,52 @@ static inline int qede_alloc_rx_buffer(struct qede_rx_queue *rxq)
+@@ -37,6 +37,52 @@ static inline int qede_alloc_rx_buffer(struct qede_rx_queue *rxq)
  	return 0;
  }
  
@@ -77,7 +78,7 @@
  /* Criterias for calculating Rx buffer size -
   * 1) rx_buf_size should not exceed the size of mbuf
   * 2) In scattered_rx mode - minimum rx_buf_size should be
-@@ -1131,7 +1177,7 @@ qede_reuse_page(__rte_unused struct qede_dev *qdev,
+@@ -1134,7 +1180,7 @@ qede_reuse_page(__rte_unused struct qede_dev *qdev,
  		struct qede_rx_queue *rxq, struct qede_rx_entry *curr_cons)
  {
  	struct eth_rx_bd *rx_bd_prod = ecore_chain_produce(&rxq->rx_bd_ring);
@@ -86,7 +87,7 @@
  	struct qede_rx_entry *curr_prod;
  	dma_addr_t new_mapping;
  
-@@ -1364,7 +1410,6 @@ qede_recv_pkts(void *p_rxq, struct rte_mbuf **rx_pkts, uint16_t nb_pkts)
+@@ -1367,7 +1413,6 @@ qede_recv_pkts(void *p_rxq, struct rte_mbuf **rx_pkts, uint16_t nb_pkts)
  	uint8_t bitfield_val;
  #endif
  	uint8_t tunn_parse_flag;
@@ -94,7 +95,7 @@
  	struct eth_fast_path_rx_tpa_start_cqe *cqe_start_tpa;
  	uint64_t ol_flags;
  	uint32_t packet_type;
-@@ -1373,6 +1418,7 @@ qede_recv_pkts(void *p_rxq, struct rte_mbuf **rx_pkts, uint16_t nb_pkts)
+@@ -1376,6 +1421,7 @@ qede_recv_pkts(void *p_rxq, struct rte_mbuf **rx_pkts, uint16_t nb_pkts)
  	uint8_t offset, tpa_agg_idx, flags;
  	struct qede_agg_info *tpa_info = NULL;
  	uint32_t rss_hash;
@@ -102,7 +103,7 @@
  
  	hw_comp_cons = rte_le_to_cpu_16(*rxq->hw_cons_ptr);
  	sw_comp_cons = ecore_chain_get_cons_idx(&rxq->rx_comp_ring);
-@@ -1382,6 +1428,25 @@ qede_recv_pkts(void *p_rxq, struct rte_mbuf **rx_pkts, uint16_t nb_pkts)
+@@ -1385,6 +1431,25 @@ qede_recv_pkts(void *p_rxq, struct rte_mbuf **rx_pkts, uint16_t nb_pkts)
  	if (hw_comp_cons == sw_comp_cons)
  		return 0;
  
@@ -128,7 +129,7 @@
  	while (sw_comp_cons != hw_comp_cons) {
  		ol_flags = 0;
  		packet_type = RTE_PTYPE_UNKNOWN;
-@@ -1553,16 +1618,7 @@ qede_recv_pkts(void *p_rxq, struct rte_mbuf **rx_pkts, uint16_t nb_pkts)
+@@ -1556,16 +1621,7 @@ qede_recv_pkts(void *p_rxq, struct rte_mbuf **rx_pkts, uint16_t nb_pkts)
  			rx_mb->hash.rss = rss_hash;
  		}
  
@@ -146,7 +147,7 @@
  		qede_rx_bd_ring_consume(rxq);
  
  		if (!tpa_start_flg && fp_cqe->bd_num > 1) {
-@@ -1574,17 +1630,9 @@ qede_recv_pkts(void *p_rxq, struct rte_mbuf **rx_pkts, uint16_t nb_pkts)
+@@ -1577,17 +1633,9 @@ qede_recv_pkts(void *p_rxq, struct rte_mbuf **rx_pkts, uint16_t nb_pkts)
  			if (qede_process_sg_pkts(p_rxq, seg1, num_segs,
  						 pkt_len - len))
  				goto next_cqe;
@@ -167,7 +168,7 @@
  		}
  		rxq->rx_segs++; /* for the first segment */
  
-@@ -1626,7 +1674,8 @@ next_cqe:
+@@ -1629,7 +1677,8 @@ next_cqe:
  		}
  	}
  
@@ -178,10 +179,10 @@
  	rxq->rcv_pkts += rx_pkt;
  
 diff --git a/drivers/net/qede/qede_rxtx.h b/drivers/net/qede/qede_rxtx.h
-index 454daa07b..5b249cbb2 100644
+index fe80237d5..574831e61 100644
 --- a/drivers/net/qede/qede_rxtx.h
 +++ b/drivers/net/qede/qede_rxtx.h
-@@ -192,6 +192,8 @@ struct qede_rx_queue {
+@@ -196,6 +196,8 @@ struct qede_rx_queue {
  	uint16_t queue_id;
  	uint16_t port_id;
  	uint16_t rx_buf_size;

^ permalink raw reply	[flat|nested] 75+ messages in thread

* [dpdk-stable] patch 'net/qede: remove prefetch in Tx path' has been queued to LTS release 17.11.6
  2019-03-08 17:46 [dpdk-stable] patch 'net/bnx2x: cleanup info logs' has been queued to LTS release 17.11.6 Yongseok Koh
                   ` (57 preceding siblings ...)
  2019-03-08 17:47 ` [dpdk-stable] patch 'net/qede: fix performance bottleneck in Rx path' " Yongseok Koh
@ 2019-03-08 17:47 ` Yongseok Koh
  2019-03-08 17:47 ` [dpdk-stable] patch 'doc: fix references in power management guide' " Yongseok Koh
                   ` (10 subsequent siblings)
  69 siblings, 0 replies; 75+ messages in thread
From: Yongseok Koh @ 2019-03-08 17:47 UTC (permalink / raw)
  To: Shahed Shaikh; +Cc: Rasesh Mody, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.6

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objection by 03/13/19. So please
shout if anyone has objection.

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.

Yongseok

---
>From a80ab4ac151985069f1a00e7cc53d3c2eea76113 Mon Sep 17 00:00:00 2001
From: Shahed Shaikh <shshaikh@marvell.com>
Date: Fri, 18 Jan 2019 02:29:30 -0800
Subject: [PATCH] net/qede: remove prefetch in Tx path

[ upstream commit d6ddd17fb17cb250044bada4ae42a799375fd6c5 ]

Incorrect placement of prefetch in Tx path is causing
a performance drop of around ~2% on AMD platform.

Fixes: 2ea6f76aff40 ("qede: add core driver")

Signed-off-by: Shahed Shaikh <shshaikh@marvell.com>
Acked-by: Rasesh Mody <rmody@marvell.com>
---
 drivers/net/qede/qede_rxtx.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/net/qede/qede_rxtx.c b/drivers/net/qede/qede_rxtx.c
index b525075ca..7ef76edc3 100644
--- a/drivers/net/qede/qede_rxtx.c
+++ b/drivers/net/qede/qede_rxtx.c
@@ -2182,7 +2182,6 @@ qede_xmit_pkts(void *p_txq, struct rte_mbuf **tx_pkts, uint16_t nb_pkts)
 
 		txq->nb_tx_avail -= bd1->data.nbds;
 		txq->sw_tx_prod++;
-		rte_prefetch0(txq->sw_tx_ring[TX_PROD(txq)].mbuf);
 		bd_prod =
 		    rte_cpu_to_le_16(ecore_chain_get_prod_idx(&txq->tx_pbl));
 #ifdef RTE_LIBRTE_QEDE_DEBUG_TX
-- 
2.11.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2019-03-08 09:46:43.150710636 -0800
+++ 0060-net-qede-remove-prefetch-in-Tx-path.patch	2019-03-08 09:46:40.317403000 -0800
@@ -1,13 +1,14 @@
-From d6ddd17fb17cb250044bada4ae42a799375fd6c5 Mon Sep 17 00:00:00 2001
+From a80ab4ac151985069f1a00e7cc53d3c2eea76113 Mon Sep 17 00:00:00 2001
 From: Shahed Shaikh <shshaikh@marvell.com>
 Date: Fri, 18 Jan 2019 02:29:30 -0800
 Subject: [PATCH] net/qede: remove prefetch in Tx path
 
+[ upstream commit d6ddd17fb17cb250044bada4ae42a799375fd6c5 ]
+
 Incorrect placement of prefetch in Tx path is causing
 a performance drop of around ~2% on AMD platform.
 
 Fixes: 2ea6f76aff40 ("qede: add core driver")
-Cc: stable@dpdk.org
 
 Signed-off-by: Shahed Shaikh <shshaikh@marvell.com>
 Acked-by: Rasesh Mody <rmody@marvell.com>
@@ -16,10 +17,10 @@
  1 file changed, 1 deletion(-)
 
 diff --git a/drivers/net/qede/qede_rxtx.c b/drivers/net/qede/qede_rxtx.c
-index 684c4aeef..eda19b2b1 100644
+index b525075ca..7ef76edc3 100644
 --- a/drivers/net/qede/qede_rxtx.c
 +++ b/drivers/net/qede/qede_rxtx.c
-@@ -2181,7 +2181,6 @@ qede_xmit_pkts(void *p_txq, struct rte_mbuf **tx_pkts, uint16_t nb_pkts)
+@@ -2182,7 +2182,6 @@ qede_xmit_pkts(void *p_txq, struct rte_mbuf **tx_pkts, uint16_t nb_pkts)
  
  		txq->nb_tx_avail -= bd1->data.nbds;
  		txq->sw_tx_prod++;

^ permalink raw reply	[flat|nested] 75+ messages in thread

* [dpdk-stable] patch 'doc: fix references in power management guide' has been queued to LTS release 17.11.6
  2019-03-08 17:46 [dpdk-stable] patch 'net/bnx2x: cleanup info logs' has been queued to LTS release 17.11.6 Yongseok Koh
                   ` (58 preceding siblings ...)
  2019-03-08 17:47 ` [dpdk-stable] patch 'net/qede: remove prefetch in Tx " Yongseok Koh
@ 2019-03-08 17:47 ` Yongseok Koh
  2019-03-08 17:47 ` [dpdk-stable] patch 'ethdev: fix errno to have positive value' " Yongseok Koh
                   ` (9 subsequent siblings)
  69 siblings, 0 replies; 75+ messages in thread
From: Yongseok Koh @ 2019-03-08 17:47 UTC (permalink / raw)
  To: David Hunt; +Cc: Marko Kovacevic, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.6

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objection by 03/13/19. So please
shout if anyone has objection.

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.

Yongseok

---
>From 6ad5a9442a236ac895a00f7de827f002ad6bd7eb Mon Sep 17 00:00:00 2001
From: David Hunt <david.hunt@intel.com>
Date: Fri, 18 Jan 2019 09:34:24 +0000
Subject: [PATCH] doc: fix references in power management guide

[ upstream commit fa77f80f49b649995a90f2adc38a4811efa39dc3 ]

In the References section in the Power Management overview,
both links pointed to the same l3fwd-power app. Fix the links
so that one points to l3fwd-power, and the other points to
the vm_power_manager sample app.

Signed-off-by: David Hunt <david.hunt@intel.com>
Acked-by: Marko Kovacevic <marko.kovacevic@intel.com>
---
 doc/guides/prog_guide/power_man.rst | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/doc/guides/prog_guide/power_man.rst b/doc/guides/prog_guide/power_man.rst
index c5d62a395..13636abd8 100644
--- a/doc/guides/prog_guide/power_man.rst
+++ b/doc/guides/prog_guide/power_man.rst
@@ -128,6 +128,8 @@ The power management mechanism is used to save power when performing L3 forwardi
 References
 ----------
 
-*   l3fwd-power: The sample application in DPDK that performs L3 forwarding with power management.
+*   The :doc:`../sample_app_ug/l3_forward_power_man`
+    chapter in the :doc:`../sample_app_ug/index` section.
 
-*   The "L3 Forwarding with Power Management Sample Application" chapter in the *DPDK Sample Application's User Guide*.
+*   The :doc:`../sample_app_ug/vm_power_management`
+    chapter in the :doc:`../sample_app_ug/index` section.
-- 
2.11.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2019-03-08 09:46:43.193969164 -0800
+++ 0061-doc-fix-references-in-power-management-guide.patch	2019-03-08 09:46:40.320412000 -0800
@@ -1,8 +1,10 @@
-From fa77f80f49b649995a90f2adc38a4811efa39dc3 Mon Sep 17 00:00:00 2001
+From 6ad5a9442a236ac895a00f7de827f002ad6bd7eb Mon Sep 17 00:00:00 2001
 From: David Hunt <david.hunt@intel.com>
 Date: Fri, 18 Jan 2019 09:34:24 +0000
 Subject: [PATCH] doc: fix references in power management guide
 
+[ upstream commit fa77f80f49b649995a90f2adc38a4811efa39dc3 ]
+
 In the References section in the Power Management overview,
 both links pointed to the same l3fwd-power app. Fix the links
 so that one points to l3fwd-power, and the other points to
@@ -15,10 +17,10 @@
  1 file changed, 4 insertions(+), 2 deletions(-)
 
 diff --git a/doc/guides/prog_guide/power_man.rst b/doc/guides/prog_guide/power_man.rst
-index f55436bc9..0a3755a90 100644
+index c5d62a395..13636abd8 100644
 --- a/doc/guides/prog_guide/power_man.rst
 +++ b/doc/guides/prog_guide/power_man.rst
-@@ -195,6 +195,8 @@ The mechanism can applied to any device which is based on polling. e.g. NIC, FPG
+@@ -128,6 +128,8 @@ The power management mechanism is used to save power when performing L3 forwardi
  References
  ----------
  

^ permalink raw reply	[flat|nested] 75+ messages in thread

* [dpdk-stable] patch 'ethdev: fix errno to have positive value' has been queued to LTS release 17.11.6
  2019-03-08 17:46 [dpdk-stable] patch 'net/bnx2x: cleanup info logs' has been queued to LTS release 17.11.6 Yongseok Koh
                   ` (59 preceding siblings ...)
  2019-03-08 17:47 ` [dpdk-stable] patch 'doc: fix references in power management guide' " Yongseok Koh
@ 2019-03-08 17:47 ` Yongseok Koh
  2019-03-08 17:47 ` [dpdk-stable] patch 'gso: fix VxLAN/GRE tunnel checks' " Yongseok Koh
                   ` (8 subsequent siblings)
  69 siblings, 0 replies; 75+ messages in thread
From: Yongseok Koh @ 2019-03-08 17:47 UTC (permalink / raw)
  To: Andrew Rybchenko; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.6

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objection by 03/13/19. So please
shout if anyone has objection.

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.

Yongseok

---
>From 007575c26cf774b719a5c2c816f0c9e7ec61e1cf Mon Sep 17 00:00:00 2001
From: Andrew Rybchenko <arybchenko@solarflare.com>
Date: Mon, 21 Jan 2019 16:18:35 +0000
Subject: [PATCH] ethdev: fix errno to have positive value

[ backported from upstream commit 8e0c8dcf3507ae812f1abcd5247617917f131dae ]

rte_errno should be set to positive value from errno.h plus
few RTE-specific values.

Fixes: 4fb7e803eb1a ("ethdev: add Tx preparation")
Fixes: 439a90b5f2a7 ("ethdev: reorder inline functions")

Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
---
 lib/librte_ether/rte_ethdev.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/librte_ether/rte_ethdev.h b/lib/librte_ether/rte_ethdev.h
index f252e4110..2ef53a636 100644
--- a/lib/librte_ether/rte_ethdev.h
+++ b/lib/librte_ether/rte_ethdev.h
@@ -3244,7 +3244,7 @@ rte_eth_tx_prepare(uint16_t port_id, uint16_t queue_id,
 #ifdef RTE_LIBRTE_ETHDEV_DEBUG
 	if (!rte_eth_dev_is_valid_port(port_id)) {
 		RTE_PMD_DEBUG_TRACE("Invalid TX port_id=%d\n", port_id);
-		rte_errno = -EINVAL;
+		rte_errno = EINVAL;
 		return 0;
 	}
 #endif
@@ -3254,7 +3254,7 @@ rte_eth_tx_prepare(uint16_t port_id, uint16_t queue_id,
 #ifdef RTE_LIBRTE_ETHDEV_DEBUG
 	if (queue_id >= dev->data->nb_tx_queues) {
 		RTE_PMD_DEBUG_TRACE("Invalid TX queue_id=%d\n", queue_id);
-		rte_errno = -EINVAL;
+		rte_errno = EINVAL;
 		return 0;
 	}
 #endif
-- 
2.11.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2019-03-08 09:46:43.237729815 -0800
+++ 0062-ethdev-fix-errno-to-have-positive-value.patch	2019-03-08 09:46:40.327405000 -0800
@@ -1,37 +1,38 @@
-From 8e0c8dcf3507ae812f1abcd5247617917f131dae Mon Sep 17 00:00:00 2001
+From 007575c26cf774b719a5c2c816f0c9e7ec61e1cf Mon Sep 17 00:00:00 2001
 From: Andrew Rybchenko <arybchenko@solarflare.com>
 Date: Mon, 21 Jan 2019 16:18:35 +0000
 Subject: [PATCH] ethdev: fix errno to have positive value
 
+[ backported from upstream commit 8e0c8dcf3507ae812f1abcd5247617917f131dae ]
+
 rte_errno should be set to positive value from errno.h plus
 few RTE-specific values.
 
 Fixes: 4fb7e803eb1a ("ethdev: add Tx preparation")
 Fixes: 439a90b5f2a7 ("ethdev: reorder inline functions")
-Cc: stable@dpdk.org
 
 Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
 ---
- lib/librte_ethdev/rte_ethdev.h | 4 ++--
+ lib/librte_ether/rte_ethdev.h | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)
 
-diff --git a/lib/librte_ethdev/rte_ethdev.h b/lib/librte_ethdev/rte_ethdev.h
-index 76266ad10..a3c864a13 100644
---- a/lib/librte_ethdev/rte_ethdev.h
-+++ b/lib/librte_ethdev/rte_ethdev.h
-@@ -4222,7 +4222,7 @@ rte_eth_tx_prepare(uint16_t port_id, uint16_t queue_id,
+diff --git a/lib/librte_ether/rte_ethdev.h b/lib/librte_ether/rte_ethdev.h
+index f252e4110..2ef53a636 100644
+--- a/lib/librte_ether/rte_ethdev.h
++++ b/lib/librte_ether/rte_ethdev.h
+@@ -3244,7 +3244,7 @@ rte_eth_tx_prepare(uint16_t port_id, uint16_t queue_id,
  #ifdef RTE_LIBRTE_ETHDEV_DEBUG
  	if (!rte_eth_dev_is_valid_port(port_id)) {
- 		RTE_ETHDEV_LOG(ERR, "Invalid TX port_id=%u\n", port_id);
+ 		RTE_PMD_DEBUG_TRACE("Invalid TX port_id=%d\n", port_id);
 -		rte_errno = -EINVAL;
 +		rte_errno = EINVAL;
  		return 0;
  	}
  #endif
-@@ -4232,7 +4232,7 @@ rte_eth_tx_prepare(uint16_t port_id, uint16_t queue_id,
+@@ -3254,7 +3254,7 @@ rte_eth_tx_prepare(uint16_t port_id, uint16_t queue_id,
  #ifdef RTE_LIBRTE_ETHDEV_DEBUG
  	if (queue_id >= dev->data->nb_tx_queues) {
- 		RTE_ETHDEV_LOG(ERR, "Invalid TX queue_id=%u\n", queue_id);
+ 		RTE_PMD_DEBUG_TRACE("Invalid TX queue_id=%d\n", queue_id);
 -		rte_errno = -EINVAL;
 +		rte_errno = EINVAL;
  		return 0;

^ permalink raw reply	[flat|nested] 75+ messages in thread

* [dpdk-stable] patch 'gso: fix VxLAN/GRE tunnel checks' has been queued to LTS release 17.11.6
  2019-03-08 17:46 [dpdk-stable] patch 'net/bnx2x: cleanup info logs' has been queued to LTS release 17.11.6 Yongseok Koh
                   ` (60 preceding siblings ...)
  2019-03-08 17:47 ` [dpdk-stable] patch 'ethdev: fix errno to have positive value' " Yongseok Koh
@ 2019-03-08 17:47 ` Yongseok Koh
  2019-03-08 17:47 ` [dpdk-stable] patch 'kni: fix build for dev_open in Linux 5.0' " Yongseok Koh
                   ` (7 subsequent siblings)
  69 siblings, 0 replies; 75+ messages in thread
From: Yongseok Koh @ 2019-03-08 17:47 UTC (permalink / raw)
  To: Andrew Rybchenko; +Cc: Jiayu Hu, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.6

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objection by 03/13/19. So please
shout if anyone has objection.

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.

Yongseok

---
>From 8ea30870de7dd4de80c887eeabe5c1718a44f6fd Mon Sep 17 00:00:00 2001
From: Andrew Rybchenko <arybchenko@solarflare.com>
Date: Mon, 21 Jan 2019 06:42:38 +0000
Subject: [PATCH] gso: fix VxLAN/GRE tunnel checks

[ upstream commit 727663e88b3fbaa8183499a1b415f02b0a689319 ]

Tunnel type is an enum in PKT_TX_TUNNEL_MASK bits.
As the result, for example, IPIP or MPLSinUDP tunnel packets may be
incorrectly treated internally as VXLAN.

Fixes: b058d92ea95d ("gso: support VxLAN GSO")
Fixes: 70e737e448c7 ("gso: support GRE GSO")

Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Acked-by: Jiayu Hu <jiayu.hu@intel.com>
---
 lib/librte_gso/gso_common.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/librte_gso/gso_common.h b/lib/librte_gso/gso_common.h
index 145ea4953..25a015e47 100644
--- a/lib/librte_gso/gso_common.h
+++ b/lib/librte_gso/gso_common.h
@@ -51,12 +51,12 @@
 		(PKT_TX_TCP_SEG | PKT_TX_IPV4))
 
 #define IS_IPV4_VXLAN_TCP4(flag) (((flag) & (PKT_TX_TCP_SEG | PKT_TX_IPV4 | \
-				PKT_TX_OUTER_IPV4 | PKT_TX_TUNNEL_VXLAN)) == \
+				PKT_TX_OUTER_IPV4 | PKT_TX_TUNNEL_MASK)) == \
 		(PKT_TX_TCP_SEG | PKT_TX_IPV4 | PKT_TX_OUTER_IPV4 | \
 		 PKT_TX_TUNNEL_VXLAN))
 
 #define IS_IPV4_GRE_TCP4(flag) (((flag) & (PKT_TX_TCP_SEG | PKT_TX_IPV4 | \
-				PKT_TX_OUTER_IPV4 | PKT_TX_TUNNEL_GRE)) == \
+				PKT_TX_OUTER_IPV4 | PKT_TX_TUNNEL_MASK)) == \
 		(PKT_TX_TCP_SEG | PKT_TX_IPV4 | PKT_TX_OUTER_IPV4 | \
 		 PKT_TX_TUNNEL_GRE))
 
-- 
2.11.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2019-03-08 09:46:43.283304920 -0800
+++ 0063-gso-fix-VxLAN-GRE-tunnel-checks.patch	2019-03-08 09:46:40.336407000 -0800
@@ -1,15 +1,16 @@
-From 727663e88b3fbaa8183499a1b415f02b0a689319 Mon Sep 17 00:00:00 2001
+From 8ea30870de7dd4de80c887eeabe5c1718a44f6fd Mon Sep 17 00:00:00 2001
 From: Andrew Rybchenko <arybchenko@solarflare.com>
 Date: Mon, 21 Jan 2019 06:42:38 +0000
 Subject: [PATCH] gso: fix VxLAN/GRE tunnel checks
 
+[ upstream commit 727663e88b3fbaa8183499a1b415f02b0a689319 ]
+
 Tunnel type is an enum in PKT_TX_TUNNEL_MASK bits.
 As the result, for example, IPIP or MPLSinUDP tunnel packets may be
 incorrectly treated internally as VXLAN.
 
 Fixes: b058d92ea95d ("gso: support VxLAN GSO")
 Fixes: 70e737e448c7 ("gso: support GRE GSO")
-Cc: stable@dpdk.org
 
 Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
 Acked-by: Jiayu Hu <jiayu.hu@intel.com>
@@ -18,10 +19,10 @@
  1 file changed, 2 insertions(+), 2 deletions(-)
 
 diff --git a/lib/librte_gso/gso_common.h b/lib/librte_gso/gso_common.h
-index 6cd764ff5..b6ff1b886 100644
+index 145ea4953..25a015e47 100644
 --- a/lib/librte_gso/gso_common.h
 +++ b/lib/librte_gso/gso_common.h
-@@ -22,12 +22,12 @@
+@@ -51,12 +51,12 @@
  		(PKT_TX_TCP_SEG | PKT_TX_IPV4))
  
  #define IS_IPV4_VXLAN_TCP4(flag) (((flag) & (PKT_TX_TCP_SEG | PKT_TX_IPV4 | \

^ permalink raw reply	[flat|nested] 75+ messages in thread

* [dpdk-stable] patch 'kni: fix build for dev_open in Linux 5.0' has been queued to LTS release 17.11.6
  2019-03-08 17:46 [dpdk-stable] patch 'net/bnx2x: cleanup info logs' has been queued to LTS release 17.11.6 Yongseok Koh
                   ` (61 preceding siblings ...)
  2019-03-08 17:47 ` [dpdk-stable] patch 'gso: fix VxLAN/GRE tunnel checks' " Yongseok Koh
@ 2019-03-08 17:47 ` Yongseok Koh
  2019-03-08 17:47 ` [dpdk-stable] patch 'kni: fix build for igb_ndo_bridge_setlink " Yongseok Koh
                   ` (6 subsequent siblings)
  69 siblings, 0 replies; 75+ messages in thread
From: Yongseok Koh @ 2019-03-08 17:47 UTC (permalink / raw)
  To: Ferruh Yigit; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.6

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objection by 03/13/19. So please
shout if anyone has objection.

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.

Yongseok

---
>From cc766a206625f370605d445dc4fa7d8244d2329a Mon Sep 17 00:00:00 2001
From: Ferruh Yigit <ferruh.yigit@intel.com>
Date: Tue, 22 Jan 2019 15:44:28 +0000
Subject: [PATCH] kni: fix build for dev_open in Linux 5.0
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

[ upstream commit d01c18ff821b81baa3b99329ebf051c6a1bfd4ee ]

Build error seen with Linux kernel 5.0 and
when CONFIG_RTE_KNI_KMOD_ETHTOOL is enabled.

build error:
.../build/build/kernel/linux/kni/ixgbe_ethtool.c:1746:4:
  error: too few arguments to function ‘dev_open’
    dev_open(netdev);
    ^~~~~~~~
In file included from .../build/kernel/linux/kni/ixgbe_ethtool.c:18:
.../linux/linux/include/linux/netdevice.h:2620:5: note: declared here
 int dev_open(struct net_device *dev, struct netlink_ext_ack *extack);
     ^~~~~~~~

.../build/build/kernel/linux/kni/igb_ethtool.c:1812:4:
  error: too few arguments to function ‘dev_open’
    dev_open(netdev);
    ^~~~~~~~
In file included from .../build/build/kernel/linux/kni/igb_ethtool.c:15:
.../linux/linux/include/linux/netdevice.h:2620:5: note: declared here
 int dev_open(struct net_device *dev, struct netlink_ext_ack *extack);
     ^~~~~~~~

dev_open() is changed in Linux kernel version 5.0 and now requires
a new parameter, 'struct netlink_ext_ack *extack'.
Fixed by defining dev_open as macro when kernel version >= 5.0

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
 lib/librte_eal/linuxapp/kni/ethtool/igb/kcompat.h   | 4 ++++
 lib/librte_eal/linuxapp/kni/ethtool/ixgbe/kcompat.h | 4 ++++
 2 files changed, 8 insertions(+)

diff --git a/lib/librte_eal/linuxapp/kni/ethtool/igb/kcompat.h b/lib/librte_eal/linuxapp/kni/ethtool/igb/kcompat.h
index 60be8860d..4c6a3c360 100644
--- a/lib/librte_eal/linuxapp/kni/ethtool/igb/kcompat.h
+++ b/lib/librte_eal/linuxapp/kni/ethtool/igb/kcompat.h
@@ -3955,6 +3955,10 @@ skb_set_hash(struct sk_buff *skb, __u32 hash, __always_unused int type)
 #define HAVE_PCI_ENABLE_MSIX
 #endif
 
+#if ( LINUX_VERSION_CODE >= KERNEL_VERSION(5,0,0) )
+#define dev_open(x) dev_open(x, NULL)
+#endif /* >= 5.0.0 */
+
 #if defined(timer_setup) && defined(from_timer)
 #define HAVE_TIMER_SETUP
 #endif
diff --git a/lib/librte_eal/linuxapp/kni/ethtool/ixgbe/kcompat.h b/lib/librte_eal/linuxapp/kni/ethtool/ixgbe/kcompat.h
index f62a7b56e..19c504fc9 100644
--- a/lib/librte_eal/linuxapp/kni/ethtool/ixgbe/kcompat.h
+++ b/lib/librte_eal/linuxapp/kni/ethtool/ixgbe/kcompat.h
@@ -3140,6 +3140,10 @@ static inline int __kc_pci_vfs_assigned(struct pci_dev *dev)
 #define SET_ETHTOOL_OPS(netdev, ops) ((netdev)->ethtool_ops = (ops))
 #endif /* >= 3.16.0 */
 
+#if ( LINUX_VERSION_CODE >= KERNEL_VERSION(5,0,0) )
+#define dev_open(x) dev_open(x, NULL)
+#endif /* >= 5.0.0 */
+
 /*
  * vlan_tx_tag_* macros renamed to skb_vlan_tag_* (Linux commit: df8a39defad4)
  * For older kernels backported this commit, need to use renamed functions.
-- 
2.11.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2019-03-08 09:46:43.325504237 -0800
+++ 0064-kni-fix-build-for-dev_open-in-Linux-5.0.patch	2019-03-08 09:46:40.350403000 -0800
@@ -1,4 +1,4 @@
-From d01c18ff821b81baa3b99329ebf051c6a1bfd4ee Mon Sep 17 00:00:00 2001
+From cc766a206625f370605d445dc4fa7d8244d2329a Mon Sep 17 00:00:00 2001
 From: Ferruh Yigit <ferruh.yigit@intel.com>
 Date: Tue, 22 Jan 2019 15:44:28 +0000
 Subject: [PATCH] kni: fix build for dev_open in Linux 5.0
@@ -6,6 +6,8 @@
 Content-Type: text/plain; charset=UTF-8
 Content-Transfer-Encoding: 8bit
 
+[ upstream commit d01c18ff821b81baa3b99329ebf051c6a1bfd4ee ]
+
 Build error seen with Linux kernel 5.0 and
 when CONFIG_RTE_KNI_KMOD_ETHTOOL is enabled.
 
@@ -34,15 +36,15 @@
 
 Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
 ---
- kernel/linux/kni/ethtool/igb/kcompat.h   | 4 ++++
- kernel/linux/kni/ethtool/ixgbe/kcompat.h | 4 ++++
+ lib/librte_eal/linuxapp/kni/ethtool/igb/kcompat.h   | 4 ++++
+ lib/librte_eal/linuxapp/kni/ethtool/ixgbe/kcompat.h | 4 ++++
  2 files changed, 8 insertions(+)
 
-diff --git a/kernel/linux/kni/ethtool/igb/kcompat.h b/kernel/linux/kni/ethtool/igb/kcompat.h
-index 430aabafe..068cfeb52 100644
---- a/kernel/linux/kni/ethtool/igb/kcompat.h
-+++ b/kernel/linux/kni/ethtool/igb/kcompat.h
-@@ -3940,6 +3940,10 @@ skb_set_hash(struct sk_buff *skb, __u32 hash, __always_unused int type)
+diff --git a/lib/librte_eal/linuxapp/kni/ethtool/igb/kcompat.h b/lib/librte_eal/linuxapp/kni/ethtool/igb/kcompat.h
+index 60be8860d..4c6a3c360 100644
+--- a/lib/librte_eal/linuxapp/kni/ethtool/igb/kcompat.h
++++ b/lib/librte_eal/linuxapp/kni/ethtool/igb/kcompat.h
+@@ -3955,6 +3955,10 @@ skb_set_hash(struct sk_buff *skb, __u32 hash, __always_unused int type)
  #define HAVE_PCI_ENABLE_MSIX
  #endif
  
@@ -53,11 +55,11 @@
  #if defined(timer_setup) && defined(from_timer)
  #define HAVE_TIMER_SETUP
  #endif
-diff --git a/kernel/linux/kni/ethtool/ixgbe/kcompat.h b/kernel/linux/kni/ethtool/ixgbe/kcompat.h
-index 7c7d6c317..419fd1f13 100644
---- a/kernel/linux/kni/ethtool/ixgbe/kcompat.h
-+++ b/kernel/linux/kni/ethtool/ixgbe/kcompat.h
-@@ -3125,6 +3125,10 @@ static inline int __kc_pci_vfs_assigned(struct pci_dev *dev)
+diff --git a/lib/librte_eal/linuxapp/kni/ethtool/ixgbe/kcompat.h b/lib/librte_eal/linuxapp/kni/ethtool/ixgbe/kcompat.h
+index f62a7b56e..19c504fc9 100644
+--- a/lib/librte_eal/linuxapp/kni/ethtool/ixgbe/kcompat.h
++++ b/lib/librte_eal/linuxapp/kni/ethtool/ixgbe/kcompat.h
+@@ -3140,6 +3140,10 @@ static inline int __kc_pci_vfs_assigned(struct pci_dev *dev)
  #define SET_ETHTOOL_OPS(netdev, ops) ((netdev)->ethtool_ops = (ops))
  #endif /* >= 3.16.0 */
  

^ permalink raw reply	[flat|nested] 75+ messages in thread

* [dpdk-stable] patch 'kni: fix build for igb_ndo_bridge_setlink in Linux 5.0' has been queued to LTS release 17.11.6
  2019-03-08 17:46 [dpdk-stable] patch 'net/bnx2x: cleanup info logs' has been queued to LTS release 17.11.6 Yongseok Koh
                   ` (62 preceding siblings ...)
  2019-03-08 17:47 ` [dpdk-stable] patch 'kni: fix build for dev_open in Linux 5.0' " Yongseok Koh
@ 2019-03-08 17:47 ` Yongseok Koh
  2019-03-08 17:47 ` [dpdk-stable] patch 'vfio: fix error message' " Yongseok Koh
                   ` (5 subsequent siblings)
  69 siblings, 0 replies; 75+ messages in thread
From: Yongseok Koh @ 2019-03-08 17:47 UTC (permalink / raw)
  To: Ferruh Yigit; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.6

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objection by 03/13/19. So please
shout if anyone has objection.

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.

Yongseok

---
>From 9c0209aa18cd5acffa73c79aa33d7e80f34efd82 Mon Sep 17 00:00:00 2001
From: Ferruh Yigit <ferruh.yigit@intel.com>
Date: Tue, 22 Jan 2019 15:44:29 +0000
Subject: [PATCH] kni: fix build for igb_ndo_bridge_setlink in Linux 5.0
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

[ upstream commit 18cb8293e312bc3bd67211a5a540676f1c667d88 ]

Build error seen with Linux kernel 5.0 and
when CONFIG_RTE_KNI_KMOD_ETHTOOL is enabled.

build error:
.../build/build/kernel/linux/kni/igb_main.c:2348:24:
  error: initialization of
  ‘int (*)(struct net_device *, struct nlmsghdr *, u16,
  	struct netlink_ext_ack *)’
  {aka ‘int (*)(struct net_device *, struct nlmsghdr *,
  	short unsigned int,  struct netlink_ext_ack *)’}
  from incompatible pointer type
  ‘int (*)(struct net_device *, struct nlmsghdr *, u16)’
  {aka ‘int (*)(struct net_device *, struct nlmsghdr *,
  	short unsigned int)’}
  [-Werror=incompatible-pointer-types]
  .ndo_bridge_setlink = igb_ndo_bridge_setlink,
                        ^~~~~~~~~~~~~~~~~~~~~~
.../build/build/kernel/linux/kni/igb_main.c:2348:24:
  note: (near initialization for ‘igb_netdev_ops.ndo_bridge_setlink’)

igb_ndo_bridge_setlink() is changed in Linux kernel version 5.0
and now requires a new parameter, 'struct netlink_ext_ack *extack'.
Fixed by adding a new parameter with a kernel version check.

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
 lib/librte_eal/linuxapp/kni/ethtool/igb/igb_main.c | 5 +++++
 lib/librte_eal/linuxapp/kni/ethtool/igb/kcompat.h  | 1 +
 2 files changed, 6 insertions(+)

diff --git a/lib/librte_eal/linuxapp/kni/ethtool/igb/igb_main.c b/lib/librte_eal/linuxapp/kni/ethtool/igb/igb_main.c
index e0f427a30..6d8c2c774 100644
--- a/lib/librte_eal/linuxapp/kni/ethtool/igb/igb_main.c
+++ b/lib/librte_eal/linuxapp/kni/ethtool/igb/igb_main.c
@@ -2222,7 +2222,12 @@ static int igb_ndo_fdb_dump(struct sk_buff *skb,
 #ifdef HAVE_NDO_BRIDGE_SET_DEL_LINK_FLAGS
 static int igb_ndo_bridge_setlink(struct net_device *dev,
 				  struct nlmsghdr *nlh,
+#ifdef HAVE_NDO_BRIDGE_SETLINK_EXTACK
+				  u16 flags, struct netlink_ext_ack *extack)
+#else
 				  u16 flags)
+#endif
+
 #else
 static int igb_ndo_bridge_setlink(struct net_device *dev,
 				  struct nlmsghdr *nlh)
diff --git a/lib/librte_eal/linuxapp/kni/ethtool/igb/kcompat.h b/lib/librte_eal/linuxapp/kni/ethtool/igb/kcompat.h
index 4c6a3c360..0ca7a22a8 100644
--- a/lib/librte_eal/linuxapp/kni/ethtool/igb/kcompat.h
+++ b/lib/librte_eal/linuxapp/kni/ethtool/igb/kcompat.h
@@ -3957,6 +3957,7 @@ skb_set_hash(struct sk_buff *skb, __u32 hash, __always_unused int type)
 
 #if ( LINUX_VERSION_CODE >= KERNEL_VERSION(5,0,0) )
 #define dev_open(x) dev_open(x, NULL)
+#define HAVE_NDO_BRIDGE_SETLINK_EXTACK
 #endif /* >= 5.0.0 */
 
 #if defined(timer_setup) && defined(from_timer)
-- 
2.11.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2019-03-08 09:46:43.373629639 -0800
+++ 0065-kni-fix-build-for-igb_ndo_bridge_setlink-in-Linux-5..patch	2019-03-08 09:46:40.369404000 -0800
@@ -1,4 +1,4 @@
-From 18cb8293e312bc3bd67211a5a540676f1c667d88 Mon Sep 17 00:00:00 2001
+From 9c0209aa18cd5acffa73c79aa33d7e80f34efd82 Mon Sep 17 00:00:00 2001
 From: Ferruh Yigit <ferruh.yigit@intel.com>
 Date: Tue, 22 Jan 2019 15:44:29 +0000
 Subject: [PATCH] kni: fix build for igb_ndo_bridge_setlink in Linux 5.0
@@ -6,6 +6,8 @@
 Content-Type: text/plain; charset=UTF-8
 Content-Transfer-Encoding: 8bit
 
+[ upstream commit 18cb8293e312bc3bd67211a5a540676f1c667d88 ]
+
 Build error seen with Linux kernel 5.0 and
 when CONFIG_RTE_KNI_KMOD_ETHTOOL is enabled.
 
@@ -32,15 +34,15 @@
 
 Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
 ---
- kernel/linux/kni/ethtool/igb/igb_main.c | 5 +++++
- kernel/linux/kni/ethtool/igb/kcompat.h  | 1 +
+ lib/librte_eal/linuxapp/kni/ethtool/igb/igb_main.c | 5 +++++
+ lib/librte_eal/linuxapp/kni/ethtool/igb/kcompat.h  | 1 +
  2 files changed, 6 insertions(+)
 
-diff --git a/kernel/linux/kni/ethtool/igb/igb_main.c b/kernel/linux/kni/ethtool/igb/igb_main.c
-index af378d2f2..0b4faeae5 100644
---- a/kernel/linux/kni/ethtool/igb/igb_main.c
-+++ b/kernel/linux/kni/ethtool/igb/igb_main.c
-@@ -2207,7 +2207,12 @@ static int igb_ndo_fdb_dump(struct sk_buff *skb,
+diff --git a/lib/librte_eal/linuxapp/kni/ethtool/igb/igb_main.c b/lib/librte_eal/linuxapp/kni/ethtool/igb/igb_main.c
+index e0f427a30..6d8c2c774 100644
+--- a/lib/librte_eal/linuxapp/kni/ethtool/igb/igb_main.c
++++ b/lib/librte_eal/linuxapp/kni/ethtool/igb/igb_main.c
+@@ -2222,7 +2222,12 @@ static int igb_ndo_fdb_dump(struct sk_buff *skb,
  #ifdef HAVE_NDO_BRIDGE_SET_DEL_LINK_FLAGS
  static int igb_ndo_bridge_setlink(struct net_device *dev,
  				  struct nlmsghdr *nlh,
@@ -53,11 +55,11 @@
  #else
  static int igb_ndo_bridge_setlink(struct net_device *dev,
  				  struct nlmsghdr *nlh)
-diff --git a/kernel/linux/kni/ethtool/igb/kcompat.h b/kernel/linux/kni/ethtool/igb/kcompat.h
-index 068cfeb52..11b15f3a9 100644
---- a/kernel/linux/kni/ethtool/igb/kcompat.h
-+++ b/kernel/linux/kni/ethtool/igb/kcompat.h
-@@ -3942,6 +3942,7 @@ skb_set_hash(struct sk_buff *skb, __u32 hash, __always_unused int type)
+diff --git a/lib/librte_eal/linuxapp/kni/ethtool/igb/kcompat.h b/lib/librte_eal/linuxapp/kni/ethtool/igb/kcompat.h
+index 4c6a3c360..0ca7a22a8 100644
+--- a/lib/librte_eal/linuxapp/kni/ethtool/igb/kcompat.h
++++ b/lib/librte_eal/linuxapp/kni/ethtool/igb/kcompat.h
+@@ -3957,6 +3957,7 @@ skb_set_hash(struct sk_buff *skb, __u32 hash, __always_unused int type)
  
  #if ( LINUX_VERSION_CODE >= KERNEL_VERSION(5,0,0) )
  #define dev_open(x) dev_open(x, NULL)

^ permalink raw reply	[flat|nested] 75+ messages in thread

* [dpdk-stable] patch 'vfio: fix error message' has been queued to LTS release 17.11.6
  2019-03-08 17:46 [dpdk-stable] patch 'net/bnx2x: cleanup info logs' has been queued to LTS release 17.11.6 Yongseok Koh
                   ` (63 preceding siblings ...)
  2019-03-08 17:47 ` [dpdk-stable] patch 'kni: fix build for igb_ndo_bridge_setlink " Yongseok Koh
@ 2019-03-08 17:47 ` Yongseok Koh
  2019-03-08 17:47 ` [dpdk-stable] patch 'net/i40e: fix queue region DCB configure' " Yongseok Koh
                   ` (4 subsequent siblings)
  69 siblings, 0 replies; 75+ messages in thread
From: Yongseok Koh @ 2019-03-08 17:47 UTC (permalink / raw)
  To: Alejandro Lucero; +Cc: Anatoly Burakov, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.6

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objection by 03/13/19. So please
shout if anyone has objection.

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.

Yongseok

---
>From e3573a7e4bfed6ca04b72e6a768f3229ae3f85c9 Mon Sep 17 00:00:00 2001
From: Alejandro Lucero <alejandro.lucero@netronome.com>
Date: Wed, 23 Jan 2019 10:00:48 +0000
Subject: [PATCH] vfio: fix error message

[ upstream commit 43f2b3d250551b66ca282e6c5135b299b22d9d22 ]

The message refers to uio driver.

Fixes: ff0b67d1c868 ("vfio: DMA mapping")

Signed-off-by: Alejandro Lucero <alejandro.lucero@netronome.com>
Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
---
 drivers/bus/pci/linux/pci_vfio.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/bus/pci/linux/pci_vfio.c b/drivers/bus/pci/linux/pci_vfio.c
index 654897284..5093265e5 100644
--- a/drivers/bus/pci/linux/pci_vfio.c
+++ b/drivers/bus/pci/linux/pci_vfio.c
@@ -473,7 +473,7 @@ pci_vfio_map_resource_primary(struct rte_pci_device *dev)
 	vfio_res = rte_zmalloc("VFIO_RES", sizeof(*vfio_res), 0);
 	if (vfio_res == NULL) {
 		RTE_LOG(ERR, EAL,
-			"%s(): cannot store uio mmap details\n", __func__);
+			"%s(): cannot store vfio mmap details\n", __func__);
 		goto err_vfio_dev_fd;
 	}
 	memcpy(&vfio_res->pci_addr, &dev->addr, sizeof(vfio_res->pci_addr));
-- 
2.11.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2019-03-08 09:46:43.426282324 -0800
+++ 0066-vfio-fix-error-message.patch	2019-03-08 09:46:40.374404000 -0800
@@ -1,12 +1,13 @@
-From 43f2b3d250551b66ca282e6c5135b299b22d9d22 Mon Sep 17 00:00:00 2001
+From e3573a7e4bfed6ca04b72e6a768f3229ae3f85c9 Mon Sep 17 00:00:00 2001
 From: Alejandro Lucero <alejandro.lucero@netronome.com>
 Date: Wed, 23 Jan 2019 10:00:48 +0000
 Subject: [PATCH] vfio: fix error message
 
+[ upstream commit 43f2b3d250551b66ca282e6c5135b299b22d9d22 ]
+
 The message refers to uio driver.
 
 Fixes: ff0b67d1c868 ("vfio: DMA mapping")
-Cc: stable@dpdk.org
 
 Signed-off-by: Alejandro Lucero <alejandro.lucero@netronome.com>
 Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
@@ -15,10 +16,10 @@
  1 file changed, 1 insertion(+), 1 deletion(-)
 
 diff --git a/drivers/bus/pci/linux/pci_vfio.c b/drivers/bus/pci/linux/pci_vfio.c
-index fa8cfbb0b..ebf6ccd3c 100644
+index 654897284..5093265e5 100644
 --- a/drivers/bus/pci/linux/pci_vfio.c
 +++ b/drivers/bus/pci/linux/pci_vfio.c
-@@ -675,7 +675,7 @@ pci_vfio_map_resource_primary(struct rte_pci_device *dev)
+@@ -473,7 +473,7 @@ pci_vfio_map_resource_primary(struct rte_pci_device *dev)
  	vfio_res = rte_zmalloc("VFIO_RES", sizeof(*vfio_res), 0);
  	if (vfio_res == NULL) {
  		RTE_LOG(ERR, EAL,

^ permalink raw reply	[flat|nested] 75+ messages in thread

* [dpdk-stable] patch 'net/i40e: fix queue region DCB configure' has been queued to LTS release 17.11.6
  2019-03-08 17:46 [dpdk-stable] patch 'net/bnx2x: cleanup info logs' has been queued to LTS release 17.11.6 Yongseok Koh
                   ` (64 preceding siblings ...)
  2019-03-08 17:47 ` [dpdk-stable] patch 'vfio: fix error message' " Yongseok Koh
@ 2019-03-08 17:47 ` Yongseok Koh
  2019-03-08 17:47 ` [dpdk-stable] patch 'net/virtio-user: fix used ring in cvq handling' " Yongseok Koh
                   ` (3 subsequent siblings)
  69 siblings, 0 replies; 75+ messages in thread
From: Yongseok Koh @ 2019-03-08 17:47 UTC (permalink / raw)
  To: Wei Zhao; +Cc: Yuan Peng, Qi Zhang, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.6

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objection by 03/13/19. So please
shout if anyone has objection.

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.

Yongseok

---
>From b73f7f6dc2412ebb74e4b2c4787c8aee36b45711 Mon Sep 17 00:00:00 2001
From: Wei Zhao <wei.zhao1@intel.com>
Date: Tue, 22 Jan 2019 16:11:03 +0800
Subject: [PATCH] net/i40e: fix queue region DCB configure

[ upstream commit 991a2e812fcfdba6d47b77462e06859262def583 ]

DCB is not necessary to be configured if no user priority of
queue region is requested.

Unexpected configuration of DCB will cause unexpected behavior, like
FDIR does not work on those queues, but could cause more issues.

Fixes: 7cbecc2f7424 ("net/i40e: support queue region set and flush")

Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
Tested-by: Yuan Peng <yuan.peng@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
---
 drivers/net/i40e/rte_pmd_i40e.c | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)

diff --git a/drivers/net/i40e/rte_pmd_i40e.c b/drivers/net/i40e/rte_pmd_i40e.c
index 5771645c0..c75a0afbc 100644
--- a/drivers/net/i40e/rte_pmd_i40e.c
+++ b/drivers/net/i40e/rte_pmd_i40e.c
@@ -2795,13 +2795,23 @@ i40e_queue_region_dcb_configure(struct i40e_hw *hw,
 	struct i40e_dcbx_config *old_cfg = &hw->local_dcbx_config;
 	int32_t ret = -EINVAL;
 	uint16_t i, j, prio_index, region_index;
-	uint8_t tc_map, tc_bw, bw_lf;
+	uint8_t tc_map, tc_bw, bw_lf, dcb_flag = 0;
 
 	if (!info->queue_region_number) {
 		PMD_DRV_LOG(ERR, "No queue region been set before");
 		return ret;
 	}
 
+	for (i = 0; i < info->queue_region_number; i++) {
+		if (info->region[i].user_priority_num) {
+			dcb_flag = 1;
+			break;
+		}
+	}
+
+	if (dcb_flag == 0)
+		return 0;
+
 	dcb_cfg = &dcb_cfg_local;
 	memset(dcb_cfg, 0, sizeof(struct i40e_dcbx_config));
 
-- 
2.11.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2019-03-08 09:46:43.468874582 -0800
+++ 0067-net-i40e-fix-queue-region-DCB-configure.patch	2019-03-08 09:46:40.379404000 -0800
@@ -1,8 +1,10 @@
-From 991a2e812fcfdba6d47b77462e06859262def583 Mon Sep 17 00:00:00 2001
+From b73f7f6dc2412ebb74e4b2c4787c8aee36b45711 Mon Sep 17 00:00:00 2001
 From: Wei Zhao <wei.zhao1@intel.com>
 Date: Tue, 22 Jan 2019 16:11:03 +0800
 Subject: [PATCH] net/i40e: fix queue region DCB configure
 
+[ upstream commit 991a2e812fcfdba6d47b77462e06859262def583 ]
+
 DCB is not necessary to be configured if no user priority of
 queue region is requested.
 
@@ -10,7 +12,6 @@
 FDIR does not work on those queues, but could cause more issues.
 
 Fixes: 7cbecc2f7424 ("net/i40e: support queue region set and flush")
-Cc: stable@dpdk.org
 
 Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
 Tested-by: Yuan Peng <yuan.peng@intel.com>
@@ -20,10 +21,10 @@
  1 file changed, 11 insertions(+), 1 deletion(-)
 
 diff --git a/drivers/net/i40e/rte_pmd_i40e.c b/drivers/net/i40e/rte_pmd_i40e.c
-index 7ce5d02fa..c49c872b6 100644
+index 5771645c0..c75a0afbc 100644
 --- a/drivers/net/i40e/rte_pmd_i40e.c
 +++ b/drivers/net/i40e/rte_pmd_i40e.c
-@@ -2818,13 +2818,23 @@ i40e_queue_region_dcb_configure(struct i40e_hw *hw,
+@@ -2795,13 +2795,23 @@ i40e_queue_region_dcb_configure(struct i40e_hw *hw,
  	struct i40e_dcbx_config *old_cfg = &hw->local_dcbx_config;
  	int32_t ret = -EINVAL;
  	uint16_t i, j, prio_index, region_index;

^ permalink raw reply	[flat|nested] 75+ messages in thread

* [dpdk-stable] patch 'net/virtio-user: fix used ring in cvq handling' has been queued to LTS release 17.11.6
  2019-03-08 17:46 [dpdk-stable] patch 'net/bnx2x: cleanup info logs' has been queued to LTS release 17.11.6 Yongseok Koh
                   ` (65 preceding siblings ...)
  2019-03-08 17:47 ` [dpdk-stable] patch 'net/i40e: fix queue region DCB configure' " Yongseok Koh
@ 2019-03-08 17:47 ` Yongseok Koh
  2019-03-08 17:47 ` [dpdk-stable] patch 'net/ena: fix dev init with multi-process' " Yongseok Koh
                   ` (2 subsequent siblings)
  69 siblings, 0 replies; 75+ messages in thread
From: Yongseok Koh @ 2019-03-08 17:47 UTC (permalink / raw)
  To: Tiwei Bie; +Cc: Maxime Coquelin, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.6

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objection by 03/13/19. So please
shout if anyone has objection.

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.

Yongseok

---
>From f8c35a38a6c452a12f0f12370f596b2b43e529c9 Mon Sep 17 00:00:00 2001
From: Tiwei Bie <tiwei.bie@intel.com>
Date: Wed, 23 Jan 2019 01:01:43 +0800
Subject: [PATCH] net/virtio-user: fix used ring in cvq handling

[ upstream commit 0403e37a468df59707ed938cca4a507276a0befb ]

When updating used ring, the id in used element should be the
index of the first desc in the desc chain.

Fixes: f9b9d1a55775 ("net/virtio-user: add multiple queues in device emulation")

Signed-off-by: Tiwei Bie <tiwei.bie@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
---
 drivers/net/virtio/virtio_user/virtio_user_dev.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/virtio/virtio_user/virtio_user_dev.c b/drivers/net/virtio/virtio_user/virtio_user_dev.c
index b13e77f5f..23510a990 100644
--- a/drivers/net/virtio/virtio_user/virtio_user_dev.c
+++ b/drivers/net/virtio/virtio_user/virtio_user_dev.c
@@ -509,7 +509,7 @@ virtio_user_handle_cq(struct virtio_user_dev *dev, uint16_t queue_idx)
 
 		/* Update used ring */
 		uep = &vring->used->ring[avail_idx];
-		uep->id = avail_idx;
+		uep->id = desc_idx;
 		uep->len = n_descs;
 
 		vring->used->idx++;
-- 
2.11.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2019-03-08 09:46:43.512603249 -0800
+++ 0068-net-virtio-user-fix-used-ring-in-cvq-handling.patch	2019-03-08 09:46:40.384406000 -0800
@@ -1,13 +1,14 @@
-From 0403e37a468df59707ed938cca4a507276a0befb Mon Sep 17 00:00:00 2001
+From f8c35a38a6c452a12f0f12370f596b2b43e529c9 Mon Sep 17 00:00:00 2001
 From: Tiwei Bie <tiwei.bie@intel.com>
 Date: Wed, 23 Jan 2019 01:01:43 +0800
 Subject: [PATCH] net/virtio-user: fix used ring in cvq handling
 
+[ upstream commit 0403e37a468df59707ed938cca4a507276a0befb ]
+
 When updating used ring, the id in used element should be the
 index of the first desc in the desc chain.
 
 Fixes: f9b9d1a55775 ("net/virtio-user: add multiple queues in device emulation")
-Cc: stable@dpdk.org
 
 Signed-off-by: Tiwei Bie <tiwei.bie@intel.com>
 Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
@@ -16,10 +17,10 @@
  1 file changed, 1 insertion(+), 1 deletion(-)
 
 diff --git a/drivers/net/virtio/virtio_user/virtio_user_dev.c b/drivers/net/virtio/virtio_user/virtio_user_dev.c
-index 89d287a74..d1157378d 100644
+index b13e77f5f..23510a990 100644
 --- a/drivers/net/virtio/virtio_user/virtio_user_dev.c
 +++ b/drivers/net/virtio/virtio_user/virtio_user_dev.c
-@@ -722,7 +722,7 @@ virtio_user_handle_cq(struct virtio_user_dev *dev, uint16_t queue_idx)
+@@ -509,7 +509,7 @@ virtio_user_handle_cq(struct virtio_user_dev *dev, uint16_t queue_idx)
  
  		/* Update used ring */
  		uep = &vring->used->ring[avail_idx];

^ permalink raw reply	[flat|nested] 75+ messages in thread

* [dpdk-stable] patch 'net/ena: fix dev init with multi-process' has been queued to LTS release 17.11.6
  2019-03-08 17:46 [dpdk-stable] patch 'net/bnx2x: cleanup info logs' has been queued to LTS release 17.11.6 Yongseok Koh
                   ` (66 preceding siblings ...)
  2019-03-08 17:47 ` [dpdk-stable] patch 'net/virtio-user: fix used ring in cvq handling' " Yongseok Koh
@ 2019-03-08 17:47 ` Yongseok Koh
  2019-03-08 17:47 ` [dpdk-stable] patch 'net/ena: fix errno to positive value' " Yongseok Koh
  2019-03-08 17:47 ` [dpdk-stable] patch 'doc: add dependency for PDF in contributing guide' " Yongseok Koh
  69 siblings, 0 replies; 75+ messages in thread
From: Yongseok Koh @ 2019-03-08 17:47 UTC (permalink / raw)
  To: Michal Krawczyk; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.6

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objection by 03/13/19. So please
shout if anyone has objection.

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.

Yongseok

---
>From 6163dd685aa743d90c7a3708eb31179bf9bfec61 Mon Sep 17 00:00:00 2001
From: Michal Krawczyk <mk@semihalf.com>
Date: Fri, 25 Jan 2019 09:10:25 +0100
Subject: [PATCH] net/ena: fix dev init with multi-process

[ upstream commit fd9768905870856a2340266d25f8c0100dfccfff ]

The check for proc type in eth_ena_dev_init() should appear before
modyfing adapter structure.

Calling memset on ena_adapter from secondary process context, was
erasing all structure information, and it was causing the crash of the
main process.

Fixes: 1173fca25af9 ("ena: add polling-mode driver")

Signed-off-by: Michal Krawczyk <mk@semihalf.com>
---
 drivers/net/ena/ena_ethdev.c | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/drivers/net/ena/ena_ethdev.c b/drivers/net/ena/ena_ethdev.c
index f86a60c66..b347910cc 100644
--- a/drivers/net/ena/ena_ethdev.c
+++ b/drivers/net/ena/ena_ethdev.c
@@ -1280,19 +1280,20 @@ static int eth_ena_dev_init(struct rte_eth_dev *eth_dev)
 
 	static int adapters_found;
 
-	memset(adapter, 0, sizeof(struct ena_adapter));
-	ena_dev = &adapter->ena_dev;
-
 	eth_dev->dev_ops = &ena_dev_ops;
 	eth_dev->rx_pkt_burst = &eth_ena_recv_pkts;
 	eth_dev->tx_pkt_burst = &eth_ena_xmit_pkts;
 	eth_dev->tx_pkt_prepare = &eth_ena_prep_pkts;
-	adapter->rte_eth_dev_data = eth_dev->data;
-	adapter->rte_dev = eth_dev;
 
 	if (rte_eal_process_type() != RTE_PROC_PRIMARY)
 		return 0;
 
+	memset(adapter, 0, sizeof(struct ena_adapter));
+	ena_dev = &adapter->ena_dev;
+
+	adapter->rte_eth_dev_data = eth_dev->data;
+	adapter->rte_dev = eth_dev;
+
 	pci_dev = RTE_ETH_DEV_TO_PCI(eth_dev);
 	adapter->pdev = pci_dev;
 
-- 
2.11.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2019-03-08 09:46:43.556749038 -0800
+++ 0069-net-ena-fix-dev-init-with-multi-process.patch	2019-03-08 09:46:40.389408000 -0800
@@ -1,8 +1,10 @@
-From fd9768905870856a2340266d25f8c0100dfccfff Mon Sep 17 00:00:00 2001
+From 6163dd685aa743d90c7a3708eb31179bf9bfec61 Mon Sep 17 00:00:00 2001
 From: Michal Krawczyk <mk@semihalf.com>
 Date: Fri, 25 Jan 2019 09:10:25 +0100
 Subject: [PATCH] net/ena: fix dev init with multi-process
 
+[ upstream commit fd9768905870856a2340266d25f8c0100dfccfff ]
+
 The check for proc type in eth_ena_dev_init() should appear before
 modyfing adapter structure.
 
@@ -11,7 +13,6 @@
 main process.
 
 Fixes: 1173fca25af9 ("ena: add polling-mode driver")
-Cc: stable@dpdk.org
 
 Signed-off-by: Michal Krawczyk <mk@semihalf.com>
 ---
@@ -19,12 +20,12 @@
  1 file changed, 6 insertions(+), 5 deletions(-)
 
 diff --git a/drivers/net/ena/ena_ethdev.c b/drivers/net/ena/ena_ethdev.c
-index fde5fa743..747390bb7 100644
+index f86a60c66..b347910cc 100644
 --- a/drivers/net/ena/ena_ethdev.c
 +++ b/drivers/net/ena/ena_ethdev.c
-@@ -1715,19 +1715,20 @@ static int eth_ena_dev_init(struct rte_eth_dev *eth_dev)
+@@ -1280,19 +1280,20 @@ static int eth_ena_dev_init(struct rte_eth_dev *eth_dev)
+ 
  	static int adapters_found;
- 	bool wd_state;
  
 -	memset(adapter, 0, sizeof(struct ena_adapter));
 -	ena_dev = &adapter->ena_dev;

^ permalink raw reply	[flat|nested] 75+ messages in thread

* [dpdk-stable] patch 'net/ena: fix errno to positive value' has been queued to LTS release 17.11.6
  2019-03-08 17:46 [dpdk-stable] patch 'net/bnx2x: cleanup info logs' has been queued to LTS release 17.11.6 Yongseok Koh
                   ` (67 preceding siblings ...)
  2019-03-08 17:47 ` [dpdk-stable] patch 'net/ena: fix dev init with multi-process' " Yongseok Koh
@ 2019-03-08 17:47 ` Yongseok Koh
  2019-03-08 17:47 ` [dpdk-stable] patch 'doc: add dependency for PDF in contributing guide' " Yongseok Koh
  69 siblings, 0 replies; 75+ messages in thread
From: Yongseok Koh @ 2019-03-08 17:47 UTC (permalink / raw)
  To: Michal Krawczyk; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.6

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objection by 03/13/19. So please
shout if anyone has objection.

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.

Yongseok

---
>From 7a2c83b90e78482f4c155bdf4bcc812735c33a5e Mon Sep 17 00:00:00 2001
From: Michal Krawczyk <mk@semihalf.com>
Date: Fri, 25 Jan 2019 09:10:26 +0100
Subject: [PATCH] net/ena: fix errno to positive value

[ upstream commit baeed5f404dd1b049118cfec26a2fd3203671572 ]

The rte_errno shouldn't have assigned negative error codes, so it has
to be fixed.

Fixes: b3fc5a1ae10d ("net/ena: add Tx preparation")

Signed-off-by: Michal Krawczyk <mk@semihalf.com>
---
 drivers/net/ena/ena_ethdev.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/net/ena/ena_ethdev.c b/drivers/net/ena/ena_ethdev.c
index b347910cc..d8d643235 100644
--- a/drivers/net/ena/ena_ethdev.c
+++ b/drivers/net/ena/ena_ethdev.c
@@ -1640,14 +1640,14 @@ eth_ena_prep_pkts(void *tx_queue, struct rte_mbuf **tx_pkts,
 		if ((ol_flags & ENA_TX_OFFLOAD_NOTSUP_MASK) != 0 ||
 				(ol_flags & PKT_TX_L4_MASK) ==
 				PKT_TX_SCTP_CKSUM) {
-			rte_errno = -ENOTSUP;
+			rte_errno = ENOTSUP;
 			return i;
 		}
 
 #ifdef RTE_LIBRTE_ETHDEV_DEBUG
 		ret = rte_validate_tx_offload(m);
 		if (ret != 0) {
-			rte_errno = ret;
+			rte_errno = -ret;
 			return i;
 		}
 #endif
@@ -1660,7 +1660,7 @@ eth_ena_prep_pkts(void *tx_queue, struct rte_mbuf **tx_pkts,
 		ret = rte_net_intel_cksum_flags_prepare(m,
 			ol_flags & ~PKT_TX_TCP_SEG);
 		if (ret != 0) {
-			rte_errno = ret;
+			rte_errno = -ret;
 			return i;
 		}
 	}
-- 
2.11.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2019-03-08 09:46:43.600905867 -0800
+++ 0070-net-ena-fix-errno-to-positive-value.patch	2019-03-08 09:46:40.394408000 -0800
@@ -1,13 +1,14 @@
-From baeed5f404dd1b049118cfec26a2fd3203671572 Mon Sep 17 00:00:00 2001
+From 7a2c83b90e78482f4c155bdf4bcc812735c33a5e Mon Sep 17 00:00:00 2001
 From: Michal Krawczyk <mk@semihalf.com>
 Date: Fri, 25 Jan 2019 09:10:26 +0100
 Subject: [PATCH] net/ena: fix errno to positive value
 
+[ upstream commit baeed5f404dd1b049118cfec26a2fd3203671572 ]
+
 The rte_errno shouldn't have assigned negative error codes, so it has
 to be fixed.
 
 Fixes: b3fc5a1ae10d ("net/ena: add Tx preparation")
-Cc: stable@dpdk.org
 
 Signed-off-by: Michal Krawczyk <mk@semihalf.com>
 ---
@@ -15,10 +16,10 @@
  1 file changed, 3 insertions(+), 3 deletions(-)
 
 diff --git a/drivers/net/ena/ena_ethdev.c b/drivers/net/ena/ena_ethdev.c
-index 747390bb7..8bb05caa2 100644
+index b347910cc..d8d643235 100644
 --- a/drivers/net/ena/ena_ethdev.c
 +++ b/drivers/net/ena/ena_ethdev.c
-@@ -2178,14 +2178,14 @@ eth_ena_prep_pkts(void *tx_queue, struct rte_mbuf **tx_pkts,
+@@ -1640,14 +1640,14 @@ eth_ena_prep_pkts(void *tx_queue, struct rte_mbuf **tx_pkts,
  		if ((ol_flags & ENA_TX_OFFLOAD_NOTSUP_MASK) != 0 ||
  				(ol_flags & PKT_TX_L4_MASK) ==
  				PKT_TX_SCTP_CKSUM) {
@@ -35,7 +36,7 @@
  			return i;
  		}
  #endif
-@@ -2198,7 +2198,7 @@ eth_ena_prep_pkts(void *tx_queue, struct rte_mbuf **tx_pkts,
+@@ -1660,7 +1660,7 @@ eth_ena_prep_pkts(void *tx_queue, struct rte_mbuf **tx_pkts,
  		ret = rte_net_intel_cksum_flags_prepare(m,
  			ol_flags & ~PKT_TX_TCP_SEG);
  		if (ret != 0) {

^ permalink raw reply	[flat|nested] 75+ messages in thread

* [dpdk-stable] patch 'doc: add dependency for PDF in contributing guide' has been queued to LTS release 17.11.6
  2019-03-08 17:46 [dpdk-stable] patch 'net/bnx2x: cleanup info logs' has been queued to LTS release 17.11.6 Yongseok Koh
                   ` (68 preceding siblings ...)
  2019-03-08 17:47 ` [dpdk-stable] patch 'net/ena: fix errno to positive value' " Yongseok Koh
@ 2019-03-08 17:47 ` Yongseok Koh
  69 siblings, 0 replies; 75+ messages in thread
From: Yongseok Koh @ 2019-03-08 17:47 UTC (permalink / raw)
  To: Rami Rosen; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.6

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objection by 03/13/19. So please
shout if anyone has objection.

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.

Yongseok

---
>From 5465840325fb883fc30621ffceea8aedd629d116 Mon Sep 17 00:00:00 2001
From: Rami Rosen <ramirose@gmail.com>
Date: Sun, 20 Jan 2019 20:29:47 +0200
Subject: [PATCH] doc: add dependency for PDF in contributing guide

[ upstream commit 63a71926e9f498bc121cec30de1ccae6970da612 ]

There is a missing depenency for building docs with "make doc-guides-pdf".
This causes it to break with "make[3]: latexmk: Command not found". This
was observed and reported in https://bugs.dpdk.org/show_bug.cgi?id=182
This patch fixes this issue by adding the latexmk package dependency in
sub-section 4.3.1 of the contributing guide ("Dependencies").

Bugzilla ID: 182

Signed-off-by: Rami Rosen <ramirose@gmail.com>
---
 doc/guides/contributing/documentation.rst | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/doc/guides/contributing/documentation.rst b/doc/guides/contributing/documentation.rst
index 20a2c4822..6ccca11a2 100644
--- a/doc/guides/contributing/documentation.rst
+++ b/doc/guides/contributing/documentation.rst
@@ -201,6 +201,19 @@ The main required packages can be installed as follows:
    # Red Hat/Fedora, selective install.
    sudo dnf     -y install texlive-collection-latexextra
 
+`Latexmk <http://personal.psu.edu/jcc8/software/latexmk-jcc/>`_ is a perl script
+for running LaTeX for resolving cross references,
+and it also runs auxiliary programs like bibtex, makeindex if necessary, and dvips.
+It has also a number of other useful capabilities (see man 1 latexmk).
+
+.. code-block:: console
+
+   # Ubuntu/Debian.
+   sudo apt-get -y install latexmk
+
+   # Red Hat/Fedora.
+   sudo dnf     -y install latexmk
+
 
 Build commands
 ~~~~~~~~~~~~~~
-- 
2.11.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2019-03-08 09:46:43.645725566 -0800
+++ 0071-doc-add-dependency-for-PDF-in-contributing-guide.patch	2019-03-08 09:46:40.399409000 -0800
@@ -1,8 +1,10 @@
-From 63a71926e9f498bc121cec30de1ccae6970da612 Mon Sep 17 00:00:00 2001
+From 5465840325fb883fc30621ffceea8aedd629d116 Mon Sep 17 00:00:00 2001
 From: Rami Rosen <ramirose@gmail.com>
 Date: Sun, 20 Jan 2019 20:29:47 +0200
 Subject: [PATCH] doc: add dependency for PDF in contributing guide
 
+[ upstream commit 63a71926e9f498bc121cec30de1ccae6970da612 ]
+
 There is a missing depenency for building docs with "make doc-guides-pdf".
 This causes it to break with "make[3]: latexmk: Command not found". This
 was observed and reported in https://bugs.dpdk.org/show_bug.cgi?id=182
@@ -10,7 +12,6 @@
 sub-section 4.3.1 of the contributing guide ("Dependencies").
 
 Bugzilla ID: 182
-Cc: stable@dpdk.org
 
 Signed-off-by: Rami Rosen <ramirose@gmail.com>
 ---
@@ -18,10 +19,10 @@
  1 file changed, 13 insertions(+)
 
 diff --git a/doc/guides/contributing/documentation.rst b/doc/guides/contributing/documentation.rst
-index c28a95c34..c72280a29 100644
+index 20a2c4822..6ccca11a2 100644
 --- a/doc/guides/contributing/documentation.rst
 +++ b/doc/guides/contributing/documentation.rst
-@@ -204,6 +204,19 @@ The main required packages can be installed as follows:
+@@ -201,6 +201,19 @@ The main required packages can be installed as follows:
     # Red Hat/Fedora, selective install.
     sudo dnf     -y install texlive-collection-latexextra
  

^ permalink raw reply	[flat|nested] 75+ messages in thread

* Re: [dpdk-stable] [EXT] patch 'net/qede: fix performance bottleneck in Rx path' has been queued to LTS release 17.11.6
  2019-03-08 17:47 ` [dpdk-stable] patch 'net/qede: fix performance bottleneck in Rx path' " Yongseok Koh
@ 2019-03-12 17:04   ` Shahed Shaikh
  2019-03-12 22:03     ` Yongseok Koh
  0 siblings, 1 reply; 75+ messages in thread
From: Shahed Shaikh @ 2019-03-12 17:04 UTC (permalink / raw)
  To: Yongseok Koh; +Cc: Rasesh Mody, dpdk stable

> -----Original Message-----
> From: Yongseok Koh <yskoh@mellanox.com>
> Sent: Friday, March 8, 2019 11:18 PM
> To: Shahed Shaikh <shshaikh@marvell.com>
> Cc: Rasesh Mody <rmody@marvell.com>; dpdk stable <stable@dpdk.org>
> Subject: [EXT] patch 'net/qede: fix performance bottleneck in Rx path' has been
> queued to LTS release 17.11.6
> Hi,
> 
> FYI, your patch has been queued to LTS release 17.11.6
> 
> Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
> It will be pushed if I get no objection by 03/13/19. So please shout if anyone has
> objection.

Hi,

We recently found that this patch introduces a regression for which I have just sent out a fix.
http://patchwork.dpdk.org/patch/51134/   ("net/qede: fix receive packet drop")

How do we handle such situation? Will you also pull above fix once it gets accepted or ignore current patch for 17.11.6 and consider for next release?
Please advise.

Thanks,
Shahed
 

> 
> 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.
> 
> Yongseok
> 
> ---
> From f4f2aff537e1ff13ed85a9d4e52038ca34e7e005 Mon Sep 17 00:00:00 2001
> From: Shahed Shaikh <shshaikh@marvell.com>
> Date: Fri, 18 Jan 2019 02:29:29 -0800
> Subject: [PATCH] net/qede: fix performance bottleneck in Rx path
> 
> [ upstream commit 8f2312474529ad7ff0e4b65b82efc8530e7484ce ]
> 
> Allocating replacement buffer per received packet is expensive.
> Instead, process received packets first and allocate replacement buffers in bulk
> later.
> 
> This improves performance by ~25% in terms of PPS on AMD platforms.
> 
> Fixes: 2ea6f76aff40 ("qede: add core driver")
> 
> Signed-off-by: Shahed Shaikh <shshaikh@marvell.com>
> Acked-by: Rasesh Mody <rmody@marvell.com>
> ---
>  drivers/net/qede/qede_rxtx.c | 97 +++++++++++++++++++++++++++++++++-----
> ------
>  drivers/net/qede/qede_rxtx.h |  2 +
>  2 files changed, 75 insertions(+), 24 deletions(-)
> 
> diff --git a/drivers/net/qede/qede_rxtx.c b/drivers/net/qede/qede_rxtx.c index
> cdb85c218..b525075ca 100644
> --- a/drivers/net/qede/qede_rxtx.c
> +++ b/drivers/net/qede/qede_rxtx.c
> @@ -37,6 +37,52 @@ static inline int qede_alloc_rx_buffer(struct
> qede_rx_queue *rxq)
>  	return 0;
>  }
> 
> +#define QEDE_MAX_BULK_ALLOC_COUNT 512
> +
> +static inline int qede_alloc_rx_bulk_mbufs(struct qede_rx_queue *rxq,
> +int count) {
> +	void *obj_p[QEDE_MAX_BULK_ALLOC_COUNT] __rte_cache_aligned;
> +	struct rte_mbuf *mbuf = NULL;
> +	struct eth_rx_bd *rx_bd;
> +	dma_addr_t mapping;
> +	int i, ret = 0;
> +	uint16_t idx;
> +
> +	idx = rxq->sw_rx_prod & NUM_RX_BDS(rxq);
> +
> +	if (count > QEDE_MAX_BULK_ALLOC_COUNT)
> +		count = QEDE_MAX_BULK_ALLOC_COUNT;
> +
> +	ret = rte_mempool_get_bulk(rxq->mb_pool, obj_p, count);
> +	if (unlikely(ret)) {
> +		PMD_RX_LOG(ERR, rxq,
> +			   "Failed to allocate %d rx buffers "
> +			    "sw_rx_prod %u sw_rx_cons %u mp entries %u free
> %u",
> +			    count, idx, rxq->sw_rx_cons & NUM_RX_BDS(rxq),
> +			    rte_mempool_avail_count(rxq->mb_pool),
> +			    rte_mempool_in_use_count(rxq->mb_pool));
> +		return -ENOMEM;
> +	}
> +
> +	for (i = 0; i < count; i++) {
> +		mbuf = obj_p[i];
> +		if (likely(i < count - 1))
> +			rte_prefetch0(obj_p[i + 1]);
> +
> +		idx = rxq->sw_rx_prod & NUM_RX_BDS(rxq);
> +		rxq->sw_rx_ring[idx].mbuf = mbuf;
> +		rxq->sw_rx_ring[idx].page_offset = 0;
> +		mapping = rte_mbuf_data_iova_default(mbuf);
> +		rx_bd = (struct eth_rx_bd *)
> +			ecore_chain_produce(&rxq->rx_bd_ring);
> +		rx_bd->addr.hi = rte_cpu_to_le_32(U64_HI(mapping));
> +		rx_bd->addr.lo = rte_cpu_to_le_32(U64_LO(mapping));
> +		rxq->sw_rx_prod++;
> +	}
> +
> +	return 0;
> +}
> +
>  /* Criterias for calculating Rx buffer size -
>   * 1) rx_buf_size should not exceed the size of mbuf
>   * 2) In scattered_rx mode - minimum rx_buf_size should be @@ -1134,7
> +1180,7 @@ qede_reuse_page(__rte_unused struct qede_dev *qdev,
>  		struct qede_rx_queue *rxq, struct qede_rx_entry *curr_cons)  {
>  	struct eth_rx_bd *rx_bd_prod = ecore_chain_produce(&rxq-
> >rx_bd_ring);
> -	uint16_t idx = rxq->sw_rx_cons & NUM_RX_BDS(rxq);
> +	uint16_t idx = rxq->sw_rx_prod & NUM_RX_BDS(rxq);
>  	struct qede_rx_entry *curr_prod;
>  	dma_addr_t new_mapping;
> 
> @@ -1367,7 +1413,6 @@ qede_recv_pkts(void *p_rxq, struct rte_mbuf
> **rx_pkts, uint16_t nb_pkts)
>  	uint8_t bitfield_val;
>  #endif
>  	uint8_t tunn_parse_flag;
> -	uint8_t j;
>  	struct eth_fast_path_rx_tpa_start_cqe *cqe_start_tpa;
>  	uint64_t ol_flags;
>  	uint32_t packet_type;
> @@ -1376,6 +1421,7 @@ qede_recv_pkts(void *p_rxq, struct rte_mbuf
> **rx_pkts, uint16_t nb_pkts)
>  	uint8_t offset, tpa_agg_idx, flags;
>  	struct qede_agg_info *tpa_info = NULL;
>  	uint32_t rss_hash;
> +	int rx_alloc_count = 0;
> 
>  	hw_comp_cons = rte_le_to_cpu_16(*rxq->hw_cons_ptr);
>  	sw_comp_cons = ecore_chain_get_cons_idx(&rxq->rx_comp_ring);
> @@ -1385,6 +1431,25 @@ qede_recv_pkts(void *p_rxq, struct rte_mbuf
> **rx_pkts, uint16_t nb_pkts)
>  	if (hw_comp_cons == sw_comp_cons)
>  		return 0;
> 
> +	/* Allocate buffers that we used in previous loop */
> +	if (rxq->rx_alloc_count) {
> +		if (unlikely(qede_alloc_rx_bulk_mbufs(rxq,
> +			     rxq->rx_alloc_count))) {
> +			struct rte_eth_dev *dev;
> +
> +			PMD_RX_LOG(ERR, rxq,
> +				   "New buffer allocation failed,"
> +				   "dropping incoming packetn");
> +			dev = &rte_eth_devices[rxq->port_id];
> +			dev->data->rx_mbuf_alloc_failed +=
> +							rxq->rx_alloc_count;
> +			rxq->rx_alloc_errors += rxq->rx_alloc_count;
> +			return 0;
> +		}
> +		qede_update_rx_prod(qdev, rxq);
> +		rxq->rx_alloc_count = 0;
> +	}
> +
>  	while (sw_comp_cons != hw_comp_cons) {
>  		ol_flags = 0;
>  		packet_type = RTE_PTYPE_UNKNOWN;
> @@ -1556,16 +1621,7 @@ qede_recv_pkts(void *p_rxq, struct rte_mbuf
> **rx_pkts, uint16_t nb_pkts)
>  			rx_mb->hash.rss = rss_hash;
>  		}
> 
> -		if (unlikely(qede_alloc_rx_buffer(rxq) != 0)) {
> -			PMD_RX_LOG(ERR, rxq,
> -				   "New buffer allocation failed,"
> -				   "dropping incoming packet\n");
> -			qede_recycle_rx_bd_ring(rxq, qdev, fp_cqe->bd_num);
> -			rte_eth_devices[rxq->port_id].
> -			    data->rx_mbuf_alloc_failed++;
> -			rxq->rx_alloc_errors++;
> -			break;
> -		}
> +		rx_alloc_count++;
>  		qede_rx_bd_ring_consume(rxq);
> 
>  		if (!tpa_start_flg && fp_cqe->bd_num > 1) { @@ -1577,17
> +1633,9 @@ qede_recv_pkts(void *p_rxq, struct rte_mbuf **rx_pkts, uint16_t
> nb_pkts)
>  			if (qede_process_sg_pkts(p_rxq, seg1, num_segs,
>  						 pkt_len - len))
>  				goto next_cqe;
> -			for (j = 0; j < num_segs; j++) {
> -				if (qede_alloc_rx_buffer(rxq)) {
> -					PMD_RX_LOG(ERR, rxq,
> -						"Buffer allocation failed");
> -					rte_eth_devices[rxq->port_id].
> -						data->rx_mbuf_alloc_failed++;
> -					rxq->rx_alloc_errors++;
> -					break;
> -				}
> -				rxq->rx_segs++;
> -			}
> +
> +			rx_alloc_count += num_segs;
> +			rxq->rx_segs += num_segs;
>  		}
>  		rxq->rx_segs++; /* for the first segment */
> 
> @@ -1629,7 +1677,8 @@ next_cqe:
>  		}
>  	}
> 
> -	qede_update_rx_prod(qdev, rxq);
> +	/* Request number of bufferes to be allocated in next loop */
> +	rxq->rx_alloc_count = rx_alloc_count;
> 
>  	rxq->rcv_pkts += rx_pkt;
> 
> diff --git a/drivers/net/qede/qede_rxtx.h b/drivers/net/qede/qede_rxtx.h index
> fe80237d5..574831e61 100644
> --- a/drivers/net/qede/qede_rxtx.h
> +++ b/drivers/net/qede/qede_rxtx.h
> @@ -196,6 +196,8 @@ struct qede_rx_queue {
>  	uint16_t queue_id;
>  	uint16_t port_id;
>  	uint16_t rx_buf_size;
> +	uint16_t rx_alloc_count;
> +	uint16_t unused;
>  	uint64_t rcv_pkts;
>  	uint64_t rx_segs;
>  	uint64_t rx_hw_errors;
> --
> 2.11.0
> 
> ---
>   Diff of the applied patch vs upstream commit (please double-check if non-
> empty:
> ---
> --- -	2019-03-08 09:46:43.105876155 -0800
> +++ 0059-net-qede-fix-performance-bottleneck-in-Rx-path.patch	2019-03-08
> 09:46:40.311403000 -0800
> @@ -1,8 +1,10 @@
> -From 8f2312474529ad7ff0e4b65b82efc8530e7484ce Mon Sep 17 00:00:00
> 2001
> +From f4f2aff537e1ff13ed85a9d4e52038ca34e7e005 Mon Sep 17 00:00:00
> 2001
>  From: Shahed Shaikh <shshaikh@marvell.com>
>  Date: Fri, 18 Jan 2019 02:29:29 -0800
>  Subject: [PATCH] net/qede: fix performance bottleneck in Rx path
> 
> +[ upstream commit 8f2312474529ad7ff0e4b65b82efc8530e7484ce ]
> +
>  Allocating replacement buffer per received packet is expensive.
>  Instead, process received packets first and allocate  replacement buffers in bulk
> later.
> @@ -11,7 +13,6 @@
>  platforms.
> 
>  Fixes: 2ea6f76aff40 ("qede: add core driver")
> -Cc: stable@dpdk.org
> 
>  Signed-off-by: Shahed Shaikh <shshaikh@marvell.com>
>  Acked-by: Rasesh Mody <rmody@marvell.com> @@ -21,10 +22,10 @@
>   2 files changed, 75 insertions(+), 24 deletions(-)
> 
>  diff --git a/drivers/net/qede/qede_rxtx.c b/drivers/net/qede/qede_rxtx.c -index
> 0e33be1a3..684c4aeef 100644
> +index cdb85c218..b525075ca 100644
>  --- a/drivers/net/qede/qede_rxtx.c
>  +++ b/drivers/net/qede/qede_rxtx.c
> -@@ -35,6 +35,52 @@ static inline int qede_alloc_rx_buffer(struct
> qede_rx_queue *rxq)
> +@@ -37,6 +37,52 @@ static inline int qede_alloc_rx_buffer(struct
> +qede_rx_queue *rxq)
>   	return 0;
>   }
> 
> @@ -77,7 +78,7 @@
>   /* Criterias for calculating Rx buffer size -
>    * 1) rx_buf_size should not exceed the size of mbuf
>    * 2) In scattered_rx mode - minimum rx_buf_size should be -@@ -1131,7
> +1177,7 @@ qede_reuse_page(__rte_unused struct qede_dev *qdev,
> +@@ -1134,7 +1180,7 @@ qede_reuse_page(__rte_unused struct qede_dev
> +*qdev,
>   		struct qede_rx_queue *rxq, struct qede_rx_entry *curr_cons)
>   {
>   	struct eth_rx_bd *rx_bd_prod = ecore_chain_produce(&rxq-
> >rx_bd_ring);
> @@ -86,7 +87,7 @@
>   	struct qede_rx_entry *curr_prod;
>   	dma_addr_t new_mapping;
> 
> -@@ -1364,7 +1410,6 @@ qede_recv_pkts(void *p_rxq, struct rte_mbuf
> **rx_pkts, uint16_t nb_pkts)
> +@@ -1367,7 +1413,6 @@ qede_recv_pkts(void *p_rxq, struct rte_mbuf
> +**rx_pkts, uint16_t nb_pkts)
>   	uint8_t bitfield_val;
>   #endif
>   	uint8_t tunn_parse_flag;
> @@ -94,7 +95,7 @@
>   	struct eth_fast_path_rx_tpa_start_cqe *cqe_start_tpa;
>   	uint64_t ol_flags;
>   	uint32_t packet_type;
> -@@ -1373,6 +1418,7 @@ qede_recv_pkts(void *p_rxq, struct rte_mbuf
> **rx_pkts, uint16_t nb_pkts)
> +@@ -1376,6 +1421,7 @@ qede_recv_pkts(void *p_rxq, struct rte_mbuf
> +**rx_pkts, uint16_t nb_pkts)
>   	uint8_t offset, tpa_agg_idx, flags;
>   	struct qede_agg_info *tpa_info = NULL;
>   	uint32_t rss_hash;
> @@ -102,7 +103,7 @@
> 
>   	hw_comp_cons = rte_le_to_cpu_16(*rxq->hw_cons_ptr);
>   	sw_comp_cons = ecore_chain_get_cons_idx(&rxq->rx_comp_ring);
> -@@ -1382,6 +1428,25 @@ qede_recv_pkts(void *p_rxq, struct rte_mbuf
> **rx_pkts, uint16_t nb_pkts)
> +@@ -1385,6 +1431,25 @@ qede_recv_pkts(void *p_rxq, struct rte_mbuf
> +**rx_pkts, uint16_t nb_pkts)
>   	if (hw_comp_cons == sw_comp_cons)
>   		return 0;
> 
> @@ -128,7 +129,7 @@
>   	while (sw_comp_cons != hw_comp_cons) {
>   		ol_flags = 0;
>   		packet_type = RTE_PTYPE_UNKNOWN;
> -@@ -1553,16 +1618,7 @@ qede_recv_pkts(void *p_rxq, struct rte_mbuf
> **rx_pkts, uint16_t nb_pkts)
> +@@ -1556,16 +1621,7 @@ qede_recv_pkts(void *p_rxq, struct rte_mbuf
> +**rx_pkts, uint16_t nb_pkts)
>   			rx_mb->hash.rss = rss_hash;
>   		}
> 
> @@ -146,7 +147,7 @@
>   		qede_rx_bd_ring_consume(rxq);
> 
>   		if (!tpa_start_flg && fp_cqe->bd_num > 1) { -@@ -1574,17
> +1630,9 @@ qede_recv_pkts(void *p_rxq, struct rte_mbuf **rx_pkts, uint16_t
> nb_pkts)
> +@@ -1577,17 +1633,9 @@ qede_recv_pkts(void *p_rxq, struct rte_mbuf
> +**rx_pkts, uint16_t nb_pkts)
>   			if (qede_process_sg_pkts(p_rxq, seg1, num_segs,
>   						 pkt_len - len))
>   				goto next_cqe;
> @@ -167,7 +168,7 @@
>   		}
>   		rxq->rx_segs++; /* for the first segment */
> 
> -@@ -1626,7 +1674,8 @@ next_cqe:
> +@@ -1629,7 +1677,8 @@ next_cqe:
>   		}
>   	}
> 
> @@ -178,10 +179,10 @@
>   	rxq->rcv_pkts += rx_pkt;
> 
>  diff --git a/drivers/net/qede/qede_rxtx.h b/drivers/net/qede/qede_rxtx.h -index
> 454daa07b..5b249cbb2 100644
> +index fe80237d5..574831e61 100644
>  --- a/drivers/net/qede/qede_rxtx.h
>  +++ b/drivers/net/qede/qede_rxtx.h
> -@@ -192,6 +192,8 @@ struct qede_rx_queue {
> +@@ -196,6 +196,8 @@ struct qede_rx_queue {
>   	uint16_t queue_id;
>   	uint16_t port_id;
>   	uint16_t rx_buf_size;

^ permalink raw reply	[flat|nested] 75+ messages in thread

* Re: [dpdk-stable] [EXT] patch 'net/qede: fix performance bottleneck in Rx path' has been queued to LTS release 17.11.6
  2019-03-12 17:04   ` [dpdk-stable] [EXT] " Shahed Shaikh
@ 2019-03-12 22:03     ` Yongseok Koh
  2019-03-19 19:12       ` Shahed Shaikh
  0 siblings, 1 reply; 75+ messages in thread
From: Yongseok Koh @ 2019-03-12 22:03 UTC (permalink / raw)
  To: Shahed Shaikh; +Cc: Rasesh Mody, dpdk stable


> On Mar 12, 2019, at 10:04 AM, Shahed Shaikh <shshaikh@marvell.com> wrote:
> 
>> -----Original Message-----
>> From: Yongseok Koh <yskoh@mellanox.com>
>> Sent: Friday, March 8, 2019 11:18 PM
>> To: Shahed Shaikh <shshaikh@marvell.com>
>> Cc: Rasesh Mody <rmody@marvell.com>; dpdk stable <stable@dpdk.org>
>> Subject: [EXT] patch 'net/qede: fix performance bottleneck in Rx path' has been
>> queued to LTS release 17.11.6
>> Hi,
>> 
>> FYI, your patch has been queued to LTS release 17.11.6
>> 
>> Note it hasn't been pushed to https://emea01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fdpdk.org%2Fbrowse%2Fdpdk-stable&amp;data=02%7C01%7Cyskoh%40mellanox.com%7C65bf75b6f82140e58fda08d6a70cce02%7Ca652971c7d2e4d9ba6a4d149256f461b%7C0%7C0%7C636880070771455895&amp;sdata=jZGcy3fhfhLg0GAEz1leT%2F3%2Bw%2FaXYyzujmd14PQ2PYg%3D&amp;reserved=0 yet.
>> It will be pushed if I get no objection by 03/13/19. So please shout if anyone has
>> objection.
> 
> Hi,
> 
> We recently found that this patch introduces a regression for which I have just sent out a fix.
> https://emea01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fpatchwork.dpdk.org%2Fpatch%2F51134%2F&amp;data=02%7C01%7Cyskoh%40mellanox.com%7C65bf75b6f82140e58fda08d6a70cce02%7Ca652971c7d2e4d9ba6a4d149256f461b%7C0%7C0%7C636880070771455895&amp;sdata=kFuiOeXlRoZv0%2Fsn3ds7cSJmrKRlyOMPIMbk7r5pWKw%3D&amp;reserved=0   ("net/qede: fix receive packet drop")
> 
> How do we handle such situation? Will you also pull above fix once it gets accepted or ignore current patch for 17.11.6 and consider for next release?
> Please advise.

>From looking at the new patch, I'm okay to merge it for 17.11.6 as long as it is acked.
Please let me know if it is acked and merged, then I'll squash it to the original fix.
Until then, I'll hold the original one - 'net/qede: fix performance bottleneck in Rx path'
Also try to drop the Cc:stable tag so that it won't get queued again for 17.11.7.

Thanks,
Yongseok

^ permalink raw reply	[flat|nested] 75+ messages in thread

* Re: [dpdk-stable] [EXT] patch 'net/qede: fix performance bottleneck in Rx path' has been queued to LTS release 17.11.6
  2019-03-12 22:03     ` Yongseok Koh
@ 2019-03-19 19:12       ` Shahed Shaikh
  2019-03-27 18:47         ` Yongseok Koh
  0 siblings, 1 reply; 75+ messages in thread
From: Shahed Shaikh @ 2019-03-19 19:12 UTC (permalink / raw)
  To: Yongseok Koh; +Cc: Rasesh Mody, dpdk stable

> -----Original Message-----
> From: Yongseok Koh <yskoh@mellanox.com>
> Sent: Wednesday, March 13, 2019 3:33 AM
> To: Shahed Shaikh <shshaikh@marvell.com>
> Cc: Rasesh Mody <rmody@marvell.com>; dpdk stable <stable@dpdk.org>
> Subject: Re: [EXT] patch 'net/qede: fix performance bottleneck in Rx path' has
> been queued to LTS release 17.11.6
> 
> 
> > On Mar 12, 2019, at 10:04 AM, Shahed Shaikh <shshaikh@marvell.com>
> wrote:
> >
> >> -----Original Message-----
> >> From: Yongseok Koh <yskoh@mellanox.com>
> >> Sent: Friday, March 8, 2019 11:18 PM
> >> To: Shahed Shaikh <shshaikh@marvell.com>
> >> Cc: Rasesh Mody <rmody@marvell.com>; dpdk stable <stable@dpdk.org>
> >> Subject: [EXT] patch 'net/qede: fix performance bottleneck in Rx
> >> path' has been queued to LTS release 17.11.6 Hi,
> >>
> >> FYI, your patch has been queued to LTS release 17.11.6
> >>
> >> Note it hasn't been pushed to
> https://emea01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fdpdk.or
> g%2Fbrowse%2Fdpdk-
> stable&amp;data=02%7C01%7Cyskoh%40mellanox.com%7C65bf75b6f82140e5
> 8fda08d6a70cce02%7Ca652971c7d2e4d9ba6a4d149256f461b%7C0%7C0%7C63
> 6880070771455895&amp;sdata=jZGcy3fhfhLg0GAEz1leT%2F3%2Bw%2FaXYyzuj
> md14PQ2PYg%3D&amp;reserved=0 yet.
> >> It will be pushed if I get no objection by 03/13/19. So please shout
> >> if anyone has objection.
> >
> > Hi,
> >
> > We recently found that this patch introduces a regression for which I have just
> sent out a fix.
> >
> https://emea01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fpatchw
> ork.dpdk.org%2Fpatch%2F51134%2F&amp;data=02%7C01%7Cyskoh%40mellan
> ox.com%7C65bf75b6f82140e58fda08d6a70cce02%7Ca652971c7d2e4d9ba6a4d
> 149256f461b%7C0%7C0%7C636880070771455895&amp;sdata=kFuiOeXlRoZv0
> %2Fsn3ds7cSJmrKRlyOMPIMbk7r5pWKw%3D&amp;reserved=0   ("net/qede: fix
> receive packet drop")
> >
> > How do we handle such situation? Will you also pull above fix once it gets
> accepted or ignore current patch for 17.11.6 and consider for next release?
> > Please advise.
> 
> From looking at the new patch, I'm okay to merge it for 17.11.6 as long as it is
> acked.
> Please let me know if it is acked and merged, then I'll squash it to the original fix.
> Until then, I'll hold the original one - 'net/qede: fix performance bottleneck in Rx
> path'

Hi Yongseok,

Patch 'net/qede: fix receive packet drop' has been accepted.

http://patchwork.dpdk.org/patch/51134/
 
Thanks,
Shahed

> Also try to drop the Cc:stable tag so that it won't get queued again for 17.11.7.

> 
 

> Thanks,
> Yongseok


^ permalink raw reply	[flat|nested] 75+ messages in thread

* Re: [dpdk-stable] [EXT] patch 'net/qede: fix performance bottleneck in Rx path' has been queued to LTS release 17.11.6
  2019-03-19 19:12       ` Shahed Shaikh
@ 2019-03-27 18:47         ` Yongseok Koh
  0 siblings, 0 replies; 75+ messages in thread
From: Yongseok Koh @ 2019-03-27 18:47 UTC (permalink / raw)
  To: Shahed Shaikh; +Cc: Rasesh Mody, dpdk stable


> On Mar 19, 2019, at 12:12 PM, Shahed Shaikh <shshaikh@marvell.com> wrote:
> 
>> -----Original Message-----
>> From: Yongseok Koh <yskoh@mellanox.com>
>> Sent: Wednesday, March 13, 2019 3:33 AM
>> To: Shahed Shaikh <shshaikh@marvell.com>
>> Cc: Rasesh Mody <rmody@marvell.com>; dpdk stable <stable@dpdk.org>
>> Subject: Re: [EXT] patch 'net/qede: fix performance bottleneck in Rx path' has
>> been queued to LTS release 17.11.6
>> 
>> 
>>> On Mar 12, 2019, at 10:04 AM, Shahed Shaikh <shshaikh@marvell.com>
>> wrote:
>>> 
>>>> -----Original Message-----
>>>> From: Yongseok Koh <yskoh@mellanox.com>
>>>> Sent: Friday, March 8, 2019 11:18 PM
>>>> To: Shahed Shaikh <shshaikh@marvell.com>
>>>> Cc: Rasesh Mody <rmody@marvell.com>; dpdk stable <stable@dpdk.org>
>>>> Subject: [EXT] patch 'net/qede: fix performance bottleneck in Rx
>>>> path' has been queued to LTS release 17.11.6 Hi,
>>>> 
>>>> FYI, your patch has been queued to LTS release 17.11.6
>>>> 
>>>> Note it hasn't been pushed to
>> https://emea01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fdpdk.or
>> g%2Fbrowse%2Fdpdk-
>> stable&amp;data=02%7C01%7Cyskoh%40mellanox.com%7C65bf75b6f82140e5
>> 8fda08d6a70cce02%7Ca652971c7d2e4d9ba6a4d149256f461b%7C0%7C0%7C63
>> 6880070771455895&amp;sdata=jZGcy3fhfhLg0GAEz1leT%2F3%2Bw%2FaXYyzuj
>> md14PQ2PYg%3D&amp;reserved=0 yet.
>>>> It will be pushed if I get no objection by 03/13/19. So please shout
>>>> if anyone has objection.
>>> 
>>> Hi,
>>> 
>>> We recently found that this patch introduces a regression for which I have just
>> sent out a fix.
>>> 
>> https://emea01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fpatchw
>> ork.dpdk.org%2Fpatch%2F51134%2F&amp;data=02%7C01%7Cyskoh%40mellan
>> ox.com%7C65bf75b6f82140e58fda08d6a70cce02%7Ca652971c7d2e4d9ba6a4d
>> 149256f461b%7C0%7C0%7C636880070771455895&amp;sdata=kFuiOeXlRoZv0
>> %2Fsn3ds7cSJmrKRlyOMPIMbk7r5pWKw%3D&amp;reserved=0   ("net/qede: fix
>> receive packet drop")
>>> 
>>> How do we handle such situation? Will you also pull above fix once it gets
>> accepted or ignore current patch for 17.11.6 and consider for next release?
>>> Please advise.
>> 
>> From looking at the new patch, I'm okay to merge it for 17.11.6 as long as it is
>> acked.
>> Please let me know if it is acked and merged, then I'll squash it to the original fix.
>> Until then, I'll hold the original one - 'net/qede: fix performance bottleneck in Rx
>> path'
> 
> Hi Yongseok,
> 
> Patch 'net/qede: fix receive packet drop' has been accepted.
> 
> https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fpatchwork.dpdk.org%2Fpatch%2F51134%2F&amp;data=02%7C01%7Cyskoh%40mellanox.com%7Cb50fa58973c04e5ee3a508d6ac9ecd28%7Ca652971c7d2e4d9ba6a4d149256f461b%7C0%7C0%7C636886195399033283&amp;sdata=dIny5hoZLaR%2BDh%2FnLgrNW2YvaH6DeiwL22ogqtTTpKA%3D&amp;reserved=0

"net/qede: fix performance bottleneck in Rx path" has been merged to stable/17.11.
and "net/qede: fix receive packet drop" is squashed on to it.

Thanks,
Yongseok



^ permalink raw reply	[flat|nested] 75+ messages in thread

end of thread, other threads:[~2019-03-27 18:47 UTC | newest]

Thread overview: 75+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-03-08 17:46 [dpdk-stable] patch 'net/bnx2x: cleanup info logs' has been queued to LTS release 17.11.6 Yongseok Koh
2019-03-08 17:46 ` [dpdk-stable] patch 'net/i40e: fix getting RSS configuration' " Yongseok Koh
2019-03-08 17:46 ` [dpdk-stable] patch 'net/i40e: fix using recovery mode firmware' " Yongseok Koh
2019-03-08 17:46 ` [dpdk-stable] patch 'net/ixgbe: fix overwriting RSS RETA' " Yongseok Koh
2019-03-08 17:46 ` [dpdk-stable] patch 'net/mlx5: fix validation of Rx queue number' " Yongseok Koh
2019-03-08 17:46 ` [dpdk-stable] patch 'ethdev: fix typo in queue setup error log' " Yongseok Koh
2019-03-08 17:46 ` [dpdk-stable] patch 'drivers/net: fix several Tx prepare functions' " Yongseok Koh
2019-03-08 17:46 ` [dpdk-stable] patch 'vhost: fix crash after mmap failure' " Yongseok Koh
2019-03-08 17:46 ` [dpdk-stable] patch 'net/i40e: revert fix offload not supported mask' " Yongseok Koh
2019-03-08 17:46 ` [dpdk-stable] patch 'net/i40e: remove redundant reset of queue number' " Yongseok Koh
2019-03-08 17:46 ` [dpdk-stable] patch 'doc: fix garbage text in generated HTML guides' " Yongseok Koh
2019-03-08 17:46 ` [dpdk-stable] patch 'eventdev: fix xstats documentation typo' " Yongseok Koh
2019-03-08 17:46 ` [dpdk-stable] patch 'crypto/qat: fix block size error handling' " Yongseok Koh
2019-03-08 17:46 ` [dpdk-stable] patch 'timer: fix race condition' " Yongseok Koh
2019-03-08 17:46 ` [dpdk-stable] patch 'net/i40e: fix statistics inconsistency' " Yongseok Koh
2019-03-08 17:46 ` [dpdk-stable] patch 'vhost: fix race condition when adding fd in the fdset' " Yongseok Koh
2019-03-08 17:46 ` [dpdk-stable] patch 'net/ena: add supported RSS offloads types' " Yongseok Koh
2019-03-08 17:46 ` [dpdk-stable] patch 'net/ena: update completion queue after cleanup' " Yongseok Koh
2019-03-08 17:46 ` [dpdk-stable] patch 'net: fix underflow for checksum of invalid IPv4 packets' " Yongseok Koh
2019-03-08 17:46 ` [dpdk-stable] patch 'net/tap: add buffer overflow checks before checksum' " Yongseok Koh
2019-03-08 17:46 ` [dpdk-stable] patch 'net/af_packet: fix setting MTU decrements sockaddr twice' " Yongseok Koh
2019-03-08 17:47 ` [dpdk-stable] patch 'net/tap: fix possible uninitialized variable access' " Yongseok Koh
2019-03-08 17:47 ` [dpdk-stable] patch 'app/testpmd: expand RED queue thresholds to 64 bits' " Yongseok Koh
2019-03-08 17:47 ` [dpdk-stable] patch 'net/i40e: fix get RSS conf' " Yongseok Koh
2019-03-08 17:47 ` [dpdk-stable] patch 'devtools: fix wrong headline lowercase for arm' " Yongseok Koh
2019-03-08 17:47 ` [dpdk-stable] patch 'drivers/crypto: fix PMDs memory leak' " Yongseok Koh
2019-03-08 17:47 ` [dpdk-stable] patch 'test/crypto: fix misleading trace message' " Yongseok Koh
2019-03-08 17:47 ` [dpdk-stable] patch 'examples/ipsec-secgw: fix outbound codepath for single SA' " Yongseok Koh
2019-03-08 17:47 ` [dpdk-stable] patch 'examples/ipsec-secgw: make local variables static' " Yongseok Koh
2019-03-08 17:47 ` [dpdk-stable] patch 'kni: fix build on RHEL 8' " Yongseok Koh
2019-03-08 17:47 ` [dpdk-stable] patch 'kni: fix build on RHEL8 for arm and Power9' " Yongseok Koh
2019-03-08 17:47 ` [dpdk-stable] patch 'mk: fix scope of disabling AVX512F support' " Yongseok Koh
2019-03-08 17:47 ` [dpdk-stable] patch 'net/ixgbe: fix over using multicast table for VF' " Yongseok Koh
2019-03-08 17:47 ` [dpdk-stable] patch 'vhost: fix possible out of bound access in vector filling' " Yongseok Koh
2019-03-08 17:47 ` [dpdk-stable] patch 'net/fm10k: fix internal switch initial status' " Yongseok Koh
2019-03-08 17:47 ` [dpdk-stable] patch 'net/dpaa: fix secondary process' " Yongseok Koh
2019-03-08 17:47 ` [dpdk-stable] patch 'examples/flow_filtering: fix example documentation' " Yongseok Koh
2019-03-08 17:47 ` [dpdk-stable] patch 'doc: fix a parameter name in testpmd guide' " Yongseok Koh
2019-03-08 17:47 ` [dpdk-stable] patch 'app/testpmd: fix quit to stop all ports before close' " Yongseok Koh
2019-03-08 17:47 ` [dpdk-stable] patch 'net/bonding: fix possible null pointer reference' " Yongseok Koh
2019-03-08 17:47 ` [dpdk-stable] patch 'net/sfc: discard last seen VLAN TCI if Tx packet is dropped' " Yongseok Koh
2019-03-08 17:47 ` [dpdk-stable] patch 'net/dpaa2: fix device init for secondary process' " Yongseok Koh
2019-03-08 17:47 ` [dpdk-stable] patch 'net/sfc: fix typo in preprocessor check' " Yongseok Koh
2019-03-08 17:47 ` [dpdk-stable] patch 'drivers: fix sprintf with snprintf' " Yongseok Koh
2019-03-08 17:47 ` [dpdk-stable] patch 'net/mlx5: fix instruction hotspot on replenishing Rx buffer' " Yongseok Koh
2019-03-08 17:47 ` [dpdk-stable] patch 'examples/tep_term: remove unused constant' " Yongseok Koh
2019-03-08 17:47 ` [dpdk-stable] patch 'eal: fix core number validation' " Yongseok Koh
2019-03-08 17:47 ` [dpdk-stable] patch 'eal: fix out of bound access when no CPU available' " Yongseok Koh
2019-03-08 17:47 ` [dpdk-stable] patch 'eal: check string parameter lengths' " Yongseok Koh
2019-03-08 17:47 ` [dpdk-stable] patch 'gro: check invalid TCP header length' " Yongseok Koh
2019-03-08 17:47 ` [dpdk-stable] patch 'net/i40e: fix VF overwrite PF RSS LUT for X722' " Yongseok Koh
2019-03-08 17:47 ` [dpdk-stable] patch 'net/sfc: fix VF error/missed stats mapping' " Yongseok Koh
2019-03-08 17:47 ` [dpdk-stable] patch 'net/sfc: fix datapath name references in logs' " Yongseok Koh
2019-03-08 17:47 ` [dpdk-stable] patch 'vhost: fix memory leak on realloc failure' " Yongseok Koh
2019-03-08 17:47 ` [dpdk-stable] patch 'examples/vhost: fix path allocation failure handling' " Yongseok Koh
2019-03-08 17:47 ` [dpdk-stable] patch 'net/sfc: fix Rx packets counter' " Yongseok Koh
2019-03-08 17:47 ` [dpdk-stable] patch 'doc: add missing loopback option in testpmd guide' " Yongseok Koh
2019-03-08 17:47 ` [dpdk-stable] patch 'efd: fix tail queue leak' " Yongseok Koh
2019-03-08 17:47 ` [dpdk-stable] patch 'net/qede: fix performance bottleneck in Rx path' " Yongseok Koh
2019-03-12 17:04   ` [dpdk-stable] [EXT] " Shahed Shaikh
2019-03-12 22:03     ` Yongseok Koh
2019-03-19 19:12       ` Shahed Shaikh
2019-03-27 18:47         ` Yongseok Koh
2019-03-08 17:47 ` [dpdk-stable] patch 'net/qede: remove prefetch in Tx " Yongseok Koh
2019-03-08 17:47 ` [dpdk-stable] patch 'doc: fix references in power management guide' " Yongseok Koh
2019-03-08 17:47 ` [dpdk-stable] patch 'ethdev: fix errno to have positive value' " Yongseok Koh
2019-03-08 17:47 ` [dpdk-stable] patch 'gso: fix VxLAN/GRE tunnel checks' " Yongseok Koh
2019-03-08 17:47 ` [dpdk-stable] patch 'kni: fix build for dev_open in Linux 5.0' " Yongseok Koh
2019-03-08 17:47 ` [dpdk-stable] patch 'kni: fix build for igb_ndo_bridge_setlink " Yongseok Koh
2019-03-08 17:47 ` [dpdk-stable] patch 'vfio: fix error message' " Yongseok Koh
2019-03-08 17:47 ` [dpdk-stable] patch 'net/i40e: fix queue region DCB configure' " Yongseok Koh
2019-03-08 17:47 ` [dpdk-stable] patch 'net/virtio-user: fix used ring in cvq handling' " Yongseok Koh
2019-03-08 17:47 ` [dpdk-stable] patch 'net/ena: fix dev init with multi-process' " Yongseok Koh
2019-03-08 17:47 ` [dpdk-stable] patch 'net/ena: fix errno to positive value' " Yongseok Koh
2019-03-08 17:47 ` [dpdk-stable] patch 'doc: add dependency for PDF in contributing guide' " Yongseok Koh

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).