patches for DPDK stable branches
 help / color / mirror / Atom feed
* [dpdk-stable] patch 'net/virtio-user: do not close tap when disabling queue pairs' has been queued to LTS release 18.11.7
@ 2020-02-14 17:02 Kevin Traynor
  2020-02-14 17:02 ` [dpdk-stable] patch 'net/virtio-user: check tap offload setting failure' " Kevin Traynor
                   ` (41 more replies)
  0 siblings, 42 replies; 43+ messages in thread
From: Kevin Traynor @ 2020-02-14 17:02 UTC (permalink / raw)
  To: Tiwei Bie; +Cc: Stephen Hemminger, Maxime Coquelin, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.7

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable-queue

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable-queue/commit/ebf749a4653c63d3f963139f509c1c9997ab7239

Thanks.

Kevin.

---
From ebf749a4653c63d3f963139f509c1c9997ab7239 Mon Sep 17 00:00:00 2001
From: Tiwei Bie <tiwei.bie@intel.com>
Date: Mon, 25 Nov 2019 16:14:40 +0800
Subject: [PATCH] net/virtio-user: do not close tap when disabling queue pairs

[ upstream commit 47ac9661b68275321fae0876cce743b9d17671fe ]

Do not close the tap fds when disabling queue pairs, instead,
we just need to unbind the backend. Otherwise, tap port can be
destroyed unexpectedly.

Fixes: e3b434818bbb ("net/virtio-user: support kernel vhost")

Reported-by: Stephen Hemminger <stephen@networkplumber.org>
Signed-off-by: Tiwei Bie <tiwei.bie@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
---
 drivers/net/virtio/virtio_user/vhost_kernel.c | 34 +++++++++++++++----
 .../net/virtio/virtio_user/vhost_kernel_tap.c | 34 ++++++++++++-------
 .../net/virtio/virtio_user/vhost_kernel_tap.h |  8 +++++
 drivers/net/virtio/virtio_user/vhost_user.c   |  4 +++
 .../net/virtio/virtio_user/virtio_user_dev.c  |  5 ++-
 .../net/virtio/virtio_user/virtio_user_dev.h  |  1 +
 6 files changed, 65 insertions(+), 21 deletions(-)

diff --git a/drivers/net/virtio/virtio_user/vhost_kernel.c b/drivers/net/virtio/virtio_user/vhost_kernel.c
index 6b19180d72..23972493ff 100644
--- a/drivers/net/virtio/virtio_user/vhost_kernel.c
+++ b/drivers/net/virtio/virtio_user/vhost_kernel.c
@@ -332,14 +332,32 @@ vhost_kernel_enable_queue_pair(struct virtio_user_dev *dev,
 	vhostfd = dev->vhostfds[pair_idx];
 
+	if (dev->qp_enabled[pair_idx] == enable)
+		return 0;
+
 	if (!enable) {
-		if (dev->tapfds[pair_idx] >= 0) {
-			close(dev->tapfds[pair_idx]);
-			dev->tapfds[pair_idx] = -1;
+		tapfd = dev->tapfds[pair_idx];
+		if (vhost_kernel_set_backend(vhostfd, -1) < 0) {
+			PMD_DRV_LOG(ERR, "fail to set backend for vhost kernel");
+			return -1;
 		}
-		return vhost_kernel_set_backend(vhostfd, -1);
-	} else if (dev->tapfds[pair_idx] >= 0) {
+		if (req_mq && vhost_kernel_tap_set_queue(tapfd, false) < 0) {
+			PMD_DRV_LOG(ERR, "fail to disable tap for vhost kernel");
+			return -1;
+		}
+		dev->qp_enabled[pair_idx] = false;
 		return 0;
 	}
 
+	if (dev->tapfds[pair_idx] >= 0) {
+		tapfd = dev->tapfds[pair_idx];
+		if (vhost_kernel_tap_set_offload(tapfd, dev->features) == -1)
+			return -1;
+		if (req_mq && vhost_kernel_tap_set_queue(tapfd, true) < 0) {
+			PMD_DRV_LOG(ERR, "fail to enable tap for vhost kernel");
+			return -1;
+		}
+		goto set_backend;
+	}
+
 	if ((dev->features & (1ULL << VIRTIO_NET_F_MRG_RXBUF)) ||
 	    (dev->features & (1ULL << VIRTIO_F_VERSION_1)))
@@ -355,11 +373,13 @@ vhost_kernel_enable_queue_pair(struct virtio_user_dev *dev,
 	}
 
+	dev->tapfds[pair_idx] = tapfd;
+
+set_backend:
 	if (vhost_kernel_set_backend(vhostfd, tapfd) < 0) {
 		PMD_DRV_LOG(ERR, "fail to set backend for vhost kernel");
-		close(tapfd);
 		return -1;
 	}
 
-	dev->tapfds[pair_idx] = tapfd;
+	dev->qp_enabled[pair_idx] = true;
 	return 0;
 }
diff --git a/drivers/net/virtio/virtio_user/vhost_kernel_tap.c b/drivers/net/virtio/virtio_user/vhost_kernel_tap.c
index fbd9e979d7..361011ce65 100644
--- a/drivers/net/virtio/virtio_user/vhost_kernel_tap.c
+++ b/drivers/net/virtio/virtio_user/vhost_kernel_tap.c
@@ -19,5 +19,5 @@
 #include "../virtio_pci.h"
 
-static int
+int
 vhost_kernel_tap_set_offload(int fd, uint64_t features)
 {
@@ -38,18 +38,16 @@ vhost_kernel_tap_set_offload(int fd, uint64_t features)
 	}
 
-	if (offload != 0) {
-		/* Check if our kernel supports TUNSETOFFLOAD */
-		if (ioctl(fd, TUNSETOFFLOAD, 0) != 0 && errno == EINVAL) {
-			PMD_DRV_LOG(ERR, "Kernel does't support TUNSETOFFLOAD\n");
-			return -ENOTSUP;
-		}
+	/* Check if our kernel supports TUNSETOFFLOAD */
+	if (ioctl(fd, TUNSETOFFLOAD, 0) != 0 && errno == EINVAL) {
+		PMD_DRV_LOG(ERR, "Kernel does't support TUNSETOFFLOAD\n");
+		return -ENOTSUP;
+	}
 
+	if (ioctl(fd, TUNSETOFFLOAD, offload) != 0) {
+		offload &= ~TUN_F_UFO;
 		if (ioctl(fd, TUNSETOFFLOAD, offload) != 0) {
-			offload &= ~TUN_F_UFO;
-			if (ioctl(fd, TUNSETOFFLOAD, offload) != 0) {
-				PMD_DRV_LOG(ERR, "TUNSETOFFLOAD ioctl() failed: %s\n",
-					strerror(errno));
-				return -1;
-			}
+			PMD_DRV_LOG(ERR, "TUNSETOFFLOAD ioctl() failed: %s\n",
+				strerror(errno));
+			return -1;
 		}
 	}
@@ -58,4 +56,14 @@ vhost_kernel_tap_set_offload(int fd, uint64_t features)
 }
 
+int
+vhost_kernel_tap_set_queue(int fd, bool attach)
+{
+	struct ifreq ifr = {
+		.ifr_flags = attach ? IFF_ATTACH_QUEUE : IFF_DETACH_QUEUE,
+	};
+
+	return ioctl(fd, TUNSETQUEUE, &ifr);
+}
+
 int
 vhost_kernel_open_tap(char **p_ifname, int hdr_size, int req_mq,
diff --git a/drivers/net/virtio/virtio_user/vhost_kernel_tap.h b/drivers/net/virtio/virtio_user/vhost_kernel_tap.h
index e0e95b4f59..5c4447b296 100644
--- a/drivers/net/virtio/virtio_user/vhost_kernel_tap.h
+++ b/drivers/net/virtio/virtio_user/vhost_kernel_tap.h
@@ -3,4 +3,8 @@
  */
 
+#ifndef _VHOST_KERNEL_TAP_H
+#define _VHOST_KERNEL_TAP_H
+
+#include <stdbool.h>
 #include <sys/ioctl.h>
 
@@ -38,2 +42,6 @@
 int vhost_kernel_open_tap(char **p_ifname, int hdr_size, int req_mq,
 			 const char *mac, uint64_t features);
+int vhost_kernel_tap_set_offload(int fd, uint64_t features);
+int vhost_kernel_tap_set_queue(int fd, bool attach);
+
+#endif
diff --git a/drivers/net/virtio/virtio_user/vhost_user.c b/drivers/net/virtio/virtio_user/vhost_user.c
index 0a88d5957e..a42cf480af 100644
--- a/drivers/net/virtio/virtio_user/vhost_user.c
+++ b/drivers/net/virtio/virtio_user/vhost_user.c
@@ -457,4 +457,7 @@ vhost_user_enable_queue_pair(struct virtio_user_dev *dev,
 	int i;
 
+	if (dev->qp_enabled[pair_idx] == enable)
+		return 0;
+
 	for (i = 0; i < 2; ++i) {
 		struct vhost_vring_state state = {
@@ -467,4 +470,5 @@ vhost_user_enable_queue_pair(struct virtio_user_dev *dev,
 	}
 
+	dev->qp_enabled[pair_idx] = enable;
 	return 0;
 }
diff --git a/drivers/net/virtio/virtio_user/virtio_user_dev.c b/drivers/net/virtio/virtio_user/virtio_user_dev.c
index f6356eabc6..a199350df9 100644
--- a/drivers/net/virtio/virtio_user/virtio_user_dev.c
+++ b/drivers/net/virtio/virtio_user/virtio_user_dev.c
@@ -534,6 +534,9 @@ virtio_user_dev_uninit(struct virtio_user_dev *dev)
 
 	if (dev->vhostfds) {
-		for (i = 0; i < dev->max_queue_pairs; ++i)
+		for (i = 0; i < dev->max_queue_pairs; ++i) {
 			close(dev->vhostfds[i]);
+			if (dev->tapfds[i] >= 0)
+				close(dev->tapfds[i]);
+		}
 		free(dev->vhostfds);
 		free(dev->tapfds);
diff --git a/drivers/net/virtio/virtio_user/virtio_user_dev.h b/drivers/net/virtio/virtio_user/virtio_user_dev.h
index 3e3a7b787f..d8a5070a28 100644
--- a/drivers/net/virtio/virtio_user/virtio_user_dev.h
+++ b/drivers/net/virtio/virtio_user/virtio_user_dev.h
@@ -41,4 +41,5 @@ struct virtio_user_dev {
 	char		path[PATH_MAX];
 	struct vring	vrings[VIRTIO_MAX_VIRTQUEUES];
+	bool		qp_enabled[VIRTIO_MAX_VIRTQUEUE_PAIRS];
 	struct virtio_user_backend_ops *ops;
 	pthread_mutex_t	mutex;
-- 
2.21.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-02-14 17:02:37.108535157 +0000
+++ 0001-net-virtio-user-do-not-close-tap-when-disabling-queu.patch	2020-02-14 17:02:36.907408856 +0000
@@ -1 +1 @@
-From 47ac9661b68275321fae0876cce743b9d17671fe Mon Sep 17 00:00:00 2001
+From ebf749a4653c63d3f963139f509c1c9997ab7239 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 47ac9661b68275321fae0876cce743b9d17671fe ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -26 +27 @@
-index 5c81e8dd9f..2c805077af 100644
+index 6b19180d72..23972493ff 100644
@@ -29 +30 @@
-@@ -331,14 +331,32 @@ vhost_kernel_enable_queue_pair(struct virtio_user_dev *dev,
+@@ -332,14 +332,32 @@ vhost_kernel_enable_queue_pair(struct virtio_user_dev *dev,
@@ -67 +68 @@
-@@ -354,11 +372,13 @@ vhost_kernel_enable_queue_pair(struct virtio_user_dev *dev,
+@@ -355,11 +373,13 @@ vhost_kernel_enable_queue_pair(struct virtio_user_dev *dev,
@@ -84 +85 @@
-index 76bf75423e..2fbfecba12 100644
+index fbd9e979d7..361011ce65 100644
@@ -159 +160 @@
-index a4b5c25cd3..d8e083ba8b 100644
+index 0a88d5957e..a42cf480af 100644
@@ -177 +178 @@
-index ffbaa75b7e..1c6b26f8d3 100644
+index f6356eabc6..a199350df9 100644
@@ -180 +181 @@
-@@ -547,6 +547,9 @@ virtio_user_dev_uninit(struct virtio_user_dev *dev)
+@@ -534,6 +534,9 @@ virtio_user_dev_uninit(struct virtio_user_dev *dev)
@@ -192 +193 @@
-index ad86837717..3b6b6065a5 100644
+index 3e3a7b787f..d8a5070a28 100644
@@ -195,3 +196,3 @@
-@@ -50,4 +50,5 @@ struct virtio_user_dev {
- 	};
- 	struct virtio_user_queue packed_queues[VIRTIO_MAX_VIRTQUEUES];
+@@ -41,4 +41,5 @@ struct virtio_user_dev {
+ 	char		path[PATH_MAX];
+ 	struct vring	vrings[VIRTIO_MAX_VIRTQUEUES];
@@ -199 +199,0 @@
- 
@@ -200,0 +201 @@
+ 	pthread_mutex_t	mutex;


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

* [dpdk-stable] patch 'net/virtio-user: check tap offload setting failure' has been queued to LTS release 18.11.7
  2020-02-14 17:02 [dpdk-stable] patch 'net/virtio-user: do not close tap when disabling queue pairs' has been queued to LTS release 18.11.7 Kevin Traynor
@ 2020-02-14 17:02 ` Kevin Traynor
  2020-02-14 17:02 ` [dpdk-stable] patch 'vhost: fix deadlock on port deletion' " Kevin Traynor
                   ` (40 subsequent siblings)
  41 siblings, 0 replies; 43+ messages in thread
From: Kevin Traynor @ 2020-02-14 17:02 UTC (permalink / raw)
  To: Yunjian Wang; +Cc: Tiwei Bie, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.7

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable-queue

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable-queue/commit/c5a07f62ca929e0b439fe6430a5bb84bfca11fae

Thanks.

Kevin.

---
From c5a07f62ca929e0b439fe6430a5bb84bfca11fae Mon Sep 17 00:00:00 2001
From: Yunjian Wang <wangyunjian@huawei.com>
Date: Mon, 13 Jan 2020 15:40:31 +0800
Subject: [PATCH] net/virtio-user: check tap offload setting failure

[ upstream commit 1ad2f882b34a644d4dc91b366f38a73a1b4f4cf5 ]

The function vhost_kernel_tap_set_offload() could return errors,
the return value need to be checked. And there is no need to fail
when error is -ENOTSUP.

Fixes: 1db4d2330bc8 ("net/virtio-user: check negotiated features before set")

Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>
Reviewed-by: Tiwei Bie <tiwei.bie@intel.com>
---
 drivers/net/virtio/virtio_user/vhost_kernel_tap.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/drivers/net/virtio/virtio_user/vhost_kernel_tap.c b/drivers/net/virtio/virtio_user/vhost_kernel_tap.c
index 361011ce65..e95cd9da4c 100644
--- a/drivers/net/virtio/virtio_user/vhost_kernel_tap.c
+++ b/drivers/net/virtio/virtio_user/vhost_kernel_tap.c
@@ -75,4 +75,5 @@ vhost_kernel_open_tap(char **p_ifname, int hdr_size, int req_mq,
 	struct ifreq ifr;
 	int tapfd;
+	int ret;
 
 	/* TODO:
@@ -140,5 +141,7 @@ vhost_kernel_open_tap(char **p_ifname, int hdr_size, int req_mq,
 	}
 
-	vhost_kernel_tap_set_offload(tapfd, features);
+	ret = vhost_kernel_tap_set_offload(tapfd, features);
+	if (ret < 0 && ret != -ENOTSUP)
+		goto error;
 
 	memset(&ifr, 0, sizeof(ifr));
-- 
2.21.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-02-14 17:02:37.168786936 +0000
+++ 0002-net-virtio-user-check-tap-offload-setting-failure.patch	2020-02-14 17:02:36.908408835 +0000
@@ -1 +1 @@
-From 1ad2f882b34a644d4dc91b366f38a73a1b4f4cf5 Mon Sep 17 00:00:00 2001
+From c5a07f62ca929e0b439fe6430a5bb84bfca11fae Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 1ad2f882b34a644d4dc91b366f38a73a1b4f4cf5 ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -20 +21 @@
-index 2fbfecba12..2fa4f0d661 100644
+index 361011ce65..e95cd9da4c 100644


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

* [dpdk-stable] patch 'vhost: fix deadlock on port deletion' has been queued to LTS release 18.11.7
  2020-02-14 17:02 [dpdk-stable] patch 'net/virtio-user: do not close tap when disabling queue pairs' has been queued to LTS release 18.11.7 Kevin Traynor
  2020-02-14 17:02 ` [dpdk-stable] patch 'net/virtio-user: check tap offload setting failure' " Kevin Traynor
@ 2020-02-14 17:02 ` Kevin Traynor
  2020-02-14 17:02 ` [dpdk-stable] patch 'net/ixgbe: remove duplicate function declaration' " Kevin Traynor
                   ` (39 subsequent siblings)
  41 siblings, 0 replies; 43+ messages in thread
From: Kevin Traynor @ 2020-02-14 17:02 UTC (permalink / raw)
  To: Maxime Coquelin; +Cc: Tiwei Bie, Eelco Chaudron, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.7

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable-queue

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable-queue/commit/c21000078301fe353500546d53ef6d53bc1c5c05

Thanks.

Kevin.

---
From c21000078301fe353500546d53ef6d53bc1c5c05 Mon Sep 17 00:00:00 2001
From: Maxime Coquelin <maxime.coquelin@redhat.com>
Date: Tue, 14 Jan 2020 19:53:57 +0100
Subject: [PATCH] vhost: fix deadlock on port deletion

[ upstream commit 5efb18e85f7fdb436d3e56591656051c16802066 ]

If the vhost-user application (e.g. OVS) deletes the vhost-user
port while Qemu sends a vhost-user request, a deadlock can
happen if the request handler tries to acquire vhost-user's
global mutex, which is also locked by the vhost-user port
deletion API (rte_vhost_driver_unregister).

This patch prevents the deadlock by making
rte_vhost_driver_unregister() to release the mutex and try
again if a request is being handled to give a chance to
the request handler to complete.

Fixes: 8b4b949144b8 ("vhost: fix dead lock on closing in server mode")
Fixes: 5fbb3941da9f ("vhost: introduce driver features related APIs")

Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Reviewed-by: Tiwei Bie <tiwei.bie@intel.com>
Acked-by: Eelco Chaudron <echaudro@redhat.com>
---
 lib/librte_vhost/socket.c | 20 +++++++++++++++-----
 1 file changed, 15 insertions(+), 5 deletions(-)

diff --git a/lib/librte_vhost/socket.c b/lib/librte_vhost/socket.c
index 27bfd21fc4..ea2fdb5529 100644
--- a/lib/librte_vhost/socket.c
+++ b/lib/librte_vhost/socket.c
@@ -999,7 +999,8 @@ again:
 
 				/*
-				 * If r/wcb is executing, release the
-				 * conn_mutex lock, and try again since
-				 * the r/wcb may use the conn_mutex lock.
+				 * If r/wcb is executing, release vsocket's
+				 * conn_mutex and vhost_user's mutex locks, and
+				 * try again since the r/wcb may use the
+				 * conn_mutex and mutex locks.
 				 */
 				if (fdset_try_del(&vhost_user.fdset,
@@ -1022,6 +1023,15 @@ again:
 
 			if (vsocket->is_server) {
-				fdset_del(&vhost_user.fdset,
-						vsocket->socket_fd);
+				/*
+				 * If r/wcb is executing, release vhost_user's
+				 * mutex lock, and try again since the r/wcb
+				 * may use the mutex lock.
+				 */
+				if (fdset_try_del(&vhost_user.fdset,
+						vsocket->socket_fd) == -1) {
+					pthread_mutex_unlock(&vhost_user.mutex);
+					goto again;
+				}
+
 				close(vsocket->socket_fd);
 				unlink(path);
-- 
2.21.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-02-14 17:02:37.224255194 +0000
+++ 0003-vhost-fix-deadlock-on-port-deletion.patch	2020-02-14 17:02:36.909408814 +0000
@@ -1 +1 @@
-From 5efb18e85f7fdb436d3e56591656051c16802066 Mon Sep 17 00:00:00 2001
+From c21000078301fe353500546d53ef6d53bc1c5c05 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 5efb18e85f7fdb436d3e56591656051c16802066 ]
+
@@ -19 +20,0 @@
-Cc: stable@dpdk.org
@@ -29 +30 @@
-index 8bc1e3a03c..9740fb3403 100644
+index 27bfd21fc4..ea2fdb5529 100644
@@ -32 +33 @@
-@@ -1053,7 +1053,8 @@ again:
+@@ -999,7 +999,8 @@ again:
@@ -44 +45 @@
-@@ -1076,6 +1077,15 @@ again:
+@@ -1022,6 +1023,15 @@ again:


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

* [dpdk-stable] patch 'net/ixgbe: remove duplicate function declaration' has been queued to LTS release 18.11.7
  2020-02-14 17:02 [dpdk-stable] patch 'net/virtio-user: do not close tap when disabling queue pairs' has been queued to LTS release 18.11.7 Kevin Traynor
  2020-02-14 17:02 ` [dpdk-stable] patch 'net/virtio-user: check tap offload setting failure' " Kevin Traynor
  2020-02-14 17:02 ` [dpdk-stable] patch 'vhost: fix deadlock on port deletion' " Kevin Traynor
@ 2020-02-14 17:02 ` Kevin Traynor
  2020-02-14 17:02 ` [dpdk-stable] patch 'net/dpaa: fix Rx offload flags on jumbo MTU set' " Kevin Traynor
                   ` (38 subsequent siblings)
  41 siblings, 0 replies; 43+ messages in thread
From: Kevin Traynor @ 2020-02-14 17:02 UTC (permalink / raw)
  To: Reshma Pattan; +Cc: Xiaolong Ye, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.7

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable-queue

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable-queue/commit/742d8d9ce2c058d8898dac7ddd2a2d5b330efc98

Thanks.

Kevin.

---
From 742d8d9ce2c058d8898dac7ddd2a2d5b330efc98 Mon Sep 17 00:00:00 2001
From: Reshma Pattan <reshma.pattan@intel.com>
Date: Tue, 14 Jan 2020 11:29:43 +0000
Subject: [PATCH] net/ixgbe: remove duplicate function declaration

[ upstream commit 1438472e6ec3bb411bc44f17147a2f0d4d0238de ]

Remove duplicate declarations of ixgbe_xmit_fixed_burst_vec
from ixgbe_rxtx.c

Fixes: 646412f9ff62 ("net/ixgbe: remove limit of Tx burst size")

Signed-off-by: Reshma Pattan <reshma.pattan@intel.com>
Acked-by: Xiaolong Ye <xiaolong.ye@intel.com>
---
 drivers/net/ixgbe/ixgbe_rxtx.c | 5 -----
 1 file changed, 5 deletions(-)

diff --git a/drivers/net/ixgbe/ixgbe_rxtx.c b/drivers/net/ixgbe/ixgbe_rxtx.c
index 94bec21831..7f98db15a4 100644
--- a/drivers/net/ixgbe/ixgbe_rxtx.c
+++ b/drivers/net/ixgbe/ixgbe_rxtx.c
@@ -88,9 +88,4 @@
 #endif
 
-#ifdef RTE_IXGBE_INC_VECTOR
-uint16_t ixgbe_xmit_fixed_burst_vec(void *tx_queue, struct rte_mbuf **tx_pkts,
-				    uint16_t nb_pkts);
-#endif
-
 /*********************************************************************
  *
-- 
2.21.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-02-14 17:02:37.277479635 +0000
+++ 0004-net-ixgbe-remove-duplicate-function-declaration.patch	2020-02-14 17:02:36.919408606 +0000
@@ -1 +1 @@
-From 1438472e6ec3bb411bc44f17147a2f0d4d0238de Mon Sep 17 00:00:00 2001
+From 742d8d9ce2c058d8898dac7ddd2a2d5b330efc98 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 1438472e6ec3bb411bc44f17147a2f0d4d0238de ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -19 +20 @@
-index ac8fae745e..1b9554ce91 100644
+index 94bec21831..7f98db15a4 100644
@@ -25 +26 @@
--#if defined(RTE_ARCH_X86) || defined(RTE_ARCH_ARM64)
+-#ifdef RTE_IXGBE_INC_VECTOR


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

* [dpdk-stable] patch 'net/dpaa: fix Rx offload flags on jumbo MTU set' has been queued to LTS release 18.11.7
  2020-02-14 17:02 [dpdk-stable] patch 'net/virtio-user: do not close tap when disabling queue pairs' has been queued to LTS release 18.11.7 Kevin Traynor
                   ` (2 preceding siblings ...)
  2020-02-14 17:02 ` [dpdk-stable] patch 'net/ixgbe: remove duplicate function declaration' " Kevin Traynor
@ 2020-02-14 17:02 ` Kevin Traynor
  2020-02-14 17:03 ` [dpdk-stable] patch 'ethdev: fix switching domain allocation' " Kevin Traynor
                   ` (37 subsequent siblings)
  41 siblings, 0 replies; 43+ messages in thread
From: Kevin Traynor @ 2020-02-14 17:02 UTC (permalink / raw)
  To: Apeksha Gupta; +Cc: Ferruh Yigit, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.7

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable-queue

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable-queue/commit/defe8584b3505f2346ce60f67a08f7ae0789c454

Thanks.

Kevin.

---
From defe8584b3505f2346ce60f67a08f7ae0789c454 Mon Sep 17 00:00:00 2001
From: Apeksha Gupta <apeksha.gupta@nxp.com>
Date: Thu, 16 Jan 2020 13:26:38 +0530
Subject: [PATCH] net/dpaa: fix Rx offload flags on jumbo MTU set

[ upstream commit 40c79ea091e37efc836597cac2fa98be08feb72a ]

The JUMBO frame handling in dpaa_dev_mtu_set api was not correct.
When frame_size is greater than RTE_ETHER_MAX_LEN, the
intention is to add JUMBO flag in rx offload while it was resetting
all other flags other than JUMBO as AND operator was used instead of OR.

Fixes: 0ebce6129bc6 ("net/dpaa2: support new ethdev offload APIs")

Signed-off-by: Apeksha Gupta <apeksha.gupta@nxp.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
 drivers/net/dpaa/dpaa_ethdev.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/dpaa/dpaa_ethdev.c b/drivers/net/dpaa/dpaa_ethdev.c
index 5fbf152fa9..f41a01e113 100644
--- a/drivers/net/dpaa/dpaa_ethdev.c
+++ b/drivers/net/dpaa/dpaa_ethdev.c
@@ -173,5 +173,5 @@ dpaa_mtu_set(struct rte_eth_dev *dev, uint16_t mtu)
 
 	if (frame_size > ETHER_MAX_LEN)
-		dev->data->dev_conf.rxmode.offloads &=
+		dev->data->dev_conf.rxmode.offloads |=
 						DEV_RX_OFFLOAD_JUMBO_FRAME;
 	else
-- 
2.21.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-02-14 17:02:37.333623755 +0000
+++ 0005-net-dpaa-fix-Rx-offload-flags-on-jumbo-MTU-set.patch	2020-02-14 17:02:36.921408564 +0000
@@ -1 +1 @@
-From 40c79ea091e37efc836597cac2fa98be08feb72a Mon Sep 17 00:00:00 2001
+From defe8584b3505f2346ce60f67a08f7ae0789c454 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 40c79ea091e37efc836597cac2fa98be08feb72a ]
+
@@ -12 +13,0 @@
-Cc: stable@dpdk.org
@@ -21 +22 @@
-index 26805f17b7..fce9ce2feb 100644
+index 5fbf152fa9..f41a01e113 100644
@@ -24 +25 @@
-@@ -175,5 +175,5 @@ dpaa_mtu_set(struct rte_eth_dev *dev, uint16_t mtu)
+@@ -173,5 +173,5 @@ dpaa_mtu_set(struct rte_eth_dev *dev, uint16_t mtu)
@@ -26 +27 @@
- 	if (frame_size > RTE_ETHER_MAX_LEN)
+ 	if (frame_size > ETHER_MAX_LEN)


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

* [dpdk-stable] patch 'ethdev: fix switching domain allocation' has been queued to LTS release 18.11.7
  2020-02-14 17:02 [dpdk-stable] patch 'net/virtio-user: do not close tap when disabling queue pairs' has been queued to LTS release 18.11.7 Kevin Traynor
                   ` (3 preceding siblings ...)
  2020-02-14 17:02 ` [dpdk-stable] patch 'net/dpaa: fix Rx offload flags on jumbo MTU set' " Kevin Traynor
@ 2020-02-14 17:03 ` Kevin Traynor
  2020-02-14 17:03 ` [dpdk-stable] patch 'ethdev: fix secondary process memory overwrite' " Kevin Traynor
                   ` (36 subsequent siblings)
  41 siblings, 0 replies; 43+ messages in thread
From: Kevin Traynor @ 2020-02-14 17:03 UTC (permalink / raw)
  To: Viacheslav Ovsiienko; +Cc: Ferruh Yigit, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.7

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable-queue

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable-queue/commit/2376793d11fc74b4f052c1fa592591186149f1e0

Thanks.

Kevin.

---
From 2376793d11fc74b4f052c1fa592591186149f1e0 Mon Sep 17 00:00:00 2001
From: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
Date: Thu, 16 Jan 2020 16:19:54 +0000
Subject: [PATCH] ethdev: fix switching domain allocation

[ upstream commit 7e9165b1beb77554916686cb4ff4d16c4e995b74 ]

The maximum amount of unique swutching domain is supposed
to be equal RTE_MAX_ETHPORTS. Current implementation allows
to allocate only RTE_MAX_ETHPORTS-1 domains.

The definition of RTE_ETH_DEV_SWITCH_DOMAIN_ID_INVALID is
changed from 0 to UINT16_MAX, the rte_eth_dev_info_get is
updated to initialize dev_ibfo structure accordingly.

Fixes: ce9250406323 ("ethdev: add switch domain allocator")

Signed-off-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
 lib/librte_ethdev/rte_ethdev.c | 4 ++--
 lib/librte_ethdev/rte_ethdev.h | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/lib/librte_ethdev/rte_ethdev.c b/lib/librte_ethdev/rte_ethdev.c
index 51954456c2..13866150ef 100644
--- a/lib/librte_ethdev/rte_ethdev.c
+++ b/lib/librte_ethdev/rte_ethdev.c
@@ -2525,4 +2525,5 @@ rte_eth_dev_info_get(uint16_t port_id, struct rte_eth_dev_info *dev_info)
 	 */
 	memset(dev_info, 0, sizeof(struct rte_eth_dev_info));
+	dev_info->switch_info.domain_id = RTE_ETH_DEV_SWITCH_DOMAIN_ID_INVALID;
 
 	RTE_ETH_VALID_PORTID_OR_RET(port_id);
@@ -4360,6 +4361,5 @@ rte_eth_switch_domain_alloc(uint16_t *domain_id)
 	*domain_id = RTE_ETH_DEV_SWITCH_DOMAIN_ID_INVALID;
 
-	for (i = RTE_ETH_DEV_SWITCH_DOMAIN_ID_INVALID + 1;
-		i < RTE_MAX_ETHPORTS; i++) {
+	for (i = 0; i < RTE_MAX_ETHPORTS; i++) {
 		if (rte_eth_switch_domains[i].state ==
 			RTE_ETH_SWITCH_DOMAIN_UNUSED) {
diff --git a/lib/librte_ethdev/rte_ethdev.h b/lib/librte_ethdev/rte_ethdev.h
index a9472af62a..7b4221d7b4 100644
--- a/lib/librte_ethdev/rte_ethdev.h
+++ b/lib/librte_ethdev/rte_ethdev.h
@@ -1055,5 +1055,5 @@ struct rte_eth_dev_portconf {
  * domain definitions.
  */
-#define RTE_ETH_DEV_SWITCH_DOMAIN_ID_INVALID	(0)
+#define RTE_ETH_DEV_SWITCH_DOMAIN_ID_INVALID	(UINT16_MAX)
 
 /**
-- 
2.21.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-02-14 17:02:37.389188970 +0000
+++ 0006-ethdev-fix-switching-domain-allocation.patch	2020-02-14 17:02:36.931408356 +0000
@@ -1 +1 @@
-From 7e9165b1beb77554916686cb4ff4d16c4e995b74 Mon Sep 17 00:00:00 2001
+From 2376793d11fc74b4f052c1fa592591186149f1e0 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 7e9165b1beb77554916686cb4ff4d16c4e995b74 ]
+
@@ -15 +16,0 @@
-Cc: stable@dpdk.org
@@ -25 +26 @@
-index aec2d0f704..42ce177fe1 100644
+index 51954456c2..13866150ef 100644
@@ -28 +29 @@
-@@ -2969,4 +2969,5 @@ rte_eth_dev_info_get(uint16_t port_id, struct rte_eth_dev_info *dev_info)
+@@ -2525,4 +2525,5 @@ rte_eth_dev_info_get(uint16_t port_id, struct rte_eth_dev_info *dev_info)
@@ -33,2 +34,2 @@
- 	RTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -ENODEV);
-@@ -5065,6 +5066,5 @@ rte_eth_switch_domain_alloc(uint16_t *domain_id)
+ 	RTE_ETH_VALID_PORTID_OR_RET(port_id);
+@@ -4360,6 +4361,5 @@ rte_eth_switch_domain_alloc(uint16_t *domain_id)
@@ -43 +44 @@
-index 18a9defc24..d1a593ad11 100644
+index a9472af62a..7b4221d7b4 100644
@@ -46 +47 @@
-@@ -1197,5 +1197,5 @@ struct rte_eth_dev_portconf {
+@@ -1055,5 +1055,5 @@ struct rte_eth_dev_portconf {


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

* [dpdk-stable] patch 'ethdev: fix secondary process memory overwrite' has been queued to LTS release 18.11.7
  2020-02-14 17:02 [dpdk-stable] patch 'net/virtio-user: do not close tap when disabling queue pairs' has been queued to LTS release 18.11.7 Kevin Traynor
                   ` (4 preceding siblings ...)
  2020-02-14 17:03 ` [dpdk-stable] patch 'ethdev: fix switching domain allocation' " Kevin Traynor
@ 2020-02-14 17:03 ` Kevin Traynor
  2020-02-14 17:03 ` [dpdk-stable] patch 'mk: avoid combining -r and -export-dynamic linker options' " Kevin Traynor
                   ` (35 subsequent siblings)
  41 siblings, 0 replies; 43+ messages in thread
From: Kevin Traynor @ 2020-02-14 17:03 UTC (permalink / raw)
  To: Fang TongHao; +Cc: Andrew Rybchenko, Ferruh Yigit, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.7

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable-queue

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable-queue/commit/ab4272aefa97c8a92fc07fe8e653b979a99e46d1

Thanks.

Kevin.

---
From ab4272aefa97c8a92fc07fe8e653b979a99e46d1 Mon Sep 17 00:00:00 2001
From: Fang TongHao <fangtonghao@sangfor.com.cn>
Date: Fri, 17 Jan 2020 10:08:04 +0800
Subject: [PATCH] ethdev: fix secondary process memory overwrite

[ upstream commit 99ef90317da69a5e6ecc831ad05c6d2053e2b065 ]

Avoid overwriting device flags and other information in device
data stored in shared memory when a secondary process
probes PCI device.

Fixes: 494adb7f63f2 ("ethdev: add device fields from PCI layer")

Signed-off-by: Fang TongHao <fangtonghao@sangfor.com.cn>
Reviewed-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
 lib/librte_ethdev/rte_ethdev_pci.h | 18 +++++++++++-------
 1 file changed, 11 insertions(+), 7 deletions(-)

diff --git a/lib/librte_ethdev/rte_ethdev_pci.h b/lib/librte_ethdev/rte_ethdev_pci.h
index ccdbb46ec0..cca94ec864 100644
--- a/lib/librte_ethdev/rte_ethdev_pci.h
+++ b/lib/librte_ethdev/rte_ethdev_pci.h
@@ -43,4 +43,6 @@
 /**
  * Copy pci device info to the Ethernet device data.
+ * Shared memory (eth_dev->data) only updated by primary process, so it is safe
+ * to call this function from both primary and secondary processes.
  *
  * @param eth_dev
@@ -61,12 +63,14 @@ rte_eth_copy_pci_info(struct rte_eth_dev *eth_dev,
 	eth_dev->intr_handle = &pci_dev->intr_handle;
 
-	eth_dev->data->dev_flags = 0;
-	if (pci_dev->driver->drv_flags & RTE_PCI_DRV_INTR_LSC)
-		eth_dev->data->dev_flags |= RTE_ETH_DEV_INTR_LSC;
-	if (pci_dev->driver->drv_flags & RTE_PCI_DRV_INTR_RMV)
-		eth_dev->data->dev_flags |= RTE_ETH_DEV_INTR_RMV;
+	if (rte_eal_process_type() == RTE_PROC_PRIMARY) {
+		eth_dev->data->dev_flags = 0;
+		if (pci_dev->driver->drv_flags & RTE_PCI_DRV_INTR_LSC)
+			eth_dev->data->dev_flags |= RTE_ETH_DEV_INTR_LSC;
+		if (pci_dev->driver->drv_flags & RTE_PCI_DRV_INTR_RMV)
+			eth_dev->data->dev_flags |= RTE_ETH_DEV_INTR_RMV;
 
-	eth_dev->data->kdrv = pci_dev->kdrv;
-	eth_dev->data->numa_node = pci_dev->device.numa_node;
+		eth_dev->data->kdrv = pci_dev->kdrv;
+		eth_dev->data->numa_node = pci_dev->device.numa_node;
+	}
 }
 
-- 
2.21.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-02-14 17:02:37.450599160 +0000
+++ 0007-ethdev-fix-secondary-process-memory-overwrite.patch	2020-02-14 17:02:36.932408335 +0000
@@ -1 +1 @@
-From 99ef90317da69a5e6ecc831ad05c6d2053e2b065 Mon Sep 17 00:00:00 2001
+From ab4272aefa97c8a92fc07fe8e653b979a99e46d1 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 99ef90317da69a5e6ecc831ad05c6d2053e2b065 ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org


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

* [dpdk-stable] patch 'mk: avoid combining -r and -export-dynamic linker options' has been queued to LTS release 18.11.7
  2020-02-14 17:02 [dpdk-stable] patch 'net/virtio-user: do not close tap when disabling queue pairs' has been queued to LTS release 18.11.7 Kevin Traynor
                   ` (5 preceding siblings ...)
  2020-02-14 17:03 ` [dpdk-stable] patch 'ethdev: fix secondary process memory overwrite' " Kevin Traynor
@ 2020-02-14 17:03 ` Kevin Traynor
  2020-02-14 17:03 ` [dpdk-stable] patch 'kni: rename variable with namespace prefix' " Kevin Traynor
                   ` (34 subsequent siblings)
  41 siblings, 0 replies; 43+ messages in thread
From: Kevin Traynor @ 2020-02-14 17:03 UTC (permalink / raw)
  Cc: Rafael Ávila de Espíndola, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.7

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable-queue

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable-queue/commit/bad8e72a9709911cf3ab60b8ae249753bdb8e69d

Thanks.

Kevin.

---
From bad8e72a9709911cf3ab60b8ae249753bdb8e69d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Rafael=20=C3=81vila=20de=20Esp=C3=ADndola?=
 <espindola@scylladb.com>
Date: Thu, 12 Dec 2019 09:53:12 -0800
Subject: [PATCH] mk: avoid combining -r and -export-dynamic linker options
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

[ upstream commit 5a352a3a98e3297555cb08d2db6e45a93ce7e058 ]

Running ld with -r switches the linker to a very special mode where
some other linker options don't make sense.

In particular, -export-dynamic normally requires that all global
symbols be included in the dynamic symbol table, but a .o file doesn't
even have a dynamic symbol table.

When given both options it looks like the gnu linker just ignores
-export-dynamic.

Unfortunately some versions of lld (https://lld.llvm.org/) have a bug
that causes it to try to create a dynamic symbol table in the output
.o file and ends up corrupting it
(https://bugs.llvm.org/show_bug.cgi?id=43552). Current (git) version
of lld now issues an error.

This patch filters out -export-dynamic from $(LDFLAGS) when using
-r. With this patch I can build dpdk with lld.

Fixes: 3d781ca32874 ("mk: do post processing on objects that register a driver")

Signed-off-by: Rafael Ávila de Espíndola <espindola@scylladb.com>
---
 mk/internal/rte.compile-pre.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/mk/internal/rte.compile-pre.mk b/mk/internal/rte.compile-pre.mk
index 0cf3791b4d..82fe098f7c 100644
--- a/mk/internal/rte.compile-pre.mk
+++ b/mk/internal/rte.compile-pre.mk
@@ -62,5 +62,5 @@ CHECK_EXPERIMENTAL = $(EXPERIMENTAL_CHECK) $(SRCDIR)/$(EXPORT_MAP) $@
 PMDINFO_GEN = $(RTE_SDK_BIN)/app/dpdk-pmdinfogen $@ $@.pmd.c
 PMDINFO_CC = $(CC) $(CPPFLAGS) $(CFLAGS) $(EXTRA_CFLAGS) -c -o $@.pmd.o $@.pmd.c
-PMDINFO_LD = $(CROSS)ld $(LDFLAGS) -r -o $@.o $@.pmd.o $@
+PMDINFO_LD = $(CROSS)ld -r $(filter-out -export-dynamic,$(LDFLAGS)) -o $@.o $@.pmd.o $@
 PMDINFO_TO_O = if grep -q 'RTE_PMD_REGISTER_.*(.*)' $<; then \
 	echo "$(if $V,$(PMDINFO_GEN),  PMDINFO $@.pmd.c)" && \
-- 
2.21.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-02-14 17:02:37.500280292 +0000
+++ 0008-mk-avoid-combining-r-and-export-dynamic-linker-optio.patch	2020-02-14 17:02:36.932408335 +0000
@@ -1 +1 @@
-From 5a352a3a98e3297555cb08d2db6e45a93ce7e058 Mon Sep 17 00:00:00 2001
+From bad8e72a9709911cf3ab60b8ae249753bdb8e69d Mon Sep 17 00:00:00 2001
@@ -9,0 +10,2 @@
+[ upstream commit 5a352a3a98e3297555cb08d2db6e45a93ce7e058 ]
+
@@ -30 +31,0 @@
-Cc: stable@dpdk.org


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

* [dpdk-stable] patch 'kni: rename variable with namespace prefix' has been queued to LTS release 18.11.7
  2020-02-14 17:02 [dpdk-stable] patch 'net/virtio-user: do not close tap when disabling queue pairs' has been queued to LTS release 18.11.7 Kevin Traynor
                   ` (6 preceding siblings ...)
  2020-02-14 17:03 ` [dpdk-stable] patch 'mk: avoid combining -r and -export-dynamic linker options' " Kevin Traynor
@ 2020-02-14 17:03 ` Kevin Traynor
  2020-02-14 17:03 ` [dpdk-stable] patch 'cfgfile: fix symbols map' " Kevin Traynor
                   ` (33 subsequent siblings)
  41 siblings, 0 replies; 43+ messages in thread
From: Kevin Traynor @ 2020-02-14 17:03 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: Ferruh Yigit, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.7

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable-queue

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable-queue/commit/4f62f1d84d03b56390ff1a514e21e5f67e06cdcc

Thanks.

Kevin.

---
From 4f62f1d84d03b56390ff1a514e21e5f67e06cdcc Mon Sep 17 00:00:00 2001
From: Stephen Hemminger <stephen@networkplumber.org>
Date: Fri, 20 Dec 2019 17:02:14 -0800
Subject: [PATCH] kni: rename variable with namespace prefix

[ upstream commit c793dce9858d9194b999e2af626a2c314ef0cc43 ]

All global variables in kernel should be prefixed by the same
to avoid any symbol conflics. Rename dflt_carrier to kni_default_carrier.

Fixes: 89397a01ce4a ("kni: set default carrier state of interface")

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
 kernel/linux/kni/kni_dev.h  |  2 +-
 kernel/linux/kni/kni_misc.c | 10 +++++-----
 kernel/linux/kni/kni_net.c  |  2 +-
 3 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/kernel/linux/kni/kni_dev.h b/kernel/linux/kni/kni_dev.h
index 688f574a4a..c425950646 100644
--- a/kernel/linux/kni/kni_dev.h
+++ b/kernel/linux/kni/kni_dev.h
@@ -31,5 +31,5 @@
 
 /* Default carrier state for created KNI network interfaces */
-extern uint32_t dflt_carrier;
+extern uint32_t kni_dflt_carrier;
 
 /**
diff --git a/kernel/linux/kni/kni_misc.c b/kernel/linux/kni/kni_misc.c
index 8bf0e21038..0f21fd6cbe 100644
--- a/kernel/linux/kni/kni_misc.c
+++ b/kernel/linux/kni/kni_misc.c
@@ -42,5 +42,5 @@ static uint32_t multiple_kthread_on;
 /* Default carrier state for created KNI network interfaces */
 static char *carrier;
-uint32_t dflt_carrier;
+uint32_t kni_dflt_carrier;
 
 #define KNI_DEV_IN_USE_BIT_NUM 0 /* Bit number for device in use */
@@ -595,12 +595,12 @@ kni_parse_carrier_state(void)
 {
 	if (!carrier) {
-		dflt_carrier = 0;
+		kni_dflt_carrier = 0;
 		return 0;
 	}
 
 	if (strcmp(carrier, "off") == 0)
-		dflt_carrier = 0;
+		kni_dflt_carrier = 0;
 	else if (strcmp(carrier, "on") == 0)
-		dflt_carrier = 1;
+		kni_dflt_carrier = 1;
 	else
 		return -1;
@@ -629,5 +629,5 @@ kni_init(void)
 	}
 
-	if (dflt_carrier == 0)
+	if (kni_dflt_carrier == 0)
 		pr_debug("Default carrier state set to off.\n");
 	else
diff --git a/kernel/linux/kni/kni_net.c b/kernel/linux/kni/kni_net.c
index 432d56a19b..f3f2f73c7b 100644
--- a/kernel/linux/kni/kni_net.c
+++ b/kernel/linux/kni/kni_net.c
@@ -122,5 +122,5 @@ kni_net_open(struct net_device *dev)
 
 	netif_start_queue(dev);
-	if (dflt_carrier == 1)
+	if (kni_dflt_carrier == 1)
 		netif_carrier_on(dev);
 	else
-- 
2.21.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-02-14 17:02:37.553676172 +0000
+++ 0009-kni-rename-variable-with-namespace-prefix.patch	2020-02-14 17:02:36.935408272 +0000
@@ -1 +1 @@
-From c793dce9858d9194b999e2af626a2c314ef0cc43 Mon Sep 17 00:00:00 2001
+From 4f62f1d84d03b56390ff1a514e21e5f67e06cdcc Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit c793dce9858d9194b999e2af626a2c314ef0cc43 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -21 +22 @@
-index 5e75c6371f..ca5f92a47b 100644
+index 688f574a4a..c425950646 100644
@@ -24 +25 @@
-@@ -33,5 +33,5 @@
+@@ -31,5 +31,5 @@
@@ -32 +33 @@
-index cda71bde08..2b464c4381 100644
+index 8bf0e21038..0f21fd6cbe 100644
@@ -35 +36 @@
-@@ -40,5 +40,5 @@ static uint32_t multiple_kthread_on;
+@@ -42,5 +42,5 @@ static uint32_t multiple_kthread_on;
@@ -42 +43 @@
-@@ -555,12 +555,12 @@ kni_parse_carrier_state(void)
+@@ -595,12 +595,12 @@ kni_parse_carrier_state(void)
@@ -58 +59 @@
-@@ -589,5 +589,5 @@ kni_init(void)
+@@ -629,5 +629,5 @@ kni_init(void)
@@ -66 +67 @@
-index 1ba9b1b99f..97fe85be9a 100644
+index 432d56a19b..f3f2f73c7b 100644
@@ -69 +70 @@
-@@ -159,5 +159,5 @@ kni_net_open(struct net_device *dev)
+@@ -122,5 +122,5 @@ kni_net_open(struct net_device *dev)


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

* [dpdk-stable] patch 'cfgfile: fix symbols map' has been queued to LTS release 18.11.7
  2020-02-14 17:02 [dpdk-stable] patch 'net/virtio-user: do not close tap when disabling queue pairs' has been queued to LTS release 18.11.7 Kevin Traynor
                   ` (7 preceding siblings ...)
  2020-02-14 17:03 ` [dpdk-stable] patch 'kni: rename variable with namespace prefix' " Kevin Traynor
@ 2020-02-14 17:03 ` Kevin Traynor
  2020-02-14 17:03 ` [dpdk-stable] patch 'latency: fix calculation for multi-thread' " Kevin Traynor
                   ` (32 subsequent siblings)
  41 siblings, 0 replies; 43+ messages in thread
From: Kevin Traynor @ 2020-02-14 17:03 UTC (permalink / raw)
  To: Liron Himi; +Cc: Cristian Dumitrescu, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.7

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable-queue

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable-queue/commit/36a6021ee83fe981f6911206ea4d101c6329dd03

Thanks.

Kevin.

---
From 36a6021ee83fe981f6911206ea4d101c6329dd03 Mon Sep 17 00:00:00 2001
From: Liron Himi <lironh@marvell.com>
Date: Tue, 17 Dec 2019 13:52:03 +0200
Subject: [PATCH] cfgfile: fix symbols map

[ upstream commit 94f73b5b6e0897071aa739e2cf82c36d27e51f05 ]

rte_cfgfile_section_num_entries_by_index was missing from the map file.

meson build failed when calling this function,
due to linking a binary to cfgfile built as a shared library.

Fixes: 3d2e0448ebb5 ("cfgfile: add section number of entries by index")

Signed-off-by: Liron Himi <lironh@marvell.com>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
---
 lib/librte_cfgfile/rte_cfgfile_version.map | 1 +
 1 file changed, 1 insertion(+)

diff --git a/lib/librte_cfgfile/rte_cfgfile_version.map b/lib/librte_cfgfile/rte_cfgfile_version.map
index a0a11cea8d..963d36a5f8 100644
--- a/lib/librte_cfgfile/rte_cfgfile_version.map
+++ b/lib/librte_cfgfile/rte_cfgfile_version.map
@@ -10,4 +10,5 @@ DPDK_2.0 {
 	rte_cfgfile_section_entries;
 	rte_cfgfile_section_num_entries;
+	rte_cfgfile_section_num_entries_by_index;
 	rte_cfgfile_sections;
 
-- 
2.21.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-02-14 17:02:37.605467372 +0000
+++ 0010-cfgfile-fix-symbols-map.patch	2020-02-14 17:02:36.935408272 +0000
@@ -1 +1 @@
-From 94f73b5b6e0897071aa739e2cf82c36d27e51f05 Mon Sep 17 00:00:00 2001
+From 36a6021ee83fe981f6911206ea4d101c6329dd03 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 94f73b5b6e0897071aa739e2cf82c36d27e51f05 ]
+
@@ -12 +13,0 @@
-Cc: stable@dpdk.org
@@ -21 +22 @@
-index 906eee96bf..22c999fe16 100644
+index a0a11cea8d..963d36a5f8 100644
@@ -24,2 +25,2 @@
-@@ -16,4 +16,5 @@ DPDK_20.0 {
- 	rte_cfgfile_section_entries_by_index;
+@@ -10,4 +10,5 @@ DPDK_2.0 {
+ 	rte_cfgfile_section_entries;
@@ -29 +30 @@
- 	rte_cfgfile_set_entry;
+ 


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

* [dpdk-stable] patch 'latency: fix calculation for multi-thread' has been queued to LTS release 18.11.7
  2020-02-14 17:02 [dpdk-stable] patch 'net/virtio-user: do not close tap when disabling queue pairs' has been queued to LTS release 18.11.7 Kevin Traynor
                   ` (8 preceding siblings ...)
  2020-02-14 17:03 ` [dpdk-stable] patch 'cfgfile: fix symbols map' " Kevin Traynor
@ 2020-02-14 17:03 ` Kevin Traynor
  2020-02-14 17:03 ` [dpdk-stable] patch 'mempool: fix anonymous populate' " Kevin Traynor
                   ` (31 subsequent siblings)
  41 siblings, 0 replies; 43+ messages in thread
From: Kevin Traynor @ 2020-02-14 17:03 UTC (permalink / raw)
  To: Reshma Pattan; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.7

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable-queue

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable-queue/commit/bdb5ddd7522190044031376eacf3bfc35e0e99e0

Thanks.

Kevin.

---
From bdb5ddd7522190044031376eacf3bfc35e0e99e0 Mon Sep 17 00:00:00 2001
From: Reshma Pattan <reshma.pattan@intel.com>
Date: Thu, 5 Dec 2019 17:18:11 +0000
Subject: [PATCH] latency: fix calculation for multi-thread

[ upstream commit 2a178702c00f2a8b547358fedc7107d376f8825e ]

Make latency calculation multithread safe by
using spinlock.

Fixes: 5cd3cac9ed ("latency: added new library for latency stats")

Signed-off-by: Reshma Pattan <reshma.pattan@intel.com>
---
 lib/librte_latencystats/rte_latencystats.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/lib/librte_latencystats/rte_latencystats.c b/lib/librte_latencystats/rte_latencystats.c
index 5715549e46..0212be9a89 100644
--- a/lib/librte_latencystats/rte_latencystats.c
+++ b/lib/librte_latencystats/rte_latencystats.c
@@ -42,4 +42,5 @@ struct rte_latency_stats {
 	float max_latency; /**< Maximum latency in nano seconds */
 	float jitter; /** Latency variation */
+	rte_spinlock_t lock; /** Latency calculation lock */
 };
 
@@ -164,4 +165,5 @@ calc_latency(uint16_t pid __rte_unused,
 	}
 
+	rte_spinlock_lock(&glob_stats->lock);
 	for (i = 0; i < cnt; i++) {
 		/*
@@ -193,4 +195,5 @@ calc_latency(uint16_t pid __rte_unused,
 		prev_latency = latency[i];
 	}
+	rte_spinlock_unlock(&glob_stats->lock);
 
 	return nb_pkts;
@@ -222,4 +225,5 @@ rte_latencystats_init(uint64_t app_samp_intvl,
 
 	glob_stats = mz->addr;
+	rte_spinlock_init(&glob_stats->lock);
 	samp_intvl = app_samp_intvl * latencystat_cycles_per_ns();
 
-- 
2.21.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-02-14 17:02:37.656399712 +0000
+++ 0011-latency-fix-calculation-for-multi-thread.patch	2020-02-14 17:02:36.936408251 +0000
@@ -1 +1 @@
-From 2a178702c00f2a8b547358fedc7107d376f8825e Mon Sep 17 00:00:00 2001
+From bdb5ddd7522190044031376eacf3bfc35e0e99e0 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 2a178702c00f2a8b547358fedc7107d376f8825e ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -18 +19 @@
-index 98e018939e..ba2fff3bcb 100644
+index 5715549e46..0212be9a89 100644
@@ -21 +22 @@
-@@ -43,4 +43,5 @@ struct rte_latency_stats {
+@@ -42,4 +42,5 @@ struct rte_latency_stats {
@@ -27 +28 @@
-@@ -165,4 +166,5 @@ calc_latency(uint16_t pid __rte_unused,
+@@ -164,4 +165,5 @@ calc_latency(uint16_t pid __rte_unused,
@@ -33 +34 @@
-@@ -194,4 +196,5 @@ calc_latency(uint16_t pid __rte_unused,
+@@ -193,4 +195,5 @@ calc_latency(uint16_t pid __rte_unused,
@@ -39 +40 @@
-@@ -224,4 +227,5 @@ rte_latencystats_init(uint64_t app_samp_intvl,
+@@ -222,4 +225,5 @@ rte_latencystats_init(uint64_t app_samp_intvl,


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

* [dpdk-stable] patch 'mempool: fix anonymous populate' has been queued to LTS release 18.11.7
  2020-02-14 17:02 [dpdk-stable] patch 'net/virtio-user: do not close tap when disabling queue pairs' has been queued to LTS release 18.11.7 Kevin Traynor
                   ` (9 preceding siblings ...)
  2020-02-14 17:03 ` [dpdk-stable] patch 'latency: fix calculation for multi-thread' " Kevin Traynor
@ 2020-02-14 17:03 ` Kevin Traynor
  2020-02-14 17:03 ` [dpdk-stable] patch 'maintainers: update for failsafe and PCI library' " Kevin Traynor
                   ` (30 subsequent siblings)
  41 siblings, 0 replies; 43+ messages in thread
From: Kevin Traynor @ 2020-02-14 17:03 UTC (permalink / raw)
  To: Olivier Matz; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.7

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable-queue

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable-queue/commit/bb443e3fa89409c154cfbd738fcc2ea3b50f858c

Thanks.

Kevin.

---
From bb443e3fa89409c154cfbd738fcc2ea3b50f858c Mon Sep 17 00:00:00 2001
From: Olivier Matz <olivier.matz@6wind.com>
Date: Fri, 17 Jan 2020 15:34:29 +0100
Subject: [PATCH] mempool: fix anonymous populate

[ upstream commit f159c61c35ebc6ff18d2c6c2cb07c177935a96e3 ]

The documentation says that a negative errno is returned on error, but
in most places that's not the case.

Fix the documentation and the exceptions in code. The second one
(return from populate_virt) also fixes a memory leak.

Note that testpmd was using the function correctly.

Fixes: aa10457eb4c2 ("mempool: make mempool populate and free api public")
Fixes: 6780f72fb82f ("mempool: populate with anonymous memory")
Fixes: 66e7ba0bad4c ("mempool: ensure mempool is initialized before populating")

Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
---
 lib/librte_mempool/rte_mempool.c | 10 +++++++---
 lib/librte_mempool/rte_mempool.h |  4 ++--
 2 files changed, 9 insertions(+), 5 deletions(-)

diff --git a/lib/librte_mempool/rte_mempool.c b/lib/librte_mempool/rte_mempool.c
index 99530a5955..9fc038b745 100644
--- a/lib/librte_mempool/rte_mempool.c
+++ b/lib/librte_mempool/rte_mempool.c
@@ -679,6 +679,8 @@ rte_mempool_populate_anon(struct rte_mempool *mp)
 
 	ret = mempool_ops_alloc_once(mp);
-	if (ret != 0)
-		return ret;
+	if (ret < 0) {
+		rte_errno = -ret;
+		return 0;
+	}
 
 	size = get_anon_size(mp);
@@ -704,6 +706,8 @@ rte_mempool_populate_anon(struct rte_mempool *mp)
 	ret = rte_mempool_populate_virt(mp, addr, size, getpagesize(),
 		rte_mempool_memchunk_anon_free, addr);
-	if (ret == 0)
+	if (ret < 0) {
+		rte_errno = -ret;
 		goto fail;
+	}
 
 	return mp->populated_size;
diff --git a/lib/librte_mempool/rte_mempool.h b/lib/librte_mempool/rte_mempool.h
index fe2f33352c..a22cef49e0 100644
--- a/lib/librte_mempool/rte_mempool.h
+++ b/lib/librte_mempool/rte_mempool.h
@@ -1088,6 +1088,6 @@ int rte_mempool_populate_default(struct rte_mempool *mp);
  * @return
  *   The number of objects added on success.
- *   On error, the chunk is not added in the memory list of the
- *   mempool and a negative errno is returned.
+ *   On error, 0 is returned, rte_errno is set, and the chunk is not added in
+ *   the memory list of the mempool.
  */
 int rte_mempool_populate_anon(struct rte_mempool *mp);
-- 
2.21.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-02-14 17:02:37.705900070 +0000
+++ 0012-mempool-fix-anonymous-populate.patch	2020-02-14 17:02:36.939408189 +0000
@@ -1 +1 @@
-From f159c61c35ebc6ff18d2c6c2cb07c177935a96e3 Mon Sep 17 00:00:00 2001
+From bb443e3fa89409c154cfbd738fcc2ea3b50f858c Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit f159c61c35ebc6ff18d2c6c2cb07c177935a96e3 ]
+
@@ -17 +18,0 @@
-Cc: stable@dpdk.org
@@ -26 +27 @@
-index 78d8eb941e..f8d453d21f 100644
+index 99530a5955..9fc038b745 100644
@@ -29 +30 @@
-@@ -646,6 +646,8 @@ rte_mempool_populate_anon(struct rte_mempool *mp)
+@@ -679,6 +679,8 @@ rte_mempool_populate_anon(struct rte_mempool *mp)
@@ -40 +41 @@
-@@ -671,6 +673,8 @@ rte_mempool_populate_anon(struct rte_mempool *mp)
+@@ -704,6 +706,8 @@ rte_mempool_populate_anon(struct rte_mempool *mp)
@@ -51 +52 @@
-index f81152af96..0a1dc6059f 100644
+index fe2f33352c..a22cef49e0 100644
@@ -54 +55 @@
-@@ -1168,6 +1168,6 @@ int rte_mempool_populate_default(struct rte_mempool *mp);
+@@ -1088,6 +1088,6 @@ int rte_mempool_populate_default(struct rte_mempool *mp);


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

* [dpdk-stable] patch 'maintainers: update for failsafe and PCI library' has been queued to LTS release 18.11.7
  2020-02-14 17:02 [dpdk-stable] patch 'net/virtio-user: do not close tap when disabling queue pairs' has been queued to LTS release 18.11.7 Kevin Traynor
                   ` (10 preceding siblings ...)
  2020-02-14 17:03 ` [dpdk-stable] patch 'mempool: fix anonymous populate' " Kevin Traynor
@ 2020-02-14 17:03 ` Kevin Traynor
  2020-02-14 17:03 ` [dpdk-stable] patch 'maintainers: resign from flow API maintenance' " Kevin Traynor
                   ` (29 subsequent siblings)
  41 siblings, 0 replies; 43+ messages in thread
From: Kevin Traynor @ 2020-02-14 17:03 UTC (permalink / raw)
  To: Gaetan Rivet; +Cc: Gaetan Rivet, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.7

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable-queue

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable-queue/commit/c93f984988b80fd6571d6a90e696df70883e111d

Thanks.

Kevin.

---
From c93f984988b80fd6571d6a90e696df70883e111d Mon Sep 17 00:00:00 2001
From: Gaetan Rivet <grive@u256.net>
Date: Wed, 8 Jan 2020 15:13:32 +0100
Subject: [PATCH] maintainers: update for failsafe and PCI library

[ upstream commit a61b779e316bb9abe995702d837f5234a4457c21 ]

My email address has changed, gaetan.rivet@6wind.com is no longer valid.

Signed-off-by: Gaetan Rivet <grive@u256.net>
---
 MAINTAINERS | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/MAINTAINERS b/MAINTAINERS
index eaea0972b4..90569b088a 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -781,5 +781,5 @@ F: doc/guides/nics/features/null.ini
 
 Fail-safe PMD
-M: Gaetan Rivet <gaetan.rivet@6wind.com>
+M: Gaetan Rivet <grive@u256.net>
 F: drivers/net/failsafe/
 F: doc/guides/nics/fail_safe.rst
@@ -1169,5 +1169,5 @@ F: test/test/test_kvargs.c
 
 PCI
-M: Gaetan Rivet <gaetan.rivet@6wind.com>
+M: Gaetan Rivet <grive@u256.net>
 F: lib/librte_pci/
 
-- 
2.21.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-02-14 17:02:37.759772551 +0000
+++ 0013-maintainers-update-for-failsafe-and-PCI-library.patch	2020-02-14 17:02:36.941408147 +0000
@@ -1 +1 @@
-From a61b779e316bb9abe995702d837f5234a4457c21 Mon Sep 17 00:00:00 2001
+From c93f984988b80fd6571d6a90e696df70883e111d Mon Sep 17 00:00:00 2001
@@ -6 +6 @@
-My email address has changed, gaetan.rivet@6wind.com is no longer valid.
+[ upstream commit a61b779e316bb9abe995702d837f5234a4457c21 ]
@@ -8 +8 @@
-Cc: stable@dpdk.org
+My email address has changed, gaetan.rivet@6wind.com is no longer valid.
@@ -16 +16 @@
-index 8cd037cea9..d6db54bbeb 100644
+index eaea0972b4..90569b088a 100644
@@ -19 +19 @@
-@@ -913,5 +913,5 @@ F: doc/guides/nics/features/null.ini
+@@ -781,5 +781,5 @@ F: doc/guides/nics/features/null.ini
@@ -26 +26 @@
-@@ -1392,5 +1392,5 @@ F: doc/guides/prog_guide/rcu_lib.rst
+@@ -1169,5 +1169,5 @@ F: test/test/test_kvargs.c


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

* [dpdk-stable] patch 'maintainers: resign from flow API maintenance' has been queued to LTS release 18.11.7
  2020-02-14 17:02 [dpdk-stable] patch 'net/virtio-user: do not close tap when disabling queue pairs' has been queued to LTS release 18.11.7 Kevin Traynor
                   ` (11 preceding siblings ...)
  2020-02-14 17:03 ` [dpdk-stable] patch 'maintainers: update for failsafe and PCI library' " Kevin Traynor
@ 2020-02-14 17:03 ` Kevin Traynor
  2020-02-14 17:03 ` [dpdk-stable] patch 'net/bnxt: fix flow creation' " Kevin Traynor
                   ` (28 subsequent siblings)
  41 siblings, 0 replies; 43+ messages in thread
From: Kevin Traynor @ 2020-02-14 17:03 UTC (permalink / raw)
  To: Adrien Mazarguil; +Cc: Ori Kam, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.7

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable-queue

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable-queue/commit/93f532dff0f7c227d515422a1513f4eb92189150

Thanks.

Kevin.

---
From 93f532dff0f7c227d515422a1513f4eb92189150 Mon Sep 17 00:00:00 2001
From: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Date: Wed, 8 Jan 2020 11:10:00 +0100
Subject: [PATCH] maintainers: resign from flow API maintenance

[ upstream commit 2e3dfa179a06279c0e5f3024a2e7c0c139c37003 ]

Unfortunately due to lack of time, I've been unable to even participate to
flow API discussions for several months. Better make it official since this
is not going to improve anytime soon.

This doesn't mean I won't contribute to rte_flow in the future!

Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Acked-by: Ori Kam <orika@mellanox.com>
---
 MAINTAINERS | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/MAINTAINERS b/MAINTAINERS
index 90569b088a..6732dd3697 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -319,5 +319,5 @@ F: devtools/test-null.sh
 
 Flow API
-M: Adrien Mazarguil <adrien.mazarguil@6wind.com>
+M: Ori Kam <orika@mellanox.com>
 T: git://dpdk.org/next/dpdk-next-net
 F: app/test-pmd/cmdline_flow.c
-- 
2.21.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-02-14 17:02:37.823677682 +0000
+++ 0014-maintainers-resign-from-flow-API-maintenance.patch	2020-02-14 17:02:36.943408105 +0000
@@ -1 +1 @@
-From 2e3dfa179a06279c0e5f3024a2e7c0c139c37003 Mon Sep 17 00:00:00 2001
+From 93f532dff0f7c227d515422a1513f4eb92189150 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 2e3dfa179a06279c0e5f3024a2e7c0c139c37003 ]
+
@@ -12,2 +13,0 @@
-Cc: stable@dpdk.org
-
@@ -17,2 +17,2 @@
- MAINTAINERS | 1 -
- 1 file changed, 1 deletion(-)
+ MAINTAINERS | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
@@ -21 +21 @@
-index d6db54bbeb..d114c8865f 100644
+index 90569b088a..6732dd3697 100644
@@ -24 +24 @@
-@@ -372,5 +372,4 @@ F: doc/guides/prog_guide/switch_representation.rst
+@@ -319,5 +319,5 @@ F: devtools/test-null.sh
@@ -28 +28 @@
- M: Ori Kam <orika@mellanox.com>
++M: Ori Kam <orika@mellanox.com>
@@ -29,0 +30 @@
+ F: app/test-pmd/cmdline_flow.c


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

* [dpdk-stable] patch 'net/bnxt: fix flow creation' has been queued to LTS release 18.11.7
  2020-02-14 17:02 [dpdk-stable] patch 'net/virtio-user: do not close tap when disabling queue pairs' has been queued to LTS release 18.11.7 Kevin Traynor
                   ` (12 preceding siblings ...)
  2020-02-14 17:03 ` [dpdk-stable] patch 'maintainers: resign from flow API maintenance' " Kevin Traynor
@ 2020-02-14 17:03 ` Kevin Traynor
  2020-02-14 17:03 ` [dpdk-stable] patch 'net/bnxt: use macro for PCI log format' " Kevin Traynor
                   ` (27 subsequent siblings)
  41 siblings, 0 replies; 43+ messages in thread
From: Kevin Traynor @ 2020-02-14 17:03 UTC (permalink / raw)
  To: Kalesh AP; +Cc: Ajit Khaparde, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.7

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable-queue

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable-queue/commit/fbff17b62cad6eade51dcc7168141c73fda8fd77

Thanks.

Kevin.

---
From fbff17b62cad6eade51dcc7168141c73fda8fd77 Mon Sep 17 00:00:00 2001
From: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Date: Thu, 16 Jan 2020 18:34:46 +0530
Subject: [PATCH] net/bnxt: fix flow creation

[ upstream commit 9356d01d5fca23ce0f6617b1aab5e74da862808b ]

If flow create fails due to not enough filter resources,
driver does not populate the rte_flow_error using
rte_flow_error_set().

Since "rte_errno" could have garbage value and is not reliable,
it could cause a segfault in the stack in port_flow_complain().

Fix it to set rte_flow_error using rte_flow_error_set()
when flow create fails due to not enough filter resources.

Fixes: 5c1171c97216 ("net/bnxt: refactor filter/flow")

Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
 drivers/net/bnxt/bnxt_flow.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/net/bnxt/bnxt_flow.c b/drivers/net/bnxt/bnxt_flow.c
index aca5f38892..df962d9b77 100644
--- a/drivers/net/bnxt/bnxt_flow.c
+++ b/drivers/net/bnxt/bnxt_flow.c
@@ -1027,5 +1027,7 @@ bnxt_flow_create(struct rte_eth_dev *dev,
 	filter = bnxt_get_unused_filter(bp);
 	if (filter == NULL) {
-		PMD_DRV_LOG(ERR, "Not enough resources for a new flow.\n");
+		rte_flow_error_set(error, ENOSPC,
+				   RTE_FLOW_ERROR_TYPE_HANDLE, NULL,
+				   "Not enough resources for a new flow");
 		goto free_flow;
 	}
-- 
2.21.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-02-14 17:02:37.876483547 +0000
+++ 0015-net-bnxt-fix-flow-creation.patch	2020-02-14 17:02:36.944408084 +0000
@@ -1 +1 @@
-From 9356d01d5fca23ce0f6617b1aab5e74da862808b Mon Sep 17 00:00:00 2001
+From fbff17b62cad6eade51dcc7168141c73fda8fd77 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 9356d01d5fca23ce0f6617b1aab5e74da862808b ]
+
@@ -17 +18,0 @@
-Cc: stable@dpdk.org
@@ -26 +27 @@
-index cde1fa41c4..5564c53637 100644
+index aca5f38892..df962d9b77 100644
@@ -29 +30 @@
-@@ -1703,5 +1703,7 @@ bnxt_flow_create(struct rte_eth_dev *dev,
+@@ -1027,5 +1027,7 @@ bnxt_flow_create(struct rte_eth_dev *dev,


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

* [dpdk-stable] patch 'net/bnxt: use macro for PCI log format' has been queued to LTS release 18.11.7
  2020-02-14 17:02 [dpdk-stable] patch 'net/virtio-user: do not close tap when disabling queue pairs' has been queued to LTS release 18.11.7 Kevin Traynor
                   ` (13 preceding siblings ...)
  2020-02-14 17:03 ` [dpdk-stable] patch 'net/bnxt: fix flow creation' " Kevin Traynor
@ 2020-02-14 17:03 ` Kevin Traynor
  2020-02-14 17:03 ` [dpdk-stable] patch 'net/bnxt: do not log error if stats queried before start' " Kevin Traynor
                   ` (26 subsequent siblings)
  41 siblings, 0 replies; 43+ messages in thread
From: Kevin Traynor @ 2020-02-14 17:03 UTC (permalink / raw)
  To: Kalesh AP; +Cc: Somnath Kotur, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.7

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable-queue

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable-queue/commit/925656b9fea38136b8cd0e35825640c0c133fec4

Thanks.

Kevin.

---
From 925656b9fea38136b8cd0e35825640c0c133fec4 Mon Sep 17 00:00:00 2001
From: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Date: Thu, 16 Jan 2020 18:34:53 +0530
Subject: [PATCH] net/bnxt: use macro for PCI log format

[ upstream commit 537a053a79196db4999f7d956d00f822e95e9969 ]

Fixes: 19e6af01bb36 ("net/bnxt: support get/set EEPROM")

Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
---
 drivers/net/bnxt/bnxt_ethdev.c | 22 +++++++++++-----------
 1 file changed, 11 insertions(+), 11 deletions(-)

diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
index ed7f1f44b9..6d7c430030 100644
--- a/drivers/net/bnxt/bnxt_ethdev.c
+++ b/drivers/net/bnxt/bnxt_ethdev.c
@@ -2910,7 +2910,7 @@ bnxt_get_eeprom_length_op(struct rte_eth_dev *dev)
 	uint32_t entry_length;
 
-	PMD_DRV_LOG(INFO, "%04x:%02x:%02x:%02x\n",
-		bp->pdev->addr.domain, bp->pdev->addr.bus,
-		bp->pdev->addr.devid, bp->pdev->addr.function);
+	PMD_DRV_LOG(INFO, PCI_PRI_FMT "\n",
+		    bp->pdev->addr.domain, bp->pdev->addr.bus,
+		    bp->pdev->addr.devid, bp->pdev->addr.function);
 
 	rc = bnxt_hwrm_nvm_get_dir_info(bp, &dir_entries, &entry_length);
@@ -2929,8 +2929,8 @@ bnxt_get_eeprom_op(struct rte_eth_dev *dev,
 	uint32_t offset;
 
-	PMD_DRV_LOG(INFO, "%04x:%02x:%02x:%02x in_eeprom->offset = %d "
-		"len = %d\n", bp->pdev->addr.domain,
-		bp->pdev->addr.bus, bp->pdev->addr.devid,
-		bp->pdev->addr.function, in_eeprom->offset, in_eeprom->length);
+	PMD_DRV_LOG(INFO, PCI_PRI_FMT " in_eeprom->offset = %d len = %d\n",
+		    bp->pdev->addr.domain, bp->pdev->addr.bus,
+		    bp->pdev->addr.devid, bp->pdev->addr.function,
+		    in_eeprom->offset, in_eeprom->length);
 
 	if (in_eeprom->offset == 0) /* special offset value to get directory */
@@ -3000,8 +3000,8 @@ bnxt_set_eeprom_op(struct rte_eth_dev *dev,
 	uint16_t type, ext, ordinal, attr;
 
-	PMD_DRV_LOG(INFO, "%04x:%02x:%02x:%02x in_eeprom->offset = %d "
-		"len = %d\n", bp->pdev->addr.domain,
-		bp->pdev->addr.bus, bp->pdev->addr.devid,
-		bp->pdev->addr.function, in_eeprom->offset, in_eeprom->length);
+	PMD_DRV_LOG(INFO, PCI_PRI_FMT " in_eeprom->offset = %d len = %d\n",
+		    bp->pdev->addr.domain, bp->pdev->addr.bus,
+		    bp->pdev->addr.devid, bp->pdev->addr.function,
+		    in_eeprom->offset, in_eeprom->length);
 
 	if (!BNXT_PF(bp)) {
-- 
2.21.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-02-14 17:02:37.929448169 +0000
+++ 0016-net-bnxt-use-macro-for-PCI-log-format.patch	2020-02-14 17:02:36.948408001 +0000
@@ -1 +1 @@
-From 537a053a79196db4999f7d956d00f822e95e9969 Mon Sep 17 00:00:00 2001
+From 925656b9fea38136b8cd0e35825640c0c133fec4 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 537a053a79196db4999f7d956d00f822e95e9969 ]
+
@@ -7 +8,0 @@
-Cc: stable@dpdk.org
@@ -16 +17 @@
-index 26614186f5..ba3f0a7d96 100644
+index ed7f1f44b9..6d7c430030 100644
@@ -19,2 +20,2 @@
-@@ -3594,7 +3594,7 @@ bnxt_get_eeprom_length_op(struct rte_eth_dev *dev)
- 		return rc;
+@@ -2910,7 +2910,7 @@ bnxt_get_eeprom_length_op(struct rte_eth_dev *dev)
+ 	uint32_t entry_length;
@@ -30,2 +31,2 @@
-@@ -3618,8 +3618,8 @@ bnxt_get_eeprom_op(struct rte_eth_dev *dev,
- 		return rc;
+@@ -2929,8 +2929,8 @@ bnxt_get_eeprom_op(struct rte_eth_dev *dev,
+ 	uint32_t offset;
@@ -43,2 +44,2 @@
-@@ -3694,8 +3694,8 @@ bnxt_set_eeprom_op(struct rte_eth_dev *dev,
- 		return rc;
+@@ -3000,8 +3000,8 @@ bnxt_set_eeprom_op(struct rte_eth_dev *dev,
+ 	uint16_t type, ext, ordinal, attr;


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

* [dpdk-stable] patch 'net/bnxt: do not log error if stats queried before start' has been queued to LTS release 18.11.7
  2020-02-14 17:02 [dpdk-stable] patch 'net/virtio-user: do not close tap when disabling queue pairs' has been queued to LTS release 18.11.7 Kevin Traynor
                   ` (14 preceding siblings ...)
  2020-02-14 17:03 ` [dpdk-stable] patch 'net/bnxt: use macro for PCI log format' " Kevin Traynor
@ 2020-02-14 17:03 ` Kevin Traynor
  2020-02-14 17:03 ` [dpdk-stable] patch 'net/bnxt: remove unnecessary memset' " Kevin Traynor
                   ` (25 subsequent siblings)
  41 siblings, 0 replies; 43+ messages in thread
From: Kevin Traynor @ 2020-02-14 17:03 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: Ajit Khaparde, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.7

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable-queue

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable-queue/commit/35b43f2c6315c2442d1d54b9a52a4d3f522b9e8c

Thanks.

Kevin.

---
From 35b43f2c6315c2442d1d54b9a52a4d3f522b9e8c Mon Sep 17 00:00:00 2001
From: Stephen Hemminger <stephen@networkplumber.org>
Date: Wed, 22 Jan 2020 09:55:13 -0800
Subject: [PATCH] net/bnxt: do not log error if stats queried before start

[ upstream commit d21e0fcc07cdecaaa177f21941bce5be4d333f67 ]

When using pktgen lots of unnecessary errors are printed
because pktgen queries statistics before device is started.

Fixes: 3e92fd4e4ec0 ("net/bnxt: use dynamic log type")

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
 drivers/net/bnxt/bnxt_stats.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/net/bnxt/bnxt_stats.c b/drivers/net/bnxt/bnxt_stats.c
index 497da0ba35..3846c7d896 100644
--- a/drivers/net/bnxt/bnxt_stats.c
+++ b/drivers/net/bnxt/bnxt_stats.c
@@ -386,8 +386,6 @@ int bnxt_stats_get_op(struct rte_eth_dev *eth_dev,
 
 	memset(bnxt_stats, 0, sizeof(*bnxt_stats));
-	if (!(bp->flags & BNXT_FLAG_INIT_DONE)) {
-		PMD_DRV_LOG(ERR, "Device Initialization not complete!\n");
+	if (!(bp->flags & BNXT_FLAG_INIT_DONE))
 		return -EIO;
-	}
 
 	num_q_stats = RTE_MIN(bp->rx_cp_nr_rings,
-- 
2.21.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-02-14 17:02:37.984879729 +0000
+++ 0017-net-bnxt-do-not-log-error-if-stats-queried-before-st.patch	2020-02-14 17:02:36.949407980 +0000
@@ -1 +1 @@
-From d21e0fcc07cdecaaa177f21941bce5be4d333f67 Mon Sep 17 00:00:00 2001
+From 35b43f2c6315c2442d1d54b9a52a4d3f522b9e8c Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit d21e0fcc07cdecaaa177f21941bce5be4d333f67 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -19 +20 @@
-index 20a16a629f..65f90e0d85 100644
+index 497da0ba35..3846c7d896 100644
@@ -22 +23 @@
-@@ -391,8 +391,6 @@ int bnxt_stats_get_op(struct rte_eth_dev *eth_dev,
+@@ -386,8 +386,6 @@ int bnxt_stats_get_op(struct rte_eth_dev *eth_dev,


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

* [dpdk-stable] patch 'net/bnxt: remove unnecessary memset' has been queued to LTS release 18.11.7
  2020-02-14 17:02 [dpdk-stable] patch 'net/virtio-user: do not close tap when disabling queue pairs' has been queued to LTS release 18.11.7 Kevin Traynor
                   ` (15 preceding siblings ...)
  2020-02-14 17:03 ` [dpdk-stable] patch 'net/bnxt: do not log error if stats queried before start' " Kevin Traynor
@ 2020-02-14 17:03 ` Kevin Traynor
  2020-02-14 17:03 ` [dpdk-stable] patch 'net/tap: fix memory leak when unregister intr handler' " Kevin Traynor
                   ` (24 subsequent siblings)
  41 siblings, 0 replies; 43+ messages in thread
From: Kevin Traynor @ 2020-02-14 17:03 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: Ajit Khaparde, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.7

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable-queue

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable-queue/commit/8ff12f49be30266fe8c9f1839afb8ce1f7100e41

Thanks.

Kevin.

---
From 8ff12f49be30266fe8c9f1839afb8ce1f7100e41 Mon Sep 17 00:00:00 2001
From: Stephen Hemminger <stephen@networkplumber.org>
Date: Wed, 22 Jan 2020 09:55:14 -0800
Subject: [PATCH] net/bnxt: remove unnecessary memset

[ upstream commit 77a2a3c81d1df0776cbca8adaf1163b1dbdf9b6f ]

The rte_ethdev layer already zeros statistics before calling
the device.

Fixes: 57d5e5bc86e4 ("net/bnxt: add statistics")

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
 drivers/net/bnxt/bnxt_stats.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/net/bnxt/bnxt_stats.c b/drivers/net/bnxt/bnxt_stats.c
index 3846c7d896..ed93c19b03 100644
--- a/drivers/net/bnxt/bnxt_stats.c
+++ b/drivers/net/bnxt/bnxt_stats.c
@@ -385,5 +385,4 @@ int bnxt_stats_get_op(struct rte_eth_dev *eth_dev,
 	unsigned int num_q_stats;
 
-	memset(bnxt_stats, 0, sizeof(*bnxt_stats));
 	if (!(bp->flags & BNXT_FLAG_INIT_DONE))
 		return -EIO;
-- 
2.21.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-02-14 17:02:38.035519604 +0000
+++ 0018-net-bnxt-remove-unnecessary-memset.patch	2020-02-14 17:02:36.950407959 +0000
@@ -1 +1 @@
-From 77a2a3c81d1df0776cbca8adaf1163b1dbdf9b6f Mon Sep 17 00:00:00 2001
+From 8ff12f49be30266fe8c9f1839afb8ce1f7100e41 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 77a2a3c81d1df0776cbca8adaf1163b1dbdf9b6f ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -19 +20 @@
-index 65f90e0d85..32f112b5ba 100644
+index 3846c7d896..ed93c19b03 100644
@@ -22,2 +23,2 @@
-@@ -390,5 +390,4 @@ int bnxt_stats_get_op(struct rte_eth_dev *eth_dev,
- 		return rc;
+@@ -385,5 +385,4 @@ int bnxt_stats_get_op(struct rte_eth_dev *eth_dev,
+ 	unsigned int num_q_stats;


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

* [dpdk-stable] patch 'net/tap: fix memory leak when unregister intr handler' has been queued to LTS release 18.11.7
  2020-02-14 17:02 [dpdk-stable] patch 'net/virtio-user: do not close tap when disabling queue pairs' has been queued to LTS release 18.11.7 Kevin Traynor
                   ` (16 preceding siblings ...)
  2020-02-14 17:03 ` [dpdk-stable] patch 'net/bnxt: remove unnecessary memset' " Kevin Traynor
@ 2020-02-14 17:03 ` Kevin Traynor
  2020-02-14 17:03 ` [dpdk-stable] patch 'net/bnx2x: fix reset of scan FP flag' " Kevin Traynor
                   ` (23 subsequent siblings)
  41 siblings, 0 replies; 43+ messages in thread
From: Kevin Traynor @ 2020-02-14 17:03 UTC (permalink / raw)
  To: Yunjian Wang; +Cc: Ferruh Yigit, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.7

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable-queue

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable-queue/commit/058e984cf3af93044abcb20b9ef96ff7224cdcf4

Thanks.

Kevin.

---
From 058e984cf3af93044abcb20b9ef96ff7224cdcf4 Mon Sep 17 00:00:00 2001
From: Yunjian Wang <wangyunjian@huawei.com>
Date: Tue, 21 Jan 2020 10:12:43 +0800
Subject: [PATCH] net/tap: fix memory leak when unregister intr handler

[ upstream commit c5f9911d34650768355573bc53e0b621760c4124 ]

The return check of function tap_lsc_intr_handle_set() is wrong, it should
be 0 or a positive number if success. So the intr_handle->intr_vec was not
been freed when tap_lsc_intr_handle_set() returned a positive number.

Fixes: 4870a8cdd968 ("net/tap: support Rx interrupt")

Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
 drivers/net/tap/rte_eth_tap.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/drivers/net/tap/rte_eth_tap.c b/drivers/net/tap/rte_eth_tap.c
index 775619331e..3a8aa44a73 100644
--- a/drivers/net/tap/rte_eth_tap.c
+++ b/drivers/net/tap/rte_eth_tap.c
@@ -1523,6 +1523,9 @@ tap_intr_handle_set(struct rte_eth_dev *dev, int set)
 
 	err = tap_lsc_intr_handle_set(dev, set);
-	if (err)
+	if (err < 0) {
+		if (!set)
+			tap_rx_intr_vec_set(dev, 0);
 		return err;
+	}
 	err = tap_rx_intr_vec_set(dev, set);
 	if (err && set)
-- 
2.21.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-02-14 17:02:38.086448727 +0000
+++ 0019-net-tap-fix-memory-leak-when-unregister-intr-handler.patch	2020-02-14 17:02:36.953407896 +0000
@@ -1 +1 @@
-From c5f9911d34650768355573bc53e0b621760c4124 Mon Sep 17 00:00:00 2001
+From 058e984cf3af93044abcb20b9ef96ff7224cdcf4 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit c5f9911d34650768355573bc53e0b621760c4124 ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -20 +21 @@
-index a13d8d50d7..05470a2115 100644
+index 775619331e..3a8aa44a73 100644
@@ -23 +24 @@
-@@ -1592,6 +1592,9 @@ tap_intr_handle_set(struct rte_eth_dev *dev, int set)
+@@ -1523,6 +1523,9 @@ tap_intr_handle_set(struct rte_eth_dev *dev, int set)


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

* [dpdk-stable] patch 'net/bnx2x: fix reset of scan FP flag' has been queued to LTS release 18.11.7
  2020-02-14 17:02 [dpdk-stable] patch 'net/virtio-user: do not close tap when disabling queue pairs' has been queued to LTS release 18.11.7 Kevin Traynor
                   ` (17 preceding siblings ...)
  2020-02-14 17:03 ` [dpdk-stable] patch 'net/tap: fix memory leak when unregister intr handler' " Kevin Traynor
@ 2020-02-14 17:03 ` Kevin Traynor
  2020-02-14 17:03 ` [dpdk-stable] patch 'net/bnx2x: fix to sync fastpath Rx queue access' " Kevin Traynor
                   ` (22 subsequent siblings)
  41 siblings, 0 replies; 43+ messages in thread
From: Kevin Traynor @ 2020-02-14 17:03 UTC (permalink / raw)
  To: Rasesh Mody; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.7

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable-queue

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable-queue/commit/bf70c73cc8dc32d6ce62cbd84d82cd72f678394e

Thanks.

Kevin.

---
From bf70c73cc8dc32d6ce62cbd84d82cd72f678394e Mon Sep 17 00:00:00 2001
From: Rasesh Mody <rmody@marvell.com>
Date: Sun, 26 Jan 2020 14:54:18 -0800
Subject: [PATCH] net/bnx2x: fix reset of scan FP flag

[ upstream commit d836d5efb93505ad86f72c0fcfb0f650858b96ac ]

The fastpath task queue handler resets the fastpath scan flag
unconditionally, this patch changes that to reset the flag
only if it was set.

Fixes: 08a6e472c3d7 ("net/bnx2x: fix packet drop")

Signed-off-by: Rasesh Mody <rmody@marvell.com>
---
 drivers/net/bnx2x/bnx2x.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/bnx2x/bnx2x.c b/drivers/net/bnx2x/bnx2x.c
index 3b034b1e9d..ab18fe2e56 100644
--- a/drivers/net/bnx2x/bnx2x.c
+++ b/drivers/net/bnx2x/bnx2x.c
@@ -4576,8 +4576,8 @@ static void bnx2x_handle_fp_tq(struct bnx2x_fastpath *fp)
 			return;
 		}
+		/* We have completed slow path completion, clear the flag */
+		rte_atomic32_set(&sc->scan_fp, 0);
 	}
 
-	/* Assuming we have completed slow path completion, clear the flag */
-	rte_atomic32_set(&sc->scan_fp, 0);
 	bnx2x_ack_sb(sc, fp->igu_sb_id, USTORM_ID,
 		   le16toh(fp->fp_hc_idx), IGU_INT_ENABLE, 1);
-- 
2.21.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-02-14 17:02:38.142485142 +0000
+++ 0020-net-bnx2x-fix-reset-of-scan-FP-flag.patch	2020-02-14 17:02:36.967407604 +0000
@@ -1 +1 @@
-From d836d5efb93505ad86f72c0fcfb0f650858b96ac Mon Sep 17 00:00:00 2001
+From bf70c73cc8dc32d6ce62cbd84d82cd72f678394e Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit d836d5efb93505ad86f72c0fcfb0f650858b96ac ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -19 +20 @@
-index ed31335ac5..50e289b286 100644
+index 3b034b1e9d..ab18fe2e56 100644
@@ -22 +23 @@
-@@ -4578,8 +4578,8 @@ static void bnx2x_handle_fp_tq(struct bnx2x_fastpath *fp)
+@@ -4576,8 +4576,8 @@ static void bnx2x_handle_fp_tq(struct bnx2x_fastpath *fp)


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

* [dpdk-stable] patch 'net/bnx2x: fix to sync fastpath Rx queue access' has been queued to LTS release 18.11.7
  2020-02-14 17:02 [dpdk-stable] patch 'net/virtio-user: do not close tap when disabling queue pairs' has been queued to LTS release 18.11.7 Kevin Traynor
                   ` (18 preceding siblings ...)
  2020-02-14 17:03 ` [dpdk-stable] patch 'net/bnx2x: fix reset of scan FP flag' " Kevin Traynor
@ 2020-02-14 17:03 ` Kevin Traynor
  2020-02-14 17:03 ` [dpdk-stable] patch 'net/bnxt: fix alloc filter to use a common routine' " Kevin Traynor
                   ` (21 subsequent siblings)
  41 siblings, 0 replies; 43+ messages in thread
From: Kevin Traynor @ 2020-02-14 17:03 UTC (permalink / raw)
  To: Rasesh Mody; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.7

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable-queue

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable-queue/commit/c7afc147a41e78e89a1f86f27337e35593d38cd0

Thanks.

Kevin.

---
From c7afc147a41e78e89a1f86f27337e35593d38cd0 Mon Sep 17 00:00:00 2001
From: Rasesh Mody <rmody@marvell.com>
Date: Sun, 26 Jan 2020 14:54:19 -0800
Subject: [PATCH] net/bnx2x: fix to sync fastpath Rx queue access

[ upstream commit 141c86f55f734c4f8b9ad3129b6e58807b5c4577 ]

PMD handles fast path completions in the Rx handler and control path
completions in the interrupt handler. They both are processing
completions from the same fastpath completion queue. There is a
potential for race condition when these two paths are processing
the completions from the same queue and trying to updating Rx Producer.

Add a fastpath Rx lock between these two paths to close this race.

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

Signed-off-by: Rasesh Mody <rmody@marvell.com>
---
 drivers/net/bnx2x/bnx2x.c      | 12 ++++++++++++
 drivers/net/bnx2x/bnx2x.h      |  3 +++
 drivers/net/bnx2x/bnx2x_rxtx.c |  8 +++++++-
 3 files changed, 22 insertions(+), 1 deletion(-)

diff --git a/drivers/net/bnx2x/bnx2x.c b/drivers/net/bnx2x/bnx2x.c
index ab18fe2e56..b217a9f655 100644
--- a/drivers/net/bnx2x/bnx2x.c
+++ b/drivers/net/bnx2x/bnx2x.c
@@ -1168,4 +1168,8 @@ static int bnx2x_has_rx_work(struct bnx2x_fastpath *fp)
 		     MAX_RCQ_ENTRIES(rxq)))
 		rx_cq_cons_sb++;
+
+	PMD_RX_LOG(DEBUG, "hw CQ cons = %d, sw CQ cons = %d",
+		   rx_cq_cons_sb, rxq->rx_cq_head);
+
 	return rxq->rx_cq_head != rx_cq_cons_sb;
 }
@@ -1250,7 +1254,10 @@ static uint8_t bnx2x_rxeof(struct bnx2x_softc *sc, struct bnx2x_fastpath *fp)
 	uint16_t hw_cq_cons, sw_cq_cons, sw_cq_prod;
 
+	rte_spinlock_lock(&(fp)->rx_mtx);
+
 	rxq = sc->rx_queues[fp->index];
 	if (!rxq) {
 		PMD_RX_LOG(ERR, "RX queue %d is NULL", fp->index);
+		rte_spinlock_unlock(&(fp)->rx_mtx);
 		return 0;
 	}
@@ -1322,7 +1329,12 @@ next_cqe:
 	rxq->rx_cq_tail = sw_cq_prod;
 
+	PMD_RX_LOG(DEBUG, "BD prod = %d, sw CQ prod = %d",
+		   bd_prod_fw, sw_cq_prod);
+
 	/* Update producers */
 	bnx2x_update_rx_prod(sc, fp, bd_prod_fw, sw_cq_prod);
 
+	rte_spinlock_unlock(&(fp)->rx_mtx);
+
 	return sw_cq_cons != hw_cq_cons;
 }
diff --git a/drivers/net/bnx2x/bnx2x.h b/drivers/net/bnx2x/bnx2x.h
index ceaecb031f..fd49b9a3af 100644
--- a/drivers/net/bnx2x/bnx2x.h
+++ b/drivers/net/bnx2x/bnx2x.h
@@ -375,4 +375,7 @@ struct bnx2x_fastpath {
 	struct bnx2x_softc *sc;
 
+	/* Used to synchronize fastpath Rx access */
+	rte_spinlock_t rx_mtx;
+
 	/* status block */
 	struct bnx2x_dma                 sb_dma;
diff --git a/drivers/net/bnx2x/bnx2x_rxtx.c b/drivers/net/bnx2x/bnx2x_rxtx.c
index e5a2b25b56..71ebdf3f6b 100644
--- a/drivers/net/bnx2x/bnx2x_rxtx.c
+++ b/drivers/net/bnx2x/bnx2x_rxtx.c
@@ -345,4 +345,6 @@ bnx2x_recv_pkts(void *p_rxq, struct rte_mbuf **rx_pkts, uint16_t nb_pkts)
 	struct rte_mbuf *rx_mb = NULL;
 
+	rte_spinlock_lock(&(fp)->rx_mtx);
+
 	hw_cq_cons = le16toh(*fp->rx_cq_cons_sb);
 	if ((hw_cq_cons & USABLE_RCQ_ENTRIES_PER_PAGE) ==
@@ -356,6 +358,8 @@ bnx2x_recv_pkts(void *p_rxq, struct rte_mbuf **rx_pkts, uint16_t nb_pkts)
 	sw_cq_prod = rxq->rx_cq_tail;
 
-	if (sw_cq_cons == hw_cq_cons)
+	if (sw_cq_cons == hw_cq_cons) {
+		rte_spinlock_unlock(&(fp)->rx_mtx);
 		return 0;
+	}
 
 	while (nb_rx < nb_pkts && sw_cq_cons != hw_cq_cons) {
@@ -438,4 +442,6 @@ next_rx:
 	bnx2x_upd_rx_prod_fast(sc, fp, bd_prod, sw_cq_prod);
 
+	rte_spinlock_unlock(&(fp)->rx_mtx);
+
 	return nb_rx;
 }
-- 
2.21.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-02-14 17:02:38.206272383 +0000
+++ 0021-net-bnx2x-fix-to-sync-fastpath-Rx-queue-access.patch	2020-02-14 17:02:36.983407271 +0000
@@ -1 +1 @@
-From 141c86f55f734c4f8b9ad3129b6e58807b5c4577 Mon Sep 17 00:00:00 2001
+From c7afc147a41e78e89a1f86f27337e35593d38cd0 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 141c86f55f734c4f8b9ad3129b6e58807b5c4577 ]
+
@@ -15 +16,0 @@
-Cc: stable@dpdk.org
@@ -25 +26 @@
-index 50e289b286..0b4030e2b9 100644
+index ab18fe2e56..b217a9f655 100644
@@ -62 +63 @@
-index 3383c76759..1dbc98197d 100644
+index ceaecb031f..fd49b9a3af 100644
@@ -65 +66 @@
-@@ -361,4 +361,7 @@ struct bnx2x_fastpath {
+@@ -375,4 +375,7 @@ struct bnx2x_fastpath {
@@ -74 +75 @@
-index ae97dfee36..0d77035844 100644
+index e5a2b25b56..71ebdf3f6b 100644
@@ -77 +78 @@
-@@ -347,4 +347,6 @@ bnx2x_recv_pkts(void *p_rxq, struct rte_mbuf **rx_pkts, uint16_t nb_pkts)
+@@ -345,4 +345,6 @@ bnx2x_recv_pkts(void *p_rxq, struct rte_mbuf **rx_pkts, uint16_t nb_pkts)
@@ -84 +85 @@
-@@ -358,6 +360,8 @@ bnx2x_recv_pkts(void *p_rxq, struct rte_mbuf **rx_pkts, uint16_t nb_pkts)
+@@ -356,6 +358,8 @@ bnx2x_recv_pkts(void *p_rxq, struct rte_mbuf **rx_pkts, uint16_t nb_pkts)
@@ -94 +95 @@
-@@ -440,4 +444,6 @@ next_rx:
+@@ -438,4 +442,6 @@ next_rx:


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

* [dpdk-stable] patch 'net/bnxt: fix alloc filter to use a common routine' has been queued to LTS release 18.11.7
  2020-02-14 17:02 [dpdk-stable] patch 'net/virtio-user: do not close tap when disabling queue pairs' has been queued to LTS release 18.11.7 Kevin Traynor
                   ` (19 preceding siblings ...)
  2020-02-14 17:03 ` [dpdk-stable] patch 'net/bnx2x: fix to sync fastpath Rx queue access' " Kevin Traynor
@ 2020-02-14 17:03 ` Kevin Traynor
  2020-02-14 17:03 ` [dpdk-stable] patch 'net/bnxt: remove redundant if statement' " Kevin Traynor
                   ` (20 subsequent siblings)
  41 siblings, 0 replies; 43+ messages in thread
From: Kevin Traynor @ 2020-02-14 17:03 UTC (permalink / raw)
  To: Somnath Kotur; +Cc: Kalesh AP, Ajit Khaparde, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.7

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable-queue

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable-queue/commit/c6d8600be81319300bb147eee91c812bc5bc2b5d

Thanks.

Kevin.

---
From c6d8600be81319300bb147eee91c812bc5bc2b5d Mon Sep 17 00:00:00 2001
From: Somnath Kotur <somnath.kotur@broadcom.com>
Date: Tue, 28 Jan 2020 12:59:15 +0530
Subject: [PATCH] net/bnxt: fix alloc filter to use a common routine

[ upstream commit 2b3879f8e39d10a7c57ad718195af3b686e94a9c ]

Invoke bnxt_get_unused_filter() inside bnxt_alloc_filter() so that
all filters are allocated from one common routine.

Fixes: f92735db1e4c ("net/bnxt: add L2 filter alloc/init/free")

Reviewed-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Signed-off-by: Somnath Kotur <somnath.kotur@broadcom.com>
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
 drivers/net/bnxt/bnxt_filter.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/net/bnxt/bnxt_filter.c b/drivers/net/bnxt/bnxt_filter.c
index ca00708522..b64ae1b20e 100644
--- a/drivers/net/bnxt/bnxt_filter.c
+++ b/drivers/net/bnxt/bnxt_filter.c
@@ -27,11 +27,9 @@ struct bnxt_filter_info *bnxt_alloc_filter(struct bnxt *bp)
 	struct bnxt_filter_info *filter;
 
-	/* Find the 1st unused filter from the free_filter_list pool*/
-	filter = STAILQ_FIRST(&bp->free_filter_list);
+	filter = bnxt_get_unused_filter(bp);
 	if (!filter) {
 		PMD_DRV_LOG(ERR, "No more free filter resources\n");
 		return NULL;
 	}
-	STAILQ_REMOVE_HEAD(&bp->free_filter_list, next);
 
 	/* Default to L2 MAC Addr filter */
-- 
2.21.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-02-14 17:02:38.271491671 +0000
+++ 0022-net-bnxt-fix-alloc-filter-to-use-a-common-routine.patch	2020-02-14 17:02:36.984407250 +0000
@@ -1 +1 @@
-From 2b3879f8e39d10a7c57ad718195af3b686e94a9c Mon Sep 17 00:00:00 2001
+From c6d8600be81319300bb147eee91c812bc5bc2b5d Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 2b3879f8e39d10a7c57ad718195af3b686e94a9c ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -20 +21 @@
-index b31f10479e..e2184334f7 100644
+index ca00708522..b64ae1b20e 100644
@@ -35 +36 @@
- 	filter->mac_index = INVALID_MAC_INDEX;
+ 	/* Default to L2 MAC Addr filter */


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

* [dpdk-stable] patch 'net/bnxt: remove redundant if statement' has been queued to LTS release 18.11.7
  2020-02-14 17:02 [dpdk-stable] patch 'net/virtio-user: do not close tap when disabling queue pairs' has been queued to LTS release 18.11.7 Kevin Traynor
                   ` (20 preceding siblings ...)
  2020-02-14 17:03 ` [dpdk-stable] patch 'net/bnxt: fix alloc filter to use a common routine' " Kevin Traynor
@ 2020-02-14 17:03 ` Kevin Traynor
  2020-02-14 17:03 ` [dpdk-stable] patch 'net/bnx2x: fix VLAN stripped flag' " Kevin Traynor
                   ` (19 subsequent siblings)
  41 siblings, 0 replies; 43+ messages in thread
From: Kevin Traynor @ 2020-02-14 17:03 UTC (permalink / raw)
  To: Kalesh AP; +Cc: Somnath Kotur, Ajit Khaparde, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.7

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable-queue

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable-queue/commit/1b234f85b3f218cbb3248fd3afd096c594666410

Thanks.

Kevin.

---
From 1b234f85b3f218cbb3248fd3afd096c594666410 Mon Sep 17 00:00:00 2001
From: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Date: Tue, 28 Jan 2020 12:59:18 +0530
Subject: [PATCH] net/bnxt: remove redundant if statement

[ upstream commit cc73dfd0418ed6ca14256677e639c35d82c1e051 ]

Since "eth_dev->data->dev_started" has been assigned to 0 at the
beginning of bnxt_dev_stop_op() routine, the code inside the if()
condition is redundant. Remove it.

Anyways "eth_dev->data->dev_link.link_status" will be set to 0 in
bnxt_dev_set_link_down_op() later in the routine.

Fixes: 316e412299fd ("net/bnxt: fix crash when closing")

Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Signed-off-by: Somnath Kotur <somnath.kotur@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
 drivers/net/bnxt/bnxt_ethdev.c | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
index 6d7c430030..06dfbf3ec9 100644
--- a/drivers/net/bnxt/bnxt_ethdev.c
+++ b/drivers/net/bnxt/bnxt_ethdev.c
@@ -664,8 +664,4 @@ static void bnxt_dev_stop_op(struct rte_eth_dev *eth_dev)
 
 	bp->flags &= ~BNXT_FLAG_INIT_DONE;
-	if (bp->eth_dev->data->dev_started) {
-		/* TBD: STOP HW queues DMA */
-		eth_dev->data->dev_link.link_status = 0;
-	}
 	bnxt_dev_set_link_down_op(eth_dev);
 
-- 
2.21.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-02-14 17:02:38.320900303 +0000
+++ 0023-net-bnxt-remove-redundant-if-statement.patch	2020-02-14 17:02:36.987407187 +0000
@@ -1 +1 @@
-From cc73dfd0418ed6ca14256677e639c35d82c1e051 Mon Sep 17 00:00:00 2001
+From 1b234f85b3f218cbb3248fd3afd096c594666410 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit cc73dfd0418ed6ca14256677e639c35d82c1e051 ]
+
@@ -14 +15,0 @@
-Cc: stable@dpdk.org
@@ -24 +25 @@
-index fc3f1a8db8..267a36148c 100644
+index 6d7c430030..06dfbf3ec9 100644
@@ -27 +28 @@
-@@ -949,8 +949,4 @@ static void bnxt_dev_stop_op(struct rte_eth_dev *eth_dev)
+@@ -664,8 +664,4 @@ static void bnxt_dev_stop_op(struct rte_eth_dev *eth_dev)


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

* [dpdk-stable] patch 'net/bnx2x: fix VLAN stripped flag' has been queued to LTS release 18.11.7
  2020-02-14 17:02 [dpdk-stable] patch 'net/virtio-user: do not close tap when disabling queue pairs' has been queued to LTS release 18.11.7 Kevin Traynor
                   ` (21 preceding siblings ...)
  2020-02-14 17:03 ` [dpdk-stable] patch 'net/bnxt: remove redundant if statement' " Kevin Traynor
@ 2020-02-14 17:03 ` Kevin Traynor
  2020-02-14 17:03 ` [dpdk-stable] patch 'net/mlx5: fix VXLAN-GPE item translation' " Kevin Traynor
                   ` (18 subsequent siblings)
  41 siblings, 0 replies; 43+ messages in thread
From: Kevin Traynor @ 2020-02-14 17:03 UTC (permalink / raw)
  To: Rasesh Mody; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.7

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable-queue

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable-queue/commit/9dd5f380b3a8147e90e9657a578df5376fede361

Thanks.

Kevin.

---
From 9dd5f380b3a8147e90e9657a578df5376fede361 Mon Sep 17 00:00:00 2001
From: Rasesh Mody <rmody@marvell.com>
Date: Tue, 28 Jan 2020 17:43:13 -0800
Subject: [PATCH] net/bnx2x: fix VLAN stripped flag

[ upstream commit 4b4650296ab4f970946c4c7502938f99ec7ea952 ]

For VLAN packet the tci is saved in rx_mb->vlan_tci, however the
STRIPPED offload flag is not set along with PKT_RX_VLAN flag.
Set the PKT_RX_VLAN_STRIPPED flag as well.

Fixes: 380a7aab1ae2 ("mbuf: rename deprecated VLAN flags")
Fixes: b37b528d957c ("mbuf: add new Rx flags for stripped VLAN")

Signed-off-by: Rasesh Mody <rmody@marvell.com>
---
 drivers/net/bnx2x/bnx2x_rxtx.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/bnx2x/bnx2x_rxtx.c b/drivers/net/bnx2x/bnx2x_rxtx.c
index 71ebdf3f6b..a8ce791ebc 100644
--- a/drivers/net/bnx2x/bnx2x_rxtx.c
+++ b/drivers/net/bnx2x/bnx2x_rxtx.c
@@ -417,5 +417,5 @@ bnx2x_recv_pkts(void *p_rxq, struct rte_mbuf **rx_pkts, uint16_t nb_pkts)
 		if (cqe_fp->pars_flags.flags & PARSING_FLAGS_VLAN) {
 			rx_mb->vlan_tci = cqe_fp->vlan_tag;
-			rx_mb->ol_flags |= PKT_RX_VLAN;
+			rx_mb->ol_flags |= PKT_RX_VLAN | PKT_RX_VLAN_STRIPPED;
 		}
 
-- 
2.21.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-02-14 17:02:38.376930929 +0000
+++ 0024-net-bnx2x-fix-VLAN-stripped-flag.patch	2020-02-14 17:02:36.988407166 +0000
@@ -1 +1 @@
-From 4b4650296ab4f970946c4c7502938f99ec7ea952 Mon Sep 17 00:00:00 2001
+From 9dd5f380b3a8147e90e9657a578df5376fede361 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 4b4650296ab4f970946c4c7502938f99ec7ea952 ]
+
@@ -12 +13,0 @@
-Cc: stable@dpdk.org
@@ -20 +21 @@
-index 0d77035844..e201b68db8 100644
+index 71ebdf3f6b..a8ce791ebc 100644
@@ -23 +24 @@
-@@ -419,5 +419,5 @@ bnx2x_recv_pkts(void *p_rxq, struct rte_mbuf **rx_pkts, uint16_t nb_pkts)
+@@ -417,5 +417,5 @@ bnx2x_recv_pkts(void *p_rxq, struct rte_mbuf **rx_pkts, uint16_t nb_pkts)


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

* [dpdk-stable] patch 'net/mlx5: fix VXLAN-GPE item translation' has been queued to LTS release 18.11.7
  2020-02-14 17:02 [dpdk-stable] patch 'net/virtio-user: do not close tap when disabling queue pairs' has been queued to LTS release 18.11.7 Kevin Traynor
                   ` (22 preceding siblings ...)
  2020-02-14 17:03 ` [dpdk-stable] patch 'net/bnx2x: fix VLAN stripped flag' " Kevin Traynor
@ 2020-02-14 17:03 ` Kevin Traynor
  2020-02-14 17:03 ` [dpdk-stable] patch 'net/octeontx: fix memory leak of MAC address table' " Kevin Traynor
                   ` (17 subsequent siblings)
  41 siblings, 0 replies; 43+ messages in thread
From: Kevin Traynor @ 2020-02-14 17:03 UTC (permalink / raw)
  To: Raslan Darawsheh; +Cc: Matan Azrad, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.7

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable-queue

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable-queue/commit/681c0e0487c48ba811da3c936eb69fe6956b37f0

Thanks.

Kevin.

---
From 681c0e0487c48ba811da3c936eb69fe6956b37f0 Mon Sep 17 00:00:00 2001
From: Raslan Darawsheh <rasland@mellanox.com>
Date: Mon, 27 Jan 2020 17:34:12 +0200
Subject: [PATCH] net/mlx5: fix VXLAN-GPE item translation

[ upstream commit 90456726eb801df50b98803678427ec8881ff0af ]

Currently, when using VXLAN-GPE or VXLAN item in the flow
both are being treated the same with flags 0x8 in VXLAN
header. Which mean the matching of the item VXLAN-GPE
will match any VXLAN packet.

This fixes the translation of VXLAN GPE item into PMD flow
item. Which will by default set the flags to VXLAN-GPE
to be 0xc.

Fixes: 3d69434113d1 ("net/mlx5: add Direct Verbs validation function")

Signed-off-by: Raslan Darawsheh <rasland@mellanox.com>
Acked-by: Matan Azrad <matan@mellanox.com>
---
 drivers/net/mlx5/mlx5_flow_dv.c | 75 ++++++++++++++++++++++++++++++++-
 1 file changed, 73 insertions(+), 2 deletions(-)

diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c
index b854e66dcb..04c0a5813b 100644
--- a/drivers/net/mlx5/mlx5_flow_dv.c
+++ b/drivers/net/mlx5/mlx5_flow_dv.c
@@ -1652,4 +1652,74 @@ flow_dv_translate_item_vxlan(void *matcher, void *key,
 }
 
+/**
+ * Add VXLAN-GPE item to matcher and to the value.
+ *
+ * @param[in, out] matcher
+ *   Flow matcher.
+ * @param[in, out] key
+ *   Flow matcher value.
+ * @param[in] item
+ *   Flow pattern to translate.
+ * @param[in] inner
+ *   Item is inner pattern.
+ */
+
+static void
+flow_dv_translate_item_vxlan_gpe(void *matcher, void *key,
+				 const struct rte_flow_item *item, int inner)
+{
+	const struct rte_flow_item_vxlan_gpe *vxlan_m = item->mask;
+	const struct rte_flow_item_vxlan_gpe *vxlan_v = item->spec;
+	void *headers_m;
+	void *headers_v;
+	void *misc_m =
+		MLX5_ADDR_OF(fte_match_param, matcher, misc_parameters_3);
+	void *misc_v =
+		MLX5_ADDR_OF(fte_match_param, key, misc_parameters_3);
+	char *vni_m;
+	char *vni_v;
+	uint16_t dport;
+	int size;
+	int i;
+	uint8_t flags_m = 0xff;
+	uint8_t flags_v = 0xc;
+
+	if (inner) {
+		headers_m = MLX5_ADDR_OF(fte_match_param, matcher,
+					 inner_headers);
+		headers_v = MLX5_ADDR_OF(fte_match_param, key, inner_headers);
+	} else {
+		headers_m = MLX5_ADDR_OF(fte_match_param, matcher,
+					 outer_headers);
+		headers_v = MLX5_ADDR_OF(fte_match_param, key, outer_headers);
+	}
+	dport = item->type == RTE_FLOW_ITEM_TYPE_VXLAN ?
+		MLX5_UDP_PORT_VXLAN : MLX5_UDP_PORT_VXLAN_GPE;
+	if (!MLX5_GET16(fte_match_set_lyr_2_4, headers_v, udp_dport)) {
+		MLX5_SET(fte_match_set_lyr_2_4, headers_m, udp_dport, 0xFFFF);
+		MLX5_SET(fte_match_set_lyr_2_4, headers_v, udp_dport, dport);
+	}
+	if (!vxlan_v)
+		return;
+	if (!vxlan_m)
+		vxlan_m = &rte_flow_item_vxlan_gpe_mask;
+	size = sizeof(vxlan_m->vni);
+	vni_m = MLX5_ADDR_OF(fte_match_set_misc3, misc_m, outer_vxlan_gpe_vni);
+	vni_v = MLX5_ADDR_OF(fte_match_set_misc3, misc_v, outer_vxlan_gpe_vni);
+	memcpy(vni_m, vxlan_m->vni, size);
+	for (i = 0; i < size; ++i)
+		vni_v[i] = vni_m[i] & vxlan_v->vni[i];
+	if (vxlan_m->flags) {
+		flags_m = vxlan_m->flags;
+		flags_v = vxlan_v->flags;
+	}
+	MLX5_SET(fte_match_set_misc3, misc_m, outer_vxlan_gpe_flags, flags_m);
+	MLX5_SET(fte_match_set_misc3, misc_v, outer_vxlan_gpe_flags, flags_v);
+	MLX5_SET(fte_match_set_misc3, misc_m, outer_vxlan_gpe_next_protocol,
+		 vxlan_m->protocol);
+	MLX5_SET(fte_match_set_misc3, misc_v, outer_vxlan_gpe_next_protocol,
+		 vxlan_v->protocol);
+}
+
 /**
  * Add MPLS item to matcher and to the value.
@@ -2151,6 +2221,7 @@ flow_dv_translate(struct rte_eth_dev *dev,
 			break;
 		case RTE_FLOW_ITEM_TYPE_VXLAN_GPE:
-			flow_dv_translate_item_vxlan(match_mask, match_value,
-						     items, tunnel);
+			flow_dv_translate_item_vxlan_gpe(match_mask,
+							 match_value, items,
+							 tunnel);
 			last_item = MLX5_FLOW_LAYER_VXLAN_GPE;
 			break;
-- 
2.21.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-02-14 17:02:38.425466352 +0000
+++ 0025-net-mlx5-fix-VXLAN-GPE-item-translation.patch	2020-02-14 17:02:36.991407104 +0000
@@ -1 +1 @@
-From 90456726eb801df50b98803678427ec8881ff0af Mon Sep 17 00:00:00 2001
+From 681c0e0487c48ba811da3c936eb69fe6956b37f0 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 90456726eb801df50b98803678427ec8881ff0af ]
+
@@ -16 +17,0 @@
-Cc: stable@dpdk.org
@@ -25 +26 @@
-index d51d17d877..2878393b17 100644
+index b854e66dcb..04c0a5813b 100644
@@ -28 +29 @@
-@@ -5779,4 +5779,74 @@ flow_dv_translate_item_vxlan(void *matcher, void *key,
+@@ -1652,4 +1652,74 @@ flow_dv_translate_item_vxlan(void *matcher, void *key,
@@ -102,2 +103,2 @@
-  * Add Geneve item to matcher and to the value.
-@@ -7560,6 +7630,7 @@ cnt_err:
+  * Add MPLS item to matcher and to the value.
+@@ -2151,6 +2221,7 @@ flow_dv_translate(struct rte_eth_dev *dev,


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

* [dpdk-stable] patch 'net/octeontx: fix memory leak of MAC address table' has been queued to LTS release 18.11.7
  2020-02-14 17:02 [dpdk-stable] patch 'net/virtio-user: do not close tap when disabling queue pairs' has been queued to LTS release 18.11.7 Kevin Traynor
                   ` (23 preceding siblings ...)
  2020-02-14 17:03 ` [dpdk-stable] patch 'net/mlx5: fix VXLAN-GPE item translation' " Kevin Traynor
@ 2020-02-14 17:03 ` Kevin Traynor
  2020-02-14 17:03 ` [dpdk-stable] patch 'app/testpmd: fix uninitialized members of MPLS' " Kevin Traynor
                   ` (16 subsequent siblings)
  41 siblings, 0 replies; 43+ messages in thread
From: Kevin Traynor @ 2020-02-14 17:03 UTC (permalink / raw)
  To: Sunil Kumar Kori; +Cc: Harman Kalra, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.7

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable-queue

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable-queue/commit/693ba0f9ed0df1e3731f11c19ba2452568edb64b

Thanks.

Kevin.

---
From 693ba0f9ed0df1e3731f11c19ba2452568edb64b Mon Sep 17 00:00:00 2001
From: Sunil Kumar Kori <skori@marvell.com>
Date: Wed, 29 Jan 2020 14:47:04 +0530
Subject: [PATCH] net/octeontx: fix memory leak of MAC address table

[ upstream commit 9e399b88ce2f103165512d4005611a1f709deb1d ]

MAC address table is allocated during octeontx device create and
same is used to maintain list of MAC address associated to port.
This table is not getting freed niether in case of error nor during
graceful shutdown of port.

Patch fixes memory required memory for both the cases as mentioned.

Fixes: f18b146c498d ("net/octeontx: create ethdev ports")

Signed-off-by: Sunil Kumar Kori <skori@marvell.com>
Acked-by: Harman Kalra <hkalra@marvell.com>
---
 drivers/net/octeontx/octeontx_ethdev.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/drivers/net/octeontx/octeontx_ethdev.c b/drivers/net/octeontx/octeontx_ethdev.c
index 046e129865..ac193ace43 100644
--- a/drivers/net/octeontx/octeontx_ethdev.c
+++ b/drivers/net/octeontx/octeontx_ethdev.c
@@ -347,4 +347,8 @@ octeontx_dev_close(struct rte_eth_dev *dev)
 	}
 
+	/* Free MAC address table */
+	rte_free(dev->data->mac_addrs);
+	dev->data->mac_addrs = NULL;
+
 	dev->tx_pkt_burst = NULL;
 	dev->rx_pkt_burst = NULL;
@@ -1082,5 +1086,5 @@ octeontx_create(struct rte_vdev_device *dev, int port, uint8_t evdev,
 				data->port_id, nic->port_id);
 		res = -EINVAL;
-		goto err;
+		goto free_mac_addrs;
 	}
 
@@ -1101,4 +1105,6 @@ octeontx_create(struct rte_vdev_device *dev, int port, uint8_t evdev,
 	return data->port_id;
 
+free_mac_addrs:
+	rte_free(data->mac_addrs);
 err:
 	if (nic)
-- 
2.21.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-02-14 17:02:38.487112707 +0000
+++ 0026-net-octeontx-fix-memory-leak-of-MAC-address-table.patch	2020-02-14 17:02:36.993407062 +0000
@@ -1 +1 @@
-From 9e399b88ce2f103165512d4005611a1f709deb1d Mon Sep 17 00:00:00 2001
+From 693ba0f9ed0df1e3731f11c19ba2452568edb64b Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 9e399b88ce2f103165512d4005611a1f709deb1d ]
+
@@ -14 +15,0 @@
-Cc: stable@dpdk.org
@@ -23 +24 @@
-index e23162d8a6..40d9d67dab 100644
+index 046e129865..ac193ace43 100644
@@ -26 +27 @@
-@@ -352,4 +352,8 @@ octeontx_dev_close(struct rte_eth_dev *dev)
+@@ -347,4 +347,8 @@ octeontx_dev_close(struct rte_eth_dev *dev)
@@ -35 +36 @@
-@@ -1144,5 +1148,5 @@ octeontx_create(struct rte_vdev_device *dev, int port, uint8_t evdev,
+@@ -1082,5 +1086,5 @@ octeontx_create(struct rte_vdev_device *dev, int port, uint8_t evdev,
@@ -42 +43 @@
-@@ -1163,4 +1167,6 @@ octeontx_create(struct rte_vdev_device *dev, int port, uint8_t evdev,
+@@ -1101,4 +1105,6 @@ octeontx_create(struct rte_vdev_device *dev, int port, uint8_t evdev,


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

* [dpdk-stable] patch 'app/testpmd: fix uninitialized members of MPLS' has been queued to LTS release 18.11.7
  2020-02-14 17:02 [dpdk-stable] patch 'net/virtio-user: do not close tap when disabling queue pairs' has been queued to LTS release 18.11.7 Kevin Traynor
                   ` (24 preceding siblings ...)
  2020-02-14 17:03 ` [dpdk-stable] patch 'net/octeontx: fix memory leak of MAC address table' " Kevin Traynor
@ 2020-02-14 17:03 ` Kevin Traynor
  2020-02-14 17:03 ` [dpdk-stable] patch 'app/testpmd: fix initial value when setting PFC' " Kevin Traynor
                   ` (15 subsequent siblings)
  41 siblings, 0 replies; 43+ messages in thread
From: Kevin Traynor @ 2020-02-14 17:03 UTC (permalink / raw)
  To: Ori Kam; +Cc: Ferruh Yigit, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.7

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable-queue

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable-queue/commit/2f1a2defab638d4ead5d07720c488966608fafc2

Thanks.

Kevin.

---
From 2f1a2defab638d4ead5d07720c488966608fafc2 Mon Sep 17 00:00:00 2001
From: Ori Kam <orika@mellanox.com>
Date: Thu, 30 Jan 2020 16:59:35 +0000
Subject: [PATCH] app/testpmd: fix uninitialized members of MPLS

[ upstream commit 56d5c1eedf22a1d384120466e6004faf9933d113 ]

Some of the members of the MPLS struct are not initialized.
This commit init the uninitialized members.

Coverity issue: 325735
Fixes: 3e77031be855 ("app/testpmd: add MPLSoGRE encapsulation")

Signed-off-by: Ori Kam <orika@mellanox.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
 app/test-pmd/cmdline_flow.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/app/test-pmd/cmdline_flow.c b/app/test-pmd/cmdline_flow.c
index d1fd273272..daba39ddfc 100644
--- a/app/test-pmd/cmdline_flow.c
+++ b/app/test-pmd/cmdline_flow.c
@@ -3857,5 +3857,7 @@ parse_vc_action_mplsogre_decap(struct context *ctx, const struct token *token,
 		.protocol = rte_cpu_to_be_16(ETHER_TYPE_MPLS_UNICAST),
 	};
-	struct rte_flow_item_mpls mpls;
+	struct rte_flow_item_mpls mpls = {
+		.ttl = 0,
+	};
 	uint8_t *header;
 	int ret;
-- 
2.21.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-02-14 17:02:38.539444332 +0000
+++ 0027-app-testpmd-fix-uninitialized-members-of-MPLS.patch	2020-02-14 17:02:36.997406978 +0000
@@ -1 +1 @@
-From 56d5c1eedf22a1d384120466e6004faf9933d113 Mon Sep 17 00:00:00 2001
+From 2f1a2defab638d4ead5d07720c488966608fafc2 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 56d5c1eedf22a1d384120466e6004faf9933d113 ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -20 +21 @@
-index e99e24c29f..c2cc4c57b8 100644
+index d1fd273272..daba39ddfc 100644
@@ -23 +24 @@
-@@ -4577,5 +4577,7 @@ parse_vc_action_mplsogre_encap(struct context *ctx, const struct token *token,
+@@ -3857,5 +3857,7 @@ parse_vc_action_mplsogre_decap(struct context *ctx, const struct token *token,


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

* [dpdk-stable] patch 'app/testpmd: fix initial value when setting PFC' has been queued to LTS release 18.11.7
  2020-02-14 17:02 [dpdk-stable] patch 'net/virtio-user: do not close tap when disabling queue pairs' has been queued to LTS release 18.11.7 Kevin Traynor
                   ` (25 preceding siblings ...)
  2020-02-14 17:03 ` [dpdk-stable] patch 'app/testpmd: fix uninitialized members of MPLS' " Kevin Traynor
@ 2020-02-14 17:03 ` Kevin Traynor
  2020-02-14 17:03 ` [dpdk-stable] patch 'app/testpmd: fix uninitialized members " Kevin Traynor
                   ` (14 subsequent siblings)
  41 siblings, 0 replies; 43+ messages in thread
From: Kevin Traynor @ 2020-02-14 17:03 UTC (permalink / raw)
  To: Wei Hu (Xavier); +Cc: Huisong Li, Xuan Li, Ferruh Yigit, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.7

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable-queue

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable-queue/commit/0592a1a35d1f51c5d50dfd86ecc26f3484fe3ab0

Thanks.

Kevin.

---
From 0592a1a35d1f51c5d50dfd86ecc26f3484fe3ab0 Mon Sep 17 00:00:00 2001
From: "Wei Hu (Xavier)" <xavier.huwei@huawei.com>
Date: Tue, 21 Jan 2020 19:44:32 +0800
Subject: [PATCH] app/testpmd: fix initial value when setting PFC

[ upstream commit 3b687ec6e11b506bd9971b6ac536f6d89f5c6d56 ]

Currently, the initial values of the local structure variable named
rx_tx_onoff_2_lfc_mode and rx_tx_onoff_2_pfc_mode are different in the
similar part of these two following functions:
	cmd_link_flow_ctrl_set_parsed
	cmd_priority_flow_ctrl_set_parsed
1) The code snippset in cmd_link_flow_ctrl_set_parsed function:
	static enum rte_eth_fc_mode rx_tx_onoff_2_lfc_mode[2][2] = {
	    {RTE_FC_NONE, RTE_FC_TX_PAUSE}, {RTE_FC_RX_PAUSE, RTE_FC_FULL}
	};

	if (!cmd || cmd == &cmd_link_flow_control_set_rx)
		rx_fc_en = (!strcmp(res->rx_lfc_mode, "on")) ? 1 : 0;
	if (!cmd || cmd == &cmd_link_flow_control_set_tx)
		tx_fc_en = (!strcmp(res->tx_lfc_mode, "on")) ? 1 : 0;

	fc_conf.mode = rx_tx_onoff_2_lfc_mode[rx_fc_en][tx_fc_en];
	<...>
	ret = rte_eth_dev_flow_ctrl_set(res->port_id, &fc_conf);
	<...>
2) The code snippset in cmd_priority_flow_ctrl_set_parsed function:
	static enum rte_eth_fc_mode rx_tx_onoff_2_pfc_mode[2][2] = {
	    {RTE_FC_NONE, RTE_FC_RX_PAUSE}, {RTE_FC_TX_PAUSE, RTE_FC_FULL}
	};

	rx_fc_enable = (!strncmp(res->rx_pfc_mode, "on",2)) ? 1 : 0;
	tx_fc_enable = (!strncmp(res->tx_pfc_mode, "on",2)) ? 1 : 0;
	pfc_conf.fc.mode =
		 rx_tx_onoff_2_pfc_mode[rx_fc_enable][tx_fc_enable];
	<...>
	ret = rte_eth_dev_priority_flow_ctrl_set(res->port_id, &pfc_conf);
	<...>
The initial value of rx_tx_onoff_2_pfc_mode is wrong, it should be the
same as rx_tx_onoff_2_lfc_mode.

Fixes: 9b53e542e9e1 ("app/testpmd: add priority flow control")

Signed-off-by: Huisong Li <lihuisong@huawei.com>
Signed-off-by: Wei Hu (Xavier) <xavier.huwei@huawei.com>
Signed-off-by: Xuan Li <lixuan47@hisilicon.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
 app/test-pmd/cmdline.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c
index 7c90457cd3..a8b53b89cf 100644
--- a/app/test-pmd/cmdline.c
+++ b/app/test-pmd/cmdline.c
@@ -6900,5 +6900,5 @@ cmd_priority_flow_ctrl_set_parsed(void *parsed_result,
 	 */
 	static enum rte_eth_fc_mode rx_tx_onoff_2_pfc_mode[2][2] = {
-			{RTE_FC_NONE, RTE_FC_RX_PAUSE}, {RTE_FC_TX_PAUSE, RTE_FC_FULL}
+		{RTE_FC_NONE, RTE_FC_TX_PAUSE}, {RTE_FC_RX_PAUSE, RTE_FC_FULL}
 	};
 
-- 
2.21.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-02-14 17:02:38.598875844 +0000
+++ 0028-app-testpmd-fix-initial-value-when-setting-PFC.patch	2020-02-14 17:02:37.017406561 +0000
@@ -1 +1 @@
-From 3b687ec6e11b506bd9971b6ac536f6d89f5c6d56 Mon Sep 17 00:00:00 2001
+From 0592a1a35d1f51c5d50dfd86ecc26f3484fe3ab0 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 3b687ec6e11b506bd9971b6ac536f6d89f5c6d56 ]
+
@@ -41 +42,0 @@
-Cc: stable@dpdk.org
@@ -52 +53 @@
-index 3126548fcd..06672fd04e 100644
+index 7c90457cd3..a8b53b89cf 100644
@@ -55 +56 @@
-@@ -7087,5 +7087,5 @@ cmd_priority_flow_ctrl_set_parsed(void *parsed_result,
+@@ -6900,5 +6900,5 @@ cmd_priority_flow_ctrl_set_parsed(void *parsed_result,


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

* [dpdk-stable] patch 'app/testpmd: fix uninitialized members when setting PFC' has been queued to LTS release 18.11.7
  2020-02-14 17:02 [dpdk-stable] patch 'net/virtio-user: do not close tap when disabling queue pairs' has been queued to LTS release 18.11.7 Kevin Traynor
                   ` (26 preceding siblings ...)
  2020-02-14 17:03 ` [dpdk-stable] patch 'app/testpmd: fix initial value when setting PFC' " Kevin Traynor
@ 2020-02-14 17:03 ` Kevin Traynor
  2020-02-14 17:03 ` [dpdk-stable] patch 'net/failsafe: fix reported hash key size in device info' " Kevin Traynor
                   ` (13 subsequent siblings)
  41 siblings, 0 replies; 43+ messages in thread
From: Kevin Traynor @ 2020-02-14 17:03 UTC (permalink / raw)
  To: Wei Hu (Xavier); +Cc: Huisong Li, Xuan Li, Ferruh Yigit, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.7

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable-queue

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable-queue/commit/cd25180193ae4d4162025b0be5ecfb93b3b93562

Thanks.

Kevin.

---
From cd25180193ae4d4162025b0be5ecfb93b3b93562 Mon Sep 17 00:00:00 2001
From: "Wei Hu (Xavier)" <xavier.huwei@huawei.com>
Date: Tue, 21 Jan 2020 19:44:33 +0800
Subject: [PATCH] app/testpmd: fix uninitialized members when setting PFC

[ upstream commit 8a433297282662460a951882c80b5b0d5a8d88cf ]

Only a part of members in the local structure variable named pfc_conf
are initialized in the function named cmd_priority_flow_ctrl_set_parsed
when typing "set pfc_ctrl..." command, and others are random values.
However, those uninitialized members may cause failure.

This patch adds clearing zero operation before calling the API named
rte_eth_dev_priority_flow_ctrl_set API with pfc_conf as the input
parameter.

Fixes: 9b53e542e9e1 ("app/testpmd: add priority flow control")

Signed-off-by: Huisong Li <lihuisong@huawei.com>
Signed-off-by: Wei Hu (Xavier) <xavier.huwei@huawei.com>
Signed-off-by: Xuan Li <lixuan47@hisilicon.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
 app/test-pmd/cmdline.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c
index a8b53b89cf..27ce5d1880 100644
--- a/app/test-pmd/cmdline.c
+++ b/app/test-pmd/cmdline.c
@@ -6903,4 +6903,5 @@ cmd_priority_flow_ctrl_set_parsed(void *parsed_result,
 	};
 
+	memset(&pfc_conf, 0, sizeof(struct rte_eth_pfc_conf));
 	rx_fc_enable = (!strncmp(res->rx_pfc_mode, "on",2)) ? 1 : 0;
 	tx_fc_enable = (!strncmp(res->tx_pfc_mode, "on",2)) ? 1 : 0;
-- 
2.21.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-02-14 17:02:38.668524239 +0000
+++ 0029-app-testpmd-fix-uninitialized-members-when-setting-P.patch	2020-02-14 17:02:37.037406144 +0000
@@ -1 +1 @@
-From 8a433297282662460a951882c80b5b0d5a8d88cf Mon Sep 17 00:00:00 2001
+From cd25180193ae4d4162025b0be5ecfb93b3b93562 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 8a433297282662460a951882c80b5b0d5a8d88cf ]
+
@@ -16 +17,0 @@
-Cc: stable@dpdk.org
@@ -27 +28 @@
-index 06672fd04e..de7a695d74 100644
+index a8b53b89cf..27ce5d1880 100644
@@ -30 +31 @@
-@@ -7090,4 +7090,5 @@ cmd_priority_flow_ctrl_set_parsed(void *parsed_result,
+@@ -6903,4 +6903,5 @@ cmd_priority_flow_ctrl_set_parsed(void *parsed_result,


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

* [dpdk-stable] patch 'net/failsafe: fix reported hash key size in device info' has been queued to LTS release 18.11.7
  2020-02-14 17:02 [dpdk-stable] patch 'net/virtio-user: do not close tap when disabling queue pairs' has been queued to LTS release 18.11.7 Kevin Traynor
                   ` (27 preceding siblings ...)
  2020-02-14 17:03 ` [dpdk-stable] patch 'app/testpmd: fix uninitialized members " Kevin Traynor
@ 2020-02-14 17:03 ` Kevin Traynor
  2020-02-14 17:03 ` [dpdk-stable] patch 'vhost: fix crash on port deletion' " Kevin Traynor
                   ` (12 subsequent siblings)
  41 siblings, 0 replies; 43+ messages in thread
From: Kevin Traynor @ 2020-02-14 17:03 UTC (permalink / raw)
  To: Raslan Darawsheh; +Cc: Ferruh Yigit, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.7

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable-queue

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable-queue/commit/53d262578f17355eecc3659914fe6c4c7a548df0

Thanks.

Kevin.

---
From 53d262578f17355eecc3659914fe6c4c7a548df0 Mon Sep 17 00:00:00 2001
From: Raslan Darawsheh <rasland@mellanox.com>
Date: Tue, 4 Feb 2020 17:10:51 +0200
Subject: [PATCH] net/failsafe: fix reported hash key size in device info

[ upstream commit f9dd7539423b32c17c5b411260e696570fec4e2c ]

Hash key size is missing from reported device info.
This fills the hash key size in device info.

Fixes: 4586be3743d4 ("net/failsafe: fix reported device info")

Signed-off-by: Raslan Darawsheh <rasland@mellanox.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
 drivers/net/failsafe/failsafe_ops.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/net/failsafe/failsafe_ops.c b/drivers/net/failsafe/failsafe_ops.c
index a63e4edc57..595278bbf7 100644
--- a/drivers/net/failsafe/failsafe_ops.c
+++ b/drivers/net/failsafe/failsafe_ops.c
@@ -828,4 +828,6 @@ fs_dev_merge_info(struct rte_eth_dev_info *info,
 	info->tx_queue_offload_capa &= sinfo->tx_queue_offload_capa;
 	info->flow_type_rss_offloads &= sinfo->flow_type_rss_offloads;
+	info->hash_key_size = RTE_MIN(info->hash_key_size,
+				      sinfo->hash_key_size);
 }
 
@@ -876,4 +878,5 @@ fs_dev_infos_get(struct rte_eth_dev *dev,
 	infos->max_vfs = UINT16_MAX;
 	infos->max_vmdq_pools = UINT16_MAX;
+	infos->hash_key_size = UINT8_MAX;
 
 	/*
-- 
2.21.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-02-14 17:02:38.734399443 +0000
+++ 0030-net-failsafe-fix-reported-hash-key-size-in-device-in.patch	2020-02-14 17:02:37.039406102 +0000
@@ -1 +1 @@
-From f9dd7539423b32c17c5b411260e696570fec4e2c Mon Sep 17 00:00:00 2001
+From 53d262578f17355eecc3659914fe6c4c7a548df0 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit f9dd7539423b32c17c5b411260e696570fec4e2c ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -19 +20 @@
-index a87e49b97d..50f2aca4e7 100644
+index a63e4edc57..595278bbf7 100644
@@ -22 +23 @@
-@@ -1069,4 +1069,6 @@ fs_dev_merge_info(struct rte_eth_dev_info *info,
+@@ -828,4 +828,6 @@ fs_dev_merge_info(struct rte_eth_dev_info *info,
@@ -29 +30 @@
-@@ -1118,4 +1120,5 @@ fs_dev_infos_get(struct rte_eth_dev *dev,
+@@ -876,4 +878,5 @@ fs_dev_infos_get(struct rte_eth_dev *dev,


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

* [dpdk-stable] patch 'vhost: fix crash on port deletion' has been queued to LTS release 18.11.7
  2020-02-14 17:02 [dpdk-stable] patch 'net/virtio-user: do not close tap when disabling queue pairs' has been queued to LTS release 18.11.7 Kevin Traynor
                   ` (28 preceding siblings ...)
  2020-02-14 17:03 ` [dpdk-stable] patch 'net/failsafe: fix reported hash key size in device info' " Kevin Traynor
@ 2020-02-14 17:03 ` Kevin Traynor
  2020-02-14 17:03 ` [dpdk-stable] patch 'vhost: do not treat empty socket message as error' " Kevin Traynor
                   ` (11 subsequent siblings)
  41 siblings, 0 replies; 43+ messages in thread
From: Kevin Traynor @ 2020-02-14 17:03 UTC (permalink / raw)
  To: Zhike Wang; +Cc: Maxime Coquelin, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.7

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable-queue

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable-queue/commit/90b5ba739f5b9c89a6cc22f7b40c3b49c4668f5d

Thanks.

Kevin.

---
From 90b5ba739f5b9c89a6cc22f7b40c3b49c4668f5d Mon Sep 17 00:00:00 2001
From: Zhike Wang <wangzhike@jd.com>
Date: Thu, 16 Jan 2020 10:07:37 +0800
Subject: [PATCH] vhost: fix crash on port deletion

[ upstream commit 499fd8e5b89c2ce65d57875d0a7d67f3a7f2fb6b ]

The vhost_user_read_cb() and rte_vhost_driver_unregister()
can be called at the same time by 2 threads. Eg thread1
calls vhost_user_read_cb() and removes the vsocket from
conn_list, then thread2 calls rte_vhost_driver_unregister()
and frees the vsocket since it is NOT in the conn_list.
So thread1 will access invalid memory when trying to
reconnect.

The fix is to move the "removing of vsocket from conn_list"
to end of the vhost_user_read_cb(), then avoid the race
condition.

The core trace is:
Program terminated with signal 11, Segmentation fault.

Fixes: af1475918124 ("vhost: introduce API to start a specific driver")

Signed-off-by: Zhike Wang <wangzhike@jd.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
---
 lib/librte_vhost/socket.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/lib/librte_vhost/socket.c b/lib/librte_vhost/socket.c
index ea2fdb5529..6a57b27ec0 100644
--- a/lib/librte_vhost/socket.c
+++ b/lib/librte_vhost/socket.c
@@ -311,4 +311,9 @@ vhost_user_read_cb(int connfd, void *dat, int *remove)
 		vhost_destroy_device(conn->vid);
 
+		if (vsocket->reconnect) {
+			create_unix_socket(vsocket);
+			vhost_user_start_client(vsocket);
+		}
+
 		pthread_mutex_lock(&vsocket->conn_mutex);
 		TAILQ_REMOVE(&vsocket->conn_list, conn, next);
@@ -316,9 +321,4 @@ vhost_user_read_cb(int connfd, void *dat, int *remove)
 
 		free(conn);
-
-		if (vsocket->reconnect) {
-			create_unix_socket(vsocket);
-			vhost_user_start_client(vsocket);
-		}
 	}
 }
-- 
2.21.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-02-14 17:02:38.791544931 +0000
+++ 0031-vhost-fix-crash-on-port-deletion.patch	2020-02-14 17:02:37.040406081 +0000
@@ -1 +1 @@
-From 499fd8e5b89c2ce65d57875d0a7d67f3a7f2fb6b Mon Sep 17 00:00:00 2001
+From 90b5ba739f5b9c89a6cc22f7b40c3b49c4668f5d Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 499fd8e5b89c2ce65d57875d0a7d67f3a7f2fb6b ]
+
@@ -22 +23,0 @@
-Cc: stable@dpdk.org
@@ -31 +32 @@
-index 9740fb3403..85c64485c2 100644
+index ea2fdb5529..6a57b27ec0 100644
@@ -34 +35 @@
-@@ -319,4 +319,9 @@ vhost_user_read_cb(int connfd, void *dat, int *remove)
+@@ -311,4 +311,9 @@ vhost_user_read_cb(int connfd, void *dat, int *remove)
@@ -44 +45 @@
-@@ -324,9 +329,4 @@ vhost_user_read_cb(int connfd, void *dat, int *remove)
+@@ -316,9 +321,4 @@ vhost_user_read_cb(int connfd, void *dat, int *remove)


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

* [dpdk-stable] patch 'vhost: do not treat empty socket message as error' has been queued to LTS release 18.11.7
  2020-02-14 17:02 [dpdk-stable] patch 'net/virtio-user: do not close tap when disabling queue pairs' has been queued to LTS release 18.11.7 Kevin Traynor
                   ` (29 preceding siblings ...)
  2020-02-14 17:03 ` [dpdk-stable] patch 'vhost: fix crash on port deletion' " Kevin Traynor
@ 2020-02-14 17:03 ` Kevin Traynor
  2020-02-14 17:03 ` [dpdk-stable] patch 'vhost/crypto: fix fetch size' " Kevin Traynor
                   ` (10 subsequent siblings)
  41 siblings, 0 replies; 43+ messages in thread
From: Kevin Traynor @ 2020-02-14 17:03 UTC (permalink / raw)
  To: Vitaliy Mysak; +Cc: Tiwei Bie, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.7

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable-queue

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable-queue/commit/51c2aa612ee8b59ca0d4cd92303f1d58e470cc5c

Thanks.

Kevin.

---
From 51c2aa612ee8b59ca0d4cd92303f1d58e470cc5c Mon Sep 17 00:00:00 2001
From: Vitaliy Mysak <vitaliy.mysak@intel.com>
Date: Thu, 30 Jan 2020 09:05:39 +0100
Subject: [PATCH] vhost: do not treat empty socket message as error

[ upstream commit bedf87c521902d1caeb0974fe9d3344584b849b5 ]

According to recvmsg() specification, 0 is a valid
return code when client is disconnecting.
Therefore, it should not be reported as error, unless there
are other dependencies that require message to not be empty.
But there are none, since the next immediate caller of recvmsg()
reports "vhost peer closed" info (not error) when message is empty.

This patch changes return code check for recvmsg() so that
misleading error message is not printed when the code is 0.

Fixes: 8f972312b8f4 ("vhost: support vhost-user")

Signed-off-by: Vitaliy Mysak <vitaliy.mysak@intel.com>
Reviewed-by: Tiwei Bie <tiwei.bie@intel.com>
---
 lib/librte_vhost/socket.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/lib/librte_vhost/socket.c b/lib/librte_vhost/socket.c
index 6a57b27ec0..75f6703f56 100644
--- a/lib/librte_vhost/socket.c
+++ b/lib/librte_vhost/socket.c
@@ -126,5 +126,6 @@ read_fd_message(int sockfd, char *buf, int buflen, int *fds, int max_fds,
 	ret = recvmsg(sockfd, &msgh, 0);
 	if (ret <= 0) {
-		RTE_LOG(ERR, VHOST_CONFIG, "recvmsg failed\n");
+		if (ret)
+			RTE_LOG(ERR, VHOST_CONFIG, "recvmsg failed\n");
 		return ret;
 	}
-- 
2.21.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-02-14 17:02:38.848267063 +0000
+++ 0032-vhost-do-not-treat-empty-socket-message-as-error.patch	2020-02-14 17:02:37.042406039 +0000
@@ -1 +1 @@
-From bedf87c521902d1caeb0974fe9d3344584b849b5 Mon Sep 17 00:00:00 2001
+From 51c2aa612ee8b59ca0d4cd92303f1d58e470cc5c Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit bedf87c521902d1caeb0974fe9d3344584b849b5 ]
+
@@ -17 +18,0 @@
-Cc: stable@dpdk.org
@@ -26 +27 @@
-index 85c64485c2..7c80121790 100644
+index 6a57b27ec0..75f6703f56 100644
@@ -29 +30 @@
-@@ -128,5 +128,6 @@ read_fd_message(int sockfd, char *buf, int buflen, int *fds, int max_fds,
+@@ -126,5 +126,6 @@ read_fd_message(int sockfd, char *buf, int buflen, int *fds, int max_fds,
@@ -32 +33 @@
--		VHOST_LOG_CONFIG(ERR, "recvmsg failed\n");
+-		RTE_LOG(ERR, VHOST_CONFIG, "recvmsg failed\n");
@@ -34 +35 @@
-+			VHOST_LOG_CONFIG(ERR, "recvmsg failed\n");
++			RTE_LOG(ERR, VHOST_CONFIG, "recvmsg failed\n");


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

* [dpdk-stable] patch 'vhost/crypto: fix fetch size' has been queued to LTS release 18.11.7
  2020-02-14 17:02 [dpdk-stable] patch 'net/virtio-user: do not close tap when disabling queue pairs' has been queued to LTS release 18.11.7 Kevin Traynor
                   ` (30 preceding siblings ...)
  2020-02-14 17:03 ` [dpdk-stable] patch 'vhost: do not treat empty socket message as error' " Kevin Traynor
@ 2020-02-14 17:03 ` Kevin Traynor
  2020-02-14 17:03 ` [dpdk-stable] patch 'vhost: fix packed virtqueue ready condition' " Kevin Traynor
                   ` (9 subsequent siblings)
  41 siblings, 0 replies; 43+ messages in thread
From: Kevin Traynor @ 2020-02-14 17:03 UTC (permalink / raw)
  To: Fan Zhang; +Cc: Maxime Coquelin, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.7

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable-queue

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable-queue/commit/c81fe7e2d8a8f45256018dad3d8d5ae11e19de9d

Thanks.

Kevin.

---
From c81fe7e2d8a8f45256018dad3d8d5ae11e19de9d Mon Sep 17 00:00:00 2001
From: Fan Zhang <roy.fan.zhang@intel.com>
Date: Wed, 29 Jan 2020 10:24:22 +0000
Subject: [PATCH] vhost/crypto: fix fetch size

[ upstream commit 03df3c7473dfd8f2efafe525b61ef980d0a68aa1 ]

This patch fixes the incorrect rte_vhost_crypto_fetch_requests
return value.

Coverity issue: 343401
Fixes: 3bb595ecd682 ("vhost/crypto: add request handler")

Signed-off-by: Fan Zhang <roy.fan.zhang@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
---
 lib/librte_vhost/vhost_crypto.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/lib/librte_vhost/vhost_crypto.c b/lib/librte_vhost/vhost_crypto.c
index d8a0f954b2..cf01c7ebe3 100644
--- a/lib/librte_vhost/vhost_crypto.c
+++ b/lib/librte_vhost/vhost_crypto.c
@@ -1530,10 +1530,10 @@ rte_vhost_crypto_fetch_requests(int vid, uint32_t qid,
 	if (unlikely(dev == NULL)) {
 		VC_LOG_ERR("Invalid vid %i", vid);
-		return -EINVAL;
+		return 0;
 	}
 
 	if (unlikely(qid >= VHOST_MAX_QUEUE_PAIRS)) {
 		VC_LOG_ERR("Invalid qid %u", qid);
-		return -EINVAL;
+		return 0;
 	}
 
@@ -1541,5 +1541,5 @@ rte_vhost_crypto_fetch_requests(int vid, uint32_t qid,
 	if (unlikely(vcrypto == NULL)) {
 		VC_LOG_ERR("Cannot find required data, is it initialized?");
-		return -ENOENT;
+		return 0;
 	}
 
@@ -1563,5 +1563,5 @@ rte_vhost_crypto_fetch_requests(int vid, uint32_t qid,
 				(void **)mbufs, count * 2) < 0)) {
 			VC_LOG_ERR("Insufficient memory");
-			return -ENOMEM;
+			return 0;
 		}
 
@@ -1593,5 +1593,5 @@ rte_vhost_crypto_fetch_requests(int vid, uint32_t qid,
 				(void **)mbufs, count) < 0)) {
 			VC_LOG_ERR("Insufficient memory");
-			return -ENOMEM;
+			return 0;
 		}
 
-- 
2.21.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-02-14 17:02:38.904271196 +0000
+++ 0033-vhost-crypto-fix-fetch-size.patch	2020-02-14 17:02:37.043406018 +0000
@@ -1 +1 @@
-From 03df3c7473dfd8f2efafe525b61ef980d0a68aa1 Mon Sep 17 00:00:00 2001
+From c81fe7e2d8a8f45256018dad3d8d5ae11e19de9d Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 03df3c7473dfd8f2efafe525b61ef980d0a68aa1 ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -20 +21 @@
-index 684fddc30b..68911972b6 100644
+index d8a0f954b2..cf01c7ebe3 100644
@@ -23 +24 @@
-@@ -1540,10 +1540,10 @@ rte_vhost_crypto_fetch_requests(int vid, uint32_t qid,
+@@ -1530,10 +1530,10 @@ rte_vhost_crypto_fetch_requests(int vid, uint32_t qid,
@@ -36 +37 @@
-@@ -1551,5 +1551,5 @@ rte_vhost_crypto_fetch_requests(int vid, uint32_t qid,
+@@ -1541,5 +1541,5 @@ rte_vhost_crypto_fetch_requests(int vid, uint32_t qid,
@@ -43 +44 @@
-@@ -1573,5 +1573,5 @@ rte_vhost_crypto_fetch_requests(int vid, uint32_t qid,
+@@ -1563,5 +1563,5 @@ rte_vhost_crypto_fetch_requests(int vid, uint32_t qid,
@@ -50 +51 @@
-@@ -1603,5 +1603,5 @@ rte_vhost_crypto_fetch_requests(int vid, uint32_t qid,
+@@ -1593,5 +1593,5 @@ rte_vhost_crypto_fetch_requests(int vid, uint32_t qid,


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

* [dpdk-stable] patch 'vhost: fix packed virtqueue ready condition' has been queued to LTS release 18.11.7
  2020-02-14 17:02 [dpdk-stable] patch 'net/virtio-user: do not close tap when disabling queue pairs' has been queued to LTS release 18.11.7 Kevin Traynor
                   ` (31 preceding siblings ...)
  2020-02-14 17:03 ` [dpdk-stable] patch 'vhost/crypto: fix fetch size' " Kevin Traynor
@ 2020-02-14 17:03 ` Kevin Traynor
  2020-02-14 17:03 ` [dpdk-stable] patch 'vhost: catch overflow causing mmap of size 0' " Kevin Traynor
                   ` (8 subsequent siblings)
  41 siblings, 0 replies; 43+ messages in thread
From: Kevin Traynor @ 2020-02-14 17:03 UTC (permalink / raw)
  To: Adrian Moreno; +Cc: Tiwei Bie, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.7

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable-queue

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable-queue/commit/b4cb3953daab620904b38b980f6a0911334bcd5b

Thanks.

Kevin.

---
From b4cb3953daab620904b38b980f6a0911334bcd5b Mon Sep 17 00:00:00 2001
From: Adrian Moreno <amorenoz@redhat.com>
Date: Sat, 25 Jan 2020 09:52:16 +0100
Subject: [PATCH] vhost: fix packed virtqueue ready condition

[ upstream commit c5a910dd92ecbad24f86b4c59b4ff8105b5149fd ]

Consider a virtqueue ready when, apart from the descriptor area,
both event suppression areas have been mapped.

Fixes: 2d1541e2b6b3 ("vhost: add vring address setup for packed queues")

Signed-off-by: Adrian Moreno <amorenoz@redhat.com>
Reviewed-by: Tiwei Bie <tiwei.bie@intel.com>
---
 lib/librte_vhost/vhost_user.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/lib/librte_vhost/vhost_user.c b/lib/librte_vhost/vhost_user.c
index 23a6bf8922..b9ecec5ba7 100644
--- a/lib/librte_vhost/vhost_user.c
+++ b/lib/librte_vhost/vhost_user.c
@@ -1271,5 +1271,6 @@ vq_is_ready(struct virtio_net *dev, struct vhost_virtqueue *vq)
 
 	if (vq_is_packed(dev))
-		rings_ok = !!vq->desc_packed;
+		rings_ok = vq->desc_packed && vq->driver_event &&
+			vq->device_event;
 	else
 		rings_ok = vq->desc && vq->avail && vq->used;
-- 
2.21.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-02-14 17:02:38.957538912 +0000
+++ 0034-vhost-fix-packed-virtqueue-ready-condition.patch	2020-02-14 17:02:37.046405956 +0000
@@ -1 +1 @@
-From c5a910dd92ecbad24f86b4c59b4ff8105b5149fd Mon Sep 17 00:00:00 2001
+From b4cb3953daab620904b38b980f6a0911334bcd5b Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit c5a910dd92ecbad24f86b4c59b4ff8105b5149fd ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -19 +20 @@
-index 69b84a8820..c9cc4d6489 100644
+index 23a6bf8922..b9ecec5ba7 100644
@@ -22 +23 @@
-@@ -1299,5 +1299,6 @@ vq_is_ready(struct virtio_net *dev, struct vhost_virtqueue *vq)
+@@ -1271,5 +1271,6 @@ vq_is_ready(struct virtio_net *dev, struct vhost_virtqueue *vq)


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

* [dpdk-stable] patch 'vhost: catch overflow causing mmap of size 0' has been queued to LTS release 18.11.7
  2020-02-14 17:02 [dpdk-stable] patch 'net/virtio-user: do not close tap when disabling queue pairs' has been queued to LTS release 18.11.7 Kevin Traynor
                   ` (32 preceding siblings ...)
  2020-02-14 17:03 ` [dpdk-stable] patch 'vhost: fix packed virtqueue ready condition' " Kevin Traynor
@ 2020-02-14 17:03 ` Kevin Traynor
  2020-02-14 17:03 ` [dpdk-stable] patch 'crypto/armv8: fix clang build' " Kevin Traynor
                   ` (7 subsequent siblings)
  41 siblings, 0 replies; 43+ messages in thread
From: Kevin Traynor @ 2020-02-14 17:03 UTC (permalink / raw)
  To: Maxime Coquelin; +Cc: Ilja Van Sprundel, Tiwei Bie, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.7

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable-queue

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable-queue/commit/6b3e0aa1624e47893c67e67900dcec586ebf0d99

Thanks.

Kevin.

---
From 6b3e0aa1624e47893c67e67900dcec586ebf0d99 Mon Sep 17 00:00:00 2001
From: Maxime Coquelin <maxime.coquelin@redhat.com>
Date: Thu, 16 Jan 2020 11:44:27 +0100
Subject: [PATCH] vhost: catch overflow causing mmap of size 0

[ upstream commit c6420a36328b9c6b71770aaa982abacd0e2440b8 ]

This patch catches an overflow that could happen if an
invalid region size or page alignment is provided by the
guest via the VHOST_USER_SET_MEM_TABLE request.

If the sum of the size to mmap and the alignment overflows
uint64_t, then RTE_ALIGN_CEIL(mmap_size, alignment) macro
will return 0. This value was passed as is as size argument
to mmap().

While kernel handling of mmap() syscall returns an error
if size is 0, it is better to catch it earlier and provide
a meaningful error log.

Fixes: ec09c280b839 ("vhost: fix mmap not aligned with hugepage size")

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

diff --git a/lib/librte_vhost/vhost_user.c b/lib/librte_vhost/vhost_user.c
index b9ecec5ba7..4c58880f8c 100644
--- a/lib/librte_vhost/vhost_user.c
+++ b/lib/librte_vhost/vhost_user.c
@@ -1118,4 +1118,19 @@ vhost_user_set_mem_table(struct virtio_net **pdev, struct VhostUserMsg *msg,
 		}
 		mmap_size = RTE_ALIGN_CEIL(mmap_size, alignment);
+		if (mmap_size == 0) {
+			/*
+			 * It could happen if initial mmap_size + alignment
+			 * overflows the sizeof uint64, which could happen if
+			 * either mmap_size or alignment value is wrong.
+			 *
+			 * mmap() kernel implementation would return an error,
+			 * but better catch it before and provide useful info
+			 * in the logs.
+			 */
+			RTE_LOG(ERR, VHOST_CONFIG, "mmap size (0x%" PRIx64 ") "
+					"or alignment (0x%" PRIx64 ") is invalid\n",
+					reg->size + mmap_offset, alignment);
+			goto err_mmap;
+		}
 
 		populate = (dev->dequeue_zero_copy) ? MAP_POPULATE : 0;
-- 
2.21.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-02-14 17:02:39.009405344 +0000
+++ 0035-vhost-catch-overflow-causing-mmap-of-size-0.patch	2020-02-14 17:02:37.048405914 +0000
@@ -1 +1 @@
-From c6420a36328b9c6b71770aaa982abacd0e2440b8 Mon Sep 17 00:00:00 2001
+From 6b3e0aa1624e47893c67e67900dcec586ebf0d99 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit c6420a36328b9c6b71770aaa982abacd0e2440b8 ]
+
@@ -20 +21,0 @@
-Cc: stable@dpdk.org
@@ -30 +31 @@
-index c9cc4d6489..9f14ea6676 100644
+index b9ecec5ba7..4c58880f8c 100644
@@ -33 +34 @@
-@@ -1146,4 +1146,19 @@ vhost_user_set_mem_table(struct virtio_net **pdev, struct VhostUserMsg *msg,
+@@ -1118,4 +1118,19 @@ vhost_user_set_mem_table(struct virtio_net **pdev, struct VhostUserMsg *msg,
@@ -46 +47 @@
-+			VHOST_LOG_CONFIG(ERR, "mmap size (0x%" PRIx64 ") "
++			RTE_LOG(ERR, VHOST_CONFIG, "mmap size (0x%" PRIx64 ") "


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

* [dpdk-stable] patch 'crypto/armv8: fix clang build' has been queued to LTS release 18.11.7
  2020-02-14 17:02 [dpdk-stable] patch 'net/virtio-user: do not close tap when disabling queue pairs' has been queued to LTS release 18.11.7 Kevin Traynor
                   ` (33 preceding siblings ...)
  2020-02-14 17:03 ` [dpdk-stable] patch 'vhost: catch overflow causing mmap of size 0' " Kevin Traynor
@ 2020-02-14 17:03 ` Kevin Traynor
  2020-02-14 17:03 ` [dpdk-stable] patch 'examples/fips_validation: fix cipher length for AES-GCM' " Kevin Traynor
                   ` (6 subsequent siblings)
  41 siblings, 0 replies; 43+ messages in thread
From: Kevin Traynor @ 2020-02-14 17:03 UTC (permalink / raw)
  To: Ruifeng Wang; +Cc: Honnappa Nagarahalli, Gavin Hu, Akhil Goyal, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.7

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable-queue

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable-queue/commit/8417ae2c5242dbf4c8d549121df01196d84adebd

Thanks.

Kevin.

---
From 8417ae2c5242dbf4c8d549121df01196d84adebd Mon Sep 17 00:00:00 2001
From: Ruifeng Wang <ruifeng.wang@arm.com>
Date: Thu, 23 Jan 2020 11:45:57 +0800
Subject: [PATCH] crypto/armv8: fix clang build

[ upstream commit 94b686e5026e2612038b8ea5382e22729553738a ]

1. Clang requires braces around initialization of subobject.
2. Clang complains implicit conversion of enumeration type.

Trapped issue with Clang version 8.0 and CONFIG_RTE_LIBRTE_PMD_ARMV8_CRYPTO
was set.
Error messages:
rte_armv8_pmd.c:144:2: error: suggest braces around initialization of
 subobject [-Werror,-Wmissing-braces]
        NULL
        ^~~~
        {   }
/usr/lib/llvm-8/lib/clang/8.0.0/include/stddef.h:105:16: note: expanded
 from macro 'NULL'
               ^~~~~~~~~~
rte_armv8_pmd.c:429:21: error: implicit conversion from enumeration
 type 'enum rte_crypto_cipher_operation' to different enumeration type
      'enum armv8_crypto_cipher_operation' [-Werror,-Wenum-conversion]
        cop = sess->cipher.direction;
            ~ ~~~~~~~~~~~~~^~~~~~~~~

Fixes: 169ca3db550c ("crypto/armv8: add PMD optimized for ARMv8 processors")

Signed-off-by: Ruifeng Wang <ruifeng.wang@arm.com>
Reviewed-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
Reviewed-by: Gavin Hu <gavin.hu@arm.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
---
 drivers/crypto/armv8/rte_armv8_pmd.c | 15 ++++++++++++---
 1 file changed, 12 insertions(+), 3 deletions(-)

diff --git a/drivers/crypto/armv8/rte_armv8_pmd.c b/drivers/crypto/armv8/rte_armv8_pmd.c
index 42b4795c7f..efdde399de 100644
--- a/drivers/crypto/armv8/rte_armv8_pmd.c
+++ b/drivers/crypto/armv8/rte_armv8_pmd.c
@@ -85,10 +85,10 @@ crypto_op_ca_encrypt = {
 static const crypto_func_tbl_t
 crypto_op_ca_decrypt = {
-	NULL
+	{ {NULL} }
 };
 
 static const crypto_func_tbl_t
 crypto_op_ac_encrypt = {
-	NULL
+	{ {NULL} }
 };
 
@@ -370,5 +370,14 @@ armv8_crypto_set_session_chained_parameters(struct armv8_crypto_session *sess,
 	sess->cipher.key.length = cipher_xform->cipher.key.length;
 	/* Set cipher direction */
-	cop = sess->cipher.direction;
+	switch (sess->cipher.direction) {
+	case RTE_CRYPTO_CIPHER_OP_ENCRYPT:
+		cop = ARMV8_CRYPTO_CIPHER_OP_ENCRYPT;
+		break;
+	case RTE_CRYPTO_CIPHER_OP_DECRYPT:
+		cop = ARMV8_CRYPTO_CIPHER_OP_DECRYPT;
+		break;
+	default:
+		return -ENOTSUP;
+	}
 	/* Set cipher algorithm */
 	calg = cipher_xform->cipher.algo;
-- 
2.21.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-02-14 17:02:39.063802199 +0000
+++ 0036-crypto-armv8-fix-clang-build.patch	2020-02-14 17:02:37.050405873 +0000
@@ -1 +1 @@
-From 94b686e5026e2612038b8ea5382e22729553738a Mon Sep 17 00:00:00 2001
+From 8417ae2c5242dbf4c8d549121df01196d84adebd Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 94b686e5026e2612038b8ea5382e22729553738a ]
+
@@ -27 +28,0 @@
-Cc: stable@dpdk.org
@@ -38 +39 @@
-index fd81408968..d2b7ab5e03 100644
+index 42b4795c7f..efdde399de 100644
@@ -41 +42 @@
-@@ -87,10 +87,10 @@ crypto_op_ca_encrypt = {
+@@ -85,10 +85,10 @@ crypto_op_ca_encrypt = {
@@ -54 +55 @@
-@@ -378,5 +378,14 @@ armv8_crypto_set_session_chained_parameters(struct armv8_crypto_session *sess,
+@@ -370,5 +370,14 @@ armv8_crypto_set_session_chained_parameters(struct armv8_crypto_session *sess,


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

* [dpdk-stable] patch 'examples/fips_validation: fix cipher length for AES-GCM' has been queued to LTS release 18.11.7
  2020-02-14 17:02 [dpdk-stable] patch 'net/virtio-user: do not close tap when disabling queue pairs' has been queued to LTS release 18.11.7 Kevin Traynor
                   ` (34 preceding siblings ...)
  2020-02-14 17:03 ` [dpdk-stable] patch 'crypto/armv8: fix clang build' " Kevin Traynor
@ 2020-02-14 17:03 ` Kevin Traynor
  2020-02-14 17:03 ` [dpdk-stable] patch 'common/cpt: remove redundant code in datapath' " Kevin Traynor
                   ` (5 subsequent siblings)
  41 siblings, 0 replies; 43+ messages in thread
From: Kevin Traynor @ 2020-02-14 17:03 UTC (permalink / raw)
  To: Sucharitha Sarananaga; +Cc: Archana Muniganti, Anoob Joseph, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.7

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable-queue

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable-queue/commit/f60724548145322e12b86169750d2c0418c7c61d

Thanks.

Kevin.

---
From f60724548145322e12b86169750d2c0418c7c61d Mon Sep 17 00:00:00 2001
From: Sucharitha Sarananaga <ssarananaga@marvell.com>
Date: Mon, 6 Jan 2020 15:03:11 +0530
Subject: [PATCH] examples/fips_validation: fix cipher length for AES-GCM

[ upstream commit 07f5e4553293cff259b7c44f1aa7bad7734eaca2 ]

Cipher length need to be updated in case of AES-GCM decryption.

Fixes: 4aaad2995e13 ("examples/fips_validation: support GCM parsing")

Signed-off-by: Archana Muniganti <marchana@marvell.com>
Signed-off-by: Sucharitha Sarananaga <ssarananaga@marvell.com>
Acked-by: Anoob Joseph <anoobj@marvell.com>
---
 examples/fips_validation/fips_validation_gcm.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/examples/fips_validation/fips_validation_gcm.c b/examples/fips_validation/fips_validation_gcm.c
index 0509b101a7..b121802e20 100644
--- a/examples/fips_validation/fips_validation_gcm.c
+++ b/examples/fips_validation/fips_validation_gcm.c
@@ -20,4 +20,5 @@
 #define AADLEN_STR	"AADlen = "
 #define TAGLEN_STR	"Taglen = "
+#define CTLEN_STR	"PTlen = "
 
 #define COUNT_STR	"Count = "
@@ -47,4 +48,5 @@ struct fips_test_callback gcm_interim_vectors[] = {
 		{IVLEN_STR, parser_read_uint32_bit_val, &vec.iv},
 		{PTLEN_STR, parser_read_uint32_bit_val, &vec.pt},
+		{CTLEN_STR, parser_read_uint32_bit_val, &vec.ct},
 		{AADLEN_STR, parser_read_uint32_bit_val, &vec.cipher_auth.aad},
 		{TAGLEN_STR, parser_read_uint32_bit_val,
-- 
2.21.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-02-14 17:02:39.118169995 +0000
+++ 0037-examples-fips_validation-fix-cipher-length-for-AES-G.patch	2020-02-14 17:02:37.050405873 +0000
@@ -1 +1 @@
-From 07f5e4553293cff259b7c44f1aa7bad7734eaca2 Mon Sep 17 00:00:00 2001
+From f60724548145322e12b86169750d2c0418c7c61d Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 07f5e4553293cff259b7c44f1aa7bad7734eaca2 ]
+
@@ -9 +10,0 @@
-Cc: stable@dpdk.org
@@ -19 +20 @@
-index ea48ddf707..f295025590 100644
+index 0509b101a7..b121802e20 100644
@@ -32 +33 @@
- 		{AADLEN_STR, parser_read_uint32_bit_val, &vec.aead.aad},
+ 		{AADLEN_STR, parser_read_uint32_bit_val, &vec.cipher_auth.aad},


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

* [dpdk-stable] patch 'common/cpt: remove redundant code in datapath' has been queued to LTS release 18.11.7
  2020-02-14 17:02 [dpdk-stable] patch 'net/virtio-user: do not close tap when disabling queue pairs' has been queued to LTS release 18.11.7 Kevin Traynor
                   ` (35 preceding siblings ...)
  2020-02-14 17:03 ` [dpdk-stable] patch 'examples/fips_validation: fix cipher length for AES-GCM' " Kevin Traynor
@ 2020-02-14 17:03 ` Kevin Traynor
  2020-02-14 17:03 ` [dpdk-stable] patch 'common/cpt: check cipher and auth keys are set' " Kevin Traynor
                   ` (4 subsequent siblings)
  41 siblings, 0 replies; 43+ messages in thread
From: Kevin Traynor @ 2020-02-14 17:03 UTC (permalink / raw)
  To: Anoob Joseph; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.7

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable-queue

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable-queue/commit/c1a928606a5874be10af5fa0bfa98f4ec57b34d8

Thanks.

Kevin.

---
From c1a928606a5874be10af5fa0bfa98f4ec57b34d8 Mon Sep 17 00:00:00 2001
From: Anoob Joseph <anoobj@marvell.com>
Date: Sat, 6 Jul 2019 18:53:40 +0530
Subject: [PATCH] common/cpt: remove redundant code in datapath

[ upstream commit 8de5ede7b61d9b1af40485755cfcd2d525a6c816 ]

Removing redundant checks and unused local variables from datapath.

Signed-off-by: Anoob Joseph <anoobj@marvell.com>
---
 drivers/common/cpt/cpt_ucode.h | 133 ++++++++-------------------------
 1 file changed, 33 insertions(+), 100 deletions(-)

diff --git a/drivers/common/cpt/cpt_ucode.h b/drivers/common/cpt/cpt_ucode.h
index f0632caf6a..3982239004 100644
--- a/drivers/common/cpt/cpt_ucode.h
+++ b/drivers/common/cpt/cpt_ucode.h
@@ -90,6 +90,5 @@ cpt_fc_ciph_validate_key_aes(uint16_t key_len)
 
 static __rte_always_inline int
-cpt_fc_ciph_validate_key(cipher_type_t type, struct cpt_ctx *cpt_ctx,
-		uint16_t key_len)
+cpt_fc_ciph_set_type(cipher_type_t type, struct cpt_ctx *ctx, uint16_t key_len)
 {
 	int fc_type = 0;
@@ -126,5 +125,5 @@ cpt_fc_ciph_validate_key(cipher_type_t type, struct cpt_ctx *cpt_ctx,
 			return -1;
 		/* No support for AEAD yet */
-		if (unlikely(cpt_ctx->hash_type))
+		if (unlikely(ctx->hash_type))
 			return -1;
 		fc_type = ZUC_SNOW3G;
@@ -135,5 +134,5 @@ cpt_fc_ciph_validate_key(cipher_type_t type, struct cpt_ctx *cpt_ctx,
 			return -1;
 		/* No support for AEAD yet */
-		if (unlikely(cpt_ctx->hash_type))
+		if (unlikely(ctx->hash_type))
 			return -1;
 		fc_type = KASUMI;
@@ -142,5 +141,7 @@ cpt_fc_ciph_validate_key(cipher_type_t type, struct cpt_ctx *cpt_ctx,
 		return -1;
 	}
-	return fc_type;
+
+	ctx->fc_type = fc_type;
+	return 0;
 }
 
@@ -182,5 +183,4 @@ cpt_fc_ciph_set_key_snow3g_uea2(struct cpt_ctx *cpt_ctx, uint8_t *key,
 	gen_key_snow3g(key, keyx);
 	memcpy(cpt_ctx->zs_ctx.ci_key, keyx, key_len);
-	cpt_ctx->fc_type = ZUC_SNOW3G;
 	cpt_ctx->zsk_flags = 0;
 }
@@ -193,5 +193,4 @@ cpt_fc_ciph_set_key_zuc_eea3(struct cpt_ctx *cpt_ctx, uint8_t *key,
 	memcpy(cpt_ctx->zs_ctx.ci_key, key, key_len);
 	memcpy(cpt_ctx->zs_ctx.zuc_const, zuc_d, 32);
-	cpt_ctx->fc_type = ZUC_SNOW3G;
 	cpt_ctx->zsk_flags = 0;
 }
@@ -204,5 +203,4 @@ cpt_fc_ciph_set_key_kasumi_f8_ecb(struct cpt_ctx *cpt_ctx, uint8_t *key,
 	memcpy(cpt_ctx->k_ctx.ci_key, key, key_len);
 	cpt_ctx->zsk_flags = 0;
-	cpt_ctx->fc_type = KASUMI;
 }
 
@@ -213,5 +211,4 @@ cpt_fc_ciph_set_key_kasumi_f8_cbc(struct cpt_ctx *cpt_ctx, uint8_t *key,
 	memcpy(cpt_ctx->k_ctx.ci_key, key, key_len);
 	cpt_ctx->zsk_flags = 0;
-	cpt_ctx->fc_type = KASUMI;
 }
 
@@ -223,13 +220,11 @@ cpt_fc_ciph_set_key(void *ctx, cipher_type_t type, uint8_t *key,
 	mc_fc_context_t *fctx = &cpt_ctx->fctx;
 	uint64_t *ctrl_flags = NULL;
-	int fc_type;
+	int ret;
 
-	/* Validate key before proceeding */
-	fc_type = cpt_fc_ciph_validate_key(type, cpt_ctx, key_len);
-	if (unlikely(fc_type == -1))
+	ret = cpt_fc_ciph_set_type(type, cpt_ctx, key_len);
+	if (unlikely(ret))
 		return -1;
 
-	if (fc_type == FC_GEN) {
-		cpt_ctx->fc_type = FC_GEN;
+	if (cpt_ctx->fc_type == FC_GEN) {
 		ctrl_flags = (uint64_t *)&(fctx->enc.enc_ctrl.flags);
 		*ctrl_flags = rte_be_to_cpu_64(*ctrl_flags);
@@ -469,5 +464,4 @@ cpt_digest_gen_prep(uint32_t flags,
 	struct cpt_request_info *req;
 	uint32_t size, i;
-	int32_t m_size;
 	uint16_t data_len, mac_len, key_len;
 	auth_type_t hash_type;
@@ -499,5 +493,4 @@ cpt_digest_gen_prep(uint32_t flags,
 	m_vaddr = meta_p->vaddr;
 	m_dma = meta_p->dma_addr;
-	m_size = meta_p->size;
 
 	/*
@@ -515,5 +508,4 @@ cpt_digest_gen_prep(uint32_t flags,
 	m_vaddr = (uint8_t *)m_vaddr + size;
 	m_dma += size;
-	m_size -= size;
 
 	req = m_vaddr;
@@ -522,5 +514,4 @@ cpt_digest_gen_prep(uint32_t flags,
 	m_vaddr = (uint8_t *)m_vaddr + size;
 	m_dma += size;
-	m_size -= size;
 
 	hash_type = ctx->hash_type;
@@ -635,5 +626,4 @@ cpt_digest_gen_prep(uint32_t flags,
 	m_vaddr = (uint8_t *)m_vaddr + size;
 	m_dma += size;
-	m_size -= size;
 
 	/* cpt alternate completion address saved earlier */
@@ -693,5 +683,4 @@ cpt_enc_hmac_prep(uint32_t flags,
 	void *c_vaddr;
 	uint64_t c_dma;
-	int32_t m_size;
 	opcode_info_t opcode;
 
@@ -699,5 +688,4 @@ cpt_enc_hmac_prep(uint32_t flags,
 	m_vaddr = meta_p->vaddr;
 	m_dma = meta_p->dma_addr;
-	m_size = meta_p->size;
 
 	encr_offset = ENCR_OFFSET(d_offs);
@@ -735,5 +723,4 @@ cpt_enc_hmac_prep(uint32_t flags,
 	m_vaddr = (uint8_t *)m_vaddr + size;
 	m_dma += size;
-	m_size -= size;
 
 	/* start cpt request info struct at 8 byte boundary */
@@ -746,5 +733,4 @@ cpt_enc_hmac_prep(uint32_t flags,
 	m_vaddr = (uint8_t *)m_vaddr + size;
 	m_dma += size;
-	m_size -= size;
 
 	if (hash_type == GMAC_TYPE)
@@ -866,5 +852,4 @@ cpt_enc_hmac_prep(uint32_t flags,
 		m_vaddr = (uint8_t *)m_vaddr + size;
 		m_dma += size;
-		m_size -= size;
 
 		opcode.s.major |= CPT_DMA_MODE;
@@ -1014,5 +999,4 @@ cpt_enc_hmac_prep(uint32_t flags,
 		m_vaddr = (uint8_t *)m_vaddr + size;
 		m_dma += size;
-		m_size -= size;
 
 		/* cpt alternate completion address saved earlier */
@@ -1064,5 +1048,5 @@ cpt_dec_hmac_prep(uint32_t flags,
 	int32_t inputlen, outputlen, enc_dlen, auth_dlen;
 	struct cpt_ctx *cpt_ctx;
-	int32_t hash_type, mac_len, m_size;
+	int32_t hash_type, mac_len;
 	uint8_t iv_len = 16;
 	struct cpt_request_info *req;
@@ -1082,5 +1066,4 @@ cpt_dec_hmac_prep(uint32_t flags,
 	m_vaddr = meta_p->vaddr;
 	m_dma = meta_p->dma_addr;
-	m_size = meta_p->size;
 
 	encr_offset = ENCR_OFFSET(d_offs);
@@ -1148,5 +1131,4 @@ cpt_dec_hmac_prep(uint32_t flags,
 	m_vaddr = (uint8_t *)m_vaddr + size;
 	m_dma += size;
-	m_size -= size;
 
 	/* start cpt request info structure at 8 byte alignment */
@@ -1159,5 +1141,4 @@ cpt_dec_hmac_prep(uint32_t flags,
 	m_vaddr = (uint8_t *)m_vaddr + size;
 	m_dma += size;
-	m_size -= size;
 
 	/* Decryption */
@@ -1246,5 +1227,4 @@ cpt_dec_hmac_prep(uint32_t flags,
 		m_vaddr = (uint8_t *)m_vaddr + size;
 		m_dma += size;
-		m_size -= size;
 
 		opcode.s.major |= CPT_DMA_MODE;
@@ -1395,5 +1375,4 @@ cpt_dec_hmac_prep(uint32_t flags,
 		m_vaddr = (uint8_t *)m_vaddr + size;
 		m_dma += size;
-		m_size -= size;
 
 		/* cpt alternate completion address saved earlier */
@@ -1452,5 +1431,5 @@ cpt_zuc_snow3g_enc_prep(uint32_t req_flags,
 	uint32_t encr_offset = 0, auth_offset = 0;
 	uint32_t encr_data_len = 0, auth_data_len = 0;
-	int flags, iv_len = 16, m_size;
+	int flags, iv_len = 16;
 	void *m_vaddr, *c_vaddr;
 	uint64_t m_dma, c_dma, offset_ctrl;
@@ -1464,5 +1443,4 @@ cpt_zuc_snow3g_enc_prep(uint32_t req_flags,
 	m_vaddr = buf_p->vaddr;
 	m_dma = buf_p->dma_addr;
-	m_size = buf_p->size;
 
 	cpt_ctx = params->ctx_buf.vaddr;
@@ -1486,5 +1464,4 @@ cpt_zuc_snow3g_enc_prep(uint32_t req_flags,
 	m_vaddr = (uint8_t *)m_vaddr + size;
 	m_dma += size;
-	m_size -= size;
 
 	/* Reserve memory for cpt request info */
@@ -1494,5 +1471,4 @@ cpt_zuc_snow3g_enc_prep(uint32_t req_flags,
 	m_vaddr = (uint8_t *)m_vaddr + size;
 	m_dma += size;
-	m_size -= size;
 
 	opcode.s.major = CPT_MAJOR_OP_ZUC_SNOW3G;
@@ -1618,5 +1594,4 @@ cpt_zuc_snow3g_enc_prep(uint32_t req_flags,
 		m_vaddr = (uint8_t *)m_vaddr + OFF_CTRL_LEN + iv_len;
 		m_dma += OFF_CTRL_LEN + iv_len;
-		m_size -= OFF_CTRL_LEN + iv_len;
 
 		opcode.s.major |= CPT_DMA_MODE;
@@ -1719,5 +1694,4 @@ cpt_zuc_snow3g_enc_prep(uint32_t req_flags,
 		m_vaddr = (uint8_t *)m_vaddr + size;
 		m_dma += size;
-		m_size -= size;
 
 		/* cpt alternate completion address saved earlier */
@@ -1773,5 +1747,5 @@ cpt_zuc_snow3g_dec_prep(uint32_t req_flags,
 	uint32_t encr_offset;
 	uint32_t encr_data_len;
-	int flags, m_size;
+	int flags;
 	void *m_vaddr, *c_vaddr;
 	uint64_t m_dma, c_dma;
@@ -1785,5 +1759,4 @@ cpt_zuc_snow3g_dec_prep(uint32_t req_flags,
 	m_vaddr = buf_p->vaddr;
 	m_dma = buf_p->dma_addr;
-	m_size = buf_p->size;
 
 	/*
@@ -1812,5 +1785,4 @@ cpt_zuc_snow3g_dec_prep(uint32_t req_flags,
 	m_vaddr = (uint8_t *)m_vaddr + size;
 	m_dma += size;
-	m_size -= size;
 
 	/* Reserve memory for cpt request info */
@@ -1820,5 +1792,4 @@ cpt_zuc_snow3g_dec_prep(uint32_t req_flags,
 	m_vaddr = (uint8_t *)m_vaddr + size;
 	m_dma += size;
-	m_size -= size;
 
 	opcode.s.major = CPT_MAJOR_OP_ZUC_SNOW3G;
@@ -1910,5 +1881,4 @@ cpt_zuc_snow3g_dec_prep(uint32_t req_flags,
 		m_vaddr = (uint8_t *)m_vaddr + OFF_CTRL_LEN + iv_len;
 		m_dma += OFF_CTRL_LEN + iv_len;
-		m_size -= OFF_CTRL_LEN + iv_len;
 
 		opcode.s.major |= CPT_DMA_MODE;
@@ -1987,5 +1957,4 @@ cpt_zuc_snow3g_dec_prep(uint32_t req_flags,
 		m_vaddr = (uint8_t *)m_vaddr + size;
 		m_dma += size;
-		m_size -= size;
 
 		/* cpt alternate completion address saved earlier */
@@ -2042,5 +2011,5 @@ cpt_kasumi_enc_prep(uint32_t req_flags,
 	uint32_t encr_offset, auth_offset;
 	uint32_t encr_data_len, auth_data_len;
-	int flags, m_size;
+	int flags;
 	uint8_t *iv_s, *iv_d, iv_len = 8;
 	uint8_t dir = 0;
@@ -2060,5 +2029,4 @@ cpt_kasumi_enc_prep(uint32_t req_flags,
 	m_vaddr = buf_p->vaddr;
 	m_dma = buf_p->dma_addr;
-	m_size = buf_p->size;
 
 	encr_offset = ENCR_OFFSET(d_offs) / 8;
@@ -2093,5 +2061,4 @@ cpt_kasumi_enc_prep(uint32_t req_flags,
 	m_vaddr = (uint8_t *)m_vaddr + size;
 	m_dma += size;
-	m_size -= size;
 
 	/* Reserve memory for cpt request info */
@@ -2101,5 +2068,4 @@ cpt_kasumi_enc_prep(uint32_t req_flags,
 	m_vaddr = (uint8_t *)m_vaddr + size;
 	m_dma += size;
-	m_size -= size;
 
 	opcode.s.major = CPT_MAJOR_OP_KASUMI | CPT_DMA_MODE;
@@ -2129,5 +2095,4 @@ cpt_kasumi_enc_prep(uint32_t req_flags,
 	m_vaddr = (uint8_t *)m_vaddr + OFF_CTRL_LEN + iv_len;
 	m_dma += OFF_CTRL_LEN + iv_len;
-	m_size -= OFF_CTRL_LEN + iv_len;
 
 	/* DPTR has SG list */
@@ -2237,5 +2202,4 @@ cpt_kasumi_enc_prep(uint32_t req_flags,
 	m_vaddr = (uint8_t *)m_vaddr + size;
 	m_dma += size;
-	m_size -= size;
 
 	/* cpt alternate completion address saved earlier */
@@ -2289,5 +2253,5 @@ cpt_kasumi_dec_prep(uint64_t d_offs,
 	uint32_t encr_offset;
 	uint32_t encr_data_len;
-	int flags, m_size;
+	int flags;
 	uint8_t dir = 0;
 	void *m_vaddr, *c_vaddr;
@@ -2306,5 +2270,4 @@ cpt_kasumi_dec_prep(uint64_t d_offs,
 	m_vaddr = buf_p->vaddr;
 	m_dma = buf_p->dma_addr;
-	m_size = buf_p->size;
 
 	encr_offset = ENCR_OFFSET(d_offs) / 8;
@@ -2328,5 +2291,4 @@ cpt_kasumi_dec_prep(uint64_t d_offs,
 	m_vaddr = (uint8_t *)m_vaddr + size;
 	m_dma += size;
-	m_size -= size;
 
 	/* Reserve memory for cpt request info */
@@ -2336,5 +2298,4 @@ cpt_kasumi_dec_prep(uint64_t d_offs,
 	m_vaddr = (uint8_t *)m_vaddr + size;
 	m_dma += size;
-	m_size -= size;
 
 	opcode.s.major = CPT_MAJOR_OP_KASUMI | CPT_DMA_MODE;
@@ -2363,5 +2324,4 @@ cpt_kasumi_dec_prep(uint64_t d_offs,
 	m_vaddr = (uint8_t *)m_vaddr + OFF_CTRL_LEN + iv_len;
 	m_dma += OFF_CTRL_LEN + iv_len;
-	m_size -= OFF_CTRL_LEN + iv_len;
 
 	/* DPTR has SG list */
@@ -2432,5 +2392,4 @@ cpt_kasumi_dec_prep(uint64_t d_offs,
 	m_vaddr = (uint8_t *)m_vaddr + size;
 	m_dma += size;
-	m_size -= size;
 
 	/* cpt alternate completion address saved earlier */
@@ -2629,7 +2588,7 @@ fill_sess_aead(struct rte_crypto_sym_xform *xform,
 	auth_type_t auth_type = 0; /* NULL Auth type */
 	uint32_t cipher_key_len = 0;
-	uint8_t zsk_flag = 0, aes_gcm = 0;
+	uint8_t aes_gcm = 0;
 	aead_form = &xform->aead;
-	void *ctx;
+	void *ctx = SESS_PRIV(sess);
 
 	if (aead_form->op == RTE_CRYPTO_AEAD_OP_ENCRYPT &&
@@ -2665,5 +2624,5 @@ fill_sess_aead(struct rte_crypto_sym_xform *xform,
 		return -1;
 	}
-	sess->zsk_flag = zsk_flag;
+	sess->zsk_flag = 0;
 	sess->aes_gcm = aes_gcm;
 	sess->mac_len = aead_form->digest_length;
@@ -2671,5 +2630,4 @@ fill_sess_aead(struct rte_crypto_sym_xform *xform,
 	sess->iv_length = aead_form->iv.length;
 	sess->aad_length = aead_form->aad_length;
-	ctx = (void *)((uint8_t *)sess + sizeof(struct cpt_sess_misc)),
 
 	cpt_fc_ciph_set_key(ctx, enc_type, aead_form->key.data,
@@ -2688,8 +2646,5 @@ fill_sess_cipher(struct rte_crypto_sym_xform *xform,
 	cipher_type_t enc_type = 0; /* NULL Cipher type */
 	uint32_t cipher_key_len = 0;
-	uint8_t zsk_flag = 0, aes_gcm = 0, aes_ctr = 0, is_null = 0;
-
-	if (xform->type != RTE_CRYPTO_SYM_XFORM_CIPHER)
-		return -1;
+	uint8_t zsk_flag = 0, aes_ctr = 0, is_null = 0;
 
 	c_form = &xform->cipher;
@@ -2773,5 +2728,5 @@ fill_sess_cipher(struct rte_crypto_sym_xform *xform,
 
 	sess->zsk_flag = zsk_flag;
-	sess->aes_gcm = aes_gcm;
+	sess->aes_gcm = 0;
 	sess->aes_ctr = aes_ctr;
 	sess->iv_offset = c_form->iv.offset;
@@ -2793,7 +2748,4 @@ fill_sess_auth(struct rte_crypto_sym_xform *xform,
 	uint8_t zsk_flag = 0, aes_gcm = 0, is_null = 0;
 
-	if (xform->type != RTE_CRYPTO_SYM_XFORM_AUTH)
-		goto error_out;
-
 	a_form = &xform->auth;
 
@@ -2867,9 +2819,9 @@ fill_sess_auth(struct rte_crypto_sym_xform *xform,
 		CPT_LOG_DP_ERR("Crypto: Unsupported hash algo %u",
 			       a_form->algo);
-		goto error_out;
+		return -1;
 	default:
 		CPT_LOG_DP_ERR("Crypto: Undefined Hash algo %u specified",
 			       a_form->algo);
-		goto error_out;
+		return -1;
 	}
 
@@ -2886,7 +2838,4 @@ fill_sess_auth(struct rte_crypto_sym_xform *xform,
 
 	return 0;
-
-error_out:
-	return -1;
 }
 
@@ -2898,9 +2847,5 @@ fill_sess_gmac(struct rte_crypto_sym_xform *xform,
 	cipher_type_t enc_type = 0; /* NULL Cipher type */
 	auth_type_t auth_type = 0; /* NULL Auth type */
-	uint8_t zsk_flag = 0, aes_gcm = 0;
-	void *ctx;
-
-	if (xform->type != RTE_CRYPTO_SYM_XFORM_AUTH)
-		return -1;
+	void *ctx = SESS_PRIV(sess);
 
 	a_form = &xform->auth;
@@ -2926,11 +2871,10 @@ fill_sess_gmac(struct rte_crypto_sym_xform *xform,
 	}
 
-	sess->zsk_flag = zsk_flag;
-	sess->aes_gcm = aes_gcm;
+	sess->zsk_flag = 0;
+	sess->aes_gcm = 0;
 	sess->is_gmac = 1;
 	sess->iv_offset = a_form->iv.offset;
 	sess->iv_length = a_form->iv.length;
 	sess->mac_len = a_form->digest_length;
-	ctx = (void *)((uint8_t *)sess + sizeof(struct cpt_sess_misc)),
 
 	cpt_fc_ciph_set_key(ctx, enc_type, a_form->key.data,
@@ -3132,7 +3076,4 @@ fill_fc_params(struct rte_crypto_op *cop,
 	struct rte_mbuf *m_src, *m_dst;
 	uint8_t cpt_op = sess_misc->cpt_op;
-	uint8_t zsk_flag = sess_misc->zsk_flag;
-	uint8_t aes_gcm = sess_misc->aes_gcm;
-	uint16_t mac_len = sess_misc->mac_len;
 #ifdef CPT_ALWAYS_USE_SG_MODE
 	uint8_t inplace = 0;
@@ -3161,13 +3102,9 @@ fill_fc_params(struct rte_crypto_op *cop,
 	}
 
-	if (zsk_flag) {
+	if (sess_misc->zsk_flag) {
 		fc_params.auth_iv_buf = rte_crypto_op_ctod_offset(cop,
 					uint8_t *,
 					sess_misc->auth_iv_offset);
-		if (zsk_flag == K_F9) {
-			CPT_LOG_DP_ERR("Should not reach here for "
-			"kasumi F9\n");
-		}
-		if (zsk_flag != ZS_EA)
+		if (sess_misc->zsk_flag != ZS_EA)
 			inplace = 0;
 	}
@@ -3175,5 +3112,5 @@ fill_fc_params(struct rte_crypto_op *cop,
 	m_dst = sym_op->m_dst;
 
-	if (aes_gcm) {
+	if (sess_misc->aes_gcm) {
 		uint8_t *salt;
 		uint8_t *aad_data;
@@ -3209,5 +3146,5 @@ fill_fc_params(struct rte_crypto_op *cop,
 		}
 		fc_params.iv_buf = salt + 4;
-		if (likely(mac_len)) {
+		if (likely(sess_misc->mac_len)) {
 			struct rte_mbuf *m = (cpt_op & CPT_OP_ENCODE) ? m_dst :
 					     m_src;
@@ -3252,5 +3189,5 @@ fill_fc_params(struct rte_crypto_op *cop,
 			fc_params.iv_buf = salt + 4;
 		}
-		if (likely(mac_len)) {
+		if (likely(sess_misc->mac_len)) {
 			struct rte_mbuf *m;
 
@@ -3311,5 +3248,4 @@ fill_fc_params(struct rte_crypto_op *cop,
 
 			/* Try to make room as much as src has */
-			m_dst = sym_op->m_dst;
 			pkt_len = rte_pktmbuf_pkt_len(m_dst);
 
@@ -3495,5 +3431,4 @@ fill_digest_params(struct rte_crypto_op *cop,
 	struct rte_mbuf *m_src, *m_dst;
 	uint16_t auth_op = sess->cpt_op & CPT_OP_AUTH_MASK;
-	uint8_t zsk_flag = sess->zsk_flag;
 	uint16_t mac_len = sess->mac_len;
 	fc_params_t params;
@@ -3527,5 +3462,5 @@ fill_digest_params(struct rte_crypto_op *cop,
 	flags = VALID_MAC_BUF;
 	params.src_iov = (void *)src;
-	if (unlikely(zsk_flag)) {
+	if (unlikely(sess->zsk_flag)) {
 		/*
 		 * Since for Zuc, Kasumi, Snow3g offsets are in bits
@@ -3537,8 +3472,7 @@ fill_digest_params(struct rte_crypto_op *cop,
 		params.auth_iv_buf = rte_crypto_op_ctod_offset(cop,
 					uint8_t *, sess->auth_iv_offset);
-		if (zsk_flag == K_F9) {
+		if (sess->zsk_flag == K_F9) {
 			uint32_t length_in_bits, num_bytes;
 			uint8_t *src, direction = 0;
-			uint32_t counter_num_bytes;
 
 			memcpy(iv_buf, rte_pktmbuf_mtod(cop->sym->m_src,
@@ -3550,8 +3484,7 @@ fill_digest_params(struct rte_crypto_op *cop,
 			length_in_bits = cop->sym->auth.data.length;
 			num_bytes = (length_in_bits >> 3);
-			counter_num_bytes = num_bytes;
 			src = rte_pktmbuf_mtod(cop->sym->m_src, uint8_t *);
 			find_kasumif9_direction_and_length(src,
-						counter_num_bytes,
+						num_bytes,
 						&length_in_bits,
 						&direction);
-- 
2.21.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-02-14 17:02:39.169176522 +0000
+++ 0038-common-cpt-remove-redundant-code-in-datapath.patch	2020-02-14 17:02:37.054405789 +0000
@@ -1 +1 @@
-From 8de5ede7b61d9b1af40485755cfcd2d525a6c816 Mon Sep 17 00:00:00 2001
+From c1a928606a5874be10af5fa0bfa98f4ec57b34d8 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 8de5ede7b61d9b1af40485755cfcd2d525a6c816 ]
+
@@ -14 +16 @@
-index 30610d5f9a..0992576639 100644
+index f0632caf6a..3982239004 100644
@@ -90 +92 @@
-@@ -468,5 +463,4 @@ cpt_digest_gen_prep(uint32_t flags,
+@@ -469,5 +464,4 @@ cpt_digest_gen_prep(uint32_t flags,
@@ -96 +98 @@
-@@ -489,5 +483,4 @@ cpt_digest_gen_prep(uint32_t flags,
+@@ -499,5 +493,4 @@ cpt_digest_gen_prep(uint32_t flags,
@@ -102 +104 @@
-@@ -505,5 +498,4 @@ cpt_digest_gen_prep(uint32_t flags,
+@@ -515,5 +508,4 @@ cpt_digest_gen_prep(uint32_t flags,
@@ -108 +110 @@
-@@ -512,5 +504,4 @@ cpt_digest_gen_prep(uint32_t flags,
+@@ -522,5 +514,4 @@ cpt_digest_gen_prep(uint32_t flags,
@@ -114 +116 @@
-@@ -626,5 +617,4 @@ cpt_digest_gen_prep(uint32_t flags,
+@@ -635,5 +626,4 @@ cpt_digest_gen_prep(uint32_t flags,
@@ -120 +122 @@
-@@ -679,5 +669,4 @@ cpt_enc_hmac_prep(uint32_t flags,
+@@ -693,5 +683,4 @@ cpt_enc_hmac_prep(uint32_t flags,
@@ -126 +128 @@
-@@ -685,5 +674,4 @@ cpt_enc_hmac_prep(uint32_t flags,
+@@ -699,5 +688,4 @@ cpt_enc_hmac_prep(uint32_t flags,
@@ -132 +134 @@
-@@ -721,5 +709,4 @@ cpt_enc_hmac_prep(uint32_t flags,
+@@ -735,5 +723,4 @@ cpt_enc_hmac_prep(uint32_t flags,
@@ -138 +140 @@
-@@ -732,5 +719,4 @@ cpt_enc_hmac_prep(uint32_t flags,
+@@ -746,5 +733,4 @@ cpt_enc_hmac_prep(uint32_t flags,
@@ -144 +146 @@
-@@ -852,5 +838,4 @@ cpt_enc_hmac_prep(uint32_t flags,
+@@ -866,5 +852,4 @@ cpt_enc_hmac_prep(uint32_t flags,
@@ -150 +152 @@
-@@ -1004,5 +989,4 @@ cpt_enc_hmac_prep(uint32_t flags,
+@@ -1014,5 +999,4 @@ cpt_enc_hmac_prep(uint32_t flags,
@@ -156 +158 @@
-@@ -1048,5 +1032,5 @@ cpt_dec_hmac_prep(uint32_t flags,
+@@ -1064,5 +1048,5 @@ cpt_dec_hmac_prep(uint32_t flags,
@@ -163 +165 @@
-@@ -1066,5 +1050,4 @@ cpt_dec_hmac_prep(uint32_t flags,
+@@ -1082,5 +1066,4 @@ cpt_dec_hmac_prep(uint32_t flags,
@@ -169 +171 @@
-@@ -1132,5 +1115,4 @@ cpt_dec_hmac_prep(uint32_t flags,
+@@ -1148,5 +1131,4 @@ cpt_dec_hmac_prep(uint32_t flags,
@@ -175 +177 @@
-@@ -1143,5 +1125,4 @@ cpt_dec_hmac_prep(uint32_t flags,
+@@ -1159,5 +1141,4 @@ cpt_dec_hmac_prep(uint32_t flags,
@@ -181 +183 @@
-@@ -1230,5 +1211,4 @@ cpt_dec_hmac_prep(uint32_t flags,
+@@ -1246,5 +1227,4 @@ cpt_dec_hmac_prep(uint32_t flags,
@@ -187 +189 @@
-@@ -1394,5 +1374,4 @@ cpt_dec_hmac_prep(uint32_t flags,
+@@ -1395,5 +1375,4 @@ cpt_dec_hmac_prep(uint32_t flags,
@@ -193 +195 @@
-@@ -1445,5 +1424,5 @@ cpt_zuc_snow3g_enc_prep(uint32_t req_flags,
+@@ -1452,5 +1431,5 @@ cpt_zuc_snow3g_enc_prep(uint32_t req_flags,
@@ -200 +202 @@
-@@ -1457,5 +1436,4 @@ cpt_zuc_snow3g_enc_prep(uint32_t req_flags,
+@@ -1464,5 +1443,4 @@ cpt_zuc_snow3g_enc_prep(uint32_t req_flags,
@@ -206 +208 @@
-@@ -1479,5 +1457,4 @@ cpt_zuc_snow3g_enc_prep(uint32_t req_flags,
+@@ -1486,5 +1464,4 @@ cpt_zuc_snow3g_enc_prep(uint32_t req_flags,
@@ -212 +214 @@
-@@ -1487,5 +1464,4 @@ cpt_zuc_snow3g_enc_prep(uint32_t req_flags,
+@@ -1494,5 +1471,4 @@ cpt_zuc_snow3g_enc_prep(uint32_t req_flags,
@@ -218 +220 @@
-@@ -1611,5 +1587,4 @@ cpt_zuc_snow3g_enc_prep(uint32_t req_flags,
+@@ -1618,5 +1594,4 @@ cpt_zuc_snow3g_enc_prep(uint32_t req_flags,
@@ -224 +226 @@
-@@ -1721,5 +1696,4 @@ cpt_zuc_snow3g_enc_prep(uint32_t req_flags,
+@@ -1719,5 +1694,4 @@ cpt_zuc_snow3g_enc_prep(uint32_t req_flags,
@@ -230 +232 @@
-@@ -1769,5 +1743,5 @@ cpt_zuc_snow3g_dec_prep(uint32_t req_flags,
+@@ -1773,5 +1747,5 @@ cpt_zuc_snow3g_dec_prep(uint32_t req_flags,
@@ -237 +239 @@
-@@ -1781,5 +1755,4 @@ cpt_zuc_snow3g_dec_prep(uint32_t req_flags,
+@@ -1785,5 +1759,4 @@ cpt_zuc_snow3g_dec_prep(uint32_t req_flags,
@@ -243 +245 @@
-@@ -1808,5 +1781,4 @@ cpt_zuc_snow3g_dec_prep(uint32_t req_flags,
+@@ -1812,5 +1785,4 @@ cpt_zuc_snow3g_dec_prep(uint32_t req_flags,
@@ -249 +251 @@
-@@ -1816,5 +1788,4 @@ cpt_zuc_snow3g_dec_prep(uint32_t req_flags,
+@@ -1820,5 +1792,4 @@ cpt_zuc_snow3g_dec_prep(uint32_t req_flags,
@@ -255 +257 @@
-@@ -1906,5 +1877,4 @@ cpt_zuc_snow3g_dec_prep(uint32_t req_flags,
+@@ -1910,5 +1881,4 @@ cpt_zuc_snow3g_dec_prep(uint32_t req_flags,
@@ -261 +263 @@
-@@ -1989,5 +1959,4 @@ cpt_zuc_snow3g_dec_prep(uint32_t req_flags,
+@@ -1987,5 +1957,4 @@ cpt_zuc_snow3g_dec_prep(uint32_t req_flags,
@@ -267 +269 @@
-@@ -2038,5 +2007,5 @@ cpt_kasumi_enc_prep(uint32_t req_flags,
+@@ -2042,5 +2011,5 @@ cpt_kasumi_enc_prep(uint32_t req_flags,
@@ -274 +276 @@
-@@ -2056,5 +2025,4 @@ cpt_kasumi_enc_prep(uint32_t req_flags,
+@@ -2060,5 +2029,4 @@ cpt_kasumi_enc_prep(uint32_t req_flags,
@@ -280 +282 @@
-@@ -2089,5 +2057,4 @@ cpt_kasumi_enc_prep(uint32_t req_flags,
+@@ -2093,5 +2061,4 @@ cpt_kasumi_enc_prep(uint32_t req_flags,
@@ -286 +288 @@
-@@ -2097,5 +2064,4 @@ cpt_kasumi_enc_prep(uint32_t req_flags,
+@@ -2101,5 +2068,4 @@ cpt_kasumi_enc_prep(uint32_t req_flags,
@@ -292 +294 @@
-@@ -2125,5 +2091,4 @@ cpt_kasumi_enc_prep(uint32_t req_flags,
+@@ -2129,5 +2095,4 @@ cpt_kasumi_enc_prep(uint32_t req_flags,
@@ -298 +300 @@
-@@ -2242,5 +2207,4 @@ cpt_kasumi_enc_prep(uint32_t req_flags,
+@@ -2237,5 +2202,4 @@ cpt_kasumi_enc_prep(uint32_t req_flags,
@@ -304 +306 @@
-@@ -2288,5 +2252,5 @@ cpt_kasumi_dec_prep(uint64_t d_offs,
+@@ -2289,5 +2253,5 @@ cpt_kasumi_dec_prep(uint64_t d_offs,
@@ -311 +313 @@
-@@ -2305,5 +2269,4 @@ cpt_kasumi_dec_prep(uint64_t d_offs,
+@@ -2306,5 +2270,4 @@ cpt_kasumi_dec_prep(uint64_t d_offs,
@@ -317 +319 @@
-@@ -2327,5 +2290,4 @@ cpt_kasumi_dec_prep(uint64_t d_offs,
+@@ -2328,5 +2291,4 @@ cpt_kasumi_dec_prep(uint64_t d_offs,
@@ -323 +325 @@
-@@ -2335,5 +2297,4 @@ cpt_kasumi_dec_prep(uint64_t d_offs,
+@@ -2336,5 +2298,4 @@ cpt_kasumi_dec_prep(uint64_t d_offs,
@@ -329 +331 @@
-@@ -2362,5 +2323,4 @@ cpt_kasumi_dec_prep(uint64_t d_offs,
+@@ -2363,5 +2324,4 @@ cpt_kasumi_dec_prep(uint64_t d_offs,
@@ -335 +337 @@
-@@ -2437,5 +2397,4 @@ cpt_kasumi_dec_prep(uint64_t d_offs,
+@@ -2432,5 +2392,4 @@ cpt_kasumi_dec_prep(uint64_t d_offs,
@@ -341 +343 @@
-@@ -2616,7 +2575,7 @@ fill_sess_aead(struct rte_crypto_sym_xform *xform,
+@@ -2629,7 +2588,7 @@ fill_sess_aead(struct rte_crypto_sym_xform *xform,
@@ -351 +353 @@
-@@ -2652,5 +2611,5 @@ fill_sess_aead(struct rte_crypto_sym_xform *xform,
+@@ -2665,5 +2624,5 @@ fill_sess_aead(struct rte_crypto_sym_xform *xform,
@@ -358 +360 @@
-@@ -2658,5 +2617,4 @@ fill_sess_aead(struct rte_crypto_sym_xform *xform,
+@@ -2671,5 +2630,4 @@ fill_sess_aead(struct rte_crypto_sym_xform *xform,
@@ -364 +366 @@
-@@ -2675,8 +2633,5 @@ fill_sess_cipher(struct rte_crypto_sym_xform *xform,
+@@ -2688,8 +2646,5 @@ fill_sess_cipher(struct rte_crypto_sym_xform *xform,
@@ -374 +376 @@
-@@ -2760,5 +2715,5 @@ fill_sess_cipher(struct rte_crypto_sym_xform *xform,
+@@ -2773,5 +2728,5 @@ fill_sess_cipher(struct rte_crypto_sym_xform *xform,
@@ -381 +383 @@
-@@ -2780,7 +2735,4 @@ fill_sess_auth(struct rte_crypto_sym_xform *xform,
+@@ -2793,7 +2748,4 @@ fill_sess_auth(struct rte_crypto_sym_xform *xform,
@@ -389 +391 @@
-@@ -2854,9 +2806,9 @@ fill_sess_auth(struct rte_crypto_sym_xform *xform,
+@@ -2867,9 +2819,9 @@ fill_sess_auth(struct rte_crypto_sym_xform *xform,
@@ -401 +403 @@
-@@ -2873,7 +2825,4 @@ fill_sess_auth(struct rte_crypto_sym_xform *xform,
+@@ -2886,7 +2838,4 @@ fill_sess_auth(struct rte_crypto_sym_xform *xform,
@@ -409 +411 @@
-@@ -2885,9 +2834,5 @@ fill_sess_gmac(struct rte_crypto_sym_xform *xform,
+@@ -2898,9 +2847,5 @@ fill_sess_gmac(struct rte_crypto_sym_xform *xform,
@@ -420 +422 @@
-@@ -2913,11 +2858,10 @@ fill_sess_gmac(struct rte_crypto_sym_xform *xform,
+@@ -2926,11 +2871,10 @@ fill_sess_gmac(struct rte_crypto_sym_xform *xform,
@@ -434 +436 @@
-@@ -3119,7 +3063,4 @@ fill_fc_params(struct rte_crypto_op *cop,
+@@ -3132,7 +3076,4 @@ fill_fc_params(struct rte_crypto_op *cop,
@@ -442 +444 @@
-@@ -3147,13 +3088,9 @@ fill_fc_params(struct rte_crypto_op *cop,
+@@ -3161,13 +3102,9 @@ fill_fc_params(struct rte_crypto_op *cop,
@@ -458 +460 @@
-@@ -3161,5 +3098,5 @@ fill_fc_params(struct rte_crypto_op *cop,
+@@ -3175,5 +3112,5 @@ fill_fc_params(struct rte_crypto_op *cop,
@@ -465 +467 @@
-@@ -3195,5 +3132,5 @@ fill_fc_params(struct rte_crypto_op *cop,
+@@ -3209,5 +3146,5 @@ fill_fc_params(struct rte_crypto_op *cop,
@@ -472 +474 @@
-@@ -3238,5 +3175,5 @@ fill_fc_params(struct rte_crypto_op *cop,
+@@ -3252,5 +3189,5 @@ fill_fc_params(struct rte_crypto_op *cop,
@@ -479 +481 @@
-@@ -3297,5 +3234,4 @@ fill_fc_params(struct rte_crypto_op *cop,
+@@ -3311,5 +3248,4 @@ fill_fc_params(struct rte_crypto_op *cop,
@@ -485 +487 @@
-@@ -3490,5 +3426,4 @@ fill_digest_params(struct rte_crypto_op *cop,
+@@ -3495,5 +3431,4 @@ fill_digest_params(struct rte_crypto_op *cop,
@@ -491 +493 @@
-@@ -3521,5 +3456,5 @@ fill_digest_params(struct rte_crypto_op *cop,
+@@ -3527,5 +3462,5 @@ fill_digest_params(struct rte_crypto_op *cop,
@@ -498 +500 @@
-@@ -3531,8 +3466,7 @@ fill_digest_params(struct rte_crypto_op *cop,
+@@ -3537,8 +3472,7 @@ fill_digest_params(struct rte_crypto_op *cop,
@@ -508 +510 @@
-@@ -3544,8 +3478,7 @@ fill_digest_params(struct rte_crypto_op *cop,
+@@ -3550,8 +3484,7 @@ fill_digest_params(struct rte_crypto_op *cop,


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

* [dpdk-stable] patch 'common/cpt: check cipher and auth keys are set' has been queued to LTS release 18.11.7
  2020-02-14 17:02 [dpdk-stable] patch 'net/virtio-user: do not close tap when disabling queue pairs' has been queued to LTS release 18.11.7 Kevin Traynor
                   ` (36 preceding siblings ...)
  2020-02-14 17:03 ` [dpdk-stable] patch 'common/cpt: remove redundant code in datapath' " Kevin Traynor
@ 2020-02-14 17:03 ` Kevin Traynor
  2020-02-14 17:03 ` [dpdk-stable] patch 'common/cpt: fix component for empty IOV buffer' " Kevin Traynor
                   ` (3 subsequent siblings)
  41 siblings, 0 replies; 43+ messages in thread
From: Kevin Traynor @ 2020-02-14 17:03 UTC (permalink / raw)
  To: Archana Muniganti; +Cc: Anoob Joseph, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.7

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable-queue

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable-queue/commit/94dd77c11c5735575ae06280f10570fe1faf8261

Thanks.

Kevin.

---
From 94dd77c11c5735575ae06280f10570fe1faf8261 Mon Sep 17 00:00:00 2001
From: Archana Muniganti <marchana@marvell.com>
Date: Wed, 5 Feb 2020 18:46:16 +0530
Subject: [PATCH] common/cpt: check cipher and auth keys are set

[ upstream commit e40175c5c56a6a355e022aec106400d25b4f294d ]

Returning error when cipher and auth key are not getting set

Fixes: 6cc54096520d ("crypto/octeontx: add supported sessions")

Signed-off-by: Archana Muniganti <marchana@marvell.com>
Signed-off-by: Anoob Joseph <anoobj@marvell.com>
---
 drivers/common/cpt/cpt_ucode.h | 32 +++++++++++++++++++++-----------
 1 file changed, 21 insertions(+), 11 deletions(-)

diff --git a/drivers/common/cpt/cpt_ucode.h b/drivers/common/cpt/cpt_ucode.h
index 3982239004..67f19bd379 100644
--- a/drivers/common/cpt/cpt_ucode.h
+++ b/drivers/common/cpt/cpt_ucode.h
@@ -299,5 +299,5 @@ cpt_fc_ciph_set_key(void *ctx, cipher_type_t type, uint8_t *key,
 		goto success;
 	default:
-		break;
+		return -1;
 	}
 
@@ -2631,8 +2631,11 @@ fill_sess_aead(struct rte_crypto_sym_xform *xform,
 	sess->aad_length = aead_form->aad_length;
 
-	cpt_fc_ciph_set_key(ctx, enc_type, aead_form->key.data,
-			aead_form->key.length, NULL);
+	if (unlikely(cpt_fc_ciph_set_key(ctx, enc_type, aead_form->key.data,
+			aead_form->key.length, NULL)))
+		return -1;
 
-	cpt_fc_auth_set_key(ctx, auth_type, NULL, 0, aead_form->digest_length);
+	if (unlikely(cpt_fc_auth_set_key(ctx, auth_type, NULL, 0,
+			aead_form->digest_length)))
+		return -1;
 
 	return 0;
@@ -2734,6 +2737,7 @@ fill_sess_cipher(struct rte_crypto_sym_xform *xform,
 	sess->is_null = is_null;
 
-	cpt_fc_ciph_set_key(SESS_PRIV(sess), enc_type, c_form->key.data,
-			    c_form->key.length, NULL);
+	if (unlikely(cpt_fc_ciph_set_key(SESS_PRIV(sess), enc_type,
+			c_form->key.data, c_form->key.length, NULL)))
+		return -1;
 
 	return 0;
@@ -2834,6 +2838,8 @@ fill_sess_auth(struct rte_crypto_sym_xform *xform,
 		sess->auth_iv_length = a_form->iv.length;
 	}
-	cpt_fc_auth_set_key(SESS_PRIV(sess), auth_type, a_form->key.data,
-			    a_form->key.length, a_form->digest_length);
+	if (unlikely(cpt_fc_auth_set_key(SESS_PRIV(sess), auth_type,
+			a_form->key.data, a_form->key.length,
+			a_form->digest_length)))
+		return -1;
 
 	return 0;
@@ -2878,7 +2884,11 @@ fill_sess_gmac(struct rte_crypto_sym_xform *xform,
 	sess->mac_len = a_form->digest_length;
 
-	cpt_fc_ciph_set_key(ctx, enc_type, a_form->key.data,
-			a_form->key.length, NULL);
-	cpt_fc_auth_set_key(ctx, auth_type, NULL, 0, a_form->digest_length);
+	if (unlikely(cpt_fc_ciph_set_key(ctx, enc_type, a_form->key.data,
+			a_form->key.length, NULL)))
+		return -1;
+
+	if (unlikely(cpt_fc_auth_set_key(ctx, auth_type, NULL, 0,
+			a_form->digest_length)))
+		return -1;
 
 	return 0;
-- 
2.21.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-02-14 17:02:39.221247303 +0000
+++ 0039-common-cpt-check-cipher-and-auth-keys-are-set.patch	2020-02-14 17:02:37.057405726 +0000
@@ -1 +1 @@
-From e40175c5c56a6a355e022aec106400d25b4f294d Mon Sep 17 00:00:00 2001
+From 94dd77c11c5735575ae06280f10570fe1faf8261 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit e40175c5c56a6a355e022aec106400d25b4f294d ]
+
@@ -9 +10,0 @@
-Cc: stable@dpdk.org
@@ -18 +19 @@
-index 4ef87c298e..081249cd7b 100644
+index 3982239004..67f19bd379 100644
@@ -21 +22 @@
-@@ -299,5 +299,5 @@ cpt_fc_ciph_set_key(void *ctx, cipher_type_t type, const uint8_t *key,
+@@ -299,5 +299,5 @@ cpt_fc_ciph_set_key(void *ctx, cipher_type_t type, uint8_t *key,
@@ -28 +29 @@
-@@ -2617,8 +2617,11 @@ fill_sess_aead(struct rte_crypto_sym_xform *xform,
+@@ -2631,8 +2631,11 @@ fill_sess_aead(struct rte_crypto_sym_xform *xform,
@@ -43 +44 @@
-@@ -2720,6 +2723,7 @@ fill_sess_cipher(struct rte_crypto_sym_xform *xform,
+@@ -2734,6 +2737,7 @@ fill_sess_cipher(struct rte_crypto_sym_xform *xform,
@@ -53 +54 @@
-@@ -2815,6 +2819,8 @@ fill_sess_auth(struct rte_crypto_sym_xform *xform,
+@@ -2834,6 +2838,8 @@ fill_sess_auth(struct rte_crypto_sym_xform *xform,
@@ -64 +65 @@
-@@ -2859,7 +2865,11 @@ fill_sess_gmac(struct rte_crypto_sym_xform *xform,
+@@ -2878,7 +2884,11 @@ fill_sess_gmac(struct rte_crypto_sym_xform *xform,


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

* [dpdk-stable] patch 'common/cpt: fix component for empty IOV buffer' has been queued to LTS release 18.11.7
  2020-02-14 17:02 [dpdk-stable] patch 'net/virtio-user: do not close tap when disabling queue pairs' has been queued to LTS release 18.11.7 Kevin Traynor
                   ` (37 preceding siblings ...)
  2020-02-14 17:03 ` [dpdk-stable] patch 'common/cpt: check cipher and auth keys are set' " Kevin Traynor
@ 2020-02-14 17:03 ` Kevin Traynor
  2020-02-14 17:03 ` [dpdk-stable] patch 'bpf: fix headers install with meson' " Kevin Traynor
                   ` (2 subsequent siblings)
  41 siblings, 0 replies; 43+ messages in thread
From: Kevin Traynor @ 2020-02-14 17:03 UTC (permalink / raw)
  To: Archana Muniganti; +Cc: Anoob Joseph, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.7

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable-queue

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable-queue/commit/0059d95c55496ccc64cfe8d2d7b8c9ba35ee3b00

Thanks.

Kevin.

---
From 0059d95c55496ccc64cfe8d2d7b8c9ba35ee3b00 Mon Sep 17 00:00:00 2001
From: Archana Muniganti <marchana@marvell.com>
Date: Wed, 5 Feb 2020 18:46:17 +0530
Subject: [PATCH] common/cpt: fix component for empty IOV buffer

[ upstream commit 0022ae1eb8fc4fb6c0115d6516003f3a9442ff00 ]

fill_sg_comp_from_iov() prepares gather components for i/p IOV
buffers and extra buf. This API is failing to create a gather component
for extra_buf when IOV buf len is zero. Though there is enough space
to accommodate extra_buf, because of pre-decrementing of extra_buf
length from aggregate size, this issue is seen.

Fixes: b74652f3a91f ("common/cpt: add microcode interface for encryption")

Signed-off-by: Archana Muniganti <marchana@marvell.com>
Signed-off-by: Anoob Joseph <anoobj@marvell.com>
---
 drivers/common/cpt/cpt_ucode.h | 12 +++++-------
 1 file changed, 5 insertions(+), 7 deletions(-)

diff --git a/drivers/common/cpt/cpt_ucode.h b/drivers/common/cpt/cpt_ucode.h
index 67f19bd379..f47c96d934 100644
--- a/drivers/common/cpt/cpt_ucode.h
+++ b/drivers/common/cpt/cpt_ucode.h
@@ -378,5 +378,5 @@ fill_sg_comp_from_iov(sg_comp_t *list,
 	int32_t j;
 	uint32_t extra_len = extra_buf ? extra_buf->size : 0;
-	uint32_t size = *psize - extra_len;
+	uint32_t size = *psize;
 	buf_ptr_t *bufs;
 
@@ -387,7 +387,4 @@ fill_sg_comp_from_iov(sg_comp_t *list,
 		sg_comp_t *to = &list[i >> 2];
 
-		if (!bufs[j].size)
-			continue;
-
 		if (unlikely(from_offset)) {
 			if (from_offset >= bufs[j].size) {
@@ -421,4 +418,5 @@ fill_sg_comp_from_iov(sg_comp_t *list,
 			}
 
+			extra_len = RTE_MIN(extra_len, size);
 			/* Insert extra data ptr */
 			if (extra_len) {
@@ -426,11 +424,11 @@ fill_sg_comp_from_iov(sg_comp_t *list,
 				to = &list[i >> 2];
 				to->u.s.len[i % 4] =
-					rte_cpu_to_be_16(extra_buf->size);
+					rte_cpu_to_be_16(extra_len);
 				to->ptr[i % 4] =
 					rte_cpu_to_be_64(extra_buf->dma_addr);
-
-				/* size already decremented by extra len */
+				size -= extra_len;
 			}
 
+			next_len = RTE_MIN(next_len, size);
 			/* insert the rest of the data */
 			if (next_len) {
-- 
2.21.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-02-14 17:02:39.274872102 +0000
+++ 0040-common-cpt-fix-component-for-empty-IOV-buffer.patch	2020-02-14 17:02:37.060405664 +0000
@@ -1 +1 @@
-From 0022ae1eb8fc4fb6c0115d6516003f3a9442ff00 Mon Sep 17 00:00:00 2001
+From 0059d95c55496ccc64cfe8d2d7b8c9ba35ee3b00 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 0022ae1eb8fc4fb6c0115d6516003f3a9442ff00 ]
+
@@ -13 +14,0 @@
-Cc: stable@dpdk.org
@@ -22 +23 @@
-index 081249cd7b..c310ea7cb4 100644
+index 67f19bd379..f47c96d934 100644
@@ -25 +26 @@
-@@ -374,5 +374,5 @@ fill_sg_comp_from_iov(sg_comp_t *list,
+@@ -378,5 +378,5 @@ fill_sg_comp_from_iov(sg_comp_t *list,
@@ -32 +33 @@
-@@ -383,7 +383,4 @@ fill_sg_comp_from_iov(sg_comp_t *list,
+@@ -387,7 +387,4 @@ fill_sg_comp_from_iov(sg_comp_t *list,
@@ -40 +41 @@
-@@ -417,4 +414,5 @@ fill_sg_comp_from_iov(sg_comp_t *list,
+@@ -421,4 +418,5 @@ fill_sg_comp_from_iov(sg_comp_t *list,
@@ -46 +47 @@
-@@ -422,11 +420,11 @@ fill_sg_comp_from_iov(sg_comp_t *list,
+@@ -426,11 +424,11 @@ fill_sg_comp_from_iov(sg_comp_t *list,


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

* [dpdk-stable] patch 'bpf: fix headers install with meson' has been queued to LTS release 18.11.7
  2020-02-14 17:02 [dpdk-stable] patch 'net/virtio-user: do not close tap when disabling queue pairs' has been queued to LTS release 18.11.7 Kevin Traynor
                   ` (38 preceding siblings ...)
  2020-02-14 17:03 ` [dpdk-stable] patch 'common/cpt: fix component for empty IOV buffer' " Kevin Traynor
@ 2020-02-14 17:03 ` Kevin Traynor
  2020-02-14 17:03 ` [dpdk-stable] patch 'app/pdump: fix build with clang' " Kevin Traynor
  2020-02-14 17:03 ` [dpdk-stable] patch 'mem: fix munmap in error unwind' " Kevin Traynor
  41 siblings, 0 replies; 43+ messages in thread
From: Kevin Traynor @ 2020-02-14 17:03 UTC (permalink / raw)
  To: Junxiao Shi; +Cc: Bruce Richardson, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.7

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable-queue

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable-queue/commit/1736f09ef069ead760a61150a4f66d42b7b057e0

Thanks.

Kevin.

---
From 1736f09ef069ead760a61150a4f66d42b7b057e0 Mon Sep 17 00:00:00 2001
From: Junxiao Shi <git@mail1.yoursunny.com>
Date: Mon, 27 Jan 2020 14:38:00 -0700
Subject: [PATCH] bpf: fix headers install with meson

[ upstream commit 0e8d1ea327d4bd45fd24948be45dcc6716473753 ]

Previously, when librte_bpf is built with meson+ninja, its
headers such as bpf_def is not installed to the system.
This commit fixes this problem.

Fixes: 94972f35a02e ("bpf: add BPF loading and execution framework")

Signed-off-by: Junxiao Shi <git@mail1.yoursunny.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
---
 lib/librte_bpf/meson.build | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/librte_bpf/meson.build b/lib/librte_bpf/meson.build
index 4fbb29d7c3..55662771bd 100644
--- a/lib/librte_bpf/meson.build
+++ b/lib/librte_bpf/meson.build
@@ -13,5 +13,5 @@ if arch_subdir == 'x86' and dpdk_conf.get('RTE_ARCH_64')
 endif
 
-install_headers = files('bpf_def.h',
+install_headers('bpf_def.h',
 			'rte_bpf.h',
 			'rte_bpf_ethdev.h')
-- 
2.21.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-02-14 17:02:39.326923378 +0000
+++ 0041-bpf-fix-headers-install-with-meson.patch	2020-02-14 17:02:37.061405643 +0000
@@ -1 +1 @@
-From 0e8d1ea327d4bd45fd24948be45dcc6716473753 Mon Sep 17 00:00:00 2001
+From 1736f09ef069ead760a61150a4f66d42b7b057e0 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 0e8d1ea327d4bd45fd24948be45dcc6716473753 ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -20 +21 @@
-index 13fc02db38..52cfaf9ac2 100644
+index 4fbb29d7c3..55662771bd 100644
@@ -23 +24 @@
-@@ -15,5 +15,5 @@ elif dpdk_conf.has('RTE_ARCH_ARM64')
+@@ -13,5 +13,5 @@ if arch_subdir == 'x86' and dpdk_conf.get('RTE_ARCH_64')


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

* [dpdk-stable] patch 'app/pdump: fix build with clang' has been queued to LTS release 18.11.7
  2020-02-14 17:02 [dpdk-stable] patch 'net/virtio-user: do not close tap when disabling queue pairs' has been queued to LTS release 18.11.7 Kevin Traynor
                   ` (39 preceding siblings ...)
  2020-02-14 17:03 ` [dpdk-stable] patch 'bpf: fix headers install with meson' " Kevin Traynor
@ 2020-02-14 17:03 ` Kevin Traynor
  2020-02-14 17:03 ` [dpdk-stable] patch 'mem: fix munmap in error unwind' " Kevin Traynor
  41 siblings, 0 replies; 43+ messages in thread
From: Kevin Traynor @ 2020-02-14 17:03 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.7

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable-queue

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable-queue/commit/3cfe805b2d4eb746de9e940e6a922ad85a8c0bc7

Thanks.

Kevin.

---
From 3cfe805b2d4eb746de9e940e6a922ad85a8c0bc7 Mon Sep 17 00:00:00 2001
From: Stephen Hemminger <stephen@networkplumber.org>
Date: Sat, 25 Jan 2020 17:04:38 -0800
Subject: [PATCH] app/pdump: fix build with clang

[ upstream commit ab30f26aaaa025121bdf804152ade031ce9d7c0a ]

Clang checks indentation and found incorrect indentation in pdump.

app/pdump/main.c:598:3: error: misleading indentation;
statement is not part of the previous 'if'
[-Werror,-Wmisleading-indentation]

Fixes: caa7028276b8 ("app/pdump: add tool for packet capturing")

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
 app/pdump/main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/app/pdump/main.c b/app/pdump/main.c
index ccf2a1d2f7..3f1bed89ff 100644
--- a/app/pdump/main.c
+++ b/app/pdump/main.c
@@ -557,5 +557,5 @@ configure_vdev(uint16_t port_id)
 		rte_exit(EXIT_FAILURE, "dev config failed\n");
 
-	 for (q = 0; q < txRings; q++) {
+	for (q = 0; q < txRings; q++) {
 		ret = rte_eth_tx_queue_setup(port_id, q, TX_DESC_PER_QUEUE,
 				rte_eth_dev_socket_id(port_id), NULL);
-- 
2.21.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-02-14 17:02:39.382358035 +0000
+++ 0042-app-pdump-fix-build-with-clang.patch	2020-02-14 17:02:37.062405622 +0000
@@ -1 +1 @@
-From ab30f26aaaa025121bdf804152ade031ce9d7c0a Mon Sep 17 00:00:00 2001
+From 3cfe805b2d4eb746de9e940e6a922ad85a8c0bc7 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit ab30f26aaaa025121bdf804152ade031ce9d7c0a ]
+
@@ -13 +14,0 @@
-Cc: stable@dpdk.org
@@ -21 +22 @@
-index 903d02f482..d05a023667 100644
+index ccf2a1d2f7..3f1bed89ff 100644
@@ -24 +25 @@
-@@ -596,5 +596,5 @@ configure_vdev(uint16_t port_id)
+@@ -557,5 +557,5 @@ configure_vdev(uint16_t port_id)


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

* [dpdk-stable] patch 'mem: fix munmap in error unwind' has been queued to LTS release 18.11.7
  2020-02-14 17:02 [dpdk-stable] patch 'net/virtio-user: do not close tap when disabling queue pairs' has been queued to LTS release 18.11.7 Kevin Traynor
                   ` (40 preceding siblings ...)
  2020-02-14 17:03 ` [dpdk-stable] patch 'app/pdump: fix build with clang' " Kevin Traynor
@ 2020-02-14 17:03 ` Kevin Traynor
  41 siblings, 0 replies; 43+ messages in thread
From: Kevin Traynor @ 2020-02-14 17:03 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: Anatoly Burakov, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.7

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable-queue

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable-queue/commit/6556afdb8ad245e9da0f1bf0ba7850675008d158

Thanks.

Kevin.

---
From 6556afdb8ad245e9da0f1bf0ba7850675008d158 Mon Sep 17 00:00:00 2001
From: Stephen Hemminger <stephen@networkplumber.org>
Date: Wed, 22 Jan 2020 09:06:11 -0800
Subject: [PATCH] mem: fix munmap in error unwind

[ upstream commit 292f02b58c26c3bad2327a52c49ec6eff580e124 ]

The loop to unwind existing mmaps was only unmapping the
first segment and the error paths after mmap() were not
doing munmap of the current segment.

Fixes: 66cc45e293ed ("mem: replace memseg with memseg lists")

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
---
 lib/librte_eal/linuxapp/eal/eal_memory.c | 21 +++++++++------------
 1 file changed, 9 insertions(+), 12 deletions(-)

diff --git a/lib/librte_eal/linuxapp/eal/eal_memory.c b/lib/librte_eal/linuxapp/eal/eal_memory.c
index de91c6afb0..ac0424582e 100644
--- a/lib/librte_eal/linuxapp/eal/eal_memory.c
+++ b/lib/librte_eal/linuxapp/eal/eal_memory.c
@@ -1869,5 +1869,5 @@ eal_legacy_hugepage_attach(void)
 			RTE_LOG(DEBUG, EAL, "%s(): Locking file failed: %s\n",
 				__func__, strerror(errno));
-			goto fd_error;
+			goto mmap_error;
 		}
 
@@ -1877,5 +1877,5 @@ eal_legacy_hugepage_attach(void)
 			RTE_LOG(DEBUG, EAL, "%s(): Cannot find memseg list\n",
 				__func__);
-			goto fd_error;
+			goto mmap_error;
 		}
 		ms = rte_mem_virt2memseg(map_addr, msl);
@@ -1883,5 +1883,5 @@ eal_legacy_hugepage_attach(void)
 			RTE_LOG(DEBUG, EAL, "%s(): Cannot find memseg\n",
 				__func__);
-			goto fd_error;
+			goto mmap_error;
 		}
 
@@ -1891,5 +1891,5 @@ eal_legacy_hugepage_attach(void)
 			RTE_LOG(DEBUG, EAL, "%s(): Cannot find memseg idx\n",
 				__func__);
-			goto fd_error;
+			goto mmap_error;
 		}
 
@@ -1904,16 +1904,13 @@ eal_legacy_hugepage_attach(void)
 	return 0;
 
+mmap_error:
+	munmap(hp[i].final_va, hp[i].size);
 fd_error:
 	close(fd);
 error:
-	/* map all segments into memory to make sure we get the addrs */
-	cur_seg = 0;
-	for (cur_seg = 0; cur_seg < i; cur_seg++) {
-		struct hugepage_file *hf = &hp[i];
-		size_t map_sz = hf->size;
-		void *map_addr = hf->final_va;
+	/* unwind mmap's done so far */
+	for (cur_seg = 0; cur_seg < i; cur_seg++)
+		munmap(hp[cur_seg].final_va, hp[cur_seg].size);
 
-		munmap(map_addr, map_sz);
-	}
 	if (hp != NULL && hp != MAP_FAILED)
 		munmap(hp, size);
-- 
2.21.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-02-14 17:02:39.435233742 +0000
+++ 0043-mem-fix-munmap-in-error-unwind.patch	2020-02-14 17:02:37.064405580 +0000
@@ -1 +1 @@
-From 292f02b58c26c3bad2327a52c49ec6eff580e124 Mon Sep 17 00:00:00 2001
+From 6556afdb8ad245e9da0f1bf0ba7850675008d158 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 292f02b58c26c3bad2327a52c49ec6eff580e124 ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -16 +17 @@
- lib/librte_eal/linux/eal/eal_memory.c | 21 +++++++++------------
+ lib/librte_eal/linuxapp/eal/eal_memory.c | 21 +++++++++------------
@@ -19,5 +20,5 @@
-diff --git a/lib/librte_eal/linux/eal/eal_memory.c b/lib/librte_eal/linux/eal/eal_memory.c
-index 43e4ffc757..5604c2a7c0 100644
---- a/lib/librte_eal/linux/eal/eal_memory.c
-+++ b/lib/librte_eal/linux/eal/eal_memory.c
-@@ -1929,5 +1929,5 @@ eal_legacy_hugepage_attach(void)
+diff --git a/lib/librte_eal/linuxapp/eal/eal_memory.c b/lib/librte_eal/linuxapp/eal/eal_memory.c
+index de91c6afb0..ac0424582e 100644
+--- a/lib/librte_eal/linuxapp/eal/eal_memory.c
++++ b/lib/librte_eal/linuxapp/eal/eal_memory.c
+@@ -1869,5 +1869,5 @@ eal_legacy_hugepage_attach(void)
@@ -30 +31 @@
-@@ -1937,5 +1937,5 @@ eal_legacy_hugepage_attach(void)
+@@ -1877,5 +1877,5 @@ eal_legacy_hugepage_attach(void)
@@ -37 +38 @@
-@@ -1943,5 +1943,5 @@ eal_legacy_hugepage_attach(void)
+@@ -1883,5 +1883,5 @@ eal_legacy_hugepage_attach(void)
@@ -44 +45 @@
-@@ -1951,5 +1951,5 @@ eal_legacy_hugepage_attach(void)
+@@ -1891,5 +1891,5 @@ eal_legacy_hugepage_attach(void)
@@ -51 +52 @@
-@@ -1964,16 +1964,13 @@ eal_legacy_hugepage_attach(void)
+@@ -1904,16 +1904,13 @@ eal_legacy_hugepage_attach(void)


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

end of thread, other threads:[~2020-02-14 17:06 UTC | newest]

Thread overview: 43+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-14 17:02 [dpdk-stable] patch 'net/virtio-user: do not close tap when disabling queue pairs' has been queued to LTS release 18.11.7 Kevin Traynor
2020-02-14 17:02 ` [dpdk-stable] patch 'net/virtio-user: check tap offload setting failure' " Kevin Traynor
2020-02-14 17:02 ` [dpdk-stable] patch 'vhost: fix deadlock on port deletion' " Kevin Traynor
2020-02-14 17:02 ` [dpdk-stable] patch 'net/ixgbe: remove duplicate function declaration' " Kevin Traynor
2020-02-14 17:02 ` [dpdk-stable] patch 'net/dpaa: fix Rx offload flags on jumbo MTU set' " Kevin Traynor
2020-02-14 17:03 ` [dpdk-stable] patch 'ethdev: fix switching domain allocation' " Kevin Traynor
2020-02-14 17:03 ` [dpdk-stable] patch 'ethdev: fix secondary process memory overwrite' " Kevin Traynor
2020-02-14 17:03 ` [dpdk-stable] patch 'mk: avoid combining -r and -export-dynamic linker options' " Kevin Traynor
2020-02-14 17:03 ` [dpdk-stable] patch 'kni: rename variable with namespace prefix' " Kevin Traynor
2020-02-14 17:03 ` [dpdk-stable] patch 'cfgfile: fix symbols map' " Kevin Traynor
2020-02-14 17:03 ` [dpdk-stable] patch 'latency: fix calculation for multi-thread' " Kevin Traynor
2020-02-14 17:03 ` [dpdk-stable] patch 'mempool: fix anonymous populate' " Kevin Traynor
2020-02-14 17:03 ` [dpdk-stable] patch 'maintainers: update for failsafe and PCI library' " Kevin Traynor
2020-02-14 17:03 ` [dpdk-stable] patch 'maintainers: resign from flow API maintenance' " Kevin Traynor
2020-02-14 17:03 ` [dpdk-stable] patch 'net/bnxt: fix flow creation' " Kevin Traynor
2020-02-14 17:03 ` [dpdk-stable] patch 'net/bnxt: use macro for PCI log format' " Kevin Traynor
2020-02-14 17:03 ` [dpdk-stable] patch 'net/bnxt: do not log error if stats queried before start' " Kevin Traynor
2020-02-14 17:03 ` [dpdk-stable] patch 'net/bnxt: remove unnecessary memset' " Kevin Traynor
2020-02-14 17:03 ` [dpdk-stable] patch 'net/tap: fix memory leak when unregister intr handler' " Kevin Traynor
2020-02-14 17:03 ` [dpdk-stable] patch 'net/bnx2x: fix reset of scan FP flag' " Kevin Traynor
2020-02-14 17:03 ` [dpdk-stable] patch 'net/bnx2x: fix to sync fastpath Rx queue access' " Kevin Traynor
2020-02-14 17:03 ` [dpdk-stable] patch 'net/bnxt: fix alloc filter to use a common routine' " Kevin Traynor
2020-02-14 17:03 ` [dpdk-stable] patch 'net/bnxt: remove redundant if statement' " Kevin Traynor
2020-02-14 17:03 ` [dpdk-stable] patch 'net/bnx2x: fix VLAN stripped flag' " Kevin Traynor
2020-02-14 17:03 ` [dpdk-stable] patch 'net/mlx5: fix VXLAN-GPE item translation' " Kevin Traynor
2020-02-14 17:03 ` [dpdk-stable] patch 'net/octeontx: fix memory leak of MAC address table' " Kevin Traynor
2020-02-14 17:03 ` [dpdk-stable] patch 'app/testpmd: fix uninitialized members of MPLS' " Kevin Traynor
2020-02-14 17:03 ` [dpdk-stable] patch 'app/testpmd: fix initial value when setting PFC' " Kevin Traynor
2020-02-14 17:03 ` [dpdk-stable] patch 'app/testpmd: fix uninitialized members " Kevin Traynor
2020-02-14 17:03 ` [dpdk-stable] patch 'net/failsafe: fix reported hash key size in device info' " Kevin Traynor
2020-02-14 17:03 ` [dpdk-stable] patch 'vhost: fix crash on port deletion' " Kevin Traynor
2020-02-14 17:03 ` [dpdk-stable] patch 'vhost: do not treat empty socket message as error' " Kevin Traynor
2020-02-14 17:03 ` [dpdk-stable] patch 'vhost/crypto: fix fetch size' " Kevin Traynor
2020-02-14 17:03 ` [dpdk-stable] patch 'vhost: fix packed virtqueue ready condition' " Kevin Traynor
2020-02-14 17:03 ` [dpdk-stable] patch 'vhost: catch overflow causing mmap of size 0' " Kevin Traynor
2020-02-14 17:03 ` [dpdk-stable] patch 'crypto/armv8: fix clang build' " Kevin Traynor
2020-02-14 17:03 ` [dpdk-stable] patch 'examples/fips_validation: fix cipher length for AES-GCM' " Kevin Traynor
2020-02-14 17:03 ` [dpdk-stable] patch 'common/cpt: remove redundant code in datapath' " Kevin Traynor
2020-02-14 17:03 ` [dpdk-stable] patch 'common/cpt: check cipher and auth keys are set' " Kevin Traynor
2020-02-14 17:03 ` [dpdk-stable] patch 'common/cpt: fix component for empty IOV buffer' " Kevin Traynor
2020-02-14 17:03 ` [dpdk-stable] patch 'bpf: fix headers install with meson' " Kevin Traynor
2020-02-14 17:03 ` [dpdk-stable] patch 'app/pdump: fix build with clang' " Kevin Traynor
2020-02-14 17:03 ` [dpdk-stable] patch 'mem: fix munmap in error unwind' " Kevin Traynor

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).