patches for DPDK stable branches
 help / color / mirror / Atom feed
* [dpdk-stable] patch 'net/bnx2x: fix poll link status' has been queued to LTS release 17.11.4
@ 2018-08-13 20:42 Yongseok Koh
  2018-08-13 20:42 ` [dpdk-stable] patch 'net/dpaa2: remove loop for unused pool entries' " Yongseok Koh
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: Yongseok Koh @ 2018-08-13 20:42 UTC (permalink / raw)
  To: Rasesh Mody; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.4

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/15/18. So please
shout if anyone has objections.

Thanks.

Yongseok

---
>From 5bc1ab14417b3712b18f0c4516b14b3ba16c5628 Mon Sep 17 00:00:00 2001
From: Rasesh Mody <rasesh.mody@cavium.com>
Date: Thu, 2 Aug 2018 21:42:45 -0700
Subject: [PATCH] net/bnx2x: fix poll link status

[ upstream commit 6041aa619f9adc35edf0ea8f4dca5d09d320459a ]

The PMD has been modified to invoke the polling function in the link
management code which detects the peer speed/mode, configure the link
and update the status accordingly. This patch is the fix for the link
down issue seen when we do dev_stop() and dev_start() from an
application.

Fixes: 540a211084a7 ("bnx2x: driver core")

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
---
 drivers/net/bnx2x/bnx2x.c        |  18 -------
 drivers/net/bnx2x/bnx2x.h        |   1 +
 drivers/net/bnx2x/bnx2x_ethdev.c | 105 +++++++++++++++++++++++++++++----------
 drivers/net/bnx2x/bnx2x_ethdev.h |   3 +-
 4 files changed, 83 insertions(+), 44 deletions(-)

diff --git a/drivers/net/bnx2x/bnx2x.c b/drivers/net/bnx2x/bnx2x.c
index cc5f28a0f..01035fbcf 100644
--- a/drivers/net/bnx2x/bnx2x.c
+++ b/drivers/net/bnx2x/bnx2x.c
@@ -125,7 +125,6 @@ int bnx2x_nic_load(struct bnx2x_softc *sc);
 
 static int bnx2x_handle_sp_tq(struct bnx2x_softc *sc);
 static void bnx2x_handle_fp_tq(struct bnx2x_fastpath *fp, int scan_fp);
-static void bnx2x_periodic_stop(struct bnx2x_softc *sc);
 static void bnx2x_ack_sb(struct bnx2x_softc *sc, uint8_t igu_sb_id,
 			 uint8_t storm, uint16_t index, uint8_t op,
 			 uint8_t update);
@@ -1971,9 +1970,6 @@ bnx2x_nic_unload(struct bnx2x_softc *sc, uint32_t unload_mode, uint8_t keep_link
 
 	PMD_DRV_LOG(DEBUG, "Starting NIC unload...");
 
-	/* stop the periodic callout */
-	bnx2x_periodic_stop(sc);
-
 	/* mark driver as unloaded in shmem2 */
 	if (IS_PF(sc) && SHMEM2_HAS(sc, drv_capabilities_flag)) {
 		val = SHMEM2_RD(sc, drv_capabilities_flag[SC_FW_MB_IDX(sc)]);
@@ -7001,16 +6997,6 @@ void bnx2x_link_status_update(struct bnx2x_softc *sc)
 	}
 }
 
-static void bnx2x_periodic_start(struct bnx2x_softc *sc)
-{
-	atomic_store_rel_long(&sc->periodic_flags, PERIODIC_GO);
-}
-
-static void bnx2x_periodic_stop(struct bnx2x_softc *sc)
-{
-	atomic_store_rel_long(&sc->periodic_flags, PERIODIC_STOP);
-}
-
 static int bnx2x_initial_phy_init(struct bnx2x_softc *sc, int load_mode)
 {
 	int rc, cfg_idx = bnx2x_get_link_cfg_idx(sc);
@@ -7045,10 +7031,6 @@ static int bnx2x_initial_phy_init(struct bnx2x_softc *sc, int load_mode)
 		bnx2x_link_report(sc);
 	}
 
-	if (!CHIP_REV_IS_SLOW(sc)) {
-		bnx2x_periodic_start(sc);
-	}
-
 	sc->link_params.req_line_speed[cfg_idx] = req_line_speed;
 	return rc;
 }
diff --git a/drivers/net/bnx2x/bnx2x.h b/drivers/net/bnx2x/bnx2x.h
index 17075d384..c93f148bf 100644
--- a/drivers/net/bnx2x/bnx2x.h
+++ b/drivers/net/bnx2x/bnx2x.h
@@ -1930,6 +1930,7 @@ void bnx2x_link_status_update(struct bnx2x_softc *sc);
 int bnx2x_complete_sp(struct bnx2x_softc *sc);
 int bnx2x_set_storm_rx_mode(struct bnx2x_softc *sc);
 void bnx2x_periodic_callout(struct bnx2x_softc *sc);
+void bnx2x_periodic_stop(void *param);
 
 int bnx2x_vf_get_resources(struct bnx2x_softc *sc, uint8_t tx_count, uint8_t rx_count);
 void bnx2x_vf_close(struct bnx2x_softc *sc);
diff --git a/drivers/net/bnx2x/bnx2x_ethdev.c b/drivers/net/bnx2x/bnx2x_ethdev.c
index 95861a06e..d3f2efba1 100644
--- a/drivers/net/bnx2x/bnx2x_ethdev.c
+++ b/drivers/net/bnx2x/bnx2x_ethdev.c
@@ -13,6 +13,7 @@
 
 #include <rte_dev.h>
 #include <rte_ethdev_pci.h>
+#include <rte_alarm.h>
 
 /*
  * The set of PCI devices this driver supports
@@ -78,26 +79,31 @@ static const struct rte_bnx2x_xstats_name_off bnx2x_xstats_strings[] = {
 		offsetof(struct bnx2x_eth_stats, pfc_frames_received_lo)}
 };
 
-static void
+static int
 bnx2x_link_update(struct rte_eth_dev *dev)
 {
 	struct bnx2x_softc *sc = dev->data->dev_private;
+	struct rte_eth_link link;
 
 	PMD_INIT_FUNC_TRACE();
+
 	bnx2x_link_status_update(sc);
+	memset(&link, 0, sizeof(link));
 	mb();
-	dev->data->dev_link.link_speed = sc->link_vars.line_speed;
+	link.link_speed = sc->link_vars.line_speed;
 	switch (sc->link_vars.duplex) {
 		case DUPLEX_FULL:
-			dev->data->dev_link.link_duplex = ETH_LINK_FULL_DUPLEX;
+			link.link_duplex = ETH_LINK_FULL_DUPLEX;
 			break;
 		case DUPLEX_HALF:
-			dev->data->dev_link.link_duplex = ETH_LINK_HALF_DUPLEX;
+			link.link_duplex = ETH_LINK_HALF_DUPLEX;
 			break;
 	}
-	dev->data->dev_link.link_autoneg = !(dev->data->dev_conf.link_speeds &
+	link.link_autoneg = !(dev->data->dev_conf.link_speeds &
 			ETH_LINK_SPEED_FIXED);
-	dev->data->dev_link.link_status = sc->link_vars.link_up;
+	link.link_status = sc->link_vars.link_up;
+
+	return rte_eth_linkstatus_set(dev, &link);
 }
 
 static void
@@ -106,8 +112,6 @@ bnx2x_interrupt_action(struct rte_eth_dev *dev)
 	struct bnx2x_softc *sc = dev->data->dev_private;
 	uint32_t link_status;
 
-	PMD_DEBUG_PERIODIC_LOG(INFO, "Interrupt handled");
-
 	bnx2x_intr_legacy(sc, 0);
 
 	if (sc->periodic_flags & PERIODIC_GO)
@@ -125,10 +129,41 @@ bnx2x_interrupt_handler(void *param)
 	struct rte_eth_dev *dev = (struct rte_eth_dev *)param;
 	struct bnx2x_softc *sc = dev->data->dev_private;
 
+	PMD_DEBUG_PERIODIC_LOG(INFO, "Interrupt handled");
+
 	bnx2x_interrupt_action(dev);
 	rte_intr_enable(&sc->pci_dev->intr_handle);
 }
 
+static void bnx2x_periodic_start(void *param)
+{
+	struct rte_eth_dev *dev = (struct rte_eth_dev *)param;
+	struct bnx2x_softc *sc = dev->data->dev_private;
+	int ret = 0;
+
+	atomic_store_rel_long(&sc->periodic_flags, PERIODIC_GO);
+	bnx2x_interrupt_action(dev);
+	if (IS_PF(sc)) {
+		ret = rte_eal_alarm_set(BNX2X_SP_TIMER_PERIOD,
+					bnx2x_periodic_start, (void *)dev);
+		if (ret) {
+			PMD_DRV_LOG(ERR, "Unable to start periodic"
+					 " timer rc %d", ret);
+			assert(false && "Unable to start periodic timer");
+		}
+	}
+}
+
+void bnx2x_periodic_stop(void *param)
+{
+	struct rte_eth_dev *dev = (struct rte_eth_dev *)param;
+	struct bnx2x_softc *sc = dev->data->dev_private;
+
+	atomic_store_rel_long(&sc->periodic_flags, PERIODIC_STOP);
+
+	rte_eal_alarm_cancel(bnx2x_periodic_start, (void *)dev);
+}
+
 /*
  * Devops - helper functions can be called from user application
  */
@@ -182,6 +217,10 @@ bnx2x_dev_start(struct rte_eth_dev *dev)
 
 	PMD_INIT_FUNC_TRACE();
 
+	/* start the periodic callout */
+	if (sc->periodic_flags & PERIODIC_STOP)
+		bnx2x_periodic_start(dev);
+
 	ret = bnx2x_init(sc);
 	if (ret) {
 		PMD_DRV_LOG(DEBUG, "bnx2x_init failed (%d)", ret);
@@ -222,6 +261,9 @@ bnx2x_dev_stop(struct rte_eth_dev *dev)
 				bnx2x_interrupt_handler, (void *)dev);
 	}
 
+	/* stop the periodic callout */
+	bnx2x_periodic_stop(dev);
+
 	ret = bnx2x_nic_unload(sc, UNLOAD_NORMAL, FALSE);
 	if (ret) {
 		PMD_DRV_LOG(DEBUG, "bnx2x_nic_unload failed (%d)", ret);
@@ -304,20 +346,16 @@ bnx2x_dev_link_update(struct rte_eth_dev *dev, __rte_unused int wait_to_complete
 {
 	PMD_INIT_FUNC_TRACE();
 
-	int old_link_status = dev->data->dev_link.link_status;
-
-	bnx2x_link_update(dev);
-
-	return old_link_status == dev->data->dev_link.link_status ? -1 : 0;
+	return bnx2x_link_update(dev);
 }
 
 static int
 bnx2xvf_dev_link_update(struct rte_eth_dev *dev, __rte_unused int wait_to_complete)
 {
-	int old_link_status = dev->data->dev_link.link_status;
 	struct bnx2x_softc *sc = dev->data->dev_private;
+	int ret = 0;
 
-	bnx2x_link_update(dev);
+	ret = bnx2x_link_update(dev);
 
 	bnx2x_check_bull(sc);
 	if (sc->old_bulletin.valid_bitmap & (1 << CHANNEL_DOWN)) {
@@ -326,7 +364,7 @@ bnx2xvf_dev_link_update(struct rte_eth_dev *dev, __rte_unused int wait_to_comple
 		dev->data->dev_link.link_status = ETH_LINK_DOWN;
 	}
 
-	return old_link_status == dev->data->dev_link.link_status ? -1 : 0;
+	return ret;
 }
 
 static int
@@ -580,6 +618,17 @@ bnx2x_common_dev_init(struct rte_eth_dev *eth_dev, int is_vf)
 		return ret;
 	}
 
+	/* schedule periodic poll for slowpath link events */
+	if (IS_PF(sc)) {
+		ret = rte_eal_alarm_set(BNX2X_SP_TIMER_PERIOD,
+					bnx2x_periodic_start, (void *)eth_dev);
+		if (ret) {
+			PMD_DRV_LOG(ERR, "Unable to start periodic"
+					  " timer rc %d", ret);
+			return -EINVAL;
+		}
+	}
+
 	eth_dev->data->mac_addrs = (struct ether_addr *)sc->link_params.mac_addr;
 
 	PMD_DRV_LOG(INFO, "pcie_bus=%d, pcie_device=%d",
@@ -594,18 +643,20 @@ bnx2x_common_dev_init(struct rte_eth_dev *eth_dev, int is_vf)
 	if (IS_VF(sc)) {
 		rte_spinlock_init(&sc->vf2pf_lock);
 
-		if (bnx2x_dma_alloc(sc, sizeof(struct bnx2x_vf_mbx_msg),
-				    &sc->vf2pf_mbox_mapping, "vf2pf_mbox",
-				    RTE_CACHE_LINE_SIZE) != 0)
-			return -ENOMEM;
+		ret = bnx2x_dma_alloc(sc, sizeof(struct bnx2x_vf_mbx_msg),
+				      &sc->vf2pf_mbox_mapping, "vf2pf_mbox",
+				      RTE_CACHE_LINE_SIZE);
+		if (ret)
+			goto out;
 
 		sc->vf2pf_mbox = (struct bnx2x_vf_mbx_msg *)
 					 sc->vf2pf_mbox_mapping.vaddr;
 
-		if (bnx2x_dma_alloc(sc, sizeof(struct bnx2x_vf_bulletin),
-				    &sc->pf2vf_bulletin_mapping, "vf2pf_bull",
-				    RTE_CACHE_LINE_SIZE) != 0)
-			return -ENOMEM;
+		ret = bnx2x_dma_alloc(sc, sizeof(struct bnx2x_vf_bulletin),
+				      &sc->pf2vf_bulletin_mapping, "vf2pf_bull",
+				      RTE_CACHE_LINE_SIZE);
+		if (ret)
+			goto out;
 
 		sc->pf2vf_bulletin = (struct bnx2x_vf_bulletin *)
 					     sc->pf2vf_bulletin_mapping.vaddr;
@@ -613,10 +664,14 @@ bnx2x_common_dev_init(struct rte_eth_dev *eth_dev, int is_vf)
 		ret = bnx2x_vf_get_resources(sc, sc->max_tx_queues,
 					     sc->max_rx_queues);
 		if (ret)
-			return ret;
+			goto out;
 	}
 
 	return 0;
+
+out:
+	bnx2x_periodic_stop(eth_dev);
+	return ret;
 }
 
 static int
diff --git a/drivers/net/bnx2x/bnx2x_ethdev.h b/drivers/net/bnx2x/bnx2x_ethdev.h
index 967d6dc50..a53d437de 100644
--- a/drivers/net/bnx2x/bnx2x_ethdev.h
+++ b/drivers/net/bnx2x/bnx2x_ethdev.h
@@ -58,7 +58,6 @@
 #define wmb()   rte_wmb()
 #define rmb()   rte_rmb()
 
-
 #define MAX_QUEUES sysconf(_SC_NPROCESSORS_CONF)
 
 #define BNX2X_MIN_RX_BUF_SIZE 1024
@@ -72,6 +71,8 @@
 /* Maximum number of Rx packets to process at a time */
 #define BNX2X_RX_BUDGET 0xffffffff
 
+#define BNX2X_SP_TIMER_PERIOD US_PER_S /* 1 second */
+
 #endif
 
 /* MAC address operations */
-- 
2.11.0

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

* [dpdk-stable] patch 'net/dpaa2: remove loop for unused pool entries' has been queued to LTS release 17.11.4
  2018-08-13 20:42 [dpdk-stable] patch 'net/bnx2x: fix poll link status' has been queued to LTS release 17.11.4 Yongseok Koh
@ 2018-08-13 20:42 ` Yongseok Koh
  2018-08-13 20:42 ` [dpdk-stable] patch 'net/mlx5: fix secondary process resource leakage' " Yongseok Koh
                   ` (7 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: Yongseok Koh @ 2018-08-13 20:42 UTC (permalink / raw)
  To: Gavin Hu; +Cc: Honnappa Nagarahalli, Shreyansh Jain, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.4

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/15/18. So please
shout if anyone has objections.

Thanks.

Yongseok

---
>From 356b762b3157ef121b6f849373b1b45c10635098 Mon Sep 17 00:00:00 2001
From: Gavin Hu <gavin.hu@arm.com>
Date: Tue, 31 Jul 2018 15:51:37 +0800
Subject: [PATCH] net/dpaa2: remove loop for unused pool entries

[ upstream commit e94be227b7ea025d8fd0ee5d79052a8c31d432c6 ]

Currently only one buffer pool is configured and in use,
looping for up to maxmum 8 times is unnecessary and might
be buggy as assigned uninititalized values.

The fix is to loop for the configured times with initialize
with valid values.

Fixes: 16bbc98a3e ("bus/fslmc: update MC to 10.3.x")

Signed-off-by: Gavin Hu <gavin.hu@arm.com>
Reviewed-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
Acked-by: Shreyansh Jain <shreyansh.jain@nxp.com>
---
 drivers/net/dpaa2/mc/dpni.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/dpaa2/mc/dpni.c b/drivers/net/dpaa2/mc/dpni.c
index 6f671fe05..fe2cb52ed 100644
--- a/drivers/net/dpaa2/mc/dpni.c
+++ b/drivers/net/dpaa2/mc/dpni.c
@@ -231,7 +231,7 @@ int dpni_set_pools(struct fsl_mc_io *mc_io,
 					  token);
 	cmd_params = (struct dpni_cmd_set_pools *)cmd.params;
 	cmd_params->num_dpbp = cfg->num_dpbp;
-	for (i = 0; i < DPNI_MAX_DPBP; i++) {
+	for (i = 0; i < cmd_params->num_dpbp; i++) {
 		cmd_params->pool[i].dpbp_id =
 			cpu_to_le16(cfg->pools[i].dpbp_id);
 		cmd_params->pool[i].priority_mask =
-- 
2.11.0

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

* [dpdk-stable] patch 'net/mlx5: fix secondary process resource leakage' has been queued to LTS release 17.11.4
  2018-08-13 20:42 [dpdk-stable] patch 'net/bnx2x: fix poll link status' has been queued to LTS release 17.11.4 Yongseok Koh
  2018-08-13 20:42 ` [dpdk-stable] patch 'net/dpaa2: remove loop for unused pool entries' " Yongseok Koh
@ 2018-08-13 20:42 ` Yongseok Koh
  2018-08-13 20:42 ` [dpdk-stable] patch 'net/i40e: revert fix of flow director check' " Yongseok Koh
                   ` (6 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: Yongseok Koh @ 2018-08-13 20:42 UTC (permalink / raw)
  To: Ophir Munk; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.4

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/15/18. So please
shout if anyone has objections.

Thanks.

Yongseok

---
>From a546122e90627552c02ffd5967a9f1f98edeccaa Mon Sep 17 00:00:00 2001
From: Ophir Munk <ophirmu@mellanox.com>
Date: Tue, 31 Jul 2018 22:38:04 +0000
Subject: [PATCH] net/mlx5: fix secondary process resource leakage

[ upstream commit 09e0fd260e2e414134154b6e0e955c8424b51c0a ]

When running testpmd with an mlx5 device and then executing at testpmd
prompt in a raw: "port start all" followed by "port stop all"
a new file named /var/tmp/net_mlx5_<socket num> is created as a result
of creating a new unix domain socket (used for communication between
the primary and secondary processes).
When the new unix socket file is created the old unix socket file should
have been removed. This commit fixes it by closing the old unix socket
just before creating the new one in function mlx5_socket_init()

Fixes: f8b9a3bad467 ("net/mlx5: install a socket to exchange a file descriptor")

Signed-off-by: Ophir Munk <ophirmu@mellanox.com>
---
 drivers/net/mlx5/mlx5_socket.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/drivers/net/mlx5/mlx5_socket.c b/drivers/net/mlx5/mlx5_socket.c
index 7ab310007..97f90c072 100644
--- a/drivers/net/mlx5/mlx5_socket.c
+++ b/drivers/net/mlx5/mlx5_socket.c
@@ -62,6 +62,12 @@ mlx5_socket_init(struct rte_eth_dev *dev)
 	int flags;
 
 	/*
+	 * Close the last socket that was used to communicate
+	 * with the secondary process
+	 */
+	if (priv->primary_socket)
+		mlx5_socket_uninit(dev);
+	/*
 	 * Initialise the socket to communicate with the secondary
 	 * process.
 	 */
-- 
2.11.0

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

* [dpdk-stable] patch 'net/i40e: revert fix of flow director check' has been queued to LTS release 17.11.4
  2018-08-13 20:42 [dpdk-stable] patch 'net/bnx2x: fix poll link status' has been queued to LTS release 17.11.4 Yongseok Koh
  2018-08-13 20:42 ` [dpdk-stable] patch 'net/dpaa2: remove loop for unused pool entries' " Yongseok Koh
  2018-08-13 20:42 ` [dpdk-stable] patch 'net/mlx5: fix secondary process resource leakage' " Yongseok Koh
@ 2018-08-13 20:42 ` Yongseok Koh
  2018-08-13 20:42 ` [dpdk-stable] patch 'vhost: flush IOTLB cache on new mem table handling' " Yongseok Koh
                   ` (5 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: Yongseok Koh @ 2018-08-13 20:42 UTC (permalink / raw)
  To: Wei Zhao; +Cc: Qi Zhang, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.4

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/15/18. So please
shout if anyone has objections.

Thanks.

Yongseok

---
>From 1a28885450b094608c519b0581e55f3413cc7332 Mon Sep 17 00:00:00 2001
From: Wei Zhao <wei.zhao1@intel.com>
Date: Wed, 1 Aug 2018 10:54:50 +0800
Subject: [PATCH] net/i40e: revert fix of flow director check

[ upstream commit 21ecd2d7ab59060e3123261d1d62a53182029dd0 ]

This reverts commit 7546dc4a1331340ecb665af9af0a005bb8b657c8.

In i40e FDIR PMD code for checking programming status,
when the action of add FDIR filter is ok, i40e NIC will
not write back to programming status descriptor, so if
PMD code check DD is not done after period of time dealy,
it means the add or remove filter action is ok. It only write
back descriptor when fail. So, there is no issue for the original
code.

Fixes: 7546dc4a1331 ("net/i40e: fix check of flow director programming status")

Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
---
 drivers/net/i40e/i40e_fdir.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/net/i40e/i40e_fdir.c b/drivers/net/i40e/i40e_fdir.c
index ddf694366..6802995f4 100644
--- a/drivers/net/i40e/i40e_fdir.c
+++ b/drivers/net/i40e/i40e_fdir.c
@@ -1381,8 +1381,6 @@ i40e_check_fdir_programming_status(struct i40e_rx_queue *rxq)
 			I40E_PCI_REG_WRITE(rxq->qrx_tail, rxq->nb_rx_desc - 1);
 		else
 			I40E_PCI_REG_WRITE(rxq->qrx_tail, rxq->rx_tail - 1);
-	} else {
-		ret = -1;
 	}
 
 	return ret;
-- 
2.11.0

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

* [dpdk-stable] patch 'vhost: flush IOTLB cache on new mem table handling' has been queued to LTS release 17.11.4
  2018-08-13 20:42 [dpdk-stable] patch 'net/bnx2x: fix poll link status' has been queued to LTS release 17.11.4 Yongseok Koh
                   ` (2 preceding siblings ...)
  2018-08-13 20:42 ` [dpdk-stable] patch 'net/i40e: revert fix of flow director check' " Yongseok Koh
@ 2018-08-13 20:42 ` Yongseok Koh
  2018-08-13 20:42 ` [dpdk-stable] patch 'net/bonding: fix race condition' " Yongseok Koh
                   ` (4 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: Yongseok Koh @ 2018-08-13 20:42 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.4

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/15/18. So please
shout if anyone has objections.

Thanks.

Yongseok

---
>From bae2e496c2701404140ebd9e676d5c43295fabda Mon Sep 17 00:00:00 2001
From: Maxime Coquelin <maxime.coquelin@redhat.com>
Date: Thu, 2 Aug 2018 19:21:22 +0200
Subject: [PATCH] vhost: flush IOTLB cache on new mem table handling

[ upstream commit af53db486792f3d864c9a30dc13ee12402994640 ]

IOTLB entries contain the host virtual address of the guest
pages. When receiving a new VHOST_USER_SET_MEM_TABLE request,
the previous regions get unmapped, so the IOTLB entries, if any,
will be invalid. It does cause the vhost-user process to
segfault.

This patch introduces a new function to flush the IOTLB cache,
and call it as soon as the backend handles a VHOST_USER_SET_MEM
request.

Fixes: 69c90e98f483 ("vhost: enable IOMMU support")

Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Reviewed-by: Tiwei Bie <tiwei.bie@intel.com>
Reviewed-by: Jens Freimann <jfreimann@redhat.com>
---
 lib/librte_vhost/iotlb.c      | 10 ++++++++--
 lib/librte_vhost/iotlb.h      |  2 +-
 lib/librte_vhost/vhost_user.c |  5 +++++
 3 files changed, 14 insertions(+), 3 deletions(-)

diff --git a/lib/librte_vhost/iotlb.c b/lib/librte_vhost/iotlb.c
index c11ebcaac..c6354fef7 100644
--- a/lib/librte_vhost/iotlb.c
+++ b/lib/librte_vhost/iotlb.c
@@ -303,6 +303,13 @@ out:
 	return vva;
 }
 
+void
+vhost_user_iotlb_flush_all(struct vhost_virtqueue *vq)
+{
+	vhost_user_iotlb_cache_remove_all(vq);
+	vhost_user_iotlb_pending_remove_all(vq);
+}
+
 int
 vhost_user_iotlb_init(struct virtio_net *dev, int vq_index)
 {
@@ -315,8 +322,7 @@ vhost_user_iotlb_init(struct virtio_net *dev, int vq_index)
 		 * The cache has already been initialized,
 		 * just drop all cached and pending entries.
 		 */
-		vhost_user_iotlb_cache_remove_all(vq);
-		vhost_user_iotlb_pending_remove_all(vq);
+		vhost_user_iotlb_flush_all(vq);
 	}
 
 #ifdef RTE_LIBRTE_VHOST_NUMA
diff --git a/lib/librte_vhost/iotlb.h b/lib/librte_vhost/iotlb.h
index e7083e37b..60b9e4c57 100644
--- a/lib/librte_vhost/iotlb.h
+++ b/lib/librte_vhost/iotlb.h
@@ -73,7 +73,7 @@ void vhost_user_iotlb_pending_insert(struct vhost_virtqueue *vq, uint64_t iova,
 						uint8_t perm);
 void vhost_user_iotlb_pending_remove(struct vhost_virtqueue *vq, uint64_t iova,
 						uint64_t size, uint8_t perm);
-
+void vhost_user_iotlb_flush_all(struct vhost_virtqueue *vq);
 int vhost_user_iotlb_init(struct virtio_net *dev, int vq_index);
 
 #endif /* _VHOST_IOTLB_H_ */
diff --git a/lib/librte_vhost/vhost_user.c b/lib/librte_vhost/vhost_user.c
index c0efb3109..07c848c7c 100644
--- a/lib/librte_vhost/vhost_user.c
+++ b/lib/librte_vhost/vhost_user.c
@@ -650,6 +650,11 @@ vhost_user_set_mem_table(struct virtio_net *dev, struct VhostUserMsg *pmsg)
 		dev->mem = NULL;
 	}
 
+	/* Flush IOTLB cache as previous HVAs are now invalid */
+	if (dev->features & (1ULL << VIRTIO_F_IOMMU_PLATFORM))
+		for (i = 0; i < dev->nr_vring; i++)
+			vhost_user_iotlb_flush_all(dev->virtqueue[i]);
+
 	dev->nr_guest_pages = 0;
 	if (!dev->guest_pages) {
 		dev->max_guest_pages = 8;
-- 
2.11.0

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

* [dpdk-stable] patch 'net/bonding: fix race condition' has been queued to LTS release 17.11.4
  2018-08-13 20:42 [dpdk-stable] patch 'net/bnx2x: fix poll link status' has been queued to LTS release 17.11.4 Yongseok Koh
                   ` (3 preceding siblings ...)
  2018-08-13 20:42 ` [dpdk-stable] patch 'vhost: flush IOTLB cache on new mem table handling' " Yongseok Koh
@ 2018-08-13 20:42 ` Yongseok Koh
  2018-08-13 20:42 ` [dpdk-stable] patch 'event: fix ring init failure handling' " Yongseok Koh
                   ` (3 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: Yongseok Koh @ 2018-08-13 20:42 UTC (permalink / raw)
  To: Radu Nicolau; +Cc: Chas Williams, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.4

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/15/18. So please
shout if anyone has objections.

Thanks.

Yongseok

---
>From 49806dcbbaa2807e7883594b30b9b48f7a4ece3d Mon Sep 17 00:00:00 2001
From: Radu Nicolau <radu.nicolau@intel.com>
Date: Wed, 25 Jul 2018 10:39:40 +0100
Subject: [PATCH] net/bonding: fix race condition

[ upstream commit 5922ff069fb910946f97780754ad4b66b987d5b6 ]

Race condition can appear in the bond_mode_8023ad_periodic_cb()
callback when bonding port is stopped, reconfigured and restarted.

Re-ordered calls in bond_ethdev_start() to have callback alarm set
after slave ports are reconfigured.

Fixes: 2efb58cbab6e ("bond: new link bonding library")

Signed-off-by: Radu Nicolau <radu.nicolau@intel.com>
Acked-by: Chas Williams <chas3@att.com>
---
 drivers/net/bonding/rte_eth_bond_pmd.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/net/bonding/rte_eth_bond_pmd.c b/drivers/net/bonding/rte_eth_bond_pmd.c
index 98515bc39..8880231ea 100644
--- a/drivers/net/bonding/rte_eth_bond_pmd.c
+++ b/drivers/net/bonding/rte_eth_bond_pmd.c
@@ -1932,10 +1932,6 @@ bond_ethdev_start(struct rte_eth_dev *eth_dev)
 		}
 	}
 
-	/* Update all slave devices MACs*/
-	if (mac_address_slaves_update(eth_dev) != 0)
-		goto out_err;
-
 	/* If bonded device is configure in promiscuous mode then re-apply config */
 	if (internals->promiscuous_en)
 		bond_ethdev_promiscuous_enable(eth_dev);
@@ -1976,6 +1972,10 @@ bond_ethdev_start(struct rte_eth_dev *eth_dev)
 			(void *)&rte_eth_devices[internals->port_id]);
 	}
 
+	/* Update all slave devices MACs*/
+	if (mac_address_slaves_update(eth_dev) != 0)
+		goto out_err;
+
 	if (internals->user_defined_primary_port)
 		bond_ethdev_primary_set(internals, internals->primary_port);
 
-- 
2.11.0

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

* [dpdk-stable] patch 'event: fix ring init failure handling' has been queued to LTS release 17.11.4
  2018-08-13 20:42 [dpdk-stable] patch 'net/bnx2x: fix poll link status' has been queued to LTS release 17.11.4 Yongseok Koh
                   ` (4 preceding siblings ...)
  2018-08-13 20:42 ` [dpdk-stable] patch 'net/bonding: fix race condition' " Yongseok Koh
@ 2018-08-13 20:42 ` Yongseok Koh
  2018-08-13 20:42 ` [dpdk-stable] patch 'app/crypto-perf: fix auth IV offset' " Yongseok Koh
                   ` (2 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: Yongseok Koh @ 2018-08-13 20:42 UTC (permalink / raw)
  To: Harry van Haaren; +Cc: Jerin Jacob, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.4

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/15/18. So please
shout if anyone has objections.

Thanks.

Yongseok

---
>From 24e718ba4b191e5513d9d923cd3efc2a71485f9e Mon Sep 17 00:00:00 2001
From: Harry van Haaren <harry.van.haaren@intel.com>
Date: Thu, 2 Aug 2018 15:43:29 +0100
Subject: [PATCH] event: fix ring init failure handling

[ upstream commit 219ae4a12995e5a8ee5e184655a37dd4ee96bf25 ]

This commit fixes a bug in a 32-bit environment where the
generic ring_init() would fail, but given the interaction
with memzones the next iteration of the event_ring_autotest
would actually *pass* because the ring in question would
exist already an be looked-up.

This commit rightly error checks the result of ring_init(),
and calls rte_free() on the memory as required.

Fixes: dc39e2f359b5 ("eventdev: add ring structure for events")

Signed-off-by: Harry van Haaren <harry.van.haaren@intel.com>
Acked-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
---
 lib/librte_eventdev/rte_event_ring.c | 15 ++++++++++-----
 1 file changed, 10 insertions(+), 5 deletions(-)

diff --git a/lib/librte_eventdev/rte_event_ring.c b/lib/librte_eventdev/rte_event_ring.c
index b14c2127f..c0603cb99 100644
--- a/lib/librte_eventdev/rte_event_ring.c
+++ b/lib/librte_eventdev/rte_event_ring.c
@@ -110,11 +110,16 @@ rte_event_ring_create(const char *name, unsigned int count, int socket_id,
 	mz = rte_memzone_reserve(mz_name, ring_size, socket_id, mz_flags);
 	if (mz != NULL) {
 		r = mz->addr;
-		/*
-		 * no need to check return value here, we already checked the
-		 * arguments above
-		 */
-		rte_event_ring_init(r, name, requested_count, flags);
+		/* Check return value in case rte_ring_init() fails on size */
+		int err = rte_event_ring_init(r, name, requested_count, flags);
+		if (err) {
+			RTE_LOG(ERR, RING, "Ring init failed\n");
+			if (rte_memzone_free(mz) != 0)
+				RTE_LOG(ERR, RING, "Cannot free memzone\n");
+			rte_free(te);
+			rte_rwlock_write_unlock(RTE_EAL_TAILQ_RWLOCK);
+			return NULL;
+		}
 
 		te->data = (void *) r;
 		r->r.memzone = mz;
-- 
2.11.0

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

* [dpdk-stable] patch 'app/crypto-perf: fix auth IV offset' has been queued to LTS release 17.11.4
  2018-08-13 20:42 [dpdk-stable] patch 'net/bnx2x: fix poll link status' has been queued to LTS release 17.11.4 Yongseok Koh
                   ` (5 preceding siblings ...)
  2018-08-13 20:42 ` [dpdk-stable] patch 'event: fix ring init failure handling' " Yongseok Koh
@ 2018-08-13 20:42 ` Yongseok Koh
  2018-08-13 20:42 ` [dpdk-stable] patch 'eal: fix bitmap documentation' " Yongseok Koh
  2018-08-13 20:42 ` [dpdk-stable] patch 'examples/flow_filtering: add flow director config for i40e' " Yongseok Koh
  8 siblings, 0 replies; 10+ messages in thread
From: Yongseok Koh @ 2018-08-13 20:42 UTC (permalink / raw)
  To: Pablo de Lara; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.4

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/15/18. So please
shout if anyone has objections.

Thanks.

Yongseok

---
>From d89f41e094fdbc5af2dcf2d7aa870b23f9491c56 Mon Sep 17 00:00:00 2001
From: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Date: Thu, 2 Aug 2018 09:44:39 +0100
Subject: [PATCH] app/crypto-perf: fix auth IV offset

[ upstream commit 7925c6be2a738051bb2fc2b4be4be9a5a5c412a1 ]

Auth IV offset was not being set when creating the crypto session.

Fixes: acf8616901b5 ("cryptodev: add auth IV")

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
---
 app/test-crypto-perf/cperf_ops.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/app/test-crypto-perf/cperf_ops.c b/app/test-crypto-perf/cperf_ops.c
index 23d30ca39..0fa1c4121 100644
--- a/app/test-crypto-perf/cperf_ops.c
+++ b/app/test-crypto-perf/cperf_ops.c
@@ -507,6 +507,7 @@ cperf_create_session(struct rte_mempool *sess_mp,
 		auth_xform.next = NULL;
 		auth_xform.auth.algo = options->auth_algo;
 		auth_xform.auth.op = options->auth_op;
+		auth_xform.auth.iv.offset = iv_offset;
 
 		/* auth different than null */
 		if (options->auth_algo != RTE_CRYPTO_AUTH_NULL) {
@@ -561,6 +562,8 @@ cperf_create_session(struct rte_mempool *sess_mp,
 		auth_xform.next = NULL;
 		auth_xform.auth.algo = options->auth_algo;
 		auth_xform.auth.op = options->auth_op;
+		auth_xform.auth.iv.offset = iv_offset +
+			cipher_xform.cipher.iv.length;
 
 		/* auth different than null */
 		if (options->auth_algo != RTE_CRYPTO_AUTH_NULL) {
-- 
2.11.0

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

* [dpdk-stable] patch 'eal: fix bitmap documentation' has been queued to LTS release 17.11.4
  2018-08-13 20:42 [dpdk-stable] patch 'net/bnx2x: fix poll link status' has been queued to LTS release 17.11.4 Yongseok Koh
                   ` (6 preceding siblings ...)
  2018-08-13 20:42 ` [dpdk-stable] patch 'app/crypto-perf: fix auth IV offset' " Yongseok Koh
@ 2018-08-13 20:42 ` Yongseok Koh
  2018-08-13 20:42 ` [dpdk-stable] patch 'examples/flow_filtering: add flow director config for i40e' " Yongseok Koh
  8 siblings, 0 replies; 10+ messages in thread
From: Yongseok Koh @ 2018-08-13 20:42 UTC (permalink / raw)
  To: Jerin Jacob; +Cc: Cristian Dumitrescu, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.4

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/15/18. So please
shout if anyone has objections.

Thanks.

Yongseok

---
>From 22d9bf3be5ed40f0c74c06323b3873d9137b6050 Mon Sep 17 00:00:00 2001
From: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Date: Tue, 17 Jul 2018 22:44:17 +0530
Subject: [PATCH] eal: fix bitmap documentation

[ upstream commit ebaa25f0700e95063d783911d30c476a1c86d336 ]

n_bits comes as first argument, align doxygen comment.

n_bit need to not be multiple of 512 as n_bits
are rounding to RTE_BITMAP_CL_BIT_SIZE.

Fixes: 14456f59e9f7 ("doc: fix doxygen warnings in QoS API")
Fixes: de3cfa2c9823 ("sched: initial import")

Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
---
 lib/librte_eal/common/include/rte_bitmap.h | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/lib/librte_eal/common/include/rte_bitmap.h b/lib/librte_eal/common/include/rte_bitmap.h
index b9067e67f..13bfd9cbe 100644
--- a/lib/librte_eal/common/include/rte_bitmap.h
+++ b/lib/librte_eal/common/include/rte_bitmap.h
@@ -227,12 +227,12 @@ rte_bitmap_get_memory_footprint(uint32_t n_bits) {
 /**
  * Bitmap initialization
  *
- * @param mem_size
- *   Minimum expected size of bitmap.
+ * @param n_bits
+ *   Number of pre-allocated bits in array2.
  * @param mem
  *   Base address of array1 and array2.
- * @param n_bits
- *   Number of pre-allocated bits in array2. Must be non-zero and multiple of 512.
+ * @param mem_size
+ *   Minimum expected size of bitmap.
  * @return
  *   Handle to bitmap instance.
  */
-- 
2.11.0

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

* [dpdk-stable] patch 'examples/flow_filtering: add flow director config for i40e' has been queued to LTS release 17.11.4
  2018-08-13 20:42 [dpdk-stable] patch 'net/bnx2x: fix poll link status' has been queued to LTS release 17.11.4 Yongseok Koh
                   ` (7 preceding siblings ...)
  2018-08-13 20:42 ` [dpdk-stable] patch 'eal: fix bitmap documentation' " Yongseok Koh
@ 2018-08-13 20:42 ` Yongseok Koh
  8 siblings, 0 replies; 10+ messages in thread
From: Yongseok Koh @ 2018-08-13 20:42 UTC (permalink / raw)
  To: Rosen Xu; +Cc: Ori Kam, Ferruh Yigit, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.4

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/15/18. So please
shout if anyone has objections.

Thanks.

Yongseok

---
>From 0ee4a14adb76cdf1f65f39589958205bb13f567b Mon Sep 17 00:00:00 2001
From: Rosen Xu <rosen.xu@intel.com>
Date: Tue, 31 Jul 2018 20:52:40 +0800
Subject: [PATCH] examples/flow_filtering: add flow director config for i40e

[ upstream commit 9a93446a0e8c7e95504ff0bfd26d139a8c1ef320 ]

Rte_fdir_conf of rte_eth_conf should be initialized before
port initialization. It is a workaround solution when working
with Intel I40e.

Fixes: 4a3ef59a10c8 ("examples/flow_filtering: add simple demo of flow API")

Signed-off-by: Rosen Xu <rosen.xu@intel.com>
Acked-by: Ori Kam <orika@mellanox.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
 examples/flow_filtering/main.c | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

diff --git a/examples/flow_filtering/main.c b/examples/flow_filtering/main.c
index 7d739b4ae..fe512dae2 100644
--- a/examples/flow_filtering/main.c
+++ b/examples/flow_filtering/main.c
@@ -149,6 +149,22 @@ init_port(void)
 			/**< CRC stripped by hardware */
 			.hw_strip_crc   = 1,
 		},
+		/*
+		 * Initialize fdir_conf of rte_eth_conf.
+		 * Fdir is used in flow filtering for I40e,
+		 * so rte_flow rules involve some fdir
+		 * configurations. In long term it's better
+		 * that drivers don't require any fdir
+		 * configuration for rte_flow, but we need to
+		 * get this workaround so that sample app can
+		 * run on I40e.
+		 */
+		.fdir_conf = {
+			.mode = RTE_FDIR_MODE_PERFECT,
+			.pballoc = RTE_FDIR_PBALLOC_64K,
+			.status = RTE_FDIR_REPORT_STATUS,
+			.drop_queue = 127,
+		},
 	};
 
 	printf(":: initializing port: %d\n", port_id);
-- 
2.11.0

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

end of thread, other threads:[~2018-08-13 20:42 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-08-13 20:42 [dpdk-stable] patch 'net/bnx2x: fix poll link status' has been queued to LTS release 17.11.4 Yongseok Koh
2018-08-13 20:42 ` [dpdk-stable] patch 'net/dpaa2: remove loop for unused pool entries' " Yongseok Koh
2018-08-13 20:42 ` [dpdk-stable] patch 'net/mlx5: fix secondary process resource leakage' " Yongseok Koh
2018-08-13 20:42 ` [dpdk-stable] patch 'net/i40e: revert fix of flow director check' " Yongseok Koh
2018-08-13 20:42 ` [dpdk-stable] patch 'vhost: flush IOTLB cache on new mem table handling' " Yongseok Koh
2018-08-13 20:42 ` [dpdk-stable] patch 'net/bonding: fix race condition' " Yongseok Koh
2018-08-13 20:42 ` [dpdk-stable] patch 'event: fix ring init failure handling' " Yongseok Koh
2018-08-13 20:42 ` [dpdk-stable] patch 'app/crypto-perf: fix auth IV offset' " Yongseok Koh
2018-08-13 20:42 ` [dpdk-stable] patch 'eal: fix bitmap documentation' " Yongseok Koh
2018-08-13 20:42 ` [dpdk-stable] patch 'examples/flow_filtering: add flow director config for i40e' " 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).