patches for DPDK stable branches
 help / color / mirror / Atom feed
* patch 'vhost: fix queue number check when setting inflight FD' has been queued to stable release 19.11.12
@ 2022-03-17 14:17 christian.ehrhardt
  2022-03-17 14:17 ` patch 'vhost: fix FD leak with inflight messages' " christian.ehrhardt
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: christian.ehrhardt @ 2022-03-17 14:17 UTC (permalink / raw)
  To: Chenbo Xia; +Cc: Wenxiang Qian, Maxime Coquelin, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.12

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 03/19/22. 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/cpaelzer/dpdk-stable-queue

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From aef547884b8a64c0754b4b7906ae9d7c912b8043 Mon Sep 17 00:00:00 2001
From: Chenbo Xia <chenbo.xia@intel.com>
Date: Mon, 14 Feb 2022 16:32:37 +0800
Subject: [PATCH] vhost: fix queue number check when setting inflight FD

[ upstream commit 6442c329b9d2ded0f44b27d2016aaba8ba5844c5 ]

In function vhost_user_set_inflight_fd, queue number in inflight
message is used to access virtqueue. However, queue number could
be larger than VHOST_MAX_VRING and cause write OOB as this number
will be used to write inflight info in virtqueue structure. This
patch checks the queue number to avoid the issue and also make
sure virtqueues are allocated before setting inflight information.

Fixes: ad0a4ae491fe ("vhost: checkout resubmit inflight information")
Cc: stable@dpdk.org

Reported-by: Wenxiang Qian <leonwxqian@gmail.com>
Signed-off-by: Chenbo Xia <chenbo.xia@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
---
 lib/librte_vhost/vhost_user.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/lib/librte_vhost/vhost_user.c b/lib/librte_vhost/vhost_user.c
index 1ee6050ac0..79be132c43 100644
--- a/lib/librte_vhost/vhost_user.c
+++ b/lib/librte_vhost/vhost_user.c
@@ -2624,6 +2624,9 @@ vhost_user_check_and_alloc_queue_pair(struct virtio_net *dev,
 	case VHOST_USER_SET_VRING_ADDR:
 		vring_idx = msg->payload.addr.index;
 		break;
+	case VHOST_USER_SET_INFLIGHT_FD:
+		vring_idx = msg->payload.inflight.num_queues - 1;
+		break;
 	default:
 		return 0;
 	}
-- 
2.35.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-03-17 14:33:41.927799482 +0100
+++ 0001-vhost-fix-queue-number-check-when-setting-inflight-F.patch	2022-03-17 14:33:41.828622841 +0100
@@ -1 +1 @@
-From 6442c329b9d2ded0f44b27d2016aaba8ba5844c5 Mon Sep 17 00:00:00 2001
+From aef547884b8a64c0754b4b7906ae9d7c912b8043 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 6442c329b9d2ded0f44b27d2016aaba8ba5844c5 ]
+
@@ -20 +22 @@
- lib/vhost/vhost_user.c | 3 +++
+ lib/librte_vhost/vhost_user.c | 3 +++
@@ -23,5 +25,5 @@
-diff --git a/lib/vhost/vhost_user.c b/lib/vhost/vhost_user.c
-index 589b950458..1ec4357bee 100644
---- a/lib/vhost/vhost_user.c
-+++ b/lib/vhost/vhost_user.c
-@@ -2883,6 +2883,9 @@ vhost_user_check_and_alloc_queue_pair(struct virtio_net *dev,
+diff --git a/lib/librte_vhost/vhost_user.c b/lib/librte_vhost/vhost_user.c
+index 1ee6050ac0..79be132c43 100644
+--- a/lib/librte_vhost/vhost_user.c
++++ b/lib/librte_vhost/vhost_user.c
+@@ -2624,6 +2624,9 @@ vhost_user_check_and_alloc_queue_pair(struct virtio_net *dev,
@@ -29 +31 @@
- 		vring_idx = ctx->msg.payload.addr.index;
+ 		vring_idx = msg->payload.addr.index;
@@ -32 +34 @@
-+		vring_idx = ctx->msg.payload.inflight.num_queues - 1;
++		vring_idx = msg->payload.inflight.num_queues - 1;

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

* patch 'vhost: fix FD leak with inflight messages' has been queued to stable release 19.11.12
  2022-03-17 14:17 patch 'vhost: fix queue number check when setting inflight FD' has been queued to stable release 19.11.12 christian.ehrhardt
@ 2022-03-17 14:17 ` christian.ehrhardt
  2022-03-17 14:17 ` patch 'app/testpmd: fix show RSS RETA on Windows' " christian.ehrhardt
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: christian.ehrhardt @ 2022-03-17 14:17 UTC (permalink / raw)
  To: David Marchand; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.12

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 03/19/22. 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/cpaelzer/dpdk-stable-queue

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From b7979d39ef4d6ad0d78bd66e07168401391c34fa Mon Sep 17 00:00:00 2001
From: David Marchand <david.marchand@redhat.com>
Date: Tue, 18 Jan 2022 15:53:30 +0100
Subject: [PATCH] vhost: fix FD leak with inflight messages

[ upstream commit af74f7db384ed149fe42b21dbd7975f8a54ef227 ]

Even if unlikely, a buggy vhost-user master might attach fds to inflight
messages. Add checks like for other types of vhost-user messages.

Fixes: d87f1a1cb7b6 ("vhost: support inflight info sharing")
Cc: stable@dpdk.org
---
 lib/librte_vhost/vhost_user.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/lib/librte_vhost/vhost_user.c b/lib/librte_vhost/vhost_user.c
index 79be132c43..af44d1e69c 100644
--- a/lib/librte_vhost/vhost_user.c
+++ b/lib/librte_vhost/vhost_user.c
@@ -1441,6 +1441,9 @@ vhost_user_get_inflight_fd(struct virtio_net **pdev,
 	int fd, i, j;
 	void *addr;
 
+	if (validate_msg_fds(msg, 0) != 0)
+		return RTE_VHOST_MSG_RESULT_ERR;
+
 	if (msg->size != sizeof(msg->payload.inflight)) {
 		RTE_LOG(ERR, VHOST_CONFIG,
 			"invalid get_inflight_fd message size is %d\n",
@@ -1534,6 +1537,9 @@ vhost_user_set_inflight_fd(struct virtio_net **pdev, VhostUserMsg *msg,
 	void *addr;
 	int fd, i;
 
+	if (validate_msg_fds(msg, 1) != 0)
+		return RTE_VHOST_MSG_RESULT_ERR;
+
 	fd = msg->fds[0];
 	if (msg->size != sizeof(msg->payload.inflight) || fd < 0) {
 		RTE_LOG(ERR, VHOST_CONFIG,
-- 
2.35.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-03-17 14:33:42.001555424 +0100
+++ 0002-vhost-fix-FD-leak-with-inflight-messages.patch	2022-03-17 14:33:41.836622877 +0100
@@ -1 +1 @@
-From af74f7db384ed149fe42b21dbd7975f8a54ef227 Mon Sep 17 00:00:00 2001
+From b7979d39ef4d6ad0d78bd66e07168401391c34fa Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit af74f7db384ed149fe42b21dbd7975f8a54ef227 ]
+
@@ -11,3 +12,0 @@
-
-Signed-off-by: David Marchand <david.marchand@redhat.com>
-Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
@@ -15 +14 @@
- lib/vhost/vhost_user.c | 6 ++++++
+ lib/librte_vhost/vhost_user.c | 6 ++++++
@@ -18,6 +17,6 @@
-diff --git a/lib/vhost/vhost_user.c b/lib/vhost/vhost_user.c
-index 1ec4357bee..1d390677fa 100644
---- a/lib/vhost/vhost_user.c
-+++ b/lib/vhost/vhost_user.c
-@@ -1602,6 +1602,9 @@ vhost_user_get_inflight_fd(struct virtio_net **pdev,
- 	int numa_node = SOCKET_ID_ANY;
+diff --git a/lib/librte_vhost/vhost_user.c b/lib/librte_vhost/vhost_user.c
+index 79be132c43..af44d1e69c 100644
+--- a/lib/librte_vhost/vhost_user.c
++++ b/lib/librte_vhost/vhost_user.c
+@@ -1441,6 +1441,9 @@ vhost_user_get_inflight_fd(struct virtio_net **pdev,
+ 	int fd, i, j;
@@ -26 +25 @@
-+	if (validate_msg_fds(dev, ctx, 0) != 0)
++	if (validate_msg_fds(msg, 0) != 0)
@@ -29,4 +28,5 @@
- 	if (ctx->msg.size != sizeof(ctx->msg.payload.inflight)) {
- 		VHOST_LOG_CONFIG(ERR, "(%s) invalid get_inflight_fd message size is %d\n",
- 			dev->ifname, ctx->msg.size);
-@@ -1699,6 +1702,9 @@ vhost_user_set_inflight_fd(struct virtio_net **pdev,
+ 	if (msg->size != sizeof(msg->payload.inflight)) {
+ 		RTE_LOG(ERR, VHOST_CONFIG,
+ 			"invalid get_inflight_fd message size is %d\n",
+@@ -1534,6 +1537,9 @@ vhost_user_set_inflight_fd(struct virtio_net **pdev, VhostUserMsg *msg,
+ 	void *addr;
@@ -34 +33,0 @@
- 	int numa_node = SOCKET_ID_ANY;
@@ -36 +35 @@
-+	if (validate_msg_fds(dev, ctx, 1) != 0)
++	if (validate_msg_fds(msg, 1) != 0)
@@ -39,3 +38,3 @@
- 	fd = ctx->fds[0];
- 	if (ctx->msg.size != sizeof(ctx->msg.payload.inflight) || fd < 0) {
- 		VHOST_LOG_CONFIG(ERR, "(%s) invalid set_inflight_fd message size is %d,fd is %d\n",
+ 	fd = msg->fds[0];
+ 	if (msg->size != sizeof(msg->payload.inflight) || fd < 0) {
+ 		RTE_LOG(ERR, VHOST_CONFIG,

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

* patch 'app/testpmd: fix show RSS RETA on Windows' has been queued to stable release 19.11.12
  2022-03-17 14:17 patch 'vhost: fix queue number check when setting inflight FD' has been queued to stable release 19.11.12 christian.ehrhardt
  2022-03-17 14:17 ` patch 'vhost: fix FD leak with inflight messages' " christian.ehrhardt
@ 2022-03-17 14:17 ` christian.ehrhardt
  2022-03-17 14:17 ` patch 'examples/l3fwd: fix buffer overflow in Tx' " christian.ehrhardt
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: christian.ehrhardt @ 2022-03-17 14:17 UTC (permalink / raw)
  To: Adham Masarwah; +Cc: Aman Singh, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.12

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 03/19/22. 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/cpaelzer/dpdk-stable-queue

This queued commit can be viewed at:
https://github.com/cpaelzer/dpdk-stable-queue/commit/61f29e70737e3a20541cc4fc07589436a14c7972

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From 61f29e70737e3a20541cc4fc07589436a14c7972 Mon Sep 17 00:00:00 2001
From: Adham Masarwah <adham@nvidia.com>
Date: Sun, 13 Mar 2022 14:57:02 +0200
Subject: [PATCH] app/testpmd: fix show RSS RETA on Windows

[ upstream commit 5aae2723cddba81b179162b5e7e4f6bd429eaac5 ]

Replaced using strtoul with strtoull when converting to
64-bit mask field.
In Windows strtoul returns 32-bit values which cause an
issue with show RSS RETA.

Fixes: 66c594904ac ("ethdev: support multiple sizes of redirection table")

Signed-off-by: Adham Masarwah <adham@nvidia.com>
Acked-by: Aman Singh <aman.deep.singh@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 e5e922dda1..3a2ba414c8 100644
--- a/app/test-pmd/cmdline.c
+++ b/app/test-pmd/cmdline.c
@@ -3062,7 +3062,7 @@ showport_parse_reta_config(struct rte_eth_rss_reta_entry64 *conf,
 		return -1;
 	}
 	for (i = 0; i < ret; i++)
-		conf[i].mask = (uint64_t)strtoul(str_fld[i], &end, 0);
+		conf[i].mask = (uint64_t)strtoull(str_fld[i], &end, 0);
 
 	return 0;
 }
-- 
2.35.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-03-17 14:33:42.061851270 +0100
+++ 0003-app-testpmd-fix-show-RSS-RETA-on-Windows.patch	2022-03-17 14:33:41.868623019 +0100
@@ -1 +1 @@
-From 5aae2723cddba81b179162b5e7e4f6bd429eaac5 Mon Sep 17 00:00:00 2001
+From 61f29e70737e3a20541cc4fc07589436a14c7972 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 5aae2723cddba81b179162b5e7e4f6bd429eaac5 ]
+
@@ -12 +13,0 @@
-Cc: stable@dpdk.org
@@ -21 +22 @@
-index 7ab0575e64..6ffea8e21a 100644
+index e5e922dda1..3a2ba414c8 100644
@@ -24 +25 @@
-@@ -3127,7 +3127,7 @@ showport_parse_reta_config(struct rte_eth_rss_reta_entry64 *conf,
+@@ -3062,7 +3062,7 @@ showport_parse_reta_config(struct rte_eth_rss_reta_entry64 *conf,

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

* patch 'examples/l3fwd: fix buffer overflow in Tx' has been queued to stable release 19.11.12
  2022-03-17 14:17 patch 'vhost: fix queue number check when setting inflight FD' has been queued to stable release 19.11.12 christian.ehrhardt
  2022-03-17 14:17 ` patch 'vhost: fix FD leak with inflight messages' " christian.ehrhardt
  2022-03-17 14:17 ` patch 'app/testpmd: fix show RSS RETA on Windows' " christian.ehrhardt
@ 2022-03-17 14:17 ` christian.ehrhardt
  2022-03-17 14:17 ` patch 'eal/freebsd: add missing C++ include guards' " christian.ehrhardt
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: christian.ehrhardt @ 2022-03-17 14:17 UTC (permalink / raw)
  To: Rahul Bhansali; +Cc: Conor Walsh, Konstantin Ananyev, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.12

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 03/19/22. 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/cpaelzer/dpdk-stable-queue

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From d3847ac2c5d194e9bcae34f613796332c38ec511 Mon Sep 17 00:00:00 2001
From: Rahul Bhansali <rbhansali@marvell.com>
Date: Tue, 11 Jan 2022 18:20:05 +0530
Subject: [PATCH] examples/l3fwd: fix buffer overflow in Tx

[ upstream commit 0490d69d58d9d75c37e780966c837a062658f528 ]

This patch fixes the stack buffer overflow error reported
from AddressSanitizer.
Function send_packetsx4() tries to access out of bound data
from rte_mbuf and fill it into TX buffer even in the case
where no pending packets (len = 0).
Performance impact:- No

ASAN error report:-
==819==ERROR: AddressSanitizer: stack-buffer-overflow on address
0xffffe2c0dcf0 at pc 0x0000005e791c bp 0xffffe2c0d7e0 sp 0xffffe2c0d800
READ of size 8 at 0xffffe2c0dcf0 thread T0
 #0 0x5e7918 in send_packetsx4 ../examples/l3fwd/l3fwd_common.h:251
 #1 0x5e7918 in send_packets_multi ../examples/l3fwd/l3fwd_neon.h:226

Fixes: 96ff445371e0 ("examples/l3fwd: reorganise and optimize LPM code path")

Signed-off-by: Rahul Bhansali <rbhansali@marvell.com>
Reviewed-by: Conor Walsh <conor.walsh@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
---
 examples/l3fwd/l3fwd_common.h | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/examples/l3fwd/l3fwd_common.h b/examples/l3fwd/l3fwd_common.h
index 7d83ff641a..de77711f88 100644
--- a/examples/l3fwd/l3fwd_common.h
+++ b/examples/l3fwd/l3fwd_common.h
@@ -236,6 +236,9 @@ send_packetsx4(struct lcore_conf *qconf, uint16_t port, struct rte_mbuf *m[],
 
 		/* copy rest of the packets into the TX buffer. */
 		len = num - n;
+		if (len == 0)
+			goto exit;
+
 		j = 0;
 		switch (len % FWDSTEP) {
 		while (j < len) {
@@ -258,6 +261,7 @@ send_packetsx4(struct lcore_conf *qconf, uint16_t port, struct rte_mbuf *m[],
 		}
 	}
 
+exit:
 	qconf->tx_mbufs[port].len = len;
 }
 
-- 
2.35.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-03-17 14:33:42.139334109 +0100
+++ 0004-examples-l3fwd-fix-buffer-overflow-in-Tx.patch	2022-03-17 14:33:41.872623036 +0100
@@ -1 +1 @@
-From 0490d69d58d9d75c37e780966c837a062658f528 Mon Sep 17 00:00:00 2001
+From d3847ac2c5d194e9bcae34f613796332c38ec511 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 0490d69d58d9d75c37e780966c837a062658f528 ]
+
@@ -21 +22,0 @@
-Cc: stable@dpdk.org
@@ -31 +32 @@
-index cbaab79f5b..8e4c27218f 100644
+index 7d83ff641a..de77711f88 100644

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

* patch 'eal/freebsd: add missing C++ include guards' has been queued to stable release 19.11.12
  2022-03-17 14:17 patch 'vhost: fix queue number check when setting inflight FD' has been queued to stable release 19.11.12 christian.ehrhardt
                   ` (2 preceding siblings ...)
  2022-03-17 14:17 ` patch 'examples/l3fwd: fix buffer overflow in Tx' " christian.ehrhardt
@ 2022-03-17 14:17 ` christian.ehrhardt
  2022-03-17 14:17 ` patch 'compressdev: fix missing space in log macro' " christian.ehrhardt
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: christian.ehrhardt @ 2022-03-17 14:17 UTC (permalink / raw)
  To: Bruce Richardson; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.12

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 03/19/22. 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/cpaelzer/dpdk-stable-queue

This queued commit can be viewed at:
https://github.com/cpaelzer/dpdk-stable-queue/commit/66be196f77ff1ae5df42446e49041f6f99c4fe5b

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From 66be196f77ff1ae5df42446e49041f6f99c4fe5b Mon Sep 17 00:00:00 2001
From: Bruce Richardson <bruce.richardson@intel.com>
Date: Fri, 11 Mar 2022 20:05:19 +0000
Subject: [PATCH] eal/freebsd: add missing C++ include guards

[ upstream commit 29fd052dcc3be76112bc7b03a918308ebcf901d8 ]

Add missing 'extern "C"' to file.

Fixes: 428eb983f5f7 ("eal: add OS specific header file")

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
---
 lib/librte_eal/freebsd/eal/include/rte_os.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/lib/librte_eal/freebsd/eal/include/rte_os.h b/lib/librte_eal/freebsd/eal/include/rte_os.h
index c16f2a30e9..78ee6fd8f4 100644
--- a/lib/librte_eal/freebsd/eal/include/rte_os.h
+++ b/lib/librte_eal/freebsd/eal/include/rte_os.h
@@ -5,6 +5,10 @@
 #ifndef _RTE_OS_H_
 #define _RTE_OS_H_
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /**
  * This header should contain any definition
  * which is not supported natively or named differently in FreeBSD.
@@ -48,4 +52,8 @@ typedef cpuset_t rte_cpuset_t;
 } while (0)
 #endif
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* _RTE_OS_H_ */
-- 
2.35.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-03-17 14:33:42.207952321 +0100
+++ 0005-eal-freebsd-add-missing-C-include-guards.patch	2022-03-17 14:33:41.872623036 +0100
@@ -1 +1 @@
-From 29fd052dcc3be76112bc7b03a918308ebcf901d8 Mon Sep 17 00:00:00 2001
+From 66be196f77ff1ae5df42446e49041f6f99c4fe5b Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 29fd052dcc3be76112bc7b03a918308ebcf901d8 ]
+
@@ -9 +10,0 @@
-Cc: stable@dpdk.org
@@ -13 +14 @@
- lib/eal/freebsd/include/rte_os.h | 8 ++++++++
+ lib/librte_eal/freebsd/eal/include/rte_os.h | 8 ++++++++
@@ -16,4 +17,4 @@
-diff --git a/lib/eal/freebsd/include/rte_os.h b/lib/eal/freebsd/include/rte_os.h
-index 9d8a69008c..b4afd45adc 100644
---- a/lib/eal/freebsd/include/rte_os.h
-+++ b/lib/eal/freebsd/include/rte_os.h
+diff --git a/lib/librte_eal/freebsd/eal/include/rte_os.h b/lib/librte_eal/freebsd/eal/include/rte_os.h
+index c16f2a30e9..78ee6fd8f4 100644
+--- a/lib/librte_eal/freebsd/eal/include/rte_os.h
++++ b/lib/librte_eal/freebsd/eal/include/rte_os.h
@@ -31 +32 @@
-@@ -59,4 +63,8 @@ typedef cpuset_t rte_cpuset_t;
+@@ -48,4 +52,8 @@ typedef cpuset_t rte_cpuset_t;

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

* patch 'compressdev: fix missing space in log macro' has been queued to stable release 19.11.12
  2022-03-17 14:17 patch 'vhost: fix queue number check when setting inflight FD' has been queued to stable release 19.11.12 christian.ehrhardt
                   ` (3 preceding siblings ...)
  2022-03-17 14:17 ` patch 'eal/freebsd: add missing C++ include guards' " christian.ehrhardt
@ 2022-03-17 14:17 ` christian.ehrhardt
  2022-03-17 14:17 ` patch 'cryptodev: fix clang C++ include' " christian.ehrhardt
  2022-03-17 14:17 ` patch 'raw/ifpga: fix build with optimization' " christian.ehrhardt
  6 siblings, 0 replies; 8+ messages in thread
From: christian.ehrhardt @ 2022-03-17 14:17 UTC (permalink / raw)
  To: Bruce Richardson; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.12

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 03/19/22. 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/cpaelzer/dpdk-stable-queue

This queued commit can be viewed at:
https://github.com/cpaelzer/dpdk-stable-queue/commit/8174ed2b2f88d9a7c2966d26426fb423cd37c902

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From 8174ed2b2f88d9a7c2966d26426fb423cd37c902 Mon Sep 17 00:00:00 2001
From: Bruce Richardson <bruce.richardson@intel.com>
Date: Fri, 11 Mar 2022 20:05:21 +0000
Subject: [PATCH] compressdev: fix missing space in log macro

[ upstream commit dfb90fbe6b2b11ecf3535286c8d418ba8cc5485c ]

Building with clang on FreeBSD with chkincs enabled, we get the
following error about a missing space:

lib/compressdev/rte_compressdev_internal.h:25:58: error:
invalid suffix on literal;
C++11 requires a space between literal and identifier [-Wreserved-user-defined-literal]
        rte_log(RTE_LOG_ ## level, compressdev_logtype, "%s(): "fmt "\n", \

Adding in a space between the '"' and 'fmt' removes the error.

Fixes: ed7dd94f7f66 ("compressdev: add basic device management")

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
---
 lib/librte_compressdev/rte_compressdev_internal.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/librte_compressdev/rte_compressdev_internal.h b/lib/librte_compressdev/rte_compressdev_internal.h
index 25d8afbfb9..b3b193e3ee 100644
--- a/lib/librte_compressdev/rte_compressdev_internal.h
+++ b/lib/librte_compressdev/rte_compressdev_internal.h
@@ -22,7 +22,7 @@ extern "C" {
 /* Logging Macros */
 extern int compressdev_logtype;
 #define COMPRESSDEV_LOG(level, fmt, args...) \
-	rte_log(RTE_LOG_ ## level, compressdev_logtype, "%s(): "fmt "\n", \
+	rte_log(RTE_LOG_ ## level, compressdev_logtype, "%s(): " fmt "\n", \
 			__func__, ##args)
 
 /**
-- 
2.35.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-03-17 14:33:42.273314367 +0100
+++ 0006-compressdev-fix-missing-space-in-log-macro.patch	2022-03-17 14:33:41.872623036 +0100
@@ -1 +1 @@
-From dfb90fbe6b2b11ecf3535286c8d418ba8cc5485c Mon Sep 17 00:00:00 2001
+From 8174ed2b2f88d9a7c2966d26426fb423cd37c902 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit dfb90fbe6b2b11ecf3535286c8d418ba8cc5485c ]
+
@@ -17 +18,0 @@
-Cc: stable@dpdk.org
@@ -21 +22 @@
- lib/compressdev/rte_compressdev_internal.h | 2 +-
+ lib/librte_compressdev/rte_compressdev_internal.h | 2 +-
@@ -24 +25 @@
-diff --git a/lib/compressdev/rte_compressdev_internal.h b/lib/compressdev/rte_compressdev_internal.h
+diff --git a/lib/librte_compressdev/rte_compressdev_internal.h b/lib/librte_compressdev/rte_compressdev_internal.h
@@ -26,2 +27,2 @@
---- a/lib/compressdev/rte_compressdev_internal.h
-+++ b/lib/compressdev/rte_compressdev_internal.h
+--- a/lib/librte_compressdev/rte_compressdev_internal.h
++++ b/lib/librte_compressdev/rte_compressdev_internal.h

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

* patch 'cryptodev: fix clang C++ include' has been queued to stable release 19.11.12
  2022-03-17 14:17 patch 'vhost: fix queue number check when setting inflight FD' has been queued to stable release 19.11.12 christian.ehrhardt
                   ` (4 preceding siblings ...)
  2022-03-17 14:17 ` patch 'compressdev: fix missing space in log macro' " christian.ehrhardt
@ 2022-03-17 14:17 ` christian.ehrhardt
  2022-03-17 14:17 ` patch 'raw/ifpga: fix build with optimization' " christian.ehrhardt
  6 siblings, 0 replies; 8+ messages in thread
From: christian.ehrhardt @ 2022-03-17 14:17 UTC (permalink / raw)
  To: Bruce Richardson; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.12

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 03/19/22. 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/cpaelzer/dpdk-stable-queue

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From f9b9d26a695a2558f38d19919b2e9df3eca78821 Mon Sep 17 00:00:00 2001
From: Bruce Richardson <bruce.richardson@intel.com>
Date: Fri, 11 Mar 2022 20:05:22 +0000
Subject: [PATCH] cryptodev: fix clang C++ include

[ upstream commit 1763c91b06ca65bbb8516f47b97cffe1cac97dde ]

When compiling on FreeBSD with clang and include checking enabled,
errors are emitted due to differences in how empty structs/unions are
handled in C and C++, as C++ structs cannot have zero size.

lib/cryptodev/rte_crypto.h:127:2: error:
union has size 0 in C, non-zero size in C++

Since the contents of the union are all themselves of zero size,
the actual union wrapper is unnecessary. We therefore remove it for C++
builds - though keep it for C builds for safety and clarity of
understanding the code.

Fixes: c0f87eb5252b ("cryptodev: change burst API to be crypto op oriented")
Fixes: d2a4223c4c6d ("cryptodev: do not store pointer to op specific params")

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
---
 lib/librte_cryptodev/rte_crypto.h | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/lib/librte_cryptodev/rte_crypto.h b/lib/librte_cryptodev/rte_crypto.h
index fd5ef3a876..2ba12cff2e 100644
--- a/lib/librte_cryptodev/rte_crypto.h
+++ b/lib/librte_cryptodev/rte_crypto.h
@@ -113,15 +113,24 @@ struct rte_crypto_op {
 	rte_iova_t phys_addr;
 	/**< physical address of crypto operation */
 
+/* empty structures do not have zero size in C++ leading to compilation errors
+ * with clang about structure/union having different sizes in C and C++.
+ * While things are clearer with an explicit union, since each field is
+ * zero-sized it's not actually needed, so omit it for C++
+ */
+#ifndef __cplusplus
 	__extension__
 	union {
+#endif
 		struct rte_crypto_sym_op sym[0];
 		/**< Symmetric operation parameters */
 
 		struct rte_crypto_asym_op asym[0];
 		/**< Asymmetric operation parameters */
 
+#ifndef __cplusplus
 	}; /**< operation specific parameters */
+#endif
 };
 
 /**
-- 
2.35.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-03-17 14:33:42.352609334 +0100
+++ 0007-cryptodev-fix-clang-C-include.patch	2022-03-17 14:33:41.872623036 +0100
@@ -1 +1 @@
-From 1763c91b06ca65bbb8516f47b97cffe1cac97dde Mon Sep 17 00:00:00 2001
+From f9b9d26a695a2558f38d19919b2e9df3eca78821 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 1763c91b06ca65bbb8516f47b97cffe1cac97dde ]
+
@@ -20 +21,0 @@
-Cc: stable@dpdk.org
@@ -24 +25 @@
- lib/cryptodev/rte_crypto.h | 9 +++++++++
+ lib/librte_cryptodev/rte_crypto.h | 9 +++++++++
@@ -27,5 +28,5 @@
-diff --git a/lib/cryptodev/rte_crypto.h b/lib/cryptodev/rte_crypto.h
-index a864f5036f..aeb3bf6e38 100644
---- a/lib/cryptodev/rte_crypto.h
-+++ b/lib/cryptodev/rte_crypto.h
-@@ -123,15 +123,24 @@ struct rte_crypto_op {
+diff --git a/lib/librte_cryptodev/rte_crypto.h b/lib/librte_cryptodev/rte_crypto.h
+index fd5ef3a876..2ba12cff2e 100644
+--- a/lib/librte_cryptodev/rte_crypto.h
++++ b/lib/librte_cryptodev/rte_crypto.h
+@@ -113,15 +113,24 @@ struct rte_crypto_op {

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

* patch 'raw/ifpga: fix build with optimization' has been queued to stable release 19.11.12
  2022-03-17 14:17 patch 'vhost: fix queue number check when setting inflight FD' has been queued to stable release 19.11.12 christian.ehrhardt
                   ` (5 preceding siblings ...)
  2022-03-17 14:17 ` patch 'cryptodev: fix clang C++ include' " christian.ehrhardt
@ 2022-03-17 14:17 ` christian.ehrhardt
  6 siblings, 0 replies; 8+ messages in thread
From: christian.ehrhardt @ 2022-03-17 14:17 UTC (permalink / raw)
  To: Wei Huang; +Cc: Tianfei Zhang, Rosen Xu, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.12

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 03/19/22. 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/cpaelzer/dpdk-stable-queue

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From ce19f077292a0e53b775e86fd2094a7a358688e3 Mon Sep 17 00:00:00 2001
From: Wei Huang <wei.huang@intel.com>
Date: Wed, 16 Mar 2022 03:26:30 -0400
Subject: [PATCH] raw/ifpga: fix build with optimization

[ upstream commit 047c25401d2b4001e7e20200a5ec05868a113290 ]

Compile failed with cflag optimization=1 on Ubuntu20.04 with GCC10.3,
it reported vendor_id and dev_id may be used uninitialized in function
ifpga_rawdev_fill_info().
Actually it's not the truth, the variables are initialized in function
ifpga_get_dev_vendor_id(). To avoid such compile error, the variables
are initialized when they are defined.

Fixes: 9c006c45d0c5 ("raw/ifpga: scan PCIe BDF device tree")

Signed-off-by: Wei Huang <wei.huang@intel.com>
Acked-by: Tianfei Zhang <tianfei.zhang@intel.com>
Acked-by: Rosen Xu <rosen.xu@intel.com>
---
 drivers/raw/ifpga/ifpga_rawdev.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/raw/ifpga/ifpga_rawdev.c b/drivers/raw/ifpga/ifpga_rawdev.c
index b385e17622..cc23a27fed 100644
--- a/drivers/raw/ifpga/ifpga_rawdev.c
+++ b/drivers/raw/ifpga/ifpga_rawdev.c
@@ -231,7 +231,8 @@ static int ifpga_rawdev_fill_info(struct ifpga_rawdev *ifpga_dev)
 
 	unsigned int dom, bus, dev;
 	int func;
-	uint32_t dev_id, vendor_id;
+	uint32_t dev_id = 0;
+	uint32_t vendor_id = 0;
 
 	adapter = ifpga_dev ? ifpga_rawdev_get_priv(ifpga_dev->rawdev) : NULL;
 	if (!adapter)
-- 
2.35.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-03-17 14:33:42.418534053 +0100
+++ 0008-raw-ifpga-fix-build-with-optimization.patch	2022-03-17 14:33:41.876623055 +0100
@@ -1 +1 @@
-From 047c25401d2b4001e7e20200a5ec05868a113290 Mon Sep 17 00:00:00 2001
+From ce19f077292a0e53b775e86fd2094a7a358688e3 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 047c25401d2b4001e7e20200a5ec05868a113290 ]
+
@@ -14 +15,0 @@
-Cc: stable@dpdk.org
@@ -24 +25 @@
-index 26c1366a64..6d4117c5e8 100644
+index b385e17622..cc23a27fed 100644
@@ -27 +28 @@
-@@ -225,7 +225,8 @@ static int ifpga_rawdev_fill_info(struct ifpga_rawdev *ifpga_dev)
+@@ -231,7 +231,8 @@ static int ifpga_rawdev_fill_info(struct ifpga_rawdev *ifpga_dev)

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

end of thread, other threads:[~2022-03-17 14:18 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-17 14:17 patch 'vhost: fix queue number check when setting inflight FD' has been queued to stable release 19.11.12 christian.ehrhardt
2022-03-17 14:17 ` patch 'vhost: fix FD leak with inflight messages' " christian.ehrhardt
2022-03-17 14:17 ` patch 'app/testpmd: fix show RSS RETA on Windows' " christian.ehrhardt
2022-03-17 14:17 ` patch 'examples/l3fwd: fix buffer overflow in Tx' " christian.ehrhardt
2022-03-17 14:17 ` patch 'eal/freebsd: add missing C++ include guards' " christian.ehrhardt
2022-03-17 14:17 ` patch 'compressdev: fix missing space in log macro' " christian.ehrhardt
2022-03-17 14:17 ` patch 'cryptodev: fix clang C++ include' " christian.ehrhardt
2022-03-17 14:17 ` patch 'raw/ifpga: fix build with optimization' " christian.ehrhardt

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