* [dpdk-stable] patch 'graph: fix null dereference in stats' has been queued to stable release 20.11.3
2021-07-12 13:03 [dpdk-stable] patch 'graph: fix memory leak in stats' has been queued to stable release 20.11.3 luca.boccassi
@ 2021-07-12 13:03 ` luca.boccassi
2021-07-12 13:03 ` [dpdk-stable] patch 'bitmap: fix buffer overrun in bitmap init' " luca.boccassi
` (114 subsequent siblings)
115 siblings, 0 replies; 208+ messages in thread
From: luca.boccassi @ 2021-07-12 13:03 UTC (permalink / raw)
To: Hongbo Zheng; +Cc: Min Hu, Jerin Jacob, David Marchand, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.3
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/14/21. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/7af7de2a52cf4a8174bfe51a233a8b39a5bd12eb
Thanks.
Luca Boccassi
---
From 7af7de2a52cf4a8174bfe51a233a8b39a5bd12eb Mon Sep 17 00:00:00 2001
From: Hongbo Zheng <zhenghongbo3@huawei.com>
Date: Thu, 6 May 2021 15:16:27 +0800
Subject: [PATCH] graph: fix null dereference in stats
[ upstream commit 2d2bf7de1afe750984073c4cc81ffa4d95550811 ]
In function 'stats_mem_init', pointer 'stats' should
be confirmed not null before memset it.
Fixes: af1ae8b6a32c ("graph: implement stats")
Signed-off-by: Hongbo Zheng <zhenghongbo3@huawei.com>
Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
Reviewed-by: Jerin Jacob <jerinj@marvell.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>
---
lib/librte_graph/graph_stats.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/librte_graph/graph_stats.c b/lib/librte_graph/graph_stats.c
index 30e295d8b1..aa70929dc3 100644
--- a/lib/librte_graph/graph_stats.c
+++ b/lib/librte_graph/graph_stats.c
@@ -119,8 +119,8 @@ stats_mem_init(struct cluster *cluster,
cluster_node_size = RTE_ALIGN(cluster_node_size, RTE_CACHE_LINE_SIZE);
stats = realloc(NULL, sz);
- memset(stats, 0, sz);
if (stats) {
+ memset(stats, 0, sz);
stats->fn = fn;
stats->cluster_node_size = cluster_node_size;
stats->max_nodes = 0;
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-07-12 13:41:37.022971247 +0100
+++ 0002-graph-fix-null-dereference-in-stats.patch 2021-07-12 13:41:36.150115528 +0100
@@ -1 +1 @@
-From 2d2bf7de1afe750984073c4cc81ffa4d95550811 Mon Sep 17 00:00:00 2001
+From 7af7de2a52cf4a8174bfe51a233a8b39a5bd12eb Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 2d2bf7de1afe750984073c4cc81ffa4d95550811 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -17 +18 @@
- lib/graph/graph_stats.c | 2 +-
+ lib/librte_graph/graph_stats.c | 2 +-
@@ -20 +21 @@
-diff --git a/lib/graph/graph_stats.c b/lib/graph/graph_stats.c
+diff --git a/lib/librte_graph/graph_stats.c b/lib/librte_graph/graph_stats.c
@@ -22,2 +23,2 @@
---- a/lib/graph/graph_stats.c
-+++ b/lib/graph/graph_stats.c
+--- a/lib/librte_graph/graph_stats.c
++++ b/lib/librte_graph/graph_stats.c
^ permalink raw reply [flat|nested] 208+ messages in thread
* [dpdk-stable] patch 'bitmap: fix buffer overrun in bitmap init' has been queued to stable release 20.11.3
2021-07-12 13:03 [dpdk-stable] patch 'graph: fix memory leak in stats' has been queued to stable release 20.11.3 luca.boccassi
2021-07-12 13:03 ` [dpdk-stable] patch 'graph: fix null dereference " luca.boccassi
@ 2021-07-12 13:03 ` luca.boccassi
2021-07-12 13:03 ` [dpdk-stable] patch 'malloc: fix size annotation for NUMA-aware realloc' " luca.boccassi
` (113 subsequent siblings)
115 siblings, 0 replies; 208+ messages in thread
From: luca.boccassi @ 2021-07-12 13:03 UTC (permalink / raw)
To: Ivan Ilchenko
Cc: Andy Moreton, Andrew Rybchenko, Cristian Dumitrescu, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.3
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/14/21. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/cd12bf5357831e4e9c196c2b624c382492f26db8
Thanks.
Luca Boccassi
---
From cd12bf5357831e4e9c196c2b624c382492f26db8 Mon Sep 17 00:00:00 2001
From: Ivan Ilchenko <ivan.ilchenko@oktetlabs.ru>
Date: Wed, 2 Jun 2021 12:49:22 +0300
Subject: [PATCH] bitmap: fix buffer overrun in bitmap init
[ upstream commit 1ffd3bc1252ee871398dad227cd651658dc76939 ]
Bitmap initialization function is allowed to memset()
caller-provided buffer with number of bytes exceeded
this buffer size. This happens due to wrong comparison
sign between buffer size and number of bytes required
to initialize bitmap.
Fixes: 602c9ca33a4 ("sched: bitmap is now dynamically allocated")
Reported-by: Andy Moreton <amoreton@xilinx.com>
Signed-off-by: Ivan Ilchenko <ivan.ilchenko@oktetlabs.ru>
Reviewed-by: Andy Moreton <amoreton@xilinx.com>
Signed-off-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
---
lib/librte_eal/include/rte_bitmap.h | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/lib/librte_eal/include/rte_bitmap.h b/lib/librte_eal/include/rte_bitmap.h
index 7c90ef333f..b38d9ac2ba 100644
--- a/lib/librte_eal/include/rte_bitmap.h
+++ b/lib/librte_eal/include/rte_bitmap.h
@@ -185,9 +185,8 @@ rte_bitmap_init(uint32_t n_bits, uint8_t *mem, uint32_t mem_size)
size = __rte_bitmap_get_memory_footprint(n_bits,
&array1_byte_offset, &array1_slabs,
&array2_byte_offset, &array2_slabs);
- if (size < mem_size) {
+ if (size > mem_size)
return NULL;
- }
/* Setup bitmap */
memset(mem, 0, size);
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-07-12 13:41:37.065884267 +0100
+++ 0003-bitmap-fix-buffer-overrun-in-bitmap-init.patch 2021-07-12 13:41:36.150115528 +0100
@@ -1 +1 @@
-From 1ffd3bc1252ee871398dad227cd651658dc76939 Mon Sep 17 00:00:00 2001
+From cd12bf5357831e4e9c196c2b624c382492f26db8 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 1ffd3bc1252ee871398dad227cd651658dc76939 ]
+
@@ -13 +14,0 @@
-Cc: stable@dpdk.org
@@ -21 +22 @@
- lib/eal/include/rte_bitmap.h | 3 +--
+ lib/librte_eal/include/rte_bitmap.h | 3 +--
@@ -24,4 +25,4 @@
-diff --git a/lib/eal/include/rte_bitmap.h b/lib/eal/include/rte_bitmap.h
-index 9e2b8f2cbf..e4623bb176 100644
---- a/lib/eal/include/rte_bitmap.h
-+++ b/lib/eal/include/rte_bitmap.h
+diff --git a/lib/librte_eal/include/rte_bitmap.h b/lib/librte_eal/include/rte_bitmap.h
+index 7c90ef333f..b38d9ac2ba 100644
+--- a/lib/librte_eal/include/rte_bitmap.h
++++ b/lib/librte_eal/include/rte_bitmap.h
^ permalink raw reply [flat|nested] 208+ messages in thread
* [dpdk-stable] patch 'malloc: fix size annotation for NUMA-aware realloc' has been queued to stable release 20.11.3
2021-07-12 13:03 [dpdk-stable] patch 'graph: fix memory leak in stats' has been queued to stable release 20.11.3 luca.boccassi
2021-07-12 13:03 ` [dpdk-stable] patch 'graph: fix null dereference " luca.boccassi
2021-07-12 13:03 ` [dpdk-stable] patch 'bitmap: fix buffer overrun in bitmap init' " luca.boccassi
@ 2021-07-12 13:03 ` luca.boccassi
2021-07-12 13:04 ` [dpdk-stable] patch 'net/bnxt: check access to possible null pointer' " luca.boccassi
` (112 subsequent siblings)
115 siblings, 0 replies; 208+ messages in thread
From: luca.boccassi @ 2021-07-12 13:03 UTC (permalink / raw)
To: David Marchand; +Cc: Maxime Coquelin, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.3
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/14/21. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/73b4b37a14f5150906477b115a94e7de2e26a346
Thanks.
Luca Boccassi
---
From 73b4b37a14f5150906477b115a94e7de2e26a346 Mon Sep 17 00:00:00 2001
From: David Marchand <david.marchand@redhat.com>
Date: Thu, 10 Jun 2021 14:09:22 +0200
Subject: [PATCH] malloc: fix size annotation for NUMA-aware realloc
[ upstream commit 2ca92f54410400af76a1f0bc3bfecc8077e282aa ]
__rte_alloc_size is mapped to compiler alloc_size attribute.
Quoting gcc documentation:
"""
alloc_size
The alloc_size attribute is used to tell the compiler that the
function return value points to memory, where the size is given by
one or two of the functions parameters. GCC uses this information
to improve the correctness of __builtin_object_size.
The function parameter(s) denoting the allocated size are specified
by one or two integer arguments supplied to the attribute.
The allocated size is either the value of the single function
argument specified or the product of the two function arguments
specified. Argument numbering starts at one.
"""
In rte_realloc_socket case, only 'size' matters.
Note: this has been spotted by Maxime trying to use rte_realloc_socket
and compiling with gcc 11.
Fixes: 17b347dab769 ("malloc: add alloc_size attribute to functions")
Signed-off-by: David Marchand <david.marchand@redhat.com>
Tested-by: Maxime Coquelin <maxime.coquelin@redhat.com>
---
lib/librte_eal/include/rte_malloc.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/librte_eal/include/rte_malloc.h b/lib/librte_eal/include/rte_malloc.h
index 3af64f8761..895bb6e849 100644
--- a/lib/librte_eal/include/rte_malloc.h
+++ b/lib/librte_eal/include/rte_malloc.h
@@ -160,7 +160,7 @@ rte_realloc(void *ptr, size_t size, unsigned int align)
__rte_experimental
void *
rte_realloc_socket(void *ptr, size_t size, unsigned int align, int socket)
- __rte_alloc_size(2, 3);
+ __rte_alloc_size(2);
/**
* This function allocates memory from the huge-page area of memory. The memory
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-07-12 13:41:37.109252062 +0100
+++ 0004-malloc-fix-size-annotation-for-NUMA-aware-realloc.patch 2021-07-12 13:41:36.154115611 +0100
@@ -1 +1 @@
-From 2ca92f54410400af76a1f0bc3bfecc8077e282aa Mon Sep 17 00:00:00 2001
+From 73b4b37a14f5150906477b115a94e7de2e26a346 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 2ca92f54410400af76a1f0bc3bfecc8077e282aa ]
+
@@ -29 +30,0 @@
-Cc: stable@dpdk.org
@@ -34 +35 @@
- lib/eal/include/rte_malloc.h | 2 +-
+ lib/librte_eal/include/rte_malloc.h | 2 +-
@@ -37 +38 @@
-diff --git a/lib/eal/include/rte_malloc.h b/lib/eal/include/rte_malloc.h
+diff --git a/lib/librte_eal/include/rte_malloc.h b/lib/librte_eal/include/rte_malloc.h
@@ -39,2 +40,2 @@
---- a/lib/eal/include/rte_malloc.h
-+++ b/lib/eal/include/rte_malloc.h
+--- a/lib/librte_eal/include/rte_malloc.h
++++ b/lib/librte_eal/include/rte_malloc.h
^ permalink raw reply [flat|nested] 208+ messages in thread
* [dpdk-stable] patch 'net/bnxt: check access to possible null pointer' has been queued to stable release 20.11.3
2021-07-12 13:03 [dpdk-stable] patch 'graph: fix memory leak in stats' has been queued to stable release 20.11.3 luca.boccassi
` (2 preceding siblings ...)
2021-07-12 13:03 ` [dpdk-stable] patch 'malloc: fix size annotation for NUMA-aware realloc' " luca.boccassi
@ 2021-07-12 13:04 ` luca.boccassi
2021-07-12 13:04 ` [dpdk-stable] patch 'net/bnxt: fix Rx burst size constraint' " luca.boccassi
` (111 subsequent siblings)
115 siblings, 0 replies; 208+ messages in thread
From: luca.boccassi @ 2021-07-12 13:04 UTC (permalink / raw)
To: Thierry Herbelot; +Cc: Ajit Khaparde, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.3
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/14/21. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/d19b2017fcb5436c280e540eb4039f7aa28d1500
Thanks.
Luca Boccassi
---
From d19b2017fcb5436c280e540eb4039f7aa28d1500 Mon Sep 17 00:00:00 2001
From: Thierry Herbelot <thierry.herbelot@6wind.com>
Date: Mon, 24 May 2021 11:00:38 +0200
Subject: [PATCH] net/bnxt: check access to possible null pointer
[ upstream commit dc59260fb68960ab4296d974370594f6ea31ab9f ]
Check that pointers are valid before using them.
Fixes: 7bc8e9a227ccb ("net/bnxt: support async link notification")
Signed-off-by: Thierry Herbelot <thierry.herbelot@6wind.com>
Acked-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
drivers/net/bnxt/bnxt_irq.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/drivers/net/bnxt/bnxt_irq.c b/drivers/net/bnxt/bnxt_irq.c
index 40e1b0c980..93779f4e0c 100644
--- a/drivers/net/bnxt/bnxt_irq.c
+++ b/drivers/net/bnxt/bnxt_irq.c
@@ -21,11 +21,14 @@ void bnxt_int_handler(void *param)
{
struct rte_eth_dev *eth_dev = (struct rte_eth_dev *)param;
struct bnxt *bp = eth_dev->data->dev_private;
- struct bnxt_cp_ring_info *cpr = bp->async_cp_ring;
+ struct bnxt_cp_ring_info *cpr;
struct cmpl_base *cmp;
uint32_t raw_cons;
uint32_t cons;
+ if (bp == NULL)
+ return;
+ cpr = bp->async_cp_ring;
if (cpr == NULL)
return;
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-07-12 13:41:37.156257098 +0100
+++ 0005-net-bnxt-check-access-to-possible-null-pointer.patch 2021-07-12 13:41:36.158115694 +0100
@@ -1 +1 @@
-From dc59260fb68960ab4296d974370594f6ea31ab9f Mon Sep 17 00:00:00 2001
+From d19b2017fcb5436c280e540eb4039f7aa28d1500 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit dc59260fb68960ab4296d974370594f6ea31ab9f ]
+
@@ -9 +10,0 @@
-Cc: stable@dpdk.org
@@ -18 +19 @@
-index 8abbadb3d1..fd8b8fac98 100644
+index 40e1b0c980..93779f4e0c 100644
^ permalink raw reply [flat|nested] 208+ messages in thread
* [dpdk-stable] patch 'net/bnxt: fix Rx burst size constraint' has been queued to stable release 20.11.3
2021-07-12 13:03 [dpdk-stable] patch 'graph: fix memory leak in stats' has been queued to stable release 20.11.3 luca.boccassi
` (3 preceding siblings ...)
2021-07-12 13:04 ` [dpdk-stable] patch 'net/bnxt: check access to possible null pointer' " luca.boccassi
@ 2021-07-12 13:04 ` luca.boccassi
2021-07-12 13:04 ` [dpdk-stable] patch 'net/bnxt: workaround spurious zero stats in Thor' " luca.boccassi
` (110 subsequent siblings)
115 siblings, 0 replies; 208+ messages in thread
From: luca.boccassi @ 2021-07-12 13:04 UTC (permalink / raw)
To: Lance Richardson; +Cc: Ajit Khaparde, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.3
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/14/21. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/70314ce0288d6967c9b6be1e2df5b51c8e32f480
Thanks.
Luca Boccassi
---
From 70314ce0288d6967c9b6be1e2df5b51c8e32f480 Mon Sep 17 00:00:00 2001
From: Lance Richardson <lance.richardson@broadcom.com>
Date: Mon, 24 May 2021 14:59:50 -0400
Subject: [PATCH] net/bnxt: fix Rx burst size constraint
[ upstream commit 008feb839f4e2829db8510719f5a393da803fc1b ]
The burst receive function should return all packets currently
present in the receive ring up to the requested burst size,
update vector mode receive functions accordingly.
Fixes: 398358341419 ("net/bnxt: support NEON")
Fixes: bc4a000f2f53 ("net/bnxt: implement SSE vector mode")
Signed-off-by: Lance Richardson <lance.richardson@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
drivers/net/bnxt/bnxt_rxtx_vec_neon.c | 29 +++++++++++++++++++++------
drivers/net/bnxt/bnxt_rxtx_vec_sse.c | 29 +++++++++++++++++++++------
2 files changed, 46 insertions(+), 12 deletions(-)
diff --git a/drivers/net/bnxt/bnxt_rxtx_vec_neon.c b/drivers/net/bnxt/bnxt_rxtx_vec_neon.c
index 54f47a3fe1..3292852c42 100644
--- a/drivers/net/bnxt/bnxt_rxtx_vec_neon.c
+++ b/drivers/net/bnxt/bnxt_rxtx_vec_neon.c
@@ -151,9 +151,8 @@ descs_to_mbufs(uint32x4_t mm_rxcmp[4], uint32x4_t mm_rxcmp1[4],
vst1q_u32((uint32_t *)&mbuf[3]->rx_descriptor_fields1, tmp);
}
-uint16_t
-bnxt_recv_pkts_vec(void *rx_queue, struct rte_mbuf **rx_pkts,
- uint16_t nb_pkts)
+static uint16_t
+recv_burst_vec_neon(void *rx_queue, struct rte_mbuf **rx_pkts, uint16_t nb_pkts)
{
struct bnxt_rx_queue *rxq = rx_queue;
struct bnxt_cp_ring_info *cpr = rxq->cp_ring;
@@ -178,9 +177,6 @@ bnxt_recv_pkts_vec(void *rx_queue, struct rte_mbuf **rx_pkts,
if (rxq->rxrearm_nb >= rxq->rx_free_thresh)
bnxt_rxq_rearm(rxq, rxr);
- /* Return no more than RTE_BNXT_MAX_RX_BURST per call. */
- nb_pkts = RTE_MIN(nb_pkts, RTE_BNXT_MAX_RX_BURST);
-
cons = raw_cons & (cp_ring_size - 1);
mbcons = (raw_cons / 2) & (rx_ring_size - 1);
@@ -314,6 +310,27 @@ out:
return nb_rx_pkts;
}
+uint16_t
+bnxt_recv_pkts_vec(void *rx_queue, struct rte_mbuf **rx_pkts, uint16_t nb_pkts)
+{
+ uint16_t cnt = 0;
+
+ while (nb_pkts > RTE_BNXT_MAX_RX_BURST) {
+ uint16_t burst;
+
+ burst = recv_burst_vec_neon(rx_queue, rx_pkts + cnt,
+ RTE_BNXT_MAX_RX_BURST);
+
+ cnt += burst;
+ nb_pkts -= burst;
+
+ if (burst < RTE_BNXT_MAX_RX_BURST)
+ return cnt;
+ }
+
+ return cnt + recv_burst_vec_neon(rx_queue, rx_pkts + cnt, nb_pkts);
+}
+
static void
bnxt_handle_tx_cp_vec(struct bnxt_tx_queue *txq)
{
diff --git a/drivers/net/bnxt/bnxt_rxtx_vec_sse.c b/drivers/net/bnxt/bnxt_rxtx_vec_sse.c
index 621f567890..ae73455c63 100644
--- a/drivers/net/bnxt/bnxt_rxtx_vec_sse.c
+++ b/drivers/net/bnxt/bnxt_rxtx_vec_sse.c
@@ -143,9 +143,8 @@ descs_to_mbufs(__m128i mm_rxcmp[4], __m128i mm_rxcmp1[4],
_mm_store_si128((void *)&mbuf[3]->rx_descriptor_fields1, t0);
}
-uint16_t
-bnxt_recv_pkts_vec(void *rx_queue, struct rte_mbuf **rx_pkts,
- uint16_t nb_pkts)
+static uint16_t
+recv_burst_vec_sse(void *rx_queue, struct rte_mbuf **rx_pkts, uint16_t nb_pkts)
{
struct bnxt_rx_queue *rxq = rx_queue;
const __m128i mbuf_init = _mm_set_epi64x(0, rxq->mbuf_initializer);
@@ -170,9 +169,6 @@ bnxt_recv_pkts_vec(void *rx_queue, struct rte_mbuf **rx_pkts,
if (rxq->rxrearm_nb >= rxq->rx_free_thresh)
bnxt_rxq_rearm(rxq, rxr);
- /* Return no more than RTE_BNXT_MAX_RX_BURST per call. */
- nb_pkts = RTE_MIN(nb_pkts, RTE_BNXT_MAX_RX_BURST);
-
cons = raw_cons & (cp_ring_size - 1);
mbcons = (raw_cons / 2) & (rx_ring_size - 1);
@@ -296,6 +292,27 @@ out:
return nb_rx_pkts;
}
+uint16_t
+bnxt_recv_pkts_vec(void *rx_queue, struct rte_mbuf **rx_pkts, uint16_t nb_pkts)
+{
+ uint16_t cnt = 0;
+
+ while (nb_pkts > RTE_BNXT_MAX_RX_BURST) {
+ uint16_t burst;
+
+ burst = recv_burst_vec_sse(rx_queue, rx_pkts + cnt,
+ RTE_BNXT_MAX_RX_BURST);
+
+ cnt += burst;
+ nb_pkts -= burst;
+
+ if (burst < RTE_BNXT_MAX_RX_BURST)
+ return cnt;
+ }
+
+ return cnt + recv_burst_vec_sse(rx_queue, rx_pkts + cnt, nb_pkts);
+}
+
static void
bnxt_handle_tx_cp_vec(struct bnxt_tx_queue *txq)
{
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-07-12 13:41:37.202112427 +0100
+++ 0006-net-bnxt-fix-Rx-burst-size-constraint.patch 2021-07-12 13:41:36.158115694 +0100
@@ -1 +1 @@
-From 008feb839f4e2829db8510719f5a393da803fc1b Mon Sep 17 00:00:00 2001
+From 70314ce0288d6967c9b6be1e2df5b51c8e32f480 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 008feb839f4e2829db8510719f5a393da803fc1b ]
+
@@ -12 +13,0 @@
-Cc: stable@dpdk.org
@@ -22 +23 @@
-index a6fbc0b0bf..a6e630ea5e 100644
+index 54f47a3fe1..3292852c42 100644
@@ -25 +26 @@
-@@ -158,9 +158,8 @@ descs_to_mbufs(uint32x4_t mm_rxcmp[4], uint32x4_t mm_rxcmp1[4],
+@@ -151,9 +151,8 @@ descs_to_mbufs(uint32x4_t mm_rxcmp[4], uint32x4_t mm_rxcmp1[4],
@@ -37 +38 @@
-@@ -185,9 +184,6 @@ bnxt_recv_pkts_vec(void *rx_queue, struct rte_mbuf **rx_pkts,
+@@ -178,9 +177,6 @@ bnxt_recv_pkts_vec(void *rx_queue, struct rte_mbuf **rx_pkts,
@@ -47 +48 @@
-@@ -305,6 +301,27 @@ bnxt_recv_pkts_vec(void *rx_queue, struct rte_mbuf **rx_pkts,
+@@ -314,6 +310,27 @@ out:
@@ -76 +77 @@
-index 6dd18a0077..fe074f82cf 100644
+index 621f567890..ae73455c63 100644
@@ -79 +80 @@
-@@ -149,9 +149,8 @@ descs_to_mbufs(__m128i mm_rxcmp[4], __m128i mm_rxcmp1[4],
+@@ -143,9 +143,8 @@ descs_to_mbufs(__m128i mm_rxcmp[4], __m128i mm_rxcmp1[4],
@@ -91 +92 @@
-@@ -176,9 +175,6 @@ bnxt_recv_pkts_vec(void *rx_queue, struct rte_mbuf **rx_pkts,
+@@ -170,9 +169,6 @@ bnxt_recv_pkts_vec(void *rx_queue, struct rte_mbuf **rx_pkts,
@@ -101 +102 @@
-@@ -286,6 +282,27 @@ bnxt_recv_pkts_vec(void *rx_queue, struct rte_mbuf **rx_pkts,
+@@ -296,6 +292,27 @@ out:
^ permalink raw reply [flat|nested] 208+ messages in thread
* [dpdk-stable] patch 'net/bnxt: workaround spurious zero stats in Thor' has been queued to stable release 20.11.3
2021-07-12 13:03 [dpdk-stable] patch 'graph: fix memory leak in stats' has been queued to stable release 20.11.3 luca.boccassi
` (4 preceding siblings ...)
2021-07-12 13:04 ` [dpdk-stable] patch 'net/bnxt: fix Rx burst size constraint' " luca.boccassi
@ 2021-07-12 13:04 ` luca.boccassi
2021-07-12 13:04 ` [dpdk-stable] patch 'net/bnxt: fix error messages in VNIC prepare' " luca.boccassi
` (109 subsequent siblings)
115 siblings, 0 replies; 208+ messages in thread
From: luca.boccassi @ 2021-07-12 13:04 UTC (permalink / raw)
To: Somnath Kotur; +Cc: Lance Richardson, Kalesh AP, Ajit Khaparde, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.3
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/14/21. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/47b40639d903f87fb2e71ec816898eb411e2c4e4
Thanks.
Luca Boccassi
---
From 47b40639d903f87fb2e71ec816898eb411e2c4e4 Mon Sep 17 00:00:00 2001
From: Somnath Kotur <somnath.kotur@broadcom.com>
Date: Mon, 31 May 2021 11:23:01 +0530
Subject: [PATCH] net/bnxt: workaround spurious zero stats in Thor
[ upstream commit 219842b9990c2a3a426c14c7911a44d2cb9b6fdf ]
There is a HW bug that can result in certain stats being reported as
zero.
Workaround this by ignoring stats with a value of zero based on the
previously stored snapshot of the same stat.
This bug mainly manifests in the output of func_qstats as FW aggregrates
each ring's stat value to give the per function stat and if one of
them is zero, the per function stat value ends up being lower than the
previous snapshot which shows up as a zero PPS value in testpmd.
Eliminate invocation of func_qstats and aggregate the per-ring stat
values in the driver itself to derive the func_qstats output post
accounting for the spurious zero stat value.
Bugzilla ID: 641
Fixes: f8168ca0e690 ("net/bnxt: support thor controller")
Signed-off-by: Somnath Kotur <somnath.kotur@broadcom.com>
Reviewed-by: Lance Richardson <lance.richardson@broadcom.com>
Reviewed-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Acked-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
drivers/net/bnxt/bnxt.h | 45 ++++++++++++
drivers/net/bnxt/bnxt_ethdev.c | 37 ++++++++++
drivers/net/bnxt/bnxt_hwrm.c | 108 +++++++++++++++++++++++----
drivers/net/bnxt/bnxt_hwrm.h | 5 +-
drivers/net/bnxt/bnxt_stats.c | 129 ++++++++++++++++++++++++++++++---
5 files changed, 294 insertions(+), 30 deletions(-)
diff --git a/drivers/net/bnxt/bnxt.h b/drivers/net/bnxt/bnxt.h
index 0fb195b656..f85409878c 100644
--- a/drivers/net/bnxt/bnxt.h
+++ b/drivers/net/bnxt/bnxt.h
@@ -605,6 +605,49 @@ struct bnxt_flow_stat_info {
struct bnxt_ctx_mem_buf_info tx_fc_out_tbl;
};
+struct bnxt_ring_stats {
+ /* Number of transmitted unicast packets */
+ uint64_t tx_ucast_pkts;
+ /* Number of transmitted multicast packets */
+ uint64_t tx_mcast_pkts;
+ /* Number of transmitted broadcast packets */
+ uint64_t tx_bcast_pkts;
+ /* Number of packets discarded in transmit path */
+ uint64_t tx_discard_pkts;
+ /* Number of packets in transmit path with error */
+ uint64_t tx_error_pkts;
+ /* Number of transmitted bytes for unicast traffic */
+ uint64_t tx_ucast_bytes;
+ /* Number of transmitted bytes for multicast traffic */
+ uint64_t tx_mcast_bytes;
+ /* Number of transmitted bytes for broadcast traffic */
+ uint64_t tx_bcast_bytes;
+ /* Number of received unicast packets */
+ uint64_t rx_ucast_pkts;
+ /* Number of received multicast packets */
+ uint64_t rx_mcast_pkts;
+ /* Number of received broadcast packets */
+ uint64_t rx_bcast_pkts;
+ /* Number of packets discarded in receive path */
+ uint64_t rx_discard_pkts;
+ /* Number of packets in receive path with errors */
+ uint64_t rx_error_pkts;
+ /* Number of received bytes for unicast traffic */
+ uint64_t rx_ucast_bytes;
+ /* Number of received bytes for multicast traffic */
+ uint64_t rx_mcast_bytes;
+ /* Number of received bytes for broadcast traffic */
+ uint64_t rx_bcast_bytes;
+ /* Number of aggregated unicast packets */
+ uint64_t rx_agg_pkts;
+ /* Number of aggregated unicast bytes */
+ uint64_t rx_agg_bytes;
+ /* Number of aggregation events */
+ uint64_t rx_agg_events;
+ /* Number of aborted aggregations */
+ uint64_t rx_agg_aborts;
+};
+
struct bnxt {
void *bar0;
@@ -808,6 +851,8 @@ struct bnxt {
uint8_t flow_xstat;
uint16_t max_num_kflows;
uint16_t tx_cfa_action;
+ struct bnxt_ring_stats *prev_rx_ring_stats;
+ struct bnxt_ring_stats *prev_tx_ring_stats;
};
static
diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
index 1498f4a653..35753e33e7 100644
--- a/drivers/net/bnxt/bnxt_ethdev.c
+++ b/drivers/net/bnxt/bnxt_ethdev.c
@@ -696,6 +696,38 @@ static int bnxt_update_phy_setting(struct bnxt *bp)
return rc;
}
+static void bnxt_free_prev_ring_stats(struct bnxt *bp)
+{
+ rte_free(bp->prev_rx_ring_stats);
+ rte_free(bp->prev_tx_ring_stats);
+
+ bp->prev_rx_ring_stats = NULL;
+ bp->prev_tx_ring_stats = NULL;
+}
+
+static int bnxt_alloc_prev_ring_stats(struct bnxt *bp)
+{
+ bp->prev_rx_ring_stats = rte_zmalloc("bnxt_prev_rx_ring_stats",
+ sizeof(struct bnxt_ring_stats) *
+ bp->rx_cp_nr_rings,
+ 0);
+ if (bp->prev_rx_ring_stats == NULL)
+ return -ENOMEM;
+
+ bp->prev_tx_ring_stats = rte_zmalloc("bnxt_prev_tx_ring_stats",
+ sizeof(struct bnxt_ring_stats) *
+ bp->tx_cp_nr_rings,
+ 0);
+ if (bp->prev_tx_ring_stats == NULL)
+ goto error;
+
+ return 0;
+
+error:
+ bnxt_free_prev_ring_stats(bp);
+ return -ENOMEM;
+}
+
static int bnxt_start_nic(struct bnxt *bp)
{
struct rte_pci_device *pci_dev = RTE_ETH_DEV_TO_PCI(bp->eth_dev);
@@ -1435,6 +1467,7 @@ static int bnxt_dev_stop_op(struct rte_eth_dev *eth_dev)
bnxt_shutdown_nic(bp);
bnxt_hwrm_if_change(bp, false);
+ bnxt_free_prev_ring_stats(bp);
rte_free(bp->mark_table);
bp->mark_table = NULL;
@@ -1489,6 +1522,10 @@ static int bnxt_dev_start_op(struct rte_eth_dev *eth_dev)
if (rc)
goto error;
+ rc = bnxt_alloc_prev_ring_stats(bp);
+ if (rc)
+ goto error;
+
eth_dev->data->dev_started = 1;
bnxt_link_update_op(eth_dev, 1);
diff --git a/drivers/net/bnxt/bnxt_hwrm.c b/drivers/net/bnxt/bnxt_hwrm.c
index 5ed38c9427..4b59c5bfa4 100644
--- a/drivers/net/bnxt/bnxt_hwrm.c
+++ b/drivers/net/bnxt/bnxt_hwrm.c
@@ -4145,8 +4145,20 @@ int bnxt_hwrm_exec_fwd_resp(struct bnxt *bp, uint16_t target_id,
return rc;
}
-int bnxt_hwrm_ctx_qstats(struct bnxt *bp, uint32_t cid, int idx,
- struct rte_eth_stats *stats, uint8_t rx)
+static void bnxt_update_prev_stat(uint64_t *cntr, uint64_t *prev_cntr)
+{
+ /* One of the HW stat values that make up this counter was zero as
+ * returned by HW in this iteration, so use the previous
+ * iteration's counter value
+ */
+ if (*prev_cntr && *cntr == 0)
+ *cntr = *prev_cntr;
+ else
+ *prev_cntr = *cntr;
+}
+
+int bnxt_hwrm_ring_stats(struct bnxt *bp, uint32_t cid, int idx,
+ struct bnxt_ring_stats *ring_stats, bool rx)
{
int rc = 0;
struct hwrm_stat_ctx_query_input req = {.req_type = 0};
@@ -4161,21 +4173,85 @@ int bnxt_hwrm_ctx_qstats(struct bnxt *bp, uint32_t cid, int idx,
HWRM_CHECK_RESULT();
if (rx) {
- stats->q_ipackets[idx] = rte_le_to_cpu_64(resp->rx_ucast_pkts);
- stats->q_ipackets[idx] += rte_le_to_cpu_64(resp->rx_mcast_pkts);
- stats->q_ipackets[idx] += rte_le_to_cpu_64(resp->rx_bcast_pkts);
- stats->q_ibytes[idx] = rte_le_to_cpu_64(resp->rx_ucast_bytes);
- stats->q_ibytes[idx] += rte_le_to_cpu_64(resp->rx_mcast_bytes);
- stats->q_ibytes[idx] += rte_le_to_cpu_64(resp->rx_bcast_bytes);
- stats->q_errors[idx] = rte_le_to_cpu_64(resp->rx_discard_pkts);
- stats->q_errors[idx] += rte_le_to_cpu_64(resp->rx_error_pkts);
+ struct bnxt_ring_stats *prev_stats = &bp->prev_rx_ring_stats[idx];
+
+ ring_stats->rx_ucast_pkts = rte_le_to_cpu_64(resp->rx_ucast_pkts);
+ bnxt_update_prev_stat(&ring_stats->rx_ucast_pkts,
+ &prev_stats->rx_ucast_pkts);
+
+ ring_stats->rx_mcast_pkts = rte_le_to_cpu_64(resp->rx_mcast_pkts);
+ bnxt_update_prev_stat(&ring_stats->rx_mcast_pkts,
+ &prev_stats->rx_mcast_pkts);
+
+ ring_stats->rx_bcast_pkts = rte_le_to_cpu_64(resp->rx_bcast_pkts);
+ bnxt_update_prev_stat(&ring_stats->rx_bcast_pkts,
+ &prev_stats->rx_bcast_pkts);
+
+ ring_stats->rx_ucast_bytes = rte_le_to_cpu_64(resp->rx_ucast_bytes);
+ bnxt_update_prev_stat(&ring_stats->rx_ucast_bytes,
+ &prev_stats->rx_ucast_bytes);
+
+ ring_stats->rx_mcast_bytes = rte_le_to_cpu_64(resp->rx_mcast_bytes);
+ bnxt_update_prev_stat(&ring_stats->rx_mcast_bytes,
+ &prev_stats->rx_mcast_bytes);
+
+ ring_stats->rx_bcast_bytes = rte_le_to_cpu_64(resp->rx_bcast_bytes);
+ bnxt_update_prev_stat(&ring_stats->rx_bcast_bytes,
+ &prev_stats->rx_bcast_bytes);
+
+ ring_stats->rx_discard_pkts = rte_le_to_cpu_64(resp->rx_discard_pkts);
+ bnxt_update_prev_stat(&ring_stats->rx_discard_pkts,
+ &prev_stats->rx_discard_pkts);
+
+ ring_stats->rx_error_pkts = rte_le_to_cpu_64(resp->rx_error_pkts);
+ bnxt_update_prev_stat(&ring_stats->rx_error_pkts,
+ &prev_stats->rx_error_pkts);
+
+ ring_stats->rx_agg_pkts = rte_le_to_cpu_64(resp->rx_agg_pkts);
+ bnxt_update_prev_stat(&ring_stats->rx_agg_pkts,
+ &prev_stats->rx_agg_pkts);
+
+ ring_stats->rx_agg_bytes = rte_le_to_cpu_64(resp->rx_agg_bytes);
+ bnxt_update_prev_stat(&ring_stats->rx_agg_bytes,
+ &prev_stats->rx_agg_bytes);
+
+ ring_stats->rx_agg_events = rte_le_to_cpu_64(resp->rx_agg_events);
+ bnxt_update_prev_stat(&ring_stats->rx_agg_events,
+ &prev_stats->rx_agg_events);
+
+ ring_stats->rx_agg_aborts = rte_le_to_cpu_64(resp->rx_agg_aborts);
+ bnxt_update_prev_stat(&ring_stats->rx_agg_aborts,
+ &prev_stats->rx_agg_aborts);
} else {
- stats->q_opackets[idx] = rte_le_to_cpu_64(resp->tx_ucast_pkts);
- stats->q_opackets[idx] += rte_le_to_cpu_64(resp->tx_mcast_pkts);
- stats->q_opackets[idx] += rte_le_to_cpu_64(resp->tx_bcast_pkts);
- stats->q_obytes[idx] = rte_le_to_cpu_64(resp->tx_ucast_bytes);
- stats->q_obytes[idx] += rte_le_to_cpu_64(resp->tx_mcast_bytes);
- stats->q_obytes[idx] += rte_le_to_cpu_64(resp->tx_bcast_bytes);
+ struct bnxt_ring_stats *prev_stats = &bp->prev_tx_ring_stats[idx];
+
+ ring_stats->tx_ucast_pkts = rte_le_to_cpu_64(resp->tx_ucast_pkts);
+ bnxt_update_prev_stat(&ring_stats->tx_ucast_pkts,
+ &prev_stats->tx_ucast_pkts);
+
+ ring_stats->tx_mcast_pkts = rte_le_to_cpu_64(resp->tx_mcast_pkts);
+ bnxt_update_prev_stat(&ring_stats->tx_mcast_pkts,
+ &prev_stats->tx_mcast_pkts);
+
+ ring_stats->tx_bcast_pkts = rte_le_to_cpu_64(resp->tx_bcast_pkts);
+ bnxt_update_prev_stat(&ring_stats->tx_bcast_pkts,
+ &prev_stats->tx_bcast_pkts);
+
+ ring_stats->tx_ucast_bytes = rte_le_to_cpu_64(resp->tx_ucast_bytes);
+ bnxt_update_prev_stat(&ring_stats->tx_ucast_bytes,
+ &prev_stats->tx_ucast_bytes);
+
+ ring_stats->tx_mcast_bytes = rte_le_to_cpu_64(resp->tx_mcast_bytes);
+ bnxt_update_prev_stat(&ring_stats->tx_mcast_bytes,
+ &prev_stats->tx_mcast_bytes);
+
+ ring_stats->tx_bcast_bytes = rte_le_to_cpu_64(resp->tx_bcast_bytes);
+ bnxt_update_prev_stat(&ring_stats->tx_bcast_bytes,
+ &prev_stats->tx_bcast_bytes);
+
+ ring_stats->tx_discard_pkts = rte_le_to_cpu_64(resp->tx_discard_pkts);
+ bnxt_update_prev_stat(&ring_stats->tx_discard_pkts,
+ &prev_stats->tx_discard_pkts);
}
HWRM_UNLOCK();
diff --git a/drivers/net/bnxt/bnxt_hwrm.h b/drivers/net/bnxt/bnxt_hwrm.h
index a67a17b3d4..6deae8faeb 100644
--- a/drivers/net/bnxt/bnxt_hwrm.h
+++ b/drivers/net/bnxt/bnxt_hwrm.h
@@ -165,9 +165,6 @@ int bnxt_hwrm_ring_grp_alloc(struct bnxt *bp, unsigned int idx);
int bnxt_hwrm_ring_grp_free(struct bnxt *bp, unsigned int idx);
int bnxt_hwrm_stat_clear(struct bnxt *bp, struct bnxt_cp_ring_info *cpr);
-int bnxt_hwrm_ctx_qstats(struct bnxt *bp, uint32_t cid, int idx,
- struct rte_eth_stats *stats, uint8_t rx);
-
int bnxt_hwrm_ver_get(struct bnxt *bp, uint32_t timeout);
int bnxt_hwrm_vnic_alloc(struct bnxt *bp, struct bnxt_vnic_info *vnic);
@@ -297,4 +294,6 @@ int bnxt_hwrm_first_vf_id_query(struct bnxt *bp, uint16_t fid,
int bnxt_hwrm_cfa_pair_alloc(struct bnxt *bp, struct bnxt_representor *rep);
int bnxt_hwrm_cfa_pair_free(struct bnxt *bp, struct bnxt_representor *rep);
int bnxt_hwrm_poll_ver_get(struct bnxt *bp);
+int bnxt_hwrm_ring_stats(struct bnxt *bp, uint32_t cid, int idx,
+ struct bnxt_ring_stats *stats, bool rx);
#endif
diff --git a/drivers/net/bnxt/bnxt_stats.c b/drivers/net/bnxt/bnxt_stats.c
index 0cf3ee77e3..4e67fdf9f2 100644
--- a/drivers/net/bnxt/bnxt_stats.c
+++ b/drivers/net/bnxt/bnxt_stats.c
@@ -506,8 +506,47 @@ void bnxt_free_stats(struct bnxt *bp)
}
}
+static void bnxt_fill_rte_eth_stats(struct rte_eth_stats *stats,
+ struct bnxt_ring_stats *ring_stats,
+ unsigned int i, bool rx)
+{
+ if (rx) {
+ stats->q_ipackets[i] = ring_stats->rx_ucast_pkts;
+ stats->q_ipackets[i] += ring_stats->rx_mcast_pkts;
+ stats->q_ipackets[i] += ring_stats->rx_bcast_pkts;
+
+ stats->ipackets += stats->q_ipackets[i];
+
+ stats->q_ibytes[i] = ring_stats->rx_ucast_bytes;
+ stats->q_ibytes[i] += ring_stats->rx_mcast_bytes;
+ stats->q_ibytes[i] += ring_stats->rx_bcast_bytes;
+
+ stats->ibytes += stats->q_ibytes[i];
+
+ stats->q_errors[i] = ring_stats->rx_discard_pkts;
+ stats->q_errors[i] += ring_stats->rx_error_pkts;
+
+ stats->imissed += ring_stats->rx_discard_pkts;
+ stats->ierrors += ring_stats->rx_error_pkts;
+ } else {
+ stats->q_opackets[i] = ring_stats->tx_ucast_pkts;
+ stats->q_opackets[i] += ring_stats->tx_mcast_pkts;
+ stats->q_opackets[i] += ring_stats->tx_bcast_pkts;
+
+ stats->opackets += stats->q_opackets[i];
+
+ stats->q_obytes[i] = ring_stats->tx_ucast_bytes;
+ stats->q_obytes[i] += ring_stats->tx_mcast_bytes;
+ stats->q_obytes[i] += ring_stats->tx_bcast_bytes;
+
+ stats->obytes += stats->q_obytes[i];
+
+ stats->oerrors += ring_stats->tx_discard_pkts;
+ }
+}
+
int bnxt_stats_get_op(struct rte_eth_dev *eth_dev,
- struct rte_eth_stats *bnxt_stats)
+ struct rte_eth_stats *bnxt_stats)
{
int rc = 0;
unsigned int i;
@@ -527,11 +566,14 @@ int bnxt_stats_get_op(struct rte_eth_dev *eth_dev,
for (i = 0; i < num_q_stats; i++) {
struct bnxt_rx_queue *rxq = bp->rx_queues[i];
struct bnxt_cp_ring_info *cpr = rxq->cp_ring;
+ struct bnxt_ring_stats ring_stats = {0};
- rc = bnxt_hwrm_ctx_qstats(bp, cpr->hw_stats_ctx_id, i,
- bnxt_stats, 1);
+ rc = bnxt_hwrm_ring_stats(bp, cpr->hw_stats_ctx_id, i,
+ &ring_stats, true);
if (unlikely(rc))
return rc;
+
+ bnxt_fill_rte_eth_stats(bnxt_stats, &ring_stats, i, true);
bnxt_stats->rx_nombuf +=
rte_atomic64_read(&rxq->rx_mbuf_alloc_fail);
}
@@ -542,14 +584,16 @@ int bnxt_stats_get_op(struct rte_eth_dev *eth_dev,
for (i = 0; i < num_q_stats; i++) {
struct bnxt_tx_queue *txq = bp->tx_queues[i];
struct bnxt_cp_ring_info *cpr = txq->cp_ring;
+ struct bnxt_ring_stats ring_stats = {0};
- rc = bnxt_hwrm_ctx_qstats(bp, cpr->hw_stats_ctx_id, i,
- bnxt_stats, 0);
+ rc = bnxt_hwrm_ring_stats(bp, cpr->hw_stats_ctx_id, i,
+ &ring_stats, false);
if (unlikely(rc))
return rc;
+
+ bnxt_fill_rte_eth_stats(bnxt_stats, &ring_stats, i, false);
}
- rc = bnxt_hwrm_func_qstats(bp, 0xffff, bnxt_stats, NULL);
return rc;
}
@@ -578,6 +622,40 @@ int bnxt_stats_reset_op(struct rte_eth_dev *eth_dev)
return ret;
}
+static void bnxt_fill_func_qstats(struct hwrm_func_qstats_output *func_qstats,
+ struct bnxt_ring_stats *ring_stats,
+ bool rx)
+{
+ if (rx) {
+ func_qstats->rx_ucast_pkts += ring_stats->rx_ucast_pkts;
+ func_qstats->rx_mcast_pkts += ring_stats->rx_mcast_pkts;
+ func_qstats->rx_bcast_pkts += ring_stats->rx_bcast_pkts;
+
+ func_qstats->rx_ucast_bytes += ring_stats->rx_ucast_bytes;
+ func_qstats->rx_mcast_bytes += ring_stats->rx_mcast_bytes;
+ func_qstats->rx_bcast_bytes += ring_stats->rx_bcast_bytes;
+
+ func_qstats->rx_discard_pkts += ring_stats->rx_discard_pkts;
+ func_qstats->rx_drop_pkts += ring_stats->rx_error_pkts;
+
+ func_qstats->rx_agg_pkts += ring_stats->rx_agg_pkts;
+ func_qstats->rx_agg_bytes += ring_stats->rx_agg_bytes;
+ func_qstats->rx_agg_events += ring_stats->rx_agg_events;
+ func_qstats->rx_agg_aborts += ring_stats->rx_agg_aborts;
+ } else {
+ func_qstats->tx_ucast_pkts += ring_stats->tx_ucast_pkts;
+ func_qstats->tx_mcast_pkts += ring_stats->tx_mcast_pkts;
+ func_qstats->tx_bcast_pkts += ring_stats->tx_bcast_pkts;
+
+ func_qstats->tx_ucast_bytes += ring_stats->tx_ucast_bytes;
+ func_qstats->tx_mcast_bytes += ring_stats->tx_mcast_bytes;
+ func_qstats->tx_bcast_bytes += ring_stats->tx_bcast_bytes;
+
+ func_qstats->tx_drop_pkts += ring_stats->tx_error_pkts;
+ func_qstats->tx_discard_pkts += ring_stats->tx_discard_pkts;
+ }
+}
+
int bnxt_dev_xstats_get_op(struct rte_eth_dev *eth_dev,
struct rte_eth_xstat *xstats, unsigned int n)
{
@@ -604,7 +682,38 @@ int bnxt_dev_xstats_get_op(struct rte_eth_dev *eth_dev,
if (n < stat_count || xstats == NULL)
return stat_count;
- bnxt_hwrm_func_qstats(bp, 0xffff, NULL, &func_qstats);
+ for (i = 0; i < bp->rx_cp_nr_rings; i++) {
+ struct bnxt_rx_queue *rxq = bp->rx_queues[i];
+ struct bnxt_cp_ring_info *cpr = rxq->cp_ring;
+ struct bnxt_ring_stats ring_stats = {0};
+
+ if (!rxq->rx_started)
+ continue;
+
+ rc = bnxt_hwrm_ring_stats(bp, cpr->hw_stats_ctx_id, i,
+ &ring_stats, true);
+ if (unlikely(rc))
+ return rc;
+
+ bnxt_fill_func_qstats(&func_qstats, &ring_stats, true);
+ }
+
+ for (i = 0; i < bp->tx_cp_nr_rings; i++) {
+ struct bnxt_tx_queue *txq = bp->tx_queues[i];
+ struct bnxt_cp_ring_info *cpr = txq->cp_ring;
+ struct bnxt_ring_stats ring_stats = {0};
+
+ if (!txq->tx_started)
+ continue;
+
+ rc = bnxt_hwrm_ring_stats(bp, cpr->hw_stats_ctx_id, i,
+ &ring_stats, false);
+ if (unlikely(rc))
+ return rc;
+
+ bnxt_fill_func_qstats(&func_qstats, &ring_stats, false);
+ }
+
bnxt_hwrm_port_qstats(bp);
bnxt_hwrm_ext_port_qstats(bp);
rx_port_stats_ext_cnt = RTE_MIN(RTE_DIM(bnxt_rx_ext_stats_strings),
@@ -637,13 +746,11 @@ int bnxt_dev_xstats_get_op(struct rte_eth_dev *eth_dev,
for (i = 0; i < RTE_DIM(bnxt_func_stats_strings); i++) {
xstats[count].id = count;
- xstats[count].value =
- rte_le_to_cpu_64(*(uint64_t *)((char *)&func_qstats +
- bnxt_func_stats_strings[i].offset));
+ xstats[count].value = *(uint64_t *)((char *)&func_qstats +
+ bnxt_func_stats_strings[i].offset);
count++;
}
-
for (i = 0; i < rx_port_stats_ext_cnt; i++) {
uint64_t *rx_stats_ext = (uint64_t *)bp->hw_rx_port_stats_ext;
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-07-12 13:41:37.246604757 +0100
+++ 0007-net-bnxt-workaround-spurious-zero-stats-in-Thor.patch 2021-07-12 13:41:36.178116111 +0100
@@ -1 +1 @@
-From 219842b9990c2a3a426c14c7911a44d2cb9b6fdf Mon Sep 17 00:00:00 2001
+From 47b40639d903f87fb2e71ec816898eb411e2c4e4 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 219842b9990c2a3a426c14c7911a44d2cb9b6fdf ]
+
@@ -20 +21,0 @@
-Cc: stable@dpdk.org
@@ -27 +28 @@
- drivers/net/bnxt/bnxt.h | 45 +++++++++++
+ drivers/net/bnxt/bnxt.h | 45 ++++++++++++
@@ -31,2 +32,2 @@
- drivers/net/bnxt/bnxt_stats.c | 131 ++++++++++++++++++++++++++++++---
- 5 files changed, 296 insertions(+), 30 deletions(-)
+ drivers/net/bnxt/bnxt_stats.c | 129 ++++++++++++++++++++++++++++++---
+ 5 files changed, 294 insertions(+), 30 deletions(-)
@@ -35 +36 @@
-index db67bff127..e93a7eb933 100644
+index 0fb195b656..f85409878c 100644
@@ -38 +39 @@
-@@ -609,6 +609,49 @@ struct bnxt_flow_stat_info {
+@@ -605,6 +605,49 @@ struct bnxt_flow_stat_info {
@@ -88,2 +89,2 @@
-@@ -832,6 +875,8 @@ struct bnxt {
- struct bnxt_flow_stat_info *flow_stat;
+@@ -808,6 +851,8 @@ struct bnxt {
+ uint8_t flow_xstat;
@@ -98 +99 @@
-index 96d2befd0f..c72a968ffa 100644
+index 1498f4a653..35753e33e7 100644
@@ -101 +102 @@
-@@ -686,6 +686,38 @@ static int bnxt_update_phy_setting(struct bnxt *bp)
+@@ -696,6 +696,38 @@ static int bnxt_update_phy_setting(struct bnxt *bp)
@@ -140 +141 @@
-@@ -1476,6 +1508,7 @@ static int bnxt_dev_stop(struct rte_eth_dev *eth_dev)
+@@ -1435,6 +1467,7 @@ static int bnxt_dev_stop_op(struct rte_eth_dev *eth_dev)
@@ -148 +149 @@
-@@ -1547,6 +1580,10 @@ static int bnxt_dev_start_op(struct rte_eth_dev *eth_dev)
+@@ -1489,6 +1522,10 @@ static int bnxt_dev_start_op(struct rte_eth_dev *eth_dev)
@@ -160 +161 @@
-index 3d04b93d88..c6c0af28cb 100644
+index 5ed38c9427..4b59c5bfa4 100644
@@ -163 +164 @@
-@@ -4305,8 +4305,20 @@ int bnxt_hwrm_exec_fwd_resp(struct bnxt *bp, uint16_t target_id,
+@@ -4145,8 +4145,20 @@ int bnxt_hwrm_exec_fwd_resp(struct bnxt *bp, uint16_t target_id,
@@ -186 +187 @@
-@@ -4321,21 +4333,85 @@ int bnxt_hwrm_ctx_qstats(struct bnxt *bp, uint32_t cid, int idx,
+@@ -4161,21 +4173,85 @@ int bnxt_hwrm_ctx_qstats(struct bnxt *bp, uint32_t cid, int idx,
@@ -287 +288 @@
-index a7271b7876..b60aa0cca8 100644
+index a67a17b3d4..6deae8faeb 100644
@@ -290 +291 @@
-@@ -168,9 +168,6 @@ int bnxt_hwrm_ring_grp_alloc(struct bnxt *bp, unsigned int idx);
+@@ -165,9 +165,6 @@ int bnxt_hwrm_ring_grp_alloc(struct bnxt *bp, unsigned int idx);
@@ -300,2 +301,3 @@
-@@ -302,4 +299,6 @@ int bnxt_hwrm_fw_echo_reply(struct bnxt *bp, uint32_t echo_req_data1,
- uint32_t echo_req_data2);
+@@ -297,4 +294,6 @@ int bnxt_hwrm_first_vf_id_query(struct bnxt *bp, uint16_t fid,
+ int bnxt_hwrm_cfa_pair_alloc(struct bnxt *bp, struct bnxt_representor *rep);
+ int bnxt_hwrm_cfa_pair_free(struct bnxt *bp, struct bnxt_representor *rep);
@@ -303 +304,0 @@
- int bnxt_hwrm_rx_ring_reset(struct bnxt *bp, int queue_index);
@@ -308 +309 @@
-index 11767e06d0..c7b23f46a1 100644
+index 0cf3ee77e3..4e67fdf9f2 100644
@@ -360 +361 @@
-@@ -527,13 +566,17 @@ int bnxt_stats_get_op(struct rte_eth_dev *eth_dev,
+@@ -527,11 +566,14 @@ int bnxt_stats_get_op(struct rte_eth_dev *eth_dev,
@@ -366,2 +366,0 @@
- if (!rxq->rx_started)
- continue;
@@ -370 +368,0 @@
-+
@@ -380 +378 @@
-@@ -544,16 +587,19 @@ int bnxt_stats_get_op(struct rte_eth_dev *eth_dev,
+@@ -542,14 +584,16 @@ int bnxt_stats_get_op(struct rte_eth_dev *eth_dev,
@@ -386,2 +383,0 @@
- if (!txq->tx_started)
- continue;
@@ -390 +385,0 @@
-+
@@ -403 +398 @@
-@@ -582,6 +628,40 @@ int bnxt_stats_reset_op(struct rte_eth_dev *eth_dev)
+@@ -578,6 +622,40 @@ int bnxt_stats_reset_op(struct rte_eth_dev *eth_dev)
@@ -444 +439 @@
-@@ -608,7 +688,38 @@ int bnxt_dev_xstats_get_op(struct rte_eth_dev *eth_dev,
+@@ -604,7 +682,38 @@ int bnxt_dev_xstats_get_op(struct rte_eth_dev *eth_dev,
@@ -484 +479 @@
-@@ -641,13 +752,11 @@ int bnxt_dev_xstats_get_op(struct rte_eth_dev *eth_dev,
+@@ -637,13 +746,11 @@ int bnxt_dev_xstats_get_op(struct rte_eth_dev *eth_dev,
^ permalink raw reply [flat|nested] 208+ messages in thread
* [dpdk-stable] patch 'net/bnxt: fix error messages in VNIC prepare' has been queued to stable release 20.11.3
2021-07-12 13:03 [dpdk-stable] patch 'graph: fix memory leak in stats' has been queued to stable release 20.11.3 luca.boccassi
` (5 preceding siblings ...)
2021-07-12 13:04 ` [dpdk-stable] patch 'net/bnxt: workaround spurious zero stats in Thor' " luca.boccassi
@ 2021-07-12 13:04 ` luca.boccassi
2021-07-12 13:04 ` [dpdk-stable] patch 'net/bnxt: set flow error when free filter not available' " luca.boccassi
` (108 subsequent siblings)
115 siblings, 0 replies; 208+ messages in thread
From: luca.boccassi @ 2021-07-12 13:04 UTC (permalink / raw)
To: Kalesh AP; +Cc: Somnath Kotur, Ajit Khaparde, Venkat Duvvuru, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.3
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/14/21. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/78f6a49fd49c6aab2a575f77462c14db778dca1f
Thanks.
Luca Boccassi
---
From 78f6a49fd49c6aab2a575f77462c14db778dca1f Mon Sep 17 00:00:00 2001
From: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Date: Mon, 31 May 2021 12:56:36 +0530
Subject: [PATCH] net/bnxt: fix error messages in VNIC prepare
[ upstream commit 52b0e588eb18f90bf2423e59cbb3ec58c490eb67 ]
The bnxt_vnic_prep() can fail due to multiple reasons.
But when bnxt_vnic_prep() fails, PMD is not returning
the actual error/string to the application.
Fix it by moving the "rte_flow_error_set" to bnxt_vnic_prep()
to set the actual error code.
Fixes: d24610f7bfda ("net/bnxt: allow flow creation when RSS is enabled")
Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Reviewed-by: Venkat Duvvuru <venkatkumar.duvvuru@broadcom.com>
---
drivers/net/bnxt/bnxt_flow.c | 66 ++++++++++++++++++++++--------------
1 file changed, 40 insertions(+), 26 deletions(-)
diff --git a/drivers/net/bnxt/bnxt_flow.c b/drivers/net/bnxt/bnxt_flow.c
index 11034b6719..1c46cdd1ab 100644
--- a/drivers/net/bnxt/bnxt_flow.c
+++ b/drivers/net/bnxt/bnxt_flow.c
@@ -919,32 +919,46 @@ bnxt_get_l2_filter(struct bnxt *bp, struct bnxt_filter_info *nf,
return l2_filter;
}
-static int bnxt_vnic_prep(struct bnxt *bp, struct bnxt_vnic_info *vnic)
+static int bnxt_vnic_prep(struct bnxt *bp, struct bnxt_vnic_info *vnic,
+ const struct rte_flow_action *act,
+ struct rte_flow_error *error)
{
struct rte_eth_conf *dev_conf = &bp->eth_dev->data->dev_conf;
uint64_t rx_offloads = dev_conf->rxmode.offloads;
int rc;
if (bp->nr_vnics > bp->max_vnics - 1)
- return -ENOMEM;
+ return rte_flow_error_set(error, EINVAL,
+ RTE_FLOW_ERROR_TYPE_ATTR_GROUP,
+ NULL,
+ "Group id is invalid");
rc = bnxt_vnic_grp_alloc(bp, vnic);
if (rc)
- goto ret;
+ return rte_flow_error_set(error, -rc,
+ RTE_FLOW_ERROR_TYPE_ACTION,
+ act,
+ "Failed to alloc VNIC group");
rc = bnxt_hwrm_vnic_alloc(bp, vnic);
if (rc) {
- PMD_DRV_LOG(ERR, "HWRM vnic alloc failure rc: %x\n", rc);
+ rte_flow_error_set(error, -rc,
+ RTE_FLOW_ERROR_TYPE_ACTION,
+ act,
+ "Failed to alloc VNIC");
goto ret;
}
+
bp->nr_vnics++;
/* RSS context is required only when there is more than one RSS ring */
if (vnic->rx_queue_cnt > 1) {
rc = bnxt_hwrm_vnic_ctx_alloc(bp, vnic, 0 /* ctx_idx 0 */);
if (rc) {
- PMD_DRV_LOG(ERR,
- "HWRM vnic ctx alloc failure: %x\n", rc);
+ rte_flow_error_set(error, -rc,
+ RTE_FLOW_ERROR_TYPE_ACTION,
+ act,
+ "Failed to alloc VNIC context");
goto ret;
}
} else {
@@ -957,10 +971,24 @@ static int bnxt_vnic_prep(struct bnxt *bp, struct bnxt_vnic_info *vnic)
vnic->vlan_strip = false;
rc = bnxt_hwrm_vnic_cfg(bp, vnic);
- if (rc)
+ if (rc) {
+ rte_flow_error_set(error, -rc,
+ RTE_FLOW_ERROR_TYPE_ACTION,
+ act,
+ "Failed to configure VNIC");
goto ret;
+ }
- bnxt_hwrm_vnic_plcmode_cfg(bp, vnic);
+ rc = bnxt_hwrm_vnic_plcmode_cfg(bp, vnic);
+ if (rc) {
+ rte_flow_error_set(error, -rc,
+ RTE_FLOW_ERROR_TYPE_ACTION,
+ act,
+ "Failed to configure VNIC plcmode");
+ goto ret;
+ }
+
+ return 0;
ret:
return rc;
@@ -1135,16 +1163,9 @@ start:
PMD_DRV_LOG(DEBUG, "VNIC found\n");
- rc = bnxt_vnic_prep(bp, vnic);
- if (rc) {
- rte_flow_error_set(error,
- EINVAL,
- RTE_FLOW_ERROR_TYPE_ACTION,
- act,
- "VNIC prep fail");
- rc = -rte_errno;
+ rc = bnxt_vnic_prep(bp, vnic, act, error);
+ if (rc)
goto ret;
- }
PMD_DRV_LOG(DEBUG,
"vnic[%d] = %p vnic->fw_grp_ids = %p\n",
@@ -1355,16 +1376,9 @@ use_vnic:
vnic->end_grp_id = rss->queue[rss->queue_num - 1];
vnic->func_default = 0; //This is not a default VNIC.
- rc = bnxt_vnic_prep(bp, vnic);
- if (rc) {
- rte_flow_error_set(error,
- EINVAL,
- RTE_FLOW_ERROR_TYPE_ACTION,
- act,
- "VNIC prep fail");
- rc = -rte_errno;
+ rc = bnxt_vnic_prep(bp, vnic, act, error);
+ if (rc)
goto ret;
- }
PMD_DRV_LOG(DEBUG,
"vnic[%d] = %p vnic->fw_grp_ids = %p\n",
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-07-12 13:41:37.304785697 +0100
+++ 0008-net-bnxt-fix-error-messages-in-VNIC-prepare.patch 2021-07-12 13:41:36.182116194 +0100
@@ -1 +1 @@
-From 52b0e588eb18f90bf2423e59cbb3ec58c490eb67 Mon Sep 17 00:00:00 2001
+From 78f6a49fd49c6aab2a575f77462c14db778dca1f Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 52b0e588eb18f90bf2423e59cbb3ec58c490eb67 ]
+
@@ -14 +15,0 @@
-Cc: stable@dpdk.org
@@ -25 +26 @@
-index 73fd24cd9a..66012b8057 100644
+index 11034b6719..1c46cdd1ab 100644
@@ -108 +109 @@
-@@ -1142,16 +1170,9 @@ start:
+@@ -1135,16 +1163,9 @@ start:
@@ -127 +128 @@
-@@ -1362,16 +1383,9 @@ skip_vnic_alloc:
+@@ -1355,16 +1376,9 @@ use_vnic:
^ permalink raw reply [flat|nested] 208+ messages in thread
* [dpdk-stable] patch 'net/bnxt: set flow error when free filter not available' has been queued to stable release 20.11.3
2021-07-12 13:03 [dpdk-stable] patch 'graph: fix memory leak in stats' has been queued to stable release 20.11.3 luca.boccassi
` (6 preceding siblings ...)
2021-07-12 13:04 ` [dpdk-stable] patch 'net/bnxt: fix error messages in VNIC prepare' " luca.boccassi
@ 2021-07-12 13:04 ` luca.boccassi
2021-07-12 13:04 ` [dpdk-stable] patch 'net/bnxt: remove unnecessary code' " luca.boccassi
` (107 subsequent siblings)
115 siblings, 0 replies; 208+ messages in thread
From: luca.boccassi @ 2021-07-12 13:04 UTC (permalink / raw)
To: Kalesh AP; +Cc: Ajit Khaparde, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.3
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/14/21. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/da7d8b7da30754d7a69d76f0cf7da8f6a6ee8ce0
Thanks.
Luca Boccassi
---
From da7d8b7da30754d7a69d76f0cf7da8f6a6ee8ce0 Mon Sep 17 00:00:00 2001
From: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Date: Mon, 31 May 2021 12:56:37 +0530
Subject: [PATCH] net/bnxt: set flow error when free filter not available
[ upstream commit 94df7953ac6599c2887b859de19c541e5b5830d9 ]
In bnxt_flow_validate(), when bnxt_get_unused_filter() fails due to
no filter resources available, driver is not setting flow error using
"rte_flow_error_set".
Also, fixed the error code.
Fixes: 5ef3b79fdfe6 ("net/bnxt: support flow filter ops")
Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
drivers/net/bnxt/bnxt_flow.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/net/bnxt/bnxt_flow.c b/drivers/net/bnxt/bnxt_flow.c
index 1c46cdd1ab..14789b9472 100644
--- a/drivers/net/bnxt/bnxt_flow.c
+++ b/drivers/net/bnxt/bnxt_flow.c
@@ -1543,9 +1543,11 @@ bnxt_flow_validate(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");
bnxt_release_flow_lock(bp);
- return -ENOMEM;
+ return -ENOSPC;
}
ret = bnxt_validate_and_parse_flow(dev, pattern, actions, attr,
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-07-12 13:41:37.350730831 +0100
+++ 0009-net-bnxt-set-flow-error-when-free-filter-not-availab.patch 2021-07-12 13:41:36.186116278 +0100
@@ -1 +1 @@
-From 94df7953ac6599c2887b859de19c541e5b5830d9 Mon Sep 17 00:00:00 2001
+From da7d8b7da30754d7a69d76f0cf7da8f6a6ee8ce0 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 94df7953ac6599c2887b859de19c541e5b5830d9 ]
+
@@ -13 +14,0 @@
-Cc: stable@dpdk.org
@@ -23 +24 @@
-index 66012b8057..9b4780773a 100644
+index 1c46cdd1ab..14789b9472 100644
@@ -26 +27 @@
-@@ -1550,9 +1550,11 @@ bnxt_flow_validate(struct rte_eth_dev *dev,
+@@ -1543,9 +1543,11 @@ bnxt_flow_validate(struct rte_eth_dev *dev,
^ permalink raw reply [flat|nested] 208+ messages in thread
* [dpdk-stable] patch 'net/bnxt: remove unnecessary code' has been queued to stable release 20.11.3
2021-07-12 13:03 [dpdk-stable] patch 'graph: fix memory leak in stats' has been queued to stable release 20.11.3 luca.boccassi
` (7 preceding siblings ...)
2021-07-12 13:04 ` [dpdk-stable] patch 'net/bnxt: set flow error when free filter not available' " luca.boccassi
@ 2021-07-12 13:04 ` luca.boccassi
2021-07-12 13:04 ` [dpdk-stable] patch 'net/bnxt: fix error handling in VNIC prepare' " luca.boccassi
` (106 subsequent siblings)
115 siblings, 0 replies; 208+ messages in thread
From: luca.boccassi @ 2021-07-12 13:04 UTC (permalink / raw)
To: Kalesh AP; +Cc: Venkat Duvvuru, Ajit Khaparde, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.3
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/14/21. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/3d3770a60f4582750cd8a3a78307db4418208de0
Thanks.
Luca Boccassi
---
From 3d3770a60f4582750cd8a3a78307db4418208de0 Mon Sep 17 00:00:00 2001
From: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Date: Mon, 31 May 2021 12:56:38 +0530
Subject: [PATCH] net/bnxt: remove unnecessary code
[ upstream commit b93fe4db51c102f5fdb775c28b998197e6fb75c7 ]
Also removed a log message which does not convey any
useful information.
Fixes: d24610f7bfda ("net/bnxt: allow flow creation when RSS is enabled")
Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Venkat Duvvuru <venkatkumar.duvvuru@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
drivers/net/bnxt/bnxt_flow.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/net/bnxt/bnxt_flow.c b/drivers/net/bnxt/bnxt_flow.c
index 14789b9472..83b92845a2 100644
--- a/drivers/net/bnxt/bnxt_flow.c
+++ b/drivers/net/bnxt/bnxt_flow.c
@@ -953,7 +953,7 @@ static int bnxt_vnic_prep(struct bnxt *bp, struct bnxt_vnic_info *vnic,
/* RSS context is required only when there is more than one RSS ring */
if (vnic->rx_queue_cnt > 1) {
- rc = bnxt_hwrm_vnic_ctx_alloc(bp, vnic, 0 /* ctx_idx 0 */);
+ rc = bnxt_hwrm_vnic_ctx_alloc(bp, vnic, 0);
if (rc) {
rte_flow_error_set(error, -rc,
RTE_FLOW_ERROR_TYPE_ACTION,
@@ -961,8 +961,6 @@ static int bnxt_vnic_prep(struct bnxt *bp, struct bnxt_vnic_info *vnic,
"Failed to alloc VNIC context");
goto ret;
}
- } else {
- PMD_DRV_LOG(DEBUG, "No RSS context required\n");
}
if (rx_offloads & DEV_RX_OFFLOAD_VLAN_STRIP)
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-07-12 13:41:37.395380583 +0100
+++ 0010-net-bnxt-remove-unnecessary-code.patch 2021-07-12 13:41:36.186116278 +0100
@@ -1 +1 @@
-From b93fe4db51c102f5fdb775c28b998197e6fb75c7 Mon Sep 17 00:00:00 2001
+From 3d3770a60f4582750cd8a3a78307db4418208de0 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit b93fe4db51c102f5fdb775c28b998197e6fb75c7 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -20 +21 @@
-index 9b4780773a..d23f8cff6c 100644
+index 14789b9472..83b92845a2 100644
^ permalink raw reply [flat|nested] 208+ messages in thread
* [dpdk-stable] patch 'net/bnxt: fix error handling in VNIC prepare' has been queued to stable release 20.11.3
2021-07-12 13:03 [dpdk-stable] patch 'graph: fix memory leak in stats' has been queued to stable release 20.11.3 luca.boccassi
` (8 preceding siblings ...)
2021-07-12 13:04 ` [dpdk-stable] patch 'net/bnxt: remove unnecessary code' " luca.boccassi
@ 2021-07-12 13:04 ` luca.boccassi
2021-07-12 13:04 ` [dpdk-stable] patch 'net/bnxt: set flow error after tunnel redirection free' " luca.boccassi
` (105 subsequent siblings)
115 siblings, 0 replies; 208+ messages in thread
From: luca.boccassi @ 2021-07-12 13:04 UTC (permalink / raw)
To: Kalesh AP; +Cc: Somnath Kotur, Ajit Khaparde, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.3
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/14/21. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/2f6cc4ff5f580eee7aa247558219352c7425120b
Thanks.
Luca Boccassi
---
From 2f6cc4ff5f580eee7aa247558219352c7425120b Mon Sep 17 00:00:00 2001
From: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Date: Mon, 31 May 2021 12:56:39 +0530
Subject: [PATCH] net/bnxt: fix error handling in VNIC prepare
[ upstream commit 4171ac66e5d3e2cef0f8e619b75883f9fe5adf12 ]
Resources should be freed on error conditions. i.e, VNIC and
VNIC context created in HW and memory allocated in
bnxt_vnic_grp_alloc() should be freed.
Added a new function bnxt_vnic_destroy() to do the cleanup.
This lightweight function can be used in flow destroy/flush
path to avoid duplicate code as well.
Fixes: d24610f7bfda ("net/bnxt: allow flow creation when RSS is enabled")
Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
drivers/net/bnxt/bnxt_flow.c | 18 ++++++++++++++++--
1 file changed, 16 insertions(+), 2 deletions(-)
diff --git a/drivers/net/bnxt/bnxt_flow.c b/drivers/net/bnxt/bnxt_flow.c
index 83b92845a2..1ef6009bc7 100644
--- a/drivers/net/bnxt/bnxt_flow.c
+++ b/drivers/net/bnxt/bnxt_flow.c
@@ -919,6 +919,19 @@ bnxt_get_l2_filter(struct bnxt *bp, struct bnxt_filter_info *nf,
return l2_filter;
}
+static void bnxt_vnic_cleanup(struct bnxt *bp, struct bnxt_vnic_info *vnic)
+{
+ if (vnic->rx_queue_cnt > 1)
+ bnxt_hwrm_vnic_ctx_free(bp, vnic);
+
+ bnxt_hwrm_vnic_free(bp, vnic);
+
+ rte_free(vnic->fw_grp_ids);
+ vnic->fw_grp_ids = NULL;
+
+ vnic->rx_queue_cnt = 0;
+}
+
static int bnxt_vnic_prep(struct bnxt *bp, struct bnxt_vnic_info *vnic,
const struct rte_flow_action *act,
struct rte_flow_error *error)
@@ -949,8 +962,6 @@ static int bnxt_vnic_prep(struct bnxt *bp, struct bnxt_vnic_info *vnic,
goto ret;
}
- bp->nr_vnics++;
-
/* RSS context is required only when there is more than one RSS ring */
if (vnic->rx_queue_cnt > 1) {
rc = bnxt_hwrm_vnic_ctx_alloc(bp, vnic, 0);
@@ -986,9 +997,12 @@ static int bnxt_vnic_prep(struct bnxt *bp, struct bnxt_vnic_info *vnic,
goto ret;
}
+ bp->nr_vnics++;
+
return 0;
ret:
+ bnxt_vnic_cleanup(bp, vnic);
return rc;
}
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-07-12 13:41:37.445679941 +0100
+++ 0011-net-bnxt-fix-error-handling-in-VNIC-prepare.patch 2021-07-12 13:41:36.190116361 +0100
@@ -1 +1 @@
-From 4171ac66e5d3e2cef0f8e619b75883f9fe5adf12 Mon Sep 17 00:00:00 2001
+From 2f6cc4ff5f580eee7aa247558219352c7425120b Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 4171ac66e5d3e2cef0f8e619b75883f9fe5adf12 ]
+
@@ -15 +16,0 @@
-Cc: stable@dpdk.org
@@ -25 +26 @@
-index d23f8cff6c..03c71732e7 100644
+index 83b92845a2..1ef6009bc7 100644
^ permalink raw reply [flat|nested] 208+ messages in thread
* [dpdk-stable] patch 'net/bnxt: set flow error after tunnel redirection free' has been queued to stable release 20.11.3
2021-07-12 13:03 [dpdk-stable] patch 'graph: fix memory leak in stats' has been queued to stable release 20.11.3 luca.boccassi
` (9 preceding siblings ...)
2021-07-12 13:04 ` [dpdk-stable] patch 'net/bnxt: fix error handling in VNIC prepare' " luca.boccassi
@ 2021-07-12 13:04 ` luca.boccassi
2021-07-12 13:04 ` [dpdk-stable] patch 'net/bnxt: use common function to free VNIC resource' " luca.boccassi
` (104 subsequent siblings)
115 siblings, 0 replies; 208+ messages in thread
From: luca.boccassi @ 2021-07-12 13:04 UTC (permalink / raw)
To: Kalesh AP; +Cc: Somnath Kotur, Ajit Khaparde, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.3
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/14/21. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/cb99c42fe0ab3bc13c332d4fe16971289916b899
Thanks.
Luca Boccassi
---
From cb99c42fe0ab3bc13c332d4fe16971289916b899 Mon Sep 17 00:00:00 2001
From: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Date: Mon, 31 May 2021 12:56:40 +0530
Subject: [PATCH] net/bnxt: set flow error after tunnel redirection free
[ upstream commit 25ee03f532b35e261bced83d1d0635d7271d6c9b ]
During flow destroy, when bnxt_hwrm_tunnel_redirect_free() fails,
driver is not setting flow error using "rte_flow_error_set".
Fixes: 11e5e19695c7 ("net/bnxt: support redirecting tunnel packets to VF")
Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
drivers/net/bnxt/bnxt_flow.c | 12 ++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)
diff --git a/drivers/net/bnxt/bnxt_flow.c b/drivers/net/bnxt/bnxt_flow.c
index 1ef6009bc7..f5b43d45ab 100644
--- a/drivers/net/bnxt/bnxt_flow.c
+++ b/drivers/net/bnxt/bnxt_flow.c
@@ -1959,12 +1959,20 @@ static int bnxt_handle_tunnel_redirect_destroy(struct bnxt *bp,
/* Tunnel doesn't belong to this VF, so don't send HWRM
* cmd, just delete the flow from driver
*/
- if (bp->fw_fid != (tun_dst_fid + bp->first_vf_id))
+ if (bp->fw_fid != (tun_dst_fid + bp->first_vf_id)) {
PMD_DRV_LOG(ERR,
"Tunnel does not belong to this VF, skip hwrm_tunnel_redirect_free\n");
- else
+ } else {
ret = bnxt_hwrm_tunnel_redirect_free(bp,
filter->tunnel_type);
+ if (ret) {
+ rte_flow_error_set(error, -ret,
+ RTE_FLOW_ERROR_TYPE_HANDLE,
+ NULL,
+ "Unable to free tunnel redirection");
+ return ret;
+ }
+ }
}
return ret;
}
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-07-12 13:41:37.491036149 +0100
+++ 0012-net-bnxt-set-flow-error-after-tunnel-redirection-fre.patch 2021-07-12 13:41:36.194116444 +0100
@@ -1 +1 @@
-From 25ee03f532b35e261bced83d1d0635d7271d6c9b Mon Sep 17 00:00:00 2001
+From cb99c42fe0ab3bc13c332d4fe16971289916b899 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 25ee03f532b35e261bced83d1d0635d7271d6c9b ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -20 +21 @@
-index 03c71732e7..ed201a3552 100644
+index 1ef6009bc7..f5b43d45ab 100644
@@ -23 +24 @@
-@@ -1969,12 +1969,20 @@ static int bnxt_handle_tunnel_redirect_destroy(struct bnxt *bp,
+@@ -1959,12 +1959,20 @@ static int bnxt_handle_tunnel_redirect_destroy(struct bnxt *bp,
^ permalink raw reply [flat|nested] 208+ messages in thread
* [dpdk-stable] patch 'net/bnxt: use common function to free VNIC resource' has been queued to stable release 20.11.3
2021-07-12 13:03 [dpdk-stable] patch 'graph: fix memory leak in stats' has been queued to stable release 20.11.3 luca.boccassi
` (10 preceding siblings ...)
2021-07-12 13:04 ` [dpdk-stable] patch 'net/bnxt: set flow error after tunnel redirection free' " luca.boccassi
@ 2021-07-12 13:04 ` luca.boccassi
2021-07-12 13:04 ` [dpdk-stable] patch 'net/bnxt: fix check for PTP support in FW' " luca.boccassi
` (103 subsequent siblings)
115 siblings, 0 replies; 208+ messages in thread
From: luca.boccassi @ 2021-07-12 13:04 UTC (permalink / raw)
To: Kalesh AP; +Cc: Somnath Kotur, Ajit Khaparde, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.3
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/14/21. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/92e631ec91e3a514fadd05bbc0fc8c513578cfc5
Thanks.
Luca Boccassi
---
From 92e631ec91e3a514fadd05bbc0fc8c513578cfc5 Mon Sep 17 00:00:00 2001
From: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Date: Mon, 31 May 2021 12:56:41 +0530
Subject: [PATCH] net/bnxt: use common function to free VNIC resource
[ upstream commit 3e3fecf4b81e243d7e532bce416ebb2524901f7e ]
Use the function bnxt_vnic_destroy() to destroy VNIC resources
and thereby eliminate few duplicate code.
Fixes: 8d0a244b40b2 ("net/bnxt: cleanup VNIC after flow validate")
Fixes: 49d0709b257f ("net/bnxt: delete and flush L2 filters cleanly")
Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
drivers/net/bnxt/bnxt_flow.c | 12 ++----------
1 file changed, 2 insertions(+), 10 deletions(-)
diff --git a/drivers/net/bnxt/bnxt_flow.c b/drivers/net/bnxt/bnxt_flow.c
index f5b43d45ab..646d8dc54f 100644
--- a/drivers/net/bnxt/bnxt_flow.c
+++ b/drivers/net/bnxt/bnxt_flow.c
@@ -1570,10 +1570,7 @@ bnxt_flow_validate(struct rte_eth_dev *dev,
vnic = find_matching_vnic(bp, filter);
if (vnic) {
if (STAILQ_EMPTY(&vnic->filter)) {
- rte_free(vnic->fw_grp_ids);
- bnxt_hwrm_vnic_ctx_free(bp, vnic);
- bnxt_hwrm_vnic_free(bp, vnic);
- vnic->rx_queue_cnt = 0;
+ bnxt_vnic_cleanup(bp, vnic);
bp->nr_vnics--;
PMD_DRV_LOG(DEBUG, "Free VNIC\n");
}
@@ -2035,12 +2032,7 @@ done:
*/
if (vnic && !vnic->func_default &&
STAILQ_EMPTY(&vnic->flow_list)) {
- rte_free(vnic->fw_grp_ids);
- if (vnic->rx_queue_cnt > 1)
- bnxt_hwrm_vnic_ctx_free(bp, vnic);
-
- bnxt_hwrm_vnic_free(bp, vnic);
- vnic->rx_queue_cnt = 0;
+ bnxt_vnic_cleanup(bp, vnic);
bp->nr_vnics--;
}
} else {
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-07-12 13:41:37.541196307 +0100
+++ 0013-net-bnxt-use-common-function-to-free-VNIC-resource.patch 2021-07-12 13:41:36.198116528 +0100
@@ -1 +1 @@
-From 3e3fecf4b81e243d7e532bce416ebb2524901f7e Mon Sep 17 00:00:00 2001
+From 92e631ec91e3a514fadd05bbc0fc8c513578cfc5 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 3e3fecf4b81e243d7e532bce416ebb2524901f7e ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -21 +22 @@
-index ed201a3552..59489b591a 100644
+index f5b43d45ab..646d8dc54f 100644
@@ -24 +25 @@
-@@ -1577,10 +1577,7 @@ bnxt_flow_validate(struct rte_eth_dev *dev,
+@@ -1570,10 +1570,7 @@ bnxt_flow_validate(struct rte_eth_dev *dev,
@@ -36 +37 @@
-@@ -2045,12 +2042,7 @@ done:
+@@ -2035,12 +2032,7 @@ done:
^ permalink raw reply [flat|nested] 208+ messages in thread
* [dpdk-stable] patch 'net/bnxt: fix check for PTP support in FW' has been queued to stable release 20.11.3
2021-07-12 13:03 [dpdk-stable] patch 'graph: fix memory leak in stats' has been queued to stable release 20.11.3 luca.boccassi
` (11 preceding siblings ...)
2021-07-12 13:04 ` [dpdk-stable] patch 'net/bnxt: use common function to free VNIC resource' " luca.boccassi
@ 2021-07-12 13:04 ` luca.boccassi
2021-07-12 13:04 ` [dpdk-stable] patch 'net/bnxt: improve probing log message' " luca.boccassi
` (102 subsequent siblings)
115 siblings, 0 replies; 208+ messages in thread
From: luca.boccassi @ 2021-07-12 13:04 UTC (permalink / raw)
To: Kalesh AP; +Cc: Somnath Kotur, Ajit Khaparde, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.3
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/14/21. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/a2e10ac19d644b2fb0d1be75f8107f7fe47087aa
Thanks.
Luca Boccassi
---
From a2e10ac19d644b2fb0d1be75f8107f7fe47087aa Mon Sep 17 00:00:00 2001
From: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Date: Mon, 31 May 2021 12:56:42 +0530
Subject: [PATCH] net/bnxt: fix check for PTP support in FW
[ upstream commit a642112c91246b035dfa6d6f5bc52b0603c44952 ]
On Thor, driver must use HWRM to access the timestamp information.
Driver should not advertise PTP support to application
if PTP information is not available via HWRM commands.
Fixes: 6cbd89f9f3d8 ("net/bnxt: support PTP for Thor")
Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
drivers/net/bnxt/bnxt_hwrm.c | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/drivers/net/bnxt/bnxt_hwrm.c b/drivers/net/bnxt/bnxt_hwrm.c
index 4b59c5bfa4..be9c7eb75e 100644
--- a/drivers/net/bnxt/bnxt_hwrm.c
+++ b/drivers/net/bnxt/bnxt_hwrm.c
@@ -635,9 +635,13 @@ static int bnxt_hwrm_ptp_qcfg(struct bnxt *bp)
HWRM_CHECK_RESULT();
- if (!BNXT_CHIP_THOR(bp) &&
- !(resp->flags & HWRM_PORT_MAC_PTP_QCFG_OUTPUT_FLAGS_DIRECT_ACCESS))
- return 0;
+ if (BNXT_CHIP_THOR(bp)) {
+ if (!(resp->flags & HWRM_PORT_MAC_PTP_QCFG_OUTPUT_FLAGS_HWRM_ACCESS))
+ return 0;
+ } else {
+ if (!(resp->flags & HWRM_PORT_MAC_PTP_QCFG_OUTPUT_FLAGS_DIRECT_ACCESS))
+ return 0;
+ }
if (resp->flags & HWRM_PORT_MAC_PTP_QCFG_OUTPUT_FLAGS_ONE_STEP_TX_TS)
bp->flags |= BNXT_FLAG_FW_CAP_ONE_STEP_TX_TS;
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-07-12 13:41:37.584974242 +0100
+++ 0014-net-bnxt-fix-check-for-PTP-support-in-FW.patch 2021-07-12 13:41:36.206116694 +0100
@@ -1 +1 @@
-From a642112c91246b035dfa6d6f5bc52b0603c44952 Mon Sep 17 00:00:00 2001
+From a2e10ac19d644b2fb0d1be75f8107f7fe47087aa Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit a642112c91246b035dfa6d6f5bc52b0603c44952 ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -21 +22 @@
-index c6c0af28cb..a65ac6c0ec 100644
+index 4b59c5bfa4..be9c7eb75e 100644
@@ -24 +25 @@
-@@ -750,9 +750,13 @@ static int bnxt_hwrm_ptp_qcfg(struct bnxt *bp)
+@@ -635,9 +635,13 @@ static int bnxt_hwrm_ptp_qcfg(struct bnxt *bp)
@@ -28 +29 @@
-- if (!BNXT_CHIP_P5(bp) &&
+- if (!BNXT_CHIP_THOR(bp) &&
@@ -31 +32 @@
-+ if (BNXT_CHIP_P5(bp)) {
++ if (BNXT_CHIP_THOR(bp)) {
^ permalink raw reply [flat|nested] 208+ messages in thread
* [dpdk-stable] patch 'net/bnxt: improve probing log message' has been queued to stable release 20.11.3
2021-07-12 13:03 [dpdk-stable] patch 'graph: fix memory leak in stats' has been queued to stable release 20.11.3 luca.boccassi
` (12 preceding siblings ...)
2021-07-12 13:04 ` [dpdk-stable] patch 'net/bnxt: fix check for PTP support in FW' " luca.boccassi
@ 2021-07-12 13:04 ` luca.boccassi
2021-07-12 13:04 ` [dpdk-stable] patch 'net/bnxt: remove unnecessary comment' " luca.boccassi
` (101 subsequent siblings)
115 siblings, 0 replies; 208+ messages in thread
From: luca.boccassi @ 2021-07-12 13:04 UTC (permalink / raw)
To: Kalesh AP; +Cc: Somnath Kotur, Ajit Khaparde, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.3
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/14/21. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/386efec3809c6d5c18149152b0a249a8999cbd45
Thanks.
Luca Boccassi
---
From 386efec3809c6d5c18149152b0a249a8999cbd45 Mon Sep 17 00:00:00 2001
From: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Date: Mon, 31 May 2021 12:56:43 +0530
Subject: [PATCH] net/bnxt: improve probing log message
[ upstream commit 4a8ac3768fcf2e7e45684397b9d585fe994cc997 ]
The existing log message is missing a space. Modified it to
a more meaningful log as part of this change.
Before this patch:
bnxt_dev_init(): bnxtfound at mem D67E0000, node addr 0x2101112000M
With this patch:
bnxt_dev_init(): Found bnxt device at mem D67E0000, node addr 0x2101112000M
Fixes: 1bf01f5135f8 ("net/bnxt: prevent device access when device is in reset")
Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
drivers/net/bnxt/bnxt_ethdev.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
index 35753e33e7..ee3bfbb73d 100644
--- a/drivers/net/bnxt/bnxt_ethdev.c
+++ b/drivers/net/bnxt/bnxt_ethdev.c
@@ -5689,7 +5689,8 @@ bnxt_dev_init(struct rte_eth_dev *eth_dev, void *params __rte_unused)
goto error_free;
PMD_DRV_LOG(INFO,
- DRV_MODULE_NAME "found at mem %" PRIX64 ", node addr %pM\n",
+ "Found %s device at mem %" PRIX64 ", node addr %pM\n",
+ DRV_MODULE_NAME,
pci_dev->mem_resource[0].phys_addr,
pci_dev->mem_resource[0].addr);
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-07-12 13:41:37.634394788 +0100
+++ 0015-net-bnxt-improve-probing-log-message.patch 2021-07-12 13:41:36.214116861 +0100
@@ -1 +1 @@
-From 4a8ac3768fcf2e7e45684397b9d585fe994cc997 Mon Sep 17 00:00:00 2001
+From 386efec3809c6d5c18149152b0a249a8999cbd45 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 4a8ac3768fcf2e7e45684397b9d585fe994cc997 ]
+
@@ -18 +19,0 @@
-Cc: stable@dpdk.org
@@ -28 +29 @@
-index c72a968ffa..2545bfc877 100644
+index 35753e33e7..ee3bfbb73d 100644
@@ -31 +32 @@
-@@ -5791,7 +5791,8 @@ bnxt_dev_init(struct rte_eth_dev *eth_dev, void *params __rte_unused)
+@@ -5689,7 +5689,8 @@ bnxt_dev_init(struct rte_eth_dev *eth_dev, void *params __rte_unused)
^ permalink raw reply [flat|nested] 208+ messages in thread
* [dpdk-stable] patch 'net/bnxt: remove unnecessary comment' has been queued to stable release 20.11.3
2021-07-12 13:03 [dpdk-stable] patch 'graph: fix memory leak in stats' has been queued to stable release 20.11.3 luca.boccassi
` (13 preceding siblings ...)
2021-07-12 13:04 ` [dpdk-stable] patch 'net/bnxt: improve probing log message' " luca.boccassi
@ 2021-07-12 13:04 ` luca.boccassi
2021-07-12 13:04 ` [dpdk-stable] patch 'net/iavf: fix RSS key access out of bound' " luca.boccassi
` (100 subsequent siblings)
115 siblings, 0 replies; 208+ messages in thread
From: luca.boccassi @ 2021-07-12 13:04 UTC (permalink / raw)
To: Kalesh AP; +Cc: Somnath Kotur, Ajit Khaparde, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.3
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/14/21. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/70b84a4e1b637cd5559e9ada786bae8e23c02270
Thanks.
Luca Boccassi
---
From 70b84a4e1b637cd5559e9ada786bae8e23c02270 Mon Sep 17 00:00:00 2001
From: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Date: Mon, 31 May 2021 12:56:44 +0530
Subject: [PATCH] net/bnxt: remove unnecessary comment
[ upstream commit 46c451d905e8e27787a0471ecc1d31a4cde25a9e ]
Remove unnecessary comment in the code.
Fixes: 0a6d2a720078 ("net/bnxt: get device infos")
Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
Acked-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
drivers/net/bnxt/bnxt_ethdev.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
index ee3bfbb73d..9ffd81e7f3 100644
--- a/drivers/net/bnxt/bnxt_ethdev.c
+++ b/drivers/net/bnxt/bnxt_ethdev.c
@@ -986,7 +986,6 @@ static int bnxt_dev_info_get_op(struct rte_eth_dev *eth_dev,
dev_info->speed_capa = bnxt_get_speed_capabilities(bp);
- /* *INDENT-OFF* */
dev_info->default_rxconf = (struct rte_eth_rxconf) {
.rx_thresh = {
.pthresh = 8,
@@ -1022,8 +1021,6 @@ static int bnxt_dev_info_get_op(struct rte_eth_dev *eth_dev,
BNXT_SWITCH_PORT_ID_TRUSTED_VF;
}
- /* *INDENT-ON* */
-
/*
* TODO: default_rxconf, default_txconf, rx_desc_lim, and tx_desc_lim
* need further investigation.
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-07-12 13:41:37.681741084 +0100
+++ 0016-net-bnxt-remove-unnecessary-comment.patch 2021-07-12 13:41:36.222117028 +0100
@@ -1 +1 @@
-From 46c451d905e8e27787a0471ecc1d31a4cde25a9e Mon Sep 17 00:00:00 2001
+From 70b84a4e1b637cd5559e9ada786bae8e23c02270 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 46c451d905e8e27787a0471ecc1d31a4cde25a9e ]
+
@@ -9 +10,0 @@
-Cc: stable@dpdk.org
@@ -19 +20 @@
-index 2545bfc877..c9536f7926 100644
+index ee3bfbb73d..9ffd81e7f3 100644
@@ -22 +23 @@
-@@ -980,7 +980,6 @@ static int bnxt_dev_info_get_op(struct rte_eth_dev *eth_dev,
+@@ -986,7 +986,6 @@ static int bnxt_dev_info_get_op(struct rte_eth_dev *eth_dev,
@@ -30 +31 @@
-@@ -1016,8 +1015,6 @@ static int bnxt_dev_info_get_op(struct rte_eth_dev *eth_dev,
+@@ -1022,8 +1021,6 @@ static int bnxt_dev_info_get_op(struct rte_eth_dev *eth_dev,
^ permalink raw reply [flat|nested] 208+ messages in thread
* [dpdk-stable] patch 'net/iavf: fix RSS key access out of bound' has been queued to stable release 20.11.3
2021-07-12 13:03 [dpdk-stable] patch 'graph: fix memory leak in stats' has been queued to stable release 20.11.3 luca.boccassi
` (14 preceding siblings ...)
2021-07-12 13:04 ` [dpdk-stable] patch 'net/bnxt: remove unnecessary comment' " luca.boccassi
@ 2021-07-12 13:04 ` luca.boccassi
2021-07-12 13:04 ` [dpdk-stable] patch 'net/ice: fix default RSS key generation' " luca.boccassi
` (99 subsequent siblings)
115 siblings, 0 replies; 208+ messages in thread
From: luca.boccassi @ 2021-07-12 13:04 UTC (permalink / raw)
To: Haiyue Wang; +Cc: Beilei Xing, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.3
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/14/21. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/58fbfecc2a176904fcdd738e0a544029bb278c20
Thanks.
Luca Boccassi
---
From 58fbfecc2a176904fcdd738e0a544029bb278c20 Mon Sep 17 00:00:00 2001
From: Haiyue Wang <haiyue.wang@intel.com>
Date: Wed, 19 May 2021 15:59:33 +0800
Subject: [PATCH] net/iavf: fix RSS key access out of bound
[ upstream commit 8ce5678f28a80871c9f4ef41ef52ba206ef5a17f ]
The array rss_key has size 'vf->vf_res->rss_key_size', the array index
should be less than that.
Fixes: 69dd4c3d0898 ("net/avf: enable queue and device")
Signed-off-by: Haiyue Wang <haiyue.wang@intel.com>
Acked-by: Beilei Xing <beilei.xing@intel.com>
---
drivers/net/iavf/iavf_ethdev.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/iavf/iavf_ethdev.c b/drivers/net/iavf/iavf_ethdev.c
index 649061d2ba..9671c957d8 100644
--- a/drivers/net/iavf/iavf_ethdev.c
+++ b/drivers/net/iavf/iavf_ethdev.c
@@ -274,7 +274,7 @@ iavf_init_rss(struct iavf_adapter *adapter)
/* configure RSS key */
if (!rss_conf->rss_key) {
/* Calculate the default hash key */
- for (i = 0; i <= vf->vf_res->rss_key_size; i++)
+ for (i = 0; i < vf->vf_res->rss_key_size; i++)
vf->rss_key[i] = (uint8_t)rte_rand();
} else
rte_memcpy(vf->rss_key, rss_conf->rss_key,
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-07-12 13:41:37.731034242 +0100
+++ 0017-net-iavf-fix-RSS-key-access-out-of-bound.patch 2021-07-12 13:41:36.226117111 +0100
@@ -1 +1 @@
-From 8ce5678f28a80871c9f4ef41ef52ba206ef5a17f Mon Sep 17 00:00:00 2001
+From 58fbfecc2a176904fcdd738e0a544029bb278c20 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 8ce5678f28a80871c9f4ef41ef52ba206ef5a17f ]
+
@@ -9 +10,0 @@
-Cc: stable@dpdk.org
@@ -19 +20 @@
-index a7ef7a6d4d..5290588b17 100644
+index 649061d2ba..9671c957d8 100644
@@ -22 +23 @@
-@@ -366,7 +366,7 @@ iavf_init_rss(struct iavf_adapter *adapter)
+@@ -274,7 +274,7 @@ iavf_init_rss(struct iavf_adapter *adapter)
^ permalink raw reply [flat|nested] 208+ messages in thread
* [dpdk-stable] patch 'net/ice: fix default RSS key generation' has been queued to stable release 20.11.3
2021-07-12 13:03 [dpdk-stable] patch 'graph: fix memory leak in stats' has been queued to stable release 20.11.3 luca.boccassi
` (15 preceding siblings ...)
2021-07-12 13:04 ` [dpdk-stable] patch 'net/iavf: fix RSS key access out of bound' " luca.boccassi
@ 2021-07-12 13:04 ` luca.boccassi
2021-07-12 13:04 ` [dpdk-stable] patch 'net/iavf: fix handling of unsupported promiscuous' " luca.boccassi
` (98 subsequent siblings)
115 siblings, 0 replies; 208+ messages in thread
From: luca.boccassi @ 2021-07-12 13:04 UTC (permalink / raw)
To: Dapeng Yu; +Cc: Qi Zhang, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.3
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/14/21. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/ea3ef0c977a74d33b54c86f811374e6df7dcb3c8
Thanks.
Luca Boccassi
---
From ea3ef0c977a74d33b54c86f811374e6df7dcb3c8 Mon Sep 17 00:00:00 2001
From: Dapeng Yu <dapengx.yu@intel.com>
Date: Thu, 27 May 2021 14:42:51 +0800
Subject: [PATCH] net/ice: fix default RSS key generation
[ upstream commit 03a91d7efb7098ba739ba458bcc118c3e348fae1 ]
In original implementation, device reconfiguration will generate
a new default RSS key if there is no one from user, it is unexpected
when updating a completely unrelated configuration.
This patch makes default RSS key unchanged, during the lifetime of the
DPDK application even if there are multiple reconfigurations.
Fixes: 50370662b727 ("net/ice: support device and queue ops")
Signed-off-by: Dapeng Yu <dapengx.yu@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
---
drivers/net/ice/ice_ethdev.c | 35 +++++++++++++++++++++++++++++------
1 file changed, 29 insertions(+), 6 deletions(-)
diff --git a/drivers/net/ice/ice_ethdev.c b/drivers/net/ice/ice_ethdev.c
index 40498f038a..3541cc2381 100644
--- a/drivers/net/ice/ice_ethdev.c
+++ b/drivers/net/ice/ice_ethdev.c
@@ -3177,6 +3177,31 @@ ice_rss_hash_set(struct ice_pf *pf, uint64_t rss_hf)
pf->rss_hf = rss_hf & ICE_RSS_HF_ALL;
}
+static void
+ice_get_default_rss_key(uint8_t *rss_key, uint32_t rss_key_size)
+{
+ static struct ice_aqc_get_set_rss_keys default_key;
+ static bool default_key_done;
+ uint8_t *key = (uint8_t *)&default_key;
+ size_t i;
+
+ if (rss_key_size > sizeof(default_key)) {
+ PMD_DRV_LOG(WARNING,
+ "requested size %u is larger than default %zu, "
+ "only %zu bytes are gotten for key\n",
+ rss_key_size, sizeof(default_key),
+ sizeof(default_key));
+ }
+
+ if (!default_key_done) {
+ /* Calculate the default hash key */
+ for (i = 0; i < sizeof(default_key); i++)
+ key[i] = (uint8_t)rte_rand();
+ default_key_done = true;
+ }
+ rte_memcpy(rss_key, key, RTE_MIN(rss_key_size, sizeof(default_key)));
+}
+
static int ice_init_rss(struct ice_pf *pf)
{
struct ice_hw *hw = ICE_PF_TO_HW(pf);
@@ -3225,15 +3250,13 @@ static int ice_init_rss(struct ice_pf *pf)
}
}
/* configure RSS key */
- if (!rss_conf->rss_key) {
- /* Calculate the default hash key */
- for (i = 0; i < vsi->rss_key_size; i++)
- vsi->rss_key[i] = (uint8_t)rte_rand();
- } else {
+ if (!rss_conf->rss_key)
+ ice_get_default_rss_key(vsi->rss_key, vsi->rss_key_size);
+ else
rte_memcpy(vsi->rss_key, rss_conf->rss_key,
RTE_MIN(rss_conf->rss_key_len,
vsi->rss_key_size));
- }
+
rte_memcpy(key.standard_rss_key, vsi->rss_key, vsi->rss_key_size);
ret = ice_aq_set_rss_key(hw, vsi->idx, &key);
if (ret)
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-07-12 13:41:37.776684642 +0100
+++ 0018-net-ice-fix-default-RSS-key-generation.patch 2021-07-12 13:41:36.234117278 +0100
@@ -1 +1 @@
-From 03a91d7efb7098ba739ba458bcc118c3e348fae1 Mon Sep 17 00:00:00 2001
+From ea3ef0c977a74d33b54c86f811374e6df7dcb3c8 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 03a91d7efb7098ba739ba458bcc118c3e348fae1 ]
+
@@ -14 +15,0 @@
-Cc: stable@dpdk.org
@@ -23 +24 @@
-index 5fd5f99b6f..ad20f6baff 100644
+index 40498f038a..3541cc2381 100644
@@ -26 +27 @@
-@@ -2990,6 +2990,31 @@ ice_rss_hash_set(struct ice_pf *pf, uint64_t rss_hf)
+@@ -3177,6 +3177,31 @@ ice_rss_hash_set(struct ice_pf *pf, uint64_t rss_hf)
@@ -58 +59 @@
-@@ -3038,15 +3063,13 @@ static int ice_init_rss(struct ice_pf *pf)
+@@ -3225,15 +3250,13 @@ static int ice_init_rss(struct ice_pf *pf)
^ permalink raw reply [flat|nested] 208+ messages in thread
* [dpdk-stable] patch 'net/iavf: fix handling of unsupported promiscuous' has been queued to stable release 20.11.3
2021-07-12 13:03 [dpdk-stable] patch 'graph: fix memory leak in stats' has been queued to stable release 20.11.3 luca.boccassi
` (16 preceding siblings ...)
2021-07-12 13:04 ` [dpdk-stable] patch 'net/ice: fix default RSS key generation' " luca.boccassi
@ 2021-07-12 13:04 ` luca.boccassi
2021-07-12 13:04 ` [dpdk-stable] patch 'net/i40e: fix raw packet flow director' " luca.boccassi
` (97 subsequent siblings)
115 siblings, 0 replies; 208+ messages in thread
From: luca.boccassi @ 2021-07-12 13:04 UTC (permalink / raw)
To: Qi Zhang; +Cc: Beilei Xing, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.3
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/14/21. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/d5052b1a2e17fa17d1e9ae8ceb5553fe6bb59813
Thanks.
Luca Boccassi
---
From d5052b1a2e17fa17d1e9ae8ceb5553fe6bb59813 Mon Sep 17 00:00:00 2001
From: Qi Zhang <qi.z.zhang@intel.com>
Date: Wed, 26 May 2021 17:53:05 +0800
Subject: [PATCH] net/iavf: fix handling of unsupported promiscuous
[ upstream commit 50937e495f5bcc5985365b3b93e34b6efffeca10 ]
iavf_execute_vf_cmd returns standard error code but not IAVF_xxx,
The patch fix the wrong error handling in iavf_config_promisc.
Fixes: 1e4d55a7fe71 ("net/iavf: optimize promiscuous device operations")
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Beilei Xing <beilei.xing@intel.com>
---
drivers/net/iavf/iavf_vchnl.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/iavf/iavf_vchnl.c b/drivers/net/iavf/iavf_vchnl.c
index 064133785e..1021108ff5 100644
--- a/drivers/net/iavf/iavf_vchnl.c
+++ b/drivers/net/iavf/iavf_vchnl.c
@@ -1107,8 +1107,8 @@ iavf_config_promisc(struct iavf_adapter *adapter,
PMD_DRV_LOG(ERR,
"fail to execute command CONFIG_PROMISCUOUS_MODE");
- if (err == IAVF_NOT_SUPPORTED)
- return -ENOTSUP;
+ if (err == -ENOTSUP)
+ return err;
return -EAGAIN;
}
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-07-12 13:41:37.823758998 +0100
+++ 0019-net-iavf-fix-handling-of-unsupported-promiscuous.patch 2021-07-12 13:41:36.238117361 +0100
@@ -1 +1 @@
-From 50937e495f5bcc5985365b3b93e34b6efffeca10 Mon Sep 17 00:00:00 2001
+From d5052b1a2e17fa17d1e9ae8ceb5553fe6bb59813 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 50937e495f5bcc5985365b3b93e34b6efffeca10 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -19 +20 @@
-index 5d57e8b541..02e828f9b7 100644
+index 064133785e..1021108ff5 100644
@@ -22 +23 @@
-@@ -1257,8 +1257,8 @@ iavf_config_promisc(struct iavf_adapter *adapter,
+@@ -1107,8 +1107,8 @@ iavf_config_promisc(struct iavf_adapter *adapter,
^ permalink raw reply [flat|nested] 208+ messages in thread
* [dpdk-stable] patch 'net/i40e: fix raw packet flow director' has been queued to stable release 20.11.3
2021-07-12 13:03 [dpdk-stable] patch 'graph: fix memory leak in stats' has been queued to stable release 20.11.3 luca.boccassi
` (17 preceding siblings ...)
2021-07-12 13:04 ` [dpdk-stable] patch 'net/iavf: fix handling of unsupported promiscuous' " luca.boccassi
@ 2021-07-12 13:04 ` luca.boccassi
2021-07-12 13:04 ` [dpdk-stable] patch 'net/ice: fix data path selection in secondary process' " luca.boccassi
` (96 subsequent siblings)
115 siblings, 0 replies; 208+ messages in thread
From: luca.boccassi @ 2021-07-12 13:04 UTC (permalink / raw)
To: Steve Yang; +Cc: Beilei Xing, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.3
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/14/21. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/18db4a4d845a49a8f6cef7aa71493c07cbf84746
Thanks.
Luca Boccassi
---
From 18db4a4d845a49a8f6cef7aa71493c07cbf84746 Mon Sep 17 00:00:00 2001
From: Steve Yang <stevex.yang@intel.com>
Date: Wed, 19 May 2021 03:27:45 +0000
Subject: [PATCH] net/i40e: fix raw packet flow director
[ upstream commit 920bdbf1bde39882d97118feb46892746db42078 ]
When user configured the flow rule with raw packet via command
"flow_director_filter", it would reset all previous fdir input set
flags with "i40e_flow_set_fdir_inset()".
Ignore to configure the flow input set with raw packet rule used.
Fixes: ff04964ea6d5 ("net/i40e: fix flow director for common pctypes")
Signed-off-by: Steve Yang <stevex.yang@intel.com>
Acked-by: Beilei Xing <beilei.xing@intel.com>
---
drivers/net/i40e/i40e_fdir.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/net/i40e/i40e_fdir.c b/drivers/net/i40e/i40e_fdir.c
index c9cd1e4960..ab924e8538 100644
--- a/drivers/net/i40e/i40e_fdir.c
+++ b/drivers/net/i40e/i40e_fdir.c
@@ -1767,7 +1767,8 @@ i40e_flow_add_del_fdir_filter(struct rte_eth_dev *dev,
if (add) {
/* configure the input set for common PCTYPEs*/
- if (!filter->input.flow_ext.customized_pctype) {
+ if (!filter->input.flow_ext.customized_pctype &&
+ !filter->input.flow_ext.pkt_template) {
ret = i40e_flow_set_fdir_inset(pf, pctype,
filter->input.flow_ext.input_set);
if (ret < 0)
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-07-12 13:41:37.865012899 +0100
+++ 0020-net-i40e-fix-raw-packet-flow-director.patch 2021-07-12 13:41:36.242117444 +0100
@@ -1 +1 @@
-From 920bdbf1bde39882d97118feb46892746db42078 Mon Sep 17 00:00:00 2001
+From 18db4a4d845a49a8f6cef7aa71493c07cbf84746 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 920bdbf1bde39882d97118feb46892746db42078 ]
+
@@ -13 +14,0 @@
-Cc: stable@dpdk.org
@@ -22 +23 @@
-index ac0e09bfdd..3c7cf1ba90 100644
+index c9cd1e4960..ab924e8538 100644
@@ -25 +26 @@
-@@ -1768,7 +1768,8 @@ i40e_flow_add_del_fdir_filter(struct rte_eth_dev *dev,
+@@ -1767,7 +1767,8 @@ i40e_flow_add_del_fdir_filter(struct rte_eth_dev *dev,
^ permalink raw reply [flat|nested] 208+ messages in thread
* [dpdk-stable] patch 'net/ice: fix data path selection in secondary process' has been queued to stable release 20.11.3
2021-07-12 13:03 [dpdk-stable] patch 'graph: fix memory leak in stats' has been queued to stable release 20.11.3 luca.boccassi
` (18 preceding siblings ...)
2021-07-12 13:04 ` [dpdk-stable] patch 'net/i40e: fix raw packet flow director' " luca.boccassi
@ 2021-07-12 13:04 ` luca.boccassi
2021-07-12 13:04 ` [dpdk-stable] patch 'net/ice: fix data path " luca.boccassi
` (95 subsequent siblings)
115 siblings, 0 replies; 208+ messages in thread
From: luca.boccassi @ 2021-07-12 13:04 UTC (permalink / raw)
To: Qi Zhang; +Cc: Yixue Wang, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.3
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/14/21. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/744e86e08926c83225e70abb15be69d84d15d361
Thanks.
Luca Boccassi
---
From 744e86e08926c83225e70abb15be69d84d15d361 Mon Sep 17 00:00:00 2001
From: Qi Zhang <qi.z.zhang@intel.com>
Date: Mon, 24 May 2021 17:07:59 +0800
Subject: [PATCH] net/ice: fix data path selection in secondary process
[ upstream commit f8b3326f3116afb357beac730577fec6ffbf2d83 ]
The flag use_avx2 and use_avx512 are defined as local variables, they
will not be aware by the secondary process, then wrong data path is
selected. Fix the issue by moving them into struct ice_adapter.
Fixes: ae60d3c9b227 ("net/ice: support Rx AVX2 vector")
Fixes: 2d5f6953d56d ("net/ice: support vector AVX2 in Tx")
Fixes: 7f85d5ebcfe1 ("net/ice: add AVX512 vector path")
Reported-by: Yixue Wang <yixue.wang@intel.com>
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Tested-by: Yixue Wang <yixue.wang@intel.com>
---
drivers/net/ice/ice_ethdev.h | 6 ++++++
drivers/net/ice/ice_rxtx.c | 38 ++++++++++++++++++------------------
2 files changed, 25 insertions(+), 19 deletions(-)
diff --git a/drivers/net/ice/ice_ethdev.h b/drivers/net/ice/ice_ethdev.h
index 2b03c59671..6a2bf58560 100644
--- a/drivers/net/ice/ice_ethdev.h
+++ b/drivers/net/ice/ice_ethdev.h
@@ -479,6 +479,12 @@ struct ice_adapter {
struct ice_devargs devargs;
enum ice_pkg_type active_pkg_type; /* loaded ddp package type */
uint16_t fdir_ref_cnt;
+#ifdef RTE_ARCH_X86
+ bool rx_use_avx2;
+ bool rx_use_avx512;
+ bool tx_use_avx2;
+ bool tx_use_avx512;
+#endif
};
struct ice_vsi_vlan_pvid_info {
diff --git a/drivers/net/ice/ice_rxtx.c b/drivers/net/ice/ice_rxtx.c
index c98328ce0b..d200d21347 100644
--- a/drivers/net/ice/ice_rxtx.c
+++ b/drivers/net/ice/ice_rxtx.c
@@ -3025,10 +3025,10 @@ ice_set_rx_function(struct rte_eth_dev *dev)
#ifdef RTE_ARCH_X86
struct ice_rx_queue *rxq;
int i;
- bool use_avx512 = false;
- bool use_avx2 = false;
if (rte_eal_process_type() == RTE_PROC_PRIMARY) {
+ ad->rx_use_avx512 = false;
+ ad->rx_use_avx2 = false;
if (!ice_rx_vec_dev_check(dev) && ad->rx_bulk_alloc_allowed &&
rte_vect_get_max_simd_bitwidth() >= RTE_VECT_SIMD_128) {
ad->rx_vec_allowed = true;
@@ -3044,16 +3044,16 @@ ice_set_rx_function(struct rte_eth_dev *dev)
rte_cpu_get_flag_enabled(RTE_CPUFLAG_AVX512F) == 1 &&
rte_cpu_get_flag_enabled(RTE_CPUFLAG_AVX512BW) == 1)
#ifdef CC_AVX512_SUPPORT
- use_avx512 = true;
+ ad->rx_use_avx512 = true;
#else
PMD_DRV_LOG(NOTICE,
"AVX512 is not supported in build env");
#endif
- if (!use_avx512 &&
+ if (!ad->rx_use_avx512 &&
(rte_cpu_get_flag_enabled(RTE_CPUFLAG_AVX2) == 1 ||
rte_cpu_get_flag_enabled(RTE_CPUFLAG_AVX512F) == 1) &&
rte_vect_get_max_simd_bitwidth() >= RTE_VECT_SIMD_256)
- use_avx2 = true;
+ ad->rx_use_avx2 = true;
} else {
ad->rx_vec_allowed = false;
@@ -3062,7 +3062,7 @@ ice_set_rx_function(struct rte_eth_dev *dev)
if (ad->rx_vec_allowed) {
if (dev->data->scattered_rx) {
- if (use_avx512) {
+ if (ad->rx_use_avx512) {
#ifdef CC_AVX512_SUPPORT
PMD_DRV_LOG(NOTICE,
"Using AVX512 Vector Scattered Rx (port %d).",
@@ -3073,14 +3073,14 @@ ice_set_rx_function(struct rte_eth_dev *dev)
} else {
PMD_DRV_LOG(DEBUG,
"Using %sVector Scattered Rx (port %d).",
- use_avx2 ? "avx2 " : "",
+ ad->rx_use_avx2 ? "avx2 " : "",
dev->data->port_id);
- dev->rx_pkt_burst = use_avx2 ?
+ dev->rx_pkt_burst = ad->rx_use_avx2 ?
ice_recv_scattered_pkts_vec_avx2 :
ice_recv_scattered_pkts_vec;
}
} else {
- if (use_avx512) {
+ if (ad->rx_use_avx512) {
#ifdef CC_AVX512_SUPPORT
PMD_DRV_LOG(NOTICE,
"Using AVX512 Vector Rx (port %d).",
@@ -3091,9 +3091,9 @@ ice_set_rx_function(struct rte_eth_dev *dev)
} else {
PMD_DRV_LOG(DEBUG,
"Using %sVector Rx (port %d).",
- use_avx2 ? "avx2 " : "",
+ ad->rx_use_avx2 ? "avx2 " : "",
dev->data->port_id);
- dev->rx_pkt_burst = use_avx2 ?
+ dev->rx_pkt_burst = ad->rx_use_avx2 ?
ice_recv_pkts_vec_avx2 :
ice_recv_pkts_vec;
}
@@ -3241,10 +3241,10 @@ ice_set_tx_function(struct rte_eth_dev *dev)
#ifdef RTE_ARCH_X86
struct ice_tx_queue *txq;
int i;
- bool use_avx512 = false;
- bool use_avx2 = false;
if (rte_eal_process_type() == RTE_PROC_PRIMARY) {
+ ad->tx_use_avx2 = false;
+ ad->tx_use_avx512 = false;
if (!ice_tx_vec_dev_check(dev) &&
rte_vect_get_max_simd_bitwidth() >= RTE_VECT_SIMD_128) {
ad->tx_vec_allowed = true;
@@ -3260,16 +3260,16 @@ ice_set_tx_function(struct rte_eth_dev *dev)
rte_cpu_get_flag_enabled(RTE_CPUFLAG_AVX512F) == 1 &&
rte_cpu_get_flag_enabled(RTE_CPUFLAG_AVX512BW) == 1)
#ifdef CC_AVX512_SUPPORT
- use_avx512 = true;
+ ad->tx_use_avx512 = true;
#else
PMD_DRV_LOG(NOTICE,
"AVX512 is not supported in build env");
#endif
- if (!use_avx512 &&
+ if (!ad->tx_use_avx512 &&
(rte_cpu_get_flag_enabled(RTE_CPUFLAG_AVX2) == 1 ||
rte_cpu_get_flag_enabled(RTE_CPUFLAG_AVX512F) == 1) &&
rte_vect_get_max_simd_bitwidth() >= RTE_VECT_SIMD_256)
- use_avx2 = true;
+ ad->tx_use_avx2 = true;
} else {
ad->tx_vec_allowed = false;
@@ -3277,7 +3277,7 @@ ice_set_tx_function(struct rte_eth_dev *dev)
}
if (ad->tx_vec_allowed) {
- if (use_avx512) {
+ if (ad->tx_use_avx512) {
#ifdef CC_AVX512_SUPPORT
PMD_DRV_LOG(NOTICE, "Using AVX512 Vector Tx (port %d).",
dev->data->port_id);
@@ -3285,9 +3285,9 @@ ice_set_tx_function(struct rte_eth_dev *dev)
#endif
} else {
PMD_DRV_LOG(DEBUG, "Using %sVector Tx (port %d).",
- use_avx2 ? "avx2 " : "",
+ ad->tx_use_avx2 ? "avx2 " : "",
dev->data->port_id);
- dev->tx_pkt_burst = use_avx2 ?
+ dev->tx_pkt_burst = ad->tx_use_avx2 ?
ice_xmit_pkts_vec_avx2 :
ice_xmit_pkts_vec;
}
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-07-12 13:41:37.909387616 +0100
+++ 0021-net-ice-fix-data-path-selection-in-secondary-process.patch 2021-07-12 13:41:36.246117528 +0100
@@ -1 +1 @@
-From f8b3326f3116afb357beac730577fec6ffbf2d83 Mon Sep 17 00:00:00 2001
+From 744e86e08926c83225e70abb15be69d84d15d361 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit f8b3326f3116afb357beac730577fec6ffbf2d83 ]
+
@@ -13 +14,0 @@
-Cc: stable@dpdk.org
@@ -19,3 +20,3 @@
- drivers/net/ice/ice_ethdev.h | 6 +++++
- drivers/net/ice/ice_rxtx.c | 44 ++++++++++++++++++------------------
- 2 files changed, 28 insertions(+), 22 deletions(-)
+ drivers/net/ice/ice_ethdev.h | 6 ++++++
+ drivers/net/ice/ice_rxtx.c | 38 ++++++++++++++++++------------------
+ 2 files changed, 25 insertions(+), 19 deletions(-)
@@ -24 +25 @@
-index 2a8a8169d5..aebfd1b0b7 100644
+index 2b03c59671..6a2bf58560 100644
@@ -27 +28 @@
-@@ -487,6 +487,12 @@ struct ice_adapter {
+@@ -479,6 +479,12 @@ struct ice_adapter {
@@ -41 +42 @@
-index 49abcb2f5c..f4f6f48d78 100644
+index c98328ce0b..d200d21347 100644
@@ -44 +45 @@
-@@ -3058,11 +3058,11 @@ ice_set_rx_function(struct rte_eth_dev *dev)
+@@ -3025,10 +3025,10 @@ ice_set_rx_function(struct rte_eth_dev *dev)
@@ -48 +48,0 @@
-- int rx_check_ret;
@@ -51 +50,0 @@
-+ int rx_check_ret = 0;
@@ -56,4 +55,4 @@
- rx_check_ret = ice_rx_vec_dev_check(dev);
- if (rx_check_ret >= 0 && ad->rx_bulk_alloc_allowed &&
- rte_vect_get_max_simd_bitwidth() >= RTE_VECT_SIMD_128) {
-@@ -3079,16 +3079,16 @@ ice_set_rx_function(struct rte_eth_dev *dev)
+ if (!ice_rx_vec_dev_check(dev) && ad->rx_bulk_alloc_allowed &&
+ rte_vect_get_max_simd_bitwidth() >= RTE_VECT_SIMD_128) {
+ ad->rx_vec_allowed = true;
+@@ -3044,16 +3044,16 @@ ice_set_rx_function(struct rte_eth_dev *dev)
@@ -79 +78 @@
-@@ -3097,7 +3097,7 @@ ice_set_rx_function(struct rte_eth_dev *dev)
+@@ -3062,7 +3062,7 @@ ice_set_rx_function(struct rte_eth_dev *dev)
@@ -86,3 +85,3 @@
- if (rx_check_ret == ICE_VECTOR_OFFLOAD_PATH) {
- PMD_DRV_LOG(NOTICE,
-@@ -3116,14 +3116,14 @@ ice_set_rx_function(struct rte_eth_dev *dev)
+ PMD_DRV_LOG(NOTICE,
+ "Using AVX512 Vector Scattered Rx (port %d).",
+@@ -3073,14 +3073,14 @@ ice_set_rx_function(struct rte_eth_dev *dev)
@@ -104,3 +103,3 @@
- if (rx_check_ret == ICE_VECTOR_OFFLOAD_PATH) {
- PMD_DRV_LOG(NOTICE,
-@@ -3142,9 +3142,9 @@ ice_set_rx_function(struct rte_eth_dev *dev)
+ PMD_DRV_LOG(NOTICE,
+ "Using AVX512 Vector Rx (port %d).",
+@@ -3091,9 +3091,9 @@ ice_set_rx_function(struct rte_eth_dev *dev)
@@ -118 +117 @@
-@@ -3294,11 +3294,11 @@ ice_set_tx_function(struct rte_eth_dev *dev)
+@@ -3241,10 +3241,10 @@ ice_set_tx_function(struct rte_eth_dev *dev)
@@ -122 +120,0 @@
-- int tx_check_ret;
@@ -125 +122,0 @@
-+ int tx_check_ret = 0;
@@ -130,4 +127,4 @@
- tx_check_ret = ice_tx_vec_dev_check(dev);
- if (tx_check_ret >= 0 &&
- rte_vect_get_max_simd_bitwidth() >= RTE_VECT_SIMD_128) {
-@@ -3308,18 +3308,18 @@ ice_set_tx_function(struct rte_eth_dev *dev)
+ if (!ice_tx_vec_dev_check(dev) &&
+ rte_vect_get_max_simd_bitwidth() >= RTE_VECT_SIMD_128) {
+ ad->tx_vec_allowed = true;
+@@ -3260,16 +3260,16 @@ ice_set_tx_function(struct rte_eth_dev *dev)
@@ -143,2 +140,2 @@
-- if (!use_avx512 && tx_check_ret == ICE_VECTOR_PATH &&
-+ if (!ad->tx_use_avx512 && tx_check_ret == ICE_VECTOR_PATH &&
+- if (!use_avx512 &&
++ if (!ad->tx_use_avx512 &&
@@ -151,6 +148,3 @@
-- if (!use_avx512 && tx_check_ret == ICE_VECTOR_OFFLOAD_PATH)
-+ if (!ad->tx_use_avx512 && tx_check_ret == ICE_VECTOR_OFFLOAD_PATH)
- ad->tx_vec_allowed = false;
-
- if (ad->tx_vec_allowed) {
-@@ -3337,7 +3337,7 @@ ice_set_tx_function(struct rte_eth_dev *dev)
+ } else {
+ ad->tx_vec_allowed = false;
+@@ -3277,7 +3277,7 @@ ice_set_tx_function(struct rte_eth_dev *dev)
@@ -163,3 +157,3 @@
- if (tx_check_ret == ICE_VECTOR_OFFLOAD_PATH) {
- PMD_DRV_LOG(NOTICE,
-@@ -3354,9 +3354,9 @@ ice_set_tx_function(struct rte_eth_dev *dev)
+ PMD_DRV_LOG(NOTICE, "Using AVX512 Vector Tx (port %d).",
+ dev->data->port_id);
+@@ -3285,9 +3285,9 @@ ice_set_tx_function(struct rte_eth_dev *dev)
^ permalink raw reply [flat|nested] 208+ messages in thread
* [dpdk-stable] patch 'net/ice: fix data path in secondary process' has been queued to stable release 20.11.3
2021-07-12 13:03 [dpdk-stable] patch 'graph: fix memory leak in stats' has been queued to stable release 20.11.3 luca.boccassi
` (19 preceding siblings ...)
2021-07-12 13:04 ` [dpdk-stable] patch 'net/ice: fix data path selection in secondary process' " luca.boccassi
@ 2021-07-12 13:04 ` luca.boccassi
2021-07-12 13:04 ` [dpdk-stable] patch 'net/i40e: fix use after free in FDIR release' " luca.boccassi
` (94 subsequent siblings)
115 siblings, 0 replies; 208+ messages in thread
From: luca.boccassi @ 2021-07-12 13:04 UTC (permalink / raw)
To: Qi Zhang; +Cc: Yixue Wang, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.3
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/14/21. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/1050357ef7ed784159e8f46443ccdeafc3d68fb8
Thanks.
Luca Boccassi
---
From 1050357ef7ed784159e8f46443ccdeafc3d68fb8 Mon Sep 17 00:00:00 2001
From: Qi Zhang <qi.z.zhang@intel.com>
Date: Wed, 26 May 2021 14:12:56 +0800
Subject: [PATCH] net/ice: fix data path in secondary process
[ upstream commit 45f6a19f6565a3ae8572868c1a6fd2ad70687171 ]
The rte_eth_devices array is not in share memory, it should not be
referenced by ice_adapter which is shared by primary and secondary.
Any process set ice_adapter->eth_dev will corrupt another process'
context.
The patch removed the field "eth_dev" from ice_adapter.
Now, when the data paths try to access the rte_eth_dev_data instance,
they should replace adapter->eth_dev->data with adapter->pf.dev_data.
Fixes: f9cf4f864150 ("net/ice: support device initialization")
Reported-by: Yixue Wang <yixue.wang@intel.com>
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Tested-by: Yixue Wang <yixue.wang@intel.com>
---
drivers/net/ice/ice_dcf_parent.c | 1 -
drivers/net/ice/ice_ethdev.c | 13 ++++++-------
drivers/net/ice/ice_ethdev.h | 3 ---
drivers/net/ice/ice_fdir_filter.c | 6 +++---
drivers/net/ice/ice_rxtx.c | 24 +++++++++---------------
drivers/net/ice/ice_rxtx.h | 4 ++--
drivers/net/ice/ice_rxtx_vec_avx2.c | 2 +-
drivers/net/ice/ice_rxtx_vec_avx512.c | 2 +-
drivers/net/ice/ice_rxtx_vec_common.h | 2 +-
drivers/net/ice/ice_rxtx_vec_sse.c | 2 +-
drivers/net/ice/ice_switch_filter.c | 6 +++---
11 files changed, 27 insertions(+), 38 deletions(-)
diff --git a/drivers/net/ice/ice_dcf_parent.c b/drivers/net/ice/ice_dcf_parent.c
index b109e360f9..903e4db616 100644
--- a/drivers/net/ice/ice_dcf_parent.c
+++ b/drivers/net/ice/ice_dcf_parent.c
@@ -363,7 +363,6 @@ ice_dcf_init_parent_adapter(struct rte_eth_dev *eth_dev)
const struct rte_ether_addr *mac;
int err;
- parent_adapter->eth_dev = eth_dev;
parent_adapter->pf.adapter = parent_adapter;
parent_adapter->pf.dev_data = eth_dev->data;
/* create a dummy main_vsi */
diff --git a/drivers/net/ice/ice_ethdev.c b/drivers/net/ice/ice_ethdev.c
index 3541cc2381..4234353455 100644
--- a/drivers/net/ice/ice_ethdev.c
+++ b/drivers/net/ice/ice_ethdev.c
@@ -2157,7 +2157,6 @@ ice_dev_init(struct rte_eth_dev *dev)
intr_handle = &pci_dev->intr_handle;
pf->adapter = ICE_DEV_PRIVATE_TO_ADAPTER(dev->data->dev_private);
- pf->adapter->eth_dev = dev;
pf->dev_data = dev->data;
hw->back = pf->adapter;
hw->hw_addr = (uint8_t *)pci_dev->mem_resource[0].addr;
@@ -2321,7 +2320,7 @@ ice_release_vsi(struct ice_vsi *vsi)
void
ice_vsi_disable_queues_intr(struct ice_vsi *vsi)
{
- struct rte_eth_dev *dev = vsi->adapter->eth_dev;
+ struct rte_eth_dev *dev = &rte_eth_devices[vsi->adapter->pf.dev_data->port_id];
struct rte_pci_device *pci_dev = ICE_DEV_TO_PCI(dev);
struct rte_intr_handle *intr_handle = &pci_dev->intr_handle;
struct ice_hw *hw = ICE_VSI_TO_HW(vsi);
@@ -3206,7 +3205,7 @@ static int ice_init_rss(struct ice_pf *pf)
{
struct ice_hw *hw = ICE_PF_TO_HW(pf);
struct ice_vsi *vsi = pf->main_vsi;
- struct rte_eth_dev *dev = pf->adapter->eth_dev;
+ struct rte_eth_dev_data *dev_data = pf->dev_data;
struct ice_aq_get_set_rss_lut_params lut_params;
struct rte_eth_rss_conf *rss_conf;
struct ice_aqc_get_set_rss_keys key;
@@ -3215,8 +3214,8 @@ static int ice_init_rss(struct ice_pf *pf)
bool is_safe_mode = pf->adapter->is_safe_mode;
uint32_t reg;
- rss_conf = &dev->data->dev_conf.rx_adv_conf.rss_conf;
- nb_q = dev->data->nb_rx_queues;
+ rss_conf = &dev_data->dev_conf.rx_adv_conf.rss_conf;
+ nb_q = dev_data->nb_rx_queues;
vsi->rss_key_size = ICE_AQC_GET_SET_RSS_KEY_DATA_RSS_KEY_SIZE;
vsi->rss_lut_size = pf->hash_lut_size;
@@ -3348,7 +3347,7 @@ __vsi_queues_bind_intr(struct ice_vsi *vsi, uint16_t msix_vect,
void
ice_vsi_queues_bind_intr(struct ice_vsi *vsi)
{
- struct rte_eth_dev *dev = vsi->adapter->eth_dev;
+ struct rte_eth_dev *dev = &rte_eth_devices[vsi->adapter->pf.dev_data->port_id];
struct rte_pci_device *pci_dev = ICE_DEV_TO_PCI(dev);
struct rte_intr_handle *intr_handle = &pci_dev->intr_handle;
struct ice_hw *hw = ICE_VSI_TO_HW(vsi);
@@ -3401,7 +3400,7 @@ ice_vsi_queues_bind_intr(struct ice_vsi *vsi)
void
ice_vsi_enable_queues_intr(struct ice_vsi *vsi)
{
- struct rte_eth_dev *dev = vsi->adapter->eth_dev;
+ struct rte_eth_dev *dev = &rte_eth_devices[vsi->adapter->pf.dev_data->port_id];
struct rte_pci_device *pci_dev = ICE_DEV_TO_PCI(dev);
struct rte_intr_handle *intr_handle = &pci_dev->intr_handle;
struct ice_hw *hw = ICE_VSI_TO_HW(vsi);
diff --git a/drivers/net/ice/ice_ethdev.h b/drivers/net/ice/ice_ethdev.h
index 6a2bf58560..c1b432c1ef 100644
--- a/drivers/net/ice/ice_ethdev.h
+++ b/drivers/net/ice/ice_ethdev.h
@@ -467,7 +467,6 @@ struct ice_devargs {
struct ice_adapter {
/* Common for both PF and VF */
struct ice_hw hw;
- struct rte_eth_dev *eth_dev;
struct ice_pf pf;
bool rx_bulk_alloc_allowed;
bool rx_vec_allowed;
@@ -518,8 +517,6 @@ struct ice_vsi_vlan_pvid_info {
(&(((struct ice_vsi *)vsi)->adapter->hw))
#define ICE_VSI_TO_PF(vsi) \
(&(((struct ice_vsi *)vsi)->adapter->pf))
-#define ICE_VSI_TO_ETH_DEV(vsi) \
- (((struct ice_vsi *)vsi)->adapter->eth_dev)
/* ICE_PF_TO */
#define ICE_PF_TO_HW(pf) \
diff --git a/drivers/net/ice/ice_fdir_filter.c b/drivers/net/ice/ice_fdir_filter.c
index 175abcdd5c..4a071254ce 100644
--- a/drivers/net/ice/ice_fdir_filter.c
+++ b/drivers/net/ice/ice_fdir_filter.c
@@ -382,7 +382,7 @@ ice_fdir_counter_free(__rte_unused struct ice_pf *pf,
static int
ice_fdir_init_filter_list(struct ice_pf *pf)
{
- struct rte_eth_dev *dev = pf->adapter->eth_dev;
+ struct rte_eth_dev *dev = &rte_eth_devices[pf->dev_data->port_id];
struct ice_fdir_info *fdir_info = &pf->fdir;
char fdir_hash_name[RTE_HASH_NAMESIZE];
int ret;
@@ -444,7 +444,7 @@ ice_fdir_release_filter_list(struct ice_pf *pf)
static int
ice_fdir_setup(struct ice_pf *pf)
{
- struct rte_eth_dev *eth_dev = pf->adapter->eth_dev;
+ struct rte_eth_dev *eth_dev = &rte_eth_devices[pf->dev_data->port_id];
struct ice_hw *hw = ICE_PF_TO_HW(pf);
const struct rte_memzone *mz = NULL;
char z_name[RTE_MEMZONE_NAMESIZE];
@@ -632,7 +632,7 @@ ice_fdir_prof_rm_all(struct ice_pf *pf)
static void
ice_fdir_teardown(struct ice_pf *pf)
{
- struct rte_eth_dev *eth_dev = pf->adapter->eth_dev;
+ struct rte_eth_dev *eth_dev = &rte_eth_devices[pf->dev_data->port_id];
struct ice_hw *hw = ICE_PF_TO_HW(pf);
struct ice_vsi *vsi;
int err;
diff --git a/drivers/net/ice/ice_rxtx.c b/drivers/net/ice/ice_rxtx.c
index d200d21347..f9a475cbb8 100644
--- a/drivers/net/ice/ice_rxtx.c
+++ b/drivers/net/ice/ice_rxtx.c
@@ -228,11 +228,11 @@ ice_program_hw_rx_queue(struct ice_rx_queue *rxq)
struct ice_vsi *vsi = rxq->vsi;
struct ice_hw *hw = ICE_VSI_TO_HW(vsi);
struct ice_pf *pf = ICE_VSI_TO_PF(vsi);
- struct rte_eth_dev *dev = ICE_VSI_TO_ETH_DEV(rxq->vsi);
+ struct rte_eth_dev_data *dev_data = rxq->vsi->adapter->pf.dev_data;
struct ice_rlan_ctx rx_ctx;
enum ice_status err;
uint16_t buf_size, len;
- struct rte_eth_rxmode *rxmode = &dev->data->dev_conf.rxmode;
+ struct rte_eth_rxmode *rxmode = &dev_data->dev_conf.rxmode;
uint32_t rxdid = ICE_RXDID_COMMS_OVS;
uint32_t regval;
@@ -243,7 +243,7 @@ ice_program_hw_rx_queue(struct ice_rx_queue *rxq)
rxq->rx_buf_len = RTE_ALIGN(buf_size, (1 << ICE_RLAN_CTX_DBUF_S));
len = ICE_SUPPORT_CHAIN_NUM * rxq->rx_buf_len;
rxq->max_pkt_len = RTE_MIN(len,
- dev->data->dev_conf.rxmode.max_rx_pkt_len);
+ dev_data->dev_conf.rxmode.max_rx_pkt_len);
if (rxmode->offloads & DEV_RX_OFFLOAD_JUMBO_FRAME) {
if (rxq->max_pkt_len <= ICE_ETH_MAX_LEN ||
@@ -339,7 +339,7 @@ ice_program_hw_rx_queue(struct ice_rx_queue *rxq)
/* Check if scattered RX needs to be used. */
if (rxq->max_pkt_len > buf_size)
- dev->data->scattered_rx = 1;
+ dev_data->scattered_rx = 1;
rxq->qrx_tail = hw->hw_addr + QRX_TAIL(rxq->reg_idx);
@@ -1644,7 +1644,6 @@ rx_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts, uint16_t nb_pkts)
{
struct ice_rx_queue *rxq = (struct ice_rx_queue *)rx_queue;
uint16_t nb_rx = 0;
- struct rte_eth_dev *dev;
if (!nb_pkts)
return 0;
@@ -1661,8 +1660,7 @@ rx_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts, uint16_t nb_pkts)
if (ice_rx_alloc_bufs(rxq) != 0) {
uint16_t i, j;
- dev = ICE_VSI_TO_ETH_DEV(rxq->vsi);
- dev->data->rx_mbuf_alloc_failed +=
+ rxq->vsi->adapter->pf.dev_data->rx_mbuf_alloc_failed +=
rxq->rx_free_thresh;
PMD_RX_LOG(DEBUG, "Rx mbuf alloc failed for "
"port_id=%u, queue_id=%u",
@@ -1735,7 +1733,6 @@ ice_recv_scattered_pkts(void *rx_queue,
uint64_t dma_addr;
uint64_t pkt_flags;
uint32_t *ptype_tbl = rxq->vsi->adapter->ptype_tbl;
- struct rte_eth_dev *dev;
while (nb_rx < nb_pkts) {
rxdp = &rx_ring[rx_id];
@@ -1748,8 +1745,7 @@ ice_recv_scattered_pkts(void *rx_queue,
/* allocate mbuf */
nmb = rte_mbuf_raw_alloc(rxq->mp);
if (unlikely(!nmb)) {
- dev = ICE_VSI_TO_ETH_DEV(rxq->vsi);
- dev->data->rx_mbuf_alloc_failed++;
+ rxq->vsi->adapter->pf.dev_data->rx_mbuf_alloc_failed++;
break;
}
rxd = *rxdp; /* copy descriptor in ring to temp variable*/
@@ -2071,7 +2067,7 @@ ice_fdir_setup_tx_resources(struct ice_pf *pf)
return -EINVAL;
}
- dev = pf->adapter->eth_dev;
+ dev = &rte_eth_devices[pf->adapter->pf.dev_data->port_id];
/* Allocate the TX queue data structure. */
txq = rte_zmalloc_socket("ice fdir tx queue",
@@ -2129,7 +2125,7 @@ ice_fdir_setup_rx_resources(struct ice_pf *pf)
return -EINVAL;
}
- dev = pf->adapter->eth_dev;
+ dev = &rte_eth_devices[pf->adapter->pf.dev_data->port_id];
/* Allocate the RX queue data structure. */
rxq = rte_zmalloc_socket("ice fdir rx queue",
@@ -2198,7 +2194,6 @@ ice_recv_pkts(void *rx_queue,
uint64_t dma_addr;
uint64_t pkt_flags;
uint32_t *ptype_tbl = rxq->vsi->adapter->ptype_tbl;
- struct rte_eth_dev *dev;
while (nb_rx < nb_pkts) {
rxdp = &rx_ring[rx_id];
@@ -2211,8 +2206,7 @@ ice_recv_pkts(void *rx_queue,
/* allocate mbuf */
nmb = rte_mbuf_raw_alloc(rxq->mp);
if (unlikely(!nmb)) {
- dev = ICE_VSI_TO_ETH_DEV(rxq->vsi);
- dev->data->rx_mbuf_alloc_failed++;
+ rxq->vsi->adapter->pf.dev_data->rx_mbuf_alloc_failed++;
break;
}
rxd = *rxdp; /* copy descriptor in ring to temp variable*/
diff --git a/drivers/net/ice/ice_rxtx.h b/drivers/net/ice/ice_rxtx.h
index adfae016a9..e9edb7bb29 100644
--- a/drivers/net/ice/ice_rxtx.h
+++ b/drivers/net/ice/ice_rxtx.h
@@ -266,8 +266,8 @@ int ice_tx_done_cleanup(void *txq, uint32_t free_cnt);
#define FDIR_PARSING_ENABLE_PER_QUEUE(ad, on) do { \
int i; \
- for (i = 0; i < (ad)->eth_dev->data->nb_rx_queues; i++) { \
- struct ice_rx_queue *rxq = (ad)->eth_dev->data->rx_queues[i]; \
+ for (i = 0; i < (ad)->pf.dev_data->nb_rx_queues; i++) { \
+ struct ice_rx_queue *rxq = (ad)->pf.dev_data->rx_queues[i]; \
if (!rxq) \
continue; \
rxq->fdir_enabled = on; \
diff --git a/drivers/net/ice/ice_rxtx_vec_avx2.c b/drivers/net/ice/ice_rxtx_vec_avx2.c
index e4edcd38a9..ac2719fa15 100644
--- a/drivers/net/ice/ice_rxtx_vec_avx2.c
+++ b/drivers/net/ice/ice_rxtx_vec_avx2.c
@@ -466,7 +466,7 @@ _ice_recv_raw_pkts_vec_avx2(struct ice_rx_queue *rxq, struct rte_mbuf **rx_pkts,
* needs to load 2nd 16B of each desc for RSS hash parsing,
* will cause performance drop to get into this context.
*/
- if (rxq->vsi->adapter->eth_dev->data->dev_conf.rxmode.offloads &
+ if (rxq->vsi->adapter->pf.dev_data->dev_conf.rxmode.offloads &
DEV_RX_OFFLOAD_RSS_HASH) {
/* load bottom half of every 32B desc */
const __m128i raw_desc_bh7 =
diff --git a/drivers/net/ice/ice_rxtx_vec_avx512.c b/drivers/net/ice/ice_rxtx_vec_avx512.c
index 533da22bc4..719b7b8b38 100644
--- a/drivers/net/ice/ice_rxtx_vec_avx512.c
+++ b/drivers/net/ice/ice_rxtx_vec_avx512.c
@@ -567,7 +567,7 @@ _ice_recv_raw_pkts_vec_avx512(struct ice_rx_queue *rxq,
* needs to load 2nd 16B of each desc for RSS hash parsing,
* will cause performance drop to get into this context.
*/
- if (rxq->vsi->adapter->eth_dev->data->dev_conf.rxmode.offloads &
+ if (rxq->vsi->adapter->pf.dev_data->dev_conf.rxmode.offloads &
DEV_RX_OFFLOAD_RSS_HASH) {
/* load bottom half of every 32B desc */
const __m128i raw_desc_bh7 =
diff --git a/drivers/net/ice/ice_rxtx_vec_common.h b/drivers/net/ice/ice_rxtx_vec_common.h
index a5d76a2936..1d138aa899 100644
--- a/drivers/net/ice/ice_rxtx_vec_common.h
+++ b/drivers/net/ice/ice_rxtx_vec_common.h
@@ -195,7 +195,7 @@ _ice_tx_queue_release_mbufs_vec(struct ice_tx_queue *txq)
i = txq->tx_next_dd - txq->tx_rs_thresh + 1;
#ifdef CC_AVX512_SUPPORT
- struct rte_eth_dev *dev = txq->vsi->adapter->eth_dev;
+ struct rte_eth_dev *dev = &rte_eth_devices[txq->vsi->adapter->pf.dev_data->port_id];
if (dev->tx_pkt_burst == ice_xmit_pkts_vec_avx512) {
struct ice_vec_tx_entry *swr = (void *)txq->sw_ring;
diff --git a/drivers/net/ice/ice_rxtx_vec_sse.c b/drivers/net/ice/ice_rxtx_vec_sse.c
index 87e0c3db2e..eef21fa70c 100644
--- a/drivers/net/ice/ice_rxtx_vec_sse.c
+++ b/drivers/net/ice/ice_rxtx_vec_sse.c
@@ -478,7 +478,7 @@ _ice_recv_raw_pkts_vec(struct ice_rx_queue *rxq, struct rte_mbuf **rx_pkts,
* needs to load 2nd 16B of each desc for RSS hash parsing,
* will cause performance drop to get into this context.
*/
- if (rxq->vsi->adapter->eth_dev->data->dev_conf.rxmode.offloads &
+ if (rxq->vsi->adapter->pf.dev_data->dev_conf.rxmode.offloads &
DEV_RX_OFFLOAD_RSS_HASH) {
/* load bottom half of every 32B desc */
const __m128i raw_desc_bh3 =
diff --git a/drivers/net/ice/ice_switch_filter.c b/drivers/net/ice/ice_switch_filter.c
index 8cba6eb7b1..c383cade65 100644
--- a/drivers/net/ice/ice_switch_filter.c
+++ b/drivers/net/ice/ice_switch_filter.c
@@ -1489,7 +1489,7 @@ ice_switch_parse_action(struct ice_pf *pf,
struct ice_adv_rule_info *rule_info)
{
struct ice_vsi *vsi = pf->main_vsi;
- struct rte_eth_dev *dev = pf->adapter->eth_dev;
+ struct rte_eth_dev_data *dev_data = pf->adapter->pf.dev_data;
const struct rte_flow_action_queue *act_q;
const struct rte_flow_action_rss *act_qgrop;
uint16_t base_queue, i;
@@ -1520,7 +1520,7 @@ ice_switch_parse_action(struct ice_pf *pf,
goto error;
if ((act_qgrop->queue[0] +
act_qgrop->queue_num) >
- dev->data->nb_rx_queues)
+ dev_data->nb_rx_queues)
goto error1;
for (i = 0; i < act_qgrop->queue_num - 1; i++)
if (act_qgrop->queue[i + 1] !=
@@ -1531,7 +1531,7 @@ ice_switch_parse_action(struct ice_pf *pf,
break;
case RTE_FLOW_ACTION_TYPE_QUEUE:
act_q = action->conf;
- if (act_q->index >= dev->data->nb_rx_queues)
+ if (act_q->index >= dev_data->nb_rx_queues)
goto error;
rule_info->sw_act.fltr_act =
ICE_FWD_TO_Q;
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-07-12 13:41:37.956423428 +0100
+++ 0022-net-ice-fix-data-path-in-secondary-process.patch 2021-07-12 13:41:36.270118028 +0100
@@ -1 +1 @@
-From 45f6a19f6565a3ae8572868c1a6fd2ad70687171 Mon Sep 17 00:00:00 2001
+From 1050357ef7ed784159e8f46443ccdeafc3d68fb8 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 45f6a19f6565a3ae8572868c1a6fd2ad70687171 ]
+
@@ -16 +17,0 @@
-Cc: stable@dpdk.org
@@ -36 +37 @@
-index 1d7aa8bc87..19420a0f58 100644
+index b109e360f9..903e4db616 100644
@@ -39 +40 @@
-@@ -408,7 +408,6 @@ ice_dcf_init_parent_adapter(struct rte_eth_dev *eth_dev)
+@@ -363,7 +363,6 @@ ice_dcf_init_parent_adapter(struct rte_eth_dev *eth_dev)
@@ -48 +49 @@
-index ad20f6baff..09e38590e5 100644
+index 3541cc2381..4234353455 100644
@@ -51 +52 @@
-@@ -2055,7 +2055,6 @@ ice_dev_init(struct rte_eth_dev *dev)
+@@ -2157,7 +2157,6 @@ ice_dev_init(struct rte_eth_dev *dev)
@@ -59 +60 @@
-@@ -2218,7 +2217,7 @@ ice_release_vsi(struct ice_vsi *vsi)
+@@ -2321,7 +2320,7 @@ ice_release_vsi(struct ice_vsi *vsi)
@@ -68 +69 @@
-@@ -3019,7 +3018,7 @@ static int ice_init_rss(struct ice_pf *pf)
+@@ -3206,7 +3205,7 @@ static int ice_init_rss(struct ice_pf *pf)
@@ -77 +78 @@
-@@ -3028,8 +3027,8 @@ static int ice_init_rss(struct ice_pf *pf)
+@@ -3215,8 +3214,8 @@ static int ice_init_rss(struct ice_pf *pf)
@@ -88 +89 @@
-@@ -3161,7 +3160,7 @@ __vsi_queues_bind_intr(struct ice_vsi *vsi, uint16_t msix_vect,
+@@ -3348,7 +3347,7 @@ __vsi_queues_bind_intr(struct ice_vsi *vsi, uint16_t msix_vect,
@@ -97 +98 @@
-@@ -3214,7 +3213,7 @@ ice_vsi_queues_bind_intr(struct ice_vsi *vsi)
+@@ -3401,7 +3400,7 @@ ice_vsi_queues_bind_intr(struct ice_vsi *vsi)
@@ -107 +108 @@
-index aebfd1b0b7..7f3c26fb6f 100644
+index 6a2bf58560..c1b432c1ef 100644
@@ -110 +111 @@
-@@ -475,7 +475,6 @@ struct ice_devargs {
+@@ -467,7 +467,6 @@ struct ice_devargs {
@@ -118 +119 @@
-@@ -526,8 +525,6 @@ struct ice_vsi_vlan_pvid_info {
+@@ -518,8 +517,6 @@ struct ice_vsi_vlan_pvid_info {
@@ -128 +129 @@
-index 092c704503..5e07eb24ae 100644
+index 175abcdd5c..4a071254ce 100644
@@ -131 +132 @@
-@@ -354,7 +354,7 @@ ice_fdir_counter_free(__rte_unused struct ice_pf *pf,
+@@ -382,7 +382,7 @@ ice_fdir_counter_free(__rte_unused struct ice_pf *pf,
@@ -140 +141 @@
-@@ -416,7 +416,7 @@ ice_fdir_release_filter_list(struct ice_pf *pf)
+@@ -444,7 +444,7 @@ ice_fdir_release_filter_list(struct ice_pf *pf)
@@ -149 +150 @@
-@@ -604,7 +604,7 @@ ice_fdir_prof_rm_all(struct ice_pf *pf)
+@@ -632,7 +632,7 @@ ice_fdir_prof_rm_all(struct ice_pf *pf)
@@ -159 +160 @@
-index f4f6f48d78..fc9bb5a3e7 100644
+index d200d21347..f9a475cbb8 100644
@@ -162 +163 @@
-@@ -255,11 +255,11 @@ ice_program_hw_rx_queue(struct ice_rx_queue *rxq)
+@@ -228,11 +228,11 @@ ice_program_hw_rx_queue(struct ice_rx_queue *rxq)
@@ -176 +177 @@
-@@ -270,7 +270,7 @@ ice_program_hw_rx_queue(struct ice_rx_queue *rxq)
+@@ -243,7 +243,7 @@ ice_program_hw_rx_queue(struct ice_rx_queue *rxq)
@@ -185 +186 @@
-@@ -366,7 +366,7 @@ ice_program_hw_rx_queue(struct ice_rx_queue *rxq)
+@@ -339,7 +339,7 @@ ice_program_hw_rx_queue(struct ice_rx_queue *rxq)
@@ -194 +195 @@
-@@ -1675,7 +1675,6 @@ rx_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts, uint16_t nb_pkts)
+@@ -1644,7 +1644,6 @@ rx_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts, uint16_t nb_pkts)
@@ -202 +203 @@
-@@ -1692,8 +1691,7 @@ rx_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts, uint16_t nb_pkts)
+@@ -1661,8 +1660,7 @@ rx_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts, uint16_t nb_pkts)
@@ -212 +213 @@
-@@ -1766,7 +1764,6 @@ ice_recv_scattered_pkts(void *rx_queue,
+@@ -1735,7 +1733,6 @@ ice_recv_scattered_pkts(void *rx_queue,
@@ -220 +221 @@
-@@ -1779,8 +1776,7 @@ ice_recv_scattered_pkts(void *rx_queue,
+@@ -1748,8 +1745,7 @@ ice_recv_scattered_pkts(void *rx_queue,
@@ -230 +231 @@
-@@ -2104,7 +2100,7 @@ ice_fdir_setup_tx_resources(struct ice_pf *pf)
+@@ -2071,7 +2067,7 @@ ice_fdir_setup_tx_resources(struct ice_pf *pf)
@@ -239 +240 @@
-@@ -2162,7 +2158,7 @@ ice_fdir_setup_rx_resources(struct ice_pf *pf)
+@@ -2129,7 +2125,7 @@ ice_fdir_setup_rx_resources(struct ice_pf *pf)
@@ -248 +249 @@
-@@ -2231,7 +2227,6 @@ ice_recv_pkts(void *rx_queue,
+@@ -2198,7 +2194,6 @@ ice_recv_pkts(void *rx_queue,
@@ -256 +257 @@
-@@ -2244,8 +2239,7 @@ ice_recv_pkts(void *rx_queue,
+@@ -2211,8 +2206,7 @@ ice_recv_pkts(void *rx_queue,
@@ -267 +268 @@
-index b29387ca0f..86b6f3dcc0 100644
+index adfae016a9..e9edb7bb29 100644
@@ -270 +271 @@
-@@ -277,8 +277,8 @@ int ice_get_monitor_addr(void *rx_queue, struct rte_power_monitor_cond *pmc);
+@@ -266,8 +266,8 @@ int ice_tx_done_cleanup(void *txq, uint32_t free_cnt);
@@ -282 +283 @@
-index 8d4bd6df1b..165bc1bb9d 100644
+index e4edcd38a9..ac2719fa15 100644
@@ -295 +296 @@
-index ad6c69da9b..5bba9887d2 100644
+index 533da22bc4..719b7b8b38 100644
@@ -298,9 +299,9 @@
-@@ -583,7 +583,7 @@ _ice_recv_raw_pkts_vec_avx512(struct ice_rx_queue *rxq,
- * needs to load 2nd 16B of each desc for RSS hash parsing,
- * will cause performance drop to get into this context.
- */
-- if (rxq->vsi->adapter->eth_dev->data->dev_conf.rxmode.offloads &
-+ if (rxq->vsi->adapter->pf.dev_data->dev_conf.rxmode.offloads &
- DEV_RX_OFFLOAD_RSS_HASH) {
- /* load bottom half of every 32B desc */
- const __m128i raw_desc_bh7 =
+@@ -567,7 +567,7 @@ _ice_recv_raw_pkts_vec_avx512(struct ice_rx_queue *rxq,
+ * needs to load 2nd 16B of each desc for RSS hash parsing,
+ * will cause performance drop to get into this context.
+ */
+- if (rxq->vsi->adapter->eth_dev->data->dev_conf.rxmode.offloads &
++ if (rxq->vsi->adapter->pf.dev_data->dev_conf.rxmode.offloads &
+ DEV_RX_OFFLOAD_RSS_HASH) {
+ /* load bottom half of every 32B desc */
+ const __m128i raw_desc_bh7 =
@@ -308 +309 @@
-index 6e8d7a6fc5..2d8ef7dc8a 100644
+index a5d76a2936..1d138aa899 100644
@@ -318,2 +319,2 @@
- if (dev->tx_pkt_burst == ice_xmit_pkts_vec_avx512 ||
- dev->tx_pkt_burst == ice_xmit_pkts_vec_avx512_offload) {
+ if (dev->tx_pkt_burst == ice_xmit_pkts_vec_avx512) {
+ struct ice_vec_tx_entry *swr = (void *)txq->sw_ring;
@@ -321 +322 @@
-index 6029cc2d99..673e44a243 100644
+index 87e0c3db2e..eef21fa70c 100644
@@ -334 +335 @@
-index 4a64db5385..eeed386c63 100644
+index 8cba6eb7b1..c383cade65 100644
@@ -337 +338 @@
-@@ -1585,7 +1585,7 @@ ice_switch_parse_action(struct ice_pf *pf,
+@@ -1489,7 +1489,7 @@ ice_switch_parse_action(struct ice_pf *pf,
@@ -346 +347 @@
-@@ -1616,7 +1616,7 @@ ice_switch_parse_action(struct ice_pf *pf,
+@@ -1520,7 +1520,7 @@ ice_switch_parse_action(struct ice_pf *pf,
@@ -355 +356 @@
-@@ -1627,7 +1627,7 @@ ice_switch_parse_action(struct ice_pf *pf,
+@@ -1531,7 +1531,7 @@ ice_switch_parse_action(struct ice_pf *pf,
^ permalink raw reply [flat|nested] 208+ messages in thread
* [dpdk-stable] patch 'net/i40e: fix use after free in FDIR release' has been queued to stable release 20.11.3
2021-07-12 13:03 [dpdk-stable] patch 'graph: fix memory leak in stats' has been queued to stable release 20.11.3 luca.boccassi
` (20 preceding siblings ...)
2021-07-12 13:04 ` [dpdk-stable] patch 'net/ice: fix data path " luca.boccassi
@ 2021-07-12 13:04 ` luca.boccassi
2021-07-12 13:04 ` [dpdk-stable] patch 'net/iavf: fix scalar Rx' " luca.boccassi
` (93 subsequent siblings)
115 siblings, 0 replies; 208+ messages in thread
From: luca.boccassi @ 2021-07-12 13:04 UTC (permalink / raw)
To: Dapeng Yu; +Cc: Qi Zhang, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.3
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/14/21. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/5f70ea4e97394bac64f00630ca66125025f39eb8
Thanks.
Luca Boccassi
---
From 5f70ea4e97394bac64f00630ca66125025f39eb8 Mon Sep 17 00:00:00 2001
From: Dapeng Yu <dapengx.yu@intel.com>
Date: Fri, 4 Jun 2021 10:02:01 +0800
Subject: [PATCH] net/i40e: fix use after free in FDIR release
[ upstream commit 4b5b8ce8ffe57c611ccee438dea67b612021cfba ]
The original code use a heap pointer after it is freed.
Fixes: 460d1679586e ("drivers/net: delete HW rings while freeing queues")
Signed-off-by: Dapeng Yu <dapengx.yu@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
---
drivers/net/i40e/i40e_fdir.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/i40e/i40e_fdir.c b/drivers/net/i40e/i40e_fdir.c
index ab924e8538..a447cfdd92 100644
--- a/drivers/net/i40e/i40e_fdir.c
+++ b/drivers/net/i40e/i40e_fdir.c
@@ -300,11 +300,11 @@ i40e_fdir_teardown(struct i40e_pf *pf)
if (err)
PMD_DRV_LOG(DEBUG, "Failed to do FDIR RX switch off");
- i40e_dev_rx_queue_release(pf->fdir.rxq);
rte_eth_dma_zone_free(dev, "fdir_rx_ring", pf->fdir.rxq->queue_id);
+ i40e_dev_rx_queue_release(pf->fdir.rxq);
pf->fdir.rxq = NULL;
- i40e_dev_tx_queue_release(pf->fdir.txq);
rte_eth_dma_zone_free(dev, "fdir_tx_ring", pf->fdir.txq->queue_id);
+ i40e_dev_tx_queue_release(pf->fdir.txq);
pf->fdir.txq = NULL;
i40e_vsi_release(vsi);
pf->fdir.fdir_vsi = NULL;
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-07-12 13:41:38.019285281 +0100
+++ 0023-net-i40e-fix-use-after-free-in-FDIR-release.patch 2021-07-12 13:41:36.274118111 +0100
@@ -1 +1 @@
-From 4b5b8ce8ffe57c611ccee438dea67b612021cfba Mon Sep 17 00:00:00 2001
+From 5f70ea4e97394bac64f00630ca66125025f39eb8 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 4b5b8ce8ffe57c611ccee438dea67b612021cfba ]
+
@@ -9 +10,0 @@
-Cc: stable@dpdk.org
@@ -18 +19 @@
-index 3c7cf1ba90..20658816ee 100644
+index ab924e8538..a447cfdd92 100644
@@ -21 +22 @@
-@@ -301,11 +301,11 @@ i40e_fdir_teardown(struct i40e_pf *pf)
+@@ -300,11 +300,11 @@ i40e_fdir_teardown(struct i40e_pf *pf)
^ permalink raw reply [flat|nested] 208+ messages in thread
* [dpdk-stable] patch 'net/iavf: fix scalar Rx' has been queued to stable release 20.11.3
2021-07-12 13:03 [dpdk-stable] patch 'graph: fix memory leak in stats' has been queued to stable release 20.11.3 luca.boccassi
` (21 preceding siblings ...)
2021-07-12 13:04 ` [dpdk-stable] patch 'net/i40e: fix use after free in FDIR release' " luca.boccassi
@ 2021-07-12 13:04 ` luca.boccassi
2021-07-12 13:04 ` [dpdk-stable] patch 'acl: fix build with GCC 6.3' " luca.boccassi
` (92 subsequent siblings)
115 siblings, 0 replies; 208+ messages in thread
From: luca.boccassi @ 2021-07-12 13:04 UTC (permalink / raw)
To: Beilei Xing; +Cc: Jingjing Wu, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.3
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/14/21. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/ac4a67a5f99806856f2921b2880435ed98982daf
Thanks.
Luca Boccassi
---
From ac4a67a5f99806856f2921b2880435ed98982daf Mon Sep 17 00:00:00 2001
From: Beilei Xing <beilei.xing@intel.com>
Date: Tue, 1 Jun 2021 13:09:51 +0800
Subject: [PATCH] net/iavf: fix scalar Rx
[ upstream commit 33d2ee00102881a3366574e8051c2cb3be9309e3 ]
The new allocated mbuf should be updated to the SW
ring.
Fixes: a2b29a7733ef ("net/avf: enable basic Rx Tx")
Fixes: b8b4c54ef9b0 ("net/iavf: support flexible Rx descriptor in normal path")
Signed-off-by: Beilei Xing <beilei.xing@intel.com>
Acked-by: Jingjing Wu <jingjing.wu@intel.com>
---
drivers/net/iavf/iavf_rxtx.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/net/iavf/iavf_rxtx.c b/drivers/net/iavf/iavf_rxtx.c
index 702efc695f..e3206e4fbb 100644
--- a/drivers/net/iavf/iavf_rxtx.c
+++ b/drivers/net/iavf/iavf_rxtx.c
@@ -1151,6 +1151,7 @@ iavf_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts, uint16_t nb_pkts)
rxd = *rxdp;
nb_hold++;
rxe = rxq->sw_ring[rx_id];
+ rxq->sw_ring[rx_id] = nmb;
rx_id++;
if (unlikely(rx_id == rxq->nb_rx_desc))
rx_id = 0;
@@ -1256,6 +1257,7 @@ iavf_recv_pkts_flex_rxd(void *rx_queue,
rxd = *rxdp;
nb_hold++;
rxe = rxq->sw_ring[rx_id];
+ rxq->sw_ring[rx_id] = nmb;
rx_id++;
if (unlikely(rx_id == rxq->nb_rx_desc))
rx_id = 0;
@@ -1347,6 +1349,7 @@ iavf_recv_scattered_pkts_flex_rxd(void *rx_queue, struct rte_mbuf **rx_pkts,
rxd = *rxdp;
nb_hold++;
rxe = rxq->sw_ring[rx_id];
+ rxq->sw_ring[rx_id] = nmb;
rx_id++;
if (rx_id == rxq->nb_rx_desc)
rx_id = 0;
@@ -1500,6 +1503,7 @@ iavf_recv_scattered_pkts(void *rx_queue, struct rte_mbuf **rx_pkts,
rxd = *rxdp;
nb_hold++;
rxe = rxq->sw_ring[rx_id];
+ rxq->sw_ring[rx_id] = nmb;
rx_id++;
if (rx_id == rxq->nb_rx_desc)
rx_id = 0;
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-07-12 13:41:38.063233287 +0100
+++ 0024-net-iavf-fix-scalar-Rx.patch 2021-07-12 13:41:36.278118195 +0100
@@ -1 +1 @@
-From 33d2ee00102881a3366574e8051c2cb3be9309e3 Mon Sep 17 00:00:00 2001
+From ac4a67a5f99806856f2921b2880435ed98982daf Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 33d2ee00102881a3366574e8051c2cb3be9309e3 ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -20 +21 @@
-index fdab80a79d..0361af0d85 100644
+index 702efc695f..e3206e4fbb 100644
@@ -23 +24 @@
-@@ -1218,6 +1218,7 @@ iavf_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts, uint16_t nb_pkts)
+@@ -1151,6 +1151,7 @@ iavf_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts, uint16_t nb_pkts)
@@ -31 +32 @@
-@@ -1323,6 +1324,7 @@ iavf_recv_pkts_flex_rxd(void *rx_queue,
+@@ -1256,6 +1257,7 @@ iavf_recv_pkts_flex_rxd(void *rx_queue,
@@ -39 +40 @@
-@@ -1414,6 +1416,7 @@ iavf_recv_scattered_pkts_flex_rxd(void *rx_queue, struct rte_mbuf **rx_pkts,
+@@ -1347,6 +1349,7 @@ iavf_recv_scattered_pkts_flex_rxd(void *rx_queue, struct rte_mbuf **rx_pkts,
@@ -47 +48 @@
-@@ -1567,6 +1570,7 @@ iavf_recv_scattered_pkts(void *rx_queue, struct rte_mbuf **rx_pkts,
+@@ -1500,6 +1503,7 @@ iavf_recv_scattered_pkts(void *rx_queue, struct rte_mbuf **rx_pkts,
^ permalink raw reply [flat|nested] 208+ messages in thread
* [dpdk-stable] patch 'acl: fix build with GCC 6.3' has been queued to stable release 20.11.3
2021-07-12 13:03 [dpdk-stable] patch 'graph: fix memory leak in stats' has been queued to stable release 20.11.3 luca.boccassi
` (22 preceding siblings ...)
2021-07-12 13:04 ` [dpdk-stable] patch 'net/iavf: fix scalar Rx' " luca.boccassi
@ 2021-07-12 13:04 ` luca.boccassi
2021-07-12 20:31 ` Liang Ma
2021-07-12 13:04 ` [dpdk-stable] patch 'doc: fix typo in SPDX tag' " luca.boccassi
` (91 subsequent siblings)
115 siblings, 1 reply; 208+ messages in thread
From: luca.boccassi @ 2021-07-12 13:04 UTC (permalink / raw)
To: Konstantin Ananyev; +Cc: Liang Ma, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.3
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/14/21. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/004342dc908728ae6a303439959b803ecc4850d1
Thanks.
Luca Boccassi
---
From 004342dc908728ae6a303439959b803ecc4850d1 Mon Sep 17 00:00:00 2001
From: Konstantin Ananyev <konstantin.ananyev@intel.com>
Date: Fri, 21 May 2021 15:42:07 +0100
Subject: [PATCH] acl: fix build with GCC 6.3
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
[ upstream commit b3b36f0fbf1fd68980afce10300f1b8831607324 ]
--buildtype=debug with gcc 6.3 produces the following error:
../lib/librte_acl/acl_run_avx512_common.h: In function
‘resolve_match_idx_avx512x16’:
../lib/librte_acl/acl_run_avx512x16.h:33:18: error:
the last argument must be an 8-bit immediate
^
../lib/librte_acl/acl_run_avx512_common.h:373:9: note:
in expansion of macro ‘_M_I_’
return _M_I_(slli_epi32)(mi, match_log);
^~~~~
Seems like gcc-6.3 complains about the following construct:
static const uint32_t match_log = 5;
...
_mm512_slli_epi32(mi, match_log);
It can't substitute constant variable 'match_log' with its actual value.
The fix replaces constant variable with its immediate value.
Bugzilla ID: 717
Fixes: b64c2295f7fc ("acl: add 256-bit AVX512 classify method")
Fixes: 45da22e42ec3 ("acl: add 512-bit AVX512 classify method")
Reported-by: Liang Ma <liangma@liangbit.com>
Signed-off-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
---
lib/librte_acl/acl_run_avx512.c | 8 ++++----
lib/librte_acl/acl_run_avx512_common.h | 4 ++--
lib/librte_acl/acl_run_avx512x16.h | 6 ++----
3 files changed, 8 insertions(+), 10 deletions(-)
diff --git a/lib/librte_acl/acl_run_avx512.c b/lib/librte_acl/acl_run_avx512.c
index 3fd1e33c3f..78fbe34f7c 100644
--- a/lib/librte_acl/acl_run_avx512.c
+++ b/lib/librte_acl/acl_run_avx512.c
@@ -4,8 +4,8 @@
#include "acl_run_sse.h"
-/*sizeof(uint32_t) << match_log == sizeof(struct rte_acl_match_results)*/
-static const uint32_t match_log = 5;
+/*sizeof(uint32_t) << ACL_MATCH_LOG == sizeof(struct rte_acl_match_results)*/
+#define ACL_MATCH_LOG 5
struct acl_flow_avx512 {
uint32_t num_packets; /* number of packets processed */
@@ -82,7 +82,7 @@ resolve_mcle8_avx512x1(uint32_t result[],
for (k = 0; k != nb_pkt; k++, result += nb_cat) {
- mi = match[k] << match_log;
+ mi = match[k] << ACL_MATCH_LOG;
for (j = 0; j != nb_cat; j += RTE_ACL_RESULTS_MULTIPLIER) {
@@ -92,7 +92,7 @@ resolve_mcle8_avx512x1(uint32_t result[],
for (i = 1, pm = match + nb_pkt; i != nb_trie;
i++, pm += nb_pkt) {
- mn = j + (pm[k] << match_log);
+ mn = j + (pm[k] << ACL_MATCH_LOG);
nr = _mm_loadu_si128((const xmm_t *)(res + mn));
np = _mm_loadu_si128((const xmm_t *)(pri + mn));
diff --git a/lib/librte_acl/acl_run_avx512_common.h b/lib/librte_acl/acl_run_avx512_common.h
index fbad74d459..578eaa1d0c 100644
--- a/lib/librte_acl/acl_run_avx512_common.h
+++ b/lib/librte_acl/acl_run_avx512_common.h
@@ -393,8 +393,8 @@ static inline _T_simd
_F_(resolve_match_idx)(_T_simd mi)
{
RTE_BUILD_BUG_ON(sizeof(struct rte_acl_match_results) !=
- 1 << (match_log + 2));
- return _M_I_(slli_epi32)(mi, match_log);
+ 1 << (ACL_MATCH_LOG + 2));
+ return _M_I_(slli_epi32)(mi, ACL_MATCH_LOG);
}
/*
diff --git a/lib/librte_acl/acl_run_avx512x16.h b/lib/librte_acl/acl_run_avx512x16.h
index da244bc257..48bb6fed85 100644
--- a/lib/librte_acl/acl_run_avx512x16.h
+++ b/lib/librte_acl/acl_run_avx512x16.h
@@ -252,8 +252,6 @@ resolve_mcgt8_avx512x1(uint32_t result[],
__mmask16 cm, sm;
__m512i cp, cr, np, nr;
- const uint32_t match_log = 5;
-
res = pr->results;
pri = pr->priority;
@@ -261,7 +259,7 @@ resolve_mcgt8_avx512x1(uint32_t result[],
for (k = 0; k != nb_pkt; k++, result += nb_cat) {
- mi = match[k] << match_log;
+ mi = match[k] << ACL_MATCH_LOG;
cr = _mm512_maskz_loadu_epi32(cm, res + mi);
cp = _mm512_maskz_loadu_epi32(cm, pri + mi);
@@ -269,7 +267,7 @@ resolve_mcgt8_avx512x1(uint32_t result[],
for (i = 1, pm = match + nb_pkt; i != nb_trie;
i++, pm += nb_pkt) {
- mi = pm[k] << match_log;
+ mi = pm[k] << ACL_MATCH_LOG;
nr = _mm512_maskz_loadu_epi32(cm, res + mi);
np = _mm512_maskz_loadu_epi32(cm, pri + mi);
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-07-12 13:41:38.106887242 +0100
+++ 0025-acl-fix-build-with-GCC-6.3.patch 2021-07-12 13:41:36.282118277 +0100
@@ -1 +1 @@
-From b3b36f0fbf1fd68980afce10300f1b8831607324 Mon Sep 17 00:00:00 2001
+From 004342dc908728ae6a303439959b803ecc4850d1 Mon Sep 17 00:00:00 2001
@@ -8,0 +9,2 @@
+[ upstream commit b3b36f0fbf1fd68980afce10300f1b8831607324 ]
+
@@ -33 +34,0 @@
-Cc: stable@dpdk.org
@@ -38,3 +39,3 @@
- lib/acl/acl_run_avx512.c | 8 ++++----
- lib/acl/acl_run_avx512_common.h | 4 ++--
- lib/acl/acl_run_avx512x16.h | 6 ++----
+ lib/librte_acl/acl_run_avx512.c | 8 ++++----
+ lib/librte_acl/acl_run_avx512_common.h | 4 ++--
+ lib/librte_acl/acl_run_avx512x16.h | 6 ++----
@@ -43 +44 @@
-diff --git a/lib/acl/acl_run_avx512.c b/lib/acl/acl_run_avx512.c
+diff --git a/lib/librte_acl/acl_run_avx512.c b/lib/librte_acl/acl_run_avx512.c
@@ -45,2 +46,2 @@
---- a/lib/acl/acl_run_avx512.c
-+++ b/lib/acl/acl_run_avx512.c
+--- a/lib/librte_acl/acl_run_avx512.c
++++ b/lib/librte_acl/acl_run_avx512.c
@@ -76 +77 @@
-diff --git a/lib/acl/acl_run_avx512_common.h b/lib/acl/acl_run_avx512_common.h
+diff --git a/lib/librte_acl/acl_run_avx512_common.h b/lib/librte_acl/acl_run_avx512_common.h
@@ -78,2 +79,2 @@
---- a/lib/acl/acl_run_avx512_common.h
-+++ b/lib/acl/acl_run_avx512_common.h
+--- a/lib/librte_acl/acl_run_avx512_common.h
++++ b/lib/librte_acl/acl_run_avx512_common.h
@@ -91 +92 @@
-diff --git a/lib/acl/acl_run_avx512x16.h b/lib/acl/acl_run_avx512x16.h
+diff --git a/lib/librte_acl/acl_run_avx512x16.h b/lib/librte_acl/acl_run_avx512x16.h
@@ -93,2 +94,2 @@
---- a/lib/acl/acl_run_avx512x16.h
-+++ b/lib/acl/acl_run_avx512x16.h
+--- a/lib/librte_acl/acl_run_avx512x16.h
++++ b/lib/librte_acl/acl_run_avx512x16.h
^ permalink raw reply [flat|nested] 208+ messages in thread
* Re: [dpdk-stable] patch 'acl: fix build with GCC 6.3' has been queued to stable release 20.11.3
2021-07-12 13:04 ` [dpdk-stable] patch 'acl: fix build with GCC 6.3' " luca.boccassi
@ 2021-07-12 20:31 ` Liang Ma
2021-07-15 14:59 ` Luca Boccassi
0 siblings, 1 reply; 208+ messages in thread
From: Liang Ma @ 2021-07-12 20:31 UTC (permalink / raw)
To: luca.boccassi; +Cc: Konstantin Ananyev, dpdk stable
On Mon, Jul 12, 2021 at 02:04:20PM +0100, luca.boccassi@gmail.com wrote:
> Hi,
>
> FYI, your patch has been queued to stable release 20.11.3
>
> Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
> It will be pushed if I get no objections before 07/14/21. 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/bluca/dpdk-stable
>
> This queued commit can be viewed at:
> https://github.com/bluca/dpdk-stable/commit/004342dc908728ae6a303439959b803ecc4850d1
>
> Thanks.
Hi Luca/Konstantin,
as far as I know, this patch will cause different failure back to the
time. unless we have newer version fix.
Regards
Liang
>
> Luca Boccassi
>
> ---
> From 004342dc908728ae6a303439959b803ecc4850d1 Mon Sep 17 00:00:00 2001
> From: Konstantin Ananyev <konstantin.ananyev@intel.com>
> Date: Fri, 21 May 2021 15:42:07 +0100
> Subject: [PATCH] acl: fix build with GCC 6.3
> MIME-Version: 1.0
> Content-Type: text/plain; charset=UTF-8
> Content-Transfer-Encoding: 8bit
>
> [ upstream commit b3b36f0fbf1fd68980afce10300f1b8831607324 ]
>
> --buildtype=debug with gcc 6.3 produces the following error:
>
> ../lib/librte_acl/acl_run_avx512_common.h: In function
> ‘resolve_match_idx_avx512x16’:
> ../lib/librte_acl/acl_run_avx512x16.h:33:18: error:
> the last argument must be an 8-bit immediate
> ^
> ../lib/librte_acl/acl_run_avx512_common.h:373:9: note:
> in expansion of macro ‘_M_I_’
> return _M_I_(slli_epi32)(mi, match_log);
> ^~~~~
>
> Seems like gcc-6.3 complains about the following construct:
>
> static const uint32_t match_log = 5;
> ...
> _mm512_slli_epi32(mi, match_log);
>
> It can't substitute constant variable 'match_log' with its actual value.
> The fix replaces constant variable with its immediate value.
>
> Bugzilla ID: 717
> Fixes: b64c2295f7fc ("acl: add 256-bit AVX512 classify method")
> Fixes: 45da22e42ec3 ("acl: add 512-bit AVX512 classify method")
>
> Reported-by: Liang Ma <liangma@liangbit.com>
> Signed-off-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
> ---
> lib/librte_acl/acl_run_avx512.c | 8 ++++----
> lib/librte_acl/acl_run_avx512_common.h | 4 ++--
> lib/librte_acl/acl_run_avx512x16.h | 6 ++----
> 3 files changed, 8 insertions(+), 10 deletions(-)
>
> diff --git a/lib/librte_acl/acl_run_avx512.c b/lib/librte_acl/acl_run_avx512.c
> index 3fd1e33c3f..78fbe34f7c 100644
> --- a/lib/librte_acl/acl_run_avx512.c
> +++ b/lib/librte_acl/acl_run_avx512.c
> @@ -4,8 +4,8 @@
>
> #include "acl_run_sse.h"
>
> -/*sizeof(uint32_t) << match_log == sizeof(struct rte_acl_match_results)*/
> -static const uint32_t match_log = 5;
> +/*sizeof(uint32_t) << ACL_MATCH_LOG == sizeof(struct rte_acl_match_results)*/
> +#define ACL_MATCH_LOG 5
>
> struct acl_flow_avx512 {
> uint32_t num_packets; /* number of packets processed */
> @@ -82,7 +82,7 @@ resolve_mcle8_avx512x1(uint32_t result[],
>
> for (k = 0; k != nb_pkt; k++, result += nb_cat) {
>
> - mi = match[k] << match_log;
> + mi = match[k] << ACL_MATCH_LOG;
>
> for (j = 0; j != nb_cat; j += RTE_ACL_RESULTS_MULTIPLIER) {
>
> @@ -92,7 +92,7 @@ resolve_mcle8_avx512x1(uint32_t result[],
> for (i = 1, pm = match + nb_pkt; i != nb_trie;
> i++, pm += nb_pkt) {
>
> - mn = j + (pm[k] << match_log);
> + mn = j + (pm[k] << ACL_MATCH_LOG);
>
> nr = _mm_loadu_si128((const xmm_t *)(res + mn));
> np = _mm_loadu_si128((const xmm_t *)(pri + mn));
> diff --git a/lib/librte_acl/acl_run_avx512_common.h b/lib/librte_acl/acl_run_avx512_common.h
> index fbad74d459..578eaa1d0c 100644
> --- a/lib/librte_acl/acl_run_avx512_common.h
> +++ b/lib/librte_acl/acl_run_avx512_common.h
> @@ -393,8 +393,8 @@ static inline _T_simd
> _F_(resolve_match_idx)(_T_simd mi)
> {
> RTE_BUILD_BUG_ON(sizeof(struct rte_acl_match_results) !=
> - 1 << (match_log + 2));
> - return _M_I_(slli_epi32)(mi, match_log);
> + 1 << (ACL_MATCH_LOG + 2));
> + return _M_I_(slli_epi32)(mi, ACL_MATCH_LOG);
> }
>
> /*
> diff --git a/lib/librte_acl/acl_run_avx512x16.h b/lib/librte_acl/acl_run_avx512x16.h
> index da244bc257..48bb6fed85 100644
> --- a/lib/librte_acl/acl_run_avx512x16.h
> +++ b/lib/librte_acl/acl_run_avx512x16.h
> @@ -252,8 +252,6 @@ resolve_mcgt8_avx512x1(uint32_t result[],
> __mmask16 cm, sm;
> __m512i cp, cr, np, nr;
>
> - const uint32_t match_log = 5;
> -
> res = pr->results;
> pri = pr->priority;
>
> @@ -261,7 +259,7 @@ resolve_mcgt8_avx512x1(uint32_t result[],
>
> for (k = 0; k != nb_pkt; k++, result += nb_cat) {
>
> - mi = match[k] << match_log;
> + mi = match[k] << ACL_MATCH_LOG;
>
> cr = _mm512_maskz_loadu_epi32(cm, res + mi);
> cp = _mm512_maskz_loadu_epi32(cm, pri + mi);
> @@ -269,7 +267,7 @@ resolve_mcgt8_avx512x1(uint32_t result[],
> for (i = 1, pm = match + nb_pkt; i != nb_trie;
> i++, pm += nb_pkt) {
>
> - mi = pm[k] << match_log;
> + mi = pm[k] << ACL_MATCH_LOG;
>
> nr = _mm512_maskz_loadu_epi32(cm, res + mi);
> np = _mm512_maskz_loadu_epi32(cm, pri + mi);
> --
> 2.30.2
>
> ---
> Diff of the applied patch vs upstream commit (please double-check if non-empty:
> ---
> --- - 2021-07-12 13:41:38.106887242 +0100
> +++ 0025-acl-fix-build-with-GCC-6.3.patch 2021-07-12 13:41:36.282118277 +0100
> @@ -1 +1 @@
> -From b3b36f0fbf1fd68980afce10300f1b8831607324 Mon Sep 17 00:00:00 2001
> +From 004342dc908728ae6a303439959b803ecc4850d1 Mon Sep 17 00:00:00 2001
> @@ -8,0 +9,2 @@
> +[ upstream commit b3b36f0fbf1fd68980afce10300f1b8831607324 ]
> +
> @@ -33 +34,0 @@
> -Cc: stable@dpdk.org
> @@ -38,3 +39,3 @@
> - lib/acl/acl_run_avx512.c | 8 ++++----
> - lib/acl/acl_run_avx512_common.h | 4 ++--
> - lib/acl/acl_run_avx512x16.h | 6 ++----
> + lib/librte_acl/acl_run_avx512.c | 8 ++++----
> + lib/librte_acl/acl_run_avx512_common.h | 4 ++--
> + lib/librte_acl/acl_run_avx512x16.h | 6 ++----
> @@ -43 +44 @@
> -diff --git a/lib/acl/acl_run_avx512.c b/lib/acl/acl_run_avx512.c
> +diff --git a/lib/librte_acl/acl_run_avx512.c b/lib/librte_acl/acl_run_avx512.c
> @@ -45,2 +46,2 @@
> ---- a/lib/acl/acl_run_avx512.c
> -+++ b/lib/acl/acl_run_avx512.c
> +--- a/lib/librte_acl/acl_run_avx512.c
> ++++ b/lib/librte_acl/acl_run_avx512.c
> @@ -76 +77 @@
> -diff --git a/lib/acl/acl_run_avx512_common.h b/lib/acl/acl_run_avx512_common.h
> +diff --git a/lib/librte_acl/acl_run_avx512_common.h b/lib/librte_acl/acl_run_avx512_common.h
> @@ -78,2 +79,2 @@
> ---- a/lib/acl/acl_run_avx512_common.h
> -+++ b/lib/acl/acl_run_avx512_common.h
> +--- a/lib/librte_acl/acl_run_avx512_common.h
> ++++ b/lib/librte_acl/acl_run_avx512_common.h
> @@ -91 +92 @@
> -diff --git a/lib/acl/acl_run_avx512x16.h b/lib/acl/acl_run_avx512x16.h
> +diff --git a/lib/librte_acl/acl_run_avx512x16.h b/lib/librte_acl/acl_run_avx512x16.h
> @@ -93,2 +94,2 @@
> ---- a/lib/acl/acl_run_avx512x16.h
> -+++ b/lib/acl/acl_run_avx512x16.h
> +--- a/lib/librte_acl/acl_run_avx512x16.h
> ++++ b/lib/librte_acl/acl_run_avx512x16.h
^ permalink raw reply [flat|nested] 208+ messages in thread
* Re: [dpdk-stable] patch 'acl: fix build with GCC 6.3' has been queued to stable release 20.11.3
2021-07-12 20:31 ` Liang Ma
@ 2021-07-15 14:59 ` Luca Boccassi
0 siblings, 0 replies; 208+ messages in thread
From: Luca Boccassi @ 2021-07-15 14:59 UTC (permalink / raw)
To: Liang Ma; +Cc: Konstantin Ananyev, dpdk stable
On Mon, 2021-07-12 at 21:31 +0100, Liang Ma wrote:
> On Mon, Jul 12, 2021 at 02:04:20PM +0100, luca.boccassi@gmail.com wrote:
> > Hi,
> >
> > FYI, your patch has been queued to stable release 20.11.3
> >
> > Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
> > It will be pushed if I get no objections before 07/14/21. 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/bluca/dpdk-stable
> >
> > This queued commit can be viewed at:
> > https://github.com/bluca/dpdk-stable/commit/004342dc908728ae6a303439959b803ecc4850d1
> >
> > Thanks.
> Hi Luca/Konstantin,
> as far as I know, this patch will cause different failure back to the
> time. unless we have newer version fix.
Ok, dropped, thanks.
--
Kind regards,
Luca Boccassi
^ permalink raw reply [flat|nested] 208+ messages in thread
* [dpdk-stable] patch 'doc: fix typo in SPDX tag' has been queued to stable release 20.11.3
2021-07-12 13:03 [dpdk-stable] patch 'graph: fix memory leak in stats' has been queued to stable release 20.11.3 luca.boccassi
` (23 preceding siblings ...)
2021-07-12 13:04 ` [dpdk-stable] patch 'acl: fix build with GCC 6.3' " luca.boccassi
@ 2021-07-12 13:04 ` luca.boccassi
2021-07-12 13:04 ` [dpdk-stable] patch 'doc: fix default burst size in testpmd' " luca.boccassi
` (90 subsequent siblings)
115 siblings, 0 replies; 208+ messages in thread
From: luca.boccassi @ 2021-07-12 13:04 UTC (permalink / raw)
To: Kevin Traynor; +Cc: dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.3
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/14/21. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/06c88d91a1e5de959db978519c357f2d9c5d9936
Thanks.
Luca Boccassi
---
From 06c88d91a1e5de959db978519c357f2d9c5d9936 Mon Sep 17 00:00:00 2001
From: Kevin Traynor <ktraynor@redhat.com>
Date: Fri, 11 Jun 2021 17:38:42 +0100
Subject: [PATCH] doc: fix typo in SPDX tag
[ upstream commit f56a6ca4ed5e70af69c8a799a9c514f7b78d2f72 ]
A stray character got added. Remove it.
Fixes: cb056611a8ed ("eal: rename lcore master and slave")
Signed-off-by: Kevin Traynor <ktraynor@redhat.com>
---
doc/guides/sample_app_ug/hello_world.rst | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/doc/guides/sample_app_ug/hello_world.rst b/doc/guides/sample_app_ug/hello_world.rst
index 7cb9279e99..6ec93e0054 100644
--- a/doc/guides/sample_app_ug/hello_world.rst
+++ b/doc/guides/sample_app_ug/hello_world.rst
@@ -1,4 +1,4 @@
-o.. SPDX-License-Identifier: BSD-3-Clause
+.. SPDX-License-Identifier: BSD-3-Clause
Copyright(c) 2010-2014 Intel Corporation.
Hello World Sample Application
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-07-12 13:41:38.148700767 +0100
+++ 0026-doc-fix-typo-in-SPDX-tag.patch 2021-07-12 13:41:36.286118361 +0100
@@ -1 +1 @@
-From f56a6ca4ed5e70af69c8a799a9c514f7b78d2f72 Mon Sep 17 00:00:00 2001
+From 06c88d91a1e5de959db978519c357f2d9c5d9936 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit f56a6ca4ed5e70af69c8a799a9c514f7b78d2f72 ]
+
@@ -9 +10,0 @@
-Cc: stable@dpdk.org
^ permalink raw reply [flat|nested] 208+ messages in thread
* [dpdk-stable] patch 'doc: fix default burst size in testpmd' has been queued to stable release 20.11.3
2021-07-12 13:03 [dpdk-stable] patch 'graph: fix memory leak in stats' has been queued to stable release 20.11.3 luca.boccassi
` (24 preceding siblings ...)
2021-07-12 13:04 ` [dpdk-stable] patch 'doc: fix typo in SPDX tag' " luca.boccassi
@ 2021-07-12 13:04 ` luca.boccassi
2021-07-12 13:04 ` [dpdk-stable] patch 'vfio: add stdbool include' " luca.boccassi
` (89 subsequent siblings)
115 siblings, 0 replies; 208+ messages in thread
From: luca.boccassi @ 2021-07-12 13:04 UTC (permalink / raw)
To: Ajit Khaparde; +Cc: dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.3
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/14/21. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/ac656bd081befc325bd9cbe2bc5565e15e9829b4
Thanks.
Luca Boccassi
---
From ac656bd081befc325bd9cbe2bc5565e15e9829b4 Mon Sep 17 00:00:00 2001
From: Ajit Khaparde <ajit.khaparde@broadcom.com>
Date: Fri, 28 May 2021 10:45:29 -0700
Subject: [PATCH] doc: fix default burst size in testpmd
[ upstream commit 478614ee1f62e172c4d4770f157fc9bbb6563523 ]
Default burst size in testpmd has been changed from 16 to 32
for some time now. But the documentation had not been updated.
Fixes: 836853d3d4cf7 ("app/testpmd: increase default burst size to 32")
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
doc/guides/prog_guide/writing_efficient_code.rst | 15 ++++++++-------
1 file changed, 8 insertions(+), 7 deletions(-)
diff --git a/doc/guides/prog_guide/writing_efficient_code.rst b/doc/guides/prog_guide/writing_efficient_code.rst
index 7baeaae431..a61e8320ae 100644
--- a/doc/guides/prog_guide/writing_efficient_code.rst
+++ b/doc/guides/prog_guide/writing_efficient_code.rst
@@ -143,20 +143,21 @@ In order to achieve higher throughput,
the DPDK attempts to aggregate the cost of processing each packet individually by processing packets in bursts.
Using the testpmd application as an example,
-the burst size can be set on the command line to a value of 16 (also the default value).
-This allows the application to request 16 packets at a time from the PMD.
+the burst size can be set on the command line to a value of 32 (also the default value).
+This allows the application to request 32 packets at a time from the PMD.
The testpmd application then immediately attempts to transmit all the packets that were received,
-in this case, all 16 packets.
+in this case, all 32 packets.
The packets are not transmitted until the tail pointer is updated on the corresponding TX queue of the network port.
This behavior is desirable when tuning for high throughput because
-the cost of tail pointer updates to both the RX and TX queues can be spread across 16 packets,
+the cost of tail pointer updates to both the RX and TX queues can be spread
+across 32 packets,
effectively hiding the relatively slow MMIO cost of writing to the PCIe* device.
However, this is not very desirable when tuning for low latency because
-the first packet that was received must also wait for another 15 packets to be received.
-It cannot be transmitted until the other 15 packets have also been processed because
+the first packet that was received must also wait for another 31 packets to be received.
+It cannot be transmitted until the other 31 packets have also been processed because
the NIC will not know to transmit the packets until the TX tail pointer has been updated,
-which is not done until all 16 packets have been processed for transmission.
+which is not done until all 32 packets have been processed for transmission.
To consistently achieve low latency, even under heavy system load,
the application developer should avoid processing packets in bunches.
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-07-12 13:41:38.187967066 +0100
+++ 0027-doc-fix-default-burst-size-in-testpmd.patch 2021-07-12 13:41:36.286118361 +0100
@@ -1 +1 @@
-From 478614ee1f62e172c4d4770f157fc9bbb6563523 Mon Sep 17 00:00:00 2001
+From ac656bd081befc325bd9cbe2bc5565e15e9829b4 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 478614ee1f62e172c4d4770f157fc9bbb6563523 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
^ permalink raw reply [flat|nested] 208+ messages in thread
* [dpdk-stable] patch 'vfio: add stdbool include' has been queued to stable release 20.11.3
2021-07-12 13:03 [dpdk-stable] patch 'graph: fix memory leak in stats' has been queued to stable release 20.11.3 luca.boccassi
` (25 preceding siblings ...)
2021-07-12 13:04 ` [dpdk-stable] patch 'doc: fix default burst size in testpmd' " luca.boccassi
@ 2021-07-12 13:04 ` luca.boccassi
2021-07-12 13:04 ` [dpdk-stable] patch 'devtools: fix file listing in maintainers check' " luca.boccassi
` (88 subsequent siblings)
115 siblings, 0 replies; 208+ messages in thread
From: luca.boccassi @ 2021-07-12 13:04 UTC (permalink / raw)
To: Christian Ehrhardt; +Cc: Anatoly Burakov, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.3
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/14/21. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/e2f67db0c32ec74ae94e80347ed519b75aa70c64
Thanks.
Luca Boccassi
---
From e2f67db0c32ec74ae94e80347ed519b75aa70c64 Mon Sep 17 00:00:00 2001
From: Christian Ehrhardt <christian.ehrhardt@canonical.com>
Date: Tue, 1 Jun 2021 10:28:25 +0200
Subject: [PATCH] vfio: add stdbool include
[ upstream commit 31c5af644b1a209cb720dc62f70a51d84a4f979b ]
This became visible by backporting the following for the 19.11 stable tree:
c13ca4e8 "vfio: fix DMA mapping granularity for IOVA as VA"
The usage of type bool in the vfio code would require "#include
<stdbool.h>", but rte_vfio.h has no direct paths to stdbool.h.
It happens that in eal_vfio_mp_sync.c it comes after "#include
<rte_log.h>".
And rte_log.h since 20.05 includes stdbool since this change:
241e67bfe "log: add API to check if a logtype can log in a given level"
and thereby mitigates the issue.
It should be safe to include stdbool.h from rte_vfio.h itself
to be present exactly when needed for the struct it defines using that
type.
Fixes: c13ca4e81cac ("vfio: fix DMA mapping granularity for IOVA as VA")
Signed-off-by: Christian Ehrhardt <christian.ehrhardt@canonical.com>
Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
---
lib/librte_eal/include/rte_vfio.h | 1 +
1 file changed, 1 insertion(+)
diff --git a/lib/librte_eal/include/rte_vfio.h b/lib/librte_eal/include/rte_vfio.h
index e7a87454be..2d90b36480 100644
--- a/lib/librte_eal/include/rte_vfio.h
+++ b/lib/librte_eal/include/rte_vfio.h
@@ -14,6 +14,7 @@
extern "C" {
#endif
+#include <stdbool.h>
#include <stdint.h>
/*
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-07-12 13:41:38.227612080 +0100
+++ 0028-vfio-add-stdbool-include.patch 2021-07-12 13:41:36.286118361 +0100
@@ -1 +1 @@
-From 31c5af644b1a209cb720dc62f70a51d84a4f979b Mon Sep 17 00:00:00 2001
+From e2f67db0c32ec74ae94e80347ed519b75aa70c64 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 31c5af644b1a209cb720dc62f70a51d84a4f979b ]
+
@@ -23 +24,0 @@
-Cc: stable@dpdk.org
@@ -28 +29 @@
- lib/eal/include/rte_vfio.h | 1 +
+ lib/librte_eal/include/rte_vfio.h | 1 +
@@ -31 +32 @@
-diff --git a/lib/eal/include/rte_vfio.h b/lib/eal/include/rte_vfio.h
+diff --git a/lib/librte_eal/include/rte_vfio.h b/lib/librte_eal/include/rte_vfio.h
@@ -33,2 +34,2 @@
---- a/lib/eal/include/rte_vfio.h
-+++ b/lib/eal/include/rte_vfio.h
+--- a/lib/librte_eal/include/rte_vfio.h
++++ b/lib/librte_eal/include/rte_vfio.h
^ permalink raw reply [flat|nested] 208+ messages in thread
* [dpdk-stable] patch 'devtools: fix file listing in maintainers check' has been queued to stable release 20.11.3
2021-07-12 13:03 [dpdk-stable] patch 'graph: fix memory leak in stats' has been queued to stable release 20.11.3 luca.boccassi
` (26 preceding siblings ...)
2021-07-12 13:04 ` [dpdk-stable] patch 'vfio: add stdbool include' " luca.boccassi
@ 2021-07-12 13:04 ` luca.boccassi
2021-07-12 13:04 ` [dpdk-stable] patch 'vhost/crypto: check request pointer before dereference' " luca.boccassi
` (87 subsequent siblings)
115 siblings, 0 replies; 208+ messages in thread
From: luca.boccassi @ 2021-07-12 13:04 UTC (permalink / raw)
To: Thomas Monjalon; +Cc: dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.3
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/14/21. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/d07ee666e60795b12a235089e053f622e860b745
Thanks.
Luca Boccassi
---
From d07ee666e60795b12a235089e053f622e860b745 Mon Sep 17 00:00:00 2001
From: Thomas Monjalon <thomas@monjalon.net>
Date: Tue, 15 Jun 2021 14:49:49 +0200
Subject: [PATCH] devtools: fix file listing in maintainers check
[ upstream commit 2d333c4ac3bf4a1d236bf24bb33fa1df58e6009b ]
When having multiple working trees, the main one has a .git directory
while attached trees have a .git file.
Thus the git check should work for both file and directory.
In the case there is no working tree (.git not readable), the command
"find" is used and should be able to list paths with wildcards.
Wildcards work only as shell expansion in the case of file paths,
so the quotes must be removed.
Fixes: 27c2ce563216 ("maintainers: start a Linux-style file")
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
---
devtools/check-maintainers.sh | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/devtools/check-maintainers.sh b/devtools/check-maintainers.sh
index df3f740b6e..71697bb352 100755
--- a/devtools/check-maintainers.sh
+++ b/devtools/check-maintainers.sh
@@ -15,10 +15,10 @@ files () # <path> [<path> ...]
if [ -z "$1" ] ; then
return
fi
- if [ -d .git ] ; then
+ if [ -r .git ] ; then
git ls-files "$1"
else
- find "$1" -type f |
+ find $1 -type f |
sed 's,^\./,,'
fi |
# if not ended by /
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-07-12 13:41:38.269726401 +0100
+++ 0029-devtools-fix-file-listing-in-maintainers-check.patch 2021-07-12 13:41:36.290118444 +0100
@@ -1 +1 @@
-From 2d333c4ac3bf4a1d236bf24bb33fa1df58e6009b Mon Sep 17 00:00:00 2001
+From d07ee666e60795b12a235089e053f622e860b745 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 2d333c4ac3bf4a1d236bf24bb33fa1df58e6009b ]
+
@@ -16 +17,0 @@
-Cc: stable@dpdk.org
^ permalink raw reply [flat|nested] 208+ messages in thread
* [dpdk-stable] patch 'vhost/crypto: check request pointer before dereference' has been queued to stable release 20.11.3
2021-07-12 13:03 [dpdk-stable] patch 'graph: fix memory leak in stats' has been queued to stable release 20.11.3 luca.boccassi
` (27 preceding siblings ...)
2021-07-12 13:04 ` [dpdk-stable] patch 'devtools: fix file listing in maintainers check' " luca.boccassi
@ 2021-07-12 13:04 ` luca.boccassi
2021-07-12 13:04 ` [dpdk-stable] patch 'kni: fix mbuf allocation for kernel side use' " luca.boccassi
` (86 subsequent siblings)
115 siblings, 0 replies; 208+ messages in thread
From: luca.boccassi @ 2021-07-12 13:04 UTC (permalink / raw)
To: Thierry Herbelot; +Cc: Maxime Coquelin, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.3
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/14/21. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/619944d20bfcded9f10779c9ee2e2008cc3da525
Thanks.
Luca Boccassi
---
From 619944d20bfcded9f10779c9ee2e2008cc3da525 Mon Sep 17 00:00:00 2001
From: Thierry Herbelot <thierry.herbelot@6wind.com>
Date: Mon, 24 May 2021 11:08:21 +0200
Subject: [PATCH] vhost/crypto: check request pointer before dereference
[ upstream commit 9cfbe67691f02e3f66f6a6804a5ce266830e1f3f ]
Use vc_req only after it was checked not to be NULL.
Fixes: 2d962bb736521 ("vhost/crypto: fix possible TOCTOU attack")
Signed-off-by: Thierry Herbelot <thierry.herbelot@6wind.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
---
lib/librte_vhost/vhost_crypto.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/lib/librte_vhost/vhost_crypto.c b/lib/librte_vhost/vhost_crypto.c
index 6689c52df2..926b5c0bd9 100644
--- a/lib/librte_vhost/vhost_crypto.c
+++ b/lib/librte_vhost/vhost_crypto.c
@@ -1337,13 +1337,15 @@ vhost_crypto_finalize_one_request(struct rte_crypto_op *op,
struct rte_mbuf *m_src = op->sym->m_src;
struct rte_mbuf *m_dst = op->sym->m_dst;
struct vhost_crypto_data_req *vc_req = rte_mbuf_to_priv(m_src);
- struct vhost_virtqueue *vq = vc_req->vq;
- uint16_t used_idx = vc_req->desc_idx, desc_idx;
+ struct vhost_virtqueue *vq;
+ uint16_t used_idx, desc_idx;
if (unlikely(!vc_req)) {
VC_LOG_ERR("Failed to retrieve vc_req");
return NULL;
}
+ vq = vc_req->vq;
+ used_idx = vc_req->desc_idx;
if (old_vq && (vq != old_vq))
return vq;
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-07-12 13:41:38.309412367 +0100
+++ 0030-vhost-crypto-check-request-pointer-before-dereferenc.patch 2021-07-12 13:41:36.290118444 +0100
@@ -1 +1 @@
-From 9cfbe67691f02e3f66f6a6804a5ce266830e1f3f Mon Sep 17 00:00:00 2001
+From 619944d20bfcded9f10779c9ee2e2008cc3da525 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 9cfbe67691f02e3f66f6a6804a5ce266830e1f3f ]
+
@@ -9 +10,0 @@
-Cc: stable@dpdk.org
@@ -14 +15 @@
- lib/vhost/vhost_crypto.c | 6 ++++--
+ lib/librte_vhost/vhost_crypto.c | 6 ++++--
@@ -17 +18 @@
-diff --git a/lib/vhost/vhost_crypto.c b/lib/vhost/vhost_crypto.c
+diff --git a/lib/librte_vhost/vhost_crypto.c b/lib/librte_vhost/vhost_crypto.c
@@ -19,2 +20,2 @@
---- a/lib/vhost/vhost_crypto.c
-+++ b/lib/vhost/vhost_crypto.c
+--- a/lib/librte_vhost/vhost_crypto.c
++++ b/lib/librte_vhost/vhost_crypto.c
^ permalink raw reply [flat|nested] 208+ messages in thread
* [dpdk-stable] patch 'kni: fix mbuf allocation for kernel side use' has been queued to stable release 20.11.3
2021-07-12 13:03 [dpdk-stable] patch 'graph: fix memory leak in stats' has been queued to stable release 20.11.3 luca.boccassi
` (28 preceding siblings ...)
2021-07-12 13:04 ` [dpdk-stable] patch 'vhost/crypto: check request pointer before dereference' " luca.boccassi
@ 2021-07-12 13:04 ` luca.boccassi
2021-07-12 13:04 ` [dpdk-stable] patch 'kni: fix crash on userspace VA for segmented packets' " luca.boccassi
` (85 subsequent siblings)
115 siblings, 0 replies; 208+ messages in thread
From: luca.boccassi @ 2021-07-12 13:04 UTC (permalink / raw)
To: Yunjian Wang; +Cc: Cheng Liu, Ferruh Yigit, Ajit Khaparde, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.3
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/14/21. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/172846607c0f9c19fc730e436788cbf94dedb1cb
Thanks.
Luca Boccassi
---
From 172846607c0f9c19fc730e436788cbf94dedb1cb Mon Sep 17 00:00:00 2001
From: Yunjian Wang <wangyunjian@huawei.com>
Date: Tue, 22 Jun 2021 20:44:29 +0800
Subject: [PATCH] kni: fix mbuf allocation for kernel side use
[ upstream commit 0db3d5551abe94bb8a7030c1b90496b290ddb7f4 ]
In kni_allocate_mbufs(), we alloc mbuf for alloc_q as this code.
allocq_free = (kni->alloc_q->read - kni->alloc_q->write - 1) \
& (MAX_MBUF_BURST_NUM - 1);
The value of allocq_free maybe zero, for example :
The ring size is 1024. After init, write = read = 0. Then we fill
kni->alloc_q to full. At this time, write = 1023, read = 0.
Then the kernel send 32 packets to userspace. At this time, write
= 1023, read = 32. And then the userspace receive this 32 packets.
Then fill the kni->alloc_q, (32 - 1023 - 1) & 31 = 0, fill nothing.
...
Then the kernel send 32 packets to userspace. At this time, write
= 1023, read = 992. And then the userspace receive this 32 packets.
Then fill the kni->alloc_q, (992 - 1023 - 1) & 31 = 0, fill nothing.
Then the kernel send 32 packets to userspace. The kni->alloc_q only
has 31 mbufs and will drop one packet.
Absolutely, this is a special scene. Normally, it will fill some
mbufs everytime, but may not enough for the kernel to use.
In this patch, we always keep the kni->alloc_q to full for the kernel
to use.
Fixes: 49da4e82cf94 ("kni: allocate no more mbuf than empty slots in queue")
Signed-off-by: Cheng Liu <liucheng11@huawei.com>
Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
lib/librte_kni/rte_kni.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/lib/librte_kni/rte_kni.c b/lib/librte_kni/rte_kni.c
index 9dae6a8d7c..eb24b0d0ae 100644
--- a/lib/librte_kni/rte_kni.c
+++ b/lib/librte_kni/rte_kni.c
@@ -677,8 +677,9 @@ kni_allocate_mbufs(struct rte_kni *kni)
return;
}
- allocq_free = (kni->alloc_q->read - kni->alloc_q->write - 1)
- & (MAX_MBUF_BURST_NUM - 1);
+ allocq_free = kni_fifo_free_count(kni->alloc_q);
+ allocq_free = (allocq_free > MAX_MBUF_BURST_NUM) ?
+ MAX_MBUF_BURST_NUM : allocq_free;
for (i = 0; i < allocq_free; i++) {
pkts[i] = rte_pktmbuf_alloc(kni->pktmbuf_pool);
if (unlikely(pkts[i] == NULL)) {
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-07-12 13:41:38.351906477 +0100
+++ 0031-kni-fix-mbuf-allocation-for-kernel-side-use.patch 2021-07-12 13:41:36.294118528 +0100
@@ -1 +1 @@
-From 0db3d5551abe94bb8a7030c1b90496b290ddb7f4 Mon Sep 17 00:00:00 2001
+From 172846607c0f9c19fc730e436788cbf94dedb1cb Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 0db3d5551abe94bb8a7030c1b90496b290ddb7f4 ]
+
@@ -31 +32,0 @@
-Cc: stable@dpdk.org
@@ -38 +39 @@
- lib/kni/rte_kni.c | 5 +++--
+ lib/librte_kni/rte_kni.c | 5 +++--
@@ -41 +42 @@
-diff --git a/lib/kni/rte_kni.c b/lib/kni/rte_kni.c
+diff --git a/lib/librte_kni/rte_kni.c b/lib/librte_kni/rte_kni.c
@@ -43,2 +44,2 @@
---- a/lib/kni/rte_kni.c
-+++ b/lib/kni/rte_kni.c
+--- a/lib/librte_kni/rte_kni.c
++++ b/lib/librte_kni/rte_kni.c
^ permalink raw reply [flat|nested] 208+ messages in thread
* [dpdk-stable] patch 'kni: fix crash on userspace VA for segmented packets' has been queued to stable release 20.11.3
2021-07-12 13:03 [dpdk-stable] patch 'graph: fix memory leak in stats' has been queued to stable release 20.11.3 luca.boccassi
` (29 preceding siblings ...)
2021-07-12 13:04 ` [dpdk-stable] patch 'kni: fix mbuf allocation for kernel side use' " luca.boccassi
@ 2021-07-12 13:04 ` luca.boccassi
2021-07-12 13:04 ` [dpdk-stable] patch 'flow_classify: fix leaking rules on delete' " luca.boccassi
` (84 subsequent siblings)
115 siblings, 0 replies; 208+ messages in thread
From: luca.boccassi @ 2021-07-12 13:04 UTC (permalink / raw)
To: Ferruh Yigit; +Cc: Ajit Khaparde, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.3
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/14/21. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/75be3a8eb3f877fcdeb1a5be63b7d66c5f91c20e
Thanks.
Luca Boccassi
---
From 75be3a8eb3f877fcdeb1a5be63b7d66c5f91c20e Mon Sep 17 00:00:00 2001
From: Ferruh Yigit <ferruh.yigit@intel.com>
Date: Tue, 22 Jun 2021 13:29:56 +0100
Subject: [PATCH] kni: fix crash on userspace VA for segmented packets
[ upstream commit 9b83a7ed2ac160aca64eed4d45102aadf26bc053 ]
When IOVA=VA, address translation for segmented packets is wrong, it
assumes the address in the mbuf->next is physical address, not VA
address.
Fixing the address translation to work both PA & VA mode.
Fixes: e73831dc6c26 ("kni: support userspace VA")
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
kernel/linux/kni/kni_net.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/kernel/linux/kni/kni_net.c b/kernel/linux/kni/kni_net.c
index f259327954..611719b5ee 100644
--- a/kernel/linux/kni/kni_net.c
+++ b/kernel/linux/kni/kni_net.c
@@ -245,7 +245,7 @@ kni_fifo_trans_pa2va(struct kni_dev *kni,
break;
prev_kva = kva;
- kva = pa2kva(kva->next);
+ kva = get_kva(kni, kva->next);
/* Convert physical address to virtual address */
prev_kva->next = pa2va(prev_kva->next, kva);
}
@@ -422,7 +422,7 @@ kni_net_rx_normal(struct kni_dev *kni)
break;
prev_kva = kva;
- kva = pa2kva(kva->next);
+ kva = get_kva(kni, kva->next);
data_kva = kva2data_kva(kva);
/* Convert physical address to virtual address */
prev_kva->next = pa2va(prev_kva->next, kva);
@@ -501,7 +501,7 @@ kni_net_rx_lo_fifo(struct kni_dev *kni)
kni->va[i] = pa2va(kni->pa[i], kva);
while (kva->next) {
- next_kva = pa2kva(kva->next);
+ next_kva = get_kva(kni, kva->next);
/* Convert physical address to virtual address */
kva->next = pa2va(kva->next, next_kva);
kva = next_kva;
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-07-12 13:41:38.394922019 +0100
+++ 0032-kni-fix-crash-on-userspace-VA-for-segmented-packets.patch 2021-07-12 13:41:36.294118528 +0100
@@ -1 +1 @@
-From 9b83a7ed2ac160aca64eed4d45102aadf26bc053 Mon Sep 17 00:00:00 2001
+From 75be3a8eb3f877fcdeb1a5be63b7d66c5f91c20e Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 9b83a7ed2ac160aca64eed4d45102aadf26bc053 ]
+
@@ -13 +14,0 @@
-Cc: stable@dpdk.org
^ permalink raw reply [flat|nested] 208+ messages in thread
* [dpdk-stable] patch 'flow_classify: fix leaking rules on delete' has been queued to stable release 20.11.3
2021-07-12 13:03 [dpdk-stable] patch 'graph: fix memory leak in stats' has been queued to stable release 20.11.3 luca.boccassi
` (30 preceding siblings ...)
2021-07-12 13:04 ` [dpdk-stable] patch 'kni: fix crash on userspace VA for segmented packets' " luca.boccassi
@ 2021-07-12 13:04 ` luca.boccassi
2021-07-12 13:04 ` [dpdk-stable] patch 'rib: fix max depth IPv6 lookup' " luca.boccassi
` (83 subsequent siblings)
115 siblings, 0 replies; 208+ messages in thread
From: luca.boccassi @ 2021-07-12 13:04 UTC (permalink / raw)
To: Owen Hilyard; +Cc: Bernard Iremonger, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.3
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/14/21. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/7cd2146f272aa880f07eaf8acd8c4545f42492ab
Thanks.
Luca Boccassi
---
From 7cd2146f272aa880f07eaf8acd8c4545f42492ab Mon Sep 17 00:00:00 2001
From: Owen Hilyard <ohilyard@iol.unh.edu>
Date: Wed, 23 Jun 2021 13:07:07 -0400
Subject: [PATCH] flow_classify: fix leaking rules on delete
[ upstream commit 016441e3c770b65774d658c94a82c5bf5ed826fe ]
Rules in a classify table were not freed if the table
had a delete function.
Fixes: be41ac2a330f ("flow_classify: introduce flow classify library")
Signed-off-by: Owen Hilyard <ohilyard@iol.unh.edu>
Acked-by: Bernard Iremonger <bernard.iremonger@intel.com>
---
lib/librte_flow_classify/rte_flow_classify.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/lib/librte_flow_classify/rte_flow_classify.c b/lib/librte_flow_classify/rte_flow_classify.c
index 639b0051f5..d5bcb35e1d 100644
--- a/lib/librte_flow_classify/rte_flow_classify.c
+++ b/lib/librte_flow_classify/rte_flow_classify.c
@@ -579,12 +579,12 @@ rte_flow_classify_table_entry_delete(struct rte_flow_classifier *cls,
&rule->u.key.key_del,
&rule->key_found,
&rule->entry);
-
+ if (ret == 0)
+ free(rule);
return ret;
}
}
}
- free(rule);
return ret;
}
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-07-12 13:41:38.436777600 +0100
+++ 0033-flow_classify-fix-leaking-rules-on-delete.patch 2021-07-12 13:41:36.294118528 +0100
@@ -1 +1 @@
-From 016441e3c770b65774d658c94a82c5bf5ed826fe Mon Sep 17 00:00:00 2001
+From 7cd2146f272aa880f07eaf8acd8c4545f42492ab Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 016441e3c770b65774d658c94a82c5bf5ed826fe ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -15 +16 @@
- lib/flow_classify/rte_flow_classify.c | 4 ++--
+ lib/librte_flow_classify/rte_flow_classify.c | 4 ++--
@@ -18,4 +19,4 @@
-diff --git a/lib/flow_classify/rte_flow_classify.c b/lib/flow_classify/rte_flow_classify.c
-index f125267e8f..d3ba2ed227 100644
---- a/lib/flow_classify/rte_flow_classify.c
-+++ b/lib/flow_classify/rte_flow_classify.c
+diff --git a/lib/librte_flow_classify/rte_flow_classify.c b/lib/librte_flow_classify/rte_flow_classify.c
+index 639b0051f5..d5bcb35e1d 100644
+--- a/lib/librte_flow_classify/rte_flow_classify.c
++++ b/lib/librte_flow_classify/rte_flow_classify.c
^ permalink raw reply [flat|nested] 208+ messages in thread
* [dpdk-stable] patch 'rib: fix max depth IPv6 lookup' has been queued to stable release 20.11.3
2021-07-12 13:03 [dpdk-stable] patch 'graph: fix memory leak in stats' has been queued to stable release 20.11.3 luca.boccassi
` (31 preceding siblings ...)
2021-07-12 13:04 ` [dpdk-stable] patch 'flow_classify: fix leaking rules on delete' " luca.boccassi
@ 2021-07-12 13:04 ` luca.boccassi
2021-07-12 13:04 ` [dpdk-stable] patch 'tests/cmdline: fix memory leaks' " luca.boccassi
` (82 subsequent siblings)
115 siblings, 0 replies; 208+ messages in thread
From: luca.boccassi @ 2021-07-12 13:04 UTC (permalink / raw)
To: Owen Hilyard; +Cc: Vladimir Medvedkin, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.3
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/14/21. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/f544eab528ffab4fcccd697b770a5336993a23e2
Thanks.
Luca Boccassi
---
From f544eab528ffab4fcccd697b770a5336993a23e2 Mon Sep 17 00:00:00 2001
From: Owen Hilyard <ohilyard@iol.unh.edu>
Date: Wed, 23 Jun 2021 11:17:29 -0400
Subject: [PATCH] rib: fix max depth IPv6 lookup
[ upstream commit 03b8372a9a73a6b3dce4ce6b447ea37c398a4685 ]
ASAN found a stack buffer overflow in lib/rib/rte_rib6.c:get_dir.
The fix for the stack buffer overflow was to make sure depth
was always < 128, since when depth = 128 it caused the index
into the ip address to be 16, which read off the end of the array.
While trying to solve the buffer overflow, I noticed that a few
changes could be made to remove the for loop entirely.
Fixes: f7e861e21c46 ("rib: support IPv6")
Signed-off-by: Owen Hilyard <ohilyard@iol.unh.edu>
Acked-by: Vladimir Medvedkin <vladimir.medvedkin@intel.com>
---
lib/librte_rib/rte_rib6.c | 25 +++++++++++++++++++------
1 file changed, 19 insertions(+), 6 deletions(-)
diff --git a/lib/librte_rib/rte_rib6.c b/lib/librte_rib/rte_rib6.c
index f6c55ee454..96424e9c9f 100644
--- a/lib/librte_rib/rte_rib6.c
+++ b/lib/librte_rib/rte_rib6.c
@@ -79,20 +79,33 @@ is_covered(const uint8_t ip1[RTE_RIB6_IPV6_ADDR_SIZE],
static inline int
get_dir(const uint8_t ip[RTE_RIB6_IPV6_ADDR_SIZE], uint8_t depth)
{
- int i = 0;
- uint8_t p_depth, msk;
+ uint8_t index, msk;
- for (p_depth = depth; p_depth >= 8; p_depth -= 8)
- i++;
+ /*
+ * depth & 127 clamps depth to values that will not
+ * read off the end of ip.
+ * depth is the number of bits deep into ip to traverse, and
+ * is incremented in blocks of 8 (1 byte). This means the last
+ * 3 bits are irrelevant to what the index of ip should be.
+ */
+ index = (depth & (UINT8_MAX - 1)) / CHAR_BIT;
- msk = 1 << (7 - p_depth);
- return (ip[i] & msk) != 0;
+ /*
+ * msk is the bitmask used to extract the bit used to decide the
+ * direction of the next step of the binary search.
+ */
+ msk = 1 << (7 - (depth & 7));
+
+ return (ip[index] & msk) != 0;
}
static inline struct rte_rib6_node *
get_nxt_node(struct rte_rib6_node *node,
const uint8_t ip[RTE_RIB6_IPV6_ADDR_SIZE])
{
+ if (node->depth == RIB6_MAXDEPTH)
+ return NULL;
+
return (get_dir(ip, node->depth)) ? node->right : node->left;
}
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-07-12 13:41:38.477712027 +0100
+++ 0034-rib-fix-max-depth-IPv6-lookup.patch 2021-07-12 13:41:36.298118611 +0100
@@ -1 +1 @@
-From 03b8372a9a73a6b3dce4ce6b447ea37c398a4685 Mon Sep 17 00:00:00 2001
+From f544eab528ffab4fcccd697b770a5336993a23e2 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 03b8372a9a73a6b3dce4ce6b447ea37c398a4685 ]
+
@@ -15 +16,0 @@
-Cc: stable@dpdk.org
@@ -20 +21 @@
- lib/rib/rte_rib6.c | 25 +++++++++++++++++++------
+ lib/librte_rib/rte_rib6.c | 25 +++++++++++++++++++------
@@ -23 +24 @@
-diff --git a/lib/rib/rte_rib6.c b/lib/rib/rte_rib6.c
+diff --git a/lib/librte_rib/rte_rib6.c b/lib/librte_rib/rte_rib6.c
@@ -25,2 +26,2 @@
---- a/lib/rib/rte_rib6.c
-+++ b/lib/rib/rte_rib6.c
+--- a/lib/librte_rib/rte_rib6.c
++++ b/lib/librte_rib/rte_rib6.c
^ permalink raw reply [flat|nested] 208+ messages in thread
* [dpdk-stable] patch 'tests/cmdline: fix memory leaks' has been queued to stable release 20.11.3
2021-07-12 13:03 [dpdk-stable] patch 'graph: fix memory leak in stats' has been queued to stable release 20.11.3 luca.boccassi
` (32 preceding siblings ...)
2021-07-12 13:04 ` [dpdk-stable] patch 'rib: fix max depth IPv6 lookup' " luca.boccassi
@ 2021-07-12 13:04 ` luca.boccassi
2021-07-12 13:04 ` [dpdk-stable] patch 'tests/eal: fix memory leak' " luca.boccassi
` (81 subsequent siblings)
115 siblings, 0 replies; 208+ messages in thread
From: luca.boccassi @ 2021-07-12 13:04 UTC (permalink / raw)
To: Owen Hilyard; +Cc: David Marchand, Olivier Matz, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.3
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/14/21. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/e62869e7769a670d5feef0e41d3630177ab54dd2
Thanks.
Luca Boccassi
---
From e62869e7769a670d5feef0e41d3630177ab54dd2 Mon Sep 17 00:00:00 2001
From: Owen Hilyard <ohilyard@iol.unh.edu>
Date: Wed, 23 Jun 2021 14:06:45 -0400
Subject: [PATCH] tests/cmdline: fix memory leaks
[ upstream commit ca7204b921c2f328ab1222772af40922970e7c4b ]
Fixes for a few memory leaks in the cmdline_autotest unit test.
All of the leaks were related to not freeing the commandline struct
after testing had completed.
Fixes: dbb860e03eb1 ("cmdline: tests")
Signed-off-by: Owen Hilyard <ohilyard@iol.unh.edu>
Reviewed-by: David Marchand <david.marchand@redhat.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
---
app/test/test_cmdline_lib.c | 39 +++++++++++++++++++++++++------------
1 file changed, 27 insertions(+), 12 deletions(-)
diff --git a/app/test/test_cmdline_lib.c b/app/test/test_cmdline_lib.c
index bd72df0da2..d5a09b4541 100644
--- a/app/test/test_cmdline_lib.c
+++ b/app/test/test_cmdline_lib.c
@@ -71,10 +71,12 @@ test_cmdline_parse_fns(void)
if (cmdline_complete(cl, "buffer", &i, NULL, sizeof(dst)) >= 0)
goto error;
+ cmdline_free(cl);
return 0;
error:
printf("Error: function accepted null parameter!\n");
+ cmdline_free(cl);
return -1;
}
@@ -140,22 +142,31 @@ static int
test_cmdline_socket_fns(void)
{
cmdline_parse_ctx_t ctx;
+ struct cmdline *cl;
- if (cmdline_stdin_new(NULL, "prompt") != NULL)
+ cl = cmdline_stdin_new(NULL, "prompt");
+ if (cl != NULL)
goto error;
- if (cmdline_stdin_new(&ctx, NULL) != NULL)
+ cl = cmdline_stdin_new(&ctx, NULL);
+ if (cl != NULL)
goto error;
- if (cmdline_file_new(NULL, "prompt", "/dev/null") != NULL)
+ cl = cmdline_file_new(NULL, "prompt", "/dev/null");
+ if (cl != NULL)
goto error;
- if (cmdline_file_new(&ctx, NULL, "/dev/null") != NULL)
+ cl = cmdline_file_new(&ctx, NULL, "/dev/null");
+ if (cl != NULL)
goto error;
- if (cmdline_file_new(&ctx, "prompt", NULL) != NULL)
+ cl = cmdline_file_new(&ctx, "prompt", NULL);
+ if (cl != NULL)
goto error;
- if (cmdline_file_new(&ctx, "prompt", "-/invalid/~/path") != NULL) {
+ cl = cmdline_file_new(&ctx, "prompt", "-/invalid/~/path");
+ if (cl != NULL) {
printf("Error: succeeded in opening invalid file for reading!");
+ cmdline_free(cl);
return -1;
}
- if (cmdline_file_new(&ctx, "prompt", "/dev/null") == NULL) {
+ cl = cmdline_file_new(&ctx, "prompt", "/dev/null");
+ if (cl == NULL) {
printf("Error: failed to open /dev/null for reading!");
return -1;
}
@@ -163,9 +174,11 @@ test_cmdline_socket_fns(void)
/* void functions */
cmdline_stdin_exit(NULL);
+ cmdline_free(cl);
return 0;
error:
printf("Error: function accepted null parameter!\n");
+ cmdline_free(cl);
return -1;
}
@@ -176,14 +189,15 @@ test_cmdline_fns(void)
struct cmdline *cl;
memset(&ctx, 0, sizeof(ctx));
+ cl = cmdline_new(NULL, "prompt", 0, 0);
+ if (cl != NULL)
+ goto error;
+ cl = cmdline_new(&ctx, NULL, 0, 0);
+ if (cl != NULL)
+ goto error;
cl = cmdline_new(&ctx, "test", -1, -1);
if (cl == NULL)
goto error;
-
- if (cmdline_new(NULL, "prompt", 0, 0) != NULL)
- goto error;
- if (cmdline_new(&ctx, NULL, 0, 0) != NULL)
- goto error;
if (cmdline_in(NULL, "buffer", CMDLINE_TEST_BUFSIZE) >= 0)
goto error;
if (cmdline_in(cl, NULL, CMDLINE_TEST_BUFSIZE) >= 0)
@@ -198,6 +212,7 @@ test_cmdline_fns(void)
cmdline_interact(NULL);
cmdline_quit(NULL);
+ cmdline_free(cl);
return 0;
error:
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-07-12 13:41:38.519547996 +0100
+++ 0035-tests-cmdline-fix-memory-leaks.patch 2021-07-12 13:41:36.298118611 +0100
@@ -1 +1 @@
-From ca7204b921c2f328ab1222772af40922970e7c4b Mon Sep 17 00:00:00 2001
+From e62869e7769a670d5feef0e41d3630177ab54dd2 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit ca7204b921c2f328ab1222772af40922970e7c4b ]
+
@@ -12 +13,0 @@
-Cc: stable@dpdk.org
^ permalink raw reply [flat|nested] 208+ messages in thread
* [dpdk-stable] patch 'tests/eal: fix memory leak' has been queued to stable release 20.11.3
2021-07-12 13:03 [dpdk-stable] patch 'graph: fix memory leak in stats' has been queued to stable release 20.11.3 luca.boccassi
` (33 preceding siblings ...)
2021-07-12 13:04 ` [dpdk-stable] patch 'tests/cmdline: fix memory leaks' " luca.boccassi
@ 2021-07-12 13:04 ` luca.boccassi
2021-07-12 13:04 ` [dpdk-stable] patch 'net/mlx5: fix RSS pattern expansion' " luca.boccassi
` (80 subsequent siblings)
115 siblings, 0 replies; 208+ messages in thread
From: luca.boccassi @ 2021-07-12 13:04 UTC (permalink / raw)
To: Owen Hilyard; +Cc: David Marchand, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.3
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/14/21. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/451ead3bfd8358667c6d8c19e6c003c7027a80eb
Thanks.
Luca Boccassi
---
From 451ead3bfd8358667c6d8c19e6c003c7027a80eb Mon Sep 17 00:00:00 2001
From: Owen Hilyard <ohilyard@iol.unh.edu>
Date: Wed, 16 Jun 2021 12:24:52 -0400
Subject: [PATCH] tests/eal: fix memory leak
[ upstream commit 80731e4b5b44036d05ae9b36432b6f2fd9f49d3b ]
The directory steam was not closed when the hugepage action was
HUGEPAGE_CHECK_EXISTS. This caused a memory leak in some parts of
the unit tests.
Fixes: 45f1b6e8680a ("app: add new tests on eal flags")
Signed-off-by: Owen Hilyard <ohilyard@iol.unh.edu>
Reviewed-by: David Marchand <david.marchand@redhat.com>
---
app/test/test_eal_flags.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/app/test/test_eal_flags.c b/app/test/test_eal_flags.c
index 932fbe3d08..b4880ee802 100644
--- a/app/test/test_eal_flags.c
+++ b/app/test/test_eal_flags.c
@@ -124,6 +124,7 @@ process_hugefiles(const char * prefix, enum hugepage_action action)
case HUGEPAGE_CHECK_EXISTS:
{
/* file exists, return */
+ closedir(hugepage_dir);
result = 1;
goto end;
}
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-07-12 13:41:38.559588607 +0100
+++ 0036-tests-eal-fix-memory-leak.patch 2021-07-12 13:41:36.298118611 +0100
@@ -1 +1 @@
-From 80731e4b5b44036d05ae9b36432b6f2fd9f49d3b Mon Sep 17 00:00:00 2001
+From 451ead3bfd8358667c6d8c19e6c003c7027a80eb Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 80731e4b5b44036d05ae9b36432b6f2fd9f49d3b ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
^ permalink raw reply [flat|nested] 208+ messages in thread
* [dpdk-stable] patch 'net/mlx5: fix RSS pattern expansion' has been queued to stable release 20.11.3
2021-07-12 13:03 [dpdk-stable] patch 'graph: fix memory leak in stats' has been queued to stable release 20.11.3 luca.boccassi
` (34 preceding siblings ...)
2021-07-12 13:04 ` [dpdk-stable] patch 'tests/eal: fix memory leak' " luca.boccassi
@ 2021-07-12 13:04 ` luca.boccassi
2021-07-12 13:04 ` [dpdk-stable] patch 'net/mlx5: fix switchdev mode recognition' " luca.boccassi
` (79 subsequent siblings)
115 siblings, 0 replies; 208+ messages in thread
From: luca.boccassi @ 2021-07-12 13:04 UTC (permalink / raw)
To: Gregory Etelson; +Cc: Viacheslav Ovsiienko, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.3
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/14/21. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/b63f84156e889bcc9b8cd48f59b5920849af903f
Thanks.
Luca Boccassi
---
From b63f84156e889bcc9b8cd48f59b5920849af903f Mon Sep 17 00:00:00 2001
From: Gregory Etelson <getelson@nvidia.com>
Date: Thu, 27 May 2021 18:20:24 +0300
Subject: [PATCH] net/mlx5: fix RSS pattern expansion
[ upstream commit d91093b9a2af5378734b301bd2fc75d44e18d269 ]
Flow rule pattern may be implicitly expanded by the PMD if the rule
has RSS flow action. The expansion adds network headers to the
original pattern. The new pattern lists all network levels that
participate in the rule RSS action.
The patch fixes expanded pattern for cases when original pattern
included meta items like MARK, TAG, META.
Fixes: c7870bfe09dc ("ethdev: move RSS expansion code to mlx5 driver")
Signed-off-by: Gregory Etelson <getelson@nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
---
drivers/net/mlx5/mlx5_flow.c | 53 ++++++++++++++++++++++++++++++++++--
1 file changed, 51 insertions(+), 2 deletions(-)
diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c
index ee0716ffd1..c5fc1ee6b4 100644
--- a/drivers/net/mlx5/mlx5_flow.c
+++ b/drivers/net/mlx5/mlx5_flow.c
@@ -114,6 +114,30 @@ struct mlx5_flow_expand_rss {
} entry[];
};
+static void
+mlx5_dbg__print_pattern(const struct rte_flow_item *item);
+
+static bool
+mlx5_flow_is_rss_expandable_item(const struct rte_flow_item *item)
+{
+ switch (item->type) {
+ case RTE_FLOW_ITEM_TYPE_ETH:
+ case RTE_FLOW_ITEM_TYPE_VLAN:
+ case RTE_FLOW_ITEM_TYPE_IPV4:
+ case RTE_FLOW_ITEM_TYPE_IPV6:
+ case RTE_FLOW_ITEM_TYPE_UDP:
+ case RTE_FLOW_ITEM_TYPE_TCP:
+ case RTE_FLOW_ITEM_TYPE_VXLAN:
+ case RTE_FLOW_ITEM_TYPE_NVGRE:
+ case RTE_FLOW_ITEM_TYPE_GRE:
+ case RTE_FLOW_ITEM_TYPE_GENEVE:
+ return true;
+ default:
+ break;
+ }
+ return false;
+}
+
static enum rte_flow_item_type
mlx5_flow_expand_rss_item_complete(const struct rte_flow_item *item)
{
@@ -273,8 +297,11 @@ mlx5_flow_expand_rss(struct mlx5_flow_expand_rss *buf, size_t size,
addr = buf->entry[0].pattern;
}
for (item = pattern; item->type != RTE_FLOW_ITEM_TYPE_END; item++) {
- if (item->type != RTE_FLOW_ITEM_TYPE_VOID)
- last_item = item;
+ if (!mlx5_flow_is_rss_expandable_item(item)) {
+ user_pattern_size += sizeof(*item);
+ continue;
+ }
+ last_item = item;
for (i = 0; node->next && node->next[i]; ++i) {
next = &graph[node->next[i]];
if (next->type == item->type)
@@ -5370,6 +5397,10 @@ flow_list_create(struct rte_eth_dev *dev, uint32_t *list,
mlx5_support_expansion, graph_root);
MLX5_ASSERT(ret > 0 &&
(unsigned int)ret < sizeof(expand_buffer.buffer));
+ if (rte_log_can_log(mlx5_logtype, RTE_LOG_DEBUG)) {
+ for (i = 0; i < buf->entries; ++i)
+ mlx5_dbg__print_pattern(buf->entry[i].pattern);
+ }
} else {
buf->entries = 1;
buf->entry[0].pattern = (void *)(uintptr_t)items;
@@ -7987,3 +8018,21 @@ mlx5_release_tunnel_hub(__rte_unused struct mlx5_dev_ctx_shared *sh,
}
#endif /* HAVE_IBV_FLOW_DV_SUPPORT */
+static void
+mlx5_dbg__print_pattern(const struct rte_flow_item *item)
+{
+ int ret;
+ struct rte_flow_error error;
+
+ for (; item->type != RTE_FLOW_ITEM_TYPE_END; item++) {
+ char *item_name;
+ ret = rte_flow_conv(RTE_FLOW_CONV_OP_ITEM_NAME_PTR, &item_name,
+ sizeof(item_name),
+ (void *)(uintptr_t)item->type, &error);
+ if (ret > 0)
+ printf("%s ", item_name);
+ else
+ printf("%d\n", (int)item->type);
+ }
+ printf("END\n");
+}
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-07-12 13:41:38.599939160 +0100
+++ 0037-net-mlx5-fix-RSS-pattern-expansion.patch 2021-07-12 13:41:36.310118861 +0100
@@ -1 +1 @@
-From d91093b9a2af5378734b301bd2fc75d44e18d269 Mon Sep 17 00:00:00 2001
+From b63f84156e889bcc9b8cd48f59b5920849af903f Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit d91093b9a2af5378734b301bd2fc75d44e18d269 ]
+
@@ -15 +16,0 @@
-Cc: stable@dpdk.org
@@ -20,2 +21,2 @@
- drivers/net/mlx5/mlx5_flow.c | 54 ++++++++++++++++++++++++++++++++++--
- 1 file changed, 52 insertions(+), 2 deletions(-)
+ drivers/net/mlx5/mlx5_flow.c | 53 ++++++++++++++++++++++++++++++++++--
+ 1 file changed, 51 insertions(+), 2 deletions(-)
@@ -24 +25 @@
-index dbeca571b6..e5e062d09a 100644
+index ee0716ffd1..c5fc1ee6b4 100644
@@ -72 +73 @@
-@@ -6174,6 +6201,10 @@ flow_list_create(struct rte_eth_dev *dev, uint32_t *list,
+@@ -5370,6 +5397,10 @@ flow_list_create(struct rte_eth_dev *dev, uint32_t *list,
@@ -83,2 +84 @@
-@@ -8990,3 +9021,22 @@ mlx5_release_tunnel_hub(__rte_unused struct mlx5_dev_ctx_shared *sh,
- {
+@@ -7987,3 +8018,21 @@ mlx5_release_tunnel_hub(__rte_unused struct mlx5_dev_ctx_shared *sh,
@@ -87 +87 @@
-+
+
^ permalink raw reply [flat|nested] 208+ messages in thread
* [dpdk-stable] patch 'net/mlx5: fix switchdev mode recognition' has been queued to stable release 20.11.3
2021-07-12 13:03 [dpdk-stable] patch 'graph: fix memory leak in stats' has been queued to stable release 20.11.3 luca.boccassi
` (35 preceding siblings ...)
2021-07-12 13:04 ` [dpdk-stable] patch 'net/mlx5: fix RSS pattern expansion' " luca.boccassi
@ 2021-07-12 13:04 ` luca.boccassi
2021-07-12 13:04 ` [dpdk-stable] patch 'net/mlx5: fix IPIP multi-tunnel validation' " luca.boccassi
` (78 subsequent siblings)
115 siblings, 0 replies; 208+ messages in thread
From: luca.boccassi @ 2021-07-12 13:04 UTC (permalink / raw)
To: Viacheslav Ovsiienko; +Cc: Matan Azrad, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.3
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/14/21. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/2bff62754f101af9e7d60a8dc9ab5b2603c3daaa
Thanks.
Luca Boccassi
---
From 2bff62754f101af9e7d60a8dc9ab5b2603c3daaa Mon Sep 17 00:00:00 2001
From: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
Date: Fri, 11 Jun 2021 18:37:19 +0300
Subject: [PATCH] net/mlx5: fix switchdev mode recognition
[ upstream commit 6b157f3bfa64b734a069772bdbb4a3d3a8d26b83 ]
The new kernels might add the switch_id attribute to the
Netlink replies and this caused the wrong recognition
of the E-Switch presence. The single uplink device was
erroneously recognized as master and it caused the
extending match for source vport index on all installed
flows, including the default ones, and adding extra hops
in the steering engine, that affected the maximal
throughput packet rate.
The extra check for the new device name format (it supposes
the new kernel) and the device is only one is added. If this
check succeeds the E-Switch presence is considered as wrongly
detected and overridden.
Fixes: 30a86157f6d5 ("net/mlx5: support PF representor")
Signed-off-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
---
drivers/net/mlx5/linux/mlx5_os.c | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/drivers/net/mlx5/linux/mlx5_os.c b/drivers/net/mlx5/linux/mlx5_os.c
index 800df92997..71837e34fe 100644
--- a/drivers/net/mlx5/linux/mlx5_os.c
+++ b/drivers/net/mlx5/linux/mlx5_os.c
@@ -2114,6 +2114,18 @@ mlx5_os_pci_probe(struct rte_pci_driver *pci_drv __rte_unused,
ret = -rte_errno;
goto exit;
}
+ /*
+ * New kernels may add the switch_id attribute for the case
+ * there is no E-Switch and we wrongly recognized the
+ * only device as master. Override this if there is the
+ * single device with single port and new device name
+ * format present.
+ */
+ if (nd == 1 &&
+ list[0].info.name_type == MLX5_PHYS_PORT_NAME_TYPE_UPLINK) {
+ list[0].info.master = 0;
+ list[0].info.representor = 0;
+ }
}
MLX5_ASSERT(ns);
/*
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-07-12 13:41:38.655304661 +0100
+++ 0038-net-mlx5-fix-switchdev-mode-recognition.patch 2021-07-12 13:41:36.314118944 +0100
@@ -1 +1 @@
-From 6b157f3bfa64b734a069772bdbb4a3d3a8d26b83 Mon Sep 17 00:00:00 2001
+From 2bff62754f101af9e7d60a8dc9ab5b2603c3daaa Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 6b157f3bfa64b734a069772bdbb4a3d3a8d26b83 ]
+
@@ -21 +22,0 @@
-Cc: stable@dpdk.org
@@ -30 +31 @@
-index 534a56a555..302a881310 100644
+index 800df92997..71837e34fe 100644
@@ -33 +34 @@
-@@ -2298,6 +2298,18 @@ mlx5_os_pci_probe_pf(struct rte_pci_device *pci_dev,
+@@ -2114,6 +2114,18 @@ mlx5_os_pci_probe(struct rte_pci_driver *pci_drv __rte_unused,
^ permalink raw reply [flat|nested] 208+ messages in thread
* [dpdk-stable] patch 'net/mlx5: fix IPIP multi-tunnel validation' has been queued to stable release 20.11.3
2021-07-12 13:03 [dpdk-stable] patch 'graph: fix memory leak in stats' has been queued to stable release 20.11.3 luca.boccassi
` (36 preceding siblings ...)
2021-07-12 13:04 ` [dpdk-stable] patch 'net/mlx5: fix switchdev mode recognition' " luca.boccassi
@ 2021-07-12 13:04 ` luca.boccassi
2021-07-12 13:04 ` [dpdk-stable] patch 'common/mlx5: fix Netlink port name padding in probing' " luca.boccassi
` (77 subsequent siblings)
115 siblings, 0 replies; 208+ messages in thread
From: luca.boccassi @ 2021-07-12 13:04 UTC (permalink / raw)
To: Lior Margalit; +Cc: Ori Kam, Matan Azrad, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.3
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/14/21. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/48c9b36155a1de1d85b7980cebeb3323dd241597
Thanks.
Luca Boccassi
---
From 48c9b36155a1de1d85b7980cebeb3323dd241597 Mon Sep 17 00:00:00 2001
From: Lior Margalit <lmargalit@nvidia.com>
Date: Wed, 16 Jun 2021 10:01:18 +0300
Subject: [PATCH] net/mlx5: fix IPIP multi-tunnel validation
[ upstream commit fa06906a48ee9d31a22f58a05f72c7bd4b737459 ]
A flow rule must not include multiple tunnel layers.
An attempt to create such a rule, for example:
testpmd> flow create .../ vxlan / eth / ipv4 proto is 4 / end <actions>
results in an unclear error.
In the current implementation there is a check for
multiple IPIP tunnels, but not for combination of IPIP
and a different kind of tunnel, such as VXLAN. The fix
is to enhance the above check to use MLX5_FLOW_LAYER_TUNNEL
that consists of all the tunnel masks. The error message
will be "multiple tunnel not supported".
Fixes: 5e33bebdd8d3 ("net/mlx5: support IP-in-IP tunnel")
Signed-off-by: Lior Margalit <lmargalit@nvidia.com>
Acked-by: Ori Kam <orika@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
---
drivers/net/mlx5/mlx5_flow.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c
index c5fc1ee6b4..048823a50b 100644
--- a/drivers/net/mlx5/mlx5_flow.c
+++ b/drivers/net/mlx5/mlx5_flow.c
@@ -2044,7 +2044,7 @@ mlx5_flow_validate_item_ipv4(const struct rte_flow_item *item,
RTE_FLOW_ERROR_TYPE_ITEM, item,
"IPv4 cannot follow L2/VLAN layer "
"which ether type is not IPv4");
- if (item_flags & MLX5_FLOW_LAYER_IPIP) {
+ if (item_flags & MLX5_FLOW_LAYER_TUNNEL) {
if (mask && spec)
next_proto = mask->hdr.next_proto_id &
spec->hdr.next_proto_id;
@@ -2152,7 +2152,7 @@ mlx5_flow_validate_item_ipv6(const struct rte_flow_item *item,
"which ether type is not IPv6");
if (mask && mask->hdr.proto == UINT8_MAX && spec)
next_proto = spec->hdr.proto;
- if (item_flags & MLX5_FLOW_LAYER_IPV6_ENCAP) {
+ if (item_flags & MLX5_FLOW_LAYER_TUNNEL) {
if (next_proto == IPPROTO_IPIP || next_proto == IPPROTO_IPV6)
return rte_flow_error_set(error, EINVAL,
RTE_FLOW_ERROR_TYPE_ITEM,
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-07-12 13:41:38.700628162 +0100
+++ 0039-net-mlx5-fix-IPIP-multi-tunnel-validation.patch 2021-07-12 13:41:36.326119194 +0100
@@ -1 +1 @@
-From fa06906a48ee9d31a22f58a05f72c7bd4b737459 Mon Sep 17 00:00:00 2001
+From 48c9b36155a1de1d85b7980cebeb3323dd241597 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit fa06906a48ee9d31a22f58a05f72c7bd4b737459 ]
+
@@ -19 +20,0 @@
-Cc: stable@dpdk.org
@@ -29 +30 @@
-index e5e062d09a..c5c767aaee 100644
+index c5fc1ee6b4..048823a50b 100644
@@ -32 +33 @@
-@@ -2124,7 +2124,7 @@ mlx5_flow_validate_item_ipv4(const struct rte_flow_item *item,
+@@ -2044,7 +2044,7 @@ mlx5_flow_validate_item_ipv4(const struct rte_flow_item *item,
@@ -41 +42 @@
-@@ -2232,7 +2232,7 @@ mlx5_flow_validate_item_ipv6(const struct rte_flow_item *item,
+@@ -2152,7 +2152,7 @@ mlx5_flow_validate_item_ipv6(const struct rte_flow_item *item,
^ permalink raw reply [flat|nested] 208+ messages in thread
* [dpdk-stable] patch 'common/mlx5: fix Netlink port name padding in probing' has been queued to stable release 20.11.3
2021-07-12 13:03 [dpdk-stable] patch 'graph: fix memory leak in stats' has been queued to stable release 20.11.3 luca.boccassi
` (37 preceding siblings ...)
2021-07-12 13:04 ` [dpdk-stable] patch 'net/mlx5: fix IPIP multi-tunnel validation' " luca.boccassi
@ 2021-07-12 13:04 ` luca.boccassi
2021-07-12 13:04 ` [dpdk-stable] patch 'bus/pci: fix IOVA as VA support for PowerNV' " luca.boccassi
` (76 subsequent siblings)
115 siblings, 0 replies; 208+ messages in thread
From: luca.boccassi @ 2021-07-12 13:04 UTC (permalink / raw)
To: Viacheslav Ovsiienko; +Cc: Matan Azrad, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.3
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/14/21. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/aaf50dbe5b55f16a69e79736b1631d855c827c4f
Thanks.
Luca Boccassi
---
From aaf50dbe5b55f16a69e79736b1631d855c827c4f Mon Sep 17 00:00:00 2001
From: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
Date: Sat, 19 Jun 2021 16:56:28 +0300
Subject: [PATCH] common/mlx5: fix Netlink port name padding in probing
[ upstream commit 568d97c09ca00e52fd7805ef0cab522250dac18b ]
On some kernels the string attributes within Netlink
reply messages might be not padded with zeroes (in cases
when string length is aligned with 4-byte boundary).
While device probing, the physical port name was wrongly recognized,
causing a probing failure.
Fixes: 30a86157f6d5 ("net/mlx5: support PF representor")
Signed-off-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
---
drivers/common/mlx5/linux/mlx5_nl.c | 22 +++++++++++++++++++++-
1 file changed, 21 insertions(+), 1 deletion(-)
diff --git a/drivers/common/mlx5/linux/mlx5_nl.c b/drivers/common/mlx5/linux/mlx5_nl.c
index ef7a521379..94afa04b85 100644
--- a/drivers/common/mlx5/linux/mlx5_nl.c
+++ b/drivers/common/mlx5/linux/mlx5_nl.c
@@ -33,6 +33,8 @@
#define MLX5_SEND_BUF_SIZE 32768
/* Receive buffer size for the Netlink socket */
#define MLX5_RECV_BUF_SIZE 32768
+/* Maximal physical port name length. */
+#define MLX5_PHYS_PORT_NAME_MAX 128
/** Parameters of VLAN devices created by driver. */
#define MLX5_VMWA_VLAN_DEVICE_PFX "evmlx"
@@ -1188,6 +1190,7 @@ mlx5_nl_switch_info_cb(struct nlmsghdr *nh, void *arg)
size_t off = NLMSG_LENGTH(sizeof(struct ifinfomsg));
bool switch_id_set = false;
bool num_vf_set = false;
+ int len;
if (nh->nlmsg_type != RTM_NEWLINK)
goto error;
@@ -1203,7 +1206,24 @@ mlx5_nl_switch_info_cb(struct nlmsghdr *nh, void *arg)
num_vf_set = true;
break;
case IFLA_PHYS_PORT_NAME:
- mlx5_translate_port_name((char *)payload, &info);
+ len = RTA_PAYLOAD(ra);
+ /* Some kernels do not pad attributes with zero. */
+ if (len > 0 && len < MLX5_PHYS_PORT_NAME_MAX) {
+ char name[MLX5_PHYS_PORT_NAME_MAX];
+
+ /*
+ * We can't just patch the message with padding
+ * zero - it might corrupt the following items
+ * in the message, we have to copy the string
+ * by attribute length and pad the copied one.
+ */
+ memcpy(name, payload, len);
+ name[len] = 0;
+ mlx5_translate_port_name(name, &info);
+ } else {
+ info.name_type =
+ MLX5_PHYS_PORT_NAME_TYPE_UNKNOWN;
+ }
break;
case IFLA_PHYS_SWITCH_ID:
info.switch_id = 0;
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-07-12 13:41:38.753925781 +0100
+++ 0040-common-mlx5-fix-Netlink-port-name-padding-in-probing.patch 2021-07-12 13:41:36.330119277 +0100
@@ -1 +1 @@
-From 568d97c09ca00e52fd7805ef0cab522250dac18b Mon Sep 17 00:00:00 2001
+From aaf50dbe5b55f16a69e79736b1631d855c827c4f Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 568d97c09ca00e52fd7805ef0cab522250dac18b ]
+
@@ -13 +14,0 @@
-Cc: stable@dpdk.org
@@ -22 +23 @@
-index f0d04f9473..3f1912d078 100644
+index ef7a521379..94afa04b85 100644
@@ -34 +35 @@
-@@ -1191,6 +1193,7 @@ mlx5_nl_switch_info_cb(struct nlmsghdr *nh, void *arg)
+@@ -1188,6 +1190,7 @@ mlx5_nl_switch_info_cb(struct nlmsghdr *nh, void *arg)
@@ -42 +43 @@
-@@ -1206,7 +1209,24 @@ mlx5_nl_switch_info_cb(struct nlmsghdr *nh, void *arg)
+@@ -1203,7 +1206,24 @@ mlx5_nl_switch_info_cb(struct nlmsghdr *nh, void *arg)
^ permalink raw reply [flat|nested] 208+ messages in thread
* [dpdk-stable] patch 'bus/pci: fix IOVA as VA support for PowerNV' has been queued to stable release 20.11.3
2021-07-12 13:03 [dpdk-stable] patch 'graph: fix memory leak in stats' has been queued to stable release 20.11.3 luca.boccassi
` (38 preceding siblings ...)
2021-07-12 13:04 ` [dpdk-stable] patch 'common/mlx5: fix Netlink port name padding in probing' " luca.boccassi
@ 2021-07-12 13:04 ` luca.boccassi
2021-07-12 13:04 ` [dpdk-stable] patch 'app/test: fix IPv6 header initialization' " luca.boccassi
` (75 subsequent siblings)
115 siblings, 0 replies; 208+ messages in thread
From: luca.boccassi @ 2021-07-12 13:04 UTC (permalink / raw)
To: David Christensen; +Cc: David Marchand, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.3
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/14/21. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/00dda0bd97ab56787a5fb714c25a50bcd44cd858
Thanks.
Luca Boccassi
---
From 00dda0bd97ab56787a5fb714c25a50bcd44cd858 Mon Sep 17 00:00:00 2001
From: David Christensen <drc@linux.vnet.ibm.com>
Date: Tue, 15 Jun 2021 10:20:27 -0700
Subject: [PATCH] bus/pci: fix IOVA as VA support for PowerNV
[ upstream commit cc4219d1f0f0598d4f05ac9e24bafd6532122399 ]
Fix the IOMMU detection logic that looks for the "platform" field of
/proc/cpuinfo on POWER systems.
Fixes: 905215731833 ("bus/pci: support IOVA as VA on PowerNV systems")
Signed-off-by: David Christensen <drc@linux.vnet.ibm.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>
---
drivers/bus/pci/linux/pci.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/bus/pci/linux/pci.c b/drivers/bus/pci/linux/pci.c
index 2e1808b902..c5402b9652 100644
--- a/drivers/bus/pci/linux/pci.c
+++ b/drivers/bus/pci/linux/pci.c
@@ -569,7 +569,7 @@ pci_device_iommu_support_va(__rte_unused const struct rte_pci_device *dev)
/* Check for a PowerNV platform */
while (getline(&line, &len, fp) != -1) {
- if (strstr(line, "platform") != NULL)
+ if (strstr(line, "platform") == NULL)
continue;
if (strstr(line, "PowerNV") != NULL) {
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-07-12 13:41:38.799602959 +0100
+++ 0041-bus-pci-fix-IOVA-as-VA-support-for-PowerNV.patch 2021-07-12 13:41:36.330119277 +0100
@@ -1 +1 @@
-From cc4219d1f0f0598d4f05ac9e24bafd6532122399 Mon Sep 17 00:00:00 2001
+From 00dda0bd97ab56787a5fb714c25a50bcd44cd858 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit cc4219d1f0f0598d4f05ac9e24bafd6532122399 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -19 +20 @@
-index 0dc99e9cb2..edfe430268 100644
+index 2e1808b902..c5402b9652 100644
^ permalink raw reply [flat|nested] 208+ messages in thread
* [dpdk-stable] patch 'app/test: fix IPv6 header initialization' has been queued to stable release 20.11.3
2021-07-12 13:03 [dpdk-stable] patch 'graph: fix memory leak in stats' has been queued to stable release 20.11.3 luca.boccassi
` (39 preceding siblings ...)
2021-07-12 13:04 ` [dpdk-stable] patch 'bus/pci: fix IOVA as VA support for PowerNV' " luca.boccassi
@ 2021-07-12 13:04 ` luca.boccassi
2021-07-12 13:04 ` [dpdk-stable] patch 'examples/l2fwd: fix [no-]mac-updating options' " luca.boccassi
` (74 subsequent siblings)
115 siblings, 0 replies; 208+ messages in thread
From: luca.boccassi @ 2021-07-12 13:04 UTC (permalink / raw)
To: Lance Richardson; +Cc: David Marchand, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.3
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/14/21. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/60c3dfd45f8ac5b248dd08acf73d93705908472a
Thanks.
Luca Boccassi
---
From 60c3dfd45f8ac5b248dd08acf73d93705908472a Mon Sep 17 00:00:00 2001
From: Lance Richardson <lance.richardson@broadcom.com>
Date: Fri, 26 Mar 2021 12:37:32 -0400
Subject: [PATCH] app/test: fix IPv6 header initialization
[ upstream commit a906371d2758df7260640873d93f888724759448 ]
Fix two issues found when writing PMD unit tests for HW ptype and
L4 checksum offload:
- The version field in the IPv6 header was being set to zero,
which prevented hardware from recognizing it as IPv6. The
IP version field is now set to six.
- The payload_len field was being initialized using host byte
order, which (among other things) resulted in incorrect L4
checksum computation. The payload_len field is now set using
network (big-endian) byte order.
Fixes: 92073ef961ee ("bond: unit tests")
Signed-off-by: Lance Richardson <lance.richardson@broadcom.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>
---
app/test/packet_burst_generator.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/app/test/packet_burst_generator.c b/app/test/packet_burst_generator.c
index c05ea7ad51..0fd7290b0e 100644
--- a/app/test/packet_burst_generator.c
+++ b/app/test/packet_burst_generator.c
@@ -142,8 +142,8 @@ uint16_t
initialize_ipv6_header(struct rte_ipv6_hdr *ip_hdr, uint8_t *src_addr,
uint8_t *dst_addr, uint16_t pkt_data_len)
{
- ip_hdr->vtc_flow = 0;
- ip_hdr->payload_len = pkt_data_len;
+ ip_hdr->vtc_flow = rte_cpu_to_be_32(0x60000000); /* Set version to 6. */
+ ip_hdr->payload_len = rte_cpu_to_be_16(pkt_data_len);
ip_hdr->proto = IPPROTO_UDP;
ip_hdr->hop_limits = IP_DEFTTL;
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-07-12 13:41:38.844270543 +0100
+++ 0042-app-test-fix-IPv6-header-initialization.patch 2021-07-12 13:41:36.334119361 +0100
@@ -1 +1 @@
-From a906371d2758df7260640873d93f888724759448 Mon Sep 17 00:00:00 2001
+From 60c3dfd45f8ac5b248dd08acf73d93705908472a Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit a906371d2758df7260640873d93f888724759448 ]
+
@@ -18 +19,0 @@
-Cc: stable@dpdk.org
^ permalink raw reply [flat|nested] 208+ messages in thread
* [dpdk-stable] patch 'examples/l2fwd: fix [no-]mac-updating options' has been queued to stable release 20.11.3
2021-07-12 13:03 [dpdk-stable] patch 'graph: fix memory leak in stats' has been queued to stable release 20.11.3 luca.boccassi
` (40 preceding siblings ...)
2021-07-12 13:04 ` [dpdk-stable] patch 'app/test: fix IPv6 header initialization' " luca.boccassi
@ 2021-07-12 13:04 ` luca.boccassi
2021-07-12 13:04 ` [dpdk-stable] patch 'bus/pci: fix leak for unbound devices' " luca.boccassi
` (73 subsequent siblings)
115 siblings, 0 replies; 208+ messages in thread
From: luca.boccassi @ 2021-07-12 13:04 UTC (permalink / raw)
To: Chenglian Sun; +Cc: David Marchand, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.3
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/14/21. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/a3519aa2e1d177af30d5f1ddddaa39082bec2fe3
Thanks.
Luca Boccassi
---
From a3519aa2e1d177af30d5f1ddddaa39082bec2fe3 Mon Sep 17 00:00:00 2001
From: Chenglian Sun <sunchenglian@loongson.cn>
Date: Tue, 22 Jun 2021 10:47:05 +0800
Subject: [PATCH] examples/l2fwd: fix [no-]mac-updating options
[ upstream commit bbbe38a6d59ccdda25917712701e629d0b10af6f ]
For l2fwd, --no-mac-updating and --mac-updating are treated as invalid
arguments. Rework long options parsing to let --no-mac-updating and
--mac-updating options work well.
Fixes: fa19eb20d212 ("examples/l2fwd: add forwarding port mapping option")
Signed-off-by: Chenglian Sun <sunchenglian@loongson.cn>
Reviewed-by: David Marchand <david.marchand@redhat.com>
---
examples/l2fwd/main.c | 17 ++++++++++++++---
1 file changed, 14 insertions(+), 3 deletions(-)
diff --git a/examples/l2fwd/main.c b/examples/l2fwd/main.c
index ffb67bb901..23e5e46761 100644
--- a/examples/l2fwd/main.c
+++ b/examples/l2fwd/main.c
@@ -434,13 +434,16 @@ enum {
/* first long only option value must be >= 256, so that we won't
* conflict with short options */
- CMD_LINE_OPT_MIN_NUM = 256,
+ CMD_LINE_OPT_MAC_UPDATING_NUM = 256,
+ CMD_LINE_OPT_NO_MAC_UPDATING_NUM,
CMD_LINE_OPT_PORTMAP_NUM,
};
static const struct option lgopts[] = {
- { CMD_LINE_OPT_MAC_UPDATING, no_argument, &mac_updating, 1},
- { CMD_LINE_OPT_NO_MAC_UPDATING, no_argument, &mac_updating, 0},
+ { CMD_LINE_OPT_MAC_UPDATING, no_argument, 0,
+ CMD_LINE_OPT_MAC_UPDATING_NUM},
+ { CMD_LINE_OPT_NO_MAC_UPDATING, no_argument, 0,
+ CMD_LINE_OPT_NO_MAC_UPDATING_NUM},
{ CMD_LINE_OPT_PORTMAP_CONFIG, 1, 0, CMD_LINE_OPT_PORTMAP_NUM},
{NULL, 0, 0, 0}
};
@@ -502,6 +505,14 @@ l2fwd_parse_args(int argc, char **argv)
}
break;
+ case CMD_LINE_OPT_MAC_UPDATING_NUM:
+ mac_updating = 1;
+ break;
+
+ case CMD_LINE_OPT_NO_MAC_UPDATING_NUM:
+ mac_updating = 0;
+ break;
+
default:
l2fwd_usage(prgname);
return -1;
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-07-12 13:41:38.885958775 +0100
+++ 0043-examples-l2fwd-fix-no-mac-updating-options.patch 2021-07-12 13:41:36.334119361 +0100
@@ -1 +1 @@
-From bbbe38a6d59ccdda25917712701e629d0b10af6f Mon Sep 17 00:00:00 2001
+From a3519aa2e1d177af30d5f1ddddaa39082bec2fe3 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit bbbe38a6d59ccdda25917712701e629d0b10af6f ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -20 +21 @@
-index 32d405e65a..ca4db6014b 100644
+index ffb67bb901..23e5e46761 100644
@@ -23 +24 @@
-@@ -433,13 +433,16 @@ enum {
+@@ -434,13 +434,16 @@ enum {
@@ -43 +44 @@
-@@ -501,6 +504,14 @@ l2fwd_parse_args(int argc, char **argv)
+@@ -502,6 +505,14 @@ l2fwd_parse_args(int argc, char **argv)
^ permalink raw reply [flat|nested] 208+ messages in thread
* [dpdk-stable] patch 'bus/pci: fix leak for unbound devices' has been queued to stable release 20.11.3
2021-07-12 13:03 [dpdk-stable] patch 'graph: fix memory leak in stats' has been queued to stable release 20.11.3 luca.boccassi
` (41 preceding siblings ...)
2021-07-12 13:04 ` [dpdk-stable] patch 'examples/l2fwd: fix [no-]mac-updating options' " luca.boccassi
@ 2021-07-12 13:04 ` luca.boccassi
2021-07-12 13:04 ` [dpdk-stable] patch 'test/mbuf: fix virtual address conversion' " luca.boccassi
` (72 subsequent siblings)
115 siblings, 0 replies; 208+ messages in thread
From: luca.boccassi @ 2021-07-12 13:04 UTC (permalink / raw)
To: David Marchand; +Cc: Owen Hilyard, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.3
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/14/21. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/dbf34013549a5e32691c90bdb84e80fffaf96868
Thanks.
Luca Boccassi
---
From dbf34013549a5e32691c90bdb84e80fffaf96868 Mon Sep 17 00:00:00 2001
From: David Marchand <david.marchand@redhat.com>
Date: Wed, 16 Jun 2021 08:52:57 +0200
Subject: [PATCH] bus/pci: fix leak for unbound devices
[ upstream commit 7c83a1e3c83e601f449f05e2e36e1df50e8503aa ]
For devices not bound to any Linux kernel module, we leak a pci object
since it is never added to the PCI bus device list.
Fixes: c79a1c67465d ("bus/pci: optimize bus scan")
Reported-by: Owen Hilyard <ohilyard@iol.unh.edu>
Signed-off-by: David Marchand <david.marchand@redhat.com>
---
drivers/bus/pci/linux/pci.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/bus/pci/linux/pci.c b/drivers/bus/pci/linux/pci.c
index c5402b9652..e8d1faa4c9 100644
--- a/drivers/bus/pci/linux/pci.c
+++ b/drivers/bus/pci/linux/pci.c
@@ -331,7 +331,7 @@ pci_scan_one(const char *dirname, const struct rte_pci_addr *addr)
else
dev->kdrv = RTE_PCI_KDRV_UNKNOWN;
} else {
- dev->kdrv = RTE_PCI_KDRV_NONE;
+ free(dev);
return 0;
}
/* device is valid, add in list (sorted) */
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-07-12 13:41:38.928118373 +0100
+++ 0044-bus-pci-fix-leak-for-unbound-devices.patch 2021-07-12 13:41:36.338119444 +0100
@@ -1 +1 @@
-From 7c83a1e3c83e601f449f05e2e36e1df50e8503aa Mon Sep 17 00:00:00 2001
+From dbf34013549a5e32691c90bdb84e80fffaf96868 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 7c83a1e3c83e601f449f05e2e36e1df50e8503aa ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -19 +20 @@
-index 80ffe7633a..4d261b55ee 100644
+index c5402b9652..e8d1faa4c9 100644
@@ -22 +23 @@
-@@ -327,7 +327,7 @@ pci_scan_one(const char *dirname, const struct rte_pci_addr *addr)
+@@ -331,7 +331,7 @@ pci_scan_one(const char *dirname, const struct rte_pci_addr *addr)
^ permalink raw reply [flat|nested] 208+ messages in thread
* [dpdk-stable] patch 'test/mbuf: fix virtual address conversion' has been queued to stable release 20.11.3
2021-07-12 13:03 [dpdk-stable] patch 'graph: fix memory leak in stats' has been queued to stable release 20.11.3 luca.boccassi
` (42 preceding siblings ...)
2021-07-12 13:04 ` [dpdk-stable] patch 'bus/pci: fix leak for unbound devices' " luca.boccassi
@ 2021-07-12 13:04 ` luca.boccassi
2021-07-12 13:04 ` [dpdk-stable] patch 'net/octeontx2: fix flow creation limit on CN98xx' " luca.boccassi
` (71 subsequent siblings)
115 siblings, 0 replies; 208+ messages in thread
From: luca.boccassi @ 2021-07-12 13:04 UTC (permalink / raw)
To: Olivier Matz; +Cc: Zhihong Peng, David Marchand, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.3
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/14/21. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/4d1f97bca4be8b063fdb44b413ca382cfab2638a
Thanks.
Luca Boccassi
---
From 4d1f97bca4be8b063fdb44b413ca382cfab2638a Mon Sep 17 00:00:00 2001
From: Olivier Matz <olivier.matz@6wind.com>
Date: Mon, 5 Jul 2021 09:27:34 +0200
Subject: [PATCH] test/mbuf: fix virtual address conversion
[ upstream commit eb3fea3cdebbd860b6094e21aae589746e13c22a ]
Seen with address sanitizer.
rte_mempool_virt2iova() can only be used on mempool elements. In this case,
it is incorrect, and rte_mem_virt2iova() has to be used.
Bugzilla ID: 737
Fixes: 7b295dceea07 ("test/mbuf: add unit test cases")
Reported-by: Zhihong Peng <zhihongx.peng@intel.com>
Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>
---
app/test/test_mbuf.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/app/test/test_mbuf.c b/app/test/test_mbuf.c
index 47a7b197d7..5bb4786e5a 100644
--- a/app/test/test_mbuf.c
+++ b/app/test/test_mbuf.c
@@ -2363,7 +2363,7 @@ test_pktmbuf_ext_shinfo_init_helper(struct rte_mempool *pktmbuf_pool)
if (rte_mbuf_refcnt_read(m) != 1)
GOTO_FAIL("%s: Invalid refcnt in mbuf\n", __func__);
- buf_iova = rte_mempool_virt2iova(ext_buf_addr);
+ buf_iova = rte_mem_virt2iova(ext_buf_addr);
rte_pktmbuf_attach_extbuf(m, ext_buf_addr, buf_iova, buf_len,
ret_shinfo);
if (m->ol_flags != EXT_ATTACHED_MBUF)
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-07-12 13:41:38.977800519 +0100
+++ 0045-test-mbuf-fix-virtual-address-conversion.patch 2021-07-12 13:41:36.342119528 +0100
@@ -1 +1 @@
-From eb3fea3cdebbd860b6094e21aae589746e13c22a Mon Sep 17 00:00:00 2001
+From 4d1f97bca4be8b063fdb44b413ca382cfab2638a Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit eb3fea3cdebbd860b6094e21aae589746e13c22a ]
+
@@ -13 +14,0 @@
-Cc: stable@dpdk.org
@@ -23 +24 @@
-index 8e0561eabb..9a248dfaea 100644
+index 47a7b197d7..5bb4786e5a 100644
^ permalink raw reply [flat|nested] 208+ messages in thread
* [dpdk-stable] patch 'net/octeontx2: fix flow creation limit on CN98xx' has been queued to stable release 20.11.3
2021-07-12 13:03 [dpdk-stable] patch 'graph: fix memory leak in stats' has been queued to stable release 20.11.3 luca.boccassi
` (43 preceding siblings ...)
2021-07-12 13:04 ` [dpdk-stable] patch 'test/mbuf: fix virtual address conversion' " luca.boccassi
@ 2021-07-12 13:04 ` luca.boccassi
2021-07-12 13:04 ` [dpdk-stable] patch 'net/octeontx2: use runtime LSO format indices' " luca.boccassi
` (70 subsequent siblings)
115 siblings, 0 replies; 208+ messages in thread
From: luca.boccassi @ 2021-07-12 13:04 UTC (permalink / raw)
To: Satheesh Paul; +Cc: Jerin Jacob, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.3
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/14/21. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/2bc1fd8f040c33b8f4d0e5d6ed5613f46b68b069
Thanks.
Luca Boccassi
---
From 2bc1fd8f040c33b8f4d0e5d6ed5613f46b68b069 Mon Sep 17 00:00:00 2001
From: Satheesh Paul <psatheesh@marvell.com>
Date: Tue, 1 Jun 2021 15:55:51 +0530
Subject: [PATCH] net/octeontx2: fix flow creation limit on CN98xx
[ upstream commit b65db6a879bd09799b96aed09a49458ae1b3644b ]
CN96xx and CN98xx have 4096 and 16384 MCAM entries respectively.
Aligning the code with the same numbers.
Fixes: 092b3834185 ("net/octeontx2: add flow init and fini")
Signed-off-by: Satheesh Paul <psatheesh@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
---
drivers/common/octeontx2/otx2_dev.h | 3 +++
drivers/net/octeontx2/otx2_flow.c | 16 ++++++++++++++--
drivers/net/octeontx2/otx2_flow.h | 1 -
3 files changed, 17 insertions(+), 3 deletions(-)
diff --git a/drivers/common/octeontx2/otx2_dev.h b/drivers/common/octeontx2/otx2_dev.h
index cd4fe517db..9d8dcca791 100644
--- a/drivers/common/octeontx2/otx2_dev.h
+++ b/drivers/common/octeontx2/otx2_dev.h
@@ -55,6 +55,9 @@
(RVU_PCI_REV_MINOR(otx2_dev_revid(dev)) == 0x0) && \
(RVU_PCI_REV_MIDR_ID(otx2_dev_revid(dev)) == 0x0))
+#define otx2_dev_is_98xx(dev) \
+ (RVU_PCI_REV_MIDR_ID(otx2_dev_revid(dev)) == 0x3)
+
struct otx2_dev;
/* Link status callback */
diff --git a/drivers/net/octeontx2/otx2_flow.c b/drivers/net/octeontx2/otx2_flow.c
index a5900f349b..5ff6a66abb 100644
--- a/drivers/net/octeontx2/otx2_flow.c
+++ b/drivers/net/octeontx2/otx2_flow.c
@@ -963,12 +963,23 @@ done:
return rc;
}
+#define OTX2_MCAM_TOT_ENTRIES_96XX (4096)
+#define OTX2_MCAM_TOT_ENTRIES_98XX (16384)
+
+static int otx2_mcam_tot_entries(struct otx2_eth_dev *dev)
+{
+ if (otx2_dev_is_98xx(dev))
+ return OTX2_MCAM_TOT_ENTRIES_98XX;
+ else
+ return OTX2_MCAM_TOT_ENTRIES_96XX;
+}
+
int
otx2_flow_init(struct otx2_eth_dev *hw)
{
uint8_t *mem = NULL, *nix_mem = NULL, *npc_mem = NULL;
struct otx2_npc_flow_info *npc = &hw->npc_flow;
- uint32_t bmap_sz;
+ uint32_t bmap_sz, tot_mcam_entries = 0;
int rc = 0, idx;
rc = flow_fetch_kex_cfg(hw);
@@ -980,7 +991,8 @@ otx2_flow_init(struct otx2_eth_dev *hw)
rte_atomic32_init(&npc->mark_actions);
npc->vtag_actions = 0;
- npc->mcam_entries = NPC_MCAM_TOT_ENTRIES >> npc->keyw[NPC_MCAM_RX];
+ tot_mcam_entries = otx2_mcam_tot_entries(hw);
+ npc->mcam_entries = tot_mcam_entries >> npc->keyw[NPC_MCAM_RX];
/* Free, free_rev, live and live_rev entries */
bmap_sz = rte_bitmap_get_memory_footprint(npc->mcam_entries);
mem = rte_zmalloc(NULL, 4 * bmap_sz * npc->flow_max_priority,
diff --git a/drivers/net/octeontx2/otx2_flow.h b/drivers/net/octeontx2/otx2_flow.h
index 30a823c8a7..efc9bd1a56 100644
--- a/drivers/net/octeontx2/otx2_flow.h
+++ b/drivers/net/octeontx2/otx2_flow.h
@@ -34,7 +34,6 @@ enum {
/* 32 bytes from LDATA_CFG & 32 bytes from FLAGS_CFG */
#define NPC_MAX_EXTRACT_DATA_LEN (64)
#define NPC_LDATA_LFLAG_LEN (16)
-#define NPC_MCAM_TOT_ENTRIES (4096)
#define NPC_MAX_KEY_NIBBLES (31)
/* Nibble offsets */
#define NPC_LAYER_KEYX_SZ (3)
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-07-12 13:41:39.026104329 +0100
+++ 0046-net-octeontx2-fix-flow-creation-limit-on-CN98xx.patch 2021-07-12 13:41:36.346119611 +0100
@@ -1 +1 @@
-From b65db6a879bd09799b96aed09a49458ae1b3644b Mon Sep 17 00:00:00 2001
+From 2bc1fd8f040c33b8f4d0e5d6ed5613f46b68b069 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit b65db6a879bd09799b96aed09a49458ae1b3644b ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -35 +36 @@
-index 1c90d753ff..6df0732189 100644
+index a5900f349b..5ff6a66abb 100644
@@ -38 +39 @@
-@@ -1003,12 +1003,23 @@ done:
+@@ -963,12 +963,23 @@ done:
@@ -63 +64 @@
-@@ -1020,7 +1031,8 @@ otx2_flow_init(struct otx2_eth_dev *hw)
+@@ -980,7 +991,8 @@ otx2_flow_init(struct otx2_eth_dev *hw)
@@ -74 +75 @@
-index 82a5064d90..790e6ef1e8 100644
+index 30a823c8a7..efc9bd1a56 100644
@@ -77 +78 @@
-@@ -35,7 +35,6 @@ enum {
+@@ -34,7 +34,6 @@ enum {
^ permalink raw reply [flat|nested] 208+ messages in thread
* [dpdk-stable] patch 'net/octeontx2: use runtime LSO format indices' has been queued to stable release 20.11.3
2021-07-12 13:03 [dpdk-stable] patch 'graph: fix memory leak in stats' has been queued to stable release 20.11.3 luca.boccassi
` (44 preceding siblings ...)
2021-07-12 13:04 ` [dpdk-stable] patch 'net/octeontx2: fix flow creation limit on CN98xx' " luca.boccassi
@ 2021-07-12 13:04 ` luca.boccassi
2021-07-12 13:04 ` [dpdk-stable] patch 'net/ice: fix overflow in maximum packet length config' " luca.boccassi
` (69 subsequent siblings)
115 siblings, 0 replies; 208+ messages in thread
From: luca.boccassi @ 2021-07-12 13:04 UTC (permalink / raw)
To: Nithin Dabilpuram; +Cc: dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.3
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/14/21. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/18a27a10240087fd58e33894ab3e44145fecd17e
Thanks.
Luca Boccassi
---
From 18a27a10240087fd58e33894ab3e44145fecd17e Mon Sep 17 00:00:00 2001
From: Nithin Dabilpuram <ndabilpuram@marvell.com>
Date: Fri, 18 Jun 2021 18:36:06 +0530
Subject: [PATCH] net/octeontx2: use runtime LSO format indices
[ upstream commit 56cabfbf4affde4117652cba3c6235d1a40f4205 ]
Currently LSO formats setup initially are expected to be
compile time constants and start from 0.
Change the logic in slow and fast path so that LSO format indexes
are only determined runtime.
Fixes: 3b635472a998 ("net/octeontx2: support TSO offload")
Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
---
drivers/event/octeontx2/otx2_worker.h | 2 +-
drivers/net/octeontx2/otx2_ethdev.c | 72 +++++++++++++++------------
drivers/net/octeontx2/otx2_ethdev.h | 13 ++++-
drivers/net/octeontx2/otx2_tx.c | 8 ++-
drivers/net/octeontx2/otx2_tx.h | 12 +++--
5 files changed, 67 insertions(+), 40 deletions(-)
diff --git a/drivers/event/octeontx2/otx2_worker.h b/drivers/event/octeontx2/otx2_worker.h
index 0a7d6671c4..89dc79d9c9 100644
--- a/drivers/event/octeontx2/otx2_worker.h
+++ b/drivers/event/octeontx2/otx2_worker.h
@@ -272,7 +272,7 @@ otx2_ssogws_prepare_pkt(const struct otx2_eth_txq *txq, struct rte_mbuf *m,
uint64_t *cmd, const uint32_t flags)
{
otx2_lmt_mov(cmd, txq->cmd, otx2_nix_tx_ext_subs(flags));
- otx2_nix_xmit_prepare(m, cmd, flags);
+ otx2_nix_xmit_prepare(m, cmd, flags, txq->lso_tun_fmt);
}
static __rte_always_inline uint16_t
diff --git a/drivers/net/octeontx2/otx2_ethdev.c b/drivers/net/octeontx2/otx2_ethdev.c
index 6cebbe677d..95f85f874c 100644
--- a/drivers/net/octeontx2/otx2_ethdev.c
+++ b/drivers/net/octeontx2/otx2_ethdev.c
@@ -1311,6 +1311,7 @@ otx2_nix_tx_queue_setup(struct rte_eth_dev *eth_dev, uint16_t sq,
txq->qconf.nb_desc = nb_desc;
memcpy(&txq->qconf.conf.tx, tx_conf, sizeof(struct rte_eth_txconf));
+ txq->lso_tun_fmt = dev->lso_tun_fmt;
otx2_nix_form_default_desc(txq);
otx2_nix_dbg("sq=%d fc=%p offload=0x%" PRIx64 " sqb=0x%" PRIx64 ""
@@ -1661,7 +1662,7 @@ nix_setup_lso_formats(struct otx2_eth_dev *dev)
struct otx2_mbox *mbox = dev->mbox;
struct nix_lso_format_cfg_rsp *rsp;
struct nix_lso_format_cfg *req;
- uint8_t base;
+ uint8_t *fmt;
int rc;
/* Skip if TSO was not requested */
@@ -1676,11 +1677,9 @@ nix_setup_lso_formats(struct otx2_eth_dev *dev)
if (rc)
return rc;
- base = rsp->lso_format_idx;
- if (base != NIX_LSO_FORMAT_IDX_TSOV4)
+ if (rsp->lso_format_idx != NIX_LSO_FORMAT_IDX_TSOV4)
return -EFAULT;
- dev->lso_base_idx = base;
- otx2_nix_dbg("tcpv4 lso fmt=%u", base);
+ otx2_nix_dbg("tcpv4 lso fmt=%u", rsp->lso_format_idx);
/*
@@ -1692,9 +1691,9 @@ nix_setup_lso_formats(struct otx2_eth_dev *dev)
if (rc)
return rc;
- if (rsp->lso_format_idx != base + 1)
+ if (rsp->lso_format_idx != NIX_LSO_FORMAT_IDX_TSOV6)
return -EFAULT;
- otx2_nix_dbg("tcpv6 lso fmt=%u\n", base + 1);
+ otx2_nix_dbg("tcpv6 lso fmt=%u\n", rsp->lso_format_idx);
/*
* IPv4/UDP/TUN HDR/IPv4/TCP LSO
@@ -1705,9 +1704,8 @@ nix_setup_lso_formats(struct otx2_eth_dev *dev)
if (rc)
return rc;
- if (rsp->lso_format_idx != base + 2)
- return -EFAULT;
- otx2_nix_dbg("udp tun v4v4 fmt=%u\n", base + 2);
+ dev->lso_udp_tun_idx[NIX_LSO_TUN_V4V4] = rsp->lso_format_idx;
+ otx2_nix_dbg("udp tun v4v4 fmt=%u\n", rsp->lso_format_idx);
/*
* IPv4/UDP/TUN HDR/IPv6/TCP LSO
@@ -1718,9 +1716,8 @@ nix_setup_lso_formats(struct otx2_eth_dev *dev)
if (rc)
return rc;
- if (rsp->lso_format_idx != base + 3)
- return -EFAULT;
- otx2_nix_dbg("udp tun v4v6 fmt=%u\n", base + 3);
+ dev->lso_udp_tun_idx[NIX_LSO_TUN_V4V6] = rsp->lso_format_idx;
+ otx2_nix_dbg("udp tun v4v6 fmt=%u\n", rsp->lso_format_idx);
/*
* IPv6/UDP/TUN HDR/IPv4/TCP LSO
@@ -1731,9 +1728,8 @@ nix_setup_lso_formats(struct otx2_eth_dev *dev)
if (rc)
return rc;
- if (rsp->lso_format_idx != base + 4)
- return -EFAULT;
- otx2_nix_dbg("udp tun v6v4 fmt=%u\n", base + 4);
+ dev->lso_udp_tun_idx[NIX_LSO_TUN_V6V4] = rsp->lso_format_idx;
+ otx2_nix_dbg("udp tun v6v4 fmt=%u\n", rsp->lso_format_idx);
/*
* IPv6/UDP/TUN HDR/IPv6/TCP LSO
@@ -1743,9 +1739,9 @@ nix_setup_lso_formats(struct otx2_eth_dev *dev)
rc = otx2_mbox_process_msg(mbox, (void *)&rsp);
if (rc)
return rc;
- if (rsp->lso_format_idx != base + 5)
- return -EFAULT;
- otx2_nix_dbg("udp tun v6v6 fmt=%u\n", base + 5);
+
+ dev->lso_udp_tun_idx[NIX_LSO_TUN_V6V6] = rsp->lso_format_idx;
+ otx2_nix_dbg("udp tun v6v6 fmt=%u\n", rsp->lso_format_idx);
/*
* IPv4/TUN HDR/IPv4/TCP LSO
@@ -1756,9 +1752,8 @@ nix_setup_lso_formats(struct otx2_eth_dev *dev)
if (rc)
return rc;
- if (rsp->lso_format_idx != base + 6)
- return -EFAULT;
- otx2_nix_dbg("tun v4v4 fmt=%u\n", base + 6);
+ dev->lso_tun_idx[NIX_LSO_TUN_V4V4] = rsp->lso_format_idx;
+ otx2_nix_dbg("tun v4v4 fmt=%u\n", rsp->lso_format_idx);
/*
* IPv4/TUN HDR/IPv6/TCP LSO
@@ -1769,9 +1764,8 @@ nix_setup_lso_formats(struct otx2_eth_dev *dev)
if (rc)
return rc;
- if (rsp->lso_format_idx != base + 7)
- return -EFAULT;
- otx2_nix_dbg("tun v4v6 fmt=%u\n", base + 7);
+ dev->lso_tun_idx[NIX_LSO_TUN_V4V6] = rsp->lso_format_idx;
+ otx2_nix_dbg("tun v4v6 fmt=%u\n", rsp->lso_format_idx);
/*
* IPv6/TUN HDR/IPv4/TCP LSO
@@ -1782,9 +1776,8 @@ nix_setup_lso_formats(struct otx2_eth_dev *dev)
if (rc)
return rc;
- if (rsp->lso_format_idx != base + 8)
- return -EFAULT;
- otx2_nix_dbg("tun v6v4 fmt=%u\n", base + 8);
+ dev->lso_tun_idx[NIX_LSO_TUN_V6V4] = rsp->lso_format_idx;
+ otx2_nix_dbg("tun v6v4 fmt=%u\n", rsp->lso_format_idx);
/*
* IPv6/TUN HDR/IPv6/TCP LSO
@@ -1794,9 +1787,26 @@ nix_setup_lso_formats(struct otx2_eth_dev *dev)
rc = otx2_mbox_process_msg(mbox, (void *)&rsp);
if (rc)
return rc;
- if (rsp->lso_format_idx != base + 9)
- return -EFAULT;
- otx2_nix_dbg("tun v6v6 fmt=%u\n", base + 9);
+
+ dev->lso_tun_idx[NIX_LSO_TUN_V6V6] = rsp->lso_format_idx;
+ otx2_nix_dbg("tun v6v6 fmt=%u\n", rsp->lso_format_idx);
+
+ /* Save all tun formats into u64 for fast path.
+ * Lower 32bit has non-udp tunnel formats.
+ * Upper 32bit has udp tunnel formats.
+ */
+ fmt = dev->lso_tun_idx;
+ dev->lso_tun_fmt = ((uint64_t)fmt[NIX_LSO_TUN_V4V4] |
+ (uint64_t)fmt[NIX_LSO_TUN_V4V6] << 8 |
+ (uint64_t)fmt[NIX_LSO_TUN_V6V4] << 16 |
+ (uint64_t)fmt[NIX_LSO_TUN_V6V6] << 24);
+
+ fmt = dev->lso_udp_tun_idx;
+ dev->lso_tun_fmt |= ((uint64_t)fmt[NIX_LSO_TUN_V4V4] << 32 |
+ (uint64_t)fmt[NIX_LSO_TUN_V4V6] << 40 |
+ (uint64_t)fmt[NIX_LSO_TUN_V6V4] << 48 |
+ (uint64_t)fmt[NIX_LSO_TUN_V6V6] << 56);
+
return 0;
}
diff --git a/drivers/net/octeontx2/otx2_ethdev.h b/drivers/net/octeontx2/otx2_ethdev.h
index 99f0469d89..f33e9fcb09 100644
--- a/drivers/net/octeontx2/otx2_ethdev.h
+++ b/drivers/net/octeontx2/otx2_ethdev.h
@@ -177,6 +177,14 @@ enum nix_q_size_e {
nix_q_size_max
};
+enum nix_lso_tun_type {
+ NIX_LSO_TUN_V4V4,
+ NIX_LSO_TUN_V4V6,
+ NIX_LSO_TUN_V6V4,
+ NIX_LSO_TUN_V6V6,
+ NIX_LSO_TUN_MAX,
+};
+
struct otx2_qint {
struct rte_eth_dev *eth_dev;
uint8_t qintx;
@@ -271,7 +279,9 @@ struct otx2_eth_dev {
uint8_t tx_chan_cnt;
uint8_t lso_tsov4_idx;
uint8_t lso_tsov6_idx;
- uint8_t lso_base_idx;
+ uint8_t lso_udp_tun_idx[NIX_LSO_TUN_MAX];
+ uint8_t lso_tun_idx[NIX_LSO_TUN_MAX];
+ uint64_t lso_tun_fmt;
uint8_t mac_addr[RTE_ETHER_ADDR_LEN];
uint8_t mkex_pfl_name[MKEX_NAME_LEN];
uint8_t max_mac_entries;
@@ -354,6 +364,7 @@ struct otx2_eth_txq {
rte_iova_t fc_iova;
uint16_t sqes_per_sqb_log2;
int16_t nb_sqb_bufs_adj;
+ uint64_t lso_tun_fmt;
RTE_MARKER slow_path_start;
uint16_t nb_sqb_bufs;
uint16_t sq;
diff --git a/drivers/net/octeontx2/otx2_tx.c b/drivers/net/octeontx2/otx2_tx.c
index 439c46f61c..ff299f00b9 100644
--- a/drivers/net/octeontx2/otx2_tx.c
+++ b/drivers/net/octeontx2/otx2_tx.c
@@ -27,6 +27,7 @@ nix_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts,
struct otx2_eth_txq *txq = tx_queue; uint16_t i;
const rte_iova_t io_addr = txq->io_addr;
void *lmt_addr = txq->lmt_addr;
+ uint64_t lso_tun_fmt;
NIX_XMIT_FC_OR_RETURN(txq, pkts);
@@ -34,6 +35,7 @@ nix_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts,
/* Perform header writes before barrier for TSO */
if (flags & NIX_TX_OFFLOAD_TSO_F) {
+ lso_tun_fmt = txq->lso_tun_fmt;
for (i = 0; i < pkts; i++)
otx2_nix_xmit_prepare_tso(tx_pkts[i], flags);
}
@@ -45,7 +47,7 @@ nix_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts,
rte_io_wmb();
for (i = 0; i < pkts; i++) {
- otx2_nix_xmit_prepare(tx_pkts[i], cmd, flags);
+ otx2_nix_xmit_prepare(tx_pkts[i], cmd, flags, lso_tun_fmt);
/* Passing no of segdw as 4: HDR + EXT + SG + SMEM */
otx2_nix_xmit_prepare_tstamp(cmd, &txq->cmd[0],
tx_pkts[i]->ol_flags, 4, flags);
@@ -65,6 +67,7 @@ nix_xmit_pkts_mseg(void *tx_queue, struct rte_mbuf **tx_pkts,
struct otx2_eth_txq *txq = tx_queue; uint64_t i;
const rte_iova_t io_addr = txq->io_addr;
void *lmt_addr = txq->lmt_addr;
+ uint64_t lso_tun_fmt;
uint16_t segdw;
NIX_XMIT_FC_OR_RETURN(txq, pkts);
@@ -73,6 +76,7 @@ nix_xmit_pkts_mseg(void *tx_queue, struct rte_mbuf **tx_pkts,
/* Perform header writes before barrier for TSO */
if (flags & NIX_TX_OFFLOAD_TSO_F) {
+ lso_tun_fmt = txq->lso_tun_fmt;
for (i = 0; i < pkts; i++)
otx2_nix_xmit_prepare_tso(tx_pkts[i], flags);
}
@@ -84,7 +88,7 @@ nix_xmit_pkts_mseg(void *tx_queue, struct rte_mbuf **tx_pkts,
rte_io_wmb();
for (i = 0; i < pkts; i++) {
- otx2_nix_xmit_prepare(tx_pkts[i], cmd, flags);
+ otx2_nix_xmit_prepare(tx_pkts[i], cmd, flags, lso_tun_fmt);
segdw = otx2_nix_prepare_mseg(tx_pkts[i], cmd, flags);
otx2_nix_xmit_prepare_tstamp(cmd, &txq->cmd[0],
tx_pkts[i]->ol_flags, segdw,
diff --git a/drivers/net/octeontx2/otx2_tx.h b/drivers/net/octeontx2/otx2_tx.h
index a97b160677..486248dff7 100644
--- a/drivers/net/octeontx2/otx2_tx.h
+++ b/drivers/net/octeontx2/otx2_tx.h
@@ -197,7 +197,8 @@ otx2_nix_xmit_prepare_tso(struct rte_mbuf *m, const uint64_t flags)
}
static __rte_always_inline void
-otx2_nix_xmit_prepare(struct rte_mbuf *m, uint64_t *cmd, const uint16_t flags)
+otx2_nix_xmit_prepare(struct rte_mbuf *m, uint64_t *cmd, const uint16_t flags,
+ const uint64_t lso_tun_fmt)
{
struct nix_send_ext_s *send_hdr_ext;
struct nix_send_hdr_s *send_hdr;
@@ -339,14 +340,15 @@ otx2_nix_xmit_prepare(struct rte_mbuf *m, uint64_t *cmd, const uint16_t flags)
(ol_flags & PKT_TX_TUNNEL_MASK)) {
const uint8_t is_udp_tun = (NIX_UDP_TUN_BITMASK >>
((ol_flags & PKT_TX_TUNNEL_MASK) >> 45)) & 0x1;
+ uint8_t shift = is_udp_tun ? 32 : 0;
+
+ shift += (!!(ol_flags & PKT_TX_OUTER_IPV6) << 4);
+ shift += (!!(ol_flags & PKT_TX_IPV6) << 3);
w1.il4type = NIX_SENDL4TYPE_TCP_CKSUM;
w1.ol4type = is_udp_tun ? NIX_SENDL4TYPE_UDP_CKSUM : 0;
/* Update format for UDP tunneled packet */
- send_hdr_ext->w0.lso_format += is_udp_tun ? 2 : 6;
-
- send_hdr_ext->w0.lso_format +=
- !!(ol_flags & PKT_TX_OUTER_IPV6) << 1;
+ send_hdr_ext->w0.lso_format = (lso_tun_fmt >> shift);
}
}
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-07-12 13:41:39.070971341 +0100
+++ 0047-net-octeontx2-use-runtime-LSO-format-indices.patch 2021-07-12 13:41:36.354119777 +0100
@@ -1 +1 @@
-From 56cabfbf4affde4117652cba3c6235d1a40f4205 Mon Sep 17 00:00:00 2001
+From 18a27a10240087fd58e33894ab3e44145fecd17e Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 56cabfbf4affde4117652cba3c6235d1a40f4205 ]
+
@@ -13 +14,0 @@
-Cc: stable@dpdk.org
@@ -25 +26 @@
-index fd149be919..3e36dcece1 100644
+index 0a7d6671c4..89dc79d9c9 100644
@@ -28 +29 @@
-@@ -264,7 +264,7 @@ otx2_ssogws_prepare_pkt(const struct otx2_eth_txq *txq, struct rte_mbuf *m,
+@@ -272,7 +272,7 @@ otx2_ssogws_prepare_pkt(const struct otx2_eth_txq *txq, struct rte_mbuf *m,
@@ -38 +39 @@
-index 0834de0cb1..0a420c1fb1 100644
+index 6cebbe677d..95f85f874c 100644
@@ -41 +42 @@
-@@ -1326,6 +1326,7 @@ otx2_nix_tx_queue_setup(struct rte_eth_dev *eth_dev, uint16_t sq,
+@@ -1311,6 +1311,7 @@ otx2_nix_tx_queue_setup(struct rte_eth_dev *eth_dev, uint16_t sq,
@@ -49 +50 @@
-@@ -1676,7 +1677,7 @@ nix_setup_lso_formats(struct otx2_eth_dev *dev)
+@@ -1661,7 +1662,7 @@ nix_setup_lso_formats(struct otx2_eth_dev *dev)
@@ -58 +59 @@
-@@ -1691,11 +1692,9 @@ nix_setup_lso_formats(struct otx2_eth_dev *dev)
+@@ -1676,11 +1677,9 @@ nix_setup_lso_formats(struct otx2_eth_dev *dev)
@@ -72 +73 @@
-@@ -1707,9 +1706,9 @@ nix_setup_lso_formats(struct otx2_eth_dev *dev)
+@@ -1692,9 +1691,9 @@ nix_setup_lso_formats(struct otx2_eth_dev *dev)
@@ -84 +85 @@
-@@ -1720,9 +1719,8 @@ nix_setup_lso_formats(struct otx2_eth_dev *dev)
+@@ -1705,9 +1704,8 @@ nix_setup_lso_formats(struct otx2_eth_dev *dev)
@@ -96 +97 @@
-@@ -1733,9 +1731,8 @@ nix_setup_lso_formats(struct otx2_eth_dev *dev)
+@@ -1718,9 +1716,8 @@ nix_setup_lso_formats(struct otx2_eth_dev *dev)
@@ -108 +109 @@
-@@ -1746,9 +1743,8 @@ nix_setup_lso_formats(struct otx2_eth_dev *dev)
+@@ -1731,9 +1728,8 @@ nix_setup_lso_formats(struct otx2_eth_dev *dev)
@@ -120 +121 @@
-@@ -1758,9 +1754,9 @@ nix_setup_lso_formats(struct otx2_eth_dev *dev)
+@@ -1743,9 +1739,9 @@ nix_setup_lso_formats(struct otx2_eth_dev *dev)
@@ -133 +134 @@
-@@ -1771,9 +1767,8 @@ nix_setup_lso_formats(struct otx2_eth_dev *dev)
+@@ -1756,9 +1752,8 @@ nix_setup_lso_formats(struct otx2_eth_dev *dev)
@@ -145 +146 @@
-@@ -1784,9 +1779,8 @@ nix_setup_lso_formats(struct otx2_eth_dev *dev)
+@@ -1769,9 +1764,8 @@ nix_setup_lso_formats(struct otx2_eth_dev *dev)
@@ -157 +158 @@
-@@ -1797,9 +1791,8 @@ nix_setup_lso_formats(struct otx2_eth_dev *dev)
+@@ -1782,9 +1776,8 @@ nix_setup_lso_formats(struct otx2_eth_dev *dev)
@@ -169 +170 @@
-@@ -1809,9 +1802,26 @@ nix_setup_lso_formats(struct otx2_eth_dev *dev)
+@@ -1794,9 +1787,26 @@ nix_setup_lso_formats(struct otx2_eth_dev *dev)
@@ -200 +201 @@
-index ac50da7b18..381e6b6cb3 100644
+index 99f0469d89..f33e9fcb09 100644
@@ -203 +204 @@
-@@ -182,6 +182,14 @@ enum nix_q_size_e {
+@@ -177,6 +177,14 @@ enum nix_q_size_e {
@@ -218 +219 @@
-@@ -276,7 +284,9 @@ struct otx2_eth_dev {
+@@ -271,7 +279,9 @@ struct otx2_eth_dev {
@@ -229 +230 @@
-@@ -359,6 +369,7 @@ struct otx2_eth_txq {
+@@ -354,6 +364,7 @@ struct otx2_eth_txq {
^ permalink raw reply [flat|nested] 208+ messages in thread
* [dpdk-stable] patch 'net/ice: fix overflow in maximum packet length config' has been queued to stable release 20.11.3
2021-07-12 13:03 [dpdk-stable] patch 'graph: fix memory leak in stats' has been queued to stable release 20.11.3 luca.boccassi
` (45 preceding siblings ...)
2021-07-12 13:04 ` [dpdk-stable] patch 'net/octeontx2: use runtime LSO format indices' " luca.boccassi
@ 2021-07-12 13:04 ` luca.boccassi
2021-07-12 13:04 ` [dpdk-stable] patch 'net/ice/base: fix first profile mask' " luca.boccassi
` (68 subsequent siblings)
115 siblings, 0 replies; 208+ messages in thread
From: luca.boccassi @ 2021-07-12 13:04 UTC (permalink / raw)
To: Tudor Cornea; +Cc: Qi Zhang, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.3
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/14/21. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/345f2731ed564636d2b9380c8be01ab4aafc93d0
Thanks.
Luca Boccassi
---
From 345f2731ed564636d2b9380c8be01ab4aafc93d0 Mon Sep 17 00:00:00 2001
From: Tudor Cornea <tudor.cornea@keysight.com>
Date: Tue, 15 Jun 2021 13:38:34 +0300
Subject: [PATCH] net/ice: fix overflow in maximum packet length config
[ upstream commit 58bb86cf13b8535fa8786f97cc9a4dfaa780a51e ]
The len variable, used in the computation of max_pkt_len could overflow,
if used to store the result of the following computation:
ICE_SUPPORT_CHAIN_NUM * rxq->rx_buf_len
Since, we could define the mbuf size to have a large value (i.e 13312),
and ICE_SUPPORT_CHAIN_NUM is defined as 5, the computation mentioned
above could potentially result in a value which might be bigger than
MAX_USHORT.
The result will be that Jumbo Frames will not work properly
Fixes: 1b009275e2c8 ("net/ice: add Rx queue init in DCF")
Signed-off-by: Tudor Cornea <tudor.cornea@keysight.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
---
drivers/net/ice/ice_dcf_ethdev.c | 7 ++++---
drivers/net/ice/ice_rxtx.c | 6 +++---
2 files changed, 7 insertions(+), 6 deletions(-)
diff --git a/drivers/net/ice/ice_dcf_ethdev.c b/drivers/net/ice/ice_dcf_ethdev.c
index e5c877805f..71f8a4b4cc 100644
--- a/drivers/net/ice/ice_dcf_ethdev.c
+++ b/drivers/net/ice/ice_dcf_ethdev.c
@@ -48,13 +48,14 @@ ice_dcf_init_rxq(struct rte_eth_dev *dev, struct ice_rx_queue *rxq)
struct ice_dcf_adapter *dcf_ad = dev->data->dev_private;
struct rte_eth_dev_data *dev_data = dev->data;
struct iavf_hw *hw = &dcf_ad->real_hw.avf;
- uint16_t buf_size, max_pkt_len, len;
+ uint16_t buf_size, max_pkt_len;
buf_size = rte_pktmbuf_data_room_size(rxq->mp) - RTE_PKTMBUF_HEADROOM;
rxq->rx_hdr_len = 0;
rxq->rx_buf_len = RTE_ALIGN(buf_size, (1 << ICE_RLAN_CTX_DBUF_S));
- len = ICE_SUPPORT_CHAIN_NUM * rxq->rx_buf_len;
- max_pkt_len = RTE_MIN(len, dev->data->dev_conf.rxmode.max_rx_pkt_len);
+ max_pkt_len = RTE_MIN((uint32_t)
+ ICE_SUPPORT_CHAIN_NUM * rxq->rx_buf_len,
+ dev->data->dev_conf.rxmode.max_rx_pkt_len);
/* Check if the jumbo frame and maximum packet length are set
* correctly.
diff --git a/drivers/net/ice/ice_rxtx.c b/drivers/net/ice/ice_rxtx.c
index f9a475cbb8..8ac9411083 100644
--- a/drivers/net/ice/ice_rxtx.c
+++ b/drivers/net/ice/ice_rxtx.c
@@ -231,7 +231,7 @@ ice_program_hw_rx_queue(struct ice_rx_queue *rxq)
struct rte_eth_dev_data *dev_data = rxq->vsi->adapter->pf.dev_data;
struct ice_rlan_ctx rx_ctx;
enum ice_status err;
- uint16_t buf_size, len;
+ uint16_t buf_size;
struct rte_eth_rxmode *rxmode = &dev_data->dev_conf.rxmode;
uint32_t rxdid = ICE_RXDID_COMMS_OVS;
uint32_t regval;
@@ -241,8 +241,8 @@ ice_program_hw_rx_queue(struct ice_rx_queue *rxq)
RTE_PKTMBUF_HEADROOM);
rxq->rx_hdr_len = 0;
rxq->rx_buf_len = RTE_ALIGN(buf_size, (1 << ICE_RLAN_CTX_DBUF_S));
- len = ICE_SUPPORT_CHAIN_NUM * rxq->rx_buf_len;
- rxq->max_pkt_len = RTE_MIN(len,
+ rxq->max_pkt_len = RTE_MIN((uint32_t)
+ ICE_SUPPORT_CHAIN_NUM * rxq->rx_buf_len,
dev_data->dev_conf.rxmode.max_rx_pkt_len);
if (rxmode->offloads & DEV_RX_OFFLOAD_JUMBO_FRAME) {
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-07-12 13:41:39.121521578 +0100
+++ 0048-net-ice-fix-overflow-in-maximum-packet-length-config.patch 2021-07-12 13:41:36.362119944 +0100
@@ -1 +1 @@
-From 58bb86cf13b8535fa8786f97cc9a4dfaa780a51e Mon Sep 17 00:00:00 2001
+From 345f2731ed564636d2b9380c8be01ab4aafc93d0 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 58bb86cf13b8535fa8786f97cc9a4dfaa780a51e ]
+
@@ -19 +20,0 @@
-Cc: stable@dpdk.org
@@ -29 +30 @@
-index b937cbbb03..f73dc80bd9 100644
+index e5c877805f..71f8a4b4cc 100644
@@ -32 +33 @@
-@@ -54,13 +54,14 @@ ice_dcf_init_rxq(struct rte_eth_dev *dev, struct ice_rx_queue *rxq)
+@@ -48,13 +48,14 @@ ice_dcf_init_rxq(struct rte_eth_dev *dev, struct ice_rx_queue *rxq)
@@ -51 +52 @@
-index fc9bb5a3e7..20352b07af 100644
+index f9a475cbb8..8ac9411083 100644
@@ -54 +55 @@
-@@ -258,7 +258,7 @@ ice_program_hw_rx_queue(struct ice_rx_queue *rxq)
+@@ -231,7 +231,7 @@ ice_program_hw_rx_queue(struct ice_rx_queue *rxq)
@@ -63 +64 @@
-@@ -268,8 +268,8 @@ ice_program_hw_rx_queue(struct ice_rx_queue *rxq)
+@@ -241,8 +241,8 @@ ice_program_hw_rx_queue(struct ice_rx_queue *rxq)
^ permalink raw reply [flat|nested] 208+ messages in thread
* [dpdk-stable] patch 'net/ice/base: fix first profile mask' has been queued to stable release 20.11.3
2021-07-12 13:03 [dpdk-stable] patch 'graph: fix memory leak in stats' has been queued to stable release 20.11.3 luca.boccassi
` (46 preceding siblings ...)
2021-07-12 13:04 ` [dpdk-stable] patch 'net/ice: fix overflow in maximum packet length config' " luca.boccassi
@ 2021-07-12 13:04 ` luca.boccassi
2021-07-13 2:07 ` Wu, Wenjun1
2021-07-12 13:04 ` [dpdk-stable] patch 'net/i40e: fix flow director input set conflict' " luca.boccassi
` (67 subsequent siblings)
115 siblings, 1 reply; 208+ messages in thread
From: luca.boccassi @ 2021-07-12 13:04 UTC (permalink / raw)
To: Wenjun Wu; +Cc: Qi Zhang, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.3
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/14/21. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/d2db814c040ba66f20e6e3e411b4f7e6f418610b
Thanks.
Luca Boccassi
---
From d2db814c040ba66f20e6e3e411b4f7e6f418610b Mon Sep 17 00:00:00 2001
From: Wenjun Wu <wenjun1.wu@intel.com>
Date: Mon, 21 Jun 2021 16:59:23 +0800
Subject: [PATCH] net/ice/base: fix first profile mask
[ upstream commit 148fdf2d3537cfbb912e9c619ace7205741d9a25 ]
Since each PF does not share the same structure space, the first
mask value should start at 0 instead of hw->pf_id * per_pf to avoid
address overflow. Otherwise, address space will overlap when
masks.first + masks.count > ICE_PROF_MASK_COUNT, and it may lead to
unexpected variable assignment, which causes segmentation fault.
Fixes: 9467486f179f ("net/ice/base: enable masking for RSS and FD field vectors")
Signed-off-by: Wenjun Wu <wenjun1.wu@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
---
drivers/net/ice/base/ice_flex_pipe.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ice/base/ice_flex_pipe.c b/drivers/net/ice/base/ice_flex_pipe.c
index d74fecbf5b..de2c696477 100644
--- a/drivers/net/ice/base/ice_flex_pipe.c
+++ b/drivers/net/ice/base/ice_flex_pipe.c
@@ -3125,7 +3125,7 @@ static void ice_init_prof_masks(struct ice_hw *hw, enum ice_block blk)
per_pf = ICE_PROF_MASK_COUNT / hw->dev_caps.num_funcs;
hw->blk[blk].masks.count = per_pf;
- hw->blk[blk].masks.first = hw->pf_id * per_pf;
+ hw->blk[blk].masks.first = 0;
ice_memset(hw->blk[blk].masks.masks, 0,
sizeof(hw->blk[blk].masks.masks), ICE_NONDMA_MEM);
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-07-12 13:41:39.174969941 +0100
+++ 0049-net-ice-base-fix-first-profile-mask.patch 2021-07-12 13:41:36.370120111 +0100
@@ -1 +1 @@
-From 148fdf2d3537cfbb912e9c619ace7205741d9a25 Mon Sep 17 00:00:00 2001
+From d2db814c040ba66f20e6e3e411b4f7e6f418610b Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 148fdf2d3537cfbb912e9c619ace7205741d9a25 ]
+
@@ -13 +14,0 @@
-Cc: stable@dpdk.org
@@ -22 +23 @@
-index b3cea731f3..829d88bba6 100644
+index d74fecbf5b..de2c696477 100644
@@ -25 +26 @@
-@@ -3432,7 +3432,7 @@ static void ice_init_prof_masks(struct ice_hw *hw, enum ice_block blk)
+@@ -3125,7 +3125,7 @@ static void ice_init_prof_masks(struct ice_hw *hw, enum ice_block blk)
^ permalink raw reply [flat|nested] 208+ messages in thread
* Re: [dpdk-stable] patch 'net/ice/base: fix first profile mask' has been queued to stable release 20.11.3
2021-07-12 13:04 ` [dpdk-stable] patch 'net/ice/base: fix first profile mask' " luca.boccassi
@ 2021-07-13 2:07 ` Wu, Wenjun1
2021-07-15 14:57 ` Luca Boccassi
0 siblings, 1 reply; 208+ messages in thread
From: Wu, Wenjun1 @ 2021-07-13 2:07 UTC (permalink / raw)
To: luca.boccassi; +Cc: Zhang, Qi Z, stable
Hi Luca,
Please do not apply this patch to stable branch. Since this fix may have some side effects, and the problem mentioned in this patch is also related to hardware issue.
I will submit a revert patch to dev later.
Regards,
Wenjun
-----Original Message-----
From: luca.boccassi@gmail.com <luca.boccassi@gmail.com>
Sent: Monday, July 12, 2021 9:05 PM
To: Wu, Wenjun1 <wenjun1.wu@intel.com>
Cc: Zhang, Qi Z <qi.z.zhang@intel.com>; dpdk stable <stable@dpdk.org>
Subject: patch 'net/ice/base: fix first profile mask' has been queued to stable release 20.11.3
Hi,
FYI, your patch has been queued to stable release 20.11.3
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/14/21. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/d2db814c040ba66f20e6e3e411b4f7e6f418610b
Thanks.
Luca Boccassi
---
From d2db814c040ba66f20e6e3e411b4f7e6f418610b Mon Sep 17 00:00:00 2001
From: Wenjun Wu <wenjun1.wu@intel.com>
Date: Mon, 21 Jun 2021 16:59:23 +0800
Subject: [PATCH] net/ice/base: fix first profile mask
[ upstream commit 148fdf2d3537cfbb912e9c619ace7205741d9a25 ]
Since each PF does not share the same structure space, the first mask value should start at 0 instead of hw->pf_id * per_pf to avoid address overflow. Otherwise, address space will overlap when masks.first + masks.count > ICE_PROF_MASK_COUNT, and it may lead to unexpected variable assignment, which causes segmentation fault.
Fixes: 9467486f179f ("net/ice/base: enable masking for RSS and FD field vectors")
Signed-off-by: Wenjun Wu <wenjun1.wu@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
---
drivers/net/ice/base/ice_flex_pipe.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ice/base/ice_flex_pipe.c b/drivers/net/ice/base/ice_flex_pipe.c
index d74fecbf5b..de2c696477 100644
--- a/drivers/net/ice/base/ice_flex_pipe.c
+++ b/drivers/net/ice/base/ice_flex_pipe.c
@@ -3125,7 +3125,7 @@ static void ice_init_prof_masks(struct ice_hw *hw, enum ice_block blk)
per_pf = ICE_PROF_MASK_COUNT / hw->dev_caps.num_funcs;
hw->blk[blk].masks.count = per_pf;
- hw->blk[blk].masks.first = hw->pf_id * per_pf;
+ hw->blk[blk].masks.first = 0;
ice_memset(hw->blk[blk].masks.masks, 0,
sizeof(hw->blk[blk].masks.masks), ICE_NONDMA_MEM);
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-07-12 13:41:39.174969941 +0100
+++ 0049-net-ice-base-fix-first-profile-mask.patch 2021-07-12 13:41:36.370120111 +0100
@@ -1 +1 @@
-From 148fdf2d3537cfbb912e9c619ace7205741d9a25 Mon Sep 17 00:00:00 2001
+From d2db814c040ba66f20e6e3e411b4f7e6f418610b Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 148fdf2d3537cfbb912e9c619ace7205741d9a25 ]
+
@@ -13 +14,0 @@
-Cc: stable@dpdk.org
@@ -22 +23 @@
-index b3cea731f3..829d88bba6 100644
+index d74fecbf5b..de2c696477 100644
@@ -25 +26 @@
-@@ -3432,7 +3432,7 @@ static void ice_init_prof_masks(struct ice_hw *hw, enum ice_block blk)
+@@ -3125,7 +3125,7 @@ static void ice_init_prof_masks(struct ice_hw
+*hw, enum ice_block blk)
^ permalink raw reply [flat|nested] 208+ messages in thread
* Re: [dpdk-stable] patch 'net/ice/base: fix first profile mask' has been queued to stable release 20.11.3
2021-07-13 2:07 ` Wu, Wenjun1
@ 2021-07-15 14:57 ` Luca Boccassi
0 siblings, 0 replies; 208+ messages in thread
From: Luca Boccassi @ 2021-07-15 14:57 UTC (permalink / raw)
To: Wu, Wenjun1; +Cc: Zhang, Qi Z, stable
On Tue, 2021-07-13 at 02:07 +0000, Wu, Wenjun1 wrote:
> Hi Luca,
>
> Please do not apply this patch to stable branch. Since this fix may have some side effects, and the problem mentioned in this patch is also related to hardware issue.
> I will submit a revert patch to dev later.
>
> Regards,
> Wenjun
Hi,
Ok, no problem, removed.
--
Kind regards,
Luca Boccassi
^ permalink raw reply [flat|nested] 208+ messages in thread
* [dpdk-stable] patch 'net/i40e: fix flow director input set conflict' has been queued to stable release 20.11.3
2021-07-12 13:03 [dpdk-stable] patch 'graph: fix memory leak in stats' has been queued to stable release 20.11.3 luca.boccassi
` (47 preceding siblings ...)
2021-07-12 13:04 ` [dpdk-stable] patch 'net/ice/base: fix first profile mask' " luca.boccassi
@ 2021-07-12 13:04 ` luca.boccassi
2021-07-12 13:04 ` [dpdk-stable] patch 'net/i40e: fix multi-process shared data' " luca.boccassi
` (66 subsequent siblings)
115 siblings, 0 replies; 208+ messages in thread
From: luca.boccassi @ 2021-07-12 13:04 UTC (permalink / raw)
To: Beilei Xing; +Cc: Lingli Chen, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.3
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/14/21. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/5299dc34f4682c29cdd735d9f5f2f65f6d7b8460
Thanks.
Luca Boccassi
---
From 5299dc34f4682c29cdd735d9f5f2f65f6d7b8460 Mon Sep 17 00:00:00 2001
From: Beilei Xing <beilei.xing@intel.com>
Date: Thu, 24 Jun 2021 15:29:56 +0800
Subject: [PATCH] net/i40e: fix flow director input set conflict
[ upstream commit 2fefa0942e75330e09b8ad7513e89e4a66dd738f ]
Currently, there'll be conflict error when running
the following commands:
1. flow create 0 ingress
pattern eth / ipv4 / udp src is 32 / end
actions queue index 2 / end
2. flow destroy 0 rule 0
3. flow create 0 ingress
pattern eth / ipv4 / udp dst is 32 / end
actions queue index 2 / end
This patch fixes the input set conflict issue.
Fixes: 42044b69c67d ("net/i40e: support input set selection for FDIR")
Fixes: 4a072ad43442 ("net/i40e: fix flow director config after flow validate")
Signed-off-by: Beilei Xing <beilei.xing@intel.com>
Tested-by: Lingli Chen <linglix.chen@intel.com>
---
drivers/net/i40e/i40e_ethdev.c | 5 +++++
drivers/net/i40e/i40e_ethdev.h | 2 +-
drivers/net/i40e/i40e_fdir.c | 7 ++++---
drivers/net/i40e/i40e_flow.c | 2 +-
4 files changed, 11 insertions(+), 5 deletions(-)
diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c
index 100d42d6bd..63a9fc04d0 100644
--- a/drivers/net/i40e/i40e_ethdev.c
+++ b/drivers/net/i40e/i40e_ethdev.c
@@ -1082,6 +1082,7 @@ i40e_init_fdir_filter_list(struct rte_eth_dev *dev)
char fdir_hash_name[RTE_HASH_NAMESIZE];
uint32_t alloc = hw->func_caps.fd_filters_guaranteed;
uint32_t best = hw->func_caps.fd_filters_best_effort;
+ enum i40e_filter_pctype pctype;
struct rte_bitmap *bmp = NULL;
uint32_t bmp_size;
void *mem = NULL;
@@ -1130,6 +1131,10 @@ i40e_init_fdir_filter_list(struct rte_eth_dev *dev)
goto err_fdir_filter_array_alloc;
}
+ for (pctype = I40E_FILTER_PCTYPE_NONF_IPV4_UDP;
+ pctype <= I40E_FILTER_PCTYPE_L2_PAYLOAD; pctype++)
+ pf->fdir.flow_count[pctype] = 0;
+
fdir_info->fdir_space_size = alloc + best;
fdir_info->fdir_actual_cnt = 0;
fdir_info->fdir_guarantee_total_space = alloc;
diff --git a/drivers/net/i40e/i40e_ethdev.h b/drivers/net/i40e/i40e_ethdev.h
index aeabe5a205..ba1bb3dc98 100644
--- a/drivers/net/i40e/i40e_ethdev.h
+++ b/drivers/net/i40e/i40e_ethdev.h
@@ -786,7 +786,7 @@ struct i40e_fdir_info {
bool flex_pit_flag[I40E_MAX_FLXPLD_LAYER];
bool flex_mask_flag[I40E_FILTER_PCTYPE_MAX];
- bool inset_flag[I40E_FILTER_PCTYPE_MAX]; /* Mark if input set is set */
+ uint32_t flow_count[I40E_FILTER_PCTYPE_MAX];
uint32_t flex_flow_count[I40E_MAX_FLXPLD_LAYER];
};
diff --git a/drivers/net/i40e/i40e_fdir.c b/drivers/net/i40e/i40e_fdir.c
index a447cfdd92..5f8e167632 100644
--- a/drivers/net/i40e/i40e_fdir.c
+++ b/drivers/net/i40e/i40e_fdir.c
@@ -1606,13 +1606,13 @@ i40e_flow_set_fdir_inset(struct i40e_pf *pf,
}
/* Check if the configuration is conflicted */
- if (pf->fdir.inset_flag[pctype] &&
+ if (pf->fdir.flow_count[pctype] &&
memcmp(&pf->fdir.input_set[pctype], &input_set, sizeof(uint64_t))) {
PMD_DRV_LOG(ERR, "Conflict with the first rule's input set.");
return -EINVAL;
}
- if (pf->fdir.inset_flag[pctype] &&
+ if (pf->fdir.flow_count[pctype] &&
!memcmp(&pf->fdir.input_set[pctype], &input_set, sizeof(uint64_t)))
return 0;
@@ -1665,7 +1665,6 @@ i40e_flow_set_fdir_inset(struct i40e_pf *pf,
I40E_WRITE_FLUSH(hw);
pf->fdir.input_set[pctype] = input_set;
- pf->fdir.inset_flag[pctype] = 1;
return 0;
}
@@ -1889,11 +1888,13 @@ i40e_flow_add_del_fdir_filter(struct rte_eth_dev *dev,
}
if (add) {
+ fdir_info->flow_count[pctype]++;
fdir_info->fdir_actual_cnt++;
if (fdir_info->fdir_invalprio == 1 &&
fdir_info->fdir_guarantee_free_space > 0)
fdir_info->fdir_guarantee_free_space--;
} else {
+ fdir_info->flow_count[pctype]--;
fdir_info->fdir_actual_cnt--;
if (fdir_info->fdir_invalprio == 1 &&
fdir_info->fdir_guarantee_free_space <
diff --git a/drivers/net/i40e/i40e_flow.c b/drivers/net/i40e/i40e_flow.c
index 19bdce0195..7de1a8dbc0 100644
--- a/drivers/net/i40e/i40e_flow.c
+++ b/drivers/net/i40e/i40e_flow.c
@@ -5501,7 +5501,7 @@ i40e_flow_flush_fdir_filter(struct i40e_pf *pf)
for (pctype = I40E_FILTER_PCTYPE_NONF_IPV4_UDP;
pctype <= I40E_FILTER_PCTYPE_L2_PAYLOAD; pctype++) {
- pf->fdir.inset_flag[pctype] = 0;
+ pf->fdir.flow_count[pctype] = 0;
pf->fdir.flex_mask_flag[pctype] = 0;
}
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-07-12 13:41:39.226644617 +0100
+++ 0050-net-i40e-fix-flow-director-input-set-conflict.patch 2021-07-12 13:41:36.398120694 +0100
@@ -1 +1 @@
-From 2fefa0942e75330e09b8ad7513e89e4a66dd738f Mon Sep 17 00:00:00 2001
+From 5299dc34f4682c29cdd735d9f5f2f65f6d7b8460 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 2fefa0942e75330e09b8ad7513e89e4a66dd738f ]
+
@@ -20 +21,0 @@
-Cc: stable@dpdk.org
@@ -32 +33 @@
-index dd61258739..df716c180f 100644
+index 100d42d6bd..63a9fc04d0 100644
@@ -35 +36 @@
-@@ -1087,6 +1087,7 @@ i40e_init_fdir_filter_list(struct rte_eth_dev *dev)
+@@ -1082,6 +1082,7 @@ i40e_init_fdir_filter_list(struct rte_eth_dev *dev)
@@ -43 +44 @@
-@@ -1135,6 +1136,10 @@ i40e_init_fdir_filter_list(struct rte_eth_dev *dev)
+@@ -1130,6 +1131,10 @@ i40e_init_fdir_filter_list(struct rte_eth_dev *dev)
@@ -55 +56 @@
-index ba6acd1878..585a0d8eb2 100644
+index aeabe5a205..ba1bb3dc98 100644
@@ -58 +59 @@
-@@ -788,7 +788,7 @@ struct i40e_fdir_info {
+@@ -786,7 +786,7 @@ struct i40e_fdir_info {
@@ -68 +69 @@
-index 20658816ee..6f73936091 100644
+index a447cfdd92..5f8e167632 100644
@@ -71 +72 @@
-@@ -1607,13 +1607,13 @@ i40e_flow_set_fdir_inset(struct i40e_pf *pf,
+@@ -1606,13 +1606,13 @@ i40e_flow_set_fdir_inset(struct i40e_pf *pf,
@@ -87 +88 @@
-@@ -1666,7 +1666,6 @@ i40e_flow_set_fdir_inset(struct i40e_pf *pf,
+@@ -1665,7 +1665,6 @@ i40e_flow_set_fdir_inset(struct i40e_pf *pf,
@@ -95 +96 @@
-@@ -1890,11 +1889,13 @@ i40e_flow_add_del_fdir_filter(struct rte_eth_dev *dev,
+@@ -1889,11 +1888,13 @@ i40e_flow_add_del_fdir_filter(struct rte_eth_dev *dev,
@@ -110 +111 @@
-index 2cc9ad9ef7..ff8441b378 100644
+index 19bdce0195..7de1a8dbc0 100644
@@ -113 +114 @@
-@@ -4940,7 +4940,7 @@ i40e_flow_flush_fdir_filter(struct i40e_pf *pf)
+@@ -5501,7 +5501,7 @@ i40e_flow_flush_fdir_filter(struct i40e_pf *pf)
^ permalink raw reply [flat|nested] 208+ messages in thread
* [dpdk-stable] patch 'net/i40e: fix multi-process shared data' has been queued to stable release 20.11.3
2021-07-12 13:03 [dpdk-stable] patch 'graph: fix memory leak in stats' has been queued to stable release 20.11.3 luca.boccassi
` (48 preceding siblings ...)
2021-07-12 13:04 ` [dpdk-stable] patch 'net/i40e: fix flow director input set conflict' " luca.boccassi
@ 2021-07-12 13:04 ` luca.boccassi
2021-07-12 13:04 ` [dpdk-stable] patch 'vhost: fix missing memory table NUMA realloc' " luca.boccassi
` (65 subsequent siblings)
115 siblings, 0 replies; 208+ messages in thread
From: luca.boccassi @ 2021-07-12 13:04 UTC (permalink / raw)
To: Dapeng Yu; +Cc: Qi Zhang, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.3
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/14/21. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/37a61f47701ff59cc36dd37d5feb4bc8bf90385a
Thanks.
Luca Boccassi
---
From 37a61f47701ff59cc36dd37d5feb4bc8bf90385a Mon Sep 17 00:00:00 2001
From: Dapeng Yu <dapengx.yu@intel.com>
Date: Mon, 21 Jun 2021 15:23:53 +0800
Subject: [PATCH] net/i40e: fix multi-process shared data
[ upstream commit e391a7b7f815795eacfae3240c4405353cf37a53 ]
The rte_eth_devices array is not in share memory, it should not be
referenced by i40e_adapter which is shared by primary and secondary.
Any process set i40e_adapter->eth_dev will corrupt another process's
context.
The patch removed the field "eth_dev" from i40e_adapter.
Now, when the data paths try to access the rte_eth_dev_data instance,
they should replace adapter->eth_dev->data with adapter->pf.dev_data.
Fixes: 4861cde46116 ("i40e: new poll mode driver")
Signed-off-by: Dapeng Yu <dapengx.yu@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
---
drivers/net/i40e/i40e_ethdev.c | 44 +++++++++++++-------------
drivers/net/i40e/i40e_ethdev.h | 7 ++--
drivers/net/i40e/i40e_fdir.c | 4 +--
drivers/net/i40e/i40e_flow.c | 2 +-
drivers/net/i40e/i40e_rxtx.c | 4 +--
drivers/net/i40e/i40e_vf_representor.c | 37 ++++++++++++----------
6 files changed, 51 insertions(+), 47 deletions(-)
diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c
index 63a9fc04d0..d617e9c71b 100644
--- a/drivers/net/i40e/i40e_ethdev.c
+++ b/drivers/net/i40e/i40e_ethdev.c
@@ -727,10 +727,11 @@ i40e_write_global_rx_ctl(struct i40e_hw *hw, uint32_t reg_addr,
uint32_t reg_val)
{
uint32_t ori_reg_val;
- struct rte_eth_dev *dev;
+ struct rte_eth_dev_data *dev_data =
+ ((struct i40e_adapter *)hw->back)->pf.dev_data;
+ struct rte_eth_dev *dev = &rte_eth_devices[dev_data->port_id];
ori_reg_val = i40e_read_rx_ctl(hw, reg_addr);
- dev = ((struct i40e_adapter *)hw->back)->eth_dev;
i40e_write_rx_ctl(hw, reg_addr, reg_val);
if (ori_reg_val != reg_val)
PMD_DRV_LOG(WARNING,
@@ -1321,7 +1322,9 @@ i40e_aq_debug_write_global_register(struct i40e_hw *hw,
struct i40e_asq_cmd_details *cmd_details)
{
uint64_t ori_reg_val;
- struct rte_eth_dev *dev;
+ struct rte_eth_dev_data *dev_data =
+ ((struct i40e_adapter *)hw->back)->pf.dev_data;
+ struct rte_eth_dev *dev = &rte_eth_devices[dev_data->port_id];
int ret;
ret = i40e_aq_debug_read_register(hw, reg_addr, &ori_reg_val, NULL);
@@ -1331,7 +1334,6 @@ i40e_aq_debug_write_global_register(struct i40e_hw *hw,
reg_addr);
return -EIO;
}
- dev = ((struct i40e_adapter *)hw->back)->eth_dev;
if (ori_reg_val != reg_val)
PMD_DRV_LOG(WARNING,
@@ -1506,7 +1508,6 @@ eth_i40e_dev_init(struct rte_eth_dev *dev, void *init_params __rte_unused)
dev->data->dev_flags |= RTE_ETH_DEV_AUTOFILL_QUEUE_XSTATS;
pf->adapter = I40E_DEV_PRIVATE_TO_ADAPTER(dev->data->dev_private);
- pf->adapter->eth_dev = dev;
pf->dev_data = dev->data;
hw->back = I40E_PF_TO_ADAPTER(pf);
@@ -2039,7 +2040,7 @@ err:
void
i40e_vsi_queues_unbind_intr(struct i40e_vsi *vsi)
{
- struct rte_eth_dev *dev = vsi->adapter->eth_dev;
+ struct rte_eth_dev *dev = I40E_VSI_TO_ETH_DEV(vsi);
struct rte_pci_device *pci_dev = RTE_ETH_DEV_TO_PCI(dev);
struct rte_intr_handle *intr_handle = &pci_dev->intr_handle;
struct i40e_hw *hw = I40E_VSI_TO_HW(vsi);
@@ -2155,7 +2156,7 @@ __vsi_queues_bind_intr(struct i40e_vsi *vsi, uint16_t msix_vect,
int
i40e_vsi_queues_bind_intr(struct i40e_vsi *vsi, uint16_t itr_idx)
{
- struct rte_eth_dev *dev = vsi->adapter->eth_dev;
+ struct rte_eth_dev *dev = I40E_VSI_TO_ETH_DEV(vsi);
struct rte_pci_device *pci_dev = RTE_ETH_DEV_TO_PCI(dev);
struct rte_intr_handle *intr_handle = &pci_dev->intr_handle;
struct i40e_hw *hw = I40E_VSI_TO_HW(vsi);
@@ -2231,7 +2232,7 @@ i40e_vsi_queues_bind_intr(struct i40e_vsi *vsi, uint16_t itr_idx)
void
i40e_vsi_enable_queues_intr(struct i40e_vsi *vsi)
{
- struct rte_eth_dev *dev = vsi->adapter->eth_dev;
+ struct rte_eth_dev *dev = I40E_VSI_TO_ETH_DEV(vsi);
struct rte_pci_device *pci_dev = RTE_ETH_DEV_TO_PCI(dev);
struct rte_intr_handle *intr_handle = &pci_dev->intr_handle;
struct i40e_hw *hw = I40E_VSI_TO_HW(vsi);
@@ -2258,7 +2259,7 @@ i40e_vsi_enable_queues_intr(struct i40e_vsi *vsi)
void
i40e_vsi_disable_queues_intr(struct i40e_vsi *vsi)
{
- struct rte_eth_dev *dev = vsi->adapter->eth_dev;
+ struct rte_eth_dev *dev = I40E_VSI_TO_ETH_DEV(vsi);
struct rte_pci_device *pci_dev = RTE_ETH_DEV_TO_PCI(dev);
struct rte_intr_handle *intr_handle = &pci_dev->intr_handle;
struct i40e_hw *hw = I40E_VSI_TO_HW(vsi);
@@ -6472,8 +6473,7 @@ i40e_dev_tx_init(struct i40e_pf *pf)
break;
}
if (ret == I40E_SUCCESS)
- i40e_set_tx_function(container_of(pf, struct i40e_adapter, pf)
- ->eth_dev);
+ i40e_set_tx_function(&rte_eth_devices[pf->dev_data->port_id]);
return ret;
}
@@ -6501,8 +6501,7 @@ i40e_dev_rx_init(struct i40e_pf *pf)
}
}
if (ret == I40E_SUCCESS)
- i40e_set_rx_function(container_of(pf, struct i40e_adapter, pf)
- ->eth_dev);
+ i40e_set_rx_function(&rte_eth_devices[pf->dev_data->port_id]);
return ret;
}
@@ -7941,7 +7940,7 @@ i40e_status_code i40e_replace_mpls_l1_filter(struct i40e_pf *pf)
struct i40e_aqc_replace_cloud_filters_cmd filter_replace;
struct i40e_aqc_replace_cloud_filters_cmd_buf filter_replace_buf;
struct i40e_hw *hw = I40E_PF_TO_HW(pf);
- struct rte_eth_dev *dev = ((struct i40e_adapter *)hw->back)->eth_dev;
+ struct rte_eth_dev *dev = &rte_eth_devices[pf->dev_data->port_id];
enum i40e_status_code status = I40E_SUCCESS;
if (pf->support_multi_driver) {
@@ -8002,7 +8001,7 @@ i40e_status_code i40e_replace_mpls_cloud_filter(struct i40e_pf *pf)
struct i40e_aqc_replace_cloud_filters_cmd filter_replace;
struct i40e_aqc_replace_cloud_filters_cmd_buf filter_replace_buf;
struct i40e_hw *hw = I40E_PF_TO_HW(pf);
- struct rte_eth_dev *dev = ((struct i40e_adapter *)hw->back)->eth_dev;
+ struct rte_eth_dev *dev = &rte_eth_devices[pf->dev_data->port_id];
enum i40e_status_code status = I40E_SUCCESS;
if (pf->support_multi_driver) {
@@ -8077,7 +8076,7 @@ i40e_replace_gtp_l1_filter(struct i40e_pf *pf)
struct i40e_aqc_replace_cloud_filters_cmd filter_replace;
struct i40e_aqc_replace_cloud_filters_cmd_buf filter_replace_buf;
struct i40e_hw *hw = I40E_PF_TO_HW(pf);
- struct rte_eth_dev *dev = ((struct i40e_adapter *)hw->back)->eth_dev;
+ struct rte_eth_dev *dev = &rte_eth_devices[pf->dev_data->port_id];
enum i40e_status_code status = I40E_SUCCESS;
if (pf->support_multi_driver) {
@@ -8165,7 +8164,7 @@ i40e_status_code i40e_replace_gtp_cloud_filter(struct i40e_pf *pf)
struct i40e_aqc_replace_cloud_filters_cmd filter_replace;
struct i40e_aqc_replace_cloud_filters_cmd_buf filter_replace_buf;
struct i40e_hw *hw = I40E_PF_TO_HW(pf);
- struct rte_eth_dev *dev = ((struct i40e_adapter *)hw->back)->eth_dev;
+ struct rte_eth_dev *dev = &rte_eth_devices[pf->dev_data->port_id];
enum i40e_status_code status = I40E_SUCCESS;
if (pf->support_multi_driver) {
@@ -8240,7 +8239,7 @@ i40e_replace_port_l1_filter(struct i40e_pf *pf,
struct i40e_aqc_replace_cloud_filters_cmd filter_replace;
enum i40e_status_code status = I40E_SUCCESS;
struct i40e_hw *hw = I40E_PF_TO_HW(pf);
- struct rte_eth_dev *dev = ((struct i40e_adapter *)hw->back)->eth_dev;
+ struct rte_eth_dev *dev = &rte_eth_devices[pf->dev_data->port_id];
if (pf->support_multi_driver) {
PMD_DRV_LOG(ERR, "Replace l1 filter is not supported.");
@@ -8312,7 +8311,7 @@ i40e_replace_port_cloud_filter(struct i40e_pf *pf,
struct i40e_aqc_replace_cloud_filters_cmd filter_replace;
enum i40e_status_code status = I40E_SUCCESS;
struct i40e_hw *hw = I40E_PF_TO_HW(pf);
- struct rte_eth_dev *dev = ((struct i40e_adapter *)hw->back)->eth_dev;
+ struct rte_eth_dev *dev = &rte_eth_devices[pf->dev_data->port_id];
if (pf->support_multi_driver) {
PMD_DRV_LOG(ERR, "Replace cloud filter is not supported.");
@@ -9646,9 +9645,10 @@ void
i40e_check_write_global_reg(struct i40e_hw *hw, uint32_t addr, uint32_t val)
{
uint32_t reg = i40e_read_rx_ctl(hw, addr);
- struct rte_eth_dev *dev;
+ struct rte_eth_dev_data *dev_data =
+ ((struct i40e_adapter *)hw->back)->pf.dev_data;
+ struct rte_eth_dev *dev = &rte_eth_devices[dev_data->port_id];
- dev = ((struct i40e_adapter *)hw->back)->eth_dev;
if (reg != val) {
i40e_write_rx_ctl(hw, addr, val);
PMD_DRV_LOG(WARNING,
@@ -12493,7 +12493,7 @@ i40e_cloud_filter_qinq_create(struct i40e_pf *pf)
struct i40e_aqc_replace_cloud_filters_cmd filter_replace;
struct i40e_aqc_replace_cloud_filters_cmd_buf filter_replace_buf;
struct i40e_hw *hw = I40E_PF_TO_HW(pf);
- struct rte_eth_dev *dev = ((struct i40e_adapter *)hw->back)->eth_dev;
+ struct rte_eth_dev *dev = &rte_eth_devices[pf->dev_data->port_id];
if (pf->support_multi_driver) {
PMD_DRV_LOG(ERR, "Replace cloud filter is not supported.");
diff --git a/drivers/net/i40e/i40e_ethdev.h b/drivers/net/i40e/i40e_ethdev.h
index ba1bb3dc98..d80316d2f7 100644
--- a/drivers/net/i40e/i40e_ethdev.h
+++ b/drivers/net/i40e/i40e_ethdev.h
@@ -88,8 +88,10 @@
do { \
uint32_t ori_val; \
struct rte_eth_dev *dev; \
+ struct rte_eth_dev_data *dev_data; \
ori_val = I40E_READ_REG((hw), (reg)); \
- dev = ((struct i40e_adapter *)hw->back)->eth_dev; \
+ dev_data = ((struct i40e_adapter *)hw->back)->pf.dev_data; \
+ dev = &rte_eth_devices[dev_data->port_id]; \
I40E_PCI_REG_WRITE(I40E_PCI_REG_ADDR((hw), \
(reg)), (value)); \
if (ori_val != value) \
@@ -1264,7 +1266,6 @@ struct i40e_vf {
struct i40e_adapter {
/* Common for both PF and VF */
struct i40e_hw hw;
- struct rte_eth_dev *eth_dev;
/* Specific for PF or VF */
union {
@@ -1514,7 +1515,7 @@ i40e_get_vsi_from_adapter(struct i40e_adapter *adapter)
#define I40E_VSI_TO_DEV_DATA(vsi) \
(((struct i40e_vsi *)vsi)->adapter->pf.dev_data)
#define I40E_VSI_TO_ETH_DEV(vsi) \
- (((struct i40e_vsi *)vsi)->adapter->eth_dev)
+ (&rte_eth_devices[((struct i40e_vsi *)vsi)->adapter->pf.dev_data->port_id])
/* I40E_PF_TO */
#define I40E_PF_TO_HW(pf) \
diff --git a/drivers/net/i40e/i40e_fdir.c b/drivers/net/i40e/i40e_fdir.c
index 5f8e167632..05fdcef24f 100644
--- a/drivers/net/i40e/i40e_fdir.c
+++ b/drivers/net/i40e/i40e_fdir.c
@@ -159,7 +159,7 @@ i40e_fdir_setup(struct i40e_pf *pf)
int err = I40E_SUCCESS;
char z_name[RTE_MEMZONE_NAMESIZE];
const struct rte_memzone *mz = NULL;
- struct rte_eth_dev *eth_dev = pf->adapter->eth_dev;
+ struct rte_eth_dev *eth_dev = &rte_eth_devices[pf->dev_data->port_id];
uint16_t i;
if ((pf->flags & I40E_FLAG_FDIR) == 0) {
@@ -283,7 +283,7 @@ i40e_fdir_teardown(struct i40e_pf *pf)
{
struct i40e_hw *hw = I40E_PF_TO_HW(pf);
struct i40e_vsi *vsi;
- struct rte_eth_dev *dev = pf->adapter->eth_dev;
+ struct rte_eth_dev *dev = &rte_eth_devices[pf->dev_data->port_id];
vsi = pf->fdir.fdir_vsi;
if (!vsi)
diff --git a/drivers/net/i40e/i40e_flow.c b/drivers/net/i40e/i40e_flow.c
index 7de1a8dbc0..70c5c72326 100644
--- a/drivers/net/i40e/i40e_flow.c
+++ b/drivers/net/i40e/i40e_flow.c
@@ -5458,7 +5458,7 @@ i40e_flow_flush(struct rte_eth_dev *dev, struct rte_flow_error *error)
static int
i40e_flow_flush_fdir_filter(struct i40e_pf *pf)
{
- struct rte_eth_dev *dev = pf->adapter->eth_dev;
+ struct rte_eth_dev *dev = &rte_eth_devices[pf->dev_data->port_id];
struct i40e_fdir_info *fdir_info = &pf->fdir;
struct i40e_fdir_filter *fdir_filter;
enum i40e_filter_pctype pctype;
diff --git a/drivers/net/i40e/i40e_rxtx.c b/drivers/net/i40e/i40e_rxtx.c
index 3986842a62..39a69b74d1 100644
--- a/drivers/net/i40e/i40e_rxtx.c
+++ b/drivers/net/i40e/i40e_rxtx.c
@@ -2952,7 +2952,7 @@ i40e_fdir_setup_tx_resources(struct i40e_pf *pf)
return I40E_ERR_BAD_PTR;
}
- dev = pf->adapter->eth_dev;
+ dev = &rte_eth_devices[pf->dev_data->port_id];
/* Allocate the TX queue data structure. */
txq = rte_zmalloc_socket("i40e fdir tx queue",
@@ -3010,7 +3010,7 @@ i40e_fdir_setup_rx_resources(struct i40e_pf *pf)
return I40E_ERR_BAD_PTR;
}
- dev = pf->adapter->eth_dev;
+ dev = &rte_eth_devices[pf->dev_data->port_id];
/* Allocate the RX queue data structure. */
rxq = rte_zmalloc_socket("i40e fdir rx queue",
diff --git a/drivers/net/i40e/i40e_vf_representor.c b/drivers/net/i40e/i40e_vf_representor.c
index 9e40406a3d..7ab4b19a42 100644
--- a/drivers/net/i40e/i40e_vf_representor.c
+++ b/drivers/net/i40e/i40e_vf_representor.c
@@ -19,15 +19,18 @@ i40e_vf_representor_link_update(struct rte_eth_dev *ethdev,
int wait_to_complete)
{
struct i40e_vf_representor *representor = ethdev->data->dev_private;
+ struct rte_eth_dev *dev =
+ &rte_eth_devices[representor->adapter->pf.dev_data->port_id];
- return i40e_dev_link_update(representor->adapter->eth_dev,
- wait_to_complete);
+ return i40e_dev_link_update(dev, wait_to_complete);
}
static int
i40e_vf_representor_dev_infos_get(struct rte_eth_dev *ethdev,
struct rte_eth_dev_info *dev_info)
{
struct i40e_vf_representor *representor = ethdev->data->dev_private;
+ struct rte_eth_dev_data *pf_dev_data =
+ representor->adapter->pf.dev_data;
/* get dev info for the vdev */
dev_info->device = ethdev->device;
@@ -99,7 +102,7 @@ i40e_vf_representor_dev_infos_get(struct rte_eth_dev *ethdev,
};
dev_info->switch_info.name =
- representor->adapter->eth_dev->device->name;
+ rte_eth_devices[pf_dev_data->port_id].device->name;
dev_info->switch_info.domain_id = representor->switch_domain_id;
dev_info->switch_info.port_id = representor->vf_id;
@@ -213,7 +216,7 @@ i40e_vf_representor_stats_get(struct rte_eth_dev *ethdev,
int ret;
ret = rte_pmd_i40e_get_vf_native_stats(
- representor->adapter->eth_dev->data->port_id,
+ representor->adapter->pf.dev_data->port_id,
representor->vf_id, &native_stats);
if (ret == 0) {
i40evf_stat_update_48(
@@ -273,7 +276,7 @@ i40e_vf_representor_stats_reset(struct rte_eth_dev *ethdev)
struct i40e_vf_representor *representor = ethdev->data->dev_private;
return rte_pmd_i40e_get_vf_native_stats(
- representor->adapter->eth_dev->data->port_id,
+ representor->adapter->pf.dev_data->port_id,
representor->vf_id, &representor->stats_offset);
}
@@ -283,7 +286,7 @@ i40e_vf_representor_promiscuous_enable(struct rte_eth_dev *ethdev)
struct i40e_vf_representor *representor = ethdev->data->dev_private;
return rte_pmd_i40e_set_vf_unicast_promisc(
- representor->adapter->eth_dev->data->port_id,
+ representor->adapter->pf.dev_data->port_id,
representor->vf_id, 1);
}
@@ -293,7 +296,7 @@ i40e_vf_representor_promiscuous_disable(struct rte_eth_dev *ethdev)
struct i40e_vf_representor *representor = ethdev->data->dev_private;
return rte_pmd_i40e_set_vf_unicast_promisc(
- representor->adapter->eth_dev->data->port_id,
+ representor->adapter->pf.dev_data->port_id,
representor->vf_id, 0);
}
@@ -303,7 +306,7 @@ i40e_vf_representor_allmulticast_enable(struct rte_eth_dev *ethdev)
struct i40e_vf_representor *representor = ethdev->data->dev_private;
return rte_pmd_i40e_set_vf_multicast_promisc(
- representor->adapter->eth_dev->data->port_id,
+ representor->adapter->pf.dev_data->port_id,
representor->vf_id, 1);
}
@@ -313,7 +316,7 @@ i40e_vf_representor_allmulticast_disable(struct rte_eth_dev *ethdev)
struct i40e_vf_representor *representor = ethdev->data->dev_private;
return rte_pmd_i40e_set_vf_multicast_promisc(
- representor->adapter->eth_dev->data->port_id,
+ representor->adapter->pf.dev_data->port_id,
representor->vf_id, 0);
}
@@ -323,7 +326,7 @@ i40e_vf_representor_mac_addr_remove(struct rte_eth_dev *ethdev, uint32_t index)
struct i40e_vf_representor *representor = ethdev->data->dev_private;
rte_pmd_i40e_remove_vf_mac_addr(
- representor->adapter->eth_dev->data->port_id,
+ representor->adapter->pf.dev_data->port_id,
representor->vf_id, ðdev->data->mac_addrs[index]);
}
@@ -334,7 +337,7 @@ i40e_vf_representor_mac_addr_set(struct rte_eth_dev *ethdev,
struct i40e_vf_representor *representor = ethdev->data->dev_private;
return rte_pmd_i40e_set_vf_mac_addr(
- representor->adapter->eth_dev->data->port_id,
+ representor->adapter->pf.dev_data->port_id,
representor->vf_id, mac_addr);
}
@@ -346,7 +349,7 @@ i40e_vf_representor_vlan_filter_set(struct rte_eth_dev *ethdev,
uint64_t vf_mask = 1ULL << representor->vf_id;
return rte_pmd_i40e_set_vf_vlan_filter(
- representor->adapter->eth_dev->data->port_id,
+ representor->adapter->pf.dev_data->port_id,
vlan_id, vf_mask, on);
}
@@ -360,7 +363,7 @@ i40e_vf_representor_vlan_offload_set(struct rte_eth_dev *ethdev, int mask)
struct i40e_pf *pf;
uint32_t vfid;
- pdev = representor->adapter->eth_dev;
+ pdev = &rte_eth_devices[representor->adapter->pf.dev_data->port_id];
vfid = representor->vf_id;
if (!is_i40e_supported(pdev)) {
@@ -410,7 +413,7 @@ i40e_vf_representor_vlan_strip_queue_set(struct rte_eth_dev *ethdev,
struct i40e_vf_representor *representor = ethdev->data->dev_private;
rte_pmd_i40e_set_vf_vlan_stripq(
- representor->adapter->eth_dev->data->port_id,
+ representor->adapter->pf.dev_data->port_id,
representor->vf_id, on);
}
@@ -421,7 +424,7 @@ i40e_vf_representor_vlan_pvid_set(struct rte_eth_dev *ethdev, uint16_t vlan_id,
struct i40e_vf_representor *representor = ethdev->data->dev_private;
return rte_pmd_i40e_set_vf_vlan_insert(
- representor->adapter->eth_dev->data->port_id,
+ representor->adapter->pf.dev_data->port_id,
representor->vf_id, vlan_id);
}
@@ -487,7 +490,7 @@ i40e_vf_representor_init(struct rte_eth_dev *ethdev, void *init_params)
((struct i40e_vf_representor *)init_params)->adapter;
pf = I40E_DEV_PRIVATE_TO_PF(
- representor->adapter->eth_dev->data->dev_private);
+ representor->adapter->pf.dev_data->dev_private);
if (representor->vf_id >= pf->vf_num)
return -ENODEV;
@@ -519,7 +522,7 @@ i40e_vf_representor_init(struct rte_eth_dev *ethdev, void *init_params)
ethdev->data->mac_addrs = &vf->mac_addr;
/* Link state. Inherited from PF */
- link = &representor->adapter->eth_dev->data->dev_link;
+ link = &representor->adapter->pf.dev_data->dev_link;
ethdev->data->dev_link.link_speed = link->link_speed;
ethdev->data->dev_link.link_duplex = link->link_duplex;
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-07-12 13:41:39.297403515 +0100
+++ 0051-net-i40e-fix-multi-process-shared-data.patch 2021-07-12 13:41:36.430121361 +0100
@@ -1 +1 @@
-From e391a7b7f815795eacfae3240c4405353cf37a53 Mon Sep 17 00:00:00 2001
+From 37a61f47701ff59cc36dd37d5feb4bc8bf90385a Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit e391a7b7f815795eacfae3240c4405353cf37a53 ]
+
@@ -16 +17,0 @@
-Cc: stable@dpdk.org
@@ -25 +25,0 @@
- drivers/net/i40e/i40e_hash.c | 7 ++--
@@ -28 +28 @@
- 7 files changed, 55 insertions(+), 50 deletions(-)
+ 6 files changed, 51 insertions(+), 47 deletions(-)
@@ -31 +31 @@
-index df716c180f..5b0a7f2537 100644
+index 63a9fc04d0..d617e9c71b 100644
@@ -34 +34 @@
-@@ -732,10 +732,11 @@ i40e_write_global_rx_ctl(struct i40e_hw *hw, uint32_t reg_addr,
+@@ -727,10 +727,11 @@ i40e_write_global_rx_ctl(struct i40e_hw *hw, uint32_t reg_addr,
@@ -48 +48 @@
-@@ -1326,7 +1327,9 @@ i40e_aq_debug_write_global_register(struct i40e_hw *hw,
+@@ -1321,7 +1322,9 @@ i40e_aq_debug_write_global_register(struct i40e_hw *hw,
@@ -59 +59 @@
-@@ -1336,7 +1339,6 @@ i40e_aq_debug_write_global_register(struct i40e_hw *hw,
+@@ -1331,7 +1334,6 @@ i40e_aq_debug_write_global_register(struct i40e_hw *hw,
@@ -67 +67 @@
-@@ -1455,7 +1457,6 @@ eth_i40e_dev_init(struct rte_eth_dev *dev, void *init_params __rte_unused)
+@@ -1506,7 +1508,6 @@ eth_i40e_dev_init(struct rte_eth_dev *dev, void *init_params __rte_unused)
@@ -75 +75 @@
-@@ -1982,7 +1983,7 @@ err:
+@@ -2039,7 +2040,7 @@ err:
@@ -84 +84 @@
-@@ -2098,7 +2099,7 @@ __vsi_queues_bind_intr(struct i40e_vsi *vsi, uint16_t msix_vect,
+@@ -2155,7 +2156,7 @@ __vsi_queues_bind_intr(struct i40e_vsi *vsi, uint16_t msix_vect,
@@ -93 +93 @@
-@@ -2174,7 +2175,7 @@ i40e_vsi_queues_bind_intr(struct i40e_vsi *vsi, uint16_t itr_idx)
+@@ -2231,7 +2232,7 @@ i40e_vsi_queues_bind_intr(struct i40e_vsi *vsi, uint16_t itr_idx)
@@ -102 +102 @@
-@@ -2201,7 +2202,7 @@ i40e_vsi_enable_queues_intr(struct i40e_vsi *vsi)
+@@ -2258,7 +2259,7 @@ i40e_vsi_enable_queues_intr(struct i40e_vsi *vsi)
@@ -111 +111 @@
-@@ -6416,8 +6417,7 @@ i40e_dev_tx_init(struct i40e_pf *pf)
+@@ -6472,8 +6473,7 @@ i40e_dev_tx_init(struct i40e_pf *pf)
@@ -121 +121 @@
-@@ -6445,8 +6445,7 @@ i40e_dev_rx_init(struct i40e_pf *pf)
+@@ -6501,8 +6501,7 @@ i40e_dev_rx_init(struct i40e_pf *pf)
@@ -131 +131 @@
-@@ -7885,7 +7884,7 @@ i40e_status_code i40e_replace_mpls_l1_filter(struct i40e_pf *pf)
+@@ -7941,7 +7940,7 @@ i40e_status_code i40e_replace_mpls_l1_filter(struct i40e_pf *pf)
@@ -140 +140 @@
-@@ -7946,7 +7945,7 @@ i40e_status_code i40e_replace_mpls_cloud_filter(struct i40e_pf *pf)
+@@ -8002,7 +8001,7 @@ i40e_status_code i40e_replace_mpls_cloud_filter(struct i40e_pf *pf)
@@ -149 +149 @@
-@@ -8021,7 +8020,7 @@ i40e_replace_gtp_l1_filter(struct i40e_pf *pf)
+@@ -8077,7 +8076,7 @@ i40e_replace_gtp_l1_filter(struct i40e_pf *pf)
@@ -158 +158 @@
-@@ -8109,7 +8108,7 @@ i40e_status_code i40e_replace_gtp_cloud_filter(struct i40e_pf *pf)
+@@ -8165,7 +8164,7 @@ i40e_status_code i40e_replace_gtp_cloud_filter(struct i40e_pf *pf)
@@ -167 +167 @@
-@@ -8184,7 +8183,7 @@ i40e_replace_port_l1_filter(struct i40e_pf *pf,
+@@ -8240,7 +8239,7 @@ i40e_replace_port_l1_filter(struct i40e_pf *pf,
@@ -176 +176 @@
-@@ -8256,7 +8255,7 @@ i40e_replace_port_cloud_filter(struct i40e_pf *pf,
+@@ -8312,7 +8311,7 @@ i40e_replace_port_cloud_filter(struct i40e_pf *pf,
@@ -185 +185 @@
-@@ -9583,9 +9582,10 @@ void
+@@ -9646,9 +9645,10 @@ void
@@ -198 +198 @@
-@@ -12377,7 +12377,7 @@ i40e_cloud_filter_qinq_create(struct i40e_pf *pf)
+@@ -12493,7 +12493,7 @@ i40e_cloud_filter_qinq_create(struct i40e_pf *pf)
@@ -208 +208 @@
-index 585a0d8eb2..cd6deabd60 100644
+index ba1bb3dc98..d80316d2f7 100644
@@ -211 +211 @@
-@@ -90,8 +90,10 @@
+@@ -88,8 +88,10 @@
@@ -223 +223 @@
-@@ -1285,7 +1287,6 @@ struct i40e_vf {
+@@ -1264,7 +1266,6 @@ struct i40e_vf {
@@ -231 +231 @@
-@@ -1540,7 +1541,7 @@ i40e_get_vsi_from_adapter(struct i40e_adapter *adapter)
+@@ -1514,7 +1515,7 @@ i40e_get_vsi_from_adapter(struct i40e_adapter *adapter)
@@ -241 +241 @@
-index 6f73936091..af075fda2a 100644
+index 5f8e167632..05fdcef24f 100644
@@ -244 +244 @@
-@@ -160,7 +160,7 @@ i40e_fdir_setup(struct i40e_pf *pf)
+@@ -159,7 +159,7 @@ i40e_fdir_setup(struct i40e_pf *pf)
@@ -253 +253 @@
-@@ -284,7 +284,7 @@ i40e_fdir_teardown(struct i40e_pf *pf)
+@@ -283,7 +283,7 @@ i40e_fdir_teardown(struct i40e_pf *pf)
@@ -263 +263 @@
-index ff8441b378..3c1570bd9c 100644
+index 7de1a8dbc0..70c5c72326 100644
@@ -266 +266 @@
-@@ -4897,7 +4897,7 @@ i40e_flow_flush(struct rte_eth_dev *dev, struct rte_flow_error *error)
+@@ -5458,7 +5458,7 @@ i40e_flow_flush(struct rte_eth_dev *dev, struct rte_flow_error *error)
@@ -275,32 +274,0 @@
-diff --git a/drivers/net/i40e/i40e_hash.c b/drivers/net/i40e/i40e_hash.c
-index 8787a6996d..1fb8c9abfc 100644
---- a/drivers/net/i40e/i40e_hash.c
-+++ b/drivers/net/i40e/i40e_hash.c
-@@ -732,7 +732,7 @@ i40e_hash_config_region(struct i40e_pf *pf,
- const struct i40e_rte_flow_rss_conf *rss_conf)
- {
- struct i40e_hw *hw = &pf->adapter->hw;
-- struct rte_eth_dev *dev = pf->adapter->eth_dev;
-+ struct rte_eth_dev *dev = &rte_eth_devices[pf->dev_data->port_id];
- struct i40e_queue_region_info *regions = pf->queue_region.region;
- uint32_t num = pf->queue_region.queue_region_number;
- uint32_t i, region_id_mask = 0;
-@@ -1270,6 +1270,7 @@ i40e_hash_reset_conf(struct i40e_pf *pf,
- struct i40e_rte_flow_rss_conf *rss_conf)
- {
- struct i40e_hw *hw = &pf->adapter->hw;
-+ struct rte_eth_dev *dev;
- uint64_t inset;
- uint32_t idx;
- int ret;
-@@ -1283,8 +1284,8 @@ i40e_hash_reset_conf(struct i40e_pf *pf,
- }
-
- if (rss_conf->misc_reset_flags & I40E_HASH_FLOW_RESET_FLAG_REGION) {
-- ret = i40e_flush_queue_region_all_conf(pf->adapter->eth_dev,
-- hw, pf, 0);
-+ dev = &rte_eth_devices[pf->dev_data->port_id];
-+ ret = i40e_flush_queue_region_all_conf(dev, hw, pf, 0);
- if (ret)
- return ret;
-
@@ -308 +276 @@
-index ee19102ad3..8d65f287f4 100644
+index 3986842a62..39a69b74d1 100644
@@ -311 +279 @@
-@@ -3064,7 +3064,7 @@ i40e_fdir_setup_tx_resources(struct i40e_pf *pf)
+@@ -2952,7 +2952,7 @@ i40e_fdir_setup_tx_resources(struct i40e_pf *pf)
@@ -320 +288 @@
-@@ -3122,7 +3122,7 @@ i40e_fdir_setup_rx_resources(struct i40e_pf *pf)
+@@ -3010,7 +3010,7 @@ i40e_fdir_setup_rx_resources(struct i40e_pf *pf)
@@ -330 +298 @@
-index 7ed47c1a2c..0481b55381 100644
+index 9e40406a3d..7ab4b19a42 100644
^ permalink raw reply [flat|nested] 208+ messages in thread
* [dpdk-stable] patch 'vhost: fix missing memory table NUMA realloc' has been queued to stable release 20.11.3
2021-07-12 13:03 [dpdk-stable] patch 'graph: fix memory leak in stats' has been queued to stable release 20.11.3 luca.boccassi
` (49 preceding siblings ...)
2021-07-12 13:04 ` [dpdk-stable] patch 'net/i40e: fix multi-process shared data' " luca.boccassi
@ 2021-07-12 13:04 ` luca.boccassi
2021-07-12 13:04 ` [dpdk-stable] patch 'vhost: fix missing guest pages " luca.boccassi
` (64 subsequent siblings)
115 siblings, 0 replies; 208+ messages in thread
From: luca.boccassi @ 2021-07-12 13:04 UTC (permalink / raw)
To: Maxime Coquelin; +Cc: David Marchand, Chenbo Xia, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.3
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/14/21. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/a21845c789798d48b6b23754719e58b55439830f
Thanks.
Luca Boccassi
---
From a21845c789798d48b6b23754719e58b55439830f Mon Sep 17 00:00:00 2001
From: Maxime Coquelin <maxime.coquelin@redhat.com>
Date: Tue, 29 Jun 2021 18:11:27 +0200
Subject: [PATCH] vhost: fix missing memory table NUMA realloc
[ upstream commit 8119ca9114b2ab2d42732e2a8b5cb31c47ed4eb3 ]
When the guest allocates virtqueues on a different NUMA node
than the one the Vhost metadata are allocated, both the Vhost
device struct and the virtqueues struct are reallocated.
However, reallocating the Vhost memory table was missing, which
likely causes at least one cross-NUMA accesses for every burst
of packets.
This patch reallocates this table on the same NUMA node as the
other metadata.
Fixes: 552e8fd3d2b4 ("vhost: simplify memory regions handling")
Reported-by: David Marchand <david.marchand@redhat.com>
Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Reviewed-by: Chenbo Xia <chenbo.xia@intel.com>
---
lib/librte_vhost/vhost_user.c | 19 +++++++++++++++++--
1 file changed, 17 insertions(+), 2 deletions(-)
diff --git a/lib/librte_vhost/vhost_user.c b/lib/librte_vhost/vhost_user.c
index 78fb49b311..bef269298b 100644
--- a/lib/librte_vhost/vhost_user.c
+++ b/lib/librte_vhost/vhost_user.c
@@ -474,8 +474,8 @@ vhost_user_set_vring_num(struct virtio_net **pdev,
}
/*
- * Reallocate virtio_dev and vhost_virtqueue data structure to make them on the
- * same numa node as the memory of vring descriptor.
+ * Reallocate virtio_dev, vhost_virtqueue and related data structures to
+ * make them on the same numa node as the memory of vring descriptor.
*/
#ifdef RTE_LIBRTE_VHOST_NUMA
static struct virtio_net*
@@ -558,6 +558,9 @@ numa_realloc(struct virtio_net *dev, int index)
goto out;
}
if (oldnode != newnode) {
+ struct rte_vhost_memory *old_mem;
+ ssize_t mem_size;
+
VHOST_LOG_CONFIG(INFO,
"reallocate dev from %d to %d node\n",
oldnode, newnode);
@@ -569,6 +572,18 @@ numa_realloc(struct virtio_net *dev, int index)
memcpy(dev, old_dev, sizeof(*dev));
rte_free(old_dev);
+
+ mem_size = sizeof(struct rte_vhost_memory) +
+ sizeof(struct rte_vhost_mem_region) * dev->mem->nregions;
+ old_mem = dev->mem;
+ dev->mem = rte_malloc_socket(NULL, mem_size, 0, newnode);
+ if (!dev->mem) {
+ dev->mem = old_mem;
+ goto out;
+ }
+
+ memcpy(dev->mem, old_mem, mem_size);
+ rte_free(old_mem);
}
out:
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-07-12 13:41:39.371492516 +0100
+++ 0052-vhost-fix-missing-memory-table-NUMA-realloc.patch 2021-07-12 13:41:36.434121444 +0100
@@ -1 +1 @@
-From 8119ca9114b2ab2d42732e2a8b5cb31c47ed4eb3 Mon Sep 17 00:00:00 2001
+From a21845c789798d48b6b23754719e58b55439830f Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 8119ca9114b2ab2d42732e2a8b5cb31c47ed4eb3 ]
+
@@ -18 +19,0 @@
-Cc: stable@dpdk.org
@@ -24 +25 @@
- lib/vhost/vhost_user.c | 19 +++++++++++++++++--
+ lib/librte_vhost/vhost_user.c | 19 +++++++++++++++++--
@@ -27,5 +28,5 @@
-diff --git a/lib/vhost/vhost_user.c b/lib/vhost/vhost_user.c
-index 8f0eba6412..b5a84f3dcd 100644
---- a/lib/vhost/vhost_user.c
-+++ b/lib/vhost/vhost_user.c
-@@ -473,8 +473,8 @@ vhost_user_set_vring_num(struct virtio_net **pdev,
+diff --git a/lib/librte_vhost/vhost_user.c b/lib/librte_vhost/vhost_user.c
+index 78fb49b311..bef269298b 100644
+--- a/lib/librte_vhost/vhost_user.c
++++ b/lib/librte_vhost/vhost_user.c
+@@ -474,8 +474,8 @@ vhost_user_set_vring_num(struct virtio_net **pdev,
@@ -42 +43 @@
-@@ -557,6 +557,9 @@ numa_realloc(struct virtio_net *dev, int index)
+@@ -558,6 +558,9 @@ numa_realloc(struct virtio_net *dev, int index)
@@ -52 +53 @@
-@@ -568,6 +571,18 @@ numa_realloc(struct virtio_net *dev, int index)
+@@ -569,6 +572,18 @@ numa_realloc(struct virtio_net *dev, int index)
^ permalink raw reply [flat|nested] 208+ messages in thread
* [dpdk-stable] patch 'vhost: fix missing guest pages table NUMA realloc' has been queued to stable release 20.11.3
2021-07-12 13:03 [dpdk-stable] patch 'graph: fix memory leak in stats' has been queued to stable release 20.11.3 luca.boccassi
` (50 preceding siblings ...)
2021-07-12 13:04 ` [dpdk-stable] patch 'vhost: fix missing memory table NUMA realloc' " luca.boccassi
@ 2021-07-12 13:04 ` luca.boccassi
2021-07-12 13:04 ` [dpdk-stable] patch 'vhost: fix NUMA reallocation with multi-queue' " luca.boccassi
` (63 subsequent siblings)
115 siblings, 0 replies; 208+ messages in thread
From: luca.boccassi @ 2021-07-12 13:04 UTC (permalink / raw)
To: Maxime Coquelin; +Cc: Chenbo Xia, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.3
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/14/21. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/62c6d22fb03a331a89ffae89484e8036b05d8b0e
Thanks.
Luca Boccassi
---
From 62c6d22fb03a331a89ffae89484e8036b05d8b0e Mon Sep 17 00:00:00 2001
From: Maxime Coquelin <maxime.coquelin@redhat.com>
Date: Tue, 29 Jun 2021 18:11:28 +0200
Subject: [PATCH] vhost: fix missing guest pages table NUMA realloc
[ upstream commit 57589cdfd784e6704ded490d80038584d6ade9df ]
When the guest allocates virtqueues on a different NUMA node
than the one the Vhost metadata are allocated, both the Vhost
device struct and the virtqueues struct are reallocated.
However, reallocating the guest pages table was missing, which
likely causes at least one cross-NUMA accesses for every burst
of packets.
This patch reallocates this table on the same NUMA node as the
other metadata.
Fixes: e246896178e6 ("vhost: get guest/host physical address mappings")
Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Reviewed-by: Chenbo Xia <chenbo.xia@intel.com>
---
lib/librte_vhost/vhost_user.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/lib/librte_vhost/vhost_user.c b/lib/librte_vhost/vhost_user.c
index bef269298b..fcb78ad4ea 100644
--- a/lib/librte_vhost/vhost_user.c
+++ b/lib/librte_vhost/vhost_user.c
@@ -559,7 +559,8 @@ numa_realloc(struct virtio_net *dev, int index)
}
if (oldnode != newnode) {
struct rte_vhost_memory *old_mem;
- ssize_t mem_size;
+ struct guest_page *old_gp;
+ ssize_t mem_size, gp_size;
VHOST_LOG_CONFIG(INFO,
"reallocate dev from %d to %d node\n",
@@ -584,6 +585,17 @@ numa_realloc(struct virtio_net *dev, int index)
memcpy(dev->mem, old_mem, mem_size);
rte_free(old_mem);
+
+ gp_size = dev->max_guest_pages * sizeof(*dev->guest_pages);
+ old_gp = dev->guest_pages;
+ dev->guest_pages = rte_malloc_socket(NULL, gp_size, RTE_CACHE_LINE_SIZE, newnode);
+ if (!dev->guest_pages) {
+ dev->guest_pages = old_gp;
+ goto out;
+ }
+
+ memcpy(dev->guest_pages, old_gp, gp_size);
+ rte_free(old_gp);
}
out:
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-07-12 13:41:39.424165831 +0100
+++ 0053-vhost-fix-missing-guest-pages-table-NUMA-realloc.patch 2021-07-12 13:41:36.438121527 +0100
@@ -1 +1 @@
-From 57589cdfd784e6704ded490d80038584d6ade9df Mon Sep 17 00:00:00 2001
+From 62c6d22fb03a331a89ffae89484e8036b05d8b0e Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 57589cdfd784e6704ded490d80038584d6ade9df ]
+
@@ -18 +19,0 @@
-Cc: stable@dpdk.org
@@ -23 +24 @@
- lib/vhost/vhost_user.c | 14 +++++++++++++-
+ lib/librte_vhost/vhost_user.c | 14 +++++++++++++-
@@ -26,5 +27,5 @@
-diff --git a/lib/vhost/vhost_user.c b/lib/vhost/vhost_user.c
-index b5a84f3dcd..5fb055ea2e 100644
---- a/lib/vhost/vhost_user.c
-+++ b/lib/vhost/vhost_user.c
-@@ -558,7 +558,8 @@ numa_realloc(struct virtio_net *dev, int index)
+diff --git a/lib/librte_vhost/vhost_user.c b/lib/librte_vhost/vhost_user.c
+index bef269298b..fcb78ad4ea 100644
+--- a/lib/librte_vhost/vhost_user.c
++++ b/lib/librte_vhost/vhost_user.c
+@@ -559,7 +559,8 @@ numa_realloc(struct virtio_net *dev, int index)
@@ -40 +41 @@
-@@ -583,6 +584,17 @@ numa_realloc(struct virtio_net *dev, int index)
+@@ -584,6 +585,17 @@ numa_realloc(struct virtio_net *dev, int index)
^ permalink raw reply [flat|nested] 208+ messages in thread
* [dpdk-stable] patch 'vhost: fix NUMA reallocation with multi-queue' has been queued to stable release 20.11.3
2021-07-12 13:03 [dpdk-stable] patch 'graph: fix memory leak in stats' has been queued to stable release 20.11.3 luca.boccassi
` (51 preceding siblings ...)
2021-07-12 13:04 ` [dpdk-stable] patch 'vhost: fix missing guest pages " luca.boccassi
@ 2021-07-12 13:04 ` luca.boccassi
2021-07-12 13:04 ` [dpdk-stable] patch 'vdpa/mlx5: fix TSO offload without checksum' " luca.boccassi
` (62 subsequent siblings)
115 siblings, 0 replies; 208+ messages in thread
From: luca.boccassi @ 2021-07-12 13:04 UTC (permalink / raw)
To: Maxime Coquelin; +Cc: Chenbo Xia, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.3
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/14/21. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/aa1a815db57c92b6de275df1237463da5bc44fab
Thanks.
Luca Boccassi
---
From aa1a815db57c92b6de275df1237463da5bc44fab Mon Sep 17 00:00:00 2001
From: Maxime Coquelin <maxime.coquelin@redhat.com>
Date: Tue, 29 Jun 2021 18:11:30 +0200
Subject: [PATCH] vhost: fix NUMA reallocation with multi-queue
[ upstream commit 6305dfeff4c4644f1091a5e270cdbf989f48e15e ]
Since the Vhost-user device initialization has been reworked,
enabling the application to start using the device as soon as
the first queue pair is ready, NUMA reallocation no more
happened on queue pairs other than the first one since
numa_realloc() was returning early if the device was running.
This patch fixes this issue by reallocating the device metadata
only if the device is running. For the virtqueues, a vring state
change notification is sent to notify the application of its
disablement. Since the callback is supposed to be blocking, it
is safe to reallocate it afterwards.
Fixes: d0fcc38f5fa4 ("vhost: improve device readiness notifications")
Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Reviewed-by: Chenbo Xia <chenbo.xia@intel.com>
---
lib/librte_vhost/vhost_user.c | 13 ++++++++++---
1 file changed, 10 insertions(+), 3 deletions(-)
diff --git a/lib/librte_vhost/vhost_user.c b/lib/librte_vhost/vhost_user.c
index fcb78ad4ea..61ed221395 100644
--- a/lib/librte_vhost/vhost_user.c
+++ b/lib/librte_vhost/vhost_user.c
@@ -489,12 +489,16 @@ numa_realloc(struct virtio_net *dev, int index)
struct batch_copy_elem *new_batch_copy_elems;
int ret;
- if (dev->flags & VIRTIO_DEV_RUNNING)
- return dev;
-
old_dev = dev;
vq = old_vq = dev->virtqueue[index];
+ /*
+ * If VQ is ready, it is too late to reallocate, it certainly already
+ * happened anyway on VHOST_USER_SET_VRING_ADRR.
+ */
+ if (vq->ready)
+ return dev;
+
ret = get_mempolicy(&newnode, NULL, 0, old_vq->desc,
MPOL_F_NODE | MPOL_F_ADDR);
@@ -549,6 +553,9 @@ numa_realloc(struct virtio_net *dev, int index)
rte_free(old_vq);
}
+ if (dev->flags & VIRTIO_DEV_RUNNING)
+ goto out;
+
/* check if we need to reallocate dev */
ret = get_mempolicy(&oldnode, NULL, 0, old_dev,
MPOL_F_NODE | MPOL_F_ADDR);
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-07-12 13:41:39.472468789 +0100
+++ 0054-vhost-fix-NUMA-reallocation-with-multi-queue.patch 2021-07-12 13:41:36.442121611 +0100
@@ -1 +1 @@
-From 6305dfeff4c4644f1091a5e270cdbf989f48e15e Mon Sep 17 00:00:00 2001
+From aa1a815db57c92b6de275df1237463da5bc44fab Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 6305dfeff4c4644f1091a5e270cdbf989f48e15e ]
+
@@ -19 +20,0 @@
-Cc: stable@dpdk.org
@@ -24 +25 @@
- lib/vhost/vhost_user.c | 13 ++++++++++---
+ lib/librte_vhost/vhost_user.c | 13 ++++++++++---
@@ -27,5 +28,5 @@
-diff --git a/lib/vhost/vhost_user.c b/lib/vhost/vhost_user.c
-index 82adf80fe5..51b96a0716 100644
---- a/lib/vhost/vhost_user.c
-+++ b/lib/vhost/vhost_user.c
-@@ -488,12 +488,16 @@ numa_realloc(struct virtio_net *dev, int index)
+diff --git a/lib/librte_vhost/vhost_user.c b/lib/librte_vhost/vhost_user.c
+index fcb78ad4ea..61ed221395 100644
+--- a/lib/librte_vhost/vhost_user.c
++++ b/lib/librte_vhost/vhost_user.c
+@@ -489,12 +489,16 @@ numa_realloc(struct virtio_net *dev, int index)
@@ -51 +52 @@
-@@ -558,6 +562,9 @@ numa_realloc(struct virtio_net *dev, int index)
+@@ -549,6 +553,9 @@ numa_realloc(struct virtio_net *dev, int index)
^ permalink raw reply [flat|nested] 208+ messages in thread
* [dpdk-stable] patch 'vdpa/mlx5: fix TSO offload without checksum' has been queued to stable release 20.11.3
2021-07-12 13:03 [dpdk-stable] patch 'graph: fix memory leak in stats' has been queued to stable release 20.11.3 luca.boccassi
` (52 preceding siblings ...)
2021-07-12 13:04 ` [dpdk-stable] patch 'vhost: fix NUMA reallocation with multi-queue' " luca.boccassi
@ 2021-07-12 13:04 ` luca.boccassi
2021-07-12 13:04 ` [dpdk-stable] patch 'mempool/octeontx2: fix shift calculation' " luca.boccassi
` (61 subsequent siblings)
115 siblings, 0 replies; 208+ messages in thread
From: luca.boccassi @ 2021-07-12 13:04 UTC (permalink / raw)
To: Xueming Li; +Cc: Chenbo Xia, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.3
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/14/21. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/3cc66cf708ba329b29a658090d20368ce3256f56
Thanks.
Luca Boccassi
---
From 3cc66cf708ba329b29a658090d20368ce3256f56 Mon Sep 17 00:00:00 2001
From: Xueming Li <xuemingl@nvidia.com>
Date: Sun, 13 Jun 2021 20:51:39 +0800
Subject: [PATCH] vdpa/mlx5: fix TSO offload without checksum
[ upstream commit ff09f8069702bd233f5d39c4d0b8cfbc392d9edc ]
Packet was corrupted when TSO requested without CSUM update.
Enables CSUM automatically if only TSO requested.
Fixes: 2aa8444b0084 ("vdpa/mlx5: support stateless offloads")
Signed-off-by: Xueming Li <xuemingl@nvidia.com>
Reviewed-by: Chenbo Xia <chenbo.xia@intel.com>
---
drivers/vdpa/mlx5/mlx5_vdpa_virtq.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/drivers/vdpa/mlx5/mlx5_vdpa_virtq.c b/drivers/vdpa/mlx5/mlx5_vdpa_virtq.c
index 87704c782b..472bda6c23 100644
--- a/drivers/vdpa/mlx5/mlx5_vdpa_virtq.c
+++ b/drivers/vdpa/mlx5/mlx5_vdpa_virtq.c
@@ -439,6 +439,13 @@ mlx5_vdpa_virtqs_prepare(struct mlx5_vdpa_priv *priv)
DRV_LOG(ERR, "Failed to configure negotiated features.");
return -1;
}
+ if ((priv->features & (1ULL << VIRTIO_NET_F_CSUM)) == 0 &&
+ ((priv->features & (1ULL << VIRTIO_NET_F_HOST_TSO4)) > 0 ||
+ (priv->features & (1ULL << VIRTIO_NET_F_HOST_TSO6)) > 0)) {
+ /* Packet may be corrupted if TSO is enabled without CSUM. */
+ DRV_LOG(INFO, "TSO is enabled without CSUM, force CSUM.");
+ priv->features |= (1ULL << VIRTIO_NET_F_CSUM);
+ }
if (nr_vring > priv->caps.max_num_virtio_queues * 2) {
DRV_LOG(ERR, "Do not support more than %d virtqs(%d).",
(int)priv->caps.max_num_virtio_queues * 2,
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-07-12 13:41:39.520996085 +0100
+++ 0055-vdpa-mlx5-fix-TSO-offload-without-checksum.patch 2021-07-12 13:41:36.446121694 +0100
@@ -1 +1 @@
-From ff09f8069702bd233f5d39c4d0b8cfbc392d9edc Mon Sep 17 00:00:00 2001
+From 3cc66cf708ba329b29a658090d20368ce3256f56 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit ff09f8069702bd233f5d39c4d0b8cfbc392d9edc ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -20 +21 @@
-index 024c5c4180..f530646058 100644
+index 87704c782b..472bda6c23 100644
@@ -23 +24 @@
-@@ -442,6 +442,13 @@ mlx5_vdpa_virtqs_prepare(struct mlx5_vdpa_priv *priv)
+@@ -439,6 +439,13 @@ mlx5_vdpa_virtqs_prepare(struct mlx5_vdpa_priv *priv)
^ permalink raw reply [flat|nested] 208+ messages in thread
* [dpdk-stable] patch 'mempool/octeontx2: fix shift calculation' has been queued to stable release 20.11.3
2021-07-12 13:03 [dpdk-stable] patch 'graph: fix memory leak in stats' has been queued to stable release 20.11.3 luca.boccassi
` (53 preceding siblings ...)
2021-07-12 13:04 ` [dpdk-stable] patch 'vdpa/mlx5: fix TSO offload without checksum' " luca.boccassi
@ 2021-07-12 13:04 ` luca.boccassi
2021-07-12 13:04 ` [dpdk-stable] patch 'net/sfc: check ID overflow in action port ID' " luca.boccassi
` (60 subsequent siblings)
115 siblings, 0 replies; 208+ messages in thread
From: luca.boccassi @ 2021-07-12 13:04 UTC (permalink / raw)
To: Pavan Nikhilesh; +Cc: dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.3
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/14/21. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/7d1f406efb3819279e340e11de240ebb35cccc93
Thanks.
Luca Boccassi
---
From 7d1f406efb3819279e340e11de240ebb35cccc93 Mon Sep 17 00:00:00 2001
From: Pavan Nikhilesh <pbhagavatula@marvell.com>
Date: Tue, 15 Jun 2021 00:54:24 +0530
Subject: [PATCH] mempool/octeontx2: fix shift calculation
[ upstream commit 43d89404950bb4d8e0efbcaebf734a0a722c2dbb ]
Shift is used to generate an 8-bit saturate value from the current
aura used count. The shift value should be derived from the log2 of
block count if it is greater than 256 else the shift should be 0.
Fixes: 7bcc47cbe2fa ("mempool/octeontx2: add mempool alloc op")
Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
---
drivers/mempool/octeontx2/otx2_mempool_ops.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/mempool/octeontx2/otx2_mempool_ops.c b/drivers/mempool/octeontx2/otx2_mempool_ops.c
index 9ff71bcf6b..d827fd8c7b 100644
--- a/drivers/mempool/octeontx2/otx2_mempool_ops.c
+++ b/drivers/mempool/octeontx2/otx2_mempool_ops.c
@@ -611,7 +611,8 @@ npa_lf_aura_pool_pair_alloc(struct otx2_npa_lf *lf, const uint32_t block_size,
/* Update aura fields */
aura->pool_addr = pool_id;/* AF will translate to associated poolctx */
aura->ena = 1;
- aura->shift = __builtin_clz(block_count) - 8;
+ aura->shift = rte_log2_u32(block_count);
+ aura->shift = aura->shift < 8 ? 0 : aura->shift - 8;
aura->limit = block_count;
aura->pool_caching = 1;
aura->err_int_ena = BIT(NPA_AURA_ERR_INT_AURA_ADD_OVER);
@@ -626,7 +627,8 @@ npa_lf_aura_pool_pair_alloc(struct otx2_npa_lf *lf, const uint32_t block_size,
pool->ena = 1;
pool->buf_size = block_size / OTX2_ALIGN;
pool->stack_max_pages = stack_size;
- pool->shift = __builtin_clz(block_count) - 8;
+ pool->shift = rte_log2_u32(block_count);
+ pool->shift = pool->shift < 8 ? 0 : pool->shift - 8;
pool->ptr_start = 0;
pool->ptr_end = ~0;
pool->stack_caching = 1;
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-07-12 13:41:39.565564333 +0100
+++ 0056-mempool-octeontx2-fix-shift-calculation.patch 2021-07-12 13:41:36.450121777 +0100
@@ -1 +1 @@
-From 43d89404950bb4d8e0efbcaebf734a0a722c2dbb Mon Sep 17 00:00:00 2001
+From 7d1f406efb3819279e340e11de240ebb35cccc93 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 43d89404950bb4d8e0efbcaebf734a0a722c2dbb ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
^ permalink raw reply [flat|nested] 208+ messages in thread
* [dpdk-stable] patch 'net/sfc: check ID overflow in action port ID' has been queued to stable release 20.11.3
2021-07-12 13:03 [dpdk-stable] patch 'graph: fix memory leak in stats' has been queued to stable release 20.11.3 luca.boccassi
` (54 preceding siblings ...)
2021-07-12 13:04 ` [dpdk-stable] patch 'mempool/octeontx2: fix shift calculation' " luca.boccassi
@ 2021-07-12 13:04 ` luca.boccassi
2021-07-12 13:04 ` [dpdk-stable] patch 'net/sfc: fix outer match in MAE backend' " luca.boccassi
` (59 subsequent siblings)
115 siblings, 0 replies; 208+ messages in thread
From: luca.boccassi @ 2021-07-12 13:04 UTC (permalink / raw)
To: Ivan Malov; +Cc: Andrew Rybchenko, Andy Moreton, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.3
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/14/21. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/810cbe8ff07bdfebc74287bbbaa0cb6c1e7b2f20
Thanks.
Luca Boccassi
---
From 810cbe8ff07bdfebc74287bbbaa0cb6c1e7b2f20 Mon Sep 17 00:00:00 2001
From: Ivan Malov <ivan.malov@oktetlabs.ru>
Date: Thu, 27 May 2021 17:27:22 +0300
Subject: [PATCH] net/sfc: check ID overflow in action port ID
[ upstream commit fb3c4efb65be520082a34c0afb85d492ff093c82 ]
The container in the action configuration is U32,
but the ID is U16, and overflow check is missing.
Fixes: 1fb65e4dae8a ("net/sfc: support flow action port ID in transfer rules")
Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru>
Reviewed-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Reviewed-by: Andy Moreton <amoreton@xilinx.com>
---
drivers/net/sfc/sfc_mae.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/net/sfc/sfc_mae.c b/drivers/net/sfc/sfc_mae.c
index 2f02fcdd19..abeee38a2f 100644
--- a/drivers/net/sfc/sfc_mae.c
+++ b/drivers/net/sfc/sfc_mae.c
@@ -2000,6 +2000,9 @@ sfc_mae_rule_parse_action_port_id(struct sfc_adapter *sa,
uint16_t port_id;
int rc;
+ if (conf->id > UINT16_MAX)
+ return EOVERFLOW;
+
port_id = (conf->original != 0) ? sas->port_id : conf->id;
rc = sfc_mae_switch_port_by_ethdev(mae->switch_domain_id,
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-07-12 13:41:39.613393781 +0100
+++ 0057-net-sfc-check-ID-overflow-in-action-port-ID.patch 2021-07-12 13:41:36.454121861 +0100
@@ -1 +1 @@
-From fb3c4efb65be520082a34c0afb85d492ff093c82 Mon Sep 17 00:00:00 2001
+From 810cbe8ff07bdfebc74287bbbaa0cb6c1e7b2f20 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit fb3c4efb65be520082a34c0afb85d492ff093c82 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -20 +21 @@
-index 33bff275cf..2ea2d63c5c 100644
+index 2f02fcdd19..abeee38a2f 100644
@@ -23 +24 @@
-@@ -2653,6 +2653,9 @@ sfc_mae_rule_parse_action_port_id(struct sfc_adapter *sa,
+@@ -2000,6 +2000,9 @@ sfc_mae_rule_parse_action_port_id(struct sfc_adapter *sa,
^ permalink raw reply [flat|nested] 208+ messages in thread
* [dpdk-stable] patch 'net/sfc: fix outer match in MAE backend' has been queued to stable release 20.11.3
2021-07-12 13:03 [dpdk-stable] patch 'graph: fix memory leak in stats' has been queued to stable release 20.11.3 luca.boccassi
` (55 preceding siblings ...)
2021-07-12 13:04 ` [dpdk-stable] patch 'net/sfc: check ID overflow in action port ID' " luca.boccassi
@ 2021-07-12 13:04 ` luca.boccassi
2021-07-12 13:04 ` [dpdk-stable] patch 'drivers/net: fix memzone allocations for DMA memory' " luca.boccassi
` (58 subsequent siblings)
115 siblings, 0 replies; 208+ messages in thread
From: luca.boccassi @ 2021-07-12 13:04 UTC (permalink / raw)
To: Ivan Malov; +Cc: Andrew Rybchenko, Andy Moreton, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.3
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/14/21. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/736242a19c2a59a4832307fdf0b0bf90bdab460c
Thanks.
Luca Boccassi
---
From 736242a19c2a59a4832307fdf0b0bf90bdab460c Mon Sep 17 00:00:00 2001
From: Ivan Malov <ivan.malov@oktetlabs.ru>
Date: Tue, 6 Jul 2021 15:37:26 +0300
Subject: [PATCH] net/sfc: fix outer match in MAE backend
[ upstream commit e52d36cf8f16f496fc21baba75057fa7fbcd2447 ]
The current code doesn't use match on invalid outer rule ID
in action rules of non-encap. flows. This is wrong and must
be fixed. Do that and explain correct behaviour in the code.
Fixes: dadff137931c ("net/sfc: support encap flow items in transfer rules")
Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru>
Reviewed-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Reviewed-by: Andy Moreton <amoreton@xilinx.com>
---
drivers/net/sfc/sfc_mae.c | 32 +++++++++++++++++++-------------
1 file changed, 19 insertions(+), 13 deletions(-)
diff --git a/drivers/net/sfc/sfc_mae.c b/drivers/net/sfc/sfc_mae.c
index abeee38a2f..dc01257ace 100644
--- a/drivers/net/sfc/sfc_mae.c
+++ b/drivers/net/sfc/sfc_mae.c
@@ -1576,12 +1576,12 @@ sfc_mae_rule_process_outer(struct sfc_adapter *sa,
struct sfc_mae_outer_rule **rulep,
struct rte_flow_error *error)
{
- struct sfc_mae_outer_rule *rule;
+ efx_mae_rule_id_t invalid_rule_id = { .id = EFX_MAE_RSRC_ID_INVALID };
int rc;
if (ctx->encap_type == EFX_TUNNEL_PROTOCOL_NONE) {
*rulep = NULL;
- return 0;
+ goto no_or_id;
}
SFC_ASSERT(ctx->match_spec_outer != NULL);
@@ -1609,21 +1609,27 @@ sfc_mae_rule_process_outer(struct sfc_adapter *sa,
/* The spec has now been tracked by the outer rule entry. */
ctx->match_spec_outer = NULL;
+no_or_id:
/*
- * Depending on whether we reuse an existing outer rule or create a
- * new one (see above), outer rule ID is either a valid value or
- * EFX_MAE_RSRC_ID_INVALID. Set it in the action rule match
- * specification (and the full mask, too) in order to have correct
- * class comparisons of the new rule with existing ones.
- * Also, action rule match specification will be validated shortly,
- * and having the full mask set for outer rule ID indicates that we
- * will use this field, and support for this field has to be checked.
+ * In MAE, lookup sequence comprises outer parse, outer rule lookup,
+ * inner parse (when some outer rule is hit) and action rule lookup.
+ * If the currently processed flow does not come with an outer rule,
+ * its action rule must be available only for packets which miss in
+ * outer rule table. Set OR_ID match field to 0xffffffff/0xffffffff
+ * in the action rule specification; this ensures correct behaviour.
+ *
+ * If, on the other hand, this flow does have an outer rule, its ID
+ * may be unknown at the moment (not yet allocated), but OR_ID mask
+ * has to be set to 0xffffffff anyway for correct class comparisons.
+ * When the outer rule has been allocated, this match field will be
+ * overridden by sfc_mae_outer_rule_enable() to use the right value.
*/
- rule = *rulep;
rc = efx_mae_match_spec_outer_rule_id_set(ctx->match_spec_action,
- &rule->fw_rsrc.rule_id);
+ &invalid_rule_id);
if (rc != 0) {
- sfc_mae_outer_rule_del(sa, *rulep);
+ if (*rulep != NULL)
+ sfc_mae_outer_rule_del(sa, *rulep);
+
*rulep = NULL;
return rte_flow_error_set(error, rc,
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-07-12 13:41:39.661863623 +0100
+++ 0058-net-sfc-fix-outer-match-in-MAE-backend.patch 2021-07-12 13:41:36.458121944 +0100
@@ -1 +1 @@
-From e52d36cf8f16f496fc21baba75057fa7fbcd2447 Mon Sep 17 00:00:00 2001
+From 736242a19c2a59a4832307fdf0b0bf90bdab460c Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit e52d36cf8f16f496fc21baba75057fa7fbcd2447 ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -21 +22 @@
-index 2ea2d63c5c..61e795db9b 100644
+index abeee38a2f..dc01257ace 100644
@@ -24 +25 @@
-@@ -1928,12 +1928,12 @@ sfc_mae_rule_process_outer(struct sfc_adapter *sa,
+@@ -1576,12 +1576,12 @@ sfc_mae_rule_process_outer(struct sfc_adapter *sa,
@@ -39 +40 @@
-@@ -1961,21 +1961,27 @@ sfc_mae_rule_process_outer(struct sfc_adapter *sa,
+@@ -1609,21 +1609,27 @@ sfc_mae_rule_process_outer(struct sfc_adapter *sa,
^ permalink raw reply [flat|nested] 208+ messages in thread
* [dpdk-stable] patch 'drivers/net: fix memzone allocations for DMA memory' has been queued to stable release 20.11.3
2021-07-12 13:03 [dpdk-stable] patch 'graph: fix memory leak in stats' has been queued to stable release 20.11.3 luca.boccassi
` (56 preceding siblings ...)
2021-07-12 13:04 ` [dpdk-stable] patch 'net/sfc: fix outer match in MAE backend' " luca.boccassi
@ 2021-07-12 13:04 ` luca.boccassi
2021-07-12 13:04 ` [dpdk-stable] patch 'net/hns3: increase VF reset retry maximum' " luca.boccassi
` (57 subsequent siblings)
115 siblings, 0 replies; 208+ messages in thread
From: luca.boccassi @ 2021-07-12 13:04 UTC (permalink / raw)
To: David Marchand; +Cc: Min Hu, Haiyue Wang, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.3
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/14/21. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/9df1311d3319ca9c645ef9b0c932d438142dbb71
Thanks.
Luca Boccassi
---
From 9df1311d3319ca9c645ef9b0c932d438142dbb71 Mon Sep 17 00:00:00 2001
From: David Marchand <david.marchand@redhat.com>
Date: Tue, 6 Jul 2021 10:57:50 +0200
Subject: [PATCH] drivers/net: fix memzone allocations for DMA memory
[ upstream commit d07fc02fb4b38c0dded75d2d21b976d68b494f0e ]
Caught by code review.
Using a random name for memzone allocations can result in init failures
in the unlikely case that a name collision occurs.
Use a simple sequential generator on 64 bits.
Fixes: 3f50f072ff06 ("i40e: fix memzone freeing")
Fixes: 22b123a36d07 ("net/avf: initialize PMD")
Fixes: 5f0978e96220 ("net/ice/base: add OS specific implementation")
Fixes: 737f30e1c3ab ("net/hns3: support command interface with firmware")
Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Min Hu (Connor) <humin29@huawei.com>
Acked-by: Haiyue Wang <haiyue.wang@intel.com>
---
drivers/common/iavf/iavf_impl.c | 5 +++--
drivers/net/hns3/hns3_cmd.c | 4 +++-
drivers/net/i40e/i40e_ethdev.c | 4 +++-
drivers/net/ice/base/ice_osdep.h | 5 +++--
4 files changed, 12 insertions(+), 6 deletions(-)
diff --git a/drivers/common/iavf/iavf_impl.c b/drivers/common/iavf/iavf_impl.c
index fc0da31753..f80878b9fd 100644
--- a/drivers/common/iavf/iavf_impl.c
+++ b/drivers/common/iavf/iavf_impl.c
@@ -6,7 +6,6 @@
#include <inttypes.h>
#include <rte_common.h>
-#include <rte_random.h>
#include <rte_malloc.h>
#include <rte_memzone.h>
@@ -19,13 +18,15 @@ iavf_allocate_dma_mem_d(__rte_unused struct iavf_hw *hw,
u64 size,
u32 alignment)
{
+ static uint64_t iavf_dma_memzone_id;
const struct rte_memzone *mz = NULL;
char z_name[RTE_MEMZONE_NAMESIZE];
if (!mem)
return IAVF_ERR_PARAM;
- snprintf(z_name, sizeof(z_name), "iavf_dma_%"PRIu64, rte_rand());
+ snprintf(z_name, sizeof(z_name), "iavf_dma_%" PRIu64,
+ __atomic_fetch_add(&iavf_dma_memzone_id, 1, __ATOMIC_RELAXED));
mz = rte_memzone_reserve_bounded(z_name, size, SOCKET_ID_ANY,
RTE_MEMZONE_IOVA_CONTIG, alignment,
RTE_PGSIZE_2M);
diff --git a/drivers/net/hns3/hns3_cmd.c b/drivers/net/hns3/hns3_cmd.c
index c6552b45d7..dc65ef8c26 100644
--- a/drivers/net/hns3/hns3_cmd.c
+++ b/drivers/net/hns3/hns3_cmd.c
@@ -44,10 +44,12 @@ static int
hns3_allocate_dma_mem(struct hns3_hw *hw, struct hns3_cmq_ring *ring,
uint64_t size, uint32_t alignment)
{
+ static uint64_t hns3_dma_memzone_id;
const struct rte_memzone *mz = NULL;
char z_name[RTE_MEMZONE_NAMESIZE];
- snprintf(z_name, sizeof(z_name), "hns3_dma_%" PRIu64, rte_rand());
+ snprintf(z_name, sizeof(z_name), "hns3_dma_%" PRIu64,
+ __atomic_fetch_add(&hns3_dma_memzone_id, 1, __ATOMIC_RELAXED));
mz = rte_memzone_reserve_bounded(z_name, size, SOCKET_ID_ANY,
RTE_MEMZONE_IOVA_CONTIG, alignment,
RTE_PGSIZE_2M);
diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c
index d617e9c71b..0dc20de9a0 100644
--- a/drivers/net/i40e/i40e_ethdev.c
+++ b/drivers/net/i40e/i40e_ethdev.c
@@ -4610,13 +4610,15 @@ i40e_allocate_dma_mem_d(__rte_unused struct i40e_hw *hw,
u64 size,
u32 alignment)
{
+ static uint64_t i40e_dma_memzone_id;
const struct rte_memzone *mz = NULL;
char z_name[RTE_MEMZONE_NAMESIZE];
if (!mem)
return I40E_ERR_PARAM;
- snprintf(z_name, sizeof(z_name), "i40e_dma_%"PRIu64, rte_rand());
+ snprintf(z_name, sizeof(z_name), "i40e_dma_%" PRIu64,
+ __atomic_fetch_add(&i40e_dma_memzone_id, 1, __ATOMIC_RELAXED));
mz = rte_memzone_reserve_bounded(z_name, size, SOCKET_ID_ANY,
RTE_MEMZONE_IOVA_CONTIG, alignment, RTE_PGSIZE_2M);
if (!mz)
diff --git a/drivers/net/ice/base/ice_osdep.h b/drivers/net/ice/base/ice_osdep.h
index 818bfa3b89..be51c64b67 100644
--- a/drivers/net/ice/base/ice_osdep.h
+++ b/drivers/net/ice/base/ice_osdep.h
@@ -21,7 +21,6 @@
#include <rte_cycles.h>
#include <rte_spinlock.h>
#include <rte_log.h>
-#include <rte_random.h>
#include <rte_io.h>
#include "ice_alloc.h"
@@ -245,13 +244,15 @@ static inline void *
ice_alloc_dma_mem(__rte_unused struct ice_hw *hw,
struct ice_dma_mem *mem, u64 size)
{
+ static uint64_t ice_dma_memzone_id;
const struct rte_memzone *mz = NULL;
char z_name[RTE_MEMZONE_NAMESIZE];
if (!mem)
return NULL;
- snprintf(z_name, sizeof(z_name), "ice_dma_%"PRIu64, rte_rand());
+ snprintf(z_name, sizeof(z_name), "ice_dma_%" PRIu64,
+ __atomic_fetch_add(&ice_dma_memzone_id, 1, __ATOMIC_RELAXED));
mz = rte_memzone_reserve_bounded(z_name, size, SOCKET_ID_ANY, 0,
0, RTE_PGSIZE_2M);
if (!mz)
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-07-12 13:41:39.713627984 +0100
+++ 0059-drivers-net-fix-memzone-allocations-for-DMA-memory.patch 2021-07-12 13:41:36.486122527 +0100
@@ -1 +1 @@
-From d07fc02fb4b38c0dded75d2d21b976d68b494f0e Mon Sep 17 00:00:00 2001
+From 9df1311d3319ca9c645ef9b0c932d438142dbb71 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit d07fc02fb4b38c0dded75d2d21b976d68b494f0e ]
+
@@ -16 +17,0 @@
-Cc: stable@dpdk.org
@@ -29 +30 @@
-index 0c7d5c0dae..8919b0e7c3 100644
+index fc0da31753..f80878b9fd 100644
@@ -58 +59 @@
-index 44a4e2860d..175d48d14b 100644
+index c6552b45d7..dc65ef8c26 100644
@@ -76 +77 @@
-index 5b0a7f2537..7b230e2ed1 100644
+index d617e9c71b..0dc20de9a0 100644
@@ -79 +80 @@
-@@ -4554,13 +4554,15 @@ i40e_allocate_dma_mem_d(__rte_unused struct i40e_hw *hw,
+@@ -4610,13 +4610,15 @@ i40e_allocate_dma_mem_d(__rte_unused struct i40e_hw *hw,
@@ -97 +98 @@
-index 878c5597d4..154fe96e93 100644
+index 818bfa3b89..be51c64b67 100644
@@ -108 +109 @@
-@@ -260,13 +259,15 @@ static inline void *
+@@ -245,13 +244,15 @@ static inline void *
^ permalink raw reply [flat|nested] 208+ messages in thread
* [dpdk-stable] patch 'net/hns3: increase VF reset retry maximum' has been queued to stable release 20.11.3
2021-07-12 13:03 [dpdk-stable] patch 'graph: fix memory leak in stats' has been queued to stable release 20.11.3 luca.boccassi
` (57 preceding siblings ...)
2021-07-12 13:04 ` [dpdk-stable] patch 'drivers/net: fix memzone allocations for DMA memory' " luca.boccassi
@ 2021-07-12 13:04 ` luca.boccassi
2021-07-12 13:04 ` [dpdk-stable] patch 'net/hns3: fix delay for waiting to stop Rx/Tx' " luca.boccassi
` (56 subsequent siblings)
115 siblings, 0 replies; 208+ messages in thread
From: luca.boccassi @ 2021-07-12 13:04 UTC (permalink / raw)
To: Hongbo Zheng; +Cc: Min Hu, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.3
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/14/21. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/6b38d23ef19a44cd42edb6344e42e5b0d3b91743
Thanks.
Luca Boccassi
---
From 6b38d23ef19a44cd42edb6344e42e5b0d3b91743 Mon Sep 17 00:00:00 2001
From: Hongbo Zheng <zhenghongbo3@huawei.com>
Date: Sun, 13 Jun 2021 10:31:51 +0800
Subject: [PATCH] net/hns3: increase VF reset retry maximum
[ upstream commit b25987fa7e25b3ba852f9433d22761c006884205 ]
When the device is very busy, VF reset may have to be
retried many times to succeed, leading to the current
max reset fail retry count not enough.
Modify max reset fail retry count to 30 to enhance
the reliability of reset function.
Fixes: 2790c6464725 ("net/hns3: support device reset")
Signed-off-by: Hongbo Zheng <zhenghongbo3@huawei.com>
Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
---
drivers/net/hns3/hns3_intr.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/hns3/hns3_intr.c b/drivers/net/hns3/hns3_intr.c
index 0bba3abb84..0fa21e4824 100644
--- a/drivers/net/hns3/hns3_intr.c
+++ b/drivers/net/hns3/hns3_intr.c
@@ -1947,7 +1947,7 @@ hns3_clear_reset_level(struct hns3_hw *hw, uint64_t *levels)
static bool
hns3_reset_err_handle(struct hns3_adapter *hns)
{
-#define MAX_RESET_FAIL_CNT 5
+#define MAX_RESET_FAIL_CNT 30
struct hns3_hw *hw = &hns->hw;
@@ -2041,7 +2041,7 @@ hns3_reset_pre(struct hns3_adapter *hns)
static int
hns3_reset_post(struct hns3_adapter *hns)
{
-#define TIMEOUT_RETRIES_CNT 5
+#define TIMEOUT_RETRIES_CNT 30
struct hns3_hw *hw = &hns->hw;
struct timeval tv_delta;
struct timeval tv;
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-07-12 13:41:39.782428215 +0100
+++ 0060-net-hns3-increase-VF-reset-retry-maximum.patch 2021-07-12 13:41:36.494122694 +0100
@@ -1 +1 @@
-From b25987fa7e25b3ba852f9433d22761c006884205 Mon Sep 17 00:00:00 2001
+From 6b38d23ef19a44cd42edb6344e42e5b0d3b91743 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit b25987fa7e25b3ba852f9433d22761c006884205 ]
+
@@ -14 +15,0 @@
-Cc: stable@dpdk.org
@@ -23 +24 @@
-index 6bdb17f622..0b307fdd1d 100644
+index 0bba3abb84..0fa21e4824 100644
@@ -26 +27 @@
-@@ -2582,7 +2582,7 @@ hns3_clear_reset_level(struct hns3_hw *hw, uint64_t *levels)
+@@ -1947,7 +1947,7 @@ hns3_clear_reset_level(struct hns3_hw *hw, uint64_t *levels)
@@ -35 +36 @@
-@@ -2676,7 +2676,7 @@ hns3_reset_pre(struct hns3_adapter *hns)
+@@ -2041,7 +2041,7 @@ hns3_reset_pre(struct hns3_adapter *hns)
^ permalink raw reply [flat|nested] 208+ messages in thread
* [dpdk-stable] patch 'net/hns3: fix delay for waiting to stop Rx/Tx' has been queued to stable release 20.11.3
2021-07-12 13:03 [dpdk-stable] patch 'graph: fix memory leak in stats' has been queued to stable release 20.11.3 luca.boccassi
` (58 preceding siblings ...)
2021-07-12 13:04 ` [dpdk-stable] patch 'net/hns3: increase VF reset retry maximum' " luca.boccassi
@ 2021-07-12 13:04 ` luca.boccassi
2021-07-12 13:04 ` [dpdk-stable] patch 'net/hns3: fix fake queue rollback' " luca.boccassi
` (55 subsequent siblings)
115 siblings, 0 replies; 208+ messages in thread
From: luca.boccassi @ 2021-07-12 13:04 UTC (permalink / raw)
To: Huisong Li; +Cc: Min Hu, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.3
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/14/21. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/badc3ae38ad45a79552d9f8dc97ec48ac414e5f8
Thanks.
Luca Boccassi
---
From badc3ae38ad45a79552d9f8dc97ec48ac414e5f8 Mon Sep 17 00:00:00 2001
From: Huisong Li <lihuisong@huawei.com>
Date: Sun, 13 Jun 2021 10:31:52 +0800
Subject: [PATCH] net/hns3: fix delay for waiting to stop Rx/Tx
[ upstream commit 4d8cce267840556cec8483c61f8cfbf25873496d ]
When the primary process executes dev_stop or is being reset, the packet
sending and receiving functions is changed. In this moment, the primary
process requests secondary processes to change their Rx/Tx functions, and
delays a period of time in case of crashes when queues are still in use.
The delay time depends on the number of queues actually used, instead of
the maximum number of queues supported by the device.
Fixes: 23d4b61fee5d ("net/hns3: support multiple process")
Signed-off-by: Huisong Li <lihuisong@huawei.com>
Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
---
drivers/net/hns3/hns3_ethdev.c | 4 ++--
drivers/net/hns3/hns3_ethdev_vf.c | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/net/hns3/hns3_ethdev.c b/drivers/net/hns3/hns3_ethdev.c
index 637e6134f9..249ab31040 100644
--- a/drivers/net/hns3/hns3_ethdev.c
+++ b/drivers/net/hns3/hns3_ethdev.c
@@ -5169,7 +5169,7 @@ hns3_dev_stop(struct rte_eth_dev *dev)
/* Disable datapath on secondary process. */
hns3_mp_req_stop_rxtx(dev);
/* Prevent crashes when queues are still in use. */
- rte_delay_ms(hw->tqps_num);
+ rte_delay_ms(hw->cfg_max_queues);
rte_spinlock_lock(&hw->lock);
if (rte_atomic16_read(&hw->reset.resetting) == 0) {
@@ -5657,7 +5657,7 @@ hns3_stop_service(struct hns3_adapter *hns)
rte_wmb();
/* Disable datapath on secondary process. */
hns3_mp_req_stop_rxtx(eth_dev);
- rte_delay_ms(hw->tqps_num);
+ rte_delay_ms(hw->cfg_max_queues);
rte_spinlock_lock(&hw->lock);
if (hns->hw.adapter_state == HNS3_NIC_STARTED ||
diff --git a/drivers/net/hns3/hns3_ethdev_vf.c b/drivers/net/hns3/hns3_ethdev_vf.c
index ed9dd9b3c3..5a9550d853 100644
--- a/drivers/net/hns3/hns3_ethdev_vf.c
+++ b/drivers/net/hns3/hns3_ethdev_vf.c
@@ -1968,7 +1968,7 @@ hns3vf_dev_stop(struct rte_eth_dev *dev)
/* Disable datapath on secondary process. */
hns3_mp_req_stop_rxtx(dev);
/* Prevent crashes when queues are still in use. */
- rte_delay_ms(hw->tqps_num);
+ rte_delay_ms(hw->cfg_max_queues);
rte_spinlock_lock(&hw->lock);
if (rte_atomic16_read(&hw->reset.resetting) == 0) {
@@ -2411,7 +2411,7 @@ hns3vf_stop_service(struct hns3_adapter *hns)
rte_wmb();
/* Disable datapath on secondary process. */
hns3_mp_req_stop_rxtx(eth_dev);
- rte_delay_ms(hw->tqps_num);
+ rte_delay_ms(hw->cfg_max_queues);
rte_spinlock_lock(&hw->lock);
if (hw->adapter_state == HNS3_NIC_STARTED ||
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-07-12 13:41:39.833329750 +0100
+++ 0061-net-hns3-fix-delay-for-waiting-to-stop-Rx-Tx.patch 2021-07-12 13:41:36.510123027 +0100
@@ -1 +1 @@
-From 4d8cce267840556cec8483c61f8cfbf25873496d Mon Sep 17 00:00:00 2001
+From badc3ae38ad45a79552d9f8dc97ec48ac414e5f8 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 4d8cce267840556cec8483c61f8cfbf25873496d ]
+
@@ -14 +15,0 @@
-Cc: stable@dpdk.org
@@ -24 +25 @@
-index 20491305e7..dff265828e 100644
+index 637e6134f9..249ab31040 100644
@@ -27 +28 @@
-@@ -5895,7 +5895,7 @@ hns3_dev_stop(struct rte_eth_dev *dev)
+@@ -5169,7 +5169,7 @@ hns3_dev_stop(struct rte_eth_dev *dev)
@@ -35,2 +36,2 @@
- if (__atomic_load_n(&hw->reset.resetting, __ATOMIC_RELAXED) == 0) {
-@@ -6511,7 +6511,7 @@ hns3_stop_service(struct hns3_adapter *hns)
+ if (rte_atomic16_read(&hw->reset.resetting) == 0) {
+@@ -5657,7 +5657,7 @@ hns3_stop_service(struct hns3_adapter *hns)
@@ -46 +47 @@
-index 41dd8ee129..7a5c162964 100644
+index ed9dd9b3c3..5a9550d853 100644
@@ -49 +50 @@
-@@ -2107,7 +2107,7 @@ hns3vf_dev_stop(struct rte_eth_dev *dev)
+@@ -1968,7 +1968,7 @@ hns3vf_dev_stop(struct rte_eth_dev *dev)
@@ -57,2 +58,2 @@
- if (__atomic_load_n(&hw->reset.resetting, __ATOMIC_RELAXED) == 0) {
-@@ -2558,7 +2558,7 @@ hns3vf_stop_service(struct hns3_adapter *hns)
+ if (rte_atomic16_read(&hw->reset.resetting) == 0) {
+@@ -2411,7 +2411,7 @@ hns3vf_stop_service(struct hns3_adapter *hns)
^ permalink raw reply [flat|nested] 208+ messages in thread
* [dpdk-stable] patch 'net/hns3: fix fake queue rollback' has been queued to stable release 20.11.3
2021-07-12 13:03 [dpdk-stable] patch 'graph: fix memory leak in stats' has been queued to stable release 20.11.3 luca.boccassi
` (59 preceding siblings ...)
2021-07-12 13:04 ` [dpdk-stable] patch 'net/hns3: fix delay for waiting to stop Rx/Tx' " luca.boccassi
@ 2021-07-12 13:04 ` luca.boccassi
2021-07-12 13:04 ` [dpdk-stable] patch 'net/hns3: fix VLAN strip log' " luca.boccassi
` (54 subsequent siblings)
115 siblings, 0 replies; 208+ messages in thread
From: luca.boccassi @ 2021-07-12 13:04 UTC (permalink / raw)
To: Huisong Li; +Cc: Min Hu, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.3
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/14/21. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/219472cbad519c64d8fa8124b09c4a5fc3c0bc6b
Thanks.
Luca Boccassi
---
From 219472cbad519c64d8fa8124b09c4a5fc3c0bc6b Mon Sep 17 00:00:00 2001
From: Huisong Li <lihuisong@huawei.com>
Date: Sun, 13 Jun 2021 10:31:53 +0800
Subject: [PATCH] net/hns3: fix fake queue rollback
[ upstream commit a2ddaac12b08a98eee4b4e082d72c2f68dc92bf0 ]
When the device supports independent Rx/Tx queues, fake queues do not need
to be created in unequal Rx/Tx queues case. However, dev_configure fails
to be executed on the device supported independent Rx/Tx queues, the
current rollback code logic contains the fake queue. As a result, the fake
queue is created. When dev_configure is successfully called again, these
fake queues still exists and are configured to the hardware.
Fixes: fa29fe45a7b4 ("net/hns3: support queue start and stop")
Signed-off-by: Huisong Li <lihuisong@huawei.com>
Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
---
drivers/net/hns3/hns3_ethdev.c | 11 ++++-------
drivers/net/hns3/hns3_ethdev_vf.c | 11 ++++-------
drivers/net/hns3/hns3_rxtx.c | 3 +++
3 files changed, 11 insertions(+), 14 deletions(-)
diff --git a/drivers/net/hns3/hns3_ethdev.c b/drivers/net/hns3/hns3_ethdev.c
index 249ab31040..5f897fed39 100644
--- a/drivers/net/hns3/hns3_ethdev.c
+++ b/drivers/net/hns3/hns3_ethdev.c
@@ -2376,13 +2376,10 @@ hns3_dev_configure(struct rte_eth_dev *dev)
* work as usual. But these fake queues are imperceptible, and can not
* be used by upper applications.
*/
- if (!hns3_dev_indep_txrx_supported(hw)) {
- ret = hns3_set_fake_rx_or_tx_queues(dev, nb_rx_q, nb_tx_q);
- if (ret) {
- hns3_err(hw, "fail to set Rx/Tx fake queues, ret = %d.",
- ret);
- return ret;
- }
+ ret = hns3_set_fake_rx_or_tx_queues(dev, nb_rx_q, nb_tx_q);
+ if (ret) {
+ hns3_err(hw, "fail to set Rx/Tx fake queues, ret = %d.", ret);
+ return ret;
}
hw->adapter_state = HNS3_NIC_CONFIGURING;
diff --git a/drivers/net/hns3/hns3_ethdev_vf.c b/drivers/net/hns3/hns3_ethdev_vf.c
index 5a9550d853..2959d81a71 100644
--- a/drivers/net/hns3/hns3_ethdev_vf.c
+++ b/drivers/net/hns3/hns3_ethdev_vf.c
@@ -799,13 +799,10 @@ hns3vf_dev_configure(struct rte_eth_dev *dev)
* work as usual. But these fake queues are imperceptible, and can not
* be used by upper applications.
*/
- if (!hns3_dev_indep_txrx_supported(hw)) {
- ret = hns3_set_fake_rx_or_tx_queues(dev, nb_rx_q, nb_tx_q);
- if (ret) {
- hns3_err(hw, "fail to set Rx/Tx fake queues, ret = %d.",
- ret);
- return ret;
- }
+ ret = hns3_set_fake_rx_or_tx_queues(dev, nb_rx_q, nb_tx_q);
+ if (ret) {
+ hns3_err(hw, "fail to set Rx/Tx fake queues, ret = %d.", ret);
+ return ret;
}
hw->adapter_state = HNS3_NIC_CONFIGURING;
diff --git a/drivers/net/hns3/hns3_rxtx.c b/drivers/net/hns3/hns3_rxtx.c
index abf9908aeb..c77c828011 100644
--- a/drivers/net/hns3/hns3_rxtx.c
+++ b/drivers/net/hns3/hns3_rxtx.c
@@ -1616,6 +1616,9 @@ hns3_set_fake_rx_or_tx_queues(struct rte_eth_dev *dev, uint16_t nb_rx_q,
uint16_t q;
int ret;
+ if (hns3_dev_indep_txrx_supported(hw))
+ return 0;
+
/* Setup new number of fake RX/TX queues and reconfigure device. */
rx_need_add_nb_q = hw->cfg_max_queues - nb_rx_q;
tx_need_add_nb_q = hw->cfg_max_queues - nb_tx_q;
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-07-12 13:41:39.892693620 +0100
+++ 0062-net-hns3-fix-fake-queue-rollback.patch 2021-07-12 13:41:36.526123360 +0100
@@ -1 +1 @@
-From a2ddaac12b08a98eee4b4e082d72c2f68dc92bf0 Mon Sep 17 00:00:00 2001
+From 219472cbad519c64d8fa8124b09c4a5fc3c0bc6b Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit a2ddaac12b08a98eee4b4e082d72c2f68dc92bf0 ]
+
@@ -14 +15,0 @@
-Cc: stable@dpdk.org
@@ -25 +26 @@
-index dff265828e..ad25aa69d7 100644
+index 249ab31040..5f897fed39 100644
@@ -28 +29 @@
-@@ -2497,13 +2497,10 @@ hns3_dev_configure(struct rte_eth_dev *dev)
+@@ -2376,13 +2376,10 @@ hns3_dev_configure(struct rte_eth_dev *dev)
@@ -47 +48 @@
-index 7a5c162964..74f93dcb15 100644
+index 5a9550d853..2959d81a71 100644
@@ -50 +51 @@
-@@ -801,13 +801,10 @@ hns3vf_dev_configure(struct rte_eth_dev *dev)
+@@ -799,13 +799,10 @@ hns3vf_dev_configure(struct rte_eth_dev *dev)
@@ -69 +70 @@
-index 1d7a769768..d6aef756b3 100644
+index abf9908aeb..c77c828011 100644
@@ -72 +73 @@
-@@ -1617,6 +1617,9 @@ hns3_set_fake_rx_or_tx_queues(struct rte_eth_dev *dev, uint16_t nb_rx_q,
+@@ -1616,6 +1616,9 @@ hns3_set_fake_rx_or_tx_queues(struct rte_eth_dev *dev, uint16_t nb_rx_q,
^ permalink raw reply [flat|nested] 208+ messages in thread
* [dpdk-stable] patch 'net/hns3: fix VLAN strip log' has been queued to stable release 20.11.3
2021-07-12 13:03 [dpdk-stable] patch 'graph: fix memory leak in stats' has been queued to stable release 20.11.3 luca.boccassi
` (60 preceding siblings ...)
2021-07-12 13:04 ` [dpdk-stable] patch 'net/hns3: fix fake queue rollback' " luca.boccassi
@ 2021-07-12 13:04 ` luca.boccassi
2021-07-12 13:04 ` [dpdk-stable] patch 'net/hns3: fix maximum queues on configuration failure' " luca.boccassi
` (53 subsequent siblings)
115 siblings, 0 replies; 208+ messages in thread
From: luca.boccassi @ 2021-07-12 13:04 UTC (permalink / raw)
To: Chengchang Tang; +Cc: Min Hu, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.3
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/14/21. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/fc750680d70738c036125e9d4537f59be6cb3494
Thanks.
Luca Boccassi
---
From fc750680d70738c036125e9d4537f59be6cb3494 Mon Sep 17 00:00:00 2001
From: Chengchang Tang <tangchengchang@huawei.com>
Date: Sun, 13 Jun 2021 10:31:54 +0800
Subject: [PATCH] net/hns3: fix VLAN strip log
[ upstream commit d8c497c55a3b13a0ec6ef8614af0ced46c372eb9 ]
When the current VLAN stripping is set, the log print always prompts
that the enabling fails, bug if may actually be the disabling failure.
Fixes: 411d23b9eafb ("net/hns3: support VLAN")
Signed-off-by: Chengchang Tang <tangchengchang@huawei.com>
Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
---
drivers/net/hns3/hns3_ethdev.c | 3 ++-
drivers/net/hns3/hns3_ethdev_vf.c | 3 ++-
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/net/hns3/hns3_ethdev.c b/drivers/net/hns3/hns3_ethdev.c
index 5f897fed39..0079b56367 100644
--- a/drivers/net/hns3/hns3_ethdev.c
+++ b/drivers/net/hns3/hns3_ethdev.c
@@ -558,7 +558,8 @@ hns3_en_hw_strip_rxvtag(struct hns3_adapter *hns, bool enable)
ret = hns3_set_vlan_rx_offload_cfg(hns, &rxvlan_cfg);
if (ret) {
- hns3_err(hw, "enable strip rx vtag failed, ret =%d", ret);
+ hns3_err(hw, "%s strip rx vtag failed, ret = %d.",
+ enable ? "enable" : "disable", ret);
return ret;
}
diff --git a/drivers/net/hns3/hns3_ethdev_vf.c b/drivers/net/hns3/hns3_ethdev_vf.c
index 2959d81a71..04b28a3a21 100644
--- a/drivers/net/hns3/hns3_ethdev_vf.c
+++ b/drivers/net/hns3/hns3_ethdev_vf.c
@@ -1499,7 +1499,8 @@ hns3vf_en_hw_strip_rxvtag(struct hns3_hw *hw, bool enable)
ret = hns3_send_mbx_msg(hw, HNS3_MBX_SET_VLAN, HNS3_MBX_VLAN_RX_OFF_CFG,
&msg_data, sizeof(msg_data), false, NULL, 0);
if (ret)
- hns3_err(hw, "vf enable strip failed, ret =%d", ret);
+ hns3_err(hw, "vf %s strip failed, ret = %d.",
+ enable ? "enable" : "disable", ret);
return ret;
}
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-07-12 13:41:39.954809252 +0100
+++ 0063-net-hns3-fix-VLAN-strip-log.patch 2021-07-12 13:41:36.542123694 +0100
@@ -1 +1 @@
-From d8c497c55a3b13a0ec6ef8614af0ced46c372eb9 Mon Sep 17 00:00:00 2001
+From fc750680d70738c036125e9d4537f59be6cb3494 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit d8c497c55a3b13a0ec6ef8614af0ced46c372eb9 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -20 +21 @@
-index ad25aa69d7..ff219b8b52 100644
+index 5f897fed39..0079b56367 100644
@@ -23 +24 @@
-@@ -640,7 +640,8 @@ hns3_en_hw_strip_rxvtag(struct hns3_adapter *hns, bool enable)
+@@ -558,7 +558,8 @@ hns3_en_hw_strip_rxvtag(struct hns3_adapter *hns, bool enable)
@@ -34 +35 @@
-index 74f93dcb15..c5f320fc5b 100644
+index 2959d81a71..04b28a3a21 100644
@@ -37 +38 @@
-@@ -1606,7 +1606,8 @@ hns3vf_en_hw_strip_rxvtag(struct hns3_hw *hw, bool enable)
+@@ -1499,7 +1499,8 @@ hns3vf_en_hw_strip_rxvtag(struct hns3_hw *hw, bool enable)
^ permalink raw reply [flat|nested] 208+ messages in thread
* [dpdk-stable] patch 'net/hns3: fix maximum queues on configuration failure' has been queued to stable release 20.11.3
2021-07-12 13:03 [dpdk-stable] patch 'graph: fix memory leak in stats' has been queued to stable release 20.11.3 luca.boccassi
` (61 preceding siblings ...)
2021-07-12 13:04 ` [dpdk-stable] patch 'net/hns3: fix VLAN strip log' " luca.boccassi
@ 2021-07-12 13:04 ` luca.boccassi
2021-07-12 13:05 ` [dpdk-stable] patch 'net/pfe: remove unnecessary null check' " luca.boccassi
` (52 subsequent siblings)
115 siblings, 0 replies; 208+ messages in thread
From: luca.boccassi @ 2021-07-12 13:04 UTC (permalink / raw)
To: Huisong Li; +Cc: Min Hu, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.3
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/14/21. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/1fa5c27d2d45e71e78b192ae3b022ecaf680765e
the
Thanks.
Luca Boccassi
---
From 1fa5c27d2d45e71e78b192ae3b022ecaf680765e Mon Sep 17 00:00:00 2001
From: Huisong Li <lihuisong@huawei.com>
Date: Sun, 13 Jun 2021 10:31:55 +0800
Subject: [PATCH] net/hns3: fix maximum queues on configuration failure
[ upstream commit 5b96963f9d121cee0eaaa19c19eca0ddbeee73b7 ]
The "cfg_max_queues" maintains configured max queue numbers from user,
and is equal to the maximum of "nb_rx_queues" and "nb_tx_queues" in
"dev->data".
From the ethdev layer framework, "nb_rx/tx_queues" in "dev->data" were set
to zero in rte_eth_dev_configure() if ops.dev_configure in PMD fails to be
executed, In addition, if ops.dev_configure in HNS3 PMD failed, the fake
queues are also cleared on a device that does not support independent Rx/Tx
queues.
Therefore, the "cfg_max_queues" should be also set to zero when
dev_configure fails.
Fixes: fa29fe45a7b4 ("net/hns3: support queue start and stop")
Signed-off-by: Huisong Li <lihuisong@huawei.com>
Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
---
drivers/net/hns3/hns3_ethdev.c | 2 ++
drivers/net/hns3/hns3_ethdev_vf.c | 2 ++
2 files changed, 4 insertions(+)
diff --git a/drivers/net/hns3/hns3_ethdev.c b/drivers/net/hns3/hns3_ethdev.c
index 0079b56367..089c94b8e9 100644
--- a/drivers/net/hns3/hns3_ethdev.c
+++ b/drivers/net/hns3/hns3_ethdev.c
@@ -2380,6 +2380,7 @@ hns3_dev_configure(struct rte_eth_dev *dev)
ret = hns3_set_fake_rx_or_tx_queues(dev, nb_rx_q, nb_tx_q);
if (ret) {
hns3_err(hw, "fail to set Rx/Tx fake queues, ret = %d.", ret);
+ hw->cfg_max_queues = 0;
return ret;
}
@@ -2439,6 +2440,7 @@ hns3_dev_configure(struct rte_eth_dev *dev)
return 0;
cfg_err:
+ hw->cfg_max_queues = 0;
(void)hns3_set_fake_rx_or_tx_queues(dev, 0, 0);
hw->adapter_state = HNS3_NIC_INITIALIZED;
diff --git a/drivers/net/hns3/hns3_ethdev_vf.c b/drivers/net/hns3/hns3_ethdev_vf.c
index 04b28a3a21..913484d2e3 100644
--- a/drivers/net/hns3/hns3_ethdev_vf.c
+++ b/drivers/net/hns3/hns3_ethdev_vf.c
@@ -802,6 +802,7 @@ hns3vf_dev_configure(struct rte_eth_dev *dev)
ret = hns3_set_fake_rx_or_tx_queues(dev, nb_rx_q, nb_tx_q);
if (ret) {
hns3_err(hw, "fail to set Rx/Tx fake queues, ret = %d.", ret);
+ hw->cfg_max_queues = 0;
return ret;
}
@@ -871,6 +872,7 @@ hns3vf_dev_configure(struct rte_eth_dev *dev)
return 0;
cfg_err:
+ hw->cfg_max_queues = 0;
(void)hns3_set_fake_rx_or_tx_queues(dev, 0, 0);
hw->adapter_state = HNS3_NIC_INITIALIZED;
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-07-12 13:41:40.009596888 +0100
+++ 0064-net-hns3-fix-maximum-queues-on-configuration-failure.patch 2021-07-12 13:41:36.554123944 +0100
@@ -1 +1 @@
-From 5b96963f9d121cee0eaaa19c19eca0ddbeee73b7 Mon Sep 17 00:00:00 2001
+From 1fa5c27d2d45e71e78b192ae3b022ecaf680765e Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 5b96963f9d121cee0eaaa19c19eca0ddbeee73b7 ]
+
@@ -20 +21,0 @@
-Cc: stable@dpdk.org
@@ -30 +31 @@
-index ff219b8b52..d4561ffd90 100644
+index 0079b56367..089c94b8e9 100644
@@ -33 +34 @@
-@@ -2501,6 +2501,7 @@ hns3_dev_configure(struct rte_eth_dev *dev)
+@@ -2380,6 +2380,7 @@ hns3_dev_configure(struct rte_eth_dev *dev)
@@ -41 +42 @@
-@@ -2549,6 +2550,7 @@ hns3_dev_configure(struct rte_eth_dev *dev)
+@@ -2439,6 +2440,7 @@ hns3_dev_configure(struct rte_eth_dev *dev)
@@ -50 +51 @@
-index c5f320fc5b..e387cd6177 100644
+index 04b28a3a21..913484d2e3 100644
@@ -53 +54 @@
-@@ -804,6 +804,7 @@ hns3vf_dev_configure(struct rte_eth_dev *dev)
+@@ -802,6 +802,7 @@ hns3vf_dev_configure(struct rte_eth_dev *dev)
@@ -61 +62 @@
-@@ -863,6 +864,7 @@ hns3vf_dev_configure(struct rte_eth_dev *dev)
+@@ -871,6 +872,7 @@ hns3vf_dev_configure(struct rte_eth_dev *dev)
^ permalink raw reply [flat|nested] 208+ messages in thread
* [dpdk-stable] patch 'net/pfe: remove unnecessary null check' has been queued to stable release 20.11.3
2021-07-12 13:03 [dpdk-stable] patch 'graph: fix memory leak in stats' has been queued to stable release 20.11.3 luca.boccassi
` (62 preceding siblings ...)
2021-07-12 13:04 ` [dpdk-stable] patch 'net/hns3: fix maximum queues on configuration failure' " luca.boccassi
@ 2021-07-12 13:05 ` luca.boccassi
2021-07-12 13:05 ` [dpdk-stable] patch 'net/sfc: fix outer L4 checksum Rx' " luca.boccassi
` (51 subsequent siblings)
115 siblings, 0 replies; 208+ messages in thread
From: luca.boccassi @ 2021-07-12 13:05 UTC (permalink / raw)
To: Thierry Herbelot; +Cc: Gagandeep Singh, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.3
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/14/21. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/b0d9d06878b5b584ff719c01e8192b1eac446645
Thanks.
Luca Boccassi
---
From b0d9d06878b5b584ff719c01e8192b1eac446645 Mon Sep 17 00:00:00 2001
From: Thierry Herbelot <thierry.herbelot@6wind.com>
Date: Mon, 24 May 2021 11:37:54 +0200
Subject: [PATCH] net/pfe: remove unnecessary null check
[ upstream commit 01bfb518a39b91da7896abe579bcf72d06935bf5 ]
ethdev library does the check of dev before calling the link update.
Fixes: acd4818ea2a45 ("net/pfe: add link status update")
Signed-off-by: Thierry Herbelot <thierry.herbelot@6wind.com>
Acked-by: Gagandeep Singh <g.singh@nxp.com>
---
drivers/net/pfe/pfe_ethdev.c | 5 -----
1 file changed, 5 deletions(-)
diff --git a/drivers/net/pfe/pfe_ethdev.c b/drivers/net/pfe/pfe_ethdev.c
index 3b079693fb..f5c271b3f0 100644
--- a/drivers/net/pfe/pfe_ethdev.c
+++ b/drivers/net/pfe/pfe_ethdev.c
@@ -582,11 +582,6 @@ pfe_eth_link_update(struct rte_eth_dev *dev, int wait_to_complete __rte_unused)
struct rte_eth_link link, old;
unsigned int lstatus = 1;
- if (dev == NULL) {
- PFE_PMD_ERR("Invalid device in link_update.\n");
- return 0;
- }
-
memset(&old, 0, sizeof(old));
memset(&link, 0, sizeof(struct rte_eth_link));
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-07-12 13:41:40.061890315 +0100
+++ 0065-net-pfe-remove-unnecessary-null-check.patch 2021-07-12 13:41:36.558124027 +0100
@@ -1 +1 @@
-From 01bfb518a39b91da7896abe579bcf72d06935bf5 Mon Sep 17 00:00:00 2001
+From b0d9d06878b5b584ff719c01e8192b1eac446645 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 01bfb518a39b91da7896abe579bcf72d06935bf5 ]
+
@@ -9 +10,0 @@
-Cc: stable@dpdk.org
@@ -18 +19 @@
-index 3135466713..feec4d10a2 100644
+index 3b079693fb..f5c271b3f0 100644
^ permalink raw reply [flat|nested] 208+ messages in thread
* [dpdk-stable] patch 'net/sfc: fix outer L4 checksum Rx' has been queued to stable release 20.11.3
2021-07-12 13:03 [dpdk-stable] patch 'graph: fix memory leak in stats' has been queued to stable release 20.11.3 luca.boccassi
` (63 preceding siblings ...)
2021-07-12 13:05 ` [dpdk-stable] patch 'net/pfe: remove unnecessary null check' " luca.boccassi
@ 2021-07-12 13:05 ` luca.boccassi
2021-07-12 13:05 ` [dpdk-stable] patch 'net/tap: fix Rx checksum flags on IP options packets' " luca.boccassi
` (50 subsequent siblings)
115 siblings, 0 replies; 208+ messages in thread
From: luca.boccassi @ 2021-07-12 13:05 UTC (permalink / raw)
To: Thierry Herbelot; +Cc: Andrew Rybchenko, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.3
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/14/21. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/5a42fb04e8809c7caefa918f7a02b5d45b087ea7
Thanks.
Luca Boccassi
---
From 5a42fb04e8809c7caefa918f7a02b5d45b087ea7 Mon Sep 17 00:00:00 2001
From: Thierry Herbelot <thierry.herbelot@6wind.com>
Date: Mon, 24 May 2021 13:22:38 +0200
Subject: [PATCH] net/sfc: fix outer L4 checksum Rx
[ upstream commit 13fe18b3483775c2b052f4d2af330d2ef91a0835 ]
Do not return "GOOD" flag if the status was bad.
Fixes: 9e6e7f479ae9b ("net/sfc: support Rx checksum offload for EF100")
Signed-off-by: Thierry Herbelot <thierry.herbelot@6wind.com>
Reviewed-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
---
drivers/net/sfc/sfc_ef100_rx.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/sfc/sfc_ef100_rx.c b/drivers/net/sfc/sfc_ef100_rx.c
index 6ec0451057..f5fa629f90 100644
--- a/drivers/net/sfc/sfc_ef100_rx.c
+++ b/drivers/net/sfc/sfc_ef100_rx.c
@@ -211,7 +211,7 @@ sfc_ef100_rx_tun_outer_l4_csum(const efx_word_t class)
return EFX_WORD_FIELD(class,
ESF_GZ_RX_PREFIX_HCLASS_TUN_OUTER_L4_CSUM) ==
ESE_GZ_RH_HCLASS_L4_CSUM_GOOD ?
- PKT_RX_OUTER_L4_CKSUM_GOOD : PKT_RX_OUTER_L4_CKSUM_GOOD;
+ PKT_RX_OUTER_L4_CKSUM_GOOD : PKT_RX_OUTER_L4_CKSUM_BAD;
}
static uint32_t
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-07-12 13:41:40.108868276 +0100
+++ 0066-net-sfc-fix-outer-L4-checksum-Rx.patch 2021-07-12 13:41:36.558124027 +0100
@@ -1 +1 @@
-From 13fe18b3483775c2b052f4d2af330d2ef91a0835 Mon Sep 17 00:00:00 2001
+From 5a42fb04e8809c7caefa918f7a02b5d45b087ea7 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 13fe18b3483775c2b052f4d2af330d2ef91a0835 ]
+
@@ -9 +10,0 @@
-Cc: stable@dpdk.org
@@ -18 +19 @@
-index 8cde24c585..8b90463533 100644
+index 6ec0451057..f5fa629f90 100644
^ permalink raw reply [flat|nested] 208+ messages in thread
* [dpdk-stable] patch 'net/tap: fix Rx checksum flags on IP options packets' has been queued to stable release 20.11.3
2021-07-12 13:03 [dpdk-stable] patch 'graph: fix memory leak in stats' has been queued to stable release 20.11.3 luca.boccassi
` (64 preceding siblings ...)
2021-07-12 13:05 ` [dpdk-stable] patch 'net/sfc: fix outer L4 checksum Rx' " luca.boccassi
@ 2021-07-12 13:05 ` luca.boccassi
2021-07-12 13:05 ` [dpdk-stable] patch 'net/tap: fix Rx checksum flags on TCP " luca.boccassi
` (49 subsequent siblings)
115 siblings, 0 replies; 208+ messages in thread
From: luca.boccassi @ 2021-07-12 13:05 UTC (permalink / raw)
To: Olivier Matz; +Cc: Andrew Rybchenko, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.3
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/14/21. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/d355f3ba883cd36486f3a5cf2b7cdcb62b43b30a
Thanks.
Luca Boccassi
---
From d355f3ba883cd36486f3a5cf2b7cdcb62b43b30a Mon Sep 17 00:00:00 2001
From: Olivier Matz <olivier.matz@6wind.com>
Date: Wed, 30 Jun 2021 15:51:55 +0200
Subject: [PATCH] net/tap: fix Rx checksum flags on IP options packets
[ upstream commit a46bd97f60e6be8ac5d8d3a0657a60e66176a405 ]
When packet type is IPV4_EXT, the checksum is always marked as good in
the mbuf offload flags.
Since we know the header lengths, we can easily call
rte_ipv4_udptcp_cksum() in this case too.
Fixes: 8ae3023387e9 ("net/tap: add Rx/Tx checksum offload support")
Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Reviewed-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
---
drivers/net/tap/rte_eth_tap.c | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/drivers/net/tap/rte_eth_tap.c b/drivers/net/tap/rte_eth_tap.c
index c0a348a641..cf42809461 100644
--- a/drivers/net/tap/rte_eth_tap.c
+++ b/drivers/net/tap/rte_eth_tap.c
@@ -342,7 +342,11 @@ tap_verify_csum(struct rte_mbuf *mbuf)
rte_pktmbuf_data_len(mbuf))
return;
} else {
- /* IPv6 extensions are not supported */
+ /* - RTE_PTYPE_L3_IPV4_EXT_UNKNOWN cannot happen because
+ * mbuf->packet_type is filled by rte_net_get_ptype() which
+ * never returns this value.
+ * - IPv6 extensions are not supported.
+ */
return;
}
if (l4 == RTE_PTYPE_L4_UDP || l4 == RTE_PTYPE_L4_TCP) {
@@ -350,7 +354,7 @@ tap_verify_csum(struct rte_mbuf *mbuf)
/* Don't verify checksum for multi-segment packets. */
if (mbuf->nb_segs > 1)
return;
- if (l3 == RTE_PTYPE_L3_IPV4) {
+ if (l3 == RTE_PTYPE_L3_IPV4 || l3 == RTE_PTYPE_L3_IPV4_EXT) {
if (l4 == RTE_PTYPE_L4_UDP) {
udp_hdr = (struct rte_udp_hdr *)l4_hdr;
if (udp_hdr->dgram_cksum == 0) {
@@ -364,7 +368,7 @@ tap_verify_csum(struct rte_mbuf *mbuf)
}
}
cksum = ~rte_ipv4_udptcp_cksum(l3_hdr, l4_hdr);
- } else if (l3 == RTE_PTYPE_L3_IPV6) {
+ } else { /* l3 == RTE_PTYPE_L3_IPV6, checked above */
cksum = ~rte_ipv6_udptcp_cksum(l3_hdr, l4_hdr);
}
mbuf->ol_flags |= cksum ?
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-07-12 13:41:40.152637882 +0100
+++ 0067-net-tap-fix-Rx-checksum-flags-on-IP-options-packets.patch 2021-07-12 13:41:36.562124111 +0100
@@ -1 +1 @@
-From a46bd97f60e6be8ac5d8d3a0657a60e66176a405 Mon Sep 17 00:00:00 2001
+From d355f3ba883cd36486f3a5cf2b7cdcb62b43b30a Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit a46bd97f60e6be8ac5d8d3a0657a60e66176a405 ]
+
@@ -13 +14,0 @@
-Cc: stable@dpdk.org
@@ -22 +23 @@
-index 5735988e7c..5513cfd2d7 100644
+index c0a348a641..cf42809461 100644
^ permalink raw reply [flat|nested] 208+ messages in thread
* [dpdk-stable] patch 'net/tap: fix Rx checksum flags on TCP packets' has been queued to stable release 20.11.3
2021-07-12 13:03 [dpdk-stable] patch 'graph: fix memory leak in stats' has been queued to stable release 20.11.3 luca.boccassi
` (65 preceding siblings ...)
2021-07-12 13:05 ` [dpdk-stable] patch 'net/tap: fix Rx checksum flags on IP options packets' " luca.boccassi
@ 2021-07-12 13:05 ` luca.boccassi
2021-07-12 13:05 ` [dpdk-stable] patch 'app/testpmd: fix type of FEC mode parsing output' " luca.boccassi
` (48 subsequent siblings)
115 siblings, 0 replies; 208+ messages in thread
From: luca.boccassi @ 2021-07-12 13:05 UTC (permalink / raw)
To: Olivier Matz; +Cc: Andrew Rybchenko, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.3
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/14/21. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/f4a79bb95234970d33823921e19d6f25de3df95b
Thanks.
Luca Boccassi
---
From f4a79bb95234970d33823921e19d6f25de3df95b Mon Sep 17 00:00:00 2001
From: Olivier Matz <olivier.matz@6wind.com>
Date: Wed, 30 Jun 2021 15:51:56 +0200
Subject: [PATCH] net/tap: fix Rx checksum flags on TCP packets
[ upstream commit 375474b4d9a89456bd0d8baa4b610d3157ee262c ]
Since commit d5df2ae0428a ("net: fix unneeded replacement of TCP
checksum 0"), the functions rte_ipv4_udptcp_cksum() or
rte_ipv6_udptcp_cksum() can return either 0x0000 or 0xffff when used to
verify a packet containing a valid checksum.
This new behavior broke the checksum verification in tap driver for TCP
packets: these packets are marked with PKT_RX_L4_CKSUM_BAD.
Fix this by checking the 2 possible values. A next commit will introduce
a checksum verification helper to simplify this a bit.
Fixes: d5df2ae0428a ("net: fix unneeded replacement of TCP checksum 0")
Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Acked-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
---
drivers/net/tap/rte_eth_tap.c | 12 +++++++-----
1 file changed, 7 insertions(+), 5 deletions(-)
diff --git a/drivers/net/tap/rte_eth_tap.c b/drivers/net/tap/rte_eth_tap.c
index cf42809461..691566b263 100644
--- a/drivers/net/tap/rte_eth_tap.c
+++ b/drivers/net/tap/rte_eth_tap.c
@@ -350,6 +350,8 @@ tap_verify_csum(struct rte_mbuf *mbuf)
return;
}
if (l4 == RTE_PTYPE_L4_UDP || l4 == RTE_PTYPE_L4_TCP) {
+ int cksum_ok;
+
l4_hdr = rte_pktmbuf_mtod_offset(mbuf, void *, l2_len + l3_len);
/* Don't verify checksum for multi-segment packets. */
if (mbuf->nb_segs > 1)
@@ -367,13 +369,13 @@ tap_verify_csum(struct rte_mbuf *mbuf)
return;
}
}
- cksum = ~rte_ipv4_udptcp_cksum(l3_hdr, l4_hdr);
+ cksum = rte_ipv4_udptcp_cksum(l3_hdr, l4_hdr);
} else { /* l3 == RTE_PTYPE_L3_IPV6, checked above */
- cksum = ~rte_ipv6_udptcp_cksum(l3_hdr, l4_hdr);
+ cksum = rte_ipv6_udptcp_cksum(l3_hdr, l4_hdr);
}
- mbuf->ol_flags |= cksum ?
- PKT_RX_L4_CKSUM_BAD :
- PKT_RX_L4_CKSUM_GOOD;
+ cksum_ok = (cksum == 0) || (cksum == 0xffff);
+ mbuf->ol_flags |= cksum_ok ?
+ PKT_RX_L4_CKSUM_GOOD : PKT_RX_L4_CKSUM_BAD;
}
}
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-07-12 13:41:40.200299951 +0100
+++ 0068-net-tap-fix-Rx-checksum-flags-on-TCP-packets.patch 2021-07-12 13:41:36.566124194 +0100
@@ -1 +1 @@
-From 375474b4d9a89456bd0d8baa4b610d3157ee262c Mon Sep 17 00:00:00 2001
+From f4a79bb95234970d33823921e19d6f25de3df95b Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 375474b4d9a89456bd0d8baa4b610d3157ee262c ]
+
@@ -18 +19,0 @@
-Cc: stable@dpdk.org
@@ -27 +28 @@
-index 5513cfd2d7..5429f611c1 100644
+index cf42809461..691566b263 100644
^ permalink raw reply [flat|nested] 208+ messages in thread
* [dpdk-stable] patch 'app/testpmd: fix type of FEC mode parsing output' has been queued to stable release 20.11.3
2021-07-12 13:03 [dpdk-stable] patch 'graph: fix memory leak in stats' has been queued to stable release 20.11.3 luca.boccassi
` (66 preceding siblings ...)
2021-07-12 13:05 ` [dpdk-stable] patch 'net/tap: fix Rx checksum flags on TCP " luca.boccassi
@ 2021-07-12 13:05 ` luca.boccassi
2021-07-12 13:05 ` [dpdk-stable] patch 'ethdev: fix doc of flow action' " luca.boccassi
` (47 subsequent siblings)
115 siblings, 0 replies; 208+ messages in thread
From: luca.boccassi @ 2021-07-12 13:05 UTC (permalink / raw)
To: Jie Zhou; +Cc: Andrew Rybchenko, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.3
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/14/21. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/ca95cf7b5ae1fb6c9647cf2a29a978af4a0b4824
Thanks.
Luca Boccassi
---
From ca95cf7b5ae1fb6c9647cf2a29a978af4a0b4824 Mon Sep 17 00:00:00 2001
From: Jie Zhou <jizh@linux.microsoft.com>
Date: Tue, 29 Jun 2021 13:50:19 -0700
Subject: [PATCH] app/testpmd: fix type of FEC mode parsing output
[ upstream commit ce0a4a1d5d5b9b2d20909cd518cbd08529fc2437 ]
Passing an uint32_t pointer to an enum pointer parameter causes
pointer-sign warning on Windows (converts between pointers to
integer types with different sign), since enum is implicitly
converted to int on Windows.
And the current enum pointer parameter of that function is actually
misleading and should be fixed as an uint32_t pointer parameter.
Fixes: b19da32e3151 ("app/testpmd: add FEC command")
Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
Reviewed-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
---
app/test-pmd/cmdline.c | 6 +++---
app/test-pmd/config.c | 5 +++--
app/test-pmd/testpmd.h | 2 +-
3 files changed, 7 insertions(+), 6 deletions(-)
diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c
index 3712daae7b..e28d068cd2 100644
--- a/app/test-pmd/cmdline.c
+++ b/app/test-pmd/cmdline.c
@@ -16449,17 +16449,17 @@ cmd_set_port_fec_mode_parsed(
{
struct cmd_set_port_fec_mode *res = parsed_result;
uint16_t port_id = res->port_id;
- uint32_t mode;
+ uint32_t fec_capa;
int ret;
- ret = parse_fec_mode(res->fec_value, &mode);
+ ret = parse_fec_mode(res->fec_value, &fec_capa);
if (ret < 0) {
printf("Unknown fec mode: %s for Port %d\n", res->fec_value,
port_id);
return;
}
- ret = rte_eth_fec_set(port_id, mode);
+ ret = rte_eth_fec_set(port_id, fec_capa);
if (ret == -ENOTSUP) {
printf("Function not implemented\n");
return;
diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c
index 937a90f3cd..4847c36481 100644
--- a/app/test-pmd/config.c
+++ b/app/test-pmd/config.c
@@ -3760,13 +3760,14 @@ set_tx_pkt_split(const char *name)
}
int
-parse_fec_mode(const char *name, uint32_t *mode)
+parse_fec_mode(const char *name, uint32_t *fec_capa)
{
uint8_t i;
for (i = 0; i < RTE_DIM(fec_mode_name); i++) {
if (strcmp(fec_mode_name[i].name, name) == 0) {
- *mode = RTE_ETH_FEC_MODE_TO_CAPA(fec_mode_name[i].mode);
+ *fec_capa =
+ RTE_ETH_FEC_MODE_TO_CAPA(fec_mode_name[i].mode);
return 0;
}
}
diff --git a/app/test-pmd/testpmd.h b/app/test-pmd/testpmd.h
index aad2eb30f4..927ca587d3 100644
--- a/app/test-pmd/testpmd.h
+++ b/app/test-pmd/testpmd.h
@@ -878,7 +878,7 @@ void show_tx_pkt_segments(void);
void set_tx_pkt_times(unsigned int *tx_times);
void show_tx_pkt_times(void);
void set_tx_pkt_split(const char *name);
-int parse_fec_mode(const char *name, enum rte_eth_fec_mode *mode);
+int parse_fec_mode(const char *name, uint32_t *fec_capa);
void show_fec_capability(uint32_t num, struct rte_eth_fec_capa *speed_fec_capa);
void set_nb_pkt_per_burst(uint16_t pkt_burst);
char *list_pkt_forwarding_modes(void);
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-07-12 13:41:40.244433267 +0100
+++ 0069-app-testpmd-fix-type-of-FEC-mode-parsing-output.patch 2021-07-12 13:41:36.598124860 +0100
@@ -1 +1 @@
-From ce0a4a1d5d5b9b2d20909cd518cbd08529fc2437 Mon Sep 17 00:00:00 2001
+From ca95cf7b5ae1fb6c9647cf2a29a978af4a0b4824 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit ce0a4a1d5d5b9b2d20909cd518cbd08529fc2437 ]
+
@@ -15 +16,0 @@
-Cc: stable@dpdk.org
@@ -26 +27 @@
-index 0268b18f95..dff5a75ec5 100644
+index 3712daae7b..e28d068cd2 100644
@@ -29 +30 @@
-@@ -16997,17 +16997,17 @@ cmd_set_port_fec_mode_parsed(
+@@ -16449,17 +16449,17 @@ cmd_set_port_fec_mode_parsed(
@@ -51 +52 @@
-index 43c79b5021..d87c970ac9 100644
+index 937a90f3cd..4847c36481 100644
@@ -54 +55 @@
-@@ -3617,13 +3617,14 @@ set_tx_pkt_split(const char *name)
+@@ -3760,13 +3760,14 @@ set_tx_pkt_split(const char *name)
@@ -72 +73 @@
-index 283b5e3680..9ae4d90dd1 100644
+index aad2eb30f4..927ca587d3 100644
@@ -75 +76 @@
-@@ -885,7 +885,7 @@ void show_tx_pkt_segments(void);
+@@ -878,7 +878,7 @@ void show_tx_pkt_segments(void);
^ permalink raw reply [flat|nested] 208+ messages in thread
* [dpdk-stable] patch 'ethdev: fix doc of flow action' has been queued to stable release 20.11.3
2021-07-12 13:03 [dpdk-stable] patch 'graph: fix memory leak in stats' has been queued to stable release 20.11.3 luca.boccassi
` (67 preceding siblings ...)
2021-07-12 13:05 ` [dpdk-stable] patch 'app/testpmd: fix type of FEC mode parsing output' " luca.boccassi
@ 2021-07-12 13:05 ` luca.boccassi
2021-07-12 13:05 ` [dpdk-stable] patch 'app/testpmd: change port link speed without stopping all' " luca.boccassi
` (46 subsequent siblings)
115 siblings, 0 replies; 208+ messages in thread
From: luca.boccassi @ 2021-07-12 13:05 UTC (permalink / raw)
To: Jan Viktorin; +Cc: Ori Kam, Aman Deep Singh, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.3
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/14/21. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/590128bf6ea31873c7dae01d049fdf339dc79e0c
Thanks.
Luca Boccassi
---
From 590128bf6ea31873c7dae01d049fdf339dc79e0c Mon Sep 17 00:00:00 2001
From: Jan Viktorin <viktorin@cesnet.cz>
Date: Wed, 23 Jun 2021 11:18:25 +0200
Subject: [PATCH] ethdev: fix doc of flow action
[ upstream commit 56912ddef2b067a402dc648019938d354237c25a ]
The struct rte_flow_action was missing from DPDK API documentation.
Fixes: 3850cf0c8c37 ("ethdev: add tunnel encap/decap actions")
Signed-off-by: Jan Viktorin <viktorin@cesnet.cz>
Acked-by: Ori Kam <orika@nvidia.com>
Acked-by: Aman Deep Singh <aman.deep.singh@intel.com>
---
lib/librte_ethdev/rte_flow.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/librte_ethdev/rte_flow.h b/lib/librte_ethdev/rte_flow.h
index 3ecf65e3ee..5a45f9fab5 100644
--- a/lib/librte_ethdev/rte_flow.h
+++ b/lib/librte_ethdev/rte_flow.h
@@ -2819,7 +2819,7 @@ rte_flow_dynf_metadata_set(struct rte_mbuf *m, uint32_t v)
*RTE_FLOW_DYNF_METADATA(m) = v;
}
-/*
+/**
* Definition of a single action.
*
* A list of actions is terminated by a END action.
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-07-12 13:41:40.310966448 +0100
+++ 0070-ethdev-fix-doc-of-flow-action.patch 2021-07-12 13:41:36.602124944 +0100
@@ -1 +1 @@
-From 56912ddef2b067a402dc648019938d354237c25a Mon Sep 17 00:00:00 2001
+From 590128bf6ea31873c7dae01d049fdf339dc79e0c Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 56912ddef2b067a402dc648019938d354237c25a ]
+
@@ -9 +10,0 @@
-Cc: stable@dpdk.org
@@ -15 +16 @@
- lib/ethdev/rte_flow.h | 2 +-
+ lib/librte_ethdev/rte_flow.h | 2 +-
@@ -18,5 +19,5 @@
-diff --git a/lib/ethdev/rte_flow.h b/lib/ethdev/rte_flow.h
-index 961a5884fe..70f455d47d 100644
---- a/lib/ethdev/rte_flow.h
-+++ b/lib/ethdev/rte_flow.h
-@@ -3278,7 +3278,7 @@ rte_flow_dynf_metadata_set(struct rte_mbuf *m, uint32_t v)
+diff --git a/lib/librte_ethdev/rte_flow.h b/lib/librte_ethdev/rte_flow.h
+index 3ecf65e3ee..5a45f9fab5 100644
+--- a/lib/librte_ethdev/rte_flow.h
++++ b/lib/librte_ethdev/rte_flow.h
+@@ -2819,7 +2819,7 @@ rte_flow_dynf_metadata_set(struct rte_mbuf *m, uint32_t v)
^ permalink raw reply [flat|nested] 208+ messages in thread
* [dpdk-stable] patch 'app/testpmd: change port link speed without stopping all' has been queued to stable release 20.11.3
2021-07-12 13:03 [dpdk-stable] patch 'graph: fix memory leak in stats' has been queued to stable release 20.11.3 luca.boccassi
` (68 preceding siblings ...)
2021-07-12 13:05 ` [dpdk-stable] patch 'ethdev: fix doc of flow action' " luca.boccassi
@ 2021-07-12 13:05 ` luca.boccassi
2021-07-12 13:05 ` [dpdk-stable] patch 'crypto/qat: fix Arm build with special memcpy' " luca.boccassi
` (45 subsequent siblings)
115 siblings, 0 replies; 208+ messages in thread
From: luca.boccassi @ 2021-07-12 13:05 UTC (permalink / raw)
To: Huisong Li; +Cc: Min Hu, Ferruh Yigit, Xiaoyun Li, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.3
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/14/21. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/c09b86adc2fa56e3ff3354b5dd63c30294b4899f
Thanks.
Luca Boccassi
---
From c09b86adc2fa56e3ff3354b5dd63c30294b4899f Mon Sep 17 00:00:00 2001
From: Huisong Li <lihuisong@huawei.com>
Date: Wed, 28 Apr 2021 16:36:59 +0800
Subject: [PATCH] app/testpmd: change port link speed without stopping all
[ upstream commit 8ec87289e5eb0af241e01dfded5b7b5e163c5b25 ]
When we use the following cmd to modify the link speed of specified
port: "port config <port_id> speed xxx duplex xxx", we have to stop
all ports. It's not necessary.
Fixes: 82113036e4e5 ("ethdev: redesign link speed config")
Signed-off-by: Huisong Li <lihuisong@huawei.com>
Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Xiaoyun Li <xiaoyun.li@intel.com>
---
app/test-pmd/cmdline.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c
index e28d068cd2..113e27b603 100644
--- a/app/test-pmd/cmdline.c
+++ b/app/test-pmd/cmdline.c
@@ -1607,14 +1607,14 @@ cmd_config_speed_specific_parsed(void *parsed_result,
struct cmd_config_speed_specific *res = parsed_result;
uint32_t link_speed;
- if (!all_ports_stopped()) {
- printf("Please stop all ports first\n");
- return;
- }
-
if (port_id_is_invalid(res->id, ENABLED_WARN))
return;
+ if (!port_is_stopped(res->id)) {
+ printf("Please stop port %d first\n", res->id);
+ return;
+ }
+
if (parse_and_check_speed_duplex(res->value1, res->value2,
&link_speed) < 0)
return;
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-07-12 13:41:40.358831928 +0100
+++ 0071-app-testpmd-change-port-link-speed-without-stopping-.patch 2021-07-12 13:41:36.626125444 +0100
@@ -1 +1 @@
-From 8ec87289e5eb0af241e01dfded5b7b5e163c5b25 Mon Sep 17 00:00:00 2001
+From c09b86adc2fa56e3ff3354b5dd63c30294b4899f Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 8ec87289e5eb0af241e01dfded5b7b5e163c5b25 ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -22 +23 @@
-index bfd2fb9240..8468018cf3 100644
+index e28d068cd2..113e27b603 100644
@@ -25 +26 @@
-@@ -1619,14 +1619,14 @@ cmd_config_speed_specific_parsed(void *parsed_result,
+@@ -1607,14 +1607,14 @@ cmd_config_speed_specific_parsed(void *parsed_result,
^ permalink raw reply [flat|nested] 208+ messages in thread
* [dpdk-stable] patch 'crypto/qat: fix Arm build with special memcpy' has been queued to stable release 20.11.3
2021-07-12 13:03 [dpdk-stable] patch 'graph: fix memory leak in stats' has been queued to stable release 20.11.3 luca.boccassi
` (69 preceding siblings ...)
2021-07-12 13:05 ` [dpdk-stable] patch 'app/testpmd: change port link speed without stopping all' " luca.boccassi
@ 2021-07-12 13:05 ` luca.boccassi
2021-07-12 13:05 ` [dpdk-stable] patch 'app/crypto-perf: fix out-of-place mempool allocation' " luca.boccassi
` (44 subsequent siblings)
115 siblings, 0 replies; 208+ messages in thread
From: luca.boccassi @ 2021-07-12 13:05 UTC (permalink / raw)
To: Feifei Wang
Cc: Ruifeng Wang, Honnappa Nagarahalli, Adam Dybkowski, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.3
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/14/21. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/55fa4d96382b429a660a3c515906354e6c24259e
Thanks.
Luca Boccassi
---
From 55fa4d96382b429a660a3c515906354e6c24259e Mon Sep 17 00:00:00 2001
From: Feifei Wang <feifei.wang2@arm.com>
Date: Fri, 21 May 2021 10:00:04 +0800
Subject: [PATCH] crypto/qat: fix Arm build with special memcpy
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
[ upstream commit c316efc3cf90fba1b673373669096ad6a3e39cc4 ]
In Arm platform, when "RTE_ARCH_ARM64_MEMCPY" is set as true, gcc will
report variable uninitialized warning:
../drivers/crypto/qat/qat_sym_session.c: In function ‘partial_hash_compute’:
../lib/eal/include/generic/rte_byteorder.h:241:24: warning:
‘<U35a0>’ may be used uninitialized in this function
[-Wmaybe-uninitialized]
241 | #define rte_bswap32(x) __builtin_bswap32(x)
...
This is because "digest" will be initialized by "rte_memcpy" function
rather than "memcpy" if "RTE_ARCH_ARM64_MEMCPY" is set as true.
Furthermore, 'rte_memcpy' will initialize 'digest' with two steps
by invoking rte_mov_x functions. For example:
partial_hash_sha1 -> rte_memcpy -> rte_memcpy_ge16_lt_128 ->
step 1: rte_mov16(dst,src )
step 2: rte_mov16(dst - 16 + n, src - 16 + n)
However, gcc compiler cannot identify this multi-step initialization,
then it will report warning.
To fix this, use "memset" to initialize "digest".
Fixes: cd7fc8a84b48 ("eal/arm64: optimize memcpy")
Signed-off-by: Feifei Wang <feifei.wang2@arm.com>
Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>
Reviewed-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
Acked-by: Adam Dybkowski <adamx.dybkowski@intel.com>
---
drivers/crypto/qat/qat_sym_session.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/crypto/qat/qat_sym_session.c b/drivers/crypto/qat/qat_sym_session.c
index 23d059bf84..6e2193fb69 100644
--- a/drivers/crypto/qat/qat_sym_session.c
+++ b/drivers/crypto/qat/qat_sym_session.c
@@ -1190,6 +1190,9 @@ static int partial_hash_compute(enum icp_qat_hw_auth_algo hash_alg,
uint64_t *hash_state_out_be64;
int i;
+ /* Initialize to avoid gcc warning */
+ memset(digest, 0, sizeof(digest));
+
digest_size = qat_hash_get_digest_size(hash_alg);
if (digest_size <= 0)
return -EFAULT;
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-07-12 13:41:40.417666831 +0100
+++ 0072-crypto-qat-fix-Arm-build-with-special-memcpy.patch 2021-07-12 13:41:36.630125527 +0100
@@ -1 +1 @@
-From c316efc3cf90fba1b673373669096ad6a3e39cc4 Mon Sep 17 00:00:00 2001
+From 55fa4d96382b429a660a3c515906354e6c24259e Mon Sep 17 00:00:00 2001
@@ -8,0 +9,2 @@
+[ upstream commit c316efc3cf90fba1b673373669096ad6a3e39cc4 ]
+
@@ -34 +35,0 @@
-Cc: stable@dpdk.org
@@ -45 +46 @@
-index 231b1640da..e22dd3600c 100644
+index 23d059bf84..6e2193fb69 100644
@@ -48 +49 @@
-@@ -1196,6 +1196,9 @@ static int partial_hash_compute(enum icp_qat_hw_auth_algo hash_alg,
+@@ -1190,6 +1190,9 @@ static int partial_hash_compute(enum icp_qat_hw_auth_algo hash_alg,
^ permalink raw reply [flat|nested] 208+ messages in thread
* [dpdk-stable] patch 'app/crypto-perf: fix out-of-place mempool allocation' has been queued to stable release 20.11.3
2021-07-12 13:03 [dpdk-stable] patch 'graph: fix memory leak in stats' has been queued to stable release 20.11.3 luca.boccassi
` (70 preceding siblings ...)
2021-07-12 13:05 ` [dpdk-stable] patch 'crypto/qat: fix Arm build with special memcpy' " luca.boccassi
@ 2021-07-12 13:05 ` luca.boccassi
2021-07-12 13:05 ` [dpdk-stable] patch 'test/crypto: fix mbuf reset after null check' " luca.boccassi
` (43 subsequent siblings)
115 siblings, 0 replies; 208+ messages in thread
From: luca.boccassi @ 2021-07-12 13:05 UTC (permalink / raw)
To: Kai Ji; +Cc: Fan Zhang, Pablo de Lara, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.3
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/14/21. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/36fbf73b6af6e337f8c8bff64aaa0f1d44c11288
Thanks.
Luca Boccassi
---
From 36fbf73b6af6e337f8c8bff64aaa0f1d44c11288 Mon Sep 17 00:00:00 2001
From: Kai Ji <kai.ji@intel.com>
Date: Mon, 24 May 2021 17:46:27 +0100
Subject: [PATCH] app/crypto-perf: fix out-of-place mempool allocation
[ upstream commit c84e324e7ccb995b596c34a8a2c8a9c7cf51e3d2 ]
Add missing rte_mbuf size in mempool allocation for
out-of-place operation.
Fixes: bf9d6702eca9 ("app/crypto-perf: use single mempool")
Signed-off-by: Kai Ji <kai.ji@intel.com>
Acked-by: Fan Zhang <roy.fan.zhang@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
---
app/test-crypto-perf/cperf_test_common.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/app/test-crypto-perf/cperf_test_common.c b/app/test-crypto-perf/cperf_test_common.c
index 058e0ba564..12925c7f22 100644
--- a/app/test-crypto-perf/cperf_test_common.c
+++ b/app/test-crypto-perf/cperf_test_common.c
@@ -194,7 +194,7 @@ cperf_alloc_common_memory(const struct cperf_options *options,
(mbuf_size * segments_nb);
params.dst_buf_offset = *dst_buf_offset;
/* Destination buffer will be one segment only */
- obj_size += max_size;
+ obj_size += max_size + sizeof(struct rte_mbuf);
}
*pool = rte_mempool_create_empty(pool_name,
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-07-12 13:41:40.462579094 +0100
+++ 0073-app-crypto-perf-fix-out-of-place-mempool-allocation.patch 2021-07-12 13:41:36.630125527 +0100
@@ -1 +1 @@
-From c84e324e7ccb995b596c34a8a2c8a9c7cf51e3d2 Mon Sep 17 00:00:00 2001
+From 36fbf73b6af6e337f8c8bff64aaa0f1d44c11288 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit c84e324e7ccb995b596c34a8a2c8a9c7cf51e3d2 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
^ permalink raw reply [flat|nested] 208+ messages in thread
* [dpdk-stable] patch 'test/crypto: fix mbuf reset after null check' has been queued to stable release 20.11.3
2021-07-12 13:03 [dpdk-stable] patch 'graph: fix memory leak in stats' has been queued to stable release 20.11.3 luca.boccassi
` (71 preceding siblings ...)
2021-07-12 13:05 ` [dpdk-stable] patch 'app/crypto-perf: fix out-of-place mempool allocation' " luca.boccassi
@ 2021-07-12 13:05 ` luca.boccassi
2021-07-12 13:05 ` [dpdk-stable] patch 'crypto/aesni_gcm: fix performance on some AVX512 CPUs' " luca.boccassi
` (42 subsequent siblings)
115 siblings, 0 replies; 208+ messages in thread
From: luca.boccassi @ 2021-07-12 13:05 UTC (permalink / raw)
To: Thierry Herbelot; +Cc: Akhil Goyal, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.3
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/14/21. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/72af1d626d30632859314e0485d360b5431b4bf1
Thanks.
Luca Boccassi
---
From 72af1d626d30632859314e0485d360b5431b4bf1 Mon Sep 17 00:00:00 2001
From: Thierry Herbelot <thierry.herbelot@6wind.com>
Date: Mon, 24 May 2021 11:01:13 +0200
Subject: [PATCH] test/crypto: fix mbuf reset after null check
[ upstream commit 2b81eb2c992b2e3728b8866cf6199cfd3b5fd776 ]
Use m only after it was checked not to be NULL.
Fixes: 202d375c60bc1 ("app/test: add cryptodev unit and performance tests")
Signed-off-by: Thierry Herbelot <thierry.herbelot@6wind.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
---
app/test/test_cryptodev.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/app/test/test_cryptodev.c b/app/test/test_cryptodev.c
index ea24e8edb7..8c76cdb313 100644
--- a/app/test/test_cryptodev.c
+++ b/app/test/test_cryptodev.c
@@ -135,10 +135,11 @@ setup_test_string(struct rte_mempool *mpool,
struct rte_mbuf *m = rte_pktmbuf_alloc(mpool);
size_t t_len = len - (blocksize ? (len % blocksize) : 0);
- memset(m->buf_addr, 0, m->buf_len);
if (m) {
- char *dst = rte_pktmbuf_append(m, t_len);
+ char *dst;
+ memset(m->buf_addr, 0, m->buf_len);
+ dst = rte_pktmbuf_append(m, t_len);
if (!dst) {
rte_pktmbuf_free(m);
return NULL;
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-07-12 13:41:40.503116363 +0100
+++ 0074-test-crypto-fix-mbuf-reset-after-null-check.patch 2021-07-12 13:41:36.650125944 +0100
@@ -1 +1 @@
-From 2b81eb2c992b2e3728b8866cf6199cfd3b5fd776 Mon Sep 17 00:00:00 2001
+From 72af1d626d30632859314e0485d360b5431b4bf1 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 2b81eb2c992b2e3728b8866cf6199cfd3b5fd776 ]
+
@@ -9 +10,0 @@
-Cc: stable@dpdk.org
@@ -18 +19 @@
-index ead8c6e3dc..dd1669e007 100644
+index ea24e8edb7..8c76cdb313 100644
^ permalink raw reply [flat|nested] 208+ messages in thread
* [dpdk-stable] patch 'crypto/aesni_gcm: fix performance on some AVX512 CPUs' has been queued to stable release 20.11.3
2021-07-12 13:03 [dpdk-stable] patch 'graph: fix memory leak in stats' has been queued to stable release 20.11.3 luca.boccassi
` (72 preceding siblings ...)
2021-07-12 13:05 ` [dpdk-stable] patch 'test/crypto: fix mbuf reset after null check' " luca.boccassi
@ 2021-07-12 13:05 ` luca.boccassi
2021-07-12 13:05 ` [dpdk-stable] patch 'test/crypto: fix autotest function parameters' " luca.boccassi
` (41 subsequent siblings)
115 siblings, 0 replies; 208+ messages in thread
From: luca.boccassi @ 2021-07-12 13:05 UTC (permalink / raw)
To: Kai Ji; +Cc: Fan Zhang, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.3
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/14/21. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/636a31ebdd5f0e9ec7490c7da625733d121f95c9
Thanks.
Luca Boccassi
---
From 636a31ebdd5f0e9ec7490c7da625733d121f95c9 Mon Sep 17 00:00:00 2001
From: Kai Ji <kai.ji@intel.com>
Date: Tue, 29 Jun 2021 16:19:07 +0100
Subject: [PATCH] crypto/aesni_gcm: fix performance on some AVX512 CPUs
[ upstream commit 93d5bdb5e39a46dad5d87e2317cc59a483cdc3a3 ]
This patch fixes the aesni_gcm performance issue on systems with AVX512
CPU flag presented but with VAES CPU flag missing, such as Skylake.
Fixes: 81fe96a0cece ("crypto/aesni_gcm: use architecture independent API")
Signed-off-by: Kai Ji <kai.ji@intel.com>
Acked-by: Fan Zhang <roy.fan.zhang@intel.com>
---
drivers/crypto/aesni_gcm/aesni_gcm_pmd.c | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/drivers/crypto/aesni_gcm/aesni_gcm_pmd.c b/drivers/crypto/aesni_gcm/aesni_gcm_pmd.c
index 0de51202a6..cc4e08512b 100644
--- a/drivers/crypto/aesni_gcm/aesni_gcm_pmd.c
+++ b/drivers/crypto/aesni_gcm/aesni_gcm_pmd.c
@@ -842,8 +842,14 @@ aesni_gcm_create(const char *name,
init_mb_mgr_avx2(mb_mgr);
break;
case RTE_AESNI_GCM_AVX512:
- dev->feature_flags |= RTE_CRYPTODEV_FF_CPU_AVX512;
- init_mb_mgr_avx512(mb_mgr);
+ if (rte_cpu_get_flag_enabled(RTE_CPUFLAG_VAES)) {
+ dev->feature_flags |= RTE_CRYPTODEV_FF_CPU_AVX512;
+ init_mb_mgr_avx512(mb_mgr);
+ } else {
+ dev->feature_flags |= RTE_CRYPTODEV_FF_CPU_AVX2;
+ init_mb_mgr_avx2(mb_mgr);
+ vector_mode = RTE_AESNI_GCM_AVX2;
+ }
break;
default:
AESNI_GCM_LOG(ERR, "Unsupported vector mode %u\n", vector_mode);
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-07-12 13:41:40.558669133 +0100
+++ 0075-crypto-aesni_gcm-fix-performance-on-some-AVX512-CPUs.patch 2021-07-12 13:41:36.650125944 +0100
@@ -1 +1 @@
-From 93d5bdb5e39a46dad5d87e2317cc59a483cdc3a3 Mon Sep 17 00:00:00 2001
+From 636a31ebdd5f0e9ec7490c7da625733d121f95c9 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 93d5bdb5e39a46dad5d87e2317cc59a483cdc3a3 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -19 +20 @@
-index bc87e44a9d..886e2a5aaa 100644
+index 0de51202a6..cc4e08512b 100644
^ permalink raw reply [flat|nested] 208+ messages in thread
* [dpdk-stable] patch 'test/crypto: fix autotest function parameters' has been queued to stable release 20.11.3
2021-07-12 13:03 [dpdk-stable] patch 'graph: fix memory leak in stats' has been queued to stable release 20.11.3 luca.boccassi
` (73 preceding siblings ...)
2021-07-12 13:05 ` [dpdk-stable] patch 'crypto/aesni_gcm: fix performance on some AVX512 CPUs' " luca.boccassi
@ 2021-07-12 13:05 ` luca.boccassi
2021-07-12 13:05 ` [dpdk-stable] patch 'test/crypto: fix typo in AES case' " luca.boccassi
` (40 subsequent siblings)
115 siblings, 0 replies; 208+ messages in thread
From: luca.boccassi @ 2021-07-12 13:05 UTC (permalink / raw)
To: Rebecca Troy; +Cc: Ciara Power, Hemant Agrawal, Akhil Goyal, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.3
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/14/21. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/7eaf51dbe70e676852cd4e36164c2b8060d14d19
Thanks.
Luca Boccassi
---
From 7eaf51dbe70e676852cd4e36164c2b8060d14d19 Mon Sep 17 00:00:00 2001
From: Rebecca Troy <rebecca.troy@intel.com>
Date: Wed, 30 Jun 2021 14:01:41 +0000
Subject: [PATCH] test/crypto: fix autotest function parameters
[ upstream commit 4ea794318a523ef8365e2a765ba47171d223d4ee ]
Fixed parameters on autotest functions by removing comments.
Fixes: 202d375c60bc ("app/test: add cryptodev unit and performance tests")
Fixes: 4ed1e79e7819 ("test/crypto: add tests for virtio-crypto")
Fixes: 3aafc423cf4d ("snow3g: add driver for SNOW 3G library")
Fixes: 27a1c4714d54 ("app/test: add KASUMI crypto")
Fixes: 4c99481f49c4 ("app/test: add ZUC")
Fixes: c8e69fce7046 ("crypto/scheduler: add unit test")
Fixes: ae002048bbea ("test/crypto: add DPAA2 crypto functional test")
Fixes: b674d6d0381a ("test/crypto: add dpaa crypto test cases")
Fixes: a8dbd44d6b4c ("test/crypto: add CAAM JR validation cases")
Fixes: 4868f6591c6f ("test/crypto: add cases for raw datapath API")
Signed-off-by: Rebecca Troy <rebecca.troy@intel.com>
Acked-by: Ciara Power <ciara.power@intel.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
---
app/test/test_cryptodev.c | 22 +++++++++++-----------
1 file changed, 11 insertions(+), 11 deletions(-)
diff --git a/app/test/test_cryptodev.c b/app/test/test_cryptodev.c
index 8c76cdb313..ea62e07daa 100644
--- a/app/test/test_cryptodev.c
+++ b/app/test/test_cryptodev.c
@@ -13787,7 +13787,7 @@ static struct unit_test_suite cryptodev_ccp_testsuite = {
};
static int
-test_cryptodev_qat(void /*argv __rte_unused, int argc __rte_unused*/)
+test_cryptodev_qat(void)
{
gbl_driver_id = rte_cryptodev_driver_id_get(
RTE_STR(CRYPTODEV_NAME_QAT_SYM_PMD));
@@ -13801,7 +13801,7 @@ test_cryptodev_qat(void /*argv __rte_unused, int argc __rte_unused*/)
}
static int
-test_cryptodev_virtio(void /*argv __rte_unused, int argc __rte_unused*/)
+test_cryptodev_virtio(void)
{
gbl_driver_id = rte_cryptodev_driver_id_get(
RTE_STR(CRYPTODEV_NAME_VIRTIO_PMD));
@@ -13815,7 +13815,7 @@ test_cryptodev_virtio(void /*argv __rte_unused, int argc __rte_unused*/)
}
static int
-test_cryptodev_aesni_mb(void /*argv __rte_unused, int argc __rte_unused*/)
+test_cryptodev_aesni_mb(void)
{
gbl_driver_id = rte_cryptodev_driver_id_get(
RTE_STR(CRYPTODEV_NAME_AESNI_MB_PMD));
@@ -13913,7 +13913,7 @@ test_cryptodev_null(void)
}
static int
-test_cryptodev_sw_snow3g(void /*argv __rte_unused, int argc __rte_unused*/)
+test_cryptodev_sw_snow3g(void)
{
gbl_driver_id = rte_cryptodev_driver_id_get(
RTE_STR(CRYPTODEV_NAME_SNOW3G_PMD));
@@ -13927,7 +13927,7 @@ test_cryptodev_sw_snow3g(void /*argv __rte_unused, int argc __rte_unused*/)
}
static int
-test_cryptodev_sw_kasumi(void /*argv __rte_unused, int argc __rte_unused*/)
+test_cryptodev_sw_kasumi(void)
{
gbl_driver_id = rte_cryptodev_driver_id_get(
RTE_STR(CRYPTODEV_NAME_KASUMI_PMD));
@@ -13941,7 +13941,7 @@ test_cryptodev_sw_kasumi(void /*argv __rte_unused, int argc __rte_unused*/)
}
static int
-test_cryptodev_sw_zuc(void /*argv __rte_unused, int argc __rte_unused*/)
+test_cryptodev_sw_zuc(void)
{
gbl_driver_id = rte_cryptodev_driver_id_get(
RTE_STR(CRYPTODEV_NAME_ZUC_PMD));
@@ -13985,7 +13985,7 @@ test_cryptodev_mrvl(void)
#ifdef RTE_CRYPTO_SCHEDULER
static int
-test_cryptodev_scheduler(void /*argv __rte_unused, int argc __rte_unused*/)
+test_cryptodev_scheduler(void)
{
gbl_driver_id = rte_cryptodev_driver_id_get(
RTE_STR(CRYPTODEV_NAME_SCHEDULER_PMD));
@@ -14008,7 +14008,7 @@ REGISTER_TEST_COMMAND(cryptodev_scheduler_autotest, test_cryptodev_scheduler);
#endif
static int
-test_cryptodev_dpaa2_sec(void /*argv __rte_unused, int argc __rte_unused*/)
+test_cryptodev_dpaa2_sec(void)
{
gbl_driver_id = rte_cryptodev_driver_id_get(
RTE_STR(CRYPTODEV_NAME_DPAA2_SEC_PMD));
@@ -14022,7 +14022,7 @@ test_cryptodev_dpaa2_sec(void /*argv __rte_unused, int argc __rte_unused*/)
}
static int
-test_cryptodev_dpaa_sec(void /*argv __rte_unused, int argc __rte_unused*/)
+test_cryptodev_dpaa_sec(void)
{
gbl_driver_id = rte_cryptodev_driver_id_get(
RTE_STR(CRYPTODEV_NAME_DPAA_SEC_PMD));
@@ -14074,7 +14074,7 @@ test_cryptodev_octeontx2(void)
}
static int
-test_cryptodev_caam_jr(void /*argv __rte_unused, int argc __rte_unused*/)
+test_cryptodev_caam_jr(void)
{
gbl_driver_id = rte_cryptodev_driver_id_get(
RTE_STR(CRYPTODEV_NAME_CAAM_JR_PMD));
@@ -14116,7 +14116,7 @@ test_cryptodev_bcmfs(void)
}
static int
-test_cryptodev_qat_raw_api(void /*argv __rte_unused, int argc __rte_unused*/)
+test_cryptodev_qat_raw_api(void)
{
int ret;
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-07-12 13:41:40.600632666 +0100
+++ 0076-test-crypto-fix-autotest-function-parameters.patch 2021-07-12 13:41:36.670126360 +0100
@@ -1 +1 @@
-From 4ea794318a523ef8365e2a765ba47171d223d4ee Mon Sep 17 00:00:00 2001
+From 7eaf51dbe70e676852cd4e36164c2b8060d14d19 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 4ea794318a523ef8365e2a765ba47171d223d4ee ]
+
@@ -18 +19,0 @@
-Cc: stable@dpdk.org
@@ -29 +30 @@
-index dd1669e007..538c7b503b 100644
+index 8c76cdb313..ea62e07daa 100644
@@ -32,2 +33,2 @@
-@@ -14522,19 +14522,19 @@ run_cryptodev_testsuite(const char *pmd_name)
- }
+@@ -13787,7 +13787,7 @@ static struct unit_test_suite cryptodev_ccp_testsuite = {
+ };
@@ -39 +40,3 @@
- return run_cryptodev_testsuite(RTE_STR(CRYPTODEV_NAME_QAT_SYM_PMD));
+ gbl_driver_id = rte_cryptodev_driver_id_get(
+ RTE_STR(CRYPTODEV_NAME_QAT_SYM_PMD));
+@@ -13801,7 +13801,7 @@ test_cryptodev_qat(void /*argv __rte_unused, int argc __rte_unused*/)
@@ -46 +49,3 @@
- return run_cryptodev_testsuite(RTE_STR(CRYPTODEV_NAME_VIRTIO_PMD));
+ gbl_driver_id = rte_cryptodev_driver_id_get(
+ RTE_STR(CRYPTODEV_NAME_VIRTIO_PMD));
+@@ -13815,7 +13815,7 @@ test_cryptodev_virtio(void /*argv __rte_unused, int argc __rte_unused*/)
@@ -53,3 +58,3 @@
- return run_cryptodev_testsuite(RTE_STR(CRYPTODEV_NAME_AESNI_MB_PMD));
- }
-@@ -14580,19 +14580,19 @@ test_cryptodev_null(void)
+ gbl_driver_id = rte_cryptodev_driver_id_get(
+ RTE_STR(CRYPTODEV_NAME_AESNI_MB_PMD));
+@@ -13913,7 +13913,7 @@ test_cryptodev_null(void)
@@ -62 +67,3 @@
- return run_cryptodev_testsuite(RTE_STR(CRYPTODEV_NAME_SNOW3G_PMD));
+ gbl_driver_id = rte_cryptodev_driver_id_get(
+ RTE_STR(CRYPTODEV_NAME_SNOW3G_PMD));
+@@ -13927,7 +13927,7 @@ test_cryptodev_sw_snow3g(void /*argv __rte_unused, int argc __rte_unused*/)
@@ -69 +76,3 @@
- return run_cryptodev_testsuite(RTE_STR(CRYPTODEV_NAME_KASUMI_PMD));
+ gbl_driver_id = rte_cryptodev_driver_id_get(
+ RTE_STR(CRYPTODEV_NAME_KASUMI_PMD));
+@@ -13941,7 +13941,7 @@ test_cryptodev_sw_kasumi(void /*argv __rte_unused, int argc __rte_unused*/)
@@ -76,3 +85,3 @@
- return run_cryptodev_testsuite(RTE_STR(CRYPTODEV_NAME_ZUC_PMD));
- }
-@@ -14612,7 +14612,7 @@ test_cryptodev_mrvl(void)
+ gbl_driver_id = rte_cryptodev_driver_id_get(
+ RTE_STR(CRYPTODEV_NAME_ZUC_PMD));
+@@ -13985,7 +13985,7 @@ test_cryptodev_mrvl(void)
@@ -85,3 +94,3 @@
- uint8_t ret, sched_i, j, i = 0, blk_start_idx = 0;
- const enum blockcipher_test_type blk_suites[] = {
-@@ -14720,13 +14720,13 @@ REGISTER_TEST_COMMAND(cryptodev_scheduler_autotest, test_cryptodev_scheduler);
+ gbl_driver_id = rte_cryptodev_driver_id_get(
+ RTE_STR(CRYPTODEV_NAME_SCHEDULER_PMD));
+@@ -14008,7 +14008,7 @@ REGISTER_TEST_COMMAND(cryptodev_scheduler_autotest, test_cryptodev_scheduler);
@@ -94 +103,3 @@
- return run_cryptodev_testsuite(RTE_STR(CRYPTODEV_NAME_DPAA2_SEC_PMD));
+ gbl_driver_id = rte_cryptodev_driver_id_get(
+ RTE_STR(CRYPTODEV_NAME_DPAA2_SEC_PMD));
+@@ -14022,7 +14022,7 @@ test_cryptodev_dpaa2_sec(void /*argv __rte_unused, int argc __rte_unused*/)
@@ -101,3 +112,3 @@
- return run_cryptodev_testsuite(RTE_STR(CRYPTODEV_NAME_DPAA_SEC_PMD));
- }
-@@ -14750,7 +14750,7 @@ test_cryptodev_octeontx2(void)
+ gbl_driver_id = rte_cryptodev_driver_id_get(
+ RTE_STR(CRYPTODEV_NAME_DPAA_SEC_PMD));
+@@ -14074,7 +14074,7 @@ test_cryptodev_octeontx2(void)
@@ -110,3 +121,3 @@
- return run_cryptodev_testsuite(RTE_STR(CRYPTODEV_NAME_CAAM_JR_PMD));
- }
-@@ -14768,7 +14768,7 @@ test_cryptodev_bcmfs(void)
+ gbl_driver_id = rte_cryptodev_driver_id_get(
+ RTE_STR(CRYPTODEV_NAME_CAAM_JR_PMD));
+@@ -14116,7 +14116,7 @@ test_cryptodev_bcmfs(void)
^ permalink raw reply [flat|nested] 208+ messages in thread
* [dpdk-stable] patch 'test/crypto: fix typo in AES case' has been queued to stable release 20.11.3
2021-07-12 13:03 [dpdk-stable] patch 'graph: fix memory leak in stats' has been queued to stable release 20.11.3 luca.boccassi
` (74 preceding siblings ...)
2021-07-12 13:05 ` [dpdk-stable] patch 'test/crypto: fix autotest function parameters' " luca.boccassi
@ 2021-07-12 13:05 ` luca.boccassi
2021-07-12 13:05 ` [dpdk-stable] patch 'test/crypto: fix typo in ESN " luca.boccassi
` (39 subsequent siblings)
115 siblings, 0 replies; 208+ messages in thread
From: luca.boccassi @ 2021-07-12 13:05 UTC (permalink / raw)
To: Rebecca Troy; +Cc: Ciara Power, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.3
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/14/21. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/2a84dc352a47e94578a0a820cb4112c92815a85f
Thanks.
Luca Boccassi
---
From 2a84dc352a47e94578a0a820cb4112c92815a85f Mon Sep 17 00:00:00 2001
From: Rebecca Troy <rebecca.troy@intel.com>
Date: Thu, 1 Jul 2021 09:22:38 +0000
Subject: [PATCH] test/crypto: fix typo in AES case
[ upstream commit 9d33cad1f6b34a21a17f5ed0a56a5fbc13429b81 ]
Fixed typo in the testcase description for AES in the crypto
unit test suite by changing the word 'Scater' to 'Scatter'.
Fixes: c9c9c4ed8746 ("app/test: check scatter-gather for crypto drivers")
Signed-off-by: Rebecca Troy <rebecca.troy@intel.com>
Acked-by: Ciara Power <ciara.power@intel.com>
---
app/test/test_cryptodev_aes_test_vectors.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/app/test/test_cryptodev_aes_test_vectors.h b/app/test/test_cryptodev_aes_test_vectors.h
index c192d75a7e..bb5f09fa81 100644
--- a/app/test/test_cryptodev_aes_test_vectors.h
+++ b/app/test/test_cryptodev_aes_test_vectors.h
@@ -2650,7 +2650,7 @@ static const struct blockcipher_test_case aes_cipheronly_test_cases[] = {
.op_mask = BLOCKCIPHER_TEST_OP_ENCRYPT,
},
{
- .test_descr = "AES-192-CBC Encryption Scater gather",
+ .test_descr = "AES-192-CBC Encryption Scatter gather",
.test_data = &aes_test_data_10,
.op_mask = BLOCKCIPHER_TEST_OP_ENCRYPT,
.feature_mask = BLOCKCIPHER_TEST_FEATURE_SG |
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-07-12 13:41:40.655034226 +0100
+++ 0077-test-crypto-fix-typo-in-AES-case.patch 2021-07-12 13:41:36.674126443 +0100
@@ -1 +1 @@
-From 9d33cad1f6b34a21a17f5ed0a56a5fbc13429b81 Mon Sep 17 00:00:00 2001
+From 2a84dc352a47e94578a0a820cb4112c92815a85f Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 9d33cad1f6b34a21a17f5ed0a56a5fbc13429b81 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -19 +20 @@
-index ec53874d9f..e404050701 100644
+index c192d75a7e..bb5f09fa81 100644
@@ -22 +23 @@
-@@ -3223,7 +3223,7 @@ static const struct blockcipher_test_case aes_cipheronly_test_cases[] = {
+@@ -2650,7 +2650,7 @@ static const struct blockcipher_test_case aes_cipheronly_test_cases[] = {
^ permalink raw reply [flat|nested] 208+ messages in thread
* [dpdk-stable] patch 'test/crypto: fix typo in ESN case' has been queued to stable release 20.11.3
2021-07-12 13:03 [dpdk-stable] patch 'graph: fix memory leak in stats' has been queued to stable release 20.11.3 luca.boccassi
` (75 preceding siblings ...)
2021-07-12 13:05 ` [dpdk-stable] patch 'test/crypto: fix typo in AES case' " luca.boccassi
@ 2021-07-12 13:05 ` luca.boccassi
2021-07-12 13:05 ` [dpdk-stable] patch 'crypto/mvsam: fix AES-GCM session parameters' " luca.boccassi
` (38 subsequent siblings)
115 siblings, 0 replies; 208+ messages in thread
From: luca.boccassi @ 2021-07-12 13:05 UTC (permalink / raw)
To: Rebecca Troy; +Cc: Hemant Agrawal, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.3
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/14/21. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/32d75cc7e680461e1e5e5c43b5a72e6480756f8c
Thanks.
Luca Boccassi
---
From 32d75cc7e680461e1e5e5c43b5a72e6480756f8c Mon Sep 17 00:00:00 2001
From: Rebecca Troy <rebecca.troy@intel.com>
Date: Thu, 1 Jul 2021 10:39:09 +0000
Subject: [PATCH] test/crypto: fix typo in ESN case
[ upstream commit 5da550e4408e03a7f06dfcfa9639ce969d141d73 ]
Fixed typo in the crypto unit test ESN function name by
replacing the word 'encryt' with the correct word 'encrypt'.
test_authenticated_encryt_with_esn is now called
test_authenticated_encrypt_with_esn.
Fixes: 699741912d71 ("test/crypto: add case for auth only trailer")
Signed-off-by: Rebecca Troy <rebecca.troy@intel.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
---
app/test/test_cryptodev.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/app/test/test_cryptodev.c b/app/test/test_cryptodev.c
index ea62e07daa..dd2b035b77 100644
--- a/app/test/test_cryptodev.c
+++ b/app/test/test_cryptodev.c
@@ -12025,7 +12025,7 @@ test_authenticated_decryption_fail_when_corruption(
}
static int
-test_authenticated_encryt_with_esn(
+test_authenticated_encrypt_with_esn(
struct crypto_testsuite_params *ts_params,
struct crypto_unittest_params *ut_params,
const struct test_crypto_vector *reference)
@@ -12812,7 +12812,7 @@ auth_decryption_AES128CBC_HMAC_SHA1_fail_tag_corrupt(void)
static int
auth_encrypt_AES128CBC_HMAC_SHA1_esn_check(void)
{
- return test_authenticated_encryt_with_esn(
+ return test_authenticated_encrypt_with_esn(
&testsuite_params,
&unittest_params,
&aes128cbc_hmac_sha1_aad_test_vector);
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-07-12 13:41:40.698781899 +0100
+++ 0078-test-crypto-fix-typo-in-ESN-case.patch 2021-07-12 13:41:36.690126777 +0100
@@ -1 +1 @@
-From 5da550e4408e03a7f06dfcfa9639ce969d141d73 Mon Sep 17 00:00:00 2001
+From 32d75cc7e680461e1e5e5c43b5a72e6480756f8c Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 5da550e4408e03a7f06dfcfa9639ce969d141d73 ]
+
@@ -13 +14,0 @@
-Cc: stable@dpdk.org
@@ -22 +23 @@
-index 2a55534dae..2fa720d7b2 100644
+index ea62e07daa..dd2b035b77 100644
@@ -25 +26 @@
-@@ -12602,7 +12602,7 @@ test_authenticated_decryption_fail_when_corruption(
+@@ -12025,7 +12025,7 @@ test_authenticated_decryption_fail_when_corruption(
@@ -34 +35 @@
-@@ -13389,7 +13389,7 @@ auth_decryption_AES128CBC_HMAC_SHA1_fail_tag_corrupt(void)
+@@ -12812,7 +12812,7 @@ auth_decryption_AES128CBC_HMAC_SHA1_fail_tag_corrupt(void)
^ permalink raw reply [flat|nested] 208+ messages in thread
* [dpdk-stable] patch 'crypto/mvsam: fix AES-GCM session parameters' has been queued to stable release 20.11.3
2021-07-12 13:03 [dpdk-stable] patch 'graph: fix memory leak in stats' has been queued to stable release 20.11.3 luca.boccassi
` (76 preceding siblings ...)
2021-07-12 13:05 ` [dpdk-stable] patch 'test/crypto: fix typo in ESN " luca.boccassi
@ 2021-07-12 13:05 ` luca.boccassi
2021-07-12 13:05 ` [dpdk-stable] patch 'crypto/mvsam: fix capabilities' " luca.boccassi
` (37 subsequent siblings)
115 siblings, 0 replies; 208+ messages in thread
From: luca.boccassi @ 2021-07-12 13:05 UTC (permalink / raw)
To: Dana Vardi; +Cc: Liron Himi, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.3
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/14/21. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/a544fc26a0d440835ef2e6ae6a8f428b68d4334e
Thanks.
Luca Boccassi
---
From a544fc26a0d440835ef2e6ae6a8f428b68d4334e Mon Sep 17 00:00:00 2001
From: Dana Vardi <danat@marvell.com>
Date: Thu, 1 Jul 2021 09:58:12 +0300
Subject: [PATCH] crypto/mvsam: fix AES-GCM session parameters
[ upstream commit 22918d8400dc9e69ce889aed03066c4547e3fae6 ]
For AEAD session and AES-GCM mode, IV offset will
set to include the Nonce.
In addition, the following operations order will define:
first encryption and then authentication.
Fixes: 8a61c83af2fa ("crypto/mrvl: add mrvl crypto driver")
Signed-off-by: Dana Vardi <danat@marvell.com>
Reviewed-by: Liron Himi <lironh@marvell.com>
Tested-by: Liron Himi <lironh@marvell.com>
---
drivers/crypto/mvsam/rte_mrvl_pmd.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/drivers/crypto/mvsam/rte_mrvl_pmd.c b/drivers/crypto/mvsam/rte_mrvl_pmd.c
index bec51c9ff6..5ac8ee2060 100644
--- a/drivers/crypto/mvsam/rte_mrvl_pmd.c
+++ b/drivers/crypto/mvsam/rte_mrvl_pmd.c
@@ -360,6 +360,14 @@ mrvl_crypto_set_aead_session_parameters(struct mrvl_crypto_session *sess,
sess->sam_sess_params.cipher_mode =
aead_map[aead_xform->aead.algo].cipher_mode;
+ if (sess->sam_sess_params.cipher_mode == SAM_CIPHER_GCM) {
+ /* IV must include nonce for all counter modes */
+ sess->cipher_iv_offset = aead_xform->cipher.iv.offset;
+
+ /* Set order of authentication then encryption to 0 in GCM */
+ sess->sam_sess_params.u.basic.auth_then_encrypt = 0;
+ }
+
/* Assume IV will be passed together with data. */
sess->sam_sess_params.cipher_iv = NULL;
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-07-12 13:41:40.752953194 +0100
+++ 0079-crypto-mvsam-fix-AES-GCM-session-parameters.patch 2021-07-12 13:41:36.694126860 +0100
@@ -1 +1 @@
-From 22918d8400dc9e69ce889aed03066c4547e3fae6 Mon Sep 17 00:00:00 2001
+From a544fc26a0d440835ef2e6ae6a8f428b68d4334e Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 22918d8400dc9e69ce889aed03066c4547e3fae6 ]
+
@@ -12 +13,0 @@
-Cc: stable@dpdk.org
@@ -22 +23 @@
-index b2cfa710f5..ba5cb28654 100644
+index bec51c9ff6..5ac8ee2060 100644
^ permalink raw reply [flat|nested] 208+ messages in thread
* [dpdk-stable] patch 'crypto/mvsam: fix capabilities' has been queued to stable release 20.11.3
2021-07-12 13:03 [dpdk-stable] patch 'graph: fix memory leak in stats' has been queued to stable release 20.11.3 luca.boccassi
` (77 preceding siblings ...)
2021-07-12 13:05 ` [dpdk-stable] patch 'crypto/mvsam: fix AES-GCM session parameters' " luca.boccassi
@ 2021-07-12 13:05 ` luca.boccassi
2021-07-12 13:05 ` [dpdk-stable] patch 'crypto/mvsam: fix session data reset' " luca.boccassi
` (36 subsequent siblings)
115 siblings, 0 replies; 208+ messages in thread
From: luca.boccassi @ 2021-07-12 13:05 UTC (permalink / raw)
To: Michael Shamis; +Cc: Liron Himi, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.3
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/14/21. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/79eb8ffc7d22e27cc181acb3b494b05179fc2005
Thanks.
Luca Boccassi
---
From 79eb8ffc7d22e27cc181acb3b494b05179fc2005 Mon Sep 17 00:00:00 2001
From: Michael Shamis <michaelsh@marvell.com>
Date: Thu, 1 Jul 2021 09:58:53 +0300
Subject: [PATCH] crypto/mvsam: fix capabilities
[ upstream commit 62f7513e2a2a7677b1f335e53c44316f171511e0 ]
Increased AAD max size up to 64B and allowed AAD increment step
1B according to EIP197 token HW limitation.
In addition, some capabilities were found incorrect due to
running FIPS tests. The patch fix the capabilities.
Fixes: 8a61c83af2f ("crypto/mrvl: add mrvl crypto driver")
Fixes: 2c22aa4f8f6 ("crypto/mvsam: update hash digest sizes")
Fixes: a84226fc055 ("crypto/mvsam: support HMAC SHA224")
Signed-off-by: Michael Shamis <michaelsh@marvell.com>
Reviewed-by: Liron Himi <lironh@marvell.com>
Tested-by: Liron Himi <lironh@marvell.com>
---
drivers/crypto/mvsam/rte_mrvl_pmd_ops.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/drivers/crypto/mvsam/rte_mrvl_pmd_ops.c b/drivers/crypto/mvsam/rte_mrvl_pmd_ops.c
index c61bdca369..527ddef0cf 100644
--- a/drivers/crypto/mvsam/rte_mrvl_pmd_ops.c
+++ b/drivers/crypto/mvsam/rte_mrvl_pmd_ops.c
@@ -111,7 +111,7 @@ static const struct rte_cryptodev_capabilities
.increment = 1
},
.digest_size = {
- .min = 28,
+ .min = 12,
.max = 28,
.increment = 0
},
@@ -232,7 +232,7 @@ static const struct rte_cryptodev_capabilities
},
.digest_size = {
.min = 12,
- .max = 48,
+ .max = 64,
.increment = 4
},
}, }
@@ -252,7 +252,7 @@ static const struct rte_cryptodev_capabilities
},
.digest_size = {
.min = 12,
- .max = 48,
+ .max = 64,
.increment = 0
},
}, }
@@ -336,9 +336,9 @@ static const struct rte_cryptodev_capabilities
.increment = 0
},
.aad_size = {
- .min = 8,
- .max = 12,
- .increment = 4
+ .min = 0,
+ .max = 64,
+ .increment = 1
},
.iv_size = {
.min = 12,
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-07-12 13:41:40.794609912 +0100
+++ 0080-crypto-mvsam-fix-capabilities.patch 2021-07-12 13:41:36.694126860 +0100
@@ -1 +1 @@
-From 62f7513e2a2a7677b1f335e53c44316f171511e0 Mon Sep 17 00:00:00 2001
+From 79eb8ffc7d22e27cc181acb3b494b05179fc2005 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 62f7513e2a2a7677b1f335e53c44316f171511e0 ]
+
@@ -14 +15,0 @@
-Cc: stable@dpdk.org
^ permalink raw reply [flat|nested] 208+ messages in thread
* [dpdk-stable] patch 'crypto/mvsam: fix session data reset' has been queued to stable release 20.11.3
2021-07-12 13:03 [dpdk-stable] patch 'graph: fix memory leak in stats' has been queued to stable release 20.11.3 luca.boccassi
` (78 preceding siblings ...)
2021-07-12 13:05 ` [dpdk-stable] patch 'crypto/mvsam: fix capabilities' " luca.boccassi
@ 2021-07-12 13:05 ` luca.boccassi
2021-07-12 13:05 ` [dpdk-stable] patch 'crypto/mvsam: fix options parsing' " luca.boccassi
` (35 subsequent siblings)
115 siblings, 0 replies; 208+ messages in thread
From: luca.boccassi @ 2021-07-12 13:05 UTC (permalink / raw)
To: Dana Vardi; +Cc: Michael Shamis, Liron Himi, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.3
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/14/21. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/9bf79cbfafc52bf852cd9110357c9a0cd1c75911
Thanks.
Luca Boccassi
---
From 9bf79cbfafc52bf852cd9110357c9a0cd1c75911 Mon Sep 17 00:00:00 2001
From: Dana Vardi <danat@marvell.com>
Date: Thu, 1 Jul 2021 09:59:20 +0300
Subject: [PATCH] crypto/mvsam: fix session data reset
[ upstream commit 03e73e8572f112bd3714cd90c491a6570330189c ]
This patch fix wrong clear memory session pointer.
When call mrvl_crypto_pmd_sym_session_clear function,
it might cause the following error:
CRYPTODEV: set_sym_session_private_data() line 497:
Set private data for driver 1 not allowed
This fix set zeroes to mrvl_crypto_session pointer instead to
rte_cryptodev_sym_session pointer, and will verify that
rte_cryptodev_sym_session pointer will not lose data such as
nb_drivers.
Bugzilla ID: 646
Fixes: 8a61c83af2fa ("crypto/mrvl: add mrvl crypto driver")
Signed-off-by: Dana Vardi <danat@marvell.com>
Reviewed-by: Michael Shamis <michaelsh@marvell.com>
Reviewed-by: Liron Himi <lironh@marvell.com>
---
drivers/crypto/mvsam/rte_mrvl_pmd_ops.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/crypto/mvsam/rte_mrvl_pmd_ops.c b/drivers/crypto/mvsam/rte_mrvl_pmd_ops.c
index 527ddef0cf..4eb7ec97d1 100644
--- a/drivers/crypto/mvsam/rte_mrvl_pmd_ops.c
+++ b/drivers/crypto/mvsam/rte_mrvl_pmd_ops.c
@@ -793,7 +793,7 @@ mrvl_crypto_pmd_sym_session_clear(struct rte_cryptodev *dev,
MRVL_LOG(ERR, "Error while destroying session!");
}
- memset(sess, 0, sizeof(struct mrvl_crypto_session));
+ memset(mrvl_sess, 0, sizeof(struct mrvl_crypto_session));
struct rte_mempool *sess_mp = rte_mempool_from_obj(sess_priv);
set_sym_session_private_data(sess, index, NULL);
rte_mempool_put(sess_mp, sess_priv);
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-07-12 13:41:40.835248061 +0100
+++ 0081-crypto-mvsam-fix-session-data-reset.patch 2021-07-12 13:41:36.698126943 +0100
@@ -1 +1 @@
-From 03e73e8572f112bd3714cd90c491a6570330189c Mon Sep 17 00:00:00 2001
+From 9bf79cbfafc52bf852cd9110357c9a0cd1c75911 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 03e73e8572f112bd3714cd90c491a6570330189c ]
+
@@ -20 +21,0 @@
-Cc: stable@dpdk.org
^ permalink raw reply [flat|nested] 208+ messages in thread
* [dpdk-stable] patch 'crypto/mvsam: fix options parsing' has been queued to stable release 20.11.3
2021-07-12 13:03 [dpdk-stable] patch 'graph: fix memory leak in stats' has been queued to stable release 20.11.3 luca.boccassi
` (79 preceding siblings ...)
2021-07-12 13:05 ` [dpdk-stable] patch 'crypto/mvsam: fix session data reset' " luca.boccassi
@ 2021-07-12 13:05 ` luca.boccassi
2021-07-12 13:05 ` [dpdk-stable] patch 'ipc: stop mp control thread on cleanup' " luca.boccassi
` (34 subsequent siblings)
115 siblings, 0 replies; 208+ messages in thread
From: luca.boccassi @ 2021-07-12 13:05 UTC (permalink / raw)
To: Dana Vardi; +Cc: Liron Himi, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.3
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/14/21. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/a7c25c68c6a6db9bb69aecbe1722e55c077e9eca
Thanks.
Luca Boccassi
---
From a7c25c68c6a6db9bb69aecbe1722e55c077e9eca Mon Sep 17 00:00:00 2001
From: Dana Vardi <danat@marvell.com>
Date: Thu, 1 Jul 2021 10:00:43 +0300
Subject: [PATCH] crypto/mvsam: fix options parsing
[ upstream commit 325ce224ffd16d67d5370c2f28a267aabd6690a9 ]
This patch fix the input arguments assignment to the correct
parameters in mrvl_pmd_init_params struct.
Fixes: 25b05a1c806 ("crypto/mvsam: parse max number of sessions")
Signed-off-by: Dana Vardi <danat@marvell.com>
Reviewed-by: Liron Himi <lironh@marvell.com>
---
drivers/crypto/mvsam/rte_mrvl_pmd.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/crypto/mvsam/rte_mrvl_pmd.c b/drivers/crypto/mvsam/rte_mrvl_pmd.c
index 5ac8ee2060..5712042b95 100644
--- a/drivers/crypto/mvsam/rte_mrvl_pmd.c
+++ b/drivers/crypto/mvsam/rte_mrvl_pmd.c
@@ -924,14 +924,14 @@ mrvl_pmd_parse_input_args(struct mrvl_pmd_init_params *params,
ret = rte_kvargs_process(kvlist,
RTE_CRYPTODEV_PMD_NAME_ARG,
&parse_name_arg,
- ¶ms->common);
+ ¶ms->common.name);
if (ret < 0)
goto free_kvlist;
ret = rte_kvargs_process(kvlist,
MRVL_PMD_MAX_NB_SESS_ARG,
&parse_integer_arg,
- params);
+ ¶ms->max_nb_sessions);
if (ret < 0)
goto free_kvlist;
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-07-12 13:41:40.876344767 +0100
+++ 0082-crypto-mvsam-fix-options-parsing.patch 2021-07-12 13:41:36.698126943 +0100
@@ -1 +1 @@
-From 325ce224ffd16d67d5370c2f28a267aabd6690a9 Mon Sep 17 00:00:00 2001
+From a7c25c68c6a6db9bb69aecbe1722e55c077e9eca Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 325ce224ffd16d67d5370c2f28a267aabd6690a9 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -19 +20 @@
-index ba5cb28654..b82533ef42 100644
+index 5ac8ee2060..5712042b95 100644
^ permalink raw reply [flat|nested] 208+ messages in thread
* [dpdk-stable] patch 'ipc: stop mp control thread on cleanup' has been queued to stable release 20.11.3
2021-07-12 13:03 [dpdk-stable] patch 'graph: fix memory leak in stats' has been queued to stable release 20.11.3 luca.boccassi
` (80 preceding siblings ...)
2021-07-12 13:05 ` [dpdk-stable] patch 'crypto/mvsam: fix options parsing' " luca.boccassi
@ 2021-07-12 13:05 ` luca.boccassi
2021-07-12 13:05 ` [dpdk-stable] patch 'net/bnxt: cleanup code' " luca.boccassi
` (33 subsequent siblings)
115 siblings, 0 replies; 208+ messages in thread
From: luca.boccassi @ 2021-07-12 13:05 UTC (permalink / raw)
To: David Marchand; +Cc: Owen Hilyard, Maxime Coquelin, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.3
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/14/21. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/c3881a8282a8a7683c0912f003b5da5df2323393
Thanks.
Luca Boccassi
---
From c3881a8282a8a7683c0912f003b5da5df2323393 Mon Sep 17 00:00:00 2001
From: David Marchand <david.marchand@redhat.com>
Date: Wed, 7 Jul 2021 13:02:29 +0200
Subject: [PATCH] ipc: stop mp control thread on cleanup
[ upstream commit e7885281ded1dbda63dcf3f6eb3640131113a6eb ]
When calling rte_eal_cleanup, the mp channel cleanup routine only sets
mp_fd to -1 leaving the rte_mp_handle control thread running.
This control thread can spew warnings on reading on an invalid fd.
This is especially noticed with ASAN enabled.
To handle this situation, set mp_fd to -1 to signal the control thread
it should exit, but since this thread might be sleeping on the socket,
cancel the thread too.
Fixes: 85d6815fa6d0 ("eal: close multi-process socket during cleanup")
Reported-by: Owen Hilyard <ohilyard@iol.unh.edu>
Signed-off-by: David Marchand <david.marchand@redhat.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
---
lib/librte_eal/common/eal_common_proc.c | 22 ++++++++++++++--------
1 file changed, 14 insertions(+), 8 deletions(-)
diff --git a/lib/librte_eal/common/eal_common_proc.c b/lib/librte_eal/common/eal_common_proc.c
index dc4a2efa82..ebd0f6673b 100644
--- a/lib/librte_eal/common/eal_common_proc.c
+++ b/lib/librte_eal/common/eal_common_proc.c
@@ -35,6 +35,7 @@
#include "eal_internal_cfg.h"
static int mp_fd = -1;
+static pthread_t mp_handle_tid;
static char mp_filter[PATH_MAX]; /* Filter for secondary process sockets */
static char mp_dir_path[PATH_MAX]; /* The directory path for all mp sockets */
static pthread_mutex_t mp_mutex_action = PTHREAD_MUTEX_INITIALIZER;
@@ -383,7 +384,7 @@ mp_handle(void *arg __rte_unused)
struct mp_msg_internal msg;
struct sockaddr_un sa;
- while (1) {
+ while (mp_fd >= 0) {
if (read_msg(&msg, &sa) == 0)
process_msg(&msg, &sa);
}
@@ -567,14 +568,11 @@ open_socket_fd(void)
}
static void
-close_socket_fd(void)
+close_socket_fd(int fd)
{
char path[PATH_MAX];
- if (mp_fd < 0)
- return;
-
- close(mp_fd);
+ close(fd);
create_socket_path(peer_name, path, sizeof(path));
unlink(path);
}
@@ -584,7 +582,6 @@ rte_mp_channel_init(void)
{
char path[PATH_MAX];
int dir_fd;
- pthread_t mp_handle_tid;
const struct internal_config *internal_conf =
eal_get_internal_configuration();
@@ -645,7 +642,16 @@ rte_mp_channel_init(void)
void
rte_mp_channel_cleanup(void)
{
- close_socket_fd();
+ int fd;
+
+ if (mp_fd < 0)
+ return;
+
+ fd = mp_fd;
+ mp_fd = -1;
+ pthread_cancel(mp_handle_tid);
+ pthread_join(mp_handle_tid, NULL);
+ close_socket_fd(fd);
}
/**
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-07-12 13:41:40.919562023 +0100
+++ 0083-ipc-stop-mp-control-thread-on-cleanup.patch 2021-07-12 13:41:36.702127027 +0100
@@ -1 +1 @@
-From e7885281ded1dbda63dcf3f6eb3640131113a6eb Mon Sep 17 00:00:00 2001
+From c3881a8282a8a7683c0912f003b5da5df2323393 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit e7885281ded1dbda63dcf3f6eb3640131113a6eb ]
+
@@ -16 +17,0 @@
-Cc: stable@dpdk.org
@@ -22 +23 @@
- lib/eal/common/eal_common_proc.c | 22 ++++++++++++++--------
+ lib/librte_eal/common/eal_common_proc.c | 22 ++++++++++++++--------
@@ -25 +26 @@
-diff --git a/lib/eal/common/eal_common_proc.c b/lib/eal/common/eal_common_proc.c
+diff --git a/lib/librte_eal/common/eal_common_proc.c b/lib/librte_eal/common/eal_common_proc.c
@@ -27,2 +28,2 @@
---- a/lib/eal/common/eal_common_proc.c
-+++ b/lib/eal/common/eal_common_proc.c
+--- a/lib/librte_eal/common/eal_common_proc.c
++++ b/lib/librte_eal/common/eal_common_proc.c
^ permalink raw reply [flat|nested] 208+ messages in thread
* [dpdk-stable] patch 'net/bnxt: cleanup code' has been queued to stable release 20.11.3
2021-07-12 13:03 [dpdk-stable] patch 'graph: fix memory leak in stats' has been queued to stable release 20.11.3 luca.boccassi
` (81 preceding siblings ...)
2021-07-12 13:05 ` [dpdk-stable] patch 'ipc: stop mp control thread on cleanup' " luca.boccassi
@ 2021-07-12 13:05 ` luca.boccassi
2021-07-12 13:05 ` [dpdk-stable] patch 'net/bnxt: fix typo in log message' " luca.boccassi
` (32 subsequent siblings)
115 siblings, 0 replies; 208+ messages in thread
From: luca.boccassi @ 2021-07-12 13:05 UTC (permalink / raw)
To: Kalesh AP; +Cc: Ajit Khaparde, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.3
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/14/21. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/a35ea38039fc72d9ff3ae3cb276e712358715d85
Thanks.
Luca Boccassi
---
From a35ea38039fc72d9ff3ae3cb276e712358715d85 Mon Sep 17 00:00:00 2001
From: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Date: Wed, 9 Jun 2021 08:43:29 +0530
Subject: [PATCH] net/bnxt: cleanup code
[ upstream commit 8879ece56832b7f2dd5e5ee10f36e848089f09df ]
This is a cleanup commit and no functional change.
1. use macros instead of hard coded values
2. remove unnecessary comments
Fixes: 5cd0e2889c43 ("net/bnxt: support NIC Partitioning")
Fixes: 2ba07b7dbd9d ("net/bnxt: set the hash key size")
Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
drivers/net/bnxt/bnxt_ethdev.c | 3 +--
drivers/net/bnxt/bnxt_hwrm.c | 4 +---
2 files changed, 2 insertions(+), 5 deletions(-)
diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
index 9ffd81e7f3..99194c9c44 100644
--- a/drivers/net/bnxt/bnxt_ethdev.c
+++ b/drivers/net/bnxt/bnxt_ethdev.c
@@ -965,7 +965,7 @@ static int bnxt_dev_info_get_op(struct rte_eth_dev *eth_dev,
dev_info->max_rx_queues = max_rx_rings;
dev_info->max_tx_queues = max_rx_rings;
dev_info->reta_size = bnxt_rss_hash_tbl_size(bp);
- dev_info->hash_key_size = 40;
+ dev_info->hash_key_size = HW_HASH_KEY_SIZE;
max_vnics = bp->max_vnics;
/* MTU specifics */
@@ -1996,7 +1996,6 @@ static int bnxt_reta_query_op(struct rte_eth_dev *eth_dev,
if (rc)
return rc;
- /* Retrieve from the default VNIC */
if (!vnic)
return -EINVAL;
if (!vnic->rss_table)
diff --git a/drivers/net/bnxt/bnxt_hwrm.c b/drivers/net/bnxt/bnxt_hwrm.c
index be9c7eb75e..6af7e62721 100644
--- a/drivers/net/bnxt/bnxt_hwrm.c
+++ b/drivers/net/bnxt/bnxt_hwrm.c
@@ -3149,7 +3149,6 @@ error:
return rc;
}
-/* JIRA 22088 */
int bnxt_hwrm_func_qcfg(struct bnxt *bp, uint16_t *mtu)
{
struct hwrm_func_qcfg_input req = {0};
@@ -3166,8 +3165,7 @@ int bnxt_hwrm_func_qcfg(struct bnxt *bp, uint16_t *mtu)
HWRM_CHECK_RESULT();
- /* Hard Coded.. 0xfff VLAN ID mask */
- bp->vlan = rte_le_to_cpu_16(resp->vlan) & 0xfff;
+ bp->vlan = rte_le_to_cpu_16(resp->vlan) & ETH_VLAN_ID_MAX;
svif_info = rte_le_to_cpu_16(resp->svif_info);
if (svif_info & HWRM_FUNC_QCFG_OUTPUT_SVIF_INFO_SVIF_VALID)
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-07-12 13:41:40.961878461 +0100
+++ 0084-net-bnxt-cleanup-code.patch 2021-07-12 13:41:36.718127360 +0100
@@ -1 +1 @@
-From 8879ece56832b7f2dd5e5ee10f36e848089f09df Mon Sep 17 00:00:00 2001
+From a35ea38039fc72d9ff3ae3cb276e712358715d85 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 8879ece56832b7f2dd5e5ee10f36e848089f09df ]
+
@@ -13 +14,0 @@
-Cc: stable@dpdk.org
@@ -23 +24 @@
-index 1579d797ce..e7fc254173 100644
+index 9ffd81e7f3..99194c9c44 100644
@@ -26 +27 @@
-@@ -966,7 +966,7 @@ static int bnxt_dev_info_get_op(struct rte_eth_dev *eth_dev,
+@@ -965,7 +965,7 @@ static int bnxt_dev_info_get_op(struct rte_eth_dev *eth_dev,
@@ -35 +36 @@
-@@ -2071,7 +2071,6 @@ static int bnxt_reta_query_op(struct rte_eth_dev *eth_dev,
+@@ -1996,7 +1996,6 @@ static int bnxt_reta_query_op(struct rte_eth_dev *eth_dev,
@@ -44 +45 @@
-index be595487e5..13c2b88104 100644
+index be9c7eb75e..6af7e62721 100644
@@ -47 +48 @@
-@@ -3313,7 +3313,6 @@ error:
+@@ -3149,7 +3149,6 @@ error:
@@ -55 +56 @@
-@@ -3330,8 +3329,7 @@ int bnxt_hwrm_func_qcfg(struct bnxt *bp, uint16_t *mtu)
+@@ -3166,8 +3165,7 @@ int bnxt_hwrm_func_qcfg(struct bnxt *bp, uint16_t *mtu)
^ permalink raw reply [flat|nested] 208+ messages in thread
* [dpdk-stable] patch 'net/bnxt: fix typo in log message' has been queued to stable release 20.11.3
2021-07-12 13:03 [dpdk-stable] patch 'graph: fix memory leak in stats' has been queued to stable release 20.11.3 luca.boccassi
` (82 preceding siblings ...)
2021-07-12 13:05 ` [dpdk-stable] patch 'net/bnxt: cleanup code' " luca.boccassi
@ 2021-07-12 13:05 ` luca.boccassi
2021-07-12 13:05 ` [dpdk-stable] patch 'net/bnxt: fix auto-negociation on Whitney+' " luca.boccassi
` (31 subsequent siblings)
115 siblings, 0 replies; 208+ messages in thread
From: luca.boccassi @ 2021-07-12 13:05 UTC (permalink / raw)
To: Kalesh AP; +Cc: Somnath Kotur, Ajit Khaparde, Venkat Duvvuru, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.3
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/14/21. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/5ea707d9e4ae9cc7f3e83db21eb99a35774d73c9
Thanks.
Luca Boccassi
---
From 5ea707d9e4ae9cc7f3e83db21eb99a35774d73c9 Mon Sep 17 00:00:00 2001
From: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Date: Wed, 9 Jun 2021 08:43:30 +0530
Subject: [PATCH] net/bnxt: fix typo in log message
[ upstream commit a3a1db0abf9bedf65c716802db458ded03c800b1 ]
In bnxt_rss_hash_update_op, check for valid RSS hashkey length is
made against size HW_HASH_KEY_SIZE(40). But the failure log says
"Invalid hashkey length, should be 16 bytes".
Fixes: 91aee9711ee3 ("net/bnxt: validate RSS hash key length")
Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Reviewed-by: Venkat Duvvuru <venkatkumar.duvvuru@broadcom.com>
---
drivers/net/bnxt/bnxt_ethdev.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
index 99194c9c44..934bcb0ec4 100644
--- a/drivers/net/bnxt/bnxt_ethdev.c
+++ b/drivers/net/bnxt/bnxt_ethdev.c
@@ -2077,7 +2077,8 @@ static int bnxt_rss_hash_update_op(struct rte_eth_dev *eth_dev,
if (rss_conf->rss_key_len != HW_HASH_KEY_SIZE) {
PMD_DRV_LOG(ERR,
- "Invalid hashkey length, should be 16 bytes\n");
+ "Invalid hashkey length, should be %d bytes\n",
+ HW_HASH_KEY_SIZE);
return -EINVAL;
}
memcpy(vnic->rss_hash_key, rss_conf->rss_key, rss_conf->rss_key_len);
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-07-12 13:41:41.013621224 +0100
+++ 0085-net-bnxt-fix-typo-in-log-message.patch 2021-07-12 13:41:36.726127527 +0100
@@ -1 +1 @@
-From a3a1db0abf9bedf65c716802db458ded03c800b1 Mon Sep 17 00:00:00 2001
+From 5ea707d9e4ae9cc7f3e83db21eb99a35774d73c9 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit a3a1db0abf9bedf65c716802db458ded03c800b1 ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -22 +23 @@
-index e7fc254173..70d10b9341 100644
+index 99194c9c44..934bcb0ec4 100644
@@ -25 +26 @@
-@@ -2152,7 +2152,8 @@ static int bnxt_rss_hash_update_op(struct rte_eth_dev *eth_dev,
+@@ -2077,7 +2077,8 @@ static int bnxt_rss_hash_update_op(struct rte_eth_dev *eth_dev,
^ permalink raw reply [flat|nested] 208+ messages in thread
* [dpdk-stable] patch 'net/bnxt: fix auto-negociation on Whitney+' has been queued to stable release 20.11.3
2021-07-12 13:03 [dpdk-stable] patch 'graph: fix memory leak in stats' has been queued to stable release 20.11.3 luca.boccassi
` (83 preceding siblings ...)
2021-07-12 13:05 ` [dpdk-stable] patch 'net/bnxt: fix typo in log message' " luca.boccassi
@ 2021-07-12 13:05 ` luca.boccassi
2021-07-12 13:05 ` [dpdk-stable] patch 'net/bnxt: invoke device removal event on recovery failure' " luca.boccassi
` (30 subsequent siblings)
115 siblings, 0 replies; 208+ messages in thread
From: luca.boccassi @ 2021-07-12 13:05 UTC (permalink / raw)
To: Kalesh AP; +Cc: Somnath Kotur, Ajit Khaparde, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.3
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/14/21. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/271e43d4e14c9c33a9ff4f7cd90768528f0146d8
Thanks.
Luca Boccassi
---
From 271e43d4e14c9c33a9ff4f7cd90768528f0146d8 Mon Sep 17 00:00:00 2001
From: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Date: Wed, 9 Jun 2021 08:43:31 +0530
Subject: [PATCH] net/bnxt: fix auto-negociation on Whitney+
[ upstream commit 70c7d4184cb9a32ab6c65ce67ce5fbe3a5be5294 ]
Driver should enable autoneg on a port if FW supports it.
Because of a wrong check, driver is not enabling autoneg
on a port after setting forced speed on Whitney+.
Fixes: 7bc8e9a227cc ("net/bnxt: support async link notification")
Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
drivers/net/bnxt/bnxt_hwrm.c | 18 +++++++++---------
1 file changed, 9 insertions(+), 9 deletions(-)
diff --git a/drivers/net/bnxt/bnxt_hwrm.c b/drivers/net/bnxt/bnxt_hwrm.c
index 6af7e62721..ea61fcf74b 100644
--- a/drivers/net/bnxt/bnxt_hwrm.c
+++ b/drivers/net/bnxt/bnxt_hwrm.c
@@ -1363,6 +1363,7 @@ static int bnxt_hwrm_port_phy_qcfg(struct bnxt *bp,
link_info->support_speeds = rte_le_to_cpu_16(resp->support_speeds);
link_info->auto_link_speed = rte_le_to_cpu_16(resp->auto_link_speed);
+ link_info->auto_link_speed_mask = rte_le_to_cpu_16(resp->auto_link_speed_mask);
link_info->preemphasis = rte_le_to_cpu_32(resp->preemphasis);
link_info->force_link_speed = rte_le_to_cpu_16(resp->force_link_speed);
link_info->phy_ver[0] = resp->phy_maj;
@@ -1416,6 +1417,12 @@ int bnxt_hwrm_port_phy_qcaps(struct bnxt *bp)
HWRM_UNLOCK();
+ /* Older firmware does not have supported_auto_speeds, so assume
+ * that all supported speeds can be autonegotiated.
+ */
+ if (link_info->auto_link_speed_mask && !link_info->support_auto_speeds)
+ link_info->support_auto_speeds = link_info->support_speeds;
+
return 0;
}
@@ -3085,15 +3092,8 @@ int bnxt_set_hwrm_link_config(struct bnxt *bp, bool link_up)
speed = bnxt_parse_eth_link_speed(dev_conf->link_speeds,
bp->link_info->link_signal_mode);
link_req.phy_flags = HWRM_PORT_PHY_CFG_INPUT_FLAGS_RESET_PHY;
- /* Autoneg can be done only when the FW allows.
- * When user configures fixed speed of 40G and later changes to
- * any other speed, auto_link_speed/force_link_speed is still set
- * to 40G until link comes up at new speed.
- */
- if (autoneg == 1 &&
- !(!BNXT_CHIP_THOR(bp) &&
- (bp->link_info->auto_link_speed ||
- bp->link_info->force_link_speed))) {
+ /* Autoneg can be done only when the FW allows. */
+ if (autoneg == 1 && bp->link_info->support_auto_speeds) {
link_req.phy_flags |=
HWRM_PORT_PHY_CFG_INPUT_FLAGS_RESTART_AUTONEG;
link_req.auto_link_speed_mask =
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-07-12 13:41:41.061543281 +0100
+++ 0086-net-bnxt-fix-auto-negociation-on-Whitney.patch 2021-07-12 13:41:36.730127610 +0100
@@ -1 +1 @@
-From 70c7d4184cb9a32ab6c65ce67ce5fbe3a5be5294 Mon Sep 17 00:00:00 2001
+From 271e43d4e14c9c33a9ff4f7cd90768528f0146d8 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 70c7d4184cb9a32ab6c65ce67ce5fbe3a5be5294 ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -21 +22 @@
-index 13c2b88104..a251d39fa1 100644
+index 6af7e62721..ea61fcf74b 100644
@@ -24 +25 @@
-@@ -1495,6 +1495,7 @@ static int bnxt_hwrm_port_phy_qcfg(struct bnxt *bp,
+@@ -1363,6 +1363,7 @@ static int bnxt_hwrm_port_phy_qcfg(struct bnxt *bp,
@@ -32 +33 @@
-@@ -1549,6 +1550,12 @@ int bnxt_hwrm_port_phy_qcaps(struct bnxt *bp)
+@@ -1416,6 +1417,12 @@ int bnxt_hwrm_port_phy_qcaps(struct bnxt *bp)
@@ -45 +46 @@
-@@ -3249,15 +3256,8 @@ int bnxt_set_hwrm_link_config(struct bnxt *bp, bool link_up)
+@@ -3085,15 +3092,8 @@ int bnxt_set_hwrm_link_config(struct bnxt *bp, bool link_up)
@@ -55 +56 @@
-- !(!BNXT_CHIP_P5(bp) &&
+- !(!BNXT_CHIP_THOR(bp) &&
^ permalink raw reply [flat|nested] 208+ messages in thread
* [dpdk-stable] patch 'net/bnxt: invoke device removal event on recovery failure' has been queued to stable release 20.11.3
2021-07-12 13:03 [dpdk-stable] patch 'graph: fix memory leak in stats' has been queued to stable release 20.11.3 luca.boccassi
` (84 preceding siblings ...)
2021-07-12 13:05 ` [dpdk-stable] patch 'net/bnxt: fix auto-negociation on Whitney+' " luca.boccassi
@ 2021-07-12 13:05 ` luca.boccassi
2021-07-12 13:05 ` [dpdk-stable] patch 'net/bnxt: fix ring and context memory allocation' " luca.boccassi
` (29 subsequent siblings)
115 siblings, 0 replies; 208+ messages in thread
From: luca.boccassi @ 2021-07-12 13:05 UTC (permalink / raw)
To: Kalesh AP; +Cc: Somnath Kotur, Ajit Khaparde, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.3
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/14/21. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/42382a70ec904026f9a36f1dea43c94459af01b4
Thanks.
Luca Boccassi
---
From 42382a70ec904026f9a36f1dea43c94459af01b4 Mon Sep 17 00:00:00 2001
From: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Date: Wed, 9 Jun 2021 08:43:32 +0530
Subject: [PATCH] net/bnxt: invoke device removal event on recovery failure
[ upstream commit 8ac3cbba621ad1887b069b271115faf76bf04b75 ]
When the driver receives RESET_NOTIFY async event from FW or detects
a FW fatal error condition, it tries to recover from the error.
When the driver fails to recover from the error condition, fixed to
send device removal event to the application.
Fixes: df6cd7c1f73a ("net/bnxt: handle reset notify async event from FW")
Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
drivers/net/bnxt/bnxt_ethdev.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
index 934bcb0ec4..466b39d2a8 100644
--- a/drivers/net/bnxt/bnxt_ethdev.c
+++ b/drivers/net/bnxt/bnxt_ethdev.c
@@ -4130,6 +4130,10 @@ err_start:
err:
bp->flags |= BNXT_FLAG_FATAL_ERROR;
bnxt_uninit_resources(bp, false);
+ if (bp->eth_dev->data->dev_conf.intr_conf.rmv)
+ rte_eth_dev_callback_process(bp->eth_dev,
+ RTE_ETH_EVENT_INTR_RMV,
+ NULL);
PMD_DRV_LOG(ERR, "Failed to recover from FW reset\n");
}
@@ -6141,6 +6145,7 @@ static int bnxt_pci_remove(struct rte_pci_device *pci_dev)
static struct rte_pci_driver bnxt_rte_pmd = {
.id_table = bnxt_pci_id_map,
.drv_flags = RTE_PCI_DRV_NEED_MAPPING | RTE_PCI_DRV_INTR_LSC |
+ RTE_PCI_DRV_INTR_RMV |
RTE_PCI_DRV_PROBE_AGAIN, /* Needed in case of VF-REPs
* and OVS-DPDK
*/
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-07-12 13:41:41.108519346 +0100
+++ 0087-net-bnxt-invoke-device-removal-event-on-recovery-fai.patch 2021-07-12 13:41:36.738127776 +0100
@@ -1 +1 @@
-From 8ac3cbba621ad1887b069b271115faf76bf04b75 Mon Sep 17 00:00:00 2001
+From 42382a70ec904026f9a36f1dea43c94459af01b4 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 8ac3cbba621ad1887b069b271115faf76bf04b75 ]
+
@@ -12 +13,0 @@
-Cc: stable@dpdk.org
@@ -22 +23 @@
-index 70d10b9341..ba3d0e7f31 100644
+index 934bcb0ec4..466b39d2a8 100644
@@ -25 +26 @@
-@@ -4347,6 +4347,10 @@ err_start:
+@@ -4130,6 +4130,10 @@ err_start:
@@ -33 +33,0 @@
- pthread_mutex_unlock(&bp->err_recovery_lock);
@@ -36 +36,2 @@
-@@ -6501,6 +6505,7 @@ static int bnxt_pci_remove(struct rte_pci_device *pci_dev)
+
+@@ -6141,6 +6145,7 @@ static int bnxt_pci_remove(struct rte_pci_device *pci_dev)
^ permalink raw reply [flat|nested] 208+ messages in thread
* [dpdk-stable] patch 'net/bnxt: fix ring and context memory allocation' has been queued to stable release 20.11.3
2021-07-12 13:03 [dpdk-stable] patch 'graph: fix memory leak in stats' has been queued to stable release 20.11.3 luca.boccassi
` (85 preceding siblings ...)
2021-07-12 13:05 ` [dpdk-stable] patch 'net/bnxt: invoke device removal event on recovery failure' " luca.boccassi
@ 2021-07-12 13:05 ` luca.boccassi
2021-07-12 13:05 ` [dpdk-stable] patch 'net/bnxt: fix Tx descriptor status implementation' " luca.boccassi
` (28 subsequent siblings)
115 siblings, 0 replies; 208+ messages in thread
From: luca.boccassi @ 2021-07-12 13:05 UTC (permalink / raw)
To: Lance Richardson; +Cc: Somnath Kotur, Ajit Khaparde, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.3
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/14/21. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/233e6138a9136a1cdfd59e5bc796c1f62e697ebb
Thanks.
Luca Boccassi
---
From 233e6138a9136a1cdfd59e5bc796c1f62e697ebb Mon Sep 17 00:00:00 2001
From: Lance Richardson <lance.richardson@broadcom.com>
Date: Wed, 16 Jun 2021 13:55:20 -0400
Subject: [PATCH] net/bnxt: fix ring and context memory allocation
[ upstream commit c6c90a33de906eb40a8eb01e16736cbaa2845b97 ]
Use requested socket ID when allocating memory for transmit rings,
receive rings, and completion queues. Use device NUMA ID when
allocating context memory, notification queue rings, async
completion queue rings, and VNIC attributes.
Fixes: 6eb3cc2294fd ("net/bnxt: add initial Tx code")
Fixes: 9738793f28ec ("net/bnxt: add VNIC functions and structs")
Fixes: f8168ca0e690 ("net/bnxt: support thor controller")
Fixes: bd0a14c99f65 ("net/bnxt: use dedicated CPR for async events")
Fixes: 683e5cf79249 ("net/bnxt: use common NQ ring")
Signed-off-by: Lance Richardson <lance.richardson@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
drivers/net/bnxt/bnxt_ethdev.c | 17 +++++++++--------
drivers/net/bnxt/bnxt_ring.c | 30 ++++++++++++++----------------
drivers/net/bnxt/bnxt_ring.h | 2 +-
drivers/net/bnxt/bnxt_rxq.c | 4 ++--
drivers/net/bnxt/bnxt_txq.c | 4 ++--
drivers/net/bnxt/bnxt_vnic.c | 3 ++-
6 files changed, 30 insertions(+), 30 deletions(-)
diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
index 466b39d2a8..f34e90e8df 100644
--- a/drivers/net/bnxt/bnxt_ethdev.c
+++ b/drivers/net/bnxt/bnxt_ethdev.c
@@ -583,13 +583,14 @@ static int bnxt_register_fc_ctx_mem(struct bnxt *bp)
return rc;
}
-static int bnxt_alloc_ctx_mem_buf(char *type, size_t size,
+static int bnxt_alloc_ctx_mem_buf(struct bnxt *bp, char *type, size_t size,
struct bnxt_ctx_mem_buf_info *ctx)
{
if (!ctx)
return -EINVAL;
- ctx->va = rte_zmalloc(type, size, 0);
+ ctx->va = rte_zmalloc_socket(type, size, 0,
+ bp->eth_dev->device->numa_node);
if (ctx->va == NULL)
return -ENOMEM;
rte_mem_lock_page(ctx->va);
@@ -613,7 +614,7 @@ static int bnxt_init_fc_ctx_mem(struct bnxt *bp)
sprintf(type, "bnxt_rx_fc_in_" PCI_PRI_FMT, pdev->addr.domain,
pdev->addr.bus, pdev->addr.devid, pdev->addr.function);
/* 4 bytes for each counter-id */
- rc = bnxt_alloc_ctx_mem_buf(type,
+ rc = bnxt_alloc_ctx_mem_buf(bp, type,
max_fc * 4,
&bp->flow_stat->rx_fc_in_tbl);
if (rc)
@@ -622,7 +623,7 @@ static int bnxt_init_fc_ctx_mem(struct bnxt *bp)
sprintf(type, "bnxt_rx_fc_out_" PCI_PRI_FMT, pdev->addr.domain,
pdev->addr.bus, pdev->addr.devid, pdev->addr.function);
/* 16 bytes for each counter - 8 bytes pkt_count, 8 bytes byte_count */
- rc = bnxt_alloc_ctx_mem_buf(type,
+ rc = bnxt_alloc_ctx_mem_buf(bp, type,
max_fc * 16,
&bp->flow_stat->rx_fc_out_tbl);
if (rc)
@@ -631,7 +632,7 @@ static int bnxt_init_fc_ctx_mem(struct bnxt *bp)
sprintf(type, "bnxt_tx_fc_in_" PCI_PRI_FMT, pdev->addr.domain,
pdev->addr.bus, pdev->addr.devid, pdev->addr.function);
/* 4 bytes for each counter-id */
- rc = bnxt_alloc_ctx_mem_buf(type,
+ rc = bnxt_alloc_ctx_mem_buf(bp, type,
max_fc * 4,
&bp->flow_stat->tx_fc_in_tbl);
if (rc)
@@ -640,7 +641,7 @@ static int bnxt_init_fc_ctx_mem(struct bnxt *bp)
sprintf(type, "bnxt_tx_fc_out_" PCI_PRI_FMT, pdev->addr.domain,
pdev->addr.bus, pdev->addr.devid, pdev->addr.function);
/* 16 bytes for each counter - 8 bytes pkt_count, 8 bytes byte_count */
- rc = bnxt_alloc_ctx_mem_buf(type,
+ rc = bnxt_alloc_ctx_mem_buf(bp, type,
max_fc * 16,
&bp->flow_stat->tx_fc_out_tbl);
if (rc)
@@ -4443,7 +4444,7 @@ static int bnxt_alloc_ctx_mem_blk(struct bnxt *bp,
if (!mz) {
mz = rte_memzone_reserve_aligned(mz_name,
rmem->nr_pages * 8,
- SOCKET_ID_ANY,
+ bp->eth_dev->device->numa_node,
RTE_MEMZONE_2MB |
RTE_MEMZONE_SIZE_HINT_ONLY |
RTE_MEMZONE_IOVA_CONTIG,
@@ -4466,7 +4467,7 @@ static int bnxt_alloc_ctx_mem_blk(struct bnxt *bp,
if (!mz) {
mz = rte_memzone_reserve_aligned(mz_name,
mem_size,
- SOCKET_ID_ANY,
+ bp->eth_dev->device->numa_node,
RTE_MEMZONE_1GB |
RTE_MEMZONE_SIZE_HINT_ONLY |
RTE_MEMZONE_IOVA_CONTIG,
diff --git a/drivers/net/bnxt/bnxt_ring.c b/drivers/net/bnxt/bnxt_ring.c
index 94cf7d3de2..6834244e4c 100644
--- a/drivers/net/bnxt/bnxt_ring.c
+++ b/drivers/net/bnxt/bnxt_ring.c
@@ -94,7 +94,7 @@ int bnxt_alloc_ring_grps(struct bnxt *bp)
* tx bd ring - Only non-zero length if tx_ring_info is not NULL
* rx bd ring - Only non-zero length if rx_ring_info is not NULL
*/
-int bnxt_alloc_rings(struct bnxt *bp, uint16_t qidx,
+int bnxt_alloc_rings(struct bnxt *bp, unsigned int socket_id, uint16_t qidx,
struct bnxt_tx_queue *txq,
struct bnxt_rx_queue *rxq,
struct bnxt_cp_ring_info *cp_ring_info,
@@ -203,7 +203,7 @@ int bnxt_alloc_rings(struct bnxt *bp, uint16_t qidx,
mz = rte_memzone_lookup(mz_name);
if (!mz) {
mz = rte_memzone_reserve_aligned(mz_name, total_alloc_len,
- SOCKET_ID_ANY,
+ socket_id,
RTE_MEMZONE_2MB |
RTE_MEMZONE_SIZE_HINT_ONLY |
RTE_MEMZONE_IOVA_CONTIG,
@@ -422,24 +422,23 @@ int bnxt_alloc_rxtx_nq_ring(struct bnxt *bp)
struct bnxt_cp_ring_info *nqr;
struct bnxt_ring *ring;
int ring_index = BNXT_NUM_ASYNC_CPR(bp);
- unsigned int socket_id;
uint8_t ring_type;
int rc = 0;
if (!BNXT_HAS_NQ(bp) || bp->rxtx_nq_ring)
return 0;
- socket_id = rte_lcore_to_socket_id(rte_get_main_lcore());
-
nqr = rte_zmalloc_socket("nqr",
sizeof(struct bnxt_cp_ring_info),
- RTE_CACHE_LINE_SIZE, socket_id);
+ RTE_CACHE_LINE_SIZE,
+ bp->eth_dev->device->numa_node);
if (nqr == NULL)
return -ENOMEM;
ring = rte_zmalloc_socket("bnxt_cp_ring_struct",
sizeof(struct bnxt_ring),
- RTE_CACHE_LINE_SIZE, socket_id);
+ RTE_CACHE_LINE_SIZE,
+ bp->eth_dev->device->numa_node);
if (ring == NULL) {
rte_free(nqr);
return -ENOMEM;
@@ -454,7 +453,8 @@ int bnxt_alloc_rxtx_nq_ring(struct bnxt *bp)
ring->fw_ring_id = INVALID_HW_RING_ID;
nqr->cp_ring_struct = ring;
- rc = bnxt_alloc_rings(bp, 0, NULL, NULL, nqr, NULL, "l2_nqr");
+ rc = bnxt_alloc_rings(bp, bp->eth_dev->device->numa_node, 0, NULL,
+ NULL, nqr, NULL, "l2_nqr");
if (rc) {
rte_free(ring);
rte_free(nqr);
@@ -837,22 +837,21 @@ int bnxt_alloc_async_ring_struct(struct bnxt *bp)
{
struct bnxt_cp_ring_info *cpr = NULL;
struct bnxt_ring *ring = NULL;
- unsigned int socket_id;
if (BNXT_NUM_ASYNC_CPR(bp) == 0)
return 0;
- socket_id = rte_lcore_to_socket_id(rte_get_main_lcore());
-
cpr = rte_zmalloc_socket("cpr",
sizeof(struct bnxt_cp_ring_info),
- RTE_CACHE_LINE_SIZE, socket_id);
+ RTE_CACHE_LINE_SIZE,
+ bp->eth_dev->device->numa_node);
if (cpr == NULL)
return -ENOMEM;
ring = rte_zmalloc_socket("bnxt_cp_ring_struct",
sizeof(struct bnxt_ring),
- RTE_CACHE_LINE_SIZE, socket_id);
+ RTE_CACHE_LINE_SIZE,
+ bp->eth_dev->device->numa_node);
if (ring == NULL) {
rte_free(cpr);
return -ENOMEM;
@@ -868,7 +867,6 @@ int bnxt_alloc_async_ring_struct(struct bnxt *bp)
bp->async_cp_ring = cpr;
cpr->cp_ring_struct = ring;
- return bnxt_alloc_rings(bp, 0, NULL, NULL,
- bp->async_cp_ring, NULL,
- "def_cp");
+ return bnxt_alloc_rings(bp, bp->eth_dev->device->numa_node, 0, NULL,
+ NULL, bp->async_cp_ring, NULL, "def_cp");
}
diff --git a/drivers/net/bnxt/bnxt_ring.h b/drivers/net/bnxt/bnxt_ring.h
index 0a4685d167..201b3919ed 100644
--- a/drivers/net/bnxt/bnxt_ring.h
+++ b/drivers/net/bnxt/bnxt_ring.h
@@ -66,7 +66,7 @@ struct bnxt_rx_ring_info;
struct bnxt_cp_ring_info;
void bnxt_free_ring(struct bnxt_ring *ring);
int bnxt_alloc_ring_grps(struct bnxt *bp);
-int bnxt_alloc_rings(struct bnxt *bp, uint16_t qidx,
+int bnxt_alloc_rings(struct bnxt *bp, unsigned int socket_id, uint16_t qidx,
struct bnxt_tx_queue *txq,
struct bnxt_rx_queue *rxq,
struct bnxt_cp_ring_info *cp_ring_info,
diff --git a/drivers/net/bnxt/bnxt_rxq.c b/drivers/net/bnxt/bnxt_rxq.c
index ffb7193cfc..a2feb525c4 100644
--- a/drivers/net/bnxt/bnxt_rxq.c
+++ b/drivers/net/bnxt/bnxt_rxq.c
@@ -335,8 +335,8 @@ int bnxt_rx_queue_setup_op(struct rte_eth_dev *eth_dev,
eth_dev->data->rx_queues[queue_idx] = rxq;
/* Allocate RX ring hardware descriptors */
- rc = bnxt_alloc_rings(bp, queue_idx, NULL, rxq, rxq->cp_ring, NULL,
- "rxr");
+ rc = bnxt_alloc_rings(bp, socket_id, queue_idx, NULL, rxq, rxq->cp_ring,
+ NULL, "rxr");
if (rc) {
PMD_DRV_LOG(ERR,
"ring_dma_zone_reserve for rx_ring failed!\n");
diff --git a/drivers/net/bnxt/bnxt_txq.c b/drivers/net/bnxt/bnxt_txq.c
index 99a31cef28..795056e457 100644
--- a/drivers/net/bnxt/bnxt_txq.c
+++ b/drivers/net/bnxt/bnxt_txq.c
@@ -149,8 +149,8 @@ int bnxt_tx_queue_setup_op(struct rte_eth_dev *eth_dev,
txq->port_id = eth_dev->data->port_id;
/* Allocate TX ring hardware descriptors */
- if (bnxt_alloc_rings(bp, queue_idx, txq, NULL, txq->cp_ring, NULL,
- "txr")) {
+ if (bnxt_alloc_rings(bp, socket_id, queue_idx, txq, NULL, txq->cp_ring,
+ NULL, "txr")) {
PMD_DRV_LOG(ERR, "ring_dma_zone_reserve for tx_ring failed!");
rc = -ENOMEM;
goto err;
diff --git a/drivers/net/bnxt/bnxt_vnic.c b/drivers/net/bnxt/bnxt_vnic.c
index 007f7e93c9..40cad0fd67 100644
--- a/drivers/net/bnxt/bnxt_vnic.c
+++ b/drivers/net/bnxt/bnxt_vnic.c
@@ -145,7 +145,8 @@ int bnxt_alloc_vnic_attributes(struct bnxt *bp)
mz = rte_memzone_lookup(mz_name);
if (!mz) {
mz = rte_memzone_reserve(mz_name,
- entry_length * max_vnics, SOCKET_ID_ANY,
+ entry_length * max_vnics,
+ bp->eth_dev->device->numa_node,
RTE_MEMZONE_2MB |
RTE_MEMZONE_SIZE_HINT_ONLY |
RTE_MEMZONE_IOVA_CONTIG);
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-07-12 13:41:41.154842488 +0100
+++ 0088-net-bnxt-fix-ring-and-context-memory-allocation.patch 2021-07-12 13:41:36.750128027 +0100
@@ -1 +1 @@
-From c6c90a33de906eb40a8eb01e16736cbaa2845b97 Mon Sep 17 00:00:00 2001
+From 233e6138a9136a1cdfd59e5bc796c1f62e697ebb Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit c6c90a33de906eb40a8eb01e16736cbaa2845b97 ]
+
@@ -16 +17,0 @@
-Cc: stable@dpdk.org
@@ -31 +32 @@
-index ba3d0e7f31..74ade93b71 100644
+index 466b39d2a8..f34e90e8df 100644
@@ -34 +35 @@
-@@ -580,13 +580,14 @@ static int bnxt_register_fc_ctx_mem(struct bnxt *bp)
+@@ -583,13 +583,14 @@ static int bnxt_register_fc_ctx_mem(struct bnxt *bp)
@@ -51 +52 @@
-@@ -610,7 +611,7 @@ static int bnxt_init_fc_ctx_mem(struct bnxt *bp)
+@@ -613,7 +614,7 @@ static int bnxt_init_fc_ctx_mem(struct bnxt *bp)
@@ -60 +61 @@
-@@ -619,7 +620,7 @@ static int bnxt_init_fc_ctx_mem(struct bnxt *bp)
+@@ -622,7 +623,7 @@ static int bnxt_init_fc_ctx_mem(struct bnxt *bp)
@@ -69 +70 @@
-@@ -628,7 +629,7 @@ static int bnxt_init_fc_ctx_mem(struct bnxt *bp)
+@@ -631,7 +632,7 @@ static int bnxt_init_fc_ctx_mem(struct bnxt *bp)
@@ -78 +79 @@
-@@ -637,7 +638,7 @@ static int bnxt_init_fc_ctx_mem(struct bnxt *bp)
+@@ -640,7 +641,7 @@ static int bnxt_init_fc_ctx_mem(struct bnxt *bp)
@@ -87 +88 @@
-@@ -4667,7 +4668,7 @@ static int bnxt_alloc_ctx_mem_blk(struct bnxt *bp,
+@@ -4443,7 +4444,7 @@ static int bnxt_alloc_ctx_mem_blk(struct bnxt *bp,
@@ -96 +97 @@
-@@ -4690,7 +4691,7 @@ static int bnxt_alloc_ctx_mem_blk(struct bnxt *bp,
+@@ -4466,7 +4467,7 @@ static int bnxt_alloc_ctx_mem_blk(struct bnxt *bp,
@@ -106 +107 @@
-index e4055fa49b..4a90ac2648 100644
+index 94cf7d3de2..6834244e4c 100644
@@ -127 +128 @@
-@@ -435,24 +435,23 @@ int bnxt_alloc_rxtx_nq_ring(struct bnxt *bp)
+@@ -422,24 +422,23 @@ int bnxt_alloc_rxtx_nq_ring(struct bnxt *bp)
@@ -156 +157 @@
-@@ -467,7 +466,8 @@ int bnxt_alloc_rxtx_nq_ring(struct bnxt *bp)
+@@ -454,7 +453,8 @@ int bnxt_alloc_rxtx_nq_ring(struct bnxt *bp)
@@ -166 +167 @@
-@@ -805,22 +805,21 @@ int bnxt_alloc_async_ring_struct(struct bnxt *bp)
+@@ -837,22 +837,21 @@ int bnxt_alloc_async_ring_struct(struct bnxt *bp)
@@ -193 +194 @@
-@@ -836,7 +835,6 @@ int bnxt_alloc_async_ring_struct(struct bnxt *bp)
+@@ -868,7 +867,6 @@ int bnxt_alloc_async_ring_struct(struct bnxt *bp)
@@ -204 +205 @@
-index b8b666bb9c..ef9586e64e 100644
+index 0a4685d167..201b3919ed 100644
@@ -207 +208 @@
-@@ -67,7 +67,7 @@ struct bnxt_rx_ring_info;
+@@ -66,7 +66,7 @@ struct bnxt_rx_ring_info;
@@ -217 +218 @@
-index 45e0c3d01c..44b09e9c61 100644
+index ffb7193cfc..a2feb525c4 100644
@@ -220 +221 @@
-@@ -345,8 +345,8 @@ int bnxt_rx_queue_setup_op(struct rte_eth_dev *eth_dev,
+@@ -335,8 +335,8 @@ int bnxt_rx_queue_setup_op(struct rte_eth_dev *eth_dev,
@@ -232 +233 @@
-index d95e1f7526..bc789224d2 100644
+index 99a31cef28..795056e457 100644
@@ -247 +248 @@
-index de5c14566d..26253a7e17 100644
+index 007f7e93c9..40cad0fd67 100644
^ permalink raw reply [flat|nested] 208+ messages in thread
* [dpdk-stable] patch 'net/bnxt: fix Tx descriptor status implementation' has been queued to stable release 20.11.3
2021-07-12 13:03 [dpdk-stable] patch 'graph: fix memory leak in stats' has been queued to stable release 20.11.3 luca.boccassi
` (86 preceding siblings ...)
2021-07-12 13:05 ` [dpdk-stable] patch 'net/bnxt: fix ring and context memory allocation' " luca.boccassi
@ 2021-07-12 13:05 ` luca.boccassi
2021-07-12 13:05 ` [dpdk-stable] patch 'net/bnxt: fix scalar Tx completion handling' " luca.boccassi
` (27 subsequent siblings)
115 siblings, 0 replies; 208+ messages in thread
From: luca.boccassi @ 2021-07-12 13:05 UTC (permalink / raw)
To: Lance Richardson; +Cc: Ajit Khaparde, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.3
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/14/21. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/2dfab9aad47e5209eb356e11cf937605f645189d
Thanks.
Luca Boccassi
---
From 2dfab9aad47e5209eb356e11cf937605f645189d Mon Sep 17 00:00:00 2001
From: Lance Richardson <lance.richardson@broadcom.com>
Date: Wed, 16 Jun 2021 13:55:21 -0400
Subject: [PATCH] net/bnxt: fix Tx descriptor status implementation
[ upstream commit ce5c57ac01af038b930d5164df2cb16193e238ec ]
With Tx completion batching, a single transmit completion
can correspond to one or more transmit descriptors, adjust
implementation to account for this.
RTE_ETH_TX_DESC_DONE should be returned for descriptors that
are available for use instead of RTE_ETH_TX_DESC_UNAVAIL.
Fixes: 5735eb241947 ("net/bnxt: support Tx batching")
Fixes: 478ed3bb7b9d ("net/bnxt: support Tx descriptor status")
Signed-off-by: Lance Richardson <lance.richardson@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
drivers/net/bnxt/bnxt_ethdev.c | 56 +++++++++++++++++++---------------
1 file changed, 32 insertions(+), 24 deletions(-)
diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
index f34e90e8df..2bd3c9eaa5 100644
--- a/drivers/net/bnxt/bnxt_ethdev.c
+++ b/drivers/net/bnxt/bnxt_ethdev.c
@@ -3213,41 +3213,49 @@ static int
bnxt_tx_descriptor_status_op(void *tx_queue, uint16_t offset)
{
struct bnxt_tx_queue *txq = (struct bnxt_tx_queue *)tx_queue;
- struct bnxt_tx_ring_info *txr;
- struct bnxt_cp_ring_info *cpr;
- struct bnxt_sw_tx_bd *tx_buf;
- struct tx_pkt_cmpl *txcmp;
- uint32_t cons, cp_cons;
+ struct bnxt_cp_ring_info *cpr = txq->cp_ring;
+ uint32_t ring_mask, raw_cons, nb_tx_pkts = 0;
+ struct bnxt_ring *cp_ring_struct;
+ struct cmpl_base *cp_desc_ring;
int rc;
- if (!txq)
- return -EINVAL;
-
rc = is_bnxt_in_error(txq->bp);
if (rc)
return rc;
- cpr = txq->cp_ring;
- txr = txq->tx_ring;
-
if (offset >= txq->nb_tx_desc)
return -EINVAL;
- cons = RING_CMP(cpr->cp_ring_struct, offset);
- txcmp = (struct tx_pkt_cmpl *)&cpr->cp_desc_ring[cons];
- cp_cons = cpr->cp_raw_cons;
-
- if (cons > cp_cons) {
- if (CMPL_VALID(txcmp, cpr->valid))
- return RTE_ETH_TX_DESC_UNAVAIL;
- } else {
- if (CMPL_VALID(txcmp, !cpr->valid))
- return RTE_ETH_TX_DESC_UNAVAIL;
- }
- tx_buf = &txr->tx_buf_ring[cons];
- if (tx_buf->mbuf == NULL)
+ /* Return "desc done" if descriptor is available for use. */
+ if (bnxt_tx_bds_in_hw(txq) <= offset)
return RTE_ETH_TX_DESC_DONE;
+ raw_cons = cpr->cp_raw_cons;
+ cp_desc_ring = cpr->cp_desc_ring;
+ cp_ring_struct = cpr->cp_ring_struct;
+ ring_mask = cpr->cp_ring_struct->ring_mask;
+
+ /* Check to see if hw has posted a completion for the descriptor. */
+ while (1) {
+ struct tx_cmpl *txcmp;
+ uint32_t cons;
+
+ cons = RING_CMPL(ring_mask, raw_cons);
+ txcmp = (struct tx_cmpl *)&cp_desc_ring[cons];
+
+ if (!CMP_VALID(txcmp, raw_cons, cp_ring_struct))
+ break;
+
+ if (CMP_TYPE(txcmp) == TX_CMPL_TYPE_TX_L2)
+ nb_tx_pkts += rte_le_to_cpu_32(txcmp->opaque);
+
+ if (nb_tx_pkts > offset)
+ return RTE_ETH_TX_DESC_DONE;
+
+ raw_cons = NEXT_RAW_CMP(raw_cons);
+ }
+
+ /* Descriptor is pending transmit, not yet completed by hardware. */
return RTE_ETH_TX_DESC_FULL;
}
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-07-12 13:41:41.203927310 +0100
+++ 0089-net-bnxt-fix-Tx-descriptor-status-implementation.patch 2021-07-12 13:41:36.758128194 +0100
@@ -1 +1 @@
-From ce5c57ac01af038b930d5164df2cb16193e238ec Mon Sep 17 00:00:00 2001
+From 2dfab9aad47e5209eb356e11cf937605f645189d Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit ce5c57ac01af038b930d5164df2cb16193e238ec ]
+
@@ -15 +16,0 @@
-Cc: stable@dpdk.org
@@ -24 +25 @@
-index 74ade93b71..4d51a209f9 100644
+index f34e90e8df..2bd3c9eaa5 100644
@@ -27 +28 @@
-@@ -3296,41 +3296,49 @@ static int
+@@ -3213,41 +3213,49 @@ static int
@@ -33 +34 @@
-- struct rte_mbuf **tx_buf;
+- struct bnxt_sw_tx_bd *tx_buf;
@@ -67 +68 @@
-- if (*tx_buf == NULL)
+- if (tx_buf->mbuf == NULL)
^ permalink raw reply [flat|nested] 208+ messages in thread
* [dpdk-stable] patch 'net/bnxt: fix scalar Tx completion handling' has been queued to stable release 20.11.3
2021-07-12 13:03 [dpdk-stable] patch 'graph: fix memory leak in stats' has been queued to stable release 20.11.3 luca.boccassi
` (87 preceding siblings ...)
2021-07-12 13:05 ` [dpdk-stable] patch 'net/bnxt: fix Tx descriptor status implementation' " luca.boccassi
@ 2021-07-12 13:05 ` luca.boccassi
2021-07-12 13:05 ` [dpdk-stable] patch 'net/bnxt: fix Rx interrupt setting' " luca.boccassi
` (26 subsequent siblings)
115 siblings, 0 replies; 208+ messages in thread
From: luca.boccassi @ 2021-07-12 13:05 UTC (permalink / raw)
To: Lance Richardson; +Cc: Ajit Khaparde, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.3
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/14/21. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/ea63b9f5ca7c1860f52cc5154059a7988a2777a3
Thanks.
Luca Boccassi
---
From ea63b9f5ca7c1860f52cc5154059a7988a2777a3 Mon Sep 17 00:00:00 2001
From: Lance Richardson <lance.richardson@broadcom.com>
Date: Wed, 16 Jun 2021 13:55:22 -0400
Subject: [PATCH] net/bnxt: fix scalar Tx completion handling
[ upstream commit 2b5a36f4df0c00407117ed6f8f9444dd943b4f4c ]
Preserve the raw (unmasked) transmit completion ring
consumer index.
Remove cache prefetches that have no measurable performance
benefit.
Fixes: c7de4195cc4c ("net/bnxt: modify ring index logic")
Signed-off-by: Lance Richardson <lance.richardson@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
drivers/net/bnxt/bnxt_txr.c | 24 +++++++++++-------------
1 file changed, 11 insertions(+), 13 deletions(-)
diff --git a/drivers/net/bnxt/bnxt_txr.c b/drivers/net/bnxt/bnxt_txr.c
index 0cf6ece786..412bc59f3b 100644
--- a/drivers/net/bnxt/bnxt_txr.c
+++ b/drivers/net/bnxt/bnxt_txr.c
@@ -427,30 +427,26 @@ static void bnxt_tx_cmp(struct bnxt_tx_queue *txq, int nr_pkts)
static int bnxt_handle_tx_cp(struct bnxt_tx_queue *txq)
{
+ uint32_t nb_tx_pkts = 0, cons, ring_mask, opaque;
struct bnxt_cp_ring_info *cpr = txq->cp_ring;
uint32_t raw_cons = cpr->cp_raw_cons;
- uint32_t cons;
- uint32_t nb_tx_pkts = 0;
+ struct bnxt_ring *cp_ring_struct;
struct tx_cmpl *txcmp;
- struct cmpl_base *cp_desc_ring = cpr->cp_desc_ring;
- struct bnxt_ring *cp_ring_struct = cpr->cp_ring_struct;
- uint32_t ring_mask = cp_ring_struct->ring_mask;
- uint32_t opaque = 0;
if (bnxt_tx_bds_in_hw(txq) < txq->tx_free_thresh)
return 0;
+ cp_ring_struct = cpr->cp_ring_struct;
+ ring_mask = cp_ring_struct->ring_mask;
+
do {
cons = RING_CMPL(ring_mask, raw_cons);
txcmp = (struct tx_cmpl *)&cpr->cp_desc_ring[cons];
- rte_prefetch_non_temporal(&cp_desc_ring[(cons + 2) &
- ring_mask]);
- if (!CMPL_VALID(txcmp, cpr->valid))
+ if (!CMP_VALID(txcmp, raw_cons, cp_ring_struct))
break;
- opaque = rte_cpu_to_le_32(txcmp->opaque);
- NEXT_CMPL(cpr, cons, cpr->valid, 1);
- rte_prefetch0(&cp_desc_ring[cons]);
+
+ opaque = rte_le_to_cpu_32(txcmp->opaque);
if (CMP_TYPE(txcmp) == TX_CMPL_TYPE_TX_L2)
nb_tx_pkts += opaque;
@@ -458,9 +454,11 @@ static int bnxt_handle_tx_cp(struct bnxt_tx_queue *txq)
RTE_LOG_DP(ERR, PMD,
"Unhandled CMP type %02x\n",
CMP_TYPE(txcmp));
- raw_cons = cons;
+ raw_cons = NEXT_RAW_CMP(raw_cons);
} while (nb_tx_pkts < ring_mask);
+ cpr->valid = !!(raw_cons & cp_ring_struct->ring_size);
+
if (nb_tx_pkts) {
if (txq->offloads & DEV_TX_OFFLOAD_MBUF_FAST_FREE)
bnxt_tx_cmp_fast(txq, nb_tx_pkts);
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-07-12 13:41:41.250783611 +0100
+++ 0090-net-bnxt-fix-scalar-Tx-completion-handling.patch 2021-07-12 13:41:36.762128276 +0100
@@ -1 +1 @@
-From 2b5a36f4df0c00407117ed6f8f9444dd943b4f4c Mon Sep 17 00:00:00 2001
+From ea63b9f5ca7c1860f52cc5154059a7988a2777a3 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 2b5a36f4df0c00407117ed6f8f9444dd943b4f4c ]
+
@@ -13 +14,0 @@
-Cc: stable@dpdk.org
@@ -22 +23 @@
-index 27459960de..54eaab34a0 100644
+index 0cf6ece786..412bc59f3b 100644
@@ -25 +26 @@
-@@ -444,30 +444,26 @@ static void bnxt_tx_cmp(struct bnxt_tx_queue *txq, int nr_pkts)
+@@ -427,30 +427,26 @@ static void bnxt_tx_cmp(struct bnxt_tx_queue *txq, int nr_pkts)
@@ -64 +65 @@
-@@ -475,9 +471,11 @@ static int bnxt_handle_tx_cp(struct bnxt_tx_queue *txq)
+@@ -458,9 +454,11 @@ static int bnxt_handle_tx_cp(struct bnxt_tx_queue *txq)
^ permalink raw reply [flat|nested] 208+ messages in thread
* [dpdk-stable] patch 'net/bnxt: fix Rx interrupt setting' has been queued to stable release 20.11.3
2021-07-12 13:03 [dpdk-stable] patch 'graph: fix memory leak in stats' has been queued to stable release 20.11.3 luca.boccassi
` (88 preceding siblings ...)
2021-07-12 13:05 ` [dpdk-stable] patch 'net/bnxt: fix scalar Tx completion handling' " luca.boccassi
@ 2021-07-12 13:05 ` luca.boccassi
2021-07-12 13:05 ` [dpdk-stable] patch 'net/mlx5: fix multi-segment inline for the first segments' " luca.boccassi
` (25 subsequent siblings)
115 siblings, 0 replies; 208+ messages in thread
From: luca.boccassi @ 2021-07-12 13:05 UTC (permalink / raw)
To: Ajit Khaparde; +Cc: Lance Richardson, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.3
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/14/21. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/b0a390214c38339449c68eb0d563921ea900250d
Thanks.
Luca Boccassi
---
From b0a390214c38339449c68eb0d563921ea900250d Mon Sep 17 00:00:00 2001
From: Ajit Khaparde <ajit.khaparde@broadcom.com>
Date: Tue, 25 May 2021 10:35:22 -0700
Subject: [PATCH] net/bnxt: fix Rx interrupt setting
[ upstream commit 5ba7c65864223c6ed27df0f861b9d700cfc9a51d ]
Don't set rxq interrupt config
Applications can set the rxq interrupt config to 1 or 0 as needed.
If an application is not interested in handling Rx interrupts and
prefers to poll Rx rings, there is no need for the PMD to set this
config option to 1.
Fixes: 1fe427fd08ee ("net/bnxt: support enable/disable interrupt")
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Reviewed-by: Lance Richardson <lance.richardson@broadcom.com>
---
drivers/net/bnxt/bnxt_ethdev.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
index 2bd3c9eaa5..25df887bfb 100644
--- a/drivers/net/bnxt/bnxt_ethdev.c
+++ b/drivers/net/bnxt/bnxt_ethdev.c
@@ -1008,7 +1008,6 @@ static int bnxt_dev_info_get_op(struct rte_eth_dev *eth_dev,
};
eth_dev->data->dev_conf.intr_conf.lsc = 1;
- eth_dev->data->dev_conf.intr_conf.rxq = 1;
dev_info->rx_desc_lim.nb_min = BNXT_MIN_RING_DESC;
dev_info->rx_desc_lim.nb_max = BNXT_MAX_RX_RING_DESC;
dev_info->tx_desc_lim.nb_min = BNXT_MIN_RING_DESC;
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-07-12 13:41:41.292479114 +0100
+++ 0091-net-bnxt-fix-Rx-interrupt-setting.patch 2021-07-12 13:41:36.770128443 +0100
@@ -1 +1 @@
-From 5ba7c65864223c6ed27df0f861b9d700cfc9a51d Mon Sep 17 00:00:00 2001
+From b0a390214c38339449c68eb0d563921ea900250d Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 5ba7c65864223c6ed27df0f861b9d700cfc9a51d ]
+
@@ -13 +14,0 @@
-Cc: stable@dpdk.org
@@ -22 +23 @@
-index 495c6cd21e..ed09f1bf52 100644
+index 2bd3c9eaa5..25df887bfb 100644
@@ -25 +26 @@
-@@ -1011,7 +1011,6 @@ static int bnxt_dev_info_get_op(struct rte_eth_dev *eth_dev,
+@@ -1008,7 +1008,6 @@ static int bnxt_dev_info_get_op(struct rte_eth_dev *eth_dev,
^ permalink raw reply [flat|nested] 208+ messages in thread
* [dpdk-stable] patch 'net/mlx5: fix multi-segment inline for the first segments' has been queued to stable release 20.11.3
2021-07-12 13:03 [dpdk-stable] patch 'graph: fix memory leak in stats' has been queued to stable release 20.11.3 luca.boccassi
` (89 preceding siblings ...)
2021-07-12 13:05 ` [dpdk-stable] patch 'net/bnxt: fix Rx interrupt setting' " luca.boccassi
@ 2021-07-12 13:05 ` luca.boccassi
2021-07-12 13:05 ` [dpdk-stable] patch 'common/mlx5: fix memory region leak' " luca.boccassi
` (24 subsequent siblings)
115 siblings, 0 replies; 208+ messages in thread
From: luca.boccassi @ 2021-07-12 13:05 UTC (permalink / raw)
To: Viacheslav Ovsiienko; +Cc: dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.3
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/14/21. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/50ad5c68ce041b5258278d041ea1052bb3fa6709
Thanks.
Luca Boccassi
---
From 50ad5c68ce041b5258278d041ea1052bb3fa6709 Mon Sep 17 00:00:00 2001
From: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
Date: Tue, 22 Jun 2021 19:40:49 +0300
Subject: [PATCH] net/mlx5: fix multi-segment inline for the first segments
[ upstream commit ec837ad0fc7c6df4912cc2706b9cd54b225f4a34 ]
Before 19.08 release the Tx burst routines of mlx5 PMD
provided data inline for the first short segments of the
multi-segment packets. In the release 19.08 mlx5 Tx datapath
was refactored and this behavior was broken, affecting the
performance.
For example, the T-Rex traffic generator might use small
leading segments to handle packet headers and performance
degradation was noticed.
If the first segments of the multi-segment packet are short
and the overall length is below the inline threshold it
should be inline into the WQE to fix the performance.
Fixes: 18a1c20044c0 ("net/mlx5: implement Tx burst template")
Signed-off-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
---
drivers/net/mlx5/mlx5_rxtx.c | 28 +++++++++++++---------------
1 file changed, 13 insertions(+), 15 deletions(-)
diff --git a/drivers/net/mlx5/mlx5_rxtx.c b/drivers/net/mlx5/mlx5_rxtx.c
index c765314068..64bba34ffc 100644
--- a/drivers/net/mlx5/mlx5_rxtx.c
+++ b/drivers/net/mlx5/mlx5_rxtx.c
@@ -3456,6 +3456,8 @@ mlx5_tx_packet_multi_inline(struct mlx5_txq_data *__rte_restrict txq,
unsigned int nxlen;
uintptr_t start;
+ mbuf = loc->mbuf;
+ nxlen = rte_pktmbuf_data_len(mbuf);
/*
* Packet length exceeds the allowed inline
* data length, check whether the minimal
@@ -3466,28 +3468,23 @@ mlx5_tx_packet_multi_inline(struct mlx5_txq_data *__rte_restrict txq,
MLX5_ESEG_MIN_INLINE_SIZE);
MLX5_ASSERT(txq->inlen_mode <= txq->inlen_send);
inlen = txq->inlen_mode;
- } else {
- if (loc->mbuf->ol_flags & PKT_TX_DYNF_NOINLINE ||
- !vlan || txq->vlan_en) {
- /*
- * VLAN insertion will be done inside by HW.
- * It is not utmost effective - VLAN flag is
- * checked twice, but we should proceed the
- * inlining length correctly and take into
- * account the VLAN header being inserted.
- */
- return mlx5_tx_packet_multi_send
- (txq, loc, olx);
- }
+ } else if (vlan && !txq->vlan_en) {
+ /*
+ * VLAN insertion is requested and hardware does not
+ * support the offload, will do with software inline.
+ */
inlen = MLX5_ESEG_MIN_INLINE_SIZE;
+ } else if (mbuf->ol_flags & PKT_TX_DYNF_NOINLINE ||
+ nxlen > txq->inlen_send) {
+ return mlx5_tx_packet_multi_send(txq, loc, olx);
+ } else {
+ goto do_first;
}
/*
* Now we know the minimal amount of data is requested
* to inline. Check whether we should inline the buffers
* from the chain beginning to eliminate some mbufs.
*/
- mbuf = loc->mbuf;
- nxlen = rte_pktmbuf_data_len(mbuf);
if (unlikely(nxlen <= txq->inlen_send)) {
/* We can inline first mbuf at least. */
if (nxlen < inlen) {
@@ -3509,6 +3506,7 @@ mlx5_tx_packet_multi_inline(struct mlx5_txq_data *__rte_restrict txq,
goto do_align;
}
}
+do_first:
do {
inlen = nxlen;
mbuf = NEXT(mbuf);
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-07-12 13:41:41.341503969 +0100
+++ 0092-net-mlx5-fix-multi-segment-inline-for-the-first-segm.patch 2021-07-12 13:41:36.778128610 +0100
@@ -1 +1 @@
-From ec837ad0fc7c6df4912cc2706b9cd54b225f4a34 Mon Sep 17 00:00:00 2001
+From 50ad5c68ce041b5258278d041ea1052bb3fa6709 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit ec837ad0fc7c6df4912cc2706b9cd54b225f4a34 ]
+
@@ -21 +22,0 @@
-Cc: stable@dpdk.org
@@ -25 +26 @@
- drivers/net/mlx5/mlx5_tx.h | 28 +++++++++++++---------------
+ drivers/net/mlx5/mlx5_rxtx.c | 28 +++++++++++++---------------
@@ -28,5 +29,5 @@
-diff --git a/drivers/net/mlx5/mlx5_tx.h b/drivers/net/mlx5/mlx5_tx.h
-index 7d3ff8407c..634c9d754a 100644
---- a/drivers/net/mlx5/mlx5_tx.h
-+++ b/drivers/net/mlx5/mlx5_tx.h
-@@ -2040,6 +2040,8 @@ mlx5_tx_packet_multi_inline(struct mlx5_txq_data *__rte_restrict txq,
+diff --git a/drivers/net/mlx5/mlx5_rxtx.c b/drivers/net/mlx5/mlx5_rxtx.c
+index c765314068..64bba34ffc 100644
+--- a/drivers/net/mlx5/mlx5_rxtx.c
++++ b/drivers/net/mlx5/mlx5_rxtx.c
+@@ -3456,6 +3456,8 @@ mlx5_tx_packet_multi_inline(struct mlx5_txq_data *__rte_restrict txq,
@@ -39,3 +40,3 @@
- * Packet length exceeds the allowed inline data length,
- * check whether the minimal inlining is required.
-@@ -2049,28 +2051,23 @@ mlx5_tx_packet_multi_inline(struct mlx5_txq_data *__rte_restrict txq,
+ * Packet length exceeds the allowed inline
+ * data length, check whether the minimal
+@@ -3466,28 +3468,23 @@ mlx5_tx_packet_multi_inline(struct mlx5_txq_data *__rte_restrict txq,
@@ -80 +81 @@
-@@ -2092,6 +2089,7 @@ mlx5_tx_packet_multi_inline(struct mlx5_txq_data *__rte_restrict txq,
+@@ -3509,6 +3506,7 @@ mlx5_tx_packet_multi_inline(struct mlx5_txq_data *__rte_restrict txq,
^ permalink raw reply [flat|nested] 208+ messages in thread
* [dpdk-stable] patch 'common/mlx5: fix memory region leak' has been queued to stable release 20.11.3
2021-07-12 13:03 [dpdk-stable] patch 'graph: fix memory leak in stats' has been queued to stable release 20.11.3 luca.boccassi
` (90 preceding siblings ...)
2021-07-12 13:05 ` [dpdk-stable] patch 'net/mlx5: fix multi-segment inline for the first segments' " luca.boccassi
@ 2021-07-12 13:05 ` luca.boccassi
2021-07-12 13:05 ` [dpdk-stable] patch 'net/mlx5: fix TSO multi-segment inline length' " luca.boccassi
` (23 subsequent siblings)
115 siblings, 0 replies; 208+ messages in thread
From: luca.boccassi @ 2021-07-12 13:05 UTC (permalink / raw)
To: Michael Baum; +Cc: Matan Azrad, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.3
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/14/21. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/d7ecda57fbbd8a715be4bcac9bdefacb7a12db3a
Thanks.
Luca Boccassi
---
From d7ecda57fbbd8a715be4bcac9bdefacb7a12db3a Mon Sep 17 00:00:00 2001
From: Michael Baum <michaelba@nvidia.com>
Date: Mon, 28 Jun 2021 18:06:14 +0300
Subject: [PATCH] common/mlx5: fix memory region leak
[ upstream commit 2f6c2adbe550ea95a0f73c4f9a9cc5da890b9bf2 ]
All the mlx5 drivers using MRs for data-path must unregister the mapped
memory when it is freed by the dpdk process.
Currently, only the net/eth driver unregisters MRs in free event.
Move the net callback handler from net driver to common.
Signed-off-by: Michael Baum <michaelba@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
---
drivers/common/mlx5/mlx5_common_mr.c | 89 ++++++++++++++++++++++++++
drivers/common/mlx5/mlx5_common_mr.h | 3 +
drivers/common/mlx5/version.map | 1 +
drivers/net/mlx5/mlx5_mr.c | 95 +---------------------------
4 files changed, 95 insertions(+), 93 deletions(-)
diff --git a/drivers/common/mlx5/mlx5_common_mr.c b/drivers/common/mlx5/mlx5_common_mr.c
index 7c25541dc4..d01f86837d 100644
--- a/drivers/common/mlx5/mlx5_common_mr.c
+++ b/drivers/common/mlx5/mlx5_common_mr.c
@@ -1060,6 +1060,95 @@ mlx5_create_mr_ext(void *pd, uintptr_t addr, size_t len, int socket_id,
return mr;
}
+/**
+ * Callback for memory free event. Iterate freed memsegs and check whether it
+ * belongs to an existing MR. If found, clear the bit from bitmap of MR. As a
+ * result, the MR would be fragmented. If it becomes empty, the MR will be freed
+ * later by mlx5_mr_garbage_collect(). Even if this callback is called from a
+ * secondary process, the garbage collector will be called in primary process
+ * as the secondary process can't call mlx5_mr_create().
+ *
+ * The global cache must be rebuilt if there's any change and this event has to
+ * be propagated to dataplane threads to flush the local caches.
+ *
+ * @param share_cache
+ * Pointer to a global shared MR cache.
+ * @param ibdev_name
+ * Name of ibv device.
+ * @param addr
+ * Address of freed memory.
+ * @param len
+ * Size of freed memory.
+ */
+void
+mlx5_free_mr_by_addr(struct mlx5_mr_share_cache *share_cache,
+ const char *ibdev_name, const void *addr, size_t len)
+{
+ const struct rte_memseg_list *msl;
+ struct mlx5_mr *mr;
+ int ms_n;
+ int i;
+ int rebuild = 0;
+
+ DRV_LOG(DEBUG, "device %s free callback: addr=%p, len=%zu",
+ ibdev_name, addr, len);
+ msl = rte_mem_virt2memseg_list(addr);
+ /* addr and len must be page-aligned. */
+ MLX5_ASSERT((uintptr_t)addr ==
+ RTE_ALIGN((uintptr_t)addr, msl->page_sz));
+ MLX5_ASSERT(len == RTE_ALIGN(len, msl->page_sz));
+ ms_n = len / msl->page_sz;
+ rte_rwlock_write_lock(&share_cache->rwlock);
+ /* Clear bits of freed memsegs from MR. */
+ for (i = 0; i < ms_n; ++i) {
+ const struct rte_memseg *ms;
+ struct mr_cache_entry entry;
+ uintptr_t start;
+ int ms_idx;
+ uint32_t pos;
+
+ /* Find MR having this memseg. */
+ start = (uintptr_t)addr + i * msl->page_sz;
+ mr = mlx5_mr_lookup_list(share_cache, &entry, start);
+ if (mr == NULL)
+ continue;
+ MLX5_ASSERT(mr->msl); /* Can't be external memory. */
+ ms = rte_mem_virt2memseg((void *)start, msl);
+ MLX5_ASSERT(ms != NULL);
+ MLX5_ASSERT(msl->page_sz == ms->hugepage_sz);
+ ms_idx = rte_fbarray_find_idx(&msl->memseg_arr, ms);
+ pos = ms_idx - mr->ms_base_idx;
+ MLX5_ASSERT(rte_bitmap_get(mr->ms_bmp, pos));
+ MLX5_ASSERT(pos < mr->ms_bmp_n);
+ DRV_LOG(DEBUG, "device %s MR(%p): clear bitmap[%u] for addr %p",
+ ibdev_name, (void *)mr, pos, (void *)start);
+ rte_bitmap_clear(mr->ms_bmp, pos);
+ if (--mr->ms_n == 0) {
+ LIST_REMOVE(mr, mr);
+ LIST_INSERT_HEAD(&share_cache->mr_free_list, mr, mr);
+ DRV_LOG(DEBUG, "device %s remove MR(%p) from list",
+ ibdev_name, (void *)mr);
+ }
+ /*
+ * MR is fragmented or will be freed. the global cache must be
+ * rebuilt.
+ */
+ rebuild = 1;
+ }
+ if (rebuild) {
+ mlx5_mr_rebuild_cache(share_cache);
+ /*
+ * No explicit wmb is needed after updating dev_gen due to
+ * store-release ordering in unlock that provides the
+ * implicit barrier at the software visible level.
+ */
+ ++share_cache->dev_gen;
+ DRV_LOG(DEBUG, "broadcasting local cache flush, gen=%d",
+ share_cache->dev_gen);
+ }
+ rte_rwlock_write_unlock(&share_cache->rwlock);
+}
+
/**
* Dump all the created MRs and the global cache entries.
*
diff --git a/drivers/common/mlx5/mlx5_common_mr.h b/drivers/common/mlx5/mlx5_common_mr.h
index da0a0f0c79..09d39ddb5b 100644
--- a/drivers/common/mlx5/mlx5_common_mr.h
+++ b/drivers/common/mlx5/mlx5_common_mr.h
@@ -143,6 +143,9 @@ void mlx5_mr_rebuild_cache(struct mlx5_mr_share_cache *share_cache);
__rte_internal
void mlx5_mr_flush_local_cache(struct mlx5_mr_ctrl *mr_ctrl);
__rte_internal
+void mlx5_free_mr_by_addr(struct mlx5_mr_share_cache *share_cache,
+ const char *ibdev_name, const void *addr, size_t len);
+__rte_internal
int
mlx5_mr_insert_cache(struct mlx5_mr_share_cache *share_cache,
struct mlx5_mr *mr);
diff --git a/drivers/common/mlx5/version.map b/drivers/common/mlx5/version.map
index fd6019bd2b..02aedbc431 100644
--- a/drivers/common/mlx5/version.map
+++ b/drivers/common/mlx5/version.map
@@ -69,6 +69,7 @@ INTERNAL {
mlx5_mr_create_primary;
mlx5_mr_flush_local_cache;
mlx5_mr_free;
+ mlx5_free_mr_by_addr;
mlx5_nl_allmulti;
mlx5_nl_devlink_family_id_get;
diff --git a/drivers/net/mlx5/mlx5_mr.c b/drivers/net/mlx5/mlx5_mr.c
index da4e91fc24..2cce3b9fe8 100644
--- a/drivers/net/mlx5/mlx5_mr.c
+++ b/drivers/net/mlx5/mlx5_mr.c
@@ -29,98 +29,6 @@ struct mr_update_mp_data {
int ret;
};
-/**
- * Callback for memory free event. Iterate freed memsegs and check whether it
- * belongs to an existing MR. If found, clear the bit from bitmap of MR. As a
- * result, the MR would be fragmented. If it becomes empty, the MR will be freed
- * later by mlx5_mr_garbage_collect(). Even if this callback is called from a
- * secondary process, the garbage collector will be called in primary process
- * as the secondary process can't call mlx5_mr_create().
- *
- * The global cache must be rebuilt if there's any change and this event has to
- * be propagated to dataplane threads to flush the local caches.
- *
- * @param sh
- * Pointer to the Ethernet device shared context.
- * @param addr
- * Address of freed memory.
- * @param len
- * Size of freed memory.
- */
-static void
-mlx5_mr_mem_event_free_cb(struct mlx5_dev_ctx_shared *sh,
- const void *addr, size_t len)
-{
- const struct rte_memseg_list *msl;
- struct mlx5_mr *mr;
- int ms_n;
- int i;
- int rebuild = 0;
-
- DEBUG("device %s free callback: addr=%p, len=%zu",
- sh->ibdev_name, addr, len);
- msl = rte_mem_virt2memseg_list(addr);
- /* addr and len must be page-aligned. */
- MLX5_ASSERT((uintptr_t)addr ==
- RTE_ALIGN((uintptr_t)addr, msl->page_sz));
- MLX5_ASSERT(len == RTE_ALIGN(len, msl->page_sz));
- ms_n = len / msl->page_sz;
- rte_rwlock_write_lock(&sh->share_cache.rwlock);
- /* Clear bits of freed memsegs from MR. */
- for (i = 0; i < ms_n; ++i) {
- const struct rte_memseg *ms;
- struct mr_cache_entry entry;
- uintptr_t start;
- int ms_idx;
- uint32_t pos;
-
- /* Find MR having this memseg. */
- start = (uintptr_t)addr + i * msl->page_sz;
- mr = mlx5_mr_lookup_list(&sh->share_cache, &entry, start);
- if (mr == NULL)
- continue;
- MLX5_ASSERT(mr->msl); /* Can't be external memory. */
- ms = rte_mem_virt2memseg((void *)start, msl);
- MLX5_ASSERT(ms != NULL);
- MLX5_ASSERT(msl->page_sz == ms->hugepage_sz);
- ms_idx = rte_fbarray_find_idx(&msl->memseg_arr, ms);
- pos = ms_idx - mr->ms_base_idx;
- MLX5_ASSERT(rte_bitmap_get(mr->ms_bmp, pos));
- MLX5_ASSERT(pos < mr->ms_bmp_n);
- DEBUG("device %s MR(%p): clear bitmap[%u] for addr %p",
- sh->ibdev_name, (void *)mr, pos, (void *)start);
- rte_bitmap_clear(mr->ms_bmp, pos);
- if (--mr->ms_n == 0) {
- LIST_REMOVE(mr, mr);
- LIST_INSERT_HEAD(&sh->share_cache.mr_free_list, mr, mr);
- DEBUG("device %s remove MR(%p) from list",
- sh->ibdev_name, (void *)mr);
- }
- /*
- * MR is fragmented or will be freed. the global cache must be
- * rebuilt.
- */
- rebuild = 1;
- }
- if (rebuild) {
- mlx5_mr_rebuild_cache(&sh->share_cache);
- /*
- * Flush local caches by propagating invalidation across cores.
- * rte_smp_wmb() is enough to synchronize this event. If one of
- * freed memsegs is seen by other core, that means the memseg
- * has been allocated by allocator, which will come after this
- * free call. Therefore, this store instruction (incrementing
- * generation below) will be guaranteed to be seen by other core
- * before the core sees the newly allocated memory.
- */
- ++sh->share_cache.dev_gen;
- DEBUG("broadcasting local cache flush, gen=%d",
- sh->share_cache.dev_gen);
- rte_smp_wmb();
- }
- rte_rwlock_write_unlock(&sh->share_cache.rwlock);
-}
-
/**
* Callback for memory event. This can be called from both primary and secondary
* process.
@@ -146,7 +54,8 @@ mlx5_mr_mem_event_cb(enum rte_mem_event event_type, const void *addr,
rte_rwlock_write_lock(&mlx5_shared_data->mem_event_rwlock);
/* Iterate all the existing mlx5 devices. */
LIST_FOREACH(sh, dev_list, mem_event_cb)
- mlx5_mr_mem_event_free_cb(sh, addr, len);
+ mlx5_free_mr_by_addr(&sh->share_cache,
+ sh->ibdev_name, addr, len);
rte_rwlock_write_unlock(&mlx5_shared_data->mem_event_rwlock);
break;
case RTE_MEM_EVENT_ALLOC:
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-07-12 13:41:41.388316195 +0100
+++ 0093-common-mlx5-fix-memory-region-leak.patch 2021-07-12 13:41:36.782128693 +0100
@@ -1 +1 @@
-From 2f6c2adbe550ea95a0f73c4f9a9cc5da890b9bf2 Mon Sep 17 00:00:00 2001
+From d7ecda57fbbd8a715be4bcac9bdefacb7a12db3a Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 2f6c2adbe550ea95a0f73c4f9a9cc5da890b9bf2 ]
+
@@ -13,2 +14,0 @@
-Cc: stable@dpdk.org
-
@@ -18 +18 @@
- drivers/common/mlx5/mlx5_common_mr.c | 89 +++++++++++++++++++++++++++
+ drivers/common/mlx5/mlx5_common_mr.c | 89 ++++++++++++++++++++++++++
@@ -21,2 +21,2 @@
- drivers/net/mlx5/mlx5_mr.c | 90 +---------------------------
- 4 files changed, 95 insertions(+), 88 deletions(-)
+ drivers/net/mlx5/mlx5_mr.c | 95 +---------------------------
+ 4 files changed, 95 insertions(+), 93 deletions(-)
@@ -25 +25 @@
-index afb5b3d0a7..98fe8698e2 100644
+index 7c25541dc4..d01f86837d 100644
@@ -28 +28 @@
-@@ -1062,6 +1062,95 @@ mlx5_create_mr_ext(void *pd, uintptr_t addr, size_t len, int socket_id,
+@@ -1060,6 +1060,95 @@ mlx5_create_mr_ext(void *pd, uintptr_t addr, size_t len, int socket_id,
@@ -125 +125 @@
-index 5cc3f097c2..6e465a05e9 100644
+index da0a0f0c79..09d39ddb5b 100644
@@ -128 +128 @@
-@@ -144,6 +144,9 @@ void mlx5_mr_rebuild_cache(struct mlx5_mr_share_cache *share_cache);
+@@ -143,6 +143,9 @@ void mlx5_mr_rebuild_cache(struct mlx5_mr_share_cache *share_cache);
@@ -139 +139 @@
-index db4f13f1f7..b8be73a77b 100644
+index fd6019bd2b..02aedbc431 100644
@@ -142,4 +142,4 @@
-@@ -103,6 +103,7 @@ INTERNAL {
- mlx5_mr_insert_cache;
- mlx5_mr_lookup_cache;
- mlx5_mr_lookup_list;
+@@ -69,6 +69,7 @@ INTERNAL {
+ mlx5_mr_create_primary;
+ mlx5_mr_flush_local_cache;
+ mlx5_mr_free;
@@ -147,2 +146,0 @@
- mlx5_mr_rebuild_cache;
- mlx5_mr_release_cache;
@@ -149,0 +148,2 @@
+ mlx5_nl_allmulti;
+ mlx5_nl_devlink_family_id_get;
@@ -151 +151 @@
-index 0c5403e493..0b6cfc8cb9 100644
+index da4e91fc24..2cce3b9fe8 100644
@@ -154 +154 @@
-@@ -31,93 +31,6 @@ struct mr_update_mp_data {
+@@ -29,98 +29,6 @@ struct mr_update_mp_data {
@@ -186 +186 @@
-- DRV_LOG(DEBUG, "device %s free callback: addr=%p, len=%zu",
+- DEBUG("device %s free callback: addr=%p, len=%zu",
@@ -216 +216 @@
-- DRV_LOG(DEBUG, "device %s MR(%p): clear bitmap[%u] for addr %p",
+- DEBUG("device %s MR(%p): clear bitmap[%u] for addr %p",
@@ -222 +222 @@
-- DRV_LOG(DEBUG, "device %s remove MR(%p) from list",
+- DEBUG("device %s remove MR(%p) from list",
@@ -234,3 +234,7 @@
-- * No explicit wmb is needed after updating dev_gen due to
-- * store-release ordering in unlock that provides the
-- * implicit barrier at the software visible level.
+- * Flush local caches by propagating invalidation across cores.
+- * rte_smp_wmb() is enough to synchronize this event. If one of
+- * freed memsegs is seen by other core, that means the memseg
+- * has been allocated by allocator, which will come after this
+- * free call. Therefore, this store instruction (incrementing
+- * generation below) will be guaranteed to be seen by other core
+- * before the core sees the newly allocated memory.
@@ -239 +243 @@
-- DRV_LOG(DEBUG, "broadcasting local cache flush, gen=%d",
+- DEBUG("broadcasting local cache flush, gen=%d",
@@ -240,0 +245 @@
+- rte_smp_wmb();
@@ -248 +253 @@
-@@ -143,7 +56,8 @@ mlx5_mr_mem_event_cb(enum rte_mem_event event_type, const void *addr,
+@@ -146,7 +54,8 @@ mlx5_mr_mem_event_cb(enum rte_mem_event event_type, const void *addr,
^ permalink raw reply [flat|nested] 208+ messages in thread
* [dpdk-stable] patch 'net/mlx5: fix TSO multi-segment inline length' has been queued to stable release 20.11.3
2021-07-12 13:03 [dpdk-stable] patch 'graph: fix memory leak in stats' has been queued to stable release 20.11.3 luca.boccassi
` (91 preceding siblings ...)
2021-07-12 13:05 ` [dpdk-stable] patch 'common/mlx5: fix memory region leak' " luca.boccassi
@ 2021-07-12 13:05 ` luca.boccassi
2021-07-12 13:05 ` [dpdk-stable] patch 'doc: add limitation for ConnectX-4 with L2 in mlx5 guide' " luca.boccassi
` (22 subsequent siblings)
115 siblings, 0 replies; 208+ messages in thread
From: luca.boccassi @ 2021-07-12 13:05 UTC (permalink / raw)
To: Viacheslav Ovsiienko; +Cc: dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.3
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/14/21. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/4a3fe74d9dc570fed8c8638caf387ca324d870a8
Thanks.
Luca Boccassi
---
From 4a3fe74d9dc570fed8c8638caf387ca324d870a8 Mon Sep 17 00:00:00 2001
From: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
Date: Sun, 20 Jun 2021 09:30:28 +0300
Subject: [PATCH] net/mlx5: fix TSO multi-segment inline length
[ upstream commit 52e1ece50aaf526b900120283284834b0a59e3ce ]
The inline data length for TSO ethernet segment should be
calculated from the TSO header instead of the inline size
configured by txq_inline_min devarg or reported by the NIC.
It is imposed by the nature of TSO offload - inline header
is being duplicated to every output TCP packet.
Fixes: cacb44a09962 ("net/mlx5: add no-inline Tx flag")
Signed-off-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
---
drivers/net/mlx5/mlx5_rxtx.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/net/mlx5/mlx5_rxtx.c b/drivers/net/mlx5/mlx5_rxtx.c
index 64bba34ffc..5ec823b024 100644
--- a/drivers/net/mlx5/mlx5_rxtx.c
+++ b/drivers/net/mlx5/mlx5_rxtx.c
@@ -2743,7 +2743,8 @@ mlx5_tx_eseg_mdat(struct mlx5_txq_data *__rte_restrict txq,
* Copying may be interrupted inside the routine
* if run into no inline hint flag.
*/
- copy = tlen >= txq->inlen_mode ? 0 : (txq->inlen_mode - tlen);
+ copy = tso ? inlen : txq->inlen_mode;
+ copy = tlen >= copy ? 0 : (copy - tlen);
copy = mlx5_tx_mseg_memcpy(pdst, loc, part, copy, olx);
tlen += copy;
if (likely(inlen <= tlen) || copy < part) {
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-07-12 13:41:41.432925134 +0100
+++ 0094-net-mlx5-fix-TSO-multi-segment-inline-length.patch 2021-07-12 13:41:36.790128860 +0100
@@ -1 +1 @@
-From 52e1ece50aaf526b900120283284834b0a59e3ce Mon Sep 17 00:00:00 2001
+From 4a3fe74d9dc570fed8c8638caf387ca324d870a8 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 52e1ece50aaf526b900120283284834b0a59e3ce ]
+
@@ -13 +14,0 @@
-Cc: stable@dpdk.org
@@ -17 +18 @@
- drivers/net/mlx5/mlx5_tx.h | 3 ++-
+ drivers/net/mlx5/mlx5_rxtx.c | 3 ++-
@@ -20,5 +21,5 @@
-diff --git a/drivers/net/mlx5/mlx5_tx.h b/drivers/net/mlx5/mlx5_tx.h
-index 634c9d754a..1a35919371 100644
---- a/drivers/net/mlx5/mlx5_tx.h
-+++ b/drivers/net/mlx5/mlx5_tx.h
-@@ -1338,7 +1338,8 @@ mlx5_tx_eseg_mdat(struct mlx5_txq_data *__rte_restrict txq,
+diff --git a/drivers/net/mlx5/mlx5_rxtx.c b/drivers/net/mlx5/mlx5_rxtx.c
+index 64bba34ffc..5ec823b024 100644
+--- a/drivers/net/mlx5/mlx5_rxtx.c
++++ b/drivers/net/mlx5/mlx5_rxtx.c
+@@ -2743,7 +2743,8 @@ mlx5_tx_eseg_mdat(struct mlx5_txq_data *__rte_restrict txq,
^ permalink raw reply [flat|nested] 208+ messages in thread
* [dpdk-stable] patch 'doc: add limitation for ConnectX-4 with L2 in mlx5 guide' has been queued to stable release 20.11.3
2021-07-12 13:03 [dpdk-stable] patch 'graph: fix memory leak in stats' has been queued to stable release 20.11.3 luca.boccassi
` (92 preceding siblings ...)
2021-07-12 13:05 ` [dpdk-stable] patch 'net/mlx5: fix TSO multi-segment inline length' " luca.boccassi
@ 2021-07-12 13:05 ` luca.boccassi
2021-07-12 13:05 ` [dpdk-stable] patch 'net/mlx5: fix r/w lock usage in DMA unmap' " luca.boccassi
` (21 subsequent siblings)
115 siblings, 0 replies; 208+ messages in thread
From: luca.boccassi @ 2021-07-12 13:05 UTC (permalink / raw)
To: Dmitry Kozlyuk; +Cc: Viacheslav Ovsiienko, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.3
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/14/21. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/222e82452dad164d61a97f7767c2aafbbaa0e4f7
Thanks.
Luca Boccassi
---
From 222e82452dad164d61a97f7767c2aafbbaa0e4f7 Mon Sep 17 00:00:00 2001
From: Dmitry Kozlyuk <dkozlyuk@nvidia.com>
Date: Wed, 30 Jun 2021 10:01:06 +0300
Subject: [PATCH] doc: add limitation for ConnectX-4 with L2 in mlx5 guide
[ upstream commit e60561cc955ac01512a35ca309793e351cef3c9b ]
ConnectX-4 and ConnectX-4 Lx NICs require all L2 headers of transmitted
packets to be inlined. By default only first 18 bytes are inlined,
which is insufficient if additional encapsulation is used, like Q-in-Q.
Thus, default settings caused such traffic to be dropepd on Tx.
Document a recommendation to increase inlined data size in such cases.
Fixes: 505f1fe426d3 ("net/mlx5: add Tx devargs")
Signed-off-by: Dmitry Kozlyuk <dkozlyuk@nvidia.com>
Reviewed-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
---
doc/guides/nics/mlx5.rst | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/doc/guides/nics/mlx5.rst b/doc/guides/nics/mlx5.rst
index 24d5a69227..78bf829fe5 100644
--- a/doc/guides/nics/mlx5.rst
+++ b/doc/guides/nics/mlx5.rst
@@ -591,6 +591,13 @@ Driver options
it is not recommended and may prevent NIC from sending packets over
some configurations.
+ For ConnectX-4 and ConnectX-4 Lx NICs, automatically configured value
+ is insufficient for some traffic, because they require at least all L2 headers
+ to be inlined. For example, Q-in-Q adds 4 bytes to default 18 bytes
+ of Ethernet and VLAN, thus ``txq_inline_min`` must be set to 22.
+ MPLS would add 4 bytes per label. Final value must account for all possible
+ L2 encapsulation headers used in particular environment.
+
Please, note, this minimal data inlining disengages eMPW feature (Enhanced
Multi-Packet Write), because last one does not support partial packet inlining.
This is not very critical due to minimal data inlining is mostly required
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-07-12 13:41:41.481244720 +0100
+++ 0095-doc-add-limitation-for-ConnectX-4-with-L2-in-mlx5-gu.patch 2021-07-12 13:41:36.794128943 +0100
@@ -1 +1 @@
-From e60561cc955ac01512a35ca309793e351cef3c9b Mon Sep 17 00:00:00 2001
+From 222e82452dad164d61a97f7767c2aafbbaa0e4f7 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit e60561cc955ac01512a35ca309793e351cef3c9b ]
+
@@ -13 +14,0 @@
-Cc: stable@dpdk.org
@@ -22 +23 @@
-index 0d96eec2bb..5b4bb13914 100644
+index 24d5a69227..78bf829fe5 100644
@@ -25 +26 @@
-@@ -700,6 +700,13 @@ Driver options
+@@ -591,6 +591,13 @@ Driver options
^ permalink raw reply [flat|nested] 208+ messages in thread
* [dpdk-stable] patch 'net/mlx5: fix r/w lock usage in DMA unmap' has been queued to stable release 20.11.3
2021-07-12 13:03 [dpdk-stable] patch 'graph: fix memory leak in stats' has been queued to stable release 20.11.3 luca.boccassi
` (93 preceding siblings ...)
2021-07-12 13:05 ` [dpdk-stable] patch 'doc: add limitation for ConnectX-4 with L2 in mlx5 guide' " luca.boccassi
@ 2021-07-12 13:05 ` luca.boccassi
2021-07-12 13:05 ` [dpdk-stable] patch 'net/mlx5: fix pattern expansion in RSS flow rules' " luca.boccassi
` (20 subsequent siblings)
115 siblings, 0 replies; 208+ messages in thread
From: luca.boccassi @ 2021-07-12 13:05 UTC (permalink / raw)
To: Feifei Wang; +Cc: Ruifeng Wang, Viacheslav Ovsiienko, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.3
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/14/21. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/653b095f492f5219ae7f00e904bf23b397a2adb7
Thanks.
Luca Boccassi
---
From 653b095f492f5219ae7f00e904bf23b397a2adb7 Mon Sep 17 00:00:00 2001
From: Feifei Wang <feifei.wang2@arm.com>
Date: Thu, 27 May 2021 17:48:06 +0800
Subject: [PATCH] net/mlx5: fix r/w lock usage in DMA unmap
[ upstream commit 1c196da274b82e6f1642bde7b1c407a2066caee1 ]
For mlx5 DMA unmap, write lock should be used for rebuilding memory
region cache table rather than read lock.
Fixes: 989e999d9305 ("net/mlx5: support PCI device DMA map and unmap")
Signed-off-by: Feifei Wang <feifei.wang2@arm.com>
Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
---
drivers/net/mlx5/mlx5_mr.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/net/mlx5/mlx5_mr.c b/drivers/net/mlx5/mlx5_mr.c
index 2cce3b9fe8..1dd14ddfe5 100644
--- a/drivers/net/mlx5/mlx5_mr.c
+++ b/drivers/net/mlx5/mlx5_mr.c
@@ -302,10 +302,10 @@ mlx5_dma_unmap(struct rte_pci_device *pdev, void *addr,
}
priv = dev->data->dev_private;
sh = priv->sh;
- rte_rwlock_read_lock(&sh->share_cache.rwlock);
+ rte_rwlock_write_lock(&sh->share_cache.rwlock);
mr = mlx5_mr_lookup_list(&sh->share_cache, &entry, (uintptr_t)addr);
if (!mr) {
- rte_rwlock_read_unlock(&sh->share_cache.rwlock);
+ rte_rwlock_write_unlock(&sh->share_cache.rwlock);
DRV_LOG(WARNING, "address 0x%" PRIxPTR " wasn't registered "
"to PCI device %p", (uintptr_t)addr,
(void *)pdev);
@@ -330,7 +330,7 @@ mlx5_dma_unmap(struct rte_pci_device *pdev, void *addr,
DEBUG("broadcasting local cache flush, gen=%d",
sh->share_cache.dev_gen);
rte_smp_wmb();
- rte_rwlock_read_unlock(&sh->share_cache.rwlock);
+ rte_rwlock_write_unlock(&sh->share_cache.rwlock);
return 0;
}
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-07-12 13:41:41.529022936 +0100
+++ 0096-net-mlx5-fix-r-w-lock-usage-in-DMA-unmap.patch 2021-07-12 13:41:36.794128943 +0100
@@ -1 +1 @@
-From 1c196da274b82e6f1642bde7b1c407a2066caee1 Mon Sep 17 00:00:00 2001
+From 653b095f492f5219ae7f00e904bf23b397a2adb7 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 1c196da274b82e6f1642bde7b1c407a2066caee1 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -20 +21 @@
-index 0b6cfc8cb9..89c43fc9e9 100644
+index 2cce3b9fe8..1dd14ddfe5 100644
@@ -23 +24 @@
-@@ -304,10 +304,10 @@ mlx5_dma_unmap(struct rte_pci_device *pdev, void *addr,
+@@ -302,10 +302,10 @@ mlx5_dma_unmap(struct rte_pci_device *pdev, void *addr,
@@ -36,3 +37,2 @@
-@@ -327,7 +327,7 @@ mlx5_dma_unmap(struct rte_pci_device *pdev, void *addr,
- ++sh->share_cache.dev_gen;
- DRV_LOG(DEBUG, "broadcasting local cache flush, gen=%d",
+@@ -330,7 +330,7 @@ mlx5_dma_unmap(struct rte_pci_device *pdev, void *addr,
+ DEBUG("broadcasting local cache flush, gen=%d",
@@ -39,0 +40 @@
+ rte_smp_wmb();
^ permalink raw reply [flat|nested] 208+ messages in thread
* [dpdk-stable] patch 'net/mlx5: fix pattern expansion in RSS flow rules' has been queued to stable release 20.11.3
2021-07-12 13:03 [dpdk-stable] patch 'graph: fix memory leak in stats' has been queued to stable release 20.11.3 luca.boccassi
` (94 preceding siblings ...)
2021-07-12 13:05 ` [dpdk-stable] patch 'net/mlx5: fix r/w lock usage in DMA unmap' " luca.boccassi
@ 2021-07-12 13:05 ` luca.boccassi
2021-07-12 13:05 ` [dpdk-stable] patch 'net/mlx5: fix match MPLS over GRE with key' " luca.boccassi
` (19 subsequent siblings)
115 siblings, 0 replies; 208+ messages in thread
From: luca.boccassi @ 2021-07-12 13:05 UTC (permalink / raw)
To: Gregory Etelson; +Cc: Viacheslav Ovsiienko, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.3
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/14/21. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/2879a418b171a42d9e0b121a6d4fcadad4276a32
Thanks.
Luca Boccassi
---
From 2879a418b171a42d9e0b121a6d4fcadad4276a32 Mon Sep 17 00:00:00 2001
From: Gregory Etelson <getelson@nvidia.com>
Date: Wed, 30 Jun 2021 10:19:52 +0300
Subject: [PATCH] net/mlx5: fix pattern expansion in RSS flow rules
[ upstream commit be548b9c9d40d33d88bb16641944be4cb2240eb1 ]
Flow rule pattern may be implicitly expanded by the PMD if the rule
has RSS flow action. The expansion adds network headers to the
original pattern. The new pattern lists all network levels that
participate in the rule RSS action.
The patch validates that buffer for expanded pattern has enough bytes
for new flow items.
Fixes: c7870bfe09dc ("ethdev: move RSS expansion code to mlx5 driver")
Signed-off-by: Gregory Etelson <getelson@nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
---
drivers/net/mlx5/mlx5_flow.c | 63 +++++++++++++++++++-----------------
1 file changed, 33 insertions(+), 30 deletions(-)
diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c
index 048823a50b..5e64a674d3 100644
--- a/drivers/net/mlx5/mlx5_flow.c
+++ b/drivers/net/mlx5/mlx5_flow.c
@@ -264,6 +264,7 @@ mlx5_flow_expand_rss_item_complete(const struct rte_flow_item *item)
* set, the following errors are defined:
*
* -E2BIG: graph-depth @p graph is too deep.
+ * -EINVAL: @p size has not enough space for expanded pattern.
*/
static int
mlx5_flow_expand_rss(struct mlx5_flow_expand_rss *buf, size_t size,
@@ -290,12 +291,12 @@ mlx5_flow_expand_rss(struct mlx5_flow_expand_rss *buf, size_t size,
memset(&missed_item, 0, sizeof(missed_item));
lsize = offsetof(struct mlx5_flow_expand_rss, entry) +
MLX5_RSS_EXP_ELT_N * sizeof(buf->entry[0]);
- if (lsize <= size) {
- buf->entry[0].priority = 0;
- buf->entry[0].pattern = (void *)&buf->entry[MLX5_RSS_EXP_ELT_N];
- buf->entries = 0;
- addr = buf->entry[0].pattern;
- }
+ if (lsize > size)
+ return -EINVAL;
+ buf->entry[0].priority = 0;
+ buf->entry[0].pattern = (void *)&buf->entry[MLX5_RSS_EXP_ELT_N];
+ buf->entries = 0;
+ addr = buf->entry[0].pattern;
for (item = pattern; item->type != RTE_FLOW_ITEM_TYPE_END; item++) {
if (!mlx5_flow_is_rss_expandable_item(item)) {
user_pattern_size += sizeof(*item);
@@ -313,12 +314,12 @@ mlx5_flow_expand_rss(struct mlx5_flow_expand_rss *buf, size_t size,
}
user_pattern_size += sizeof(*item); /* Handle END item. */
lsize += user_pattern_size;
+ if (lsize > size)
+ return -EINVAL;
/* Copy the user pattern in the first entry of the buffer. */
- if (lsize <= size) {
- rte_memcpy(addr, pattern, user_pattern_size);
- addr = (void *)(((uintptr_t)addr) + user_pattern_size);
- buf->entries = 1;
- }
+ rte_memcpy(addr, pattern, user_pattern_size);
+ addr = (void *)(((uintptr_t)addr) + user_pattern_size);
+ buf->entries = 1;
/* Start expanding. */
memset(flow_items, 0, sizeof(flow_items));
user_pattern_size -= sizeof(*item);
@@ -348,7 +349,9 @@ mlx5_flow_expand_rss(struct mlx5_flow_expand_rss *buf, size_t size,
elt = 2; /* missed item + item end. */
node = next;
lsize += elt * sizeof(*item) + user_pattern_size;
- if ((node->rss_types & types) && lsize <= size) {
+ if (lsize > size)
+ return -EINVAL;
+ if (node->rss_types & types) {
buf->entry[buf->entries].priority = 1;
buf->entry[buf->entries].pattern = addr;
buf->entries++;
@@ -367,6 +370,7 @@ mlx5_flow_expand_rss(struct mlx5_flow_expand_rss *buf, size_t size,
while (node) {
flow_items[stack_pos].type = node->type;
if (node->rss_types & types) {
+ size_t n;
/*
* compute the number of items to copy from the
* expansion and copy it.
@@ -376,24 +380,23 @@ mlx5_flow_expand_rss(struct mlx5_flow_expand_rss *buf, size_t size,
elt = stack_pos + 2;
flow_items[stack_pos + 1].type = RTE_FLOW_ITEM_TYPE_END;
lsize += elt * sizeof(*item) + user_pattern_size;
- if (lsize <= size) {
- size_t n = elt * sizeof(*item);
-
- buf->entry[buf->entries].priority =
- stack_pos + 1 + missed;
- buf->entry[buf->entries].pattern = addr;
- buf->entries++;
- rte_memcpy(addr, buf->entry[0].pattern,
- user_pattern_size);
- addr = (void *)(((uintptr_t)addr) +
- user_pattern_size);
- rte_memcpy(addr, &missed_item,
- missed * sizeof(*item));
- addr = (void *)(((uintptr_t)addr) +
- missed * sizeof(*item));
- rte_memcpy(addr, flow_items, n);
- addr = (void *)(((uintptr_t)addr) + n);
- }
+ if (lsize > size)
+ return -EINVAL;
+ n = elt * sizeof(*item);
+ buf->entry[buf->entries].priority =
+ stack_pos + 1 + missed;
+ buf->entry[buf->entries].pattern = addr;
+ buf->entries++;
+ rte_memcpy(addr, buf->entry[0].pattern,
+ user_pattern_size);
+ addr = (void *)(((uintptr_t)addr) +
+ user_pattern_size);
+ rte_memcpy(addr, &missed_item,
+ missed * sizeof(*item));
+ addr = (void *)(((uintptr_t)addr) +
+ missed * sizeof(*item));
+ rte_memcpy(addr, flow_items, n);
+ addr = (void *)(((uintptr_t)addr) + n);
}
/* Go deeper. */
if (!node->optional && node->next) {
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-07-12 13:41:41.571403680 +0100
+++ 0097-net-mlx5-fix-pattern-expansion-in-RSS-flow-rules.patch 2021-07-12 13:41:36.806129193 +0100
@@ -1 +1 @@
-From be548b9c9d40d33d88bb16641944be4cb2240eb1 Mon Sep 17 00:00:00 2001
+From 2879a418b171a42d9e0b121a6d4fcadad4276a32 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit be548b9c9d40d33d88bb16641944be4cb2240eb1 ]
+
@@ -15 +16,0 @@
-Cc: stable@dpdk.org
@@ -24 +25 @@
-index cac4e6aa7a..667ae3fd97 100644
+index 048823a50b..5e64a674d3 100644
^ permalink raw reply [flat|nested] 208+ messages in thread
* [dpdk-stable] patch 'net/mlx5: fix match MPLS over GRE with key' has been queued to stable release 20.11.3
2021-07-12 13:03 [dpdk-stable] patch 'graph: fix memory leak in stats' has been queued to stable release 20.11.3 luca.boccassi
` (95 preceding siblings ...)
2021-07-12 13:05 ` [dpdk-stable] patch 'net/mlx5: fix pattern expansion in RSS flow rules' " luca.boccassi
@ 2021-07-12 13:05 ` luca.boccassi
2021-07-12 13:05 ` [dpdk-stable] patch 'common/mlx5: fix Netlink receive message buffer size' " luca.boccassi
` (18 subsequent siblings)
115 siblings, 0 replies; 208+ messages in thread
From: luca.boccassi @ 2021-07-12 13:05 UTC (permalink / raw)
To: Xiaoyu Min; +Cc: Matan Azrad, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.3
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/14/21. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/9cce845acb4c0cf39a4e467109cf437ef5ecc76c
Thanks.
Luca Boccassi
---
From 9cce845acb4c0cf39a4e467109cf437ef5ecc76c Mon Sep 17 00:00:00 2001
From: Xiaoyu Min <jackmin@nvidia.com>
Date: Thu, 1 Jul 2021 13:54:56 +0800
Subject: [PATCH] net/mlx5: fix match MPLS over GRE with key
[ upstream commit 4b1cb50a86b73dceade317be4541f2c176c7ca5b ]
Currently PMD needs previous layer information in order to set
corresponding match field for MPLSoGRE or MPLSoUDP.
GRE_KEY item is missing as supported previous layer when translate
item MPLS, which causes flow[1] cannot match MPLS over GRE traffic.
According to RFC4023, MPLS over GRE tunnel with optional key
field needs to be supported too.
By adding missing GRE_KEY as supported previous layer fix problem.
[1]:
flow create 0 ingress pattern eth / ipv6 / gre k_bit is 1 / gre_key /
mpls label is 966138 / end actions queue index 1 / mark id 0xa / end
Fixes: a7a0365565a4 ("net/mlx5: match GRE key and present bits")
Signed-off-by: Xiaoyu Min <jackmin@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
---
drivers/net/mlx5/mlx5_flow_dv.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c
index f5ceb7a2d5..3dd9c0d52b 100644
--- a/drivers/net/mlx5/mlx5_flow_dv.c
+++ b/drivers/net/mlx5/mlx5_flow_dv.c
@@ -7342,6 +7342,8 @@ flow_dv_translate_item_mpls(void *matcher, void *key,
MLX5_UDP_PORT_MPLS);
break;
case MLX5_FLOW_LAYER_GRE:
+ /* Fall-through. */
+ case MLX5_FLOW_LAYER_GRE_KEY:
MLX5_SET(fte_match_set_misc, misc_m, gre_protocol, 0xffff);
MLX5_SET(fte_match_set_misc, misc_v, gre_protocol,
RTE_ETHER_TYPE_MPLS);
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-07-12 13:41:41.627370873 +0100
+++ 0098-net-mlx5-fix-match-MPLS-over-GRE-with-key.patch 2021-07-12 13:41:36.822129527 +0100
@@ -1 +1 @@
-From 4b1cb50a86b73dceade317be4541f2c176c7ca5b Mon Sep 17 00:00:00 2001
+From 9cce845acb4c0cf39a4e467109cf437ef5ecc76c Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 4b1cb50a86b73dceade317be4541f2c176c7ca5b ]
+
@@ -22 +23,0 @@
-Cc: stable@dpdk.org
@@ -31 +32 @@
-index 4758b9f2cb..0209a3e8e6 100644
+index f5ceb7a2d5..3dd9c0d52b 100644
@@ -34 +35 @@
-@@ -9064,6 +9064,8 @@ flow_dv_translate_item_mpls(void *matcher, void *key,
+@@ -7342,6 +7342,8 @@ flow_dv_translate_item_mpls(void *matcher, void *key,
^ permalink raw reply [flat|nested] 208+ messages in thread
* [dpdk-stable] patch 'common/mlx5: fix Netlink receive message buffer size' has been queued to stable release 20.11.3
2021-07-12 13:03 [dpdk-stable] patch 'graph: fix memory leak in stats' has been queued to stable release 20.11.3 luca.boccassi
` (96 preceding siblings ...)
2021-07-12 13:05 ` [dpdk-stable] patch 'net/mlx5: fix match MPLS over GRE with key' " luca.boccassi
@ 2021-07-12 13:05 ` luca.boccassi
2021-07-12 13:05 ` [dpdk-stable] patch 'net/mlx5: remove unsupported flow item MPLS over IP' " luca.boccassi
` (17 subsequent siblings)
115 siblings, 0 replies; 208+ messages in thread
From: luca.boccassi @ 2021-07-12 13:05 UTC (permalink / raw)
To: Viacheslav Ovsiienko; +Cc: dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.3
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/14/21. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/3c47e4e2e5fcb69131d2a7bdfa2a7659e187a8f2
Thanks.
Luca Boccassi
---
From 3c47e4e2e5fcb69131d2a7bdfa2a7659e187a8f2 Mon Sep 17 00:00:00 2001
From: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
Date: Thu, 1 Jul 2021 10:31:33 +0300
Subject: [PATCH] common/mlx5: fix Netlink receive message buffer size
[ upstream commit 32d1e4dbadba4bc3523d8b354458a4b979e5c2e6 ]
If there are many VFs the Netlink message length sent by kernel
in reply to RTM_GETLINK request can be large. We should query
the size of message being received in advance and allocate
the large enough buffer to handle these large messages.
Fixes: ccdcba53a3f4 ("net/mlx5: use Netlink to add/remove MAC addresses")
Signed-off-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
---
drivers/common/mlx5/linux/mlx5_nl.c | 69 +++++++++++++++++++++++------
1 file changed, 55 insertions(+), 14 deletions(-)
diff --git a/drivers/common/mlx5/linux/mlx5_nl.c b/drivers/common/mlx5/linux/mlx5_nl.c
index 94afa04b85..1f765dca07 100644
--- a/drivers/common/mlx5/linux/mlx5_nl.c
+++ b/drivers/common/mlx5/linux/mlx5_nl.c
@@ -189,8 +189,8 @@ int
mlx5_nl_init(int protocol)
{
int fd;
- int sndbuf_size = MLX5_SEND_BUF_SIZE;
- int rcvbuf_size = MLX5_RECV_BUF_SIZE;
+ int buf_size;
+ socklen_t opt_size;
struct sockaddr_nl local = {
.nl_family = AF_NETLINK,
};
@@ -201,16 +201,36 @@ mlx5_nl_init(int protocol)
rte_errno = errno;
return -rte_errno;
}
- ret = setsockopt(fd, SOL_SOCKET, SO_SNDBUF, &sndbuf_size, sizeof(int));
+ opt_size = sizeof(buf_size);
+ ret = getsockopt(fd, SOL_SOCKET, SO_SNDBUF, &buf_size, &opt_size);
if (ret == -1) {
rte_errno = errno;
goto error;
}
- ret = setsockopt(fd, SOL_SOCKET, SO_RCVBUF, &rcvbuf_size, sizeof(int));
+ DRV_LOG(DEBUG, "Netlink socket send buffer: %d", buf_size);
+ if (buf_size < MLX5_SEND_BUF_SIZE) {
+ ret = setsockopt(fd, SOL_SOCKET, SO_SNDBUF,
+ &buf_size, sizeof(buf_size));
+ if (ret == -1) {
+ rte_errno = errno;
+ goto error;
+ }
+ }
+ opt_size = sizeof(buf_size);
+ ret = getsockopt(fd, SOL_SOCKET, SO_RCVBUF, &buf_size, &opt_size);
if (ret == -1) {
rte_errno = errno;
goto error;
}
+ DRV_LOG(DEBUG, "Netlink socket recv buffer: %d", buf_size);
+ if (buf_size < MLX5_RECV_BUF_SIZE) {
+ ret = setsockopt(fd, SOL_SOCKET, SO_RCVBUF,
+ &buf_size, sizeof(buf_size));
+ if (ret == -1) {
+ rte_errno = errno;
+ goto error;
+ }
+ }
ret = bind(fd, (struct sockaddr *)&local, sizeof(local));
if (ret == -1) {
rte_errno = errno;
@@ -332,11 +352,7 @@ mlx5_nl_recv(int nlsk_fd, uint32_t sn, int (*cb)(struct nlmsghdr *, void *arg),
void *arg)
{
struct sockaddr_nl sa;
- void *buf = mlx5_malloc(0, MLX5_RECV_BUF_SIZE, 0, SOCKET_ID_ANY);
- struct iovec iov = {
- .iov_base = buf,
- .iov_len = MLX5_RECV_BUF_SIZE,
- };
+ struct iovec iov;
struct msghdr msg = {
.msg_name = &sa,
.msg_namelen = sizeof(sa),
@@ -344,18 +360,43 @@ mlx5_nl_recv(int nlsk_fd, uint32_t sn, int (*cb)(struct nlmsghdr *, void *arg),
/* One message at a time */
.msg_iovlen = 1,
};
+ void *buf = NULL;
int multipart = 0;
int ret = 0;
- if (!buf) {
- rte_errno = ENOMEM;
- return -rte_errno;
- }
do {
struct nlmsghdr *nh;
- int recv_bytes = 0;
+ int recv_bytes;
do {
+ /* Query length of incoming message. */
+ iov.iov_base = NULL;
+ iov.iov_len = 0;
+ recv_bytes = recvmsg(nlsk_fd, &msg,
+ MSG_PEEK | MSG_TRUNC);
+ if (recv_bytes < 0) {
+ rte_errno = errno;
+ ret = -rte_errno;
+ goto exit;
+ }
+ if (recv_bytes == 0) {
+ rte_errno = ENODATA;
+ ret = -rte_errno;
+ goto exit;
+ }
+ /* Allocate buffer to fetch the message. */
+ if (recv_bytes < MLX5_RECV_BUF_SIZE)
+ recv_bytes = MLX5_RECV_BUF_SIZE;
+ mlx5_free(buf);
+ buf = mlx5_malloc(0, recv_bytes, 0, SOCKET_ID_ANY);
+ if (!buf) {
+ rte_errno = ENOMEM;
+ ret = -rte_errno;
+ goto exit;
+ }
+ /* Fetch the message. */
+ iov.iov_base = buf;
+ iov.iov_len = recv_bytes;
recv_bytes = recvmsg(nlsk_fd, &msg, 0);
if (recv_bytes == -1) {
rte_errno = errno;
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-07-12 13:41:41.699249959 +0100
+++ 0099-common-mlx5-fix-Netlink-receive-message-buffer-size.patch 2021-07-12 13:41:36.826129610 +0100
@@ -1 +1 @@
-From 32d1e4dbadba4bc3523d8b354458a4b979e5c2e6 Mon Sep 17 00:00:00 2001
+From 3c47e4e2e5fcb69131d2a7bdfa2a7659e187a8f2 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 32d1e4dbadba4bc3523d8b354458a4b979e5c2e6 ]
+
@@ -12 +13,0 @@
-Cc: stable@dpdk.org
@@ -20 +21 @@
-index 3f1912d078..dc8dafd0a8 100644
+index 94afa04b85..1f765dca07 100644
^ permalink raw reply [flat|nested] 208+ messages in thread
* [dpdk-stable] patch 'net/mlx5: remove unsupported flow item MPLS over IP' has been queued to stable release 20.11.3
2021-07-12 13:03 [dpdk-stable] patch 'graph: fix memory leak in stats' has been queued to stable release 20.11.3 luca.boccassi
` (97 preceding siblings ...)
2021-07-12 13:05 ` [dpdk-stable] patch 'common/mlx5: fix Netlink receive message buffer size' " luca.boccassi
@ 2021-07-12 13:05 ` luca.boccassi
2021-07-12 13:05 ` [dpdk-stable] patch 'net/mlx5: fix MPLS RSS expansion' " luca.boccassi
` (16 subsequent siblings)
115 siblings, 0 replies; 208+ messages in thread
From: luca.boccassi @ 2021-07-12 13:05 UTC (permalink / raw)
To: Xiaoyu Min; +Cc: Matan Azrad, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.3
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/14/21. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/c66f74e42606307ac3303bfea3cb0f69cc794ddf
Thanks.
Luca Boccassi
---
From c66f74e42606307ac3303bfea3cb0f69cc794ddf Mon Sep 17 00:00:00 2001
From: Xiaoyu Min <jackmin@nvidia.com>
Date: Fri, 2 Jul 2021 16:34:46 +0800
Subject: [PATCH] net/mlx5: remove unsupported flow item MPLS over IP
[ upstream commit 14ad99d78a466bd5fb796cb9c147d2a315cbe318 ]
HW doesn't support match MPLS over IP traffic.
Remove related code.
Fixes: d1abe664ddde ("net/mlx5: add MPLS to Direct Verbs flow engine")
Signed-off-by: Xiaoyu Min <jackmin@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
---
drivers/net/mlx5/mlx5_flow.c | 5 ++---
drivers/net/mlx5/mlx5_flow_dv.c | 3 ---
2 files changed, 2 insertions(+), 6 deletions(-)
diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c
index 5e64a674d3..e11652a467 100644
--- a/drivers/net/mlx5/mlx5_flow.c
+++ b/drivers/net/mlx5/mlx5_flow.c
@@ -2700,9 +2700,8 @@ mlx5_flow_validate_item_mpls(struct rte_eth_dev *dev __rte_unused,
"MPLS not supported or"
" disabled in firmware"
" configuration.");
- /* MPLS over IP, UDP, GRE is allowed */
- if (!(prev_layer & (MLX5_FLOW_LAYER_OUTER_L3 |
- MLX5_FLOW_LAYER_OUTER_L4_UDP |
+ /* MPLS over UDP, GRE is allowed */
+ if (!(prev_layer & (MLX5_FLOW_LAYER_OUTER_L4_UDP |
MLX5_FLOW_LAYER_GRE |
MLX5_FLOW_LAYER_GRE_KEY)))
return rte_flow_error_set(error, EINVAL,
diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c
index 3dd9c0d52b..0ffbdb4ab7 100644
--- a/drivers/net/mlx5/mlx5_flow_dv.c
+++ b/drivers/net/mlx5/mlx5_flow_dv.c
@@ -7349,9 +7349,6 @@ flow_dv_translate_item_mpls(void *matcher, void *key,
RTE_ETHER_TYPE_MPLS);
break;
default:
- MLX5_SET(fte_match_set_lyr_2_4, headers_m, ip_protocol, 0xff);
- MLX5_SET(fte_match_set_lyr_2_4, headers_v, ip_protocol,
- IPPROTO_MPLS);
break;
}
if (!in_mpls_v)
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-07-12 13:41:41.748695542 +0100
+++ 0100-net-mlx5-remove-unsupported-flow-item-MPLS-over-IP.patch 2021-07-12 13:41:36.854130193 +0100
@@ -1 +1 @@
-From 14ad99d78a466bd5fb796cb9c147d2a315cbe318 Mon Sep 17 00:00:00 2001
+From c66f74e42606307ac3303bfea3cb0f69cc794ddf Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 14ad99d78a466bd5fb796cb9c147d2a315cbe318 ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -21 +22 @@
-index 667ae3fd97..dc41e8b1b7 100644
+index 5e64a674d3..e11652a467 100644
@@ -24 +25 @@
-@@ -2923,9 +2923,8 @@ mlx5_flow_validate_item_mpls(struct rte_eth_dev *dev __rte_unused,
+@@ -2700,9 +2700,8 @@ mlx5_flow_validate_item_mpls(struct rte_eth_dev *dev __rte_unused,
@@ -37 +38 @@
-index 6ffdaf188c..6c8adb3481 100644
+index 3dd9c0d52b..0ffbdb4ab7 100644
@@ -40 +41 @@
-@@ -9076,9 +9076,6 @@ flow_dv_translate_item_mpls(void *matcher, void *key,
+@@ -7349,9 +7349,6 @@ flow_dv_translate_item_mpls(void *matcher, void *key,
^ permalink raw reply [flat|nested] 208+ messages in thread
* [dpdk-stable] patch 'net/mlx5: fix MPLS RSS expansion' has been queued to stable release 20.11.3
2021-07-12 13:03 [dpdk-stable] patch 'graph: fix memory leak in stats' has been queued to stable release 20.11.3 luca.boccassi
` (98 preceding siblings ...)
2021-07-12 13:05 ` [dpdk-stable] patch 'net/mlx5: remove unsupported flow item MPLS over IP' " luca.boccassi
@ 2021-07-12 13:05 ` luca.boccassi
2021-07-12 13:05 ` [dpdk-stable] patch 'common/mlx5: use new port query API if available' " luca.boccassi
` (15 subsequent siblings)
115 siblings, 0 replies; 208+ messages in thread
From: luca.boccassi @ 2021-07-12 13:05 UTC (permalink / raw)
To: Xiaoyu Min; +Cc: Matan Azrad, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.3
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/14/21. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/66d53636e902dc2474206225565daed4729ac6b2
Thanks.
Luca Boccassi
---
From 66d53636e902dc2474206225565daed4729ac6b2 Mon Sep 17 00:00:00 2001
From: Xiaoyu Min <jackmin@nvidia.com>
Date: Fri, 2 Jul 2021 16:34:47 +0800
Subject: [PATCH] net/mlx5: fix MPLS RSS expansion
[ upstream commit 84f4764c22a32b319cb6fa7c8935b0d7977298cc ]
MPLSoUDP and MPLSoGRE are supported by PMD from
rte flow point of view.
RSS expansion doesn't support above but, instead, supports
normal MPLS over L2, which actually will be rejected by PMD.
This patch removes RSS expansion support of the MPLS over L2
and adds support of MPLSoUDP and MPLSoGRE.
In addition to above, support for eth over MPLS expansion is
added too.
Fixes: a4a5cd21d20a ("net/mlx5: add flow MPLS item")
Signed-off-by: Xiaoyu Min <jackmin@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
---
drivers/net/mlx5/mlx5_flow.c | 19 ++++++++++++-------
1 file changed, 12 insertions(+), 7 deletions(-)
diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c
index e11652a467..35a1d04a2e 100644
--- a/drivers/net/mlx5/mlx5_flow.c
+++ b/drivers/net/mlx5/mlx5_flow.c
@@ -131,6 +131,7 @@ mlx5_flow_is_rss_expandable_item(const struct rte_flow_item *item)
case RTE_FLOW_ITEM_TYPE_NVGRE:
case RTE_FLOW_ITEM_TYPE_GRE:
case RTE_FLOW_ITEM_TYPE_GENEVE:
+ case RTE_FLOW_ITEM_TYPE_MPLS:
return true;
default:
break;
@@ -477,8 +478,7 @@ static const struct mlx5_flow_expand_node mlx5_support_expansion[] = {
},
[MLX5_EXPANSION_OUTER_ETH] = {
.next = MLX5_FLOW_EXPAND_RSS_NEXT(MLX5_EXPANSION_OUTER_IPV4,
- MLX5_EXPANSION_OUTER_IPV6,
- MLX5_EXPANSION_MPLS),
+ MLX5_EXPANSION_OUTER_IPV6),
.type = RTE_FLOW_ITEM_TYPE_ETH,
.rss_types = 0,
},
@@ -506,7 +506,8 @@ static const struct mlx5_flow_expand_node mlx5_support_expansion[] = {
},
[MLX5_EXPANSION_OUTER_IPV4_UDP] = {
.next = MLX5_FLOW_EXPAND_RSS_NEXT(MLX5_EXPANSION_VXLAN,
- MLX5_EXPANSION_VXLAN_GPE),
+ MLX5_EXPANSION_VXLAN_GPE,
+ MLX5_EXPANSION_MPLS),
.type = RTE_FLOW_ITEM_TYPE_UDP,
.rss_types = ETH_RSS_NONFRAG_IPV4_UDP,
},
@@ -528,7 +529,8 @@ static const struct mlx5_flow_expand_node mlx5_support_expansion[] = {
},
[MLX5_EXPANSION_OUTER_IPV6_UDP] = {
.next = MLX5_FLOW_EXPAND_RSS_NEXT(MLX5_EXPANSION_VXLAN,
- MLX5_EXPANSION_VXLAN_GPE),
+ MLX5_EXPANSION_VXLAN_GPE,
+ MLX5_EXPANSION_MPLS),
.type = RTE_FLOW_ITEM_TYPE_UDP,
.rss_types = ETH_RSS_NONFRAG_IPV6_UDP,
},
@@ -551,12 +553,14 @@ static const struct mlx5_flow_expand_node mlx5_support_expansion[] = {
[MLX5_EXPANSION_GRE] = {
.next = MLX5_FLOW_EXPAND_RSS_NEXT(MLX5_EXPANSION_IPV4,
MLX5_EXPANSION_IPV6,
- MLX5_EXPANSION_GRE_KEY),
+ MLX5_EXPANSION_GRE_KEY,
+ MLX5_EXPANSION_MPLS),
.type = RTE_FLOW_ITEM_TYPE_GRE,
},
[MLX5_EXPANSION_GRE_KEY] = {
.next = MLX5_FLOW_EXPAND_RSS_NEXT(MLX5_EXPANSION_IPV4,
- MLX5_EXPANSION_IPV6),
+ MLX5_EXPANSION_IPV6,
+ MLX5_EXPANSION_MPLS),
.type = RTE_FLOW_ITEM_TYPE_GRE_KEY,
.optional = 1,
},
@@ -566,7 +570,8 @@ static const struct mlx5_flow_expand_node mlx5_support_expansion[] = {
},
[MLX5_EXPANSION_MPLS] = {
.next = MLX5_FLOW_EXPAND_RSS_NEXT(MLX5_EXPANSION_IPV4,
- MLX5_EXPANSION_IPV6),
+ MLX5_EXPANSION_IPV6,
+ MLX5_EXPANSION_ETH),
.type = RTE_FLOW_ITEM_TYPE_MPLS,
},
[MLX5_EXPANSION_ETH] = {
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-07-12 13:41:41.823857818 +0100
+++ 0101-net-mlx5-fix-MPLS-RSS-expansion.patch 2021-07-12 13:41:36.866130443 +0100
@@ -1 +1 @@
-From 84f4764c22a32b319cb6fa7c8935b0d7977298cc Mon Sep 17 00:00:00 2001
+From 66d53636e902dc2474206225565daed4729ac6b2 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 84f4764c22a32b319cb6fa7c8935b0d7977298cc ]
+
@@ -19 +20,0 @@
-Cc: stable@dpdk.org
@@ -28 +29 @@
-index dc41e8b1b7..00fc37ed55 100644
+index e11652a467..35a1d04a2e 100644
^ permalink raw reply [flat|nested] 208+ messages in thread
* [dpdk-stable] patch 'common/mlx5: use new port query API if available' has been queued to stable release 20.11.3
2021-07-12 13:03 [dpdk-stable] patch 'graph: fix memory leak in stats' has been queued to stable release 20.11.3 luca.boccassi
` (99 preceding siblings ...)
2021-07-12 13:05 ` [dpdk-stable] patch 'net/mlx5: fix MPLS RSS expansion' " luca.boccassi
@ 2021-07-12 13:05 ` luca.boccassi
2021-07-12 13:05 ` [dpdk-stable] patch 'common/mlx5: fix compatibility with OFED port query API' " luca.boccassi
` (14 subsequent siblings)
115 siblings, 0 replies; 208+ messages in thread
From: luca.boccassi @ 2021-07-12 13:05 UTC (permalink / raw)
To: Viacheslav Ovsiienko; +Cc: Matan Azrad, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.3
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/14/21. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/245c98f97ef6763ea75ae847b76f0b5fdb68fbb6
Thanks.
Luca Boccassi
---
From 245c98f97ef6763ea75ae847b76f0b5fdb68fbb6 Mon Sep 17 00:00:00 2001
From: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
Date: Wed, 7 Jul 2021 18:54:27 +0300
Subject: [PATCH] common/mlx5: use new port query API if available
[ upstream commit d0cf77e8c2b64319057f5f629a7a595ce6e8b556 ]
In order to get E-Switch vport identifiers the mlx5 PMD relies
on two approaches:
[a] use port query API if it is provided by rdma-core library
[b] otherwise, deduce vport ids from the related VF index
The latter is not reliable and may not work with newer kernel
drivers and in some configurations (LAG), causing E-Switch
malfunction. Hence, engaging the port query API is highly
desirable.
Depending on rdma-core version the port query API is:
- very old OFED versions have no query API (approach [b])
- rdma-core OFED < 5.5 provides mlx5dv_query_devx_port,
HAVE_MLX5DV_DR_DEVX_PORT flag is defined (approach [a])
- rdma-core OFED >= 5.5 has mlx5dv_query_port, flag
HAVE_MLX5DV_DR_DEVX_PORT_V35 is defined (approach [a])
- future OFED versions might remove mlx5dv_query_devx_port
and HAVE_MLX5DV_DR_DEVX_PORT will not be defined
- Upstream rdma-core < v35 has no port query API (approach [b])
- Upstream rdma-core >= v35 has mlx5dv_query_port, flag
HAVE_MLX5DV_DR_DEVX_PORT_V35 is defined (approach [a])
In order to support the new mlx5dv_query_port routine, the
conditional compilation flag HAVE_MLX5DV_DR_DEVX_PORT_V35
is introduced by this patch. The flag HAVE_MLX5DV_DR_DEVX_PORT
is kept for compatibility with previous rdma-core versions.
Despite this patch is not a bugfix (it follows the introduced API
variation in underlying library), it resolves the compatibility
issue and is highly desired to be ported to DPDK LTS.
Signed-off-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
---
drivers/common/mlx5/linux/meson.build | 2 +
drivers/common/mlx5/linux/mlx5_glue.c | 53 +++++++++++++++++++----
drivers/common/mlx5/linux/mlx5_glue.h | 16 ++++++-
drivers/net/mlx5/linux/mlx5_os.c | 60 ++++++++++++---------------
4 files changed, 88 insertions(+), 43 deletions(-)
diff --git a/drivers/common/mlx5/linux/meson.build b/drivers/common/mlx5/linux/meson.build
index fa9686fdaf..8295cfbe41 100644
--- a/drivers/common/mlx5/linux/meson.build
+++ b/drivers/common/mlx5/linux/meson.build
@@ -94,6 +94,8 @@ has_sym_args = [
'IBV_WQ_FLAG_RX_END_PADDING' ],
[ 'HAVE_MLX5DV_DR_DEVX_PORT', 'infiniband/mlx5dv.h',
'mlx5dv_query_devx_port' ],
+ [ 'HAVE_MLX5DV_DR_DEVX_PORT_V35', 'infiniband/mlx5dv.h',
+ 'mlx5dv_query_port' ],
[ 'HAVE_IBV_DEVX_OBJ', 'infiniband/mlx5dv.h',
'mlx5dv_devx_obj_create' ],
[ 'HAVE_IBV_FLOW_DEVX_COUNTERS', 'infiniband/mlx5dv.h',
diff --git a/drivers/common/mlx5/linux/mlx5_glue.c b/drivers/common/mlx5/linux/mlx5_glue.c
index 964f7e74ef..e24bcdfbd1 100644
--- a/drivers/common/mlx5/linux/mlx5_glue.c
+++ b/drivers/common/mlx5/linux/mlx5_glue.c
@@ -1087,17 +1087,54 @@ mlx5_glue_devx_wq_query(struct ibv_wq *wq, const void *in, size_t inlen,
static int
mlx5_glue_devx_port_query(struct ibv_context *ctx,
uint32_t port_num,
- struct mlx5dv_devx_port *mlx5_devx_port)
+ struct mlx5_port_info *info)
{
+ int err = 0;
+
+ info->query_flags = 0;
+#ifdef HAVE_MLX5DV_DR_DEVX_PORT_V35
+ /* The DevX port query API is implemented (rdma-core v35 and above). */
+ struct mlx5_ib_uapi_query_port devx_port;
+
+ memset(&devx_port, 0, sizeof(devx_port));
+ err = mlx5dv_query_port(ctx, port_num, &devx_port);
+ if (err)
+ return err;
+ if (devx_port.flags & MLX5DV_QUERY_PORT_VPORT_REG_C0) {
+ info->vport_meta_tag = devx_port.reg_c0.value;
+ info->vport_meta_mask = devx_port.reg_c0.mask;
+ info->query_flags |= MLX5_PORT_QUERY_REG_C0;
+ }
+ if (devx_port.flags & MLX5DV_QUERY_PORT_VPORT) {
+ info->vport_id = devx_port.vport;
+ info->query_flags |= MLX5_PORT_QUERY_VPORT;
+ }
+#else
#ifdef HAVE_MLX5DV_DR_DEVX_PORT
- return mlx5dv_query_devx_port(ctx, port_num, mlx5_devx_port);
+ /* The legacy DevX port query API is implemented (prior v35). */
+ struct mlx5dv_devx_port devx_port = {
+ .comp_mask = MLX5DV_DEVX_PORT_VPORT |
+ MLX5DV_DEVX_PORT_MATCH_REG_C_0
+ };
+
+ err = mlx5dv_query_devx_port(ctx, port_num, &devx_port);
+ if (err)
+ return err;
+ if (devx_port.comp_mask & MLX5DV_DEVX_PORT_MATCH_REG_C_0) {
+ info->vport_meta_tag = devx_port.reg_c_0.value;
+ info->vport_meta_mask = devx_port.reg_c_0.mask;
+ info->query_flags |= MLX5_PORT_QUERY_REG_C0;
+ }
+ if (devx_port.comp_mask & MLX5DV_DEVX_PORT_VPORT) {
+ info->vport_id = devx_port.vport_num;
+ info->query_flags |= MLX5_PORT_QUERY_VPORT;
+ }
#else
- (void)ctx;
- (void)port_num;
- (void)mlx5_devx_port;
- errno = ENOTSUP;
- return errno;
-#endif
+ RTE_SET_USED(ctx);
+ RTE_SET_USED(port_num);
+#endif /* HAVE_MLX5DV_DR_DEVX_PORT */
+#endif /* HAVE_MLX5DV_DR_DEVX_PORT_V35 */
+ return err;
}
static int
diff --git a/drivers/common/mlx5/linux/mlx5_glue.h b/drivers/common/mlx5/linux/mlx5_glue.h
index 9e385be957..f08c83768c 100644
--- a/drivers/common/mlx5/linux/mlx5_glue.h
+++ b/drivers/common/mlx5/linux/mlx5_glue.h
@@ -84,6 +84,20 @@ struct mlx5dv_dr_action;
struct mlx5dv_devx_port;
#endif
+#ifndef HAVE_MLX5DV_DR_DEVX_PORT_V35
+struct mlx5dv_port;
+#endif
+
+#define MLX5_PORT_QUERY_VPORT (1u << 0)
+#define MLX5_PORT_QUERY_REG_C0 (1u << 1)
+
+struct mlx5_port_info {
+ uint16_t query_flags;
+ uint16_t vport_id; /* Associated VF vport index (if any). */
+ uint32_t vport_meta_tag; /* Used for vport index match ove VF LAG. */
+ uint32_t vport_meta_mask; /* Used for vport index field match mask. */
+};
+
#ifndef HAVE_MLX5_DR_CREATE_ACTION_FLOW_METER
struct mlx5dv_dr_flow_meter_attr;
#endif
@@ -311,7 +325,7 @@ struct mlx5_glue {
void *out, size_t outlen);
int (*devx_port_query)(struct ibv_context *ctx,
uint32_t port_num,
- struct mlx5dv_devx_port *mlx5_devx_port);
+ struct mlx5_port_info *info);
int (*dr_dump_domain)(FILE *file, void *domain);
int (*devx_query_eqn)(struct ibv_context *context, uint32_t cpus,
uint32_t *eqn);
diff --git a/drivers/net/mlx5/linux/mlx5_os.c b/drivers/net/mlx5/linux/mlx5_os.c
index 71837e34fe..56e2bf64f4 100644
--- a/drivers/net/mlx5/linux/mlx5_os.c
+++ b/drivers/net/mlx5/linux/mlx5_os.c
@@ -695,9 +695,7 @@ mlx5_dev_spawn(struct rte_device *dpdk_dev,
int own_domain_id = 0;
uint16_t port_id;
unsigned int i;
-#ifdef HAVE_MLX5DV_DR_DEVX_PORT
- struct mlx5dv_devx_port devx_port = { .comp_mask = 0 };
-#endif
+ struct mlx5_port_info vport_info = { .query_flags = 0 };
/* Determine if this port representor is supposed to be spawned. */
if (switch_info->representor && dpdk_dev->devargs) {
@@ -940,29 +938,27 @@ err_secondary:
priv->vport_meta_tag = 0;
priv->vport_meta_mask = 0;
priv->pf_bond = spawn->pf_bond;
-#ifdef HAVE_MLX5DV_DR_DEVX_PORT
/*
- * The DevX port query API is implemented. E-Switch may use
- * either vport or reg_c[0] metadata register to match on
- * vport index. The engaged part of metadata register is
- * defined by mask.
+ * If we have E-Switch we should determine the vport attributes.
+ * E-Switch may use either source vport field or reg_c[0] metadata
+ * register to match on vport index. The engaged part of metadata
+ * register is defined by mask.
*/
if (switch_info->representor || switch_info->master) {
- devx_port.comp_mask = MLX5DV_DEVX_PORT_VPORT |
- MLX5DV_DEVX_PORT_MATCH_REG_C_0;
- err = mlx5_glue->devx_port_query(sh->ctx, spawn->phys_port,
- &devx_port);
+ err = mlx5_glue->devx_port_query(sh->ctx,
+ spawn->phys_port,
+ &vport_info);
if (err) {
DRV_LOG(WARNING,
"can't query devx port %d on device %s",
spawn->phys_port,
mlx5_os_get_dev_device_name(spawn->phys_dev));
- devx_port.comp_mask = 0;
+ vport_info.query_flags = 0;
}
}
- if (devx_port.comp_mask & MLX5DV_DEVX_PORT_MATCH_REG_C_0) {
- priv->vport_meta_tag = devx_port.reg_c_0.value;
- priv->vport_meta_mask = devx_port.reg_c_0.mask;
+ if (vport_info.query_flags & MLX5_PORT_QUERY_REG_C0) {
+ priv->vport_meta_tag = vport_info.vport_meta_tag;
+ priv->vport_meta_mask = vport_info.vport_meta_mask;
if (!priv->vport_meta_mask) {
DRV_LOG(ERR, "vport zero mask for port %d"
" on bonding device %s",
@@ -982,8 +978,8 @@ err_secondary:
goto error;
}
}
- if (devx_port.comp_mask & MLX5DV_DEVX_PORT_VPORT) {
- priv->vport_id = devx_port.vport_num;
+ if (vport_info.query_flags & MLX5_PORT_QUERY_VPORT) {
+ priv->vport_id = vport_info.vport_id;
} else if (spawn->pf_bond >= 0 &&
(switch_info->representor || switch_info->master)) {
DRV_LOG(ERR, "can't deduce vport index for port %d"
@@ -993,25 +989,21 @@ err_secondary:
err = ENOTSUP;
goto error;
} else {
- /* Suppose vport index in compatible way. */
+ /*
+ * Suppose vport index in compatible way. Kernel/rdma_core
+ * support single E-Switch per PF configurations only and
+ * vport_id field contains the vport index for associated VF,
+ * which is deduced from representor port name.
+ * For example, let's have the IB device port 10, it has
+ * attached network device eth0, which has port name attribute
+ * pf0vf2, we can deduce the VF number as 2, and set vport index
+ * as 3 (2+1). This assigning schema should be changed if the
+ * multiple E-Switch instances per PF configurations or/and PCI
+ * subfunctions are added.
+ */
priv->vport_id = switch_info->representor ?
switch_info->port_name + 1 : -1;
}
-#else
- /*
- * Kernel/rdma_core support single E-Switch per PF configurations
- * only and vport_id field contains the vport index for
- * associated VF, which is deduced from representor port name.
- * For example, let's have the IB device port 10, it has
- * attached network device eth0, which has port name attribute
- * pf0vf2, we can deduce the VF number as 2, and set vport index
- * as 3 (2+1). This assigning schema should be changed if the
- * multiple E-Switch instances per PF configurations or/and PCI
- * subfunctions are added.
- */
- priv->vport_id = switch_info->representor ?
- switch_info->port_name + 1 : -1;
-#endif
/* representor_id field keeps the unmodified VF index. */
priv->representor_id = switch_info->representor ?
switch_info->port_name : -1;
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-07-12 13:41:41.884342345 +0100
+++ 0102-common-mlx5-use-new-port-query-API-if-available.patch 2021-07-12 13:41:36.874130610 +0100
@@ -1 +1 @@
-From d0cf77e8c2b64319057f5f629a7a595ce6e8b556 Mon Sep 17 00:00:00 2001
+From 245c98f97ef6763ea75ae847b76f0b5fdb68fbb6 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit d0cf77e8c2b64319057f5f629a7a595ce6e8b556 ]
+
@@ -36,2 +37,0 @@
-Cc: stable@dpdk.org
-
@@ -48 +48 @@
-index 3a3cb934a4..e1968a6906 100644
+index fa9686fdaf..8295cfbe41 100644
@@ -51,9 +51,9 @@
-@@ -93,6 +93,8 @@ has_sym_args = [
- 'IBV_WQ_FLAG_RX_END_PADDING' ],
- [ 'HAVE_MLX5DV_DR_DEVX_PORT', 'infiniband/mlx5dv.h',
- 'mlx5dv_query_devx_port' ],
-+ [ 'HAVE_MLX5DV_DR_DEVX_PORT_V35', 'infiniband/mlx5dv.h',
-+ 'mlx5dv_query_port' ],
- [ 'HAVE_IBV_DEVX_OBJ', 'infiniband/mlx5dv.h',
- 'mlx5dv_devx_obj_create' ],
- [ 'HAVE_IBV_FLOW_DEVX_COUNTERS', 'infiniband/mlx5dv.h',
+@@ -94,6 +94,8 @@ has_sym_args = [
+ 'IBV_WQ_FLAG_RX_END_PADDING' ],
+ [ 'HAVE_MLX5DV_DR_DEVX_PORT', 'infiniband/mlx5dv.h',
+ 'mlx5dv_query_devx_port' ],
++ [ 'HAVE_MLX5DV_DR_DEVX_PORT_V35', 'infiniband/mlx5dv.h',
++ 'mlx5dv_query_port' ],
+ [ 'HAVE_IBV_DEVX_OBJ', 'infiniband/mlx5dv.h',
+ 'mlx5dv_devx_obj_create' ],
+ [ 'HAVE_IBV_FLOW_DEVX_COUNTERS', 'infiniband/mlx5dv.h',
@@ -61 +61 @@
-index 145cf83fd9..b371fb7aa1 100644
+index 964f7e74ef..e24bcdfbd1 100644
@@ -128 +128 @@
-index 56246bca18..61f40d5478 100644
+index 9e385be957..f08c83768c 100644
@@ -159 +158,0 @@
- int (*dr_dump_rule)(FILE *file, void *rule);
@@ -160,0 +160 @@
+ uint32_t *eqn);
@@ -162 +162 @@
-index b94696b379..be22d9cbd2 100644
+index 71837e34fe..56e2bf64f4 100644
@@ -165,2 +165 @@
-@@ -831,9 +831,7 @@ mlx5_dev_spawn(struct rte_device *dpdk_dev,
- char name[RTE_ETH_NAME_MAX_LEN];
+@@ -695,9 +695,7 @@ mlx5_dev_spawn(struct rte_device *dpdk_dev,
@@ -168,0 +168 @@
+ unsigned int i;
@@ -175,2 +175,2 @@
- if (switch_info->representor && dpdk_dev->devargs &&
-@@ -1064,29 +1062,27 @@ err_secondary:
+ if (switch_info->representor && dpdk_dev->devargs) {
+@@ -940,29 +938,27 @@ err_secondary:
@@ -217 +217 @@
-@@ -1106,8 +1102,8 @@ err_secondary:
+@@ -982,8 +978,8 @@ err_secondary:
@@ -228 +228 @@
-@@ -1117,25 +1113,21 @@ err_secondary:
+@@ -993,25 +989,21 @@ err_secondary:
@@ -263,3 +263,3 @@
- priv->representor_id = mlx5_representor_id_encode(switch_info,
- eth_da->type);
- /*
+ /* representor_id field keeps the unmodified VF index. */
+ priv->representor_id = switch_info->representor ?
+ switch_info->port_name : -1;
^ permalink raw reply [flat|nested] 208+ messages in thread
* [dpdk-stable] patch 'common/mlx5: fix compatibility with OFED port query API' has been queued to stable release 20.11.3
2021-07-12 13:03 [dpdk-stable] patch 'graph: fix memory leak in stats' has been queued to stable release 20.11.3 luca.boccassi
` (100 preceding siblings ...)
2021-07-12 13:05 ` [dpdk-stable] patch 'common/mlx5: use new port query API if available' " luca.boccassi
@ 2021-07-12 13:05 ` luca.boccassi
2021-07-12 13:05 ` [dpdk-stable] patch 'net/ice: fix memzone leak when firmware is missing' " luca.boccassi
` (13 subsequent siblings)
115 siblings, 0 replies; 208+ messages in thread
From: luca.boccassi @ 2021-07-12 13:05 UTC (permalink / raw)
To: Viacheslav Ovsiienko; +Cc: Matan Azrad, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.3
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/14/21. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/71ce9c8caa9b0d79eb523447fc66afa1f143262e
Thanks.
Luca Boccassi
---
From 71ce9c8caa9b0d79eb523447fc66afa1f143262e Mon Sep 17 00:00:00 2001
From: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
Date: Wed, 7 Jul 2021 18:54:28 +0300
Subject: [PATCH] common/mlx5: fix compatibility with OFED port query API
[ upstream commit 0fd928bbbae5e6f89376f9996d5340a861fc14e3 ]
The compilation flag HAVE_MLX5DV_DR_DEVX_PORT depends on presence
of mlx5dv_query_devx_port routine in rdma-core library.
The mlx5dv_query_devx_port routine exists only in OFED versions
of rdma-core library and is being planned to be removed and replaced
with Upstream compatible mlx5dv_query_port.
As mlx5dv_query_devx_port is being removed all the dependencies on
the HAVE_MLX5DV_DR_DEVX_PORT compilation flag are reconsidered.
The new compilation flag HAVE_MLX5DV_DR_CREATE_DEST_IB_PORT is for
backward compatibility with older OFED versions.
Fixes: 6cfe84fbe7b1 ("net/mlx5: fix port action for LAG")
Signed-off-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
---
drivers/common/mlx5/linux/meson.build | 2 ++
drivers/common/mlx5/linux/mlx5_glue.c | 2 +-
drivers/net/mlx5/mlx5_flow_dv.c | 2 +-
3 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/common/mlx5/linux/meson.build b/drivers/common/mlx5/linux/meson.build
index 8295cfbe41..c2d580c4a6 100644
--- a/drivers/common/mlx5/linux/meson.build
+++ b/drivers/common/mlx5/linux/meson.build
@@ -96,6 +96,8 @@ has_sym_args = [
'mlx5dv_query_devx_port' ],
[ 'HAVE_MLX5DV_DR_DEVX_PORT_V35', 'infiniband/mlx5dv.h',
'mlx5dv_query_port' ],
+ [ 'HAVE_MLX5DV_DR_CREATE_DEST_IB_PORT', 'infiniband/mlx5dv.h',
+ 'mlx5dv_dr_action_create_dest_ib_port' ],
[ 'HAVE_IBV_DEVX_OBJ', 'infiniband/mlx5dv.h',
'mlx5dv_devx_obj_create' ],
[ 'HAVE_IBV_FLOW_DEVX_COUNTERS', 'infiniband/mlx5dv.h',
diff --git a/drivers/common/mlx5/linux/mlx5_glue.c b/drivers/common/mlx5/linux/mlx5_glue.c
index e24bcdfbd1..09fdce1c22 100644
--- a/drivers/common/mlx5/linux/mlx5_glue.c
+++ b/drivers/common/mlx5/linux/mlx5_glue.c
@@ -391,7 +391,7 @@ mlx5_glue_dr_create_flow_action_dest_flow_tbl(void *tbl)
static void *
mlx5_glue_dr_create_flow_action_dest_port(void *domain, uint32_t port)
{
-#ifdef HAVE_MLX5DV_DR_DEVX_PORT
+#ifdef HAVE_MLX5DV_DR_CREATE_DEST_IB_PORT
return mlx5dv_dr_action_create_dest_ib_port(domain, port);
#else
#ifdef HAVE_MLX5DV_DR_ESWITCH
diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c
index 0ffbdb4ab7..3e5c8d3af9 100644
--- a/drivers/net/mlx5/mlx5_flow_dv.c
+++ b/drivers/net/mlx5/mlx5_flow_dv.c
@@ -8498,7 +8498,7 @@ flow_dv_translate_action_port_id(struct rte_eth_dev *dev,
RTE_FLOW_ERROR_TYPE_ACTION,
NULL,
"No eswitch info was found for port");
-#ifdef HAVE_MLX5DV_DR_DEVX_PORT
+#ifdef HAVE_MLX5DV_DR_CREATE_DEST_IB_PORT
/*
* This parameter is transferred to
* mlx5dv_dr_action_create_dest_ib_port().
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-07-12 13:41:41.936934295 +0100
+++ 0103-common-mlx5-fix-compatibility-with-OFED-port-query-A.patch 2021-07-12 13:41:36.894131026 +0100
@@ -1 +1 @@
-From 0fd928bbbae5e6f89376f9996d5340a861fc14e3 Mon Sep 17 00:00:00 2001
+From 71ce9c8caa9b0d79eb523447fc66afa1f143262e Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 0fd928bbbae5e6f89376f9996d5340a861fc14e3 ]
+
@@ -20 +21,0 @@
-Cc: stable@dpdk.org
@@ -31 +32 @@
-index e1968a6906..686df26909 100644
+index 8295cfbe41..c2d580c4a6 100644
@@ -34,9 +35,9 @@
-@@ -95,6 +95,8 @@ has_sym_args = [
- 'mlx5dv_query_devx_port' ],
- [ 'HAVE_MLX5DV_DR_DEVX_PORT_V35', 'infiniband/mlx5dv.h',
- 'mlx5dv_query_port' ],
-+ [ 'HAVE_MLX5DV_DR_CREATE_DEST_IB_PORT', 'infiniband/mlx5dv.h',
-+ 'mlx5dv_dr_action_create_dest_ib_port' ],
- [ 'HAVE_IBV_DEVX_OBJ', 'infiniband/mlx5dv.h',
- 'mlx5dv_devx_obj_create' ],
- [ 'HAVE_IBV_FLOW_DEVX_COUNTERS', 'infiniband/mlx5dv.h',
+@@ -96,6 +96,8 @@ has_sym_args = [
+ 'mlx5dv_query_devx_port' ],
+ [ 'HAVE_MLX5DV_DR_DEVX_PORT_V35', 'infiniband/mlx5dv.h',
+ 'mlx5dv_query_port' ],
++ [ 'HAVE_MLX5DV_DR_CREATE_DEST_IB_PORT', 'infiniband/mlx5dv.h',
++ 'mlx5dv_dr_action_create_dest_ib_port' ],
+ [ 'HAVE_IBV_DEVX_OBJ', 'infiniband/mlx5dv.h',
+ 'mlx5dv_devx_obj_create' ],
+ [ 'HAVE_IBV_FLOW_DEVX_COUNTERS', 'infiniband/mlx5dv.h',
@@ -44 +45 @@
-index b371fb7aa1..037ca961a0 100644
+index e24bcdfbd1..09fdce1c22 100644
@@ -57 +58 @@
-index fa05882302..2f4c0eeb5b 100644
+index 0ffbdb4ab7..3e5c8d3af9 100644
@@ -60 +61 @@
-@@ -10386,7 +10386,7 @@ flow_dv_translate_action_port_id(struct rte_eth_dev *dev,
+@@ -8498,7 +8498,7 @@ flow_dv_translate_action_port_id(struct rte_eth_dev *dev,
^ permalink raw reply [flat|nested] 208+ messages in thread
* [dpdk-stable] patch 'net/ice: fix memzone leak when firmware is missing' has been queued to stable release 20.11.3
2021-07-12 13:03 [dpdk-stable] patch 'graph: fix memory leak in stats' has been queued to stable release 20.11.3 luca.boccassi
` (101 preceding siblings ...)
2021-07-12 13:05 ` [dpdk-stable] patch 'common/mlx5: fix compatibility with OFED port query API' " luca.boccassi
@ 2021-07-12 13:05 ` luca.boccassi
2021-07-12 13:05 ` [dpdk-stable] patch 'net/i40e: fix descriptor scan on Arm' " luca.boccassi
` (12 subsequent siblings)
115 siblings, 0 replies; 208+ messages in thread
From: luca.boccassi @ 2021-07-12 13:05 UTC (permalink / raw)
To: David Marchand; +Cc: Haiyue Wang, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.3
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/14/21. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/6dd0f78f2c43f5fc5d1ddc58cc00be04c04121da
Thanks.
Luca Boccassi
---
From 6dd0f78f2c43f5fc5d1ddc58cc00be04c04121da Mon Sep 17 00:00:00 2001
From: David Marchand <david.marchand@redhat.com>
Date: Tue, 6 Jul 2021 16:12:37 +0200
Subject: [PATCH] net/ice: fix memzone leak when firmware is missing
[ upstream commit 850989f9381902e36d44c2c4c7409ad703ef99cb ]
Caught by our QE.
When the firmware is missing, memzones were not released.
$ dpdk-testpmd -c 0x1f -a 0:0:0.0 -- -i
...
testpmd> dump_memzone
...
Zone 6: name:<RTE_METRICS>, len:0x15040, virt:0x1661b24c0, socket_id:0,
flags:0
physical segments used:
addr: 0x140000000 iova: 0x140000000 len: 0x40000000 pagesz: 0x40000000
testpmd> port attach 0000:5e:00.0
Attaching a new port...
EAL: Using IOMMU type 1 (Type 1)
EAL: Probe PCI driver: net_ice (8086:159b) device: 0000:5e:00.0 (socket 0)
ice_load_pkg(): failed to open file: /lib/firmware/intel/ice/ddp/ice.pkg
ice_dev_init(): Failed to load the DDP package,Use safe-mode-support=1 to
enter Safe Mode
EAL: Releasing PCI mapped resource for 0000:5e:00.0
EAL: Calling pci_unmap_resource for 0000:5e:00.0 at 0x2200000000
EAL: Calling pci_unmap_resource for 0000:5e:00.0 at 0x2202000000
EAL: Driver cannot attach the device (0000:5e:00.0)
EAL: Failed to attach device on primary process
testpmd: Failed to attach port 0000:5e:00.0
testpmd> dump_memzone
...
Zone 139: name:<ice_dma_17168374657430093156>, len:0x1000,
virt:0x1660ed800, socket_id:0, flags:0 physical segments used:
addr: 0x140000000 iova: 0x140000000 len: 0x40000000 pagesz: 0x40000000
With 20 tries attaching a net/ice port, we would end up with:
EAL: Probe PCI driver: net_ice (8086:159b) device: 0000:5e:00.0 (socket 0)
EAL: memzone_reserve_aligned_thread_unsafe(): Number of requested memzone
segments exceeds RTE_MAX_MEMZONE
ice_dev_init(): Failed to initialize HW
Fixes: a4c8c48fe3f4 ("net/ice: load OS default package")
Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Haiyue Wang <haiyue.wang@intel.com>
---
drivers/net/ice/ice_ethdev.c | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/drivers/net/ice/ice_ethdev.c b/drivers/net/ice/ice_ethdev.c
index 4234353455..c153c7ca78 100644
--- a/drivers/net/ice/ice_ethdev.c
+++ b/drivers/net/ice/ice_ethdev.c
@@ -2186,7 +2186,7 @@ ice_dev_init(struct rte_eth_dev *dev)
if (ad->devargs.safe_mode_support == 0) {
PMD_INIT_LOG(ERR, "Failed to load the DDP package,"
"Use safe-mode-support=1 to enter Safe Mode");
- return ret;
+ goto err_init_fw;
}
PMD_INIT_LOG(WARNING, "Failed to load the DDP package,"
@@ -2278,10 +2278,11 @@ err_msix_pool_init:
rte_free(dev->data->mac_addrs);
dev->data->mac_addrs = NULL;
err_init_mac:
- ice_sched_cleanup_all(hw);
- rte_free(hw->port_info);
- ice_shutdown_all_ctrlq(hw);
rte_free(pf->proto_xtr);
+#ifndef RTE_EXEC_ENV_WINDOWS
+err_init_fw:
+#endif
+ ice_deinit_hw(hw);
return ret;
}
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-07-12 13:41:42.008174293 +0100
+++ 0104-net-ice-fix-memzone-leak-when-firmware-is-missing.patch 2021-07-12 13:41:36.902131193 +0100
@@ -1 +1 @@
-From 850989f9381902e36d44c2c4c7409ad703ef99cb Mon Sep 17 00:00:00 2001
+From 6dd0f78f2c43f5fc5d1ddc58cc00be04c04121da Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 850989f9381902e36d44c2c4c7409ad703ef99cb ]
+
@@ -48 +49,0 @@
-Cc: stable@dpdk.org
@@ -57 +58 @@
-index aec19b6521..a4cd39c954 100644
+index 4234353455..c153c7ca78 100644
@@ -60 +61 @@
-@@ -2069,7 +2069,7 @@ ice_dev_init(struct rte_eth_dev *dev)
+@@ -2186,7 +2186,7 @@ ice_dev_init(struct rte_eth_dev *dev)
@@ -69 +70 @@
-@@ -2159,10 +2159,11 @@ err_msix_pool_init:
+@@ -2278,10 +2278,11 @@ err_msix_pool_init:
^ permalink raw reply [flat|nested] 208+ messages in thread
* [dpdk-stable] patch 'net/i40e: fix descriptor scan on Arm' has been queued to stable release 20.11.3
2021-07-12 13:03 [dpdk-stable] patch 'graph: fix memory leak in stats' has been queued to stable release 20.11.3 luca.boccassi
` (102 preceding siblings ...)
2021-07-12 13:05 ` [dpdk-stable] patch 'net/ice: fix memzone leak when firmware is missing' " luca.boccassi
@ 2021-07-12 13:05 ` luca.boccassi
2021-07-12 13:05 ` [dpdk-stable] patch 'net/ixgbe: fix flow entry access after freeing' " luca.boccassi
` (11 subsequent siblings)
115 siblings, 0 replies; 208+ messages in thread
From: luca.boccassi @ 2021-07-12 13:05 UTC (permalink / raw)
To: Joyce Kong; +Cc: Ruifeng Wang, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.3
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/14/21. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/fa5c96a41baa9133494f16ec0ab183fe04d7faf8
Thanks.
Luca Boccassi
---
From fa5c96a41baa9133494f16ec0ab183fe04d7faf8 Mon Sep 17 00:00:00 2001
From: Joyce Kong <joyce.kong@arm.com>
Date: Tue, 6 Jul 2021 01:54:03 -0500
Subject: [PATCH] net/i40e: fix descriptor scan on Arm
[ upstream commit 65b2ec7b4f6bca9c7436681141d2974c7960d208 ]
For Arm platforms, reading descs can get re-ordered, then the
status of DD bits will be discontinuous, so add the logic to
only process continuous descs by checking DD bits.
Fixes: 4861cde46116 ("i40e: new poll mode driver")
Signed-off-by: Joyce Kong <joyce.kong@arm.com>
Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>
---
drivers/net/i40e/i40e_rxtx.c | 16 +++++++++++++---
1 file changed, 13 insertions(+), 3 deletions(-)
diff --git a/drivers/net/i40e/i40e_rxtx.c b/drivers/net/i40e/i40e_rxtx.c
index 39a69b74d1..0e5293fc94 100644
--- a/drivers/net/i40e/i40e_rxtx.c
+++ b/drivers/net/i40e/i40e_rxtx.c
@@ -418,7 +418,7 @@ i40e_rx_scan_hw_ring(struct i40e_rx_queue *rxq)
uint16_t pkt_len;
uint64_t qword1;
uint32_t rx_status;
- int32_t s[I40E_LOOK_AHEAD], nb_dd;
+ int32_t s[I40E_LOOK_AHEAD], var, nb_dd;
int32_t i, j, nb_rx = 0;
uint64_t pkt_flags;
uint32_t *ptype_tbl = rxq->vsi->adapter->ptype_tbl;
@@ -451,8 +451,18 @@ i40e_rx_scan_hw_ring(struct i40e_rx_queue *rxq)
rte_smp_rmb();
/* Compute how many status bits were set */
- for (j = 0, nb_dd = 0; j < I40E_LOOK_AHEAD; j++)
- nb_dd += s[j] & (1 << I40E_RX_DESC_STATUS_DD_SHIFT);
+ for (j = 0, nb_dd = 0; j < I40E_LOOK_AHEAD; j++) {
+ var = s[j] & (1 << I40E_RX_DESC_STATUS_DD_SHIFT);
+#ifdef RTE_ARCH_ARM
+ /* For Arm platforms, only compute continuous status bits */
+ if (var)
+ nb_dd += 1;
+ else
+ break;
+#else
+ nb_dd += var;
+#endif
+ }
nb_rx += nb_dd;
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-07-12 13:41:42.062884351 +0100
+++ 0105-net-i40e-fix-descriptor-scan-on-Arm.patch 2021-07-12 13:41:36.906131277 +0100
@@ -1 +1 @@
-From 65b2ec7b4f6bca9c7436681141d2974c7960d208 Mon Sep 17 00:00:00 2001
+From fa5c96a41baa9133494f16ec0ab183fe04d7faf8 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 65b2ec7b4f6bca9c7436681141d2974c7960d208 ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -20 +21 @@
-index 8d65f287f4..e518409fe5 100644
+index 39a69b74d1..0e5293fc94 100644
@@ -23 +24 @@
-@@ -452,7 +452,7 @@ i40e_rx_scan_hw_ring(struct i40e_rx_queue *rxq)
+@@ -418,7 +418,7 @@ i40e_rx_scan_hw_ring(struct i40e_rx_queue *rxq)
@@ -32 +33 @@
-@@ -485,8 +485,18 @@ i40e_rx_scan_hw_ring(struct i40e_rx_queue *rxq)
+@@ -451,8 +451,18 @@ i40e_rx_scan_hw_ring(struct i40e_rx_queue *rxq)
^ permalink raw reply [flat|nested] 208+ messages in thread
* [dpdk-stable] patch 'net/ixgbe: fix flow entry access after freeing' has been queued to stable release 20.11.3
2021-07-12 13:03 [dpdk-stable] patch 'graph: fix memory leak in stats' has been queued to stable release 20.11.3 luca.boccassi
` (103 preceding siblings ...)
2021-07-12 13:05 ` [dpdk-stable] patch 'net/i40e: fix descriptor scan on Arm' " luca.boccassi
@ 2021-07-12 13:05 ` luca.boccassi
2021-07-12 13:05 ` [dpdk-stable] patch 'net/octeontx/base: fix debug build with clang' " luca.boccassi
` (10 subsequent siblings)
115 siblings, 0 replies; 208+ messages in thread
From: luca.boccassi @ 2021-07-12 13:05 UTC (permalink / raw)
To: Dapeng Yu; +Cc: Haiyue Wang, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.3
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/14/21. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/886db80ef262676f14e4ff2379917ee428d142f3
Thanks.
Luca Boccassi
---
From 886db80ef262676f14e4ff2379917ee428d142f3 Mon Sep 17 00:00:00 2001
From: Dapeng Yu <dapengx.yu@intel.com>
Date: Fri, 9 Jul 2021 11:14:59 +0800
Subject: [PATCH] net/ixgbe: fix flow entry access after freeing
[ upstream commit 75e4023dd7ad3b37ad2843635b38436d91613c86 ]
The original code use a heap pointer after it is freed.
This patch fix it.
Fixes: a14de8b498d1 ("net/ixgbe: destroy consistent filter")
Signed-off-by: Dapeng Yu <dapengx.yu@intel.com>
Reviewed-by: Haiyue Wang <haiyue.wang@intel.com>
---
drivers/net/ixgbe/ixgbe_flow.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/net/ixgbe/ixgbe_flow.c b/drivers/net/ixgbe/ixgbe_flow.c
index 9aeb2e4a49..89972bad02 100644
--- a/drivers/net/ixgbe/ixgbe_flow.c
+++ b/drivers/net/ixgbe/ixgbe_flow.c
@@ -3437,6 +3437,7 @@ ixgbe_flow_destroy(struct rte_eth_dev *dev,
TAILQ_REMOVE(&ixgbe_flow_list,
ixgbe_flow_mem_ptr, entries);
rte_free(ixgbe_flow_mem_ptr);
+ break;
}
}
rte_free(flow);
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-07-12 13:41:42.120057105 +0100
+++ 0106-net-ixgbe-fix-flow-entry-access-after-freeing.patch 2021-07-12 13:41:36.914131443 +0100
@@ -1 +1 @@
-From 75e4023dd7ad3b37ad2843635b38436d91613c86 Mon Sep 17 00:00:00 2001
+From 886db80ef262676f14e4ff2379917ee428d142f3 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 75e4023dd7ad3b37ad2843635b38436d91613c86 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -19 +20 @@
-index 0b10e91a9b..511b612f7f 100644
+index 9aeb2e4a49..89972bad02 100644
^ permalink raw reply [flat|nested] 208+ messages in thread
* [dpdk-stable] patch 'net/octeontx/base: fix debug build with clang' has been queued to stable release 20.11.3
2021-07-12 13:03 [dpdk-stable] patch 'graph: fix memory leak in stats' has been queued to stable release 20.11.3 luca.boccassi
` (104 preceding siblings ...)
2021-07-12 13:05 ` [dpdk-stable] patch 'net/ixgbe: fix flow entry access after freeing' " luca.boccassi
@ 2021-07-12 13:05 ` luca.boccassi
2021-07-12 13:05 ` [dpdk-stable] patch 'doc: fix build on Windows with Meson 0.58' " luca.boccassi
` (9 subsequent siblings)
115 siblings, 0 replies; 208+ messages in thread
From: luca.boccassi @ 2021-07-12 13:05 UTC (permalink / raw)
To: David Marchand; +Cc: dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.3
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/14/21. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/5a66492539db2de630dc4d977c89edbfbe9ca4af
Thanks.
Luca Boccassi
---
From 5a66492539db2de630dc4d977c89edbfbe9ca4af Mon Sep 17 00:00:00 2001
From: David Marchand <david.marchand@redhat.com>
Date: Fri, 9 Jul 2021 11:32:29 +0530
Subject: [PATCH] net/octeontx/base: fix debug build with clang
[ upstream commit 5898abedeb847590ce3cf800e907c5035866e09b ]
Remove conflicting declaration of this symbol.
Fixes: d0d654986018 ("net/octeontx: support event Rx adapter")
Signed-off-by: David Marchand <david.marchand@redhat.com>
---
drivers/net/octeontx/base/octeontx_pkivf.h | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/net/octeontx/base/octeontx_pkivf.h b/drivers/net/octeontx/base/octeontx_pkivf.h
index d41eaa57ed..8c86841ea6 100644
--- a/drivers/net/octeontx/base/octeontx_pkivf.h
+++ b/drivers/net/octeontx/base/octeontx_pkivf.h
@@ -362,7 +362,6 @@ int octeontx_pki_port_open(int port);
int octeontx_pki_port_hash_config(int port, pki_hash_cfg_t *hash_cfg);
int octeontx_pki_port_pktbuf_config(int port, pki_pktbuf_cfg_t *buf_cfg);
int octeontx_pki_port_create_qos(int port, pki_qos_cfg_t *qos_cfg);
-int octeontx_pki_port_close(int port);
int octeontx_pki_port_errchk_config(int port, pki_errchk_cfg_t *cfg);
int octeontx_pki_port_vlan_fltr_config(int port,
pki_port_vlan_filter_config_t *fltr_cfg);
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-07-12 13:41:42.172657957 +0100
+++ 0107-net-octeontx-base-fix-debug-build-with-clang.patch 2021-07-12 13:41:36.914131443 +0100
@@ -1 +1 @@
-From 5898abedeb847590ce3cf800e907c5035866e09b Mon Sep 17 00:00:00 2001
+From 5a66492539db2de630dc4d977c89edbfbe9ca4af Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 5898abedeb847590ce3cf800e907c5035866e09b ]
+
@@ -9 +10,0 @@
-Cc: stable@dpdk.org
^ permalink raw reply [flat|nested] 208+ messages in thread
* [dpdk-stable] patch 'doc: fix build on Windows with Meson 0.58' has been queued to stable release 20.11.3
2021-07-12 13:03 [dpdk-stable] patch 'graph: fix memory leak in stats' has been queued to stable release 20.11.3 luca.boccassi
` (105 preceding siblings ...)
2021-07-12 13:05 ` [dpdk-stable] patch 'net/octeontx/base: fix debug build with clang' " luca.boccassi
@ 2021-07-12 13:05 ` luca.boccassi
2021-07-12 13:05 ` [dpdk-stable] patch 'test/power: fix CPU frequency when turbo enabled' " luca.boccassi
` (8 subsequent siblings)
115 siblings, 0 replies; 208+ messages in thread
From: luca.boccassi @ 2021-07-12 13:05 UTC (permalink / raw)
To: Dmitry Kozlyuk
Cc: Rob Scheepens, Luca Boccassi, Bruce Richardson, Thomas Monjalon,
dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.3
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/14/21. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/6cbeec965743bc4ae9906f78ea2d58e85dba0e98
Thanks.
Luca Boccassi
---
From 6cbeec965743bc4ae9906f78ea2d58e85dba0e98 Mon Sep 17 00:00:00 2001
From: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
Date: Wed, 30 Jun 2021 19:22:35 +0300
Subject: [PATCH] doc: fix build on Windows with Meson 0.58
[ upstream commit e8c90926bddec034bfdb753044c001aa90e4d1f8 ]
The `doc` target used `echo` as its command.
On Windows, `echo` is always a shell built-in, there is no binary.
Starting from meson 0.58, `run_target()` always searches for command
executable and no longer accepts `echo` as such on Windows.
Replace plain `echo` with a Python one-liner.
Fixes: d02a2dab2dfb ("doc: support building HTML guides with meson")
Reported-by: Rob Scheepens <rob.scheepens@nutanix.com>
Signed-off-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
Acked-by: Luca Boccassi <bluca@debian.org>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
---
buildtools/meson.build | 2 +-
doc/meson.build | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/buildtools/meson.build b/buildtools/meson.build
index 36161afe48..cfad51f52a 100644
--- a/buildtools/meson.build
+++ b/buildtools/meson.build
@@ -7,13 +7,13 @@ check_symbols = find_program('check-symbols.sh')
ldflags_ibverbs_static = find_program('options-ibverbs-static.sh')
binutils_avx512_check = find_program('binutils-avx512-check.sh')
-# set up map-to-win script using python, either built-in or external
python3 = import('python').find_installation(required: false)
if python3.found()
py3 = [python3]
else
py3 = ['meson', 'runpython']
endif
+echo = py3 + ['-c', 'import sys; print(*sys.argv[1:])']
list_dir_globs = py3 + files('list-dir-globs.py')
map_to_win_cmd = py3 + files('map_to_win.py')
sphinx_wrapper = py3 + files('call-sphinx-build.py')
diff --git a/doc/meson.build b/doc/meson.build
index c5410d85d6..d6cf85a900 100644
--- a/doc/meson.build
+++ b/doc/meson.build
@@ -11,5 +11,5 @@ if doc_targets.length() == 0
else
message = 'Building docs:'
endif
-run_target('doc', command: ['echo', message, doc_target_names],
+run_target('doc', command: [echo, message, doc_target_names],
depends: doc_targets)
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-07-12 13:41:42.219484515 +0100
+++ 0108-doc-fix-build-on-Windows-with-Meson-0.58.patch 2021-07-12 13:41:36.914131443 +0100
@@ -1 +1 @@
-From e8c90926bddec034bfdb753044c001aa90e4d1f8 Mon Sep 17 00:00:00 2001
+From 6cbeec965743bc4ae9906f78ea2d58e85dba0e98 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit e8c90926bddec034bfdb753044c001aa90e4d1f8 ]
+
@@ -13 +14,0 @@
-Cc: stable@dpdk.org
@@ -26 +27 @@
-index 0f24b15297..bd460e3e00 100644
+index 36161afe48..cfad51f52a 100644
@@ -29 +30 @@
-@@ -6,13 +6,13 @@ check_symbols = find_program('check-symbols.sh')
+@@ -7,13 +7,13 @@ check_symbols = find_program('check-symbols.sh')
@@ -36 +37 @@
- py3 = [python3]
+ py3 = [python3]
@@ -38 +39 @@
- py3 = ['meson', 'runpython']
+ py3 = ['meson', 'runpython']
@@ -45 +46 @@
-index 959606b965..6f74706aa2 100644
+index c5410d85d6..d6cf85a900 100644
@@ -50 +51 @@
- message = 'Building docs:'
+ message = 'Building docs:'
@@ -54 +55 @@
- depends: doc_targets)
+ depends: doc_targets)
^ permalink raw reply [flat|nested] 208+ messages in thread
* [dpdk-stable] patch 'test/power: fix CPU frequency when turbo enabled' has been queued to stable release 20.11.3
2021-07-12 13:03 [dpdk-stable] patch 'graph: fix memory leak in stats' has been queued to stable release 20.11.3 luca.boccassi
` (106 preceding siblings ...)
2021-07-12 13:05 ` [dpdk-stable] patch 'doc: fix build on Windows with Meson 0.58' " luca.boccassi
@ 2021-07-12 13:05 ` luca.boccassi
2021-07-12 13:05 ` [dpdk-stable] patch 'Revert "test/power: fix CPU frequency when turbo enabled"' " luca.boccassi
` (7 subsequent siblings)
115 siblings, 0 replies; 208+ messages in thread
From: luca.boccassi @ 2021-07-12 13:05 UTC (permalink / raw)
To: Richael Zhuang; +Cc: David Hunt, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.3
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/14/21. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/b9599ebada5a044d4e143ce641cd32a49c4db19b
Thanks.
Luca Boccassi
---
From b9599ebada5a044d4e143ce641cd32a49c4db19b Mon Sep 17 00:00:00 2001
From: Richael Zhuang <richael.zhuang@arm.com>
Date: Fri, 9 Jul 2021 18:55:48 +0800
Subject: [PATCH] test/power: fix CPU frequency when turbo enabled
[ upstream commit 29343b9030e38e8c3519ba01cb66724d45b13dc8 ]
On arm platform, the value in "/sys/.../cpuinfo_cur_freq" may not
be exactly the same as what was set when using CPPC cpufreq driver.
For other cpufreq driver, no need to round it currently, or else
this check will fail with turbo enabled. For example, with acpi_cpufreq,
cpuinfo_cur_freq can be 2401000 which is equal to freqs[0].It should
not be rounded to 2400000.
Fixes: 606a234c6d360 ("test/power: round CPU frequency to check")
Signed-off-by: Richael Zhuang <richael.zhuang@arm.com>
Acked-by: David Hunt <david.hunt@intel.com>
---
app/test/test_power_cpufreq.c | 21 +++++++++++++--------
1 file changed, 13 insertions(+), 8 deletions(-)
diff --git a/app/test/test_power_cpufreq.c b/app/test/test_power_cpufreq.c
index 0c3adc5f33..ac71babcce 100644
--- a/app/test/test_power_cpufreq.c
+++ b/app/test/test_power_cpufreq.c
@@ -55,7 +55,9 @@ check_cur_freq(unsigned int lcore_id, uint32_t idx, bool turbo)
FILE *f;
char fullpath[PATH_MAX];
char buf[BUFSIZ];
+ enum power_management_env env;
uint32_t cur_freq;
+ uint32_t freq_conv;
int ret = -1;
int i;
@@ -80,15 +82,18 @@ check_cur_freq(unsigned int lcore_id, uint32_t idx, bool turbo)
goto fail_all;
cur_freq = strtoul(buf, NULL, TEST_POWER_CONVERT_TO_DECIMAL);
+ freq_conv = cur_freq;
- /* convert the frequency to nearest 100000 value
- * Ex: if cur_freq=1396789 then freq_conv=1400000
- * Ex: if cur_freq=800030 then freq_conv=800000
- */
- unsigned int freq_conv = 0;
- freq_conv = (cur_freq + TEST_FREQ_ROUNDING_DELTA)
- / TEST_ROUND_FREQ_TO_N_100000;
- freq_conv = freq_conv * TEST_ROUND_FREQ_TO_N_100000;
+ env = rte_power_get_env();
+ if (env == PM_ENV_CPPC_CPUFREQ) {
+ /* convert the frequency to nearest 100000 value
+ * Ex: if cur_freq=1396789 then freq_conv=1400000
+ * Ex: if cur_freq=800030 then freq_conv=800000
+ */
+ freq_conv = (cur_freq + TEST_FREQ_ROUNDING_DELTA)
+ / TEST_ROUND_FREQ_TO_N_100000;
+ freq_conv = freq_conv * TEST_ROUND_FREQ_TO_N_100000;
+ }
if (turbo)
ret = (freqs[idx] <= freq_conv ? 0 : -1);
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-07-12 13:41:42.266755442 +0100
+++ 0109-test-power-fix-CPU-frequency-when-turbo-enabled.patch 2021-07-12 13:41:36.918131526 +0100
@@ -1 +1 @@
-From 29343b9030e38e8c3519ba01cb66724d45b13dc8 Mon Sep 17 00:00:00 2001
+From b9599ebada5a044d4e143ce641cd32a49c4db19b Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 29343b9030e38e8c3519ba01cb66724d45b13dc8 ]
+
@@ -14 +15,0 @@
-Cc: stable@dpdk.org
@@ -23 +24 @@
-index 8516df4ca6..b8fc53925c 100644
+index 0c3adc5f33..ac71babcce 100644
^ permalink raw reply [flat|nested] 208+ messages in thread
* [dpdk-stable] patch 'Revert "test/power: fix CPU frequency when turbo enabled"' has been queued to stable release 20.11.3
2021-07-12 13:03 [dpdk-stable] patch 'graph: fix memory leak in stats' has been queued to stable release 20.11.3 luca.boccassi
` (107 preceding siblings ...)
2021-07-12 13:05 ` [dpdk-stable] patch 'test/power: fix CPU frequency when turbo enabled' " luca.boccassi
@ 2021-07-12 13:05 ` luca.boccassi
2021-07-12 13:05 ` [dpdk-stable] patch 'build: support drivers symlink on Windows' " luca.boccassi
` (6 subsequent siblings)
115 siblings, 0 replies; 208+ messages in thread
From: luca.boccassi @ 2021-07-12 13:05 UTC (permalink / raw)
To: Luca Boccassi; +Cc: dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.3
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/14/21. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/234cd7c51de33f16d3ab6eeb4b3b3906155ae12d
Thanks.
Luca Boccassi
---
From 234cd7c51de33f16d3ab6eeb4b3b3906155ae12d Mon Sep 17 00:00:00 2001
From: Luca Boccassi <luca.boccassi@microsoft.com>
Date: Mon, 12 Jul 2021 12:53:43 +0100
Subject: [PATCH] Revert "test/power: fix CPU frequency when turbo enabled"
This reverts commit b9599ebada5a044d4e143ce641cd32a49c4db19b.
---
app/test/test_power_cpufreq.c | 21 ++++++++-------------
1 file changed, 8 insertions(+), 13 deletions(-)
diff --git a/app/test/test_power_cpufreq.c b/app/test/test_power_cpufreq.c
index ac71babcce..0c3adc5f33 100644
--- a/app/test/test_power_cpufreq.c
+++ b/app/test/test_power_cpufreq.c
@@ -55,9 +55,7 @@ check_cur_freq(unsigned int lcore_id, uint32_t idx, bool turbo)
FILE *f;
char fullpath[PATH_MAX];
char buf[BUFSIZ];
- enum power_management_env env;
uint32_t cur_freq;
- uint32_t freq_conv;
int ret = -1;
int i;
@@ -82,18 +80,15 @@ check_cur_freq(unsigned int lcore_id, uint32_t idx, bool turbo)
goto fail_all;
cur_freq = strtoul(buf, NULL, TEST_POWER_CONVERT_TO_DECIMAL);
- freq_conv = cur_freq;
- env = rte_power_get_env();
- if (env == PM_ENV_CPPC_CPUFREQ) {
- /* convert the frequency to nearest 100000 value
- * Ex: if cur_freq=1396789 then freq_conv=1400000
- * Ex: if cur_freq=800030 then freq_conv=800000
- */
- freq_conv = (cur_freq + TEST_FREQ_ROUNDING_DELTA)
- / TEST_ROUND_FREQ_TO_N_100000;
- freq_conv = freq_conv * TEST_ROUND_FREQ_TO_N_100000;
- }
+ /* convert the frequency to nearest 100000 value
+ * Ex: if cur_freq=1396789 then freq_conv=1400000
+ * Ex: if cur_freq=800030 then freq_conv=800000
+ */
+ unsigned int freq_conv = 0;
+ freq_conv = (cur_freq + TEST_FREQ_ROUNDING_DELTA)
+ / TEST_ROUND_FREQ_TO_N_100000;
+ freq_conv = freq_conv * TEST_ROUND_FREQ_TO_N_100000;
if (turbo)
ret = (freqs[idx] <= freq_conv ? 0 : -1);
--
2.30.2
^ permalink raw reply [flat|nested] 208+ messages in thread
* [dpdk-stable] patch 'build: support drivers symlink on Windows' has been queued to stable release 20.11.3
2021-07-12 13:03 [dpdk-stable] patch 'graph: fix memory leak in stats' has been queued to stable release 20.11.3 luca.boccassi
` (108 preceding siblings ...)
2021-07-12 13:05 ` [dpdk-stable] patch 'Revert "test/power: fix CPU frequency when turbo enabled"' " luca.boccassi
@ 2021-07-12 13:05 ` luca.boccassi
2021-07-12 13:05 ` [dpdk-stable] patch 'net/sfc: fix aarch32 build' " luca.boccassi
` (5 subsequent siblings)
115 siblings, 0 replies; 208+ messages in thread
From: luca.boccassi @ 2021-07-12 13:05 UTC (permalink / raw)
To: Nick Connolly; +Cc: Narcisa Vasile, Bruce Richardson, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.3
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/14/21. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/c5b7b05e91596475171c745b58e850c026b1d074
Thanks.
Luca Boccassi
---
From c5b7b05e91596475171c745b58e850c026b1d074 Mon Sep 17 00:00:00 2001
From: Nick Connolly <nick.connolly@mayadata.io>
Date: Mon, 26 Apr 2021 11:07:32 +0100
Subject: [PATCH] build: support drivers symlink on Windows
[ upstream commit cd27047dbee1eda0e8ed12300bc035636d89607b ]
The symlink-drivers-solibs.sh script was disabled as part of 'install'
for Windows because there is no support for shell scripts. However,
this means that driver related DLLs are not present in the installed
'libdir' directory. Add a python script to perform the install and use
it for Windows if the version of meson supports using an external
program with add_install_script (>= 0.55.0).
On Windows, symbolic links are somewhat problematic since the
SeCreateSymbolicLinkPrivilege is required to be able to create them.
In addition, different cross-compilation environments handle symbolic
links differently, e.g. WSL, Msys2, Cygwin. Rather than trying to
distinguish these scenarios, the python script will perform a file copy
for any Windows specific names.
On Windows, the shared library outputs have different names depending
upon which toolset has been used to build them. The script currently
handles Clang and GCC.
On Linux the functionality is unchanged, but could be replaced with the
python script once the required minimum version of meson is >= 0.55.0.
Signed-off-by: Nick Connolly <nick.connolly@mayadata.io>
Tested-by: Narcisa Vasile <navasile@linux.microsoft.com>
Acked-by: Narcisa Vasile <navasile@linux.microsoft.com>
Reviewed-by: Bruce Richardson <bruce.richardson@intel.com>
---
MAINTAINERS | 1 +
buildtools/symlink-drivers-solibs.py | 49 ++++++++++++++++++++++++++++
config/meson.build | 4 +++
3 files changed, 54 insertions(+)
create mode 100644 buildtools/symlink-drivers-solibs.py
diff --git a/MAINTAINERS b/MAINTAINERS
index f45c8c1b13..dcde2ab5e1 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -103,6 +103,7 @@ F: buildtools/gen-pmdinfo-cfile.sh
F: buildtools/list-dir-globs.py
F: buildtools/pkg-config/
F: buildtools/symlink-drivers-solibs.sh
+F: buildtools/symlink-drivers-solibs.py
F: devtools/test-meson-builds.sh
Public CI
diff --git a/buildtools/symlink-drivers-solibs.py b/buildtools/symlink-drivers-solibs.py
new file mode 100644
index 0000000000..9c999508a9
--- /dev/null
+++ b/buildtools/symlink-drivers-solibs.py
@@ -0,0 +1,49 @@
+#!/usr/bin/env python3
+# SPDX-License-Identifier: BSD-3-Clause
+# Copyright(c) 2021 Intel Corporation
+
+import os
+import sys
+import glob
+import shutil
+
+# post-install script for meson/ninja builds to symlink the PMDs stored in
+# $libdir/dpdk/pmds-*/ to $libdir. This is needed as some PMDs depend on
+# others, e.g. PCI device PMDs depending on the PCI bus driver.
+
+# parameters to script are paths relative to install prefix:
+# 1. directory for installed regular libs e.g. lib64
+# 2. subdirectory of libdir where the PMDs are
+# 3. directory for installed regular binaries e.g. bin
+
+os.chdir(os.environ['MESON_INSTALL_DESTDIR_PREFIX'])
+
+lib_dir = sys.argv[1]
+pmd_subdir = sys.argv[2]
+bin_dir = sys.argv[3]
+pmd_dir = os.path.join(lib_dir, pmd_subdir)
+
+# copy Windows PMDs to avoid any issues with symlinks since the
+# build could be a cross-compilation under WSL, Msys or Cygnus.
+# the filenames are dependent upon the specific toolchain in use.
+
+def copy_pmd_files(pattern, to_dir):
+ for file in glob.glob(os.path.join(pmd_dir, pattern)):
+ to = os.path.join(to_dir, os.path.basename(file))
+ shutil.copy2(file, to)
+ print(to + ' -> ' + file)
+
+copy_pmd_files('*rte_*.dll', bin_dir)
+copy_pmd_files('*rte_*.pdb', bin_dir)
+copy_pmd_files('*rte_*.lib', lib_dir)
+copy_pmd_files('*rte_*.dll.a', lib_dir)
+
+# symlink shared objects
+
+os.chdir(lib_dir)
+for file in glob.glob(os.path.join(pmd_subdir, 'librte_*.so*')):
+ to = os.path.basename(file)
+ if os.path.exists(to):
+ os.remove(to)
+ os.symlink(file, to)
+ print(to + ' -> ' + file)
diff --git a/config/meson.build b/config/meson.build
index 5b7439aefb..b2734fc0cf 100644
--- a/config/meson.build
+++ b/config/meson.build
@@ -61,6 +61,10 @@ if not is_windows
meson.add_install_script('../buildtools/symlink-drivers-solibs.sh',
get_option('libdir'),
pmd_subdir_opt)
+elif meson.version().version_compare('>=0.55.0')
+ # 0.55.0 is required to use external program with add_install_script
+ meson.add_install_script(py3, '../buildtools/symlink-drivers-solibs.py',
+ get_option('libdir'), pmd_subdir_opt, get_option('bindir'))
endif
# set the machine type and cflags for it
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-07-12 13:41:42.366018406 +0100
+++ 0111-build-support-drivers-symlink-on-Windows.patch 2021-07-12 13:41:36.922131610 +0100
@@ -1 +1 @@
-From cd27047dbee1eda0e8ed12300bc035636d89607b Mon Sep 17 00:00:00 2001
+From c5b7b05e91596475171c745b58e850c026b1d074 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit cd27047dbee1eda0e8ed12300bc035636d89607b ]
+
@@ -27,2 +28,0 @@
-Cc: stable@dpdk.org
-
@@ -41 +41 @@
-index d5a6cee20b..a7eadba130 100644
+index f45c8c1b13..dcde2ab5e1 100644
@@ -44 +44 @@
-@@ -105,6 +105,7 @@ F: buildtools/call-sphinx-build.py
+@@ -103,6 +103,7 @@ F: buildtools/gen-pmdinfo-cfile.sh
@@ -50 +49,0 @@
- F: devtools/check-meson.py
@@ -51,0 +51 @@
+ Public CI
@@ -108 +108 @@
-index 9f56fab1fe..e80421003b 100644
+index 5b7439aefb..b2734fc0cf 100644
@@ -111,4 +111,4 @@
-@@ -59,6 +59,10 @@ eal_pmd_path = join_paths(get_option('prefix'), driver_install_path)
- if not is_windows
- meson.add_install_script('../buildtools/symlink-drivers-solibs.sh',
- get_option('libdir'), pmd_subdir_opt)
+@@ -61,6 +61,10 @@ if not is_windows
+ meson.add_install_script('../buildtools/symlink-drivers-solibs.sh',
+ get_option('libdir'),
+ pmd_subdir_opt)
@@ -116,3 +116,3 @@
-+ # 0.55.0 is required to use external program with add_install_script
-+ meson.add_install_script(py3, '../buildtools/symlink-drivers-solibs.py',
-+ get_option('libdir'), pmd_subdir_opt, get_option('bindir'))
++ # 0.55.0 is required to use external program with add_install_script
++ meson.add_install_script(py3, '../buildtools/symlink-drivers-solibs.py',
++ get_option('libdir'), pmd_subdir_opt, get_option('bindir'))
@@ -121 +121 @@
- # init disable/enable driver lists that will be populated in different places
+ # set the machine type and cflags for it
^ permalink raw reply [flat|nested] 208+ messages in thread
* [dpdk-stable] patch 'net/sfc: fix aarch32 build' has been queued to stable release 20.11.3
2021-07-12 13:03 [dpdk-stable] patch 'graph: fix memory leak in stats' has been queued to stable release 20.11.3 luca.boccassi
` (109 preceding siblings ...)
2021-07-12 13:05 ` [dpdk-stable] patch 'build: support drivers symlink on Windows' " luca.boccassi
@ 2021-07-12 13:05 ` luca.boccassi
2021-07-12 13:05 ` [dpdk-stable] patch 'net/bnxt: " luca.boccassi
` (4 subsequent siblings)
115 siblings, 0 replies; 208+ messages in thread
From: luca.boccassi @ 2021-07-12 13:05 UTC (permalink / raw)
To: Ruifeng Wang; +Cc: dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.3
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/14/21. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/4fccdefbd82bbf9bf5f8952190347d7ba6ec97b0
Thanks.
Luca Boccassi
---
From 4fccdefbd82bbf9bf5f8952190347d7ba6ec97b0 Mon Sep 17 00:00:00 2001
From: Ruifeng Wang <ruifeng.wang@arm.com>
Date: Wed, 7 Jul 2021 15:25:37 +0200
Subject: [PATCH] net/sfc: fix aarch32 build
[ upstream commit a5f1b1e5153a4b061c538f74f1cebc01c91cff1a ]
The sfc PMD was enabled for aarch32 which is 32-bit mode but has
cpu_family set to aarch64.
As sfc support only 64-bit system, it should be disabled for aarch32.
Updated meson file to disable sfc for aarch32 build.
Fixes: 141d2870675a ("net/sfc: support aarch64 architecture")
Signed-off-by: Ruifeng Wang <ruifeng.wang@arm.com>
---
drivers/common/sfc_efx/meson.build | 2 +-
drivers/net/sfc/meson.build | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/common/sfc_efx/meson.build b/drivers/common/sfc_efx/meson.build
index 6cb9f0737f..1e17f1fd29 100644
--- a/drivers/common/sfc_efx/meson.build
+++ b/drivers/common/sfc_efx/meson.build
@@ -5,7 +5,7 @@
# This software was jointly developed between OKTET Labs (under contract
# for Solarflare) and Solarflare Communications, Inc.
-if (arch_subdir != 'x86' or not dpdk_conf.get('RTE_ARCH_64')) and (arch_subdir != 'arm' or not host_machine.cpu_family().startswith('aarch64'))
+if (arch_subdir != 'x86' and arch_subdir != 'arm') or (not dpdk_conf.get('RTE_ARCH_64'))
build = false
reason = 'only supported on x86_64 and aarch64'
endif
diff --git a/drivers/net/sfc/meson.build b/drivers/net/sfc/meson.build
index be888bd87a..61535f8673 100644
--- a/drivers/net/sfc/meson.build
+++ b/drivers/net/sfc/meson.build
@@ -6,7 +6,7 @@
# This software was jointly developed between OKTET Labs (under contract
# for Solarflare) and Solarflare Communications, Inc.
-if (arch_subdir != 'x86' or not dpdk_conf.get('RTE_ARCH_64')) and (arch_subdir != 'arm' or not host_machine.cpu_family().startswith('aarch64'))
+if (arch_subdir != 'x86' and arch_subdir != 'arm') or (not dpdk_conf.get('RTE_ARCH_64'))
build = false
reason = 'only supported on x86_64 and aarch64'
endif
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-07-12 13:41:42.412539514 +0100
+++ 0112-net-sfc-fix-aarch32-build.patch 2021-07-12 13:41:36.926131693 +0100
@@ -1 +1 @@
-From a5f1b1e5153a4b061c538f74f1cebc01c91cff1a Mon Sep 17 00:00:00 2001
+From 4fccdefbd82bbf9bf5f8952190347d7ba6ec97b0 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit a5f1b1e5153a4b061c538f74f1cebc01c91cff1a ]
+
@@ -13 +14,0 @@
-Cc: stable@dpdk.org
@@ -22 +23 @@
-index f42ccf609c..0cf0a23bf8 100644
+index 6cb9f0737f..1e17f1fd29 100644
@@ -25,3 +26,3 @@
-@@ -10,7 +10,7 @@ if is_windows
- reason = 'not supported on Windows'
- endif
+@@ -5,7 +5,7 @@
+ # This software was jointly developed between OKTET Labs (under contract
+ # for Solarflare) and Solarflare Communications, Inc.
@@ -31,2 +32,2 @@
- build = false
- reason = 'only supported on x86_64 and aarch64'
+ build = false
+ reason = 'only supported on x86_64 and aarch64'
@@ -35 +36 @@
-index ccf5984d87..18e7edb568 100644
+index be888bd87a..61535f8673 100644
@@ -38,3 +39,3 @@
-@@ -12,7 +12,7 @@ if is_windows
- subdir_done()
- endif
+@@ -6,7 +6,7 @@
+ # This software was jointly developed between OKTET Labs (under contract
+ # for Solarflare) and Solarflare Communications, Inc.
@@ -44,2 +45,2 @@
- build = false
- reason = 'only supported on x86_64 and aarch64'
+ build = false
+ reason = 'only supported on x86_64 and aarch64'
^ permalink raw reply [flat|nested] 208+ messages in thread
* [dpdk-stable] patch 'net/bnxt: fix aarch32 build' has been queued to stable release 20.11.3
2021-07-12 13:03 [dpdk-stable] patch 'graph: fix memory leak in stats' has been queued to stable release 20.11.3 luca.boccassi
` (110 preceding siblings ...)
2021-07-12 13:05 ` [dpdk-stable] patch 'net/sfc: fix aarch32 build' " luca.boccassi
@ 2021-07-12 13:05 ` luca.boccassi
2021-07-12 13:05 ` [dpdk-stable] patch 'net/virtio: " luca.boccassi
` (3 subsequent siblings)
115 siblings, 0 replies; 208+ messages in thread
From: luca.boccassi @ 2021-07-12 13:05 UTC (permalink / raw)
To: Ruifeng Wang; +Cc: Lance Richardson, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.3
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/14/21. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/0c550171b000ca79830eb3309705cc125fefc266
Thanks.
Luca Boccassi
---
From 0c550171b000ca79830eb3309705cc125fefc266 Mon Sep 17 00:00:00 2001
From: Ruifeng Wang <ruifeng.wang@arm.com>
Date: Wed, 7 Jul 2021 15:25:38 +0200
Subject: [PATCH] net/bnxt: fix aarch32 build
[ upstream commit 746d6f83888cfd1bd3c2a1fc849372424b9aa815 ]
NEON vector path of the PMD needs aarch64 support. But it was
enabled for aarch32 build as well because aarch32 build had
cpu_family set to aarch64. So build for aarch32 will fail due
to unsupported intrinsics.
Fix aarch32 build by updating meson file to exclude NEON vector
implementation for aarch32.
Fixes: 398358341419 ("net/bnxt: support NEON")
Signed-off-by: Ruifeng Wang <ruifeng.wang@arm.com>
Reviewed-by: Lance Richardson <lance.richardson@broadcom.com>
---
drivers/net/bnxt/meson.build | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/bnxt/meson.build b/drivers/net/bnxt/meson.build
index 2896337b5d..a2fd494dac 100644
--- a/drivers/net/bnxt/meson.build
+++ b/drivers/net/bnxt/meson.build
@@ -74,6 +74,6 @@ sources = files('bnxt_cpr.c',
if arch_subdir == 'x86'
sources += files('bnxt_rxtx_vec_sse.c')
-elif arch_subdir == 'arm' and host_machine.cpu_family().startswith('aarch64')
+elif arch_subdir == 'arm' and dpdk_conf.get('RTE_ARCH_64')
sources += files('bnxt_rxtx_vec_neon.c')
endif
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-07-12 13:41:42.459857183 +0100
+++ 0113-net-bnxt-fix-aarch32-build.patch 2021-07-12 13:41:36.926131693 +0100
@@ -1 +1 @@
-From 746d6f83888cfd1bd3c2a1fc849372424b9aa815 Mon Sep 17 00:00:00 2001
+From 0c550171b000ca79830eb3309705cc125fefc266 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 746d6f83888cfd1bd3c2a1fc849372424b9aa815 ]
+
@@ -15 +16,0 @@
-Cc: stable@dpdk.org
@@ -24 +25 @@
-index 12ecd37d54..81cbe0381f 100644
+index 2896337b5d..a2fd494dac 100644
@@ -27,4 +28,4 @@
-@@ -66,6 +66,6 @@ if arch_subdir == 'x86'
- c_args: [cflags, '-mavx2'])
- objs += bnxt_avx2_lib.extract_objects('bnxt_rxtx_vec_avx2.c')
- endif
+@@ -74,6 +74,6 @@ sources = files('bnxt_cpr.c',
+
+ if arch_subdir == 'x86'
+ sources += files('bnxt_rxtx_vec_sse.c')
@@ -33 +34 @@
- sources += files('bnxt_rxtx_vec_neon.c')
+ sources += files('bnxt_rxtx_vec_neon.c')
^ permalink raw reply [flat|nested] 208+ messages in thread
* [dpdk-stable] patch 'net/virtio: fix aarch32 build' has been queued to stable release 20.11.3
2021-07-12 13:03 [dpdk-stable] patch 'graph: fix memory leak in stats' has been queued to stable release 20.11.3 luca.boccassi
` (111 preceding siblings ...)
2021-07-12 13:05 ` [dpdk-stable] patch 'net/bnxt: " luca.boccassi
@ 2021-07-12 13:05 ` luca.boccassi
2021-07-12 13:05 ` [dpdk-stable] patch 'net/hns3: fix Arm SVE build with GCC 8.3' " luca.boccassi
` (2 subsequent siblings)
115 siblings, 0 replies; 208+ messages in thread
From: luca.boccassi @ 2021-07-12 13:05 UTC (permalink / raw)
To: Juraj Linkeš; +Cc: Maxime Coquelin, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.3
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/14/21. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/09108e8931c95d990da9bb4055d21c1541a82951
Thanks.
Luca Boccassi
---
From 09108e8931c95d990da9bb4055d21c1541a82951 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Juraj=20Linke=C5=A1?= <juraj.linkes@pantheon.tech>
Date: Wed, 7 Jul 2021 15:25:39 +0200
Subject: [PATCH] net/virtio: fix aarch32 build
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
[ upstream commit 143b6270b05cf6693f47f692bf890f7f16f9bfd1 ]
NEON vector path of the PMD needs aarch64 support. But it was
enabled for aarch32 build as well because aarch32 build had
cpu_family set to aarch64. So build for aarch32 will fail due
to unsupported intrinsics.
Fix aarch32 build by updating meson file to exclude NEON vector
implementation for aarch32.
Fixes: 749799482a72 ("net/virtio: add to meson build")
Signed-off-by: Juraj Linkeš <juraj.linkes@pantheon.tech>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
---
drivers/net/virtio/meson.build | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/virtio/meson.build b/drivers/net/virtio/meson.build
index eaed46373d..59073fa336 100644
--- a/drivers/net/virtio/meson.build
+++ b/drivers/net/virtio/meson.build
@@ -31,7 +31,7 @@ if arch_subdir == 'x86'
sources += files('virtio_rxtx_simple_sse.c')
elif arch_subdir == 'ppc'
sources += files('virtio_rxtx_simple_altivec.c')
-elif arch_subdir == 'arm' and host_machine.cpu_family().startswith('aarch64')
+elif arch_subdir == 'arm' and dpdk_conf.get('RTE_ARCH_64')
sources += files('virtio_rxtx_simple_neon.c')
endif
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-07-12 13:41:42.504941261 +0100
+++ 0114-net-virtio-fix-aarch32-build.patch 2021-07-12 13:41:36.926131693 +0100
@@ -1 +1 @@
-From 143b6270b05cf6693f47f692bf890f7f16f9bfd1 Mon Sep 17 00:00:00 2001
+From 09108e8931c95d990da9bb4055d21c1541a82951 Mon Sep 17 00:00:00 2001
@@ -8,0 +9,2 @@
+[ upstream commit 143b6270b05cf6693f47f692bf890f7f16f9bfd1 ]
+
@@ -18 +19,0 @@
-Cc: stable@dpdk.org
@@ -27 +28 @@
-index 81b0a61baf..01a333ada2 100644
+index eaed46373d..59073fa336 100644
@@ -30,2 +31,2 @@
-@@ -41,7 +41,7 @@ if arch_subdir == 'x86'
- sources += files('virtio_rxtx_simple_sse.c')
+@@ -31,7 +31,7 @@ if arch_subdir == 'x86'
+ sources += files('virtio_rxtx_simple_sse.c')
@@ -33 +34 @@
- sources += files('virtio_rxtx_simple_altivec.c')
+ sources += files('virtio_rxtx_simple_altivec.c')
@@ -36,2 +37 @@
- sources += files('virtio_rxtx_packed.c')
- sources += files('virtio_rxtx_simple_neon.c')
+ sources += files('virtio_rxtx_simple_neon.c')
@@ -38,0 +39 @@
+
^ permalink raw reply [flat|nested] 208+ messages in thread
* [dpdk-stable] patch 'net/hns3: fix Arm SVE build with GCC 8.3' has been queued to stable release 20.11.3
2021-07-12 13:03 [dpdk-stable] patch 'graph: fix memory leak in stats' has been queued to stable release 20.11.3 luca.boccassi
` (112 preceding siblings ...)
2021-07-12 13:05 ` [dpdk-stable] patch 'net/virtio: " luca.boccassi
@ 2021-07-12 13:05 ` luca.boccassi
2021-07-12 13:05 ` [dpdk-stable] patch 'table: fix bucket empty check' " luca.boccassi
2021-07-26 13:52 ` [dpdk-stable] patch 'net/bonding: fix error message on flow verify' " luca.boccassi
115 siblings, 0 replies; 208+ messages in thread
From: luca.boccassi @ 2021-07-12 13:05 UTC (permalink / raw)
To: Chengwen Feng; +Cc: Ruifeng Wang, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.3
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/14/21. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/4b81426f9edf612ee933c2d7ecb48994404d0311
Thanks.
Luca Boccassi
---
From 4b81426f9edf612ee933c2d7ecb48994404d0311 Mon Sep 17 00:00:00 2001
From: Chengwen Feng <fengchengwen@huawei.com>
Date: Mon, 28 Jun 2021 10:57:51 +0800
Subject: [PATCH] net/hns3: fix Arm SVE build with GCC 8.3
[ upstream commit 699fa1d40eeabe086d4491a0b4edd7a0a19e6aa7 ]
If the target machine has SVE feature (e.g. '-march=armv8.2-a+sve'),
and compiler is gcc-8.3, it will fail, the error is arm_sve.h:
no such file or directory.
The solution:
a. If RTE_HAS_SVE_ACLE defined (it means the minimum instruction set
support SVE ACLE) then compiles it.
b. Else if the compiler support SVE ACLE then compiles it.
c. Otherwise don't compile it.
Fixes: 8c25b02b082a ("net/hns3: fix enabling SVE Rx/Tx")
Fixes: 952ebacce4f2 ("net/hns3: support SVE Rx")
Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
Acked-by: Ruifeng Wang <ruifeng.wang@arm.com>
---
drivers/net/hns3/hns3_rxtx.c | 2 +-
drivers/net/hns3/meson.build | 20 +++++++++++++++++++-
2 files changed, 20 insertions(+), 2 deletions(-)
diff --git a/drivers/net/hns3/hns3_rxtx.c b/drivers/net/hns3/hns3_rxtx.c
index c77c828011..2a92b1cf49 100644
--- a/drivers/net/hns3/hns3_rxtx.c
+++ b/drivers/net/hns3/hns3_rxtx.c
@@ -2561,7 +2561,7 @@ hns3_get_default_vec_support(void)
static bool
hns3_check_sve_support(void)
{
-#if defined(RTE_ARCH_ARM64) && defined(__ARM_FEATURE_SVE)
+#if defined(RTE_HAS_SVE_ACLE)
if (rte_cpu_get_flag_enabled(RTE_CPUFLAG_SVE))
return true;
#endif
diff --git a/drivers/net/hns3/meson.build b/drivers/net/hns3/meson.build
index 09034871e7..208527ea29 100644
--- a/drivers/net/hns3/meson.build
+++ b/drivers/net/hns3/meson.build
@@ -31,7 +31,25 @@ deps += ['hash']
if arch_subdir == 'arm' and dpdk_conf.get('RTE_ARCH_64')
sources += files('hns3_rxtx_vec.c')
- if cc.get_define('__ARM_FEATURE_SVE', args: machine_args) != ''
+
+ # compile SVE when:
+ # a. support SVE in minimum instruction set baseline
+ # b. it's not minimum instruction set, but compiler support
+ if dpdk_conf.has('RTE_HAS_SVE_ACLE')
sources += files('hns3_rxtx_vec_sve.c')
+ elif cc.has_argument('-march=armv8.2-a+sve') and cc.check_header('arm_sve.h')
+ cflags += ['-DRTE_HAS_SVE_ACLE=1']
+ sve_cflags = []
+ foreach flag: cflags
+ if not (flag.startswith('-march=') or flag.startswith('-mcpu=') or flag.startswith('-mtune='))
+ sve_cflags += flag
+ endif
+ endforeach
+ hns3_sve_lib = static_library('hns3_sve_lib',
+ 'hns3_rxtx_vec_sve.c',
+ dependencies: [static_rte_ethdev],
+ include_directories: includes,
+ c_args: [sve_cflags, '-march=armv8.2-a+sve'])
+ objs += hns3_sve_lib.extract_objects('hns3_rxtx_vec_sve.c')
endif
endif
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-07-12 13:41:42.552345273 +0100
+++ 0115-net-hns3-fix-Arm-SVE-build-with-GCC-8.3.patch 2021-07-12 13:41:36.934131859 +0100
@@ -1 +1 @@
-From 699fa1d40eeabe086d4491a0b4edd7a0a19e6aa7 Mon Sep 17 00:00:00 2001
+From 4b81426f9edf612ee933c2d7ecb48994404d0311 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 699fa1d40eeabe086d4491a0b4edd7a0a19e6aa7 ]
+
@@ -18 +19,0 @@
-Cc: stable@dpdk.org
@@ -28 +29 @@
-index cb9eccf9fa..a86e105fbc 100644
+index c77c828011..2a92b1cf49 100644
@@ -31 +32 @@
-@@ -2811,7 +2811,7 @@ hns3_get_default_vec_support(void)
+@@ -2561,7 +2561,7 @@ hns3_get_default_vec_support(void)
@@ -33 +34 @@
- hns3_get_sve_support(void)
+ hns3_check_sve_support(void)
@@ -37,2 +37,0 @@
- if (rte_vect_get_max_simd_bitwidth() < RTE_VECT_SIMD_256)
- return false;
@@ -39,0 +39,2 @@
+ return true;
+ #endif
@@ -41 +42 @@
-index 53c7df7daf..a99e0dbb74 100644
+index 09034871e7..208527ea29 100644
@@ -44 +45 @@
-@@ -35,7 +35,25 @@ deps += ['hash']
+@@ -31,7 +31,25 @@ deps += ['hash']
@@ -47,2 +48,2 @@
- sources += files('hns3_rxtx_vec.c')
-- if cc.get_define('__ARM_FEATURE_SVE', args: machine_args) != ''
+ sources += files('hns3_rxtx_vec.c')
+- if cc.get_define('__ARM_FEATURE_SVE', args: machine_args) != ''
@@ -50,20 +51,20 @@
-+ # compile SVE when:
-+ # a. support SVE in minimum instruction set baseline
-+ # b. it's not minimum instruction set, but compiler support
-+ if dpdk_conf.has('RTE_HAS_SVE_ACLE')
- sources += files('hns3_rxtx_vec_sve.c')
-+ elif cc.has_argument('-march=armv8.2-a+sve') and cc.check_header('arm_sve.h')
-+ cflags += ['-DRTE_HAS_SVE_ACLE=1']
-+ sve_cflags = []
-+ foreach flag: cflags
-+ if not (flag.startswith('-march=') or flag.startswith('-mcpu=') or flag.startswith('-mtune='))
-+ sve_cflags += flag
-+ endif
-+ endforeach
-+ hns3_sve_lib = static_library('hns3_sve_lib',
-+ 'hns3_rxtx_vec_sve.c',
-+ dependencies: [static_rte_ethdev],
-+ include_directories: includes,
-+ c_args: [sve_cflags, '-march=armv8.2-a+sve'])
-+ objs += hns3_sve_lib.extract_objects('hns3_rxtx_vec_sve.c')
- endif
++ # compile SVE when:
++ # a. support SVE in minimum instruction set baseline
++ # b. it's not minimum instruction set, but compiler support
++ if dpdk_conf.has('RTE_HAS_SVE_ACLE')
+ sources += files('hns3_rxtx_vec_sve.c')
++ elif cc.has_argument('-march=armv8.2-a+sve') and cc.check_header('arm_sve.h')
++ cflags += ['-DRTE_HAS_SVE_ACLE=1']
++ sve_cflags = []
++ foreach flag: cflags
++ if not (flag.startswith('-march=') or flag.startswith('-mcpu=') or flag.startswith('-mtune='))
++ sve_cflags += flag
++ endif
++ endforeach
++ hns3_sve_lib = static_library('hns3_sve_lib',
++ 'hns3_rxtx_vec_sve.c',
++ dependencies: [static_rte_ethdev],
++ include_directories: includes,
++ c_args: [sve_cflags, '-march=armv8.2-a+sve'])
++ objs += hns3_sve_lib.extract_objects('hns3_rxtx_vec_sve.c')
+ endif
^ permalink raw reply [flat|nested] 208+ messages in thread
* [dpdk-stable] patch 'table: fix bucket empty check' has been queued to stable release 20.11.3
2021-07-12 13:03 [dpdk-stable] patch 'graph: fix memory leak in stats' has been queued to stable release 20.11.3 luca.boccassi
` (113 preceding siblings ...)
2021-07-12 13:05 ` [dpdk-stable] patch 'net/hns3: fix Arm SVE build with GCC 8.3' " luca.boccassi
@ 2021-07-12 13:05 ` luca.boccassi
2021-07-26 13:52 ` [dpdk-stable] patch 'net/bonding: fix error message on flow verify' " luca.boccassi
115 siblings, 0 replies; 208+ messages in thread
From: luca.boccassi @ 2021-07-12 13:05 UTC (permalink / raw)
To: Thierry Herbelot; +Cc: Cristian Dumitrescu, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.3
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/14/21. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/ff85ab73c14ce6409ef53530f45ad6747d26d132
Thanks.
Luca Boccassi
---
From ff85ab73c14ce6409ef53530f45ad6747d26d132 Mon Sep 17 00:00:00 2001
From: Thierry Herbelot <thierry.herbelot@6wind.com>
Date: Wed, 7 Jul 2021 13:19:05 +0200
Subject: [PATCH] table: fix bucket empty check
[ upstream commit 3fc2ddffde95478b65d8b58df5210293e63c00ee ]
Due to a typo, only 3 out of 4 keys in the bucket of the exact match
table were considered, which can result in valid keys being
incorrectly dropped from the table.
Fixes: d0a00966618ba ("table: add exact match SWX table")
Signed-off-by: Thierry Herbelot <thierry.herbelot@6wind.com>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
---
lib/librte_table/rte_swx_table_em.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/librte_table/rte_swx_table_em.c b/lib/librte_table/rte_swx_table_em.c
index 788e25f6b9..03b28c4c9d 100644
--- a/lib/librte_table/rte_swx_table_em.c
+++ b/lib/librte_table/rte_swx_table_em.c
@@ -280,7 +280,7 @@ table_key_data(struct table *t, uint32_t key_id)
static inline int
bkt_is_empty(struct bucket_extension *bkt)
{
- return (!bkt->sig[0] && !bkt->sig[1] && !bkt->sig[2] && !bkt->sig[2]) ?
+ return (!bkt->sig[0] && !bkt->sig[1] && !bkt->sig[2] && !bkt->sig[3]) ?
1 : 0;
}
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-07-12 13:41:42.604946488 +0100
+++ 0116-table-fix-bucket-empty-check.patch 2021-07-12 13:41:36.934131859 +0100
@@ -1 +1 @@
-From 3fc2ddffde95478b65d8b58df5210293e63c00ee Mon Sep 17 00:00:00 2001
+From ff85ab73c14ce6409ef53530f45ad6747d26d132 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 3fc2ddffde95478b65d8b58df5210293e63c00ee ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -16 +17 @@
- lib/table/rte_swx_table_em.c | 2 +-
+ lib/librte_table/rte_swx_table_em.c | 2 +-
@@ -19 +20 @@
-diff --git a/lib/table/rte_swx_table_em.c b/lib/table/rte_swx_table_em.c
+diff --git a/lib/librte_table/rte_swx_table_em.c b/lib/librte_table/rte_swx_table_em.c
@@ -21,2 +22,2 @@
---- a/lib/table/rte_swx_table_em.c
-+++ b/lib/table/rte_swx_table_em.c
+--- a/lib/librte_table/rte_swx_table_em.c
++++ b/lib/librte_table/rte_swx_table_em.c
^ permalink raw reply [flat|nested] 208+ messages in thread
* [dpdk-stable] patch 'net/bonding: fix error message on flow verify' has been queued to stable release 20.11.3
2021-07-12 13:03 [dpdk-stable] patch 'graph: fix memory leak in stats' has been queued to stable release 20.11.3 luca.boccassi
` (114 preceding siblings ...)
2021-07-12 13:05 ` [dpdk-stable] patch 'table: fix bucket empty check' " luca.boccassi
@ 2021-07-26 13:52 ` luca.boccassi
2021-07-26 13:52 ` [dpdk-stable] patch 'net/bonding: check flow setting' " luca.boccassi
` (57 more replies)
115 siblings, 58 replies; 208+ messages in thread
From: luca.boccassi @ 2021-07-26 13:52 UTC (permalink / raw)
To: Martin Havlik; +Cc: Min Hu, Andrew Rybchenko, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.3
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/28/21. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/2b916ad7eb7bba9a43d356749779ac6af60ce5cc
Thanks.
Luca Boccassi
---
From 2b916ad7eb7bba9a43d356749779ac6af60ce5cc Mon Sep 17 00:00:00 2001
From: Martin Havlik <xhavli56@stud.fit.vutbr.cz>
Date: Tue, 22 Jun 2021 11:25:28 +0200
Subject: [PATCH] net/bonding: fix error message on flow verify
[ upstream commit cb8dc97f9d7e48f6ac0f79587133ec6213ed1d18 ]
Return value is now saved to errval and log message on error reports
correct function name, doesn't use q_id which was out of context,
and uses up-to-date errval.
Fixes: 112891cd27e5 ("net/bonding: add dedicated HW queues for LACP control")
Signed-off-by: Martin Havlik <xhavli56@stud.fit.vutbr.cz>
Acked-by: Min Hu (Connor) <humin29@huawei.com>
Reviewed-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
---
drivers/net/bonding/rte_eth_bond_pmd.c | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/drivers/net/bonding/rte_eth_bond_pmd.c b/drivers/net/bonding/rte_eth_bond_pmd.c
index ec7db3dcd3..8abb25a920 100644
--- a/drivers/net/bonding/rte_eth_bond_pmd.c
+++ b/drivers/net/bonding/rte_eth_bond_pmd.c
@@ -1794,12 +1794,13 @@ slave_configure(struct rte_eth_dev *bonded_eth_dev,
!= 0)
return errval;
- if (bond_ethdev_8023ad_flow_verify(bonded_eth_dev,
- slave_eth_dev->data->port_id) != 0) {
+ errval = bond_ethdev_8023ad_flow_verify(bonded_eth_dev,
+ slave_eth_dev->data->port_id);
+ if (errval != 0) {
RTE_BOND_LOG(ERR,
- "rte_eth_tx_queue_setup: port=%d queue_id %d, err (%d)",
- slave_eth_dev->data->port_id, q_id, errval);
- return -1;
+ "bond_ethdev_8023ad_flow_verify: port=%d, err (%d)",
+ slave_eth_dev->data->port_id, errval);
+ return errval;
}
if (internals->mode4.dedicated_queues.flow[slave_eth_dev->data->port_id] != NULL)
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-07-26 13:53:16.034848077 +0100
+++ 0001-net-bonding-fix-error-message-on-flow-verify.patch 2021-07-26 13:53:15.765290857 +0100
@@ -1 +1 @@
-From cb8dc97f9d7e48f6ac0f79587133ec6213ed1d18 Mon Sep 17 00:00:00 2001
+From 2b916ad7eb7bba9a43d356749779ac6af60ce5cc Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit cb8dc97f9d7e48f6ac0f79587133ec6213ed1d18 ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -21 +22 @@
-index b01ef003e6..4c43bf9166 100644
+index ec7db3dcd3..8abb25a920 100644
@@ -24 +25 @@
-@@ -1805,12 +1805,13 @@ slave_configure(struct rte_eth_dev *bonded_eth_dev,
+@@ -1794,12 +1794,13 @@ slave_configure(struct rte_eth_dev *bonded_eth_dev,
^ permalink raw reply [flat|nested] 208+ messages in thread
* [dpdk-stable] patch 'net/bonding: check flow setting' has been queued to stable release 20.11.3
2021-07-26 13:52 ` [dpdk-stable] patch 'net/bonding: fix error message on flow verify' " luca.boccassi
@ 2021-07-26 13:52 ` luca.boccassi
2021-07-26 13:52 ` [dpdk-stable] patch 'net/softnic: fix connection memory leak' " luca.boccassi
` (56 subsequent siblings)
57 siblings, 0 replies; 208+ messages in thread
From: luca.boccassi @ 2021-07-26 13:52 UTC (permalink / raw)
To: Martin Havlik; +Cc: Min Hu, Andrew Rybchenko, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.3
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/28/21. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/6807067d712ff88124851b6f9ee06cc8503758a5
Thanks.
Luca Boccassi
---
From 6807067d712ff88124851b6f9ee06cc8503758a5 Mon Sep 17 00:00:00 2001
From: Martin Havlik <xhavli56@stud.fit.vutbr.cz>
Date: Tue, 22 Jun 2021 11:25:29 +0200
Subject: [PATCH] net/bonding: check flow setting
[ upstream commit d844400966d0071680d618c21a896ec8c73a50e6 ]
Return value from bond_ethdev_8023ad_flow_set() is now checked
and appropriate message is logged on error.
Fixes: 112891cd27e5 ("net/bonding: add dedicated HW queues for LACP control")
Signed-off-by: Martin Havlik <xhavli56@stud.fit.vutbr.cz>
Acked-by: Min Hu (Connor) <humin29@huawei.com>
Reviewed-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
---
drivers/net/bonding/rte_eth_bond_pmd.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/drivers/net/bonding/rte_eth_bond_pmd.c b/drivers/net/bonding/rte_eth_bond_pmd.c
index 8abb25a920..a1d3703e96 100644
--- a/drivers/net/bonding/rte_eth_bond_pmd.c
+++ b/drivers/net/bonding/rte_eth_bond_pmd.c
@@ -1808,8 +1808,14 @@ slave_configure(struct rte_eth_dev *bonded_eth_dev,
internals->mode4.dedicated_queues.flow[slave_eth_dev->data->port_id],
&flow_error);
- bond_ethdev_8023ad_flow_set(bonded_eth_dev,
+ errval = bond_ethdev_8023ad_flow_set(bonded_eth_dev,
slave_eth_dev->data->port_id);
+ if (errval != 0) {
+ RTE_BOND_LOG(ERR,
+ "bond_ethdev_8023ad_flow_set: port=%d, err (%d)",
+ slave_eth_dev->data->port_id, errval);
+ return errval;
+ }
}
/* Start device */
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-07-26 13:53:16.080783013 +0100
+++ 0002-net-bonding-check-flow-setting.patch 2021-07-26 13:53:15.769290941 +0100
@@ -1 +1 @@
-From d844400966d0071680d618c21a896ec8c73a50e6 Mon Sep 17 00:00:00 2001
+From 6807067d712ff88124851b6f9ee06cc8503758a5 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit d844400966d0071680d618c21a896ec8c73a50e6 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -20 +21 @@
-index 4c43bf9166..a6755661c4 100644
+index 8abb25a920..a1d3703e96 100644
@@ -23 +24 @@
-@@ -1819,8 +1819,14 @@ slave_configure(struct rte_eth_dev *bonded_eth_dev,
+@@ -1808,8 +1808,14 @@ slave_configure(struct rte_eth_dev *bonded_eth_dev,
^ permalink raw reply [flat|nested] 208+ messages in thread
* [dpdk-stable] patch 'net/softnic: fix connection memory leak' has been queued to stable release 20.11.3
2021-07-26 13:52 ` [dpdk-stable] patch 'net/bonding: fix error message on flow verify' " luca.boccassi
2021-07-26 13:52 ` [dpdk-stable] patch 'net/bonding: check flow setting' " luca.boccassi
@ 2021-07-26 13:52 ` luca.boccassi
2021-07-26 13:52 ` [dpdk-stable] patch 'app/testpmd: fix offloads for newly attached port' " luca.boccassi
` (55 subsequent siblings)
57 siblings, 0 replies; 208+ messages in thread
From: luca.boccassi @ 2021-07-26 13:52 UTC (permalink / raw)
To: Dapeng Yu; +Cc: Andrew Rybchenko, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.3
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/28/21. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/96ad1e25fc0265ec2b5776af7833f0beb25bb18f
Thanks.
Luca Boccassi
---
From 96ad1e25fc0265ec2b5776af7833f0beb25bb18f Mon Sep 17 00:00:00 2001
From: Dapeng Yu <dapengx.yu@intel.com>
Date: Fri, 9 Jul 2021 14:00:56 +0800
Subject: [PATCH] net/softnic: fix connection memory leak
[ upstream commit ae2b3ba6430d9f86cc3583b893f442aaa8934655 ]
In function softnic_conn_init(), a block of memory is allocated as
connection buffer, but it is never freed in softnic_conn_free(),
which cause memory leak.
Fixes: 7709a63bf178 ("net/softnic: add connection agent")
Signed-off-by: Dapeng Yu <dapengx.yu@intel.com>
Reviewed-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
---
drivers/net/softnic/conn.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/net/softnic/conn.c b/drivers/net/softnic/conn.c
index 8b66580887..5b031358d5 100644
--- a/drivers/net/softnic/conn.c
+++ b/drivers/net/softnic/conn.c
@@ -144,6 +144,7 @@ softnic_conn_free(struct softnic_conn *conn)
free(conn->msg_out);
free(conn->msg_in);
+ free(conn->buf);
free(conn->prompt);
free(conn->welcome);
free(conn);
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-07-26 13:53:16.126777061 +0100
+++ 0003-net-softnic-fix-connection-memory-leak.patch 2021-07-26 13:53:15.769290941 +0100
@@ -1 +1 @@
-From ae2b3ba6430d9f86cc3583b893f442aaa8934655 Mon Sep 17 00:00:00 2001
+From 96ad1e25fc0265ec2b5776af7833f0beb25bb18f Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit ae2b3ba6430d9f86cc3583b893f442aaa8934655 ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
^ permalink raw reply [flat|nested] 208+ messages in thread
* [dpdk-stable] patch 'app/testpmd: fix offloads for newly attached port' has been queued to stable release 20.11.3
2021-07-26 13:52 ` [dpdk-stable] patch 'net/bonding: fix error message on flow verify' " luca.boccassi
2021-07-26 13:52 ` [dpdk-stable] patch 'net/bonding: check flow setting' " luca.boccassi
2021-07-26 13:52 ` [dpdk-stable] patch 'net/softnic: fix connection memory leak' " luca.boccassi
@ 2021-07-26 13:52 ` luca.boccassi
2021-07-26 13:52 ` [dpdk-stable] patch 'net/mlx5: remove redundant operations in NEON Rx' " luca.boccassi
` (54 subsequent siblings)
57 siblings, 0 replies; 208+ messages in thread
From: luca.boccassi @ 2021-07-26 13:52 UTC (permalink / raw)
To: Viacheslav Ovsiienko; +Cc: Aman Deep Singh, Xiaoyun Li, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.3
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/28/21. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/a5fb806241d9b55afa7f829403414be5b237ae4d
Thanks.
Luca Boccassi
---
From a5fb806241d9b55afa7f829403414be5b237ae4d Mon Sep 17 00:00:00 2001
From: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
Date: Mon, 12 Jul 2021 15:40:53 +0300
Subject: [PATCH] app/testpmd: fix offloads for newly attached port
[ upstream commit b6b8a1ebd4dadc82733ce4b0a711da918c386115 ]
For the newly attached ports (with "port attach" command) the
default offloads settings, configured from application command
line, were not applied, causing port start failure following
the attach.
For example, if scattering offload was configured in command
line and rxpkts was configured for multiple segments, the newly
attached port start was failed due to missing scattering offload
enable in the new port settings. The missing code to apply
the offloads to the new device and its queues is added.
The new local routine init_config_port_offloads() is introduced,
embracing the shared part of port offloads initialization code.
Fixes: c9cce42876f5 ("ethdev: remove deprecated attach/detach functions")
Signed-off-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
Acked-by: Aman Deep Singh <aman.deep.singh@intel.com>
Acked-by: Xiaoyun Li <xiaoyun.li@intel.com>
---
app/test-pmd/testpmd.c | 145 ++++++++++++++++++-----------------------
1 file changed, 65 insertions(+), 80 deletions(-)
diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c
index d830fe3a2f..c442bcc5ff 100644
--- a/app/test-pmd/testpmd.c
+++ b/app/test-pmd/testpmd.c
@@ -1398,23 +1398,70 @@ check_nb_hairpinq(queueid_t hairpinq)
return 0;
}
+static void
+init_config_port_offloads(portid_t pid, uint32_t socket_id)
+{
+ struct rte_port *port = &ports[pid];
+ uint16_t data_size;
+ int ret;
+ int i;
+
+ port->dev_conf.txmode = tx_mode;
+ port->dev_conf.rxmode = rx_mode;
+
+ ret = eth_dev_info_get_print_err(pid, &port->dev_info);
+ if (ret != 0)
+ rte_exit(EXIT_FAILURE, "rte_eth_dev_info_get() failed\n");
+
+ ret = update_jumbo_frame_offload(pid);
+ if (ret != 0)
+ printf("Updating jumbo frame offload failed for port %u\n",
+ pid);
+
+ if (!(port->dev_info.tx_offload_capa & DEV_TX_OFFLOAD_MBUF_FAST_FREE))
+ port->dev_conf.txmode.offloads &=
+ ~DEV_TX_OFFLOAD_MBUF_FAST_FREE;
+
+ /* Apply Rx offloads configuration */
+ for (i = 0; i < port->dev_info.max_rx_queues; i++)
+ port->rx_conf[i].offloads = port->dev_conf.rxmode.offloads;
+ /* Apply Tx offloads configuration */
+ for (i = 0; i < port->dev_info.max_tx_queues; i++)
+ port->tx_conf[i].offloads = port->dev_conf.txmode.offloads;
+
+ /* set flag to initialize port/queue */
+ port->need_reconfig = 1;
+ port->need_reconfig_queues = 1;
+ port->socket_id = socket_id;
+ port->tx_metadata = 0;
+
+ /*
+ * Check for maximum number of segments per MTU.
+ * Accordingly update the mbuf data size.
+ */
+ if (port->dev_info.rx_desc_lim.nb_mtu_seg_max != UINT16_MAX &&
+ port->dev_info.rx_desc_lim.nb_mtu_seg_max != 0) {
+ data_size = rx_mode.max_rx_pkt_len /
+ port->dev_info.rx_desc_lim.nb_mtu_seg_max;
+
+ if ((data_size + RTE_PKTMBUF_HEADROOM) > mbuf_data_size[0]) {
+ mbuf_data_size[0] = data_size + RTE_PKTMBUF_HEADROOM;
+ TESTPMD_LOG(WARNING,
+ "Configured mbuf size of the first segment %hu\n",
+ mbuf_data_size[0]);
+ }
+ }
+}
+
static void
init_config(void)
{
portid_t pid;
- struct rte_port *port;
struct rte_mempool *mbp;
unsigned int nb_mbuf_per_pool;
lcoreid_t lc_id;
- uint8_t port_per_socket[RTE_MAX_NUMA_NODES];
struct rte_gro_param gro_param;
uint32_t gso_types;
- uint16_t data_size;
- bool warning = 0;
- int k;
- int ret;
-
- memset(port_per_socket,0,RTE_MAX_NUMA_NODES);
/* Configuration of logical cores. */
fwd_lcores = rte_zmalloc("testpmd: fwd_lcores",
@@ -1436,30 +1483,12 @@ init_config(void)
}
RTE_ETH_FOREACH_DEV(pid) {
- port = &ports[pid];
- /* Apply default TxRx configuration for all ports */
- port->dev_conf.txmode = tx_mode;
- port->dev_conf.rxmode = rx_mode;
+ uint32_t socket_id;
- ret = eth_dev_info_get_print_err(pid, &port->dev_info);
- if (ret != 0)
- rte_exit(EXIT_FAILURE,
- "rte_eth_dev_info_get() failed\n");
-
- ret = update_jumbo_frame_offload(pid);
- if (ret != 0)
- printf("Updating jumbo frame offload failed for port %u\n",
- pid);
-
- if (!(port->dev_info.tx_offload_capa &
- DEV_TX_OFFLOAD_MBUF_FAST_FREE))
- port->dev_conf.txmode.offloads &=
- ~DEV_TX_OFFLOAD_MBUF_FAST_FREE;
if (numa_support) {
- if (port_numa[pid] != NUMA_NO_CONFIG)
- port_per_socket[port_numa[pid]]++;
- else {
- uint32_t socket_id = rte_eth_dev_socket_id(pid);
+ socket_id = port_numa[pid];
+ if (port_numa[pid] == NUMA_NO_CONFIG) {
+ socket_id = rte_eth_dev_socket_id(pid);
/*
* if socket_id is invalid,
@@ -1467,45 +1496,14 @@ init_config(void)
*/
if (check_socket_id(socket_id) < 0)
socket_id = socket_ids[0];
- port_per_socket[socket_id]++;
- }
- }
-
- /* Apply Rx offloads configuration */
- for (k = 0; k < port->dev_info.max_rx_queues; k++)
- port->rx_conf[k].offloads =
- port->dev_conf.rxmode.offloads;
- /* Apply Tx offloads configuration */
- for (k = 0; k < port->dev_info.max_tx_queues; k++)
- port->tx_conf[k].offloads =
- port->dev_conf.txmode.offloads;
-
- /* set flag to initialize port/queue */
- port->need_reconfig = 1;
- port->need_reconfig_queues = 1;
- port->tx_metadata = 0;
-
- /* Check for maximum number of segments per MTU. Accordingly
- * update the mbuf data size.
- */
- if (port->dev_info.rx_desc_lim.nb_mtu_seg_max != UINT16_MAX &&
- port->dev_info.rx_desc_lim.nb_mtu_seg_max != 0) {
- data_size = rx_mode.max_rx_pkt_len /
- port->dev_info.rx_desc_lim.nb_mtu_seg_max;
-
- if ((data_size + RTE_PKTMBUF_HEADROOM) >
- mbuf_data_size[0]) {
- mbuf_data_size[0] = data_size +
- RTE_PKTMBUF_HEADROOM;
- warning = 1;
}
+ } else {
+ socket_id = (socket_num == UMA_NO_CONFIG) ?
+ 0 : socket_num;
}
+ /* Apply default TxRx configuration for all ports */
+ init_config_port_offloads(pid, socket_id);
}
-
- if (warning)
- TESTPMD_LOG(WARNING,
- "Configured mbuf size of the first segment %hu\n",
- mbuf_data_size[0]);
/*
* Create pools of mbuf.
* If NUMA support is disabled, create a single pool of mbuf in
@@ -1592,21 +1590,8 @@ init_config(void)
void
reconfig(portid_t new_port_id, unsigned socket_id)
{
- struct rte_port *port;
- int ret;
-
/* Reconfiguration of Ethernet ports. */
- port = &ports[new_port_id];
-
- ret = eth_dev_info_get_print_err(new_port_id, &port->dev_info);
- if (ret != 0)
- return;
-
- /* set flag to initialize port/queue */
- port->need_reconfig = 1;
- port->need_reconfig_queues = 1;
- port->socket_id = socket_id;
-
+ init_config_port_offloads(new_port_id, socket_id);
init_port_config();
}
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-07-26 13:53:16.166985967 +0100
+++ 0004-app-testpmd-fix-offloads-for-newly-attached-port.patch 2021-07-26 13:53:15.773291025 +0100
@@ -1 +1 @@
-From b6b8a1ebd4dadc82733ce4b0a711da918c386115 Mon Sep 17 00:00:00 2001
+From a5fb806241d9b55afa7f829403414be5b237ae4d Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit b6b8a1ebd4dadc82733ce4b0a711da918c386115 ]
+
@@ -21 +22,0 @@
-Cc: stable@dpdk.org
@@ -27,2 +28,2 @@
- app/test-pmd/testpmd.c | 151 +++++++++++++++++++----------------------
- 1 file changed, 68 insertions(+), 83 deletions(-)
+ app/test-pmd/testpmd.c | 145 ++++++++++++++++++-----------------------
+ 1 file changed, 65 insertions(+), 80 deletions(-)
@@ -31 +32 @@
-index 1cdd3cdd12..a48f70962f 100644
+index d830fe3a2f..c442bcc5ff 100644
@@ -34 +35 @@
-@@ -1417,23 +1417,73 @@ check_nb_hairpinq(queueid_t hairpinq)
+@@ -1398,23 +1398,70 @@ check_nb_hairpinq(queueid_t hairpinq)
@@ -69,3 +69,0 @@
-+ if (eth_link_speed)
-+ port->dev_conf.link_speeds = eth_link_speed;
-+
@@ -116 +114 @@
-@@ -1455,30 +1505,12 @@ init_config(void)
+@@ -1436,30 +1483,12 @@ init_config(void)
@@ -151 +149 @@
-@@ -1486,48 +1518,14 @@ init_config(void)
+@@ -1467,45 +1496,14 @@ init_config(void)
@@ -168,3 +165,0 @@
-- if (eth_link_speed)
-- port->dev_conf.link_speeds = eth_link_speed;
--
@@ -205 +200 @@
-@@ -1610,21 +1608,8 @@ init_config(void)
+@@ -1592,21 +1590,8 @@ init_config(void)
^ permalink raw reply [flat|nested] 208+ messages in thread
* [dpdk-stable] patch 'net/mlx5: remove redundant operations in NEON Rx' has been queued to stable release 20.11.3
2021-07-26 13:52 ` [dpdk-stable] patch 'net/bonding: fix error message on flow verify' " luca.boccassi
` (2 preceding siblings ...)
2021-07-26 13:52 ` [dpdk-stable] patch 'app/testpmd: fix offloads for newly attached port' " luca.boccassi
@ 2021-07-26 13:52 ` luca.boccassi
2021-07-26 13:52 ` [dpdk-stable] patch 'net/mlx5: fix missing RSS expandable items' " luca.boccassi
` (53 subsequent siblings)
57 siblings, 0 replies; 208+ messages in thread
From: luca.boccassi @ 2021-07-26 13:52 UTC (permalink / raw)
To: Ruifeng Wang; +Cc: Viacheslav Ovsiienko, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.3
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/28/21. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/2a5c46697b2b0aa0ff37f18b92ba6aa90d9dcb69
Thanks.
Luca Boccassi
---
From 2a5c46697b2b0aa0ff37f18b92ba6aa90d9dcb69 Mon Sep 17 00:00:00 2001
From: Ruifeng Wang <ruifeng.wang@arm.com>
Date: Wed, 7 Jul 2021 17:03:06 +0800
Subject: [PATCH] net/mlx5: remove redundant operations in NEON Rx
[ upstream commit ff6fcd415f4b2be7572abffa5284978c176d3de4 ]
Mask of entries after the compressed CQE is covered by invalid mask of
non-compressed valid CQEs. Hence remove redundant calculation on mask.
The change showed slight performance uplift on N1SDP.
Fixes: 570acdb1da8a ("net/mlx5: add vectorized Rx/Tx burst for ARM")
Signed-off-by: Ruifeng Wang <ruifeng.wang@arm.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
---
drivers/net/mlx5/mlx5_rxtx_vec_neon.h | 11 +++++------
1 file changed, 5 insertions(+), 6 deletions(-)
diff --git a/drivers/net/mlx5/mlx5_rxtx_vec_neon.h b/drivers/net/mlx5/mlx5_rxtx_vec_neon.h
index 2234fbe6b2..ce50a3ccc4 100644
--- a/drivers/net/mlx5/mlx5_rxtx_vec_neon.h
+++ b/drivers/net/mlx5/mlx5_rxtx_vec_neon.h
@@ -767,16 +767,15 @@ rxq_cq_process_v(struct mlx5_rxq_data *rxq, volatile struct mlx5_cqe *cq,
comp_idx = __builtin_clzl(vget_lane_u64(vreinterpret_u64_u16(
comp_mask), 0)) /
(sizeof(uint16_t) * 8);
- /* D.6 mask out entries after the compressed CQE. */
- mask = vcreate_u16(comp_idx < MLX5_VPMD_DESCS_PER_LOOP ?
- -1UL >> (comp_idx * sizeof(uint16_t) * 8) :
- 0);
- invalid_mask = vorr_u16(invalid_mask, mask);
+ invalid_mask = vorr_u16(invalid_mask, comp_mask);
/* D.7 count non-compressed valid CQEs. */
n = __builtin_clzl(vget_lane_u64(vreinterpret_u64_u16(
invalid_mask), 0)) / (sizeof(uint16_t) * 8);
nocmp_n += n;
- /* D.2 get the final invalid mask. */
+ /*
+ * D.2 mask out entries after the compressed CQE.
+ * get the final invalid mask.
+ */
mask = vcreate_u16(n < MLX5_VPMD_DESCS_PER_LOOP ?
-1UL >> (n * sizeof(uint16_t) * 8) : 0);
invalid_mask = vorr_u16(invalid_mask, mask);
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-07-26 13:53:16.214236629 +0100
+++ 0005-net-mlx5-remove-redundant-operations-in-NEON-Rx.patch 2021-07-26 13:53:15.777291109 +0100
@@ -1 +1 @@
-From ff6fcd415f4b2be7572abffa5284978c176d3de4 Mon Sep 17 00:00:00 2001
+From 2a5c46697b2b0aa0ff37f18b92ba6aa90d9dcb69 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit ff6fcd415f4b2be7572abffa5284978c176d3de4 ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -20 +21 @@
-index 5c569ee199..4d1710b837 100644
+index 2234fbe6b2..ce50a3ccc4 100644
^ permalink raw reply [flat|nested] 208+ messages in thread
* [dpdk-stable] patch 'net/mlx5: fix missing RSS expandable items' has been queued to stable release 20.11.3
2021-07-26 13:52 ` [dpdk-stable] patch 'net/bonding: fix error message on flow verify' " luca.boccassi
` (3 preceding siblings ...)
2021-07-26 13:52 ` [dpdk-stable] patch 'net/mlx5: remove redundant operations in NEON Rx' " luca.boccassi
@ 2021-07-26 13:52 ` luca.boccassi
2021-07-26 13:52 ` [dpdk-stable] patch 'net/mlx5: fix missing RSS expansion of IPv6 frag' " luca.boccassi
` (52 subsequent siblings)
57 siblings, 0 replies; 208+ messages in thread
From: luca.boccassi @ 2021-07-26 13:52 UTC (permalink / raw)
To: Xiaoyu Min; +Cc: Matan Azrad, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.3
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/28/21. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/5b34c2ad6f1b413cf21e4f342151dfcf3a7b3061
Thanks.
Luca Boccassi
---
From 5b34c2ad6f1b413cf21e4f342151dfcf3a7b3061 Mon Sep 17 00:00:00 2001
From: Xiaoyu Min <jackmin@nvidia.com>
Date: Wed, 7 Jul 2021 10:32:46 +0800
Subject: [PATCH] net/mlx5: fix missing RSS expandable items
[ upstream commit 1c4f7044c6b5e132adda855000415029717b6502 ]
Some RSS expandable items are missing which leads to the expanded
rte flow rules with wrong patterns.
Fix by adding missed items.
Fixes: d91093b9a2af ("net/mlx5: fix RSS pattern expansion")
Signed-off-by: Xiaoyu Min <jackmin@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
---
drivers/net/mlx5/mlx5_flow.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c
index 35a1d04a2e..709592b98e 100644
--- a/drivers/net/mlx5/mlx5_flow.c
+++ b/drivers/net/mlx5/mlx5_flow.c
@@ -132,6 +132,8 @@ mlx5_flow_is_rss_expandable_item(const struct rte_flow_item *item)
case RTE_FLOW_ITEM_TYPE_GRE:
case RTE_FLOW_ITEM_TYPE_GENEVE:
case RTE_FLOW_ITEM_TYPE_MPLS:
+ case RTE_FLOW_ITEM_TYPE_VXLAN_GPE:
+ case RTE_FLOW_ITEM_TYPE_GRE_KEY:
return true;
default:
break;
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-07-26 13:53:16.255606907 +0100
+++ 0006-net-mlx5-fix-missing-RSS-expandable-items.patch 2021-07-26 13:53:15.785291277 +0100
@@ -1 +1 @@
-From 1c4f7044c6b5e132adda855000415029717b6502 Mon Sep 17 00:00:00 2001
+From 5b34c2ad6f1b413cf21e4f342151dfcf3a7b3061 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 1c4f7044c6b5e132adda855000415029717b6502 ]
+
@@ -12 +13,0 @@
-Cc: stable@dpdk.org
@@ -21 +22 @@
-index 2ede550a9a..f534bf7fa1 100644
+index 35a1d04a2e..709592b98e 100644
^ permalink raw reply [flat|nested] 208+ messages in thread
* [dpdk-stable] patch 'net/mlx5: fix missing RSS expansion of IPv6 frag' has been queued to stable release 20.11.3
2021-07-26 13:52 ` [dpdk-stable] patch 'net/bonding: fix error message on flow verify' " luca.boccassi
` (4 preceding siblings ...)
2021-07-26 13:52 ` [dpdk-stable] patch 'net/mlx5: fix missing RSS expandable items' " luca.boccassi
@ 2021-07-26 13:52 ` luca.boccassi
2021-07-26 13:52 ` [dpdk-stable] patch 'net/mlx5: fix threshold for mbuf replenishment in MPRQ' " luca.boccassi
` (51 subsequent siblings)
57 siblings, 0 replies; 208+ messages in thread
From: luca.boccassi @ 2021-07-26 13:52 UTC (permalink / raw)
To: Xiaoyu Min; +Cc: Matan Azrad, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.3
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/28/21. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/a6a787bf7d95934ac9c6ef2354efe885a10db690
Thanks.
Luca Boccassi
---
From a6a787bf7d95934ac9c6ef2354efe885a10db690 Mon Sep 17 00:00:00 2001
From: Xiaoyu Min <jackmin@nvidia.com>
Date: Wed, 7 Jul 2021 10:32:47 +0800
Subject: [PATCH] net/mlx5: fix missing RSS expansion of IPv6 frag
[ upstream commit 0ed93c13449c0dfc41d957ae809aeceb70d001a3 ]
IPV6_FRAG_EXT item is missed for RSS expansion which causes wrongly
expanded flows:
flow create 0 ingress pattern eth / ipv6 / udp dst is 250 / vxlan-gpe /
ipv6 / ipv6_frag_ext / end actions rss level 2 types ip end / end
Different from other items, IPV6_FRAG_EXT hasn't next field because HW
only support to do hash of UDP/TCP for non-fragment.
This MLX5_EXPANSION_IPV6_FRAG_EXT node in RSS expansion graph only helps
RSS expansion function to locate right node in graph from which start
to expand.
Fixes: 0e5a0d8f7556 ("net/mlx5: support match on IPv6 fragment extension")
Signed-off-by: Xiaoyu Min <jackmin@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
---
drivers/net/mlx5/mlx5_flow.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c
index 709592b98e..4f5a0cf95c 100644
--- a/drivers/net/mlx5/mlx5_flow.c
+++ b/drivers/net/mlx5/mlx5_flow.c
@@ -134,6 +134,7 @@ mlx5_flow_is_rss_expandable_item(const struct rte_flow_item *item)
case RTE_FLOW_ITEM_TYPE_MPLS:
case RTE_FLOW_ITEM_TYPE_VXLAN_GPE:
case RTE_FLOW_ITEM_TYPE_GRE_KEY:
+ case RTE_FLOW_ITEM_TYPE_IPV6_FRAG_EXT:
return true;
default:
break;
@@ -453,6 +454,7 @@ enum mlx5_expansion {
MLX5_EXPANSION_IPV6,
MLX5_EXPANSION_IPV6_UDP,
MLX5_EXPANSION_IPV6_TCP,
+ MLX5_EXPANSION_IPV6_FRAG_EXT,
};
/** Supported expansion of items. */
@@ -607,7 +609,8 @@ static const struct mlx5_flow_expand_node mlx5_support_expansion[] = {
},
[MLX5_EXPANSION_IPV6] = {
.next = MLX5_FLOW_EXPAND_RSS_NEXT(MLX5_EXPANSION_IPV6_UDP,
- MLX5_EXPANSION_IPV6_TCP),
+ MLX5_EXPANSION_IPV6_TCP,
+ MLX5_EXPANSION_IPV6_FRAG_EXT),
.type = RTE_FLOW_ITEM_TYPE_IPV6,
.rss_types = ETH_RSS_IPV6 | ETH_RSS_FRAG_IPV6 |
ETH_RSS_NONFRAG_IPV6_OTHER,
@@ -620,6 +623,9 @@ static const struct mlx5_flow_expand_node mlx5_support_expansion[] = {
.type = RTE_FLOW_ITEM_TYPE_TCP,
.rss_types = ETH_RSS_NONFRAG_IPV6_TCP,
},
+ [MLX5_EXPANSION_IPV6_FRAG_EXT] = {
+ .type = RTE_FLOW_ITEM_TYPE_IPV6_FRAG_EXT,
+ },
};
static struct rte_flow_shared_action *
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-07-26 13:53:16.307948456 +0100
+++ 0007-net-mlx5-fix-missing-RSS-expansion-of-IPv6-frag.patch 2021-07-26 13:53:15.797291529 +0100
@@ -1 +1 @@
-From 0ed93c13449c0dfc41d957ae809aeceb70d001a3 Mon Sep 17 00:00:00 2001
+From a6a787bf7d95934ac9c6ef2354efe885a10db690 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 0ed93c13449c0dfc41d957ae809aeceb70d001a3 ]
+
@@ -19 +20,0 @@
-Cc: stable@dpdk.org
@@ -28 +29 @@
-index f534bf7fa1..347e8c1a09 100644
+index 709592b98e..4f5a0cf95c 100644
@@ -66 +67 @@
- static struct rte_flow_action_handle *
+ static struct rte_flow_shared_action *
^ permalink raw reply [flat|nested] 208+ messages in thread
* [dpdk-stable] patch 'net/mlx5: fix threshold for mbuf replenishment in MPRQ' has been queued to stable release 20.11.3
2021-07-26 13:52 ` [dpdk-stable] patch 'net/bonding: fix error message on flow verify' " luca.boccassi
` (5 preceding siblings ...)
2021-07-26 13:52 ` [dpdk-stable] patch 'net/mlx5: fix missing RSS expansion of IPv6 frag' " luca.boccassi
@ 2021-07-26 13:52 ` luca.boccassi
2021-07-26 13:52 ` [dpdk-stable] patch 'net/mlx5: fix typo in vectorized Rx comments' " luca.boccassi
` (50 subsequent siblings)
57 siblings, 0 replies; 208+ messages in thread
From: luca.boccassi @ 2021-07-26 13:52 UTC (permalink / raw)
To: Alexander Kozyrev; +Cc: Viacheslav Ovsiienko, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.3
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/28/21. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/4c8e04c056161a86aebf34fc1a6e5200b05d0283
Thanks.
Luca Boccassi
---
From 4c8e04c056161a86aebf34fc1a6e5200b05d0283 Mon Sep 17 00:00:00 2001
From: Alexander Kozyrev <akozyrev@nvidia.com>
Date: Tue, 13 Jul 2021 18:21:12 +0300
Subject: [PATCH] net/mlx5: fix threshold for mbuf replenishment in MPRQ
[ upstream commit acc87479535cdf02cd63d32a0618bd3874531eb4 ]
The replenishment scheme for the vectorized MPRQ Rx burst aims
to improve the cache locality by allocating new mbufs only when
there are almost no mbufs left: one burst gap between allocated
and consumed indexes.
This gap is not big enough to accommodate a corner case when we
have a very aggressive CQE compression with multiple regular CQEs
at the beginning and 64 zipped CQEs at the end.
Need to keep in mind this case and extend the replenishment
threshold by MLX5_VPMD_RX_MAX_BURST (64) to avoid mbuf overflow.
Fixes: 5fc2e5c27d6 ("net/mlx5: fix mbuf overflow in vectorized MPRQ")
Signed-off-by: Alexander Kozyrev <akozyrev@nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
---
drivers/net/mlx5/mlx5_rxtx_vec.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/net/mlx5/mlx5_rxtx_vec.c b/drivers/net/mlx5/mlx5_rxtx_vec.c
index 028e0f6121..b8b555690e 100644
--- a/drivers/net/mlx5/mlx5_rxtx_vec.c
+++ b/drivers/net/mlx5/mlx5_rxtx_vec.c
@@ -151,7 +151,8 @@ mlx5_rx_mprq_replenish_bulk_mbuf(struct mlx5_rxq_data *rxq)
unsigned int i;
if (n >= rxq->rq_repl_thresh &&
- rxq->elts_ci - rxq->rq_pi <= rxq->rq_repl_thresh) {
+ rxq->elts_ci - rxq->rq_pi <=
+ rxq->rq_repl_thresh + MLX5_VPMD_RX_MAX_BURST) {
MLX5_ASSERT(n >= MLX5_VPMD_RXQ_RPLNSH_THRESH(elts_n));
MLX5_ASSERT(MLX5_VPMD_RXQ_RPLNSH_THRESH(elts_n) >
MLX5_VPMD_DESCS_PER_LOOP);
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-07-26 13:53:16.358237489 +0100
+++ 0008-net-mlx5-fix-threshold-for-mbuf-replenishment-in-MPR.patch 2021-07-26 13:53:15.797291529 +0100
@@ -1 +1 @@
-From acc87479535cdf02cd63d32a0618bd3874531eb4 Mon Sep 17 00:00:00 2001
+From 4c8e04c056161a86aebf34fc1a6e5200b05d0283 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit acc87479535cdf02cd63d32a0618bd3874531eb4 ]
+
@@ -19 +20,0 @@
-Cc: stable@dpdk.org
@@ -28 +29 @@
-index e64ef70181..e1b6d5422a 100644
+index 028e0f6121..b8b555690e 100644
@@ -31 +32 @@
-@@ -157,7 +157,8 @@ mlx5_rx_mprq_replenish_bulk_mbuf(struct mlx5_rxq_data *rxq)
+@@ -151,7 +151,8 @@ mlx5_rx_mprq_replenish_bulk_mbuf(struct mlx5_rxq_data *rxq)
^ permalink raw reply [flat|nested] 208+ messages in thread
* [dpdk-stable] patch 'net/mlx5: fix typo in vectorized Rx comments' has been queued to stable release 20.11.3
2021-07-26 13:52 ` [dpdk-stable] patch 'net/bonding: fix error message on flow verify' " luca.boccassi
` (6 preceding siblings ...)
2021-07-26 13:52 ` [dpdk-stable] patch 'net/mlx5: fix threshold for mbuf replenishment in MPRQ' " luca.boccassi
@ 2021-07-26 13:52 ` luca.boccassi
2021-07-26 13:52 ` [dpdk-stable] patch 'net/mvpp2: fix port speed overflow' " luca.boccassi
` (49 subsequent siblings)
57 siblings, 0 replies; 208+ messages in thread
From: luca.boccassi @ 2021-07-26 13:52 UTC (permalink / raw)
To: Sarosh Arif; +Cc: dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.3
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/28/21. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/ef16dc1cc89ffd11ec0ba2061e22221bbfe90e5c
Thanks.
Luca Boccassi
---
From ef16dc1cc89ffd11ec0ba2061e22221bbfe90e5c Mon Sep 17 00:00:00 2001
From: Sarosh Arif <sarosh.arif@emumba.com>
Date: Tue, 8 Jun 2021 16:08:50 +0500
Subject: [PATCH] net/mlx5: fix typo in vectorized Rx comments
[ upstream commit 6e695b0cda4728ec37bd0aa2310d4b967f4ca86d ]
Change "returing" to "returning".
Fixes: 2e542da70937 ("net/mlx5: add Altivec Rx")
Fixes: 570acdb1da8a ("net/mlx5: add vectorized Rx/Tx burst for ARM")
Fixes: 3c2ddbd413e3 ("net/mlx5: separate shareable vector functions")
Signed-off-by: Sarosh Arif <sarosh.arif@emumba.com>
---
drivers/net/mlx5/mlx5_rxtx_vec_altivec.h | 2 +-
drivers/net/mlx5/mlx5_rxtx_vec_neon.h | 2 +-
drivers/net/mlx5/mlx5_rxtx_vec_sse.h | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/net/mlx5/mlx5_rxtx_vec_altivec.h b/drivers/net/mlx5/mlx5_rxtx_vec_altivec.h
index 2d1154b624..171dcb411e 100644
--- a/drivers/net/mlx5/mlx5_rxtx_vec_altivec.h
+++ b/drivers/net/mlx5/mlx5_rxtx_vec_altivec.h
@@ -840,7 +840,7 @@ rxq_cq_process_v(struct mlx5_rxq_data *rxq, volatile struct mlx5_cqe *cq,
/*
* A. load first Qword (8bytes) in one loop.
- * B. copy 4 mbuf pointers from elts ring to returing pkts.
+ * B. copy 4 mbuf pointers from elts ring to returning pkts.
* C. load remaining CQE data and extract necessary fields.
* Final 16bytes cqes[] extracted from original 64bytes CQE has the
* following structure:
diff --git a/drivers/net/mlx5/mlx5_rxtx_vec_neon.h b/drivers/net/mlx5/mlx5_rxtx_vec_neon.h
index ce50a3ccc4..debc116d01 100644
--- a/drivers/net/mlx5/mlx5_rxtx_vec_neon.h
+++ b/drivers/net/mlx5/mlx5_rxtx_vec_neon.h
@@ -593,7 +593,7 @@ rxq_cq_process_v(struct mlx5_rxq_data *rxq, volatile struct mlx5_cqe *cq,
* there's no instruction to count trailing zeros. __builtin_clzl() is
* used instead.
*
- * A. copy 4 mbuf pointers from elts ring to returing pkts.
+ * A. copy 4 mbuf pointers from elts ring to returning pkts.
* B. load 64B CQE and extract necessary fields
* Final 16bytes cqes[] extracted from original 64bytes CQE has the
* following structure:
diff --git a/drivers/net/mlx5/mlx5_rxtx_vec_sse.h b/drivers/net/mlx5/mlx5_rxtx_vec_sse.h
index c508a7a4f2..b68079908a 100644
--- a/drivers/net/mlx5/mlx5_rxtx_vec_sse.h
+++ b/drivers/net/mlx5/mlx5_rxtx_vec_sse.h
@@ -565,7 +565,7 @@ rxq_cq_process_v(struct mlx5_rxq_data *rxq, volatile struct mlx5_cqe *cq,
const __m128i flow_mark_adj = _mm_set_epi32(rxq->mark * (-1), 0, 0, 0);
/*
* A. load first Qword (8bytes) in one loop.
- * B. copy 4 mbuf pointers from elts ring to returing pkts.
+ * B. copy 4 mbuf pointers from elts ring to returning pkts.
* C. load remained CQE data and extract necessary fields.
* Final 16bytes cqes[] extracted from original 64bytes CQE has the
* following structure:
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-07-26 13:53:16.405504812 +0100
+++ 0009-net-mlx5-fix-typo-in-vectorized-Rx-comments.patch 2021-07-26 13:53:15.801291613 +0100
@@ -1 +1 @@
-From 6e695b0cda4728ec37bd0aa2310d4b967f4ca86d Mon Sep 17 00:00:00 2001
+From ef16dc1cc89ffd11ec0ba2061e22221bbfe90e5c Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 6e695b0cda4728ec37bd0aa2310d4b967f4ca86d ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -21 +22 @@
-index 648c59e2c2..101f49b051 100644
+index 2d1154b624..171dcb411e 100644
@@ -34 +35 @@
-index 4d1710b837..77979c939c 100644
+index ce50a3ccc4..debc116d01 100644
@@ -47 +48 @@
-index 661fa7273c..7fee4355cf 100644
+index c508a7a4f2..b68079908a 100644
^ permalink raw reply [flat|nested] 208+ messages in thread
* [dpdk-stable] patch 'net/mvpp2: fix port speed overflow' has been queued to stable release 20.11.3
2021-07-26 13:52 ` [dpdk-stable] patch 'net/bonding: fix error message on flow verify' " luca.boccassi
` (7 preceding siblings ...)
2021-07-26 13:52 ` [dpdk-stable] patch 'net/mlx5: fix typo in vectorized Rx comments' " luca.boccassi
@ 2021-07-26 13:52 ` luca.boccassi
2021-07-26 13:52 ` [dpdk-stable] patch 'net/mvpp2: fix configured state dependency' " luca.boccassi
` (48 subsequent siblings)
57 siblings, 0 replies; 208+ messages in thread
From: luca.boccassi @ 2021-07-26 13:52 UTC (permalink / raw)
To: Dana Vardi; +Cc: Liron Himi, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.3
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/28/21. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/9c8609a35611aa7f1a5b1cca2a15bb09b73c4f15
Thanks.
Luca Boccassi
---
From 9c8609a35611aa7f1a5b1cca2a15bb09b73c4f15 Mon Sep 17 00:00:00 2001
From: Dana Vardi <danat@marvell.com>
Date: Sun, 11 Jul 2021 16:11:43 +0300
Subject: [PATCH] net/mvpp2: fix port speed overflow
[ upstream commit 8fa07a68a6f842aa81b8949976e8088e2b6318a3 ]
ethtool_cmd_speed return uint32 and after the arithmetic
operation in mrvl_get_max_rate func the result is out of range.
Fixes: 429c394417 ("net/mvpp2: support traffic manager")
Signed-off-by: Dana Vardi <danat@marvell.com>
Reviewed-by: Liron Himi <lironh@marvell.com>
---
drivers/net/mvpp2/mrvl_tm.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/mvpp2/mrvl_tm.c b/drivers/net/mvpp2/mrvl_tm.c
index e98f576cfa..7e3c46f956 100644
--- a/drivers/net/mvpp2/mrvl_tm.c
+++ b/drivers/net/mvpp2/mrvl_tm.c
@@ -57,7 +57,7 @@ mrvl_get_max_rate(struct rte_eth_dev *dev, uint64_t *rate)
close(fd);
- *rate = ethtool_cmd_speed(&edata) * 1000 * 1000 / 8;
+ *rate = (uint64_t)ethtool_cmd_speed(&edata) * 1000 * 1000 / 8;
return 0;
}
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-07-26 13:53:16.451363970 +0100
+++ 0010-net-mvpp2-fix-port-speed-overflow.patch 2021-07-26 13:53:15.801291613 +0100
@@ -1 +1 @@
-From 8fa07a68a6f842aa81b8949976e8088e2b6318a3 Mon Sep 17 00:00:00 2001
+From 9c8609a35611aa7f1a5b1cca2a15bb09b73c4f15 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 8fa07a68a6f842aa81b8949976e8088e2b6318a3 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
^ permalink raw reply [flat|nested] 208+ messages in thread
* [dpdk-stable] patch 'net/mvpp2: fix configured state dependency' has been queued to stable release 20.11.3
2021-07-26 13:52 ` [dpdk-stable] patch 'net/bonding: fix error message on flow verify' " luca.boccassi
` (8 preceding siblings ...)
2021-07-26 13:52 ` [dpdk-stable] patch 'net/mvpp2: fix port speed overflow' " luca.boccassi
@ 2021-07-26 13:52 ` luca.boccassi
2021-07-26 13:52 ` [dpdk-stable] patch 'net/octeontx2: fix TM node statistics query' " luca.boccassi
` (47 subsequent siblings)
57 siblings, 0 replies; 208+ messages in thread
From: luca.boccassi @ 2021-07-26 13:52 UTC (permalink / raw)
To: Dana Vardi; +Cc: Liron Himi, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.3
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/28/21. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/6595f06986d7e8802ece9042191a614fc2675a86
Thanks.
Luca Boccassi
---
From 6595f06986d7e8802ece9042191a614fc2675a86 Mon Sep 17 00:00:00 2001
From: Dana Vardi <danat@marvell.com>
Date: Sun, 11 Jul 2021 16:12:49 +0300
Subject: [PATCH] net/mvpp2: fix configured state dependency
[ upstream commit e622c1a88e3507dc6d2c9dd6ec555905d1b5baf1 ]
Need to set configure flag to allow create and commit mrvl tm
hierarchy tree. tm configuration depends on parameters that are
being set in port configure stage, e.g. nb_tx_queues.
This also aligned with the tm api description.
Fixes: 429c394417 ("net/mvpp2: support traffic manager")
Signed-off-by: Dana Vardi <danat@marvell.com>
Reviewed-by: Liron Himi <lironh@marvell.com>
---
drivers/net/mvpp2/mrvl_ethdev.c | 12 ++++--
drivers/net/mvpp2/mrvl_ethdev.h | 3 +-
drivers/net/mvpp2/mrvl_tm.c | 65 +++++++++++++++++++++++++++++++++
3 files changed, 76 insertions(+), 4 deletions(-)
diff --git a/drivers/net/mvpp2/mrvl_ethdev.c b/drivers/net/mvpp2/mrvl_ethdev.c
index 6cd5acd337..7133d56852 100644
--- a/drivers/net/mvpp2/mrvl_ethdev.c
+++ b/drivers/net/mvpp2/mrvl_ethdev.c
@@ -398,12 +398,18 @@ mrvl_dev_configure(struct rte_eth_dev *dev)
dev->data->dev_conf.rxmode.mq_mode == ETH_MQ_RX_RSS) {
MRVL_LOG(WARNING, "Disabling hash for 1 rx queue");
priv->ppio_params.inqs_params.hash_type = PP2_PPIO_HASH_T_NONE;
-
+ priv->configured = 1;
return 0;
}
- return mrvl_configure_rss(priv,
- &dev->data->dev_conf.rx_adv_conf.rss_conf);
+ ret = mrvl_configure_rss(priv,
+ &dev->data->dev_conf.rx_adv_conf.rss_conf);
+ if (ret < 0)
+ return ret;
+
+ priv->configured = 1;
+
+ return 0;
}
/**
diff --git a/drivers/net/mvpp2/mrvl_ethdev.h b/drivers/net/mvpp2/mrvl_ethdev.h
index eee5182ce8..c7ab0e4932 100644
--- a/drivers/net/mvpp2/mrvl_ethdev.h
+++ b/drivers/net/mvpp2/mrvl_ethdev.h
@@ -208,9 +208,10 @@ struct mrvl_priv {
LIST_HEAD(shaper_profiles, mrvl_tm_shaper_profile) shaper_profiles;
LIST_HEAD(nodes, mrvl_tm_node) nodes;
uint64_t rate_max;
+
+ uint8_t configured; /** indicates if device has been configured */
};
-/** Flow operations forward declaration. */
extern const struct rte_flow_ops mrvl_flow_ops;
/** Meter operations forward declaration. */
diff --git a/drivers/net/mvpp2/mrvl_tm.c b/drivers/net/mvpp2/mrvl_tm.c
index 7e3c46f956..9fac80b867 100644
--- a/drivers/net/mvpp2/mrvl_tm.c
+++ b/drivers/net/mvpp2/mrvl_tm.c
@@ -146,6 +146,11 @@ mrvl_node_type_get(struct rte_eth_dev *dev, uint32_t node_id, int *is_leaf,
struct mrvl_priv *priv = dev->data->dev_private;
struct mrvl_tm_node *node;
+ if (!priv->configured)
+ return -rte_tm_error_set(error, ENODEV,
+ RTE_TM_ERROR_TYPE_UNSPECIFIED,
+ NULL, "Port didn't configured\n");
+
if (!is_leaf)
return -rte_tm_error_set(error, EINVAL,
RTE_TM_ERROR_TYPE_UNSPECIFIED,
@@ -177,6 +182,11 @@ mrvl_capabilities_get(struct rte_eth_dev *dev,
{
struct mrvl_priv *priv = dev->data->dev_private;
+ if (!priv->configured)
+ return -rte_tm_error_set(error, ENODEV,
+ RTE_TM_ERROR_TYPE_UNSPECIFIED,
+ NULL, "Port didn't configured\n");
+
if (!cap)
return -rte_tm_error_set(error, EINVAL,
RTE_TM_ERROR_TYPE_UNSPECIFIED,
@@ -228,6 +238,11 @@ mrvl_level_capabilities_get(struct rte_eth_dev *dev,
{
struct mrvl_priv *priv = dev->data->dev_private;
+ if (!priv->configured)
+ return -rte_tm_error_set(error, ENODEV,
+ RTE_TM_ERROR_TYPE_UNSPECIFIED,
+ NULL, "Port didn't configured\n");
+
if (!cap)
return -rte_tm_error_set(error, EINVAL,
RTE_TM_ERROR_TYPE_UNSPECIFIED,
@@ -294,6 +309,11 @@ mrvl_node_capabilities_get(struct rte_eth_dev *dev, uint32_t node_id,
struct mrvl_priv *priv = dev->data->dev_private;
struct mrvl_tm_node *node;
+ if (!priv->configured)
+ return -rte_tm_error_set(error, ENODEV,
+ RTE_TM_ERROR_TYPE_UNSPECIFIED,
+ NULL, "Port didn't configured\n");
+
if (!cap)
return -rte_tm_error_set(error, EINVAL,
RTE_TM_ERROR_TYPE_UNSPECIFIED,
@@ -366,6 +386,11 @@ mrvl_shaper_profile_add(struct rte_eth_dev *dev, uint32_t shaper_profile_id,
struct mrvl_priv *priv = dev->data->dev_private;
struct mrvl_tm_shaper_profile *profile;
+ if (!priv->configured)
+ return -rte_tm_error_set(error, ENODEV,
+ RTE_TM_ERROR_TYPE_UNSPECIFIED,
+ NULL, "Port didn't configured\n");
+
if (!params)
return -rte_tm_error_set(error, EINVAL,
RTE_TM_ERROR_TYPE_UNSPECIFIED,
@@ -434,6 +459,11 @@ mrvl_shaper_profile_delete(struct rte_eth_dev *dev, uint32_t shaper_profile_id,
struct mrvl_priv *priv = dev->data->dev_private;
struct mrvl_tm_shaper_profile *profile;
+ if (!priv->configured)
+ return -rte_tm_error_set(error, ENODEV,
+ RTE_TM_ERROR_TYPE_UNSPECIFIED,
+ NULL, "Port didn't configured\n");
+
profile = mrvl_shaper_profile_from_id(priv, shaper_profile_id);
if (!profile)
return -rte_tm_error_set(error, ENODEV,
@@ -580,6 +610,11 @@ mrvl_node_add(struct rte_eth_dev *dev, uint32_t node_id,
struct mrvl_tm_node *node, *parent = NULL;
int ret;
+ if (!priv->configured)
+ return -rte_tm_error_set(error, ENODEV,
+ RTE_TM_ERROR_TYPE_UNSPECIFIED,
+ NULL, "Port didn't configured\n");
+
if (priv->ppio)
return -rte_tm_error_set(error, EPERM,
RTE_TM_ERROR_TYPE_UNSPECIFIED,
@@ -665,6 +700,11 @@ mrvl_node_delete(struct rte_eth_dev *dev, uint32_t node_id,
struct mrvl_priv *priv = dev->data->dev_private;
struct mrvl_tm_node *node;
+ if (!priv->configured)
+ return -rte_tm_error_set(error, ENODEV,
+ RTE_TM_ERROR_TYPE_UNSPECIFIED,
+ NULL, "Port didn't configured\n");
+
if (priv->ppio) {
return -rte_tm_error_set(error, EPERM,
RTE_TM_ERROR_TYPE_UNSPECIFIED,
@@ -729,6 +769,11 @@ mrvl_node_suspend(struct rte_eth_dev *dev, uint32_t node_id,
struct mrvl_tm_node *node, *tmp;
int ret;
+ if (!priv->configured)
+ return -rte_tm_error_set(error, ENODEV,
+ RTE_TM_ERROR_TYPE_UNSPECIFIED,
+ NULL, "Port didn't configured\n");
+
node = mrvl_node_from_id(priv, node_id);
if (!node)
return -rte_tm_error_set(error, ENODEV,
@@ -770,6 +815,11 @@ mrvl_node_resume(struct rte_eth_dev *dev, uint32_t node_id,
struct mrvl_tm_node *node;
int ret;
+ if (!priv->configured)
+ return -rte_tm_error_set(error, ENODEV,
+ RTE_TM_ERROR_TYPE_UNSPECIFIED,
+ NULL, "Port didn't configured\n");
+
node = mrvl_node_from_id(priv, node_id);
if (!node)
return -rte_tm_error_set(error, ENODEV,
@@ -806,6 +856,11 @@ mrvl_hierarchy_commit(struct rte_eth_dev *dev, int clear_on_fail,
struct mrvl_tm_node *node;
int ret;
+ if (!priv->configured)
+ return -rte_tm_error_set(error, ENODEV,
+ RTE_TM_ERROR_TYPE_UNSPECIFIED,
+ NULL, "Port didn't configured\n");
+
if (priv->ppio) {
ret = -rte_tm_error_set(error, EPERM,
RTE_TM_ERROR_TYPE_UNSPECIFIED,
@@ -912,6 +967,11 @@ mrvl_node_stats_read(struct rte_eth_dev *dev, uint32_t node_id,
struct mrvl_tm_node *node;
int ret;
+ if (!priv->configured)
+ return -rte_tm_error_set(error, ENODEV,
+ RTE_TM_ERROR_TYPE_UNSPECIFIED,
+ NULL, "Port didn't configured\n");
+
if (!priv->ppio) {
return -rte_tm_error_set(error, EPERM,
RTE_TM_ERROR_TYPE_UNSPECIFIED,
@@ -981,6 +1041,11 @@ mrvl_node_stats_update(struct rte_eth_dev *dev, uint32_t node_id,
struct mrvl_priv *priv = dev->data->dev_private;
struct mrvl_tm_node *node;
+ if (!priv->configured)
+ return -rte_tm_error_set(error, ENODEV,
+ RTE_TM_ERROR_TYPE_UNSPECIFIED,
+ NULL, "Port didn't configured\n");
+
node = mrvl_node_from_id(priv, node_id);
if (!node)
return -rte_tm_error_set(error, ENODEV,
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-07-26 13:53:16.492729315 +0100
+++ 0011-net-mvpp2-fix-configured-state-dependency.patch 2021-07-26 13:53:15.809291782 +0100
@@ -1 +1 @@
-From e622c1a88e3507dc6d2c9dd6ec555905d1b5baf1 Mon Sep 17 00:00:00 2001
+From 6595f06986d7e8802ece9042191a614fc2675a86 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit e622c1a88e3507dc6d2c9dd6ec555905d1b5baf1 ]
+
@@ -12 +13,0 @@
-Cc: stable@dpdk.org
@@ -17,2 +18,2 @@
- drivers/net/mvpp2/mrvl_ethdev.c | 10 ++++-
- drivers/net/mvpp2/mrvl_ethdev.h | 2 +
+ drivers/net/mvpp2/mrvl_ethdev.c | 12 ++++--
+ drivers/net/mvpp2/mrvl_ethdev.h | 3 +-
@@ -20 +21 @@
- 3 files changed, 75 insertions(+), 2 deletions(-)
+ 3 files changed, 76 insertions(+), 4 deletions(-)
@@ -23 +24 @@
-index 63d348e279..1802695a0e 100644
+index 6cd5acd337..7133d56852 100644
@@ -26 +27 @@
-@@ -533,12 +533,18 @@ mrvl_dev_configure(struct rte_eth_dev *dev)
+@@ -398,12 +398,18 @@ mrvl_dev_configure(struct rte_eth_dev *dev)
@@ -35,0 +37 @@
+- &dev->data->dev_conf.rx_adv_conf.rss_conf);
@@ -37 +39 @@
- &dev->data->dev_conf.rx_adv_conf.rss_conf);
++ &dev->data->dev_conf.rx_adv_conf.rss_conf);
@@ -48 +50 @@
-index fda239a53c..426cf33548 100644
+index eee5182ce8..c7ab0e4932 100644
@@ -51,4 +53,4 @@
-@@ -186,6 +186,8 @@ struct mrvl_priv {
-
- uint8_t forward_bad_frames;
- uint32_t fill_bpool_buffs;
+@@ -208,9 +208,10 @@ struct mrvl_priv {
+ LIST_HEAD(shaper_profiles, mrvl_tm_shaper_profile) shaper_profiles;
+ LIST_HEAD(nodes, mrvl_tm_node) nodes;
+ uint64_t rate_max;
@@ -59 +61,4 @@
- /** Flow operations forward declaration. */
+-/** Flow operations forward declaration. */
+ extern const struct rte_flow_ops mrvl_flow_ops;
+
+ /** Meter operations forward declaration. */
^ permalink raw reply [flat|nested] 208+ messages in thread
* [dpdk-stable] patch 'net/octeontx2: fix TM node statistics query' has been queued to stable release 20.11.3
2021-07-26 13:52 ` [dpdk-stable] patch 'net/bonding: fix error message on flow verify' " luca.boccassi
` (9 preceding siblings ...)
2021-07-26 13:52 ` [dpdk-stable] patch 'net/mvpp2: fix configured state dependency' " luca.boccassi
@ 2021-07-26 13:52 ` luca.boccassi
2021-07-26 13:52 ` [dpdk-stable] patch 'net/bnxt: fix missing barriers in completion handling' " luca.boccassi
` (46 subsequent siblings)
57 siblings, 0 replies; 208+ messages in thread
From: luca.boccassi @ 2021-07-26 13:52 UTC (permalink / raw)
To: Satha Rao; +Cc: Jerin Jacob, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.3
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/28/21. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/f58d25a57902f39e49a7b4c2d37750238804f1a5
Thanks.
Luca Boccassi
---
From f58d25a57902f39e49a7b4c2d37750238804f1a5 Mon Sep 17 00:00:00 2001
From: Satha Rao <skoteshwar@marvell.com>
Date: Wed, 7 Jul 2021 12:49:16 -0400
Subject: [PATCH] net/octeontx2: fix TM node statistics query
[ upstream commit d9dda782ac08a47ca092a0c499b21635b23e6644 ]
Until hierarchy committed TM hardware resources are not allocated
for node.
This patch check for status of HW resources before reading statistics.
Fixes: 1e25d57fae38 ("net/octeontx2: add TM stats and shaper profile")
Signed-off-by: Satha Rao <skoteshwar@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
---
drivers/net/octeontx2/otx2_tm.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/drivers/net/octeontx2/otx2_tm.c b/drivers/net/octeontx2/otx2_tm.c
index fdd56697f1..6aff1f9587 100644
--- a/drivers/net/octeontx2/otx2_tm.c
+++ b/drivers/net/octeontx2/otx2_tm.c
@@ -2769,6 +2769,12 @@ otx2_nix_tm_node_stats_read(struct rte_eth_dev *eth_dev, uint32_t node_id,
return -EINVAL;
}
+ if (!(tm_node->flags & NIX_TM_NODE_HWRES)) {
+ error->type = RTE_TM_ERROR_TYPE_NODE_ID;
+ error->message = "HW resources not allocated";
+ return -EINVAL;
+ }
+
/* Stats support only for leaf node or TL1 root */
if (nix_tm_is_leaf(dev, tm_node->lvl)) {
reg = (((uint64_t)tm_node->id) << 32);
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-07-26 13:53:16.537718968 +0100
+++ 0012-net-octeontx2-fix-TM-node-statistics-query.patch 2021-07-26 13:53:15.813291866 +0100
@@ -1 +1 @@
-From d9dda782ac08a47ca092a0c499b21635b23e6644 Mon Sep 17 00:00:00 2001
+From f58d25a57902f39e49a7b4c2d37750238804f1a5 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit d9dda782ac08a47ca092a0c499b21635b23e6644 ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
^ permalink raw reply [flat|nested] 208+ messages in thread
* [dpdk-stable] patch 'net/bnxt: fix missing barriers in completion handling' has been queued to stable release 20.11.3
2021-07-26 13:52 ` [dpdk-stable] patch 'net/bonding: fix error message on flow verify' " luca.boccassi
` (10 preceding siblings ...)
2021-07-26 13:52 ` [dpdk-stable] patch 'net/octeontx2: fix TM node statistics query' " luca.boccassi
@ 2021-07-26 13:52 ` luca.boccassi
2021-07-26 13:52 ` [dpdk-stable] patch 'net/bnxt: fix nested lock during bonding' " luca.boccassi
` (45 subsequent siblings)
57 siblings, 0 replies; 208+ messages in thread
From: luca.boccassi @ 2021-07-26 13:52 UTC (permalink / raw)
To: Lance Richardson; +Cc: Ajit Khaparde, Ruifeng Wang, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.3
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/28/21. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/5584a03fe99d651f57b600048189c38a1a3a3b34
Thanks.
Luca Boccassi
---
From 5584a03fe99d651f57b600048189c38a1a3a3b34 Mon Sep 17 00:00:00 2001
From: Lance Richardson <lance.richardson@broadcom.com>
Date: Fri, 9 Jul 2021 12:38:48 -0400
Subject: [PATCH] net/bnxt: fix missing barriers in completion handling
[ upstream commit 5ed30db87fa810e210fec27a417a3f0d69f7b425 ]
Ensure that Rx/Tx/Async completion entry fields are accessed
only after the completion's valid flag has been loaded and
verified. This is needed for correct operation on systems that
use relaxed memory consistency models.
Fixes: 2eb53b134aae ("net/bnxt: add initial Rx code")
Fixes: 6eb3cc2294fd ("net/bnxt: add initial Tx code")
Signed-off-by: Lance Richardson <lance.richardson@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>
---
drivers/net/bnxt/bnxt_cpr.h | 36 ++++++++++++++++++++++++---
drivers/net/bnxt/bnxt_ethdev.c | 16 ++++++------
drivers/net/bnxt/bnxt_irq.c | 7 +++---
drivers/net/bnxt/bnxt_rxr.c | 9 ++++---
drivers/net/bnxt/bnxt_rxtx_vec_neon.c | 2 +-
drivers/net/bnxt/bnxt_rxtx_vec_sse.c | 2 +-
drivers/net/bnxt/bnxt_txr.c | 2 +-
7 files changed, 53 insertions(+), 21 deletions(-)
diff --git a/drivers/net/bnxt/bnxt_cpr.h b/drivers/net/bnxt/bnxt_cpr.h
index c769bde619..fedfb47f2f 100644
--- a/drivers/net/bnxt/bnxt_cpr.h
+++ b/drivers/net/bnxt/bnxt_cpr.h
@@ -8,13 +8,10 @@
#include <stdbool.h>
#include <rte_io.h>
+#include "hsi_struct_def_dpdk.h"
struct bnxt_db_info;
-#define CMP_VALID(cmp, raw_cons, ring) \
- (!!(rte_le_to_cpu_32(((struct cmpl_base *)(cmp))->info3_v) & \
- CMPL_BASE_V) == !((raw_cons) & ((ring)->ring_size)))
-
#define CMPL_VALID(cmp, v) \
(!!(rte_le_to_cpu_32(((struct cmpl_base *)(cmp))->info3_v) & \
CMPL_BASE_V) == !(v))
@@ -131,4 +128,35 @@ bool bnxt_is_recovery_enabled(struct bnxt *bp);
bool bnxt_is_master_func(struct bnxt *bp);
void bnxt_stop_rxtx(struct bnxt *bp);
+
+/**
+ * Check validity of a completion ring entry. If the entry is valid, include a
+ * C11 __ATOMIC_ACQUIRE fence to ensure that subsequent loads of fields in the
+ * completion are not hoisted by the compiler or by the CPU to come before the
+ * loading of the "valid" field.
+ *
+ * Note: the caller must not access any fields in the specified completion
+ * entry prior to calling this function.
+ *
+ * @param cmpl
+ * Pointer to an entry in the completion ring.
+ * @param raw_cons
+ * Raw consumer index of entry in completion ring.
+ * @param ring_size
+ * Size of completion ring.
+ */
+static __rte_always_inline bool
+bnxt_cpr_cmp_valid(const void *cmpl, uint32_t raw_cons, uint32_t ring_size)
+{
+ const struct cmpl_base *c = cmpl;
+ bool expected, valid;
+
+ expected = !(raw_cons & ring_size);
+ valid = !!(rte_le_to_cpu_32(c->info3_v) & CMPL_BASE_V);
+ if (valid == expected) {
+ rte_atomic_thread_fence(__ATOMIC_ACQUIRE);
+ return true;
+ }
+ return false;
+}
#endif
diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
index 25df887bfb..fce5e3a628 100644
--- a/drivers/net/bnxt/bnxt_ethdev.c
+++ b/drivers/net/bnxt/bnxt_ethdev.c
@@ -3041,7 +3041,7 @@ bnxt_rx_queue_count_op(struct rte_eth_dev *dev, uint16_t rx_queue_id)
{
struct bnxt *bp = (struct bnxt *)dev->data->dev_private;
struct bnxt_cp_ring_info *cpr;
- uint32_t desc = 0, raw_cons;
+ uint32_t desc = 0, raw_cons, cp_ring_size;
struct bnxt_rx_queue *rxq;
struct rx_pkt_cmpl *rxcmp;
int rc;
@@ -3053,6 +3053,7 @@ bnxt_rx_queue_count_op(struct rte_eth_dev *dev, uint16_t rx_queue_id)
rxq = dev->data->rx_queues[rx_queue_id];
cpr = rxq->cp_ring;
raw_cons = cpr->cp_raw_cons;
+ cp_ring_size = cpr->cp_ring_struct->ring_size;
while (1) {
uint32_t agg_cnt, cons, cmpl_type;
@@ -3060,7 +3061,7 @@ bnxt_rx_queue_count_op(struct rte_eth_dev *dev, uint16_t rx_queue_id)
cons = RING_CMP(cpr->cp_ring_struct, raw_cons);
rxcmp = (struct rx_pkt_cmpl *)&cpr->cp_desc_ring[cons];
- if (!CMP_VALID(rxcmp, raw_cons, cpr->cp_ring_struct))
+ if (!bnxt_cpr_cmp_valid(rxcmp, raw_cons, cp_ring_size))
break;
cmpl_type = CMP_TYPE(rxcmp);
@@ -3104,7 +3105,7 @@ bnxt_rx_descriptor_status_op(void *rx_queue, uint16_t offset)
struct bnxt_rx_queue *rxq = rx_queue;
struct bnxt_cp_ring_info *cpr;
struct bnxt_rx_ring_info *rxr;
- uint32_t desc, raw_cons;
+ uint32_t desc, raw_cons, cp_ring_size;
struct bnxt *bp = rxq->bp;
struct rx_pkt_cmpl *rxcmp;
int rc;
@@ -3118,6 +3119,7 @@ bnxt_rx_descriptor_status_op(void *rx_queue, uint16_t offset)
rxr = rxq->rx_ring;
cpr = rxq->cp_ring;
+ cp_ring_size = cpr->cp_ring_struct->ring_size;
/*
* For the vector receive case, the completion at the requested
@@ -3134,7 +3136,7 @@ bnxt_rx_descriptor_status_op(void *rx_queue, uint16_t offset)
cons = RING_CMP(cpr->cp_ring_struct, raw_cons);
rxcmp = (struct rx_pkt_cmpl *)&cpr->cp_desc_ring[cons];
- if (CMP_VALID(rxcmp, raw_cons, cpr->cp_ring_struct))
+ if (bnxt_cpr_cmp_valid(rxcmp, raw_cons, cp_ring_size))
return RTE_ETH_RX_DESC_DONE;
/* Check whether rx desc has an mbuf attached. */
@@ -3160,7 +3162,7 @@ bnxt_rx_descriptor_status_op(void *rx_queue, uint16_t offset)
cons = RING_CMP(cpr->cp_ring_struct, raw_cons);
rxcmp = (struct rx_pkt_cmpl *)&cpr->cp_desc_ring[cons];
- if (!CMP_VALID(rxcmp, raw_cons, cpr->cp_ring_struct))
+ if (!bnxt_cpr_cmp_valid(rxcmp, raw_cons, cp_ring_size))
break;
cmpl_type = CMP_TYPE(rxcmp);
@@ -3214,7 +3216,6 @@ bnxt_tx_descriptor_status_op(void *tx_queue, uint16_t offset)
struct bnxt_tx_queue *txq = (struct bnxt_tx_queue *)tx_queue;
struct bnxt_cp_ring_info *cpr = txq->cp_ring;
uint32_t ring_mask, raw_cons, nb_tx_pkts = 0;
- struct bnxt_ring *cp_ring_struct;
struct cmpl_base *cp_desc_ring;
int rc;
@@ -3231,7 +3232,6 @@ bnxt_tx_descriptor_status_op(void *tx_queue, uint16_t offset)
raw_cons = cpr->cp_raw_cons;
cp_desc_ring = cpr->cp_desc_ring;
- cp_ring_struct = cpr->cp_ring_struct;
ring_mask = cpr->cp_ring_struct->ring_mask;
/* Check to see if hw has posted a completion for the descriptor. */
@@ -3242,7 +3242,7 @@ bnxt_tx_descriptor_status_op(void *tx_queue, uint16_t offset)
cons = RING_CMPL(ring_mask, raw_cons);
txcmp = (struct tx_cmpl *)&cp_desc_ring[cons];
- if (!CMP_VALID(txcmp, raw_cons, cp_ring_struct))
+ if (!bnxt_cpr_cmp_valid(txcmp, raw_cons, ring_mask + 1))
break;
if (CMP_TYPE(txcmp) == TX_CMPL_TYPE_TX_L2)
diff --git a/drivers/net/bnxt/bnxt_irq.c b/drivers/net/bnxt/bnxt_irq.c
index 93779f4e0c..14075e41d2 100644
--- a/drivers/net/bnxt/bnxt_irq.c
+++ b/drivers/net/bnxt/bnxt_irq.c
@@ -21,10 +21,10 @@ void bnxt_int_handler(void *param)
{
struct rte_eth_dev *eth_dev = (struct rte_eth_dev *)param;
struct bnxt *bp = eth_dev->data->dev_private;
+ uint32_t cons, raw_cons, cp_ring_size;
struct bnxt_cp_ring_info *cpr;
struct cmpl_base *cmp;
- uint32_t raw_cons;
- uint32_t cons;
+
if (bp == NULL)
return;
@@ -33,6 +33,7 @@ void bnxt_int_handler(void *param)
return;
raw_cons = cpr->cp_raw_cons;
+ cp_ring_size = cpr->cp_ring_struct->ring_size;
pthread_mutex_lock(&bp->def_cp_lock);
while (1) {
if (!cpr || !cpr->cp_ring_struct || !cpr->cp_db.doorbell) {
@@ -48,7 +49,7 @@ void bnxt_int_handler(void *param)
cons = RING_CMP(cpr->cp_ring_struct, raw_cons);
cmp = &cpr->cp_desc_ring[cons];
- if (!CMP_VALID(cmp, raw_cons, cpr->cp_ring_struct))
+ if (!bnxt_cpr_cmp_valid(cmp, raw_cons, cp_ring_size))
break;
bnxt_event_hwrm_resp_handler(bp, cmp);
diff --git a/drivers/net/bnxt/bnxt_rxr.c b/drivers/net/bnxt/bnxt_rxr.c
index 54c9df06e1..41be74284b 100644
--- a/drivers/net/bnxt/bnxt_rxr.c
+++ b/drivers/net/bnxt/bnxt_rxr.c
@@ -242,7 +242,8 @@ static int bnxt_agg_bufs_valid(struct bnxt_cp_ring_info *cpr,
cpr->valid = FLIP_VALID(raw_cp_cons,
cpr->cp_ring_struct->ring_mask,
cpr->valid);
- return CMP_VALID(agg_cmpl, raw_cp_cons, cpr->cp_ring_struct);
+ return bnxt_cpr_cmp_valid(agg_cmpl, raw_cp_cons,
+ cpr->cp_ring_struct->ring_size);
}
/* TPA consume agg buffer out of order, allocate connected data only */
@@ -827,7 +828,8 @@ static int bnxt_rx_pkt(struct rte_mbuf **rx_pkt,
cp_cons = RING_CMP(cpr->cp_ring_struct, tmp_raw_cons);
rxcmp1 = (struct rx_pkt_cmpl_hi *)&cpr->cp_desc_ring[cp_cons];
- if (!CMP_VALID(rxcmp1, tmp_raw_cons, cpr->cp_ring_struct))
+ if (!bnxt_cpr_cmp_valid(rxcmp1, tmp_raw_cons,
+ cpr->cp_ring_struct->ring_size))
return -EBUSY;
cpr->valid = FLIP_VALID(cp_cons,
@@ -1006,7 +1008,8 @@ uint16_t bnxt_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts,
cons = RING_CMP(cpr->cp_ring_struct, raw_cons);
rxcmp = (struct rx_pkt_cmpl *)&cpr->cp_desc_ring[cons];
- if (!CMP_VALID(rxcmp, raw_cons, cpr->cp_ring_struct))
+ if (!bnxt_cpr_cmp_valid(rxcmp, raw_cons,
+ cpr->cp_ring_struct->ring_size))
break;
cpr->valid = FLIP_VALID(cons,
cpr->cp_ring_struct->ring_mask,
diff --git a/drivers/net/bnxt/bnxt_rxtx_vec_neon.c b/drivers/net/bnxt/bnxt_rxtx_vec_neon.c
index 3292852c42..3cb94926fe 100644
--- a/drivers/net/bnxt/bnxt_rxtx_vec_neon.c
+++ b/drivers/net/bnxt/bnxt_rxtx_vec_neon.c
@@ -347,7 +347,7 @@ bnxt_handle_tx_cp_vec(struct bnxt_tx_queue *txq)
cons = RING_CMPL(ring_mask, raw_cons);
txcmp = (struct tx_cmpl *)&cp_desc_ring[cons];
- if (!CMP_VALID(txcmp, raw_cons, cp_ring_struct))
+ if (!bnxt_cpr_cmp_valid(txcmp, raw_cons, ring_mask + 1))
break;
if (likely(CMP_TYPE(txcmp) == TX_CMPL_TYPE_TX_L2))
diff --git a/drivers/net/bnxt/bnxt_rxtx_vec_sse.c b/drivers/net/bnxt/bnxt_rxtx_vec_sse.c
index ae73455c63..5974b475bf 100644
--- a/drivers/net/bnxt/bnxt_rxtx_vec_sse.c
+++ b/drivers/net/bnxt/bnxt_rxtx_vec_sse.c
@@ -329,7 +329,7 @@ bnxt_handle_tx_cp_vec(struct bnxt_tx_queue *txq)
cons = RING_CMPL(ring_mask, raw_cons);
txcmp = (struct tx_cmpl *)&cp_desc_ring[cons];
- if (!CMP_VALID(txcmp, raw_cons, cp_ring_struct))
+ if (!bnxt_cpr_cmp_valid(txcmp, raw_cons, ring_mask + 1))
break;
if (likely(CMP_TYPE(txcmp) == TX_CMPL_TYPE_TX_L2))
diff --git a/drivers/net/bnxt/bnxt_txr.c b/drivers/net/bnxt/bnxt_txr.c
index 412bc59f3b..ad78fa1bea 100644
--- a/drivers/net/bnxt/bnxt_txr.c
+++ b/drivers/net/bnxt/bnxt_txr.c
@@ -443,7 +443,7 @@ static int bnxt_handle_tx_cp(struct bnxt_tx_queue *txq)
cons = RING_CMPL(ring_mask, raw_cons);
txcmp = (struct tx_cmpl *)&cpr->cp_desc_ring[cons];
- if (!CMP_VALID(txcmp, raw_cons, cp_ring_struct))
+ if (!bnxt_cpr_cmp_valid(txcmp, raw_cons, ring_mask + 1))
break;
opaque = rte_le_to_cpu_32(txcmp->opaque);
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-07-26 13:53:16.581330845 +0100
+++ 0013-net-bnxt-fix-missing-barriers-in-completion-handling.patch 2021-07-26 13:53:15.821292034 +0100
@@ -1 +1 @@
-From 5ed30db87fa810e210fec27a417a3f0d69f7b425 Mon Sep 17 00:00:00 2001
+From 5584a03fe99d651f57b600048189c38a1a3a3b34 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 5ed30db87fa810e210fec27a417a3f0d69f7b425 ]
+
@@ -13 +14,0 @@
-Cc: stable@dpdk.org
@@ -23 +23,0 @@
- drivers/net/bnxt/bnxt_rxtx_vec_avx2.c | 2 +-
@@ -27 +27 @@
- 8 files changed, 54 insertions(+), 22 deletions(-)
+ 7 files changed, 53 insertions(+), 21 deletions(-)
@@ -30 +30 @@
-index 2a56ec52ce..4095c8c40d 100644
+index c769bde619..fedfb47f2f 100644
@@ -45,4 +45,4 @@
- #define CMP_TYPE(cmp) \
- (((struct cmpl_base *)cmp)->type & CMPL_BASE_TYPE_MASK)
-
-@@ -121,4 +118,35 @@ bool bnxt_is_recovery_enabled(struct bnxt *bp);
+ #define CMPL_VALID(cmp, v) \
+ (!!(rte_le_to_cpu_32(((struct cmpl_base *)(cmp))->info3_v) & \
+ CMPL_BASE_V) == !(v))
+@@ -131,4 +128,35 @@ bool bnxt_is_recovery_enabled(struct bnxt *bp);
@@ -85 +85 @@
-index ed09f1bf52..ee69296926 100644
+index 25df887bfb..fce5e3a628 100644
@@ -88 +88 @@
-@@ -3126,7 +3126,7 @@ bnxt_rx_queue_count_op(struct rte_eth_dev *dev, uint16_t rx_queue_id)
+@@ -3041,7 +3041,7 @@ bnxt_rx_queue_count_op(struct rte_eth_dev *dev, uint16_t rx_queue_id)
@@ -97 +97 @@
-@@ -3138,6 +3138,7 @@ bnxt_rx_queue_count_op(struct rte_eth_dev *dev, uint16_t rx_queue_id)
+@@ -3053,6 +3053,7 @@ bnxt_rx_queue_count_op(struct rte_eth_dev *dev, uint16_t rx_queue_id)
@@ -105 +105 @@
-@@ -3145,7 +3146,7 @@ bnxt_rx_queue_count_op(struct rte_eth_dev *dev, uint16_t rx_queue_id)
+@@ -3060,7 +3061,7 @@ bnxt_rx_queue_count_op(struct rte_eth_dev *dev, uint16_t rx_queue_id)
@@ -114 +114 @@
-@@ -3189,7 +3190,7 @@ bnxt_rx_descriptor_status_op(void *rx_queue, uint16_t offset)
+@@ -3104,7 +3105,7 @@ bnxt_rx_descriptor_status_op(void *rx_queue, uint16_t offset)
@@ -123 +123 @@
-@@ -3203,6 +3204,7 @@ bnxt_rx_descriptor_status_op(void *rx_queue, uint16_t offset)
+@@ -3118,6 +3119,7 @@ bnxt_rx_descriptor_status_op(void *rx_queue, uint16_t offset)
@@ -131 +131 @@
-@@ -3219,7 +3221,7 @@ bnxt_rx_descriptor_status_op(void *rx_queue, uint16_t offset)
+@@ -3134,7 +3136,7 @@ bnxt_rx_descriptor_status_op(void *rx_queue, uint16_t offset)
@@ -140 +140 @@
-@@ -3245,7 +3247,7 @@ bnxt_rx_descriptor_status_op(void *rx_queue, uint16_t offset)
+@@ -3160,7 +3162,7 @@ bnxt_rx_descriptor_status_op(void *rx_queue, uint16_t offset)
@@ -149 +149 @@
-@@ -3299,7 +3301,6 @@ bnxt_tx_descriptor_status_op(void *tx_queue, uint16_t offset)
+@@ -3214,7 +3216,6 @@ bnxt_tx_descriptor_status_op(void *tx_queue, uint16_t offset)
@@ -157 +157 @@
-@@ -3316,7 +3317,6 @@ bnxt_tx_descriptor_status_op(void *tx_queue, uint16_t offset)
+@@ -3231,7 +3232,6 @@ bnxt_tx_descriptor_status_op(void *tx_queue, uint16_t offset)
@@ -165 +165 @@
-@@ -3327,7 +3327,7 @@ bnxt_tx_descriptor_status_op(void *tx_queue, uint16_t offset)
+@@ -3242,7 +3242,7 @@ bnxt_tx_descriptor_status_op(void *tx_queue, uint16_t offset)
@@ -175 +175 @@
-index fd8b8fac98..ebdac8385d 100644
+index 93779f4e0c..14075e41d2 100644
@@ -209 +209 @@
-index 0dee73af86..aea71703d1 100644
+index 54c9df06e1..41be74284b 100644
@@ -212,4 +212,4 @@
-@@ -297,7 +297,8 @@ static int bnxt_agg_bufs_valid(struct bnxt_cp_ring_info *cpr,
- raw_cp_cons = ADV_RAW_CMP(raw_cp_cons, agg_bufs);
- last_cp_cons = RING_CMP(cpr->cp_ring_struct, raw_cp_cons);
- agg_cmpl = (struct rx_pkt_cmpl *)&cpr->cp_desc_ring[last_cp_cons];
+@@ -242,7 +242,8 @@ static int bnxt_agg_bufs_valid(struct bnxt_cp_ring_info *cpr,
+ cpr->valid = FLIP_VALID(raw_cp_cons,
+ cpr->cp_ring_struct->ring_mask,
+ cpr->valid);
@@ -222 +222 @@
-@@ -892,7 +893,8 @@ static int bnxt_rx_pkt(struct rte_mbuf **rx_pkt,
+@@ -827,7 +828,8 @@ static int bnxt_rx_pkt(struct rte_mbuf **rx_pkt,
@@ -231,2 +231,2 @@
- if (cmp_type == RX_TPA_START_CMPL_TYPE_RX_TPA_START ||
-@@ -1077,7 +1079,8 @@ uint16_t bnxt_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts,
+ cpr->valid = FLIP_VALID(cp_cons,
+@@ -1006,7 +1008,8 @@ uint16_t bnxt_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts,
@@ -240,15 +240,2 @@
- if (CMP_TYPE(rxcmp) == CMPL_BASE_TYPE_HWRM_DONE) {
- PMD_DRV_LOG(ERR, "Rx flush done\n");
-diff --git a/drivers/net/bnxt/bnxt_rxtx_vec_avx2.c b/drivers/net/bnxt/bnxt_rxtx_vec_avx2.c
-index a06dfec90e..d08854ff61 100644
---- a/drivers/net/bnxt/bnxt_rxtx_vec_avx2.c
-+++ b/drivers/net/bnxt/bnxt_rxtx_vec_avx2.c
-@@ -408,7 +408,7 @@ bnxt_handle_tx_cp_vec(struct bnxt_tx_queue *txq)
- cons = RING_CMPL(ring_mask, raw_cons);
- txcmp = (struct tx_cmpl *)&cp_desc_ring[cons];
-
-- if (!CMP_VALID(txcmp, raw_cons, cp_ring_struct))
-+ if (!bnxt_cpr_cmp_valid(txcmp, raw_cons, ring_mask + 1))
- break;
-
- nb_tx_pkts += txcmp->opaque;
+ cpr->valid = FLIP_VALID(cons,
+ cpr->cp_ring_struct->ring_mask,
@@ -256 +243 @@
-index 263e6ec3c1..13211060cf 100644
+index 3292852c42..3cb94926fe 100644
@@ -259 +246 @@
-@@ -339,7 +339,7 @@ bnxt_handle_tx_cp_vec(struct bnxt_tx_queue *txq)
+@@ -347,7 +347,7 @@ bnxt_handle_tx_cp_vec(struct bnxt_tx_queue *txq)
@@ -269 +256 @@
-index 9a53d1fba0..6e56305326 100644
+index ae73455c63..5974b475bf 100644
@@ -272 +259 @@
-@@ -320,7 +320,7 @@ bnxt_handle_tx_cp_vec(struct bnxt_tx_queue *txq)
+@@ -329,7 +329,7 @@ bnxt_handle_tx_cp_vec(struct bnxt_tx_queue *txq)
@@ -282 +269 @@
-index 9a6b96e04a..47824334ae 100644
+index 412bc59f3b..ad78fa1bea 100644
@@ -285 +272 @@
-@@ -461,7 +461,7 @@ static int bnxt_handle_tx_cp(struct bnxt_tx_queue *txq)
+@@ -443,7 +443,7 @@ static int bnxt_handle_tx_cp(struct bnxt_tx_queue *txq)
^ permalink raw reply [flat|nested] 208+ messages in thread
* [dpdk-stable] patch 'net/bnxt: fix nested lock during bonding' has been queued to stable release 20.11.3
2021-07-26 13:52 ` [dpdk-stable] patch 'net/bonding: fix error message on flow verify' " luca.boccassi
` (11 preceding siblings ...)
2021-07-26 13:52 ` [dpdk-stable] patch 'net/bnxt: fix missing barriers in completion handling' " luca.boccassi
@ 2021-07-26 13:52 ` luca.boccassi
2021-07-26 13:52 ` [dpdk-stable] patch 'net/bnxt: clear cached statistics' " luca.boccassi
` (44 subsequent siblings)
57 siblings, 0 replies; 208+ messages in thread
From: luca.boccassi @ 2021-07-26 13:52 UTC (permalink / raw)
To: Weifeng Li; +Cc: Ajit Khaparde, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.3
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/28/21. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/3f2f6be303b95da063fce45a6f6e10c6b0af87d9
Thanks.
Luca Boccassi
---
From 3f2f6be303b95da063fce45a6f6e10c6b0af87d9 Mon Sep 17 00:00:00 2001
From: Weifeng Li <liweifeng96@126.com>
Date: Sat, 3 Jul 2021 06:20:42 -0400
Subject: [PATCH] net/bnxt: fix nested lock during bonding
[ upstream commit 8117f5f61a7399fb160cc48d05daf6e0aac734f8 ]
Bnxt PMD registers LSC callback (bond_ethdev_lsc_event_callback) when
working at bond mode. This callback will dead lock when LSC
interrupt triggered.
lsc interrupt ->
bnxt_handle_async_event ->
bnxt_link_update_op ->
bond_ethdev_lsc_event_callback (lsc_lock) ->
bnxt_link_update_op ->
bond_ethdev_lsc_event_callback (lsc_lock dead lock)
Fixes: c2faa1d1969e ("net/bnxt: add support for LSC interrupt event")
Signed-off-by: Weifeng Li <liweifeng96@126.com>
Acked-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
drivers/net/bnxt/bnxt_cpr.c | 2 ++
drivers/net/bnxt/bnxt_ethdev.c | 5 -----
2 files changed, 2 insertions(+), 5 deletions(-)
diff --git a/drivers/net/bnxt/bnxt_cpr.c b/drivers/net/bnxt/bnxt_cpr.c
index ee96ae81bf..7bfda01b2c 100644
--- a/drivers/net/bnxt/bnxt_cpr.c
+++ b/drivers/net/bnxt/bnxt_cpr.c
@@ -109,6 +109,8 @@ void bnxt_handle_async_event(struct bnxt *bp,
case HWRM_ASYNC_EVENT_CMPL_EVENT_ID_LINK_SPEED_CFG_CHANGE:
/* FALLTHROUGH */
bnxt_link_update_op(bp->eth_dev, 0);
+ rte_eth_dev_callback_process(bp->eth_dev,
+ RTE_ETH_EVENT_INTR_LSC, NULL);
break;
case HWRM_ASYNC_EVENT_CMPL_EVENT_ID_PF_DRVR_UNLOAD:
PMD_DRV_LOG(INFO, "Async event: PF driver unloaded\n");
diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
index fce5e3a628..8afe72bd96 100644
--- a/drivers/net/bnxt/bnxt_ethdev.c
+++ b/drivers/net/bnxt/bnxt_ethdev.c
@@ -1766,11 +1766,6 @@ out:
if (new.link_status != eth_dev->data->dev_link.link_status ||
new.link_speed != eth_dev->data->dev_link.link_speed) {
rte_eth_linkstatus_set(eth_dev, &new);
-
- rte_eth_dev_callback_process(eth_dev,
- RTE_ETH_EVENT_INTR_LSC,
- NULL);
-
bnxt_print_link_info(eth_dev);
}
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-07-26 13:53:16.636737512 +0100
+++ 0014-net-bnxt-fix-nested-lock-during-bonding.patch 2021-07-26 13:53:15.829292202 +0100
@@ -1 +1 @@
-From 8117f5f61a7399fb160cc48d05daf6e0aac734f8 Mon Sep 17 00:00:00 2001
+From 3f2f6be303b95da063fce45a6f6e10c6b0af87d9 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 8117f5f61a7399fb160cc48d05daf6e0aac734f8 ]
+
@@ -18 +19,0 @@
-Cc: stable@dpdk.org
@@ -28 +29 @@
-index 2c7fd78c3d..f4c9c72664 100644
+index ee96ae81bf..7bfda01b2c 100644
@@ -31 +32 @@
-@@ -111,6 +111,8 @@ void bnxt_handle_async_event(struct bnxt *bp,
+@@ -109,6 +109,8 @@ void bnxt_handle_async_event(struct bnxt *bp,
@@ -41 +42 @@
-index ee69296926..19d52fa82b 100644
+index fce5e3a628..8afe72bd96 100644
@@ -44 +45 @@
-@@ -1843,11 +1843,6 @@ out:
+@@ -1766,11 +1766,6 @@ out:
@@ -46 +47 @@
- new.link_speed != eth_dev->data->dev_link.link_speed) {
+ new.link_speed != eth_dev->data->dev_link.link_speed) {
^ permalink raw reply [flat|nested] 208+ messages in thread
* [dpdk-stable] patch 'net/bnxt: clear cached statistics' has been queued to stable release 20.11.3
2021-07-26 13:52 ` [dpdk-stable] patch 'net/bonding: fix error message on flow verify' " luca.boccassi
` (12 preceding siblings ...)
2021-07-26 13:52 ` [dpdk-stable] patch 'net/bnxt: fix nested lock during bonding' " luca.boccassi
@ 2021-07-26 13:52 ` luca.boccassi
2021-07-26 13:52 ` [dpdk-stable] patch 'distributor: fix 128-bit write alignment' " luca.boccassi
` (43 subsequent siblings)
57 siblings, 0 replies; 208+ messages in thread
From: luca.boccassi @ 2021-07-26 13:52 UTC (permalink / raw)
To: Kalesh AP; +Cc: Ajit Khaparde, Lance Richardson, Somnath Kotur, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.3
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/28/21. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/fc9d2f0dbe64c6f282ab9a2562991f03e9ed13a9
Thanks.
Luca Boccassi
---
From fc9d2f0dbe64c6f282ab9a2562991f03e9ed13a9 Mon Sep 17 00:00:00 2001
From: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Date: Tue, 13 Jul 2021 19:04:13 +0530
Subject: [PATCH] net/bnxt: clear cached statistics
[ upstream commit 84fd852caac19795d0a05af8dabce8f011fe61a4 ]
As part of the workaround put in the commit "219842b9990c",
driver caches the last read stats values from the hardware.
But this is not cleared during the clear stats operation. This
results in showing up stale stats values while reading the stats
after the clear operation.
Fixes: 219842b9990c ("net/bnxt: workaround spurious zero stats in Thor")
Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Reviewed-by: Lance Richardson <lance.richardson@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
---
drivers/net/bnxt/bnxt_stats.c | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/drivers/net/bnxt/bnxt_stats.c b/drivers/net/bnxt/bnxt_stats.c
index 4e67fdf9f2..47dcf40893 100644
--- a/drivers/net/bnxt/bnxt_stats.c
+++ b/drivers/net/bnxt/bnxt_stats.c
@@ -597,6 +597,16 @@ int bnxt_stats_get_op(struct rte_eth_dev *eth_dev,
return rc;
}
+static void bnxt_clear_prev_stat(struct bnxt *bp)
+{
+ /*
+ * Clear the cached values of stats returned by HW in the previous
+ * get operation.
+ */
+ memset(bp->prev_rx_ring_stats, 0, sizeof(struct bnxt_ring_stats) * bp->rx_cp_nr_rings);
+ memset(bp->prev_tx_ring_stats, 0, sizeof(struct bnxt_ring_stats) * bp->tx_cp_nr_rings);
+}
+
int bnxt_stats_reset_op(struct rte_eth_dev *eth_dev)
{
struct bnxt *bp = eth_dev->data->dev_private;
@@ -619,6 +629,8 @@ int bnxt_stats_reset_op(struct rte_eth_dev *eth_dev)
rte_atomic64_clear(&rxq->rx_mbuf_alloc_fail);
}
+ bnxt_clear_prev_stat(bp);
+
return ret;
}
@@ -927,6 +939,8 @@ int bnxt_dev_xstats_reset_op(struct rte_eth_dev *eth_dev)
PMD_DRV_LOG(ERR, "Failed to reset xstats: %s\n",
strerror(-ret));
+ bnxt_clear_prev_stat(bp);
+
return ret;
}
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-07-26 13:53:16.684858122 +0100
+++ 0015-net-bnxt-clear-cached-statistics.patch 2021-07-26 13:53:15.829292202 +0100
@@ -1 +1 @@
-From 84fd852caac19795d0a05af8dabce8f011fe61a4 Mon Sep 17 00:00:00 2001
+From fc9d2f0dbe64c6f282ab9a2562991f03e9ed13a9 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 84fd852caac19795d0a05af8dabce8f011fe61a4 ]
+
@@ -13 +14,0 @@
-Cc: stable@dpdk.org
@@ -24 +25 @@
-index c7b23f46a1..991eafc644 100644
+index 4e67fdf9f2..47dcf40893 100644
@@ -27 +28 @@
-@@ -603,6 +603,16 @@ int bnxt_stats_get_op(struct rte_eth_dev *eth_dev,
+@@ -597,6 +597,16 @@ int bnxt_stats_get_op(struct rte_eth_dev *eth_dev,
@@ -44 +45 @@
-@@ -625,6 +635,8 @@ int bnxt_stats_reset_op(struct rte_eth_dev *eth_dev)
+@@ -619,6 +629,8 @@ int bnxt_stats_reset_op(struct rte_eth_dev *eth_dev)
@@ -53 +54 @@
-@@ -933,6 +945,8 @@ int bnxt_dev_xstats_reset_op(struct rte_eth_dev *eth_dev)
+@@ -927,6 +939,8 @@ int bnxt_dev_xstats_reset_op(struct rte_eth_dev *eth_dev)
^ permalink raw reply [flat|nested] 208+ messages in thread
* [dpdk-stable] patch 'distributor: fix 128-bit write alignment' has been queued to stable release 20.11.3
2021-07-26 13:52 ` [dpdk-stable] patch 'net/bonding: fix error message on flow verify' " luca.boccassi
` (13 preceding siblings ...)
2021-07-26 13:52 ` [dpdk-stable] patch 'net/bnxt: clear cached statistics' " luca.boccassi
@ 2021-07-26 13:52 ` luca.boccassi
2021-07-26 13:52 ` [dpdk-stable] patch 'raw/ioat: fix config script queue size calculation' " luca.boccassi
` (42 subsequent siblings)
57 siblings, 0 replies; 208+ messages in thread
From: luca.boccassi @ 2021-07-26 13:52 UTC (permalink / raw)
To: David Hunt; +Cc: dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.3
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/28/21. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/133edc5f0fce6e1b126ef55c3984fdd53a1b8a23
Thanks.
Luca Boccassi
---
From 133edc5f0fce6e1b126ef55c3984fdd53a1b8a23 Mon Sep 17 00:00:00 2001
From: David Hunt <david.hunt@intel.com>
Date: Fri, 16 Jul 2021 14:32:37 +0100
Subject: [PATCH] distributor: fix 128-bit write alignment
[ upstream commit de8606bf73323dfa8395f2dc0a93dc6194ff21b7 ]
When the distributor sample app is built as a 32-bit app,
the data buffer passed to find_match_vec can be unaligned,
causing a segmentation fault due to writing a 128-bit value
using _mm_store_si128(). 128-bit align the data being
passed in so this does not happen.
Fixes: 775003ad2f96 ("distributor: add new burst-capable library")
Signed-off-by: David Hunt <david.hunt@intel.com>
---
lib/librte_distributor/rte_distributor.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/librte_distributor/rte_distributor.c b/lib/librte_distributor/rte_distributor.c
index 07e385a259..c210cf86bd 100644
--- a/lib/librte_distributor/rte_distributor.c
+++ b/lib/librte_distributor/rte_distributor.c
@@ -478,7 +478,7 @@ rte_distributor_process(struct rte_distributor *d,
return 0;
while (next_idx < num_mbufs) {
- uint16_t matches[RTE_DIST_BURST_SIZE];
+ uint16_t matches[RTE_DIST_BURST_SIZE] __rte_aligned(128);
unsigned int pkts;
if ((num_mbufs - next_idx) < RTE_DIST_BURST_SIZE)
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-07-26 13:53:16.731281006 +0100
+++ 0016-distributor-fix-128-bit-write-alignment.patch 2021-07-26 13:53:15.833292286 +0100
@@ -1 +1 @@
-From de8606bf73323dfa8395f2dc0a93dc6194ff21b7 Mon Sep 17 00:00:00 2001
+From 133edc5f0fce6e1b126ef55c3984fdd53a1b8a23 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit de8606bf73323dfa8395f2dc0a93dc6194ff21b7 ]
+
@@ -13 +14,0 @@
-Cc: stable@dpdk.org
@@ -17 +18 @@
- lib/distributor/rte_distributor.c | 2 +-
+ lib/librte_distributor/rte_distributor.c | 2 +-
@@ -20 +21 @@
-diff --git a/lib/distributor/rte_distributor.c b/lib/distributor/rte_distributor.c
+diff --git a/lib/librte_distributor/rte_distributor.c b/lib/librte_distributor/rte_distributor.c
@@ -22,2 +23,2 @@
---- a/lib/distributor/rte_distributor.c
-+++ b/lib/distributor/rte_distributor.c
+--- a/lib/librte_distributor/rte_distributor.c
++++ b/lib/librte_distributor/rte_distributor.c
^ permalink raw reply [flat|nested] 208+ messages in thread
* [dpdk-stable] patch 'raw/ioat: fix config script queue size calculation' has been queued to stable release 20.11.3
2021-07-26 13:52 ` [dpdk-stable] patch 'net/bonding: fix error message on flow verify' " luca.boccassi
` (14 preceding siblings ...)
2021-07-26 13:52 ` [dpdk-stable] patch 'distributor: fix 128-bit write alignment' " luca.boccassi
@ 2021-07-26 13:52 ` luca.boccassi
2021-07-26 13:52 ` [dpdk-stable] patch 'test/power: fix CPU frequency check for intel_pstate' " luca.boccassi
` (41 subsequent siblings)
57 siblings, 0 replies; 208+ messages in thread
From: luca.boccassi @ 2021-07-26 13:52 UTC (permalink / raw)
To: Kevin Laatz; +Cc: Konstantin Ananyev, Bruce Richardson, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.3
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/28/21. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/1f4a450852e4800fb4c1faa610fdea441c02dc05
Thanks.
Luca Boccassi
---
From 1f4a450852e4800fb4c1faa610fdea441c02dc05 Mon Sep 17 00:00:00 2001
From: Kevin Laatz <kevin.laatz@intel.com>
Date: Fri, 16 Jul 2021 13:21:55 +0000
Subject: [PATCH] raw/ioat: fix config script queue size calculation
[ upstream commit 9cf9ac48b116e371e25e1daca33636e9cdc07db8 ]
The queue size calculation is currently based on "max_tokens" rather than
"max_work_queues_size". This is resulting in the queue size being
incorrectly configured when using the script to configure devices bound to
the IDXD kernel driver.
This patch fixes this miscalculation so devices are configured with
appropriate queue size.
Fixes: 01863b9d2354 ("raw/ioat: include example configuration script")
Reported-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Signed-off-by: Kevin Laatz <kevin.laatz@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
---
drivers/raw/ioat/dpdk_idxd_cfg.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/raw/ioat/dpdk_idxd_cfg.py b/drivers/raw/ioat/dpdk_idxd_cfg.py
index 56e44063e4..fdb636498c 100755
--- a/drivers/raw/ioat/dpdk_idxd_cfg.py
+++ b/drivers/raw/ioat/dpdk_idxd_cfg.py
@@ -37,7 +37,7 @@ def configure_dsa(dsa_id, queues):
max_groups = dsa_dir.read_int("max_groups")
max_engines = dsa_dir.read_int("max_engines")
max_queues = dsa_dir.read_int("max_work_queues")
- max_tokens = dsa_dir.read_int("max_tokens")
+ max_work_queues_size = dsa_dir.read_int("max_work_queues_size")
nb_queues = min(queues, max_queues)
if queues > nb_queues:
@@ -56,7 +56,7 @@ def configure_dsa(dsa_id, queues):
"mode": "dedicated",
"name": f"dpdk_wq{dsa_id}.{q}",
"priority": 1,
- "size": int(max_tokens / nb_queues)})
+ "size": int(max_work_queues_size / nb_queues)})
# enable device and then queues
drv_dir.write_values({"bind": f"dsa{dsa_id}"})
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-07-26 13:53:16.780509559 +0100
+++ 0017-raw-ioat-fix-config-script-queue-size-calculation.patch 2021-07-26 13:53:15.833292286 +0100
@@ -1 +1 @@
-From 9cf9ac48b116e371e25e1daca33636e9cdc07db8 Mon Sep 17 00:00:00 2001
+From 1f4a450852e4800fb4c1faa610fdea441c02dc05 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 9cf9ac48b116e371e25e1daca33636e9cdc07db8 ]
+
@@ -14 +15,0 @@
-Cc: stable@dpdk.org
@@ -25 +26 @@
-index 83ef4817db..fcc27822ef 100755
+index 56e44063e4..fdb636498c 100755
@@ -28 +29 @@
-@@ -63,7 +63,7 @@ def configure_dsa(dsa_id, queues, prefix):
+@@ -37,7 +37,7 @@ def configure_dsa(dsa_id, queues):
@@ -37 +38 @@
-@@ -82,7 +82,7 @@ def configure_dsa(dsa_id, queues, prefix):
+@@ -56,7 +56,7 @@ def configure_dsa(dsa_id, queues):
@@ -39 +40 @@
- "name": f"{prefix}_wq{dsa_id}.{q}",
+ "name": f"dpdk_wq{dsa_id}.{q}",
^ permalink raw reply [flat|nested] 208+ messages in thread
* [dpdk-stable] patch 'test/power: fix CPU frequency check for intel_pstate' has been queued to stable release 20.11.3
2021-07-26 13:52 ` [dpdk-stable] patch 'net/bonding: fix error message on flow verify' " luca.boccassi
` (15 preceding siblings ...)
2021-07-26 13:52 ` [dpdk-stable] patch 'raw/ioat: fix config script queue size calculation' " luca.boccassi
@ 2021-07-26 13:52 ` luca.boccassi
2021-07-26 13:52 ` [dpdk-stable] patch 'crypto/octeontx2: fix IPsec session member overlap' " luca.boccassi
` (40 subsequent siblings)
57 siblings, 0 replies; 208+ messages in thread
From: luca.boccassi @ 2021-07-26 13:52 UTC (permalink / raw)
To: Richael Zhuang; +Cc: David Hunt, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.3
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/28/21. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/7bbe27495819e91b7ae8d5aeddafc5d91414337a
Thanks.
Luca Boccassi
---
From 7bbe27495819e91b7ae8d5aeddafc5d91414337a Mon Sep 17 00:00:00 2001
From: Richael Zhuang <richael.zhuang@arm.com>
Date: Wed, 14 Jul 2021 18:44:05 +0800
Subject: [PATCH] test/power: fix CPU frequency check for intel_pstate
[ upstream commit cf1e803508009917f41dd5bb347e4140043afe03 ]
For acpi_cpufreq and cppc_cpufreq, both cpuinfo_cur_freq and
scaling_cur_freq exist. For pstate, only scaling_cur_freq exists.
And value in scaling_cur_freq and cpuinfo_cur_freq may not be the
same. For acpi_cpufreq and cppc_cpufreq, we should check
cpuinfo_cur_freq but not scaling_cur_freq. So here change the
check sequence to make sure it works for all cpufreq drivers.
Besides, add rounding for pstate driver.
Fixes: ff6dfb8e492f ("test/power: fix CPU frequency check")
Signed-off-by: Richael Zhuang <richael.zhuang@arm.com>
Acked-by: David Hunt <david.hunt@intel.com>
---
app/test/test_power_cpufreq.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/app/test/test_power_cpufreq.c b/app/test/test_power_cpufreq.c
index 0c3adc5f33..1c9d5cb48e 100644
--- a/app/test/test_power_cpufreq.c
+++ b/app/test/test_power_cpufreq.c
@@ -60,13 +60,13 @@ check_cur_freq(unsigned int lcore_id, uint32_t idx, bool turbo)
int i;
if (snprintf(fullpath, sizeof(fullpath),
- TEST_POWER_SYSFILE_SCALING_FREQ, lcore_id) < 0) {
+ TEST_POWER_SYSFILE_CPUINFO_FREQ, lcore_id) < 0) {
return 0;
}
f = fopen(fullpath, "r");
if (f == NULL) {
if (snprintf(fullpath, sizeof(fullpath),
- TEST_POWER_SYSFILE_CPUINFO_FREQ, lcore_id) < 0) {
+ TEST_POWER_SYSFILE_SCALING_FREQ, lcore_id) < 0) {
return 0;
}
f = fopen(fullpath, "r");
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-07-26 13:53:16.826089054 +0100
+++ 0018-test-power-fix-CPU-frequency-check-for-intel_pstate.patch 2021-07-26 13:53:15.833292286 +0100
@@ -1 +1 @@
-From cf1e803508009917f41dd5bb347e4140043afe03 Mon Sep 17 00:00:00 2001
+From 7bbe27495819e91b7ae8d5aeddafc5d91414337a Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit cf1e803508009917f41dd5bb347e4140043afe03 ]
+
@@ -15 +16,0 @@
-Cc: stable@dpdk.org
@@ -20,2 +21,2 @@
- app/test/test_power_cpufreq.c | 6 +++---
- 1 file changed, 3 insertions(+), 3 deletions(-)
+ app/test/test_power_cpufreq.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
@@ -24 +25 @@
-index b8fc53925c..1a9549527e 100644
+index 0c3adc5f33..1c9d5cb48e 100644
@@ -27 +28 @@
-@@ -62,13 +62,13 @@ check_cur_freq(unsigned int lcore_id, uint32_t idx, bool turbo)
+@@ -60,13 +60,13 @@ check_cur_freq(unsigned int lcore_id, uint32_t idx, bool turbo)
@@ -43,9 +43,0 @@
-@@ -85,7 +85,7 @@ check_cur_freq(unsigned int lcore_id, uint32_t idx, bool turbo)
- freq_conv = cur_freq;
-
- env = rte_power_get_env();
-- if (env == PM_ENV_CPPC_CPUFREQ) {
-+ if (env == PM_ENV_CPPC_CPUFREQ || env == PM_ENV_PSTATE_CPUFREQ) {
- /* convert the frequency to nearest 100000 value
- * Ex: if cur_freq=1396789 then freq_conv=1400000
- * Ex: if cur_freq=800030 then freq_conv=800000
^ permalink raw reply [flat|nested] 208+ messages in thread
* [dpdk-stable] patch 'crypto/octeontx2: fix IPsec session member overlap' has been queued to stable release 20.11.3
2021-07-26 13:52 ` [dpdk-stable] patch 'net/bonding: fix error message on flow verify' " luca.boccassi
` (16 preceding siblings ...)
2021-07-26 13:52 ` [dpdk-stable] patch 'test/power: fix CPU frequency check for intel_pstate' " luca.boccassi
@ 2021-07-26 13:52 ` luca.boccassi
2021-07-26 13:52 ` [dpdk-stable] patch 'crypto/octeontx2: fix lookaside IPsec IV pointer' " luca.boccassi
` (39 subsequent siblings)
57 siblings, 0 replies; 208+ messages in thread
From: luca.boccassi @ 2021-07-26 13:52 UTC (permalink / raw)
To: Anoob Joseph; +Cc: Akhil Goyal, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.3
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/28/21. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/48181d181df0629486f3b7428286fb5b21041d07
Thanks.
Luca Boccassi
---
From 48181d181df0629486f3b7428286fb5b21041d07 Mon Sep 17 00:00:00 2001
From: Anoob Joseph <anoobj@marvell.com>
Date: Tue, 13 Jul 2021 15:57:06 +0530
Subject: [PATCH] crypto/octeontx2: fix IPsec session member overlap
[ upstream commit 40beec4bf4e37327437dbcf0e9991a48ed369848 ]
The member 'dir' should not overlap with 'ip'. Usage of union for all
members would mean dir would get corrupt.
Fixes: e91b4f45ff54 ("net/octeontx2: support anti-replay for security session")
Signed-off-by: Anoob Joseph <anoobj@marvell.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
---
drivers/crypto/octeontx2/otx2_security.h | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/drivers/crypto/octeontx2/otx2_security.h b/drivers/crypto/octeontx2/otx2_security.h
index 33d3b15155..7087ea33c7 100644
--- a/drivers/crypto/octeontx2/otx2_security.h
+++ b/drivers/crypto/octeontx2/otx2_security.h
@@ -19,14 +19,16 @@
#define OTX2_SEC_AES_GCM_ROUNDUP_BYTE_LEN 4
#define OTX2_SEC_AES_CBC_ROUNDUP_BYTE_LEN 16
-union otx2_sec_session_ipsec {
- struct otx2_sec_session_ipsec_ip ip;
- struct otx2_sec_session_ipsec_lp lp;
+struct otx2_sec_session_ipsec {
+ union {
+ struct otx2_sec_session_ipsec_ip ip;
+ struct otx2_sec_session_ipsec_lp lp;
+ };
enum rte_security_ipsec_sa_direction dir;
};
struct otx2_sec_session {
- union otx2_sec_session_ipsec ipsec;
+ struct otx2_sec_session_ipsec ipsec;
void *userdata;
/**< Userdata registered by the application */
} __rte_cache_aligned;
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-07-26 13:53:16.865873368 +0100
+++ 0019-crypto-octeontx2-fix-IPsec-session-member-overlap.patch 2021-07-26 13:53:15.833292286 +0100
@@ -1 +1 @@
-From 40beec4bf4e37327437dbcf0e9991a48ed369848 Mon Sep 17 00:00:00 2001
+From 48181d181df0629486f3b7428286fb5b21041d07 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 40beec4bf4e37327437dbcf0e9991a48ed369848 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -19 +20 @@
-index 9f1ba71b46..29c8fc351b 100644
+index 33d3b15155..7087ea33c7 100644
@@ -22 +23 @@
-@@ -20,14 +20,16 @@
+@@ -19,14 +19,16 @@
^ permalink raw reply [flat|nested] 208+ messages in thread
* [dpdk-stable] patch 'crypto/octeontx2: fix lookaside IPsec IV pointer' has been queued to stable release 20.11.3
2021-07-26 13:52 ` [dpdk-stable] patch 'net/bonding: fix error message on flow verify' " luca.boccassi
` (17 preceding siblings ...)
2021-07-26 13:52 ` [dpdk-stable] patch 'crypto/octeontx2: fix IPsec session member overlap' " luca.boccassi
@ 2021-07-26 13:52 ` luca.boccassi
2021-07-26 13:52 ` [dpdk-stable] patch 'test/crypto: fix mempool size for session-less' " luca.boccassi
` (38 subsequent siblings)
57 siblings, 0 replies; 208+ messages in thread
From: luca.boccassi @ 2021-07-26 13:52 UTC (permalink / raw)
To: Tejasree Kondoj; +Cc: Akhil Goyal, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.3
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/28/21. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/89d903beb47d8212512379b90bd134a01f12bd52
Thanks.
Luca Boccassi
---
From 89d903beb47d8212512379b90bd134a01f12bd52 Mon Sep 17 00:00:00 2001
From: Tejasree Kondoj <ktejasree@marvell.com>
Date: Fri, 16 Jul 2021 16:14:47 +0530
Subject: [PATCH] crypto/octeontx2: fix lookaside IPsec IV pointer
[ upstream commit 48c56b329498589e5b57072616e16a776f2d6579 ]
In case of AES-GCM/CCM, nonce/salt comes along
with IV, hence can be copied in a single memcpy.
This patch fixes the IV copy in lookaside IPsec
outbound instruction.
Fixes: fab634eb87ca ("crypto/octeontx2: support security session data path")
Signed-off-by: Tejasree Kondoj <ktejasree@marvell.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
---
drivers/crypto/octeontx2/otx2_ipsec_po_ops.h | 14 ++------------
1 file changed, 2 insertions(+), 12 deletions(-)
diff --git a/drivers/crypto/octeontx2/otx2_ipsec_po_ops.h b/drivers/crypto/octeontx2/otx2_ipsec_po_ops.h
index bc702d5c79..ee30131f17 100644
--- a/drivers/crypto/octeontx2/otx2_ipsec_po_ops.h
+++ b/drivers/crypto/octeontx2/otx2_ipsec_po_ops.h
@@ -61,16 +61,12 @@ process_outb_sa(struct rte_crypto_op *cop,
uint32_t dlen, rlen, extend_head, extend_tail;
struct rte_crypto_sym_op *sym_op = cop->sym;
struct rte_mbuf *m_src = sym_op->m_src;
- struct otx2_ipsec_po_sa_ctl *ctl_wrd;
struct cpt_request_info *req = NULL;
struct otx2_ipsec_po_out_hdr *hdr;
- struct otx2_ipsec_po_out_sa *sa;
int hdr_len, mdata_len, ret = 0;
vq_cmd_word0_t word0;
char *mdata, *data;
- sa = &sess->out_sa;
- ctl_wrd = &sa->ctl;
hdr_len = sizeof(*hdr);
dlen = rte_pktmbuf_pkt_len(m_src) + hdr_len;
@@ -107,14 +103,8 @@ process_outb_sa(struct rte_crypto_op *cop,
hdr = (struct otx2_ipsec_po_out_hdr *)rte_pktmbuf_adj(m_src,
RTE_ETHER_HDR_LEN);
- if (ctl_wrd->enc_type == OTX2_IPSEC_FP_SA_ENC_AES_GCM) {
- memcpy(&hdr->iv[0], &sa->iv.gcm.nonce, 4);
- memcpy(&hdr->iv[4], rte_crypto_op_ctod_offset(cop, uint8_t *,
- sess->iv_offset), sess->iv_length);
- } else if (ctl_wrd->auth_type == OTX2_IPSEC_FP_SA_ENC_AES_CBC) {
- memcpy(&hdr->iv[0], rte_crypto_op_ctod_offset(cop, uint8_t *,
- sess->iv_offset), sess->iv_length);
- }
+ memcpy(&hdr->iv[0], rte_crypto_op_ctod_offset(cop, uint8_t *,
+ sess->iv_offset), sess->iv_length);
/* Prepare CPT instruction */
word0.u64 = sess->ucmd_w0;
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-07-26 13:53:16.908369281 +0100
+++ 0020-crypto-octeontx2-fix-lookaside-IPsec-IV-pointer.patch 2021-07-26 13:53:15.833292286 +0100
@@ -1 +1 @@
-From 48c56b329498589e5b57072616e16a776f2d6579 Mon Sep 17 00:00:00 2001
+From 89d903beb47d8212512379b90bd134a01f12bd52 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 48c56b329498589e5b57072616e16a776f2d6579 ]
+
@@ -12 +13,0 @@
-Cc: stable@dpdk.org
@@ -17,2 +18,2 @@
- drivers/crypto/octeontx2/otx2_ipsec_po_ops.h | 12 ++----------
- 1 file changed, 2 insertions(+), 10 deletions(-)
+ drivers/crypto/octeontx2/otx2_ipsec_po_ops.h | 14 ++------------
+ 1 file changed, 2 insertions(+), 12 deletions(-)
@@ -21 +22 @@
-index 58b199f4f3..25ee10f342 100644
+index bc702d5c79..ee30131f17 100644
@@ -24 +25 @@
-@@ -61,7 +61,6 @@ process_outb_sa(struct rte_crypto_op *cop,
+@@ -61,16 +61,12 @@ process_outb_sa(struct rte_crypto_op *cop,
@@ -31,2 +32,3 @@
- struct otx2_ipsec_po_out_sa *sa;
-@@ -70,7 +69,6 @@ process_outb_sa(struct rte_crypto_op *cop,
+- struct otx2_ipsec_po_out_sa *sa;
+ int hdr_len, mdata_len, ret = 0;
+ vq_cmd_word0_t word0;
@@ -35 +37 @@
- sa = &sess->out_sa;
+- sa = &sess->out_sa;
@@ -40 +42 @@
-@@ -107,14 +105,8 @@ process_outb_sa(struct rte_crypto_op *cop,
+@@ -107,14 +103,8 @@ process_outb_sa(struct rte_crypto_op *cop,
@@ -48 +50 @@
-- } else if (ctl_wrd->auth_type == OTX2_IPSEC_PO_SA_AUTH_SHA1) {
+- } else if (ctl_wrd->auth_type == OTX2_IPSEC_FP_SA_ENC_AES_CBC) {
^ permalink raw reply [flat|nested] 208+ messages in thread
* [dpdk-stable] patch 'test/crypto: fix mempool size for session-less' has been queued to stable release 20.11.3
2021-07-26 13:52 ` [dpdk-stable] patch 'net/bonding: fix error message on flow verify' " luca.boccassi
` (18 preceding siblings ...)
2021-07-26 13:52 ` [dpdk-stable] patch 'crypto/octeontx2: fix lookaside IPsec IV pointer' " luca.boccassi
@ 2021-07-26 13:52 ` luca.boccassi
2021-07-26 13:52 ` [dpdk-stable] patch 'vhost: check header for legacy dequeue offload' " luca.boccassi
` (37 subsequent siblings)
57 siblings, 0 replies; 208+ messages in thread
From: luca.boccassi @ 2021-07-26 13:52 UTC (permalink / raw)
To: Abhinandan Gujjar; +Cc: Ciara Power, Akhil Goyal, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.3
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/28/21. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/db878744bc390175b754e5cba78290f73b5ed03e
Thanks.
Luca Boccassi
---
From db878744bc390175b754e5cba78290f73b5ed03e Mon Sep 17 00:00:00 2001
From: Abhinandan Gujjar <abhinandan.gujjar@intel.com>
Date: Sun, 18 Jul 2021 17:48:51 +0530
Subject: [PATCH] test/crypto: fix mempool size for session-less
[ upstream commit b812567ef6daa2a99a05a38bd79252c97e46078b ]
Currently, private_data_offset for the sessionless is computed
wrongly which includes extra bytes added by
sizeof(struct rte_crypto_sym_xform) * 2. This causes buffer
overflow which leads to test application crash while freeing the
ops mempool. This patch provides fix for the same and also takes
care of increasing the length of ops to accommodate space for
rte_event_crypto_metadata while creating the crypto ops mempool.
Fixes: 3c2c535ecfc0 ("test: add event crypto adapter auto-test")
Signed-off-by: Abhinandan Gujjar <abhinandan.gujjar@intel.com>
Reported-by: Ciara Power <ciara.power@intel.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
---
app/test/test_event_crypto_adapter.c | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/app/test/test_event_crypto_adapter.c b/app/test/test_event_crypto_adapter.c
index 335211cd8c..71b58fcbb8 100644
--- a/app/test/test_event_crypto_adapter.c
+++ b/app/test/test_event_crypto_adapter.c
@@ -224,8 +224,7 @@ test_op_forward_mode(uint8_t session_less)
op->sess_type = RTE_CRYPTO_OP_SESSIONLESS;
first_xform = &cipher_xform;
sym_op->xform = first_xform;
- uint32_t len = IV_OFFSET + MAXIMUM_IV_LENGTH +
- (sizeof(struct rte_crypto_sym_xform) * 2);
+ uint32_t len = IV_OFFSET + MAXIMUM_IV_LENGTH;
op->private_data_offset = len;
/* Fill in private data information */
rte_memcpy(&m_data.response_info, &response_info,
@@ -419,8 +418,7 @@ test_op_new_mode(uint8_t session_less)
op->sess_type = RTE_CRYPTO_OP_SESSIONLESS;
first_xform = &cipher_xform;
sym_op->xform = first_xform;
- uint32_t len = IV_OFFSET + MAXIMUM_IV_LENGTH +
- (sizeof(struct rte_crypto_sym_xform) * 2);
+ uint32_t len = IV_OFFSET + MAXIMUM_IV_LENGTH;
op->private_data_offset = len;
/* Fill in private data information */
rte_memcpy(&m_data.response_info, &response_info,
@@ -516,7 +514,8 @@ configure_cryptodev(void)
NUM_MBUFS, MBUF_CACHE_SIZE,
DEFAULT_NUM_XFORMS *
sizeof(struct rte_crypto_sym_xform) +
- MAXIMUM_IV_LENGTH,
+ MAXIMUM_IV_LENGTH +
+ sizeof(union rte_event_crypto_metadata),
rte_socket_id());
if (params.op_mpool == NULL) {
RTE_LOG(ERR, USER1, "Can't create CRYPTO_OP_POOL\n");
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-07-26 13:53:16.958898775 +0100
+++ 0021-test-crypto-fix-mempool-size-for-session-less.patch 2021-07-26 13:53:15.837292370 +0100
@@ -1 +1 @@
-From b812567ef6daa2a99a05a38bd79252c97e46078b Mon Sep 17 00:00:00 2001
+From db878744bc390175b754e5cba78290f73b5ed03e Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit b812567ef6daa2a99a05a38bd79252c97e46078b ]
+
@@ -15 +16,0 @@
-Cc: stable@dpdk.org
@@ -25 +26 @@
-index f689bc1f22..3ad20921e2 100644
+index 335211cd8c..71b58fcbb8 100644
@@ -28 +29 @@
-@@ -228,8 +228,7 @@ test_op_forward_mode(uint8_t session_less)
+@@ -224,8 +224,7 @@ test_op_forward_mode(uint8_t session_less)
@@ -38 +39 @@
-@@ -423,8 +422,7 @@ test_op_new_mode(uint8_t session_less)
+@@ -419,8 +418,7 @@ test_op_new_mode(uint8_t session_less)
@@ -48 +49 @@
-@@ -520,7 +518,8 @@ configure_cryptodev(void)
+@@ -516,7 +514,8 @@ configure_cryptodev(void)
^ permalink raw reply [flat|nested] 208+ messages in thread
* [dpdk-stable] patch 'vhost: check header for legacy dequeue offload' has been queued to stable release 20.11.3
2021-07-26 13:52 ` [dpdk-stable] patch 'net/bonding: fix error message on flow verify' " luca.boccassi
` (19 preceding siblings ...)
2021-07-26 13:52 ` [dpdk-stable] patch 'test/crypto: fix mempool size for session-less' " luca.boccassi
@ 2021-07-26 13:52 ` luca.boccassi
2021-07-26 13:52 ` [dpdk-stable] patch 'net/virtio: fix refill order in packed ring datapath' " luca.boccassi
` (36 subsequent siblings)
57 siblings, 0 replies; 208+ messages in thread
From: luca.boccassi @ 2021-07-26 13:52 UTC (permalink / raw)
To: Xiao Wang; +Cc: Maxime Coquelin, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.3
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/28/21. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/2df90802c6f7cd84fa91ba3552d31c2fc5ca5270
Thanks.
Luca Boccassi
---
From 2df90802c6f7cd84fa91ba3552d31c2fc5ca5270 Mon Sep 17 00:00:00 2001
From: Xiao Wang <xiao.w.wang@intel.com>
Date: Mon, 21 Jun 2021 16:21:04 +0800
Subject: [PATCH] vhost: check header for legacy dequeue offload
[ upstream commit 706ba48665844b859fcf0bd9526ec5da28b915da ]
When parsing the virtio net header and packet header for dequeue offload,
we need to perform sanity check on the packet header to ensure:
- No out-of-boundary memory access.
- The packet header and virtio_net header are valid and aligned.
Fixes: d0cf91303d73 ("vhost: add Tx offload capabilities")
Signed-off-by: Xiao Wang <xiao.w.wang@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
---
lib/librte_vhost/virtio_net.c | 117 ++++++++++++++++++++++++++--------
1 file changed, 89 insertions(+), 28 deletions(-)
diff --git a/lib/librte_vhost/virtio_net.c b/lib/librte_vhost/virtio_net.c
index 6c7c0b0f0e..e165a70afc 100644
--- a/lib/librte_vhost/virtio_net.c
+++ b/lib/librte_vhost/virtio_net.c
@@ -1797,14 +1797,17 @@ virtio_net_with_host_offload(struct virtio_net *dev)
return false;
}
-static void
-parse_ethernet(struct rte_mbuf *m, uint16_t *l4_proto, void **l4_hdr)
+static int
+parse_headers(struct rte_mbuf *m, uint8_t *l4_proto)
{
struct rte_ipv4_hdr *ipv4_hdr;
struct rte_ipv6_hdr *ipv6_hdr;
- void *l3_hdr = NULL;
struct rte_ether_hdr *eth_hdr;
uint16_t ethertype;
+ uint16_t data_len = rte_pktmbuf_data_len(m);
+
+ if (data_len < sizeof(struct rte_ether_hdr))
+ return -EINVAL;
eth_hdr = rte_pktmbuf_mtod(m, struct rte_ether_hdr *);
@@ -1812,6 +1815,10 @@ parse_ethernet(struct rte_mbuf *m, uint16_t *l4_proto, void **l4_hdr)
ethertype = rte_be_to_cpu_16(eth_hdr->ether_type);
if (ethertype == RTE_ETHER_TYPE_VLAN) {
+ if (data_len < sizeof(struct rte_ether_hdr) +
+ sizeof(struct rte_vlan_hdr))
+ goto error;
+
struct rte_vlan_hdr *vlan_hdr =
(struct rte_vlan_hdr *)(eth_hdr + 1);
@@ -1819,70 +1826,118 @@ parse_ethernet(struct rte_mbuf *m, uint16_t *l4_proto, void **l4_hdr)
ethertype = rte_be_to_cpu_16(vlan_hdr->eth_proto);
}
- l3_hdr = (char *)eth_hdr + m->l2_len;
-
switch (ethertype) {
case RTE_ETHER_TYPE_IPV4:
- ipv4_hdr = l3_hdr;
- *l4_proto = ipv4_hdr->next_proto_id;
+ if (data_len < m->l2_len + sizeof(struct rte_ipv4_hdr))
+ goto error;
+ ipv4_hdr = rte_pktmbuf_mtod_offset(m, struct rte_ipv4_hdr *,
+ m->l2_len);
m->l3_len = rte_ipv4_hdr_len(ipv4_hdr);
- *l4_hdr = (char *)l3_hdr + m->l3_len;
+ if (data_len < m->l2_len + m->l3_len)
+ goto error;
m->ol_flags |= PKT_TX_IPV4;
+ *l4_proto = ipv4_hdr->next_proto_id;
break;
case RTE_ETHER_TYPE_IPV6:
- ipv6_hdr = l3_hdr;
- *l4_proto = ipv6_hdr->proto;
+ if (data_len < m->l2_len + sizeof(struct rte_ipv6_hdr))
+ goto error;
+ ipv6_hdr = rte_pktmbuf_mtod_offset(m, struct rte_ipv6_hdr *,
+ m->l2_len);
m->l3_len = sizeof(struct rte_ipv6_hdr);
- *l4_hdr = (char *)l3_hdr + m->l3_len;
m->ol_flags |= PKT_TX_IPV6;
+ *l4_proto = ipv6_hdr->proto;
break;
default:
- m->l3_len = 0;
- *l4_proto = 0;
- *l4_hdr = NULL;
+ /* a valid L3 header is needed for further L4 parsing */
+ goto error;
+ }
+
+ /* both CSUM and GSO need a valid L4 header */
+ switch (*l4_proto) {
+ case IPPROTO_TCP:
+ if (data_len < m->l2_len + m->l3_len +
+ sizeof(struct rte_tcp_hdr))
+ goto error;
+ break;
+ case IPPROTO_UDP:
+ if (data_len < m->l2_len + m->l3_len +
+ sizeof(struct rte_udp_hdr))
+ goto error;
break;
+ case IPPROTO_SCTP:
+ if (data_len < m->l2_len + m->l3_len +
+ sizeof(struct rte_sctp_hdr))
+ goto error;
+ break;
+ default:
+ goto error;
}
+
+ return 0;
+
+error:
+ m->l2_len = 0;
+ m->l3_len = 0;
+ m->ol_flags = 0;
+ return -EINVAL;
}
static __rte_always_inline void
vhost_dequeue_offload_legacy(struct virtio_net_hdr *hdr, struct rte_mbuf *m)
{
- uint16_t l4_proto = 0;
- void *l4_hdr = NULL;
+ uint8_t l4_proto = 0;
struct rte_tcp_hdr *tcp_hdr = NULL;
+ uint16_t tcp_len;
+ uint16_t data_len = rte_pktmbuf_data_len(m);
+
+ if (parse_headers(m, &l4_proto) < 0)
+ return;
- parse_ethernet(m, &l4_proto, &l4_hdr);
if (hdr->flags == VIRTIO_NET_HDR_F_NEEDS_CSUM) {
if (hdr->csum_start == (m->l2_len + m->l3_len)) {
switch (hdr->csum_offset) {
case (offsetof(struct rte_tcp_hdr, cksum)):
- if (l4_proto == IPPROTO_TCP)
- m->ol_flags |= PKT_TX_TCP_CKSUM;
+ if (l4_proto != IPPROTO_TCP)
+ goto error;
+ m->ol_flags |= PKT_TX_TCP_CKSUM;
break;
case (offsetof(struct rte_udp_hdr, dgram_cksum)):
- if (l4_proto == IPPROTO_UDP)
- m->ol_flags |= PKT_TX_UDP_CKSUM;
+ if (l4_proto != IPPROTO_UDP)
+ goto error;
+ m->ol_flags |= PKT_TX_UDP_CKSUM;
break;
case (offsetof(struct rte_sctp_hdr, cksum)):
- if (l4_proto == IPPROTO_SCTP)
- m->ol_flags |= PKT_TX_SCTP_CKSUM;
+ if (l4_proto != IPPROTO_SCTP)
+ goto error;
+ m->ol_flags |= PKT_TX_SCTP_CKSUM;
break;
default:
- break;
+ goto error;
}
+ } else {
+ goto error;
}
}
- if (l4_hdr && hdr->gso_type != VIRTIO_NET_HDR_GSO_NONE) {
+ if (hdr->gso_type != VIRTIO_NET_HDR_GSO_NONE) {
switch (hdr->gso_type & ~VIRTIO_NET_HDR_GSO_ECN) {
case VIRTIO_NET_HDR_GSO_TCPV4:
case VIRTIO_NET_HDR_GSO_TCPV6:
- tcp_hdr = l4_hdr;
+ if (l4_proto != IPPROTO_TCP)
+ goto error;
+ tcp_hdr = rte_pktmbuf_mtod_offset(m,
+ struct rte_tcp_hdr *,
+ m->l2_len + m->l3_len);
+ tcp_len = (tcp_hdr->data_off & 0xf0) >> 2;
+ if (data_len < m->l2_len + m->l3_len + tcp_len)
+ goto error;
m->ol_flags |= PKT_TX_TCP_SEG;
m->tso_segsz = hdr->gso_size;
- m->l4_len = (tcp_hdr->data_off & 0xf0) >> 2;
+ m->l4_len = tcp_len;
break;
case VIRTIO_NET_HDR_GSO_UDP:
+ if (l4_proto != IPPROTO_UDP)
+ goto error;
m->ol_flags |= PKT_TX_UDP_SEG;
m->tso_segsz = hdr->gso_size;
m->l4_len = sizeof(struct rte_udp_hdr);
@@ -1890,9 +1945,15 @@ vhost_dequeue_offload_legacy(struct virtio_net_hdr *hdr, struct rte_mbuf *m)
default:
VHOST_LOG_DATA(WARNING,
"unsupported gso type %u.\n", hdr->gso_type);
- break;
+ goto error;
}
}
+ return;
+
+error:
+ m->l2_len = 0;
+ m->l3_len = 0;
+ m->ol_flags = 0;
}
static __rte_always_inline void
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-07-26 13:53:17.007293391 +0100
+++ 0022-vhost-check-header-for-legacy-dequeue-offload.patch 2021-07-26 13:53:15.841292454 +0100
@@ -1 +1 @@
-From 706ba48665844b859fcf0bd9526ec5da28b915da Mon Sep 17 00:00:00 2001
+From 2df90802c6f7cd84fa91ba3552d31c2fc5ca5270 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 706ba48665844b859fcf0bd9526ec5da28b915da ]
+
@@ -12 +13,0 @@
-Cc: stable@dpdk.org
@@ -17 +18 @@
- lib/vhost/virtio_net.c | 117 +++++++++++++++++++++++++++++++----------
+ lib/librte_vhost/virtio_net.c | 117 ++++++++++++++++++++++++++--------
@@ -20,5 +21,5 @@
-diff --git a/lib/vhost/virtio_net.c b/lib/vhost/virtio_net.c
-index b93482587c..aa30d147b6 100644
---- a/lib/vhost/virtio_net.c
-+++ b/lib/vhost/virtio_net.c
-@@ -2259,14 +2259,17 @@ virtio_net_with_host_offload(struct virtio_net *dev)
+diff --git a/lib/librte_vhost/virtio_net.c b/lib/librte_vhost/virtio_net.c
+index 6c7c0b0f0e..e165a70afc 100644
+--- a/lib/librte_vhost/virtio_net.c
++++ b/lib/librte_vhost/virtio_net.c
+@@ -1797,14 +1797,17 @@ virtio_net_with_host_offload(struct virtio_net *dev)
@@ -45 +46 @@
-@@ -2274,6 +2277,10 @@ parse_ethernet(struct rte_mbuf *m, uint16_t *l4_proto, void **l4_hdr)
+@@ -1812,6 +1815,10 @@ parse_ethernet(struct rte_mbuf *m, uint16_t *l4_proto, void **l4_hdr)
@@ -56 +57 @@
-@@ -2281,70 +2288,118 @@ parse_ethernet(struct rte_mbuf *m, uint16_t *l4_proto, void **l4_hdr)
+@@ -1819,70 +1826,118 @@ parse_ethernet(struct rte_mbuf *m, uint16_t *l4_proto, void **l4_hdr)
@@ -199 +200 @@
-@@ -2352,9 +2407,15 @@ vhost_dequeue_offload_legacy(struct virtio_net_hdr *hdr, struct rte_mbuf *m)
+@@ -1890,9 +1945,15 @@ vhost_dequeue_offload_legacy(struct virtio_net_hdr *hdr, struct rte_mbuf *m)
^ permalink raw reply [flat|nested] 208+ messages in thread
* [dpdk-stable] patch 'net/virtio: fix refill order in packed ring datapath' has been queued to stable release 20.11.3
2021-07-26 13:52 ` [dpdk-stable] patch 'net/bonding: fix error message on flow verify' " luca.boccassi
` (20 preceding siblings ...)
2021-07-26 13:52 ` [dpdk-stable] patch 'vhost: check header for legacy dequeue offload' " luca.boccassi
@ 2021-07-26 13:52 ` luca.boccassi
2021-07-26 13:52 ` [dpdk-stable] patch 'vhost: fix lock on device readiness notification' " luca.boccassi
` (35 subsequent siblings)
57 siblings, 0 replies; 208+ messages in thread
From: luca.boccassi @ 2021-07-26 13:52 UTC (permalink / raw)
To: Cheng Jiang; +Cc: Marvin Liu, Maxime Coquelin, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.3
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/28/21. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/12e277dee62c9ecf129351cfe3d4393297abe6cb
Thanks.
Luca Boccassi
---
From 12e277dee62c9ecf129351cfe3d4393297abe6cb Mon Sep 17 00:00:00 2001
From: Cheng Jiang <cheng1.jiang@intel.com>
Date: Thu, 8 Jul 2021 09:58:01 +0000
Subject: [PATCH] net/virtio: fix refill order in packed ring datapath
[ upstream commit 2d91b28730a945def257bc372a525c9b5dbf181c ]
The front-end should refill the descriptor with the mbuf indicated by
the buff_id rather then the index of used descriptor. Back-end may
return buffers out of order if async copy mode is enabled.
When initializing rxq, refill the descriptors in order as buff_id is
not available at that time.
Fixes: a76290c8f1cf ("net/virtio: implement Rx path for packed queues")
Signed-off-by: Cheng Jiang <cheng1.jiang@intel.com>
Signed-off-by: Marvin Liu <yong.liu@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
---
drivers/net/virtio/virtio_rxtx.c | 72 +++++++++++++++++++++++---------
1 file changed, 52 insertions(+), 20 deletions(-)
diff --git a/drivers/net/virtio/virtio_rxtx.c b/drivers/net/virtio/virtio_rxtx.c
index 77934e8c58..393d4e9f84 100644
--- a/drivers/net/virtio/virtio_rxtx.c
+++ b/drivers/net/virtio/virtio_rxtx.c
@@ -333,13 +333,35 @@ virtqueue_enqueue_recv_refill(struct virtqueue *vq, struct rte_mbuf **cookie,
return 0;
}
-static inline int
-virtqueue_enqueue_recv_refill_packed(struct virtqueue *vq,
- struct rte_mbuf **cookie, uint16_t num)
+static inline void
+virtqueue_refill_single_packed(struct virtqueue *vq,
+ struct vring_packed_desc *dp,
+ struct rte_mbuf *cookie)
{
- struct vring_packed_desc *start_dp = vq->vq_packed.ring.desc;
uint16_t flags = vq->vq_packed.cached_flags;
struct virtio_hw *hw = vq->hw;
+
+ dp->addr = cookie->buf_iova +
+ RTE_PKTMBUF_HEADROOM - hw->vtnet_hdr_size;
+ dp->len = cookie->buf_len -
+ RTE_PKTMBUF_HEADROOM + hw->vtnet_hdr_size;
+
+ virtqueue_store_flags_packed(dp, flags,
+ hw->weak_barriers);
+
+ if (++vq->vq_avail_idx >= vq->vq_nentries) {
+ vq->vq_avail_idx -= vq->vq_nentries;
+ vq->vq_packed.cached_flags ^=
+ VRING_PACKED_DESC_F_AVAIL_USED;
+ flags = vq->vq_packed.cached_flags;
+ }
+}
+
+static inline int
+virtqueue_enqueue_recv_refill_packed_init(struct virtqueue *vq,
+ struct rte_mbuf **cookie, uint16_t num)
+{
+ struct vring_packed_desc *start_dp = vq->vq_packed.ring.desc;
struct vq_desc_extra *dxp;
uint16_t idx;
int i;
@@ -355,24 +377,34 @@ virtqueue_enqueue_recv_refill_packed(struct virtqueue *vq,
dxp->cookie = (void *)cookie[i];
dxp->ndescs = 1;
- start_dp[idx].addr = VIRTIO_MBUF_ADDR(cookie[i], vq) +
- RTE_PKTMBUF_HEADROOM - hw->vtnet_hdr_size;
- start_dp[idx].len = cookie[i]->buf_len - RTE_PKTMBUF_HEADROOM
- + hw->vtnet_hdr_size;
+ virtqueue_refill_single_packed(vq, &start_dp[idx], cookie[i]);
+ }
+ vq->vq_free_cnt = (uint16_t)(vq->vq_free_cnt - num);
+ return 0;
+}
- vq->vq_desc_head_idx = dxp->next;
- if (vq->vq_desc_head_idx == VQ_RING_DESC_CHAIN_END)
- vq->vq_desc_tail_idx = vq->vq_desc_head_idx;
+static inline int
+virtqueue_enqueue_recv_refill_packed(struct virtqueue *vq,
+ struct rte_mbuf **cookie, uint16_t num)
+{
+ struct vring_packed_desc *start_dp = vq->vq_packed.ring.desc;
+ struct vq_desc_extra *dxp;
+ uint16_t idx, did;
+ int i;
- virtqueue_store_flags_packed(&start_dp[idx], flags,
- hw->weak_barriers);
+ if (unlikely(vq->vq_free_cnt == 0))
+ return -ENOSPC;
+ if (unlikely(vq->vq_free_cnt < num))
+ return -EMSGSIZE;
- if (++vq->vq_avail_idx >= vq->vq_nentries) {
- vq->vq_avail_idx -= vq->vq_nentries;
- vq->vq_packed.cached_flags ^=
- VRING_PACKED_DESC_F_AVAIL_USED;
- flags = vq->vq_packed.cached_flags;
- }
+ for (i = 0; i < num; i++) {
+ idx = vq->vq_avail_idx;
+ did = start_dp[idx].id;
+ dxp = &vq->vq_descx[did];
+ dxp->cookie = (void *)cookie[i];
+ dxp->ndescs = 1;
+
+ virtqueue_refill_single_packed(vq, &start_dp[idx], cookie[i]);
}
vq->vq_free_cnt = (uint16_t)(vq->vq_free_cnt - num);
return 0;
@@ -748,7 +780,7 @@ virtio_dev_rx_queue_setup_finish(struct rte_eth_dev *dev, uint16_t queue_idx)
/* Enqueue allocated buffers */
if (vtpci_packed_queue(vq->hw))
- error = virtqueue_enqueue_recv_refill_packed(vq,
+ error = virtqueue_enqueue_recv_refill_packed_init(vq,
&m, 1);
else
error = virtqueue_enqueue_recv_refill(vq,
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-07-26 13:53:17.050079266 +0100
+++ 0023-net-virtio-fix-refill-order-in-packed-ring-datapath.patch 2021-07-26 13:53:15.841292454 +0100
@@ -1 +1 @@
-From 2d91b28730a945def257bc372a525c9b5dbf181c Mon Sep 17 00:00:00 2001
+From 12e277dee62c9ecf129351cfe3d4393297abe6cb Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 2d91b28730a945def257bc372a525c9b5dbf181c ]
+
@@ -14 +15,0 @@
-Cc: stable@dpdk.org
@@ -24 +25 @@
-index 34108fb946..f70644b0b7 100644
+index 77934e8c58..393d4e9f84 100644
@@ -27 +28 @@
-@@ -328,13 +328,35 @@ virtqueue_enqueue_recv_refill(struct virtqueue *vq, struct rte_mbuf **cookie,
+@@ -333,13 +333,35 @@ virtqueue_enqueue_recv_refill(struct virtqueue *vq, struct rte_mbuf **cookie,
@@ -67 +68 @@
-@@ -350,24 +372,34 @@ virtqueue_enqueue_recv_refill_packed(struct virtqueue *vq,
+@@ -355,24 +377,34 @@ virtqueue_enqueue_recv_refill_packed(struct virtqueue *vq,
@@ -71,4 +72,4 @@
-- start_dp[idx].addr = cookie[i]->buf_iova +
-- RTE_PKTMBUF_HEADROOM - hw->vtnet_hdr_size;
-- start_dp[idx].len = cookie[i]->buf_len -
-- RTE_PKTMBUF_HEADROOM + hw->vtnet_hdr_size;
+- start_dp[idx].addr = VIRTIO_MBUF_ADDR(cookie[i], vq) +
+- RTE_PKTMBUF_HEADROOM - hw->vtnet_hdr_size;
+- start_dp[idx].len = cookie[i]->buf_len - RTE_PKTMBUF_HEADROOM
+- + hw->vtnet_hdr_size;
@@ -117 +118 @@
-@@ -740,7 +772,7 @@ virtio_dev_rx_queue_setup_finish(struct rte_eth_dev *dev, uint16_t queue_idx)
+@@ -748,7 +780,7 @@ virtio_dev_rx_queue_setup_finish(struct rte_eth_dev *dev, uint16_t queue_idx)
@@ -120 +121 @@
- if (virtio_with_packed_queue(vq->hw))
+ if (vtpci_packed_queue(vq->hw))
^ permalink raw reply [flat|nested] 208+ messages in thread
* [dpdk-stable] patch 'vhost: fix lock on device readiness notification' has been queued to stable release 20.11.3
2021-07-26 13:52 ` [dpdk-stable] patch 'net/bonding: fix error message on flow verify' " luca.boccassi
` (21 preceding siblings ...)
2021-07-26 13:52 ` [dpdk-stable] patch 'net/virtio: fix refill order in packed ring datapath' " luca.boccassi
@ 2021-07-26 13:52 ` luca.boccassi
2021-07-26 13:52 ` [dpdk-stable] patch 'net/virtio: fix Rx scatter offload' " luca.boccassi
` (34 subsequent siblings)
57 siblings, 0 replies; 208+ messages in thread
From: luca.boccassi @ 2021-07-26 13:52 UTC (permalink / raw)
To: Jiayu Hu; +Cc: Maxime Coquelin, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.3
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/28/21. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/e1b663f8b3632717ac6fbe0f1d188f0ceca28ffa
Thanks.
Luca Boccassi
---
From e1b663f8b3632717ac6fbe0f1d188f0ceca28ffa Mon Sep 17 00:00:00 2001
From: Jiayu Hu <jiayu.hu@intel.com>
Date: Mon, 19 Jul 2021 11:00:45 -0400
Subject: [PATCH] vhost: fix lock on device readiness notification
[ upstream commit 7f31d4ea05ca80b58e3a3289c2a665071fb44a82 ]
The vhost notifies the application of device readiness via
vhost_user_notify_queue_state(), but calling this function
is not protected by the lock. This patch is to make this
function call lock protected.
Fixes: d0fcc38f5fa4 ("vhost: improve device readiness notifications")
Signed-off-by: Jiayu Hu <jiayu.hu@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
---
lib/librte_vhost/vhost_user.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/lib/librte_vhost/vhost_user.c b/lib/librte_vhost/vhost_user.c
index 61ed221395..9b1a6d7697 100644
--- a/lib/librte_vhost/vhost_user.c
+++ b/lib/librte_vhost/vhost_user.c
@@ -2892,9 +2892,6 @@ skip_to_post_handle:
}
}
- if (unlock_required)
- vhost_user_unlock_all_queue_pairs(dev);
-
/* If message was not handled at this stage, treat it as an error */
if (!handled) {
VHOST_LOG_CONFIG(ERR,
@@ -2929,6 +2926,8 @@ skip_to_post_handle:
}
}
+ if (unlock_required)
+ vhost_user_unlock_all_queue_pairs(dev);
if (!virtio_is_ready(dev))
goto out;
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-07-26 13:53:17.094563335 +0100
+++ 0024-vhost-fix-lock-on-device-readiness-notification.patch 2021-07-26 13:53:15.845292538 +0100
@@ -1 +1 @@
-From 7f31d4ea05ca80b58e3a3289c2a665071fb44a82 Mon Sep 17 00:00:00 2001
+From e1b663f8b3632717ac6fbe0f1d188f0ceca28ffa Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 7f31d4ea05ca80b58e3a3289c2a665071fb44a82 ]
+
@@ -12 +13,0 @@
-Cc: stable@dpdk.org
@@ -17 +18 @@
- lib/vhost/vhost_user.c | 5 ++---
+ lib/librte_vhost/vhost_user.c | 5 ++---
@@ -20,5 +21,5 @@
-diff --git a/lib/vhost/vhost_user.c b/lib/vhost/vhost_user.c
-index 031c578e54..31300e194f 100644
---- a/lib/vhost/vhost_user.c
-+++ b/lib/vhost/vhost_user.c
-@@ -2995,9 +2995,6 @@ skip_to_post_handle:
+diff --git a/lib/librte_vhost/vhost_user.c b/lib/librte_vhost/vhost_user.c
+index 61ed221395..9b1a6d7697 100644
+--- a/lib/librte_vhost/vhost_user.c
++++ b/lib/librte_vhost/vhost_user.c
+@@ -2892,9 +2892,6 @@ skip_to_post_handle:
@@ -34 +35 @@
-@@ -3032,6 +3029,8 @@ skip_to_post_handle:
+@@ -2929,6 +2926,8 @@ skip_to_post_handle:
^ permalink raw reply [flat|nested] 208+ messages in thread
* [dpdk-stable] patch 'net/virtio: fix Rx scatter offload' has been queued to stable release 20.11.3
2021-07-26 13:52 ` [dpdk-stable] patch 'net/bonding: fix error message on flow verify' " luca.boccassi
` (22 preceding siblings ...)
2021-07-26 13:52 ` [dpdk-stable] patch 'vhost: fix lock on device readiness notification' " luca.boccassi
@ 2021-07-26 13:52 ` luca.boccassi
2021-07-26 13:52 ` [dpdk-stable] patch 'regex/mlx5: fix size of setup constants' " luca.boccassi
` (33 subsequent siblings)
57 siblings, 0 replies; 208+ messages in thread
From: luca.boccassi @ 2021-07-26 13:52 UTC (permalink / raw)
To: Ivan Ilchenko; +Cc: Andrew Rybchenko, Maxime Coquelin, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.3
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/28/21. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/a961df1650da104147df36cdf0c1f3bc567792e2
Thanks.
Luca Boccassi
---
From a961df1650da104147df36cdf0c1f3bc567792e2 Mon Sep 17 00:00:00 2001
From: Ivan Ilchenko <ivan.ilchenko@oktetlabs.ru>
Date: Tue, 20 Jul 2021 10:54:45 +0300
Subject: [PATCH] net/virtio: fix Rx scatter offload
[ upstream commit 4e8169eb0d2d34067f56b368633f816ce927650a ]
Report Rx scatter offload capability depending on VIRTIO_NET_F_MRG_RXBUF.
If Rx scatter is not requested, ensure that provided Rx buffers on
each Rx queue are big enough to fit Rx packets up to configured MTU.
Fixes: ce17eddefc20 ("ethdev: introduce Rx queue offloads API")
Signed-off-by: Ivan Ilchenko <ivan.ilchenko@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
---
drivers/net/virtio/virtio_ethdev.c | 65 ++++++++++++++++++++++++++++++
drivers/net/virtio/virtio_ethdev.h | 5 +++
drivers/net/virtio/virtio_pci.h | 2 +
drivers/net/virtio/virtio_rxtx.c | 10 +++++
4 files changed, 82 insertions(+)
diff --git a/drivers/net/virtio/virtio_ethdev.c b/drivers/net/virtio/virtio_ethdev.c
index 6c233b75ba..25810cc8db 100644
--- a/drivers/net/virtio/virtio_ethdev.c
+++ b/drivers/net/virtio/virtio_ethdev.c
@@ -867,6 +867,56 @@ virtio_dev_allmulticast_disable(struct rte_eth_dev *dev)
return 0;
}
+uint16_t
+virtio_rx_mem_pool_buf_size(struct rte_mempool *mp)
+{
+ return rte_pktmbuf_data_room_size(mp) - RTE_PKTMBUF_HEADROOM;
+}
+
+bool
+virtio_rx_check_scatter(uint16_t max_rx_pkt_len, uint16_t rx_buf_size,
+ bool rx_scatter_enabled, const char **error)
+{
+ if (!rx_scatter_enabled && max_rx_pkt_len > rx_buf_size) {
+ *error = "Rx scatter is disabled and RxQ mbuf pool object size is too small";
+ return false;
+ }
+
+ return true;
+}
+
+static bool
+virtio_check_scatter_on_all_rx_queues(struct rte_eth_dev *dev,
+ uint16_t frame_size)
+{
+ struct virtio_hw *hw = dev->data->dev_private;
+ struct virtnet_rx *rxvq;
+ struct virtqueue *vq;
+ unsigned int qidx;
+ uint16_t buf_size;
+ const char *error;
+
+ if (hw->vqs == NULL)
+ return true;
+
+ for (qidx = 0; (vq = hw->vqs[2 * qidx + VTNET_SQ_RQ_QUEUE_IDX]) != NULL;
+ qidx++) {
+ rxvq = &vq->rxq;
+ if (rxvq->mpool == NULL)
+ continue;
+ buf_size = virtio_rx_mem_pool_buf_size(rxvq->mpool);
+
+ if (!virtio_rx_check_scatter(frame_size, buf_size,
+ hw->rx_ol_scatter, &error)) {
+ PMD_INIT_LOG(ERR, "MTU check for RxQ %u failed: %s",
+ qidx, error);
+ return false;
+ }
+ }
+
+ return true;
+}
+
#define VLAN_TAG_LEN 4 /* 802.3ac tag (not DMA'd) */
static int
virtio_mtu_set(struct rte_eth_dev *dev, uint16_t mtu)
@@ -884,6 +934,15 @@ virtio_mtu_set(struct rte_eth_dev *dev, uint16_t mtu)
RTE_ETHER_MIN_MTU, max_frame_size - ether_hdr_len);
return -EINVAL;
}
+
+ if (!virtio_check_scatter_on_all_rx_queues(dev, frame_size)) {
+ PMD_INIT_LOG(ERR, "MTU vs Rx scatter and Rx buffers check failed");
+ return -EINVAL;
+ }
+
+ hw->max_rx_pkt_len = frame_size;
+ dev->data->dev_conf.rxmode.max_rx_pkt_len = hw->max_rx_pkt_len;
+
return 0;
}
@@ -2242,6 +2301,8 @@ virtio_dev_configure(struct rte_eth_dev *dev)
if (rxmode->max_rx_pkt_len > hw->max_mtu + ether_hdr_len)
req_features &= ~(1ULL << VIRTIO_NET_F_MTU);
+ hw->max_rx_pkt_len = rxmode->max_rx_pkt_len;
+
if (rx_offloads & (DEV_RX_OFFLOAD_UDP_CKSUM |
DEV_RX_OFFLOAD_TCP_CKSUM))
req_features |= (1ULL << VIRTIO_NET_F_GUEST_CSUM);
@@ -2290,6 +2351,8 @@ virtio_dev_configure(struct rte_eth_dev *dev)
if (rx_offloads & DEV_RX_OFFLOAD_VLAN_STRIP)
hw->vlan_strip = 1;
+ hw->rx_ol_scatter = (rx_offloads & DEV_RX_OFFLOAD_SCATTER);
+
if ((rx_offloads & DEV_RX_OFFLOAD_VLAN_FILTER)
&& !vtpci_with_feature(hw, VIRTIO_NET_F_CTRL_VLAN)) {
PMD_DRV_LOG(ERR,
@@ -2635,6 +2698,8 @@ virtio_dev_info_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info)
host_features = VTPCI_OPS(hw)->get_features(hw);
dev_info->rx_offload_capa = DEV_RX_OFFLOAD_VLAN_STRIP;
dev_info->rx_offload_capa |= DEV_RX_OFFLOAD_JUMBO_FRAME;
+ if (host_features & (1ULL << VIRTIO_NET_F_MRG_RXBUF))
+ dev_info->rx_offload_capa |= DEV_RX_OFFLOAD_SCATTER;
if (host_features & (1ULL << VIRTIO_NET_F_GUEST_CSUM)) {
dev_info->rx_offload_capa |=
DEV_RX_OFFLOAD_TCP_CKSUM |
diff --git a/drivers/net/virtio/virtio_ethdev.h b/drivers/net/virtio/virtio_ethdev.h
index b7d52d497f..916ff11f7a 100644
--- a/drivers/net/virtio/virtio_ethdev.h
+++ b/drivers/net/virtio/virtio_ethdev.h
@@ -120,4 +120,9 @@ void virtio_dev_resume(struct rte_eth_dev *dev);
int virtio_inject_pkts(struct rte_eth_dev *dev, struct rte_mbuf **tx_pkts,
int nb_pkts);
+bool virtio_rx_check_scatter(uint16_t max_rx_pkt_len, uint16_t rx_buf_size,
+ bool rx_scatter_enabled, const char **error);
+
+uint16_t virtio_rx_mem_pool_buf_size(struct rte_mempool *mp);
+
#endif /* _VIRTIO_ETHDEV_H_ */
diff --git a/drivers/net/virtio/virtio_pci.h b/drivers/net/virtio/virtio_pci.h
index ab61e911b8..f56d3e8bb7 100644
--- a/drivers/net/virtio/virtio_pci.h
+++ b/drivers/net/virtio/virtio_pci.h
@@ -259,6 +259,7 @@ struct virtio_hw {
uint8_t use_inorder_rx;
uint8_t use_inorder_tx;
uint8_t weak_barriers;
+ bool rx_ol_scatter;
bool has_tx_offload;
bool has_rx_offload;
uint16_t port_id;
@@ -268,6 +269,7 @@ struct virtio_hw {
uint8_t duplex;
uint8_t *isr;
uint16_t *notify_base;
+ size_t max_rx_pkt_len;
struct virtio_pci_common_cfg *common_cfg;
struct virtio_net_config *dev_cfg;
void *virtio_user_dev;
diff --git a/drivers/net/virtio/virtio_rxtx.c b/drivers/net/virtio/virtio_rxtx.c
index 393d4e9f84..6cfdfc63c2 100644
--- a/drivers/net/virtio/virtio_rxtx.c
+++ b/drivers/net/virtio/virtio_rxtx.c
@@ -671,6 +671,8 @@ virtio_dev_rx_queue_setup(struct rte_eth_dev *dev,
struct virtqueue *vq = hw->vqs[vtpci_queue_idx];
struct virtnet_rx *rxvq;
uint16_t rx_free_thresh;
+ uint16_t buf_size;
+ const char *error;
PMD_INIT_FUNC_TRACE();
@@ -679,6 +681,14 @@ virtio_dev_rx_queue_setup(struct rte_eth_dev *dev,
return -EINVAL;
}
+ buf_size = virtio_rx_mem_pool_buf_size(mp);
+ if (!virtio_rx_check_scatter(hw->max_rx_pkt_len, buf_size,
+ hw->rx_ol_scatter, &error)) {
+ PMD_INIT_LOG(ERR, "RxQ %u Rx scatter check failed: %s",
+ queue_idx, error);
+ return -EINVAL;
+ }
+
rx_free_thresh = rx_conf->rx_free_thresh;
if (rx_free_thresh == 0)
rx_free_thresh =
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-07-26 13:53:17.140231475 +0100
+++ 0025-net-virtio-fix-Rx-scatter-offload.patch 2021-07-26 13:53:15.853292706 +0100
@@ -1 +1 @@
-From 4e8169eb0d2d34067f56b368633f816ce927650a Mon Sep 17 00:00:00 2001
+From a961df1650da104147df36cdf0c1f3bc567792e2 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 4e8169eb0d2d34067f56b368633f816ce927650a ]
+
@@ -12 +13,0 @@
-Cc: stable@dpdk.org
@@ -18 +18,0 @@
- drivers/net/virtio/virtio.h | 2 +
@@ -20,0 +21 @@
+ drivers/net/virtio/virtio_pci.h | 2 +
@@ -24,20 +24,0 @@
-diff --git a/drivers/net/virtio/virtio.h b/drivers/net/virtio/virtio.h
-index 2c987d19ab..525e2dad4c 100644
---- a/drivers/net/virtio/virtio.h
-+++ b/drivers/net/virtio/virtio.h
-@@ -167,6 +167,7 @@ struct virtio_hw {
- uint8_t started;
- uint8_t weak_barriers;
- uint8_t vlan_strip;
-+ bool rx_ol_scatter;
- uint8_t has_tx_offload;
- uint8_t has_rx_offload;
- uint8_t use_vec_rx;
-@@ -180,6 +181,7 @@ struct virtio_hw {
- uint8_t duplex;
- uint8_t intr_lsc;
- uint16_t max_mtu;
-+ size_t max_rx_pkt_len;
- /*
- * App management thread and virtio interrupt handler thread
- * both can change device state, this lock is meant to avoid
@@ -45 +26 @@
-index 0568305667..72d3dda71f 100644
+index 6c233b75ba..25810cc8db 100644
@@ -48 +29 @@
-@@ -841,6 +841,56 @@ virtio_dev_allmulticast_disable(struct rte_eth_dev *dev)
+@@ -867,6 +867,56 @@ virtio_dev_allmulticast_disable(struct rte_eth_dev *dev)
@@ -105 +86 @@
-@@ -858,6 +908,15 @@ virtio_mtu_set(struct rte_eth_dev *dev, uint16_t mtu)
+@@ -884,6 +934,15 @@ virtio_mtu_set(struct rte_eth_dev *dev, uint16_t mtu)
@@ -121 +102 @@
-@@ -2042,6 +2101,8 @@ virtio_dev_configure(struct rte_eth_dev *dev)
+@@ -2242,6 +2301,8 @@ virtio_dev_configure(struct rte_eth_dev *dev)
@@ -130 +111 @@
-@@ -2090,6 +2151,8 @@ virtio_dev_configure(struct rte_eth_dev *dev)
+@@ -2290,6 +2351,8 @@ virtio_dev_configure(struct rte_eth_dev *dev)
@@ -136,2 +117,2 @@
- if ((rx_offloads & DEV_RX_OFFLOAD_VLAN_FILTER) &&
- !virtio_with_feature(hw, VIRTIO_NET_F_CTRL_VLAN)) {
+ if ((rx_offloads & DEV_RX_OFFLOAD_VLAN_FILTER)
+ && !vtpci_with_feature(hw, VIRTIO_NET_F_CTRL_VLAN)) {
@@ -139,2 +120,2 @@
-@@ -2445,6 +2508,8 @@ virtio_dev_info_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info)
- host_features = VIRTIO_OPS(hw)->get_features(hw);
+@@ -2635,6 +2698,8 @@ virtio_dev_info_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info)
+ host_features = VTPCI_OPS(hw)->get_features(hw);
@@ -149 +130 @@
-index 5a501e7890..2f63ef2b2d 100644
+index b7d52d497f..916ff11f7a 100644
@@ -152 +133 @@
-@@ -120,4 +120,9 @@ int virtio_dev_close(struct rte_eth_dev *dev);
+@@ -120,4 +120,9 @@ void virtio_dev_resume(struct rte_eth_dev *dev);
@@ -161,0 +143,20 @@
+diff --git a/drivers/net/virtio/virtio_pci.h b/drivers/net/virtio/virtio_pci.h
+index ab61e911b8..f56d3e8bb7 100644
+--- a/drivers/net/virtio/virtio_pci.h
++++ b/drivers/net/virtio/virtio_pci.h
+@@ -259,6 +259,7 @@ struct virtio_hw {
+ uint8_t use_inorder_rx;
+ uint8_t use_inorder_tx;
+ uint8_t weak_barriers;
++ bool rx_ol_scatter;
+ bool has_tx_offload;
+ bool has_rx_offload;
+ uint16_t port_id;
+@@ -268,6 +269,7 @@ struct virtio_hw {
+ uint8_t duplex;
+ uint8_t *isr;
+ uint16_t *notify_base;
++ size_t max_rx_pkt_len;
+ struct virtio_pci_common_cfg *common_cfg;
+ struct virtio_net_config *dev_cfg;
+ void *virtio_user_dev;
@@ -163 +164 @@
-index f70644b0b7..d0365ce4bf 100644
+index 393d4e9f84..6cfdfc63c2 100644
@@ -166,2 +167,2 @@
-@@ -666,6 +666,8 @@ virtio_dev_rx_queue_setup(struct rte_eth_dev *dev,
- struct virtqueue *vq = hw->vqs[vq_idx];
+@@ -671,6 +671,8 @@ virtio_dev_rx_queue_setup(struct rte_eth_dev *dev,
+ struct virtqueue *vq = hw->vqs[vtpci_queue_idx];
@@ -175 +176 @@
-@@ -674,6 +676,14 @@ virtio_dev_rx_queue_setup(struct rte_eth_dev *dev,
+@@ -679,6 +681,14 @@ virtio_dev_rx_queue_setup(struct rte_eth_dev *dev,
^ permalink raw reply [flat|nested] 208+ messages in thread
* [dpdk-stable] patch 'regex/mlx5: fix size of setup constants' has been queued to stable release 20.11.3
2021-07-26 13:52 ` [dpdk-stable] patch 'net/bonding: fix error message on flow verify' " luca.boccassi
` (23 preceding siblings ...)
2021-07-26 13:52 ` [dpdk-stable] patch 'net/virtio: fix Rx scatter offload' " luca.boccassi
@ 2021-07-26 13:52 ` luca.boccassi
2021-07-26 13:52 ` [dpdk-stable] patch 'vdpa/mlx5: fix overflow in queue attribute' " luca.boccassi
` (32 subsequent siblings)
57 siblings, 0 replies; 208+ messages in thread
From: luca.boccassi @ 2021-07-26 13:52 UTC (permalink / raw)
To: Michael Baum; +Cc: Matan Azrad, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.3
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/28/21. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/4eb4301b074502667a0b8f425347d0219b366cab
Thanks.
Luca Boccassi
---
From 4eb4301b074502667a0b8f425347d0219b366cab Mon Sep 17 00:00:00 2001
From: Michael Baum <michaelba@nvidia.com>
Date: Thu, 1 Jul 2021 09:39:13 +0300
Subject: [PATCH] regex/mlx5: fix size of setup constants
[ upstream commit 423719a3677cc18d742264315c8451a931ade8e5 ]
The constant representing the size of the metadata is defined as an
unsigned int variable with 32-bit.
Similarly the constant representing the maximal output is also defined
as an unsigned int variable with 32-bit.
There is potentially overflowing expression when those constants are
evaluated using 32-bit arithmetic, and then used in a context that
expects an expression of type size_t that might be 64-bit.
Change the size of the above constants to size_t.
Fixes: 30d604bb1504 ("regex/mlx5: fix type of setup constants")
Signed-off-by: Michael Baum <michaelba@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
---
drivers/regex/mlx5/mlx5_regex_fastpath.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/regex/mlx5/mlx5_regex_fastpath.c b/drivers/regex/mlx5/mlx5_regex_fastpath.c
index 8d134ac98e..2d28e85e4d 100644
--- a/drivers/regex/mlx5/mlx5_regex_fastpath.c
+++ b/drivers/regex/mlx5/mlx5_regex_fastpath.c
@@ -25,8 +25,8 @@
#include "mlx5_regex.h"
#define MLX5_REGEX_MAX_WQE_INDEX 0xffff
-#define MLX5_REGEX_METADATA_SIZE UINT32_C(64)
-#define MLX5_REGEX_MAX_OUTPUT RTE_BIT32(11)
+#define MLX5_REGEX_METADATA_SIZE ((size_t)64)
+#define MLX5_REGEX_MAX_OUTPUT (((size_t)1) << 11)
#define MLX5_REGEX_WQE_CTRL_OFFSET 12
#define MLX5_REGEX_WQE_METADATA_OFFSET 16
#define MLX5_REGEX_WQE_GATHER_OFFSET 32
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-07-26 13:53:17.187248791 +0100
+++ 0026-regex-mlx5-fix-size-of-setup-constants.patch 2021-07-26 13:53:15.853292706 +0100
@@ -1 +1 @@
-From 423719a3677cc18d742264315c8451a931ade8e5 Mon Sep 17 00:00:00 2001
+From 4eb4301b074502667a0b8f425347d0219b366cab Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 423719a3677cc18d742264315c8451a931ade8e5 ]
+
@@ -18 +19,0 @@
-Cc: stable@dpdk.org
@@ -27 +28 @@
-index b57e7d7794..910bc845f3 100644
+index 8d134ac98e..2d28e85e4d 100644
^ permalink raw reply [flat|nested] 208+ messages in thread
* [dpdk-stable] patch 'vdpa/mlx5: fix overflow in queue attribute' has been queued to stable release 20.11.3
2021-07-26 13:52 ` [dpdk-stable] patch 'net/bonding: fix error message on flow verify' " luca.boccassi
` (24 preceding siblings ...)
2021-07-26 13:52 ` [dpdk-stable] patch 'regex/mlx5: fix size of setup constants' " luca.boccassi
@ 2021-07-26 13:52 ` luca.boccassi
2021-07-26 13:52 ` [dpdk-stable] patch 'net/mlx5: fix overflow in mempool argument' " luca.boccassi
` (31 subsequent siblings)
57 siblings, 0 replies; 208+ messages in thread
From: luca.boccassi @ 2021-07-26 13:52 UTC (permalink / raw)
To: Michael Baum; +Cc: Matan Azrad, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.3
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/28/21. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/c571fde575c25bf56e3470bea9a539d635654009
Thanks.
Luca Boccassi
---
From c571fde575c25bf56e3470bea9a539d635654009 Mon Sep 17 00:00:00 2001
From: Michael Baum <michaelba@nvidia.com>
Date: Thu, 1 Jul 2021 09:39:15 +0300
Subject: [PATCH] vdpa/mlx5: fix overflow in queue attribute
[ upstream commit c6b552e4c0aaedf910ddae0345faee360394958b ]
The mlx5_vdpa_event_qp_create function makes shifting to the numeric
constant 1, then multiplies it by another constant and finally assigns
it into a uint64_t variable.
The numeric constant type is an int with a 32-bit sign. if after
shifting , its MSB (bit of sign) will change, the uint64 variable will
get into it a different value than what the function intended it to get.
Set the numeric constant 1 to be uint64_t in the first place.
Fixes: 8395927cdfaf ("vdpa/mlx5: prepare HW queues")
Signed-off-by: Michael Baum <michaelba@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
---
drivers/vdpa/mlx5/mlx5_vdpa_event.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/vdpa/mlx5/mlx5_vdpa_event.c b/drivers/vdpa/mlx5/mlx5_vdpa_event.c
index 266cd8e57c..03c7f849ca 100644
--- a/drivers/vdpa/mlx5/mlx5_vdpa_event.c
+++ b/drivers/vdpa/mlx5/mlx5_vdpa_event.c
@@ -689,8 +689,8 @@ mlx5_vdpa_event_qp_create(struct mlx5_vdpa_priv *priv, uint16_t desc_n,
attr.wq_umem_id = eqp->umem_obj->umem_id;
attr.wq_umem_offset = 0;
attr.dbr_umem_id = eqp->umem_obj->umem_id;
- attr.dbr_address = (1 << log_desc_n) * MLX5_WSEG_SIZE;
attr.ts_format = mlx5_ts_format_conv(priv->qp_ts_format);
+ attr.dbr_address = RTE_BIT64(log_desc_n) * MLX5_WSEG_SIZE;
eqp->sw_qp = mlx5_devx_cmd_create_qp(priv->ctx, &attr);
if (!eqp->sw_qp) {
DRV_LOG(ERR, "Failed to create SW QP(%u).", rte_errno);
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-07-26 13:53:17.233466982 +0100
+++ 0027-vdpa-mlx5-fix-overflow-in-queue-attribute.patch 2021-07-26 13:53:15.853292706 +0100
@@ -1 +1 @@
-From c6b552e4c0aaedf910ddae0345faee360394958b Mon Sep 17 00:00:00 2001
+From c571fde575c25bf56e3470bea9a539d635654009 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit c6b552e4c0aaedf910ddae0345faee360394958b ]
+
@@ -17 +18,0 @@
-Cc: stable@dpdk.org
@@ -26 +27 @@
-index 88f6a4256d..3541c652ce 100644
+index 266cd8e57c..03c7f849ca 100644
@@ -29 +30 @@
-@@ -629,8 +629,8 @@ mlx5_vdpa_event_qp_create(struct mlx5_vdpa_priv *priv, uint16_t desc_n,
+@@ -689,8 +689,8 @@ mlx5_vdpa_event_qp_create(struct mlx5_vdpa_priv *priv, uint16_t desc_n,
^ permalink raw reply [flat|nested] 208+ messages in thread
* [dpdk-stable] patch 'net/mlx5: fix overflow in mempool argument' has been queued to stable release 20.11.3
2021-07-26 13:52 ` [dpdk-stable] patch 'net/bonding: fix error message on flow verify' " luca.boccassi
` (25 preceding siblings ...)
2021-07-26 13:52 ` [dpdk-stable] patch 'vdpa/mlx5: fix overflow in queue attribute' " luca.boccassi
@ 2021-07-26 13:52 ` luca.boccassi
2021-07-26 13:52 ` [dpdk-stable] patch 'regex/mlx5: fix redundancy in device removal' " luca.boccassi
` (30 subsequent siblings)
57 siblings, 0 replies; 208+ messages in thread
From: luca.boccassi @ 2021-07-26 13:52 UTC (permalink / raw)
To: Michael Baum; +Cc: Matan Azrad, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.3
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/28/21. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/0760fa23a0708f782b96655a2cd759541a88fc40
Thanks.
Luca Boccassi
---
From 0760fa23a0708f782b96655a2cd759541a88fc40 Mon Sep 17 00:00:00 2001
From: Michael Baum <michaelba@nvidia.com>
Date: Thu, 1 Jul 2021 09:39:16 +0300
Subject: [PATCH] net/mlx5: fix overflow in mempool argument
[ upstream commit 2fec07edd4bca7ead134a5a1b4672a682d6c6ad4 ]
The mlx5_mprq_alloc_mp function makes shifting to the numeric constant
1, for sending it as a parameter to rte_mempool_create function.
The rte_mempool_create function expects to get void pointer (uintptr_t,
might be 64-bit) and instead gets a 32-bit variable, because the
numeric constant size is a 32-bit.
In case the shift is greater than 32 the variable might lose its value
even though the function might get 64-bit argument.
Change the size of the numeric constant 1 to uintptr_t.
Fixes: 3a22f3877c9d ("net/mlx5: replace external mbuf shared memory")
Signed-off-by: Michael Baum <michaelba@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
---
drivers/net/mlx5/mlx5_rxq.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/mlx5/mlx5_rxq.c b/drivers/net/mlx5/mlx5_rxq.c
index 1a5cf99d51..6207dae8b5 100644
--- a/drivers/net/mlx5/mlx5_rxq.c
+++ b/drivers/net/mlx5/mlx5_rxq.c
@@ -1310,7 +1310,7 @@ mlx5_mprq_alloc_mp(struct rte_eth_dev *dev)
snprintf(name, sizeof(name), "port-%u-mprq", dev->data->port_id);
mp = rte_mempool_create(name, obj_num, obj_size, MLX5_MPRQ_MP_CACHE_SZ,
0, NULL, NULL, mlx5_mprq_buf_init,
- (void *)(uintptr_t)(1 << strd_num_n),
+ (void *)((uintptr_t)1 << strd_num_n),
dev->device->numa_node, 0);
if (mp == NULL) {
DRV_LOG(ERR,
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-07-26 13:53:17.291572723 +0100
+++ 0028-net-mlx5-fix-overflow-in-mempool-argument.patch 2021-07-26 13:53:15.857292791 +0100
@@ -1 +1 @@
-From 2fec07edd4bca7ead134a5a1b4672a682d6c6ad4 Mon Sep 17 00:00:00 2001
+From 0760fa23a0708f782b96655a2cd759541a88fc40 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 2fec07edd4bca7ead134a5a1b4672a682d6c6ad4 ]
+
@@ -18 +19,0 @@
-Cc: stable@dpdk.org
@@ -27 +28 @@
-index 23685d7654..dacffc9251 100644
+index 1a5cf99d51..6207dae8b5 100644
@@ -30 +31 @@
-@@ -1240,7 +1240,7 @@ mlx5_mprq_alloc_mp(struct rte_eth_dev *dev)
+@@ -1310,7 +1310,7 @@ mlx5_mprq_alloc_mp(struct rte_eth_dev *dev)
^ permalink raw reply [flat|nested] 208+ messages in thread
* [dpdk-stable] patch 'regex/mlx5: fix redundancy in device removal' has been queued to stable release 20.11.3
2021-07-26 13:52 ` [dpdk-stable] patch 'net/bonding: fix error message on flow verify' " luca.boccassi
` (26 preceding siblings ...)
2021-07-26 13:52 ` [dpdk-stable] patch 'net/mlx5: fix overflow in mempool argument' " luca.boccassi
@ 2021-07-26 13:52 ` luca.boccassi
2021-07-26 13:52 ` [dpdk-stable] patch 'net/mlx5: fix Rx/Tx queue checks' " luca.boccassi
` (29 subsequent siblings)
57 siblings, 0 replies; 208+ messages in thread
From: luca.boccassi @ 2021-07-26 13:52 UTC (permalink / raw)
To: Michael Baum; +Cc: Ori Kam, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.3
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/28/21. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/da1a6d5e462d783ca6aaf53ac9b58945d00ea485
Thanks.
Luca Boccassi
---
From da1a6d5e462d783ca6aaf53ac9b58945d00ea485 Mon Sep 17 00:00:00 2001
From: Michael Baum <michaelba@nvidia.com>
Date: Mon, 12 Jul 2021 10:06:44 +0300
Subject: [PATCH] regex/mlx5: fix redundancy in device removal
[ upstream commit 34c84ebbbcc8fc71901e17899f1bf1b1ba815084 ]
In the removal function, PMD releases all driver resources and
cancels the regexdev registry.
However, regexdev registration is accidentally canceled twice.
Remove one of them.
Fixes: b34d816363b5 ("regex/mlx5: support rules import")
Signed-off-by: Michael Baum <michaelba@nvidia.com>
Acked-by: Ori Kam <orika@nvidia.com>
---
drivers/regex/mlx5/mlx5_regex.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/regex/mlx5/mlx5_regex.c b/drivers/regex/mlx5/mlx5_regex.c
index 34827fa133..9ec9346a62 100644
--- a/drivers/regex/mlx5/mlx5_regex.c
+++ b/drivers/regex/mlx5/mlx5_regex.c
@@ -248,8 +248,6 @@ mlx5_regex_pci_remove(struct rte_pci_device *pci_dev)
rte_regexdev_unregister(priv->regexdev);
if (priv->ctx)
mlx5_glue->close_device(priv->ctx);
- if (priv->regexdev)
- rte_regexdev_unregister(priv->regexdev);
rte_free(priv);
}
return 0;
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-07-26 13:53:17.337867426 +0100
+++ 0029-regex-mlx5-fix-redundancy-in-device-removal.patch 2021-07-26 13:53:15.857292791 +0100
@@ -1 +1 @@
-From 34c84ebbbcc8fc71901e17899f1bf1b1ba815084 Mon Sep 17 00:00:00 2001
+From da1a6d5e462d783ca6aaf53ac9b58945d00ea485 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 34c84ebbbcc8fc71901e17899f1bf1b1ba815084 ]
+
@@ -13 +14,0 @@
-Cc: stable@dpdk.org
@@ -22 +23 @@
-index 279b89acc9..f17b6df47f 100644
+index 34827fa133..9ec9346a62 100644
@@ -25 +26 @@
-@@ -282,8 +282,6 @@ mlx5_regex_dev_remove(struct rte_device *rte_dev)
+@@ -248,8 +248,6 @@ mlx5_regex_pci_remove(struct rte_pci_device *pci_dev)
^ permalink raw reply [flat|nested] 208+ messages in thread
* [dpdk-stable] patch 'net/mlx5: fix Rx/Tx queue checks' has been queued to stable release 20.11.3
2021-07-26 13:52 ` [dpdk-stable] patch 'net/bonding: fix error message on flow verify' " luca.boccassi
` (27 preceding siblings ...)
2021-07-26 13:52 ` [dpdk-stable] patch 'regex/mlx5: fix redundancy in device removal' " luca.boccassi
@ 2021-07-26 13:52 ` luca.boccassi
2021-07-26 13:52 ` [dpdk-stable] patch 'net/mlx5: fix indirect action modify rollback' " luca.boccassi
` (28 subsequent siblings)
57 siblings, 0 replies; 208+ messages in thread
From: luca.boccassi @ 2021-07-26 13:52 UTC (permalink / raw)
To: Dmitry Kozlyuk; +Cc: Matan Azrad, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.3
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/28/21. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/a20d4d2506d1b91c2e1ed5c10261a77d2ab115e0
Thanks.
Luca Boccassi
---
From a20d4d2506d1b91c2e1ed5c10261a77d2ab115e0 Mon Sep 17 00:00:00 2001
From: Dmitry Kozlyuk <dkozlyuk@nvidia.com>
Date: Tue, 20 Jul 2021 10:53:35 +0300
Subject: [PATCH] net/mlx5: fix Rx/Tx queue checks
[ upstream commit 94e257ec8ca82a98e38ffb9e7c117a8aac554489 ]
When device configuration was interrupted by a signal,
mlx5_rxq/txq_release() could access yet unitinialized array
and crash the application. Add checks whether queue array
is initialized.
Fixes: a1366b1a2be3 ("net/mlx5: add reference counter on DPDK Rx queues")
Fixes: 6e78005a9b30 ("net/mlx5: add reference counter on DPDK Tx queues")
Signed-off-by: Dmitry Kozlyuk <dkozlyuk@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
---
drivers/net/mlx5/mlx5_rxq.c | 2 +-
drivers/net/mlx5/mlx5_txq.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/mlx5/mlx5_rxq.c b/drivers/net/mlx5/mlx5_rxq.c
index 6207dae8b5..edf91254b1 100644
--- a/drivers/net/mlx5/mlx5_rxq.c
+++ b/drivers/net/mlx5/mlx5_rxq.c
@@ -1782,7 +1782,7 @@ mlx5_rxq_release(struct rte_eth_dev *dev, uint16_t idx)
struct mlx5_priv *priv = dev->data->dev_private;
struct mlx5_rxq_ctrl *rxq_ctrl;
- if (!(*priv->rxqs)[idx])
+ if (priv->rxqs == NULL || (*priv->rxqs)[idx] == NULL)
return 0;
rxq_ctrl = container_of((*priv->rxqs)[idx], struct mlx5_rxq_ctrl, rxq);
if (__atomic_sub_fetch(&rxq_ctrl->refcnt, 1, __ATOMIC_RELAXED) > 1)
diff --git a/drivers/net/mlx5/mlx5_txq.c b/drivers/net/mlx5/mlx5_txq.c
index c53af10d58..9ec7b57f1c 100644
--- a/drivers/net/mlx5/mlx5_txq.c
+++ b/drivers/net/mlx5/mlx5_txq.c
@@ -1238,7 +1238,7 @@ mlx5_txq_release(struct rte_eth_dev *dev, uint16_t idx)
struct mlx5_priv *priv = dev->data->dev_private;
struct mlx5_txq_ctrl *txq_ctrl;
- if (!(*priv->txqs)[idx])
+ if (priv->txqs == NULL || (*priv->txqs)[idx] == NULL)
return 0;
txq_ctrl = container_of((*priv->txqs)[idx], struct mlx5_txq_ctrl, txq);
if (__atomic_sub_fetch(&txq_ctrl->refcnt, 1, __ATOMIC_RELAXED) > 1)
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-07-26 13:53:17.388961006 +0100
+++ 0030-net-mlx5-fix-Rx-Tx-queue-checks.patch 2021-07-26 13:53:15.861292875 +0100
@@ -1 +1 @@
-From 94e257ec8ca82a98e38ffb9e7c117a8aac554489 Mon Sep 17 00:00:00 2001
+From a20d4d2506d1b91c2e1ed5c10261a77d2ab115e0 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 94e257ec8ca82a98e38ffb9e7c117a8aac554489 ]
+
@@ -13 +14,0 @@
-Cc: stable@dpdk.org
@@ -23 +24 @@
-index dacffc9251..4a8b67e731 100644
+index 6207dae8b5..edf91254b1 100644
@@ -26 +27 @@
-@@ -1712,7 +1712,7 @@ mlx5_rxq_release(struct rte_eth_dev *dev, uint16_t idx)
+@@ -1782,7 +1782,7 @@ mlx5_rxq_release(struct rte_eth_dev *dev, uint16_t idx)
@@ -36 +37 @@
-index f68c0c61a9..eb4d34ca55 100644
+index c53af10d58..9ec7b57f1c 100644
@@ -39 +40 @@
-@@ -1246,7 +1246,7 @@ mlx5_txq_release(struct rte_eth_dev *dev, uint16_t idx)
+@@ -1238,7 +1238,7 @@ mlx5_txq_release(struct rte_eth_dev *dev, uint16_t idx)
^ permalink raw reply [flat|nested] 208+ messages in thread
* [dpdk-stable] patch 'net/mlx5: fix indirect action modify rollback' has been queued to stable release 20.11.3
2021-07-26 13:52 ` [dpdk-stable] patch 'net/bonding: fix error message on flow verify' " luca.boccassi
` (28 preceding siblings ...)
2021-07-26 13:52 ` [dpdk-stable] patch 'net/mlx5: fix Rx/Tx queue checks' " luca.boccassi
@ 2021-07-26 13:52 ` luca.boccassi
2021-07-26 13:52 ` [dpdk-stable] patch 'net/mlx5: fix RoCE LAG bond device probing' " luca.boccassi
` (27 subsequent siblings)
57 siblings, 0 replies; 208+ messages in thread
From: luca.boccassi @ 2021-07-26 13:52 UTC (permalink / raw)
To: Dmitry Kozlyuk; +Cc: Matan Azrad, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.3
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/28/21. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/453f8bb23518e6625dc1cb7e9799449a41080055
Thanks.
Luca Boccassi
---
From 453f8bb23518e6625dc1cb7e9799449a41080055 Mon Sep 17 00:00:00 2001
From: Dmitry Kozlyuk <dkozlyuk@nvidia.com>
Date: Wed, 21 Jul 2021 15:51:12 +0300
Subject: [PATCH] net/mlx5: fix indirect action modify rollback
[ upstream commit b7c8ea62d00f02c206ec2aded5581c2e0f01c377 ]
mlx5_ind_table_obj_modify() first references queues from the new list,
then applies the new list to HW. In case of apply failure the function
dereferenced queues from the old list, while it should be the new list.
Fixes: fa7ad49e96b5 ("net/mlx5: fix shared RSS action update")
Signed-off-by: Dmitry Kozlyuk <dkozlyuk@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
---
drivers/net/mlx5/mlx5_rxq.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/mlx5/mlx5_rxq.c b/drivers/net/mlx5/mlx5_rxq.c
index edf91254b1..002df27ab4 100644
--- a/drivers/net/mlx5/mlx5_rxq.c
+++ b/drivers/net/mlx5/mlx5_rxq.c
@@ -2150,7 +2150,7 @@ mlx5_ind_table_obj_modify(struct rte_eth_dev *dev,
error:
err = rte_errno;
for (j = 0; j < i; j++)
- mlx5_rxq_release(dev, ind_tbl->queues[j]);
+ mlx5_rxq_release(dev, queues[j]);
rte_errno = err;
DEBUG("Port %u cannot setup indirection table.", dev->data->port_id);
return ret;
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-07-26 13:53:17.473702541 +0100
+++ 0031-net-mlx5-fix-indirect-action-modify-rollback.patch 2021-07-26 13:53:15.865292959 +0100
@@ -1 +1 @@
-From b7c8ea62d00f02c206ec2aded5581c2e0f01c377 Mon Sep 17 00:00:00 2001
+From 453f8bb23518e6625dc1cb7e9799449a41080055 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit b7c8ea62d00f02c206ec2aded5581c2e0f01c377 ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -20 +21 @@
-index 4a8b67e731..49165f482e 100644
+index edf91254b1..002df27ab4 100644
@@ -23 +24 @@
-@@ -2086,7 +2086,7 @@ mlx5_ind_table_obj_modify(struct rte_eth_dev *dev,
+@@ -2150,7 +2150,7 @@ mlx5_ind_table_obj_modify(struct rte_eth_dev *dev,
@@ -30,2 +31,2 @@
- DRV_LOG(DEBUG, "Port %u cannot setup indirection table.",
- dev->data->port_id);
+ DEBUG("Port %u cannot setup indirection table.", dev->data->port_id);
+ return ret;
^ permalink raw reply [flat|nested] 208+ messages in thread
* [dpdk-stable] patch 'net/mlx5: fix RoCE LAG bond device probing' has been queued to stable release 20.11.3
2021-07-26 13:52 ` [dpdk-stable] patch 'net/bonding: fix error message on flow verify' " luca.boccassi
` (29 preceding siblings ...)
2021-07-26 13:52 ` [dpdk-stable] patch 'net/mlx5: fix indirect action modify rollback' " luca.boccassi
@ 2021-07-26 13:52 ` luca.boccassi
2021-07-26 13:52 ` [dpdk-stable] patch 'net/mlx5: fix RSS expansion for GTP' " luca.boccassi
` (26 subsequent siblings)
57 siblings, 0 replies; 208+ messages in thread
From: luca.boccassi @ 2021-07-26 13:52 UTC (permalink / raw)
To: Viacheslav Ovsiienko; +Cc: Matan Azrad, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.3
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/28/21. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/3fd282e728767285e9e80fddaaff2aba167e5dce
Thanks.
Luca Boccassi
---
From 3fd282e728767285e9e80fddaaff2aba167e5dce Mon Sep 17 00:00:00 2001
From: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
Date: Wed, 21 Jul 2021 11:31:40 +0300
Subject: [PATCH] net/mlx5: fix RoCE LAG bond device probing
[ upstream commit 9f430dd75107d47fb9b67ab756503397b59b8955 ]
The RoCE LAG bond device requires neither E-Switch nor SR-IOV
configurations. It means the RoCE LAG bond device might be
presented as a single port Infiniband device.
The mlx5 PMD wrongly recognized standalone RoCE LAG bond device
as E-Switch configuration, this triggered the calls of E-Switch
ports related API and the latter failed (over the new OFED kernel
driver, starting since 5.4.1), causing the overall device probe
failure.
If there is a single port Infiniband bond device found the
E-Switch related flags must be cleared indicating standalone
configuration.
Also, it is not true anymore the bond device can exist
over E-Switch configurations only (as it was claimed for VF LAG
bond devices). The related checks are not relevant anymore
and removed.
Fixes: 790164ce1d2d ("net/mlx5: check kernel support for VF LAG bonding")
Signed-off-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
---
drivers/net/mlx5/linux/mlx5_os.c | 24 +++++++++---------------
1 file changed, 9 insertions(+), 15 deletions(-)
diff --git a/drivers/net/mlx5/linux/mlx5_os.c b/drivers/net/mlx5/linux/mlx5_os.c
index 56e2bf64f4..e25d6ffe22 100644
--- a/drivers/net/mlx5/linux/mlx5_os.c
+++ b/drivers/net/mlx5/linux/mlx5_os.c
@@ -1889,19 +1889,6 @@ mlx5_os_pci_probe(struct rte_pci_driver *pci_drv __rte_unused,
goto exit;
}
}
-#ifndef HAVE_MLX5DV_DR_DEVX_PORT
- if (bd >= 0) {
- /*
- * This may happen if there is VF LAG kernel support and
- * application is compiled with older rdma_core library.
- */
- DRV_LOG(ERR,
- "No kernel/verbs support for VF LAG bonding found.");
- rte_errno = ENOTSUP;
- ret = -rte_errno;
- goto exit;
- }
-#endif
/*
* Now we can determine the maximal
* amount of devices to be spawned.
@@ -1964,10 +1951,18 @@ mlx5_os_pci_probe(struct rte_pci_driver *pci_drv __rte_unused,
(list[ns].ifindex,
&list[ns].info);
}
-#ifdef HAVE_MLX5DV_DR_DEVX_PORT
if (!ret && bd >= 0) {
switch (list[ns].info.name_type) {
case MLX5_PHYS_PORT_NAME_TYPE_UPLINK:
+ if (np == 1) {
+ /*
+ * Force standalone bonding
+ * device for ROCE LAG
+ * confgiurations.
+ */
+ list[ns].info.master = 0;
+ list[ns].info.representor = 0;
+ }
if (list[ns].info.port_name == bd)
ns++;
break;
@@ -1982,7 +1977,6 @@ mlx5_os_pci_probe(struct rte_pci_driver *pci_drv __rte_unused,
}
continue;
}
-#endif
if (!ret && (list[ns].info.representor ^
list[ns].info.master))
ns++;
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-07-26 13:53:17.529268106 +0100
+++ 0032-net-mlx5-fix-RoCE-LAG-bond-device-probing.patch 2021-07-26 13:53:15.865292959 +0100
@@ -1 +1 @@
-From 9f430dd75107d47fb9b67ab756503397b59b8955 Mon Sep 17 00:00:00 2001
+From 3fd282e728767285e9e80fddaaff2aba167e5dce Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 9f430dd75107d47fb9b67ab756503397b59b8955 ]
+
@@ -26 +27,0 @@
-Cc: stable@dpdk.org
@@ -35 +36 @@
-index 81fbed2872..4712bd6f9b 100644
+index 56e2bf64f4..e25d6ffe22 100644
@@ -38 +39 @@
-@@ -2238,19 +2238,6 @@ mlx5_os_pci_probe_pf(struct rte_pci_device *pci_dev,
+@@ -1889,19 +1889,6 @@ mlx5_os_pci_probe(struct rte_pci_driver *pci_drv __rte_unused,
@@ -58 +59 @@
-@@ -2314,10 +2301,18 @@ mlx5_os_pci_probe_pf(struct rte_pci_device *pci_dev,
+@@ -1964,10 +1951,18 @@ mlx5_os_pci_probe(struct rte_pci_driver *pci_drv __rte_unused,
@@ -78 +79 @@
-@@ -2334,7 +2329,6 @@ mlx5_os_pci_probe_pf(struct rte_pci_device *pci_dev,
+@@ -1982,7 +1977,6 @@ mlx5_os_pci_probe(struct rte_pci_driver *pci_drv __rte_unused,
^ permalink raw reply [flat|nested] 208+ messages in thread
* [dpdk-stable] patch 'net/mlx5: fix RSS expansion for GTP' has been queued to stable release 20.11.3
2021-07-26 13:52 ` [dpdk-stable] patch 'net/bonding: fix error message on flow verify' " luca.boccassi
` (30 preceding siblings ...)
2021-07-26 13:52 ` [dpdk-stable] patch 'net/mlx5: fix RoCE LAG bond device probing' " luca.boccassi
@ 2021-07-26 13:52 ` luca.boccassi
2021-07-26 13:52 ` [dpdk-stable] patch 'net/mlx5: reject inner ethernet matching in " luca.boccassi
` (25 subsequent siblings)
57 siblings, 0 replies; 208+ messages in thread
From: luca.boccassi @ 2021-07-26 13:52 UTC (permalink / raw)
To: Lior Margalit; +Cc: Matan Azrad, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.3
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/28/21. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/cf3ae2009ce9e46c81fd030dc27bd70d4caffe16
Thanks.
Luca Boccassi
---
From cf3ae2009ce9e46c81fd030dc27bd70d4caffe16 Mon Sep 17 00:00:00 2001
From: Lior Margalit <lmargalit@nvidia.com>
Date: Sun, 18 Jul 2021 14:15:04 +0300
Subject: [PATCH] net/mlx5: fix RSS expansion for GTP
[ upstream commit 3e455a97dcb23b6e3684aa48a0302cf0429f4286 ]
The flow did not expand correctly when it included a GTP item.
Added GTP node to the expansion graph as possible next node
after IPv4/IPv6 UDP node.
Fixes: 592f05b29a25 ("net/mlx5: add RSS flow action")
Signed-off-by: Lior Margalit <lmargalit@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
---
drivers/net/mlx5/mlx5_flow.c | 13 +++++++++++--
1 file changed, 11 insertions(+), 2 deletions(-)
diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c
index 4f5a0cf95c..f067619001 100644
--- a/drivers/net/mlx5/mlx5_flow.c
+++ b/drivers/net/mlx5/mlx5_flow.c
@@ -135,6 +135,7 @@ mlx5_flow_is_rss_expandable_item(const struct rte_flow_item *item)
case RTE_FLOW_ITEM_TYPE_VXLAN_GPE:
case RTE_FLOW_ITEM_TYPE_GRE_KEY:
case RTE_FLOW_ITEM_TYPE_IPV6_FRAG_EXT:
+ case RTE_FLOW_ITEM_TYPE_GTP:
return true;
default:
break;
@@ -455,6 +456,7 @@ enum mlx5_expansion {
MLX5_EXPANSION_IPV6_UDP,
MLX5_EXPANSION_IPV6_TCP,
MLX5_EXPANSION_IPV6_FRAG_EXT,
+ MLX5_EXPANSION_GTP
};
/** Supported expansion of items. */
@@ -511,7 +513,8 @@ static const struct mlx5_flow_expand_node mlx5_support_expansion[] = {
[MLX5_EXPANSION_OUTER_IPV4_UDP] = {
.next = MLX5_FLOW_EXPAND_RSS_NEXT(MLX5_EXPANSION_VXLAN,
MLX5_EXPANSION_VXLAN_GPE,
- MLX5_EXPANSION_MPLS),
+ MLX5_EXPANSION_MPLS,
+ MLX5_EXPANSION_GTP),
.type = RTE_FLOW_ITEM_TYPE_UDP,
.rss_types = ETH_RSS_NONFRAG_IPV4_UDP,
},
@@ -534,7 +537,8 @@ static const struct mlx5_flow_expand_node mlx5_support_expansion[] = {
[MLX5_EXPANSION_OUTER_IPV6_UDP] = {
.next = MLX5_FLOW_EXPAND_RSS_NEXT(MLX5_EXPANSION_VXLAN,
MLX5_EXPANSION_VXLAN_GPE,
- MLX5_EXPANSION_MPLS),
+ MLX5_EXPANSION_MPLS,
+ MLX5_EXPANSION_GTP),
.type = RTE_FLOW_ITEM_TYPE_UDP,
.rss_types = ETH_RSS_NONFRAG_IPV6_UDP,
},
@@ -626,6 +630,11 @@ static const struct mlx5_flow_expand_node mlx5_support_expansion[] = {
[MLX5_EXPANSION_IPV6_FRAG_EXT] = {
.type = RTE_FLOW_ITEM_TYPE_IPV6_FRAG_EXT,
},
+ [MLX5_EXPANSION_GTP] = {
+ .next = MLX5_FLOW_EXPAND_RSS_NEXT(MLX5_EXPANSION_IPV4,
+ MLX5_EXPANSION_IPV6),
+ .type = RTE_FLOW_ITEM_TYPE_GTP
+ }
};
static struct rte_flow_shared_action *
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-07-26 13:53:17.593507971 +0100
+++ 0033-net-mlx5-fix-RSS-expansion-for-GTP.patch 2021-07-26 13:53:15.873293127 +0100
@@ -1 +1 @@
-From 3e455a97dcb23b6e3684aa48a0302cf0429f4286 Mon Sep 17 00:00:00 2001
+From cf3ae2009ce9e46c81fd030dc27bd70d4caffe16 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 3e455a97dcb23b6e3684aa48a0302cf0429f4286 ]
+
@@ -12 +13,0 @@
-Cc: stable@dpdk.org
@@ -21 +22 @@
-index 2dba207d27..2059f29b23 100644
+index 4f5a0cf95c..f067619001 100644
@@ -71 +72 @@
- static struct rte_flow_action_handle *
+ static struct rte_flow_shared_action *
^ permalink raw reply [flat|nested] 208+ messages in thread
* [dpdk-stable] patch 'net/mlx5: reject inner ethernet matching in GTP' has been queued to stable release 20.11.3
2021-07-26 13:52 ` [dpdk-stable] patch 'net/bonding: fix error message on flow verify' " luca.boccassi
` (31 preceding siblings ...)
2021-07-26 13:52 ` [dpdk-stable] patch 'net/mlx5: fix RSS expansion for GTP' " luca.boccassi
@ 2021-07-26 13:52 ` luca.boccassi
2021-07-26 13:52 ` [dpdk-stable] patch 'net/mlx5: export PMD-specific API file' " luca.boccassi
` (24 subsequent siblings)
57 siblings, 0 replies; 208+ messages in thread
From: luca.boccassi @ 2021-07-26 13:52 UTC (permalink / raw)
To: Lior Margalit; +Cc: Matan Azrad, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.3
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/28/21. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/d0213e26bbb0d02d4c811527e8c3a7b014aca3c4
Thanks.
Luca Boccassi
---
From d0213e26bbb0d02d4c811527e8c3a7b014aca3c4 Mon Sep 17 00:00:00 2001
From: Lior Margalit <lmargalit@nvidia.com>
Date: Tue, 20 Jul 2021 18:17:18 +0300
Subject: [PATCH] net/mlx5: reject inner ethernet matching in GTP
[ upstream commit 4e5ba38d56e3a037271547c90fbfc25c81938a4f ]
The user is able to create a flow rule pattern with ETH after GTP
although it is not supported by the flex-parser configuration.
Failed the rule validation in such case with proper error message.
Fixes: 23c1d42c7138 ("net/mlx5: split flow validation to dedicated function")
Signed-off-by: Lior Margalit <lmargalit@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
---
drivers/net/mlx5/mlx5_flow.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c
index f067619001..75d172e06b 100644
--- a/drivers/net/mlx5/mlx5_flow.c
+++ b/drivers/net/mlx5/mlx5_flow.c
@@ -1914,6 +1914,10 @@ mlx5_flow_validate_item_eth(const struct rte_flow_item *item,
return rte_flow_error_set(error, EINVAL,
RTE_FLOW_ERROR_TYPE_ITEM, item,
"L2 layer should not follow VLAN");
+ if (item_flags & MLX5_FLOW_LAYER_GTP)
+ return rte_flow_error_set(error, EINVAL,
+ RTE_FLOW_ERROR_TYPE_ITEM, item,
+ "L2 layer should not follow GTP");
if (!mask)
mask = &rte_flow_item_eth_mask;
ret = mlx5_flow_item_acceptable(item, (const uint8_t *)mask,
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-07-26 13:53:17.656093082 +0100
+++ 0034-net-mlx5-reject-inner-ethernet-matching-in-GTP.patch 2021-07-26 13:53:15.885293379 +0100
@@ -1 +1 @@
-From 4e5ba38d56e3a037271547c90fbfc25c81938a4f Mon Sep 17 00:00:00 2001
+From d0213e26bbb0d02d4c811527e8c3a7b014aca3c4 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 4e5ba38d56e3a037271547c90fbfc25c81938a4f ]
+
@@ -12 +13,0 @@
-Cc: stable@dpdk.org
@@ -21 +22 @@
-index 2059f29b23..a3fdce685e 100644
+index f067619001..75d172e06b 100644
@@ -24 +25 @@
-@@ -1999,6 +1999,10 @@ mlx5_flow_validate_item_eth(const struct rte_flow_item *item,
+@@ -1914,6 +1914,10 @@ mlx5_flow_validate_item_eth(const struct rte_flow_item *item,
^ permalink raw reply [flat|nested] 208+ messages in thread
* [dpdk-stable] patch 'net/mlx5: export PMD-specific API file' has been queued to stable release 20.11.3
2021-07-26 13:52 ` [dpdk-stable] patch 'net/bonding: fix error message on flow verify' " luca.boccassi
` (32 preceding siblings ...)
2021-07-26 13:52 ` [dpdk-stable] patch 'net/mlx5: reject inner ethernet matching in " luca.boccassi
@ 2021-07-26 13:52 ` luca.boccassi
2021-07-26 13:52 ` [dpdk-stable] patch 'net/bnxt: remove workaround for default VNIC' " luca.boccassi
` (23 subsequent siblings)
57 siblings, 0 replies; 208+ messages in thread
From: luca.boccassi @ 2021-07-26 13:52 UTC (permalink / raw)
To: Liang Ma; +Cc: dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.3
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/28/21. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/03348e9bec44e034f2aa942a18a55fb9f66960ac
Thanks.
Luca Boccassi
---
From 03348e9bec44e034f2aa942a18a55fb9f66960ac Mon Sep 17 00:00:00 2001
From: Liang Ma <liangma@bytedance.com>
Date: Sun, 18 Jul 2021 11:29:16 +0100
Subject: [PATCH] net/mlx5: export PMD-specific API file
[ upstream commit da7a5c14062ef48e2cbec1959e6fe89975498cfd ]
The file rte_pmd_mlx5.h should be exported by Meson.
Fixes: efa79e68c8cd ("net/mlx5: support fine grain dynamic flag")
Fixes: 23f627e0ed28 ("net/mlx5: add flow sync API")
Signed-off-by: Liang Ma <liangma@bytedance.com>
---
drivers/net/mlx5/meson.build | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/net/mlx5/meson.build b/drivers/net/mlx5/meson.build
index e7495a764a..701afeab19 100644
--- a/drivers/net/mlx5/meson.build
+++ b/drivers/net/mlx5/meson.build
@@ -9,6 +9,7 @@ if not (is_linux or is_windows)
endif
deps += ['hash', 'common_mlx5']
+headers = files('rte_pmd_mlx5.h')
sources = files(
'mlx5.c',
'mlx5_ethdev.c',
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-07-26 13:53:17.718623974 +0100
+++ 0035-net-mlx5-export-PMD-specific-API-file.patch 2021-07-26 13:53:15.885293379 +0100
@@ -1 +1 @@
-From da7a5c14062ef48e2cbec1959e6fe89975498cfd Mon Sep 17 00:00:00 2001
+From 03348e9bec44e034f2aa942a18a55fb9f66960ac Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit da7a5c14062ef48e2cbec1959e6fe89975498cfd ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -18 +19 @@
-index 6f28be2f93..dac7f1fabf 100644
+index e7495a764a..701afeab19 100644
@@ -27,2 +28,2 @@
- 'mlx5.c',
- 'mlx5_ethdev.c',
+ 'mlx5.c',
+ 'mlx5_ethdev.c',
^ permalink raw reply [flat|nested] 208+ messages in thread
* [dpdk-stable] patch 'net/bnxt: remove workaround for default VNIC' has been queued to stable release 20.11.3
2021-07-26 13:52 ` [dpdk-stable] patch 'net/bonding: fix error message on flow verify' " luca.boccassi
` (33 preceding siblings ...)
2021-07-26 13:52 ` [dpdk-stable] patch 'net/mlx5: export PMD-specific API file' " luca.boccassi
@ 2021-07-26 13:52 ` luca.boccassi
2021-07-26 13:53 ` [dpdk-stable] patch 'net/bnxt: fix null dereference in interrupt handler' " luca.boccassi
` (22 subsequent siblings)
57 siblings, 0 replies; 208+ messages in thread
From: luca.boccassi @ 2021-07-26 13:52 UTC (permalink / raw)
To: Kalesh AP; +Cc: Ajit Khaparde, Lance Richardson, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.3
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/28/21. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/3e8a6d6b1d99144324854938d0813c21ab185562
Thanks.
Luca Boccassi
---
From 3e8a6d6b1d99144324854938d0813c21ab185562 Mon Sep 17 00:00:00 2001
From: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Date: Sun, 18 Jul 2021 11:00:59 +0530
Subject: [PATCH] net/bnxt: remove workaround for default VNIC
[ upstream commit 609960ca7b0c7c7295f1641c6a8feac7af871024 ]
On older Wh+ firmware versions, HWRM_FUNC_QCFG returns zero
for the parent default vnic. Commit "3fb93bc7c349" added a
temporary Wh+-specific workaround in the PMD.
This has been fixed in latest firmware and hence removing
the workaround.
Fixes: 3fb93bc7c349 ("net/bnxt: initialize parent PF information")
Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Reviewed-by: Lance Richardson <lance.richardson@broadcom.com>
---
drivers/net/bnxt/bnxt_hwrm.c | 10 ----------
1 file changed, 10 deletions(-)
diff --git a/drivers/net/bnxt/bnxt_hwrm.c b/drivers/net/bnxt/bnxt_hwrm.c
index 4d24c9c561..39778e38ef 100644
--- a/drivers/net/bnxt/bnxt_hwrm.c
+++ b/drivers/net/bnxt/bnxt_hwrm.c
@@ -3266,16 +3266,6 @@ int bnxt_hwrm_parent_pf_qcfg(struct bnxt *bp)
bp->parent->fid = rte_le_to_cpu_16(resp->fid);
bp->parent->port_id = rte_le_to_cpu_16(resp->port_id);
- /* FIXME: Temporary workaround - remove when firmware issue is fixed. */
- if (bp->parent->vnic == 0) {
- PMD_DRV_LOG(DEBUG, "parent VNIC unavailable.\n");
- /* Use hard-coded values appropriate for current Wh+ fw. */
- if (bp->parent->fid == 2)
- bp->parent->vnic = 0x100;
- else
- bp->parent->vnic = 1;
- }
-
HWRM_UNLOCK();
return 0;
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-07-26 13:53:17.767000307 +0100
+++ 0036-net-bnxt-remove-workaround-for-default-VNIC.patch 2021-07-26 13:53:15.893293547 +0100
@@ -1 +1 @@
-From 609960ca7b0c7c7295f1641c6a8feac7af871024 Mon Sep 17 00:00:00 2001
+From 3e8a6d6b1d99144324854938d0813c21ab185562 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 609960ca7b0c7c7295f1641c6a8feac7af871024 ]
+
@@ -13 +14,0 @@
-Cc: stable@dpdk.org
@@ -23 +24 @@
-index e6c46d46de..73deb41f81 100644
+index 4d24c9c561..39778e38ef 100644
@@ -26 +27 @@
-@@ -3390,16 +3390,6 @@ int bnxt_hwrm_parent_pf_qcfg(struct bnxt *bp)
+@@ -3266,16 +3266,6 @@ int bnxt_hwrm_parent_pf_qcfg(struct bnxt *bp)
^ permalink raw reply [flat|nested] 208+ messages in thread
* [dpdk-stable] patch 'net/bnxt: fix null dereference in interrupt handler' has been queued to stable release 20.11.3
2021-07-26 13:52 ` [dpdk-stable] patch 'net/bonding: fix error message on flow verify' " luca.boccassi
` (34 preceding siblings ...)
2021-07-26 13:52 ` [dpdk-stable] patch 'net/bnxt: remove workaround for default VNIC' " luca.boccassi
@ 2021-07-26 13:53 ` luca.boccassi
2021-07-26 13:53 ` [dpdk-stable] patch 'eal/windows: check callback parameter of alarm functions' " luca.boccassi
` (21 subsequent siblings)
57 siblings, 0 replies; 208+ messages in thread
From: luca.boccassi @ 2021-07-26 13:53 UTC (permalink / raw)
To: Kalesh AP; +Cc: Ajit Khaparde, Lance Richardson, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.3
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/28/21. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/806a18751b2029a1fc83c44be59f9ef266673c27
Thanks.
Luca Boccassi
---
From 806a18751b2029a1fc83c44be59f9ef266673c27 Mon Sep 17 00:00:00 2001
From: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Date: Tue, 20 Jul 2021 21:51:58 +0530
Subject: [PATCH] net/bnxt: fix null dereference in interrupt handler
[ upstream commit 3f44ec48c733f7d7607877164c9aa0305de9cecd ]
Coverity reports that pointer "cpr->cp_ring_struct" may be
dereferenced with null value. This patch fixes this.
Coverity issue: 372063
Fixes: 5ed30db87fa8 ("net/bnxt: fix missing barriers in completion handling")
Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Reviewed-by: Lance Richardson <lance.richardson@broadcom.com>
---
drivers/net/bnxt/bnxt_irq.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/bnxt/bnxt_irq.c b/drivers/net/bnxt/bnxt_irq.c
index 14075e41d2..1a99508572 100644
--- a/drivers/net/bnxt/bnxt_irq.c
+++ b/drivers/net/bnxt/bnxt_irq.c
@@ -33,7 +33,6 @@ void bnxt_int_handler(void *param)
return;
raw_cons = cpr->cp_raw_cons;
- cp_ring_size = cpr->cp_ring_struct->ring_size;
pthread_mutex_lock(&bp->def_cp_lock);
while (1) {
if (!cpr || !cpr->cp_ring_struct || !cpr->cp_db.doorbell) {
@@ -46,6 +45,7 @@ void bnxt_int_handler(void *param)
return;
}
+ cp_ring_size = cpr->cp_ring_struct->ring_size;
cons = RING_CMP(cpr->cp_ring_struct, raw_cons);
cmp = &cpr->cp_desc_ring[cons];
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-07-26 13:53:17.822810395 +0100
+++ 0037-net-bnxt-fix-null-dereference-in-interrupt-handler.patch 2021-07-26 13:53:15.893293547 +0100
@@ -1 +1 @@
-From 3f44ec48c733f7d7607877164c9aa0305de9cecd Mon Sep 17 00:00:00 2001
+From 806a18751b2029a1fc83c44be59f9ef266673c27 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 3f44ec48c733f7d7607877164c9aa0305de9cecd ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -21 +22 @@
-index ebdac8385d..122a1f9908 100644
+index 14075e41d2..1a99508572 100644
^ permalink raw reply [flat|nested] 208+ messages in thread
* [dpdk-stable] patch 'eal/windows: check callback parameter of alarm functions' has been queued to stable release 20.11.3
2021-07-26 13:52 ` [dpdk-stable] patch 'net/bonding: fix error message on flow verify' " luca.boccassi
` (35 preceding siblings ...)
2021-07-26 13:53 ` [dpdk-stable] patch 'net/bnxt: fix null dereference in interrupt handler' " luca.boccassi
@ 2021-07-26 13:53 ` luca.boccassi
2021-07-26 13:53 ` [dpdk-stable] patch 'net/softnic: fix memory leak in arguments parsing' " luca.boccassi
` (20 subsequent siblings)
57 siblings, 0 replies; 208+ messages in thread
From: luca.boccassi @ 2021-07-26 13:53 UTC (permalink / raw)
To: Jie Zhou; +Cc: Dmitry Kozlyuk, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.3
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/28/21. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/ce81944f3dc9dd1a6b48674e7e5c603461c71f75
Thanks.
Luca Boccassi
---
From ce81944f3dc9dd1a6b48674e7e5c603461c71f75 Mon Sep 17 00:00:00 2001
From: Jie Zhou <jizh@linux.microsoft.com>
Date: Wed, 7 Jul 2021 13:25:38 -0700
Subject: [PATCH] eal/windows: check callback parameter of alarm functions
[ upstream commit b8617fcc511cd1cba3c32632612265b5d0f1184b ]
EAL functions rte_eal_alarm_set() and rte_eal_alarm_cancel()
did not for invalid parameters in Windows implementation,
which is caught by the unit test alarm_autotest.
Enforce parameter check to fail fast for invalid parameters.
Fixes: f4cbdbc7fbd2 ("eal/windows: implement alarm API")
Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
Acked-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
---
lib/librte_eal/windows/eal_alarm.c | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/lib/librte_eal/windows/eal_alarm.c b/lib/librte_eal/windows/eal_alarm.c
index f5bf88715a..e5dc54efb8 100644
--- a/lib/librte_eal/windows/eal_alarm.c
+++ b/lib/librte_eal/windows/eal_alarm.c
@@ -91,6 +91,12 @@ rte_eal_alarm_set(uint64_t us, rte_eal_alarm_callback cb_fn, void *cb_arg)
LARGE_INTEGER deadline;
int ret;
+ if (cb_fn == NULL) {
+ RTE_LOG(ERR, EAL, "NULL callback\n");
+ ret = -EINVAL;
+ goto exit;
+ }
+
/* Calculate deadline ASAP, unit of measure = 100ns. */
GetSystemTimePreciseAsFileTime(&ft);
deadline.LowPart = ft.dwLowDateTime;
@@ -180,6 +186,12 @@ rte_eal_alarm_cancel(rte_eal_alarm_callback cb_fn, void *cb_arg)
bool executing;
removed = 0;
+
+ if (cb_fn == NULL) {
+ RTE_LOG(ERR, EAL, "NULL callback\n");
+ return -EINVAL;
+ }
+
do {
executing = false;
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-07-26 13:53:17.877004050 +0100
+++ 0038-eal-windows-check-callback-parameter-of-alarm-functi.patch 2021-07-26 13:53:15.893293547 +0100
@@ -1 +1 @@
-From b8617fcc511cd1cba3c32632612265b5d0f1184b Mon Sep 17 00:00:00 2001
+From ce81944f3dc9dd1a6b48674e7e5c603461c71f75 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit b8617fcc511cd1cba3c32632612265b5d0f1184b ]
+
@@ -13 +14,0 @@
-Cc: stable@dpdk.org
@@ -18 +19 @@
- lib/eal/windows/eal_alarm.c | 12 ++++++++++++
+ lib/librte_eal/windows/eal_alarm.c | 12 ++++++++++++
@@ -21 +22 @@
-diff --git a/lib/eal/windows/eal_alarm.c b/lib/eal/windows/eal_alarm.c
+diff --git a/lib/librte_eal/windows/eal_alarm.c b/lib/librte_eal/windows/eal_alarm.c
@@ -23,2 +24,2 @@
---- a/lib/eal/windows/eal_alarm.c
-+++ b/lib/eal/windows/eal_alarm.c
+--- a/lib/librte_eal/windows/eal_alarm.c
++++ b/lib/librte_eal/windows/eal_alarm.c
^ permalink raw reply [flat|nested] 208+ messages in thread
* [dpdk-stable] patch 'net/softnic: fix memory leak in arguments parsing' has been queued to stable release 20.11.3
2021-07-26 13:52 ` [dpdk-stable] patch 'net/bonding: fix error message on flow verify' " luca.boccassi
` (36 preceding siblings ...)
2021-07-26 13:53 ` [dpdk-stable] patch 'eal/windows: check callback parameter of alarm functions' " luca.boccassi
@ 2021-07-26 13:53 ` luca.boccassi
2021-07-26 13:53 ` [dpdk-stable] patch 'net/hns3: fix residual MAC address entry' " luca.boccassi
` (19 subsequent siblings)
57 siblings, 0 replies; 208+ messages in thread
From: luca.boccassi @ 2021-07-26 13:53 UTC (permalink / raw)
To: Dapeng Yu; +Cc: Jasvinder Singh, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.3
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/28/21. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/752b19f91f53bb093d7081ac8a16e80872b82061
Thanks.
Luca Boccassi
---
From 752b19f91f53bb093d7081ac8a16e80872b82061 Mon Sep 17 00:00:00 2001
From: Dapeng Yu <dapengx.yu@intel.com>
Date: Thu, 15 Jul 2021 13:38:14 +0800
Subject: [PATCH] net/softnic: fix memory leak in arguments parsing
[ upstream commit d8f852f5f3692bbf15743d1aca25e6abcbe652ad ]
In function pmd_parse_args(), firmware path is duplicated from device
arguments as character string, but is never freed, which cause memory
leak.
This patch changes the type of firmware member of struct pmd_params to
character array, to make memory resource release unnecessary, and
changes the type of name member to character array, to keep the
consistency of character string handling in struct pmd_params.
Fixes: 7e68bc20f8c8 ("net/softnic: restructure")
Signed-off-by: Dapeng Yu <dapengx.yu@intel.com>
Acked-by: Jasvinder Singh <jasvinder.singh@intel.com>
---
drivers/net/softnic/rte_eth_softnic.c | 30 ++++++++++++++++---
.../net/softnic/rte_eth_softnic_internals.h | 5 ++--
2 files changed, 29 insertions(+), 6 deletions(-)
diff --git a/drivers/net/softnic/rte_eth_softnic.c b/drivers/net/softnic/rte_eth_softnic.c
index 3387ab485f..ceed6bf96d 100644
--- a/drivers/net/softnic/rte_eth_softnic.c
+++ b/drivers/net/softnic/rte_eth_softnic.c
@@ -447,6 +447,7 @@ pmd_parse_args(struct pmd_params *p, const char *params)
{
struct rte_kvargs *kvlist;
int ret = 0;
+ char *firmware = NULL;
kvlist = rte_kvargs_parse(params, pmd_valid_args);
if (kvlist == NULL)
@@ -454,7 +455,14 @@ pmd_parse_args(struct pmd_params *p, const char *params)
/* Set default values */
memset(p, 0, sizeof(*p));
- p->firmware = SOFTNIC_FIRMWARE;
+ if (rte_strscpy(p->firmware, SOFTNIC_FIRMWARE,
+ sizeof(p->firmware)) < 0) {
+ PMD_LOG(WARNING,
+ "\"%s\": firmware path should be shorter than %zu",
+ SOFTNIC_FIRMWARE, sizeof(p->firmware));
+ ret = -EINVAL;
+ goto out_free;
+ }
p->cpu_id = SOFTNIC_CPU_ID;
p->sc = SOFTNIC_SC;
p->tm.n_queues = SOFTNIC_TM_N_QUEUES;
@@ -475,11 +483,20 @@ pmd_parse_args(struct pmd_params *p, const char *params)
/* Firmware script (optional) */
if (rte_kvargs_count(kvlist, PMD_PARAM_FIRMWARE) == 1) {
ret = rte_kvargs_process(kvlist, PMD_PARAM_FIRMWARE,
- &get_string, &p->firmware);
+ &get_string, &firmware);
if (ret < 0)
goto out_free;
}
-
+ if (rte_strscpy(p->firmware, firmware,
+ sizeof(p->firmware)) < 0) {
+ PMD_LOG(WARNING,
+ "\"%s\": firmware path should be shorter than %zu",
+ firmware, sizeof(p->firmware));
+ free(firmware);
+ ret = -EINVAL;
+ goto out_free;
+ }
+ free(firmware);
/* Connection listening port (optional) */
if (rte_kvargs_count(kvlist, PMD_PARAM_CONN_PORT) == 1) {
ret = rte_kvargs_process(kvlist, PMD_PARAM_CONN_PORT,
@@ -628,7 +645,12 @@ pmd_probe(struct rte_vdev_device *vdev)
if (status)
return status;
- p.name = name;
+ if (rte_strscpy(p.name, name, sizeof(p.name)) < 0) {
+ PMD_LOG(WARNING,
+ "\"%s\": device name should be shorter than %zu",
+ name, sizeof(p.name));
+ return -EINVAL;
+ }
/* Allocate and initialize soft ethdev private data */
dev_private = pmd_init(&p);
diff --git a/drivers/net/softnic/rte_eth_softnic_internals.h b/drivers/net/softnic/rte_eth_softnic_internals.h
index 9c8737c9e2..263c48ba3b 100644
--- a/drivers/net/softnic/rte_eth_softnic_internals.h
+++ b/drivers/net/softnic/rte_eth_softnic_internals.h
@@ -28,14 +28,15 @@
#include "conn.h"
#define NAME_SIZE 64
+#define SOFTNIC_PATH_MAX 4096
/**
* PMD Parameters
*/
struct pmd_params {
- const char *name;
- const char *firmware;
+ char name[NAME_SIZE];
+ char firmware[SOFTNIC_PATH_MAX];
uint16_t conn_port;
uint32_t cpu_id;
int sc; /**< Service cores. */
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-07-26 13:53:17.924036838 +0100
+++ 0039-net-softnic-fix-memory-leak-in-arguments-parsing.patch 2021-07-26 13:53:15.897293631 +0100
@@ -1 +1 @@
-From d8f852f5f3692bbf15743d1aca25e6abcbe652ad Mon Sep 17 00:00:00 2001
+From 752b19f91f53bb093d7081ac8a16e80872b82061 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit d8f852f5f3692bbf15743d1aca25e6abcbe652ad ]
+
@@ -16 +17,0 @@
-Cc: stable@dpdk.org
@@ -26 +27 @@
-index f64023256d..0aa7147b13 100644
+index 3387ab485f..ceed6bf96d 100644
@@ -29 +30 @@
-@@ -440,6 +440,7 @@ pmd_parse_args(struct pmd_params *p, const char *params)
+@@ -447,6 +447,7 @@ pmd_parse_args(struct pmd_params *p, const char *params)
@@ -37 +38 @@
-@@ -447,7 +448,14 @@ pmd_parse_args(struct pmd_params *p, const char *params)
+@@ -454,7 +455,14 @@ pmd_parse_args(struct pmd_params *p, const char *params)
@@ -53 +54 @@
-@@ -468,11 +476,20 @@ pmd_parse_args(struct pmd_params *p, const char *params)
+@@ -475,11 +483,20 @@ pmd_parse_args(struct pmd_params *p, const char *params)
@@ -76 +77 @@
-@@ -621,7 +638,12 @@ pmd_probe(struct rte_vdev_device *vdev)
+@@ -628,7 +645,12 @@ pmd_probe(struct rte_vdev_device *vdev)
@@ -91 +92 @@
-index 1b3186ef0b..07285ca315 100644
+index 9c8737c9e2..263c48ba3b 100644
^ permalink raw reply [flat|nested] 208+ messages in thread
* [dpdk-stable] patch 'net/hns3: fix residual MAC address entry' has been queued to stable release 20.11.3
2021-07-26 13:52 ` [dpdk-stable] patch 'net/bonding: fix error message on flow verify' " luca.boccassi
` (37 preceding siblings ...)
2021-07-26 13:53 ` [dpdk-stable] patch 'net/softnic: fix memory leak in arguments parsing' " luca.boccassi
@ 2021-07-26 13:53 ` luca.boccassi
2021-07-26 13:53 ` [dpdk-stable] patch 'net/hns3: fix filter parsing comment' " luca.boccassi
` (18 subsequent siblings)
57 siblings, 0 replies; 208+ messages in thread
From: luca.boccassi @ 2021-07-26 13:53 UTC (permalink / raw)
To: Chengchang Tang; +Cc: Min Hu, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.3
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/28/21. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/471ed659c1747d04d992310c8c08fca34e9c26c5
Thanks.
Luca Boccassi
---
From 471ed659c1747d04d992310c8c08fca34e9c26c5 Mon Sep 17 00:00:00 2001
From: Chengchang Tang <tangchengchang@huawei.com>
Date: Sat, 17 Jul 2021 10:02:49 +0800
Subject: [PATCH] net/hns3: fix residual MAC address entry
[ upstream commit 976ddf2f5a7aa1ade4300de394cdd481a5e79f1c ]
Currently, even if we fail to remove the origin MAC address from the HW,
the set_default_mac will go on, and add the new MAC address to the HW.
Eventually cause the original MAC address entry to remain in the HW, and
users may receive unexpected packets.
This patch make set_default_mac return directly to failure if deleting
the original MAC address fails, simplifying the behavior of the driver
and solving the problem of residual MAC address entry.
Fixes: 7d7f9f80bbfb ("net/hns3: support MAC address related operations")
Signed-off-by: Chengchang Tang <tangchengchang@huawei.com>
Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
---
drivers/net/hns3/hns3_ethdev.c | 22 +++++++++-------------
1 file changed, 9 insertions(+), 13 deletions(-)
diff --git a/drivers/net/hns3/hns3_ethdev.c b/drivers/net/hns3/hns3_ethdev.c
index 089c94b8e9..1ddb2e1806 100644
--- a/drivers/net/hns3/hns3_ethdev.c
+++ b/drivers/net/hns3/hns3_ethdev.c
@@ -1666,7 +1666,6 @@ hns3_set_default_mac_addr(struct rte_eth_dev *dev,
struct rte_ether_addr *oaddr;
char mac_str[RTE_ETHER_ADDR_FMT_SIZE];
bool default_addr_setted;
- bool rm_succes = false;
int ret, ret_val;
/*
@@ -1686,9 +1685,10 @@ hns3_set_default_mac_addr(struct rte_eth_dev *dev,
oaddr);
hns3_warn(hw, "Remove old uc mac address(%s) fail: %d",
mac_str, ret);
- rm_succes = false;
- } else
- rm_succes = true;
+
+ rte_spinlock_unlock(&hw->lock);
+ return ret;
+ }
}
ret = hns3_add_uc_addr_common(hw, mac_addr);
@@ -1723,16 +1723,12 @@ err_pause_addr_cfg:
}
err_add_uc_addr:
- if (rm_succes) {
- ret_val = hns3_add_uc_addr_common(hw, oaddr);
- if (ret_val) {
- rte_ether_format_addr(mac_str, RTE_ETHER_ADDR_FMT_SIZE,
- oaddr);
- hns3_warn(hw,
- "Failed to restore old uc mac addr(%s): %d",
+ ret_val = hns3_add_uc_addr_common(hw, oaddr);
+ if (ret_val) {
+ rte_ether_format_addr(mac_str, RTE_ETHER_ADDR_FMT_SIZE, oaddr);
+ hns3_warn(hw, "Failed to restore old uc mac addr(%s): %d",
mac_str, ret_val);
- hw->mac.default_addr_setted = false;
- }
+ hw->mac.default_addr_setted = false;
}
rte_spinlock_unlock(&hw->lock);
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-07-26 13:53:17.974758033 +0100
+++ 0040-net-hns3-fix-residual-MAC-address-entry.patch 2021-07-26 13:53:15.905293799 +0100
@@ -1 +1 @@
-From 976ddf2f5a7aa1ade4300de394cdd481a5e79f1c Mon Sep 17 00:00:00 2001
+From 471ed659c1747d04d992310c8c08fca34e9c26c5 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 976ddf2f5a7aa1ade4300de394cdd481a5e79f1c ]
+
@@ -16 +17,0 @@
-Cc: stable@dpdk.org
@@ -25 +26 @@
-index 17b995af15..3699b5636e 100644
+index 089c94b8e9..1ddb2e1806 100644
@@ -28 +29 @@
-@@ -1748,7 +1748,6 @@ hns3_set_default_mac_addr(struct rte_eth_dev *dev,
+@@ -1666,7 +1666,6 @@ hns3_set_default_mac_addr(struct rte_eth_dev *dev,
@@ -36 +37 @@
-@@ -1768,9 +1767,10 @@ hns3_set_default_mac_addr(struct rte_eth_dev *dev,
+@@ -1686,9 +1685,10 @@ hns3_set_default_mac_addr(struct rte_eth_dev *dev,
@@ -50 +51 @@
-@@ -1805,16 +1805,12 @@ err_pause_addr_cfg:
+@@ -1723,16 +1723,12 @@ err_pause_addr_cfg:
@@ -57 +58 @@
-- hns3_ether_format_addr(mac_str, RTE_ETHER_ADDR_FMT_SIZE,
+- rte_ether_format_addr(mac_str, RTE_ETHER_ADDR_FMT_SIZE,
@@ -63 +64 @@
-+ hns3_ether_format_addr(mac_str, RTE_ETHER_ADDR_FMT_SIZE, oaddr);
++ rte_ether_format_addr(mac_str, RTE_ETHER_ADDR_FMT_SIZE, oaddr);
^ permalink raw reply [flat|nested] 208+ messages in thread
* [dpdk-stable] patch 'net/hns3: fix filter parsing comment' has been queued to stable release 20.11.3
2021-07-26 13:52 ` [dpdk-stable] patch 'net/bonding: fix error message on flow verify' " luca.boccassi
` (38 preceding siblings ...)
2021-07-26 13:53 ` [dpdk-stable] patch 'net/hns3: fix residual MAC address entry' " luca.boccassi
@ 2021-07-26 13:53 ` luca.boccassi
2021-07-26 13:53 ` [dpdk-stable] patch 'net/hns3: fix timing of clearing interrupt source' " luca.boccassi
` (17 subsequent siblings)
57 siblings, 0 replies; 208+ messages in thread
From: luca.boccassi @ 2021-07-26 13:53 UTC (permalink / raw)
To: Chengwen Feng; +Cc: Min Hu, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.3
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/28/21. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/01dcb1618688cadf04f8e8d2677005c77cb85a9b
Thanks.
Luca Boccassi
---
From 01dcb1618688cadf04f8e8d2677005c77cb85a9b Mon Sep 17 00:00:00 2001
From: Chengwen Feng <fengchengwen@huawei.com>
Date: Sat, 17 Jul 2021 10:02:51 +0800
Subject: [PATCH] net/hns3: fix filter parsing comment
[ upstream commit 529017f9e70b2b41a4febf283946183586c3ebb2 ]
This patch fixed incorrect comment of hns3_parse_fdir_filter().
Fixes: fcba820d9b9e ("net/hns3: support flow director")
Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
---
drivers/net/hns3/hns3_flow.c | 59 ++++++++++++++----------------------
1 file changed, 23 insertions(+), 36 deletions(-)
diff --git a/drivers/net/hns3/hns3_flow.c b/drivers/net/hns3/hns3_flow.c
index 40e40bd88b..4e81769a8b 100644
--- a/drivers/net/hns3/hns3_flow.c
+++ b/drivers/net/hns3/hns3_flow.c
@@ -1161,42 +1161,29 @@ is_tunnel_packet(enum rte_flow_item_type type)
}
/*
- * Parse the rule to see if it is a IP or MAC VLAN flow director rule.
- * And get the flow director filter info BTW.
- * UDP/TCP/SCTP PATTERN:
- * The first not void item can be ETH or IPV4 or IPV6
- * The second not void item must be IPV4 or IPV6 if the first one is ETH.
- * The next not void item could be UDP or TCP or SCTP (optional)
- * The next not void item could be RAW (for flexbyte, optional)
- * The next not void item must be END.
- * A Fuzzy Match pattern can appear at any place before END.
- * Fuzzy Match is optional for IPV4 but is required for IPV6
- * MAC VLAN PATTERN:
- * The first not void item must be ETH.
- * The second not void item must be MAC VLAN.
- * The next not void item must be END.
- * ACTION:
- * The first not void action should be QUEUE or DROP.
- * The second not void optional action should be MARK,
- * mark_id is a uint32_t number.
- * The next not void action should be END.
- * UDP/TCP/SCTP pattern example:
- * ITEM Spec Mask
- * ETH NULL NULL
- * IPV4 src_addr 192.168.1.20 0xFFFFFFFF
- * dst_addr 192.167.3.50 0xFFFFFFFF
- * UDP/TCP/SCTP src_port 80 0xFFFF
- * dst_port 80 0xFFFF
- * END
- * MAC VLAN pattern example:
- * ITEM Spec Mask
- * ETH dst_addr
- {0xAC, 0x7B, 0xA1, {0xFF, 0xFF, 0xFF,
- 0x2C, 0x6D, 0x36} 0xFF, 0xFF, 0xFF}
- * MAC VLAN tci 0x2016 0xEFFF
- * END
- * Other members in mask and spec should set to 0x00.
- * Item->last should be NULL.
+ * Parse the flow director rule.
+ * The supported PATTERN:
+ * case: non-tunnel packet:
+ * ETH : src-mac, dst-mac, ethertype
+ * VLAN: tag1, tag2
+ * IPv4: src-ip, dst-ip, tos, proto
+ * IPv6: src-ip(last 32 bit addr), dst-ip(last 32 bit addr), proto
+ * UDP : src-port, dst-port
+ * TCP : src-port, dst-port
+ * SCTP: src-port, dst-port, tag
+ * case: tunnel packet:
+ * OUTER-ETH: ethertype
+ * OUTER-L3 : proto
+ * OUTER-L4 : src-port, dst-port
+ * TUNNEL : vni, flow-id(only valid when NVGRE)
+ * INNER-ETH/VLAN/IPv4/IPv6/UDP/TCP/SCTP: same as non-tunnel packet
+ * The supported ACTION:
+ * QUEUE
+ * DROP
+ * COUNT
+ * MARK: the id range [0, 4094]
+ * FLAG
+ * RSS: only valid if firmware support FD_QUEUE_REGION.
*/
static int
hns3_parse_fdir_filter(struct rte_eth_dev *dev,
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-07-26 13:53:18.053943762 +0100
+++ 0041-net-hns3-fix-filter-parsing-comment.patch 2021-07-26 13:53:15.909293884 +0100
@@ -1 +1 @@
-From 529017f9e70b2b41a4febf283946183586c3ebb2 Mon Sep 17 00:00:00 2001
+From 01dcb1618688cadf04f8e8d2677005c77cb85a9b Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 529017f9e70b2b41a4febf283946183586c3ebb2 ]
+
@@ -9 +10,0 @@
-Cc: stable@dpdk.org
@@ -18 +19 @@
-index 82810e00e8..755a6f2c7c 100644
+index 40e40bd88b..4e81769a8b 100644
@@ -21 +22 @@
-@@ -1134,42 +1134,29 @@ is_tunnel_packet(enum rte_flow_item_type type)
+@@ -1161,42 +1161,29 @@ is_tunnel_packet(enum rte_flow_item_type type)
^ permalink raw reply [flat|nested] 208+ messages in thread
* [dpdk-stable] patch 'net/hns3: fix timing of clearing interrupt source' has been queued to stable release 20.11.3
2021-07-26 13:52 ` [dpdk-stable] patch 'net/bonding: fix error message on flow verify' " luca.boccassi
` (39 preceding siblings ...)
2021-07-26 13:53 ` [dpdk-stable] patch 'net/hns3: fix filter parsing comment' " luca.boccassi
@ 2021-07-26 13:53 ` luca.boccassi
2021-07-26 13:53 ` [dpdk-stable] patch 'net/hns3: fix flow rule list in multi-process' " luca.boccassi
` (16 subsequent siblings)
57 siblings, 0 replies; 208+ messages in thread
From: luca.boccassi @ 2021-07-26 13:53 UTC (permalink / raw)
To: Hongbo Zheng; +Cc: Min Hu, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.3
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/28/21. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/fc0e7a4358b0245b8386240693d070385937490f
Thanks.
Luca Boccassi
---
From fc0e7a4358b0245b8386240693d070385937490f Mon Sep 17 00:00:00 2001
From: Hongbo Zheng <zhenghongbo3@huawei.com>
Date: Sat, 17 Jul 2021 10:02:52 +0800
Subject: [PATCH] net/hns3: fix timing of clearing interrupt source
[ upstream commit ee930d38ffca82af6c70209be7a8f2b408dc5610 ]
Currently, the PF/VF does not clear the interrupt source immediately
after receiving the interrupt. As a result, if the second interrupt
task is triggered when processing the first interrupt task, clearing
the interrupt source before exiting will clear the interrupt sources
of the two tasks at the same time. As a result, no interrupt is
triggered for the second task.
Clearing interrupt source immediately after checking event cause
ensures that:
1. Even if two interrupt tasks are triggered at the same time, they can
be processed.
2. If the second task is triggered during the processing of the first
task and the interrupt source is not cleared, the interrupt is reported
after vector0 is enabled.
Fixes: a5475d61fa34 ("net/hns3: support VF")
Fixes: 3988ab0eee52 ("net/hns3: add abnormal interrupt process")
Signed-off-by: Hongbo Zheng <zhenghongbo3@huawei.com>
Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
---
drivers/net/hns3/hns3_ethdev.c | 2 +-
drivers/net/hns3/hns3_ethdev_vf.c | 5 ++---
2 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/drivers/net/hns3/hns3_ethdev.c b/drivers/net/hns3/hns3_ethdev.c
index 1ddb2e1806..25a9af4382 100644
--- a/drivers/net/hns3/hns3_ethdev.c
+++ b/drivers/net/hns3/hns3_ethdev.c
@@ -239,6 +239,7 @@ hns3_interrupt_handler(void *param)
hns3_pf_disable_irq0(hw);
event_cause = hns3_check_event_cause(hns, &clearval);
+ hns3_clear_event_cause(hw, event_cause, clearval);
/* vector 0 interrupt is shared with reset and mailbox source events. */
if (event_cause == HNS3_VECTOR0_EVENT_ERR) {
hns3_warn(hw, "Received err interrupt");
@@ -253,7 +254,6 @@ hns3_interrupt_handler(void *param)
else
hns3_err(hw, "Received unknown event");
- hns3_clear_event_cause(hw, event_cause, clearval);
/* Enable interrupt if it is not cause by reset */
hns3_pf_enable_irq0(hw);
}
diff --git a/drivers/net/hns3/hns3_ethdev_vf.c b/drivers/net/hns3/hns3_ethdev_vf.c
index 913484d2e3..24bc540456 100644
--- a/drivers/net/hns3/hns3_ethdev_vf.c
+++ b/drivers/net/hns3/hns3_ethdev_vf.c
@@ -1116,6 +1116,8 @@ hns3vf_interrupt_handler(void *param)
/* Read out interrupt causes */
event_cause = hns3vf_check_event_cause(hns, &clearval);
+ /* Clear interrupt causes */
+ hns3vf_clear_event_cause(hw, clearval);
switch (event_cause) {
case HNS3VF_VECTOR0_EVENT_RST:
@@ -1128,9 +1130,6 @@ hns3vf_interrupt_handler(void *param)
break;
}
- /* Clear interrupt causes */
- hns3vf_clear_event_cause(hw, clearval);
-
/* Enable interrupt */
hns3vf_enable_irq0(hw);
}
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-07-26 13:53:18.109997104 +0100
+++ 0042-net-hns3-fix-timing-of-clearing-interrupt-source.patch 2021-07-26 13:53:15.917294052 +0100
@@ -1 +1 @@
-From ee930d38ffca82af6c70209be7a8f2b408dc5610 Mon Sep 17 00:00:00 2001
+From fc0e7a4358b0245b8386240693d070385937490f Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit ee930d38ffca82af6c70209be7a8f2b408dc5610 ]
+
@@ -23 +24,0 @@
-Cc: stable@dpdk.org
@@ -33 +34 @@
-index 3699b5636e..f994c288a1 100644
+index 1ddb2e1806..25a9af4382 100644
@@ -36,4 +37,4 @@
-@@ -317,6 +317,7 @@ hns3_interrupt_handler(void *param)
- vector0_int = hns3_read_dev(hw, HNS3_VECTOR0_OTHER_INT_STS_REG);
- ras_int = hns3_read_dev(hw, HNS3_RAS_PF_OTHER_INT_STS_REG);
- cmdq_int = hns3_read_dev(hw, HNS3_VECTOR0_CMDQ_SRC_REG);
+@@ -239,6 +239,7 @@ hns3_interrupt_handler(void *param)
+ hns3_pf_disable_irq0(hw);
+
+ event_cause = hns3_check_event_cause(hns, &clearval);
@@ -43,4 +44,4 @@
- hns3_warn(hw, "received interrupt: vector0_int_stat:0x%x "
-@@ -335,7 +336,6 @@ hns3_interrupt_handler(void *param)
- vector0_int, ras_int, cmdq_int);
- }
+ hns3_warn(hw, "Received err interrupt");
+@@ -253,7 +254,6 @@ hns3_interrupt_handler(void *param)
+ else
+ hns3_err(hw, "Received unknown event");
@@ -53 +54 @@
-index 8f3be64b0b..de659c05f0 100644
+index 913484d2e3..24bc540456 100644
^ permalink raw reply [flat|nested] 208+ messages in thread
* [dpdk-stable] patch 'net/hns3: fix flow rule list in multi-process' has been queued to stable release 20.11.3
2021-07-26 13:52 ` [dpdk-stable] patch 'net/bonding: fix error message on flow verify' " luca.boccassi
` (40 preceding siblings ...)
2021-07-26 13:53 ` [dpdk-stable] patch 'net/hns3: fix timing of clearing interrupt source' " luca.boccassi
@ 2021-07-26 13:53 ` luca.boccassi
2021-07-26 13:53 ` [dpdk-stable] patch 'net/hns3: fix Tx prepare after stop' " luca.boccassi
` (15 subsequent siblings)
57 siblings, 0 replies; 208+ messages in thread
From: luca.boccassi @ 2021-07-26 13:53 UTC (permalink / raw)
To: Chengwen Feng; +Cc: Min Hu, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.3
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/28/21. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/28a94eea0c5e71972d9e354a10f15ab44ad58ce1
Thanks.
Luca Boccassi
---
From 28a94eea0c5e71972d9e354a10f15ab44ad58ce1 Mon Sep 17 00:00:00 2001
From: Chengwen Feng <fengchengwen@huawei.com>
Date: Sat, 17 Jul 2021 10:02:55 +0800
Subject: [PATCH] net/hns3: fix flow rule list in multi-process
[ upstream commit 9b290a3a63ca31ba7bd0a071315dc2e72ba75d8a ]
Currently, hns3 driver saves rte_flow list into the
rte_eth_dev.process_private field, it may cause following problem:
The FDIR/RSS rules cannot be managed in a unified manner because
the management structure is not visible between processes.
This patch fixes it by moving rte_flow list to struct hns3_hw which is
visible between processes.
Fixes: fcba820d9b9e ("net/hns3: support flow director")
Fixes: c37ca66f2b27 ("net/hns3: support RSS")
Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
---
drivers/net/hns3/hns3_ethdev.c | 24 +------
drivers/net/hns3/hns3_ethdev.h | 3 +
drivers/net/hns3/hns3_ethdev_vf.c | 24 +------
drivers/net/hns3/hns3_fdir.h | 7 +--
drivers/net/hns3/hns3_flow.c | 101 +++++++++++++++---------------
5 files changed, 60 insertions(+), 99 deletions(-)
diff --git a/drivers/net/hns3/hns3_ethdev.c b/drivers/net/hns3/hns3_ethdev.c
index 25a9af4382..abe31c841e 100644
--- a/drivers/net/hns3/hns3_ethdev.c
+++ b/drivers/net/hns3/hns3_ethdev.c
@@ -4852,6 +4852,7 @@ hns3_uninit_pf(struct rte_eth_dev *eth_dev)
hns3_rss_uninit(hns);
(void)hns3_config_gro(hw, false);
hns3_promisc_uninit(hw);
+ hns3_flow_uninit(eth_dev);
hns3_fdir_filter_uninit(hns);
(void)hns3_firmware_compat_config(hw, false);
hns3_uninit_umv_space(hw);
@@ -5188,11 +5189,8 @@ hns3_dev_close(struct rte_eth_dev *eth_dev)
struct hns3_hw *hw = &hns->hw;
int ret = 0;
- if (rte_eal_process_type() != RTE_PROC_PRIMARY) {
- rte_free(eth_dev->process_private);
- eth_dev->process_private = NULL;
+ if (rte_eal_process_type() != RTE_PROC_PRIMARY)
return 0;
- }
if (hw->adapter_state == HNS3_NIC_STARTED)
ret = hns3_dev_stop(eth_dev);
@@ -5207,8 +5205,6 @@ hns3_dev_close(struct rte_eth_dev *eth_dev)
hns3_uninit_pf(eth_dev);
hns3_free_all_queues(eth_dev);
rte_free(hw->reset.wait_data);
- rte_free(eth_dev->process_private);
- eth_dev->process_private = NULL;
hns3_mp_uninit_primary();
hns3_warn(hw, "Close port %u finished", hw->data->port_id);
@@ -6269,15 +6265,6 @@ hns3_dev_init(struct rte_eth_dev *eth_dev)
PMD_INIT_FUNC_TRACE();
- eth_dev->process_private = (struct hns3_process_private *)
- rte_zmalloc_socket("hns3_filter_list",
- sizeof(struct hns3_process_private),
- RTE_CACHE_LINE_SIZE, eth_dev->device->numa_node);
- if (eth_dev->process_private == NULL) {
- PMD_INIT_LOG(ERR, "Failed to alloc memory for process private");
- return -ENOMEM;
- }
-
hns3_flow_init(eth_dev);
hns3_set_rxtx_function(eth_dev);
@@ -6379,8 +6366,6 @@ err_mp_init_secondary:
eth_dev->rx_pkt_burst = NULL;
eth_dev->tx_pkt_burst = NULL;
eth_dev->tx_pkt_prepare = NULL;
- rte_free(eth_dev->process_private);
- eth_dev->process_private = NULL;
return ret;
}
@@ -6392,11 +6377,8 @@ hns3_dev_uninit(struct rte_eth_dev *eth_dev)
PMD_INIT_FUNC_TRACE();
- if (rte_eal_process_type() != RTE_PROC_PRIMARY) {
- rte_free(eth_dev->process_private);
- eth_dev->process_private = NULL;
+ if (rte_eal_process_type() != RTE_PROC_PRIMARY)
return 0;
- }
if (hw->adapter_state < HNS3_NIC_CLOSING)
hns3_dev_close(eth_dev);
diff --git a/drivers/net/hns3/hns3_ethdev.h b/drivers/net/hns3/hns3_ethdev.h
index 79a96bdd08..9d9291285e 100644
--- a/drivers/net/hns3/hns3_ethdev.h
+++ b/drivers/net/hns3/hns3_ethdev.h
@@ -556,6 +556,9 @@ struct hns3_hw {
struct hns3_port_base_vlan_config port_base_vlan_cfg;
pthread_mutex_t flows_lock; /* rte_flow ops lock */
+ struct hns3_fdir_rule_list flow_fdir_list; /* flow fdir rule list */
+ struct hns3_rss_filter_list flow_rss_list; /* flow RSS rule list */
+ struct hns3_flow_mem_list flow_list;
/*
* PMD setup and configuration is not thread safe. Since it is not
diff --git a/drivers/net/hns3/hns3_ethdev_vf.c b/drivers/net/hns3/hns3_ethdev_vf.c
index 24bc540456..086828180b 100644
--- a/drivers/net/hns3/hns3_ethdev_vf.c
+++ b/drivers/net/hns3/hns3_ethdev_vf.c
@@ -1876,6 +1876,7 @@ hns3vf_uninit_vf(struct rte_eth_dev *eth_dev)
(void)hns3_config_gro(hw, false);
(void)hns3vf_set_alive(hw, false);
(void)hns3vf_set_promisc_mode(hw, false, false, false);
+ hns3_flow_uninit(eth_dev);
hns3_tqp_stats_uninit(hw);
hns3vf_disable_irq0(hw);
rte_intr_disable(&pci_dev->intr_handle);
@@ -1990,11 +1991,8 @@ hns3vf_dev_close(struct rte_eth_dev *eth_dev)
struct hns3_hw *hw = &hns->hw;
int ret = 0;
- if (rte_eal_process_type() != RTE_PROC_PRIMARY) {
- rte_free(eth_dev->process_private);
- eth_dev->process_private = NULL;
+ if (rte_eal_process_type() != RTE_PROC_PRIMARY)
return 0;
- }
if (hw->adapter_state == HNS3_NIC_STARTED)
ret = hns3vf_dev_stop(eth_dev);
@@ -2008,8 +2006,6 @@ hns3vf_dev_close(struct rte_eth_dev *eth_dev)
hns3vf_uninit_vf(eth_dev);
hns3_free_all_queues(eth_dev);
rte_free(hw->reset.wait_data);
- rte_free(eth_dev->process_private);
- eth_dev->process_private = NULL;
hns3_mp_uninit_primary();
hns3_warn(hw, "Close port %u finished", hw->data->port_id);
@@ -2756,15 +2752,6 @@ hns3vf_dev_init(struct rte_eth_dev *eth_dev)
PMD_INIT_FUNC_TRACE();
- eth_dev->process_private = (struct hns3_process_private *)
- rte_zmalloc_socket("hns3_filter_list",
- sizeof(struct hns3_process_private),
- RTE_CACHE_LINE_SIZE, eth_dev->device->numa_node);
- if (eth_dev->process_private == NULL) {
- PMD_INIT_LOG(ERR, "Failed to alloc memory for process private");
- return -ENOMEM;
- }
-
hns3_flow_init(eth_dev);
hns3_set_rxtx_function(eth_dev);
@@ -2864,8 +2851,6 @@ err_mp_init_secondary:
eth_dev->rx_pkt_burst = NULL;
eth_dev->tx_pkt_burst = NULL;
eth_dev->tx_pkt_prepare = NULL;
- rte_free(eth_dev->process_private);
- eth_dev->process_private = NULL;
return ret;
}
@@ -2878,11 +2863,8 @@ hns3vf_dev_uninit(struct rte_eth_dev *eth_dev)
PMD_INIT_FUNC_TRACE();
- if (rte_eal_process_type() != RTE_PROC_PRIMARY) {
- rte_free(eth_dev->process_private);
- eth_dev->process_private = NULL;
+ if (rte_eal_process_type() != RTE_PROC_PRIMARY)
return 0;
- }
if (hw->adapter_state < HNS3_NIC_CLOSING)
hns3vf_dev_close(eth_dev);
diff --git a/drivers/net/hns3/hns3_fdir.h b/drivers/net/hns3/hns3_fdir.h
index fc62daa994..3f610f7b11 100644
--- a/drivers/net/hns3/hns3_fdir.h
+++ b/drivers/net/hns3/hns3_fdir.h
@@ -189,12 +189,6 @@ TAILQ_HEAD(hns3_fdir_rule_list, hns3_fdir_rule_ele);
TAILQ_HEAD(hns3_rss_filter_list, hns3_rss_conf_ele);
TAILQ_HEAD(hns3_flow_mem_list, hns3_flow_mem);
-struct hns3_process_private {
- struct hns3_fdir_rule_list fdir_list;
- struct hns3_rss_filter_list filter_rss_list;
- struct hns3_flow_mem_list flow_list;
-};
-
/*
* A structure used to define fields of a FDIR related info.
*/
@@ -220,6 +214,7 @@ int hns3_fdir_filter_program(struct hns3_adapter *hns,
int hns3_clear_all_fdir_filter(struct hns3_adapter *hns);
int hns3_get_count(struct hns3_hw *hw, uint32_t id, uint64_t *value);
void hns3_flow_init(struct rte_eth_dev *dev);
+void hns3_flow_uninit(struct rte_eth_dev *dev);
int hns3_restore_all_fdir_filter(struct hns3_adapter *hns);
#endif /* _HNS3_FDIR_H_ */
diff --git a/drivers/net/hns3/hns3_flow.c b/drivers/net/hns3/hns3_flow.c
index 4e81769a8b..70c45f6bc5 100644
--- a/drivers/net/hns3/hns3_flow.c
+++ b/drivers/net/hns3/hns3_flow.c
@@ -1229,54 +1229,34 @@ hns3_parse_fdir_filter(struct rte_eth_dev *dev,
return hns3_handle_actions(dev, actions, rule, error);
}
-void
-hns3_flow_init(struct rte_eth_dev *dev)
-{
- struct hns3_hw *hw = HNS3_DEV_PRIVATE_TO_HW(dev->data->dev_private);
- struct hns3_process_private *process_list = dev->process_private;
- pthread_mutexattr_t attr;
-
- if (rte_eal_process_type() == RTE_PROC_PRIMARY) {
- pthread_mutexattr_init(&attr);
- pthread_mutexattr_setpshared(&attr, PTHREAD_PROCESS_SHARED);
- pthread_mutex_init(&hw->flows_lock, &attr);
- dev->data->dev_flags |= RTE_ETH_DEV_FLOW_OPS_THREAD_SAFE;
- }
-
- TAILQ_INIT(&process_list->fdir_list);
- TAILQ_INIT(&process_list->filter_rss_list);
- TAILQ_INIT(&process_list->flow_list);
-}
-
static void
hns3_filterlist_flush(struct rte_eth_dev *dev)
{
- struct hns3_process_private *process_list = dev->process_private;
+ struct hns3_hw *hw = HNS3_DEV_PRIVATE_TO_HW(dev->data->dev_private);
struct hns3_fdir_rule_ele *fdir_rule_ptr;
struct hns3_rss_conf_ele *rss_filter_ptr;
struct hns3_flow_mem *flow_node;
- fdir_rule_ptr = TAILQ_FIRST(&process_list->fdir_list);
+ fdir_rule_ptr = TAILQ_FIRST(&hw->flow_fdir_list);
while (fdir_rule_ptr) {
- TAILQ_REMOVE(&process_list->fdir_list, fdir_rule_ptr, entries);
+ TAILQ_REMOVE(&hw->flow_fdir_list, fdir_rule_ptr, entries);
rte_free(fdir_rule_ptr);
- fdir_rule_ptr = TAILQ_FIRST(&process_list->fdir_list);
+ fdir_rule_ptr = TAILQ_FIRST(&hw->flow_fdir_list);
}
- rss_filter_ptr = TAILQ_FIRST(&process_list->filter_rss_list);
+ rss_filter_ptr = TAILQ_FIRST(&hw->flow_rss_list);
while (rss_filter_ptr) {
- TAILQ_REMOVE(&process_list->filter_rss_list, rss_filter_ptr,
- entries);
+ TAILQ_REMOVE(&hw->flow_rss_list, rss_filter_ptr, entries);
rte_free(rss_filter_ptr);
- rss_filter_ptr = TAILQ_FIRST(&process_list->filter_rss_list);
+ rss_filter_ptr = TAILQ_FIRST(&hw->flow_rss_list);
}
- flow_node = TAILQ_FIRST(&process_list->flow_list);
+ flow_node = TAILQ_FIRST(&hw->flow_list);
while (flow_node) {
- TAILQ_REMOVE(&process_list->flow_list, flow_node, entries);
+ TAILQ_REMOVE(&hw->flow_list, flow_node, entries);
rte_free(flow_node->flow);
rte_free(flow_node);
- flow_node = TAILQ_FIRST(&process_list->flow_list);
+ flow_node = TAILQ_FIRST(&hw->flow_list);
}
}
@@ -1535,7 +1515,6 @@ static int
hns3_config_rss_filter(struct rte_eth_dev *dev,
const struct hns3_rss_conf *conf, bool add)
{
- struct hns3_process_private *process_list = dev->process_private;
struct hns3_adapter *hns = dev->data->dev_private;
struct hns3_rss_conf_ele *rss_filter_ptr;
struct hns3_hw *hw = &hns->hw;
@@ -1620,7 +1599,7 @@ hns3_config_rss_filter(struct rte_eth_dev *dev,
* When create a new RSS rule, the old rule will be overlaid and set
* invalid.
*/
- TAILQ_FOREACH(rss_filter_ptr, &process_list->filter_rss_list, entries)
+ TAILQ_FOREACH(rss_filter_ptr, &hw->flow_rss_list, entries)
rss_filter_ptr->filter_info.valid = false;
rss_config_err:
@@ -1632,7 +1611,6 @@ rss_config_err:
static int
hns3_clear_rss_filter(struct rte_eth_dev *dev)
{
- struct hns3_process_private *process_list = dev->process_private;
struct hns3_adapter *hns = dev->data->dev_private;
struct hns3_rss_conf_ele *rss_filter_ptr;
struct hns3_hw *hw = &hns->hw;
@@ -1640,10 +1618,9 @@ hns3_clear_rss_filter(struct rte_eth_dev *dev)
int rss_rule_fail_cnt = 0; /* count for failure of clearing RSS rules */
int ret = 0;
- rss_filter_ptr = TAILQ_FIRST(&process_list->filter_rss_list);
+ rss_filter_ptr = TAILQ_FIRST(&hw->flow_rss_list);
while (rss_filter_ptr) {
- TAILQ_REMOVE(&process_list->filter_rss_list, rss_filter_ptr,
- entries);
+ TAILQ_REMOVE(&hw->flow_rss_list, rss_filter_ptr, entries);
ret = hns3_config_rss_filter(dev, &rss_filter_ptr->filter_info,
false);
if (ret)
@@ -1651,7 +1628,7 @@ hns3_clear_rss_filter(struct rte_eth_dev *dev)
else
rss_rule_succ_cnt++;
rte_free(rss_filter_ptr);
- rss_filter_ptr = TAILQ_FIRST(&process_list->filter_rss_list);
+ rss_filter_ptr = TAILQ_FIRST(&hw->flow_rss_list);
}
if (rss_rule_fail_cnt) {
@@ -1755,7 +1732,6 @@ hns3_flow_create(struct rte_eth_dev *dev, const struct rte_flow_attr *attr,
const struct rte_flow_action actions[],
struct rte_flow_error *error)
{
- struct hns3_process_private *process_list = dev->process_private;
struct hns3_adapter *hns = dev->data->dev_private;
struct hns3_hw *hw = &hns->hw;
const struct hns3_rss_conf *rss_conf;
@@ -1787,7 +1763,7 @@ hns3_flow_create(struct rte_eth_dev *dev, const struct rte_flow_attr *attr,
}
flow_node->flow = flow;
- TAILQ_INSERT_TAIL(&process_list->flow_list, flow_node, entries);
+ TAILQ_INSERT_TAIL(&hw->flow_list, flow_node, entries);
act = hns3_find_rss_general_action(pattern, actions);
if (act) {
@@ -1809,8 +1785,7 @@ hns3_flow_create(struct rte_eth_dev *dev, const struct rte_flow_attr *attr,
hns3_rss_conf_copy(&rss_filter_ptr->filter_info,
&rss_conf->conf);
rss_filter_ptr->filter_info.valid = true;
- TAILQ_INSERT_TAIL(&process_list->filter_rss_list,
- rss_filter_ptr, entries);
+ TAILQ_INSERT_TAIL(&hw->flow_rss_list, rss_filter_ptr, entries);
flow->rule = rss_filter_ptr;
flow->filter_type = RTE_ETH_FILTER_HASH;
@@ -1844,8 +1819,7 @@ hns3_flow_create(struct rte_eth_dev *dev, const struct rte_flow_attr *attr,
if (!ret) {
memcpy(&fdir_rule_ptr->fdir_conf, &fdir_rule,
sizeof(struct hns3_fdir_rule));
- TAILQ_INSERT_TAIL(&process_list->fdir_list,
- fdir_rule_ptr, entries);
+ TAILQ_INSERT_TAIL(&hw->flow_fdir_list, fdir_rule_ptr, entries);
flow->rule = fdir_rule_ptr;
flow->filter_type = RTE_ETH_FILTER_FDIR;
@@ -1860,7 +1834,7 @@ err:
rte_flow_error_set(error, -ret, RTE_FLOW_ERROR_TYPE_HANDLE, NULL,
"Failed to create flow");
out:
- TAILQ_REMOVE(&process_list->flow_list, flow_node, entries);
+ TAILQ_REMOVE(&hw->flow_list, flow_node, entries);
rte_free(flow_node);
rte_free(flow);
return NULL;
@@ -1871,13 +1845,13 @@ static int
hns3_flow_destroy(struct rte_eth_dev *dev, struct rte_flow *flow,
struct rte_flow_error *error)
{
- struct hns3_process_private *process_list = dev->process_private;
struct hns3_adapter *hns = dev->data->dev_private;
struct hns3_fdir_rule_ele *fdir_rule_ptr;
struct hns3_rss_conf_ele *rss_filter_ptr;
struct hns3_flow_mem *flow_node;
enum rte_filter_type filter_type;
struct hns3_fdir_rule fdir_rule;
+ struct hns3_hw *hw = &hns->hw;
int ret;
if (flow == NULL)
@@ -1899,7 +1873,7 @@ hns3_flow_destroy(struct rte_eth_dev *dev, struct rte_flow *flow,
"Destroy FDIR fail.Try again");
if (fdir_rule.flags & HNS3_RULE_FLAG_COUNTER)
hns3_counter_release(dev, fdir_rule.act_cnt.id);
- TAILQ_REMOVE(&process_list->fdir_list, fdir_rule_ptr, entries);
+ TAILQ_REMOVE(&hw->flow_fdir_list, fdir_rule_ptr, entries);
rte_free(fdir_rule_ptr);
fdir_rule_ptr = NULL;
break;
@@ -1912,8 +1886,7 @@ hns3_flow_destroy(struct rte_eth_dev *dev, struct rte_flow *flow,
RTE_FLOW_ERROR_TYPE_HANDLE,
flow,
"Destroy RSS fail.Try again");
- TAILQ_REMOVE(&process_list->filter_rss_list, rss_filter_ptr,
- entries);
+ TAILQ_REMOVE(&hw->flow_rss_list, rss_filter_ptr, entries);
rte_free(rss_filter_ptr);
rss_filter_ptr = NULL;
break;
@@ -1923,10 +1896,9 @@ hns3_flow_destroy(struct rte_eth_dev *dev, struct rte_flow *flow,
"Unsupported filter type");
}
- TAILQ_FOREACH(flow_node, &process_list->flow_list, entries) {
+ TAILQ_FOREACH(flow_node, &hw->flow_list, entries) {
if (flow_node->flow == flow) {
- TAILQ_REMOVE(&process_list->flow_list, flow_node,
- entries);
+ TAILQ_REMOVE(&hw->flow_list, flow_node, entries);
rte_free(flow_node);
flow_node = NULL;
break;
@@ -2130,3 +2102,30 @@ hns3_dev_filter_ctrl(struct rte_eth_dev *dev, enum rte_filter_type filter_type,
return ret;
}
+
+void
+hns3_flow_init(struct rte_eth_dev *dev)
+{
+ struct hns3_hw *hw = HNS3_DEV_PRIVATE_TO_HW(dev->data->dev_private);
+ pthread_mutexattr_t attr;
+
+ if (rte_eal_process_type() != RTE_PROC_PRIMARY)
+ return;
+
+ pthread_mutexattr_init(&attr);
+ pthread_mutexattr_setpshared(&attr, PTHREAD_PROCESS_SHARED);
+ pthread_mutex_init(&hw->flows_lock, &attr);
+ dev->data->dev_flags |= RTE_ETH_DEV_FLOW_OPS_THREAD_SAFE;
+
+ TAILQ_INIT(&hw->flow_fdir_list);
+ TAILQ_INIT(&hw->flow_rss_list);
+ TAILQ_INIT(&hw->flow_list);
+}
+
+void
+hns3_flow_uninit(struct rte_eth_dev *dev)
+{
+ struct rte_flow_error error;
+ if (rte_eal_process_type() == RTE_PROC_PRIMARY)
+ hns3_flow_flush_wrap(dev, &error);
+}
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-07-26 13:53:18.206678295 +0100
+++ 0043-net-hns3-fix-flow-rule-list-in-multi-process.patch 2021-07-26 13:53:15.929294304 +0100
@@ -1 +1 @@
-From 9b290a3a63ca31ba7bd0a071315dc2e72ba75d8a Mon Sep 17 00:00:00 2001
+From 28a94eea0c5e71972d9e354a10f15ab44ad58ce1 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 9b290a3a63ca31ba7bd0a071315dc2e72ba75d8a ]
+
@@ -16 +17,0 @@
-Cc: stable@dpdk.org
@@ -29 +30 @@
-index 4a302d2072..a374fa7915 100644
+index 25a9af4382..abe31c841e 100644
@@ -32 +33 @@
-@@ -5292,6 +5292,7 @@ hns3_uninit_pf(struct rte_eth_dev *eth_dev)
+@@ -4852,6 +4852,7 @@ hns3_uninit_pf(struct rte_eth_dev *eth_dev)
@@ -37,0 +39 @@
+ (void)hns3_firmware_compat_config(hw, false);
@@ -39,2 +41 @@
- hns3_tqp_stats_uninit(hw);
-@@ -5918,11 +5919,8 @@ hns3_dev_close(struct rte_eth_dev *eth_dev)
+@@ -5188,11 +5189,8 @@ hns3_dev_close(struct rte_eth_dev *eth_dev)
@@ -53 +54 @@
-@@ -5937,8 +5935,6 @@ hns3_dev_close(struct rte_eth_dev *eth_dev)
+@@ -5207,8 +5205,6 @@ hns3_dev_close(struct rte_eth_dev *eth_dev)
@@ -62 +63 @@
-@@ -7398,15 +7394,6 @@ hns3_dev_init(struct rte_eth_dev *eth_dev)
+@@ -6269,15 +6265,6 @@ hns3_dev_init(struct rte_eth_dev *eth_dev)
@@ -78 +79,2 @@
-@@ -7510,8 +7497,6 @@ err_mp_init_secondary:
+@@ -6379,8 +6366,6 @@ err_mp_init_secondary:
+ eth_dev->rx_pkt_burst = NULL;
@@ -81 +82,0 @@
- eth_dev->tx_descriptor_status = NULL;
@@ -87 +88 @@
-@@ -7523,11 +7508,8 @@ hns3_dev_uninit(struct rte_eth_dev *eth_dev)
+@@ -6392,11 +6377,8 @@ hns3_dev_uninit(struct rte_eth_dev *eth_dev)
@@ -101 +102 @@
-index 3485614b6f..8e66d9f0f3 100644
+index 79a96bdd08..9d9291285e 100644
@@ -104 +105 @@
-@@ -630,6 +630,9 @@ struct hns3_hw {
+@@ -556,6 +556,9 @@ struct hns3_hw {
@@ -115 +116 @@
-index de659c05f0..8d9b7979c8 100644
+index 24bc540456..086828180b 100644
@@ -118 +119 @@
-@@ -2071,6 +2071,7 @@ hns3vf_uninit_vf(struct rte_eth_dev *eth_dev)
+@@ -1876,6 +1876,7 @@ hns3vf_uninit_vf(struct rte_eth_dev *eth_dev)
@@ -126 +127 @@
-@@ -2186,11 +2187,8 @@ hns3vf_dev_close(struct rte_eth_dev *eth_dev)
+@@ -1990,11 +1991,8 @@ hns3vf_dev_close(struct rte_eth_dev *eth_dev)
@@ -139 +140 @@
-@@ -2204,8 +2202,6 @@ hns3vf_dev_close(struct rte_eth_dev *eth_dev)
+@@ -2008,8 +2006,6 @@ hns3vf_dev_close(struct rte_eth_dev *eth_dev)
@@ -148 +149 @@
-@@ -2962,15 +2958,6 @@ hns3vf_dev_init(struct rte_eth_dev *eth_dev)
+@@ -2756,15 +2752,6 @@ hns3vf_dev_init(struct rte_eth_dev *eth_dev)
@@ -164 +165,2 @@
-@@ -3072,8 +3059,6 @@ err_mp_init_secondary:
+@@ -2864,8 +2851,6 @@ err_mp_init_secondary:
+ eth_dev->rx_pkt_burst = NULL;
@@ -167 +168,0 @@
- eth_dev->tx_descriptor_status = NULL;
@@ -173 +174 @@
-@@ -3086,11 +3071,8 @@ hns3vf_dev_uninit(struct rte_eth_dev *eth_dev)
+@@ -2878,11 +2863,8 @@ hns3vf_dev_uninit(struct rte_eth_dev *eth_dev)
@@ -212 +213 @@
-index 755a6f2c7c..fc77979c5f 100644
+index 4e81769a8b..70c45f6bc5 100644
@@ -215 +216 @@
-@@ -1202,54 +1202,34 @@ hns3_parse_fdir_filter(struct rte_eth_dev *dev,
+@@ -1229,54 +1229,34 @@ hns3_parse_fdir_filter(struct rte_eth_dev *dev,
@@ -280 +281 @@
-@@ -1519,7 +1499,6 @@ static int
+@@ -1535,7 +1515,6 @@ static int
@@ -288 +289 @@
-@@ -1604,7 +1583,7 @@ hns3_config_rss_filter(struct rte_eth_dev *dev,
+@@ -1620,7 +1599,7 @@ hns3_config_rss_filter(struct rte_eth_dev *dev,
@@ -297 +298 @@
-@@ -1616,7 +1595,6 @@ rss_config_err:
+@@ -1632,7 +1611,6 @@ rss_config_err:
@@ -305 +306 @@
-@@ -1624,10 +1602,9 @@ hns3_clear_rss_filter(struct rte_eth_dev *dev)
+@@ -1640,10 +1618,9 @@ hns3_clear_rss_filter(struct rte_eth_dev *dev)
@@ -318 +319 @@
-@@ -1635,7 +1612,7 @@ hns3_clear_rss_filter(struct rte_eth_dev *dev)
+@@ -1651,7 +1628,7 @@ hns3_clear_rss_filter(struct rte_eth_dev *dev)
@@ -327 +328 @@
-@@ -1739,7 +1716,6 @@ hns3_flow_create(struct rte_eth_dev *dev, const struct rte_flow_attr *attr,
+@@ -1755,7 +1732,6 @@ hns3_flow_create(struct rte_eth_dev *dev, const struct rte_flow_attr *attr,
@@ -335 +336 @@
-@@ -1771,7 +1747,7 @@ hns3_flow_create(struct rte_eth_dev *dev, const struct rte_flow_attr *attr,
+@@ -1787,7 +1763,7 @@ hns3_flow_create(struct rte_eth_dev *dev, const struct rte_flow_attr *attr,
@@ -344 +345 @@
-@@ -1793,8 +1769,7 @@ hns3_flow_create(struct rte_eth_dev *dev, const struct rte_flow_attr *attr,
+@@ -1809,8 +1785,7 @@ hns3_flow_create(struct rte_eth_dev *dev, const struct rte_flow_attr *attr,
@@ -354 +355 @@
-@@ -1828,8 +1803,7 @@ hns3_flow_create(struct rte_eth_dev *dev, const struct rte_flow_attr *attr,
+@@ -1844,8 +1819,7 @@ hns3_flow_create(struct rte_eth_dev *dev, const struct rte_flow_attr *attr,
@@ -364 +365 @@
-@@ -1844,7 +1818,7 @@ err:
+@@ -1860,7 +1834,7 @@ err:
@@ -373 +374 @@
-@@ -1855,13 +1829,13 @@ static int
+@@ -1871,13 +1845,13 @@ static int
@@ -388 +389 @@
-@@ -1884,7 +1858,7 @@ hns3_flow_destroy(struct rte_eth_dev *dev, struct rte_flow *flow,
+@@ -1899,7 +1873,7 @@ hns3_flow_destroy(struct rte_eth_dev *dev, struct rte_flow *flow,
@@ -397 +398 @@
-@@ -1897,8 +1871,7 @@ hns3_flow_destroy(struct rte_eth_dev *dev, struct rte_flow *flow,
+@@ -1912,8 +1886,7 @@ hns3_flow_destroy(struct rte_eth_dev *dev, struct rte_flow *flow,
@@ -407 +408 @@
-@@ -1908,10 +1881,9 @@ hns3_flow_destroy(struct rte_eth_dev *dev, struct rte_flow *flow,
+@@ -1923,10 +1896,9 @@ hns3_flow_destroy(struct rte_eth_dev *dev, struct rte_flow *flow,
@@ -420,3 +421,3 @@
-@@ -2097,3 +2069,30 @@ hns3_dev_flow_ops_get(struct rte_eth_dev *dev,
- *ops = &hns3_flow_ops;
- return 0;
+@@ -2130,3 +2102,30 @@ hns3_dev_filter_ctrl(struct rte_eth_dev *dev, enum rte_filter_type filter_type,
+
+ return ret;
^ permalink raw reply [flat|nested] 208+ messages in thread
* [dpdk-stable] patch 'net/hns3: fix Tx prepare after stop' has been queued to stable release 20.11.3
2021-07-26 13:52 ` [dpdk-stable] patch 'net/bonding: fix error message on flow verify' " luca.boccassi
` (41 preceding siblings ...)
2021-07-26 13:53 ` [dpdk-stable] patch 'net/hns3: fix flow rule list in multi-process' " luca.boccassi
@ 2021-07-26 13:53 ` luca.boccassi
2021-07-26 13:53 ` [dpdk-stable] patch 'net/hinic: increase protection of the VLAN' " luca.boccassi
` (14 subsequent siblings)
57 siblings, 0 replies; 208+ messages in thread
From: luca.boccassi @ 2021-07-26 13:53 UTC (permalink / raw)
To: Huisong Li; +Cc: Min Hu, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.3
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/28/21. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/4e210bb1419f3dd6d88037a50f48f0c8515e8492
Thanks.
Luca Boccassi
---
From 4e210bb1419f3dd6d88037a50f48f0c8515e8492 Mon Sep 17 00:00:00 2001
From: Huisong Li <lihuisong@huawei.com>
Date: Sat, 17 Jul 2021 10:02:56 +0800
Subject: [PATCH] net/hns3: fix Tx prepare after stop
[ upstream commit 1cc574c41a8e4a901b822aad9c85a07e98a7b661 ]
In some special scenarios, such as TSO scenarios, the user layer may need
to call the tx_pkt_prepare(), and then call tx_pkt_burst() to send packets.
If the return value of tx_pkt_parepare() isn't equal to the numbers of
packets requested to send, warning message may be printed at the user
layer. Currently, tx_pkt_prepare() is assigned to dummy function when
dev_stop() is called in hns3 PMD. At this moment, if user layer continues
to send packets, the warning message will always be printed. So this patch
modifies the address to NULL.
Fixes: 2790c6464725 ("net/hns3: support device reset")
Signed-off-by: Huisong Li <lihuisong@huawei.com>
Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
---
drivers/net/hns3/hns3_rxtx.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/hns3/hns3_rxtx.c b/drivers/net/hns3/hns3_rxtx.c
index 2a92b1cf49..ad9ead47cc 100644
--- a/drivers/net/hns3/hns3_rxtx.c
+++ b/drivers/net/hns3/hns3_rxtx.c
@@ -3918,7 +3918,7 @@ void hns3_set_rxtx_function(struct rte_eth_dev *eth_dev)
} else {
eth_dev->rx_pkt_burst = hns3_dummy_rxtx_burst;
eth_dev->tx_pkt_burst = hns3_dummy_rxtx_burst;
- eth_dev->tx_pkt_prepare = hns3_dummy_rxtx_burst;
+ eth_dev->tx_pkt_prepare = NULL;
}
}
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-07-26 13:53:18.294919232 +0100
+++ 0044-net-hns3-fix-Tx-prepare-after-stop.patch 2021-07-26 13:53:15.933294388 +0100
@@ -1 +1 @@
-From 1cc574c41a8e4a901b822aad9c85a07e98a7b661 Mon Sep 17 00:00:00 2001
+From 4e210bb1419f3dd6d88037a50f48f0c8515e8492 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 1cc574c41a8e4a901b822aad9c85a07e98a7b661 ]
+
@@ -16 +17,0 @@
-Cc: stable@dpdk.org
@@ -25 +26 @@
-index a86e105fbc..d3fbe082e6 100644
+index 2a92b1cf49..ad9ead47cc 100644
@@ -28 +29 @@
-@@ -4386,7 +4386,7 @@ void hns3_set_rxtx_function(struct rte_eth_dev *eth_dev)
+@@ -3918,7 +3918,7 @@ void hns3_set_rxtx_function(struct rte_eth_dev *eth_dev)
^ permalink raw reply [flat|nested] 208+ messages in thread
* [dpdk-stable] patch 'net/hinic: increase protection of the VLAN' has been queued to stable release 20.11.3
2021-07-26 13:52 ` [dpdk-stable] patch 'net/bonding: fix error message on flow verify' " luca.boccassi
` (42 preceding siblings ...)
2021-07-26 13:53 ` [dpdk-stable] patch 'net/hns3: fix Tx prepare after stop' " luca.boccassi
@ 2021-07-26 13:53 ` luca.boccassi
2021-07-26 13:53 ` [dpdk-stable] patch 'net/hinic/base: fix LRO' " luca.boccassi
` (13 subsequent siblings)
57 siblings, 0 replies; 208+ messages in thread
From: luca.boccassi @ 2021-07-26 13:53 UTC (permalink / raw)
To: Guoyang Zhou; +Cc: dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.3
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/28/21. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/2ca9d750c9a6a6bd085343347de11209783c7e23
Thanks.
Luca Boccassi
---
From 2ca9d750c9a6a6bd085343347de11209783c7e23 Mon Sep 17 00:00:00 2001
From: Guoyang Zhou <zhouguoyang@huawei.com>
Date: Fri, 16 Jul 2021 17:54:28 +0800
Subject: [PATCH] net/hinic: increase protection of the VLAN
[ upstream commit 2cfd68ec407609becd75661787043e7cae35f15c ]
If the VLAN id 0 is deleted for hinic, all packets without
VLAN will be discarded when the VLAN filter is turned on.
Fixes: 50ce3e7aec8f ("ethdev: fix VLAN offloads set if no relative capabilities")
Signed-off-by: Guoyang Zhou <zhouguoyang@huawei.com>
---
drivers/net/hinic/hinic_pmd_ethdev.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/net/hinic/hinic_pmd_ethdev.c b/drivers/net/hinic/hinic_pmd_ethdev.c
index f1b3ba3927..369d5003cd 100644
--- a/drivers/net/hinic/hinic_pmd_ethdev.c
+++ b/drivers/net/hinic/hinic_pmd_ethdev.c
@@ -1617,6 +1617,9 @@ static int hinic_vlan_filter_set(struct rte_eth_dev *dev,
if (vlan_id > RTE_ETHER_MAX_VLAN_ID)
return -EINVAL;
+ if (vlan_id == 0)
+ return 0;
+
func_id = hinic_global_func_id(nic_dev->hwdev);
if (enable) {
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-07-26 13:53:18.376458416 +0100
+++ 0045-net-hinic-increase-protection-of-the-VLAN.patch 2021-07-26 13:53:15.937294472 +0100
@@ -1 +1 @@
-From 2cfd68ec407609becd75661787043e7cae35f15c Mon Sep 17 00:00:00 2001
+From 2ca9d750c9a6a6bd085343347de11209783c7e23 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 2cfd68ec407609becd75661787043e7cae35f15c ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -18 +19 @@
-index 946465779f..75849f28be 100644
+index f1b3ba3927..369d5003cd 100644
^ permalink raw reply [flat|nested] 208+ messages in thread
* [dpdk-stable] patch 'net/hinic/base: fix LRO' has been queued to stable release 20.11.3
2021-07-26 13:52 ` [dpdk-stable] patch 'net/bonding: fix error message on flow verify' " luca.boccassi
` (43 preceding siblings ...)
2021-07-26 13:53 ` [dpdk-stable] patch 'net/hinic: increase protection of the VLAN' " luca.boccassi
@ 2021-07-26 13:53 ` luca.boccassi
2021-07-26 13:53 ` [dpdk-stable] patch 'net/hinic: fix MTU consistency with firmware' " luca.boccassi
` (12 subsequent siblings)
57 siblings, 0 replies; 208+ messages in thread
From: luca.boccassi @ 2021-07-26 13:53 UTC (permalink / raw)
To: Guoyang Zhou; +Cc: dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.3
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/28/21. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/3e6a9fa0e2a5398cf0bf2e5372091b28b7b1d00e
Thanks.
Luca Boccassi
---
From 3e6a9fa0e2a5398cf0bf2e5372091b28b7b1d00e Mon Sep 17 00:00:00 2001
From: Guoyang Zhou <zhouguoyang@huawei.com>
Date: Fri, 16 Jul 2021 17:54:29 +0800
Subject: [PATCH] net/hinic/base: fix LRO
[ upstream commit 68fa836d0ff83229e1404f1274c90e1bff2475c8 ]
The Rx queue must config as ceq disables, and must set MSI-X
state disabled. Otherwise when LRO is enables, there will be
problems with packet aggregation because of firmware.
Fixes: 9d02f40d6503 ("net/hinic: fix LRO")
Signed-off-by: Guoyang Zhou <zhouguoyang@huawei.com>
---
drivers/net/hinic/base/hinic_pmd_nicio.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/hinic/base/hinic_pmd_nicio.c b/drivers/net/hinic/base/hinic_pmd_nicio.c
index 162308b02f..ad5db9f1de 100644
--- a/drivers/net/hinic/base/hinic_pmd_nicio.c
+++ b/drivers/net/hinic/base/hinic_pmd_nicio.c
@@ -230,8 +230,8 @@ static void hinic_rq_prepare_ctxt(struct hinic_rq *rq,
wq_block_pfn_hi = upper_32_bits(wq_block_pfn);
wq_block_pfn_lo = lower_32_bits(wq_block_pfn);
- /* must config as ceq enable but do not generate ceq */
- rq_ctxt->ceq_attr = RQ_CTXT_CEQ_ATTR_SET(1, EN) |
+ /* config as ceq disable, but must set msix state disable */
+ rq_ctxt->ceq_attr = RQ_CTXT_CEQ_ATTR_SET(0, EN) |
RQ_CTXT_CEQ_ATTR_SET(1, OWNER);
rq_ctxt->pi_intr_attr = RQ_CTXT_PI_SET(pi_start, IDX) |
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-07-26 13:53:18.446688208 +0100
+++ 0046-net-hinic-base-fix-LRO.patch 2021-07-26 13:53:15.937294472 +0100
@@ -1 +1 @@
-From 68fa836d0ff83229e1404f1274c90e1bff2475c8 Mon Sep 17 00:00:00 2001
+From 3e6a9fa0e2a5398cf0bf2e5372091b28b7b1d00e Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 68fa836d0ff83229e1404f1274c90e1bff2475c8 ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
^ permalink raw reply [flat|nested] 208+ messages in thread
* [dpdk-stable] patch 'net/hinic: fix MTU consistency with firmware' has been queued to stable release 20.11.3
2021-07-26 13:52 ` [dpdk-stable] patch 'net/bonding: fix error message on flow verify' " luca.boccassi
` (44 preceding siblings ...)
2021-07-26 13:53 ` [dpdk-stable] patch 'net/hinic/base: fix LRO' " luca.boccassi
@ 2021-07-26 13:53 ` luca.boccassi
2021-07-26 13:53 ` [dpdk-stable] patch 'net/ena: trigger reset on Tx prepare failure' " luca.boccassi
` (11 subsequent siblings)
57 siblings, 0 replies; 208+ messages in thread
From: luca.boccassi @ 2021-07-26 13:53 UTC (permalink / raw)
To: Guoyang Zhou; +Cc: dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.3
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/28/21. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/f91f60bb479060ca3683744d16cd053374b0e9a8
Thanks.
Luca Boccassi
---
From f91f60bb479060ca3683744d16cd053374b0e9a8 Mon Sep 17 00:00:00 2001
From: Guoyang Zhou <zhouguoyang@huawei.com>
Date: Fri, 16 Jul 2021 17:54:30 +0800
Subject: [PATCH] net/hinic: fix MTU consistency with firmware
[ upstream commit 3596d7b607831205048efcf818e451526f6c9598 ]
The configuration of MTU is inconsistent in the driver and
firmware when the port is stopped, started and reconfigured.
Before, HINIC_MAX_JUMBO_FRAME_SIZE include VLAN tag, but when
frame and pktlen are converted to each other do not include
VLAN tag. And port_mtu_set function will use HINIC_MAX_JUMBO_FRAME_SIZE
to calculate eth_overhead, so MTU will be inconsistent in the driver and
firmware.
Fixes: e542ab51ab27 ("net/hinic: fix jumbo frame flag condition for MTU set")
Signed-off-by: Guoyang Zhou <zhouguoyang@huawei.com>
---
drivers/net/hinic/base/hinic_pmd_niccfg.h | 9 ---------
drivers/net/hinic/hinic_pmd_ethdev.c | 9 ---------
drivers/net/hinic/hinic_pmd_ethdev.h | 17 +++++++++++++++++
3 files changed, 17 insertions(+), 18 deletions(-)
diff --git a/drivers/net/hinic/base/hinic_pmd_niccfg.h b/drivers/net/hinic/base/hinic_pmd_niccfg.h
index 04cd374ca6..0d0a6700d4 100644
--- a/drivers/net/hinic/base/hinic_pmd_niccfg.h
+++ b/drivers/net/hinic/base/hinic_pmd_niccfg.h
@@ -116,15 +116,6 @@ enum hinic_link_mode {
#define HINIC_DEFAULT_RX_MODE (HINIC_RX_MODE_UC | HINIC_RX_MODE_MC | \
HINIC_RX_MODE_BC)
-#define HINIC_MAX_MTU_SIZE (9600)
-#define HINIC_MIN_MTU_SIZE (256)
-
-/* MIN_MTU + ETH_HLEN + CRC (256+14+4) */
-#define HINIC_MIN_FRAME_SIZE 274
-
-/* MAX_MTU + ETH_HLEN + CRC + VLAN(9600+14+4+4) */
-#define HINIC_MAX_JUMBO_FRAME_SIZE (9622)
-
#define HINIC_PORT_DISABLE 0x0
#define HINIC_PORT_ENABLE 0x3
diff --git a/drivers/net/hinic/hinic_pmd_ethdev.c b/drivers/net/hinic/hinic_pmd_ethdev.c
index 369d5003cd..1a43597249 100644
--- a/drivers/net/hinic/hinic_pmd_ethdev.c
+++ b/drivers/net/hinic/hinic_pmd_ethdev.c
@@ -69,15 +69,6 @@
#define HINIC_VLAN_FILTER_EN (1U << 0)
-#define HINIC_MTU_TO_PKTLEN(mtu) \
- ((mtu) + ETH_HLEN + ETH_CRC_LEN)
-
-#define HINIC_PKTLEN_TO_MTU(pktlen) \
- ((pktlen) - (ETH_HLEN + ETH_CRC_LEN))
-
-/* The max frame size with default MTU */
-#define HINIC_ETH_MAX_LEN (RTE_ETHER_MTU + ETH_HLEN + ETH_CRC_LEN)
-
/* lro numer limit for one packet */
#define HINIC_LRO_WQE_NUM_DEFAULT 8
diff --git a/drivers/net/hinic/hinic_pmd_ethdev.h b/drivers/net/hinic/hinic_pmd_ethdev.h
index c7338d83be..fafccb90db 100644
--- a/drivers/net/hinic/hinic_pmd_ethdev.h
+++ b/drivers/net/hinic/hinic_pmd_ethdev.h
@@ -32,6 +32,23 @@
#define HINIC_UINT32_BIT_SIZE (CHAR_BIT * sizeof(uint32_t))
#define HINIC_VFTA_SIZE (4096 / HINIC_UINT32_BIT_SIZE)
+#define HINIC_MAX_MTU_SIZE 9600
+#define HINIC_MIN_MTU_SIZE 256
+
+#define HINIC_VLAN_TAG_SIZE 4
+#define HINIC_ETH_OVERHEAD \
+ (RTE_ETHER_HDR_LEN + RTE_ETHER_CRC_LEN + HINIC_VLAN_TAG_SIZE * 2)
+
+#define HINIC_MIN_FRAME_SIZE (HINIC_MIN_MTU_SIZE + HINIC_ETH_OVERHEAD)
+#define HINIC_MAX_JUMBO_FRAME_SIZE (HINIC_MAX_MTU_SIZE + HINIC_ETH_OVERHEAD)
+
+#define HINIC_MTU_TO_PKTLEN(mtu) ((mtu) + HINIC_ETH_OVERHEAD)
+
+#define HINIC_PKTLEN_TO_MTU(pktlen) ((pktlen) - HINIC_ETH_OVERHEAD)
+
+/* The max frame size with default MTU */
+#define HINIC_ETH_MAX_LEN (RTE_ETHER_MTU + HINIC_ETH_OVERHEAD)
+
enum hinic_dev_status {
HINIC_DEV_INIT,
HINIC_DEV_CLOSE,
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-07-26 13:53:18.514049745 +0100
+++ 0047-net-hinic-fix-MTU-consistency-with-firmware.patch 2021-07-26 13:53:15.945294641 +0100
@@ -1 +1 @@
-From 3596d7b607831205048efcf818e451526f6c9598 Mon Sep 17 00:00:00 2001
+From f91f60bb479060ca3683744d16cd053374b0e9a8 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 3596d7b607831205048efcf818e451526f6c9598 ]
+
@@ -15 +16,0 @@
-Cc: stable@dpdk.org
@@ -45 +46 @@
-index 75849f28be..1a72401546 100644
+index 369d5003cd..1a43597249 100644
@@ -65 +66 @@
-index 70b4d32ff2..8f1b3d5888 100644
+index c7338d83be..fafccb90db 100644
^ permalink raw reply [flat|nested] 208+ messages in thread
* [dpdk-stable] patch 'net/ena: trigger reset on Tx prepare failure' has been queued to stable release 20.11.3
2021-07-26 13:52 ` [dpdk-stable] patch 'net/bonding: fix error message on flow verify' " luca.boccassi
` (45 preceding siblings ...)
2021-07-26 13:53 ` [dpdk-stable] patch 'net/hinic: fix MTU consistency with firmware' " luca.boccassi
@ 2021-07-26 13:53 ` luca.boccassi
2021-07-26 13:53 ` [dpdk-stable] patch 'bus/dpaa: fix freeing in FMAN interface destructor' " luca.boccassi
` (10 subsequent siblings)
57 siblings, 0 replies; 208+ messages in thread
From: luca.boccassi @ 2021-07-26 13:53 UTC (permalink / raw)
To: Michal Krawczyk; +Cc: Shai Brandes, Shay Agroskin, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.3
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/28/21. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/66d9de1cde0d6139e8daa89ddece5de3f60298f6
Thanks.
Luca Boccassi
---
From 66d9de1cde0d6139e8daa89ddece5de3f60298f6 Mon Sep 17 00:00:00 2001
From: Michal Krawczyk <mk@semihalf.com>
Date: Fri, 23 Jul 2021 12:24:51 +0200
Subject: [PATCH] net/ena: trigger reset on Tx prepare failure
[ upstream commit b57e1053813b369d20bb2a177081a4c8ca63cede ]
If the prepare function failed, then it means the descriptors are in the
invalid state.
This condition now triggers the reset, which should be further handled
by the application.
To notify the application about prepare function failure, the error log
was added. In general, it should never fail in normal conditions, as the
Tx function checks for the available space in the Tx ring before the
preparation even starts.
Fixes: 2081d5e2e92d ("net/ena: add reset routine")
Signed-off-by: Michal Krawczyk <mk@semihalf.com>
Reviewed-by: Shai Brandes <shaibran@amazon.com>
Reviewed-by: Shay Agroskin <shayagr@amazon.com>
---
drivers/net/ena/ena_ethdev.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/net/ena/ena_ethdev.c b/drivers/net/ena/ena_ethdev.c
index 69198a6435..06fb99182c 100644
--- a/drivers/net/ena/ena_ethdev.c
+++ b/drivers/net/ena/ena_ethdev.c
@@ -2537,7 +2537,11 @@ static int ena_xmit_mbuf(struct ena_ring *tx_ring, struct rte_mbuf *mbuf)
rc = ena_com_prepare_tx(tx_ring->ena_com_io_sq, &ena_tx_ctx,
&nb_hw_desc);
if (unlikely(rc)) {
+ PMD_DRV_LOG(ERR, "Failed to prepare Tx buffers, rc: %d\n", rc);
++tx_ring->tx_stats.prepare_ctx_err;
+ tx_ring->adapter->reset_reason =
+ ENA_REGS_RESET_DRIVER_INVALID_STATE;
+ tx_ring->adapter->trigger_reset = true;
return rc;
}
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-07-26 13:53:18.622764403 +0100
+++ 0048-net-ena-trigger-reset-on-Tx-prepare-failure.patch 2021-07-26 13:53:15.949294725 +0100
@@ -1 +1 @@
-From b57e1053813b369d20bb2a177081a4c8ca63cede Mon Sep 17 00:00:00 2001
+From 66d9de1cde0d6139e8daa89ddece5de3f60298f6 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit b57e1053813b369d20bb2a177081a4c8ca63cede ]
+
@@ -18 +19,0 @@
-Cc: stable@dpdk.org
@@ -28 +29 @@
-index 2335436b6c..67cd91046a 100644
+index 69198a6435..06fb99182c 100644
@@ -31 +32 @@
-@@ -2570,7 +2570,11 @@ static int ena_xmit_mbuf(struct ena_ring *tx_ring, struct rte_mbuf *mbuf)
+@@ -2537,7 +2537,11 @@ static int ena_xmit_mbuf(struct ena_ring *tx_ring, struct rte_mbuf *mbuf)
^ permalink raw reply [flat|nested] 208+ messages in thread
* [dpdk-stable] patch 'bus/dpaa: fix freeing in FMAN interface destructor' has been queued to stable release 20.11.3
2021-07-26 13:52 ` [dpdk-stable] patch 'net/bonding: fix error message on flow verify' " luca.boccassi
` (46 preceding siblings ...)
2021-07-26 13:53 ` [dpdk-stable] patch 'net/ena: trigger reset on Tx prepare failure' " luca.boccassi
@ 2021-07-26 13:53 ` luca.boccassi
2021-07-26 13:53 ` [dpdk-stable] patch 'net/dpaa: fix headroom in VSP case' " luca.boccassi
` (9 subsequent siblings)
57 siblings, 0 replies; 208+ messages in thread
From: luca.boccassi @ 2021-07-26 13:53 UTC (permalink / raw)
To: Hemant Agrawal; +Cc: dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.3
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/28/21. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/b2ac79d89a405d64e4dd1f9839968b2364eadf09
Thanks.
Luca Boccassi
---
From b2ac79d89a405d64e4dd1f9839968b2364eadf09 Mon Sep 17 00:00:00 2001
From: Hemant Agrawal <hemant.agrawal@nxp.com>
Date: Mon, 19 Jul 2021 19:29:11 +0530
Subject: [PATCH] bus/dpaa: fix freeing in FMAN interface destructor
[ upstream commit 5ddcf3de6bc08fa7c14fd1ead86012aa575cf665 ]
if was allocated with rte_malloc, free shall be equivalent.
Fixes: 4762b3d419c3 ("bus/dpaa: delay fman device list to bus probe")
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
---
drivers/bus/dpaa/base/fman/fman.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/bus/dpaa/base/fman/fman.c b/drivers/bus/dpaa/base/fman/fman.c
index 39102bc1f3..997c94f087 100644
--- a/drivers/bus/dpaa/base/fman/fman.c
+++ b/drivers/bus/dpaa/base/fman/fman.c
@@ -50,7 +50,7 @@ if_destructor(struct __fman_if *__if)
free(bp);
}
cleanup:
- free(__if);
+ rte_free(__if);
}
static int
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-07-26 13:53:18.689725536 +0100
+++ 0049-bus-dpaa-fix-freeing-in-FMAN-interface-destructor.patch 2021-07-26 13:53:15.949294725 +0100
@@ -1 +1 @@
-From 5ddcf3de6bc08fa7c14fd1ead86012aa575cf665 Mon Sep 17 00:00:00 2001
+From b2ac79d89a405d64e4dd1f9839968b2364eadf09 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 5ddcf3de6bc08fa7c14fd1ead86012aa575cf665 ]
+
@@ -9 +10,0 @@
-Cc: stable@dpdk.org
@@ -17 +18 @@
-index 692071b4b0..a14004d7fc 100644
+index 39102bc1f3..997c94f087 100644
^ permalink raw reply [flat|nested] 208+ messages in thread
* [dpdk-stable] patch 'net/dpaa: fix headroom in VSP case' has been queued to stable release 20.11.3
2021-07-26 13:52 ` [dpdk-stable] patch 'net/bonding: fix error message on flow verify' " luca.boccassi
` (47 preceding siblings ...)
2021-07-26 13:53 ` [dpdk-stable] patch 'bus/dpaa: fix freeing in FMAN interface destructor' " luca.boccassi
@ 2021-07-26 13:53 ` luca.boccassi
2021-07-26 13:53 ` [dpdk-stable] patch 'net/sfc: fix MAC stats lock in xstats query by ID' " luca.boccassi
` (8 subsequent siblings)
57 siblings, 0 replies; 208+ messages in thread
From: luca.boccassi @ 2021-07-26 13:53 UTC (permalink / raw)
To: Nipun Gupta; +Cc: dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.3
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/28/21. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/4b44020ca7ad0bc5874f4a4f97bcaaa50662a47d
Thanks.
Luca Boccassi
---
From 4b44020ca7ad0bc5874f4a4f97bcaaa50662a47d Mon Sep 17 00:00:00 2001
From: Nipun Gupta <nipun.gupta@nxp.com>
Date: Mon, 19 Jul 2021 19:29:12 +0530
Subject: [PATCH] net/dpaa: fix headroom in VSP case
[ upstream commit 8d2bf7c1d5b93becd8b4649e0c628eec94be1799 ]
This patch fixes providing the correct headroom size when
VSP is enabled.
Fixes: e4abd4ff183c ("net/dpaa: support virtual storage profile")
Signed-off-by: Nipun Gupta <nipun.gupta@nxp.com>
---
drivers/net/dpaa/dpaa_flow.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/drivers/net/dpaa/dpaa_flow.c b/drivers/net/dpaa/dpaa_flow.c
index a0087df670..c5b5ec8695 100644
--- a/drivers/net/dpaa/dpaa_flow.c
+++ b/drivers/net/dpaa/dpaa_flow.c
@@ -1,5 +1,5 @@
/* SPDX-License-Identifier: BSD-3-Clause
- * Copyright 2017-2019 NXP
+ * Copyright 2017-2019,2021 NXP
*/
/* System headers */
@@ -999,6 +999,9 @@ static int dpaa_port_vsp_configure(struct dpaa_if *dpaa_intf,
buf_prefix_cont.pass_time_stamp = true;
buf_prefix_cont.pass_hash_result = false;
buf_prefix_cont.pass_all_other_pcdinfo = false;
+ buf_prefix_cont.manip_ext_space =
+ RTE_PKTMBUF_HEADROOM - DPAA_MBUF_HW_ANNOTATION;
+
ret = fm_vsp_config_buffer_prefix_content(dpaa_intf->vsp_handle[vsp_id],
&buf_prefix_cont);
if (ret != E_OK) {
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-07-26 13:53:18.769305985 +0100
+++ 0050-net-dpaa-fix-headroom-in-VSP-case.patch 2021-07-26 13:53:15.949294725 +0100
@@ -1 +1 @@
-From 8d2bf7c1d5b93becd8b4649e0c628eec94be1799 Mon Sep 17 00:00:00 2001
+From 4b44020ca7ad0bc5874f4a4f97bcaaa50662a47d Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 8d2bf7c1d5b93becd8b4649e0c628eec94be1799 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
^ permalink raw reply [flat|nested] 208+ messages in thread
* [dpdk-stable] patch 'net/sfc: fix MAC stats lock in xstats query by ID' has been queued to stable release 20.11.3
2021-07-26 13:52 ` [dpdk-stable] patch 'net/bonding: fix error message on flow verify' " luca.boccassi
` (48 preceding siblings ...)
2021-07-26 13:53 ` [dpdk-stable] patch 'net/dpaa: fix headroom in VSP case' " luca.boccassi
@ 2021-07-26 13:53 ` luca.boccassi
2021-07-26 13:53 ` [dpdk-stable] patch 'net/sfc: fix reading adapter state without locking' " luca.boccassi
` (7 subsequent siblings)
57 siblings, 0 replies; 208+ messages in thread
From: luca.boccassi @ 2021-07-26 13:53 UTC (permalink / raw)
To: Ivan Ilchenko; +Cc: Andrew Rybchenko, Andy Moreton, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.3
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/28/21. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/e5e8e0aa61a447eeeb7b385500ff23b91733093a
Thanks.
Luca Boccassi
---
From e5e8e0aa61a447eeeb7b385500ff23b91733093a Mon Sep 17 00:00:00 2001
From: Ivan Ilchenko <ivan.ilchenko@oktetlabs.ru>
Date: Fri, 23 Jul 2021 16:15:05 +0300
Subject: [PATCH] net/sfc: fix MAC stats lock in xstats query by ID
[ upstream commit 9076e855f171e6588d43c0c20956da154b8c4371 ]
Add MAC stats lock in xstats_get_by_id() callback before reading
number of supported MAC stats.
Fixes: 73280c1e4ff ("net/sfc: support xstats retrieval by ID")
Signed-off-by: Ivan Ilchenko <ivan.ilchenko@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Reviewed-by: Andy Moreton <amoreton@xilinx.com>
---
drivers/net/sfc/sfc_ethdev.c | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/drivers/net/sfc/sfc_ethdev.c b/drivers/net/sfc/sfc_ethdev.c
index cde9f2423b..529027630e 100644
--- a/drivers/net/sfc/sfc_ethdev.c
+++ b/drivers/net/sfc/sfc_ethdev.c
@@ -780,11 +780,13 @@ sfc_xstats_get_by_id(struct rte_eth_dev *dev, const uint64_t *ids,
int ret;
int rc;
+ rte_spinlock_lock(&port->mac_stats_lock);
+
if (unlikely(values == NULL) ||
- unlikely((ids == NULL) && (n < port->mac_stats_nb_supported)))
- return port->mac_stats_nb_supported;
-
- rte_spinlock_lock(&port->mac_stats_lock);
+ unlikely(ids == NULL && n < port->mac_stats_nb_supported)) {
+ ret = port->mac_stats_nb_supported;
+ goto unlock;
+ }
rc = sfc_port_update_mac_stats(sa);
if (rc != 0) {
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-07-26 13:53:18.843886771 +0100
+++ 0051-net-sfc-fix-MAC-stats-lock-in-xstats-query-by-ID.patch 2021-07-26 13:53:15.953294809 +0100
@@ -1 +1 @@
-From 9076e855f171e6588d43c0c20956da154b8c4371 Mon Sep 17 00:00:00 2001
+From e5e8e0aa61a447eeeb7b385500ff23b91733093a Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 9076e855f171e6588d43c0c20956da154b8c4371 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -20 +21 @@
-index 88896db1f8..d4ac61ff76 100644
+index cde9f2423b..529027630e 100644
@@ -23 +24 @@
-@@ -789,11 +789,13 @@ sfc_xstats_get_by_id(struct rte_eth_dev *dev, const uint64_t *ids,
+@@ -780,11 +780,13 @@ sfc_xstats_get_by_id(struct rte_eth_dev *dev, const uint64_t *ids,
^ permalink raw reply [flat|nested] 208+ messages in thread
* [dpdk-stable] patch 'net/sfc: fix reading adapter state without locking' has been queued to stable release 20.11.3
2021-07-26 13:52 ` [dpdk-stable] patch 'net/bonding: fix error message on flow verify' " luca.boccassi
` (49 preceding siblings ...)
2021-07-26 13:53 ` [dpdk-stable] patch 'net/sfc: fix MAC stats lock in xstats query by ID' " luca.boccassi
@ 2021-07-26 13:53 ` luca.boccassi
2021-07-26 13:53 ` [dpdk-stable] patch 'net/sfc: fix xstats query by ID according to ethdev' " luca.boccassi
` (6 subsequent siblings)
57 siblings, 0 replies; 208+ messages in thread
From: luca.boccassi @ 2021-07-26 13:53 UTC (permalink / raw)
To: Ivan Ilchenko; +Cc: Andrew Rybchenko, Andy Moreton, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.3
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/28/21. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/99bcdae014724bf2778be39a94013df99a85698c
Thanks.
Luca Boccassi
---
From 99bcdae014724bf2778be39a94013df99a85698c Mon Sep 17 00:00:00 2001
From: Ivan Ilchenko <ivan.ilchenko@oktetlabs.ru>
Date: Fri, 23 Jul 2021 16:15:06 +0300
Subject: [PATCH] net/sfc: fix reading adapter state without locking
[ upstream commit 17b0d7b36777341486efc0959d5ed69cf5af5f26 ]
Update MAC stats function reads adapter state with MAC stats locking
but without adapter locking. Add adapter locking before calling this
function and remove MAC stats locking since there's no point to have
it together with adapter locking. The second place MAC stats locking
is used is MAC stats reset function. It's called with adapter being
already locked so there's no point to use MAC stats locking anymore.
Fixes: 1caab2f1e68 ("net/sfc: add basic statistics")
Signed-off-by: Ivan Ilchenko <ivan.ilchenko@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Reviewed-by: Andy Moreton <amoreton@xilinx.com>
---
drivers/net/sfc/sfc.h | 1 -
drivers/net/sfc/sfc_ethdev.c | 28 ++++++++++++++++++++--------
drivers/net/sfc/sfc_port.c | 9 +++------
3 files changed, 23 insertions(+), 15 deletions(-)
diff --git a/drivers/net/sfc/sfc.h b/drivers/net/sfc/sfc.h
index ed059e142f..0811dd0aff 100644
--- a/drivers/net/sfc/sfc.h
+++ b/drivers/net/sfc/sfc.h
@@ -128,7 +128,6 @@ struct sfc_port {
unsigned int nb_mcast_addrs;
uint8_t *mcast_addrs;
- rte_spinlock_t mac_stats_lock;
uint64_t *mac_stats_buf;
unsigned int mac_stats_nb_supported;
efsys_mem_t mac_stats_dma_mem;
diff --git a/drivers/net/sfc/sfc_ethdev.c b/drivers/net/sfc/sfc_ethdev.c
index 529027630e..41dc0bf05d 100644
--- a/drivers/net/sfc/sfc_ethdev.c
+++ b/drivers/net/sfc/sfc_ethdev.c
@@ -604,7 +604,7 @@ sfc_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats)
uint64_t *mac_stats;
int ret;
- rte_spinlock_lock(&port->mac_stats_lock);
+ sfc_adapter_lock(sa);
ret = sfc_port_update_mac_stats(sa);
if (ret != 0)
@@ -677,7 +677,7 @@ sfc_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats)
}
unlock:
- rte_spinlock_unlock(&port->mac_stats_lock);
+ sfc_adapter_unlock(sa);
SFC_ASSERT(ret >= 0);
return -ret;
}
@@ -689,12 +689,15 @@ sfc_stats_reset(struct rte_eth_dev *dev)
struct sfc_port *port = &sa->port;
int rc;
+ sfc_adapter_lock(sa);
+
if (sa->state != SFC_ADAPTER_STARTED) {
/*
* The operation cannot be done if port is not started; it
* will be scheduled to be done during the next port start
*/
port->mac_stats_reset_pending = B_TRUE;
+ sfc_adapter_unlock(sa);
return 0;
}
@@ -702,6 +705,8 @@ sfc_stats_reset(struct rte_eth_dev *dev)
if (rc != 0)
sfc_err(sa, "failed to reset statistics (rc = %d)", rc);
+ sfc_adapter_unlock(sa);
+
SFC_ASSERT(rc >= 0);
return -rc;
}
@@ -717,7 +722,7 @@ sfc_xstats_get(struct rte_eth_dev *dev, struct rte_eth_xstat *xstats,
unsigned int i;
int nstats = 0;
- rte_spinlock_lock(&port->mac_stats_lock);
+ sfc_adapter_lock(sa);
rc = sfc_port_update_mac_stats(sa);
if (rc != 0) {
@@ -739,7 +744,7 @@ sfc_xstats_get(struct rte_eth_dev *dev, struct rte_eth_xstat *xstats,
}
unlock:
- rte_spinlock_unlock(&port->mac_stats_lock);
+ sfc_adapter_unlock(sa);
return nstats;
}
@@ -780,7 +785,7 @@ sfc_xstats_get_by_id(struct rte_eth_dev *dev, const uint64_t *ids,
int ret;
int rc;
- rte_spinlock_lock(&port->mac_stats_lock);
+ sfc_adapter_lock(sa);
if (unlikely(values == NULL) ||
unlikely(ids == NULL && n < port->mac_stats_nb_supported)) {
@@ -810,7 +815,7 @@ sfc_xstats_get_by_id(struct rte_eth_dev *dev, const uint64_t *ids,
ret = nb_written;
unlock:
- rte_spinlock_unlock(&port->mac_stats_lock);
+ sfc_adapter_unlock(sa);
return ret;
}
@@ -826,9 +831,14 @@ sfc_xstats_get_names_by_id(struct rte_eth_dev *dev,
unsigned int nb_written = 0;
unsigned int i;
+ sfc_adapter_lock(sa);
+
if (unlikely(xstats_names == NULL) ||
- unlikely((ids == NULL) && (size < port->mac_stats_nb_supported)))
- return port->mac_stats_nb_supported;
+ unlikely((ids == NULL) && (size < port->mac_stats_nb_supported))) {
+ nb_supported = port->mac_stats_nb_supported;
+ sfc_adapter_unlock(sa);
+ return nb_supported;
+ }
for (i = 0; (i < EFX_MAC_NSTATS) && (nb_written < size); ++i) {
if (!EFX_MAC_STAT_SUPPORTED(port->mac_stats_mask, i))
@@ -844,6 +854,8 @@ sfc_xstats_get_names_by_id(struct rte_eth_dev *dev,
++nb_supported;
}
+ sfc_adapter_unlock(sa);
+
return nb_written;
}
diff --git a/drivers/net/sfc/sfc_port.c b/drivers/net/sfc/sfc_port.c
index 4de13267d5..d876996826 100644
--- a/drivers/net/sfc/sfc_port.c
+++ b/drivers/net/sfc/sfc_port.c
@@ -43,7 +43,7 @@ sfc_port_update_mac_stats(struct sfc_adapter *sa)
unsigned int nb_attempts = 0;
int rc;
- SFC_ASSERT(rte_spinlock_is_locked(&port->mac_stats_lock));
+ SFC_ASSERT(sfc_adapter_is_locked(sa));
if (sa->state != SFC_ADAPTER_STARTED)
return EINVAL;
@@ -103,14 +103,13 @@ sfc_port_reset_sw_stats(struct sfc_adapter *sa)
int
sfc_port_reset_mac_stats(struct sfc_adapter *sa)
{
- struct sfc_port *port = &sa->port;
int rc;
- rte_spinlock_lock(&port->mac_stats_lock);
+ SFC_ASSERT(sfc_adapter_is_locked(sa));
+
rc = efx_mac_stats_clear(sa->nic);
if (rc == 0)
sfc_port_reset_sw_stats(sa);
- rte_spinlock_unlock(&port->mac_stats_lock);
return rc;
}
@@ -416,8 +415,6 @@ sfc_port_attach(struct sfc_adapter *sa)
goto fail_mcast_addr_list_buf_alloc;
}
- rte_spinlock_init(&port->mac_stats_lock);
-
rc = ENOMEM;
port->mac_stats_buf = rte_calloc_socket("mac_stats_buf", EFX_MAC_NSTATS,
sizeof(uint64_t), 0,
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-07-26 13:53:18.908567553 +0100
+++ 0052-net-sfc-fix-reading-adapter-state-without-locking.patch 2021-07-26 13:53:15.957294893 +0100
@@ -1 +1 @@
-From 17b0d7b36777341486efc0959d5ed69cf5af5f26 Mon Sep 17 00:00:00 2001
+From 99bcdae014724bf2778be39a94013df99a85698c Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 17b0d7b36777341486efc0959d5ed69cf5af5f26 ]
+
@@ -14 +15,0 @@
-Cc: stable@dpdk.org
@@ -26 +27 @@
-index 546739bd4a..c7b0e5a30d 100644
+index ed059e142f..0811dd0aff 100644
@@ -29 +30 @@
-@@ -130,7 +130,6 @@ struct sfc_port {
+@@ -128,7 +128,6 @@ struct sfc_port {
@@ -38 +39 @@
-index d4ac61ff76..d5417e5e65 100644
+index 529027630e..41dc0bf05d 100644
@@ -41 +42 @@
-@@ -613,7 +613,7 @@ sfc_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats)
+@@ -604,7 +604,7 @@ sfc_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats)
@@ -50 +51 @@
-@@ -686,7 +686,7 @@ sfc_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats)
+@@ -677,7 +677,7 @@ sfc_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats)
@@ -59 +60 @@
-@@ -698,12 +698,15 @@ sfc_stats_reset(struct rte_eth_dev *dev)
+@@ -689,12 +689,15 @@ sfc_stats_reset(struct rte_eth_dev *dev)
@@ -75 +76 @@
-@@ -711,6 +714,8 @@ sfc_stats_reset(struct rte_eth_dev *dev)
+@@ -702,6 +705,8 @@ sfc_stats_reset(struct rte_eth_dev *dev)
@@ -84 +85 @@
-@@ -726,7 +731,7 @@ sfc_xstats_get(struct rte_eth_dev *dev, struct rte_eth_xstat *xstats,
+@@ -717,7 +722,7 @@ sfc_xstats_get(struct rte_eth_dev *dev, struct rte_eth_xstat *xstats,
@@ -93 +94 @@
-@@ -748,7 +753,7 @@ sfc_xstats_get(struct rte_eth_dev *dev, struct rte_eth_xstat *xstats,
+@@ -739,7 +744,7 @@ sfc_xstats_get(struct rte_eth_dev *dev, struct rte_eth_xstat *xstats,
@@ -102 +103 @@
-@@ -789,7 +794,7 @@ sfc_xstats_get_by_id(struct rte_eth_dev *dev, const uint64_t *ids,
+@@ -780,7 +785,7 @@ sfc_xstats_get_by_id(struct rte_eth_dev *dev, const uint64_t *ids,
@@ -111 +112 @@
-@@ -819,7 +824,7 @@ sfc_xstats_get_by_id(struct rte_eth_dev *dev, const uint64_t *ids,
+@@ -810,7 +815,7 @@ sfc_xstats_get_by_id(struct rte_eth_dev *dev, const uint64_t *ids,
@@ -120 +121 @@
-@@ -835,9 +840,14 @@ sfc_xstats_get_names_by_id(struct rte_eth_dev *dev,
+@@ -826,9 +831,14 @@ sfc_xstats_get_names_by_id(struct rte_eth_dev *dev,
@@ -137 +138 @@
-@@ -853,6 +863,8 @@ sfc_xstats_get_names_by_id(struct rte_eth_dev *dev,
+@@ -844,6 +854,8 @@ sfc_xstats_get_names_by_id(struct rte_eth_dev *dev,
@@ -147 +148 @@
-index ac117f9c48..cdc0f94f19 100644
+index 4de13267d5..d876996826 100644
^ permalink raw reply [flat|nested] 208+ messages in thread
* [dpdk-stable] patch 'net/sfc: fix xstats query by ID according to ethdev' has been queued to stable release 20.11.3
2021-07-26 13:52 ` [dpdk-stable] patch 'net/bonding: fix error message on flow verify' " luca.boccassi
` (50 preceding siblings ...)
2021-07-26 13:53 ` [dpdk-stable] patch 'net/sfc: fix reading adapter state without locking' " luca.boccassi
@ 2021-07-26 13:53 ` luca.boccassi
2021-07-26 13:53 ` [dpdk-stable] patch 'net/sfc: fix xstats query by unsorted list of IDs' " luca.boccassi
` (5 subsequent siblings)
57 siblings, 0 replies; 208+ messages in thread
From: luca.boccassi @ 2021-07-26 13:53 UTC (permalink / raw)
To: Ivan Ilchenko; +Cc: Andrew Rybchenko, Andy Moreton, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.3
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/28/21. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/e4ebfdeb0d05d303408e555ad27297203c58532d
Thanks.
Luca Boccassi
---
From e4ebfdeb0d05d303408e555ad27297203c58532d Mon Sep 17 00:00:00 2001
From: Ivan Ilchenko <ivan.ilchenko@oktetlabs.ru>
Date: Fri, 23 Jul 2021 16:15:09 +0300
Subject: [PATCH] net/sfc: fix xstats query by ID according to ethdev
[ upstream commit 8232cc2d35ab9d07a729971b6c7596189775bc8f ]
Fix xstats by ID callbacks according to ethdev usage.
Handle combinations of input arguments that are required by ethdev
and sanity check and reject other combinations on callback entry.
Fixes: 73280c1e4ff ("net/sfc: support xstats retrieval by ID")
Signed-off-by: Ivan Ilchenko <ivan.ilchenko@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Reviewed-by: Andy Moreton <amoreton@xilinx.com>
---
drivers/net/sfc/sfc_ethdev.c | 20 ++++++++++----------
1 file changed, 10 insertions(+), 10 deletions(-)
diff --git a/drivers/net/sfc/sfc_ethdev.c b/drivers/net/sfc/sfc_ethdev.c
index 41dc0bf05d..e5c30e6d3f 100644
--- a/drivers/net/sfc/sfc_ethdev.c
+++ b/drivers/net/sfc/sfc_ethdev.c
@@ -785,13 +785,10 @@ sfc_xstats_get_by_id(struct rte_eth_dev *dev, const uint64_t *ids,
int ret;
int rc;
- sfc_adapter_lock(sa);
+ if (unlikely(ids == NULL || values == NULL))
+ return -EINVAL;
- if (unlikely(values == NULL) ||
- unlikely(ids == NULL && n < port->mac_stats_nb_supported)) {
- ret = port->mac_stats_nb_supported;
- goto unlock;
- }
+ sfc_adapter_lock(sa);
rc = sfc_port_update_mac_stats(sa);
if (rc != 0) {
@@ -806,7 +803,7 @@ sfc_xstats_get_by_id(struct rte_eth_dev *dev, const uint64_t *ids,
if (!EFX_MAC_STAT_SUPPORTED(port->mac_stats_mask, i))
continue;
- if ((ids == NULL) || (ids[nb_written] == nb_supported))
+ if (ids[nb_written] == nb_supported)
values[nb_written++] = mac_stats[i];
++nb_supported;
@@ -831,10 +828,13 @@ sfc_xstats_get_names_by_id(struct rte_eth_dev *dev,
unsigned int nb_written = 0;
unsigned int i;
+ if (unlikely(xstats_names == NULL && ids != NULL) ||
+ unlikely(xstats_names != NULL && ids == NULL))
+ return -EINVAL;
+
sfc_adapter_lock(sa);
- if (unlikely(xstats_names == NULL) ||
- unlikely((ids == NULL) && (size < port->mac_stats_nb_supported))) {
+ if (unlikely(xstats_names == NULL && ids == NULL)) {
nb_supported = port->mac_stats_nb_supported;
sfc_adapter_unlock(sa);
return nb_supported;
@@ -844,7 +844,7 @@ sfc_xstats_get_names_by_id(struct rte_eth_dev *dev,
if (!EFX_MAC_STAT_SUPPORTED(port->mac_stats_mask, i))
continue;
- if ((ids == NULL) || (ids[nb_written] == nb_supported)) {
+ if (ids[nb_written] == nb_supported) {
char *name = xstats_names[nb_written++].name;
strlcpy(name, efx_mac_stat_name(sa->nic, i),
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-07-26 13:53:18.988046127 +0100
+++ 0053-net-sfc-fix-xstats-query-by-ID-according-to-ethdev.patch 2021-07-26 13:53:15.957294893 +0100
@@ -1 +1 @@
-From 8232cc2d35ab9d07a729971b6c7596189775bc8f Mon Sep 17 00:00:00 2001
+From e4ebfdeb0d05d303408e555ad27297203c58532d Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 8232cc2d35ab9d07a729971b6c7596189775bc8f ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -21 +22 @@
-index d5417e5e65..fca3f524a1 100644
+index 41dc0bf05d..e5c30e6d3f 100644
@@ -24 +25 @@
-@@ -794,13 +794,10 @@ sfc_xstats_get_by_id(struct rte_eth_dev *dev, const uint64_t *ids,
+@@ -785,13 +785,10 @@ sfc_xstats_get_by_id(struct rte_eth_dev *dev, const uint64_t *ids,
@@ -41 +42 @@
-@@ -815,7 +812,7 @@ sfc_xstats_get_by_id(struct rte_eth_dev *dev, const uint64_t *ids,
+@@ -806,7 +803,7 @@ sfc_xstats_get_by_id(struct rte_eth_dev *dev, const uint64_t *ids,
@@ -50 +51 @@
-@@ -840,10 +837,13 @@ sfc_xstats_get_names_by_id(struct rte_eth_dev *dev,
+@@ -831,10 +828,13 @@ sfc_xstats_get_names_by_id(struct rte_eth_dev *dev,
@@ -66 +67 @@
-@@ -853,7 +853,7 @@ sfc_xstats_get_names_by_id(struct rte_eth_dev *dev,
+@@ -844,7 +844,7 @@ sfc_xstats_get_names_by_id(struct rte_eth_dev *dev,
^ permalink raw reply [flat|nested] 208+ messages in thread
* [dpdk-stable] patch 'net/sfc: fix xstats query by unsorted list of IDs' has been queued to stable release 20.11.3
2021-07-26 13:52 ` [dpdk-stable] patch 'net/bonding: fix error message on flow verify' " luca.boccassi
` (51 preceding siblings ...)
2021-07-26 13:53 ` [dpdk-stable] patch 'net/sfc: fix xstats query by ID according to ethdev' " luca.boccassi
@ 2021-07-26 13:53 ` luca.boccassi
2021-07-26 13:53 ` [dpdk-stable] patch 'net/sfc: fix MAC stats update for stopped device' " luca.boccassi
` (4 subsequent siblings)
57 siblings, 0 replies; 208+ messages in thread
From: luca.boccassi @ 2021-07-26 13:53 UTC (permalink / raw)
To: Ivan Ilchenko; +Cc: Andrew Rybchenko, Andy Moreton, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.3
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/28/21. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/b84a0ebd171257f984e7d177223e28a8faabf95d
Thanks.
Luca Boccassi
---
From b84a0ebd171257f984e7d177223e28a8faabf95d Mon Sep 17 00:00:00 2001
From: Ivan Ilchenko <ivan.ilchenko@oktetlabs.ru>
Date: Fri, 23 Jul 2021 16:15:10 +0300
Subject: [PATCH] net/sfc: fix xstats query by unsorted list of IDs
[ upstream commit 7d466e5fd8d13def57538d80a2f759c2c436dba0 ]
Device may support only some MAC stats. Add mapping from ids to subset
of supported MAC stats for each port.
Fixes: 73280c1e4ff ("net/sfc: support xstats retrieval by ID")
Signed-off-by: Ivan Ilchenko <ivan.ilchenko@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Reviewed-by: Andy Moreton <amoreton@xilinx.com>
---
drivers/net/sfc/sfc.h | 2 ++
drivers/net/sfc/sfc_ethdev.c | 44 ++++++++++++++++++------------------
drivers/net/sfc/sfc_port.c | 29 ++++++++++++++++++------
3 files changed, 46 insertions(+), 29 deletions(-)
diff --git a/drivers/net/sfc/sfc.h b/drivers/net/sfc/sfc.h
index 0811dd0aff..6192ac89f8 100644
--- a/drivers/net/sfc/sfc.h
+++ b/drivers/net/sfc/sfc.h
@@ -139,6 +139,8 @@ struct sfc_port {
uint32_t mac_stats_mask[EFX_MAC_STATS_MASK_NPAGES];
+ unsigned int mac_stats_by_id[EFX_MAC_NSTATS];
+
uint64_t ipackets;
};
diff --git a/drivers/net/sfc/sfc_ethdev.c b/drivers/net/sfc/sfc_ethdev.c
index e5c30e6d3f..59f61b09a8 100644
--- a/drivers/net/sfc/sfc_ethdev.c
+++ b/drivers/net/sfc/sfc_ethdev.c
@@ -779,8 +779,6 @@ sfc_xstats_get_by_id(struct rte_eth_dev *dev, const uint64_t *ids,
struct sfc_adapter *sa = sfc_adapter_by_eth_dev(dev);
struct sfc_port *port = &sa->port;
uint64_t *mac_stats;
- unsigned int nb_supported = 0;
- unsigned int nb_written = 0;
unsigned int i;
int ret;
int rc;
@@ -799,17 +797,19 @@ sfc_xstats_get_by_id(struct rte_eth_dev *dev, const uint64_t *ids,
mac_stats = port->mac_stats_buf;
- for (i = 0; (i < EFX_MAC_NSTATS) && (nb_written < n); ++i) {
- if (!EFX_MAC_STAT_SUPPORTED(port->mac_stats_mask, i))
- continue;
+ SFC_ASSERT(port->mac_stats_nb_supported <=
+ RTE_DIM(port->mac_stats_by_id));
- if (ids[nb_written] == nb_supported)
- values[nb_written++] = mac_stats[i];
-
- ++nb_supported;
+ for (i = 0; i < n; i++) {
+ if (ids[i] < port->mac_stats_nb_supported) {
+ values[i] = mac_stats[port->mac_stats_by_id[ids[i]]];
+ } else {
+ ret = i;
+ goto unlock;
+ }
}
- ret = nb_written;
+ ret = n;
unlock:
sfc_adapter_unlock(sa);
@@ -824,8 +824,7 @@ sfc_xstats_get_names_by_id(struct rte_eth_dev *dev,
{
struct sfc_adapter *sa = sfc_adapter_by_eth_dev(dev);
struct sfc_port *port = &sa->port;
- unsigned int nb_supported = 0;
- unsigned int nb_written = 0;
+ unsigned int nb_supported;
unsigned int i;
if (unlikely(xstats_names == NULL && ids != NULL) ||
@@ -840,23 +839,24 @@ sfc_xstats_get_names_by_id(struct rte_eth_dev *dev,
return nb_supported;
}
- for (i = 0; (i < EFX_MAC_NSTATS) && (nb_written < size); ++i) {
- if (!EFX_MAC_STAT_SUPPORTED(port->mac_stats_mask, i))
- continue;
+ SFC_ASSERT(port->mac_stats_nb_supported <=
+ RTE_DIM(port->mac_stats_by_id));
- if (ids[nb_written] == nb_supported) {
- char *name = xstats_names[nb_written++].name;
-
- strlcpy(name, efx_mac_stat_name(sa->nic, i),
+ for (i = 0; i < size; i++) {
+ if (ids[i] < port->mac_stats_nb_supported) {
+ strlcpy(xstats_names[i].name,
+ efx_mac_stat_name(sa->nic,
+ port->mac_stats_by_id[ids[i]]),
sizeof(xstats_names[0].name));
+ } else {
+ sfc_adapter_unlock(sa);
+ return i;
}
-
- ++nb_supported;
}
sfc_adapter_unlock(sa);
- return nb_written;
+ return size;
}
static int
diff --git a/drivers/net/sfc/sfc_port.c b/drivers/net/sfc/sfc_port.c
index d876996826..817b412e29 100644
--- a/drivers/net/sfc/sfc_port.c
+++ b/drivers/net/sfc/sfc_port.c
@@ -157,6 +157,27 @@ sfc_port_phy_caps_to_max_link_speed(uint32_t phy_caps)
#endif
+static void
+sfc_port_fill_mac_stats_info(struct sfc_adapter *sa)
+{
+ unsigned int mac_stats_nb_supported = 0;
+ struct sfc_port *port = &sa->port;
+ unsigned int stat_idx;
+
+ efx_mac_stats_get_mask(sa->nic, port->mac_stats_mask,
+ sizeof(port->mac_stats_mask));
+
+ for (stat_idx = 0; stat_idx < EFX_MAC_NSTATS; ++stat_idx) {
+ if (!EFX_MAC_STAT_SUPPORTED(port->mac_stats_mask, stat_idx))
+ continue;
+
+ port->mac_stats_by_id[mac_stats_nb_supported] = stat_idx;
+ mac_stats_nb_supported++;
+ }
+
+ port->mac_stats_nb_supported = mac_stats_nb_supported;
+}
+
int
sfc_port_start(struct sfc_adapter *sa)
{
@@ -165,7 +186,6 @@ sfc_port_start(struct sfc_adapter *sa)
uint32_t phy_adv_cap;
const uint32_t phy_pause_caps =
((1u << EFX_PHY_CAP_PAUSE) | (1u << EFX_PHY_CAP_ASYM));
- unsigned int i;
sfc_log_init(sa, "entry");
@@ -259,12 +279,7 @@ sfc_port_start(struct sfc_adapter *sa)
port->mac_stats_reset_pending = B_FALSE;
}
- efx_mac_stats_get_mask(sa->nic, port->mac_stats_mask,
- sizeof(port->mac_stats_mask));
-
- for (i = 0, port->mac_stats_nb_supported = 0; i < EFX_MAC_NSTATS; ++i)
- if (EFX_MAC_STAT_SUPPORTED(port->mac_stats_mask, i))
- port->mac_stats_nb_supported++;
+ sfc_port_fill_mac_stats_info(sa);
port->mac_stats_update_generation = 0;
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-07-26 13:53:19.058273199 +0100
+++ 0054-net-sfc-fix-xstats-query-by-unsorted-list-of-IDs.patch 2021-07-26 13:53:15.961294977 +0100
@@ -1 +1 @@
-From 7d466e5fd8d13def57538d80a2f759c2c436dba0 Mon Sep 17 00:00:00 2001
+From b84a0ebd171257f984e7d177223e28a8faabf95d Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 7d466e5fd8d13def57538d80a2f759c2c436dba0 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -22 +23 @@
-index c7b0e5a30d..972d32606d 100644
+index 0811dd0aff..6192ac89f8 100644
@@ -25 +26 @@
-@@ -141,6 +141,8 @@ struct sfc_port {
+@@ -139,6 +139,8 @@ struct sfc_port {
@@ -35 +36 @@
-index fca3f524a1..ae9304f90f 100644
+index e5c30e6d3f..59f61b09a8 100644
@@ -38 +39 @@
-@@ -788,8 +788,6 @@ sfc_xstats_get_by_id(struct rte_eth_dev *dev, const uint64_t *ids,
+@@ -779,8 +779,6 @@ sfc_xstats_get_by_id(struct rte_eth_dev *dev, const uint64_t *ids,
@@ -47 +48 @@
-@@ -808,17 +806,19 @@ sfc_xstats_get_by_id(struct rte_eth_dev *dev, const uint64_t *ids,
+@@ -799,17 +797,19 @@ sfc_xstats_get_by_id(struct rte_eth_dev *dev, const uint64_t *ids,
@@ -75 +76 @@
-@@ -833,8 +833,7 @@ sfc_xstats_get_names_by_id(struct rte_eth_dev *dev,
+@@ -824,8 +824,7 @@ sfc_xstats_get_names_by_id(struct rte_eth_dev *dev,
@@ -85 +86 @@
-@@ -849,23 +848,24 @@ sfc_xstats_get_names_by_id(struct rte_eth_dev *dev,
+@@ -840,23 +839,24 @@ sfc_xstats_get_names_by_id(struct rte_eth_dev *dev,
@@ -121 +122 @@
-index cdc0f94f19..bb9e01d96b 100644
+index d876996826..817b412e29 100644
^ permalink raw reply [flat|nested] 208+ messages in thread
* [dpdk-stable] patch 'net/sfc: fix MAC stats update for stopped device' has been queued to stable release 20.11.3
2021-07-26 13:52 ` [dpdk-stable] patch 'net/bonding: fix error message on flow verify' " luca.boccassi
` (52 preceding siblings ...)
2021-07-26 13:53 ` [dpdk-stable] patch 'net/sfc: fix xstats query by unsorted list of IDs' " luca.boccassi
@ 2021-07-26 13:53 ` luca.boccassi
2021-07-26 13:53 ` [dpdk-stable] patch 'sched: fix profile allocation failure handling' " luca.boccassi
` (3 subsequent siblings)
57 siblings, 0 replies; 208+ messages in thread
From: luca.boccassi @ 2021-07-26 13:53 UTC (permalink / raw)
To: Ivan Ilchenko; +Cc: Andrew Rybchenko, Andy Moreton, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.3
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/28/21. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/0cd4f7ee81a9abab110aeef15703c6d7c6560244
Thanks.
Luca Boccassi
---
From 0cd4f7ee81a9abab110aeef15703c6d7c6560244 Mon Sep 17 00:00:00 2001
From: Ivan Ilchenko <ivan.ilchenko@oktetlabs.ru>
Date: Fri, 23 Jul 2021 16:15:11 +0300
Subject: [PATCH] net/sfc: fix MAC stats update for stopped device
[ upstream commit 1827b073ed47fbc8efedebecd61686a137e4433b ]
Return the latest stats snapshot in stopped state
instead of returning an error.
Fixes: 1caab2f1e68 ("net/sfc: add basic statistics")
Signed-off-by: Ivan Ilchenko <ivan.ilchenko@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Reviewed-by: Andy Moreton <amoreton@xilinx.com>
---
drivers/net/sfc/sfc.h | 2 +-
drivers/net/sfc/sfc_ethdev.c | 6 +++---
drivers/net/sfc/sfc_port.c | 11 +++++++----
3 files changed, 11 insertions(+), 8 deletions(-)
diff --git a/drivers/net/sfc/sfc.h b/drivers/net/sfc/sfc.h
index 6192ac89f8..9db465862b 100644
--- a/drivers/net/sfc/sfc.h
+++ b/drivers/net/sfc/sfc.h
@@ -399,7 +399,7 @@ int sfc_port_start(struct sfc_adapter *sa);
void sfc_port_stop(struct sfc_adapter *sa);
void sfc_port_link_mode_to_info(efx_link_mode_t link_mode,
struct rte_eth_link *link_info);
-int sfc_port_update_mac_stats(struct sfc_adapter *sa);
+int sfc_port_update_mac_stats(struct sfc_adapter *sa, boolean_t manual_update);
int sfc_port_reset_mac_stats(struct sfc_adapter *sa);
int sfc_set_rx_mode(struct sfc_adapter *sa);
int sfc_set_rx_mode_unchecked(struct sfc_adapter *sa);
diff --git a/drivers/net/sfc/sfc_ethdev.c b/drivers/net/sfc/sfc_ethdev.c
index 59f61b09a8..e6de2c30f7 100644
--- a/drivers/net/sfc/sfc_ethdev.c
+++ b/drivers/net/sfc/sfc_ethdev.c
@@ -606,7 +606,7 @@ sfc_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats)
sfc_adapter_lock(sa);
- ret = sfc_port_update_mac_stats(sa);
+ ret = sfc_port_update_mac_stats(sa, B_FALSE);
if (ret != 0)
goto unlock;
@@ -724,7 +724,7 @@ sfc_xstats_get(struct rte_eth_dev *dev, struct rte_eth_xstat *xstats,
sfc_adapter_lock(sa);
- rc = sfc_port_update_mac_stats(sa);
+ rc = sfc_port_update_mac_stats(sa, B_FALSE);
if (rc != 0) {
SFC_ASSERT(rc > 0);
nstats = -rc;
@@ -788,7 +788,7 @@ sfc_xstats_get_by_id(struct rte_eth_dev *dev, const uint64_t *ids,
sfc_adapter_lock(sa);
- rc = sfc_port_update_mac_stats(sa);
+ rc = sfc_port_update_mac_stats(sa, B_FALSE);
if (rc != 0) {
SFC_ASSERT(rc > 0);
ret = -rc;
diff --git a/drivers/net/sfc/sfc_port.c b/drivers/net/sfc/sfc_port.c
index 817b412e29..fc66430809 100644
--- a/drivers/net/sfc/sfc_port.c
+++ b/drivers/net/sfc/sfc_port.c
@@ -26,7 +26,8 @@
/**
* Update MAC statistics in the buffer.
*
- * @param sa Adapter
+ * @param sa Adapter
+ * @param force_upload Flag to upload MAC stats in any case
*
* @return Status code
* @retval 0 Success
@@ -34,7 +35,7 @@
* @retval ENOMEM Memory allocation failure
*/
int
-sfc_port_update_mac_stats(struct sfc_adapter *sa)
+sfc_port_update_mac_stats(struct sfc_adapter *sa, boolean_t force_upload)
{
struct sfc_port *port = &sa->port;
efsys_mem_t *esmp = &port->mac_stats_dma_mem;
@@ -46,14 +47,14 @@ sfc_port_update_mac_stats(struct sfc_adapter *sa)
SFC_ASSERT(sfc_adapter_is_locked(sa));
if (sa->state != SFC_ADAPTER_STARTED)
- return EINVAL;
+ return 0;
/*
* If periodic statistics DMA'ing is off or if not supported,
* make a manual request and keep an eye on timer if need be
*/
if (!port->mac_stats_periodic_dma_supported ||
- (port->mac_stats_update_period_ms == 0)) {
+ (port->mac_stats_update_period_ms == 0) || force_upload) {
if (port->mac_stats_update_period_ms != 0) {
uint64_t timestamp = sfc_get_system_msecs();
@@ -367,6 +368,8 @@ sfc_port_stop(struct sfc_adapter *sa)
(void)efx_mac_stats_periodic(sa->nic, &sa->port.mac_stats_dma_mem,
0, B_FALSE);
+ sfc_port_update_mac_stats(sa, B_TRUE);
+
efx_port_fini(sa->nic);
efx_filter_fini(sa->nic);
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-07-26 13:53:19.133876630 +0100
+++ 0055-net-sfc-fix-MAC-stats-update-for-stopped-device.patch 2021-07-26 13:53:15.965295061 +0100
@@ -1 +1 @@
-From 1827b073ed47fbc8efedebecd61686a137e4433b Mon Sep 17 00:00:00 2001
+From 0cd4f7ee81a9abab110aeef15703c6d7c6560244 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 1827b073ed47fbc8efedebecd61686a137e4433b ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -22 +23 @@
-index 972d32606d..1594f934ba 100644
+index 6192ac89f8..9db465862b 100644
@@ -25 +26 @@
-@@ -422,7 +422,7 @@ int sfc_port_start(struct sfc_adapter *sa);
+@@ -399,7 +399,7 @@ int sfc_port_start(struct sfc_adapter *sa);
@@ -35 +36 @@
-index ae9304f90f..bbc22723f6 100644
+index 59f61b09a8..e6de2c30f7 100644
@@ -38 +39 @@
-@@ -615,7 +615,7 @@ sfc_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats)
+@@ -606,7 +606,7 @@ sfc_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats)
@@ -47 +48 @@
-@@ -733,7 +733,7 @@ sfc_xstats_get(struct rte_eth_dev *dev, struct rte_eth_xstat *xstats,
+@@ -724,7 +724,7 @@ sfc_xstats_get(struct rte_eth_dev *dev, struct rte_eth_xstat *xstats,
@@ -56 +57 @@
-@@ -797,7 +797,7 @@ sfc_xstats_get_by_id(struct rte_eth_dev *dev, const uint64_t *ids,
+@@ -788,7 +788,7 @@ sfc_xstats_get_by_id(struct rte_eth_dev *dev, const uint64_t *ids,
@@ -66 +67 @@
-index bb9e01d96b..8c432c15f5 100644
+index 817b412e29..fc66430809 100644
^ permalink raw reply [flat|nested] 208+ messages in thread
* [dpdk-stable] patch 'sched: fix profile allocation failure handling' has been queued to stable release 20.11.3
2021-07-26 13:52 ` [dpdk-stable] patch 'net/bonding: fix error message on flow verify' " luca.boccassi
` (53 preceding siblings ...)
2021-07-26 13:53 ` [dpdk-stable] patch 'net/sfc: fix MAC stats update for stopped device' " luca.boccassi
@ 2021-07-26 13:53 ` luca.boccassi
2021-07-26 13:53 ` [dpdk-stable] patch 'sched: rework configuration " luca.boccassi
` (2 subsequent siblings)
57 siblings, 0 replies; 208+ messages in thread
From: luca.boccassi @ 2021-07-26 13:53 UTC (permalink / raw)
To: Huisong Li; +Cc: Min Hu, Cristian Dumitrescu, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.3
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/28/21. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/41a170fc81d6ca4ca9eb7ff6364fe5c4eaf95225
Thanks.
Luca Boccassi
---
From 41a170fc81d6ca4ca9eb7ff6364fe5c4eaf95225 Mon Sep 17 00:00:00 2001
From: Huisong Li <lihuisong@huawei.com>
Date: Fri, 23 Apr 2021 19:01:11 +0800
Subject: [PATCH] sched: fix profile allocation failure handling
[ upstream commit a042481ecd9e890b7fc088f9d2a3a6b6e82d3a4c ]
This patch fixes return value judgment when allocate memory to store the
subport profile, and releases memory of 'rte_sched_port' if code fails to
apply for this memory.
Fixes: 0ea4c6afcaf1 ("sched: add subport profile table")
Signed-off-by: Huisong Li <lihuisong@huawei.com>
Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
---
lib/librte_sched/rte_sched.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/lib/librte_sched/rte_sched.c b/lib/librte_sched/rte_sched.c
index cd87e688e4..df0ab5cab9 100644
--- a/lib/librte_sched/rte_sched.c
+++ b/lib/librte_sched/rte_sched.c
@@ -961,9 +961,9 @@ rte_sched_port_config(struct rte_sched_port_params *params)
/* Allocate memory to store the subport profile */
port->subport_profiles = rte_zmalloc_socket("subport_profile", size2,
RTE_CACHE_LINE_SIZE, params->socket);
- if (port == NULL) {
+ if (port->subport_profiles == NULL) {
RTE_LOG(ERR, SCHED, "%s: Memory allocation fails\n", __func__);
-
+ rte_free(port);
return NULL;
}
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-07-26 13:53:19.205641754 +0100
+++ 0056-sched-fix-profile-allocation-failure-handling.patch 2021-07-26 13:53:15.969295145 +0100
@@ -1 +1 @@
-From a042481ecd9e890b7fc088f9d2a3a6b6e82d3a4c Mon Sep 17 00:00:00 2001
+From 41a170fc81d6ca4ca9eb7ff6364fe5c4eaf95225 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit a042481ecd9e890b7fc088f9d2a3a6b6e82d3a4c ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -17 +18 @@
- lib/sched/rte_sched.c | 4 ++--
+ lib/librte_sched/rte_sched.c | 4 ++--
@@ -20 +21 @@
-diff --git a/lib/sched/rte_sched.c b/lib/sched/rte_sched.c
+diff --git a/lib/librte_sched/rte_sched.c b/lib/librte_sched/rte_sched.c
@@ -22,2 +23,2 @@
---- a/lib/sched/rte_sched.c
-+++ b/lib/sched/rte_sched.c
+--- a/lib/librte_sched/rte_sched.c
++++ b/lib/librte_sched/rte_sched.c
^ permalink raw reply [flat|nested] 208+ messages in thread
* [dpdk-stable] patch 'sched: rework configuration failure handling' has been queued to stable release 20.11.3
2021-07-26 13:52 ` [dpdk-stable] patch 'net/bonding: fix error message on flow verify' " luca.boccassi
` (54 preceding siblings ...)
2021-07-26 13:53 ` [dpdk-stable] patch 'sched: fix profile allocation failure handling' " luca.boccassi
@ 2021-07-26 13:53 ` luca.boccassi
2021-07-26 13:53 ` [dpdk-stable] patch 'app/testpmd: fix help string for port reset' " luca.boccassi
2021-07-26 13:53 ` [dpdk-stable] patch 'app/testpmd: fix MAC address after " luca.boccassi
57 siblings, 0 replies; 208+ messages in thread
From: luca.boccassi @ 2021-07-26 13:53 UTC (permalink / raw)
To: Huisong Li; +Cc: Min Hu, Cristian Dumitrescu, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.3
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/28/21. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/36c937ac722fe6dd55f2e3c2626bb77e16c88af6
Thanks.
Luca Boccassi
---
From 36c937ac722fe6dd55f2e3c2626bb77e16c88af6 Mon Sep 17 00:00:00 2001
From: Huisong Li <lihuisong@huawei.com>
Date: Fri, 23 Apr 2021 19:01:12 +0800
Subject: [PATCH] sched: rework configuration failure handling
[ upstream commit c6ccd1e3922ac346333a52e584d6c9fa7a43f237 ]
Currently, rte_sched_free_memory() is called multiple times by the
exception handling code in rte_sched_subport_config() and
rte_sched_pipe_config().
This patch optimizes them into a unified outlet to free memory.
Fixes: ac6fcb841b0f ("sched: update subport rate dynamically")
Fixes: 34a90f86657c ("sched: modify pipe functions for config flexibility")
Fixes: ce7c4fd7c2ac ("sched: add pipe config to subport level")
Signed-off-by: Huisong Li <lihuisong@huawei.com>
Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
---
lib/librte_sched/rte_sched.c | 56 +++++++++++++++++++-----------------
1 file changed, 30 insertions(+), 26 deletions(-)
diff --git a/lib/librte_sched/rte_sched.c b/lib/librte_sched/rte_sched.c
index df0ab5cab9..a858f61f95 100644
--- a/lib/librte_sched/rte_sched.c
+++ b/lib/librte_sched/rte_sched.c
@@ -1090,6 +1090,7 @@ rte_sched_subport_config(struct rte_sched_port *port,
uint32_t n_subport_pipe_queues, i;
uint32_t size0, size1, bmp_mem_size;
int status;
+ int ret;
/* Check user parameters */
if (port == NULL) {
@@ -1101,17 +1102,16 @@ rte_sched_subport_config(struct rte_sched_port *port,
if (subport_id >= port->n_subports_per_port) {
RTE_LOG(ERR, SCHED,
"%s: Incorrect value for subport id\n", __func__);
-
- rte_sched_free_memory(port, n_subports);
- return -EINVAL;
+ ret = -EINVAL;
+ goto out;
}
if (subport_profile_id >= port->n_max_subport_profiles) {
RTE_LOG(ERR, SCHED, "%s: "
"Number of subport profile exceeds the max limit\n",
__func__);
- rte_sched_free_memory(port, n_subports);
- return -EINVAL;
+ ret = -EINVAL;
+ goto out;
}
/** Memory is allocated only on first invocation of the api for a
@@ -1127,9 +1127,8 @@ rte_sched_subport_config(struct rte_sched_port *port,
RTE_LOG(NOTICE, SCHED,
"%s: Port scheduler params check failed (%d)\n",
__func__, status);
-
- rte_sched_free_memory(port, n_subports);
- return -EINVAL;
+ ret = -EINVAL;
+ goto out;
}
/* Determine the amount of memory to allocate */
@@ -1143,9 +1142,8 @@ rte_sched_subport_config(struct rte_sched_port *port,
if (s == NULL) {
RTE_LOG(ERR, SCHED,
"%s: Memory allocation fails\n", __func__);
-
- rte_sched_free_memory(port, n_subports);
- return -ENOMEM;
+ ret = -ENOMEM;
+ goto out;
}
n_subports++;
@@ -1185,12 +1183,11 @@ rte_sched_subport_config(struct rte_sched_port *port,
params->red_params[i][j].min_th,
params->red_params[i][j].max_th,
params->red_params[i][j].maxp_inv) != 0) {
- rte_sched_free_memory(port, n_subports);
-
RTE_LOG(NOTICE, SCHED,
"%s: RED configuration init fails\n",
__func__);
- return -EINVAL;
+ ret = -EINVAL;
+ goto out;
}
}
}
@@ -1238,9 +1235,8 @@ rte_sched_subport_config(struct rte_sched_port *port,
if (s->bmp == NULL) {
RTE_LOG(ERR, SCHED,
"%s: Subport bitmap init error\n", __func__);
-
- rte_sched_free_memory(port, n_subports);
- return -EINVAL;
+ ret = -EINVAL;
+ goto out;
}
for (i = 0; i < RTE_SCHED_PORT_N_GRINDERS; i++)
@@ -1285,6 +1281,11 @@ rte_sched_subport_config(struct rte_sched_port *port,
rte_sched_port_log_subport_profile(port, subport_profile_id);
return 0;
+
+out:
+ rte_sched_free_memory(port, n_subports);
+
+ return ret;
}
int
@@ -1299,6 +1300,7 @@ rte_sched_pipe_config(struct rte_sched_port *port,
struct rte_sched_pipe_profile *params;
uint32_t n_subports = subport_id + 1;
uint32_t deactivate, profile, i;
+ int ret;
/* Check user parameters */
profile = (uint32_t) pipe_profile;
@@ -1313,26 +1315,23 @@ rte_sched_pipe_config(struct rte_sched_port *port,
if (subport_id >= port->n_subports_per_port) {
RTE_LOG(ERR, SCHED,
"%s: Incorrect value for parameter subport id\n", __func__);
-
- rte_sched_free_memory(port, n_subports);
- return -EINVAL;
+ ret = -EINVAL;
+ goto out;
}
s = port->subports[subport_id];
if (pipe_id >= s->n_pipes_per_subport_enabled) {
RTE_LOG(ERR, SCHED,
"%s: Incorrect value for parameter pipe id\n", __func__);
-
- rte_sched_free_memory(port, n_subports);
- return -EINVAL;
+ ret = -EINVAL;
+ goto out;
}
if (!deactivate && profile >= s->n_pipe_profiles) {
RTE_LOG(ERR, SCHED,
"%s: Incorrect value for parameter pipe profile\n", __func__);
-
- rte_sched_free_memory(port, n_subports);
- return -EINVAL;
+ ret = -EINVAL;
+ goto out;
}
sp = port->subport_profiles + s->profile;
@@ -1406,6 +1405,11 @@ rte_sched_pipe_config(struct rte_sched_port *port,
}
return 0;
+
+out:
+ rte_sched_free_memory(port, n_subports);
+
+ return ret;
}
int
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-07-26 13:53:19.270538474 +0100
+++ 0057-sched-rework-configuration-failure-handling.patch 2021-07-26 13:53:15.969295145 +0100
@@ -1 +1 @@
-From c6ccd1e3922ac346333a52e584d6c9fa7a43f237 Mon Sep 17 00:00:00 2001
+From 36c937ac722fe6dd55f2e3c2626bb77e16c88af6 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit c6ccd1e3922ac346333a52e584d6c9fa7a43f237 ]
+
@@ -15 +16,0 @@
-Cc: stable@dpdk.org
@@ -21 +22 @@
- lib/sched/rte_sched.c | 56 +++++++++++++++++++++++--------------------
+ lib/librte_sched/rte_sched.c | 56 +++++++++++++++++++-----------------
@@ -24 +25 @@
-diff --git a/lib/sched/rte_sched.c b/lib/sched/rte_sched.c
+diff --git a/lib/librte_sched/rte_sched.c b/lib/librte_sched/rte_sched.c
@@ -26,2 +27,2 @@
---- a/lib/sched/rte_sched.c
-+++ b/lib/sched/rte_sched.c
+--- a/lib/librte_sched/rte_sched.c
++++ b/lib/librte_sched/rte_sched.c
^ permalink raw reply [flat|nested] 208+ messages in thread
* [dpdk-stable] patch 'app/testpmd: fix help string for port reset' has been queued to stable release 20.11.3
2021-07-26 13:52 ` [dpdk-stable] patch 'net/bonding: fix error message on flow verify' " luca.boccassi
` (55 preceding siblings ...)
2021-07-26 13:53 ` [dpdk-stable] patch 'sched: rework configuration " luca.boccassi
@ 2021-07-26 13:53 ` luca.boccassi
2021-07-26 13:53 ` [dpdk-stable] patch 'app/testpmd: fix MAC address after " luca.boccassi
57 siblings, 0 replies; 208+ messages in thread
From: luca.boccassi @ 2021-07-26 13:53 UTC (permalink / raw)
To: Ferruh Yigit; +Cc: Andrew Rybchenko, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.3
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/28/21. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/d0eebf4a009a1533b1d97e7f9b8932299e87ef46
Thanks.
Luca Boccassi
---
From d0eebf4a009a1533b1d97e7f9b8932299e87ef46 Mon Sep 17 00:00:00 2001
From: Ferruh Yigit <ferruh.yigit@intel.com>
Date: Fri, 23 Jul 2021 13:24:19 +0100
Subject: [PATCH] app/testpmd: fix help string for port reset
[ upstream commit a2db845cccf4aaab428fbff613a94e8e86418d41 ]
Command help string is missing 'reset' keyword,
although description has it. Adding it.
Fixes: 97f1e196799f ("app/testpmd: add port reset command")
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Reviewed-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
---
app/test-pmd/cmdline.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c
index 113e27b603..58ebff5502 100644
--- a/app/test-pmd/cmdline.c
+++ b/app/test-pmd/cmdline.c
@@ -1225,7 +1225,7 @@ cmdline_parse_token_string_t cmd_operate_port_all_all =
cmdline_parse_inst_t cmd_operate_port = {
.f = cmd_operate_port_parsed,
.data = NULL,
- .help_str = "port start|stop|close all: Start/Stop/Close/Reset all ports",
+ .help_str = "port start|stop|close|reset all: Start/Stop/Close/Reset all ports",
.tokens = {
(void *)&cmd_operate_port_all_cmd,
(void *)&cmd_operate_port_all_port,
@@ -1272,7 +1272,7 @@ cmdline_parse_token_num_t cmd_operate_specific_port_id =
cmdline_parse_inst_t cmd_operate_specific_port = {
.f = cmd_operate_specific_port_parsed,
.data = NULL,
- .help_str = "port start|stop|close <port_id>: Start/Stop/Close/Reset port_id",
+ .help_str = "port start|stop|close|reset <port_id>: Start/Stop/Close/Reset port_id",
.tokens = {
(void *)&cmd_operate_specific_port_cmd,
(void *)&cmd_operate_specific_port_port,
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-07-26 13:53:19.335772456 +0100
+++ 0058-app-testpmd-fix-help-string-for-port-reset.patch 2021-07-26 13:53:15.993295650 +0100
@@ -1 +1 @@
-From a2db845cccf4aaab428fbff613a94e8e86418d41 Mon Sep 17 00:00:00 2001
+From d0eebf4a009a1533b1d97e7f9b8932299e87ef46 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit a2db845cccf4aaab428fbff613a94e8e86418d41 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -19 +20 @@
-index 8468018cf3..905a6143eb 100644
+index 113e27b603..58ebff5502 100644
@@ -22 +23 @@
-@@ -1237,7 +1237,7 @@ cmdline_parse_token_string_t cmd_operate_port_all_all =
+@@ -1225,7 +1225,7 @@ cmdline_parse_token_string_t cmd_operate_port_all_all =
@@ -31 +32 @@
-@@ -1284,7 +1284,7 @@ cmdline_parse_token_num_t cmd_operate_specific_port_id =
+@@ -1272,7 +1272,7 @@ cmdline_parse_token_num_t cmd_operate_specific_port_id =
^ permalink raw reply [flat|nested] 208+ messages in thread
* [dpdk-stable] patch 'app/testpmd: fix MAC address after port reset' has been queued to stable release 20.11.3
2021-07-26 13:52 ` [dpdk-stable] patch 'net/bonding: fix error message on flow verify' " luca.boccassi
` (56 preceding siblings ...)
2021-07-26 13:53 ` [dpdk-stable] patch 'app/testpmd: fix help string for port reset' " luca.boccassi
@ 2021-07-26 13:53 ` luca.boccassi
2021-08-03 12:21 ` [dpdk-stable] patch 'net/virtio: report maximum MTU in device info' " luca.boccassi
57 siblings, 1 reply; 208+ messages in thread
From: luca.boccassi @ 2021-07-26 13:53 UTC (permalink / raw)
To: Yuying Zhang; +Cc: Aman Deep Singh, Xiaoyun Li, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.3
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/28/21. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/2f39890f4a7707e2a02c536fc40bb173bbf95da8
Thanks.
Luca Boccassi
---
From 2f39890f4a7707e2a02c536fc40bb173bbf95da8 Mon Sep 17 00:00:00 2001
From: Yuying Zhang <yuying.zhang@intel.com>
Date: Wed, 14 Jul 2021 02:20:27 +0000
Subject: [PATCH] app/testpmd: fix MAC address after port reset
[ upstream commit 5ffc4a2acadad427f2f9ddf8e072632764ad2d47 ]
MAC address of each port in global variable ports hasn't been updated
after resetting. It was the initial one after resetting VF MAC address.
This patch gets correct port MAC address when starting port.
Fixes: a5279d25616d ("app/testpmd: check status of getting MAC address")
Signed-off-by: Yuying Zhang <yuying.zhang@intel.com>
Acked-by: Aman Deep Singh <aman.deep.singh@intel.com>
Acked-by: Xiaoyun Li <xiaoyun.li@intel.com>
---
app/test-pmd/testpmd.c | 12 +++++++-----
1 file changed, 7 insertions(+), 5 deletions(-)
diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c
index c442bcc5ff..5288c04ab6 100644
--- a/app/test-pmd/testpmd.c
+++ b/app/test-pmd/testpmd.c
@@ -2414,7 +2414,6 @@ start_port(portid_t pid)
int peer_pi;
queueid_t qi;
struct rte_port *port;
- struct rte_ether_addr mac_addr;
struct rte_eth_hairpin_cap cap;
if (port_id_is_invalid(pid, ENABLED_WARN))
@@ -2583,11 +2582,14 @@ start_port(portid_t pid)
RTE_PORT_HANDLING, RTE_PORT_STARTED) == 0)
printf("Port %d can not be set into started\n", pi);
- if (eth_macaddr_get_print_err(pi, &mac_addr) == 0)
+ if (eth_macaddr_get_print_err(pi, &port->eth_addr) == 0)
printf("Port %d: %02X:%02X:%02X:%02X:%02X:%02X\n", pi,
- mac_addr.addr_bytes[0], mac_addr.addr_bytes[1],
- mac_addr.addr_bytes[2], mac_addr.addr_bytes[3],
- mac_addr.addr_bytes[4], mac_addr.addr_bytes[5]);
+ port->eth_addr.addr_bytes[0],
+ port->eth_addr.addr_bytes[1],
+ port->eth_addr.addr_bytes[2],
+ port->eth_addr.addr_bytes[3],
+ port->eth_addr.addr_bytes[4],
+ port->eth_addr.addr_bytes[5]);
/* at least one port started, need checking link status */
need_check_link_status = 1;
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-07-26 13:53:19.421484539 +0100
+++ 0059-app-testpmd-fix-MAC-address-after-port-reset.patch 2021-07-26 13:53:15.997295734 +0100
@@ -1 +1 @@
-From 5ffc4a2acadad427f2f9ddf8e072632764ad2d47 Mon Sep 17 00:00:00 2001
+From 2f39890f4a7707e2a02c536fc40bb173bbf95da8 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 5ffc4a2acadad427f2f9ddf8e072632764ad2d47 ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -21 +22 @@
-index a48f70962f..37aba40272 100644
+index c442bcc5ff..5288c04ab6 100644
@@ -24 +25 @@
-@@ -2441,7 +2441,6 @@ start_port(portid_t pid)
+@@ -2414,7 +2414,6 @@ start_port(portid_t pid)
@@ -32 +33 @@
-@@ -2612,11 +2611,14 @@ start_port(portid_t pid)
+@@ -2583,11 +2582,14 @@ start_port(portid_t pid)
^ permalink raw reply [flat|nested] 208+ messages in thread
* [dpdk-stable] patch 'net/virtio: report maximum MTU in device info' has been queued to stable release 20.11.3
2021-07-26 13:53 ` [dpdk-stable] patch 'app/testpmd: fix MAC address after " luca.boccassi
@ 2021-08-03 12:21 ` luca.boccassi
2021-08-03 12:21 ` [dpdk-stable] patch 'vhost: fix crash on reconnect' " luca.boccassi
` (23 more replies)
0 siblings, 24 replies; 208+ messages in thread
From: luca.boccassi @ 2021-08-03 12:21 UTC (permalink / raw)
To: Ivan Ilchenko; +Cc: Andrew Rybchenko, Maxime Coquelin, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.3
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/05/21. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/47d67fb4bbf1a7361438cf55d7465f57ca86924c
Thanks.
Luca Boccassi
---
From 47d67fb4bbf1a7361438cf55d7465f57ca86924c Mon Sep 17 00:00:00 2001
From: Ivan Ilchenko <ivan.ilchenko@oktetlabs.ru>
Date: Wed, 21 Jul 2021 12:22:25 +0300
Subject: [PATCH] net/virtio: report maximum MTU in device info
[ upstream commit 11d7bc9ff074dc5e37dd9ab51bb365669d08c3d6 ]
Fix the driver to report maximum MTU obtained from config if
VIRTIO_NET_F_MTU is supported or calculated based on maximum
Rx packet length.
Fixes: ad97ceece12c ("ethdev: add min/max MTU to device info")
Signed-off-by: Ivan Ilchenko <ivan.ilchenko@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
---
drivers/net/virtio/virtio_ethdev.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/net/virtio/virtio_ethdev.c b/drivers/net/virtio/virtio_ethdev.c
index 25810cc8db..f87c931d13 100644
--- a/drivers/net/virtio/virtio_ethdev.c
+++ b/drivers/net/virtio/virtio_ethdev.c
@@ -2694,6 +2694,7 @@ virtio_dev_info_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info)
dev_info->min_rx_bufsize = VIRTIO_MIN_RX_BUFSIZE;
dev_info->max_rx_pktlen = VIRTIO_MAX_RX_PKTLEN;
dev_info->max_mac_addrs = VIRTIO_MAX_MAC_ADDRS;
+ dev_info->max_mtu = hw->max_mtu;
host_features = VTPCI_OPS(hw)->get_features(hw);
dev_info->rx_offload_capa = DEV_RX_OFFLOAD_VLAN_STRIP;
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-08-03 12:35:08.287963444 +0100
+++ 0001-net-virtio-report-maximum-MTU-in-device-info.patch 2021-08-03 12:35:08.162817690 +0100
@@ -1 +1 @@
-From 11d7bc9ff074dc5e37dd9ab51bb365669d08c3d6 Mon Sep 17 00:00:00 2001
+From 47d67fb4bbf1a7361438cf55d7465f57ca86924c Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 11d7bc9ff074dc5e37dd9ab51bb365669d08c3d6 ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -21 +22 @@
-index 72d3dda71f..a4adeec5ab 100644
+index 25810cc8db..f87c931d13 100644
@@ -24 +25 @@
-@@ -2504,6 +2504,7 @@ virtio_dev_info_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info)
+@@ -2694,6 +2694,7 @@ virtio_dev_info_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info)
@@ -30 +31 @@
- host_features = VIRTIO_OPS(hw)->get_features(hw);
+ host_features = VTPCI_OPS(hw)->get_features(hw);
^ permalink raw reply [flat|nested] 208+ messages in thread
* [dpdk-stable] patch 'vhost: fix crash on reconnect' has been queued to stable release 20.11.3
2021-08-03 12:21 ` [dpdk-stable] patch 'net/virtio: report maximum MTU in device info' " luca.boccassi
@ 2021-08-03 12:21 ` luca.boccassi
2021-08-03 12:21 ` [dpdk-stable] patch 'net/virtio: fix interrupt handle leak' " luca.boccassi
` (22 subsequent siblings)
23 siblings, 0 replies; 208+ messages in thread
From: luca.boccassi @ 2021-08-03 12:21 UTC (permalink / raw)
To: Maxime Coquelin; +Cc: Yinan Wang, Chenbo Xia, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.3
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/05/21. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/dc023498c91589402aa09462c279ae14684aee66
Thanks.
Luca Boccassi
---
From dc023498c91589402aa09462c279ae14684aee66 Mon Sep 17 00:00:00 2001
From: Maxime Coquelin <maxime.coquelin@redhat.com>
Date: Mon, 26 Jul 2021 09:58:14 +0200
Subject: [PATCH] vhost: fix crash on reconnect
[ upstream commit 3c929a0bb3e7addc5103227bff126b8b9dd952ef ]
When the vhost-user frontend like Virtio-user tries to
reconnect to the restarted Vhost backend, the Vhost backend
segfaults when multiqueue is enabled.
This is caused by VHOST_USER_GET_VRING_BASE being called for
a virtqueue that has not been created before, causing a NULL
pointer dereferencing.
This patch adds the VHOST_USER_GET_VRING_BASE requests to
the list of requests that trigger queue pair allocations.
Fixes: 160cbc815b41 ("vhost: remove a hack on queue allocation")
Reported-by: Yinan Wang <yinan.wang@intel.com>
Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Tested-by: Yinan Wang <yinan.wang@intel.com>
Reviewed-by: Chenbo Xia <chenbo.xia@intel.com>
---
lib/librte_vhost/vhost_user.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/lib/librte_vhost/vhost_user.c b/lib/librte_vhost/vhost_user.c
index 9b1a6d7697..8a2a3e9ab5 100644
--- a/lib/librte_vhost/vhost_user.c
+++ b/lib/librte_vhost/vhost_user.c
@@ -2677,6 +2677,7 @@ vhost_user_check_and_alloc_queue_pair(struct virtio_net *dev,
break;
case VHOST_USER_SET_VRING_NUM:
case VHOST_USER_SET_VRING_BASE:
+ case VHOST_USER_GET_VRING_BASE:
case VHOST_USER_SET_VRING_ENABLE:
vring_idx = msg->payload.state.index;
break;
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-08-03 12:35:08.318681630 +0100
+++ 0002-vhost-fix-crash-on-reconnect.patch 2021-08-03 12:35:08.166817770 +0100
@@ -1 +1 @@
-From 3c929a0bb3e7addc5103227bff126b8b9dd952ef Mon Sep 17 00:00:00 2001
+From dc023498c91589402aa09462c279ae14684aee66 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 3c929a0bb3e7addc5103227bff126b8b9dd952ef ]
+
@@ -18 +19,0 @@
-Cc: stable@dpdk.org
@@ -25 +26 @@
- lib/vhost/vhost_user.c | 1 +
+ lib/librte_vhost/vhost_user.c | 1 +
@@ -28,5 +29,5 @@
-diff --git a/lib/vhost/vhost_user.c b/lib/vhost/vhost_user.c
-index 433f412fa8..29a4c9af60 100644
---- a/lib/vhost/vhost_user.c
-+++ b/lib/vhost/vhost_user.c
-@@ -2796,6 +2796,7 @@ 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 9b1a6d7697..8a2a3e9ab5 100644
+--- a/lib/librte_vhost/vhost_user.c
++++ b/lib/librte_vhost/vhost_user.c
+@@ -2677,6 +2677,7 @@ vhost_user_check_and_alloc_queue_pair(struct virtio_net *dev,
^ permalink raw reply [flat|nested] 208+ messages in thread
* [dpdk-stable] patch 'net/virtio: fix interrupt handle leak' has been queued to stable release 20.11.3
2021-08-03 12:21 ` [dpdk-stable] patch 'net/virtio: report maximum MTU in device info' " luca.boccassi
2021-08-03 12:21 ` [dpdk-stable] patch 'vhost: fix crash on reconnect' " luca.boccassi
@ 2021-08-03 12:21 ` luca.boccassi
2021-08-03 12:21 ` [dpdk-stable] patch 'net/virtio: fix default duplex mode' " luca.boccassi
` (21 subsequent siblings)
23 siblings, 0 replies; 208+ messages in thread
From: luca.boccassi @ 2021-08-03 12:21 UTC (permalink / raw)
To: Gaoxiang Liu; +Cc: Chenbo Xia, Maxime Coquelin, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.3
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/05/21. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/f21bc78175084b36743acc375a8242fd16859fe6
Thanks.
Luca Boccassi
---
From f21bc78175084b36743acc375a8242fd16859fe6 Mon Sep 17 00:00:00 2001
From: Gaoxiang Liu <liugaoxiang@huawei.com>
Date: Mon, 26 Jul 2021 22:42:05 +0800
Subject: [PATCH] net/virtio: fix interrupt handle leak
[ upstream commit 7b9195154926b808e3ae23750eaff3e81cd5f529 ]
Free memory of interrupt handle in virtio_user_dev_uninit() to
avoid memory leak.
when virtio user dev closes, memory of interrupt handle is not freed
that is allocated in virtio_user_fill_intr_handle().
Fixes: 3d4fb6fd2505 ("net/virtio-user: support Rx interrupt")
Signed-off-by: Gaoxiang Liu <liugaoxiang@huawei.com>
Reviewed-by: Chenbo Xia <chenbo.xia@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
---
drivers/net/virtio/virtio_user/virtio_user_dev.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/drivers/net/virtio/virtio_user/virtio_user_dev.c b/drivers/net/virtio/virtio_user/virtio_user_dev.c
index 202431ca22..e93e1919ab 100644
--- a/drivers/net/virtio/virtio_user/virtio_user_dev.c
+++ b/drivers/net/virtio/virtio_user/virtio_user_dev.c
@@ -599,6 +599,12 @@ void
virtio_user_dev_uninit(struct virtio_user_dev *dev)
{
uint32_t i;
+ struct rte_eth_dev *eth_dev = &rte_eth_devices[dev->port_id];
+
+ if (eth_dev->intr_handle) {
+ free(eth_dev->intr_handle);
+ eth_dev->intr_handle = NULL;
+ }
virtio_user_stop_device(dev);
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-08-03 12:35:08.357143647 +0100
+++ 0003-net-virtio-fix-interrupt-handle-leak.patch 2021-08-03 12:35:08.166817770 +0100
@@ -1 +1 @@
-From 7b9195154926b808e3ae23750eaff3e81cd5f529 Mon Sep 17 00:00:00 2001
+From f21bc78175084b36743acc375a8242fd16859fe6 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 7b9195154926b808e3ae23750eaff3e81cd5f529 ]
+
@@ -12 +13,0 @@
-Cc: stable@dpdk.org
@@ -18,2 +19,2 @@
- drivers/net/virtio/virtio_user/virtio_user_dev.c | 7 +++++++
- 1 file changed, 7 insertions(+)
+ drivers/net/virtio/virtio_user/virtio_user_dev.c | 6 ++++++
+ 1 file changed, 6 insertions(+)
@@ -22 +23 @@
-index 1cd1e95f45..16c58710d7 100644
+index 202431ca22..e93e1919ab 100644
@@ -25,2 +26 @@
-@@ -654,6 +654,13 @@ virtio_user_dev_init(struct virtio_user_dev *dev, char *path, int queues,
- void
+@@ -599,6 +599,12 @@ void
@@ -29 +29,2 @@
-+ struct rte_eth_dev *eth_dev = &rte_eth_devices[dev->hw.port_id];
+ uint32_t i;
++ struct rte_eth_dev *eth_dev = &rte_eth_devices[dev->port_id];
@@ -35 +36 @@
-+
+
@@ -38 +38,0 @@
- rte_mem_event_callback_unregister(VIRTIO_USER_MEM_EVENT_CLB_NAME, dev);
^ permalink raw reply [flat|nested] 208+ messages in thread
* [dpdk-stable] patch 'net/virtio: fix default duplex mode' has been queued to stable release 20.11.3
2021-08-03 12:21 ` [dpdk-stable] patch 'net/virtio: report maximum MTU in device info' " luca.boccassi
2021-08-03 12:21 ` [dpdk-stable] patch 'vhost: fix crash on reconnect' " luca.boccassi
2021-08-03 12:21 ` [dpdk-stable] patch 'net/virtio: fix interrupt handle leak' " luca.boccassi
@ 2021-08-03 12:21 ` luca.boccassi
2021-08-03 12:21 ` [dpdk-stable] patch 'net/iavf: fix Tx threshold check' " luca.boccassi
` (20 subsequent siblings)
23 siblings, 0 replies; 208+ messages in thread
From: luca.boccassi @ 2021-08-03 12:21 UTC (permalink / raw)
To: Chenbo Xia; +Cc: Maxime Coquelin, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.3
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/05/21. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/13ac5a51019ce36dd5de8a83d2298f54de487888
Thanks.
Luca Boccassi
---
From 13ac5a51019ce36dd5de8a83d2298f54de487888 Mon Sep 17 00:00:00 2001
From: Chenbo Xia <chenbo.xia@intel.com>
Date: Tue, 27 Jul 2021 13:14:41 +0800
Subject: [PATCH] net/virtio: fix default duplex mode
[ upstream commit 1e9221ae38dddb4abe75a7b3afaecbaa4b8e0523 ]
When virtio front-end initializes, the duplex mode should be set
unknown before reading any duplex mode information from configuration
space. This patch fixes the issue that duplex mode is by default set
to zero, which equals ETH_LINK_HALF_DUPLEX. This will lead to duplex
mode being half duplex when front-end does not have the feature
named VIRTIO_NET_F_SPEED_DUPLEX.
Fixes: 1357b4b36246 ("net/virtio: support Virtio link speed feature")
Signed-off-by: Chenbo Xia <chenbo.xia@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
---
drivers/net/virtio/virtio_ethdev.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/net/virtio/virtio_ethdev.c b/drivers/net/virtio/virtio_ethdev.c
index f87c931d13..520f3fde54 100644
--- a/drivers/net/virtio/virtio_ethdev.c
+++ b/drivers/net/virtio/virtio_ethdev.c
@@ -1994,6 +1994,7 @@ eth_virtio_dev_init(struct rte_eth_dev *eth_dev)
if (ret < 0)
return ret;
hw->speed = speed;
+ hw->duplex = DUPLEX_UNKNOWN;
/* Allocate memory for storing MAC addresses */
eth_dev->data->mac_addrs = rte_zmalloc("virtio",
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-08-03 12:35:08.394240586 +0100
+++ 0004-net-virtio-fix-default-duplex-mode.patch 2021-08-03 12:35:08.170817850 +0100
@@ -1 +1 @@
-From 1e9221ae38dddb4abe75a7b3afaecbaa4b8e0523 Mon Sep 17 00:00:00 2001
+From 13ac5a51019ce36dd5de8a83d2298f54de487888 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 1e9221ae38dddb4abe75a7b3afaecbaa4b8e0523 ]
+
@@ -14 +15,0 @@
-Cc: stable@dpdk.org
@@ -23 +24 @@
-index a4adeec5ab..e58085a2c9 100644
+index f87c931d13..520f3fde54 100644
@@ -26 +27 @@
-@@ -1901,6 +1901,7 @@ eth_virtio_dev_init(struct rte_eth_dev *eth_dev)
+@@ -1994,6 +1994,7 @@ eth_virtio_dev_init(struct rte_eth_dev *eth_dev)
^ permalink raw reply [flat|nested] 208+ messages in thread
* [dpdk-stable] patch 'net/iavf: fix Tx threshold check' has been queued to stable release 20.11.3
2021-08-03 12:21 ` [dpdk-stable] patch 'net/virtio: report maximum MTU in device info' " luca.boccassi
` (2 preceding siblings ...)
2021-08-03 12:21 ` [dpdk-stable] patch 'net/virtio: fix default duplex mode' " luca.boccassi
@ 2021-08-03 12:21 ` luca.boccassi
2021-08-03 12:21 ` [dpdk-stable] patch 'net/mlx5: fix representor interrupt handler' " luca.boccassi
` (19 subsequent siblings)
23 siblings, 0 replies; 208+ messages in thread
From: luca.boccassi @ 2021-08-03 12:21 UTC (permalink / raw)
To: Xiaoyun Li; +Cc: Beilei Xing, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.3
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/05/21. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/ad67a31e0aa52d74cf6be335feff169c615dbfc0
Thanks.
Luca Boccassi
---
From ad67a31e0aa52d74cf6be335feff169c615dbfc0 Mon Sep 17 00:00:00 2001
From: Xiaoyun Li <xiaoyun.li@intel.com>
Date: Thu, 22 Jul 2021 15:56:20 +0800
Subject: [PATCH] net/iavf: fix Tx threshold check
[ upstream commit ed21e06e44ad7fe5dfa4b8ed713e29833a474fa9 ]
Function check_tx_thresh is called with wrong parameter. If the
check fails, tx_queue_setup should return error not keep going.
This patch fixes above issues.
Fixes: 69dd4c3d0898 ("net/avf: enable queue and device")
Signed-off-by: Xiaoyun Li <xiaoyun.li@intel.com>
Acked-by: Beilei Xing <beilei.xing@intel.com>
---
drivers/net/iavf/iavf_rxtx.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/net/iavf/iavf_rxtx.c b/drivers/net/iavf/iavf_rxtx.c
index e3206e4fbb..e1108af7a9 100644
--- a/drivers/net/iavf/iavf_rxtx.c
+++ b/drivers/net/iavf/iavf_rxtx.c
@@ -647,7 +647,8 @@ iavf_dev_tx_queue_setup(struct rte_eth_dev *dev,
tx_conf->tx_rs_thresh : DEFAULT_TX_RS_THRESH);
tx_free_thresh = (uint16_t)((tx_conf->tx_free_thresh) ?
tx_conf->tx_free_thresh : DEFAULT_TX_FREE_THRESH);
- check_tx_thresh(nb_desc, tx_rs_thresh, tx_rs_thresh);
+ if (check_tx_thresh(nb_desc, tx_rs_thresh, tx_free_thresh) != 0)
+ return -EINVAL;
/* Free memory if needed. */
if (dev->data->tx_queues[queue_idx]) {
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-08-03 12:35:08.433543564 +0100
+++ 0005-net-iavf-fix-Tx-threshold-check.patch 2021-08-03 12:35:08.174817930 +0100
@@ -1 +1 @@
-From ed21e06e44ad7fe5dfa4b8ed713e29833a474fa9 Mon Sep 17 00:00:00 2001
+From ad67a31e0aa52d74cf6be335feff169c615dbfc0 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit ed21e06e44ad7fe5dfa4b8ed713e29833a474fa9 ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -20 +21 @@
-index d61b32fcee..e33fe4576b 100644
+index e3206e4fbb..e1108af7a9 100644
@@ -23 +24 @@
-@@ -708,7 +708,8 @@ iavf_dev_tx_queue_setup(struct rte_eth_dev *dev,
+@@ -647,7 +647,8 @@ iavf_dev_tx_queue_setup(struct rte_eth_dev *dev,
^ permalink raw reply [flat|nested] 208+ messages in thread
* [dpdk-stable] patch 'net/mlx5: fix representor interrupt handler' has been queued to stable release 20.11.3
2021-08-03 12:21 ` [dpdk-stable] patch 'net/virtio: report maximum MTU in device info' " luca.boccassi
` (3 preceding siblings ...)
2021-08-03 12:21 ` [dpdk-stable] patch 'net/iavf: fix Tx threshold check' " luca.boccassi
@ 2021-08-03 12:21 ` luca.boccassi
2021-08-03 12:21 ` [dpdk-stable] patch 'net/mlx5: fix queue leaking in hairpin auto bind check' " luca.boccassi
` (18 subsequent siblings)
23 siblings, 0 replies; 208+ messages in thread
From: luca.boccassi @ 2021-08-03 12:21 UTC (permalink / raw)
To: Gregory Etelson; +Cc: Viacheslav Ovsiienko, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.3
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/05/21. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/3003560e240031c57a11a034357a9aecb82f85d0
Thanks.
Luca Boccassi
---
From 3003560e240031c57a11a034357a9aecb82f85d0 Mon Sep 17 00:00:00 2001
From: Gregory Etelson <getelson@nvidia.com>
Date: Tue, 20 Jul 2021 18:38:19 +0300
Subject: [PATCH] net/mlx5: fix representor interrupt handler
[ upstream commit 494d6863c2464838e8ee65b9a7d3d108145ae08d ]
In mlx5 PMD the PCI device interrupt vector was used by Uplink
representor exclusively and other VF representors did not support
interrupt mode.
All the VFs and Uplink representors are separate ethernet devices
and must have dedicated interrupt vectors.
The fix provides each representor with a dedicated interrupt
vector.
Fixes: 5882bde88da2 ("net/mlx5: fix representor interrupts handler")
Signed-off-by: Gregory Etelson <getelson@nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
---
drivers/net/mlx5/linux/mlx5_os.c | 25 +++++++++++++++++++++++++
drivers/net/mlx5/mlx5.c | 5 +++++
drivers/net/mlx5/mlx5_rxq.c | 6 ------
3 files changed, 30 insertions(+), 6 deletions(-)
diff --git a/drivers/net/mlx5/linux/mlx5_os.c b/drivers/net/mlx5/linux/mlx5_os.c
index e25d6ffe22..44af6f1c4e 100644
--- a/drivers/net/mlx5/linux/mlx5_os.c
+++ b/drivers/net/mlx5/linux/mlx5_os.c
@@ -2166,6 +2166,31 @@ mlx5_os_pci_probe(struct rte_pci_driver *pci_drv __rte_unused,
}
restore = list[i].eth_dev->data->dev_flags;
rte_eth_copy_pci_info(list[i].eth_dev, pci_dev);
+ /**
+ * Each representor has a dedicated interrupts vector.
+ * rte_eth_copy_pci_info() assigns PF interrupts handle to
+ * representor eth_dev object because representor and PF
+ * share the same PCI address.
+ * Override representor device with a dedicated
+ * interrupts handle here.
+ * Representor interrupts handle is released in mlx5_dev_stop().
+ */
+ if (list[i].info.representor) {
+ struct rte_intr_handle *intr_handle;
+ intr_handle = mlx5_malloc(MLX5_MEM_SYS | MLX5_MEM_ZERO,
+ sizeof(*intr_handle), 0,
+ SOCKET_ID_ANY);
+ if (!intr_handle) {
+ DRV_LOG(ERR,
+ "port %u failed to allocate memory for interrupt handler "
+ "Rx interrupts will not be supported",
+ i);
+ rte_errno = ENOMEM;
+ ret = -rte_errno;
+ goto exit;
+ }
+ list[i].eth_dev->intr_handle = intr_handle;
+ }
/* Restore non-PCI flags cleared by the above call. */
list[i].eth_dev->data->dev_flags |= restore;
rte_eth_dev_probing_finish(list[i].eth_dev);
diff --git a/drivers/net/mlx5/mlx5.c b/drivers/net/mlx5/mlx5.c
index 7953a27834..bf37e5eaeb 100644
--- a/drivers/net/mlx5/mlx5.c
+++ b/drivers/net/mlx5/mlx5.c
@@ -1335,6 +1335,11 @@ mlx5_dev_close(struct rte_eth_dev *dev)
priv->rxqs_n = 0;
priv->rxqs = NULL;
}
+ if (priv->representor) {
+ /* Each representor has a dedicated interrupts handler */
+ mlx5_free(dev->intr_handle);
+ dev->intr_handle = NULL;
+ }
if (priv->txqs != NULL) {
/* XXX race condition if mlx5_tx_burst() is still running. */
usleep(1000);
diff --git a/drivers/net/mlx5/mlx5_rxq.c b/drivers/net/mlx5/mlx5_rxq.c
index 002df27ab4..b5268df57d 100644
--- a/drivers/net/mlx5/mlx5_rxq.c
+++ b/drivers/net/mlx5/mlx5_rxq.c
@@ -904,9 +904,6 @@ mlx5_rx_intr_vec_enable(struct rte_eth_dev *dev)
unsigned int count = 0;
struct rte_intr_handle *intr_handle = dev->intr_handle;
- /* Representor shares dev->intr_handle with PF. */
- if (priv->representor)
- return 0;
if (!dev->data->dev_conf.intr_conf.rxq)
return 0;
mlx5_rx_intr_vec_disable(dev);
@@ -987,9 +984,6 @@ mlx5_rx_intr_vec_disable(struct rte_eth_dev *dev)
unsigned int rxqs_n = priv->rxqs_n;
unsigned int n = RTE_MIN(rxqs_n, (uint32_t)RTE_MAX_RXTX_INTR_VEC_ID);
- /* Representor shares dev->intr_handle with PF. */
- if (priv->representor)
- return;
if (!dev->data->dev_conf.intr_conf.rxq)
return;
if (!intr_handle->intr_vec)
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-08-03 12:35:08.471811608 +0100
+++ 0006-net-mlx5-fix-representor-interrupt-handler.patch 2021-08-03 12:35:08.186818169 +0100
@@ -1 +1 @@
-From 494d6863c2464838e8ee65b9a7d3d108145ae08d Mon Sep 17 00:00:00 2001
+From 3003560e240031c57a11a034357a9aecb82f85d0 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 494d6863c2464838e8ee65b9a7d3d108145ae08d ]
+
@@ -15 +16,0 @@
-Cc: stable@dpdk.org
@@ -26 +27 @@
-index 4712bd6f9b..14a3b912cc 100644
+index e25d6ffe22..44af6f1c4e 100644
@@ -29 +30 @@
-@@ -2525,6 +2525,31 @@ mlx5_os_pci_probe_pf(struct rte_pci_device *pci_dev,
+@@ -2166,6 +2166,31 @@ mlx5_os_pci_probe(struct rte_pci_driver *pci_drv __rte_unused,
@@ -62 +63 @@
-index f68c7693c7..90990ffdc2 100644
+index 7953a27834..bf37e5eaeb 100644
@@ -65 +66 @@
-@@ -1580,6 +1580,11 @@ mlx5_dev_close(struct rte_eth_dev *dev)
+@@ -1335,6 +1335,11 @@ mlx5_dev_close(struct rte_eth_dev *dev)
@@ -76 +77 @@
- rte_delay_us_sleep(1000);
+ usleep(1000);
@@ -78 +79 @@
-index 49165f482e..abd8ce7989 100644
+index 002df27ab4..b5268df57d 100644
@@ -81 +82 @@
-@@ -834,9 +834,6 @@ mlx5_rx_intr_vec_enable(struct rte_eth_dev *dev)
+@@ -904,9 +904,6 @@ mlx5_rx_intr_vec_enable(struct rte_eth_dev *dev)
@@ -91 +92 @@
-@@ -917,9 +914,6 @@ mlx5_rx_intr_vec_disable(struct rte_eth_dev *dev)
+@@ -987,9 +984,6 @@ mlx5_rx_intr_vec_disable(struct rte_eth_dev *dev)
^ permalink raw reply [flat|nested] 208+ messages in thread
* [dpdk-stable] patch 'net/mlx5: fix queue leaking in hairpin auto bind check' has been queued to stable release 20.11.3
2021-08-03 12:21 ` [dpdk-stable] patch 'net/virtio: report maximum MTU in device info' " luca.boccassi
` (4 preceding siblings ...)
2021-08-03 12:21 ` [dpdk-stable] patch 'net/mlx5: fix representor interrupt handler' " luca.boccassi
@ 2021-08-03 12:21 ` luca.boccassi
2021-08-03 12:21 ` [dpdk-stable] patch 'net/mlx5: fix RSS flow rule with L4 mismatch' " luca.boccassi
` (17 subsequent siblings)
23 siblings, 0 replies; 208+ messages in thread
From: luca.boccassi @ 2021-08-03 12:21 UTC (permalink / raw)
To: Bing Zhao; +Cc: Viacheslav Ovsiienko, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.3
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/05/21. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/f67d7c848e2d9124197326cbed5616ac11f1a705
Thanks.
Luca Boccassi
---
From f67d7c848e2d9124197326cbed5616ac11f1a705 Mon Sep 17 00:00:00 2001
From: Bing Zhao <bingz@nvidia.com>
Date: Sat, 24 Jul 2021 16:27:11 +0300
Subject: [PATCH] net/mlx5: fix queue leaking in hairpin auto bind check
[ upstream commit 75f166c20ffca1dd28184f8196fbfe90ebafb6ac ]
During the start up stage, the hairpin auto bind was executed for
each port. All the Tx and Rx queues configured for this port should
be checked to confirm if the auto bind of hairpin is needed.
1. The queue is hairpin queue.
2. The peer port is the same one and the peer queue should also be
with hairpin type.
3. The manual bind attribute is not set for this queue.
If the queue is not a hairpin queue or it doesn't need to be bound
automatically, the reference count should be decreased by 1 since
the count was increased when calling the mlx5_*xq_get().
When the peer port is not the same, it means that no auto bind is
supported and the mlx5_*xq_release() was missed in the current
implementation.
By calling the release function before continue, the count is
correct when calling the device close.
Fixes: aa8bea0e3455 ("net/mlx5: add conditional hairpin auto bind")
Signed-off-by: Bing Zhao <bingz@nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
---
drivers/net/mlx5/mlx5_trigger.c | 14 ++++++--------
1 file changed, 6 insertions(+), 8 deletions(-)
diff --git a/drivers/net/mlx5/mlx5_trigger.c b/drivers/net/mlx5/mlx5_trigger.c
index 0c267dce06..33a98ee50c 100644
--- a/drivers/net/mlx5/mlx5_trigger.c
+++ b/drivers/net/mlx5/mlx5_trigger.c
@@ -226,12 +226,11 @@ mlx5_hairpin_auto_bind(struct rte_eth_dev *dev)
txq_ctrl = mlx5_txq_get(dev, i);
if (!txq_ctrl)
continue;
- if (txq_ctrl->type != MLX5_TXQ_TYPE_HAIRPIN) {
+ if (txq_ctrl->type != MLX5_TXQ_TYPE_HAIRPIN ||
+ txq_ctrl->hairpin_conf.peers[0].port != self_port) {
mlx5_txq_release(dev, i);
continue;
}
- if (txq_ctrl->hairpin_conf.peers[0].port != self_port)
- continue;
if (txq_ctrl->hairpin_conf.manual_bind) {
mlx5_txq_release(dev, i);
return 0;
@@ -245,13 +244,12 @@ mlx5_hairpin_auto_bind(struct rte_eth_dev *dev)
txq_ctrl = mlx5_txq_get(dev, i);
if (!txq_ctrl)
continue;
- if (txq_ctrl->type != MLX5_TXQ_TYPE_HAIRPIN) {
- mlx5_txq_release(dev, i);
- continue;
- }
/* Skip hairpin queues with other peer ports. */
- if (txq_ctrl->hairpin_conf.peers[0].port != self_port)
+ if (txq_ctrl->type != MLX5_TXQ_TYPE_HAIRPIN ||
+ txq_ctrl->hairpin_conf.peers[0].port != self_port) {
+ mlx5_txq_release(dev, i);
continue;
+ }
if (!txq_ctrl->obj) {
rte_errno = ENOMEM;
DRV_LOG(ERR, "port %u no txq object found: %d",
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-08-03 12:35:08.514105892 +0100
+++ 0007-net-mlx5-fix-queue-leaking-in-hairpin-auto-bind-chec.patch 2021-08-03 12:35:08.186818169 +0100
@@ -1 +1 @@
-From 75f166c20ffca1dd28184f8196fbfe90ebafb6ac Mon Sep 17 00:00:00 2001
+From f67d7c848e2d9124197326cbed5616ac11f1a705 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 75f166c20ffca1dd28184f8196fbfe90ebafb6ac ]
+
@@ -25 +26,0 @@
-Cc: stable@dpdk.org
@@ -34 +35 @@
-index a9d5d58fd9..54173bfacb 100644
+index 0c267dce06..33a98ee50c 100644
@@ -37 +38 @@
-@@ -228,12 +228,11 @@ mlx5_hairpin_auto_bind(struct rte_eth_dev *dev)
+@@ -226,12 +226,11 @@ mlx5_hairpin_auto_bind(struct rte_eth_dev *dev)
@@ -52 +53 @@
-@@ -247,13 +246,12 @@ mlx5_hairpin_auto_bind(struct rte_eth_dev *dev)
+@@ -245,13 +244,12 @@ mlx5_hairpin_auto_bind(struct rte_eth_dev *dev)
^ permalink raw reply [flat|nested] 208+ messages in thread
* [dpdk-stable] patch 'net/mlx5: fix RSS flow rule with L4 mismatch' has been queued to stable release 20.11.3
2021-08-03 12:21 ` [dpdk-stable] patch 'net/virtio: report maximum MTU in device info' " luca.boccassi
` (5 preceding siblings ...)
2021-08-03 12:21 ` [dpdk-stable] patch 'net/mlx5: fix queue leaking in hairpin auto bind check' " luca.boccassi
@ 2021-08-03 12:21 ` luca.boccassi
2021-08-03 12:21 ` [dpdk-stable] patch 'net/mlx5: fix default queue number in RSS flow rule' " luca.boccassi
` (16 subsequent siblings)
23 siblings, 0 replies; 208+ messages in thread
From: luca.boccassi @ 2021-08-03 12:21 UTC (permalink / raw)
To: Lior Margalit; +Cc: Matan Azrad, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.3
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/05/21. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/38779aa845b795564285908359db7e7318fffa98
Thanks.
Luca Boccassi
---
From 38779aa845b795564285908359db7e7318fffa98 Mon Sep 17 00:00:00 2001
From: Lior Margalit <lmargalit@nvidia.com>
Date: Tue, 27 Jul 2021 09:46:19 +0300
Subject: [PATCH] net/mlx5: fix RSS flow rule with L4 mismatch
[ upstream commit 5e1db76dd8c740629ef0e9569099bf67a3cbbf9d ]
The RSS hash types defined in the API do not support setting the L4 proto
type (TCP or UDP) without setting the L3 proto. For example, ETH_RSS_TCP
is defined as
(ETH_RSS_NONFRAG_IPV4_TCP | \
ETH_RSS_NONFRAG_IPV6_TCP | \
ETH_RSS_IPV6_TCP_EX).
The L3 proto of the RSS hash type may be different than the one defined
in the pattern, for example:
testpmd> flow create .../ ipv4 / tcp / end actions rss types ipv6-tcp-ex
end / end
If the RSS hash type also includes L4 proto type as in the above example,
the selection flags for the RX hash are currently set with SPORT/DPORT
without setting SRC/DST IP. As this combination is not supported, it does
not match any of the pre-created TIRs of the indirect RSS action
and the flow creation fails.
The fix is to prevent setting the selection flags for the RX hash with
SPORT/DPORT without setting SRC/DST IP. It applies non-RSS processing of
the received packets. In case of indirect RSS action, it will match the
MLX5_RSS_HASH_NONE pre-created TIR.
Fixes: b1d63d829378 ("net/mlx5: support RSS on src or dst fields only")
Fixes: 4a78c88e3bae ("net/mlx5: fix Verbs flow tunnel")
Signed-off-by: Lior Margalit <lmargalit@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
---
drivers/net/mlx5/mlx5_flow_dv.c | 12 +++++++++---
drivers/net/mlx5/mlx5_flow_verbs.c | 10 ++++++----
2 files changed, 15 insertions(+), 7 deletions(-)
diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c
index 3e5c8d3af9..2a86b03bf9 100644
--- a/drivers/net/mlx5/mlx5_flow_dv.c
+++ b/drivers/net/mlx5/mlx5_flow_dv.c
@@ -8616,10 +8616,8 @@ flow_dv_hashfields_set(struct mlx5_flow *dev_flow,
dev_flow->hash_fields = 0;
#ifdef HAVE_IBV_DEVICE_TUNNEL_SUPPORT
- if (rss_desc->level >= 2) {
- dev_flow->hash_fields |= IBV_RX_HASH_INNER;
+ if (rss_desc->level >= 2)
rss_inner = 1;
- }
#endif
if ((rss_inner && (items & MLX5_FLOW_LAYER_INNER_L3_IPV4)) ||
(!rss_inner && (items & MLX5_FLOW_LAYER_OUTER_L3_IPV4))) {
@@ -8642,6 +8640,12 @@ flow_dv_hashfields_set(struct mlx5_flow *dev_flow,
dev_flow->hash_fields |= MLX5_IPV6_IBV_RX_HASH;
}
}
+ if (dev_flow->hash_fields == 0)
+ /*
+ * There is no match between the RSS types and the
+ * L3 protocol (IPv4/IPv6) defined in the flow rule.
+ */
+ return;
if ((rss_inner && (items & MLX5_FLOW_LAYER_INNER_L4_UDP)) ||
(!rss_inner && (items & MLX5_FLOW_LAYER_OUTER_L4_UDP))) {
if (rss_types & ETH_RSS_UDP) {
@@ -8667,6 +8671,8 @@ flow_dv_hashfields_set(struct mlx5_flow *dev_flow,
dev_flow->hash_fields |= MLX5_TCP_IBV_RX_HASH;
}
}
+ if (rss_inner)
+ dev_flow->hash_fields |= IBV_RX_HASH_INNER;
}
/**
diff --git a/drivers/net/mlx5/mlx5_flow_verbs.c b/drivers/net/mlx5/mlx5_flow_verbs.c
index bd060e9d44..afe973019b 100644
--- a/drivers/net/mlx5/mlx5_flow_verbs.c
+++ b/drivers/net/mlx5/mlx5_flow_verbs.c
@@ -1811,8 +1811,9 @@ flow_verbs_translate(struct rte_eth_dev *dev,
flow_verbs_translate_item_tcp(dev_flow, items,
item_flags);
subpriority = MLX5_PRIORITY_MAP_L4;
- dev_flow->hash_fields |=
- mlx5_flow_hashfields_adjust
+ if (dev_flow->hash_fields != 0)
+ dev_flow->hash_fields |=
+ mlx5_flow_hashfields_adjust
(rss_desc, tunnel, ETH_RSS_TCP,
(IBV_RX_HASH_SRC_PORT_TCP |
IBV_RX_HASH_DST_PORT_TCP));
@@ -1823,8 +1824,9 @@ flow_verbs_translate(struct rte_eth_dev *dev,
flow_verbs_translate_item_udp(dev_flow, items,
item_flags);
subpriority = MLX5_PRIORITY_MAP_L4;
- dev_flow->hash_fields |=
- mlx5_flow_hashfields_adjust
+ if (dev_flow->hash_fields != 0)
+ dev_flow->hash_fields |=
+ mlx5_flow_hashfields_adjust
(rss_desc, tunnel, ETH_RSS_UDP,
(IBV_RX_HASH_SRC_PORT_UDP |
IBV_RX_HASH_DST_PORT_UDP));
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-08-03 12:35:08.551663693 +0100
+++ 0008-net-mlx5-fix-RSS-flow-rule-with-L4-mismatch.patch 2021-08-03 12:35:08.202818489 +0100
@@ -1 +1 @@
-From 5e1db76dd8c740629ef0e9569099bf67a3cbbf9d Mon Sep 17 00:00:00 2001
+From 38779aa845b795564285908359db7e7318fffa98 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 5e1db76dd8c740629ef0e9569099bf67a3cbbf9d ]
+
@@ -31 +32,0 @@
-Cc: stable@dpdk.org
@@ -41 +42 @@
-index 736227bc0c..0538c8565c 100644
+index 3e5c8d3af9..2a86b03bf9 100644
@@ -44 +45 @@
-@@ -10896,10 +10896,8 @@ flow_dv_hashfields_set(struct mlx5_flow *dev_flow,
+@@ -8616,10 +8616,8 @@ flow_dv_hashfields_set(struct mlx5_flow *dev_flow,
@@ -56 +57 @@
-@@ -10922,6 +10920,12 @@ flow_dv_hashfields_set(struct mlx5_flow *dev_flow,
+@@ -8642,6 +8640,12 @@ flow_dv_hashfields_set(struct mlx5_flow *dev_flow,
@@ -69 +70 @@
-@@ -10947,6 +10951,8 @@ flow_dv_hashfields_set(struct mlx5_flow *dev_flow,
+@@ -8667,6 +8671,8 @@ flow_dv_hashfields_set(struct mlx5_flow *dev_flow,
@@ -79 +80 @@
-index 7b3d0b320d..a36b8adf6b 100644
+index bd060e9d44..afe973019b 100644
@@ -82 +83 @@
-@@ -1821,8 +1821,9 @@ flow_verbs_translate(struct rte_eth_dev *dev,
+@@ -1811,8 +1811,9 @@ flow_verbs_translate(struct rte_eth_dev *dev,
@@ -94 +95 @@
-@@ -1833,8 +1834,9 @@ flow_verbs_translate(struct rte_eth_dev *dev,
+@@ -1823,8 +1824,9 @@ flow_verbs_translate(struct rte_eth_dev *dev,
^ permalink raw reply [flat|nested] 208+ messages in thread
* [dpdk-stable] patch 'net/mlx5: fix default queue number in RSS flow rule' has been queued to stable release 20.11.3
2021-08-03 12:21 ` [dpdk-stable] patch 'net/virtio: report maximum MTU in device info' " luca.boccassi
` (6 preceding siblings ...)
2021-08-03 12:21 ` [dpdk-stable] patch 'net/mlx5: fix RSS flow rule with L4 mismatch' " luca.boccassi
@ 2021-08-03 12:21 ` luca.boccassi
2021-08-03 12:21 ` [dpdk-stable] patch 'net/mlx5: fix flow engine type in function name' " luca.boccassi
` (15 subsequent siblings)
23 siblings, 0 replies; 208+ messages in thread
From: luca.boccassi @ 2021-08-03 12:21 UTC (permalink / raw)
To: Lior Margalit; +Cc: Matan Azrad, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.3
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/05/21. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/4ac789fddc852fc8d33eba4f04ff54ec854ca279
Thanks.
Luca Boccassi
---
From 4ac789fddc852fc8d33eba4f04ff54ec854ca279 Mon Sep 17 00:00:00 2001
From: Lior Margalit <lmargalit@nvidia.com>
Date: Tue, 27 Jul 2021 09:46:20 +0300
Subject: [PATCH] net/mlx5: fix default queue number in RSS flow rule
[ upstream commit 4a5a1e6b624e46f24b13d095e35a9b8699bd59b9 ]
The selection flags for the RX hash define how the received packets will
be distributed between multiple queues.
When creating a new TIR, the queue_num is set to 1 if none of the selection
flags is set.
Applied the same to the RSS desc before checking if it matches a cached
TIR object to save creating a new object every time.
Fixes: fabf8a37241c ("net/mlx5: fix shared RSS action release")
Signed-off-by: Lior Margalit <lmargalit@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
---
drivers/net/mlx5/mlx5_flow_dv.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c
index 2a86b03bf9..5b2e1a9f07 100644
--- a/drivers/net/mlx5/mlx5_flow_dv.c
+++ b/drivers/net/mlx5/mlx5_flow_dv.c
@@ -8705,6 +8705,8 @@ flow_dv_hrxq_prepare(struct rte_eth_dev *dev,
rss_desc->hash_fields = dev_flow->hash_fields;
rss_desc->tunnel = !!(dh->layers & MLX5_FLOW_LAYER_TUNNEL);
rss_desc->shared_rss = 0;
+ if (rss_desc->hash_fields == 0)
+ rss_desc->queue_num = 1;
*hrxq_idx = mlx5_hrxq_get(dev, rss_desc);
if (!*hrxq_idx)
return NULL;
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-08-03 12:35:08.603686799 +0100
+++ 0009-net-mlx5-fix-default-queue-number-in-RSS-flow-rule.patch 2021-08-03 12:35:08.214818729 +0100
@@ -1 +1 @@
-From 4a5a1e6b624e46f24b13d095e35a9b8699bd59b9 Mon Sep 17 00:00:00 2001
+From 4ac789fddc852fc8d33eba4f04ff54ec854ca279 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 4a5a1e6b624e46f24b13d095e35a9b8699bd59b9 ]
+
@@ -15 +16,0 @@
-Cc: stable@dpdk.org
@@ -24 +25 @@
-index 0538c8565c..7f07e3d800 100644
+index 2a86b03bf9..5b2e1a9f07 100644
@@ -27 +28 @@
-@@ -10985,6 +10985,8 @@ flow_dv_hrxq_prepare(struct rte_eth_dev *dev,
+@@ -8705,6 +8705,8 @@ flow_dv_hrxq_prepare(struct rte_eth_dev *dev,
^ permalink raw reply [flat|nested] 208+ messages in thread
* [dpdk-stable] patch 'net/mlx5: fix flow engine type in function name' has been queued to stable release 20.11.3
2021-08-03 12:21 ` [dpdk-stable] patch 'net/virtio: report maximum MTU in device info' " luca.boccassi
` (7 preceding siblings ...)
2021-08-03 12:21 ` [dpdk-stable] patch 'net/mlx5: fix default queue number in RSS flow rule' " luca.boccassi
@ 2021-08-03 12:21 ` luca.boccassi
2021-08-03 12:22 ` [dpdk-stable] patch 'net/mlx5: fix timestamp initialization on empty clock queue' " luca.boccassi
` (14 subsequent siblings)
23 siblings, 0 replies; 208+ messages in thread
From: luca.boccassi @ 2021-08-03 12:21 UTC (permalink / raw)
To: Asaf Penso; +Cc: Matan Azrad, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.3
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/05/21. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/0564825638aed4fa7461b05b366fba474ecd61dd
Thanks.
Luca Boccassi
---
From 0564825638aed4fa7461b05b366fba474ecd61dd Mon Sep 17 00:00:00 2001
From: Asaf Penso <asafp@nvidia.com>
Date: Wed, 28 Jul 2021 12:39:46 +0300
Subject: [PATCH] net/mlx5: fix flow engine type in function name
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
[ upstream commit e3db2250656883a4de037d3e702187b5dc5b7bfb ]
The concrete function names have a prefix for flow_dv.
This emphasizes the flow engine is Direct Verbs.
The function flow_get_aged_flows doesn’t have this prefix.
It creates an inconsistency with the other functions.
Update the function name to include dv.
Fixes: fa2d01c87d2 ("net/mlx5: support flow aging")
Signed-off-by: Asaf Penso <asafp@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
---
drivers/net/mlx5/mlx5_flow_dv.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c
index 5b2e1a9f07..1b9637ac44 100644
--- a/drivers/net/mlx5/mlx5_flow_dv.c
+++ b/drivers/net/mlx5/mlx5_flow_dv.c
@@ -12716,7 +12716,7 @@ flow_dv_counter_query(struct rte_eth_dev *dev, uint32_t counter, bool clear,
* @note: only stub for now
*/
static int
-flow_get_aged_flows(struct rte_eth_dev *dev,
+flow_dv_get_aged_flows(struct rte_eth_dev *dev,
void **context,
uint32_t nb_contexts,
struct rte_flow_error *error)
@@ -12864,7 +12864,7 @@ const struct mlx5_flow_driver_ops mlx5_flow_dv_drv_ops = {
.counter_alloc = flow_dv_counter_allocate,
.counter_free = flow_dv_counter_free,
.counter_query = flow_dv_counter_query,
- .get_aged_flows = flow_get_aged_flows,
+ .get_aged_flows = flow_dv_get_aged_flows,
.action_validate = flow_dv_action_validate,
.action_create = flow_dv_action_create,
.action_destroy = flow_dv_action_destroy,
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-08-03 12:35:08.654137616 +0100
+++ 0010-net-mlx5-fix-flow-engine-type-in-function-name.patch 2021-08-03 12:35:08.230819049 +0100
@@ -1 +1 @@
-From e3db2250656883a4de037d3e702187b5dc5b7bfb Mon Sep 17 00:00:00 2001
+From 0564825638aed4fa7461b05b366fba474ecd61dd Mon Sep 17 00:00:00 2001
@@ -8,0 +9,2 @@
+[ upstream commit e3db2250656883a4de037d3e702187b5dc5b7bfb ]
+
@@ -18 +19,0 @@
-Cc: stable@dpdk.org
@@ -27 +28 @@
-index 7f07e3d800..2de6b4f9e2 100644
+index 5b2e1a9f07..1b9637ac44 100644
@@ -30 +31 @@
-@@ -17239,7 +17239,7 @@ flow_dv_counter_query(struct rte_eth_dev *dev, uint32_t counter, bool clear,
+@@ -12716,7 +12716,7 @@ flow_dv_counter_query(struct rte_eth_dev *dev, uint32_t counter, bool clear,
@@ -39 +40 @@
-@@ -17862,7 +17862,7 @@ const struct mlx5_flow_driver_ops mlx5_flow_dv_drv_ops = {
+@@ -12864,7 +12864,7 @@ const struct mlx5_flow_driver_ops mlx5_flow_dv_drv_ops = {
^ permalink raw reply [flat|nested] 208+ messages in thread
* [dpdk-stable] patch 'net/mlx5: fix timestamp initialization on empty clock queue' has been queued to stable release 20.11.3
2021-08-03 12:21 ` [dpdk-stable] patch 'net/virtio: report maximum MTU in device info' " luca.boccassi
` (8 preceding siblings ...)
2021-08-03 12:21 ` [dpdk-stable] patch 'net/mlx5: fix flow engine type in function name' " luca.boccassi
@ 2021-08-03 12:22 ` luca.boccassi
2021-08-03 12:22 ` [dpdk-stable] patch 'net/mlx5: add Tx scheduling check on queue creation' " luca.boccassi
` (13 subsequent siblings)
23 siblings, 0 replies; 208+ messages in thread
From: luca.boccassi @ 2021-08-03 12:22 UTC (permalink / raw)
To: Viacheslav Ovsiienko; +Cc: dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.3
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/05/21. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/f46e2c750ac23a6c6f53b64c99c76a6c02111971
Thanks.
Luca Boccassi
---
From f46e2c750ac23a6c6f53b64c99c76a6c02111971 Mon Sep 17 00:00:00 2001
From: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
Date: Wed, 28 Jul 2021 17:23:35 +0300
Subject: [PATCH] net/mlx5: fix timestamp initialization on empty clock queue
[ upstream commit dab07e489cd5be47a017e0b8558b3fe3ee03b979 ]
The committing completions by clock queue might be delayed
after queue initialization is done and the only Clock Queue
completion entry (CQE) might keep the invalid status till
the CQE first update happens.
The mlx5_txpp_update_timestamp() wrongly recognized invalid
status as error and reported about lost synchronization.
The patch recognizes the invalid status as "not updated yet"
and accurate scheduling initialization routine waits till
CQE first update happens.
Some collateral typos in comment are fixed as well.
Fixes: 77522be0a56d ("net/mlx5: introduce clock queue service routine")
Signed-off-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
---
drivers/net/mlx5/mlx5_txpp.c | 21 +++++++++++++++------
1 file changed, 15 insertions(+), 6 deletions(-)
diff --git a/drivers/net/mlx5/mlx5_txpp.c b/drivers/net/mlx5/mlx5_txpp.c
index 72b0690913..cf11048160 100644
--- a/drivers/net/mlx5/mlx5_txpp.c
+++ b/drivers/net/mlx5/mlx5_txpp.c
@@ -676,8 +676,8 @@ mlx5_atomic_read_cqe(rte_int128_t *from, rte_int128_t *ts)
{
/*
* The only CQE of Clock Queue is being continuously
- * update by hardware with soecified rate. We have to
- * read timestump and WQE completion index atomically.
+ * updated by hardware with specified rate. We must
+ * read timestamp and WQE completion index atomically.
*/
#if defined(RTE_ARCH_X86_64)
rte_int128_t src;
@@ -738,15 +738,24 @@ mlx5_txpp_update_timestamp(struct mlx5_dev_ctx_shared *sh)
} to;
uint64_t ts;
uint16_t ci;
+ uint8_t opcode;
static_assert(sizeof(struct mlx5_cqe_ts) == sizeof(rte_int128_t),
"Wrong timestamp CQE part size");
mlx5_atomic_read_cqe((rte_int128_t *)&cqe->timestamp, &to.u128);
- if (to.cts.op_own >> 4) {
- DRV_LOG(DEBUG, "Clock Queue error sync lost.");
- __atomic_fetch_add(&sh->txpp.err_clock_queue,
+ opcode = MLX5_CQE_OPCODE(to.cts.op_own);
+ if (opcode) {
+ if (opcode != MLX5_CQE_INVALID) {
+ /*
+ * Commit the error state if and only if
+ * we have got at least one actual completion.
+ */
+ DRV_LOG(DEBUG,
+ "Clock Queue error sync lost (%X).", opcode);
+ __atomic_fetch_add(&sh->txpp.err_clock_queue,
1, __ATOMIC_RELAXED);
- sh->txpp.sync_lost = 1;
+ sh->txpp.sync_lost = 1;
+ }
return;
}
ci = rte_be_to_cpu_16(to.cts.wqe_counter);
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-08-03 12:35:08.701055993 +0100
+++ 0011-net-mlx5-fix-timestamp-initialization-on-empty-clock.patch 2021-08-03 12:35:08.230819049 +0100
@@ -1 +1 @@
-From dab07e489cd5be47a017e0b8558b3fe3ee03b979 Mon Sep 17 00:00:00 2001
+From f46e2c750ac23a6c6f53b64c99c76a6c02111971 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit dab07e489cd5be47a017e0b8558b3fe3ee03b979 ]
+
@@ -21 +22,0 @@
-Cc: stable@dpdk.org
@@ -29 +30 @@
-index d90399afb5..4f6da9f2d1 100644
+index 72b0690913..cf11048160 100644
@@ -32 +33 @@
-@@ -530,8 +530,8 @@ mlx5_atomic_read_cqe(rte_int128_t *from, rte_int128_t *ts)
+@@ -676,8 +676,8 @@ mlx5_atomic_read_cqe(rte_int128_t *from, rte_int128_t *ts)
@@ -43 +44 @@
-@@ -592,13 +592,22 @@ mlx5_txpp_update_timestamp(struct mlx5_dev_ctx_shared *sh)
+@@ -738,15 +738,24 @@ mlx5_txpp_update_timestamp(struct mlx5_dev_ctx_shared *sh)
@@ -48,0 +50,2 @@
+ static_assert(sizeof(struct mlx5_cqe_ts) == sizeof(rte_int128_t),
+ "Wrong timestamp CQE part size");
^ permalink raw reply [flat|nested] 208+ messages in thread
* [dpdk-stable] patch 'net/mlx5: add Tx scheduling check on queue creation' has been queued to stable release 20.11.3
2021-08-03 12:21 ` [dpdk-stable] patch 'net/virtio: report maximum MTU in device info' " luca.boccassi
` (9 preceding siblings ...)
2021-08-03 12:22 ` [dpdk-stable] patch 'net/mlx5: fix timestamp initialization on empty clock queue' " luca.boccassi
@ 2021-08-03 12:22 ` luca.boccassi
2021-08-03 12:22 ` [dpdk-stable] patch 'net/ena: enable multi-segment in Tx offload flags' " luca.boccassi
` (12 subsequent siblings)
23 siblings, 0 replies; 208+ messages in thread
From: luca.boccassi @ 2021-08-03 12:22 UTC (permalink / raw)
To: Viacheslav Ovsiienko; +Cc: dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.3
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/05/21. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/72f6920480c65b060059431c91f807f0c4a831a2
Thanks.
Luca Boccassi
---
From 72f6920480c65b060059431c91f807f0c4a831a2 Mon Sep 17 00:00:00 2001
From: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
Date: Thu, 29 Jul 2021 15:26:43 +0300
Subject: [PATCH] net/mlx5: add Tx scheduling check on queue creation
[ upstream commit f17e4b4ffef9ecf2547ad8ee628e94db8f561b2f ]
The send scheduling on timestamp offload requires the Send
Queue (SQ) shares its User Access Region (UAR) with the
pacing Clock Queue. The SQ can be created by mlx5 PMD either
with DevX or with Verbs. If the SQ is being created with
DevX, the dedicated UAR can be specified and all the SQs
share the single UAR. Once SQ is being created with Verbs
the SQ's UAR is allocated by the rdma-core library internally
on its own and there is no UAR sharing. This caused hardware
errors on WAIT WQEs and overall send scheduling malfunction.
If SQs are going to be created with Verbs and the send
scheduling offload is explicitly requested via tx_pp devarg
the device probing is rejected as device configuration
can't satisfy the requirements.
Fixes: 3ec73abeed52 ("net/mlx5/linux: fix Tx queue operations decision")
Fixes: 8f848f32fc24 ("net/mlx5: introduce send scheduling devargs")
Signed-off-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
---
drivers/net/mlx5/linux/mlx5_os.c | 15 +++++++++++++++
1 file changed, 15 insertions(+)
diff --git a/drivers/net/mlx5/linux/mlx5_os.c b/drivers/net/mlx5/linux/mlx5_os.c
index 44af6f1c4e..b191fd740e 100644
--- a/drivers/net/mlx5/linux/mlx5_os.c
+++ b/drivers/net/mlx5/linux/mlx5_os.c
@@ -1507,6 +1507,21 @@ err_secondary:
} else {
priv->obj_ops = ibv_obj_ops;
}
+ if (config->tx_pp &&
+ (priv->config.dv_esw_en ||
+ priv->obj_ops.txq_obj_new != mlx5_os_txq_obj_new)) {
+ /*
+ * HAVE_MLX5DV_DEVX_UAR_OFFSET is required to support
+ * packet pacing and already checked above.
+ * Hence, we should only make sure the SQs will be created
+ * with DevX, not with Verbs.
+ * Verbs allocates the SQ UAR on its own and it can't be shared
+ * with Clock Queue UAR as required for Tx scheduling.
+ */
+ DRV_LOG(ERR, "Verbs SQs, UAR can't be shared as required for packet pacing");
+ err = ENODEV;
+ goto error;
+ }
priv->drop_queue.hrxq = mlx5_drop_action_create(eth_dev);
if (!priv->drop_queue.hrxq)
goto error;
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-08-03 12:35:08.736171576 +0100
+++ 0012-net-mlx5-add-Tx-scheduling-check-on-queue-creation.patch 2021-08-03 12:35:08.234819128 +0100
@@ -1 +1 @@
-From f17e4b4ffef9ecf2547ad8ee628e94db8f561b2f Mon Sep 17 00:00:00 2001
+From 72f6920480c65b060059431c91f807f0c4a831a2 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit f17e4b4ffef9ecf2547ad8ee628e94db8f561b2f ]
+
@@ -23 +24,0 @@
-Cc: stable@dpdk.org
@@ -31 +32 @@
-index 14a3b912cc..8f98cf1716 100644
+index 44af6f1c4e..b191fd740e 100644
@@ -34 +35 @@
-@@ -1778,6 +1778,21 @@ err_secondary:
+@@ -1507,6 +1507,21 @@ err_secondary:
^ permalink raw reply [flat|nested] 208+ messages in thread
* [dpdk-stable] patch 'net/ena: enable multi-segment in Tx offload flags' has been queued to stable release 20.11.3
2021-08-03 12:21 ` [dpdk-stable] patch 'net/virtio: report maximum MTU in device info' " luca.boccassi
` (10 preceding siblings ...)
2021-08-03 12:22 ` [dpdk-stable] patch 'net/mlx5: add Tx scheduling check on queue creation' " luca.boccassi
@ 2021-08-03 12:22 ` luca.boccassi
2021-08-03 12:22 ` [dpdk-stable] patch 'net/memif: fix abstract socket address length' " luca.boccassi
` (11 subsequent siblings)
23 siblings, 0 replies; 208+ messages in thread
From: luca.boccassi @ 2021-08-03 12:22 UTC (permalink / raw)
To: Ghalem Boudour; +Cc: Olivier Matz, Michal Krawczyk, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.3
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/05/21. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/62a186761fd05e022682e5c89c1bffd032cf2480
Thanks.
Luca Boccassi
---
From 62a186761fd05e022682e5c89c1bffd032cf2480 Mon Sep 17 00:00:00 2001
From: Ghalem Boudour <ghalem.boudour@6wind.com>
Date: Fri, 30 Jul 2021 10:34:41 +0200
Subject: [PATCH] net/ena: enable multi-segment in Tx offload flags
[ upstream commit 3e7008459df969611fb7aa3b885a949515ac0b49 ]
The DPDK ENA driver does not provide multi-segment tx offload capability.
Let's add DEV_TX_OFFLOAD_MULTI_SEGS to ports offload capability by
default, and always set it in dev->data->dev_conf.txmode.offload.
This flag in not listed in doc/guides/nics/features/default.ini, so
ena.ini does not need to be updated.
Fixes: 1173fca25af9 ("ena: add polling-mode driver")
Signed-off-by: Ghalem Boudour <ghalem.boudour@6wind.com>
Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Acked-by: Michal Krawczyk <mk@semihalf.com>
---
drivers/net/ena/ena_ethdev.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/net/ena/ena_ethdev.c b/drivers/net/ena/ena_ethdev.c
index 06fb99182c..3f2c979f52 100644
--- a/drivers/net/ena/ena_ethdev.c
+++ b/drivers/net/ena/ena_ethdev.c
@@ -1963,6 +1963,7 @@ static int ena_dev_configure(struct rte_eth_dev *dev)
if (dev->data->dev_conf.rxmode.mq_mode & ETH_MQ_RX_RSS_FLAG)
dev->data->dev_conf.rxmode.offloads |= DEV_RX_OFFLOAD_RSS_HASH;
+ dev->data->dev_conf.txmode.offloads |= DEV_TX_OFFLOAD_MULTI_SEGS;
adapter->tx_selected_offloads = dev->data->dev_conf.txmode.offloads;
adapter->rx_selected_offloads = dev->data->dev_conf.rxmode.offloads;
@@ -2037,6 +2038,7 @@ static int ena_infos_get(struct rte_eth_dev *dev,
DEV_RX_OFFLOAD_TCP_CKSUM;
rx_feat |= DEV_RX_OFFLOAD_JUMBO_FRAME;
+ tx_feat |= DEV_TX_OFFLOAD_MULTI_SEGS;
/* Inform framework about available features */
dev_info->rx_offload_capa = rx_feat;
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-08-03 12:35:08.771744670 +0100
+++ 0013-net-ena-enable-multi-segment-in-Tx-offload-flags.patch 2021-08-03 12:35:08.234819128 +0100
@@ -1 +1 @@
-From 3e7008459df969611fb7aa3b885a949515ac0b49 Mon Sep 17 00:00:00 2001
+From 62a186761fd05e022682e5c89c1bffd032cf2480 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 3e7008459df969611fb7aa3b885a949515ac0b49 ]
+
@@ -14 +15,0 @@
-Cc: stable@dpdk.org
@@ -24 +25 @@
-index 14f776b5ad..4cebf60a68 100644
+index 06fb99182c..3f2c979f52 100644
@@ -27 +28 @@
-@@ -1856,6 +1856,7 @@ static int ena_dev_configure(struct rte_eth_dev *dev)
+@@ -1963,6 +1963,7 @@ static int ena_dev_configure(struct rte_eth_dev *dev)
@@ -35 +36 @@
-@@ -1930,6 +1931,7 @@ static int ena_infos_get(struct rte_eth_dev *dev,
+@@ -2037,6 +2038,7 @@ static int ena_infos_get(struct rte_eth_dev *dev,
^ permalink raw reply [flat|nested] 208+ messages in thread
* [dpdk-stable] patch 'net/memif: fix abstract socket address length' has been queued to stable release 20.11.3
2021-08-03 12:21 ` [dpdk-stable] patch 'net/virtio: report maximum MTU in device info' " luca.boccassi
` (11 preceding siblings ...)
2021-08-03 12:22 ` [dpdk-stable] patch 'net/ena: enable multi-segment in Tx offload flags' " luca.boccassi
@ 2021-08-03 12:22 ` luca.boccassi
2021-08-03 12:22 ` [dpdk-stable] patch 'net/softnic: fix null dereference in arguments parsing' " luca.boccassi
` (10 subsequent siblings)
23 siblings, 0 replies; 208+ messages in thread
From: luca.boccassi @ 2021-08-03 12:22 UTC (permalink / raw)
To: Nathan Skrzypczak; +Cc: Jakub Grajciar, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.3
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/05/21. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/d43a754af8524be6720ca957b8b0ab2115c109a7
Thanks.
Luca Boccassi
---
From d43a754af8524be6720ca957b8b0ab2115c109a7 Mon Sep 17 00:00:00 2001
From: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
Date: Fri, 23 Jul 2021 11:18:57 +0200
Subject: [PATCH] net/memif: fix abstract socket address length
[ upstream commit 4e30586dcdf09e670f2e3c6b58c919f6b887d431 ]
This fixes using abstract sockets with memifs.
We were not passing the exact addr_len,
which requires zeroing the remaining sun_path
and doesn't appear well in other utilities (e.g. lsof -U)
Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
Reviewed-by: Jakub Grajciar <jgrajcia@cisco.com>
---
drivers/net/memif/memif_socket.c | 15 ++++++++++++---
1 file changed, 12 insertions(+), 3 deletions(-)
diff --git a/drivers/net/memif/memif_socket.c b/drivers/net/memif/memif_socket.c
index c526f90778..c3008f5ce1 100644
--- a/drivers/net/memif/memif_socket.c
+++ b/drivers/net/memif/memif_socket.c
@@ -866,6 +866,7 @@ memif_socket_create(char *key, uint8_t listener, bool is_abstract)
{
struct memif_socket *sock;
struct sockaddr_un un = { 0 };
+ uint32_t sunlen;
int sockfd;
int ret;
int on = 1;
@@ -890,7 +891,11 @@ memif_socket_create(char *key, uint8_t listener, bool is_abstract)
/* abstract address */
un.sun_path[0] = '\0';
strlcpy(un.sun_path + 1, sock->filename, MEMIF_SOCKET_UN_SIZE - 1);
+ sunlen = RTE_MIN(1 + strlen(sock->filename),
+ MEMIF_SOCKET_UN_SIZE) +
+ sizeof(un) - sizeof(un.sun_path);
} else {
+ sunlen = sizeof(un);
strlcpy(un.sun_path, sock->filename, MEMIF_SOCKET_UN_SIZE);
}
@@ -899,7 +904,7 @@ memif_socket_create(char *key, uint8_t listener, bool is_abstract)
if (ret < 0)
goto error;
- ret = bind(sockfd, (struct sockaddr *)&un, sizeof(un));
+ ret = bind(sockfd, (struct sockaddr *)&un, sunlen);
if (ret < 0)
goto error;
@@ -1061,6 +1066,7 @@ memif_connect_client(struct rte_eth_dev *dev)
{
int sockfd;
int ret;
+ uint32_t sunlen;
struct sockaddr_un sun = { 0 };
struct pmd_internals *pmd = dev->data->dev_private;
@@ -1075,16 +1081,19 @@ memif_connect_client(struct rte_eth_dev *dev)
}
sun.sun_family = AF_UNIX;
+ sunlen = sizeof(struct sockaddr_un);
if (pmd->flags & ETH_MEMIF_FLAG_SOCKET_ABSTRACT) {
/* abstract address */
sun.sun_path[0] = '\0';
strlcpy(sun.sun_path + 1, pmd->socket_filename, MEMIF_SOCKET_UN_SIZE - 1);
+ sunlen = RTE_MIN(strlen(pmd->socket_filename) + 1,
+ MEMIF_SOCKET_UN_SIZE) +
+ sizeof(sun) - sizeof(sun.sun_path);
} else {
strlcpy(sun.sun_path, pmd->socket_filename, MEMIF_SOCKET_UN_SIZE);
}
- ret = connect(sockfd, (struct sockaddr *)&sun,
- sizeof(struct sockaddr_un));
+ ret = connect(sockfd, (struct sockaddr *)&sun, sunlen);
if (ret < 0) {
MIF_LOG(ERR, "Failed to connect socket: %s.", pmd->socket_filename);
goto error;
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-08-03 12:35:08.806906678 +0100
+++ 0014-net-memif-fix-abstract-socket-address-length.patch 2021-08-03 12:35:08.234819128 +0100
@@ -1 +1 @@
-From 4e30586dcdf09e670f2e3c6b58c919f6b887d431 Mon Sep 17 00:00:00 2001
+From d43a754af8524be6720ca957b8b0ab2115c109a7 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 4e30586dcdf09e670f2e3c6b58c919f6b887d431 ]
+
@@ -18 +20 @@
-index 5b373738e6..f58ff4c0cb 100644
+index c526f90778..c3008f5ce1 100644
^ permalink raw reply [flat|nested] 208+ messages in thread
* [dpdk-stable] patch 'net/softnic: fix null dereference in arguments parsing' has been queued to stable release 20.11.3
2021-08-03 12:21 ` [dpdk-stable] patch 'net/virtio: report maximum MTU in device info' " luca.boccassi
` (12 preceding siblings ...)
2021-08-03 12:22 ` [dpdk-stable] patch 'net/memif: fix abstract socket address length' " luca.boccassi
@ 2021-08-03 12:22 ` luca.boccassi
2021-08-03 12:22 ` [dpdk-stable] patch 'net/softnic: fix memory leak as profile is freed' " luca.boccassi
` (9 subsequent siblings)
23 siblings, 0 replies; 208+ messages in thread
From: luca.boccassi @ 2021-08-03 12:22 UTC (permalink / raw)
To: Dapeng Yu; +Cc: Jasvinder Singh, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.3
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/05/21. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/c3e2390817b0431a9aae14b3412fe87f37dcb18b
Thanks.
Luca Boccassi
---
From c3e2390817b0431a9aae14b3412fe87f37dcb18b Mon Sep 17 00:00:00 2001
From: Dapeng Yu <dapengx.yu@intel.com>
Date: Tue, 27 Jul 2021 16:14:59 +0800
Subject: [PATCH] net/softnic: fix null dereference in arguments parsing
[ upstream commit 51799b4f971982bc0757cf8a11940eb538b1af57 ]
When there is no "firmware" in arguments, the "firmware" pointer is
null, and will be dereferenced by rte_strscpy().
This patch moves the code block which copies character string from
"firmware" to "p->firmware" into the "if" statements where "firmware"
argument exists and it is duplicated successfully.
Coverity issue: 372136
Fixes: d8f852f5f369 ("net/softnic: fix memory leak in arguments parsing")
Signed-off-by: Dapeng Yu <dapengx.yu@intel.com>
Acked-by: Jasvinder Singh <jasvinder.singh@intel.com>
---
drivers/net/softnic/rte_eth_softnic.c | 20 +++++++++++---------
1 file changed, 11 insertions(+), 9 deletions(-)
diff --git a/drivers/net/softnic/rte_eth_softnic.c b/drivers/net/softnic/rte_eth_softnic.c
index ceed6bf96d..0ac3c0b0ec 100644
--- a/drivers/net/softnic/rte_eth_softnic.c
+++ b/drivers/net/softnic/rte_eth_softnic.c
@@ -486,17 +486,19 @@ pmd_parse_args(struct pmd_params *p, const char *params)
&get_string, &firmware);
if (ret < 0)
goto out_free;
- }
- if (rte_strscpy(p->firmware, firmware,
- sizeof(p->firmware)) < 0) {
- PMD_LOG(WARNING,
- "\"%s\": firmware path should be shorter than %zu",
- firmware, sizeof(p->firmware));
+
+ if (rte_strscpy(p->firmware, firmware,
+ sizeof(p->firmware)) < 0) {
+ PMD_LOG(WARNING,
+ "\"%s\": "
+ "firmware path should be shorter than %zu",
+ firmware, sizeof(p->firmware));
+ free(firmware);
+ ret = -EINVAL;
+ goto out_free;
+ }
free(firmware);
- ret = -EINVAL;
- goto out_free;
}
- free(firmware);
/* Connection listening port (optional) */
if (rte_kvargs_count(kvlist, PMD_PARAM_CONN_PORT) == 1) {
ret = rte_kvargs_process(kvlist, PMD_PARAM_CONN_PORT,
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-08-03 12:35:08.840442871 +0100
+++ 0015-net-softnic-fix-null-dereference-in-arguments-parsin.patch 2021-08-03 12:35:08.238819208 +0100
@@ -1 +1 @@
-From 51799b4f971982bc0757cf8a11940eb538b1af57 Mon Sep 17 00:00:00 2001
+From c3e2390817b0431a9aae14b3412fe87f37dcb18b Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 51799b4f971982bc0757cf8a11940eb538b1af57 ]
+
@@ -15 +16,0 @@
-Cc: stable@dpdk.org
@@ -24 +25 @@
-index 0aa7147b13..b3b55b9035 100644
+index ceed6bf96d..0ac3c0b0ec 100644
@@ -27 +28 @@
-@@ -479,17 +479,19 @@ pmd_parse_args(struct pmd_params *p, const char *params)
+@@ -486,17 +486,19 @@ pmd_parse_args(struct pmd_params *p, const char *params)
^ permalink raw reply [flat|nested] 208+ messages in thread
* [dpdk-stable] patch 'net/softnic: fix memory leak as profile is freed' has been queued to stable release 20.11.3
2021-08-03 12:21 ` [dpdk-stable] patch 'net/virtio: report maximum MTU in device info' " luca.boccassi
` (13 preceding siblings ...)
2021-08-03 12:22 ` [dpdk-stable] patch 'net/softnic: fix null dereference in arguments parsing' " luca.boccassi
@ 2021-08-03 12:22 ` luca.boccassi
2021-08-03 12:22 ` [dpdk-stable] patch 'app/testpmd: fix Tx checksum calculation for tunnel' " luca.boccassi
` (8 subsequent siblings)
23 siblings, 0 replies; 208+ messages in thread
From: luca.boccassi @ 2021-08-03 12:22 UTC (permalink / raw)
To: Dapeng Yu; +Cc: Jasvinder Singh, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.3
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/05/21. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/3a0ced629fd2dd17a34b5225c427f44bd158e176
Thanks.
Luca Boccassi
---
From 3a0ced629fd2dd17a34b5225c427f44bd158e176 Mon Sep 17 00:00:00 2001
From: Dapeng Yu <dapengx.yu@intel.com>
Date: Wed, 28 Jul 2021 14:05:39 +0800
Subject: [PATCH] net/softnic: fix memory leak as profile is freed
[ upstream commit b3bc560bd6bdf3c9851d25bc0a66cb24aa1fd48c ]
In function softnic_table_action_profile_free(), the memory referenced
by pointer "ap" in the instance of "struct softnic_table_action_profile"
is not freed.
This patch fixes it.
Fixes: a737dd4e5863 ("net/softnic: add table action profile")
Signed-off-by: Dapeng Yu <dapengx.yu@intel.com>
Acked-by: Jasvinder Singh <jasvinder.singh@intel.com>
---
drivers/net/softnic/rte_eth_softnic_action.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/net/softnic/rte_eth_softnic_action.c b/drivers/net/softnic/rte_eth_softnic_action.c
index 92c744dc9a..33be9552a6 100644
--- a/drivers/net/softnic/rte_eth_softnic_action.c
+++ b/drivers/net/softnic/rte_eth_softnic_action.c
@@ -183,6 +183,7 @@ softnic_table_action_profile_free(struct pmd_internals *p)
break;
TAILQ_REMOVE(&p->table_action_profile_list, profile, node);
+ rte_table_action_profile_free(profile->ap);
free(profile);
}
}
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-08-03 12:35:08.873297042 +0100
+++ 0016-net-softnic-fix-memory-leak-as-profile-is-freed.patch 2021-08-03 12:35:08.238819208 +0100
@@ -1 +1 @@
-From b3bc560bd6bdf3c9851d25bc0a66cb24aa1fd48c Mon Sep 17 00:00:00 2001
+From 3a0ced629fd2dd17a34b5225c427f44bd158e176 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit b3bc560bd6bdf3c9851d25bc0a66cb24aa1fd48c ]
+
@@ -13 +14,0 @@
-Cc: stable@dpdk.org
^ permalink raw reply [flat|nested] 208+ messages in thread
* [dpdk-stable] patch 'app/testpmd: fix Tx checksum calculation for tunnel' has been queued to stable release 20.11.3
2021-08-03 12:21 ` [dpdk-stable] patch 'net/virtio: report maximum MTU in device info' " luca.boccassi
` (14 preceding siblings ...)
2021-08-03 12:22 ` [dpdk-stable] patch 'net/softnic: fix memory leak as profile is freed' " luca.boccassi
@ 2021-08-03 12:22 ` luca.boccassi
2021-08-03 12:22 ` [dpdk-stable] patch 'eventdev: fix event port setup in Tx adapter' " luca.boccassi
` (7 subsequent siblings)
23 siblings, 0 replies; 208+ messages in thread
From: luca.boccassi @ 2021-08-03 12:22 UTC (permalink / raw)
To: Gregory Etelson
Cc: Ori Kam, Ajit Khaparde, Xiaoyun Li, Olivier Matz, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.3
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/05/21. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/c9c391ea6083a312e532f1f3139d36eb7b3de20e
Thanks.
Luca Boccassi
---
From c9c391ea6083a312e532f1f3139d36eb7b3de20e Mon Sep 17 00:00:00 2001
From: Gregory Etelson <getelson@nvidia.com>
Date: Thu, 29 Jul 2021 20:01:41 +0300
Subject: [PATCH] app/testpmd: fix Tx checksum calculation for tunnel
[ upstream commit b2a9e4a855d0e5b4e3fdba5b126bcf00aa8f0ada ]
csumonly engine calculates Tx checksum of a tunnelled packet
for outer headers only or separately for outer and inner headers.
The calculation method is determined by checksum configuration options.
If Tx checksum calculation is separated,
the inner headers are processed before outer headers.
Inner headers processing sets checksum values to 0 unconditionally.
If Tx configuration offloads inner checksums only, outer checksum
calculation in software will read 0 instead of real values
and produce wrong result.
The patch zeroes inner checksums only before software calculation.
Fixes: 6b520d54ebfe ("app/testpmd: use Tx preparation in checksum engine")
Signed-off-by: Gregory Etelson <getelson@nvidia.com>
Acked-by: Ori Kam <orika@nvidia.com>
Acked-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Acked-by: Xiaoyun Li <xiaoyun.li@intel.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
---
app/test-pmd/csumonly.c | 23 ++++++++++++-----------
1 file changed, 12 insertions(+), 11 deletions(-)
diff --git a/app/test-pmd/csumonly.c b/app/test-pmd/csumonly.c
index d813d4fae0..73a78f955c 100644
--- a/app/test-pmd/csumonly.c
+++ b/app/test-pmd/csumonly.c
@@ -480,17 +480,18 @@ process_inner_cksums(void *l3_hdr, const struct testpmd_offload_info *info,
if (info->ethertype == _htons(RTE_ETHER_TYPE_IPV4)) {
ipv4_hdr = l3_hdr;
- ipv4_hdr->hdr_checksum = 0;
ol_flags |= PKT_TX_IPV4;
if (info->l4_proto == IPPROTO_TCP && tso_segsz) {
ol_flags |= PKT_TX_IP_CKSUM;
} else {
- if (tx_offloads & DEV_TX_OFFLOAD_IPV4_CKSUM)
+ if (tx_offloads & DEV_TX_OFFLOAD_IPV4_CKSUM) {
ol_flags |= PKT_TX_IP_CKSUM;
- else
+ } else if (ipv4_hdr->hdr_checksum != 0) {
+ ipv4_hdr->hdr_checksum = 0;
ipv4_hdr->hdr_checksum =
rte_ipv4_cksum(ipv4_hdr);
+ }
}
} else if (info->ethertype == _htons(RTE_ETHER_TYPE_IPV6))
ol_flags |= PKT_TX_IPV6;
@@ -501,10 +502,10 @@ process_inner_cksums(void *l3_hdr, const struct testpmd_offload_info *info,
udp_hdr = (struct rte_udp_hdr *)((char *)l3_hdr + info->l3_len);
/* do not recalculate udp cksum if it was 0 */
if (udp_hdr->dgram_cksum != 0) {
- udp_hdr->dgram_cksum = 0;
- if (tx_offloads & DEV_TX_OFFLOAD_UDP_CKSUM)
+ if (tx_offloads & DEV_TX_OFFLOAD_UDP_CKSUM) {
ol_flags |= PKT_TX_UDP_CKSUM;
- else {
+ } else {
+ udp_hdr->dgram_cksum = 0;
udp_hdr->dgram_cksum =
get_udptcp_checksum(l3_hdr, udp_hdr,
info->ethertype);
@@ -514,12 +515,12 @@ process_inner_cksums(void *l3_hdr, const struct testpmd_offload_info *info,
ol_flags |= PKT_TX_UDP_SEG;
} else if (info->l4_proto == IPPROTO_TCP) {
tcp_hdr = (struct rte_tcp_hdr *)((char *)l3_hdr + info->l3_len);
- tcp_hdr->cksum = 0;
if (tso_segsz)
ol_flags |= PKT_TX_TCP_SEG;
- else if (tx_offloads & DEV_TX_OFFLOAD_TCP_CKSUM)
+ else if (tx_offloads & DEV_TX_OFFLOAD_TCP_CKSUM) {
ol_flags |= PKT_TX_TCP_CKSUM;
- else {
+ } else if (tcp_hdr->cksum != 0) {
+ tcp_hdr->cksum = 0;
tcp_hdr->cksum =
get_udptcp_checksum(l3_hdr, tcp_hdr,
info->ethertype);
@@ -529,13 +530,13 @@ process_inner_cksums(void *l3_hdr, const struct testpmd_offload_info *info,
} else if (info->l4_proto == IPPROTO_SCTP) {
sctp_hdr = (struct rte_sctp_hdr *)
((char *)l3_hdr + info->l3_len);
- sctp_hdr->cksum = 0;
/* sctp payload must be a multiple of 4 to be
* offloaded */
if ((tx_offloads & DEV_TX_OFFLOAD_SCTP_CKSUM) &&
((ipv4_hdr->total_length & 0x3) == 0)) {
ol_flags |= PKT_TX_SCTP_CKSUM;
- } else {
+ } else if (sctp_hdr->cksum != 0) {
+ sctp_hdr->cksum = 0;
/* XXX implement CRC32c, example available in
* RFC3309 */
}
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-08-03 12:35:08.906339131 +0100
+++ 0017-app-testpmd-fix-Tx-checksum-calculation-for-tunnel.patch 2021-08-03 12:35:08.238819208 +0100
@@ -1 +1 @@
-From b2a9e4a855d0e5b4e3fdba5b126bcf00aa8f0ada Mon Sep 17 00:00:00 2001
+From c9c391ea6083a312e532f1f3139d36eb7b3de20e Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit b2a9e4a855d0e5b4e3fdba5b126bcf00aa8f0ada ]
+
@@ -20 +21,0 @@
-Cc: stable@dpdk.org
@@ -32 +33 @@
-index 0161f72175..bd5ad64a57 100644
+index d813d4fae0..73a78f955c 100644
^ permalink raw reply [flat|nested] 208+ messages in thread
* [dpdk-stable] patch 'eventdev: fix event port setup in Tx adapter' has been queued to stable release 20.11.3
2021-08-03 12:21 ` [dpdk-stable] patch 'net/virtio: report maximum MTU in device info' " luca.boccassi
` (15 preceding siblings ...)
2021-08-03 12:22 ` [dpdk-stable] patch 'app/testpmd: fix Tx checksum calculation for tunnel' " luca.boccassi
@ 2021-08-03 12:22 ` luca.boccassi
2021-08-03 12:22 ` [dpdk-stable] patch 'eal/windows: cleanup virt2phys handle' " luca.boccassi
` (6 subsequent siblings)
23 siblings, 0 replies; 208+ messages in thread
From: luca.boccassi @ 2021-08-03 12:22 UTC (permalink / raw)
To: Naga Harish K S V; +Cc: dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.3
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/05/21. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/d06cadbbbd9de7abed4b06c650bccccaa8896ca5
Thanks.
Luca Boccassi
---
From d06cadbbbd9de7abed4b06c650bccccaa8896ca5 Mon Sep 17 00:00:00 2001
From: Naga Harish K S V <s.v.naga.harish.k@intel.com>
Date: Sat, 24 Jul 2021 09:10:36 -0500
Subject: [PATCH] eventdev: fix event port setup in Tx adapter
[ upstream commit 6922655cad74f1f74917567181b8aa55006300de ]
The event port config set by application in
rte_event_eth_tx_adapter_create API is modified in
default configuration callback function. This patch removes
this hardcode to use application provided event port
config value.
Fixes: a3bbf2e09756 ("eventdev: add eth Tx adapter implementation")
Signed-off-by: Naga Harish K S V <s.v.naga.harish.k@intel.com>
---
lib/librte_eventdev/rte_event_eth_tx_adapter.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/lib/librte_eventdev/rte_event_eth_tx_adapter.c b/lib/librte_eventdev/rte_event_eth_tx_adapter.c
index cc27bbca32..a122750fd9 100644
--- a/lib/librte_eventdev/rte_event_eth_tx_adapter.c
+++ b/lib/librte_eventdev/rte_event_eth_tx_adapter.c
@@ -286,7 +286,6 @@ txa_service_conf_cb(uint8_t __rte_unused id, uint8_t dev_id,
return ret;
}
- pc->event_port_cfg = 0;
ret = rte_event_port_setup(dev_id, port_id, pc);
if (ret) {
RTE_EDEV_LOG_ERR("failed to setup event port %u\n",
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-08-03 12:35:08.940616013 +0100
+++ 0018-eventdev-fix-event-port-setup-in-Tx-adapter.patch 2021-08-03 12:35:08.238819208 +0100
@@ -1 +1 @@
-From 6922655cad74f1f74917567181b8aa55006300de Mon Sep 17 00:00:00 2001
+From d06cadbbbd9de7abed4b06c650bccccaa8896ca5 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 6922655cad74f1f74917567181b8aa55006300de ]
+
@@ -13 +14,0 @@
-Cc: stable@dpdk.org
@@ -17 +18 @@
- lib/eventdev/rte_event_eth_tx_adapter.c | 1 -
+ lib/librte_eventdev/rte_event_eth_tx_adapter.c | 1 -
@@ -20,4 +21,4 @@
-diff --git a/lib/eventdev/rte_event_eth_tx_adapter.c b/lib/eventdev/rte_event_eth_tx_adapter.c
-index db260bfb68..18c0359db7 100644
---- a/lib/eventdev/rte_event_eth_tx_adapter.c
-+++ b/lib/eventdev/rte_event_eth_tx_adapter.c
+diff --git a/lib/librte_eventdev/rte_event_eth_tx_adapter.c b/lib/librte_eventdev/rte_event_eth_tx_adapter.c
+index cc27bbca32..a122750fd9 100644
+--- a/lib/librte_eventdev/rte_event_eth_tx_adapter.c
++++ b/lib/librte_eventdev/rte_event_eth_tx_adapter.c
^ permalink raw reply [flat|nested] 208+ messages in thread
* [dpdk-stable] patch 'eal/windows: cleanup virt2phys handle' has been queued to stable release 20.11.3
2021-08-03 12:21 ` [dpdk-stable] patch 'net/virtio: report maximum MTU in device info' " luca.boccassi
` (16 preceding siblings ...)
2021-08-03 12:22 ` [dpdk-stable] patch 'eventdev: fix event port setup in Tx adapter' " luca.boccassi
@ 2021-08-03 12:22 ` luca.boccassi
2021-08-03 12:22 ` [dpdk-stable] patch 'cryptodev: fix freeing after device release' " luca.boccassi
` (5 subsequent siblings)
23 siblings, 0 replies; 208+ messages in thread
From: luca.boccassi @ 2021-08-03 12:22 UTC (permalink / raw)
To: Dmitry Kozlyuk; +Cc: Ranjit Menon, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.3
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/05/21. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/946df437470f356759465a2c27ed817f8f21f867
Thanks.
Luca Boccassi
---
From 946df437470f356759465a2c27ed817f8f21f867 Mon Sep 17 00:00:00 2001
From: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
Date: Tue, 27 Jul 2021 00:36:32 +0300
Subject: [PATCH] eal/windows: cleanup virt2phys handle
[ upstream commit 23ce9e0a193636e2f5ec9b386ddd5307c17e9723 ]
eal_mem_virt2phys_init() opens a handle for use by rte_mem_virt2phy().
Close this handle on EAL cleanup.
Fixes: 2a5d547a4a9b ("eal/windows: implement basic memory management")
Signed-off-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
Acked-by: Ranjit Menon <ranjit.menon@intel.com>
---
lib/librte_eal/windows/eal.c | 1 +
lib/librte_eal/windows/eal_memory.c | 7 +++++++
lib/librte_eal/windows/eal_windows.h | 5 +++++
3 files changed, 13 insertions(+)
diff --git a/lib/librte_eal/windows/eal.c b/lib/librte_eal/windows/eal.c
index 78ac4adaeb..5b6d13481a 100644
--- a/lib/librte_eal/windows/eal.c
+++ b/lib/librte_eal/windows/eal.c
@@ -256,6 +256,7 @@ rte_eal_cleanup(void)
struct internal_config *internal_conf =
eal_get_internal_configuration();
+ eal_mem_virt2iova_cleanup();
eal_cleanup_config(internal_conf);
return 0;
}
diff --git a/lib/librte_eal/windows/eal_memory.c b/lib/librte_eal/windows/eal_memory.c
index 4db048ccb5..71741fc07e 100644
--- a/lib/librte_eal/windows/eal_memory.c
+++ b/lib/librte_eal/windows/eal_memory.c
@@ -198,6 +198,13 @@ exit:
return ret;
}
+void
+eal_mem_virt2iova_cleanup(void)
+{
+ if (virt2phys_device != INVALID_HANDLE_VALUE)
+ CloseHandle(virt2phys_device);
+}
+
phys_addr_t
rte_mem_virt2phy(const void *virt)
{
diff --git a/lib/librte_eal/windows/eal_windows.h b/lib/librte_eal/windows/eal_windows.h
index 478accc1b9..e1d28e7fac 100644
--- a/lib/librte_eal/windows/eal_windows.h
+++ b/lib/librte_eal/windows/eal_windows.h
@@ -74,6 +74,11 @@ int eal_intr_thread_schedule(void (*func)(void *arg), void *arg);
*/
int eal_mem_virt2iova_init(void);
+/**
+ * Cleanup resources used for virtual to physical address translation.
+ */
+void eal_mem_virt2iova_cleanup(void);
+
/**
* Locate Win32 memory management routines in system libraries.
*
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-08-03 12:35:08.973702013 +0100
+++ 0019-eal-windows-cleanup-virt2phys-handle.patch 2021-08-03 12:35:08.242819288 +0100
@@ -1 +1 @@
-From 23ce9e0a193636e2f5ec9b386ddd5307c17e9723 Mon Sep 17 00:00:00 2001
+From 946df437470f356759465a2c27ed817f8f21f867 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 23ce9e0a193636e2f5ec9b386ddd5307c17e9723 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -15,3 +16,3 @@
- lib/eal/windows/eal.c | 1 +
- lib/eal/windows/eal_memory.c | 7 +++++++
- lib/eal/windows/eal_windows.h | 5 +++++
+ lib/librte_eal/windows/eal.c | 1 +
+ lib/librte_eal/windows/eal_memory.c | 7 +++++++
+ lib/librte_eal/windows/eal_windows.h | 5 +++++
@@ -20,5 +21,6 @@
-diff --git a/lib/eal/windows/eal.c b/lib/eal/windows/eal.c
-index 5413d4d87f..3d8c520412 100644
---- a/lib/eal/windows/eal.c
-+++ b/lib/eal/windows/eal.c
-@@ -261,6 +261,7 @@ rte_eal_cleanup(void)
+diff --git a/lib/librte_eal/windows/eal.c b/lib/librte_eal/windows/eal.c
+index 78ac4adaeb..5b6d13481a 100644
+--- a/lib/librte_eal/windows/eal.c
++++ b/lib/librte_eal/windows/eal.c
+@@ -256,6 +256,7 @@ rte_eal_cleanup(void)
+ struct internal_config *internal_conf =
@@ -27 +28,0 @@
- eal_intr_thread_cancel();
@@ -29,2 +29,0 @@
- /* after this point, any DPDK pointers will become dangling */
- rte_eal_memory_detach();
@@ -32 +31,3 @@
-diff --git a/lib/eal/windows/eal_memory.c b/lib/eal/windows/eal_memory.c
+ return 0;
+ }
+diff --git a/lib/librte_eal/windows/eal_memory.c b/lib/librte_eal/windows/eal_memory.c
@@ -34,2 +35,2 @@
---- a/lib/eal/windows/eal_memory.c
-+++ b/lib/eal/windows/eal_memory.c
+--- a/lib/librte_eal/windows/eal_memory.c
++++ b/lib/librte_eal/windows/eal_memory.c
@@ -50,5 +51,5 @@
-diff --git a/lib/eal/windows/eal_windows.h b/lib/eal/windows/eal_windows.h
-index 7cc811485d..23ead6d30c 100644
---- a/lib/eal/windows/eal_windows.h
-+++ b/lib/eal/windows/eal_windows.h
-@@ -79,6 +79,11 @@ void eal_intr_thread_cancel(void);
+diff --git a/lib/librte_eal/windows/eal_windows.h b/lib/librte_eal/windows/eal_windows.h
+index 478accc1b9..e1d28e7fac 100644
+--- a/lib/librte_eal/windows/eal_windows.h
++++ b/lib/librte_eal/windows/eal_windows.h
+@@ -74,6 +74,11 @@ int eal_intr_thread_schedule(void (*func)(void *arg), void *arg);
^ permalink raw reply [flat|nested] 208+ messages in thread
* [dpdk-stable] patch 'cryptodev: fix freeing after device release' has been queued to stable release 20.11.3
2021-08-03 12:21 ` [dpdk-stable] patch 'net/virtio: report maximum MTU in device info' " luca.boccassi
` (17 preceding siblings ...)
2021-08-03 12:22 ` [dpdk-stable] patch 'eal/windows: cleanup virt2phys handle' " luca.boccassi
@ 2021-08-03 12:22 ` luca.boccassi
2021-08-03 12:22 ` [dpdk-stable] patch 'crypto/octeontx: " luca.boccassi
` (4 subsequent siblings)
23 siblings, 0 replies; 208+ messages in thread
From: luca.boccassi @ 2021-08-03 12:22 UTC (permalink / raw)
To: Ciara Power; +Cc: Zhihong Peng, Akhil Goyal, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.3
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/05/21. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/151569886c10a82650a59813a1f595fcfd25abef
Thanks.
Luca Boccassi
---
From 151569886c10a82650a59813a1f595fcfd25abef Mon Sep 17 00:00:00 2001
From: Ciara Power <ciara.power@intel.com>
Date: Wed, 21 Jul 2021 12:51:22 +0000
Subject: [PATCH] cryptodev: fix freeing after device release
[ upstream commit eeaeca82b8cbd6599bafd4029aad5ce4dedff7a2 ]
The PMD destroy function was calling the release function, which frees
cryptodev->data, and then tries to free cryptodev->data->dev_private,
which causes the heap use after free issue.
A temporary pointer is set before the free of cryptodev->data,
which can then be used afterwards to free dev_private.
The free cannot be moved to before the release function is called,
as dev_private is used in the PMD close function while being released.
Fixes: 9e6edea41805 ("cryptodev: add APIs to assist PMD initialisation")
Reported-by: Zhihong Peng <zhihongx.peng@intel.com>
Signed-off-by: Ciara Power <ciara.power@intel.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
---
lib/librte_cryptodev/rte_cryptodev_pmd.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/lib/librte_cryptodev/rte_cryptodev_pmd.c b/lib/librte_cryptodev/rte_cryptodev_pmd.c
index 0912004127..e342daabc4 100644
--- a/lib/librte_cryptodev/rte_cryptodev_pmd.c
+++ b/lib/librte_cryptodev/rte_cryptodev_pmd.c
@@ -140,6 +140,7 @@ int
rte_cryptodev_pmd_destroy(struct rte_cryptodev *cryptodev)
{
int retval;
+ void *dev_priv = cryptodev->data->dev_private;
CDEV_LOG_INFO("Closing crypto device %s", cryptodev->device->name);
@@ -149,7 +150,7 @@ rte_cryptodev_pmd_destroy(struct rte_cryptodev *cryptodev)
return retval;
if (rte_eal_process_type() == RTE_PROC_PRIMARY)
- rte_free(cryptodev->data->dev_private);
+ rte_free(dev_priv);
cryptodev->device = NULL;
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-08-03 12:35:09.007029969 +0100
+++ 0020-cryptodev-fix-freeing-after-device-release.patch 2021-08-03 12:35:08.242819288 +0100
@@ -1 +1 @@
-From eeaeca82b8cbd6599bafd4029aad5ce4dedff7a2 Mon Sep 17 00:00:00 2001
+From 151569886c10a82650a59813a1f595fcfd25abef Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit eeaeca82b8cbd6599bafd4029aad5ce4dedff7a2 ]
+
@@ -16 +17,0 @@
-Cc: stable@dpdk.org
@@ -22 +23 @@
- lib/cryptodev/rte_cryptodev_pmd.c | 3 ++-
+ lib/librte_cryptodev/rte_cryptodev_pmd.c | 3 ++-
@@ -25 +26 @@
-diff --git a/lib/cryptodev/rte_cryptodev_pmd.c b/lib/cryptodev/rte_cryptodev_pmd.c
+diff --git a/lib/librte_cryptodev/rte_cryptodev_pmd.c b/lib/librte_cryptodev/rte_cryptodev_pmd.c
@@ -27,2 +28,2 @@
---- a/lib/cryptodev/rte_cryptodev_pmd.c
-+++ b/lib/cryptodev/rte_cryptodev_pmd.c
+--- a/lib/librte_cryptodev/rte_cryptodev_pmd.c
++++ b/lib/librte_cryptodev/rte_cryptodev_pmd.c
^ permalink raw reply [flat|nested] 208+ messages in thread
* [dpdk-stable] patch 'crypto/octeontx: fix freeing after device release' has been queued to stable release 20.11.3
2021-08-03 12:21 ` [dpdk-stable] patch 'net/virtio: report maximum MTU in device info' " luca.boccassi
` (18 preceding siblings ...)
2021-08-03 12:22 ` [dpdk-stable] patch 'cryptodev: fix freeing after device release' " luca.boccassi
@ 2021-08-03 12:22 ` luca.boccassi
2021-08-03 12:22 ` [dpdk-stable] patch 'crypto/qat: disable asymmetric crypto on GEN3' " luca.boccassi
` (3 subsequent siblings)
23 siblings, 0 replies; 208+ messages in thread
From: luca.boccassi @ 2021-08-03 12:22 UTC (permalink / raw)
To: Akhil Goyal; +Cc: Zhihong Peng, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.3
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/05/21. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/fb63987b6d5ea636737deee4e49bb5cd4bf55cee
Thanks.
Luca Boccassi
---
From fb63987b6d5ea636737deee4e49bb5cd4bf55cee Mon Sep 17 00:00:00 2001
From: Akhil Goyal <gakhil@marvell.com>
Date: Fri, 30 Jul 2021 23:28:27 +0530
Subject: [PATCH] crypto/octeontx: fix freeing after device release
[ upstream commit 12b650efd49d8b932a7717be1cafd13d9040ea3e ]
When the PMD is removed, rte_cryptodev_pmd_release_device
is called which frees cryptodev->data, and then tries to free
cryptodev->data->dev_private, which causes the heap use
after free issue.
A temporary pointer is set before the free of cryptodev->data,
which can then be used afterwards to free dev_private.
Fixes: bfe2ae495ee2 ("crypto/octeontx: add PMD skeleton")
Reported-by: Zhihong Peng <zhihongx.peng@intel.com>
Signed-off-by: Akhil Goyal <gakhil@marvell.com>
---
drivers/crypto/octeontx/otx_cryptodev.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/drivers/crypto/octeontx/otx_cryptodev.c b/drivers/crypto/octeontx/otx_cryptodev.c
index 5ce1cf82fd..36cedb3253 100644
--- a/drivers/crypto/octeontx/otx_cryptodev.c
+++ b/drivers/crypto/octeontx/otx_cryptodev.c
@@ -71,6 +71,7 @@ otx_cpt_pci_remove(struct rte_pci_device *pci_dev)
{
struct rte_cryptodev *cryptodev;
char name[RTE_CRYPTODEV_NAME_MAX_LEN];
+ void *dev_priv;
if (pci_dev == NULL)
return -EINVAL;
@@ -84,11 +85,13 @@ otx_cpt_pci_remove(struct rte_pci_device *pci_dev)
if (pci_dev->driver == NULL)
return -ENODEV;
+ dev_priv = cryptodev->data->dev_private;
+
/* free crypto device */
rte_cryptodev_pmd_release_device(cryptodev);
if (rte_eal_process_type() == RTE_PROC_PRIMARY)
- rte_free(cryptodev->data->dev_private);
+ rte_free(dev_priv);
cryptodev->device->driver = NULL;
cryptodev->device = NULL;
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-08-03 12:35:09.040872465 +0100
+++ 0021-crypto-octeontx-fix-freeing-after-device-release.patch 2021-08-03 12:35:08.242819288 +0100
@@ -1 +1 @@
-From 12b650efd49d8b932a7717be1cafd13d9040ea3e Mon Sep 17 00:00:00 2001
+From fb63987b6d5ea636737deee4e49bb5cd4bf55cee Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 12b650efd49d8b932a7717be1cafd13d9040ea3e ]
+
@@ -15 +16,0 @@
-Cc: stable@dpdk.org
@@ -24 +25 @@
-index 7207909abb..3822c0d779 100644
+index 5ce1cf82fd..36cedb3253 100644
@@ -27 +28 @@
-@@ -75,6 +75,7 @@ otx_cpt_pci_remove(struct rte_pci_device *pci_dev)
+@@ -71,6 +71,7 @@ otx_cpt_pci_remove(struct rte_pci_device *pci_dev)
@@ -35 +36 @@
-@@ -88,11 +89,13 @@ otx_cpt_pci_remove(struct rte_pci_device *pci_dev)
+@@ -84,11 +85,13 @@ otx_cpt_pci_remove(struct rte_pci_device *pci_dev)
^ permalink raw reply [flat|nested] 208+ messages in thread
* [dpdk-stable] patch 'crypto/qat: disable asymmetric crypto on GEN3' has been queued to stable release 20.11.3
2021-08-03 12:21 ` [dpdk-stable] patch 'net/virtio: report maximum MTU in device info' " luca.boccassi
` (19 preceding siblings ...)
2021-08-03 12:22 ` [dpdk-stable] patch 'crypto/octeontx: " luca.boccassi
@ 2021-08-03 12:22 ` luca.boccassi
2021-08-03 12:22 ` [dpdk-stable] patch 'doc: fix spelling' " luca.boccassi
` (2 subsequent siblings)
23 siblings, 0 replies; 208+ messages in thread
From: luca.boccassi @ 2021-08-03 12:22 UTC (permalink / raw)
To: Arek Kusztal; +Cc: Fan Zhang, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.3
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/05/21. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/853a9877165c214756e92658f2f535525f309e02
Thanks.
Luca Boccassi
---
From 853a9877165c214756e92658f2f535525f309e02 Mon Sep 17 00:00:00 2001
From: Arek Kusztal <arkadiuszx.kusztal@intel.com>
Date: Wed, 28 Jul 2021 17:18:31 +0100
Subject: [PATCH] crypto/qat: disable asymmetric crypto on GEN3
[ upstream commit 135e3a4046793e7f68a96d61fc6f0c03c365863c ]
This patch disables asymmetric crypto PMD on GEN3 devices.
Fixes: 1f5e4053f9b4 ("common/qat: support GEN3 devices")
Signed-off-by: Arek Kusztal <arkadiuszx.kusztal@intel.com>
Acked-by: Fan Zhang <roy.fan.zhang@intel.com>
---
drivers/crypto/qat/qat_asym_pmd.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/crypto/qat/qat_asym_pmd.c b/drivers/crypto/qat/qat_asym_pmd.c
index a2c8aca2c1..ef47e28112 100644
--- a/drivers/crypto/qat/qat_asym_pmd.c
+++ b/drivers/crypto/qat/qat_asym_pmd.c
@@ -251,6 +251,10 @@ qat_asym_dev_create(struct qat_pci_device *qat_pci_dev,
struct rte_cryptodev *cryptodev;
struct qat_asym_dev_private *internals;
+ if (qat_pci_dev->qat_dev_gen == QAT_GEN3) {
+ QAT_LOG(ERR, "Asymmetric crypto PMD not supported on QAT c4xxx");
+ return -EFAULT;
+ }
snprintf(name, RTE_CRYPTODEV_NAME_MAX_LEN, "%s_%s",
qat_pci_dev->name, "asym");
QAT_LOG(DEBUG, "Creating QAT ASYM device %s\n", name);
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-08-03 12:35:09.073796006 +0100
+++ 0022-crypto-qat-disable-asymmetric-crypto-on-GEN3.patch 2021-08-03 12:35:08.242819288 +0100
@@ -1 +1 @@
-From 135e3a4046793e7f68a96d61fc6f0c03c365863c Mon Sep 17 00:00:00 2001
+From 853a9877165c214756e92658f2f535525f309e02 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 135e3a4046793e7f68a96d61fc6f0c03c365863c ]
+
@@ -9 +10,0 @@
-Cc: stable@dpdk.org
@@ -18 +19 @@
-index d844dd85bf..0c25cce09e 100644
+index a2c8aca2c1..ef47e28112 100644
@@ -21,4 +22,4 @@
-@@ -255,6 +255,10 @@ qat_asym_dev_create(struct qat_pci_device *qat_pci_dev,
- QAT_LOG(ERR, "Asymmetric crypto PMD not supported on QAT 4xxx");
- return -EFAULT;
- }
+@@ -251,6 +251,10 @@ qat_asym_dev_create(struct qat_pci_device *qat_pci_dev,
+ struct rte_cryptodev *cryptodev;
+ struct qat_asym_dev_private *internals;
+
^ permalink raw reply [flat|nested] 208+ messages in thread
* [dpdk-stable] patch 'doc: fix spelling' has been queued to stable release 20.11.3
2021-08-03 12:21 ` [dpdk-stable] patch 'net/virtio: report maximum MTU in device info' " luca.boccassi
` (20 preceding siblings ...)
2021-08-03 12:22 ` [dpdk-stable] patch 'crypto/qat: disable asymmetric crypto on GEN3' " luca.boccassi
@ 2021-08-03 12:22 ` luca.boccassi
2021-08-03 12:22 ` [dpdk-stable] patch 'doc: remove old deprecation notice for sched' " luca.boccassi
2021-08-03 12:22 ` [dpdk-stable] patch 'doc: update atomic operation deprecation' " luca.boccassi
23 siblings, 0 replies; 208+ messages in thread
From: luca.boccassi @ 2021-08-03 12:22 UTC (permalink / raw)
To: Henry Nadeau; +Cc: dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.3
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/05/21. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/cf52376b2d082868aa1b3dd7dbb910b8be0324bb
Thanks.
Luca Boccassi
---
From cf52376b2d082868aa1b3dd7dbb910b8be0324bb Mon Sep 17 00:00:00 2001
From: Henry Nadeau <hnadeau@iol.unh.edu>
Date: Thu, 29 Jul 2021 12:48:05 -0400
Subject: [PATCH] doc: fix spelling
[ upstream commit 9c30a6f3c9a456e8111a2b1e5f6c2c02a62025b6 ]
Spell checked and corrected documentation.
If there are any errors, or I have changed something that wasn't an error
please reach out to me so I can update the dictionary.
Signed-off-by: Henry Nadeau <hnadeau@iol.unh.edu>
---
doc/guides/contributing/coding_style.rst | 2 +-
doc/guides/cryptodevs/scheduler.rst | 2 +-
doc/guides/howto/pvp_reference_benchmark.rst | 2 +-
doc/guides/nics/bnx2x.rst | 2 +-
doc/guides/nics/dpaa.rst | 6 +++---
doc/guides/nics/mlx5.rst | 2 +-
doc/guides/nics/octeontx2.rst | 4 ++--
doc/guides/nics/virtio.rst | 2 +-
doc/guides/platform/dpaa.rst | 2 +-
doc/guides/prog_guide/bbdev.rst | 2 +-
doc/guides/prog_guide/env_abstraction_layer.rst | 2 +-
doc/guides/prog_guide/eventdev.rst | 2 +-
doc/guides/prog_guide/multi_proc_support.rst | 2 +-
doc/guides/prog_guide/qos_framework.rst | 2 +-
doc/guides/prog_guide/regexdev.rst | 2 +-
doc/guides/rawdevs/ioat.rst | 2 +-
doc/guides/rawdevs/ntb.rst | 2 +-
doc/guides/regexdevs/features_overview.rst | 2 +-
doc/guides/rel_notes/release_16_11.rst | 2 +-
doc/guides/rel_notes/release_19_08.rst | 2 +-
doc/guides/rel_notes/release_2_2.rst | 2 +-
doc/guides/sample_app_ug/fips_validation.rst | 2 +-
doc/guides/sample_app_ug/ipsec_secgw.rst | 2 +-
doc/guides/sample_app_ug/performance_thread.rst | 2 +-
doc/guides/testpmd_app_ug/run_app.rst | 2 +-
doc/guides/testpmd_app_ug/testpmd_funcs.rst | 4 ++--
doc/guides/tools/hugepages.rst | 6 +++---
27 files changed, 33 insertions(+), 33 deletions(-)
diff --git a/doc/guides/contributing/coding_style.rst b/doc/guides/contributing/coding_style.rst
index bb3f3efcbc..a2a8130c6b 100644
--- a/doc/guides/contributing/coding_style.rst
+++ b/doc/guides/contributing/coding_style.rst
@@ -55,7 +55,7 @@ License Header
~~~~~~~~~~~~~~
Each file must begin with a special comment containing the
-`Software Package Data Exchange (SPDX) License Identfier <https://spdx.org/using-spdx-license-identifier>`_.
+`Software Package Data Exchange (SPDX) License Identifier <https://spdx.org/using-spdx-license-identifier>`_.
Generally this is the BSD License, except for code granted special exceptions.
The SPDX licences identifier is sufficient, a file should not contain
diff --git a/doc/guides/cryptodevs/scheduler.rst b/doc/guides/cryptodevs/scheduler.rst
index 835d999cfa..d08207f2e1 100644
--- a/doc/guides/cryptodevs/scheduler.rst
+++ b/doc/guides/cryptodevs/scheduler.rst
@@ -118,7 +118,7 @@ operation:
than the designated threshold, otherwise it will be handled by the secondary
worker.
- A typical usecase in this mode is with the QAT cryptodev as the primary and
+ A typical use case in this mode is with the QAT cryptodev as the primary and
a software cryptodev as the secondary worker. This may help applications to
process additional crypto workload than what the QAT cryptodev can handle on
its own, by making use of the available CPU cycles to deal with smaller
diff --git a/doc/guides/howto/pvp_reference_benchmark.rst b/doc/guides/howto/pvp_reference_benchmark.rst
index 553458ddce..484de3b7db 100644
--- a/doc/guides/howto/pvp_reference_benchmark.rst
+++ b/doc/guides/howto/pvp_reference_benchmark.rst
@@ -26,7 +26,7 @@ Setup overview
PVP setup using 2 NICs
-In this diagram, each red arrow represents one logical core. This use-case
+In this diagram, each red arrow represents one logical core. This use case
requires 6 dedicated logical cores. A forwarding configuration with a single
NIC is also possible, requiring 3 logical cores.
diff --git a/doc/guides/nics/bnx2x.rst b/doc/guides/nics/bnx2x.rst
index 9ad4f9f410..788a6dac08 100644
--- a/doc/guides/nics/bnx2x.rst
+++ b/doc/guides/nics/bnx2x.rst
@@ -105,7 +105,7 @@ Jumbo: Limitation
-----------------
Rx descriptor limit for number of segments per MTU is set to 1.
-PMD doesn't support Jumbo Rx scatter gather. Some applciations can
+PMD doesn't support Jumbo Rx scatter gather. Some applications can
adjust mbuf_size based on this param and max_pkt_len.
For others, PMD detects the condition where Rx packet length cannot
diff --git a/doc/guides/nics/dpaa.rst b/doc/guides/nics/dpaa.rst
index 917482dbe2..7355ec3059 100644
--- a/doc/guides/nics/dpaa.rst
+++ b/doc/guides/nics/dpaa.rst
@@ -297,7 +297,7 @@ FMC - FMAN Configuration Tool
The details can be found in FMC Doc at:
- `Frame Mnager Configuration Tool <https://www.nxp.com/docs/en/application-note/AN4760.pdf>`_.
+ `Frame Manager Configuration Tool <https://www.nxp.com/docs/en/application-note/AN4760.pdf>`_.
FMLIB
~~~~~
@@ -307,7 +307,7 @@ FMLIB
This is an alternate to the FMC based configuration. This library provides
direct ioctl based interfaces for FMAN configuration as used by the FMC tool
- as well. This helps in overcoming the main limitaiton of FMC - i.e. lack
+ as well. This helps in overcoming the main limitation of FMC - i.e. lack
of dynamic configuration.
The location for the fmd driver as used by FMLIB and FMC is as follows:
@@ -319,7 +319,7 @@ VSP (Virtual Storage Profile)
The storage profiled are means to provide virtualized interface. A ranges of
storage profiles cab be associated to Ethernet ports.
They are selected during classification. Specify how the frame should be
- written to memory and which buffer pool to select for packet storange in
+ written to memory and which buffer pool to select for packet storage in
queues. Start and End margin of buffer can also be configured.
Limitations
diff --git a/doc/guides/nics/mlx5.rst b/doc/guides/nics/mlx5.rst
index 78bf829fe5..84e58fc27b 100644
--- a/doc/guides/nics/mlx5.rst
+++ b/doc/guides/nics/mlx5.rst
@@ -1288,7 +1288,7 @@ the DPDK application.
echo -n "<device pci address" > /sys/bus/pci/drivers/mlx5_core/unbind
-5. Enbale switchdev mode::
+5. Enable switchdev mode::
echo switchdev > /sys/class/net/<net device>/compat/devlink/mode
diff --git a/doc/guides/nics/octeontx2.rst b/doc/guides/nics/octeontx2.rst
index a4f224424e..7b86cf5461 100644
--- a/doc/guides/nics/octeontx2.rst
+++ b/doc/guides/nics/octeontx2.rst
@@ -153,7 +153,7 @@ Runtime Config Options
-a 0002:02:00.0,max_sqb_count=64
- With the above configuration, each send queue's decscriptor buffer count is
+ With the above configuration, each send queue's descriptor buffer count is
limited to a maximum of 64 buffers.
- ``Switch header enable`` (default ``none``)
@@ -242,7 +242,7 @@ configure the following features:
#. Hierarchical scheduling
#. Single rate - Two color, Two rate - Three color shaping
-Both DWRR and Static Priority(SP) hierarchial scheduling is supported.
+Both DWRR and Static Priority(SP) hierarchical scheduling is supported.
Every parent can have atmost 10 SP Children and unlimited DWRR children.
diff --git a/doc/guides/nics/virtio.rst b/doc/guides/nics/virtio.rst
index aabd0f1bce..1f0aba3207 100644
--- a/doc/guides/nics/virtio.rst
+++ b/doc/guides/nics/virtio.rst
@@ -509,7 +509,7 @@ are shown in below table:
Split virtqueue in-order non-mergeable path virtio_recv_pkts_inorder virtio_xmit_pkts_inorder
Split virtqueue vectorized Rx path virtio_recv_pkts_vec virtio_xmit_pkts
Packed virtqueue mergeable path virtio_recv_mergeable_pkts_packed virtio_xmit_pkts_packed
- Packed virtqueue non-meregable path virtio_recv_pkts_packed virtio_xmit_pkts_packed
+ Packed virtqueue non-mergeable path virtio_recv_pkts_packed virtio_xmit_pkts_packed
Packed virtqueue in-order mergeable path virtio_recv_mergeable_pkts_packed virtio_xmit_pkts_packed
Packed virtqueue in-order non-mergeable path virtio_recv_pkts_packed virtio_xmit_pkts_packed
Packed virtqueue vectorized Rx path virtio_recv_pkts_packed_vec virtio_xmit_pkts_packed
diff --git a/doc/guides/platform/dpaa.rst b/doc/guides/platform/dpaa.rst
index 20a0e39329..389692907d 100644
--- a/doc/guides/platform/dpaa.rst
+++ b/doc/guides/platform/dpaa.rst
@@ -78,7 +78,7 @@ compatible board:
based config (if /tmp/fmc.bin is present). DPAA FMD will be used only if no
previous fmc config is existing.
- Note that fmlib based integratin rely on underlying fmd driver in kernel,
+ Note that fmlib based integration rely on underlying fmd driver in kernel,
which is available as part of NXP kernel or NXP SDK.
The following dependencies are not part of DPDK and must be installed
diff --git a/doc/guides/prog_guide/bbdev.rst b/doc/guides/prog_guide/bbdev.rst
index 6b2bd54e1a..9619280ffc 100644
--- a/doc/guides/prog_guide/bbdev.rst
+++ b/doc/guides/prog_guide/bbdev.rst
@@ -639,7 +639,7 @@ optionally the ``soft_output`` mbuf data pointers.
"soft output","soft LLR output buffer (optional)"
"op_flags","bitmask of all active operation capabilities"
"rv_index","redundancy version index [0..3]"
- "iter_max","maximum number of iterations to perofrm in decode all CBs"
+ "iter_max","maximum number of iterations to perform in decode all CBs"
"iter_min","minimum number of iterations to perform in decoding all CBs"
"iter_count","number of iterations to performed in decoding all CBs"
"ext_scale","scale factor on extrinsic info (5 bits)"
diff --git a/doc/guides/prog_guide/env_abstraction_layer.rst b/doc/guides/prog_guide/env_abstraction_layer.rst
index 1f30e13b8b..d124eb0e9a 100644
--- a/doc/guides/prog_guide/env_abstraction_layer.rst
+++ b/doc/guides/prog_guide/env_abstraction_layer.rst
@@ -465,7 +465,7 @@ devices would fail anyway.
- By default, the mempool, first asks for IOVA-contiguous memory using
``RTE_MEMZONE_IOVA_CONTIG``. This is slow in RTE_IOVA_PA mode and it may
affect the application boot time.
- - It is easy to enable large amount of IOVA-contiguous memory use-cases
+ - It is easy to enable large amount of IOVA-contiguous memory use cases
with IOVA in VA mode.
It is expected that all PCI drivers work in both RTE_IOVA_PA and
diff --git a/doc/guides/prog_guide/eventdev.rst b/doc/guides/prog_guide/eventdev.rst
index ccde086f63..347203f404 100644
--- a/doc/guides/prog_guide/eventdev.rst
+++ b/doc/guides/prog_guide/eventdev.rst
@@ -120,7 +120,7 @@ Ports
~~~~~
Ports are the points of contact between worker cores and the eventdev. The
-general use-case will see one CPU core using one port to enqueue and dequeue
+general use case will see one CPU core using one port to enqueue and dequeue
events from an eventdev. Ports are linked to queues in order to retrieve events
from those queues (more details in `Linking Queues and Ports`_ below).
diff --git a/doc/guides/prog_guide/multi_proc_support.rst b/doc/guides/prog_guide/multi_proc_support.rst
index 6b0ac30c5b..815e8bdc43 100644
--- a/doc/guides/prog_guide/multi_proc_support.rst
+++ b/doc/guides/prog_guide/multi_proc_support.rst
@@ -325,7 +325,7 @@ supported. However, since sending messages (not requests) does not involve an
IPC thread, sending messages while processing another message or request is
supported.
-Since the memory sybsystem uses IPC internally, memory allocations and IPC must
+Since the memory subsystem uses IPC internally, memory allocations and IPC must
not be mixed: it is not safe to use IPC inside a memory-related callback, nor is
it safe to allocate/free memory inside IPC callbacks. Attempting to do so may
lead to a deadlock.
diff --git a/doc/guides/prog_guide/qos_framework.rst b/doc/guides/prog_guide/qos_framework.rst
index 4e4ea33ccb..e403b90d74 100644
--- a/doc/guides/prog_guide/qos_framework.rst
+++ b/doc/guides/prog_guide/qos_framework.rst
@@ -737,7 +737,7 @@ Strict priority scheduling of traffic classes within the same pipe is implemente
which selects the queues in ascending order.
Therefore, queue 0 (associated with TC 0, highest priority TC) is handled before
queue 1 (TC 1, lower priority than TC 0),
-which is handled before queue 2 (TC 2, lower priority than TC 1) and it conitnues until queues of all TCs except the
+which is handled before queue 2 (TC 2, lower priority than TC 1) and it continues until queues of all TCs except the
lowest priority TC are handled. At last, queues 12..15 (best effort TC, lowest priority TC) are handled.
Upper Limit Enforcement
diff --git a/doc/guides/prog_guide/regexdev.rst b/doc/guides/prog_guide/regexdev.rst
index 3d8b591b56..5ca7e0c769 100644
--- a/doc/guides/prog_guide/regexdev.rst
+++ b/doc/guides/prog_guide/regexdev.rst
@@ -124,7 +124,7 @@ The configuration mode is depended on the PMD capabilities.
Online rule configuration is done using the following API functions:
``rte_regexdev_rule_db_update`` which add / remove rules from the rules
-precomplied list, and ``rte_regexdev_rule_db_compile_activate``
+precompiled list, and ``rte_regexdev_rule_db_compile_activate``
which compile the rules and loads them to the RegEx HW.
Offline rule configuration can be done by adding a pointer to the compiled
diff --git a/doc/guides/rawdevs/ioat.rst b/doc/guides/rawdevs/ioat.rst
index 250cfc48a6..59ba20740f 100644
--- a/doc/guides/rawdevs/ioat.rst
+++ b/doc/guides/rawdevs/ioat.rst
@@ -65,7 +65,7 @@ To assign an engine to a group::
$ accel-config config-engine dsa0/engine0.1 --group-id=1
To assign work queues to groups for passing descriptors to the engines a similar accel-config command can be used.
-However, the work queues also need to be configured depending on the use-case.
+However, the work queues also need to be configured depending on the use case.
Some configuration options include:
* mode (Dedicated/Shared): Indicates whether a WQ may accept jobs from multiple queues simultaneously.
diff --git a/doc/guides/rawdevs/ntb.rst b/doc/guides/rawdevs/ntb.rst
index 2c5fa7690c..2bb115d13f 100644
--- a/doc/guides/rawdevs/ntb.rst
+++ b/doc/guides/rawdevs/ntb.rst
@@ -17,7 +17,7 @@ some information by using scratchpad registers.
BIOS setting on Intel Xeon
--------------------------
-Intel Non-transparent Bridge needs special BIOS setting. The referencce for
+Intel Non-transparent Bridge needs special BIOS setting. The reference for
Skylake is https://www.intel.com/content/dam/support/us/en/documents/server-products/Intel_Xeon_Processor_Scalable_Family_BIOS_User_Guide.pdf
- Set the needed PCIe port as NTB to NTB mode on both hosts.
diff --git a/doc/guides/regexdevs/features_overview.rst b/doc/guides/regexdevs/features_overview.rst
index f90b394801..c512bde592 100644
--- a/doc/guides/regexdevs/features_overview.rst
+++ b/doc/guides/regexdevs/features_overview.rst
@@ -16,7 +16,7 @@ PCRE atomic grouping
Support PCRE atomic grouping.
PCRE back reference
- Support PCRE back regerence.
+ Support PCRE back reference.
PCRE back tracking ctrl
Support PCRE back tracking ctrl.
diff --git a/doc/guides/rel_notes/release_16_11.rst b/doc/guides/rel_notes/release_16_11.rst
index 92e0ec694e..3cec9143cf 100644
--- a/doc/guides/rel_notes/release_16_11.rst
+++ b/doc/guides/rel_notes/release_16_11.rst
@@ -77,7 +77,7 @@ New Features
the current version, even 64 bytes packets take two slots with Virtio PMD on guest
side.
- The main impact is better performance for 0% packet loss use-cases, as it
+ The main impact is better performance for 0% packet loss use cases, as it
behaves as if the virtqueue size was enlarged, so more packets can be buffered
in the case of system perturbations. On the downside, small performance degradations
were measured when running micro-benchmarks.
diff --git a/doc/guides/rel_notes/release_19_08.rst b/doc/guides/rel_notes/release_19_08.rst
index cbb27e8dc3..d2baa828b1 100644
--- a/doc/guides/rel_notes/release_19_08.rst
+++ b/doc/guides/rel_notes/release_19_08.rst
@@ -151,7 +151,7 @@ New Features
* Added multi-queue support to allow one af_xdp vdev with multiple netdev
queues.
* Enabled "need_wakeup" feature which can provide efficient support for the
- usecase where the application and driver executing on the same core.
+ use case where the application and driver executing on the same core.
* **Enabled infinite Rx in the PCAP PMD.**
diff --git a/doc/guides/rel_notes/release_2_2.rst b/doc/guides/rel_notes/release_2_2.rst
index cea5c8746d..8273473ff4 100644
--- a/doc/guides/rel_notes/release_2_2.rst
+++ b/doc/guides/rel_notes/release_2_2.rst
@@ -322,7 +322,7 @@ Drivers
Several customers have reported a link flap issue on 82579. The symptoms
are random and intermittent link losses when 82579 is connected to specific
- switches. the Issue was root caused as an inter-operability problem between
+ switches. the Issue was root caused as an interoperability problem between
the NIC and at least some Broadcom PHYs in the Energy Efficient Ethernet
wake mechanism.
diff --git a/doc/guides/sample_app_ug/fips_validation.rst b/doc/guides/sample_app_ug/fips_validation.rst
index ca37fc0b38..56df434215 100644
--- a/doc/guides/sample_app_ug/fips_validation.rst
+++ b/doc/guides/sample_app_ug/fips_validation.rst
@@ -113,7 +113,7 @@ where,
* mbuf-dataroom: By default the application creates mbuf pool with maximum
possible data room (65535 bytes). If the user wants to test scatter-gather
list feature of the PMD he or she may set this value to reduce the dataroom
- size so that the input data may be dividied into multiple chained mbufs.
+ size so that the input data may be divided into multiple chained mbufs.
To run the application in linux environment to test one AES FIPS test data
diff --git a/doc/guides/sample_app_ug/ipsec_secgw.rst b/doc/guides/sample_app_ug/ipsec_secgw.rst
index 176e292d3f..c07275e581 100644
--- a/doc/guides/sample_app_ug/ipsec_secgw.rst
+++ b/doc/guides/sample_app_ug/ipsec_secgw.rst
@@ -93,7 +93,7 @@ Additionally the event mode introduces two submodes of processing packets:
protocol use case, the worker thread resembles l2fwd worker thread as the IPsec
processing is done entirely in HW. This mode can be used to benchmark the raw
performance of the HW. The driver submode is selected with --single-sa option
- (used also by poll mode). When --single-sa option is used in conjution with event
+ (used also by poll mode). When --single-sa option is used in conjunction with event
mode then index passed to --single-sa is ignored.
* App submode: This submode has all the features currently implemented with the
diff --git a/doc/guides/sample_app_ug/performance_thread.rst b/doc/guides/sample_app_ug/performance_thread.rst
index 4c6a1dbe5c..9b09838f64 100644
--- a/doc/guides/sample_app_ug/performance_thread.rst
+++ b/doc/guides/sample_app_ug/performance_thread.rst
@@ -1176,7 +1176,7 @@ Tracing of events can be individually masked, and the mask may be programmed
at run time. An unmasked event results in a callback that provides information
about the event. The default callback simply prints trace information. The
default mask is 0 (all events off) the mask can be modified by calling the
-function ``lthread_diagniostic_set_mask()``.
+function ``lthread_diagnostic_set_mask()``.
It is possible register a user callback function to implement more
sophisticated diagnostic functions.
diff --git a/doc/guides/testpmd_app_ug/run_app.rst b/doc/guides/testpmd_app_ug/run_app.rst
index 6f9ff1316b..d76eb1032e 100644
--- a/doc/guides/testpmd_app_ug/run_app.rst
+++ b/doc/guides/testpmd_app_ug/run_app.rst
@@ -112,7 +112,7 @@ The command line options are:
Set the data size of the mbufs used to N bytes, where N < 65536.
The default value is 2048. If multiple mbuf-size values are specified the
extra memory pools will be created for allocating mbufs to receive packets
- with buffer splittling features.
+ with buffer splitting features.
* ``--total-num-mbufs=N``
diff --git a/doc/guides/testpmd_app_ug/testpmd_funcs.rst b/doc/guides/testpmd_app_ug/testpmd_funcs.rst
index 3187756892..a004d897d5 100644
--- a/doc/guides/testpmd_app_ug/testpmd_funcs.rst
+++ b/doc/guides/testpmd_app_ug/testpmd_funcs.rst
@@ -1732,7 +1732,7 @@ List all items from the ptype mapping table::
Where:
-* ``valid_only``: A flag indicates if only list valid items(=1) or all itemss(=0).
+* ``valid_only``: A flag indicates if only list valid items(=1) or all items(=0).
Replace a specific or a group of software defined ptype with a new one::
@@ -4767,7 +4767,7 @@ Sample Raw encapsulation rule
Raw encapsulation configuration can be set by the following commands
-Eecapsulating VxLAN::
+Encapsulating VxLAN::
testpmd> set raw_encap 4 eth src is 10:11:22:33:44:55 / vlan tci is 1
inner_type is 0x0800 / ipv4 / udp dst is 4789 / vxlan vni
diff --git a/doc/guides/tools/hugepages.rst b/doc/guides/tools/hugepages.rst
index 6d3f410b20..dd24c803de 100644
--- a/doc/guides/tools/hugepages.rst
+++ b/doc/guides/tools/hugepages.rst
@@ -62,7 +62,7 @@ Options
.. warning::
- While any user can run the ``dpdk-hugpages.py`` script to view the
+ While any user can run the ``dpdk-hugepages.py`` script to view the
status of huge pages, modifying the setup requires root privileges.
@@ -71,8 +71,8 @@ Examples
To display current huge page settings::
- dpdk-hugpages.py -s
+ dpdk-hugepages.py -s
To a complete setup of with 2 Gigabyte of 1G huge pages::
- dpdk-hugpages.py -p 1G --setup 2G
+ dpdk-hugepages.py -p 1G --setup 2G
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-08-03 12:35:09.107329284 +0100
+++ 0023-doc-fix-spelling.patch 2021-08-03 12:35:08.262819688 +0100
@@ -1 +1 @@
-From 9c30a6f3c9a456e8111a2b1e5f6c2c02a62025b6 Mon Sep 17 00:00:00 2001
+From cf52376b2d082868aa1b3dd7dbb910b8be0324bb Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 9c30a6f3c9a456e8111a2b1e5f6c2c02a62025b6 ]
+
@@ -10,2 +11,0 @@
-Cc: stable@dpdk.org
-
@@ -15 +14,0 @@
- doc/guides/cryptodevs/mlx5.rst | 4 ++--
@@ -22 +20,0 @@
- doc/guides/nics/txgbe.rst | 4 ++--
@@ -24 +21,0 @@
- doc/guides/platform/cnxk.rst | 2 +-
@@ -32 +28,0 @@
- doc/guides/prog_guide/toeplitz_hash_lib.rst | 8 ++++----
@@ -38 +33,0 @@
- doc/guides/rel_notes/release_21_08.rst | 2 +-
@@ -46 +41 @@
- 32 files changed, 43 insertions(+), 43 deletions(-)
+ 27 files changed, 33 insertions(+), 33 deletions(-)
@@ -49 +44 @@
-index 7601162c4f..d648689f10 100644
+index bb3f3efcbc..a2a8130c6b 100644
@@ -61,22 +55,0 @@
-diff --git a/doc/guides/cryptodevs/mlx5.rst b/doc/guides/cryptodevs/mlx5.rst
-index 908a25a98f..68bfdf3a83 100644
---- a/doc/guides/cryptodevs/mlx5.rst
-+++ b/doc/guides/cryptodevs/mlx5.rst
-@@ -99,7 +99,7 @@ The mlxreg dedicated tool should be used as follows:
- The "wrapped_crypto_operational" value will be "0x00000001" if the mode was
- successfully changed to operational mode.
-
-- The mlx5 crypto PMD can be verfied by running the test application::
-+ The mlx5 crypto PMD can be verified by running the test application::
-
- dpdk-test -c 1 -n 1 -w <dev>,class=crypto,wcs_file=<file_path>
- RTE>>cryptodev_mlx5_autotest
-@@ -130,7 +130,7 @@ Driver options
-
- - ``keytag`` parameter [int]
-
-- The plaintext of the keytag appanded to the AES-XTS keys, default value is 0.
-+ The plaintext of the keytag appended to the AES-XTS keys, default value is 0.
-
- - ``max_segs_num`` parameter [int]
-
@@ -154 +127 @@
-index a00793907f..3e9c736cae 100644
+index 78bf829fe5..84e58fc27b 100644
@@ -157 +130 @@
-@@ -1476,7 +1476,7 @@ the DPDK application.
+@@ -1288,7 +1288,7 @@ the DPDK application.
@@ -167 +140 @@
-index 258c1693fc..e35c8116f7 100644
+index a4f224424e..7b86cf5461 100644
@@ -188,22 +160,0 @@
-diff --git a/doc/guides/nics/txgbe.rst b/doc/guides/nics/txgbe.rst
-index 2c2b6549f1..47501796f2 100644
---- a/doc/guides/nics/txgbe.rst
-+++ b/doc/guides/nics/txgbe.rst
-@@ -86,7 +86,7 @@ TXGBE PMD provides the following log types available for control:
-
- - ``pmd.net.txgbe.bp`` (default level is **notice**)
-
-- Extra logging of auto-negtiation process for backplane NICs.
-+ Extra logging of auto-negotiation process for backplane NICs.
- Supply ``--log-level=pmd.net.txgbe.bp:debug`` to view messages.
-
- Runtime Options
-@@ -156,7 +156,7 @@ ingress or egress traffic, alter its fate and query related counters according
- to any number of user-defined rules.
-
- A flow rule is the combination of attributes with a matching pattern and a list of
--actions. Theorically one rule can match more than one filters, which named for
-+actions. Theoretically one rule can match more than one filters, which named for
- different patterns and actions. Like ethertype filter defines a rule in pattern:
- the first not void item can be ETH, and the next not void item must be END.
-
@@ -211 +162 @@
-index ac07d4d1e5..82ce7399ce 100644
+index aabd0f1bce..1f0aba3207 100644
@@ -223,13 +173,0 @@
-diff --git a/doc/guides/platform/cnxk.rst b/doc/guides/platform/cnxk.rst
-index 2325983604..d7adf43165 100644
---- a/doc/guides/platform/cnxk.rst
-+++ b/doc/guides/platform/cnxk.rst
-@@ -358,7 +358,7 @@ RPM example usage:
- Packets received with FrameCheckSequenceErrors: 0
- Packets received with VLAN header: 0
- Error packets: 0
-- Packets recievd with unicast DMAC: 0
-+ Packets received with unicast DMAC: 0
- Packets received with multicast DMAC: 0
- Packets received with broadcast DMAC: 0
- Dropped packets: 0
@@ -276 +214 @@
-index fda9c3743c..a49e486a30 100644
+index ccde086f63..347203f404 100644
@@ -279 +217 @@
-@@ -152,7 +152,7 @@ Ports
+@@ -120,7 +120,7 @@ Ports
@@ -302 +240 @@
-index 7d410d3cc6..3b8a1184b0 100644
+index 4e4ea33ccb..e403b90d74 100644
@@ -327,27 +264,0 @@
-diff --git a/doc/guides/prog_guide/toeplitz_hash_lib.rst b/doc/guides/prog_guide/toeplitz_hash_lib.rst
-index 83d5b0108f..f916857efc 100644
---- a/doc/guides/prog_guide/toeplitz_hash_lib.rst
-+++ b/doc/guides/prog_guide/toeplitz_hash_lib.rst
-@@ -41,7 +41,7 @@ but it expects ``rss_key`` to be converted to the host byte order.
- Predictable RSS
- ---------------
-
--In some usecases it is useful to have a way to find partial collisions of the
-+In some use cases it is useful to have a way to find partial collisions of the
- Toeplitz hash function. In figure :numref:`figure_rss_queue_assign` only a few
- of the least significant bits (LSB) of the hash value are used to indicate an
- entry in the RSS Redirection Table (ReTa) and thus the index of the queue. So,
-@@ -178,10 +178,10 @@ It expects:
- tuple, if the callback function returns an error.
-
-
--Usecase example
-----------------
-+Use case example
-+----------------
-
--There could be a number of different usecases, such as NAT, TCP stack, MPLS
-+There could be a number of different use cases, such as NAT, TCP stack, MPLS
- tag allocation, etc. In the following we will consider a SNAT application.
-
- Packets of a single bidirectional flow belonging to different directions can
@@ -355 +266 @@
-index 2ad13db294..a28e909935 100644
+index 250cfc48a6..59ba20740f 100644
@@ -419,13 +329,0 @@
-diff --git a/doc/guides/rel_notes/release_21_08.rst b/doc/guides/rel_notes/release_21_08.rst
-index 16bb9ce19e..c8b98ae878 100644
---- a/doc/guides/rel_notes/release_21_08.rst
-+++ b/doc/guides/rel_notes/release_21_08.rst
-@@ -152,7 +152,7 @@ New Features
-
- Added Baseband PHY PMD which allows to configure BPHY hardware block
- comprising accelerators and DSPs specifically tailored for 5G/LTE inline
-- usecases. Configuration happens via standard rawdev enq/deq operations. See
-+ use cases. Configuration happens via standard rawdev enq/deq operations. See
- the :doc:`../rawdevs/cnxk_bphy` rawdev guide for more details on this driver.
-
- * **Added support for Marvell CN10K, CN9K, event Rx/Tx adapter.**
@@ -459 +357 @@
-index 2dc39aa50a..78171b25f9 100644
+index 176e292d3f..c07275e581 100644
@@ -485 +383 @@
-index eb48318353..6061674239 100644
+index 6f9ff1316b..d76eb1032e 100644
@@ -498 +396 @@
-index 2c43719ad3..4f8751be1c 100644
+index 3187756892..a004d897d5 100644
@@ -501 +399 @@
-@@ -1742,7 +1742,7 @@ List all items from the ptype mapping table::
+@@ -1732,7 +1732,7 @@ List all items from the ptype mapping table::
@@ -510 +408 @@
-@@ -4842,7 +4842,7 @@ Sample Raw encapsulation rule
+@@ -4767,7 +4767,7 @@ Sample Raw encapsulation rule
^ permalink raw reply [flat|nested] 208+ messages in thread
* [dpdk-stable] patch 'doc: remove old deprecation notice for sched' has been queued to stable release 20.11.3
2021-08-03 12:21 ` [dpdk-stable] patch 'net/virtio: report maximum MTU in device info' " luca.boccassi
` (21 preceding siblings ...)
2021-08-03 12:22 ` [dpdk-stable] patch 'doc: fix spelling' " luca.boccassi
@ 2021-08-03 12:22 ` luca.boccassi
2021-08-03 12:22 ` [dpdk-stable] patch 'doc: update atomic operation deprecation' " luca.boccassi
23 siblings, 0 replies; 208+ messages in thread
From: luca.boccassi @ 2021-08-03 12:22 UTC (permalink / raw)
To: Jasvinder Singh; +Cc: Andrew Rybchenko, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.3
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/05/21. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/78b8978ef7405048b45a22a43d7dff7cee122ad1
Thanks.
Luca Boccassi
---
From 78b8978ef7405048b45a22a43d7dff7cee122ad1 Mon Sep 17 00:00:00 2001
From: Jasvinder Singh <jasvinder.singh@intel.com>
Date: Mon, 14 Jun 2021 17:30:00 +0100
Subject: [PATCH] doc: remove old deprecation notice for sched
[ upstream commit 8c98bf791cf0324cc0e13d12e1ce097bfd5670e7 ]
APIs and data structures hasve been modified as per deprecation
note, so removing deprecation notice from the notes.
Fixes: 85f52aa422d6 ("sched: add pipe config params to subport struct")
Signed-off-by: Jasvinder Singh <jasvinder.singh@intel.com>
Acked-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
---
doc/guides/rel_notes/deprecation.rst | 6 ------
1 file changed, 6 deletions(-)
diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst
index 2f498a0be4..95e3f286b5 100644
--- a/doc/guides/rel_notes/deprecation.rst
+++ b/doc/guides/rel_notes/deprecation.rst
@@ -127,12 +127,6 @@ Deprecation Notices
from the release: ``0x16c8, 0x16c9, 0x16ca, 0x16ce, 0x16cf, 0x16df,``
``0x16d0, 0x16d1, 0x16d2, 0x16d4, 0x16d5, 0x16e7, 0x16e8, 0x16e9``.
-* sched: To allow more traffic classes, flexible mapping of pipe queues to
- traffic classes, and subport level configuration of pipes and queues
- changes will be made to macros, data structures and API functions defined
- in "rte_sched.h". These changes are aligned to improvements suggested in the
- RFC https://mails.dpdk.org/archives/dev/2018-November/120035.html.
-
* metrics: The function ``rte_metrics_init`` will have a non-void return
in order to notify errors instead of calling ``rte_exit``.
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-08-03 12:35:09.161042295 +0100
+++ 0024-doc-remove-old-deprecation-notice-for-sched.patch 2021-08-03 12:35:08.262819688 +0100
@@ -1 +1 @@
-From 8c98bf791cf0324cc0e13d12e1ce097bfd5670e7 Mon Sep 17 00:00:00 2001
+From 78b8978ef7405048b45a22a43d7dff7cee122ad1 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 8c98bf791cf0324cc0e13d12e1ce097bfd5670e7 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -19 +20 @@
-index 6a35c7649a..61fadef915 100644
+index 2f498a0be4..95e3f286b5 100644
@@ -22,3 +23,3 @@
-@@ -135,12 +135,6 @@ Deprecation Notices
- values to the function ``rte_event_eth_rx_adapter_queue_add`` using
- the structure ``rte_event_eth_rx_adapter_queue_add``.
+@@ -127,12 +127,6 @@ Deprecation Notices
+ from the release: ``0x16c8, 0x16c9, 0x16ca, 0x16ce, 0x16cf, 0x16df,``
+ ``0x16d0, 0x16d1, 0x16d2, 0x16d4, 0x16d5, 0x16e7, 0x16e8, 0x16e9``.
^ permalink raw reply [flat|nested] 208+ messages in thread
* [dpdk-stable] patch 'doc: update atomic operation deprecation' has been queued to stable release 20.11.3
2021-08-03 12:21 ` [dpdk-stable] patch 'net/virtio: report maximum MTU in device info' " luca.boccassi
` (22 preceding siblings ...)
2021-08-03 12:22 ` [dpdk-stable] patch 'doc: remove old deprecation notice for sched' " luca.boccassi
@ 2021-08-03 12:22 ` luca.boccassi
2021-08-05 9:53 ` [dpdk-stable] patch 'net/mlx5: workaround drop action with old kernel' " luca.boccassi
23 siblings, 1 reply; 208+ messages in thread
From: luca.boccassi @ 2021-08-03 12:22 UTC (permalink / raw)
To: Joyce Kong; +Cc: Ruifeng Wang, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.3
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/05/21. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/12cc60e507cb0e34523ed5629abe7b957a75b652
Thanks.
Luca Boccassi
---
From 12cc60e507cb0e34523ed5629abe7b957a75b652 Mon Sep 17 00:00:00 2001
From: Joyce Kong <joyce.kong@arm.com>
Date: Fri, 23 Jul 2021 04:49:43 -0500
Subject: [PATCH] doc: update atomic operation deprecation
[ upstream commit 3ec965b6de12bf4454d12823a28b5bbe37bd1ce5 ]
Update the incorrect description about atomic operations
with provided wrappers in deprecation doc[1].
[1]https://mails.dpdk.org/archives/dev/2021-July/213333.html
Fixes: 7518c5c4ae6a ("doc: announce adoption of C11 atomic operations semantics")
Signed-off-by: Joyce Kong <joyce.kong@arm.com>
Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>
---
doc/guides/rel_notes/deprecation.rst | 18 ++++++++++--------
1 file changed, 10 insertions(+), 8 deletions(-)
diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst
index 95e3f286b5..c0d7efaba8 100644
--- a/doc/guides/rel_notes/deprecation.rst
+++ b/doc/guides/rel_notes/deprecation.rst
@@ -27,16 +27,18 @@ Deprecation Notices
* rte_atomicNN_xxx: These APIs do not take memory order parameter. This does
not allow for writing optimized code for all the CPU architectures supported
- in DPDK. DPDK will adopt C11 atomic operations semantics and provide wrappers
- using C11 atomic built-ins. These wrappers must be used for patches that
- need to be merged in 20.08 onwards. This change will not introduce any
- performance degradation.
+ in DPDK. DPDK has adopted the atomic operations from
+ https://gcc.gnu.org/onlinedocs/gcc/_005f_005fatomic-Builtins.html. These
+ operations must be used for patches that need to be merged in 20.08 onwards.
+ This change will not introduce any performance degradation.
* rte_smp_*mb: These APIs provide full barrier functionality. However, many
- use cases do not require full barriers. To support such use cases, DPDK will
- adopt C11 barrier semantics and provide wrappers using C11 atomic built-ins.
- These wrappers must be used for patches that need to be merged in 20.08
- onwards. This change will not introduce any performance degradation.
+ use cases do not require full barriers. To support such use cases, DPDK has
+ adopted atomic operations from
+ https://gcc.gnu.org/onlinedocs/gcc/_005f_005fatomic-Builtins.html. These
+ operations and a new wrapper ``rte_atomic_thread_fence`` instead of
+ ``__atomic_thread_fence`` must be used for patches that need to be merged in
+ 20.08 onwards. This change will not introduce any performance degradation.
* lib: will fix extending some enum/define breaking the ABI. There are multiple
samples in DPDK that enum/define terminated with a ``.*MAX.*`` value which is
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-08-03 12:35:09.193467310 +0100
+++ 0025-doc-update-atomic-operation-deprecation.patch 2021-08-03 12:35:08.262819688 +0100
@@ -1 +1 @@
-From 3ec965b6de12bf4454d12823a28b5bbe37bd1ce5 Mon Sep 17 00:00:00 2001
+From 12cc60e507cb0e34523ed5629abe7b957a75b652 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 3ec965b6de12bf4454d12823a28b5bbe37bd1ce5 ]
+
@@ -12 +13,0 @@
-Cc: stable@dpdk.org
@@ -21 +22 @@
-index 61fadef915..92db9e14bb 100644
+index 95e3f286b5..c0d7efaba8 100644
@@ -24 +25 @@
-@@ -19,16 +19,18 @@ Deprecation Notices
+@@ -27,16 +27,18 @@ Deprecation Notices
^ permalink raw reply [flat|nested] 208+ messages in thread
* [dpdk-stable] patch 'net/mlx5: workaround drop action with old kernel' has been queued to stable release 20.11.3
2021-08-03 12:22 ` [dpdk-stable] patch 'doc: update atomic operation deprecation' " luca.boccassi
@ 2021-08-05 9:53 ` luca.boccassi
2021-08-05 9:53 ` [dpdk-stable] patch 'bus: clarify log for non-NUMA-aware devices' " luca.boccassi
` (2 more replies)
0 siblings, 3 replies; 208+ messages in thread
From: luca.boccassi @ 2021-08-05 9:53 UTC (permalink / raw)
To: Suanming Mou; +Cc: Matan Azrad, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.3
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/07/21. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/53193aeeba442cc83bf58aec6449778ced80c465
Thanks.
Luca Boccassi
---
From 53193aeeba442cc83bf58aec6449778ced80c465 Mon Sep 17 00:00:00 2001
From: Suanming Mou <suanmingm@nvidia.com>
Date: Mon, 2 Aug 2021 17:30:24 +0300
Subject: [PATCH] net/mlx5: workaround drop action with old kernel
[ upstream commit 45633c460c223a67dd1a7cc084c3eceb5e17687c ]
Currently, there are two types of drop action implementation
in the PMD. One is the DR (Direct Rules) dummy placeholder drop
action and another is the dedicated dummy queue drop action.
When creates flow on the root table with DR drop action, the
action will be converted to MLX5_IB_ATTR_CREATE_FLOW_FLAGS_DROP
Verbs attribute in rdma-core.
In some inbox systems, MLX5_IB_ATTR_CREATE_FLOW_FLAGS_DROP Verbs
attribute may not be supported in the kernel driver. Create flow
with drop action on the root table will be failed as it is not
supported. In this case, the dummy queue drop action should be
used instead of DR dummy placeholder drop action.
This commit adds the DR drop action support detect on the root
table. If MLX5_IB_ATTR_CREATE_FLOW_FLAGS_DROP Verbs is not
supported in the system, a dummy queue will be used as drop
action.
Fixes: da845ae9d7c1 ("net/mlx5: fix drop action for Direct Rules/Verbs")
Signed-off-by: Suanming Mou <suanmingm@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
---
drivers/net/mlx5/linux/mlx5_os.c | 27 ++++++++++++
drivers/net/mlx5/mlx5.h | 1 +
drivers/net/mlx5/mlx5_flow.h | 1 +
drivers/net/mlx5/mlx5_flow_dv.c | 70 +++++++++++++++++++++++++++++++-
4 files changed, 98 insertions(+), 1 deletion(-)
diff --git a/drivers/net/mlx5/linux/mlx5_os.c b/drivers/net/mlx5/linux/mlx5_os.c
index b191fd740e..e4843f1c6d 100644
--- a/drivers/net/mlx5/linux/mlx5_os.c
+++ b/drivers/net/mlx5/linux/mlx5_os.c
@@ -651,6 +651,32 @@ mlx5_flow_counter_mode_config(struct rte_eth_dev *dev __rte_unused)
#endif
}
+/**
+ * DR flow drop action support detect.
+ *
+ * @param dev
+ * Pointer to rte_eth_dev structure.
+ *
+ */
+static void
+mlx5_flow_drop_action_config(struct rte_eth_dev *dev __rte_unused)
+{
+#ifdef HAVE_MLX5DV_DR
+ struct mlx5_priv *priv = dev->data->dev_private;
+
+ if (!priv->config.dv_flow_en || !priv->sh->dr_drop_action)
+ return;
+ /**
+ * DR supports drop action placeholder when it is supported;
+ * otherwise, use the queue drop action.
+ */
+ if (mlx5_flow_discover_dr_action_support(dev))
+ priv->root_drop_action = priv->drop_queue.hrxq->action;
+ else
+ priv->root_drop_action = priv->sh->dr_drop_action;
+#endif
+}
+
/**
* Spawn an Ethernet device from Verbs information.
*
@@ -1587,6 +1613,7 @@ err_secondary:
}
rte_spinlock_init(&priv->shared_act_sl);
mlx5_flow_counter_mode_config(eth_dev);
+ mlx5_flow_drop_action_config(eth_dev);
if (priv->config.dv_flow_en)
eth_dev->data->dev_flags |= RTE_ETH_DEV_FLOW_OPS_THREAD_SAFE;
return eth_dev;
diff --git a/drivers/net/mlx5/mlx5.h b/drivers/net/mlx5/mlx5.h
index 831838768a..1946110f7c 100644
--- a/drivers/net/mlx5/mlx5.h
+++ b/drivers/net/mlx5/mlx5.h
@@ -969,6 +969,7 @@ struct mlx5_priv {
unsigned int reta_idx_n; /* RETA index size. */
struct mlx5_drop drop_queue; /* Flow drop queues. */
uint32_t flows; /* RTE Flow rules. */
+ void *root_drop_action; /* Pointer to root drop action. */
uint32_t ctrl_flows; /* Control flow rules. */
rte_spinlock_t flow_list_lock;
struct mlx5_obj_ops obj_ops; /* HW objects operations. */
diff --git a/drivers/net/mlx5/mlx5_flow.h b/drivers/net/mlx5/mlx5_flow.h
index 9b72cde5ff..56af30c2bb 100644
--- a/drivers/net/mlx5/mlx5_flow.h
+++ b/drivers/net/mlx5/mlx5_flow.h
@@ -1429,6 +1429,7 @@ int mlx5_flow_meter_flush(struct rte_eth_dev *dev,
struct rte_mtr_error *error);
int mlx5_flow_dv_discover_counter_offset_support(struct rte_eth_dev *dev);
int mlx5_shared_action_flush(struct rte_eth_dev *dev);
+int mlx5_flow_discover_dr_action_support(struct rte_eth_dev *dev);
void mlx5_release_tunnel_hub(struct mlx5_dev_ctx_shared *sh, uint16_t port_id);
int mlx5_alloc_tunnel_hub(struct mlx5_dev_ctx_shared *sh);
diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c
index 1b9637ac44..1793683421 100644
--- a/drivers/net/mlx5/mlx5_flow_dv.c
+++ b/drivers/net/mlx5/mlx5_flow_dv.c
@@ -10840,7 +10840,9 @@ flow_dv_apply(struct rte_eth_dev *dev, struct rte_flow *flow,
#ifdef HAVE_MLX5DV_DR
/* DR supports drop action placeholder. */
MLX5_ASSERT(priv->sh->dr_drop_action);
- dv->actions[n++] = priv->sh->dr_drop_action;
+ dv->actions[n++] = dv->group ?
+ priv->sh->dr_drop_action :
+ priv->root_drop_action;
#else
/* For DV we use the explicit drop queue. */
MLX5_ASSERT(priv->drop_queue.hrxq);
@@ -12567,6 +12569,72 @@ error:
flow_dv_destroy_policer_rules(dev, fm, attr);
return -1;
}
+/**
+ * Check whether the DR drop action is supported on the root table or not.
+ *
+ * Create a simple flow with DR drop action on root table to validate
+ * if DR drop action on root table is supported or not.
+ *
+ * @param[in] dev
+ * Pointer to rte_eth_dev structure.
+ *
+ * @return
+ * 0 on success, a negative errno value otherwise and rte_errno is set.
+ */
+int
+mlx5_flow_discover_dr_action_support(struct rte_eth_dev *dev)
+{
+ struct mlx5_priv *priv = dev->data->dev_private;
+ struct mlx5_dev_ctx_shared *sh = priv->sh;
+ struct mlx5_flow_dv_match_params mask = {
+ .size = sizeof(mask.buf),
+ };
+ struct mlx5_flow_dv_match_params value = {
+ .size = sizeof(value.buf),
+ };
+ struct mlx5dv_flow_matcher_attr dv_attr = {
+ .type = IBV_FLOW_ATTR_NORMAL,
+ .priority = 0,
+ .match_criteria_enable = 0,
+ .match_mask = (void *)&mask,
+ };
+ struct mlx5_flow_tbl_resource *tbl = NULL;
+ void *matcher = NULL;
+ void *flow = NULL;
+ int ret = -1;
+
+ tbl = flow_dv_tbl_resource_get(dev, 0, 0, 0, false, NULL,
+ 0, 0, NULL);
+ if (!tbl)
+ goto err;
+ dv_attr.match_criteria_enable = flow_dv_matcher_enable(mask.buf);
+ ret = mlx5_flow_os_create_flow_matcher(sh->ctx, &dv_attr, tbl->obj,
+ &matcher);
+ if (ret)
+ goto err;
+ ret = mlx5_flow_os_create_flow(matcher, (void *)&value, 1,
+ &sh->dr_drop_action, &flow);
+err:
+ /*
+ * If DR drop action is not supported on root table, flow create will
+ * be failed with EOPNOTSUPP or EPROTONOSUPPORT.
+ */
+ if (!flow) {
+ if (matcher &&
+ (errno == EPROTONOSUPPORT || errno == EOPNOTSUPP))
+ DRV_LOG(INFO, "DR drop action is not supported in root table.");
+ else
+ DRV_LOG(ERR, "Unexpected error in DR drop action support detection");
+ ret = -1;
+ } else {
+ claim_zero(mlx5_flow_os_destroy_flow(flow));
+ }
+ if (matcher)
+ claim_zero(mlx5_flow_os_destroy_flow_matcher(matcher));
+ if (tbl)
+ flow_dv_tbl_resource_release(MLX5_SH(dev), tbl);
+ return ret;
+}
/**
* Validate the batch counter support in root table.
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-08-05 09:55:22.631834423 +0100
+++ 0001-net-mlx5-workaround-drop-action-with-old-kernel.patch 2021-08-05 09:55:22.594740105 +0100
@@ -1 +1 @@
-From 45633c460c223a67dd1a7cc084c3eceb5e17687c Mon Sep 17 00:00:00 2001
+From 53193aeeba442cc83bf58aec6449778ced80c465 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 45633c460c223a67dd1a7cc084c3eceb5e17687c ]
+
@@ -25 +26,0 @@
-Cc: stable@dpdk.org
@@ -33,2 +34,2 @@
- drivers/net/mlx5/mlx5_flow_dv.c | 72 +++++++++++++++++++++++++++++++-
- 4 files changed, 100 insertions(+), 1 deletion(-)
+ drivers/net/mlx5/mlx5_flow_dv.c | 70 +++++++++++++++++++++++++++++++-
+ 4 files changed, 98 insertions(+), 1 deletion(-)
@@ -37 +38 @@
-index c15a44de86..eeeca27ac2 100644
+index b191fd740e..e4843f1c6d 100644
@@ -40 +41 @@
-@@ -786,6 +786,32 @@ mlx5_flow_counter_mode_config(struct rte_eth_dev *dev __rte_unused)
+@@ -651,6 +651,32 @@ mlx5_flow_counter_mode_config(struct rte_eth_dev *dev __rte_unused)
@@ -70,4 +71,4 @@
- static void
- mlx5_queue_counter_id_prepare(struct rte_eth_dev *dev)
- {
-@@ -1875,6 +1901,7 @@ err_secondary:
+ /**
+ * Spawn an Ethernet device from Verbs information.
+ *
+@@ -1587,6 +1613,7 @@ err_secondary:
@@ -82 +83 @@
-index faafe3d3f1..34d66e93ad 100644
+index 831838768a..1946110f7c 100644
@@ -85,2 +86 @@
-@@ -1411,6 +1411,7 @@ struct mlx5_priv {
- unsigned int (*reta_idx)[]; /* RETA index table. */
+@@ -969,6 +969,7 @@ struct mlx5_priv {
@@ -88,0 +89 @@
+ uint32_t flows; /* RTE Flow rules. */
@@ -90,2 +90,0 @@
- struct mlx5_indexed_pool *flows[MLX5_FLOW_TYPE_MAXI];
- /* RTE Flow rules. */
@@ -92,0 +92,2 @@
+ rte_spinlock_t flow_list_lock;
+ struct mlx5_obj_ops obj_ops; /* HW objects operations. */
@@ -94 +95 @@
-index 22fa007b42..76ad53f2a1 100644
+index 9b72cde5ff..56af30c2bb 100644
@@ -97,3 +98,2 @@
-@@ -1572,6 +1572,7 @@ struct mlx5_flow_meter_sub_policy *mlx5_flow_meter_sub_policy_rss_prepare
- void mlx5_flow_destroy_sub_policy_with_rxq(struct rte_eth_dev *dev,
- struct mlx5_flow_meter_policy *mtr_policy);
+@@ -1429,6 +1429,7 @@ int mlx5_flow_meter_flush(struct rte_eth_dev *dev,
+ struct rte_mtr_error *error);
@@ -100,0 +101 @@
+ int mlx5_shared_action_flush(struct rte_eth_dev *dev);
@@ -102 +102,0 @@
- int mlx5_action_handle_flush(struct rte_eth_dev *dev);
@@ -104,0 +105 @@
+
@@ -106 +107 @@
-index ae0975e8b3..4644ae46bd 100644
+index 1b9637ac44..1793683421 100644
@@ -109 +110 @@
-@@ -13786,7 +13786,9 @@ flow_dv_apply(struct rte_eth_dev *dev, struct rte_flow *flow,
+@@ -10840,7 +10840,9 @@ flow_dv_apply(struct rte_eth_dev *dev, struct rte_flow *flow,
@@ -120,3 +121,3 @@
-@@ -17100,6 +17102,74 @@ flow_dv_destroy_sub_policy_with_rxq(struct rte_eth_dev *dev,
- }
- rte_spinlock_unlock(&mtr_policy->sl);
+@@ -12567,6 +12569,72 @@ error:
+ flow_dv_destroy_policer_rules(dev, fm, attr);
+ return -1;
@@ -159 +160 @@
-+ 0, 0, 0, NULL);
++ 0, 0, NULL);
@@ -163 +163,0 @@
-+ __flow_dv_adjust_buf_size(&mask.size, dv_attr.match_criteria_enable);
@@ -168 +167,0 @@
-+ __flow_dv_adjust_buf_size(&value.size, dv_attr.match_criteria_enable);
^ permalink raw reply [flat|nested] 208+ messages in thread
* [dpdk-stable] patch 'bus: clarify log for non-NUMA-aware devices' has been queued to stable release 20.11.3
2021-08-05 9:53 ` [dpdk-stable] patch 'net/mlx5: workaround drop action with old kernel' " luca.boccassi
@ 2021-08-05 9:53 ` luca.boccassi
2021-08-05 9:53 ` [dpdk-stable] patch 'app/testpmd: fix IPv4 checksum' " luca.boccassi
2021-08-09 8:29 ` [dpdk-stable] patch 'net/mlx5: workaround drop action with old kernel' " Luca Boccassi
2 siblings, 0 replies; 208+ messages in thread
From: luca.boccassi @ 2021-08-05 9:53 UTC (permalink / raw)
To: Dmitry Kozlyuk
Cc: Viacheslav Ovsiienko, Xueming Li, Andrew Rybchenko, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.3
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/07/21. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/bf76709d20d41e08adef3b342716d8a9d37c28c0
Thanks.
Luca Boccassi
---
From bf76709d20d41e08adef3b342716d8a9d37c28c0 Mon Sep 17 00:00:00 2001
From: Dmitry Kozlyuk <dkozlyuk@nvidia.com>
Date: Wed, 4 Aug 2021 11:03:01 +0300
Subject: [PATCH] bus: clarify log for non-NUMA-aware devices
[ upstream commit e9b3d79b0696cd983ace8e6f65532b240f43a1bb ]
PCI, vmbus, and auxiliary drivers printed a warning
when NUMA node had been reported as (-1) or not reported by OS:
EAL: Invalid NUMA socket, default to 0
This message and its level might confuse users because the configuration
is valid and nothing happens that requires attention or intervention.
It was also printed without the device identification and with an indent
(PCI only), which is confusing unless DEBUG logging is on to print
the header message with the device name.
Reduce level to INFO, reword the message, and suppress it when there is
only one NUMA node because NUMA awareness does not matter in this case.
Also, remove the indent for PCI.
Fixes: f0e0e86aa35d ("pci: move NUMA node check from scan to probe")
Fixes: 831dba47bd36 ("bus/vmbus: add Hyper-V virtual bus support")
Fixes: 1afce3086cf4 ("bus/auxiliary: introduce auxiliary bus")
Signed-off-by: Dmitry Kozlyuk <dkozlyuk@nvidia.com>
Reviewed-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
Reviewed-by: Xueming Li <xuemingl@nvidia.com>
Acked-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
---
doc/guides/nics/ena.rst | 2 +-
drivers/bus/pci/pci_common.c | 5 ++++-
drivers/bus/vmbus/vmbus_common.c | 5 ++++-
3 files changed, 9 insertions(+), 3 deletions(-)
diff --git a/doc/guides/nics/ena.rst b/doc/guides/nics/ena.rst
index 0f1f63f722..df720201f9 100644
--- a/doc/guides/nics/ena.rst
+++ b/doc/guides/nics/ena.rst
@@ -234,7 +234,7 @@ Example output:
[...]
EAL: PCI device 0000:00:06.0 on NUMA socket -1
- EAL: Invalid NUMA socket, default to 0
+ EAL: Device 0000:00:06.0 is not NUMA-aware, defaulting socket to 0
EAL: probe driver: 1d0f:ec20 net_ena
Interactive-mode selected
diff --git a/drivers/bus/pci/pci_common.c b/drivers/bus/pci/pci_common.c
index 9b8d769287..fa887de11b 100644
--- a/drivers/bus/pci/pci_common.c
+++ b/drivers/bus/pci/pci_common.c
@@ -16,6 +16,7 @@
#include <rte_bus.h>
#include <rte_pci.h>
#include <rte_bus_pci.h>
+#include <rte_lcore.h>
#include <rte_per_lcore.h>
#include <rte_memory.h>
#include <rte_eal.h>
@@ -190,7 +191,9 @@ rte_pci_probe_one_driver(struct rte_pci_driver *dr,
}
if (dev->device.numa_node < 0) {
- RTE_LOG(WARNING, EAL, " Invalid NUMA socket, default to 0\n");
+ if (rte_socket_count() > 1)
+ RTE_LOG(INFO, EAL, "Device %s is not NUMA-aware, defaulting socket to 0\n",
+ dev->name);
dev->device.numa_node = 0;
}
diff --git a/drivers/bus/vmbus/vmbus_common.c b/drivers/bus/vmbus/vmbus_common.c
index 39b3308577..09b8c3c5c8 100644
--- a/drivers/bus/vmbus/vmbus_common.c
+++ b/drivers/bus/vmbus/vmbus_common.c
@@ -15,6 +15,7 @@
#include <rte_eal.h>
#include <rte_tailq.h>
#include <rte_devargs.h>
+#include <rte_lcore.h>
#include <rte_malloc.h>
#include <rte_errno.h>
#include <rte_memory.h>
@@ -112,7 +113,9 @@ vmbus_probe_one_driver(struct rte_vmbus_driver *dr,
dev->driver = dr;
if (dev->device.numa_node < 0) {
- VMBUS_LOG(WARNING, " Invalid NUMA socket, default to 0");
+ if (rte_socket_count() > 1)
+ VMBUS_LOG(INFO, "Device %s is not NUMA-aware, defaulting socket to 0",
+ guid);
dev->device.numa_node = 0;
}
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-08-05 09:55:22.682829677 +0100
+++ 0002-bus-clarify-log-for-non-NUMA-aware-devices.patch 2021-08-05 09:55:22.598740183 +0100
@@ -1 +1 @@
-From e9b3d79b0696cd983ace8e6f65532b240f43a1bb Mon Sep 17 00:00:00 2001
+From bf76709d20d41e08adef3b342716d8a9d37c28c0 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit e9b3d79b0696cd983ace8e6f65532b240f43a1bb ]
+
@@ -24 +25,0 @@
-Cc: stable@dpdk.org
@@ -31,5 +32,4 @@
- doc/guides/nics/ena.rst | 2 +-
- drivers/bus/auxiliary/auxiliary_common.c | 5 ++++-
- drivers/bus/pci/pci_common.c | 5 ++++-
- drivers/bus/vmbus/vmbus_common.c | 5 ++++-
- 4 files changed, 13 insertions(+), 4 deletions(-)
+ doc/guides/nics/ena.rst | 2 +-
+ drivers/bus/pci/pci_common.c | 5 ++++-
+ drivers/bus/vmbus/vmbus_common.c | 5 ++++-
+ 3 files changed, 9 insertions(+), 3 deletions(-)
@@ -38 +38 @@
-index 63951098ea..92b1858e7a 100644
+index 0f1f63f722..df720201f9 100644
@@ -41 +41 @@
-@@ -246,7 +246,7 @@ Example output:
+@@ -234,7 +234,7 @@ Example output:
@@ -50,23 +49,0 @@
-diff --git a/drivers/bus/auxiliary/auxiliary_common.c b/drivers/bus/auxiliary/auxiliary_common.c
-index 89e653c54e..603b6fdc02 100644
---- a/drivers/bus/auxiliary/auxiliary_common.c
-+++ b/drivers/bus/auxiliary/auxiliary_common.c
-@@ -17,6 +17,7 @@
- #include <rte_memory.h>
- #include <rte_eal.h>
- #include <rte_eal_paging.h>
-+#include <rte_lcore.h>
- #include <rte_string_fns.h>
- #include <rte_common.h>
- #include <rte_devargs.h>
-@@ -106,7 +107,9 @@ rte_auxiliary_probe_one_driver(struct rte_auxiliary_driver *drv,
- }
-
- if (dev->device.numa_node < 0) {
-- AUXILIARY_LOG(INFO, "Device is not NUMA-aware, defaulting NUMA node to 0");
-+ if (rte_socket_count() > 1)
-+ AUXILIARY_LOG(INFO, "Device %s is not NUMA-aware, defaulting socket to 0",
-+ dev->name);
- dev->device.numa_node = 0;
- }
-
@@ -74 +51 @@
-index 35d7d092d1..79a6fcffbd 100644
+index 9b8d769287..fa887de11b 100644
@@ -97 +74 @@
-index d25fd14ef5..519ca9c6fe 100644
+index 39b3308577..09b8c3c5c8 100644
^ permalink raw reply [flat|nested] 208+ messages in thread
* [dpdk-stable] patch 'app/testpmd: fix IPv4 checksum' has been queued to stable release 20.11.3
2021-08-05 9:53 ` [dpdk-stable] patch 'net/mlx5: workaround drop action with old kernel' " luca.boccassi
2021-08-05 9:53 ` [dpdk-stable] patch 'bus: clarify log for non-NUMA-aware devices' " luca.boccassi
@ 2021-08-05 9:53 ` luca.boccassi
2021-08-09 8:29 ` [dpdk-stable] patch 'net/mlx5: workaround drop action with old kernel' " Luca Boccassi
2 siblings, 0 replies; 208+ messages in thread
From: luca.boccassi @ 2021-08-05 9:53 UTC (permalink / raw)
To: Gregory Etelson; +Cc: Ajit Khaparde, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.3
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/07/21. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/62ff84ca2a6752e24f6fa7a96e8abc3ffd749240
Thanks.
Luca Boccassi
---
From 62ff84ca2a6752e24f6fa7a96e8abc3ffd749240 Mon Sep 17 00:00:00 2001
From: Gregory Etelson <getelson@nvidia.com>
Date: Mon, 2 Aug 2021 21:13:16 +0300
Subject: [PATCH] app/testpmd: fix IPv4 checksum
[ upstream commit de73c8ac50681a0b9221407a100a2c578f7e6ad3 ]
UDP protocol reserves 0 checksum value for special purposes.
Other protocols, like IPv4, TCP and SCTP must calculate checksum value
in software or offload checksum calculation to hardware.
If IPv4 TX checksum offload was off and header checksum was set to 0,
testpmd csum engine did not calculate checksum value for IPv4, TCP and
SCTP.
The patch always calculates IPv4, TCP and SCTP TX checksums if it is
not offloaded.
Bugzilla ID: 768
Fixes: b2a9e4a855d0 ("app/testpmd: fix Tx checksum calculation for tunnel")
Signed-off-by: Gregory Etelson <getelson@nvidia.com>
Acked-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
app/test-pmd/csumonly.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/app/test-pmd/csumonly.c b/app/test-pmd/csumonly.c
index 73a78f955c..b0a58e8573 100644
--- a/app/test-pmd/csumonly.c
+++ b/app/test-pmd/csumonly.c
@@ -487,7 +487,7 @@ process_inner_cksums(void *l3_hdr, const struct testpmd_offload_info *info,
} else {
if (tx_offloads & DEV_TX_OFFLOAD_IPV4_CKSUM) {
ol_flags |= PKT_TX_IP_CKSUM;
- } else if (ipv4_hdr->hdr_checksum != 0) {
+ } else {
ipv4_hdr->hdr_checksum = 0;
ipv4_hdr->hdr_checksum =
rte_ipv4_cksum(ipv4_hdr);
@@ -519,7 +519,7 @@ process_inner_cksums(void *l3_hdr, const struct testpmd_offload_info *info,
ol_flags |= PKT_TX_TCP_SEG;
else if (tx_offloads & DEV_TX_OFFLOAD_TCP_CKSUM) {
ol_flags |= PKT_TX_TCP_CKSUM;
- } else if (tcp_hdr->cksum != 0) {
+ } else {
tcp_hdr->cksum = 0;
tcp_hdr->cksum =
get_udptcp_checksum(l3_hdr, tcp_hdr,
@@ -535,7 +535,7 @@ process_inner_cksums(void *l3_hdr, const struct testpmd_offload_info *info,
if ((tx_offloads & DEV_TX_OFFLOAD_SCTP_CKSUM) &&
((ipv4_hdr->total_length & 0x3) == 0)) {
ol_flags |= PKT_TX_SCTP_CKSUM;
- } else if (sctp_hdr->cksum != 0) {
+ } else {
sctp_hdr->cksum = 0;
/* XXX implement CRC32c, example available in
* RFC3309 */
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-08-05 09:55:22.718756913 +0100
+++ 0003-app-testpmd-fix-IPv4-checksum.patch 2021-08-05 09:55:22.598740183 +0100
@@ -1 +1 @@
-From de73c8ac50681a0b9221407a100a2c578f7e6ad3 Mon Sep 17 00:00:00 2001
+From 62ff84ca2a6752e24f6fa7a96e8abc3ffd749240 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit de73c8ac50681a0b9221407a100a2c578f7e6ad3 ]
+
@@ -19 +20,0 @@
-Cc: stable@dpdk.org
@@ -28 +29 @@
-index bd5ad64a57..607c889359 100644
+index 73a78f955c..b0a58e8573 100644
^ permalink raw reply [flat|nested] 208+ messages in thread
* Re: [dpdk-stable] patch 'net/mlx5: workaround drop action with old kernel' has been queued to stable release 20.11.3
2021-08-05 9:53 ` [dpdk-stable] patch 'net/mlx5: workaround drop action with old kernel' " luca.boccassi
2021-08-05 9:53 ` [dpdk-stable] patch 'bus: clarify log for non-NUMA-aware devices' " luca.boccassi
2021-08-05 9:53 ` [dpdk-stable] patch 'app/testpmd: fix IPv4 checksum' " luca.boccassi
@ 2021-08-09 8:29 ` Luca Boccassi
2 siblings, 0 replies; 208+ messages in thread
From: Luca Boccassi @ 2021-08-09 8:29 UTC (permalink / raw)
To: Suanming Mou; +Cc: Matan Azrad, dpdk stable
Hi,
Please triple-check this one, as the merge conflict was not trivial -
there's no __flow_dv_adjust_buf_size() in 20.11.
Thank you.
On Thu, 2021-08-05 at 10:53 +0100, luca.boccassi@gmail.com wrote:
> Hi,
>
> FYI, your patch has been queued to stable release 20.11.3
>
> Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
> It will be pushed if I get no objections before 08/07/21. 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/bluca/dpdk-stable
>
> This queued commit can be viewed at:
> https://github.com/bluca/dpdk-stable/commit/53193aeeba442cc83bf58aec6449778ced80c465
>
> Thanks.
>
> Luca Boccassi
>
> ---
> From 53193aeeba442cc83bf58aec6449778ced80c465 Mon Sep 17 00:00:00 2001
> From: Suanming Mou <suanmingm@nvidia.com>
> Date: Mon, 2 Aug 2021 17:30:24 +0300
> Subject: [PATCH] net/mlx5: workaround drop action with old kernel
>
> [ upstream commit 45633c460c223a67dd1a7cc084c3eceb5e17687c ]
>
> Currently, there are two types of drop action implementation
> in the PMD. One is the DR (Direct Rules) dummy placeholder drop
> action and another is the dedicated dummy queue drop action.
> When creates flow on the root table with DR drop action, the
> action will be converted to MLX5_IB_ATTR_CREATE_FLOW_FLAGS_DROP
> Verbs attribute in rdma-core.
>
> In some inbox systems, MLX5_IB_ATTR_CREATE_FLOW_FLAGS_DROP Verbs
> attribute may not be supported in the kernel driver. Create flow
> with drop action on the root table will be failed as it is not
> supported. In this case, the dummy queue drop action should be
> used instead of DR dummy placeholder drop action.
>
> This commit adds the DR drop action support detect on the root
> table. If MLX5_IB_ATTR_CREATE_FLOW_FLAGS_DROP Verbs is not
> supported in the system, a dummy queue will be used as drop
> action.
>
> Fixes: da845ae9d7c1 ("net/mlx5: fix drop action for Direct Rules/Verbs")
>
> Signed-off-by: Suanming Mou <suanmingm@nvidia.com>
> Acked-by: Matan Azrad <matan@nvidia.com>
> ---
> drivers/net/mlx5/linux/mlx5_os.c | 27 ++++++++++++
> drivers/net/mlx5/mlx5.h | 1 +
> drivers/net/mlx5/mlx5_flow.h | 1 +
> drivers/net/mlx5/mlx5_flow_dv.c | 70 +++++++++++++++++++++++++++++++-
> 4 files changed, 98 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/net/mlx5/linux/mlx5_os.c b/drivers/net/mlx5/linux/mlx5_os.c
> index b191fd740e..e4843f1c6d 100644
> --- a/drivers/net/mlx5/linux/mlx5_os.c
> +++ b/drivers/net/mlx5/linux/mlx5_os.c
> @@ -651,6 +651,32 @@ mlx5_flow_counter_mode_config(struct rte_eth_dev *dev __rte_unused)
> #endif
> }
>
> +/**
> + * DR flow drop action support detect.
> + *
> + * @param dev
> + * Pointer to rte_eth_dev structure.
> + *
> + */
> +static void
> +mlx5_flow_drop_action_config(struct rte_eth_dev *dev __rte_unused)
> +{
> +#ifdef HAVE_MLX5DV_DR
> + struct mlx5_priv *priv = dev->data->dev_private;
> +
> + if (!priv->config.dv_flow_en || !priv->sh->dr_drop_action)
> + return;
> + /**
> + * DR supports drop action placeholder when it is supported;
> + * otherwise, use the queue drop action.
> + */
> + if (mlx5_flow_discover_dr_action_support(dev))
> + priv->root_drop_action = priv->drop_queue.hrxq->action;
> + else
> + priv->root_drop_action = priv->sh->dr_drop_action;
> +#endif
> +}
> +
> /**
> * Spawn an Ethernet device from Verbs information.
> *
> @@ -1587,6 +1613,7 @@ err_secondary:
> }
> rte_spinlock_init(&priv->shared_act_sl);
> mlx5_flow_counter_mode_config(eth_dev);
> + mlx5_flow_drop_action_config(eth_dev);
> if (priv->config.dv_flow_en)
> eth_dev->data->dev_flags |= RTE_ETH_DEV_FLOW_OPS_THREAD_SAFE;
> return eth_dev;
> diff --git a/drivers/net/mlx5/mlx5.h b/drivers/net/mlx5/mlx5.h
> index 831838768a..1946110f7c 100644
> --- a/drivers/net/mlx5/mlx5.h
> +++ b/drivers/net/mlx5/mlx5.h
> @@ -969,6 +969,7 @@ struct mlx5_priv {
> unsigned int reta_idx_n; /* RETA index size. */
> struct mlx5_drop drop_queue; /* Flow drop queues. */
> uint32_t flows; /* RTE Flow rules. */
> + void *root_drop_action; /* Pointer to root drop action. */
> uint32_t ctrl_flows; /* Control flow rules. */
> rte_spinlock_t flow_list_lock;
> struct mlx5_obj_ops obj_ops; /* HW objects operations. */
> diff --git a/drivers/net/mlx5/mlx5_flow.h b/drivers/net/mlx5/mlx5_flow.h
> index 9b72cde5ff..56af30c2bb 100644
> --- a/drivers/net/mlx5/mlx5_flow.h
> +++ b/drivers/net/mlx5/mlx5_flow.h
> @@ -1429,6 +1429,7 @@ int mlx5_flow_meter_flush(struct rte_eth_dev *dev,
> struct rte_mtr_error *error);
> int mlx5_flow_dv_discover_counter_offset_support(struct rte_eth_dev *dev);
> int mlx5_shared_action_flush(struct rte_eth_dev *dev);
> +int mlx5_flow_discover_dr_action_support(struct rte_eth_dev *dev);
> void mlx5_release_tunnel_hub(struct mlx5_dev_ctx_shared *sh, uint16_t port_id);
> int mlx5_alloc_tunnel_hub(struct mlx5_dev_ctx_shared *sh);
>
> diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c
> index 1b9637ac44..1793683421 100644
> --- a/drivers/net/mlx5/mlx5_flow_dv.c
> +++ b/drivers/net/mlx5/mlx5_flow_dv.c
> @@ -10840,7 +10840,9 @@ flow_dv_apply(struct rte_eth_dev *dev, struct rte_flow *flow,
> #ifdef HAVE_MLX5DV_DR
> /* DR supports drop action placeholder. */
> MLX5_ASSERT(priv->sh->dr_drop_action);
> - dv->actions[n++] = priv->sh->dr_drop_action;
> + dv->actions[n++] = dv->group ?
> + priv->sh->dr_drop_action :
> + priv->root_drop_action;
> #else
> /* For DV we use the explicit drop queue. */
> MLX5_ASSERT(priv->drop_queue.hrxq);
> @@ -12567,6 +12569,72 @@ error:
> flow_dv_destroy_policer_rules(dev, fm, attr);
> return -1;
> }
> +/**
> + * Check whether the DR drop action is supported on the root table or not.
> + *
> + * Create a simple flow with DR drop action on root table to validate
> + * if DR drop action on root table is supported or not.
> + *
> + * @param[in] dev
> + * Pointer to rte_eth_dev structure.
> + *
> + * @return
> + * 0 on success, a negative errno value otherwise and rte_errno is set.
> + */
> +int
> +mlx5_flow_discover_dr_action_support(struct rte_eth_dev *dev)
> +{
> + struct mlx5_priv *priv = dev->data->dev_private;
> + struct mlx5_dev_ctx_shared *sh = priv->sh;
> + struct mlx5_flow_dv_match_params mask = {
> + .size = sizeof(mask.buf),
> + };
> + struct mlx5_flow_dv_match_params value = {
> + .size = sizeof(value.buf),
> + };
> + struct mlx5dv_flow_matcher_attr dv_attr = {
> + .type = IBV_FLOW_ATTR_NORMAL,
> + .priority = 0,
> + .match_criteria_enable = 0,
> + .match_mask = (void *)&mask,
> + };
> + struct mlx5_flow_tbl_resource *tbl = NULL;
> + void *matcher = NULL;
> + void *flow = NULL;
> + int ret = -1;
> +
> + tbl = flow_dv_tbl_resource_get(dev, 0, 0, 0, false, NULL,
> + 0, 0, NULL);
> + if (!tbl)
> + goto err;
> + dv_attr.match_criteria_enable = flow_dv_matcher_enable(mask.buf);
> + ret = mlx5_flow_os_create_flow_matcher(sh->ctx, &dv_attr, tbl->obj,
> + &matcher);
> + if (ret)
> + goto err;
> + ret = mlx5_flow_os_create_flow(matcher, (void *)&value, 1,
> + &sh->dr_drop_action, &flow);
> +err:
> + /*
> + * If DR drop action is not supported on root table, flow create will
> + * be failed with EOPNOTSUPP or EPROTONOSUPPORT.
> + */
> + if (!flow) {
> + if (matcher &&
> + (errno == EPROTONOSUPPORT || errno == EOPNOTSUPP))
> + DRV_LOG(INFO, "DR drop action is not supported in root table.");
> + else
> + DRV_LOG(ERR, "Unexpected error in DR drop action support detection");
> + ret = -1;
> + } else {
> + claim_zero(mlx5_flow_os_destroy_flow(flow));
> + }
> + if (matcher)
> + claim_zero(mlx5_flow_os_destroy_flow_matcher(matcher));
> + if (tbl)
> + flow_dv_tbl_resource_release(MLX5_SH(dev), tbl);
> + return ret;
> +}
>
> /**
> * Validate the batch counter support in root table.
^ permalink raw reply [flat|nested] 208+ messages in thread