* [dpdk-stable] patch 'gro: fix typo in map file' has been queued to stable release 17.08.1
@ 2017-11-21 13:15 Yuanhan Liu
2017-11-21 13:15 ` [dpdk-stable] patch 'service: fix build with gcc 4.9' " Yuanhan Liu
` (189 more replies)
0 siblings, 190 replies; 191+ messages in thread
From: Yuanhan Liu @ 2017-11-21 13:15 UTC (permalink / raw)
To: Jiayu Hu; +Cc: Ferruh Yigit, dpdk stable
Hi,
FYI, your patch has been queued to stable release 17.08.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/24/17. So please
shout if anyone has objections.
Thanks.
--yliu
---
>From 62dbb2d7d1c87641c06021b4c1f4490d990ead26 Mon Sep 17 00:00:00 2001
From: Jiayu Hu <jiayu.hu@intel.com>
Date: Tue, 22 Aug 2017 21:58:49 +0800
Subject: [PATCH] gro: fix typo in map file
[ upstream commit 6e99ff9e46213e4f74aa2e6b2ef9c634dbe6df03 ]
The names of rte_gro_ctx_create() and rte_gro_ctx_destroy() in
rte_gro_version.map are incorrect. This patch is to fix this issue.
Fixes: e996506a1c07 ("lib/gro: add Generic Receive Offload API framework")
Signed-off-by: Jiayu Hu <jiayu.hu@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
lib/librte_gro/rte_gro_version.map | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/lib/librte_gro/rte_gro_version.map b/lib/librte_gro/rte_gro_version.map
index bb40bb4..1606b6d 100644
--- a/lib/librte_gro/rte_gro_version.map
+++ b/lib/librte_gro/rte_gro_version.map
@@ -1,8 +1,8 @@
DPDK_17.08 {
global:
- rte_gro_ctrl_create;
- rte_gro_ctrl_destroy;
+ rte_gro_ctx_create;
+ rte_gro_ctx_destroy;
rte_gro_get_pkt_count;
rte_gro_reassemble;
rte_gro_reassemble_burst;
--
2.7.4
^ permalink raw reply [flat|nested] 191+ messages in thread
* [dpdk-stable] patch 'service: fix build with gcc 4.9' has been queued to stable release 17.08.1
2017-11-21 13:15 [dpdk-stable] patch 'gro: fix typo in map file' has been queued to stable release 17.08.1 Yuanhan Liu
@ 2017-11-21 13:15 ` Yuanhan Liu
2017-11-21 13:15 ` [dpdk-stable] patch 'eal: initialize logging before bus' " Yuanhan Liu
` (188 subsequent siblings)
189 siblings, 0 replies; 191+ messages in thread
From: Yuanhan Liu @ 2017-11-21 13:15 UTC (permalink / raw)
To: Yi Yang; +Cc: Harry van Haaren, dpdk stable
Hi,
FYI, your patch has been queued to stable release 17.08.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/24/17. So please
shout if anyone has objections.
Thanks.
--yliu
---
>From a1eb0d497abf5963fbbf66f1a7aec5c84b8c5282 Mon Sep 17 00:00:00 2001
From: Yi Yang <yi.y.yang@intel.com>
Date: Thu, 21 Sep 2017 09:50:43 +0800
Subject: [PATCH] service: fix build with gcc 4.9
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
[ upstream commit ca13673513b656e632d5b348de2aa448b55ba9de ]
Some compilers detect this error:
error: ‘ids[0]’ may be used uninitialized in this function
ret = rte_service_map_lcore_set(i, ids[lcore_iter], 1);
It can be reproduced very easily on Fedora 21 with
gcc-4.9.2-6.fc21.x86_64.
Fixes: 21698354c832 ("service: introduce service cores concept")
Signed-off-by: Yi Yang <yi.y.yang@intel.com>
Acked-by: Harry van Haaren <harry.van.haaren@intel.com>
---
lib/librte_eal/common/rte_service.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/librte_eal/common/rte_service.c b/lib/librte_eal/common/rte_service.c
index 7efb76d..57ff4c1 100644
--- a/lib/librte_eal/common/rte_service.c
+++ b/lib/librte_eal/common/rte_service.c
@@ -407,7 +407,7 @@ rte_service_start_with_defaults(void)
uint32_t count = rte_service_get_count();
int32_t lcore_iter = 0;
- uint32_t ids[RTE_MAX_LCORE];
+ uint32_t ids[RTE_MAX_LCORE] = {0};
int32_t lcore_count = rte_service_lcore_list(ids, RTE_MAX_LCORE);
if (lcore_count == 0)
--
2.7.4
^ permalink raw reply [flat|nested] 191+ messages in thread
* [dpdk-stable] patch 'eal: initialize logging before bus' has been queued to stable release 17.08.1
2017-11-21 13:15 [dpdk-stable] patch 'gro: fix typo in map file' has been queued to stable release 17.08.1 Yuanhan Liu
2017-11-21 13:15 ` [dpdk-stable] patch 'service: fix build with gcc 4.9' " Yuanhan Liu
@ 2017-11-21 13:15 ` Yuanhan Liu
2017-11-21 13:15 ` [dpdk-stable] patch 'ethdev: fix ABI version' " Yuanhan Liu
` (187 subsequent siblings)
189 siblings, 0 replies; 191+ messages in thread
From: Yuanhan Liu @ 2017-11-21 13:15 UTC (permalink / raw)
To: Stephen Hemminger; +Cc: Stephen Hemminger, dpdk stable
Hi,
FYI, your patch has been queued to stable release 17.08.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/24/17. So please
shout if anyone has objections.
Thanks.
--yliu
---
>From 67423d8347b8c68fa9a24e7d468dde9b9f03ef1b Mon Sep 17 00:00:00 2001
From: Stephen Hemminger <stephen@networkplumber.org>
Date: Mon, 28 Aug 2017 11:13:31 -0700
Subject: [PATCH] eal: initialize logging before bus
[ upstream commit f0dab530f41689651192cebd7683cddbfc9991e2 ]
Any log messages during bus initialization maybe lost because
the bus registration constructor is called before the logging constructor.
Fixes: a97725791eec ("bus: introduce bus abstraction")
Signed-off-by: Stephen Hemminger <sthemmin@microsoft.com>
---
lib/librte_eal/common/eal_common_log.c | 3 ++-
lib/librte_eal/common/include/rte_bus.h | 2 +-
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/lib/librte_eal/common/eal_common_log.c b/lib/librte_eal/common/eal_common_log.c
index 0e3b932..b62b0a6 100644
--- a/lib/librte_eal/common/eal_common_log.c
+++ b/lib/librte_eal/common/eal_common_log.c
@@ -289,7 +289,8 @@ static const struct logtype logtype_strings[] = {
{RTE_LOGTYPE_USER8, "user8"}
};
-RTE_INIT(rte_log_init);
+/* Logging should be first initialzer (before drivers and bus) */
+RTE_INIT_PRIO(rte_log_init, 101);
static void
rte_log_init(void)
{
diff --git a/lib/librte_eal/common/include/rte_bus.h b/lib/librte_eal/common/include/rte_bus.h
index c79368d..8f8b099 100644
--- a/lib/librte_eal/common/include/rte_bus.h
+++ b/lib/librte_eal/common/include/rte_bus.h
@@ -285,7 +285,7 @@ struct rte_bus *rte_bus_find_by_name(const char *busname);
* The constructor has higher priority than PMD constructors.
*/
#define RTE_REGISTER_BUS(nm, bus) \
-RTE_INIT_PRIO(businitfn_ ##nm, 101); \
+RTE_INIT_PRIO(businitfn_ ##nm, 110); \
static void businitfn_ ##nm(void) \
{\
(bus).name = RTE_STR(nm);\
--
2.7.4
^ permalink raw reply [flat|nested] 191+ messages in thread
* [dpdk-stable] patch 'ethdev: fix ABI version' has been queued to stable release 17.08.1
2017-11-21 13:15 [dpdk-stable] patch 'gro: fix typo in map file' has been queued to stable release 17.08.1 Yuanhan Liu
2017-11-21 13:15 ` [dpdk-stable] patch 'service: fix build with gcc 4.9' " Yuanhan Liu
2017-11-21 13:15 ` [dpdk-stable] patch 'eal: initialize logging before bus' " Yuanhan Liu
@ 2017-11-21 13:15 ` Yuanhan Liu
2017-11-21 13:15 ` [dpdk-stable] patch 'net: fix inner L2 length in packet type parser' " Yuanhan Liu
` (186 subsequent siblings)
189 siblings, 0 replies; 191+ messages in thread
From: Yuanhan Liu @ 2017-11-21 13:15 UTC (permalink / raw)
To: Ferruh Yigit; +Cc: Zhiyong Yang, dpdk stable
Hi,
FYI, your patch has been queued to stable release 17.08.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/24/17. So please
shout if anyone has objections.
Thanks.
--yliu
---
>From 31ebc12ad301b111013f2118dd90f571363f1ee3 Mon Sep 17 00:00:00 2001
From: Ferruh Yigit <ferruh.yigit@intel.com>
Date: Thu, 14 Sep 2017 15:55:06 +0100
Subject: [PATCH] ethdev: fix ABI version
[ upstream commit ccf316071692995431a3e14ff30fa581119c84e9 ]
The ethdev ABI has been broken in release 17.08 without being bumped.
Fixes: c33ade1227a5 ("doc: notify ethdev callback process API change")
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Reviewed-by: Zhiyong Yang <zhiyong.yang@intel.com>
---
lib/librte_ether/Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/librte_ether/Makefile b/lib/librte_ether/Makefile
index db692ae..b7207a3 100644
--- a/lib/librte_ether/Makefile
+++ b/lib/librte_ether/Makefile
@@ -41,7 +41,7 @@ CFLAGS += $(WERROR_FLAGS)
EXPORT_MAP := rte_ether_version.map
-LIBABIVER := 6
+LIBABIVER := 7
SRCS-y += rte_ethdev.c
SRCS-y += rte_flow.c
--
2.7.4
^ permalink raw reply [flat|nested] 191+ messages in thread
* [dpdk-stable] patch 'net: fix inner L2 length in packet type parser' has been queued to stable release 17.08.1
2017-11-21 13:15 [dpdk-stable] patch 'gro: fix typo in map file' has been queued to stable release 17.08.1 Yuanhan Liu
` (2 preceding siblings ...)
2017-11-21 13:15 ` [dpdk-stable] patch 'ethdev: fix ABI version' " Yuanhan Liu
@ 2017-11-21 13:15 ` Yuanhan Liu
2017-11-21 13:15 ` [dpdk-stable] patch 'vfio: fix close unchecked file descriptor' " Yuanhan Liu
` (185 subsequent siblings)
189 siblings, 0 replies; 191+ messages in thread
From: Yuanhan Liu @ 2017-11-21 13:15 UTC (permalink / raw)
To: Olivier Matz; +Cc: dpdk stable
Hi,
FYI, your patch has been queued to stable release 17.08.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/24/17. So please
shout if anyone has objections.
Thanks.
--yliu
---
>From 6ec6abe018f5f1619fb9d2ba9eea936848fc2630 Mon Sep 17 00:00:00 2001
From: Olivier Matz <olivier.matz@6wind.com>
Date: Mon, 11 Sep 2017 16:57:22 +0200
Subject: [PATCH] net: fix inner L2 length in packet type parser
[ upstream commit b081c1dd2ec64c4f3cc18723ccb7aa1601985bb0 ]
The inner L2 length returned by rte_net_get_ptype() is not
properly initialized. If the caller does not zero the header
lengths structure, the inner_l2 field will be undefined.
Fix it by initializing inner_l2 to 0 when parsing a inner layer.
Fixes: 2c15c5377da2 ("net: support NVGRE in software packet type parser")
Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
---
lib/librte_net/rte_net.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/lib/librte_net/rte_net.c b/lib/librte_net/rte_net.c
index a8c7aff..a3ca040 100644
--- a/lib/librte_net/rte_net.c
+++ b/lib/librte_net/rte_net.c
@@ -396,6 +396,7 @@ uint32_t rte_net_get_ptype(const struct rte_mbuf *m,
if ((layers & RTE_PTYPE_INNER_L2_MASK) == 0)
return pkt_type;
+ hdr_lens->inner_l2_len = 0;
if (proto == rte_cpu_to_be_16(ETHER_TYPE_TEB)) {
eh = rte_pktmbuf_read(m, off, sizeof(*eh), &eh_copy);
if (unlikely(eh == NULL))
--
2.7.4
^ permalink raw reply [flat|nested] 191+ messages in thread
* [dpdk-stable] patch 'vfio: fix close unchecked file descriptor' has been queued to stable release 17.08.1
2017-11-21 13:15 [dpdk-stable] patch 'gro: fix typo in map file' has been queued to stable release 17.08.1 Yuanhan Liu
` (3 preceding siblings ...)
2017-11-21 13:15 ` [dpdk-stable] patch 'net: fix inner L2 length in packet type parser' " Yuanhan Liu
@ 2017-11-21 13:15 ` Yuanhan Liu
2017-11-21 13:15 ` [dpdk-stable] patch 'eal: fix auxv open check for ARM and PPC' " Yuanhan Liu
` (184 subsequent siblings)
189 siblings, 0 replies; 191+ messages in thread
From: Yuanhan Liu @ 2017-11-21 13:15 UTC (permalink / raw)
To: Kuba Kozak; +Cc: Anatoly Burakov, Patrick MacArthur, dpdk stable
Hi,
FYI, your patch has been queued to stable release 17.08.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/24/17. So please
shout if anyone has objections.
Thanks.
--yliu
---
>From 0f718a5f2e9b500acf99f6dddbe36dfc75439ce7 Mon Sep 17 00:00:00 2001
From: Kuba Kozak <kubax.kozak@intel.com>
Date: Thu, 21 Sep 2017 15:49:08 +0200
Subject: [PATCH] vfio: fix close unchecked file descriptor
[ upstream commit 96128b365eff2a1e5477e676c08c1fc631cc82c2 ]
Add file descriptor value check before calling close() function.
Coverity issue: 141297
Fixes: 811b6b25060f ("vfio: fix file descriptor leak in multi-process")
Signed-off-by: Kuba Kozak <kubax.kozak@intel.com>
Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
Acked-by: Patrick MacArthur <patrick@patrickmacarthur.net>
---
lib/librte_eal/linuxapp/eal/eal_vfio_mp_sync.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/lib/librte_eal/linuxapp/eal/eal_vfio_mp_sync.c b/lib/librte_eal/linuxapp/eal/eal_vfio_mp_sync.c
index 7e8095c..537beeb 100644
--- a/lib/librte_eal/linuxapp/eal/eal_vfio_mp_sync.c
+++ b/lib/librte_eal/linuxapp/eal/eal_vfio_mp_sync.c
@@ -301,7 +301,8 @@ vfio_mp_sync_thread(void __rte_unused * arg)
vfio_mp_sync_send_request(conn_sock, SOCKET_ERR);
else
vfio_mp_sync_send_fd(conn_sock, fd);
- close(fd);
+ if (fd >= 0)
+ close(fd);
break;
case SOCKET_REQ_GROUP:
/* wait for group number */
--
2.7.4
^ permalink raw reply [flat|nested] 191+ messages in thread
* [dpdk-stable] patch 'eal: fix auxv open check for ARM and PPC' has been queued to stable release 17.08.1
2017-11-21 13:15 [dpdk-stable] patch 'gro: fix typo in map file' has been queued to stable release 17.08.1 Yuanhan Liu
` (4 preceding siblings ...)
2017-11-21 13:15 ` [dpdk-stable] patch 'vfio: fix close unchecked file descriptor' " Yuanhan Liu
@ 2017-11-21 13:15 ` Yuanhan Liu
2017-11-21 13:15 ` [dpdk-stable] patch 'net/ixgbe: fix MAC VLAN filter fail problem' " Yuanhan Liu
` (183 subsequent siblings)
189 siblings, 0 replies; 191+ messages in thread
From: Yuanhan Liu @ 2017-11-21 13:15 UTC (permalink / raw)
To: Lukasz Majczak; +Cc: Jan Viktorin, Chao Zhu, dpdk stable
Hi,
FYI, your patch has been queued to stable release 17.08.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/24/17. So please
shout if anyone has objections.
Thanks.
--yliu
---
>From c65b83ba128f7b58fae44ebde6f2ac8326c6cfaf Mon Sep 17 00:00:00 2001
From: Lukasz Majczak <lma@semihalf.com>
Date: Thu, 28 Sep 2017 08:54:59 +0200
Subject: [PATCH] eal: fix auxv open check for ARM and PPC
[ upstream commit 1e0a17ac4c816fc41f6cf8c1fcd56149d8927263 ]
The assertion of return value from the open() function is done against
0, while it is a correct value - open() returns -1 in case of an error.
It causes problems while trying to run as a daemon, in which case, this
call to open() will return 0 as a valid descriptor.
Fixes: b94e5c9406b5 ("eal/arm: add CPU flags for ARMv7")
Fixes: 97523f822ba9 ("eal/arm: add CPU flags for ARMv8")
Fixes: 9ae155385686 ("eal/ppc: cpu flag checks for IBM Power")
Signed-off-by: Lukasz Majczak <lma@semihalf.com>
Acked-by: Jan Viktorin <viktorin@rehivetech.com>
Acked-by: Chao Zhu <chaozhu@linux.vnet.ibm.com>
---
lib/librte_eal/common/arch/arm/rte_cpuflags.c | 2 +-
lib/librte_eal/common/arch/ppc_64/rte_cpuflags.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/lib/librte_eal/common/arch/arm/rte_cpuflags.c b/lib/librte_eal/common/arch/arm/rte_cpuflags.c
index 5636e9c..88f1cbe 100644
--- a/lib/librte_eal/common/arch/arm/rte_cpuflags.c
+++ b/lib/librte_eal/common/arch/arm/rte_cpuflags.c
@@ -137,7 +137,7 @@ rte_cpu_get_features(hwcap_registers_t out)
_Elfx_auxv_t auxv;
auxv_fd = open("/proc/self/auxv", O_RDONLY);
- assert(auxv_fd);
+ assert(auxv_fd != -1);
while (read(auxv_fd, &auxv, sizeof(auxv)) == sizeof(auxv)) {
if (auxv.a_type == AT_HWCAP) {
out[REG_HWCAP] = auxv.a_un.a_val;
diff --git a/lib/librte_eal/common/arch/ppc_64/rte_cpuflags.c b/lib/librte_eal/common/arch/ppc_64/rte_cpuflags.c
index fcf96e0..970a61c 100644
--- a/lib/librte_eal/common/arch/ppc_64/rte_cpuflags.c
+++ b/lib/librte_eal/common/arch/ppc_64/rte_cpuflags.c
@@ -108,7 +108,7 @@ rte_cpu_get_features(hwcap_registers_t out)
Elf64_auxv_t auxv;
auxv_fd = open("/proc/self/auxv", O_RDONLY);
- assert(auxv_fd);
+ assert(auxv_fd != -1);
while (read(auxv_fd, &auxv,
sizeof(Elf64_auxv_t)) == sizeof(Elf64_auxv_t)) {
if (auxv.a_type == AT_HWCAP)
--
2.7.4
^ permalink raw reply [flat|nested] 191+ messages in thread
* [dpdk-stable] patch 'net/ixgbe: fix MAC VLAN filter fail problem' has been queued to stable release 17.08.1
2017-11-21 13:15 [dpdk-stable] patch 'gro: fix typo in map file' has been queued to stable release 17.08.1 Yuanhan Liu
` (5 preceding siblings ...)
2017-11-21 13:15 ` [dpdk-stable] patch 'eal: fix auxv open check for ARM and PPC' " Yuanhan Liu
@ 2017-11-21 13:15 ` Yuanhan Liu
2017-11-21 13:15 ` [dpdk-stable] patch 'net/i40e: fix flow control watermark mismatch' " Yuanhan Liu
` (182 subsequent siblings)
189 siblings, 0 replies; 191+ messages in thread
From: Yuanhan Liu @ 2017-11-21 13:15 UTC (permalink / raw)
To: Wei Zhao; +Cc: dpdk stable
Hi,
FYI, your patch has been queued to stable release 17.08.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/24/17. So please
shout if anyone has objections.
Thanks.
--yliu
---
>From bbe4f4f0c3d66718ae7718e2967d50c8304bb6a9 Mon Sep 17 00:00:00 2001
From: Wei Zhao <wei.zhao1@intel.com>
Date: Tue, 8 Aug 2017 14:19:18 +0800
Subject: [PATCH] net/ixgbe: fix MAC VLAN filter fail problem
[ upstream commit a2ba854ec616b686ae3e16380a47aea1898e9c74 ]
Add a mode type check for MAC VLAN mode, if fdir is
in this mode, it do not need to do sanity check for x550.
Fixes: dc0c16105d2d ("ixgbe: fix X550 flow director check")
Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
---
drivers/net/ixgbe/ixgbe_fdir.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/net/ixgbe/ixgbe_fdir.c b/drivers/net/ixgbe/ixgbe_fdir.c
index eb2d558..7c10cab 100644
--- a/drivers/net/ixgbe/ixgbe_fdir.c
+++ b/drivers/net/ixgbe/ixgbe_fdir.c
@@ -1276,7 +1276,8 @@ ixgbe_fdir_filter_program(struct rte_eth_dev *dev,
rule->ixgbe_fdir.formatted.flow_type ==
IXGBE_ATR_FLOW_TYPE_IPV6) &&
(info->mask.src_port_mask != 0 ||
- info->mask.dst_port_mask != 0)) {
+ info->mask.dst_port_mask != 0) &&
+ rule->mode != RTE_FDIR_MODE_PERFECT_MAC_VLAN) {
PMD_DRV_LOG(ERR, "By this device,"
" IPv4 is not supported without"
" L4 protocol and ports masked!");
--
2.7.4
^ permalink raw reply [flat|nested] 191+ messages in thread
* [dpdk-stable] patch 'net/i40e: fix flow control watermark mismatch' has been queued to stable release 17.08.1
2017-11-21 13:15 [dpdk-stable] patch 'gro: fix typo in map file' has been queued to stable release 17.08.1 Yuanhan Liu
` (6 preceding siblings ...)
2017-11-21 13:15 ` [dpdk-stable] patch 'net/ixgbe: fix MAC VLAN filter fail problem' " Yuanhan Liu
@ 2017-11-21 13:15 ` Yuanhan Liu
2017-11-21 13:15 ` [dpdk-stable] patch 'net/nfp: fix RSS' " Yuanhan Liu
` (181 subsequent siblings)
189 siblings, 0 replies; 191+ messages in thread
From: Yuanhan Liu @ 2017-11-21 13:15 UTC (permalink / raw)
To: Qi Zhang; +Cc: Kevin Traynor, dpdk stable
Hi,
FYI, your patch has been queued to stable release 17.08.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/24/17. So please
shout if anyone has objections.
Thanks.
--yliu
---
>From 04ffc0055d1b1ea424d3f61cfae765a700ad2280 Mon Sep 17 00:00:00 2001
From: Qi Zhang <qi.z.zhang@intel.com>
Date: Thu, 10 Aug 2017 18:48:07 +0800
Subject: [PATCH] net/i40e: fix flow control watermark mismatch
[ upstream commit 273dcde1c3e3582d39f4a0916febca7dfd518de9 ]
Flow control watermark is not read out correctly,
that may cause an application who not intend to change
watermark but does change it with a rte_eth_dev_flow_ctrl_set
call right after rte_eth_dev_flow_ctrl_get.
The idea fix is, during init, the watermark is set with default value,
so it is not necessary to read out from hw register during flow_ctl_get,
But due to I40E_GLRPB_GHW limitation, it is shared by different ports on
the same device, it is possible the value is changed on another port,
but local variable not sync, so we have to read out register every
flow_ctl_get.
Fixes: f53577f06925 ("i40e: support flow control")
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Kevin Traynor <ktraynor@redhat.com>
---
drivers/net/i40e/i40e_ethdev.c | 19 +++++++++++++------
1 file changed, 13 insertions(+), 6 deletions(-)
diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c
index 5f26e24..4a2e3f2 100644
--- a/drivers/net/i40e/i40e_ethdev.c
+++ b/drivers/net/i40e/i40e_ethdev.c
@@ -86,12 +86,6 @@
/* Flow control default timer */
#define I40E_DEFAULT_PAUSE_TIME 0xFFFFU
-/* Flow control default high water */
-#define I40E_DEFAULT_HIGH_WATER (0x1C40/1024)
-
-/* Flow control default low water */
-#define I40E_DEFAULT_LOW_WATER (0x1A40/1024)
-
/* Flow control enable fwd bit */
#define I40E_PRTMAC_FWD_CTRL 0x00000001
@@ -101,6 +95,12 @@
/* Kilobytes shift */
#define I40E_KILOSHIFT 10
+/* Flow control default high water */
+#define I40E_DEFAULT_HIGH_WATER (0xF2000 >> I40E_KILOSHIFT)
+
+/* Flow control default low water */
+#define I40E_DEFAULT_LOW_WATER (0xF2000 >> I40E_KILOSHIFT)
+
/* Receive Average Packet Size in Byte*/
#define I40E_PACKET_AVERAGE_SIZE 128
@@ -3225,6 +3225,13 @@ i40e_flow_ctrl_get(struct rte_eth_dev *dev, struct rte_eth_fc_conf *fc_conf)
struct i40e_pf *pf = I40E_DEV_PRIVATE_TO_PF(dev->data->dev_private);
fc_conf->pause_time = pf->fc_conf.pause_time;
+
+ /* read out from register, in case they are modified by other port */
+ pf->fc_conf.high_water[I40E_MAX_TRAFFIC_CLASS] =
+ I40E_READ_REG(hw, I40E_GLRPB_GHW) >> I40E_KILOSHIFT;
+ pf->fc_conf.low_water[I40E_MAX_TRAFFIC_CLASS] =
+ I40E_READ_REG(hw, I40E_GLRPB_GLW) >> I40E_KILOSHIFT;
+
fc_conf->high_water = pf->fc_conf.high_water[I40E_MAX_TRAFFIC_CLASS];
fc_conf->low_water = pf->fc_conf.low_water[I40E_MAX_TRAFFIC_CLASS];
--
2.7.4
^ permalink raw reply [flat|nested] 191+ messages in thread
* [dpdk-stable] patch 'net/nfp: fix RSS' has been queued to stable release 17.08.1
2017-11-21 13:15 [dpdk-stable] patch 'gro: fix typo in map file' has been queued to stable release 17.08.1 Yuanhan Liu
` (7 preceding siblings ...)
2017-11-21 13:15 ` [dpdk-stable] patch 'net/i40e: fix flow control watermark mismatch' " Yuanhan Liu
@ 2017-11-21 13:15 ` Yuanhan Liu
2017-11-21 13:15 ` [dpdk-stable] patch 'net/nfp: fix Rx interrupt when multiqueue' " Yuanhan Liu
` (180 subsequent siblings)
189 siblings, 0 replies; 191+ messages in thread
From: Yuanhan Liu @ 2017-11-21 13:15 UTC (permalink / raw)
To: Alejandro Lucero; +Cc: dpdk stable
Hi,
FYI, your patch has been queued to stable release 17.08.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/24/17. So please
shout if anyone has objections.
Thanks.
--yliu
---
>From f77b94d3a088b88e1a27675d0f7372ab5410b939 Mon Sep 17 00:00:00 2001
From: Alejandro Lucero <alejandro.lucero@netronome.com>
Date: Fri, 11 Aug 2017 14:43:50 +0100
Subject: [PATCH] net/nfp: fix RSS
[ upstream commit e1102e36fa6a8d813e9de7fc6978b83620a4f418 ]
Redirection table was not being updated properly.
There is also a problem when configuring RSS.
Fixes: 934e4c60fbff ("nfp: add RSS")
Signed-off-by: Alejandro Lucero <alejandro.lucero@netronome.com>
---
drivers/net/nfp/nfp_net.c | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/drivers/net/nfp/nfp_net.c b/drivers/net/nfp/nfp_net.c
index 92b03c4..3f4b573 100644
--- a/drivers/net/nfp/nfp_net.c
+++ b/drivers/net/nfp/nfp_net.c
@@ -2233,7 +2233,8 @@ nfp_net_reta_update(struct rte_eth_dev *dev,
reta &= ~(0xFF << (8 * j));
reta |= reta_conf[idx].reta[shift + j] << (8 * j);
}
- nn_cfg_writel(hw, NFP_NET_CFG_RSS_ITBL + shift, reta);
+ nn_cfg_writel(hw, NFP_NET_CFG_RSS_ITBL + (idx * 64) + shift,
+ reta);
}
update = NFP_NET_CFG_UPDATE_RSS;
@@ -2280,7 +2281,8 @@ nfp_net_reta_query(struct rte_eth_dev *dev,
if (!mask)
continue;
- reta = nn_cfg_readl(hw, NFP_NET_CFG_RSS_ITBL + shift);
+ reta = nn_cfg_readl(hw, NFP_NET_CFG_RSS_ITBL + (idx * 64) +
+ shift);
for (j = 0; j < 4; j++) {
if (!(mask & (0x1 << j)))
continue;
@@ -2330,6 +2332,9 @@ nfp_net_rss_hash_update(struct rte_eth_dev *dev,
NFP_NET_CFG_RSS_IPV6_TCP |
NFP_NET_CFG_RSS_IPV6_UDP;
+ cfg_rss_ctrl |= NFP_NET_CFG_RSS_MASK;
+ cfg_rss_ctrl |= NFP_NET_CFG_RSS_TOEPLITZ;
+
/* configuring where to apply the RSS hash */
nn_cfg_writel(hw, NFP_NET_CFG_RSS_CTRL, cfg_rss_ctrl);
--
2.7.4
^ permalink raw reply [flat|nested] 191+ messages in thread
* [dpdk-stable] patch 'net/nfp: fix Rx interrupt when multiqueue' has been queued to stable release 17.08.1
2017-11-21 13:15 [dpdk-stable] patch 'gro: fix typo in map file' has been queued to stable release 17.08.1 Yuanhan Liu
` (8 preceding siblings ...)
2017-11-21 13:15 ` [dpdk-stable] patch 'net/nfp: fix RSS' " Yuanhan Liu
@ 2017-11-21 13:15 ` Yuanhan Liu
2017-11-21 13:15 ` [dpdk-stable] patch 'net/i40e: fix PF notify issue when VF is not up' " Yuanhan Liu
` (179 subsequent siblings)
189 siblings, 0 replies; 191+ messages in thread
From: Yuanhan Liu @ 2017-11-21 13:15 UTC (permalink / raw)
To: Alejandro Lucero; +Cc: dpdk stable
Hi,
FYI, your patch has been queued to stable release 17.08.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/24/17. So please
shout if anyone has objections.
Thanks.
--yliu
---
>From 11927579d659351c9a88b1141342ba2892353ccf Mon Sep 17 00:00:00 2001
From: Alejandro Lucero <alejandro.lucero@netronome.com>
Date: Fri, 11 Aug 2017 16:16:55 +0100
Subject: [PATCH] net/nfp: fix Rx interrupt when multiqueue
[ upstream commit 7dcb19d78f27ec6f6241ebc7779d5c61a9d569e1 ]
intr_vec was not properly configured. This is not a problem when
just one queue is supported but it fails with multiqueue.
Some minor refactoring also done for hardware interrupt configuration.
Fixes: ea121b28316d ("net/nfp: add Rx interrupts")
Signed-off-by: Alejandro Lucero <alejandro.lucero@netronome.com>
---
drivers/net/nfp/nfp_net.c | 16 +++++++++-------
1 file changed, 9 insertions(+), 7 deletions(-)
diff --git a/drivers/net/nfp/nfp_net.c b/drivers/net/nfp/nfp_net.c
index 3f4b573..3c063c2 100644
--- a/drivers/net/nfp/nfp_net.c
+++ b/drivers/net/nfp/nfp_net.c
@@ -627,14 +627,19 @@ nfp_configure_rx_interrupt(struct rte_eth_dev *dev,
PMD_INIT_LOG(INFO, "VF: enabling RX interrupt with UIO");
/* UIO just supports one queue and no LSC*/
nn_cfg_writeb(hw, NFP_NET_CFG_RXR_VEC(0), 0);
+ intr_handle->intr_vec[0] = 0;
} else {
PMD_INIT_LOG(INFO, "VF: enabling RX interrupt with VFIO");
- for (i = 0; i < dev->data->nb_rx_queues; i++)
+ for (i = 0; i < dev->data->nb_rx_queues; i++) {
/*
* The first msix vector is reserved for non
* efd interrupts
*/
nn_cfg_writeb(hw, NFP_NET_CFG_RXR_VEC(i), i + 1);
+ intr_handle->intr_vec[i] = i + 1;
+ PMD_INIT_LOG(DEBUG, "intr_vec[%d]= %d\n", i,
+ intr_handle->intr_vec[i]);
+ }
}
/* Avoiding TX interrupts */
@@ -684,20 +689,17 @@ nfp_net_start(struct rte_eth_dev *dev)
intr_vector = dev->data->nb_rx_queues;
if (rte_intr_efd_enable(intr_handle, intr_vector))
return -1;
- }
- if (rte_intr_dp_is_en(intr_handle))
nfp_configure_rx_interrupt(dev, intr_handle);
+ update = NFP_NET_CFG_UPDATE_MSIX;
+ }
rte_intr_enable(intr_handle);
/* Enable device */
new_ctrl = hw->ctrl | NFP_NET_CFG_CTRL_ENABLE;
- update = NFP_NET_CFG_UPDATE_GEN | NFP_NET_CFG_UPDATE_RING;
- /* Just configuring queues interrupts when necessary */
- if (rte_intr_dp_is_en(intr_handle))
- update |= NFP_NET_CFG_UPDATE_MSIX;
+ update |= NFP_NET_CFG_UPDATE_GEN | NFP_NET_CFG_UPDATE_RING;
if (hw->cap & NFP_NET_CFG_CTRL_RINGCFG)
new_ctrl |= NFP_NET_CFG_CTRL_RINGCFG;
--
2.7.4
^ permalink raw reply [flat|nested] 191+ messages in thread
* [dpdk-stable] patch 'net/i40e: fix PF notify issue when VF is not up' has been queued to stable release 17.08.1
2017-11-21 13:15 [dpdk-stable] patch 'gro: fix typo in map file' has been queued to stable release 17.08.1 Yuanhan Liu
` (9 preceding siblings ...)
2017-11-21 13:15 ` [dpdk-stable] patch 'net/nfp: fix Rx interrupt when multiqueue' " Yuanhan Liu
@ 2017-11-21 13:15 ` Yuanhan Liu
2017-11-21 13:15 ` [dpdk-stable] patch 'net/failsafe: fix Tx sub device deactivating' " Yuanhan Liu
` (178 subsequent siblings)
189 siblings, 0 replies; 191+ messages in thread
From: Yuanhan Liu @ 2017-11-21 13:15 UTC (permalink / raw)
To: Xiaoyun Li; +Cc: Beilei Xing, dpdk stable
Hi,
FYI, your patch has been queued to stable release 17.08.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/24/17. So please
shout if anyone has objections.
Thanks.
--yliu
---
>From 4ab14a00e26b400b56537f793a77694e0ffd2a94 Mon Sep 17 00:00:00 2001
From: Xiaoyun Li <xiaoyun.li@intel.com>
Date: Tue, 15 Aug 2017 15:39:36 +0800
Subject: [PATCH] net/i40e: fix PF notify issue when VF is not up
[ upstream commit 16048c4cb70386512917073c1661d743f5a78806 ]
This patch stops PF from sending message to VF when VF's admin queue
isn't enabled, namely VF isn't up.
Fixes: 4861cde46116 ("i40e: new poll mode driver")
Signed-off-by: Xiaoyun Li <xiaoyun.li@intel.com>
Acked-by: Beilei Xing <beilei.xing@intel.com>
---
drivers/net/i40e/i40e_pf.c | 14 ++++++++++++--
1 file changed, 12 insertions(+), 2 deletions(-)
diff --git a/drivers/net/i40e/i40e_pf.c b/drivers/net/i40e/i40e_pf.c
index 100f8dc..fe89027 100644
--- a/drivers/net/i40e/i40e_pf.c
+++ b/drivers/net/i40e/i40e_pf.c
@@ -1192,7 +1192,10 @@ send_msg:
void
i40e_notify_vf_link_status(struct rte_eth_dev *dev, struct i40e_pf_vf *vf)
{
+ struct i40e_hw *hw = I40E_PF_TO_HW(vf->pf);
struct virtchnl_pf_event event;
+ uint16_t vf_id = vf->vf_idx;
+ uint32_t tval, rval;
event.event = VIRTCHNL_EVENT_LINK_CHANGE;
event.event_data.link_event.link_status =
@@ -1224,8 +1227,15 @@ i40e_notify_vf_link_status(struct rte_eth_dev *dev, struct i40e_pf_vf *vf)
break;
}
- i40e_pf_host_send_msg_to_vf(vf, VIRTCHNL_OP_EVENT,
- I40E_SUCCESS, (uint8_t *)&event, sizeof(event));
+ tval = I40E_READ_REG(hw, I40E_VF_ATQLEN(vf_id));
+ rval = I40E_READ_REG(hw, I40E_VF_ARQLEN(vf_id));
+
+ if (tval & I40E_VF_ATQLEN_ATQLEN_MASK ||
+ tval & I40E_VF_ATQLEN_ATQENABLE_MASK ||
+ rval & I40E_VF_ARQLEN_ARQLEN_MASK ||
+ rval & I40E_VF_ARQLEN_ARQENABLE_MASK)
+ i40e_pf_host_send_msg_to_vf(vf, VIRTCHNL_OP_EVENT,
+ I40E_SUCCESS, (uint8_t *)&event, sizeof(event));
}
void
--
2.7.4
^ permalink raw reply [flat|nested] 191+ messages in thread
* [dpdk-stable] patch 'net/failsafe: fix Tx sub device deactivating' has been queued to stable release 17.08.1
2017-11-21 13:15 [dpdk-stable] patch 'gro: fix typo in map file' has been queued to stable release 17.08.1 Yuanhan Liu
` (10 preceding siblings ...)
2017-11-21 13:15 ` [dpdk-stable] patch 'net/i40e: fix PF notify issue when VF is not up' " Yuanhan Liu
@ 2017-11-21 13:15 ` Yuanhan Liu
2017-11-21 13:15 ` [dpdk-stable] patch 'net/ixgbe: fix mapping of user priority to TC' " Yuanhan Liu
` (177 subsequent siblings)
189 siblings, 0 replies; 191+ messages in thread
From: Yuanhan Liu @ 2017-11-21 13:15 UTC (permalink / raw)
To: Matan Azrad; +Cc: Gaetan Rivet, dpdk stable
Hi,
FYI, your patch has been queued to stable release 17.08.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/24/17. So please
shout if anyone has objections.
Thanks.
--yliu
---
>From ea6118d474a03fa6bd66a502258b7d43020d6a7b Mon Sep 17 00:00:00 2001
From: Matan Azrad <matan@mellanox.com>
Date: Wed, 16 Aug 2017 17:19:28 +0300
Subject: [PATCH] net/failsafe: fix Tx sub device deactivating
[ upstream commit d8d89966c9595e3db1c7312fe94f3c8235b4ccfe ]
The corrupted code couldn't recognize that all sub devices
were not ready for Tx traffic when failsafe PMD was trying
to switch device because of an unreachable condition using.
Hence, the current Tx sub device variable was not updated
correctly.
The fix removed the unreachable branch and added new one
in the right place respecting the original intent.
Fixes: ebea83f899d8 ("net/failsafe: add plug-in support")
Fixes: 598fb8aec6f6 ("net/failsafe: support device removal")
Signed-off-by: Matan Azrad <matan@mellanox.com>
Acked-by: Gaetan Rivet <gaetan.rivet@6wind.com>
---
drivers/net/failsafe/failsafe_private.h | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/drivers/net/failsafe/failsafe_private.h b/drivers/net/failsafe/failsafe_private.h
index 0361cf4..ef646db 100644
--- a/drivers/net/failsafe/failsafe_private.h
+++ b/drivers/net/failsafe/failsafe_private.h
@@ -334,7 +334,7 @@ fs_switch_dev(struct rte_eth_dev *dev,
} else if ((txd && txd->state < req_state) ||
txd == NULL ||
txd == banned) {
- struct sub_device *sdev;
+ struct sub_device *sdev = NULL;
uint8_t i;
/* Using acceptable device */
@@ -346,9 +346,10 @@ fs_switch_dev(struct rte_eth_dev *dev,
PRIV(dev)->subs_tx = i;
break;
}
- } else if (txd && txd->state < req_state) {
- DEBUG("No device ready, deactivating tx_dev");
- PRIV(dev)->subs_tx = PRIV(dev)->subs_tail;
+ if (i >= PRIV(dev)->subs_tail || sdev == NULL) {
+ DEBUG("No device ready, deactivating tx_dev");
+ PRIV(dev)->subs_tx = PRIV(dev)->subs_tail;
+ }
} else {
return;
}
--
2.7.4
^ permalink raw reply [flat|nested] 191+ messages in thread
* [dpdk-stable] patch 'net/ixgbe: fix mapping of user priority to TC' has been queued to stable release 17.08.1
2017-11-21 13:15 [dpdk-stable] patch 'gro: fix typo in map file' has been queued to stable release 17.08.1 Yuanhan Liu
` (11 preceding siblings ...)
2017-11-21 13:15 ` [dpdk-stable] patch 'net/failsafe: fix Tx sub device deactivating' " Yuanhan Liu
@ 2017-11-21 13:15 ` Yuanhan Liu
2017-11-21 13:15 ` [dpdk-stable] patch 'net/mlx5: fix locking in xstats functions' " Yuanhan Liu
` (176 subsequent siblings)
189 siblings, 0 replies; 191+ messages in thread
From: Yuanhan Liu @ 2017-11-21 13:15 UTC (permalink / raw)
To: Wei Dai; +Cc: dpdk stable
Hi,
FYI, your patch has been queued to stable release 17.08.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/24/17. So please
shout if anyone has objections.
Thanks.
--yliu
---
>From 1191fc11ba5795c95f0ae4aaa1088fcaa7dcd77a Mon Sep 17 00:00:00 2001
From: Wei Dai <wei.dai@intel.com>
Date: Mon, 21 Aug 2017 15:50:05 +0800
Subject: [PATCH] net/ixgbe: fix mapping of user priority to TC
[ upstream commit a8e54b44515ce741a0b73fe2e35e99f6f1dcef4b ]
This patch fixes the mapping of user priority to traffic class
in Rx/Tx path of DCB configuration. Each DCB traffic class
should include all user priorities mapping to it in both Rx and
Tx path.
Fixes: 0807f80d35d0 ("ixgbe: DCB / flow control")
Signed-off-by: Wei Dai <wei.dai@intel.com>
---
drivers/net/ixgbe/ixgbe_rxtx.c | 41 +++++++++++++++++++++++++++++++++--------
1 file changed, 33 insertions(+), 8 deletions(-)
diff --git a/drivers/net/ixgbe/ixgbe_rxtx.c b/drivers/net/ixgbe/ixgbe_rxtx.c
index 64bff25..98d0e1a 100644
--- a/drivers/net/ixgbe/ixgbe_rxtx.c
+++ b/drivers/net/ixgbe/ixgbe_rxtx.c
@@ -3517,12 +3517,19 @@ ixgbe_vmdq_dcb_rx_config(struct rte_eth_dev *dev,
dcb_config->num_tcs.pg_tcs = ETH_4_TCS;
dcb_config->num_tcs.pfc_tcs = ETH_4_TCS;
}
+
+ /* Initialize User Priority to Traffic Class mapping */
+ for (j = 0; j < IXGBE_DCB_MAX_TRAFFIC_CLASS; j++) {
+ tc = &dcb_config->tc_config[j];
+ tc->path[IXGBE_DCB_RX_CONFIG].up_to_tc_bitmap = 0;
+ }
+
/* User Priority to Traffic Class mapping */
for (i = 0; i < ETH_DCB_NUM_USER_PRIORITIES; i++) {
j = vmdq_rx_conf->dcb_tc[i];
tc = &dcb_config->tc_config[j];
- tc->path[IXGBE_DCB_RX_CONFIG].up_to_tc_bitmap =
- (uint8_t)(1 << j);
+ tc->path[IXGBE_DCB_RX_CONFIG].up_to_tc_bitmap |=
+ (uint8_t)(1 << i);
}
}
@@ -3544,12 +3551,18 @@ ixgbe_dcb_vt_tx_config(struct rte_eth_dev *dev,
dcb_config->num_tcs.pfc_tcs = ETH_4_TCS;
}
+ /* Initialize User Priority to Traffic Class mapping */
+ for (j = 0; j < IXGBE_DCB_MAX_TRAFFIC_CLASS; j++) {
+ tc = &dcb_config->tc_config[j];
+ tc->path[IXGBE_DCB_TX_CONFIG].up_to_tc_bitmap = 0;
+ }
+
/* User Priority to Traffic Class mapping */
for (i = 0; i < ETH_DCB_NUM_USER_PRIORITIES; i++) {
j = vmdq_tx_conf->dcb_tc[i];
tc = &dcb_config->tc_config[j];
- tc->path[IXGBE_DCB_TX_CONFIG].up_to_tc_bitmap =
- (uint8_t)(1 << j);
+ tc->path[IXGBE_DCB_TX_CONFIG].up_to_tc_bitmap |=
+ (uint8_t)(1 << i);
}
}
@@ -3565,12 +3578,18 @@ ixgbe_dcb_rx_config(struct rte_eth_dev *dev,
dcb_config->num_tcs.pg_tcs = (uint8_t)rx_conf->nb_tcs;
dcb_config->num_tcs.pfc_tcs = (uint8_t)rx_conf->nb_tcs;
+ /* Initialize User Priority to Traffic Class mapping */
+ for (j = 0; j < IXGBE_DCB_MAX_TRAFFIC_CLASS; j++) {
+ tc = &dcb_config->tc_config[j];
+ tc->path[IXGBE_DCB_RX_CONFIG].up_to_tc_bitmap = 0;
+ }
+
/* User Priority to Traffic Class mapping */
for (i = 0; i < ETH_DCB_NUM_USER_PRIORITIES; i++) {
j = rx_conf->dcb_tc[i];
tc = &dcb_config->tc_config[j];
- tc->path[IXGBE_DCB_RX_CONFIG].up_to_tc_bitmap =
- (uint8_t)(1 << j);
+ tc->path[IXGBE_DCB_RX_CONFIG].up_to_tc_bitmap |=
+ (uint8_t)(1 << i);
}
}
@@ -3586,12 +3605,18 @@ ixgbe_dcb_tx_config(struct rte_eth_dev *dev,
dcb_config->num_tcs.pg_tcs = (uint8_t)tx_conf->nb_tcs;
dcb_config->num_tcs.pfc_tcs = (uint8_t)tx_conf->nb_tcs;
+ /* Initialize User Priority to Traffic Class mapping */
+ for (j = 0; j < IXGBE_DCB_MAX_TRAFFIC_CLASS; j++) {
+ tc = &dcb_config->tc_config[j];
+ tc->path[IXGBE_DCB_TX_CONFIG].up_to_tc_bitmap = 0;
+ }
+
/* User Priority to Traffic Class mapping */
for (i = 0; i < ETH_DCB_NUM_USER_PRIORITIES; i++) {
j = tx_conf->dcb_tc[i];
tc = &dcb_config->tc_config[j];
- tc->path[IXGBE_DCB_TX_CONFIG].up_to_tc_bitmap =
- (uint8_t)(1 << j);
+ tc->path[IXGBE_DCB_TX_CONFIG].up_to_tc_bitmap |=
+ (uint8_t)(1 << i);
}
}
--
2.7.4
^ permalink raw reply [flat|nested] 191+ messages in thread
* [dpdk-stable] patch 'net/mlx5: fix locking in xstats functions' has been queued to stable release 17.08.1
2017-11-21 13:15 [dpdk-stable] patch 'gro: fix typo in map file' has been queued to stable release 17.08.1 Yuanhan Liu
` (12 preceding siblings ...)
2017-11-21 13:15 ` [dpdk-stable] patch 'net/ixgbe: fix mapping of user priority to TC' " Yuanhan Liu
@ 2017-11-21 13:15 ` Yuanhan Liu
2017-11-21 13:15 ` [dpdk-stable] patch 'net/enic: fix possible null pointer dereference' " Yuanhan Liu
` (175 subsequent siblings)
189 siblings, 0 replies; 191+ messages in thread
From: Yuanhan Liu @ 2017-11-21 13:15 UTC (permalink / raw)
To: Matan Azrad; +Cc: Nelio Laranjeiro, dpdk stable
Hi,
FYI, your patch has been queued to stable release 17.08.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/24/17. So please
shout if anyone has objections.
Thanks.
--yliu
---
>From ff974a02615e64f641edb872122054cc140f19c3 Mon Sep 17 00:00:00 2001
From: Matan Azrad <matan@mellanox.com>
Date: Mon, 14 Aug 2017 14:32:24 +0300
Subject: [PATCH] net/mlx5: fix locking in xstats functions
[ upstream commit b5743da31eba03cdc7abae3295f8ba852919c4a3 ]
The corrupted code didn't unlock the spinlock in xstats
get and reset functions error flow.
Hence, if these errors happened, the device spinlock was
left locked and many mlx5 device functionalities were blocked.
The fix unlocks the spinlock in the missed places.
Fixes: e62bc9e70608 ("net/mlx5: fix extended statistics")
Signed-off-by: Matan Azrad <matan@mellanox.com>
Acked-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
---
drivers/net/mlx5/mlx5_stats.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/drivers/net/mlx5/mlx5_stats.c b/drivers/net/mlx5/mlx5_stats.c
index 703f48c..33997af 100644
--- a/drivers/net/mlx5/mlx5_stats.c
+++ b/drivers/net/mlx5/mlx5_stats.c
@@ -442,8 +442,10 @@ mlx5_xstats_get(struct rte_eth_dev *dev,
priv_lock(priv);
stats_n = priv_ethtool_get_stats_n(priv);
- if (stats_n < 0)
+ if (stats_n < 0) {
+ priv_unlock(priv);
return -1;
+ }
if (xstats_ctrl->stats_n != stats_n)
priv_xstats_init(priv);
ret = priv_xstats_get(priv, stats);
@@ -468,10 +470,11 @@ mlx5_xstats_reset(struct rte_eth_dev *dev)
priv_lock(priv);
stats_n = priv_ethtool_get_stats_n(priv);
if (stats_n < 0)
- return;
+ goto unlock;
if (xstats_ctrl->stats_n != stats_n)
priv_xstats_init(priv);
priv_xstats_reset(priv);
+unlock:
priv_unlock(priv);
}
--
2.7.4
^ permalink raw reply [flat|nested] 191+ messages in thread
* [dpdk-stable] patch 'net/enic: fix possible null pointer dereference' has been queued to stable release 17.08.1
2017-11-21 13:15 [dpdk-stable] patch 'gro: fix typo in map file' has been queued to stable release 17.08.1 Yuanhan Liu
` (13 preceding siblings ...)
2017-11-21 13:15 ` [dpdk-stable] patch 'net/mlx5: fix locking in xstats functions' " Yuanhan Liu
@ 2017-11-21 13:15 ` Yuanhan Liu
2017-11-21 13:15 ` [dpdk-stable] patch 'net/qede: " Yuanhan Liu
` (174 subsequent siblings)
189 siblings, 0 replies; 191+ messages in thread
From: Yuanhan Liu @ 2017-11-21 13:15 UTC (permalink / raw)
To: RongQiang Xie; +Cc: Ferruh Yigit, dpdk stable
Hi,
FYI, your patch has been queued to stable release 17.08.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/24/17. So please
shout if anyone has objections.
Thanks.
--yliu
---
>From 553484c61f6f5040a67db92047d62481c1c13154 Mon Sep 17 00:00:00 2001
From: RongQiang Xie <xie.rongqiang@zte.com.cn>
Date: Wed, 23 Aug 2017 16:49:24 +0800
Subject: [PATCH] net/enic: fix possible null pointer dereference
[ upstream commit 7f4a1aa1430d085b80b6a483aac0e729a0b4f6df ]
In enic_alloc_consistent() function, if rte_malloc for mze is failed,
!mze is true, memzone should be freed and function should return NULL.
Fixes: da5f560be966 ("net/enic: fix memory freeing")
Signed-off-by: RongQiang Xie <xie.rongqiang@zte.com.cn>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
drivers/net/enic/enic_main.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/net/enic/enic_main.c b/drivers/net/enic/enic_main.c
index 40dbec7..1d956cd 100644
--- a/drivers/net/enic/enic_main.c
+++ b/drivers/net/enic/enic_main.c
@@ -368,6 +368,7 @@ enic_alloc_consistent(void *priv, size_t size,
pr_err("%s : Failed to allocate memory for memzone list\n",
__func__);
rte_memzone_free(rz);
+ return NULL;
}
mze->rz = rz;
--
2.7.4
^ permalink raw reply [flat|nested] 191+ messages in thread
* [dpdk-stable] patch 'net/qede: fix possible null pointer dereference' has been queued to stable release 17.08.1
2017-11-21 13:15 [dpdk-stable] patch 'gro: fix typo in map file' has been queued to stable release 17.08.1 Yuanhan Liu
` (14 preceding siblings ...)
2017-11-21 13:15 ` [dpdk-stable] patch 'net/enic: fix possible null pointer dereference' " Yuanhan Liu
@ 2017-11-21 13:15 ` Yuanhan Liu
2017-11-21 13:16 ` [dpdk-stable] patch 'net/failsafe: fix parameters parsing' " Yuanhan Liu
` (173 subsequent siblings)
189 siblings, 0 replies; 191+ messages in thread
From: Yuanhan Liu @ 2017-11-21 13:15 UTC (permalink / raw)
To: RongQiang Xie; +Cc: Harish Patil, dpdk stable
Hi,
FYI, your patch has been queued to stable release 17.08.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/24/17. So please
shout if anyone has objections.
Thanks.
--yliu
---
>From f869c214e03d7ba2d3216179e6220efb86316c80 Mon Sep 17 00:00:00 2001
From: RongQiang Xie <xie.rongqiang@zte.com.cn>
Date: Thu, 24 Aug 2017 15:12:33 +0800
Subject: [PATCH] net/qede: fix possible null pointer dereference
[ upstream commit ef86e67ad5d873573882e19d92a206a842d22927 ]
In function qede_rss_reta_update(), the pointer params returned from
call to function rte_zmalloc() may be NULL and will be dereferenced.
So, should judge if the params is NULL or not.
Fixes: 8b3ee85efe11 ("net/qede: fix RSS table entries for 100G adapter")
Signed-off-by: RongQiang Xie <xie.rongqiang@zte.com.cn>
Acked-by: Harish Patil <harish.patil@cavium.com>
---
drivers/net/qede/qede_ethdev.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/net/qede/qede_ethdev.c b/drivers/net/qede/qede_ethdev.c
index 0e05989..4e9e89f 100644
--- a/drivers/net/qede/qede_ethdev.c
+++ b/drivers/net/qede/qede_ethdev.c
@@ -2012,6 +2012,10 @@ int qede_rss_reta_update(struct rte_eth_dev *eth_dev,
memset(&vport_update_params, 0, sizeof(vport_update_params));
params = rte_zmalloc("qede_rss", sizeof(*params) * edev->num_hwfns,
RTE_CACHE_LINE_SIZE);
+ if (params == NULL) {
+ DP_ERR(edev, "failed to allocate memory\n");
+ return -ENOMEM;
+ }
for (i = 0; i < reta_size; i++) {
idx = i / RTE_RETA_GROUP_SIZE;
--
2.7.4
^ permalink raw reply [flat|nested] 191+ messages in thread
* [dpdk-stable] patch 'net/failsafe: fix parameters parsing' has been queued to stable release 17.08.1
2017-11-21 13:15 [dpdk-stable] patch 'gro: fix typo in map file' has been queued to stable release 17.08.1 Yuanhan Liu
` (15 preceding siblings ...)
2017-11-21 13:15 ` [dpdk-stable] patch 'net/qede: " Yuanhan Liu
@ 2017-11-21 13:16 ` Yuanhan Liu
2017-11-21 13:16 ` [dpdk-stable] patch 'net/i40e: fix interrupt throttling setting in PF' " Yuanhan Liu
` (172 subsequent siblings)
189 siblings, 0 replies; 191+ messages in thread
From: Yuanhan Liu @ 2017-11-21 13:16 UTC (permalink / raw)
To: Matan Azrad; +Cc: Gaetan Rivet, dpdk stable
Hi,
FYI, your patch has been queued to stable release 17.08.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/24/17. So please
shout if anyone has objections.
Thanks.
--yliu
---
>From 3d2115da7360fc0cae912a745c266b2d0d691dbb Mon Sep 17 00:00:00 2001
From: Matan Azrad <matan@mellanox.com>
Date: Sun, 27 Aug 2017 10:23:14 +0300
Subject: [PATCH] net/failsafe: fix parameters parsing
[ upstream commit 852be6520b0384a47bbf4f45fe62df01e165cf53 ]
The corrupted code used wrongly snprintf return value as the
number of characters actually copied, in spite of the meaning
is the number of characters which would be generated for the
given input.
It caused to remain zerod bytes between the failsafe command line
non sub device parameters indicates end of string.
Hence, when rte_kvargs_parse tried to parse all parameters, it
got end of string after the first one and the others weren't parsed.
So, if the mac parameters was the first in command line it was
taken while hotplug_poll was left default, and vice versa.
The fix updates the buffer index by dedicated variable contains
the copy size, by the way validates the comma separation.
Fixes: a46f8d584eb8 ("net/failsafe: add fail-safe PMD")
Signed-off-by: Matan Azrad <matan@mellanox.com>
Acked-by: Gaetan Rivet <gaetan.rivet@6wind.com>
---
drivers/net/failsafe/failsafe_args.c | 14 +++++++++++---
1 file changed, 11 insertions(+), 3 deletions(-)
diff --git a/drivers/net/failsafe/failsafe_args.c b/drivers/net/failsafe/failsafe_args.c
index 1f22416..ae857b0 100644
--- a/drivers/net/failsafe/failsafe_args.c
+++ b/drivers/net/failsafe/failsafe_args.c
@@ -286,10 +286,17 @@ fs_remove_sub_devices_definition(char params[DEVARGS_MAXLEN])
ERROR("Invalid parameter");
return -EINVAL;
}
- if (params[b] == ',' || params[b] == '\0')
- i += snprintf(&buffer[i], b - a + 1, "%s", ¶ms[a]);
- if (params[b] == '(') {
+ if (params[b] == ',' || params[b] == '\0') {
+ size_t len = b - a;
+
+ if (i > 0)
+ len += 1;
+ snprintf(&buffer[i], len + 1, "%s%s",
+ i ? "," : "", ¶ms[a]);
+ i += len;
+ } else if (params[b] == '(') {
size_t start = b;
+
b += closing_paren(¶ms[b]);
if (b == start)
return -EINVAL;
@@ -393,6 +400,7 @@ failsafe_args_parse(struct rte_eth_dev *dev, const char *params)
&dev->data->mac_addrs[0]);
if (ret < 0)
goto free_kvlist;
+
mac_from_arg = 1;
}
}
--
2.7.4
^ permalink raw reply [flat|nested] 191+ messages in thread
* [dpdk-stable] patch 'net/i40e: fix interrupt throttling setting in PF' has been queued to stable release 17.08.1
2017-11-21 13:15 [dpdk-stable] patch 'gro: fix typo in map file' has been queued to stable release 17.08.1 Yuanhan Liu
` (16 preceding siblings ...)
2017-11-21 13:16 ` [dpdk-stable] patch 'net/failsafe: fix parameters parsing' " Yuanhan Liu
@ 2017-11-21 13:16 ` Yuanhan Liu
2017-11-21 13:16 ` [dpdk-stable] patch 'net/failsafe: fix failsafe bus uninit return value' " Yuanhan Liu
` (171 subsequent siblings)
189 siblings, 0 replies; 191+ messages in thread
From: Yuanhan Liu @ 2017-11-21 13:16 UTC (permalink / raw)
To: Jingjing Wu; +Cc: dpdk stable
Hi,
FYI, your patch has been queued to stable release 17.08.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/24/17. So please
shout if anyone has objections.
Thanks.
--yliu
---
>From 50f3a9d0da60235e9109214f12c757f1a92ed54a Mon Sep 17 00:00:00 2001
From: Jingjing Wu <jingjing.wu@intel.com>
Date: Thu, 24 Aug 2017 09:57:51 +0800
Subject: [PATCH] net/i40e: fix interrupt throttling setting in PF
[ upstream commit cfd662d22e7bddb4ba41dbd1384f8497f38c2b4e ]
As no matter the PF host driver is DPDK or other kernel drivers,
they are sharing the same virtchnnl interfaces to communicate to VFs.
To follow the generic interface, DPDK PF need to set Interrupt
Throttling (ITR) index according to the rxitr_idx from virtchnnl
instead of ITR_NONE.
Fixes: 6d59e4ea74a6 ("net/i40e: change version number to support Linux VF")
Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
---
drivers/net/i40e/i40e_ethdev.c | 24 +++++++++++++++---------
drivers/net/i40e/i40e_ethdev.h | 4 ++--
drivers/net/i40e/i40e_pf.c | 5 +++--
3 files changed, 20 insertions(+), 13 deletions(-)
diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c
index 4a2e3f2..8e0580c 100644
--- a/drivers/net/i40e/i40e_ethdev.c
+++ b/drivers/net/i40e/i40e_ethdev.c
@@ -1594,7 +1594,8 @@ i40e_vsi_queues_unbind_intr(struct i40e_vsi *vsi)
static void
__vsi_queues_bind_intr(struct i40e_vsi *vsi, uint16_t msix_vect,
- int base_queue, int nb_queue)
+ int base_queue, int nb_queue,
+ uint16_t itr_idx)
{
int i;
uint32_t val;
@@ -1603,7 +1604,7 @@ __vsi_queues_bind_intr(struct i40e_vsi *vsi, uint16_t msix_vect,
/* Bind all RX queues to allocated MSIX interrupt */
for (i = 0; i < nb_queue; i++) {
val = (msix_vect << I40E_QINT_RQCTL_MSIX_INDX_SHIFT) |
- I40E_QINT_RQCTL_ITR_INDX_MASK |
+ itr_idx << I40E_QINT_RQCTL_ITR_INDX_SHIFT |
((base_queue + i + 1) <<
I40E_QINT_RQCTL_NEXTQ_INDX_SHIFT) |
(0 << I40E_QINT_RQCTL_NEXTQ_TYPE_SHIFT) |
@@ -1666,7 +1667,7 @@ __vsi_queues_bind_intr(struct i40e_vsi *vsi, uint16_t msix_vect,
}
void
-i40e_vsi_queues_bind_intr(struct i40e_vsi *vsi)
+i40e_vsi_queues_bind_intr(struct i40e_vsi *vsi, uint16_t itr_idx)
{
struct rte_eth_dev *dev = vsi->adapter->eth_dev;
struct rte_pci_device *pci_dev = RTE_ETH_DEV_TO_PCI(dev);
@@ -1694,7 +1695,8 @@ i40e_vsi_queues_bind_intr(struct i40e_vsi *vsi)
/* VF bind interrupt */
if (vsi->type == I40E_VSI_SRIOV) {
__vsi_queues_bind_intr(vsi, msix_vect,
- vsi->base_queue, vsi->nb_qps);
+ vsi->base_queue, vsi->nb_qps,
+ itr_idx);
return;
}
@@ -1720,7 +1722,8 @@ i40e_vsi_queues_bind_intr(struct i40e_vsi *vsi)
/* no enough msix_vect, map all to one */
__vsi_queues_bind_intr(vsi, msix_vect,
vsi->base_queue + i,
- vsi->nb_used_qps - i);
+ vsi->nb_used_qps - i,
+ itr_idx);
for (; !!record && i < vsi->nb_used_qps; i++)
intr_handle->intr_vec[queue_idx + i] =
msix_vect;
@@ -1728,7 +1731,8 @@ i40e_vsi_queues_bind_intr(struct i40e_vsi *vsi)
}
/* 1:1 queue/msix_vect mapping */
__vsi_queues_bind_intr(vsi, msix_vect,
- vsi->base_queue + i, 1);
+ vsi->base_queue + i, 1,
+ itr_idx);
if (!!record)
intr_handle->intr_vec[queue_idx + i] = msix_vect;
@@ -1957,19 +1961,21 @@ i40e_dev_start(struct rte_eth_dev *dev)
/* Map queues with MSIX interrupt */
main_vsi->nb_used_qps = dev->data->nb_rx_queues -
pf->nb_cfg_vmdq_vsi * RTE_LIBRTE_I40E_QUEUE_NUM_PER_VM;
- i40e_vsi_queues_bind_intr(main_vsi);
+ i40e_vsi_queues_bind_intr(main_vsi, I40E_ITR_INDEX_DEFAULT);
i40e_vsi_enable_queues_intr(main_vsi);
/* Map VMDQ VSI queues with MSIX interrupt */
for (i = 0; i < pf->nb_cfg_vmdq_vsi; i++) {
pf->vmdq[i].vsi->nb_used_qps = RTE_LIBRTE_I40E_QUEUE_NUM_PER_VM;
- i40e_vsi_queues_bind_intr(pf->vmdq[i].vsi);
+ i40e_vsi_queues_bind_intr(pf->vmdq[i].vsi,
+ I40E_ITR_INDEX_DEFAULT);
i40e_vsi_enable_queues_intr(pf->vmdq[i].vsi);
}
/* enable FDIR MSIX interrupt */
if (pf->fdir.fdir_vsi) {
- i40e_vsi_queues_bind_intr(pf->fdir.fdir_vsi);
+ i40e_vsi_queues_bind_intr(pf->fdir.fdir_vsi,
+ I40E_ITR_INDEX_NONE);
i40e_vsi_enable_queues_intr(pf->fdir.fdir_vsi);
}
diff --git a/drivers/net/i40e/i40e_ethdev.h b/drivers/net/i40e/i40e_ethdev.h
index 48abc05..ad80f0f 100644
--- a/drivers/net/i40e/i40e_ethdev.h
+++ b/drivers/net/i40e/i40e_ethdev.h
@@ -186,9 +186,9 @@ enum i40e_flxpld_layer_idx {
/* Default queue interrupt throttling time in microseconds */
#define I40E_ITR_INDEX_DEFAULT 0
+#define I40E_ITR_INDEX_NONE 3
#define I40E_QUEUE_ITR_INTERVAL_DEFAULT 32 /* 32 us */
#define I40E_QUEUE_ITR_INTERVAL_MAX 8160 /* 8160 us */
-
/* Special FW support this floating VEB feature */
#define FLOATING_VEB_SUPPORTED_FW_MAJ 5
#define FLOATING_VEB_SUPPORTED_FW_MIN 0
@@ -919,7 +919,7 @@ void i40e_update_vsi_stats(struct i40e_vsi *vsi);
void i40e_pf_disable_irq0(struct i40e_hw *hw);
void i40e_pf_enable_irq0(struct i40e_hw *hw);
int i40e_dev_link_update(struct rte_eth_dev *dev, int wait_to_complete);
-void i40e_vsi_queues_bind_intr(struct i40e_vsi *vsi);
+void i40e_vsi_queues_bind_intr(struct i40e_vsi *vsi, uint16_t itr_idx);
void i40e_vsi_queues_unbind_intr(struct i40e_vsi *vsi);
int i40e_vsi_vlan_pvid_set(struct i40e_vsi *vsi,
struct i40e_vsi_vlan_pvid_info *info);
diff --git a/drivers/net/i40e/i40e_pf.c b/drivers/net/i40e/i40e_pf.c
index fe89027..e10733d 100644
--- a/drivers/net/i40e/i40e_pf.c
+++ b/drivers/net/i40e/i40e_pf.c
@@ -714,7 +714,7 @@ i40e_pf_host_process_cmd_config_irq_map(struct i40e_pf_vf *vf,
(struct virtchnl_irq_map_info *)msg;
struct virtchnl_vector_map *map;
int i;
- uint16_t vector_id;
+ uint16_t vector_id, itr_idx;
unsigned long qbit_max;
if (!b_op) {
@@ -741,12 +741,13 @@ i40e_pf_host_process_cmd_config_irq_map(struct i40e_pf_vf *vf,
vf->vsi->msix_intr = irqmap->vecmap[0].vector_id;
vf->vsi->nb_msix = irqmap->num_vectors;
vf->vsi->nb_used_qps = vf->vsi->nb_qps;
+ itr_idx = irqmap->vecmap[0].rxitr_idx;
/* Don't care how the TX/RX queue mapping with this vector.
* Link all VF RX queues together. Only did mapping work.
* VF can disable/enable the intr by itself.
*/
- i40e_vsi_queues_bind_intr(vf->vsi);
+ i40e_vsi_queues_bind_intr(vf->vsi, itr_idx);
goto send_msg;
}
--
2.7.4
^ permalink raw reply [flat|nested] 191+ messages in thread
* [dpdk-stable] patch 'net/failsafe: fix failsafe bus uninit return value' has been queued to stable release 17.08.1
2017-11-21 13:15 [dpdk-stable] patch 'gro: fix typo in map file' has been queued to stable release 17.08.1 Yuanhan Liu
` (17 preceding siblings ...)
2017-11-21 13:16 ` [dpdk-stable] patch 'net/i40e: fix interrupt throttling setting in PF' " Yuanhan Liu
@ 2017-11-21 13:16 ` Yuanhan Liu
2017-11-21 13:16 ` [dpdk-stable] patch 'net/sfc: specify correct scale table size on Rx start' " Yuanhan Liu
` (170 subsequent siblings)
189 siblings, 0 replies; 191+ messages in thread
From: Yuanhan Liu @ 2017-11-21 13:16 UTC (permalink / raw)
To: Raslan Darawsheh; +Cc: Gaetan Rivet, dpdk stable
Hi,
FYI, your patch has been queued to stable release 17.08.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/24/17. So please
shout if anyone has objections.
Thanks.
--yliu
---
>From 435e52a3c92028b4c3a8960a52e49fb97e58bdd5 Mon Sep 17 00:00:00 2001
From: Raslan Darawsheh <rasland@mellanox.com>
Date: Tue, 29 Aug 2017 12:08:08 +0300
Subject: [PATCH] net/failsafe: fix failsafe bus uninit return value
[ upstream commit 6969a22bf6ee18d8f34990688194aef4bad3a19c ]
fs_bus_uninit is always returning 0 no matter what was the status
of each sub device bus_uninit value.
Fixes: a46f8d584eb8 ("net/failsafe: add fail-safe PMD")
Signed-off-by: Raslan Darawsheh <rasland@mellanox.com>
Acked-by: Gaetan Rivet <gaetan.rivet@6wind.com>
---
drivers/net/failsafe/failsafe_eal.c | 19 +++++++++----------
1 file changed, 9 insertions(+), 10 deletions(-)
diff --git a/drivers/net/failsafe/failsafe_eal.c b/drivers/net/failsafe/failsafe_eal.c
index c8f4318..aeb87a0 100644
--- a/drivers/net/failsafe/failsafe_eal.c
+++ b/drivers/net/failsafe/failsafe_eal.c
@@ -90,19 +90,20 @@ fs_bus_uninit(struct rte_eth_dev *dev)
{
struct sub_device *sdev = NULL;
uint8_t i;
- int ret;
+ int sdev_ret;
+ int ret = 0;
FOREACH_SUBDEV_STATE(sdev, i, dev, DEV_PROBED) {
- ret = rte_eal_hotplug_remove(sdev->bus->name,
- sdev->dev->name);
- if (ret) {
- ERROR("Failed to remove requested device %s",
- sdev->dev->name);
+ sdev_ret = rte_eal_hotplug_remove(sdev->bus->name,
+ sdev->dev->name);
+ if (sdev_ret) {
+ ERROR("Failed to remove requested device %s (err: %d)",
+ sdev->dev->name, sdev_ret);
continue;
}
sdev->state = DEV_PROBED - 1;
}
- return 0;
+ return ret;
}
int
@@ -111,8 +112,6 @@ failsafe_eal_uninit(struct rte_eth_dev *dev)
int ret;
ret = fs_bus_uninit(dev);
- if (ret)
- return ret;
PRIV(dev)->state = DEV_PROBED - 1;
- return 0;
+ return ret;
}
--
2.7.4
^ permalink raw reply [flat|nested] 191+ messages in thread
* [dpdk-stable] patch 'net/sfc: specify correct scale table size on Rx start' has been queued to stable release 17.08.1
2017-11-21 13:15 [dpdk-stable] patch 'gro: fix typo in map file' has been queued to stable release 17.08.1 Yuanhan Liu
` (18 preceding siblings ...)
2017-11-21 13:16 ` [dpdk-stable] patch 'net/failsafe: fix failsafe bus uninit return value' " Yuanhan Liu
@ 2017-11-21 13:16 ` Yuanhan Liu
2017-11-21 13:16 ` [dpdk-stable] patch 'net/i40e: fix VF device stop issue' " Yuanhan Liu
` (169 subsequent siblings)
189 siblings, 0 replies; 191+ messages in thread
From: Yuanhan Liu @ 2017-11-21 13:16 UTC (permalink / raw)
To: Ivan Malov; +Cc: Andrew Rybchenko, dpdk stable
Hi,
FYI, your patch has been queued to stable release 17.08.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/24/17. So please
shout if anyone has objections.
Thanks.
--yliu
---
>From f934b3581069172337b07bbe7cd6e43fb674b10d Mon Sep 17 00:00:00 2001
From: Ivan Malov <ivan.malov@oktetlabs.ru>
Date: Mon, 28 Aug 2017 13:53:46 +0100
Subject: [PATCH] net/sfc: specify correct scale table size on Rx start
[ upstream commit efbd16eadea870e01cf4518f425e3f7bdeb8a338 ]
efx_rx_scale_tbl_set() takes the number of entries in the scale table
to be set, not the size of the table in bytes; currently this bug does
not make any damage since the size argument is used to wrap the loop
on the input table when filling in an MCDI request in case if the table
size in the MCDI request is larger then one provided by the user,
and MCDI scale table size is the same as the size of the table provided
by the driver; this patch brings a fix for the bug
Fixes: 4ec1fc3ba881 ("net/sfc: add basic stubs for RSS support on driver attach")
Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
---
drivers/net/sfc/sfc_rx.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/sfc/sfc_rx.c b/drivers/net/sfc/sfc_rx.c
index 1bf8644..364f718 100644
--- a/drivers/net/sfc/sfc_rx.c
+++ b/drivers/net/sfc/sfc_rx.c
@@ -1068,7 +1068,7 @@ sfc_rx_rss_config(struct sfc_adapter *sa)
goto finish;
rc = efx_rx_scale_tbl_set(sa->nic, sa->rss_tbl,
- sizeof(sa->rss_tbl));
+ RTE_DIM(sa->rss_tbl));
}
finish:
--
2.7.4
^ permalink raw reply [flat|nested] 191+ messages in thread
* [dpdk-stable] patch 'net/i40e: fix VF device stop issue' has been queued to stable release 17.08.1
2017-11-21 13:15 [dpdk-stable] patch 'gro: fix typo in map file' has been queued to stable release 17.08.1 Yuanhan Liu
` (19 preceding siblings ...)
2017-11-21 13:16 ` [dpdk-stable] patch 'net/sfc: specify correct scale table size on Rx start' " Yuanhan Liu
@ 2017-11-21 13:16 ` Yuanhan Liu
2017-11-21 13:16 ` [dpdk-stable] patch 'net/mlx5: fix clang build' " Yuanhan Liu
` (168 subsequent siblings)
189 siblings, 0 replies; 191+ messages in thread
From: Yuanhan Liu @ 2017-11-21 13:16 UTC (permalink / raw)
To: Beilei Xing; +Cc: dpdk stable
Hi,
FYI, your patch has been queued to stable release 17.08.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/24/17. So please
shout if anyone has objections.
Thanks.
--yliu
---
>From ee20db1041e76505c8fa263136f22fe4eec413d0 Mon Sep 17 00:00:00 2001
From: Beilei Xing <beilei.xing@intel.com>
Date: Wed, 30 Aug 2017 02:34:33 +0800
Subject: [PATCH] net/i40e: fix VF device stop issue
[ upstream commit 45ea1d8b2e49fa31718ca401881c1c43b26e0d06 ]
i40e HW data is gotten wrongly in i40evf_dev_stop function,
it may cause device can't be stopped.
This patch is to fix the issue.
Fixes: 185993420249 ("net/i40e: fix VF add/del MAC")
Signed-off-by: Beilei Xing <beilei.xing@intel.com>
---
drivers/net/i40e/i40e_ethdev_vf.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/i40e/i40e_ethdev_vf.c b/drivers/net/i40e/i40e_ethdev_vf.c
index f6d8293..44fb0db 100644
--- a/drivers/net/i40e/i40e_ethdev_vf.c
+++ b/drivers/net/i40e/i40e_ethdev_vf.c
@@ -2155,7 +2155,7 @@ i40evf_dev_stop(struct rte_eth_dev *dev)
{
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_DEV_PRIVATE_TO_HW(dev);
+ struct i40e_hw *hw = I40E_DEV_PRIVATE_TO_HW(dev->data->dev_private);
PMD_INIT_FUNC_TRACE();
--
2.7.4
^ permalink raw reply [flat|nested] 191+ messages in thread
* [dpdk-stable] patch 'net/mlx5: fix clang build' has been queued to stable release 17.08.1
2017-11-21 13:15 [dpdk-stable] patch 'gro: fix typo in map file' has been queued to stable release 17.08.1 Yuanhan Liu
` (20 preceding siblings ...)
2017-11-21 13:16 ` [dpdk-stable] patch 'net/i40e: fix VF device stop issue' " Yuanhan Liu
@ 2017-11-21 13:16 ` Yuanhan Liu
2017-11-21 13:16 ` [dpdk-stable] patch 'net/mlx5: fix probe failure report' " Yuanhan Liu
` (167 subsequent siblings)
189 siblings, 0 replies; 191+ messages in thread
From: Yuanhan Liu @ 2017-11-21 13:16 UTC (permalink / raw)
To: Nélio Laranjeiro; +Cc: Adrien Mazarguil, dpdk stable
Hi,
FYI, your patch has been queued to stable release 17.08.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/24/17. So please
shout if anyone has objections.
Thanks.
--yliu
---
>From b3ef7ae1ee06e0145ff031243d29a0470f099a5c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?N=C3=A9lio=20Laranjeiro?= <nelio.laranjeiro@6wind.com>
Date: Wed, 30 Aug 2017 16:47:06 +0200
Subject: [PATCH] net/mlx5: fix clang build
[ upstream commit 90260d577b61685365b7cf1a6151b9ed6b108f2d ]
On redhat 7.2 clang reports the following error:
CC mlx5_rxmode.o
/drivers/net/mlx5/mlx5_ethdev.c:820:32: error: field 'edata' with
variable sized type 'struct ethtool_link_settings' not at the end
of a struct or class is a GNU extension
[-Werror,-Wgnu-variable-sized-type-not-at-end]
struct ethtool_link_settings edata;
Use alternative approach to reserve buffer space on the stack.
Fixes: ef09a7fc7620 ("net/mlx5: fix inconsistent link status query")
Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
---
drivers/net/mlx5/mlx5_ethdev.c | 28 ++++++++++++++--------------
1 file changed, 14 insertions(+), 14 deletions(-)
diff --git a/drivers/net/mlx5/mlx5_ethdev.c b/drivers/net/mlx5/mlx5_ethdev.c
index b0eb3cd..9a10f6a 100644
--- a/drivers/net/mlx5/mlx5_ethdev.c
+++ b/drivers/net/mlx5/mlx5_ethdev.c
@@ -49,6 +49,7 @@
#include <linux/sockios.h>
#include <linux/version.h>
#include <fcntl.h>
+#include <stdalign.h>
/* DPDK headers don't like -pedantic. */
#ifdef PEDANTIC
@@ -816,12 +817,11 @@ static int
mlx5_link_update_unlocked_gs(struct rte_eth_dev *dev, int wait_to_complete)
{
struct priv *priv = mlx5_get_priv(dev);
- __extension__ struct {
- struct ethtool_link_settings edata;
- uint32_t link_mode_data[3 *
- ETHTOOL_LINK_MODE_MASK_MAX_KERNEL_NU32];
- } ecmd;
-
+ alignas(struct ethtool_link_settings)
+ uint8_t data[offsetof(struct ethtool_link_settings, link_mode_masks) +
+ sizeof(uint32_t) *
+ ETHTOOL_LINK_MODE_MASK_MAX_KERNEL_NU32 * 3];
+ struct ethtool_link_settings *ecmd = (void *)data;
struct ifreq ifr;
struct rte_eth_link dev_link;
uint64_t sc;
@@ -834,23 +834,23 @@ mlx5_link_update_unlocked_gs(struct rte_eth_dev *dev, int wait_to_complete)
memset(&dev_link, 0, sizeof(dev_link));
dev_link.link_status = ((ifr.ifr_flags & IFF_UP) &&
(ifr.ifr_flags & IFF_RUNNING));
- memset(&ecmd, 0, sizeof(ecmd));
- ecmd.edata.cmd = ETHTOOL_GLINKSETTINGS;
- ifr.ifr_data = (void *)&ecmd;
+ memset(ecmd, 0, sizeof(*ecmd));
+ ecmd->cmd = ETHTOOL_GLINKSETTINGS;
+ ifr.ifr_data = (void *)ecmd;
if (priv_ifreq(priv, SIOCETHTOOL, &ifr)) {
DEBUG("ioctl(SIOCETHTOOL, ETHTOOL_GLINKSETTINGS) failed: %s",
strerror(errno));
return -1;
}
- ecmd.edata.link_mode_masks_nwords = -ecmd.edata.link_mode_masks_nwords;
+ ecmd->link_mode_masks_nwords = -ecmd->link_mode_masks_nwords;
if (priv_ifreq(priv, SIOCETHTOOL, &ifr)) {
DEBUG("ioctl(SIOCETHTOOL, ETHTOOL_GLINKSETTINGS) failed: %s",
strerror(errno));
return -1;
}
- dev_link.link_speed = ecmd.edata.speed;
- sc = ecmd.edata.link_mode_masks[0] |
- ((uint64_t)ecmd.edata.link_mode_masks[1] << 32);
+ dev_link.link_speed = ecmd->speed;
+ sc = ecmd->link_mode_masks[0] |
+ ((uint64_t)ecmd->link_mode_masks[1] << 32);
priv->link_speed_capa = 0;
if (sc & ETHTOOL_LINK_MODE_Autoneg_BIT)
priv->link_speed_capa |= ETH_LINK_SPEED_AUTONEG;
@@ -886,7 +886,7 @@ mlx5_link_update_unlocked_gs(struct rte_eth_dev *dev, int wait_to_complete)
ETHTOOL_LINK_MODE_100000baseCR4_Full_BIT |
ETHTOOL_LINK_MODE_100000baseLR4_ER4_Full_BIT))
priv->link_speed_capa |= ETH_LINK_SPEED_100G;
- dev_link.link_duplex = ((ecmd.edata.duplex == DUPLEX_HALF) ?
+ dev_link.link_duplex = ((ecmd->duplex == DUPLEX_HALF) ?
ETH_LINK_HALF_DUPLEX : ETH_LINK_FULL_DUPLEX);
dev_link.link_autoneg = !(dev->data->dev_conf.link_speeds &
ETH_LINK_SPEED_FIXED);
--
2.7.4
^ permalink raw reply [flat|nested] 191+ messages in thread
* [dpdk-stable] patch 'net/mlx5: fix probe failure report' has been queued to stable release 17.08.1
2017-11-21 13:15 [dpdk-stable] patch 'gro: fix typo in map file' has been queued to stable release 17.08.1 Yuanhan Liu
` (21 preceding siblings ...)
2017-11-21 13:16 ` [dpdk-stable] patch 'net/mlx5: fix clang build' " Yuanhan Liu
@ 2017-11-21 13:16 ` Yuanhan Liu
2017-11-21 13:16 ` [dpdk-stable] patch 'net/failsafe: fix errno set on command execution' " Yuanhan Liu
` (166 subsequent siblings)
189 siblings, 0 replies; 191+ messages in thread
From: Yuanhan Liu @ 2017-11-21 13:16 UTC (permalink / raw)
To: Matan Azrad; +Cc: Nelio Laranjeiro, dpdk stable
Hi,
FYI, your patch has been queued to stable release 17.08.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/24/17. So please
shout if anyone has objections.
Thanks.
--yliu
---
>From 2882817e044d61aaa1e66914d124acab9e162382 Mon Sep 17 00:00:00 2001
From: Matan Azrad <matan@mellanox.com>
Date: Sun, 13 Aug 2017 15:25:12 +0300
Subject: [PATCH] net/mlx5: fix probe failure report
[ upstream commit e1c3e30508e1c73697a78900cb9004edc83711af ]
The corrupted code doesn't return error when probe function
fails due to error in device mac address getting.
By this way, the probe function may return success even if the
ETH dev is not allocated.
Hence, the probe caller, for example failsafe PMD, fails when it
tries to get ETH dev after the device was plugged out while mlx5
was probing it.
The fix adds error report to the probe caller when priv_get_mac fails
and in all other failure options which are missing it.
By this way, it prevents the unexpected behavior to miss ETH device
after the device was probed successfully.
This bug was already present in the original code taken from mlx4.
Fixes: 771fa900b73a ("mlx5: introduce new driver for Mellanox ConnectX-4 adapters")
Fixes: 1371f4df16bc ("mlx5: check port is configured as ethernet device")
Signed-off-by: Matan Azrad <matan@mellanox.com>
Acked-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
---
drivers/net/mlx5/mlx5.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/drivers/net/mlx5/mlx5.c b/drivers/net/mlx5/mlx5.c
index b7e5046..508b799 100644
--- a/drivers/net/mlx5/mlx5.c
+++ b/drivers/net/mlx5/mlx5.c
@@ -586,8 +586,10 @@ mlx5_pci_probe(struct rte_pci_driver *pci_drv, struct rte_pci_device *pci_dev)
DEBUG("using port %u (%08" PRIx32 ")", port, test);
ctx = ibv_open_device(ibv_dev);
- if (ctx == NULL)
+ if (ctx == NULL) {
+ err = ENODEV;
goto port_error;
+ }
/* Check port status. */
err = ibv_query_port(ctx, port, &port_attr);
@@ -599,6 +601,7 @@ mlx5_pci_probe(struct rte_pci_driver *pci_drv, struct rte_pci_device *pci_dev)
if (port_attr.link_layer != IBV_LINK_LAYER_ETHERNET) {
ERROR("port %d is not configured in Ethernet mode",
port);
+ err = EINVAL;
goto port_error;
}
@@ -647,6 +650,7 @@ mlx5_pci_probe(struct rte_pci_driver *pci_drv, struct rte_pci_device *pci_dev)
mlx5_args_assign(priv, &args);
if (ibv_exp_query_device(ctx, &exp_device_attr)) {
ERROR("ibv_exp_query_device() failed");
+ err = ENODEV;
goto port_error;
}
@@ -735,6 +739,7 @@ mlx5_pci_probe(struct rte_pci_driver *pci_drv, struct rte_pci_device *pci_dev)
if (priv_get_mac(priv, &mac.addr_bytes)) {
ERROR("cannot get MAC address, is mlx5_en loaded?"
" (errno: %s)", strerror(errno));
+ err = ENODEV;
goto port_error;
}
INFO("port %u MAC address is %02x:%02x:%02x:%02x:%02x:%02x",
--
2.7.4
^ permalink raw reply [flat|nested] 191+ messages in thread
* [dpdk-stable] patch 'net/failsafe: fix errno set on command execution' has been queued to stable release 17.08.1
2017-11-21 13:15 [dpdk-stable] patch 'gro: fix typo in map file' has been queued to stable release 17.08.1 Yuanhan Liu
` (22 preceding siblings ...)
2017-11-21 13:16 ` [dpdk-stable] patch 'net/mlx5: fix probe failure report' " Yuanhan Liu
@ 2017-11-21 13:16 ` Yuanhan Liu
2017-11-21 13:16 ` [dpdk-stable] patch 'net/sfc: fix unused variable in RSS-agnostic build' " Yuanhan Liu
` (165 subsequent siblings)
189 siblings, 0 replies; 191+ messages in thread
From: Yuanhan Liu @ 2017-11-21 13:16 UTC (permalink / raw)
To: Gaetan Rivet; +Cc: Matan Azrad, dpdk stable
Hi,
FYI, your patch has been queued to stable release 17.08.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/24/17. So please
shout if anyone has objections.
Thanks.
--yliu
---
>From 057fb6e12a0eb125e5ba2f3360cbc8492b293cc5 Mon Sep 17 00:00:00 2001
From: Gaetan Rivet <gaetan.rivet@6wind.com>
Date: Wed, 30 Aug 2017 17:59:54 +0200
Subject: [PATCH] net/failsafe: fix errno set on command execution
[ upstream commit 4853f2be3cb1483f4ccce445748794897fc37b4a ]
This is unacceptable behavior.
Fixes: a0194d828100 ("net/failsafe: add flexible device definition")
Fixes: 35ffe4208140 ("net/failsafe: fix missing pclose after popen")
Reported-by: Matan Azrad <matan@mellanox.com>
Signed-off-by: Gaetan Rivet <gaetan.rivet@6wind.com>
---
drivers/net/failsafe/failsafe_args.c | 18 ++++--------------
1 file changed, 4 insertions(+), 14 deletions(-)
diff --git a/drivers/net/failsafe/failsafe_args.c b/drivers/net/failsafe/failsafe_args.c
index ae857b0..cfc83e3 100644
--- a/drivers/net/failsafe/failsafe_args.c
+++ b/drivers/net/failsafe/failsafe_args.c
@@ -115,8 +115,7 @@ fs_execute_cmd(struct sub_device *sdev, char *cmdline)
/* store possible newline as well */
char output[DEVARGS_MAXLEN + 1];
size_t len;
- int old_err;
- int ret, pclose_ret;
+ int ret;
RTE_ASSERT(cmdline != NULL || sdev->cmdline != NULL);
if (sdev->cmdline == NULL) {
@@ -135,12 +134,10 @@ fs_execute_cmd(struct sub_device *sdev, char *cmdline)
sdev->cmdline[i] = ' ';
}
DEBUG("'%s'", sdev->cmdline);
- old_err = errno;
fp = popen(sdev->cmdline, "r");
if (fp == NULL) {
- ret = errno;
+ ret = -errno;
ERROR("popen: %s", strerror(errno));
- errno = old_err;
return ret;
}
/* We only read one line */
@@ -155,18 +152,11 @@ fs_execute_cmd(struct sub_device *sdev, char *cmdline)
goto ret_pclose;
}
ret = fs_parse_device(sdev, output);
- if (ret) {
+ if (ret)
ERROR("Parsing device '%s' failed", output);
- goto ret_pclose;
- }
ret_pclose:
- pclose_ret = pclose(fp);
- if (pclose_ret) {
- pclose_ret = errno;
+ if (pclose(fp) == -1)
ERROR("pclose: %s", strerror(errno));
- errno = old_err;
- return pclose_ret;
- }
return ret;
}
--
2.7.4
^ permalink raw reply [flat|nested] 191+ messages in thread
* [dpdk-stable] patch 'net/sfc: fix unused variable in RSS-agnostic build' has been queued to stable release 17.08.1
2017-11-21 13:15 [dpdk-stable] patch 'gro: fix typo in map file' has been queued to stable release 17.08.1 Yuanhan Liu
` (23 preceding siblings ...)
2017-11-21 13:16 ` [dpdk-stable] patch 'net/failsafe: fix errno set on command execution' " Yuanhan Liu
@ 2017-11-21 13:16 ` Yuanhan Liu
2017-11-21 13:16 ` [dpdk-stable] patch 'net/sfc/base: fix default RSS context check on Siena' " Yuanhan Liu
` (164 subsequent siblings)
189 siblings, 0 replies; 191+ messages in thread
From: Yuanhan Liu @ 2017-11-21 13:16 UTC (permalink / raw)
To: Ivan Malov; +Cc: Andrew Rybchenko, dpdk stable
Hi,
FYI, your patch has been queued to stable release 17.08.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/24/17. So please
shout if anyone has objections.
Thanks.
--yliu
---
>From 6539077e8b646d63ffb121545eeb37aa7774aab1 Mon Sep 17 00:00:00 2001
From: Ivan Malov <ivan.malov@oktetlabs.ru>
Date: Wed, 30 Aug 2017 19:17:31 +0100
Subject: [PATCH] net/sfc: fix unused variable in RSS-agnostic build
[ upstream commit 879b01bdfa90c739337d59b9b0f89f1ed8d5f160 ]
Unused variables will be found in several places if RSS
support is disabled at build time; the patch is to fix it
Fixes: 4ec1fc3ba881 ("net/sfc: add basic stubs for RSS support on driver attach")
Fixes: d9ff551fc974 ("net/sfc: support RSS hash offload")
Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
---
drivers/net/sfc/sfc.c | 8 ++++++--
drivers/net/sfc/sfc_rx.c | 24 +++++++++++++++++++-----
2 files changed, 25 insertions(+), 7 deletions(-)
diff --git a/drivers/net/sfc/sfc.c b/drivers/net/sfc/sfc.c
index 6cecfc0..7849a1c 100644
--- a/drivers/net/sfc/sfc.c
+++ b/drivers/net/sfc/sfc.c
@@ -510,10 +510,10 @@ static const uint8_t default_rss_key[SFC_RSS_KEY_SIZE] = {
};
#endif
+#if EFSYS_OPT_RX_SCALE
static int
sfc_set_rss_defaults(struct sfc_adapter *sa)
{
-#if EFSYS_OPT_RX_SCALE
int rc;
rc = efx_intr_init(sa->nic, sa->intr.type, NULL);
@@ -556,10 +556,14 @@ fail_ev_init:
fail_intr_init:
return rc;
+}
#else
+static int
+sfc_set_rss_defaults(__rte_unused struct sfc_adapter *sa)
+{
return 0;
-#endif
}
+#endif
int
sfc_attach(struct sfc_adapter *sa)
diff --git a/drivers/net/sfc/sfc_rx.c b/drivers/net/sfc/sfc_rx.c
index 364f718..be46b23 100644
--- a/drivers/net/sfc/sfc_rx.c
+++ b/drivers/net/sfc/sfc_rx.c
@@ -207,11 +207,11 @@ sfc_efx_supported_ptypes_get(void)
return ptypes;
}
+#if EFSYS_OPT_RX_SCALE
static void
sfc_efx_rx_set_rss_hash(struct sfc_efx_rxq *rxq, unsigned int flags,
struct rte_mbuf *m)
{
-#if EFSYS_OPT_RX_SCALE
uint8_t *mbuf_data;
@@ -227,8 +227,15 @@ sfc_efx_rx_set_rss_hash(struct sfc_efx_rxq *rxq, unsigned int flags,
m->ol_flags |= PKT_RX_RSS_HASH;
}
-#endif
}
+#else
+static void
+sfc_efx_rx_set_rss_hash(__rte_unused struct sfc_efx_rxq *rxq,
+ __rte_unused unsigned int flags,
+ __rte_unused struct rte_mbuf *m)
+{
+}
+#endif
static uint16_t
sfc_efx_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts, uint16_t nb_pkts)
@@ -1050,12 +1057,12 @@ sfc_efx_to_rte_hash_type(efx_rx_hash_type_t efx_hash_types)
}
#endif
+#if EFSYS_OPT_RX_SCALE
static int
sfc_rx_rss_config(struct sfc_adapter *sa)
{
int rc = 0;
-#if EFSYS_OPT_RX_SCALE
if (sa->rss_channels > 0) {
rc = efx_rx_scale_mode_set(sa->nic, EFX_RX_HASHALG_TOEPLITZ,
sa->rss_hash_types, B_TRUE);
@@ -1072,9 +1079,15 @@ sfc_rx_rss_config(struct sfc_adapter *sa)
}
finish:
-#endif
return rc;
}
+#else
+static int
+sfc_rx_rss_config(__rte_unused struct sfc_adapter *sa)
+{
+ return 0;
+}
+#endif
int
sfc_rx_start(struct sfc_adapter *sa)
@@ -1243,7 +1256,6 @@ sfc_rx_configure(struct sfc_adapter *sa)
{
struct rte_eth_conf *dev_conf = &sa->eth_dev->data->dev_conf;
const unsigned int nb_rx_queues = sa->eth_dev->data->nb_rx_queues;
- unsigned int sw_index;
int rc;
sfc_log_init(sa, "nb_rx_queues=%u (old %u)",
@@ -1296,6 +1308,8 @@ sfc_rx_configure(struct sfc_adapter *sa)
MIN(sa->rxq_count, EFX_MAXRSS) : 0;
if (sa->rss_channels > 0) {
+ unsigned int sw_index;
+
for (sw_index = 0; sw_index < EFX_RSS_TBL_SIZE; ++sw_index)
sa->rss_tbl[sw_index] = sw_index % sa->rss_channels;
}
--
2.7.4
^ permalink raw reply [flat|nested] 191+ messages in thread
* [dpdk-stable] patch 'net/sfc/base: fix default RSS context check on Siena' has been queued to stable release 17.08.1
2017-11-21 13:15 [dpdk-stable] patch 'gro: fix typo in map file' has been queued to stable release 17.08.1 Yuanhan Liu
` (24 preceding siblings ...)
2017-11-21 13:16 ` [dpdk-stable] patch 'net/sfc: fix unused variable in RSS-agnostic build' " Yuanhan Liu
@ 2017-11-21 13:16 ` Yuanhan Liu
2017-11-21 13:16 ` [dpdk-stable] patch 'net/failsafe: fix adding MAC error report miss' " Yuanhan Liu
` (163 subsequent siblings)
189 siblings, 0 replies; 191+ messages in thread
From: Yuanhan Liu @ 2017-11-21 13:16 UTC (permalink / raw)
To: Mark Spender; +Cc: Andrew Rybchenko, Andrew Lee, Andy Moreton, dpdk stable
Hi,
FYI, your patch has been queued to stable release 17.08.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/24/17. So please
shout if anyone has objections.
Thanks.
--yliu
---
>From f3058371a28ef3d44e95ef2d0f090fae0e6a158d Mon Sep 17 00:00:00 2001
From: Mark Spender <mspender@solarflare.com>
Date: Wed, 30 Aug 2017 19:17:33 +0100
Subject: [PATCH] net/sfc/base: fix default RSS context check on Siena
[ upstream commit 5c3818eedcb319d099fcf645150268ce84d01bc4 ]
Default RSS context check is carried out during filter
insertion on Siena and it needs to be fixed
Fixes: f7dc06bf35f21 ("net/sfc/base: import 5xxx/6xxx family support")
Signed-off-by: Mark Spender <mspender@solarflare.com>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Andrew Lee <alee@solarflare.com>
Reviewed-by: Andy Moreton <amoreton@solarflare.com>
---
drivers/net/sfc/base/efx_filter.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/sfc/base/efx_filter.c b/drivers/net/sfc/base/efx_filter.c
index ba31026..96119fd 100644
--- a/drivers/net/sfc/base/efx_filter.c
+++ b/drivers/net/sfc/base/efx_filter.c
@@ -454,9 +454,9 @@ siena_filter_spec_from_gen_spec(
else
EFSYS_ASSERT3U(gen_spec->efs_flags, &, EFX_FILTER_FLAG_RX);
- /* Falconsiena only has one RSS context */
+ /* Siena only has one RSS context */
if ((gen_spec->efs_flags & EFX_FILTER_FLAG_RX_RSS) &&
- gen_spec->efs_rss_context != 0) {
+ gen_spec->efs_rss_context != EFX_RSS_CONTEXT_DEFAULT) {
rc = EINVAL;
goto fail1;
}
--
2.7.4
^ permalink raw reply [flat|nested] 191+ messages in thread
* [dpdk-stable] patch 'net/failsafe: fix adding MAC error report miss' has been queued to stable release 17.08.1
2017-11-21 13:15 [dpdk-stable] patch 'gro: fix typo in map file' has been queued to stable release 17.08.1 Yuanhan Liu
` (25 preceding siblings ...)
2017-11-21 13:16 ` [dpdk-stable] patch 'net/sfc/base: fix default RSS context check on Siena' " Yuanhan Liu
@ 2017-11-21 13:16 ` Yuanhan Liu
2017-11-21 13:16 ` [dpdk-stable] patch 'net/mlx5: fix tunnel offload detection' " Yuanhan Liu
` (162 subsequent siblings)
189 siblings, 0 replies; 191+ messages in thread
From: Yuanhan Liu @ 2017-11-21 13:16 UTC (permalink / raw)
To: Matan Azrad; +Cc: Gaetan Rivet, dpdk stable
Hi,
FYI, your patch has been queued to stable release 17.08.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/24/17. So please
shout if anyone has objections.
Thanks.
--yliu
---
>From db6d5e1ad6b0e5d9d5d2645266fbc47a9b2223de Mon Sep 17 00:00:00 2001
From: Matan Azrad <matan@mellanox.com>
Date: Sun, 3 Sep 2017 18:26:45 +0300
Subject: [PATCH] net/failsafe: fix adding MAC error report miss
[ upstream commit ae7cb246d159eb9eb67d931267dc0d399864ab26 ]
The corrupted code don't reply error in case of MAC
address adding failure while failsafe PMD was trying
to apply configuration to the sub device.
Hence, the application may get unwanted packets.
The fix adds error report for this case.
Fixes: ebea83f899d8 ("net/failsafe: add plug-in support")
Signed-off-by: Matan Azrad <matan@mellanox.com>
Acked-by: Gaetan Rivet <gaetan.rivet@6wind.com>
---
drivers/net/failsafe/failsafe_ether.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/net/failsafe/failsafe_ether.c b/drivers/net/failsafe/failsafe_ether.c
index a3a8cce..fb9bbce 100644
--- a/drivers/net/failsafe/failsafe_ether.c
+++ b/drivers/net/failsafe/failsafe_ether.c
@@ -203,6 +203,7 @@ fs_eth_dev_conf_apply(struct rte_eth_dev *dev,
ether_format_addr(ea_fmt, ETHER_ADDR_FMT_SIZE, ea);
ERROR("Adding MAC address %s failed", ea_fmt);
+ return ret;
}
}
/* VLAN filter */
--
2.7.4
^ permalink raw reply [flat|nested] 191+ messages in thread
* [dpdk-stable] patch 'net/mlx5: fix tunnel offload detection' has been queued to stable release 17.08.1
2017-11-21 13:15 [dpdk-stable] patch 'gro: fix typo in map file' has been queued to stable release 17.08.1 Yuanhan Liu
` (26 preceding siblings ...)
2017-11-21 13:16 ` [dpdk-stable] patch 'net/failsafe: fix adding MAC error report miss' " Yuanhan Liu
@ 2017-11-21 13:16 ` Yuanhan Liu
2017-11-21 13:16 ` [dpdk-stable] patch 'net/cxgbe: fix memory leak' " Yuanhan Liu
` (161 subsequent siblings)
189 siblings, 0 replies; 191+ messages in thread
From: Yuanhan Liu @ 2017-11-21 13:16 UTC (permalink / raw)
To: Xueming Li; +Cc: Shahaf Shuler, Nelio Laranjeiro, dpdk stable
Hi,
FYI, your patch has been queued to stable release 17.08.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/24/17. So please
shout if anyone has objections.
Thanks.
--yliu
---
>From 114f1b82c7f2bb59df9899790a05b573715be082 Mon Sep 17 00:00:00 2001
From: Xueming Li <xuemingl@mellanox.com>
Date: Mon, 4 Sep 2017 19:43:51 +0800
Subject: [PATCH] net/mlx5: fix tunnel offload detection
[ upstream commit 772d34356d72af2f5a3d483c83afb00d4cb4ae03 ]
PMD driver got random tunnel_en value on ConnextX-4LX NIC, depends on
compile optimization level. The variable was not initialized and
detection logic was absent.
Fixes: f5fde5205101 ("net/mlx5: add hardware checksum offload for tunnel packets")
Signed-off-by: Xueming Li <xuemingl@mellanox.com>
Acked-by: Shahaf Shuler <shahafs@mellanox.com>
Acked-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
---
drivers/net/mlx5/mlx5.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/net/mlx5/mlx5.c b/drivers/net/mlx5/mlx5.c
index 508b799..4379491 100644
--- a/drivers/net/mlx5/mlx5.c
+++ b/drivers/net/mlx5/mlx5.c
@@ -452,7 +452,7 @@ mlx5_pci_probe(struct rte_pci_driver *pci_drv, struct rte_pci_device *pci_dev)
struct ibv_device_attr device_attr;
unsigned int sriov;
unsigned int mps;
- unsigned int tunnel_en;
+ unsigned int tunnel_en = 0;
int idx;
int i;
@@ -510,6 +510,7 @@ mlx5_pci_probe(struct rte_pci_driver *pci_drv, struct rte_pci_device *pci_dev)
mps = MLX5_MPW_DISABLED;
break;
case PCI_DEVICE_ID_MELLANOX_CONNECTX4LX:
+ tunnel_en = 1;
mps = MLX5_MPW;
break;
case PCI_DEVICE_ID_MELLANOX_CONNECTX5:
--
2.7.4
^ permalink raw reply [flat|nested] 191+ messages in thread
* [dpdk-stable] patch 'net/cxgbe: fix memory leak' has been queued to stable release 17.08.1
2017-11-21 13:15 [dpdk-stable] patch 'gro: fix typo in map file' has been queued to stable release 17.08.1 Yuanhan Liu
` (27 preceding siblings ...)
2017-11-21 13:16 ` [dpdk-stable] patch 'net/mlx5: fix tunnel offload detection' " Yuanhan Liu
@ 2017-11-21 13:16 ` Yuanhan Liu
2017-11-21 13:16 ` [dpdk-stable] patch 'net/ixgbe: fix adding a mirror rule' " Yuanhan Liu
` (160 subsequent siblings)
189 siblings, 0 replies; 191+ messages in thread
From: Yuanhan Liu @ 2017-11-21 13:16 UTC (permalink / raw)
To: Congwen Zhang; +Cc: Rahul Lakkireddy, dpdk stable
Hi,
FYI, your patch has been queued to stable release 17.08.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/24/17. So please
shout if anyone has objections.
Thanks.
--yliu
---
>From c8491b82764fc171e8f54f27e0f4b55cfe5f8233 Mon Sep 17 00:00:00 2001
From: Congwen Zhang <zhang.congwen@zte.com.cn>
Date: Tue, 5 Sep 2017 16:46:57 +0800
Subject: [PATCH] net/cxgbe: fix memory leak
[ upstream commit c0b865d4717d85138f716d42ca186672b060f166 ]
In function t4_wr_mbox_meat_timeout(), dynamic memory stored
in 'temp' variable and it is not freed when the function return,
this is a possible memory leak.
Fixes: 3bd122eef2cc ("cxgbe/base: add hardware API for Chelsio T5 series adapters")
Signed-off-by: Congwen Zhang <zhang.congwen@zte.com.cn>
Acked-by: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>
---
drivers/net/cxgbe/base/t4_hw.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/net/cxgbe/base/t4_hw.c b/drivers/net/cxgbe/base/t4_hw.c
index a8ccea0..013d996 100644
--- a/drivers/net/cxgbe/base/t4_hw.c
+++ b/drivers/net/cxgbe/base/t4_hw.c
@@ -403,6 +403,7 @@ int t4_wr_mbox_meat_timeout(struct adapter *adap, int mbox,
t4_os_atomic_list_del(&entry, &adap->mbox_list,
&adap->mbox_lock);
t4_report_fw_error(adap);
+ free(temp);
return (pcie_fw & F_PCIE_FW_ERR) ? -ENXIO : -EBUSY;
}
@@ -446,6 +447,7 @@ int t4_wr_mbox_meat_timeout(struct adapter *adap, int mbox,
&adap->mbox_list,
&adap->mbox_lock));
t4_report_fw_error(adap);
+ free(temp);
return (v == X_MBOWNER_FW ? -EBUSY : -ETIMEDOUT);
}
@@ -546,6 +548,7 @@ int t4_wr_mbox_meat_timeout(struct adapter *adap, int mbox,
T4_OS_MBOX_LOCKING(
t4_os_atomic_list_del(&entry, &adap->mbox_list,
&adap->mbox_lock));
+ free(temp);
return -G_FW_CMD_RETVAL((int)res);
}
}
--
2.7.4
^ permalink raw reply [flat|nested] 191+ messages in thread
* [dpdk-stable] patch 'net/ixgbe: fix adding a mirror rule' has been queued to stable release 17.08.1
2017-11-21 13:15 [dpdk-stable] patch 'gro: fix typo in map file' has been queued to stable release 17.08.1 Yuanhan Liu
` (28 preceding siblings ...)
2017-11-21 13:16 ` [dpdk-stable] patch 'net/cxgbe: fix memory leak' " Yuanhan Liu
@ 2017-11-21 13:16 ` Yuanhan Liu
2017-11-21 13:16 ` [dpdk-stable] patch 'net/vmxnet3: fix MAC address set' " Yuanhan Liu
` (159 subsequent siblings)
189 siblings, 0 replies; 191+ messages in thread
From: Yuanhan Liu @ 2017-11-21 13:16 UTC (permalink / raw)
To: Wei Dai; +Cc: Jingjing Wu, dpdk stable
Hi,
FYI, your patch has been queued to stable release 17.08.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/24/17. So please
shout if anyone has objections.
Thanks.
--yliu
---
>From 73285c775695bcf68b05afc65e46764f58b783e0 Mon Sep 17 00:00:00 2001
From: Wei Dai <wei.dai@intel.com>
Date: Tue, 5 Sep 2017 17:16:57 +0800
Subject: [PATCH] net/ixgbe: fix adding a mirror rule
[ upstream commit c2252db7f9a09bfca03f59fec2dab09e2a4d0d6b ]
mirror rule_type can be a bit OR result of multiple mirror type of
a rule.
Fixes: 7ba29a76b196 ("ethdev: rename and extend the mirror type")
Signed-off-by: Wei Dai <wei.dai@intel.com>
Acked-by: Jingjing Wu <jingjing.wu@intel.com>
---
drivers/net/ixgbe/ixgbe_ethdev.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c
index 22171d8..858230d 100644
--- a/drivers/net/ixgbe/ixgbe_ethdev.c
+++ b/drivers/net/ixgbe/ixgbe_ethdev.c
@@ -5450,13 +5450,13 @@ ixgbe_mirror_rule_set(struct rte_eth_dev *dev,
IXGBE_WRITE_REG(hw, IXGBE_MRCTL(rule_id), mr_ctl);
/* write pool mirrror control register */
- if (mirror_conf->rule_type == ETH_MIRROR_VIRTUAL_POOL_UP) {
+ if (mirror_conf->rule_type & ETH_MIRROR_VIRTUAL_POOL_UP) {
IXGBE_WRITE_REG(hw, IXGBE_VMRVM(rule_id), mp_lsb);
IXGBE_WRITE_REG(hw, IXGBE_VMRVM(rule_id + rule_mr_offset),
mp_msb);
}
/* write VLAN mirrror control register */
- if (mirror_conf->rule_type == ETH_MIRROR_VLAN) {
+ if (mirror_conf->rule_type & ETH_MIRROR_VLAN) {
IXGBE_WRITE_REG(hw, IXGBE_VMRVLAN(rule_id), mv_lsb);
IXGBE_WRITE_REG(hw, IXGBE_VMRVLAN(rule_id + rule_mr_offset),
mv_msb);
--
2.7.4
^ permalink raw reply [flat|nested] 191+ messages in thread
* [dpdk-stable] patch 'net/vmxnet3: fix MAC address set' has been queued to stable release 17.08.1
2017-11-21 13:15 [dpdk-stable] patch 'gro: fix typo in map file' has been queued to stable release 17.08.1 Yuanhan Liu
` (29 preceding siblings ...)
2017-11-21 13:16 ` [dpdk-stable] patch 'net/ixgbe: fix adding a mirror rule' " Yuanhan Liu
@ 2017-11-21 13:16 ` Yuanhan Liu
2017-11-21 13:16 ` [dpdk-stable] patch 'net/i40e: fix memory leak if VF init fails' " Yuanhan Liu
` (158 subsequent siblings)
189 siblings, 0 replies; 191+ messages in thread
From: Yuanhan Liu @ 2017-11-21 13:16 UTC (permalink / raw)
To: David Harton; +Cc: Shrikrishna Khare, dpdk stable
Hi,
FYI, your patch has been queued to stable release 17.08.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/24/17. So please
shout if anyone has objections.
Thanks.
--yliu
---
>From d4b108b899cb8a63487abc45988a7b3225339b98 Mon Sep 17 00:00:00 2001
From: David Harton <dharton@cisco.com>
Date: Fri, 25 Aug 2017 14:54:57 -0400
Subject: [PATCH] net/vmxnet3: fix MAC address set
[ upstream commit 66db172f2636a1634b3e8e73afb76968d35acc5e ]
Updated vmxnet3_mac_addr_set() to store the newly set MAC address.
Modified vmxnet3_write_mac() so the h/w is updated in an endian
neutral manner.
Fixes: 139f39a97859 ("vmxnet3: support setting MAC address")
Signed-off-by: David Harton <dharton@cisco.com>
Acked-by: Shrikrishna Khare <skhare@vmware.com>
---
drivers/net/vmxnet3/vmxnet3_ethdev.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/net/vmxnet3/vmxnet3_ethdev.c b/drivers/net/vmxnet3/vmxnet3_ethdev.c
index 3910991..1cc3ffd 100644
--- a/drivers/net/vmxnet3/vmxnet3_ethdev.c
+++ b/drivers/net/vmxnet3/vmxnet3_ethdev.c
@@ -537,10 +537,10 @@ vmxnet3_write_mac(struct vmxnet3_hw *hw, const uint8_t *addr)
addr[0], addr[1], addr[2],
addr[3], addr[4], addr[5]);
- val = *(const uint32_t *)addr;
+ memcpy(&val, addr, 4);
VMXNET3_WRITE_BAR1_REG(hw, VMXNET3_REG_MACL, val);
- val = (addr[5] << 8) | addr[4];
+ memcpy(&val, addr + 4, 2);
VMXNET3_WRITE_BAR1_REG(hw, VMXNET3_REG_MACH, val);
}
@@ -1144,6 +1144,8 @@ vmxnet3_mac_addr_set(struct rte_eth_dev *dev, struct ether_addr *mac_addr)
{
struct vmxnet3_hw *hw = dev->data->dev_private;
+ ether_addr_copy(mac_addr, (struct ether_addr *)(hw->perm_addr));
+ ether_addr_copy(mac_addr, &dev->data->mac_addrs[0]);
vmxnet3_write_mac(hw, mac_addr->addr_bytes);
}
--
2.7.4
^ permalink raw reply [flat|nested] 191+ messages in thread
* [dpdk-stable] patch 'net/i40e: fix memory leak if VF init fails' has been queued to stable release 17.08.1
2017-11-21 13:15 [dpdk-stable] patch 'gro: fix typo in map file' has been queued to stable release 17.08.1 Yuanhan Liu
` (30 preceding siblings ...)
2017-11-21 13:16 ` [dpdk-stable] patch 'net/vmxnet3: fix MAC address set' " Yuanhan Liu
@ 2017-11-21 13:16 ` Yuanhan Liu
2017-11-21 13:16 ` [dpdk-stable] patch 'net/i40e: fix i40evf MAC filter table' " Yuanhan Liu
` (157 subsequent siblings)
189 siblings, 0 replies; 191+ messages in thread
From: Yuanhan Liu @ 2017-11-21 13:16 UTC (permalink / raw)
To: Jingjing Wu; +Cc: Beilei Xing, dpdk stable
Hi,
FYI, your patch has been queued to stable release 17.08.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/24/17. So please
shout if anyone has objections.
Thanks.
--yliu
---
>From 74716b1dd08278feda456e5f2aa1f7c70d66496f Mon Sep 17 00:00:00 2001
From: Jingjing Wu <jingjing.wu@intel.com>
Date: Wed, 13 Sep 2017 07:54:23 +0800
Subject: [PATCH] net/i40e: fix memory leak if VF init fails
[ upstream commit d031bff503bac11d8cefed90154441a4bc577d36 ]
Fixes: 4861cde46116 ("i40e: new poll mode driver")
Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
Acked-by: Beilei Xing <beilei.xing@intel.com>
---
drivers/net/i40e/i40e_ethdev_vf.c | 13 ++++++++-----
1 file changed, 8 insertions(+), 5 deletions(-)
diff --git a/drivers/net/i40e/i40e_ethdev_vf.c b/drivers/net/i40e/i40e_ethdev_vf.c
index 44fb0db..f6bd574 100644
--- a/drivers/net/i40e/i40e_ethdev_vf.c
+++ b/drivers/net/i40e/i40e_ethdev_vf.c
@@ -1249,29 +1249,29 @@ i40evf_init_vf(struct rte_eth_dev *dev)
/* VF reset, shutdown admin queue and initialize again */
if (i40e_shutdown_adminq(hw) != I40E_SUCCESS) {
PMD_INIT_LOG(ERR, "i40e_shutdown_adminq failed");
- return -1;
+ goto err;
}
i40e_init_adminq_parameter(hw);
if (i40e_init_adminq(hw) != I40E_SUCCESS) {
PMD_INIT_LOG(ERR, "init_adminq failed");
- return -1;
+ goto err;
}
vf->aq_resp = rte_zmalloc("vf_aq_resp", I40E_AQ_BUF_SZ, 0);
if (!vf->aq_resp) {
PMD_INIT_LOG(ERR, "unable to allocate vf_aq_resp memory");
- goto err_aq;
+ goto err_aq;
}
if (i40evf_check_api_version(dev) != 0) {
PMD_INIT_LOG(ERR, "check_api version failed");
- goto err_aq;
+ goto err_api;
}
bufsz = sizeof(struct virtchnl_vf_resource) +
(I40E_MAX_VF_VSI * sizeof(struct virtchnl_vsi_resource));
vf->vf_res = rte_zmalloc("vf_res", bufsz, 0);
if (!vf->vf_res) {
PMD_INIT_LOG(ERR, "unable to allocate vf_res memory");
- goto err_aq;
+ goto err_api;
}
if (i40evf_get_vf_resource(dev) != 0) {
@@ -1317,6 +1317,9 @@ i40evf_init_vf(struct rte_eth_dev *dev)
err_alloc:
rte_free(vf->vf_res);
+ vf->vsi_res = NULL;
+err_api:
+ rte_free(vf->aq_resp);
err_aq:
i40e_shutdown_adminq(hw); /* ignore error */
err:
--
2.7.4
^ permalink raw reply [flat|nested] 191+ messages in thread
* [dpdk-stable] patch 'net/i40e: fix i40evf MAC filter table' has been queued to stable release 17.08.1
2017-11-21 13:15 [dpdk-stable] patch 'gro: fix typo in map file' has been queued to stable release 17.08.1 Yuanhan Liu
` (31 preceding siblings ...)
2017-11-21 13:16 ` [dpdk-stable] patch 'net/i40e: fix memory leak if VF init fails' " Yuanhan Liu
@ 2017-11-21 13:16 ` Yuanhan Liu
2017-11-21 13:16 ` [dpdk-stable] patch 'net/mlx5: fix calculating TSO inline size' " Yuanhan Liu
` (156 subsequent siblings)
189 siblings, 0 replies; 191+ messages in thread
From: Yuanhan Liu @ 2017-11-21 13:16 UTC (permalink / raw)
To: David Harton; +Cc: Beilei Xing, dpdk stable
Hi,
FYI, your patch has been queued to stable release 17.08.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/24/17. So please
shout if anyone has objections.
Thanks.
--yliu
---
>From 193e9157a3599d23be7b4481ba33ac3e8973e48a Mon Sep 17 00:00:00 2001
From: David Harton <dharton@cisco.com>
Date: Tue, 12 Sep 2017 23:21:10 -0400
Subject: [PATCH] net/i40e: fix i40evf MAC filter table
[ upstream commit 7a4afbad98eddc88216e7ef5cf152c86e2c09fc2 ]
The i40e maintains a single MAC filter table for both
unicast and multicast addresses. The i40e_validate_mac_addr
function was preventing multicast addresses from being added
to the table via i40evf_add_mac_addr. Fixed the issue by
adjusting the check in i40evf_add_mac_addr.
Fixes: 4861cde46116 ("i40e: new poll mode driver")
Fixes: 97ac72aa71a9 ("i40e: support setting VF MAC address")
Signed-off-by: David Harton <dharton@cisco.com>
Acked-by: Beilei Xing <beilei.xing@intel.com>
---
drivers/net/i40e/i40e_ethdev_vf.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/i40e/i40e_ethdev_vf.c b/drivers/net/i40e/i40e_ethdev_vf.c
index f6bd574..3e242e8 100644
--- a/drivers/net/i40e/i40e_ethdev_vf.c
+++ b/drivers/net/i40e/i40e_ethdev_vf.c
@@ -888,7 +888,7 @@ i40evf_add_mac_addr(struct rte_eth_dev *dev,
int err;
struct vf_cmd_info args;
- if (i40e_validate_mac_addr(addr->addr_bytes) != I40E_SUCCESS) {
+ if (is_zero_ether_addr(addr)) {
PMD_DRV_LOG(ERR, "Invalid mac:%x:%x:%x:%x:%x:%x",
addr->addr_bytes[0], addr->addr_bytes[1],
addr->addr_bytes[2], addr->addr_bytes[3],
--
2.7.4
^ permalink raw reply [flat|nested] 191+ messages in thread
* [dpdk-stable] patch 'net/mlx5: fix calculating TSO inline size' has been queued to stable release 17.08.1
2017-11-21 13:15 [dpdk-stable] patch 'gro: fix typo in map file' has been queued to stable release 17.08.1 Yuanhan Liu
` (32 preceding siblings ...)
2017-11-21 13:16 ` [dpdk-stable] patch 'net/i40e: fix i40evf MAC filter table' " Yuanhan Liu
@ 2017-11-21 13:16 ` Yuanhan Liu
2017-11-21 13:16 ` [dpdk-stable] patch 'net/mlx5: fix num seg assumption in SSE Tx' " Yuanhan Liu
` (155 subsequent siblings)
189 siblings, 0 replies; 191+ messages in thread
From: Yuanhan Liu @ 2017-11-21 13:16 UTC (permalink / raw)
To: Yongseok Koh; +Cc: Shahaf Shuler, Nelio Laranjeiro, dpdk stable
Hi,
FYI, your patch has been queued to stable release 17.08.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/24/17. So please
shout if anyone has objections.
Thanks.
--yliu
---
>From 15c22ea1360c895f949029c89d56ad0f73a6540d Mon Sep 17 00:00:00 2001
From: Yongseok Koh <yskoh@mellanox.com>
Date: Thu, 31 Aug 2017 09:27:06 -0700
Subject: [PATCH] net/mlx5: fix calculating TSO inline size
[ upstream commit d829249790f08fd54ccc0d5e462b2a6512c9eae1 ]
Tx descriptor for TSO embeds packet header to be replicated. If Tx
inline is enabled, there could be additional packet data inlined with
4B inline header ahead. And between the header and additional inlined
packet data, there may be padding to make the inline part aligned to
MLX5_WQE_DWORD_SIZE. In calculating the total size of inlined data,
the size of inline header and padding is missing.
Fixes: 3f13f8c23a7c ("net/mlx5: support hardware TSO")
Signed-off-by: Shahaf Shuler <shahafs@mellanox.com>
Signed-off-by: Yongseok Koh <yskoh@mellanox.com>
Acked-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
---
drivers/net/mlx5/mlx5_rxtx.c | 25 +++++++++----------------
1 file changed, 9 insertions(+), 16 deletions(-)
diff --git a/drivers/net/mlx5/mlx5_rxtx.c b/drivers/net/mlx5/mlx5_rxtx.c
index b07bcd1..d3d61c8 100644
--- a/drivers/net/mlx5/mlx5_rxtx.c
+++ b/drivers/net/mlx5/mlx5_rxtx.c
@@ -461,6 +461,7 @@ mlx5_tx_burst(void *dpdk_txq, struct rte_mbuf **pkts, uint16_t pkts_n)
length -= pkt_inline_sz;
addr += pkt_inline_sz;
}
+ raw += MLX5_WQE_DWORD_SIZE;
if (txq->tso_en) {
tso = buf->ol_flags & PKT_TX_TCP_SEG;
if (tso) {
@@ -493,7 +494,6 @@ mlx5_tx_burst(void *dpdk_txq, struct rte_mbuf **pkts, uint16_t pkts_n)
copy_b = tso_header_sz - pkt_inline_sz;
/* First seg must contain all headers. */
assert(copy_b <= length);
- raw += MLX5_WQE_DWORD_SIZE;
if (copy_b &&
((end - (uintptr_t)raw) > copy_b)) {
uint16_t n = (MLX5_WQE_DS(copy_b) -
@@ -506,14 +506,11 @@ mlx5_tx_burst(void *dpdk_txq, struct rte_mbuf **pkts, uint16_t pkts_n)
(void *)addr, copy_b);
addr += copy_b;
length -= copy_b;
+ /* Include padding for TSO header. */
+ copy_b = MLX5_WQE_DS(copy_b) *
+ MLX5_WQE_DWORD_SIZE;
pkt_inline_sz += copy_b;
- /*
- * Another DWORD will be added
- * in the inline part.
- */
- raw += MLX5_WQE_DS(copy_b) *
- MLX5_WQE_DWORD_SIZE -
- MLX5_WQE_DWORD_SIZE;
+ raw += copy_b;
} else {
/* NOP WQE. */
wqe->ctrl = (rte_v128u32_t){
@@ -531,19 +528,20 @@ mlx5_tx_burst(void *dpdk_txq, struct rte_mbuf **pkts, uint16_t pkts_n)
}
/* Inline if enough room. */
if (inline_en || tso) {
+ uint32_t inl;
uintptr_t end = (uintptr_t)
(((uintptr_t)txq->wqes) +
(1 << txq->wqe_n) * MLX5_WQE_SIZE);
unsigned int inline_room = max_inline *
RTE_CACHE_LINE_SIZE -
- (pkt_inline_sz - 2);
+ (pkt_inline_sz - 2) -
+ !!tso * sizeof(inl);
uintptr_t addr_end = (addr + inline_room) &
~(RTE_CACHE_LINE_SIZE - 1);
unsigned int copy_b = (addr_end > addr) ?
RTE_MIN((addr_end - addr), length) :
0;
- raw += MLX5_WQE_DWORD_SIZE;
if (copy_b && ((end - (uintptr_t)raw) > copy_b)) {
/*
* One Dseg remains in the current WQE. To
@@ -556,12 +554,7 @@ mlx5_tx_burst(void *dpdk_txq, struct rte_mbuf **pkts, uint16_t pkts_n)
break;
max_wqe -= n;
if (tso) {
- uint32_t inl =
- htonl(copy_b | MLX5_INLINE_SEG);
-
- pkt_inline_sz =
- MLX5_WQE_DS(tso_header_sz) *
- MLX5_WQE_DWORD_SIZE;
+ inl = htonl(copy_b | MLX5_INLINE_SEG);
rte_memcpy((void *)raw,
(void *)&inl, sizeof(inl));
raw += sizeof(inl);
--
2.7.4
^ permalink raw reply [flat|nested] 191+ messages in thread
* [dpdk-stable] patch 'net/mlx5: fix num seg assumption in SSE Tx' has been queued to stable release 17.08.1
2017-11-21 13:15 [dpdk-stable] patch 'gro: fix typo in map file' has been queued to stable release 17.08.1 Yuanhan Liu
` (33 preceding siblings ...)
2017-11-21 13:16 ` [dpdk-stable] patch 'net/mlx5: fix calculating TSO inline size' " Yuanhan Liu
@ 2017-11-21 13:16 ` Yuanhan Liu
2017-11-21 13:16 ` [dpdk-stable] patch 'net/mlx5: fix Tx stats error counter definition' " Yuanhan Liu
` (154 subsequent siblings)
189 siblings, 0 replies; 191+ messages in thread
From: Yuanhan Liu @ 2017-11-21 13:16 UTC (permalink / raw)
To: Shahaf Shuler; +Cc: Yongseok Koh, Nelio Laranjeiro, dpdk stable
Hi,
FYI, your patch has been queued to stable release 17.08.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/24/17. So please
shout if anyone has objections.
Thanks.
--yliu
---
>From 100ce89af93111f15e0b8eb2066dc8b789f7968a Mon Sep 17 00:00:00 2001
From: Shahaf Shuler <shahafs@mellanox.com>
Date: Thu, 14 Sep 2017 13:50:36 +0300
Subject: [PATCH] net/mlx5: fix num seg assumption in SSE Tx
[ upstream commit f2fdd44cc1a162d9f6c3c866f0eaca71670bb953 ]
vPMD Tx function assumes that after the scatter of the
multi-segment packets the next packet will be a single segment packet.
This is not current as the function can return due to lack of resources
without sending all of the multi-segment mbufs sequence.
Fixes: 6cb559d67b83 ("net/mlx5: add vectorized Rx/Tx burst for x86")
Signed-off-by: Shahaf Shuler <shahafs@mellanox.com>
Acked-by: Yongseok Koh <yskoh@mellanox.com>
Acked-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
---
drivers/net/mlx5/mlx5_rxtx_vec_sse.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/net/mlx5/mlx5_rxtx_vec_sse.c b/drivers/net/mlx5/mlx5_rxtx_vec_sse.c
index 8560f74..6f4e1e8 100644
--- a/drivers/net/mlx5/mlx5_rxtx_vec_sse.c
+++ b/drivers/net/mlx5/mlx5_rxtx_vec_sse.c
@@ -119,8 +119,7 @@ txq_wr_dseg_v(struct txq *txq, __m128i *dseg,
}
/**
- * Count the number of continuous single segment packets. The first packet must
- * be a single segment packet.
+ * Count the number of continuous single segment packets.
*
* @param pkts
* Pointer to array of packets.
@@ -137,9 +136,8 @@ txq_check_multiseg(struct rte_mbuf **pkts, uint16_t pkts_n)
if (!pkts_n)
return 0;
- assert(NB_SEGS(pkts[0]) == 1);
/* Count the number of continuous single segment packets. */
- for (pos = 1; pos < pkts_n; ++pos)
+ for (pos = 0; pos < pkts_n; ++pos)
if (NB_SEGS(pkts[pos]) > 1)
break;
return pos;
--
2.7.4
^ permalink raw reply [flat|nested] 191+ messages in thread
* [dpdk-stable] patch 'net/mlx5: fix Tx stats error counter definition' has been queued to stable release 17.08.1
2017-11-21 13:15 [dpdk-stable] patch 'gro: fix typo in map file' has been queued to stable release 17.08.1 Yuanhan Liu
` (34 preceding siblings ...)
2017-11-21 13:16 ` [dpdk-stable] patch 'net/mlx5: fix num seg assumption in SSE Tx' " Yuanhan Liu
@ 2017-11-21 13:16 ` Yuanhan Liu
2017-11-21 13:16 ` [dpdk-stable] patch 'net/mlx5: fix Tx stats error counter logic' " Yuanhan Liu
` (153 subsequent siblings)
189 siblings, 0 replies; 191+ messages in thread
From: Yuanhan Liu @ 2017-11-21 13:16 UTC (permalink / raw)
To: Shahaf Shuler; +Cc: Yongseok Koh, Nelio Laranjeiro, dpdk stable
Hi,
FYI, your patch has been queued to stable release 17.08.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/24/17. So please
shout if anyone has objections.
Thanks.
--yliu
---
>From c598434e626b9511491191c5210f98ad2f3b0f1a Mon Sep 17 00:00:00 2001
From: Shahaf Shuler <shahafs@mellanox.com>
Date: Thu, 14 Sep 2017 13:50:37 +0300
Subject: [PATCH] net/mlx5: fix Tx stats error counter definition
[ upstream commit 9f9a48eb2978157954242e08acf81d7a26f38810 ]
The current Tx error counter counts, according to its description,
the total number of packets not sent when TX ring full. It is reported
to application as part of oerrors field.
The drop due to full ring is not the statistic that should be set on
oerrors field. Such number can be counted by the application using the
return value of the Tx burst function.
The number that should be set there is the number of packets the device
could not transmit in any way, even when it has resources.
Therefore, replace this counter to count the total number of failed
transmitted packets.
Fixes: 87011737b715 ("mlx5: add software counters")
Signed-off-by: Shahaf Shuler <shahafs@mellanox.com>
Acked-by: Yongseok Koh <yskoh@mellanox.com>
Acked-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
---
drivers/net/mlx5/mlx5_rxtx.h | 2 +-
drivers/net/mlx5/mlx5_stats.c | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/net/mlx5/mlx5_rxtx.h b/drivers/net/mlx5/mlx5_rxtx.h
index 7de1d10..0d65748 100644
--- a/drivers/net/mlx5/mlx5_rxtx.h
+++ b/drivers/net/mlx5/mlx5_rxtx.h
@@ -81,7 +81,7 @@ struct mlx5_txq_stats {
uint64_t opackets; /**< Total of successfully sent packets. */
uint64_t obytes; /**< Total of successfully sent bytes. */
#endif
- uint64_t odropped; /**< Total of packets not sent when TX ring full. */
+ uint64_t oerrors; /**< Total number of failed transmitted packets. */
};
/* Flow director queue structure. */
diff --git a/drivers/net/mlx5/mlx5_stats.c b/drivers/net/mlx5/mlx5_stats.c
index 33997af..671c5d0 100644
--- a/drivers/net/mlx5/mlx5_stats.c
+++ b/drivers/net/mlx5/mlx5_stats.c
@@ -367,13 +367,13 @@ mlx5_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats)
tmp.q_opackets[idx] += txq->stats.opackets;
tmp.q_obytes[idx] += txq->stats.obytes;
#endif
- tmp.q_errors[idx] += txq->stats.odropped;
+ tmp.q_errors[idx] += txq->stats.oerrors;
}
#ifdef MLX5_PMD_SOFT_COUNTERS
tmp.opackets += txq->stats.opackets;
tmp.obytes += txq->stats.obytes;
#endif
- tmp.oerrors += txq->stats.odropped;
+ tmp.oerrors += txq->stats.oerrors;
}
#ifndef MLX5_PMD_SOFT_COUNTERS
/* FIXME: retrieve and add hardware counters. */
--
2.7.4
^ permalink raw reply [flat|nested] 191+ messages in thread
* [dpdk-stable] patch 'net/mlx5: fix Tx stats error counter logic' has been queued to stable release 17.08.1
2017-11-21 13:15 [dpdk-stable] patch 'gro: fix typo in map file' has been queued to stable release 17.08.1 Yuanhan Liu
` (35 preceding siblings ...)
2017-11-21 13:16 ` [dpdk-stable] patch 'net/mlx5: fix Tx stats error counter definition' " Yuanhan Liu
@ 2017-11-21 13:16 ` Yuanhan Liu
2017-11-21 13:16 ` [dpdk-stable] patch 'net/i40e: fix packet count for PF' " Yuanhan Liu
` (152 subsequent siblings)
189 siblings, 0 replies; 191+ messages in thread
From: Yuanhan Liu @ 2017-11-21 13:16 UTC (permalink / raw)
To: Shahaf Shuler; +Cc: Yongseok Koh, Nelio Laranjeiro, dpdk stable
Hi,
FYI, your patch has been queued to stable release 17.08.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/24/17. So please
shout if anyone has objections.
Thanks.
--yliu
---
>From e67f972d9790d4f1e958d00ad62f9ee070f38913 Mon Sep 17 00:00:00 2001
From: Shahaf Shuler <shahafs@mellanox.com>
Date: Thu, 14 Sep 2017 13:50:38 +0300
Subject: [PATCH] net/mlx5: fix Tx stats error counter logic
[ upstream commit 24c14430cdc4556a30a1e608f67230e881718f7f ]
Tx error counter lacks the logic of incrementation, making it useless
for applications.
Fixes: 87011737b715 ("mlx5: add software counters")
Signed-off-by: Shahaf Shuler <shahafs@mellanox.com>
Acked-by: Yongseok Koh <yskoh@mellanox.com>
Acked-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
---
drivers/net/mlx5/mlx5_rxtx.c | 20 +++++++++++++++-----
1 file changed, 15 insertions(+), 5 deletions(-)
diff --git a/drivers/net/mlx5/mlx5_rxtx.c b/drivers/net/mlx5/mlx5_rxtx.c
index d3d61c8..ef80682 100644
--- a/drivers/net/mlx5/mlx5_rxtx.c
+++ b/drivers/net/mlx5/mlx5_rxtx.c
@@ -413,8 +413,10 @@ mlx5_tx_burst(void *dpdk_txq, struct rte_mbuf **pkts, uint16_t pkts_n)
#ifdef MLX5_PMD_SOFT_COUNTERS
total_length = length;
#endif
- if (length < (MLX5_WQE_DWORD_SIZE + 2))
+ if (length < (MLX5_WQE_DWORD_SIZE + 2)) {
+ txq->stats.oerrors++;
break;
+ }
/* Update element. */
(*txq->elts)[elts_head & elts_m] = buf;
/* Prefetch next buffer data. */
@@ -489,8 +491,10 @@ mlx5_tx_burst(void *dpdk_txq, struct rte_mbuf **pkts, uint16_t pkts_n)
cs_flags |= MLX5_ETH_WQE_L4_CSUM;
}
if (unlikely(tso_header_sz >
- MLX5_MAX_TSO_HEADER))
+ MLX5_MAX_TSO_HEADER)) {
+ txq->stats.oerrors++;
break;
+ }
copy_b = tso_header_sz - pkt_inline_sz;
/* First seg must contain all headers. */
assert(copy_b <= length);
@@ -843,8 +847,10 @@ mlx5_tx_burst_mpw(void *dpdk_txq, struct rte_mbuf **pkts, uint16_t pkts_n)
if (max_elts < segs_n)
break;
/* Do not bother with large packets MPW cannot handle. */
- if (segs_n > MLX5_MPW_DSEG_MAX)
+ if (segs_n > MLX5_MPW_DSEG_MAX) {
+ txq->stats.oerrors++;
break;
+ }
max_elts -= segs_n;
--pkts_n;
/* Should we enable HW CKSUM offload */
@@ -1064,8 +1070,10 @@ mlx5_tx_burst_mpw_inline(void *dpdk_txq, struct rte_mbuf **pkts,
if (max_elts < segs_n)
break;
/* Do not bother with large packets MPW cannot handle. */
- if (segs_n > MLX5_MPW_DSEG_MAX)
+ if (segs_n > MLX5_MPW_DSEG_MAX) {
+ txq->stats.oerrors++;
break;
+ }
max_elts -= segs_n;
--pkts_n;
/*
@@ -1353,8 +1361,10 @@ mlx5_tx_burst_empw(void *dpdk_txq, struct rte_mbuf **pkts, uint16_t pkts_n)
if (max_elts - j < segs_n)
break;
/* Do not bother with large packets MPW cannot handle. */
- if (segs_n > MLX5_MPW_DSEG_MAX)
+ if (segs_n > MLX5_MPW_DSEG_MAX) {
+ txq->stats.oerrors++;
break;
+ }
/* Should we enable HW CKSUM offload. */
if (buf->ol_flags &
(PKT_TX_IP_CKSUM | PKT_TX_TCP_CKSUM | PKT_TX_UDP_CKSUM))
--
2.7.4
^ permalink raw reply [flat|nested] 191+ messages in thread
* [dpdk-stable] patch 'net/i40e: fix packet count for PF' has been queued to stable release 17.08.1
2017-11-21 13:15 [dpdk-stable] patch 'gro: fix typo in map file' has been queued to stable release 17.08.1 Yuanhan Liu
` (36 preceding siblings ...)
2017-11-21 13:16 ` [dpdk-stable] patch 'net/mlx5: fix Tx stats error counter logic' " Yuanhan Liu
@ 2017-11-21 13:16 ` Yuanhan Liu
2017-11-21 13:16 ` [dpdk-stable] patch 'net/bonding: fix slaves capacity check' " Yuanhan Liu
` (151 subsequent siblings)
189 siblings, 0 replies; 191+ messages in thread
From: Yuanhan Liu @ 2017-11-21 13:16 UTC (permalink / raw)
To: Qi Zhang; +Cc: dpdk stable
Hi,
FYI, your patch has been queued to stable release 17.08.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/24/17. So please
shout if anyone has objections.
Thanks.
--yliu
---
>From fee538b413bdaaaa96338e9e52bfcaf7d78bcef4 Mon Sep 17 00:00:00 2001
From: Qi Zhang <qi.z.zhang@intel.com>
Date: Mon, 21 Aug 2017 04:05:35 +0800
Subject: [PATCH] net/i40e: fix packet count for PF
[ upstream commit 763de290cbd1dd4ed7f5319e4f5fa8a84d990e06 ]
Previously, for PF statistics we use VSI register for packet count
but use port's register for packet bytes, that cause inconsistent
situation of PF statistics when some VF is active, since it will
cover VF's packet bytes but not packet count.
The patch will take port register for PF packet count back, but still
exclude main vsi's discard packet count.
Just like previous fix, its still not perfect, (since RX packet number
is over counted when there is VF discard packet) but seems it make the
overall better.
Fixes: 9aace75fc82e ("i40e: fix statistics")
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
---
drivers/net/i40e/i40e_ethdev.c | 13 +++++++------
1 file changed, 7 insertions(+), 6 deletions(-)
diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c
index 8e0580c..62f25b3 100644
--- a/drivers/net/i40e/i40e_ethdev.c
+++ b/drivers/net/i40e/i40e_ethdev.c
@@ -2670,13 +2670,14 @@ i40e_dev_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats)
/* call read registers - updates values, now write them to struct */
i40e_read_stats_registers(pf, hw);
- stats->ipackets = pf->main_vsi->eth_stats.rx_unicast +
- pf->main_vsi->eth_stats.rx_multicast +
- pf->main_vsi->eth_stats.rx_broadcast -
+ stats->ipackets = ns->eth.rx_unicast +
+ ns->eth.rx_multicast +
+ ns->eth.rx_broadcast -
+ ns->eth.rx_discards -
pf->main_vsi->eth_stats.rx_discards;
- stats->opackets = pf->main_vsi->eth_stats.tx_unicast +
- pf->main_vsi->eth_stats.tx_multicast +
- pf->main_vsi->eth_stats.tx_broadcast;
+ stats->opackets = ns->eth.tx_unicast +
+ ns->eth.tx_multicast +
+ ns->eth.tx_broadcast;
stats->ibytes = ns->eth.rx_bytes;
stats->obytes = ns->eth.tx_bytes;
stats->oerrors = ns->eth.tx_errors +
--
2.7.4
^ permalink raw reply [flat|nested] 191+ messages in thread
* [dpdk-stable] patch 'net/bonding: fix slaves capacity check' has been queued to stable release 17.08.1
2017-11-21 13:15 [dpdk-stable] patch 'gro: fix typo in map file' has been queued to stable release 17.08.1 Yuanhan Liu
` (37 preceding siblings ...)
2017-11-21 13:16 ` [dpdk-stable] patch 'net/i40e: fix packet count for PF' " Yuanhan Liu
@ 2017-11-21 13:16 ` Yuanhan Liu
2017-11-21 13:16 ` [dpdk-stable] patch 'test: fix assignment operation' " Yuanhan Liu
` (150 subsequent siblings)
189 siblings, 0 replies; 191+ messages in thread
From: Yuanhan Liu @ 2017-11-21 13:16 UTC (permalink / raw)
To: Tomasz Kulasek; +Cc: Radu Nicolau, Declan Doherty, dpdk stable
Hi,
FYI, your patch has been queued to stable release 17.08.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/24/17. So please
shout if anyone has objections.
Thanks.
--yliu
---
>From 5c2e0c44758f0fd8128ad6eac7c2065098e52be0 Mon Sep 17 00:00:00 2001
From: Tomasz Kulasek <tomaszx.kulasek@intel.com>
Date: Thu, 27 Jul 2017 14:00:27 +0200
Subject: [PATCH] net/bonding: fix slaves capacity check
[ upstream commit 9f78433a0ee5d1d94253a992d221ecd777e7d04d ]
For i40e NIC bond_ethdev_8023ad_flow_verify fails when action queue
index indicates unavailable queue before slaves configuration.
This fix verifies flow settings for queue 0, which is always available,
and checks if slaves max queue number capacity meets requirements.
Fixes: 112891cd27e5 ("net/bonding: add dedicated HW queues for LACP control")
Signed-off-by: Tomasz Kulasek <tomaszx.kulasek@intel.com>
Reviewed-by: Radu Nicolau <radu.nicolau@intel.com>
Acked-by: Declan Doherty <declan.doherty@intel.com>
---
drivers/net/bonding/rte_eth_bond_pmd.c | 25 ++++++++++++++++++-------
1 file changed, 18 insertions(+), 7 deletions(-)
diff --git a/drivers/net/bonding/rte_eth_bond_pmd.c b/drivers/net/bonding/rte_eth_bond_pmd.c
index 3ee70ba..d783320 100644
--- a/drivers/net/bonding/rte_eth_bond_pmd.c
+++ b/drivers/net/bonding/rte_eth_bond_pmd.c
@@ -175,12 +175,13 @@ const struct rte_flow_attr flow_attr_8023ad = {
int
bond_ethdev_8023ad_flow_verify(struct rte_eth_dev *bond_dev,
uint8_t slave_port) {
+ struct rte_eth_dev_info slave_info;
struct rte_flow_error error;
struct bond_dev_private *internals = (struct bond_dev_private *)
(bond_dev->data->dev_private);
- struct rte_flow_action_queue lacp_queue_conf = {
- .index = internals->mode4.dedicated_queues.rx_qid,
+ const struct rte_flow_action_queue lacp_queue_conf = {
+ .index = 0,
};
const struct rte_flow_action actions[] = {
@@ -195,8 +196,21 @@ bond_ethdev_8023ad_flow_verify(struct rte_eth_dev *bond_dev,
int ret = rte_flow_validate(slave_port, &flow_attr_8023ad,
flow_item_8023ad, actions, &error);
- if (ret < 0)
+ if (ret < 0) {
+ RTE_BOND_LOG(ERR, "%s: %s (slave_port=%d queue_id=%d)",
+ __func__, error.message, slave_port,
+ internals->mode4.dedicated_queues.rx_qid);
return -1;
+ }
+
+ rte_eth_dev_info_get(slave_port, &slave_info);
+ if (slave_info.max_rx_queues < bond_dev->data->nb_rx_queues ||
+ slave_info.max_tx_queues < bond_dev->data->nb_tx_queues) {
+ RTE_BOND_LOG(ERR,
+ "%s: Slave %d capabilities doesn't allow to allocate additional queues",
+ __func__, slave_port);
+ return -1;
+ }
return 0;
}
@@ -206,7 +220,7 @@ bond_8023ad_slow_pkt_hw_filter_supported(uint8_t port_id) {
struct rte_eth_dev *bond_dev = &rte_eth_devices[port_id];
struct bond_dev_private *internals = (struct bond_dev_private *)
(bond_dev->data->dev_private);
- struct rte_eth_dev_info bond_info, slave_info;
+ struct rte_eth_dev_info bond_info;
uint8_t idx;
/* Verify if all slaves in bonding supports flow director and */
@@ -217,9 +231,6 @@ bond_8023ad_slow_pkt_hw_filter_supported(uint8_t port_id) {
internals->mode4.dedicated_queues.tx_qid = bond_info.nb_tx_queues;
for (idx = 0; idx < internals->slave_count; idx++) {
- rte_eth_dev_info_get(internals->slaves[idx].port_id,
- &slave_info);
-
if (bond_ethdev_8023ad_flow_verify(bond_dev,
internals->slaves[idx].port_id) != 0)
return -1;
--
2.7.4
^ permalink raw reply [flat|nested] 191+ messages in thread
* [dpdk-stable] patch 'test: fix assignment operation' has been queued to stable release 17.08.1
2017-11-21 13:15 [dpdk-stable] patch 'gro: fix typo in map file' has been queued to stable release 17.08.1 Yuanhan Liu
` (38 preceding siblings ...)
2017-11-21 13:16 ` [dpdk-stable] patch 'net/bonding: fix slaves capacity check' " Yuanhan Liu
@ 2017-11-21 13:16 ` Yuanhan Liu
2017-11-21 13:16 ` [dpdk-stable] patch 'net/tap: fix flow and port commands' " Yuanhan Liu
` (149 subsequent siblings)
189 siblings, 0 replies; 191+ messages in thread
From: Yuanhan Liu @ 2017-11-21 13:16 UTC (permalink / raw)
To: Zhiyong Yang; +Cc: Ferruh Yigit, dpdk stable
Hi,
FYI, your patch has been queued to stable release 17.08.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/24/17. So please
shout if anyone has objections.
Thanks.
--yliu
---
>From 21b63920e7408b9ebda65886105506e5175257cb Mon Sep 17 00:00:00 2001
From: Zhiyong Yang <zhiyong.yang@intel.com>
Date: Fri, 15 Sep 2017 10:35:57 +0800
Subject: [PATCH] test: fix assignment operation
[ upstream commit e19e163d27dfc342bf58e49c605fededa6cfc6fb ]
This should be an comparison operation rather than an assignment
operation.
Fixes: 5e41ab250dfa ("app/test: unit tests for bonding mode 4")
Signed-off-by: Zhiyong Yang <zhiyong.yang@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
test/test/test_link_bonding_mode4.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/test/test/test_link_bonding_mode4.c b/test/test/test_link_bonding_mode4.c
index 8e9e23d..e246f01 100644
--- a/test/test/test_link_bonding_mode4.c
+++ b/test/test/test_link_bonding_mode4.c
@@ -661,7 +661,7 @@ bond_handshake(void)
TEST_ASSERT_EQUAL(all_slaves_done, 1, "Bond handshake failed\n");
/* If flags doesn't match - report failure */
- return all_slaves_done = 1 ? TEST_SUCCESS : TEST_FAILED;
+ return all_slaves_done == 1 ? TEST_SUCCESS : TEST_FAILED;
}
#define TEST_LACP_SLAVE_COUT RTE_DIM(test_params.slave_ports)
--
2.7.4
^ permalink raw reply [flat|nested] 191+ messages in thread
* [dpdk-stable] patch 'net/tap: fix flow and port commands' has been queued to stable release 17.08.1
2017-11-21 13:15 [dpdk-stable] patch 'gro: fix typo in map file' has been queued to stable release 17.08.1 Yuanhan Liu
` (39 preceding siblings ...)
2017-11-21 13:16 ` [dpdk-stable] patch 'test: fix assignment operation' " Yuanhan Liu
@ 2017-11-21 13:16 ` Yuanhan Liu
2017-11-21 13:16 ` [dpdk-stable] patch 'net/mlx5: fix TSO segment size verification' " Yuanhan Liu
` (148 subsequent siblings)
189 siblings, 0 replies; 191+ messages in thread
From: Yuanhan Liu @ 2017-11-21 13:16 UTC (permalink / raw)
To: Ophir Munk; +Cc: Pascal Mazon, dpdk stable
Hi,
FYI, your patch has been queued to stable release 17.08.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/24/17. So please
shout if anyone has objections.
Thanks.
--yliu
---
>From 0539ffdd99aec23f551e844aa6067cd08fb375a2 Mon Sep 17 00:00:00 2001
From: Ophir Munk <ophirmu@mellanox.com>
Date: Sat, 16 Sep 2017 22:32:38 +0000
Subject: [PATCH] net/tap: fix flow and port commands
[ upstream commit f46900d03823aff1cb636a2f889caeee99c721b2 ]
This commit fixes two bugs related to tap devices. The first bug occurs
when executing in testpmd the following flow rule assuming tap device has
4 rx and tx pair queues
"flow create 0 ingress pattern eth / end actions queue index 5 / end"
This command will report on success and will print ""Flow rule #0 created"
although it should have failed as queue index number 5 does not exist
The second bug occurs when executing in testpmd "port start all" following
a port configuration. Assuming 1 pair of rx and tx queues an error is
reported: "Fail to start port 0"
Before this commit a fixed max number (16) of rx and tx queue pairs were
created on startup where the file descriptors (fds) of rx and tx pairs were
identical. As a result in the first bug queue index 5 existed because the
tap device was created with 16 rx and tx queue pairs regardless of the
configured number of queues. In the second bug when tap device was started
tx fd was closed before opening it and executing ioctl() on it. However
closing the sole fd of the device caused ioctl to fail with "No such
device".
This commit creates the configured number of rx and tx queue pairs (up to
max 16) and assigns a unique fd to each queue. It was written to solve the
first bug and was found as the right fix for the second bug as well.
Fixes: 02f96a0a82d1 ("net/tap: add TUN/TAP device PMD")
Fixes: bf7b7f437b49 ("net/tap: create netdevice during probing")
Fixes: de96fe68ae95 ("net/tap: add basic flow API patterns and actions")
Signed-off-by: Ophir Munk <ophirmu@mellanox.com>
Acked-by: Pascal Mazon <pascal.mazon@6wind.com>
---
drivers/net/tap/rte_eth_tap.c | 139 +++++++++++++++++++++++++++++++-----------
drivers/net/tap/rte_eth_tap.h | 2 +-
drivers/net/tap/tap_flow.c | 3 +-
3 files changed, 108 insertions(+), 36 deletions(-)
diff --git a/drivers/net/tap/rte_eth_tap.c b/drivers/net/tap/rte_eth_tap.c
index 9acea83..d926d4b 100644
--- a/drivers/net/tap/rte_eth_tap.c
+++ b/drivers/net/tap/rte_eth_tap.c
@@ -603,8 +603,31 @@ tap_dev_stop(struct rte_eth_dev *dev)
}
static int
-tap_dev_configure(struct rte_eth_dev *dev __rte_unused)
+tap_dev_configure(struct rte_eth_dev *dev)
{
+ if (dev->data->nb_rx_queues > RTE_PMD_TAP_MAX_QUEUES) {
+ RTE_LOG(ERR, PMD,
+ "%s: number of rx queues %d exceeds max num of queues %d\n",
+ dev->device->name,
+ dev->data->nb_rx_queues,
+ RTE_PMD_TAP_MAX_QUEUES);
+ return -1;
+ }
+ if (dev->data->nb_tx_queues > RTE_PMD_TAP_MAX_QUEUES) {
+ RTE_LOG(ERR, PMD,
+ "%s: number of tx queues %d exceeds max num of queues %d\n",
+ dev->device->name,
+ dev->data->nb_tx_queues,
+ RTE_PMD_TAP_MAX_QUEUES);
+ return -1;
+ }
+
+ RTE_LOG(INFO, PMD, "%s: %p: TX configured queues number: %u\n",
+ dev->device->name, (void *)dev, dev->data->nb_tx_queues);
+
+ RTE_LOG(INFO, PMD, "%s: %p: RX configured queues number: %u\n",
+ dev->device->name, (void *)dev, dev->data->nb_rx_queues);
+
return 0;
}
@@ -650,8 +673,8 @@ tap_dev_info(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info)
dev_info->if_index = internals->if_index;
dev_info->max_mac_addrs = 1;
dev_info->max_rx_pktlen = (uint32_t)ETHER_MAX_VLAN_FRAME_LEN;
- dev_info->max_rx_queues = internals->nb_queues;
- dev_info->max_tx_queues = internals->nb_queues;
+ dev_info->max_rx_queues = RTE_PMD_TAP_MAX_QUEUES;
+ dev_info->max_tx_queues = RTE_PMD_TAP_MAX_QUEUES;
dev_info->min_rx_bufsize = 0;
dev_info->pci_dev = NULL;
dev_info->speed_capa = tap_dev_speed_capa();
@@ -673,9 +696,9 @@ tap_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *tap_stats)
unsigned long rx_nombuf = 0, ierrors = 0;
const struct pmd_internals *pmd = dev->data->dev_private;
- imax = (pmd->nb_queues < RTE_ETHDEV_QUEUE_STAT_CNTRS) ?
- pmd->nb_queues : RTE_ETHDEV_QUEUE_STAT_CNTRS;
-
+ /* rx queue statistics */
+ imax = (dev->data->nb_rx_queues < RTE_ETHDEV_QUEUE_STAT_CNTRS) ?
+ dev->data->nb_rx_queues : RTE_ETHDEV_QUEUE_STAT_CNTRS;
for (i = 0; i < imax; i++) {
tap_stats->q_ipackets[i] = pmd->rxq[i].stats.ipackets;
tap_stats->q_ibytes[i] = pmd->rxq[i].stats.ibytes;
@@ -683,7 +706,13 @@ tap_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *tap_stats)
rx_bytes_total += tap_stats->q_ibytes[i];
rx_nombuf += pmd->rxq[i].stats.rx_nombuf;
ierrors += pmd->rxq[i].stats.ierrors;
+ }
+ /* tx queue statistics */
+ imax = (dev->data->nb_tx_queues < RTE_ETHDEV_QUEUE_STAT_CNTRS) ?
+ dev->data->nb_tx_queues : RTE_ETHDEV_QUEUE_STAT_CNTRS;
+
+ for (i = 0; i < imax; i++) {
tap_stats->q_opackets[i] = pmd->txq[i].stats.opackets;
tap_stats->q_errors[i] = pmd->txq[i].stats.errs;
tap_stats->q_obytes[i] = pmd->txq[i].stats.obytes;
@@ -707,7 +736,7 @@ tap_stats_reset(struct rte_eth_dev *dev)
int i;
struct pmd_internals *pmd = dev->data->dev_private;
- for (i = 0; i < pmd->nb_queues; i++) {
+ for (i = 0; i < RTE_PMD_TAP_MAX_QUEUES; i++) {
pmd->rxq[i].stats.ipackets = 0;
pmd->rxq[i].stats.ibytes = 0;
pmd->rxq[i].stats.ierrors = 0;
@@ -729,11 +758,15 @@ tap_dev_close(struct rte_eth_dev *dev)
tap_flow_flush(dev, NULL);
tap_flow_implicit_flush(internals, NULL);
- for (i = 0; i < internals->nb_queues; i++) {
- if (internals->rxq[i].fd != -1)
+ for (i = 0; i < RTE_PMD_TAP_MAX_QUEUES; i++) {
+ if (internals->rxq[i].fd != -1) {
close(internals->rxq[i].fd);
- internals->rxq[i].fd = -1;
- internals->txq[i].fd = -1;
+ internals->rxq[i].fd = -1;
+ }
+ if (internals->txq[i].fd != -1) {
+ close(internals->txq[i].fd);
+ internals->txq[i].fd = -1;
+ }
}
if (internals->remote_if_index) {
@@ -887,30 +920,57 @@ tap_mac_set(struct rte_eth_dev *dev, struct ether_addr *mac_addr)
static int
tap_setup_queue(struct rte_eth_dev *dev,
struct pmd_internals *internals,
- uint16_t qid)
+ uint16_t qid,
+ int is_rx)
{
+ int *fd;
+ int *other_fd;
+ const char *dir;
struct pmd_internals *pmd = dev->data->dev_private;
struct rx_queue *rx = &internals->rxq[qid];
struct tx_queue *tx = &internals->txq[qid];
- int fd = rx->fd == -1 ? tx->fd : rx->fd;
- if (fd == -1) {
- RTE_LOG(INFO, PMD, "Add queue to TAP %s for qid %d\n",
- pmd->name, qid);
- fd = tun_alloc(pmd);
- if (fd < 0) {
+ if (is_rx) {
+ fd = &rx->fd;
+ other_fd = &tx->fd;
+ dir = "rx";
+ } else {
+ fd = &tx->fd;
+ other_fd = &rx->fd;
+ dir = "tx";
+ }
+ if (*fd != -1) {
+ /* fd for this queue already exists */
+ RTE_LOG(DEBUG, PMD, "%s: fd %d for %s queue qid %d exists\n",
+ pmd->name, *fd, dir, qid);
+ } else if (*other_fd != -1) {
+ /* Only other_fd exists. dup it */
+ *fd = dup(*other_fd);
+ if (*fd < 0) {
+ *fd = -1;
+ RTE_LOG(ERR, PMD, "%s: dup() failed.\n",
+ pmd->name);
+ return -1;
+ }
+ RTE_LOG(DEBUG, PMD, "%s: dup fd %d for %s queue qid %d (%d)\n",
+ pmd->name, *other_fd, dir, qid, *fd);
+ } else {
+ /* Both RX and TX fds do not exist (equal -1). Create fd */
+ *fd = tun_alloc(pmd);
+ if (*fd < 0) {
+ *fd = -1; /* restore original value */
RTE_LOG(ERR, PMD, "%s: tun_alloc() failed.\n",
pmd->name);
return -1;
}
+ RTE_LOG(DEBUG, PMD, "%s: add %s queue for qid %d fd %d\n",
+ pmd->name, dir, qid, *fd);
}
- rx->fd = fd;
- tx->fd = fd;
tx->mtu = &dev->data->mtu;
rx->rxmode = &dev->data->dev_conf.rxmode;
- return fd;
+ return *fd;
}
static int
@@ -932,10 +992,10 @@ tap_rx_queue_setup(struct rte_eth_dev *dev,
int fd;
int i;
- if ((rx_queue_id >= internals->nb_queues) || !mp) {
+ if (rx_queue_id >= dev->data->nb_rx_queues || !mp) {
RTE_LOG(WARNING, PMD,
- "nb_queues %d too small or mempool NULL\n",
- internals->nb_queues);
+ "nb_rx_queues %d too small or mempool NULL\n",
+ dev->data->nb_rx_queues);
return -1;
}
@@ -954,7 +1014,7 @@ tap_rx_queue_setup(struct rte_eth_dev *dev,
rxq->iovecs = iovecs;
dev->data->rx_queues[rx_queue_id] = rxq;
- fd = tap_setup_queue(dev, internals, rx_queue_id);
+ fd = tap_setup_queue(dev, internals, rx_queue_id, 1);
if (fd == -1) {
ret = fd;
goto error;
@@ -1002,11 +1062,11 @@ tap_tx_queue_setup(struct rte_eth_dev *dev,
struct pmd_internals *internals = dev->data->dev_private;
int ret;
- if (tx_queue_id >= internals->nb_queues)
+ if (tx_queue_id >= dev->data->nb_tx_queues)
return -1;
dev->data->tx_queues[tx_queue_id] = &internals->txq[tx_queue_id];
- ret = tap_setup_queue(dev, internals, tx_queue_id);
+ ret = tap_setup_queue(dev, internals, tx_queue_id, 0);
if (ret == -1)
return -1;
@@ -1166,7 +1226,6 @@ static const struct eth_dev_ops ops = {
.filter_ctrl = tap_dev_filter_ctrl,
};
-
static int
eth_dev_tap_create(struct rte_vdev_device *vdev, char *tap_name,
char *remote_iface, int fixed_mac_type)
@@ -1193,8 +1252,8 @@ eth_dev_tap_create(struct rte_vdev_device *vdev, char *tap_name,
}
pmd = dev->data->dev_private;
+ pmd->dev = dev;
snprintf(pmd->name, sizeof(pmd->name), "%s", tap_name);
- pmd->nb_queues = RTE_PMD_TAP_MAX_QUEUES;
pmd->ioctl_sock = socket(AF_INET, SOCK_DGRAM, 0);
if (pmd->ioctl_sock == -1) {
@@ -1212,8 +1271,9 @@ eth_dev_tap_create(struct rte_vdev_device *vdev, char *tap_name,
data->dev_link = pmd_link;
data->mac_addrs = &pmd->eth_addr;
- data->nb_rx_queues = pmd->nb_queues;
- data->nb_tx_queues = pmd->nb_queues;
+ /* Set the number of RX and TX queues */
+ data->nb_rx_queues = 0;
+ data->nb_tx_queues = 0;
dev->data = data;
dev->dev_ops = &ops;
@@ -1241,7 +1301,11 @@ eth_dev_tap_create(struct rte_vdev_device *vdev, char *tap_name,
}
/* Immediately create the netdevice (this will create the 1st queue). */
- if (tap_setup_queue(dev, pmd, 0) == -1)
+ /* rx queue */
+ if (tap_setup_queue(dev, pmd, 0, 1) == -1)
+ goto error_exit;
+ /* tx queue */
+ if (tap_setup_queue(dev, pmd, 0, 0) == -1)
goto error_exit;
ifr.ifr_mtu = dev->data->mtu;
@@ -1515,9 +1579,16 @@ rte_pmd_tap_remove(struct rte_vdev_device *dev)
tap_flow_implicit_flush(internals, NULL);
nl_final(internals->nlsk_fd);
}
- for (i = 0; i < internals->nb_queues; i++)
- if (internals->rxq[i].fd != -1)
+ for (i = 0; i < RTE_PMD_TAP_MAX_QUEUES; i++) {
+ if (internals->rxq[i].fd != -1) {
close(internals->rxq[i].fd);
+ internals->rxq[i].fd = -1;
+ }
+ if (internals->txq[i].fd != -1) {
+ close(internals->txq[i].fd);
+ internals->txq[i].fd = -1;
+ }
+ }
close(internals->ioctl_sock);
rte_free(eth_dev->data->dev_private);
diff --git a/drivers/net/tap/rte_eth_tap.h b/drivers/net/tap/rte_eth_tap.h
index 928a045..829f32f 100644
--- a/drivers/net/tap/rte_eth_tap.h
+++ b/drivers/net/tap/rte_eth_tap.h
@@ -80,9 +80,9 @@ struct tx_queue {
};
struct pmd_internals {
+ struct rte_eth_dev *dev; /* Ethernet device. */
char remote_iface[RTE_ETH_NAME_MAX_LEN]; /* Remote netdevice name */
char name[RTE_ETH_NAME_MAX_LEN]; /* Internal Tap device name */
- uint16_t nb_queues; /* Number of queues supported */
struct ether_addr eth_addr; /* Mac address of the device port */
struct ifreq remote_initial_flags; /* Remote netdevice flags on init */
int remote_if_index; /* remote netdevice IF_INDEX */
diff --git a/drivers/net/tap/tap_flow.c b/drivers/net/tap/tap_flow.c
index 41f7345..aa33960 100644
--- a/drivers/net/tap/tap_flow.c
+++ b/drivers/net/tap/tap_flow.c
@@ -1092,7 +1092,8 @@ priv_flow_process(struct pmd_internals *pmd,
if (action)
goto exit_action_not_supported;
action = 1;
- if (!queue || (queue->index >= pmd->nb_queues))
+ if (!queue ||
+ (queue->index > pmd->dev->data->nb_rx_queues - 1))
goto exit_action_not_supported;
if (flow)
err = add_action_skbedit(flow, queue->index);
--
2.7.4
^ permalink raw reply [flat|nested] 191+ messages in thread
* [dpdk-stable] patch 'net/mlx5: fix TSO segment size verification' has been queued to stable release 17.08.1
2017-11-21 13:15 [dpdk-stable] patch 'gro: fix typo in map file' has been queued to stable release 17.08.1 Yuanhan Liu
` (40 preceding siblings ...)
2017-11-21 13:16 ` [dpdk-stable] patch 'net/tap: fix flow and port commands' " Yuanhan Liu
@ 2017-11-21 13:16 ` Yuanhan Liu
2017-11-21 13:16 ` [dpdk-stable] patch 'net/liquidio: fix uninitialized variable' " Yuanhan Liu
` (147 subsequent siblings)
189 siblings, 0 replies; 191+ messages in thread
From: Yuanhan Liu @ 2017-11-21 13:16 UTC (permalink / raw)
To: Shahaf Shuler; +Cc: Yongseok Koh, Nelio Laranjeiro, dpdk stable
Hi,
FYI, your patch has been queued to stable release 17.08.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/24/17. So please
shout if anyone has objections.
Thanks.
--yliu
---
>From e979bc599da477e86542f2e44c4371c521877748 Mon Sep 17 00:00:00 2001
From: Shahaf Shuler <shahafs@mellanox.com>
Date: Sun, 17 Sep 2017 11:12:49 +0300
Subject: [PATCH] net/mlx5: fix TSO segment size verification
[ upstream commit 96fc8d6561b1b1348af97c2ed275922315d228c4 ]
TSO segment size must be larger then 0.
Fixes: 3f13f8c23a7c ("net/mlx5: support hardware TSO")
Signed-off-by: Shahaf Shuler <shahafs@mellanox.com>
Acked-by: Yongseok Koh <yskoh@mellanox.com>
Acked-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
---
drivers/net/mlx5/mlx5_rxtx.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/drivers/net/mlx5/mlx5_rxtx.c b/drivers/net/mlx5/mlx5_rxtx.c
index ef80682..986c229 100644
--- a/drivers/net/mlx5/mlx5_rxtx.c
+++ b/drivers/net/mlx5/mlx5_rxtx.c
@@ -482,7 +482,10 @@ mlx5_tx_burst(void *dpdk_txq, struct rte_mbuf **pkts, uint16_t pkts_n)
tso_header_sz = buf->l2_len + vlan_sz +
buf->l3_len + buf->l4_len;
tso_segsz = buf->tso_segsz;
-
+ if (unlikely(tso_segsz == 0)) {
+ txq->stats.oerrors++;
+ break;
+ }
if (is_tunneled && txq->tunnel_en) {
tso_header_sz += buf->outer_l2_len +
buf->outer_l3_len;
--
2.7.4
^ permalink raw reply [flat|nested] 191+ messages in thread
* [dpdk-stable] patch 'net/liquidio: fix uninitialized variable' has been queued to stable release 17.08.1
2017-11-21 13:15 [dpdk-stable] patch 'gro: fix typo in map file' has been queued to stable release 17.08.1 Yuanhan Liu
` (41 preceding siblings ...)
2017-11-21 13:16 ` [dpdk-stable] patch 'net/mlx5: fix TSO segment size verification' " Yuanhan Liu
@ 2017-11-21 13:16 ` Yuanhan Liu
2017-11-21 13:16 ` [dpdk-stable] patch 'net/igb: fix memcpy length' " Yuanhan Liu
` (146 subsequent siblings)
189 siblings, 0 replies; 191+ messages in thread
From: Yuanhan Liu @ 2017-11-21 13:16 UTC (permalink / raw)
To: Yong Wang; +Cc: Shijith Thotton, dpdk stable
Hi,
FYI, your patch has been queued to stable release 17.08.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/24/17. So please
shout if anyone has objections.
Thanks.
--yliu
---
>From 76c628d53516d36b192e62763c4af601729cbcd3 Mon Sep 17 00:00:00 2001
From: Yong Wang <wang.yong19@zte.com.cn>
Date: Fri, 15 Sep 2017 07:48:28 -0400
Subject: [PATCH] net/liquidio: fix uninitialized variable
[ upstream commit 005ce1ca39da87902bd49976e1945b70101c1167 ]
In func lio_dev_link_update(), "link.link_autoneg" is used in func call
lio_dev_atomic_write_link_status(), but it is uninitialized.
Fixes: 3766020513df ("net/liquidio: add APIs to start device and update link")
Signed-off-by: Yong Wang <wang.yong19@zte.com.cn>
Acked-by: Shijith Thotton <shijith.thotton@caviumnetworks.com>
---
drivers/net/liquidio/lio_ethdev.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/net/liquidio/lio_ethdev.c b/drivers/net/liquidio/lio_ethdev.c
index 479936a..30119d2 100644
--- a/drivers/net/liquidio/lio_ethdev.c
+++ b/drivers/net/liquidio/lio_ethdev.c
@@ -939,6 +939,7 @@ lio_dev_link_update(struct rte_eth_dev *eth_dev,
link.link_status = ETH_LINK_DOWN;
link.link_speed = ETH_SPEED_NUM_NONE;
link.link_duplex = ETH_LINK_HALF_DUPLEX;
+ link.link_autoneg = ETH_LINK_AUTONEG;
memset(&old, 0, sizeof(old));
/* Return what we found */
--
2.7.4
^ permalink raw reply [flat|nested] 191+ messages in thread
* [dpdk-stable] patch 'net/igb: fix memcpy length' has been queued to stable release 17.08.1
2017-11-21 13:15 [dpdk-stable] patch 'gro: fix typo in map file' has been queued to stable release 17.08.1 Yuanhan Liu
` (42 preceding siblings ...)
2017-11-21 13:16 ` [dpdk-stable] patch 'net/liquidio: fix uninitialized variable' " Yuanhan Liu
@ 2017-11-21 13:16 ` Yuanhan Liu
2017-11-21 13:16 ` [dpdk-stable] patch 'net/i40e: fix variable assignment' " Yuanhan Liu
` (145 subsequent siblings)
189 siblings, 0 replies; 191+ messages in thread
From: Yuanhan Liu @ 2017-11-21 13:16 UTC (permalink / raw)
To: Yong Wang; +Cc: Ferruh Yigit, dpdk stable
Hi,
FYI, your patch has been queued to stable release 17.08.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/24/17. So please
shout if anyone has objections.
Thanks.
--yliu
---
>From 87876fbf4de985ed985a80bd21bb2cd2c89e684c Mon Sep 17 00:00:00 2001
From: Yong Wang <wang.yong19@zte.com.cn>
Date: Tue, 12 Sep 2017 08:44:00 -0400
Subject: [PATCH] net/igb: fix memcpy length
[ upstream commit 671f8776871d2e46c0619c743a82b2f6f6ce58ec ]
The size of "flex_filter.filter_info.mask" and "filter->mask" are 16
bytes, but the length of memcpy--"RTE_ALIGN(filter->len, sizeof(char))
/ sizeof(char)" may reach 128 bytes which may cause array access out
of bound.
Fix it by replacing "sizeof(char)" by "CHAR_BIT".
Fixes: 231d43909a31 ("igb: migrate flex filter to new API")
Signed-off-by: Yong Wang <wang.yong19@zte.com.cn>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
drivers/net/e1000/igb_ethdev.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/e1000/igb_ethdev.c b/drivers/net/e1000/igb_ethdev.c
index e4f7a9f..8078a1e 100644
--- a/drivers/net/e1000/igb_ethdev.c
+++ b/drivers/net/e1000/igb_ethdev.c
@@ -4094,7 +4094,7 @@ eth_igb_get_flex_filter(struct rte_eth_dev *dev,
flex_filter.filter_info.priority = filter->priority;
memcpy(flex_filter.filter_info.dwords, filter->bytes, filter->len);
memcpy(flex_filter.filter_info.mask, filter->mask,
- RTE_ALIGN(filter->len, sizeof(char)) / sizeof(char));
+ RTE_ALIGN(filter->len, CHAR_BIT) / CHAR_BIT);
it = eth_igb_flex_filter_lookup(&filter_info->flex_list,
&flex_filter.filter_info);
--
2.7.4
^ permalink raw reply [flat|nested] 191+ messages in thread
* [dpdk-stable] patch 'net/i40e: fix variable assignment' has been queued to stable release 17.08.1
2017-11-21 13:15 [dpdk-stable] patch 'gro: fix typo in map file' has been queued to stable release 17.08.1 Yuanhan Liu
` (43 preceding siblings ...)
2017-11-21 13:16 ` [dpdk-stable] patch 'net/igb: fix memcpy length' " Yuanhan Liu
@ 2017-11-21 13:16 ` Yuanhan Liu
2017-11-21 13:16 ` [dpdk-stable] patch 'net/qede/base: fix to use a passed ptt handle' " Yuanhan Liu
` (144 subsequent siblings)
189 siblings, 0 replies; 191+ messages in thread
From: Yuanhan Liu @ 2017-11-21 13:16 UTC (permalink / raw)
To: Jingjing Wu; +Cc: dpdk stable
Hi,
FYI, your patch has been queued to stable release 17.08.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/24/17. So please
shout if anyone has objections.
Thanks.
--yliu
---
>From bab12538a6f11f1362bfecca4e455e80b97c29ba Mon Sep 17 00:00:00 2001
From: Jingjing Wu <jingjing.wu@intel.com>
Date: Tue, 19 Sep 2017 02:53:06 +0800
Subject: [PATCH] net/i40e: fix variable assignment
[ upstream commit 9df0826a42e890006c77861c74b79907f33b8201 ]
rx/tx_queue_setup functions are shared between PF and VF
drivers. So the var 'pf' should not be assigned at the beginning.
This patch fixes the issue, and also corrects the return err code.
Fixes: b6583ee40265 ("i40e: full VMDQ pools support")
Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
---
drivers/net/i40e/i40e_rxtx.c | 84 +++++++++++++++++++++++---------------------
1 file changed, 43 insertions(+), 41 deletions(-)
diff --git a/drivers/net/i40e/i40e_rxtx.c b/drivers/net/i40e/i40e_rxtx.c
index d42c23c..3a7b68e 100644
--- a/drivers/net/i40e/i40e_rxtx.c
+++ b/drivers/net/i40e/i40e_rxtx.c
@@ -1734,36 +1734,42 @@ i40e_dev_rx_queue_setup(struct rte_eth_dev *dev,
const struct rte_eth_rxconf *rx_conf,
struct rte_mempool *mp)
{
- struct i40e_vsi *vsi;
struct i40e_hw *hw = I40E_DEV_PRIVATE_TO_HW(dev->data->dev_private);
- struct i40e_pf *pf = I40E_DEV_PRIVATE_TO_PF(dev->data->dev_private);
struct i40e_adapter *ad =
I40E_DEV_PRIVATE_TO_ADAPTER(dev->data->dev_private);
+ struct i40e_vsi *vsi;
+ struct i40e_pf *pf = NULL;
+ struct i40e_vf *vf = NULL;
struct i40e_rx_queue *rxq;
const struct rte_memzone *rz;
uint32_t ring_size;
uint16_t len, i;
- uint16_t base, bsf, tc_mapping;
- int use_def_burst_func = 1;
+ uint16_t reg_idx, base, bsf, tc_mapping;
+ int q_offset, use_def_burst_func = 1;
if (hw->mac.type == I40E_MAC_VF || hw->mac.type == I40E_MAC_X722_VF) {
- struct i40e_vf *vf =
- I40EVF_DEV_PRIVATE_TO_VF(dev->data->dev_private);
+ vf = I40EVF_DEV_PRIVATE_TO_VF(dev->data->dev_private);
vsi = &vf->vsi;
- } else
+ if (!vsi)
+ return -EINVAL;
+ reg_idx = queue_idx;
+ } else {
+ pf = I40E_DEV_PRIVATE_TO_PF(dev->data->dev_private);
vsi = i40e_pf_get_vsi_by_qindex(pf, queue_idx);
-
- if (vsi == NULL) {
- PMD_DRV_LOG(ERR, "VSI not available or queue "
- "index exceeds the maximum");
- return I40E_ERR_PARAM;
+ if (!vsi)
+ return -EINVAL;
+ q_offset = i40e_get_queue_offset_by_qindex(pf, queue_idx);
+ if (q_offset < 0)
+ return -EINVAL;
+ reg_idx = vsi->base_queue + q_offset;
}
+
if (nb_desc % I40E_ALIGN_RING_DESC != 0 ||
- (nb_desc > I40E_MAX_RING_DESC) ||
- (nb_desc < I40E_MIN_RING_DESC)) {
+ (nb_desc > I40E_MAX_RING_DESC) ||
+ (nb_desc < I40E_MIN_RING_DESC)) {
PMD_DRV_LOG(ERR, "Number (%u) of receive descriptors is "
"invalid", nb_desc);
- return I40E_ERR_PARAM;
+ return -EINVAL;
}
/* Free memory if needed */
@@ -1786,12 +1792,7 @@ i40e_dev_rx_queue_setup(struct rte_eth_dev *dev,
rxq->nb_rx_desc = nb_desc;
rxq->rx_free_thresh = rx_conf->rx_free_thresh;
rxq->queue_id = queue_idx;
- if (hw->mac.type == I40E_MAC_VF || hw->mac.type == I40E_MAC_X722_VF)
- rxq->reg_idx = queue_idx;
- else /* PF device */
- rxq->reg_idx = vsi->base_queue +
- i40e_get_queue_offset_by_qindex(pf, queue_idx);
-
+ rxq->reg_idx = reg_idx;
rxq->port_id = dev->data->port_id;
rxq->crc_len = (uint8_t) ((dev->data->dev_conf.rxmode.hw_strip_crc) ?
0 : ETHER_CRC_LEN);
@@ -2012,34 +2013,40 @@ i40e_dev_tx_queue_setup(struct rte_eth_dev *dev,
unsigned int socket_id,
const struct rte_eth_txconf *tx_conf)
{
- struct i40e_vsi *vsi;
struct i40e_hw *hw = I40E_DEV_PRIVATE_TO_HW(dev->data->dev_private);
- struct i40e_pf *pf = I40E_DEV_PRIVATE_TO_PF(dev->data->dev_private);
+ struct i40e_vsi *vsi;
+ struct i40e_pf *pf = NULL;
+ struct i40e_vf *vf = NULL;
struct i40e_tx_queue *txq;
const struct rte_memzone *tz;
uint32_t ring_size;
uint16_t tx_rs_thresh, tx_free_thresh;
- uint16_t i, base, bsf, tc_mapping;
+ uint16_t reg_idx, i, base, bsf, tc_mapping;
+ int q_offset;
if (hw->mac.type == I40E_MAC_VF || hw->mac.type == I40E_MAC_X722_VF) {
- struct i40e_vf *vf =
- I40EVF_DEV_PRIVATE_TO_VF(dev->data->dev_private);
+ vf = I40EVF_DEV_PRIVATE_TO_VF(dev->data->dev_private);
vsi = &vf->vsi;
- } else
+ if (!vsi)
+ return -EINVAL;
+ reg_idx = queue_idx;
+ } else {
+ pf = I40E_DEV_PRIVATE_TO_PF(dev->data->dev_private);
vsi = i40e_pf_get_vsi_by_qindex(pf, queue_idx);
-
- if (vsi == NULL) {
- PMD_DRV_LOG(ERR, "VSI is NULL, or queue index (%u) "
- "exceeds the maximum", queue_idx);
- return I40E_ERR_PARAM;
+ if (!vsi)
+ return -EINVAL;
+ q_offset = i40e_get_queue_offset_by_qindex(pf, queue_idx);
+ if (q_offset < 0)
+ return -EINVAL;
+ reg_idx = vsi->base_queue + q_offset;
}
if (nb_desc % I40E_ALIGN_RING_DESC != 0 ||
- (nb_desc > I40E_MAX_RING_DESC) ||
- (nb_desc < I40E_MIN_RING_DESC)) {
+ (nb_desc > I40E_MAX_RING_DESC) ||
+ (nb_desc < I40E_MIN_RING_DESC)) {
PMD_DRV_LOG(ERR, "Number (%u) of transmit descriptors is "
"invalid", nb_desc);
- return I40E_ERR_PARAM;
+ return -EINVAL;
}
/**
@@ -2148,12 +2155,7 @@ i40e_dev_tx_queue_setup(struct rte_eth_dev *dev,
txq->hthresh = tx_conf->tx_thresh.hthresh;
txq->wthresh = tx_conf->tx_thresh.wthresh;
txq->queue_id = queue_idx;
- if (hw->mac.type == I40E_MAC_VF || hw->mac.type == I40E_MAC_X722_VF)
- txq->reg_idx = queue_idx;
- else /* PF device */
- txq->reg_idx = vsi->base_queue +
- i40e_get_queue_offset_by_qindex(pf, queue_idx);
-
+ txq->reg_idx = reg_idx;
txq->port_id = dev->data->port_id;
txq->txq_flags = tx_conf->txq_flags;
txq->vsi = vsi;
--
2.7.4
^ permalink raw reply [flat|nested] 191+ messages in thread
* [dpdk-stable] patch 'net/qede/base: fix to use a passed ptt handle' has been queued to stable release 17.08.1
2017-11-21 13:15 [dpdk-stable] patch 'gro: fix typo in map file' has been queued to stable release 17.08.1 Yuanhan Liu
` (44 preceding siblings ...)
2017-11-21 13:16 ` [dpdk-stable] patch 'net/i40e: fix variable assignment' " Yuanhan Liu
@ 2017-11-21 13:16 ` Yuanhan Liu
2017-11-21 13:16 ` [dpdk-stable] patch 'net/tap: fix unregistering callback with invalid fd' " Yuanhan Liu
` (143 subsequent siblings)
189 siblings, 0 replies; 191+ messages in thread
From: Yuanhan Liu @ 2017-11-21 13:16 UTC (permalink / raw)
To: Rasesh Mody; +Cc: dpdk stable
Hi,
FYI, your patch has been queued to stable release 17.08.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/24/17. So please
shout if anyone has objections.
Thanks.
--yliu
---
>From 8ee952b38ebe51442b0baa485dd9bf6739c4a530 Mon Sep 17 00:00:00 2001
From: Rasesh Mody <rasesh.mody@cavium.com>
Date: Mon, 18 Sep 2017 18:29:50 -0700
Subject: [PATCH] net/qede/base: fix to use a passed ptt handle
[ upstream commit 544927f9a43fe1318b7d347982050f2a6fe4692c ]
Fix ecore_configure_vp_wfq_on_link_change() to use a provided ptt[PF
translation table] handle instead of directly using p_dpc_ptt
Fixes: ec94dbc57362 ("qede: add base driver")
Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
---
drivers/net/qede/base/ecore.h | 1 +
drivers/net/qede/base/ecore_dev.c | 4 ++--
drivers/net/qede/base/ecore_mcp.c | 2 +-
3 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/drivers/net/qede/base/ecore.h b/drivers/net/qede/base/ecore.h
index 0d68a9b..345325f 100644
--- a/drivers/net/qede/base/ecore.h
+++ b/drivers/net/qede/base/ecore.h
@@ -829,6 +829,7 @@ ecore_concrete_to_sw_fid(__rte_unused struct ecore_dev *p_dev, u32 concrete_fid)
int ecore_configure_vport_wfq(struct ecore_dev *p_dev, u16 vp_id, u32 rate);
void ecore_configure_vp_wfq_on_link_change(struct ecore_dev *p_dev,
+ struct ecore_ptt *p_ptt,
u32 min_pf_rate);
int ecore_configure_pf_max_bandwidth(struct ecore_dev *p_dev, u8 max_bw);
diff --git a/drivers/net/qede/base/ecore_dev.c b/drivers/net/qede/base/ecore_dev.c
index 65b89b8..be55ba4 100644
--- a/drivers/net/qede/base/ecore_dev.c
+++ b/drivers/net/qede/base/ecore_dev.c
@@ -4820,6 +4820,7 @@ int ecore_configure_vport_wfq(struct ecore_dev *p_dev, u16 vp_id, u32 rate)
/* API to configure WFQ from mcp link change */
void ecore_configure_vp_wfq_on_link_change(struct ecore_dev *p_dev,
+ struct ecore_ptt *p_ptt,
u32 min_pf_rate)
{
int i;
@@ -4834,8 +4835,7 @@ void ecore_configure_vp_wfq_on_link_change(struct ecore_dev *p_dev,
for_each_hwfn(p_dev, i) {
struct ecore_hwfn *p_hwfn = &p_dev->hwfns[i];
- __ecore_configure_vp_wfq_on_link_change(p_hwfn,
- p_hwfn->p_dpc_ptt,
+ __ecore_configure_vp_wfq_on_link_change(p_hwfn, p_ptt,
min_pf_rate);
}
}
diff --git a/drivers/net/qede/base/ecore_mcp.c b/drivers/net/qede/base/ecore_mcp.c
index 88c5ceb..cdb5cf2 100644
--- a/drivers/net/qede/base/ecore_mcp.c
+++ b/drivers/net/qede/base/ecore_mcp.c
@@ -1116,7 +1116,7 @@ static void ecore_mcp_handle_link_change(struct ecore_hwfn *p_hwfn,
/* Mintz bandwidth configuration */
__ecore_configure_pf_min_bandwidth(p_hwfn, p_ptt,
p_link, min_bw);
- ecore_configure_vp_wfq_on_link_change(p_hwfn->p_dev,
+ ecore_configure_vp_wfq_on_link_change(p_hwfn->p_dev, p_ptt,
p_link->min_pf_rate);
p_link->an = !!(status & LINK_STATUS_AUTO_NEGOTIATE_ENABLED);
--
2.7.4
^ permalink raw reply [flat|nested] 191+ messages in thread
* [dpdk-stable] patch 'net/tap: fix unregistering callback with invalid fd' has been queued to stable release 17.08.1
2017-11-21 13:15 [dpdk-stable] patch 'gro: fix typo in map file' has been queued to stable release 17.08.1 Yuanhan Liu
` (45 preceding siblings ...)
2017-11-21 13:16 ` [dpdk-stable] patch 'net/qede/base: fix to use a passed ptt handle' " Yuanhan Liu
@ 2017-11-21 13:16 ` Yuanhan Liu
2017-11-21 13:16 ` [dpdk-stable] patch 'net/vmxnet3: fix unintentional integer overflow' " Yuanhan Liu
` (142 subsequent siblings)
189 siblings, 0 replies; 191+ messages in thread
From: Yuanhan Liu @ 2017-11-21 13:16 UTC (permalink / raw)
To: Vipin Varghese; +Cc: Pascal Mazon, dpdk stable
Hi,
FYI, your patch has been queued to stable release 17.08.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/24/17. So please
shout if anyone has objections.
Thanks.
--yliu
---
>From 1d9b04559516a301820f4d947e5811d4dac31984 Mon Sep 17 00:00:00 2001
From: Vipin Varghese <vipin.varghese@intel.com>
Date: Mon, 18 Sep 2017 19:47:35 +0100
Subject: [PATCH] net/tap: fix unregistering callback with invalid fd
[ upstream commit d8f759a0ea03f8258db2b8e7fad3c7dffc8a9c39 ]
tap_intr_handle_set() called by tap_dev_start(), and if LSC is disabled
(dev_conf.intr_conf.lsc == 0), it tries to unregister interrupt
callback without checking the interrupt file descriptor.
Fixes: c0bddd3a057f ("net/tap: add link status notification")
Signed-off-by: Vipin Varghese <vipin.varghese@intel.com>
Acked-by: Pascal Mazon <pascal.mazon@6wind.com>
---
drivers/net/tap/rte_eth_tap.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/drivers/net/tap/rte_eth_tap.c b/drivers/net/tap/rte_eth_tap.c
index d926d4b..52380b4 100644
--- a/drivers/net/tap/rte_eth_tap.c
+++ b/drivers/net/tap/rte_eth_tap.c
@@ -1132,10 +1132,11 @@ tap_intr_handle_set(struct rte_eth_dev *dev, int set)
/* In any case, disable interrupt if the conf is no longer there. */
if (!dev->data->dev_conf.intr_conf.lsc) {
- if (pmd->intr_handle.fd != -1)
+ if (pmd->intr_handle.fd != -1) {
nl_final(pmd->intr_handle.fd);
- rte_intr_callback_unregister(
- &pmd->intr_handle, tap_dev_intr_handler, dev);
+ rte_intr_callback_unregister(&pmd->intr_handle,
+ tap_dev_intr_handler, dev);
+ }
return 0;
}
if (set) {
--
2.7.4
^ permalink raw reply [flat|nested] 191+ messages in thread
* [dpdk-stable] patch 'net/vmxnet3: fix unintentional integer overflow' has been queued to stable release 17.08.1
2017-11-21 13:15 [dpdk-stable] patch 'gro: fix typo in map file' has been queued to stable release 17.08.1 Yuanhan Liu
` (46 preceding siblings ...)
2017-11-21 13:16 ` [dpdk-stable] patch 'net/tap: fix unregistering callback with invalid fd' " Yuanhan Liu
@ 2017-11-21 13:16 ` Yuanhan Liu
2017-11-21 13:16 ` [dpdk-stable] patch 'net/enic: fix multi-process operation' " Yuanhan Liu
` (141 subsequent siblings)
189 siblings, 0 replies; 191+ messages in thread
From: Yuanhan Liu @ 2017-11-21 13:16 UTC (permalink / raw)
To: Sebastian Basierski; +Cc: Ferruh Yigit, dpdk stable
Hi,
FYI, your patch has been queued to stable release 17.08.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/24/17. So please
shout if anyone has objections.
Thanks.
--yliu
---
>From 0048a055720cb389207b138fb9898540654567ea Mon Sep 17 00:00:00 2001
From: Sebastian Basierski <sebastianx.basierski@intel.com>
Date: Tue, 19 Sep 2017 13:47:58 +0200
Subject: [PATCH] net/vmxnet3: fix unintentional integer overflow
[ upstream commit e8c1642a3ce7517d8c974ed16446d5fc2c917e39 ]
Fixed overflow by casting txq->cmd_ring.next2fill to uint64_t type.
Coverity issue: 143457
Fixes: 01fef6e3c181 ("net/vmxnet3: allow variable length Tx data ring")
Signed-off-by: Sebastian Basierski <sebastianx.basierski@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
drivers/net/vmxnet3/vmxnet3_rxtx.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/net/vmxnet3/vmxnet3_rxtx.c b/drivers/net/vmxnet3/vmxnet3_rxtx.c
index d9cf437..680da17 100644
--- a/drivers/net/vmxnet3/vmxnet3_rxtx.c
+++ b/drivers/net/vmxnet3/vmxnet3_rxtx.c
@@ -504,8 +504,9 @@ vmxnet3_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts,
*/
gdesc = txq->cmd_ring.base + txq->cmd_ring.next2fill;
if (copy_size) {
- uint64 offset = txq->cmd_ring.next2fill *
- txq->txdata_desc_size;
+ uint64 offset =
+ (uint64)txq->cmd_ring.next2fill *
+ txq->txdata_desc_size;
gdesc->txd.addr =
rte_cpu_to_le_64(txq->data_ring.basePA +
offset);
--
2.7.4
^ permalink raw reply [flat|nested] 191+ messages in thread
* [dpdk-stable] patch 'net/enic: fix multi-process operation' has been queued to stable release 17.08.1
2017-11-21 13:15 [dpdk-stable] patch 'gro: fix typo in map file' has been queued to stable release 17.08.1 Yuanhan Liu
` (47 preceding siblings ...)
2017-11-21 13:16 ` [dpdk-stable] patch 'net/vmxnet3: fix unintentional integer overflow' " Yuanhan Liu
@ 2017-11-21 13:16 ` Yuanhan Liu
2017-11-21 13:16 ` [dpdk-stable] patch 'net/i40e: fix clear xstats bug in VF' " Yuanhan Liu
` (140 subsequent siblings)
189 siblings, 0 replies; 191+ messages in thread
From: Yuanhan Liu @ 2017-11-21 13:16 UTC (permalink / raw)
To: John Daley; +Cc: Aaron Conole, dpdk stable
Hi,
FYI, your patch has been queued to stable release 17.08.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/24/17. So please
shout if anyone has objections.
Thanks.
--yliu
---
>From 8dddd9ffeee9e9c4b03fbbf0cb02a8e2b187de12 Mon Sep 17 00:00:00 2001
From: John Daley <johndale@cisco.com>
Date: Mon, 11 Sep 2017 11:58:33 -0700
Subject: [PATCH] net/enic: fix multi-process operation
[ upstream commit 0e804034dc9a5e27aa3bd9763457cd70e8970b81 ]
- Use rte_malloc() instead of malloc() for the per device 'vdev' structure
so that it can be shared across processes.
- Only initialize the device if the process type is RTE_PROC_PRIMARY
- Only allow the primary process to do queue setup, start/stop, promisc
allmulticast, mac add/del, mtu.
Fixes: fefed3d1e62c ("enic: new driver")
Signed-off-by: John Daley <johndale@cisco.com>
Reviewed-by: Aaron Conole <aconole@redhat.com>
---
doc/guides/nics/features/enic.ini | 1 +
drivers/net/enic/base/vnic_dev.c | 10 +++++++--
drivers/net/enic/enic_ethdev.c | 43 +++++++++++++++++++++++++++++++++++++++
drivers/net/enic/enic_main.c | 7 +++++++
4 files changed, 59 insertions(+), 2 deletions(-)
diff --git a/doc/guides/nics/features/enic.ini b/doc/guides/nics/features/enic.ini
index 0de3ef5..498341f 100644
--- a/doc/guides/nics/features/enic.ini
+++ b/doc/guides/nics/features/enic.ini
@@ -25,6 +25,7 @@ L3 checksum offload = Y
L4 checksum offload = Y
Packet type parsing = Y
Basic stats = Y
+Multiprocess aware = Y
BSD nic_uio = Y
Linux UIO = Y
Linux VFIO = Y
diff --git a/drivers/net/enic/base/vnic_dev.c b/drivers/net/enic/base/vnic_dev.c
index 49b3655..162e9c2 100644
--- a/drivers/net/enic/base/vnic_dev.c
+++ b/drivers/net/enic/base/vnic_dev.c
@@ -1063,7 +1063,7 @@ void vnic_dev_unregister(struct vnic_dev *vdev)
vdev->free_consistent(vdev->priv,
sizeof(struct vnic_devcmd_fw_info),
vdev->fw_info, vdev->fw_info_pa);
- kfree(vdev);
+ rte_free(vdev);
}
}
@@ -1072,7 +1072,13 @@ struct vnic_dev *vnic_dev_register(struct vnic_dev *vdev,
unsigned int num_bars)
{
if (!vdev) {
- vdev = kzalloc(sizeof(struct vnic_dev), GFP_ATOMIC);
+ char name[NAME_MAX];
+ snprintf((char *)name, sizeof(name), "%s-vnic",
+ pdev->device.name);
+ vdev = (struct vnic_dev *)rte_zmalloc_socket(name,
+ sizeof(struct vnic_dev),
+ RTE_CACHE_LINE_SIZE,
+ pdev->device.numa_node);
if (!vdev)
return NULL;
}
diff --git a/drivers/net/enic/enic_ethdev.c b/drivers/net/enic/enic_ethdev.c
index da8fec2..33a3f87 100644
--- a/drivers/net/enic/enic_ethdev.c
+++ b/drivers/net/enic/enic_ethdev.c
@@ -142,6 +142,10 @@ enicpmd_dev_filter_ctrl(struct rte_eth_dev *dev,
static void enicpmd_dev_tx_queue_release(void *txq)
{
ENICPMD_FUNC_TRACE();
+
+ if (rte_eal_process_type() != RTE_PROC_PRIMARY)
+ return;
+
enic_free_wq(txq);
}
@@ -196,6 +200,9 @@ static int enicpmd_dev_tx_queue_setup(struct rte_eth_dev *eth_dev,
int ret;
struct enic *enic = pmd_priv(eth_dev);
+ if (rte_eal_process_type() != RTE_PROC_PRIMARY)
+ return -E_RTE_SECONDARY;
+
ENICPMD_FUNC_TRACE();
if (queue_idx >= ENIC_WQ_MAX) {
dev_err(enic,
@@ -272,6 +279,10 @@ static int enicpmd_dev_rx_queue_stop(struct rte_eth_dev *eth_dev,
static void enicpmd_dev_rx_queue_release(void *rxq)
{
ENICPMD_FUNC_TRACE();
+
+ if (rte_eal_process_type() != RTE_PROC_PRIMARY)
+ return;
+
enic_free_rq(rxq);
}
@@ -310,6 +321,10 @@ static int enicpmd_dev_rx_queue_setup(struct rte_eth_dev *eth_dev,
struct enic *enic = pmd_priv(eth_dev);
ENICPMD_FUNC_TRACE();
+
+ if (rte_eal_process_type() != RTE_PROC_PRIMARY)
+ return -E_RTE_SECONDARY;
+
/* With Rx scatter support, two RQs are now used on VIC per RQ used
* by the application.
*/
@@ -378,6 +393,9 @@ static int enicpmd_dev_configure(struct rte_eth_dev *eth_dev)
int ret;
struct enic *enic = pmd_priv(eth_dev);
+ if (rte_eal_process_type() != RTE_PROC_PRIMARY)
+ return -E_RTE_SECONDARY;
+
ENICPMD_FUNC_TRACE();
ret = enic_set_vnic_res(enic);
if (ret) {
@@ -404,6 +422,9 @@ static int enicpmd_dev_start(struct rte_eth_dev *eth_dev)
{
struct enic *enic = pmd_priv(eth_dev);
+ if (rte_eal_process_type() != RTE_PROC_PRIMARY)
+ return -E_RTE_SECONDARY;
+
ENICPMD_FUNC_TRACE();
return enic_enable(enic);
}
@@ -416,6 +437,9 @@ static void enicpmd_dev_stop(struct rte_eth_dev *eth_dev)
struct rte_eth_link link;
struct enic *enic = pmd_priv(eth_dev);
+ if (rte_eal_process_type() != RTE_PROC_PRIMARY)
+ return;
+
ENICPMD_FUNC_TRACE();
enic_disable(enic);
memset(&link, 0, sizeof(link));
@@ -513,7 +537,11 @@ static void enicpmd_dev_promiscuous_enable(struct rte_eth_dev *eth_dev)
{
struct enic *enic = pmd_priv(eth_dev);
+ if (rte_eal_process_type() != RTE_PROC_PRIMARY)
+ return;
+
ENICPMD_FUNC_TRACE();
+
enic->promisc = 1;
enic_add_packet_filter(enic);
}
@@ -522,6 +550,9 @@ static void enicpmd_dev_promiscuous_disable(struct rte_eth_dev *eth_dev)
{
struct enic *enic = pmd_priv(eth_dev);
+ if (rte_eal_process_type() != RTE_PROC_PRIMARY)
+ return;
+
ENICPMD_FUNC_TRACE();
enic->promisc = 0;
enic_add_packet_filter(enic);
@@ -531,6 +562,9 @@ static void enicpmd_dev_allmulticast_enable(struct rte_eth_dev *eth_dev)
{
struct enic *enic = pmd_priv(eth_dev);
+ if (rte_eal_process_type() != RTE_PROC_PRIMARY)
+ return;
+
ENICPMD_FUNC_TRACE();
enic->allmulti = 1;
enic_add_packet_filter(enic);
@@ -540,6 +574,9 @@ static void enicpmd_dev_allmulticast_disable(struct rte_eth_dev *eth_dev)
{
struct enic *enic = pmd_priv(eth_dev);
+ if (rte_eal_process_type() != RTE_PROC_PRIMARY)
+ return;
+
ENICPMD_FUNC_TRACE();
enic->allmulti = 0;
enic_add_packet_filter(enic);
@@ -551,6 +588,9 @@ static int enicpmd_add_mac_addr(struct rte_eth_dev *eth_dev,
{
struct enic *enic = pmd_priv(eth_dev);
+ if (rte_eal_process_type() != RTE_PROC_PRIMARY)
+ return -E_RTE_SECONDARY;
+
ENICPMD_FUNC_TRACE();
return enic_set_mac_address(enic, mac_addr->addr_bytes);
}
@@ -559,6 +599,9 @@ static void enicpmd_remove_mac_addr(struct rte_eth_dev *eth_dev, uint32_t index)
{
struct enic *enic = pmd_priv(eth_dev);
+ if (rte_eal_process_type() != RTE_PROC_PRIMARY)
+ return;
+
ENICPMD_FUNC_TRACE();
enic_del_mac_address(enic, index);
}
diff --git a/drivers/net/enic/enic_main.c b/drivers/net/enic/enic_main.c
index 1d956cd..9b0439b 100644
--- a/drivers/net/enic/enic_main.c
+++ b/drivers/net/enic/enic_main.c
@@ -1181,6 +1181,9 @@ int enic_set_mtu(struct enic *enic, uint16_t new_mtu)
old_mtu = eth_dev->data->mtu;
config_mtu = enic->config.mtu;
+ if (rte_eal_process_type() != RTE_PROC_PRIMARY)
+ return -E_RTE_SECONDARY;
+
if (new_mtu > enic->max_mtu) {
dev_err(enic,
"MTU not updated: requested (%u) greater than max (%u)\n",
@@ -1332,6 +1335,10 @@ int enic_probe(struct enic *enic)
dev_debug(enic, " Initializing ENIC PMD\n");
+ /* if this is a secondary process the hardware is already initialized */
+ if (rte_eal_process_type() != RTE_PROC_PRIMARY)
+ return 0;
+
enic->bar0.vaddr = (void *)pdev->mem_resource[0].addr;
enic->bar0.len = pdev->mem_resource[0].len;
--
2.7.4
^ permalink raw reply [flat|nested] 191+ messages in thread
* [dpdk-stable] patch 'net/i40e: fix clear xstats bug in VF' has been queued to stable release 17.08.1
2017-11-21 13:15 [dpdk-stable] patch 'gro: fix typo in map file' has been queued to stable release 17.08.1 Yuanhan Liu
` (48 preceding siblings ...)
2017-11-21 13:16 ` [dpdk-stable] patch 'net/enic: fix multi-process operation' " Yuanhan Liu
@ 2017-11-21 13:16 ` Yuanhan Liu
2017-11-21 13:16 ` [dpdk-stable] patch 'app/testpmd: fix packet throughput after stats reset' " Yuanhan Liu
` (139 subsequent siblings)
189 siblings, 0 replies; 191+ messages in thread
From: Yuanhan Liu @ 2017-11-21 13:16 UTC (permalink / raw)
To: Wei Zhao; +Cc: Ferruh Yigit, dpdk stable
Hi,
FYI, your patch has been queued to stable release 17.08.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/24/17. So please
shout if anyone has objections.
Thanks.
--yliu
---
>From 3f468896e21e973b272723707c5f0a97450f98e9 Mon Sep 17 00:00:00 2001
From: Wei Zhao <wei.zhao1@intel.com>
Date: Thu, 21 Sep 2017 14:32:22 +0800
Subject: [PATCH] net/i40e: fix clear xstats bug in VF
[ upstream commit 8210e9e0d805ee0f80d19149ac0b5799b52c0e13 ]
Clearing VSI stats done by setting an offset value to latest stats
and further stats values are subtracted from that offset.
This setting offset and baselining logic exists in PF driver, but for VF
there is no way to update its VSI offset in the PF.
So same baselining logic added into VF, also setting VSI offset in VF
fixed to support VF stats clear.
Fixes: da61cd0849766 ("i40evf: add extended stats")
Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
drivers/net/i40e/i40e_ethdev_vf.c | 64 ++++++++++++++++++++++++++++++++++++++-
1 file changed, 63 insertions(+), 1 deletion(-)
diff --git a/drivers/net/i40e/i40e_ethdev_vf.c b/drivers/net/i40e/i40e_ethdev_vf.c
index 3e242e8..f338e22 100644
--- a/drivers/net/i40e/i40e_ethdev_vf.c
+++ b/drivers/net/i40e/i40e_ethdev_vf.c
@@ -993,16 +993,74 @@ i40evf_update_stats(struct rte_eth_dev *dev, struct i40e_eth_stats **pstats)
return 0;
}
+static void
+i40evf_stat_update_48(uint64_t *offset,
+ uint64_t *stat)
+{
+ if (*stat >= *offset)
+ *stat = *stat - *offset;
+ else
+ *stat = (uint64_t)((*stat +
+ ((uint64_t)1 << I40E_48_BIT_WIDTH)) - *offset);
+
+ *stat &= I40E_48_BIT_MASK;
+}
+
+static void
+i40evf_stat_update_32(uint64_t *offset,
+ uint64_t *stat)
+{
+ if (*stat >= *offset)
+ *stat = (uint64_t)(*stat - *offset);
+ else
+ *stat = (uint64_t)((*stat +
+ ((uint64_t)1 << I40E_32_BIT_WIDTH)) - *offset);
+}
+
+static void
+i40evf_update_vsi_stats(struct i40e_vsi *vsi,
+ struct i40e_eth_stats *nes)
+{
+ struct i40e_eth_stats *oes = &vsi->eth_stats_offset;
+
+ i40evf_stat_update_48(&oes->rx_bytes,
+ &nes->rx_bytes);
+ i40evf_stat_update_48(&oes->rx_unicast,
+ &nes->rx_unicast);
+ i40evf_stat_update_48(&oes->rx_multicast,
+ &nes->rx_multicast);
+ i40evf_stat_update_48(&oes->rx_broadcast,
+ &nes->rx_broadcast);
+ i40evf_stat_update_32(&oes->rx_discards,
+ &nes->rx_discards);
+ i40evf_stat_update_32(&oes->rx_unknown_protocol,
+ &nes->rx_unknown_protocol);
+ i40evf_stat_update_48(&oes->tx_bytes,
+ &nes->tx_bytes);
+ i40evf_stat_update_48(&oes->tx_unicast,
+ &nes->tx_unicast);
+ i40evf_stat_update_48(&oes->tx_multicast,
+ &nes->tx_multicast);
+ i40evf_stat_update_48(&oes->tx_broadcast,
+ &nes->tx_broadcast);
+ i40evf_stat_update_32(&oes->tx_errors, &nes->tx_errors);
+ i40evf_stat_update_32(&oes->tx_discards, &nes->tx_discards);
+}
+
static int
i40evf_get_statistics(struct rte_eth_dev *dev, struct rte_eth_stats *stats)
{
int ret;
struct i40e_eth_stats *pstats = NULL;
+ struct i40e_vf *vf = I40EVF_DEV_PRIVATE_TO_VF(dev->data->dev_private);
+ struct i40e_vsi *vsi = &vf->vsi;
ret = i40evf_update_stats(dev, &pstats);
if (ret != 0)
return 0;
+ i40evf_update_vsi_stats(vsi, pstats);
+
stats->ipackets = pstats->rx_unicast + pstats->rx_multicast +
pstats->rx_broadcast;
stats->opackets = pstats->tx_broadcast + pstats->tx_multicast +
@@ -1025,7 +1083,7 @@ i40evf_dev_xstats_reset(struct rte_eth_dev *dev)
i40evf_update_stats(dev, &pstats);
/* set stats offset base on current values */
- vf->vsi.eth_stats_offset = vf->vsi.eth_stats;
+ vf->vsi.eth_stats_offset = *pstats;
}
static int i40evf_dev_xstats_get_names(__rte_unused struct rte_eth_dev *dev,
@@ -1049,6 +1107,8 @@ static int i40evf_dev_xstats_get(struct rte_eth_dev *dev,
int ret;
unsigned i;
struct i40e_eth_stats *pstats = NULL;
+ struct i40e_vf *vf = I40EVF_DEV_PRIVATE_TO_VF(dev->data->dev_private);
+ struct i40e_vsi *vsi = &vf->vsi;
if (n < I40EVF_NB_XSTATS)
return I40EVF_NB_XSTATS;
@@ -1060,6 +1120,8 @@ static int i40evf_dev_xstats_get(struct rte_eth_dev *dev,
if (!xstats)
return 0;
+ i40evf_update_vsi_stats(vsi, pstats);
+
/* loop over xstats array and values from pstats */
for (i = 0; i < I40EVF_NB_XSTATS; i++) {
xstats[i].id = i;
--
2.7.4
^ permalink raw reply [flat|nested] 191+ messages in thread
* [dpdk-stable] patch 'app/testpmd: fix packet throughput after stats reset' has been queued to stable release 17.08.1
2017-11-21 13:15 [dpdk-stable] patch 'gro: fix typo in map file' has been queued to stable release 17.08.1 Yuanhan Liu
` (49 preceding siblings ...)
2017-11-21 13:16 ` [dpdk-stable] patch 'net/i40e: fix clear xstats bug in VF' " Yuanhan Liu
@ 2017-11-21 13:16 ` Yuanhan Liu
2017-11-21 13:16 ` [dpdk-stable] patch 'net/i40e: fix assignment of enum values' " Yuanhan Liu
` (138 subsequent siblings)
189 siblings, 0 replies; 191+ messages in thread
From: Yuanhan Liu @ 2017-11-21 13:16 UTC (permalink / raw)
To: Wei Zhao; +Cc: Ferruh Yigit, dpdk stable
Hi,
FYI, your patch has been queued to stable release 17.08.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/24/17. So please
shout if anyone has objections.
Thanks.
--yliu
---
>From d26af30a623917b0530dfc87dee42b4b4abee46b Mon Sep 17 00:00:00 2001
From: Wei Zhao <wei.zhao1@intel.com>
Date: Thu, 21 Sep 2017 14:32:23 +0800
Subject: [PATCH] app/testpmd: fix packet throughput after stats reset
[ upstream commit 69986a823d789da3745ab6b4ca6d3e84fe76c1b1 ]
Testpmd calculates packet throughput by getting a diff of previous stats
value and current one.
If a stats clear called after previous sample taken, the diff will be
negative and throughput calculation will be wrong.
If current stats value is smaller than previous one, set throughput to
zero.
Fixes: 0e106980301d ("app/testpmd: show throughput in port stats")
Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
app/test-pmd/config.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c
index 3ae3e1c..14131d6 100644
--- a/app/test-pmd/config.c
+++ b/app/test-pmd/config.c
@@ -203,8 +203,10 @@ nic_stats_display(portid_t port_id)
if (diff_cycles > 0)
diff_cycles = prev_cycles[port_id] - diff_cycles;
- diff_pkts_rx = stats.ipackets - prev_pkts_rx[port_id];
- diff_pkts_tx = stats.opackets - prev_pkts_tx[port_id];
+ diff_pkts_rx = (stats.ipackets > prev_pkts_rx[port_id]) ?
+ (stats.ipackets - prev_pkts_rx[port_id]) : 0;
+ diff_pkts_tx = (stats.opackets > prev_pkts_tx[port_id]) ?
+ (stats.opackets - prev_pkts_tx[port_id]) : 0;
prev_pkts_rx[port_id] = stats.ipackets;
prev_pkts_tx[port_id] = stats.opackets;
mpps_rx = diff_cycles > 0 ?
--
2.7.4
^ permalink raw reply [flat|nested] 191+ messages in thread
* [dpdk-stable] patch 'net/i40e: fix assignment of enum values' has been queued to stable release 17.08.1
2017-11-21 13:15 [dpdk-stable] patch 'gro: fix typo in map file' has been queued to stable release 17.08.1 Yuanhan Liu
` (50 preceding siblings ...)
2017-11-21 13:16 ` [dpdk-stable] patch 'app/testpmd: fix packet throughput after stats reset' " Yuanhan Liu
@ 2017-11-21 13:16 ` Yuanhan Liu
2017-11-21 13:16 ` [dpdk-stable] patch 'net/i40e: fix mirror rule reset when port is closed' " Yuanhan Liu
` (137 subsequent siblings)
189 siblings, 0 replies; 191+ messages in thread
From: Yuanhan Liu @ 2017-11-21 13:16 UTC (permalink / raw)
To: Tomasz Kulasek; +Cc: Jingjing Wu, dpdk stable
Hi,
FYI, your patch has been queued to stable release 17.08.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/24/17. So please
shout if anyone has objections.
Thanks.
--yliu
---
>From dd97be23736e518b1a5d7d597d3ec65f98ebb4d7 Mon Sep 17 00:00:00 2001
From: Tomasz Kulasek <tomaszx.kulasek@intel.com>
Date: Fri, 22 Sep 2017 14:36:25 +0200
Subject: [PATCH] net/i40e: fix assignment of enum values
[ upstream commit ff8cbb49b4808c79b2e78ed19a851f9f05ce8f5d ]
mixed_enums: Mixing enum types enum i40e_vsi_type and enum
virtchnl_vsi_type for type
Coverity issue 158651
Fixes: a58860f68929 ("net/i40e/base: use new virtchnl header file")
Signed-off-by: Tomasz Kulasek <tomaszx.kulasek@intel.com>
Acked-by: Jingjing Wu <jingjing.wu@intel.com>
---
drivers/net/i40e/i40e_ethdev_vf.c | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/drivers/net/i40e/i40e_ethdev_vf.c b/drivers/net/i40e/i40e_ethdev_vf.c
index f338e22..6f4eef7 100644
--- a/drivers/net/i40e/i40e_ethdev_vf.c
+++ b/drivers/net/i40e/i40e_ethdev_vf.c
@@ -1355,7 +1355,15 @@ i40evf_init_vf(struct rte_eth_dev *dev)
if (hw->mac.type == I40E_MAC_X722_VF)
vf->flags = I40E_FLAG_RSS_AQ_CAPABLE;
vf->vsi.vsi_id = vf->vsi_res->vsi_id;
- vf->vsi.type = (enum i40e_vsi_type)vf->vsi_res->vsi_type;
+
+ switch (vf->vsi_res->vsi_type) {
+ case VIRTCHNL_VSI_SRIOV:
+ vf->vsi.type = I40E_VSI_SRIOV;
+ break;
+ default:
+ vf->vsi.type = I40E_VSI_TYPE_UNKNOWN;
+ break;
+ }
vf->vsi.nb_qps = vf->vsi_res->num_queue_pairs;
vf->vsi.adapter = I40E_DEV_PRIVATE_TO_ADAPTER(dev->data->dev_private);
--
2.7.4
^ permalink raw reply [flat|nested] 191+ messages in thread
* [dpdk-stable] patch 'net/i40e: fix mirror rule reset when port is closed' has been queued to stable release 17.08.1
2017-11-21 13:15 [dpdk-stable] patch 'gro: fix typo in map file' has been queued to stable release 17.08.1 Yuanhan Liu
` (51 preceding siblings ...)
2017-11-21 13:16 ` [dpdk-stable] patch 'net/i40e: fix assignment of enum values' " Yuanhan Liu
@ 2017-11-21 13:16 ` Yuanhan Liu
2017-11-21 13:16 ` [dpdk-stable] patch 'net/bnxt: fix HWRM macros and locking' " Yuanhan Liu
` (136 subsequent siblings)
189 siblings, 0 replies; 191+ messages in thread
From: Yuanhan Liu @ 2017-11-21 13:16 UTC (permalink / raw)
To: Wei Dai; +Cc: Lijuan Tu, Jingjing Wu, dpdk stable
Hi,
FYI, your patch has been queued to stable release 17.08.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/24/17. So please
shout if anyone has objections.
Thanks.
--yliu
---
>From ac2dda01421785c2185750a6a52c8a0f83ec29e6 Mon Sep 17 00:00:00 2001
From: Wei Dai <wei.dai@intel.com>
Date: Mon, 25 Sep 2017 14:36:53 +0800
Subject: [PATCH] net/i40e: fix mirror rule reset when port is closed
[ upstream commit 77a45aeb6b2b4f8dbf8ca53e8bfae8aa18382157 ]
When an i40e PF port is stopped, all mirror rules should be reserved.
But when an i40e PF port is closed, all mirror rules should be removed.
When a mirror rule is removed, its associated hardware and software
resource should also be removed.
Fixes: a4def5edf0fc ("i40e: enable port mirroring")
Signed-off-by: Wei Dai <wei.dai@intel.com>
Tested-by: Lijuan Tu <lijuanx.a.tu@intel.com>
Acked-by: Jingjing Wu <jingjing.wu@intel.com>
---
drivers/net/i40e/i40e_ethdev.c | 36 ++++++++++++++++++++++++++++--------
1 file changed, 28 insertions(+), 8 deletions(-)
diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c
index 62f25b3..1adc8c8 100644
--- a/drivers/net/i40e/i40e_ethdev.c
+++ b/drivers/net/i40e/i40e_ethdev.c
@@ -360,6 +360,12 @@ static int i40e_dev_sync_phy_type(struct i40e_hw *hw);
static void i40e_configure_registers(struct i40e_hw *hw);
static void i40e_hw_init(struct rte_eth_dev *dev);
static int i40e_config_qinq(struct i40e_hw *hw, struct i40e_vsi *vsi);
+static enum i40e_status_code i40e_aq_del_mirror_rule(struct i40e_hw *hw,
+ uint16_t seid,
+ uint16_t rule_type,
+ uint16_t *entries,
+ uint16_t count,
+ uint16_t rule_id);
static int i40e_mirror_rule_set(struct rte_eth_dev *dev,
struct rte_eth_mirror_conf *mirror_conf,
uint8_t sw_id, uint8_t on);
@@ -2069,7 +2075,6 @@ i40e_dev_stop(struct rte_eth_dev *dev)
struct i40e_pf *pf = I40E_DEV_PRIVATE_TO_PF(dev->data->dev_private);
struct i40e_hw *hw = I40E_DEV_PRIVATE_TO_HW(dev->data->dev_private);
struct i40e_vsi *main_vsi = pf->main_vsi;
- struct i40e_mirror_rule *p_mirror;
struct rte_pci_device *pci_dev = RTE_ETH_DEV_TO_PCI(dev);
struct rte_intr_handle *intr_handle = &pci_dev->intr_handle;
int i;
@@ -2098,13 +2103,6 @@ i40e_dev_stop(struct rte_eth_dev *dev)
/* Set link down */
i40e_dev_set_link_down(dev);
- /* Remove all mirror rules */
- while ((p_mirror = TAILQ_FIRST(&pf->mirror_list))) {
- TAILQ_REMOVE(&pf->mirror_list, p_mirror, rules);
- rte_free(p_mirror);
- }
- pf->nb_mirror_rule = 0;
-
if (!rte_intr_allow_others(intr_handle))
/* resume to the default handler */
rte_intr_callback_register(intr_handle,
@@ -2131,12 +2129,34 @@ i40e_dev_close(struct rte_eth_dev *dev)
struct i40e_hw *hw = I40E_DEV_PRIVATE_TO_HW(dev->data->dev_private);
struct rte_pci_device *pci_dev = RTE_ETH_DEV_TO_PCI(dev);
struct rte_intr_handle *intr_handle = &pci_dev->intr_handle;
+ struct i40e_mirror_rule *p_mirror;
uint32_t reg;
int i;
+ int ret;
PMD_INIT_FUNC_TRACE();
i40e_dev_stop(dev);
+
+ /* Remove all mirror rules */
+ while ((p_mirror = TAILQ_FIRST(&pf->mirror_list))) {
+ ret = i40e_aq_del_mirror_rule(hw,
+ pf->main_vsi->veb->seid,
+ p_mirror->rule_type,
+ p_mirror->entries,
+ p_mirror->num_entries,
+ p_mirror->id);
+ if (ret < 0)
+ PMD_DRV_LOG(ERR, "failed to remove mirror rule: "
+ "status = %d, aq_err = %d.", ret,
+ hw->aq.asq_last_status);
+
+ /* remove mirror software resource anyway */
+ TAILQ_REMOVE(&pf->mirror_list, p_mirror, rules);
+ rte_free(p_mirror);
+ pf->nb_mirror_rule--;
+ }
+
i40e_dev_free_queues(dev);
/* Disable interrupt */
--
2.7.4
^ permalink raw reply [flat|nested] 191+ messages in thread
* [dpdk-stable] patch 'net/bnxt: fix HWRM macros and locking' has been queued to stable release 17.08.1
2017-11-21 13:15 [dpdk-stable] patch 'gro: fix typo in map file' has been queued to stable release 17.08.1 Yuanhan Liu
` (52 preceding siblings ...)
2017-11-21 13:16 ` [dpdk-stable] patch 'net/i40e: fix mirror rule reset when port is closed' " Yuanhan Liu
@ 2017-11-21 13:16 ` Yuanhan Liu
2017-11-21 13:16 ` [dpdk-stable] patch 'net/bnxt: use 64-bits of address for VLAN table' " Yuanhan Liu
` (135 subsequent siblings)
189 siblings, 0 replies; 191+ messages in thread
From: Yuanhan Liu @ 2017-11-21 13:16 UTC (permalink / raw)
To: Ajit Khaparde; +Cc: dpdk stable
Hi,
FYI, your patch has been queued to stable release 17.08.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/24/17. So please
shout if anyone has objections.
Thanks.
--yliu
---
>From 4a4da56b3eb5bd1667d970c27d4f230862fbab1b Mon Sep 17 00:00:00 2001
From: Ajit Khaparde <ajit.khaparde@broadcom.com>
Date: Thu, 28 Sep 2017 16:43:22 -0500
Subject: [PATCH] net/bnxt: fix HWRM macros and locking
[ upstream commit cbcd375d37d2f9cf4cb27016140fd4c161f9a6ae ]
Obtain the spinlock in HWRM_PREP()
Eliminate two unnecessary arguments in HWRM_PREP().
Unlock the spinlock before returning in HWRM_ERROR_CHECK()
Add new HWRM_UNLOCK() macro
Update usage of the thre macros.
Fixes: 804e746c7b73 ("net/bnxt: add hardware resource manager init code")
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
drivers/net/bnxt/bnxt_hwrm.c | 459 +++++++++++++++++++++++++++----------------
1 file changed, 291 insertions(+), 168 deletions(-)
diff --git a/drivers/net/bnxt/bnxt_hwrm.c b/drivers/net/bnxt/bnxt_hwrm.c
index e710e63..fe82f09 100644
--- a/drivers/net/bnxt/bnxt_hwrm.c
+++ b/drivers/net/bnxt/bnxt_hwrm.c
@@ -54,7 +54,7 @@
#include <rte_io.h>
-#define HWRM_CMD_TIMEOUT 2000
+#define HWRM_CMD_TIMEOUT 10000
struct bnxt_plcmodes_cfg {
uint32_t flags;
@@ -95,7 +95,7 @@ static int page_roundup(size_t size)
* command was failed by the ChiMP.
*/
-static int bnxt_hwrm_send_message_locked(struct bnxt *bp, void *msg,
+static int bnxt_hwrm_send_message(struct bnxt *bp, void *msg,
uint32_t msg_len)
{
unsigned int i;
@@ -171,52 +171,58 @@ err_ret:
return -1;
}
-static int bnxt_hwrm_send_message(struct bnxt *bp, void *msg, uint32_t msg_len)
-{
- int rc;
-
- rte_spinlock_lock(&bp->hwrm_lock);
- rc = bnxt_hwrm_send_message_locked(bp, msg, msg_len);
- rte_spinlock_unlock(&bp->hwrm_lock);
- return rc;
-}
-
-#define HWRM_PREP(req, type, cr, resp) \
+/*
+ * HWRM_PREP() should be used to prepare *ALL* HWRM commands. It grabs the
+ * spinlock, and does initial processing.
+ *
+ * HWRM_CHECK_RESULT() returns errors on failure and may not be used. It
+ * releases the spinlock only if it returns. If the regular int return codes
+ * are not used by the function, HWRM_CHECK_RESULT() should not be used
+ * directly, rather it should be copied and modified to suit the function.
+ *
+ * HWRM_UNLOCK() must be called after all response processing is completed.
+ */
+#define HWRM_PREP(req, type) do { \
+ rte_spinlock_lock(&bp->hwrm_lock); \
memset(bp->hwrm_cmd_resp_addr, 0, bp->max_resp_len); \
req.req_type = rte_cpu_to_le_16(HWRM_##type); \
- req.cmpl_ring = rte_cpu_to_le_16(cr); \
+ req.cmpl_ring = rte_cpu_to_le_16(-1); \
req.seq_id = rte_cpu_to_le_16(bp->hwrm_cmd_seq++); \
req.target_id = rte_cpu_to_le_16(0xffff); \
- req.resp_addr = rte_cpu_to_le_64(bp->hwrm_cmd_resp_dma_addr)
-
-#define HWRM_CHECK_RESULT \
- { \
- if (rc) { \
- RTE_LOG(ERR, PMD, "%s failed rc:%d\n", \
- __func__, rc); \
- return rc; \
+ req.resp_addr = rte_cpu_to_le_64(bp->hwrm_cmd_resp_dma_addr); \
+} while (0)
+
+#define HWRM_CHECK_RESULT() do {\
+ if (rc) { \
+ RTE_LOG(ERR, PMD, "%s failed rc:%d\n", \
+ __func__, rc); \
+ rte_spinlock_unlock(&bp->hwrm_lock); \
+ return rc; \
+ } \
+ if (resp->error_code) { \
+ rc = rte_le_to_cpu_16(resp->error_code); \
+ if (resp->resp_len >= 16) { \
+ struct hwrm_err_output *tmp_hwrm_err_op = \
+ (void *)resp; \
+ RTE_LOG(ERR, PMD, \
+ "%s error %d:%d:%08x:%04x\n", \
+ __func__, \
+ rc, tmp_hwrm_err_op->cmd_err, \
+ rte_le_to_cpu_32(\
+ tmp_hwrm_err_op->opaque_0), \
+ rte_le_to_cpu_16(\
+ tmp_hwrm_err_op->opaque_1)); \
} \
- if (resp->error_code) { \
- rc = rte_le_to_cpu_16(resp->error_code); \
- if (resp->resp_len >= 16) { \
- struct hwrm_err_output *tmp_hwrm_err_op = \
- (void *)resp; \
- RTE_LOG(ERR, PMD, \
- "%s error %d:%d:%08x:%04x\n", \
- __func__, \
- rc, tmp_hwrm_err_op->cmd_err, \
- rte_le_to_cpu_32(\
- tmp_hwrm_err_op->opaque_0), \
- rte_le_to_cpu_16(\
- tmp_hwrm_err_op->opaque_1)); \
- } \
- else { \
- RTE_LOG(ERR, PMD, \
- "%s error %d\n", __func__, rc); \
- } \
- return rc; \
+ else { \
+ RTE_LOG(ERR, PMD, \
+ "%s error %d\n", __func__, rc); \
} \
- }
+ rte_spinlock_unlock(&bp->hwrm_lock); \
+ return rc; \
+ } \
+} while (0)
+
+#define HWRM_UNLOCK() rte_spinlock_unlock(&bp->hwrm_lock)
int bnxt_hwrm_cfa_l2_clear_rx_mask(struct bnxt *bp, struct bnxt_vnic_info *vnic)
{
@@ -224,13 +230,14 @@ int bnxt_hwrm_cfa_l2_clear_rx_mask(struct bnxt *bp, struct bnxt_vnic_info *vnic)
struct hwrm_cfa_l2_set_rx_mask_input req = {.req_type = 0 };
struct hwrm_cfa_l2_set_rx_mask_output *resp = bp->hwrm_cmd_resp_addr;
- HWRM_PREP(req, CFA_L2_SET_RX_MASK, -1, resp);
+ HWRM_PREP(req, CFA_L2_SET_RX_MASK);
req.vnic_id = rte_cpu_to_le_16(vnic->fw_vnic_id);
req.mask = 0;
rc = bnxt_hwrm_send_message(bp, &req, sizeof(req));
- HWRM_CHECK_RESULT;
+ HWRM_CHECK_RESULT();
+ HWRM_UNLOCK();
return rc;
}
@@ -245,7 +252,7 @@ int bnxt_hwrm_cfa_l2_set_rx_mask(struct bnxt *bp,
struct hwrm_cfa_l2_set_rx_mask_output *resp = bp->hwrm_cmd_resp_addr;
uint32_t mask = 0;
- HWRM_PREP(req, CFA_L2_SET_RX_MASK, -1, resp);
+ HWRM_PREP(req, CFA_L2_SET_RX_MASK);
req.vnic_id = rte_cpu_to_le_16(vnic->fw_vnic_id);
/* FIXME add multicast flag, when multicast adding options is supported
@@ -278,7 +285,8 @@ int bnxt_hwrm_cfa_l2_set_rx_mask(struct bnxt *bp,
rc = bnxt_hwrm_send_message(bp, &req, sizeof(req));
- HWRM_CHECK_RESULT;
+ HWRM_CHECK_RESULT();
+ HWRM_UNLOCK();
return rc;
}
@@ -307,7 +315,7 @@ int bnxt_hwrm_cfa_vlan_antispoof_cfg(struct bnxt *bp, uint16_t fid,
return 0;
}
}
- HWRM_PREP(req, CFA_VLAN_ANTISPOOF_CFG, -1, resp);
+ HWRM_PREP(req, CFA_VLAN_ANTISPOOF_CFG);
req.fid = rte_cpu_to_le_16(fid);
req.vlan_tag_mask_tbl_addr =
@@ -316,7 +324,8 @@ int bnxt_hwrm_cfa_vlan_antispoof_cfg(struct bnxt *bp, uint16_t fid,
rc = bnxt_hwrm_send_message(bp, &req, sizeof(req));
- HWRM_CHECK_RESULT;
+ HWRM_CHECK_RESULT();
+ HWRM_UNLOCK();
return rc;
}
@@ -331,13 +340,14 @@ int bnxt_hwrm_clear_filter(struct bnxt *bp,
if (filter->fw_l2_filter_id == UINT64_MAX)
return 0;
- HWRM_PREP(req, CFA_L2_FILTER_FREE, -1, resp);
+ HWRM_PREP(req, CFA_L2_FILTER_FREE);
req.l2_filter_id = rte_cpu_to_le_64(filter->fw_l2_filter_id);
rc = bnxt_hwrm_send_message(bp, &req, sizeof(req));
- HWRM_CHECK_RESULT;
+ HWRM_CHECK_RESULT();
+ HWRM_UNLOCK();
filter->fw_l2_filter_id = -1;
@@ -356,7 +366,7 @@ int bnxt_hwrm_set_filter(struct bnxt *bp,
if (filter->fw_l2_filter_id != UINT64_MAX)
bnxt_hwrm_clear_filter(bp, filter);
- HWRM_PREP(req, CFA_L2_FILTER_ALLOC, -1, resp);
+ HWRM_PREP(req, CFA_L2_FILTER_ALLOC);
req.flags = rte_cpu_to_le_32(filter->flags);
@@ -387,9 +397,10 @@ int bnxt_hwrm_set_filter(struct bnxt *bp,
rc = bnxt_hwrm_send_message(bp, &req, sizeof(req));
- HWRM_CHECK_RESULT;
+ HWRM_CHECK_RESULT();
filter->fw_l2_filter_id = rte_le_to_cpu_64(resp->l2_filter_id);
+ HWRM_UNLOCK();
return rc;
}
@@ -402,13 +413,13 @@ int bnxt_hwrm_func_qcaps(struct bnxt *bp)
uint16_t new_max_vfs;
int i;
- HWRM_PREP(req, FUNC_QCAPS, -1, resp);
+ HWRM_PREP(req, FUNC_QCAPS);
req.fid = rte_cpu_to_le_16(0xffff);
rc = bnxt_hwrm_send_message(bp, &req, sizeof(req));
- HWRM_CHECK_RESULT;
+ HWRM_CHECK_RESULT();
bp->max_ring_grps = rte_le_to_cpu_32(resp->max_hw_ring_grps);
if (BNXT_PF(bp)) {
@@ -469,6 +480,7 @@ int bnxt_hwrm_func_qcaps(struct bnxt *bp)
bp->max_stat_ctx = rte_le_to_cpu_16(resp->max_stat_ctx);
if (BNXT_PF(bp))
bp->pf.total_vnics = rte_le_to_cpu_16(resp->max_vnics);
+ HWRM_UNLOCK();
return rc;
}
@@ -479,13 +491,14 @@ int bnxt_hwrm_func_reset(struct bnxt *bp)
struct hwrm_func_reset_input req = {.req_type = 0 };
struct hwrm_func_reset_output *resp = bp->hwrm_cmd_resp_addr;
- HWRM_PREP(req, FUNC_RESET, -1, resp);
+ HWRM_PREP(req, FUNC_RESET);
req.enables = rte_cpu_to_le_32(0);
rc = bnxt_hwrm_send_message(bp, &req, sizeof(req));
- HWRM_CHECK_RESULT;
+ HWRM_CHECK_RESULT();
+ HWRM_UNLOCK();
return rc;
}
@@ -499,7 +512,7 @@ int bnxt_hwrm_func_driver_register(struct bnxt *bp)
if (bp->flags & BNXT_FLAG_REGISTERED)
return 0;
- HWRM_PREP(req, FUNC_DRV_RGTR, -1, resp);
+ HWRM_PREP(req, FUNC_DRV_RGTR);
req.enables = rte_cpu_to_le_32(HWRM_FUNC_DRV_RGTR_INPUT_ENABLES_VER |
HWRM_FUNC_DRV_RGTR_INPUT_ENABLES_ASYNC_EVENT_FWD);
req.ver_maj = RTE_VER_YEAR;
@@ -519,7 +532,8 @@ int bnxt_hwrm_func_driver_register(struct bnxt *bp)
rc = bnxt_hwrm_send_message(bp, &req, sizeof(req));
- HWRM_CHECK_RESULT;
+ HWRM_CHECK_RESULT();
+ HWRM_UNLOCK();
bp->flags |= BNXT_FLAG_REGISTERED;
@@ -538,19 +552,15 @@ int bnxt_hwrm_ver_get(struct bnxt *bp)
uint32_t dev_caps_cfg;
bp->max_req_len = HWRM_MAX_REQ_LEN;
- HWRM_PREP(req, VER_GET, -1, resp);
+ HWRM_PREP(req, VER_GET);
req.hwrm_intf_maj = HWRM_VERSION_MAJOR;
req.hwrm_intf_min = HWRM_VERSION_MINOR;
req.hwrm_intf_upd = HWRM_VERSION_UPDATE;
- /*
- * Hold the lock since we may be adjusting the response pointers.
- */
- rte_spinlock_lock(&bp->hwrm_lock);
- rc = bnxt_hwrm_send_message_locked(bp, &req, sizeof(req));
+ rc = bnxt_hwrm_send_message(bp, &req, sizeof(req));
- HWRM_CHECK_RESULT;
+ HWRM_CHECK_RESULT();
RTE_LOG(INFO, PMD, "%d.%d.%d:%d.%d.%d\n",
resp->hwrm_intf_maj, resp->hwrm_intf_min,
@@ -651,7 +661,7 @@ int bnxt_hwrm_ver_get(struct bnxt *bp)
}
error:
- rte_spinlock_unlock(&bp->hwrm_lock);
+ HWRM_UNLOCK();
return rc;
}
@@ -664,12 +674,13 @@ int bnxt_hwrm_func_driver_unregister(struct bnxt *bp, uint32_t flags)
if (!(bp->flags & BNXT_FLAG_REGISTERED))
return 0;
- HWRM_PREP(req, FUNC_DRV_UNRGTR, -1, resp);
+ HWRM_PREP(req, FUNC_DRV_UNRGTR);
req.flags = flags;
rc = bnxt_hwrm_send_message(bp, &req, sizeof(req));
- HWRM_CHECK_RESULT;
+ HWRM_CHECK_RESULT();
+ HWRM_UNLOCK();
bp->flags &= ~BNXT_FLAG_REGISTERED;
@@ -685,7 +696,7 @@ static int bnxt_hwrm_port_phy_cfg(struct bnxt *bp, struct bnxt_link_info *conf)
uint32_t link_speed_mask =
HWRM_PORT_PHY_CFG_INPUT_ENABLES_AUTO_LINK_SPEED_MASK;
- HWRM_PREP(req, PORT_PHY_CFG, -1, resp);
+ HWRM_PREP(req, PORT_PHY_CFG);
if (conf->link_up) {
req.flags = rte_cpu_to_le_32(conf->phy_flags);
@@ -729,7 +740,8 @@ static int bnxt_hwrm_port_phy_cfg(struct bnxt *bp, struct bnxt_link_info *conf)
rc = bnxt_hwrm_send_message(bp, &req, sizeof(req));
- HWRM_CHECK_RESULT;
+ HWRM_CHECK_RESULT();
+ HWRM_UNLOCK();
return rc;
}
@@ -741,11 +753,11 @@ static int bnxt_hwrm_port_phy_qcfg(struct bnxt *bp,
struct hwrm_port_phy_qcfg_input req = {0};
struct hwrm_port_phy_qcfg_output *resp = bp->hwrm_cmd_resp_addr;
- HWRM_PREP(req, PORT_PHY_QCFG, -1, resp);
+ HWRM_PREP(req, PORT_PHY_QCFG);
rc = bnxt_hwrm_send_message(bp, &req, sizeof(req));
- HWRM_CHECK_RESULT;
+ HWRM_CHECK_RESULT();
link_info->phy_link_status = resp->link;
link_info->link_up =
@@ -765,6 +777,8 @@ static int bnxt_hwrm_port_phy_qcfg(struct bnxt *bp,
link_info->phy_ver[1] = resp->phy_min;
link_info->phy_ver[2] = resp->phy_bld;
+ HWRM_UNLOCK();
+
return rc;
}
@@ -774,11 +788,11 @@ int bnxt_hwrm_queue_qportcfg(struct bnxt *bp)
struct hwrm_queue_qportcfg_input req = {.req_type = 0 };
struct hwrm_queue_qportcfg_output *resp = bp->hwrm_cmd_resp_addr;
- HWRM_PREP(req, QUEUE_QPORTCFG, -1, resp);
+ HWRM_PREP(req, QUEUE_QPORTCFG);
rc = bnxt_hwrm_send_message(bp, &req, sizeof(req));
- HWRM_CHECK_RESULT;
+ HWRM_CHECK_RESULT();
#define GET_QUEUE_INFO(x) \
bp->cos_queue[x].id = resp->queue_id##x; \
@@ -793,6 +807,8 @@ int bnxt_hwrm_queue_qportcfg(struct bnxt *bp)
GET_QUEUE_INFO(6);
GET_QUEUE_INFO(7);
+ HWRM_UNLOCK();
+
return rc;
}
@@ -806,7 +822,7 @@ int bnxt_hwrm_ring_alloc(struct bnxt *bp,
struct hwrm_ring_alloc_input req = {.req_type = 0 };
struct hwrm_ring_alloc_output *resp = bp->hwrm_cmd_resp_addr;
- HWRM_PREP(req, RING_ALLOC, -1, resp);
+ HWRM_PREP(req, RING_ALLOC);
req.page_tbl_addr = rte_cpu_to_le_64(ring->bd_dma);
req.fbo = rte_cpu_to_le_32(0);
@@ -837,6 +853,7 @@ int bnxt_hwrm_ring_alloc(struct bnxt *bp,
default:
RTE_LOG(ERR, PMD, "hwrm alloc invalid ring type %d\n",
ring_type);
+ HWRM_UNLOCK();
return -1;
}
req.enables = rte_cpu_to_le_32(enables);
@@ -850,22 +867,27 @@ int bnxt_hwrm_ring_alloc(struct bnxt *bp,
case HWRM_RING_FREE_INPUT_RING_TYPE_L2_CMPL:
RTE_LOG(ERR, PMD,
"hwrm_ring_alloc cp failed. rc:%d\n", rc);
+ HWRM_UNLOCK();
return rc;
case HWRM_RING_FREE_INPUT_RING_TYPE_RX:
RTE_LOG(ERR, PMD,
"hwrm_ring_alloc rx failed. rc:%d\n", rc);
+ HWRM_UNLOCK();
return rc;
case HWRM_RING_FREE_INPUT_RING_TYPE_TX:
RTE_LOG(ERR, PMD,
"hwrm_ring_alloc tx failed. rc:%d\n", rc);
+ HWRM_UNLOCK();
return rc;
default:
RTE_LOG(ERR, PMD, "Invalid ring. rc:%d\n", rc);
+ HWRM_UNLOCK();
return rc;
}
}
ring->fw_ring_id = rte_le_to_cpu_16(resp->ring_id);
+ HWRM_UNLOCK();
return rc;
}
@@ -876,7 +898,7 @@ int bnxt_hwrm_ring_free(struct bnxt *bp,
struct hwrm_ring_free_input req = {.req_type = 0 };
struct hwrm_ring_free_output *resp = bp->hwrm_cmd_resp_addr;
- HWRM_PREP(req, RING_FREE, -1, resp);
+ HWRM_PREP(req, RING_FREE);
req.ring_type = ring_type;
req.ring_id = rte_cpu_to_le_16(ring->fw_ring_id);
@@ -886,6 +908,7 @@ int bnxt_hwrm_ring_free(struct bnxt *bp,
if (rc || resp->error_code) {
if (rc == 0 && resp->error_code)
rc = rte_le_to_cpu_16(resp->error_code);
+ HWRM_UNLOCK();
switch (ring_type) {
case HWRM_RING_FREE_INPUT_RING_TYPE_L2_CMPL:
@@ -905,6 +928,7 @@ int bnxt_hwrm_ring_free(struct bnxt *bp,
return rc;
}
}
+ HWRM_UNLOCK();
return 0;
}
@@ -914,7 +938,7 @@ int bnxt_hwrm_ring_grp_alloc(struct bnxt *bp, unsigned int idx)
struct hwrm_ring_grp_alloc_input req = {.req_type = 0 };
struct hwrm_ring_grp_alloc_output *resp = bp->hwrm_cmd_resp_addr;
- HWRM_PREP(req, RING_GRP_ALLOC, -1, resp);
+ HWRM_PREP(req, RING_GRP_ALLOC);
req.cr = rte_cpu_to_le_16(bp->grp_info[idx].cp_fw_ring_id);
req.rr = rte_cpu_to_le_16(bp->grp_info[idx].rx_fw_ring_id);
@@ -923,11 +947,13 @@ int bnxt_hwrm_ring_grp_alloc(struct bnxt *bp, unsigned int idx)
rc = bnxt_hwrm_send_message(bp, &req, sizeof(req));
- HWRM_CHECK_RESULT;
+ HWRM_CHECK_RESULT();
bp->grp_info[idx].fw_grp_id =
rte_le_to_cpu_16(resp->ring_group_id);
+ HWRM_UNLOCK();
+
return rc;
}
@@ -937,13 +963,14 @@ int bnxt_hwrm_ring_grp_free(struct bnxt *bp, unsigned int idx)
struct hwrm_ring_grp_free_input req = {.req_type = 0 };
struct hwrm_ring_grp_free_output *resp = bp->hwrm_cmd_resp_addr;
- HWRM_PREP(req, RING_GRP_FREE, -1, resp);
+ HWRM_PREP(req, RING_GRP_FREE);
req.ring_group_id = rte_cpu_to_le_16(bp->grp_info[idx].fw_grp_id);
rc = bnxt_hwrm_send_message(bp, &req, sizeof(req));
- HWRM_CHECK_RESULT;
+ HWRM_CHECK_RESULT();
+ HWRM_UNLOCK();
bp->grp_info[idx].fw_grp_id = INVALID_HW_RING_ID;
return rc;
@@ -958,13 +985,14 @@ int bnxt_hwrm_stat_clear(struct bnxt *bp, struct bnxt_cp_ring_info *cpr)
if (cpr->hw_stats_ctx_id == (uint32_t)HWRM_NA_SIGNATURE)
return rc;
- HWRM_PREP(req, STAT_CTX_CLR_STATS, -1, resp);
+ HWRM_PREP(req, STAT_CTX_CLR_STATS);
req.stat_ctx_id = rte_cpu_to_le_16(cpr->hw_stats_ctx_id);
rc = bnxt_hwrm_send_message(bp, &req, sizeof(req));
- HWRM_CHECK_RESULT;
+ HWRM_CHECK_RESULT();
+ HWRM_UNLOCK();
return rc;
}
@@ -976,7 +1004,7 @@ int bnxt_hwrm_stat_ctx_alloc(struct bnxt *bp, struct bnxt_cp_ring_info *cpr,
struct hwrm_stat_ctx_alloc_input req = {.req_type = 0 };
struct hwrm_stat_ctx_alloc_output *resp = bp->hwrm_cmd_resp_addr;
- HWRM_PREP(req, STAT_CTX_ALLOC, -1, resp);
+ HWRM_PREP(req, STAT_CTX_ALLOC);
req.update_period_ms = rte_cpu_to_le_32(0);
@@ -985,10 +1013,12 @@ int bnxt_hwrm_stat_ctx_alloc(struct bnxt *bp, struct bnxt_cp_ring_info *cpr,
rc = bnxt_hwrm_send_message(bp, &req, sizeof(req));
- HWRM_CHECK_RESULT;
+ HWRM_CHECK_RESULT();
cpr->hw_stats_ctx_id = rte_le_to_cpu_16(resp->stat_ctx_id);
+ HWRM_UNLOCK();
+
return rc;
}
@@ -999,13 +1029,14 @@ int bnxt_hwrm_stat_ctx_free(struct bnxt *bp, struct bnxt_cp_ring_info *cpr,
struct hwrm_stat_ctx_free_input req = {.req_type = 0 };
struct hwrm_stat_ctx_free_output *resp = bp->hwrm_cmd_resp_addr;
- HWRM_PREP(req, STAT_CTX_FREE, -1, resp);
+ HWRM_PREP(req, STAT_CTX_FREE);
req.stat_ctx_id = rte_cpu_to_le_16(cpr->hw_stats_ctx_id);
rc = bnxt_hwrm_send_message(bp, &req, sizeof(req));
- HWRM_CHECK_RESULT;
+ HWRM_CHECK_RESULT();
+ HWRM_UNLOCK();
return rc;
}
@@ -1027,15 +1058,16 @@ int bnxt_hwrm_vnic_alloc(struct bnxt *bp, struct bnxt_vnic_info *vnic)
vnic->lb_rule = (uint16_t)HWRM_NA_SIGNATURE;
vnic->mru = bp->eth_dev->data->mtu + ETHER_HDR_LEN +
ETHER_CRC_LEN + VLAN_TAG_SIZE;
- HWRM_PREP(req, VNIC_ALLOC, -1, resp);
+ HWRM_PREP(req, VNIC_ALLOC);
if (vnic->func_default)
req.flags = HWRM_VNIC_ALLOC_INPUT_FLAGS_DEFAULT;
rc = bnxt_hwrm_send_message(bp, &req, sizeof(req));
- HWRM_CHECK_RESULT;
+ HWRM_CHECK_RESULT();
vnic->fw_vnic_id = rte_le_to_cpu_16(resp->vnic_id);
+ HWRM_UNLOCK();
RTE_LOG(DEBUG, PMD, "VNIC ID %x\n", vnic->fw_vnic_id);
return rc;
}
@@ -1048,13 +1080,13 @@ static int bnxt_hwrm_vnic_plcmodes_qcfg(struct bnxt *bp,
struct hwrm_vnic_plcmodes_qcfg_input req = {.req_type = 0 };
struct hwrm_vnic_plcmodes_qcfg_output *resp = bp->hwrm_cmd_resp_addr;
- HWRM_PREP(req, VNIC_PLCMODES_QCFG, -1, resp);
+ HWRM_PREP(req, VNIC_PLCMODES_QCFG);
req.vnic_id = rte_cpu_to_le_32(vnic->fw_vnic_id);
rc = bnxt_hwrm_send_message(bp, &req, sizeof(req));
- HWRM_CHECK_RESULT;
+ HWRM_CHECK_RESULT();
pmode->flags = rte_le_to_cpu_32(resp->flags);
/* dflt_vnic bit doesn't exist in the _cfg command */
@@ -1063,6 +1095,8 @@ static int bnxt_hwrm_vnic_plcmodes_qcfg(struct bnxt *bp,
pmode->hds_offset = rte_le_to_cpu_16(resp->hds_offset);
pmode->hds_threshold = rte_le_to_cpu_16(resp->hds_threshold);
+ HWRM_UNLOCK();
+
return rc;
}
@@ -1074,7 +1108,7 @@ static int bnxt_hwrm_vnic_plcmodes_cfg(struct bnxt *bp,
struct hwrm_vnic_plcmodes_cfg_input req = {.req_type = 0 };
struct hwrm_vnic_plcmodes_cfg_output *resp = bp->hwrm_cmd_resp_addr;
- HWRM_PREP(req, VNIC_PLCMODES_CFG, -1, resp);
+ HWRM_PREP(req, VNIC_PLCMODES_CFG);
req.vnic_id = rte_cpu_to_le_32(vnic->fw_vnic_id);
req.flags = rte_cpu_to_le_32(pmode->flags);
@@ -1089,7 +1123,8 @@ static int bnxt_hwrm_vnic_plcmodes_cfg(struct bnxt *bp,
rc = bnxt_hwrm_send_message(bp, &req, sizeof(req));
- HWRM_CHECK_RESULT;
+ HWRM_CHECK_RESULT();
+ HWRM_UNLOCK();
return rc;
}
@@ -1111,7 +1146,7 @@ int bnxt_hwrm_vnic_cfg(struct bnxt *bp, struct bnxt_vnic_info *vnic)
if (rc)
return rc;
- HWRM_PREP(req, VNIC_CFG, -1, resp);
+ HWRM_PREP(req, VNIC_CFG);
/* Only RSS support for now TBD: COS & LB */
req.enables =
@@ -1151,7 +1186,8 @@ int bnxt_hwrm_vnic_cfg(struct bnxt *bp, struct bnxt_vnic_info *vnic)
rc = bnxt_hwrm_send_message(bp, &req, sizeof(req));
- HWRM_CHECK_RESULT;
+ HWRM_CHECK_RESULT();
+ HWRM_UNLOCK();
rc = bnxt_hwrm_vnic_plcmodes_cfg(bp, vnic, &pmodes);
@@ -1169,7 +1205,7 @@ int bnxt_hwrm_vnic_qcfg(struct bnxt *bp, struct bnxt_vnic_info *vnic,
RTE_LOG(DEBUG, PMD, "VNIC QCFG ID %d\n", vnic->fw_vnic_id);
return rc;
}
- HWRM_PREP(req, VNIC_QCFG, -1, resp);
+ HWRM_PREP(req, VNIC_QCFG);
req.enables =
rte_cpu_to_le_32(HWRM_VNIC_QCFG_INPUT_ENABLES_VF_ID_VALID);
@@ -1178,7 +1214,7 @@ int bnxt_hwrm_vnic_qcfg(struct bnxt *bp, struct bnxt_vnic_info *vnic,
rc = bnxt_hwrm_send_message(bp, &req, sizeof(req));
- HWRM_CHECK_RESULT;
+ HWRM_CHECK_RESULT();
vnic->dflt_ring_grp = rte_le_to_cpu_16(resp->dflt_ring_grp);
vnic->rss_rule = rte_le_to_cpu_16(resp->rss_rule);
@@ -1198,6 +1234,8 @@ int bnxt_hwrm_vnic_qcfg(struct bnxt *bp, struct bnxt_vnic_info *vnic,
vnic->rss_dflt_cr = rte_le_to_cpu_32(resp->flags) &
HWRM_VNIC_QCFG_OUTPUT_FLAGS_RSS_DFLT_CR_MODE;
+ HWRM_UNLOCK();
+
return rc;
}
@@ -1208,13 +1246,14 @@ int bnxt_hwrm_vnic_ctx_alloc(struct bnxt *bp, struct bnxt_vnic_info *vnic)
struct hwrm_vnic_rss_cos_lb_ctx_alloc_output *resp =
bp->hwrm_cmd_resp_addr;
- HWRM_PREP(req, VNIC_RSS_COS_LB_CTX_ALLOC, -1, resp);
+ HWRM_PREP(req, VNIC_RSS_COS_LB_CTX_ALLOC);
rc = bnxt_hwrm_send_message(bp, &req, sizeof(req));
- HWRM_CHECK_RESULT;
+ HWRM_CHECK_RESULT();
vnic->rss_rule = rte_le_to_cpu_16(resp->rss_cos_lb_ctx_id);
+ HWRM_UNLOCK();
RTE_LOG(DEBUG, PMD, "VNIC RSS Rule %x\n", vnic->rss_rule);
return rc;
@@ -1231,13 +1270,14 @@ int bnxt_hwrm_vnic_ctx_free(struct bnxt *bp, struct bnxt_vnic_info *vnic)
RTE_LOG(DEBUG, PMD, "VNIC RSS Rule %x\n", vnic->rss_rule);
return rc;
}
- HWRM_PREP(req, VNIC_RSS_COS_LB_CTX_FREE, -1, resp);
+ HWRM_PREP(req, VNIC_RSS_COS_LB_CTX_FREE);
req.rss_cos_lb_ctx_id = rte_cpu_to_le_16(vnic->rss_rule);
rc = bnxt_hwrm_send_message(bp, &req, sizeof(req));
- HWRM_CHECK_RESULT;
+ HWRM_CHECK_RESULT();
+ HWRM_UNLOCK();
vnic->rss_rule = INVALID_HW_RING_ID;
@@ -1255,13 +1295,14 @@ int bnxt_hwrm_vnic_free(struct bnxt *bp, struct bnxt_vnic_info *vnic)
return rc;
}
- HWRM_PREP(req, VNIC_FREE, -1, resp);
+ HWRM_PREP(req, VNIC_FREE);
req.vnic_id = rte_cpu_to_le_16(vnic->fw_vnic_id);
rc = bnxt_hwrm_send_message(bp, &req, sizeof(req));
- HWRM_CHECK_RESULT;
+ HWRM_CHECK_RESULT();
+ HWRM_UNLOCK();
vnic->fw_vnic_id = INVALID_HW_RING_ID;
return rc;
@@ -1274,7 +1315,7 @@ int bnxt_hwrm_vnic_rss_cfg(struct bnxt *bp,
struct hwrm_vnic_rss_cfg_input req = {.req_type = 0 };
struct hwrm_vnic_rss_cfg_output *resp = bp->hwrm_cmd_resp_addr;
- HWRM_PREP(req, VNIC_RSS_CFG, -1, resp);
+ HWRM_PREP(req, VNIC_RSS_CFG);
req.hash_type = rte_cpu_to_le_32(vnic->hash_type);
@@ -1286,7 +1327,8 @@ int bnxt_hwrm_vnic_rss_cfg(struct bnxt *bp,
rc = bnxt_hwrm_send_message(bp, &req, sizeof(req));
- HWRM_CHECK_RESULT;
+ HWRM_CHECK_RESULT();
+ HWRM_UNLOCK();
return rc;
}
@@ -1299,7 +1341,7 @@ int bnxt_hwrm_vnic_plcmode_cfg(struct bnxt *bp,
struct hwrm_vnic_plcmodes_cfg_output *resp = bp->hwrm_cmd_resp_addr;
uint16_t size;
- HWRM_PREP(req, VNIC_PLCMODES_CFG, -1, resp);
+ HWRM_PREP(req, VNIC_PLCMODES_CFG);
req.flags = rte_cpu_to_le_32(
HWRM_VNIC_PLCMODES_CFG_INPUT_FLAGS_JUMBO_PLACEMENT);
@@ -1315,7 +1357,8 @@ int bnxt_hwrm_vnic_plcmode_cfg(struct bnxt *bp,
rc = bnxt_hwrm_send_message(bp, &req, sizeof(req));
- HWRM_CHECK_RESULT;
+ HWRM_CHECK_RESULT();
+ HWRM_UNLOCK();
return rc;
}
@@ -1327,7 +1370,7 @@ int bnxt_hwrm_vnic_tpa_cfg(struct bnxt *bp,
struct hwrm_vnic_tpa_cfg_input req = {.req_type = 0 };
struct hwrm_vnic_tpa_cfg_output *resp = bp->hwrm_cmd_resp_addr;
- HWRM_PREP(req, VNIC_TPA_CFG, -1, resp);
+ HWRM_PREP(req, VNIC_TPA_CFG);
if (enable) {
req.enables = rte_cpu_to_le_32(
@@ -1350,7 +1393,8 @@ int bnxt_hwrm_vnic_tpa_cfg(struct bnxt *bp,
rc = bnxt_hwrm_send_message(bp, &req, sizeof(req));
- HWRM_CHECK_RESULT;
+ HWRM_CHECK_RESULT();
+ HWRM_UNLOCK();
return rc;
}
@@ -1367,10 +1411,11 @@ int bnxt_hwrm_func_vf_mac(struct bnxt *bp, uint16_t vf, const uint8_t *mac_addr)
memcpy(req.dflt_mac_addr, mac_addr, sizeof(req.dflt_mac_addr));
req.fid = rte_cpu_to_le_16(bp->pf.vf_info[vf].fid);
- HWRM_PREP(req, FUNC_CFG, -1, resp);
+ HWRM_PREP(req, FUNC_CFG);
rc = bnxt_hwrm_send_message(bp, &req, sizeof(req));
- HWRM_CHECK_RESULT;
+ HWRM_CHECK_RESULT();
+ HWRM_UNLOCK();
bp->pf.vf_info[vf].random_mac = false;
@@ -1384,17 +1429,19 @@ int bnxt_hwrm_func_qstats_tx_drop(struct bnxt *bp, uint16_t fid,
struct hwrm_func_qstats_input req = {.req_type = 0};
struct hwrm_func_qstats_output *resp = bp->hwrm_cmd_resp_addr;
- HWRM_PREP(req, FUNC_QSTATS, -1, resp);
+ HWRM_PREP(req, FUNC_QSTATS);
req.fid = rte_cpu_to_le_16(fid);
rc = bnxt_hwrm_send_message(bp, &req, sizeof(req));
- HWRM_CHECK_RESULT;
+ HWRM_CHECK_RESULT();
if (dropped)
*dropped = rte_le_to_cpu_64(resp->tx_drop_pkts);
+ HWRM_UNLOCK();
+
return rc;
}
@@ -1405,13 +1452,13 @@ int bnxt_hwrm_func_qstats(struct bnxt *bp, uint16_t fid,
struct hwrm_func_qstats_input req = {.req_type = 0};
struct hwrm_func_qstats_output *resp = bp->hwrm_cmd_resp_addr;
- HWRM_PREP(req, FUNC_QSTATS, -1, resp);
+ HWRM_PREP(req, FUNC_QSTATS);
req.fid = rte_cpu_to_le_16(fid);
rc = bnxt_hwrm_send_message(bp, &req, sizeof(req));
- HWRM_CHECK_RESULT;
+ HWRM_CHECK_RESULT();
stats->ipackets = rte_le_to_cpu_64(resp->rx_ucast_pkts);
stats->ipackets += rte_le_to_cpu_64(resp->rx_mcast_pkts);
@@ -1432,6 +1479,8 @@ int bnxt_hwrm_func_qstats(struct bnxt *bp, uint16_t fid,
stats->imissed = rte_le_to_cpu_64(resp->rx_drop_pkts);
+ HWRM_UNLOCK();
+
return rc;
}
@@ -1441,13 +1490,14 @@ int bnxt_hwrm_func_clr_stats(struct bnxt *bp, uint16_t fid)
struct hwrm_func_clr_stats_input req = {.req_type = 0};
struct hwrm_func_clr_stats_output *resp = bp->hwrm_cmd_resp_addr;
- HWRM_PREP(req, FUNC_CLR_STATS, -1, resp);
+ HWRM_PREP(req, FUNC_CLR_STATS);
req.fid = rte_cpu_to_le_16(fid);
rc = bnxt_hwrm_send_message(bp, &req, sizeof(req));
- HWRM_CHECK_RESULT;
+ HWRM_CHECK_RESULT();
+ HWRM_UNLOCK();
return rc;
}
@@ -2038,12 +2088,12 @@ int bnxt_hwrm_func_qcfg(struct bnxt *bp)
struct hwrm_func_qcfg_output *resp = bp->hwrm_cmd_resp_addr;
int rc = 0;
- HWRM_PREP(req, FUNC_QCFG, -1, resp);
+ HWRM_PREP(req, FUNC_QCFG);
req.fid = rte_cpu_to_le_16(0xffff);
rc = bnxt_hwrm_send_message(bp, &req, sizeof(req));
- HWRM_CHECK_RESULT;
+ HWRM_CHECK_RESULT();
/* Hard Coded.. 0xfff VLAN ID mask */
bp->vlan = rte_le_to_cpu_16(resp->vlan) & 0xfff;
@@ -2059,6 +2109,8 @@ int bnxt_hwrm_func_qcfg(struct bnxt *bp)
break;
}
+ HWRM_UNLOCK();
+
return rc;
}
@@ -2118,10 +2170,12 @@ static int bnxt_hwrm_pf_func_cfg(struct bnxt *bp, int tx_rings)
req.num_hw_ring_grps = rte_cpu_to_le_16(bp->max_ring_grps);
req.fid = rte_cpu_to_le_16(0xffff);
- HWRM_PREP(req, FUNC_CFG, -1, resp);
+ HWRM_PREP(req, FUNC_CFG);
rc = bnxt_hwrm_send_message(bp, &req, sizeof(req));
- HWRM_CHECK_RESULT;
+
+ HWRM_CHECK_RESULT();
+ HWRM_UNLOCK();
return rc;
}
@@ -2187,7 +2241,7 @@ static void reserve_resources_from_vf(struct bnxt *bp,
int rc;
/* Get the actual allocated values now */
- HWRM_PREP(req, FUNC_QCAPS, -1, resp);
+ HWRM_PREP(req, FUNC_QCAPS);
req.fid = rte_cpu_to_le_16(bp->pf.vf_info[vf].fid);
rc = bnxt_hwrm_send_message(bp, &req, sizeof(req));
@@ -2212,6 +2266,8 @@ static void reserve_resources_from_vf(struct bnxt *bp,
*/
//bp->max_vnics -= rte_le_to_cpu_16(esp->max_vnics);
bp->max_ring_grps -= rte_le_to_cpu_16(resp->max_hw_ring_grps);
+
+ HWRM_UNLOCK();
}
int bnxt_hwrm_func_qcfg_current_vf_vlan(struct bnxt *bp, int vf)
@@ -2221,7 +2277,7 @@ int bnxt_hwrm_func_qcfg_current_vf_vlan(struct bnxt *bp, int vf)
int rc;
/* Check for zero MAC address */
- HWRM_PREP(req, FUNC_QCFG, -1, resp);
+ HWRM_PREP(req, FUNC_QCFG);
req.fid = rte_cpu_to_le_16(bp->pf.vf_info[vf].fid);
rc = bnxt_hwrm_send_message(bp, &req, sizeof(req));
if (rc) {
@@ -2232,7 +2288,11 @@ int bnxt_hwrm_func_qcfg_current_vf_vlan(struct bnxt *bp, int vf)
RTE_LOG(ERR, PMD, "hwrm_func_qcfg error %d\n", rc);
return -1;
}
- return rte_le_to_cpu_16(resp->vlan);
+ rc = rte_le_to_cpu_16(resp->vlan);
+
+ HWRM_UNLOCK();
+
+ return rc;
}
static int update_pf_resource_max(struct bnxt *bp)
@@ -2242,15 +2302,17 @@ static int update_pf_resource_max(struct bnxt *bp)
int rc;
/* And copy the allocated numbers into the pf struct */
- HWRM_PREP(req, FUNC_QCFG, -1, resp);
+ HWRM_PREP(req, FUNC_QCFG);
req.fid = rte_cpu_to_le_16(0xffff);
rc = bnxt_hwrm_send_message(bp, &req, sizeof(req));
- HWRM_CHECK_RESULT;
+ HWRM_CHECK_RESULT();
/* Only TX ring value reflects actual allocation? TODO */
bp->max_tx_rings = rte_le_to_cpu_16(resp->alloc_tx_rings);
bp->pf.evb_mode = resp->evb_mode;
+ HWRM_UNLOCK();
+
return rc;
}
@@ -2342,7 +2404,7 @@ int bnxt_hwrm_allocate_vfs(struct bnxt *bp, int num_vfs)
for (i = 0; i < num_vfs; i++) {
add_random_mac_if_needed(bp, &req, i);
- HWRM_PREP(req, FUNC_CFG, -1, resp);
+ HWRM_PREP(req, FUNC_CFG);
req.flags = rte_cpu_to_le_32(bp->pf.vf_info[i].func_cfg_flags);
req.fid = rte_cpu_to_le_16(bp->pf.vf_info[i].fid);
rc = bnxt_hwrm_send_message(bp, &req, sizeof(req));
@@ -2357,9 +2419,12 @@ int bnxt_hwrm_allocate_vfs(struct bnxt *bp, int num_vfs)
RTE_LOG(ERR, PMD,
"Not all VFs available. (%d, %d)\n",
rc, resp->error_code);
+ HWRM_UNLOCK();
break;
}
+ HWRM_UNLOCK();
+
reserve_resources_from_vf(bp, &req, i);
bp->pf.active_vfs++;
bnxt_hwrm_func_clr_stats(bp, bp->pf.vf_info[i].fid);
@@ -2392,14 +2457,15 @@ int bnxt_hwrm_pf_evb_mode(struct bnxt *bp)
struct hwrm_func_cfg_output *resp = bp->hwrm_cmd_resp_addr;
int rc;
- HWRM_PREP(req, FUNC_CFG, -1, resp);
+ HWRM_PREP(req, FUNC_CFG);
req.fid = rte_cpu_to_le_16(0xffff);
req.enables = rte_cpu_to_le_32(HWRM_FUNC_CFG_INPUT_ENABLES_EVB_MODE);
req.evb_mode = bp->pf.evb_mode;
rc = bnxt_hwrm_send_message(bp, &req, sizeof(req));
- HWRM_CHECK_RESULT;
+ HWRM_CHECK_RESULT();
+ HWRM_UNLOCK();
return rc;
}
@@ -2411,11 +2477,11 @@ int bnxt_hwrm_tunnel_dst_port_alloc(struct bnxt *bp, uint16_t port,
struct hwrm_tunnel_dst_port_alloc_output *resp = bp->hwrm_cmd_resp_addr;
int rc = 0;
- HWRM_PREP(req, TUNNEL_DST_PORT_ALLOC, -1, resp);
+ HWRM_PREP(req, TUNNEL_DST_PORT_ALLOC);
req.tunnel_type = tunnel_type;
req.tunnel_dst_port_val = port;
rc = bnxt_hwrm_send_message(bp, &req, sizeof(req));
- HWRM_CHECK_RESULT;
+ HWRM_CHECK_RESULT();
switch (tunnel_type) {
case HWRM_TUNNEL_DST_PORT_ALLOC_INPUT_TUNNEL_TYPE_VXLAN:
@@ -2429,6 +2495,9 @@ int bnxt_hwrm_tunnel_dst_port_alloc(struct bnxt *bp, uint16_t port,
default:
break;
}
+
+ HWRM_UNLOCK();
+
return rc;
}
@@ -2439,11 +2508,14 @@ int bnxt_hwrm_tunnel_dst_port_free(struct bnxt *bp, uint16_t port,
struct hwrm_tunnel_dst_port_free_output *resp = bp->hwrm_cmd_resp_addr;
int rc = 0;
- HWRM_PREP(req, TUNNEL_DST_PORT_FREE, -1, resp);
+ HWRM_PREP(req, TUNNEL_DST_PORT_FREE);
+
req.tunnel_type = tunnel_type;
req.tunnel_dst_port_id = rte_cpu_to_be_16(port);
rc = bnxt_hwrm_send_message(bp, &req, sizeof(req));
- HWRM_CHECK_RESULT;
+
+ HWRM_CHECK_RESULT();
+ HWRM_UNLOCK();
return rc;
}
@@ -2455,11 +2527,14 @@ int bnxt_hwrm_func_cfg_vf_set_flags(struct bnxt *bp, uint16_t vf,
struct hwrm_func_cfg_input req = {0};
int rc;
- HWRM_PREP(req, FUNC_CFG, -1, resp);
+ HWRM_PREP(req, FUNC_CFG);
+
req.fid = rte_cpu_to_le_16(bp->pf.vf_info[vf].fid);
req.flags = rte_cpu_to_le_32(flags);
rc = bnxt_hwrm_send_message(bp, &req, sizeof(req));
- HWRM_CHECK_RESULT;
+
+ HWRM_CHECK_RESULT();
+ HWRM_UNLOCK();
return rc;
}
@@ -2482,7 +2557,7 @@ int bnxt_hwrm_func_buf_rgtr(struct bnxt *bp)
struct hwrm_func_buf_rgtr_input req = {.req_type = 0 };
struct hwrm_func_buf_rgtr_output *resp = bp->hwrm_cmd_resp_addr;
- HWRM_PREP(req, FUNC_BUF_RGTR, -1, resp);
+ HWRM_PREP(req, FUNC_BUF_RGTR);
req.req_buf_num_pages = rte_cpu_to_le_16(1);
req.req_buf_page_size = rte_cpu_to_le_16(
@@ -2498,7 +2573,8 @@ int bnxt_hwrm_func_buf_rgtr(struct bnxt *bp)
rc = bnxt_hwrm_send_message(bp, &req, sizeof(req));
- HWRM_CHECK_RESULT;
+ HWRM_CHECK_RESULT();
+ HWRM_UNLOCK();
return rc;
}
@@ -2509,11 +2585,12 @@ int bnxt_hwrm_func_buf_unrgtr(struct bnxt *bp)
struct hwrm_func_buf_unrgtr_input req = {.req_type = 0 };
struct hwrm_func_buf_unrgtr_output *resp = bp->hwrm_cmd_resp_addr;
- HWRM_PREP(req, FUNC_BUF_UNRGTR, -1, resp);
+ HWRM_PREP(req, FUNC_BUF_UNRGTR);
rc = bnxt_hwrm_send_message(bp, &req, sizeof(req));
- HWRM_CHECK_RESULT;
+ HWRM_CHECK_RESULT();
+ HWRM_UNLOCK();
return rc;
}
@@ -2524,7 +2601,8 @@ int bnxt_hwrm_func_cfg_def_cp(struct bnxt *bp)
struct hwrm_func_cfg_input req = {0};
int rc;
- HWRM_PREP(req, FUNC_CFG, -1, resp);
+ HWRM_PREP(req, FUNC_CFG);
+
req.fid = rte_cpu_to_le_16(0xffff);
req.flags = rte_cpu_to_le_32(bp->pf.func_cfg_flags);
req.enables = rte_cpu_to_le_32(
@@ -2532,7 +2610,9 @@ int bnxt_hwrm_func_cfg_def_cp(struct bnxt *bp)
req.async_event_cr = rte_cpu_to_le_16(
bp->def_cp_ring->cp_ring_struct->fw_ring_id);
rc = bnxt_hwrm_send_message(bp, &req, sizeof(req));
- HWRM_CHECK_RESULT;
+
+ HWRM_CHECK_RESULT();
+ HWRM_UNLOCK();
return rc;
}
@@ -2543,13 +2623,16 @@ int bnxt_hwrm_vf_func_cfg_def_cp(struct bnxt *bp)
struct hwrm_func_vf_cfg_input req = {0};
int rc;
- HWRM_PREP(req, FUNC_VF_CFG, -1, resp);
+ HWRM_PREP(req, FUNC_VF_CFG);
+
req.enables = rte_cpu_to_le_32(
HWRM_FUNC_CFG_INPUT_ENABLES_ASYNC_EVENT_CR);
req.async_event_cr = rte_cpu_to_le_16(
bp->def_cp_ring->cp_ring_struct->fw_ring_id);
rc = bnxt_hwrm_send_message(bp, &req, sizeof(req));
- HWRM_CHECK_RESULT;
+
+ HWRM_CHECK_RESULT();
+ HWRM_UNLOCK();
return rc;
}
@@ -2562,7 +2645,7 @@ int bnxt_hwrm_set_default_vlan(struct bnxt *bp, int vf, uint8_t is_vf)
uint32_t func_cfg_flags;
int rc = 0;
- HWRM_PREP(req, FUNC_CFG, -1, resp);
+ HWRM_PREP(req, FUNC_CFG);
if (is_vf) {
dflt_vlan = bp->pf.vf_info[vf].dflt_vlan;
@@ -2580,7 +2663,9 @@ int bnxt_hwrm_set_default_vlan(struct bnxt *bp, int vf, uint8_t is_vf)
req.dflt_vlan = rte_cpu_to_le_16(dflt_vlan);
rc = bnxt_hwrm_send_message(bp, &req, sizeof(req));
- HWRM_CHECK_RESULT;
+
+ HWRM_CHECK_RESULT();
+ HWRM_UNLOCK();
return rc;
}
@@ -2592,13 +2677,16 @@ int bnxt_hwrm_func_bw_cfg(struct bnxt *bp, uint16_t vf,
struct hwrm_func_cfg_input req = {0};
int rc;
- HWRM_PREP(req, FUNC_CFG, -1, resp);
+ HWRM_PREP(req, FUNC_CFG);
+
req.fid = rte_cpu_to_le_16(bp->pf.vf_info[vf].fid);
req.enables |= rte_cpu_to_le_32(enables);
req.flags = rte_cpu_to_le_32(bp->pf.vf_info[vf].func_cfg_flags);
req.max_bw = rte_cpu_to_le_32(max_bw);
rc = bnxt_hwrm_send_message(bp, &req, sizeof(req));
- HWRM_CHECK_RESULT;
+
+ HWRM_CHECK_RESULT();
+ HWRM_UNLOCK();
return rc;
}
@@ -2609,14 +2697,17 @@ int bnxt_hwrm_set_vf_vlan(struct bnxt *bp, int vf)
struct hwrm_func_cfg_output *resp = bp->hwrm_cmd_resp_addr;
int rc = 0;
- HWRM_PREP(req, FUNC_CFG, -1, resp);
+ HWRM_PREP(req, FUNC_CFG);
+
req.flags = rte_cpu_to_le_32(bp->pf.vf_info[vf].func_cfg_flags);
req.fid = rte_cpu_to_le_16(bp->pf.vf_info[vf].fid);
req.enables |= rte_cpu_to_le_32(HWRM_FUNC_CFG_INPUT_ENABLES_DFLT_VLAN);
req.dflt_vlan = rte_cpu_to_le_16(bp->pf.vf_info[vf].dflt_vlan);
rc = bnxt_hwrm_send_message(bp, &req, sizeof(req));
- HWRM_CHECK_RESULT;
+
+ HWRM_CHECK_RESULT();
+ HWRM_UNLOCK();
return rc;
}
@@ -2631,14 +2722,15 @@ int bnxt_hwrm_reject_fwd_resp(struct bnxt *bp, uint16_t target_id,
if (ec_size > sizeof(req.encap_request))
return -1;
- HWRM_PREP(req, REJECT_FWD_RESP, -1, resp);
+ HWRM_PREP(req, REJECT_FWD_RESP);
req.encap_resp_target_id = rte_cpu_to_le_16(target_id);
memcpy(req.encap_request, encaped, ec_size);
rc = bnxt_hwrm_send_message(bp, &req, sizeof(req));
- HWRM_CHECK_RESULT;
+ HWRM_CHECK_RESULT();
+ HWRM_UNLOCK();
return rc;
}
@@ -2650,13 +2742,17 @@ int bnxt_hwrm_func_qcfg_vf_default_mac(struct bnxt *bp, uint16_t vf,
struct hwrm_func_qcfg_output *resp = bp->hwrm_cmd_resp_addr;
int rc;
- HWRM_PREP(req, FUNC_QCFG, -1, resp);
+ HWRM_PREP(req, FUNC_QCFG);
+
req.fid = rte_cpu_to_le_16(bp->pf.vf_info[vf].fid);
rc = bnxt_hwrm_send_message(bp, &req, sizeof(req));
- HWRM_CHECK_RESULT;
+ HWRM_CHECK_RESULT();
memcpy(mac->addr_bytes, resp->mac_address, ETHER_ADDR_LEN);
+
+ HWRM_UNLOCK();
+
return rc;
}
@@ -2670,14 +2766,15 @@ int bnxt_hwrm_exec_fwd_resp(struct bnxt *bp, uint16_t target_id,
if (ec_size > sizeof(req.encap_request))
return -1;
- HWRM_PREP(req, EXEC_FWD_RESP, -1, resp);
+ HWRM_PREP(req, EXEC_FWD_RESP);
req.encap_resp_target_id = rte_cpu_to_le_16(target_id);
memcpy(req.encap_request, encaped, ec_size);
rc = bnxt_hwrm_send_message(bp, &req, sizeof(req));
- HWRM_CHECK_RESULT;
+ HWRM_CHECK_RESULT();
+ HWRM_UNLOCK();
return rc;
}
@@ -2689,13 +2786,13 @@ int bnxt_hwrm_ctx_qstats(struct bnxt *bp, uint32_t cid, int idx,
struct hwrm_stat_ctx_query_input req = {.req_type = 0};
struct hwrm_stat_ctx_query_output *resp = bp->hwrm_cmd_resp_addr;
- HWRM_PREP(req, STAT_CTX_QUERY, -1, resp);
+ HWRM_PREP(req, STAT_CTX_QUERY);
req.stat_ctx_id = rte_cpu_to_le_32(cid);
rc = bnxt_hwrm_send_message(bp, &req, sizeof(req));
- HWRM_CHECK_RESULT;
+ HWRM_CHECK_RESULT();
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);
@@ -2715,6 +2812,8 @@ int bnxt_hwrm_ctx_qstats(struct bnxt *bp, uint32_t cid, int idx,
stats->q_errors[idx] += rte_le_to_cpu_64(resp->tx_err_pkts);
stats->q_errors[idx] += rte_le_to_cpu_64(resp->rx_drop_pkts);
+ HWRM_UNLOCK();
+
return rc;
}
@@ -2728,12 +2827,16 @@ int bnxt_hwrm_port_qstats(struct bnxt *bp)
if (!(bp->flags & BNXT_FLAG_PORT_STATS))
return 0;
- HWRM_PREP(req, PORT_QSTATS, -1, resp);
+ HWRM_PREP(req, PORT_QSTATS);
+
req.port_id = rte_cpu_to_le_16(pf->port_id);
req.tx_stat_host_addr = rte_cpu_to_le_64(bp->hw_tx_port_stats_map);
req.rx_stat_host_addr = rte_cpu_to_le_64(bp->hw_rx_port_stats_map);
rc = bnxt_hwrm_send_message(bp, &req, sizeof(req));
- HWRM_CHECK_RESULT;
+
+ HWRM_CHECK_RESULT();
+ HWRM_UNLOCK();
+
return rc;
}
@@ -2747,10 +2850,14 @@ int bnxt_hwrm_port_clr_stats(struct bnxt *bp)
if (!(bp->flags & BNXT_FLAG_PORT_STATS))
return 0;
- HWRM_PREP(req, PORT_CLR_STATS, -1, resp);
+ HWRM_PREP(req, PORT_CLR_STATS);
+
req.port_id = rte_cpu_to_le_16(pf->port_id);
rc = bnxt_hwrm_send_message(bp, &req, sizeof(req));
- HWRM_CHECK_RESULT;
+
+ HWRM_CHECK_RESULT();
+ HWRM_UNLOCK();
+
return rc;
}
@@ -2763,10 +2870,11 @@ int bnxt_hwrm_port_led_qcaps(struct bnxt *bp)
if (BNXT_VF(bp))
return 0;
- HWRM_PREP(req, PORT_LED_QCAPS, -1, resp);
+ HWRM_PREP(req, PORT_LED_QCAPS);
req.port_id = bp->pf.port_id;
rc = bnxt_hwrm_send_message(bp, &req, sizeof(req));
- HWRM_CHECK_RESULT;
+
+ HWRM_CHECK_RESULT();
if (resp->num_leds > 0 && resp->num_leds < BNXT_MAX_LED) {
unsigned int i;
@@ -2786,6 +2894,9 @@ int bnxt_hwrm_port_led_qcaps(struct bnxt *bp)
}
}
}
+
+ HWRM_UNLOCK();
+
return rc;
}
@@ -2801,7 +2912,8 @@ int bnxt_hwrm_port_led_cfg(struct bnxt *bp, bool led_on)
if (!bp->num_leds || BNXT_VF(bp))
return -EOPNOTSUPP;
- HWRM_PREP(req, PORT_LED_CFG, -1, resp);
+ HWRM_PREP(req, PORT_LED_CFG);
+
if (led_on) {
led_state = HWRM_PORT_LED_CFG_INPUT_LED0_STATE_BLINKALT;
duration = rte_cpu_to_le_16(500);
@@ -2819,7 +2931,9 @@ int bnxt_hwrm_port_led_cfg(struct bnxt *bp, bool led_on)
}
rc = bnxt_hwrm_send_message(bp, &req, sizeof(req));
- HWRM_CHECK_RESULT;
+
+ HWRM_CHECK_RESULT();
+ HWRM_UNLOCK();
return rc;
}
@@ -2857,28 +2971,34 @@ static int bnxt_hwrm_func_vf_vnic_query(struct bnxt *bp, uint16_t vf,
int rc;
/* First query all VNIC ids */
- HWRM_PREP(req, FUNC_VF_VNIC_IDS_QUERY, -1, resp_vf_vnic_ids);
+ HWRM_PREP(req, FUNC_VF_VNIC_IDS_QUERY);
req.vf_id = rte_cpu_to_le_16(bp->pf.first_vf_id + vf);
req.max_vnic_id_cnt = rte_cpu_to_le_32(bp->pf.total_vnics);
req.vnic_id_tbl_addr = rte_cpu_to_le_64(rte_mem_virt2phy(vnic_ids));
if (req.vnic_id_tbl_addr == 0) {
+ HWRM_UNLOCK();
RTE_LOG(ERR, PMD,
"unable to map VNIC ID table address to physical memory\n");
return -ENOMEM;
}
rc = bnxt_hwrm_send_message(bp, &req, sizeof(req));
if (rc) {
+ HWRM_UNLOCK();
RTE_LOG(ERR, PMD, "hwrm_func_vf_vnic_query failed rc:%d\n", rc);
return -1;
} else if (resp->error_code) {
rc = rte_le_to_cpu_16(resp->error_code);
+ HWRM_UNLOCK();
RTE_LOG(ERR, PMD, "hwrm_func_vf_vnic_query error %d\n", rc);
return -1;
}
+ rc = rte_le_to_cpu_32(resp->vnic_id_cnt);
- return rte_le_to_cpu_32(resp->vnic_id_cnt);
+ HWRM_UNLOCK();
+
+ return rc;
}
/*
@@ -2943,7 +3063,8 @@ int bnxt_hwrm_func_cfg_vf_set_vlan_anti_spoof(struct bnxt *bp, uint16_t vf,
struct hwrm_func_cfg_input req = {0};
int rc;
- HWRM_PREP(req, FUNC_CFG, -1, resp);
+ HWRM_PREP(req, FUNC_CFG);
+
req.fid = rte_cpu_to_le_16(bp->pf.vf_info[vf].fid);
req.enables |= rte_cpu_to_le_32(
HWRM_FUNC_CFG_INPUT_ENABLES_VLAN_ANTISPOOF_MODE);
@@ -2951,7 +3072,9 @@ int bnxt_hwrm_func_cfg_vf_set_vlan_anti_spoof(struct bnxt *bp, uint16_t vf,
HWRM_FUNC_CFG_INPUT_VLAN_ANTISPOOF_MODE_VALIDATE_VLAN :
HWRM_FUNC_CFG_INPUT_VLAN_ANTISPOOF_MODE_NOCHECK;
rc = bnxt_hwrm_send_message(bp, &req, sizeof(req));
- HWRM_CHECK_RESULT;
+
+ HWRM_CHECK_RESULT();
+ HWRM_UNLOCK();
return rc;
}
--
2.7.4
^ permalink raw reply [flat|nested] 191+ messages in thread
* [dpdk-stable] patch 'net/bnxt: use 64-bits of address for VLAN table' has been queued to stable release 17.08.1
2017-11-21 13:15 [dpdk-stable] patch 'gro: fix typo in map file' has been queued to stable release 17.08.1 Yuanhan Liu
` (53 preceding siblings ...)
2017-11-21 13:16 ` [dpdk-stable] patch 'net/bnxt: fix HWRM macros and locking' " Yuanhan Liu
@ 2017-11-21 13:16 ` Yuanhan Liu
2017-11-21 13:16 ` [dpdk-stable] patch 'net/bnxt: fix an issue with group id calculation' " Yuanhan Liu
` (134 subsequent siblings)
189 siblings, 0 replies; 191+ messages in thread
From: Yuanhan Liu @ 2017-11-21 13:16 UTC (permalink / raw)
To: Ajit Khaparde; +Cc: dpdk stable
Hi,
FYI, your patch has been queued to stable release 17.08.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/24/17. So please
shout if anyone has objections.
Thanks.
--yliu
---
>From 9ab97c94e13533154e063a9a3ec3eaf181d313f5 Mon Sep 17 00:00:00 2001
From: Ajit Khaparde <ajit.khaparde@broadcom.com>
Date: Thu, 28 Sep 2017 16:43:23 -0500
Subject: [PATCH] net/bnxt: use 64-bits of address for VLAN table
[ upstream commit 044bf6e93c26df53c40711eaaf2482409efdbb76 ]
We are wrongly using just 16 bits of address from rte_mem_virt2phy
while filling the vlan table address instead of 64-bytes.
Most likely a copy-paste error.
Fixes: 36735a932ca7 ("net/bnxt: support set VF QOS and MAC anti spoof")
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
drivers/net/bnxt/bnxt_hwrm.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/bnxt/bnxt_hwrm.c b/drivers/net/bnxt/bnxt_hwrm.c
index fe82f09..ceb4ab2 100644
--- a/drivers/net/bnxt/bnxt_hwrm.c
+++ b/drivers/net/bnxt/bnxt_hwrm.c
@@ -276,7 +276,7 @@ int bnxt_hwrm_cfa_l2_set_rx_mask(struct bnxt *bp,
if (vlan_table) {
if (!(mask & HWRM_CFA_L2_SET_RX_MASK_INPUT_MASK_VLAN_NONVLAN))
mask |= HWRM_CFA_L2_SET_RX_MASK_INPUT_MASK_VLANONLY;
- req.vlan_tag_tbl_addr = rte_cpu_to_le_16(
+ req.vlan_tag_tbl_addr = rte_cpu_to_le_64(
rte_mem_virt2phy(vlan_table));
req.num_vlan_tags = rte_cpu_to_le_32((uint32_t)vlan_count);
}
--
2.7.4
^ permalink raw reply [flat|nested] 191+ messages in thread
* [dpdk-stable] patch 'net/bnxt: fix an issue with group id calculation' has been queued to stable release 17.08.1
2017-11-21 13:15 [dpdk-stable] patch 'gro: fix typo in map file' has been queued to stable release 17.08.1 Yuanhan Liu
` (54 preceding siblings ...)
2017-11-21 13:16 ` [dpdk-stable] patch 'net/bnxt: use 64-bits of address for VLAN table' " Yuanhan Liu
@ 2017-11-21 13:16 ` Yuanhan Liu
2017-11-21 13:16 ` [dpdk-stable] patch 'net/bnxt: fix calculation of number of pools' " Yuanhan Liu
` (133 subsequent siblings)
189 siblings, 0 replies; 191+ messages in thread
From: Yuanhan Liu @ 2017-11-21 13:16 UTC (permalink / raw)
To: Ajit Khaparde; +Cc: dpdk stable
Hi,
FYI, your patch has been queued to stable release 17.08.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/24/17. So please
shout if anyone has objections.
Thanks.
--yliu
---
>From a58618560ed4766b19e08cc8d8c69391b8e8b420 Mon Sep 17 00:00:00 2001
From: Ajit Khaparde <ajit.khaparde@broadcom.com>
Date: Thu, 28 Sep 2017 16:43:24 -0500
Subject: [PATCH] net/bnxt: fix an issue with group id calculation
[ upstream commit 39464bd308c16cc6ffd4cb6b4d900fddcc222d01 ]
start_grp_id is incremented wrongly. Fixing it.
Fixes: daef48efe5e5 ("net/bnxt: support set MTU")
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
drivers/net/bnxt/bnxt_rxq.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/bnxt/bnxt_rxq.c b/drivers/net/bnxt/bnxt_rxq.c
index 0793820..ef5e47d 100644
--- a/drivers/net/bnxt/bnxt_rxq.c
+++ b/drivers/net/bnxt/bnxt_rxq.c
@@ -168,7 +168,7 @@ int bnxt_mq_rx_configure(struct bnxt *bp)
*/
STAILQ_INSERT_TAIL(&vnic->filter, filter, next);
- start_grp_id = end_grp_id + 1;
+ start_grp_id = end_grp_id;
end_grp_id += nb_q_per_grp;
}
goto out;
--
2.7.4
^ permalink raw reply [flat|nested] 191+ messages in thread
* [dpdk-stable] patch 'net/bnxt: fix calculation of number of pools' has been queued to stable release 17.08.1
2017-11-21 13:15 [dpdk-stable] patch 'gro: fix typo in map file' has been queued to stable release 17.08.1 Yuanhan Liu
` (55 preceding siblings ...)
2017-11-21 13:16 ` [dpdk-stable] patch 'net/bnxt: fix an issue with group id calculation' " Yuanhan Liu
@ 2017-11-21 13:16 ` Yuanhan Liu
2017-11-21 13:16 ` [dpdk-stable] patch 'net/bnxt: handle multi queue mode properly' " Yuanhan Liu
` (132 subsequent siblings)
189 siblings, 0 replies; 191+ messages in thread
From: Yuanhan Liu @ 2017-11-21 13:16 UTC (permalink / raw)
To: Ajit Khaparde; +Cc: dpdk stable
Hi,
FYI, your patch has been queued to stable release 17.08.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/24/17. So please
shout if anyone has objections.
Thanks.
--yliu
---
>From 6c872d556e370af080a16d5a068b8f80a8019e3a Mon Sep 17 00:00:00 2001
From: Ajit Khaparde <ajit.khaparde@broadcom.com>
Date: Thu, 28 Sep 2017 16:43:25 -0500
Subject: [PATCH] net/bnxt: fix calculation of number of pools
[ upstream commit e28538f1620ea815e879df92d2a5c5dc8b4ec8d0 ]
The calculation for number of pools is wrong.
We are wrongly overwriting the calculated value with ETH_64_POOLS.
Accordingly fix the size of ff_pools array.
Fix the log message as well.
Fixes: 4cfe399f6550 ("net/bnxt: support to set VF rxmode")
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
drivers/net/bnxt/bnxt.h | 2 +-
drivers/net/bnxt/bnxt_rxq.c | 3 +--
2 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/drivers/net/bnxt/bnxt.h b/drivers/net/bnxt/bnxt.h
index 405d94d..3579505 100644
--- a/drivers/net/bnxt/bnxt.h
+++ b/drivers/net/bnxt/bnxt.h
@@ -217,7 +217,7 @@ struct bnxt {
STAILQ_HEAD(, bnxt_filter_info) free_filter_list;
/* VNIC pointer for flow filter (VMDq) pools */
-#define MAX_FF_POOLS ETH_64_POOLS
+#define MAX_FF_POOLS 256
STAILQ_HEAD(, bnxt_vnic_info) ff_pool[MAX_FF_POOLS];
struct bnxt_irq *irq_tbl;
diff --git a/drivers/net/bnxt/bnxt_rxq.c b/drivers/net/bnxt/bnxt_rxq.c
index ef5e47d..441e543 100644
--- a/drivers/net/bnxt/bnxt_rxq.c
+++ b/drivers/net/bnxt/bnxt_rxq.c
@@ -125,8 +125,7 @@ int bnxt_mq_rx_configure(struct bnxt *bp)
RTE_MIN(bp->max_l2_ctx,
RTE_MIN(bp->max_rsscos_ctx, ETH_64_POOLS)));
RTE_LOG(ERR, PMD,
- "VMDq pool not set, defaulted to 64\n");
- pools = ETH_64_POOLS;
+ "VMDq pool not set, defaulted to %d\n", pools);
}
nb_q_per_grp = bp->rx_cp_nr_rings / pools;
start_grp_id = 0;
--
2.7.4
^ permalink raw reply [flat|nested] 191+ messages in thread
* [dpdk-stable] patch 'net/bnxt: handle multi queue mode properly' has been queued to stable release 17.08.1
2017-11-21 13:15 [dpdk-stable] patch 'gro: fix typo in map file' has been queued to stable release 17.08.1 Yuanhan Liu
` (56 preceding siblings ...)
2017-11-21 13:16 ` [dpdk-stable] patch 'net/bnxt: fix calculation of number of pools' " Yuanhan Liu
@ 2017-11-21 13:16 ` Yuanhan Liu
2017-11-21 13:16 ` [dpdk-stable] patch 'net/bnxt: fix Rx handling and buffer allocation logic' " Yuanhan Liu
` (131 subsequent siblings)
189 siblings, 0 replies; 191+ messages in thread
From: Yuanhan Liu @ 2017-11-21 13:16 UTC (permalink / raw)
To: Ajit Khaparde; +Cc: dpdk stable
Hi,
FYI, your patch has been queued to stable release 17.08.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/24/17. So please
shout if anyone has objections.
Thanks.
--yliu
---
>From 1a3384b3c8b67fe830f7e6db286489fb3aaed7ee Mon Sep 17 00:00:00 2001
From: Ajit Khaparde <ajit.khaparde@broadcom.com>
Date: Thu, 28 Sep 2017 16:43:26 -0500
Subject: [PATCH] net/bnxt: handle multi queue mode properly
[ upstream commit 4191bc8f79a8ad7cbc36e05152794a8118348015 ]
We are currently not handling multi queue RX/RSS modes correctly.
If RSS is not requested, create one VNIC per RXQ.
Fixes: 6133f207970c ("net/bnxt: add Rx queue create/destroy")
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
drivers/net/bnxt/bnxt_ethdev.c | 11 ++-
drivers/net/bnxt/bnxt_rxq.c | 197 +++++++++++++++++++++--------------------
2 files changed, 111 insertions(+), 97 deletions(-)
diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
index c9d1122..6e5cb88 100644
--- a/drivers/net/bnxt/bnxt_ethdev.c
+++ b/drivers/net/bnxt/bnxt_ethdev.c
@@ -360,6 +360,7 @@ static void bnxt_dev_info_get_op(struct rte_eth_dev *eth_dev,
{
struct bnxt *bp = (struct bnxt *)eth_dev->data->dev_private;
uint16_t max_vnics, i, j, vpool, vrxq;
+ unsigned int max_rx_rings;
dev_info->pci_dev = RTE_ETH_DEV_TO_PCI(eth_dev);
@@ -370,8 +371,12 @@ static void bnxt_dev_info_get_op(struct rte_eth_dev *eth_dev,
/* PF/VF specifics */
if (BNXT_PF(bp))
dev_info->max_vfs = bp->pdev->max_vfs;
- dev_info->max_rx_queues = bp->max_rx_rings;
- dev_info->max_tx_queues = bp->max_tx_rings;
+ max_rx_rings = RTE_MIN(bp->max_vnics, RTE_MIN(bp->max_l2_ctx,
+ RTE_MIN(bp->max_rsscos_ctx,
+ bp->max_stat_ctx)));
+ /* For the sake of symmetry, max_rx_queues = max_tx_queues */
+ dev_info->max_rx_queues = max_rx_rings;
+ dev_info->max_tx_queues = max_rx_rings;
dev_info->reta_size = bp->max_rsscos_ctx;
max_vnics = bp->max_vnics;
@@ -827,7 +832,7 @@ static int bnxt_rss_hash_update_op(struct rte_eth_dev *eth_dev,
*/
if (dev_conf->rxmode.mq_mode & ETH_MQ_RX_RSS_FLAG) {
if (!rss_conf->rss_hf)
- return -EINVAL;
+ RTE_LOG(ERR, PMD, "Hash type NONE\n");
} else {
if (rss_conf->rss_hf & BNXT_ETH_RSS_SUPPORT)
return -EINVAL;
diff --git a/drivers/net/bnxt/bnxt_rxq.c b/drivers/net/bnxt/bnxt_rxq.c
index 441e543..8459fcc 100644
--- a/drivers/net/bnxt/bnxt_rxq.c
+++ b/drivers/net/bnxt/bnxt_rxq.c
@@ -60,11 +60,13 @@ void bnxt_free_rxq_stats(struct bnxt_rx_queue *rxq)
int bnxt_mq_rx_configure(struct bnxt *bp)
{
struct rte_eth_conf *dev_conf = &bp->eth_dev->data->dev_conf;
- unsigned int i, j, nb_q_per_grp, ring_idx;
- int start_grp_id, end_grp_id, rc = 0;
+ unsigned int i, j, nb_q_per_grp = 1, ring_idx = 0;
+ int start_grp_id, end_grp_id = 1, rc = 0;
struct bnxt_vnic_info *vnic;
struct bnxt_filter_info *filter;
+ enum rte_eth_nb_pools pools = bp->rx_cp_nr_rings, max_pools = 0;
struct bnxt_rx_queue *rxq;
+ bool rss_dflt_cr = false;
bp->nr_vnics = 0;
@@ -98,116 +100,123 @@ int bnxt_mq_rx_configure(struct bnxt *bp)
}
/* Multi-queue mode */
- if (dev_conf->rxmode.mq_mode & ETH_MQ_RX_VMDQ_FLAG) {
+ if (dev_conf->rxmode.mq_mode & ETH_MQ_RX_VMDQ_DCB_RSS) {
/* VMDq ONLY, VMDq+RSS, VMDq+DCB, VMDq+DCB+RSS */
- enum rte_eth_nb_pools pools;
+ const struct rte_eth_vmdq_rx_conf *conf =
+ &dev_conf->rx_adv_conf.vmdq_rx_conf;
+
switch (dev_conf->rxmode.mq_mode) {
case ETH_MQ_RX_VMDQ_RSS:
case ETH_MQ_RX_VMDQ_ONLY:
- {
- const struct rte_eth_vmdq_rx_conf *conf =
- &dev_conf->rx_adv_conf.vmdq_rx_conf;
-
- /* ETH_8/64_POOLs */
- pools = conf->nb_queue_pools;
- break;
- }
+ /* ETH_8/64_POOLs */
+ pools = conf->nb_queue_pools;
+ /* For each pool, allocate MACVLAN CFA rule & VNIC */
+ max_pools = RTE_MIN(bp->max_vnics,
+ RTE_MIN(bp->max_l2_ctx,
+ RTE_MIN(bp->max_rsscos_ctx,
+ ETH_64_POOLS)));
+ if (pools > max_pools)
+ pools = max_pools;
+ break;
+ case ETH_MQ_RX_RSS:
+ pools = 1;
+ break;
default:
RTE_LOG(ERR, PMD, "Unsupported mq_mod %d\n",
dev_conf->rxmode.mq_mode);
rc = -EINVAL;
goto err_out;
}
- /* For each pool, allocate MACVLAN CFA rule & VNIC */
- if (!pools) {
- pools = RTE_MIN(bp->max_vnics,
- RTE_MIN(bp->max_l2_ctx,
- RTE_MIN(bp->max_rsscos_ctx, ETH_64_POOLS)));
- RTE_LOG(ERR, PMD,
- "VMDq pool not set, defaulted to %d\n", pools);
+ }
+ /*
+ * If MQ RX w/o RSS no need for per VNIC filter.
+ */
+ if ((dev_conf->rxmode.mq_mode & ETH_MQ_RX_VMDQ_DCB) ||
+ (bp->rx_cp_nr_rings &&
+ !(dev_conf->rxmode.mq_mode & ETH_MQ_RX_RSS)))
+ rss_dflt_cr = true;
+
+ nb_q_per_grp = bp->rx_cp_nr_rings / pools;
+ start_grp_id = 0;
+ end_grp_id = nb_q_per_grp;
+
+ for (i = 0; i < pools; i++) {
+ vnic = bnxt_alloc_vnic(bp);
+ if (!vnic) {
+ RTE_LOG(ERR, PMD, "VNIC alloc failed\n");
+ rc = -ENOMEM;
+ goto err_out;
}
- nb_q_per_grp = bp->rx_cp_nr_rings / pools;
- start_grp_id = 0;
- end_grp_id = nb_q_per_grp;
-
- ring_idx = 0;
- for (i = 0; i < pools; i++) {
- vnic = bnxt_alloc_vnic(bp);
- if (!vnic) {
- RTE_LOG(ERR, PMD,
- "VNIC alloc failed\n");
- rc = -ENOMEM;
- goto err_out;
- }
- vnic->flags |= BNXT_VNIC_INFO_BCAST;
- STAILQ_INSERT_TAIL(&bp->ff_pool[i], vnic, next);
- bp->nr_vnics++;
-
- for (j = 0; j < nb_q_per_grp; j++, ring_idx++) {
- rxq = bp->eth_dev->data->rx_queues[ring_idx];
- rxq->vnic = vnic;
- }
- if (i == 0)
- vnic->func_default = true;
- vnic->ff_pool_idx = i;
- vnic->start_grp_id = start_grp_id;
- vnic->end_grp_id = end_grp_id;
-
- filter = bnxt_alloc_filter(bp);
- if (!filter) {
- RTE_LOG(ERR, PMD,
- "L2 filter alloc failed\n");
- rc = -ENOMEM;
- goto err_out;
- }
- /*
- * TODO: Configure & associate CFA rule for
- * each VNIC for each VMDq with MACVLAN, MACVLAN+TC
- */
- STAILQ_INSERT_TAIL(&vnic->filter, filter, next);
+ vnic->flags |= BNXT_VNIC_INFO_BCAST;
+ STAILQ_INSERT_TAIL(&bp->ff_pool[i], vnic, next);
+ bp->nr_vnics++;
- start_grp_id = end_grp_id;
- end_grp_id += nb_q_per_grp;
+ for (j = 0, ring_idx = 0; j < nb_q_per_grp; j++, ring_idx++) {
+ rxq = bp->eth_dev->data->rx_queues[ring_idx];
+ rxq->vnic = vnic;
}
- goto out;
- }
+ if (i == 0)
+ vnic->func_default = true;
+ vnic->ff_pool_idx = i;
+ vnic->start_grp_id = start_grp_id;
+ vnic->end_grp_id = end_grp_id;
+
+ if (rss_dflt_cr && i) {
+ vnic->rss_dflt_cr = true;
+ goto skip_filter_allocation;
+ }
+ filter = bnxt_alloc_filter(bp);
+ if (!filter) {
+ RTE_LOG(ERR, PMD, "L2 filter alloc failed\n");
+ rc = -ENOMEM;
+ goto err_out;
+ }
+ /*
+ * TODO: Configure & associate CFA rule for
+ * each VNIC for each VMDq with MACVLAN, MACVLAN+TC
+ */
+ STAILQ_INSERT_TAIL(&vnic->filter, filter, next);
- /* Non-VMDq mode - RSS, DCB, RSS+DCB */
- /* Init default VNIC for RSS or DCB only */
- vnic = bnxt_alloc_vnic(bp);
- if (!vnic) {
- RTE_LOG(ERR, PMD, "VNIC alloc failed\n");
- rc = -ENOMEM;
- goto err_out;
- }
- vnic->flags |= BNXT_VNIC_INFO_BCAST;
- /* Partition the rx queues for the single pool */
- for (i = 0; i < bp->rx_cp_nr_rings; i++) {
- rxq = bp->eth_dev->data->rx_queues[i];
- rxq->vnic = vnic;
+skip_filter_allocation:
+ start_grp_id = end_grp_id;
+ end_grp_id += nb_q_per_grp;
}
- STAILQ_INSERT_TAIL(&bp->ff_pool[0], vnic, next);
- bp->nr_vnics++;
-
- vnic->func_default = true;
- vnic->ff_pool_idx = 0;
- vnic->start_grp_id = 0;
- vnic->end_grp_id = bp->rx_cp_nr_rings;
- filter = bnxt_alloc_filter(bp);
- if (!filter) {
- RTE_LOG(ERR, PMD, "L2 filter alloc failed\n");
- rc = -ENOMEM;
- goto err_out;
- }
- STAILQ_INSERT_TAIL(&vnic->filter, filter, next);
-
- if (dev_conf->rxmode.mq_mode & ETH_MQ_RX_RSS_FLAG)
- vnic->hash_type =
- HWRM_VNIC_RSS_CFG_INPUT_HASH_TYPE_IPV4 |
- HWRM_VNIC_RSS_CFG_INPUT_HASH_TYPE_IPV6;
out:
+ if (dev_conf->rxmode.mq_mode & ETH_MQ_RX_RSS_FLAG) {
+ struct rte_eth_rss_conf *rss = &dev_conf->rx_adv_conf.rss_conf;
+ uint16_t hash_type = 0;
+
+ if (rss->rss_hf & ETH_RSS_IPV4)
+ hash_type |= HWRM_VNIC_RSS_CFG_INPUT_HASH_TYPE_IPV4;
+ if (rss->rss_hf & ETH_RSS_NONFRAG_IPV4_TCP)
+ hash_type |= HWRM_VNIC_RSS_CFG_INPUT_HASH_TYPE_TCP_IPV4;
+ if (rss->rss_hf & ETH_RSS_NONFRAG_IPV4_UDP)
+ hash_type |= HWRM_VNIC_RSS_CFG_INPUT_HASH_TYPE_UDP_IPV4;
+ if (rss->rss_hf & ETH_RSS_IPV6)
+ hash_type |= HWRM_VNIC_RSS_CFG_INPUT_HASH_TYPE_IPV6;
+ if (rss->rss_hf & ETH_RSS_NONFRAG_IPV6_TCP)
+ hash_type |= HWRM_VNIC_RSS_CFG_INPUT_HASH_TYPE_TCP_IPV6;
+ if (rss->rss_hf & ETH_RSS_NONFRAG_IPV6_UDP)
+ hash_type |= HWRM_VNIC_RSS_CFG_INPUT_HASH_TYPE_UDP_IPV6;
+
+ for (i = 0; i < bp->nr_vnics; i++) {
+ STAILQ_FOREACH(vnic, &bp->ff_pool[i], next) {
+ vnic->hash_type |= hash_type;
+
+ /*
+ * Use the supplied key if the key length is
+ * acceptable and the rss_key is not NULL
+ */
+ if (rss->rss_key &&
+ rss->rss_key_len <= HW_HASH_KEY_SIZE)
+ memcpy(vnic->rss_hash_key,
+ rss->rss_key, rss->rss_key_len);
+ }
+ }
+ }
+
return rc;
err_out:
--
2.7.4
^ permalink raw reply [flat|nested] 191+ messages in thread
* [dpdk-stable] patch 'net/bnxt: fix Rx handling and buffer allocation logic' has been queued to stable release 17.08.1
2017-11-21 13:15 [dpdk-stable] patch 'gro: fix typo in map file' has been queued to stable release 17.08.1 Yuanhan Liu
` (57 preceding siblings ...)
2017-11-21 13:16 ` [dpdk-stable] patch 'net/bnxt: handle multi queue mode properly' " Yuanhan Liu
@ 2017-11-21 13:16 ` Yuanhan Liu
2017-11-21 13:16 ` [dpdk-stable] patch 'net/bnxt: fix an issue with broadcast traffic' " Yuanhan Liu
` (130 subsequent siblings)
189 siblings, 0 replies; 191+ messages in thread
From: Yuanhan Liu @ 2017-11-21 13:16 UTC (permalink / raw)
To: Ajit Khaparde; +Cc: dpdk stable
Hi,
FYI, your patch has been queued to stable release 17.08.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/24/17. So please
shout if anyone has objections.
Thanks.
--yliu
---
>From ee754a2f84951da46c4a484a7f11751847172a76 Mon Sep 17 00:00:00 2001
From: Ajit Khaparde <ajit.khaparde@broadcom.com>
Date: Thu, 28 Sep 2017 16:43:27 -0500
Subject: [PATCH] net/bnxt: fix Rx handling and buffer allocation logic
[ upstream commit d9dd0b29ed315cff166b96cea278d0bcf489cd47 ]
Even when rx buffer allocation fails, we are wrongly updating
the producer index. This patch fixes that.
Also in case of a buffer allocation failure, reattempt buffer
allocation before the rx handler exits.
Fixes: 2eb53b134aae ("net/bnxt: add initial Rx code")
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
drivers/net/bnxt/bnxt_rxr.c | 32 +++++++++++++++++++++++++++++---
1 file changed, 29 insertions(+), 3 deletions(-)
diff --git a/drivers/net/bnxt/bnxt_rxr.c b/drivers/net/bnxt/bnxt_rxr.c
index bee67d3..bf9f78a 100644
--- a/drivers/net/bnxt/bnxt_rxr.c
+++ b/drivers/net/bnxt/bnxt_rxr.c
@@ -391,7 +391,7 @@ static int bnxt_rx_pkt(struct rte_mbuf **rx_pkt,
rte_prefetch0(mbuf);
if (mbuf == NULL)
- return -ENOMEM;
+ return -EBUSY;
mbuf->nb_segs = 1;
mbuf->next = NULL;
@@ -448,13 +448,14 @@ static int bnxt_rx_pkt(struct rte_mbuf **rx_pkt,
if (bnxt_alloc_rx_data(rxq, rxr, prod)) {
RTE_LOG(ERR, PMD, "mbuf alloc failed with prod=0x%x\n", prod);
rc = -ENOMEM;
+ goto rx;
}
rxr->rx_prod = prod;
/*
* All MBUFs are allocated with the same size under DPDK,
* no optimization for rx_copy_thresh
*/
-
+rx:
*rx_pkt = mbuf;
next_rx:
@@ -476,6 +477,7 @@ uint16_t bnxt_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts,
struct rx_pkt_cmpl *rxcmp;
uint16_t prod = rxr->rx_prod;
uint16_t ag_prod = rxr->ag_prod;
+ int rc = 0;
/* Handle RX burst request */
while (1) {
@@ -491,7 +493,7 @@ uint16_t bnxt_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts,
/* TODO: Avoid magic numbers... */
if ((CMP_TYPE(rxcmp) & 0x30) == 0x10) {
rc = bnxt_rx_pkt(&rx_pkts[nb_rx_pkts], rxq, &raw_cons);
- if (likely(!rc))
+ if (likely(!rc) || rc == -ENOMEM)
nb_rx_pkts++;
if (rc == -EBUSY) /* partial completion */
break;
@@ -514,6 +516,30 @@ uint16_t bnxt_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts,
B_RX_DB(rxr->rx_doorbell, rxr->rx_prod);
/* Ring the AGG ring DB */
B_RX_DB(rxr->ag_doorbell, rxr->ag_prod);
+
+ /* Attempt to alloc Rx buf in case of a previous allocation failure. */
+ if (rc == -ENOMEM) {
+ int i;
+
+ for (i = prod; i <= nb_rx_pkts;
+ i = RING_NEXT(rxr->rx_ring_struct, i)) {
+ struct bnxt_sw_rx_bd *rx_buf = &rxr->rx_buf_ring[i];
+
+ /* Buffer already allocated for this index. */
+ if (rx_buf->mbuf != NULL)
+ continue;
+
+ /* This slot is empty. Alloc buffer for Rx */
+ if (!bnxt_alloc_rx_data(rxq, rxr, i)) {
+ rxr->rx_prod = i;
+ B_RX_DB(rxr->rx_doorbell, rxr->rx_prod);
+ } else {
+ RTE_LOG(ERR, PMD, "Alloc mbuf failed\n");
+ break;
+ }
+ }
+ }
+
return nb_rx_pkts;
}
--
2.7.4
^ permalink raw reply [flat|nested] 191+ messages in thread
* [dpdk-stable] patch 'net/bnxt: fix an issue with broadcast traffic' has been queued to stable release 17.08.1
2017-11-21 13:15 [dpdk-stable] patch 'gro: fix typo in map file' has been queued to stable release 17.08.1 Yuanhan Liu
` (58 preceding siblings ...)
2017-11-21 13:16 ` [dpdk-stable] patch 'net/bnxt: fix Rx handling and buffer allocation logic' " Yuanhan Liu
@ 2017-11-21 13:16 ` Yuanhan Liu
2017-11-21 13:16 ` [dpdk-stable] patch 'net/bnxt: fix usage of VMDq flags' " Yuanhan Liu
` (129 subsequent siblings)
189 siblings, 0 replies; 191+ messages in thread
From: Yuanhan Liu @ 2017-11-21 13:16 UTC (permalink / raw)
To: Ajit Khaparde; +Cc: dpdk stable
Hi,
FYI, your patch has been queued to stable release 17.08.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/24/17. So please
shout if anyone has objections.
Thanks.
--yliu
---
>From e55c9a78ab8047904f18b559651f4d4a1af7b686 Mon Sep 17 00:00:00 2001
From: Ajit Khaparde <ajit.khaparde@broadcom.com>
Date: Thu, 28 Sep 2017 16:43:28 -0500
Subject: [PATCH] net/bnxt: fix an issue with broadcast traffic
[ upstream commit a01a07286d112e8526facc47e03d10c44ffafd7b ]
In bnxt_hwrm_cfa_l2_set_rx_mask, we are ignoring the previous
setting of HWRM_CFA_L2_SET_RX_MASK_INPUT_MASK_BCAST and
setting it again, thereby wrongly enabling Broadcast.
Fixes: 244bc98b0da7 ("net/bnxt: set L2 Rx mask")
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
drivers/net/bnxt/bnxt_hwrm.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/net/bnxt/bnxt_hwrm.c b/drivers/net/bnxt/bnxt_hwrm.c
index ceb4ab2..ade9627 100644
--- a/drivers/net/bnxt/bnxt_hwrm.c
+++ b/drivers/net/bnxt/bnxt_hwrm.c
@@ -280,8 +280,7 @@ int bnxt_hwrm_cfa_l2_set_rx_mask(struct bnxt *bp,
rte_mem_virt2phy(vlan_table));
req.num_vlan_tags = rte_cpu_to_le_32((uint32_t)vlan_count);
}
- req.mask = rte_cpu_to_le_32(HWRM_CFA_L2_SET_RX_MASK_INPUT_MASK_BCAST |
- mask);
+ req.mask = rte_cpu_to_le_32(mask);
rc = bnxt_hwrm_send_message(bp, &req, sizeof(req));
--
2.7.4
^ permalink raw reply [flat|nested] 191+ messages in thread
* [dpdk-stable] patch 'net/bnxt: fix usage of VMDq flags' has been queued to stable release 17.08.1
2017-11-21 13:15 [dpdk-stable] patch 'gro: fix typo in map file' has been queued to stable release 17.08.1 Yuanhan Liu
` (59 preceding siblings ...)
2017-11-21 13:16 ` [dpdk-stable] patch 'net/bnxt: fix an issue with broadcast traffic' " Yuanhan Liu
@ 2017-11-21 13:16 ` Yuanhan Liu
2017-11-21 13:16 ` [dpdk-stable] patch 'net/bnxt: set checksum offload flags correctly' " Yuanhan Liu
` (128 subsequent siblings)
189 siblings, 0 replies; 191+ messages in thread
From: Yuanhan Liu @ 2017-11-21 13:16 UTC (permalink / raw)
To: Ajit Khaparde; +Cc: Stephen Hurd, dpdk stable
Hi,
FYI, your patch has been queued to stable release 17.08.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/24/17. So please
shout if anyone has objections.
Thanks.
--yliu
---
>From 8f30d6ea0bf5eefe971c83e70fbd6373597619b8 Mon Sep 17 00:00:00 2001
From: Ajit Khaparde <ajit.khaparde@broadcom.com>
Date: Thu, 28 Sep 2017 16:43:29 -0500
Subject: [PATCH] net/bnxt: fix usage of VMDq flags
[ upstream commit 0714ee90de2665f08d7bf7b7ac540497da92c2a1 ]
Map ETH_VMDQ_ACCEPT_HASH_UC to the promiscuous bit.
Also, set ALLMULTI and MCAST when MCAST is set to ensure multicast traffic
is received regardless of the VF driver list.
Fixes: 4cfe399f6550 ("net/bnxt: support to set VF rxmode")
Signed-off-by: Stephen Hurd <stephen.hurd@broadcom.com>
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
drivers/net/bnxt/rte_pmd_bnxt.c | 11 +++++------
1 file changed, 5 insertions(+), 6 deletions(-)
diff --git a/drivers/net/bnxt/rte_pmd_bnxt.c b/drivers/net/bnxt/rte_pmd_bnxt.c
index c343d90..0bf5db5 100644
--- a/drivers/net/bnxt/rte_pmd_bnxt.c
+++ b/drivers/net/bnxt/rte_pmd_bnxt.c
@@ -409,20 +409,19 @@ int rte_pmd_bnxt_set_vf_rxmode(uint8_t port, uint16_t vf,
if (vf >= bp->pdev->max_vfs)
return -EINVAL;
- if (rx_mask & (ETH_VMDQ_ACCEPT_UNTAG | ETH_VMDQ_ACCEPT_HASH_MC)) {
+ if (rx_mask & ETH_VMDQ_ACCEPT_UNTAG) {
RTE_LOG(ERR, PMD, "Currently cannot toggle this setting\n");
return -ENOTSUP;
}
- if (rx_mask & ETH_VMDQ_ACCEPT_HASH_UC && !on) {
- RTE_LOG(ERR, PMD, "Currently cannot disable UC Rx\n");
- return -ENOTSUP;
- }
+ /* Is this really the correct mapping? VFd seems to think it is. */
+ if (rx_mask & ETH_VMDQ_ACCEPT_HASH_UC)
+ flag |= BNXT_VNIC_INFO_PROMISC;
if (rx_mask & ETH_VMDQ_ACCEPT_BROADCAST)
flag |= BNXT_VNIC_INFO_BCAST;
if (rx_mask & ETH_VMDQ_ACCEPT_MULTICAST)
- flag |= BNXT_VNIC_INFO_ALLMULTI;
+ flag |= BNXT_VNIC_INFO_ALLMULTI | BNXT_VNIC_INFO_MCAST;
if (on)
bp->pf.vf_info[vf].l2_rx_mask |= flag;
--
2.7.4
^ permalink raw reply [flat|nested] 191+ messages in thread
* [dpdk-stable] patch 'net/bnxt: set checksum offload flags correctly' has been queued to stable release 17.08.1
2017-11-21 13:15 [dpdk-stable] patch 'gro: fix typo in map file' has been queued to stable release 17.08.1 Yuanhan Liu
` (60 preceding siblings ...)
2017-11-21 13:16 ` [dpdk-stable] patch 'net/bnxt: fix usage of VMDq flags' " Yuanhan Liu
@ 2017-11-21 13:16 ` Yuanhan Liu
2017-11-21 13:16 ` [dpdk-stable] patch 'net/bnxt: update status of Rx IP/L4 CKSUM' " Yuanhan Liu
` (127 subsequent siblings)
189 siblings, 0 replies; 191+ messages in thread
From: Yuanhan Liu @ 2017-11-21 13:16 UTC (permalink / raw)
To: Ajit Khaparde; +Cc: dpdk stable
Hi,
FYI, your patch has been queued to stable release 17.08.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/24/17. So please
shout if anyone has objections.
Thanks.
--yliu
---
>From b1e8fad913496548f4614dd1e8c1e842baec1e6b Mon Sep 17 00:00:00 2001
From: Ajit Khaparde <ajit.khaparde@broadcom.com>
Date: Thu, 28 Sep 2017 16:43:30 -0500
Subject: [PATCH] net/bnxt: set checksum offload flags correctly
[ upstream commit d644aa046a925acb2e7de22a12acf0ffaa4530e4 ]
We are not correctly setting hw checksum offload for all the
offload flags. This patch fixes that.
Fixes: 6eb3cc2294fd ("net/bnxt: add initial Tx code")
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
drivers/net/bnxt/bnxt_txr.c | 32 +++++++++++++++++++++++++-------
drivers/net/bnxt/bnxt_txr.h | 21 +++++++++++++++++++++
2 files changed, 46 insertions(+), 7 deletions(-)
diff --git a/drivers/net/bnxt/bnxt_txr.c b/drivers/net/bnxt/bnxt_txr.c
index 6870b16..60cc174 100644
--- a/drivers/net/bnxt/bnxt_txr.c
+++ b/drivers/net/bnxt/bnxt_txr.c
@@ -161,7 +161,7 @@ static uint16_t bnxt_start_xmit(struct rte_mbuf *tx_pkt,
if (tx_pkt->ol_flags & (PKT_TX_TCP_SEG | PKT_TX_TCP_CKSUM |
PKT_TX_UDP_CKSUM | PKT_TX_IP_CKSUM |
- PKT_TX_VLAN_PKT))
+ PKT_TX_VLAN_PKT | PKT_TX_OUTER_IP_CKSUM))
long_bd = true;
tx_buf = &txr->tx_buf_ring[txr->tx_prod];
@@ -211,21 +211,39 @@ static uint16_t bnxt_start_xmit(struct rte_mbuf *tx_pkt,
if (tx_pkt->ol_flags & PKT_TX_TCP_SEG) {
/* TSO */
- txbd1->lflags = TX_BD_LONG_LFLAGS_LSO;
+ txbd1->lflags |= TX_BD_LONG_LFLAGS_LSO;
txbd1->hdr_size = tx_pkt->l2_len + tx_pkt->l3_len +
tx_pkt->l4_len + tx_pkt->outer_l2_len +
tx_pkt->outer_l3_len;
txbd1->mss = tx_pkt->tso_segsz;
- } else if (tx_pkt->ol_flags & (PKT_TX_TCP_CKSUM |
- PKT_TX_UDP_CKSUM)) {
+ } else if (tx_pkt->ol_flags & PKT_TX_OIP_IIP_TCP_UDP_CKSUM) {
+ /* Outer IP, Inner IP, Inner TCP/UDP CSO */
+ txbd1->lflags |= TX_BD_FLG_TIP_IP_TCP_UDP_CHKSUM;
+ txbd1->mss = 0;
+ } else if (tx_pkt->ol_flags & PKT_TX_IIP_TCP_UDP_CKSUM) {
+ /* (Inner) IP, (Inner) TCP/UDP CSO */
+ txbd1->lflags |= TX_BD_FLG_IP_TCP_UDP_CHKSUM;
+ txbd1->mss = 0;
+ } else if (tx_pkt->ol_flags & PKT_TX_OIP_TCP_UDP_CKSUM) {
+ /* Outer IP, (Inner) TCP/UDP CSO */
+ txbd1->lflags |= TX_BD_FLG_TIP_TCP_UDP_CHKSUM;
+ txbd1->mss = 0;
+ } else if (tx_pkt->ol_flags & PKT_TX_OIP_IIP_CKSUM) {
+ /* Outer IP, Inner IP CSO */
+ txbd1->lflags |= TX_BD_FLG_TIP_IP_CHKSUM;
+ txbd1->mss = 0;
+ } else if (tx_pkt->ol_flags & PKT_TX_TCP_UDP_CKSUM) {
/* TCP/UDP CSO */
- txbd1->lflags = TX_BD_LONG_LFLAGS_TCP_UDP_CHKSUM;
+ txbd1->lflags |= TX_BD_LONG_LFLAGS_TCP_UDP_CHKSUM;
txbd1->mss = 0;
-
} else if (tx_pkt->ol_flags & PKT_TX_IP_CKSUM) {
/* IP CSO */
- txbd1->lflags = TX_BD_LONG_LFLAGS_IP_CHKSUM;
+ txbd1->lflags |= TX_BD_LONG_LFLAGS_IP_CHKSUM;
+ txbd1->mss = 0;
+ } else if (tx_pkt->ol_flags & PKT_TX_OUTER_IP_CKSUM) {
+ /* IP CSO */
+ txbd1->lflags |= TX_BD_LONG_LFLAGS_T_IP_CHKSUM;
txbd1->mss = 0;
}
} else {
diff --git a/drivers/net/bnxt/bnxt_txr.h b/drivers/net/bnxt/bnxt_txr.h
index 5b09711..3f3eb31 100644
--- a/drivers/net/bnxt/bnxt_txr.h
+++ b/drivers/net/bnxt/bnxt_txr.h
@@ -69,4 +69,25 @@ int bnxt_init_tx_ring_struct(struct bnxt_tx_queue *txq, unsigned int socket_id);
uint16_t bnxt_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts,
uint16_t nb_pkts);
+#define PKT_TX_OIP_IIP_TCP_UDP_CKSUM (PKT_TX_TCP_CKSUM | PKT_TX_UDP_CKSUM | \
+ PKT_TX_IP_CKSUM | PKT_TX_OUTER_IP_CKSUM)
+#define PKT_TX_IIP_TCP_UDP_CKSUM (PKT_TX_TCP_CKSUM | PKT_TX_UDP_CKSUM | \
+ PKT_TX_IP_CKSUM)
+#define PKT_TX_OIP_TCP_UDP_CKSUM (PKT_TX_TCP_CKSUM | PKT_TX_UDP_CKSUM | \
+ PKT_TX_OUTER_IP_CKSUM)
+#define PKT_TX_OIP_IIP_CKSUM (PKT_TX_IP_CKSUM | \
+ PKT_TX_OUTER_IP_CKSUM)
+#define PKT_TX_TCP_UDP_CKSUM (PKT_TX_TCP_CKSUM | PKT_TX_UDP_CKSUM)
+
+
+#define TX_BD_FLG_TIP_IP_TCP_UDP_CHKSUM (TX_BD_LONG_LFLAGS_TCP_UDP_CHKSUM | \
+ TX_BD_LONG_LFLAGS_T_IP_CHKSUM | \
+ TX_BD_LONG_LFLAGS_IP_CHKSUM)
+#define TX_BD_FLG_IP_TCP_UDP_CHKSUM (TX_BD_LONG_LFLAGS_TCP_UDP_CHKSUM | \
+ TX_BD_LONG_LFLAGS_IP_CHKSUM)
+#define TX_BD_FLG_TIP_IP_CHKSUM (TX_BD_LONG_LFLAGS_T_IP_CHKSUM | \
+ TX_BD_LONG_LFLAGS_IP_CHKSUM)
+#define TX_BD_FLG_TIP_TCP_UDP_CHKSUM (TX_BD_LONG_LFLAGS_TCP_UDP_CHKSUM | \
+ TX_BD_LONG_LFLAGS_T_IP_CHKSUM)
+
#endif
--
2.7.4
^ permalink raw reply [flat|nested] 191+ messages in thread
* [dpdk-stable] patch 'net/bnxt: update status of Rx IP/L4 CKSUM' has been queued to stable release 17.08.1
2017-11-21 13:15 [dpdk-stable] patch 'gro: fix typo in map file' has been queued to stable release 17.08.1 Yuanhan Liu
` (61 preceding siblings ...)
2017-11-21 13:16 ` [dpdk-stable] patch 'net/bnxt: set checksum offload flags correctly' " Yuanhan Liu
@ 2017-11-21 13:16 ` Yuanhan Liu
2017-11-21 13:16 ` [dpdk-stable] patch 'net/bnxt: fix config RSS update' " Yuanhan Liu
` (126 subsequent siblings)
189 siblings, 0 replies; 191+ messages in thread
From: Yuanhan Liu @ 2017-11-21 13:16 UTC (permalink / raw)
To: Ajit Khaparde; +Cc: dpdk stable
Hi,
FYI, your patch has been queued to stable release 17.08.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/24/17. So please
shout if anyone has objections.
Thanks.
--yliu
---
>From edf52357fbdd0a1be1cea106a6b5520eadd79ad1 Mon Sep 17 00:00:00 2001
From: Ajit Khaparde <ajit.khaparde@broadcom.com>
Date: Thu, 28 Sep 2017 16:43:31 -0500
Subject: [PATCH] net/bnxt: update status of Rx IP/L4 CKSUM
[ upstream commit 7ec39d8c524b87017745df03c961c1ef341c7cbb ]
update ol_flags with the appropriate status of IP/L4 cksum in Rx path.
Fixes: 2eb53b134aae ("net/bnxt: add initial Rx code")
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
drivers/net/bnxt/bnxt_rxr.c | 11 +++++++++++
drivers/net/bnxt/bnxt_rxr.h | 16 ++++++++++++++++
2 files changed, 27 insertions(+)
diff --git a/drivers/net/bnxt/bnxt_rxr.c b/drivers/net/bnxt/bnxt_rxr.c
index bf9f78a..28105b0 100644
--- a/drivers/net/bnxt/bnxt_rxr.c
+++ b/drivers/net/bnxt/bnxt_rxr.c
@@ -418,6 +418,17 @@ static int bnxt_rx_pkt(struct rte_mbuf **rx_pkt,
mbuf->ol_flags |= PKT_RX_VLAN_PKT;
}
+ if (likely(RX_CMP_IP_CS_OK(rxcmp1)))
+ mbuf->ol_flags |= PKT_RX_IP_CKSUM_GOOD;
+ else
+ mbuf->ol_flags |= PKT_RX_IP_CKSUM_NONE;
+
+ if (likely(RX_CMP_L4_CS_OK(rxcmp1)))
+ mbuf->ol_flags |= PKT_RX_L4_CKSUM_GOOD;
+ else
+ mbuf->ol_flags |= PKT_RX_L4_CKSUM_NONE;
+
+
#ifdef BNXT_DEBUG
if (rxcmp1->errors_v2 & RX_CMP_L2_ERRORS) {
/* Re-install the mbuf back to the rx ring */
diff --git a/drivers/net/bnxt/bnxt_rxr.h b/drivers/net/bnxt/bnxt_rxr.h
index f8d6dc8..cb0cef3 100644
--- a/drivers/net/bnxt/bnxt_rxr.h
+++ b/drivers/net/bnxt/bnxt_rxr.h
@@ -52,6 +52,22 @@
#define BNXT_TPA_OUTER_L3_OFF(hdr_info) \
((hdr_info) & 0x1ff)
+#define RX_CMP_L4_CS_BITS rte_cpu_to_le_32(RX_PKT_CMPL_FLAGS2_L4_CS_CALC)
+
+#define RX_CMP_L4_CS_ERR_BITS rte_cpu_to_le_32(RX_PKT_CMPL_ERRORS_L4_CS_ERROR)
+
+#define RX_CMP_L4_CS_OK(rxcmp1) \
+ (((rxcmp1)->flags2 & RX_CMP_L4_CS_BITS) && \
+ !((rxcmp1)->errors_v2 & RX_CMP_L4_CS_ERR_BITS))
+
+#define RX_CMP_IP_CS_ERR_BITS rte_cpu_to_le_32(RX_PKT_CMPL_ERRORS_IP_CS_ERROR)
+
+#define RX_CMP_IP_CS_BITS rte_cpu_to_le_32(RX_PKT_CMPL_FLAGS2_IP_CS_CALC)
+
+#define RX_CMP_IP_CS_OK(rxcmp1) \
+ (((rxcmp1)->flags2 & RX_CMP_IP_CS_BITS) && \
+ !((rxcmp1)->errors_v2 & RX_CMP_IP_CS_ERR_BITS))
+
enum pkt_hash_types {
PKT_HASH_TYPE_NONE, /* Undefined type */
PKT_HASH_TYPE_L2, /* Input: src_MAC, dest_MAC */
--
2.7.4
^ permalink raw reply [flat|nested] 191+ messages in thread
* [dpdk-stable] patch 'net/bnxt: fix config RSS update' has been queued to stable release 17.08.1
2017-11-21 13:15 [dpdk-stable] patch 'gro: fix typo in map file' has been queued to stable release 17.08.1 Yuanhan Liu
` (62 preceding siblings ...)
2017-11-21 13:16 ` [dpdk-stable] patch 'net/bnxt: update status of Rx IP/L4 CKSUM' " Yuanhan Liu
@ 2017-11-21 13:16 ` Yuanhan Liu
2017-11-21 13:16 ` [dpdk-stable] patch 'net/bnxt: set the hash key size' " Yuanhan Liu
` (125 subsequent siblings)
189 siblings, 0 replies; 191+ messages in thread
From: Yuanhan Liu @ 2017-11-21 13:16 UTC (permalink / raw)
To: Ajit Khaparde; +Cc: dpdk stable
Hi,
FYI, your patch has been queued to stable release 17.08.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/24/17. So please
shout if anyone has objections.
Thanks.
--yliu
---
>From fb99c56f87ae45a3fa2b1f06ffe9019a105278a0 Mon Sep 17 00:00:00 2001
From: Ajit Khaparde <ajit.khaparde@broadcom.com>
Date: Thu, 28 Sep 2017 16:43:33 -0500
Subject: [PATCH] net/bnxt: fix config RSS update
[ upstream commit 1ebb765090a6496e2f2a291cc4402e770670bf57 ]
We are not configuring the RSS settings updated by rss_hash_update().
Fixing it.
Fixes: fcc0aa1edc10 ("net/bnxt: add RSS hash configuration")
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
drivers/net/bnxt/bnxt.h | 2 ++
drivers/net/bnxt/bnxt_ethdev.c | 4 ++++
drivers/net/bnxt/bnxt_rxq.c | 5 +++++
3 files changed, 11 insertions(+)
diff --git a/drivers/net/bnxt/bnxt.h b/drivers/net/bnxt/bnxt.h
index 3579505..65f716b 100644
--- a/drivers/net/bnxt/bnxt.h
+++ b/drivers/net/bnxt/bnxt.h
@@ -176,6 +176,7 @@ struct bnxt {
void *bar0;
struct rte_eth_dev *eth_dev;
+ struct rte_eth_rss_conf rss_conf;
struct rte_pci_device *pdev;
uint32_t flags;
@@ -184,6 +185,7 @@ struct bnxt {
#define BNXT_FLAG_PORT_STATS (1 << 2)
#define BNXT_FLAG_JUMBO (1 << 3)
#define BNXT_FLAG_SHORT_CMD (1 << 4)
+#define BNXT_FLAG_UPDATE_HASH (1 << 5)
#define BNXT_PF(bp) (!((bp)->flags & BNXT_FLAG_VF))
#define BNXT_VF(bp) ((bp)->flags & BNXT_FLAG_VF)
#define BNXT_NPAR_ENABLED(bp) ((bp)->port_partition_type)
diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
index 6e5cb88..7bcd9a3 100644
--- a/drivers/net/bnxt/bnxt_ethdev.c
+++ b/drivers/net/bnxt/bnxt_ethdev.c
@@ -837,6 +837,10 @@ static int bnxt_rss_hash_update_op(struct rte_eth_dev *eth_dev,
if (rss_conf->rss_hf & BNXT_ETH_RSS_SUPPORT)
return -EINVAL;
}
+
+ bp->flags |= BNXT_FLAG_UPDATE_HASH;
+ memcpy(&bp->rss_conf, rss_conf, sizeof(*rss_conf));
+
if (rss_conf->rss_hf & ETH_RSS_IPV4)
hash_type |= HWRM_VNIC_RSS_CFG_INPUT_HASH_TYPE_IPV4;
if (rss_conf->rss_hf & ETH_RSS_NONFRAG_IPV4_TCP)
diff --git a/drivers/net/bnxt/bnxt_rxq.c b/drivers/net/bnxt/bnxt_rxq.c
index 8459fcc..690a599 100644
--- a/drivers/net/bnxt/bnxt_rxq.c
+++ b/drivers/net/bnxt/bnxt_rxq.c
@@ -188,6 +188,11 @@ out:
struct rte_eth_rss_conf *rss = &dev_conf->rx_adv_conf.rss_conf;
uint16_t hash_type = 0;
+ if (bp->flags & BNXT_FLAG_UPDATE_HASH) {
+ rss = &bp->rss_conf;
+ bp->flags &= ~BNXT_FLAG_UPDATE_HASH;
+ }
+
if (rss->rss_hf & ETH_RSS_IPV4)
hash_type |= HWRM_VNIC_RSS_CFG_INPUT_HASH_TYPE_IPV4;
if (rss->rss_hf & ETH_RSS_NONFRAG_IPV4_TCP)
--
2.7.4
^ permalink raw reply [flat|nested] 191+ messages in thread
* [dpdk-stable] patch 'net/bnxt: set the hash key size' has been queued to stable release 17.08.1
2017-11-21 13:15 [dpdk-stable] patch 'gro: fix typo in map file' has been queued to stable release 17.08.1 Yuanhan Liu
` (63 preceding siblings ...)
2017-11-21 13:16 ` [dpdk-stable] patch 'net/bnxt: fix config RSS update' " Yuanhan Liu
@ 2017-11-21 13:16 ` Yuanhan Liu
2017-11-21 13:16 ` [dpdk-stable] patch 'net/bnxt: fix per queue stats display in xstats' " Yuanhan Liu
` (124 subsequent siblings)
189 siblings, 0 replies; 191+ messages in thread
From: Yuanhan Liu @ 2017-11-21 13:16 UTC (permalink / raw)
To: Ajit Khaparde; +Cc: dpdk stable
Hi,
FYI, your patch has been queued to stable release 17.08.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/24/17. So please
shout if anyone has objections.
Thanks.
--yliu
---
>From 8418548bbff7622a24354aed4f15a07d8824a74a Mon Sep 17 00:00:00 2001
From: Ajit Khaparde <ajit.khaparde@broadcom.com>
Date: Thu, 28 Sep 2017 16:43:34 -0500
Subject: [PATCH] net/bnxt: set the hash key size
[ upstream commit 2ba07b7dbd9d133d4149cd7b8568fc2f7c5ae293 ]
We were not setting the dev_info.hash_key_size. Setting it now.
Fixes: 0a6d2a720078 ("net/bnxt: get device infos")
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
drivers/net/bnxt/bnxt_ethdev.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
index 7bcd9a3..79448a7 100644
--- a/drivers/net/bnxt/bnxt_ethdev.c
+++ b/drivers/net/bnxt/bnxt_ethdev.c
@@ -378,6 +378,7 @@ static void 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 = bp->max_rsscos_ctx;
+ dev_info->hash_key_size = 40;
max_vnics = bp->max_vnics;
/* Fast path specifics */
--
2.7.4
^ permalink raw reply [flat|nested] 191+ messages in thread
* [dpdk-stable] patch 'net/bnxt: fix per queue stats display in xstats' has been queued to stable release 17.08.1
2017-11-21 13:15 [dpdk-stable] patch 'gro: fix typo in map file' has been queued to stable release 17.08.1 Yuanhan Liu
` (64 preceding siblings ...)
2017-11-21 13:16 ` [dpdk-stable] patch 'net/bnxt: set the hash key size' " Yuanhan Liu
@ 2017-11-21 13:16 ` Yuanhan Liu
2017-11-21 13:16 ` [dpdk-stable] patch 'net/bnxt: fix interrupt handler' " Yuanhan Liu
` (123 subsequent siblings)
189 siblings, 0 replies; 191+ messages in thread
From: Yuanhan Liu @ 2017-11-21 13:16 UTC (permalink / raw)
To: Ajit Khaparde; +Cc: dpdk stable
Hi,
FYI, your patch has been queued to stable release 17.08.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/24/17. So please
shout if anyone has objections.
Thanks.
--yliu
---
>From 1792178b5ab0f54d87feec1d48ee0599695ecd37 Mon Sep 17 00:00:00 2001
From: Ajit Khaparde <ajit.khaparde@broadcom.com>
Date: Thu, 28 Sep 2017 16:43:41 -0500
Subject: [PATCH] net/bnxt: fix per queue stats display in xstats
[ upstream commit 86ff87b0edcb7f28f080c71801f94294924ca6cf ]
While gathering per queue stats, we are overwriting some of the
stats. This causes some of the counters in xstats to be incorrect.
Fixes: 577d3dced0dc ("net/bnxt: refactor the query stats")
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
drivers/net/bnxt/bnxt_hwrm.c | 38 ++++++++++++++++++++------------------
drivers/net/bnxt/bnxt_hwrm.h | 2 +-
drivers/net/bnxt/bnxt_stats.c | 6 ++++--
3 files changed, 25 insertions(+), 21 deletions(-)
diff --git a/drivers/net/bnxt/bnxt_hwrm.c b/drivers/net/bnxt/bnxt_hwrm.c
index ade9627..d8ecb9a 100644
--- a/drivers/net/bnxt/bnxt_hwrm.c
+++ b/drivers/net/bnxt/bnxt_hwrm.c
@@ -2779,7 +2779,7 @@ int bnxt_hwrm_exec_fwd_resp(struct bnxt *bp, uint16_t target_id,
}
int bnxt_hwrm_ctx_qstats(struct bnxt *bp, uint32_t cid, int idx,
- struct rte_eth_stats *stats)
+ struct rte_eth_stats *stats, uint8_t rx)
{
int rc = 0;
struct hwrm_stat_ctx_query_input req = {.req_type = 0};
@@ -2793,23 +2793,25 @@ int bnxt_hwrm_ctx_qstats(struct bnxt *bp, uint32_t cid, int idx,
HWRM_CHECK_RESULT();
- 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_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);
-
- stats->q_errors[idx] = rte_le_to_cpu_64(resp->rx_err_pkts);
- stats->q_errors[idx] += rte_le_to_cpu_64(resp->tx_err_pkts);
- stats->q_errors[idx] += rte_le_to_cpu_64(resp->rx_drop_pkts);
+ 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_err_pkts);
+ stats->q_errors[idx] += rte_le_to_cpu_64(resp->rx_drop_pkts);
+ } 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);
+ stats->q_errors[idx] += rte_le_to_cpu_64(resp->tx_err_pkts);
+ }
+
HWRM_UNLOCK();
diff --git a/drivers/net/bnxt/bnxt_hwrm.h b/drivers/net/bnxt/bnxt_hwrm.h
index 51cd0dd..1ce399f 100644
--- a/drivers/net/bnxt/bnxt_hwrm.h
+++ b/drivers/net/bnxt/bnxt_hwrm.h
@@ -92,7 +92,7 @@ int bnxt_hwrm_stat_ctx_alloc(struct bnxt *bp,
int bnxt_hwrm_stat_ctx_free(struct bnxt *bp,
struct bnxt_cp_ring_info *cpr, unsigned int idx);
int bnxt_hwrm_ctx_qstats(struct bnxt *bp, uint32_t cid, int idx,
- struct rte_eth_stats *stats);
+ struct rte_eth_stats *stats, uint8_t rx);
int bnxt_hwrm_ver_get(struct bnxt *bp);
diff --git a/drivers/net/bnxt/bnxt_stats.c b/drivers/net/bnxt/bnxt_stats.c
index d7d0e35..157334c 100644
--- a/drivers/net/bnxt/bnxt_stats.c
+++ b/drivers/net/bnxt/bnxt_stats.c
@@ -240,14 +240,16 @@ void bnxt_stats_get_op(struct rte_eth_dev *eth_dev,
struct bnxt_rx_queue *rxq = bp->rx_queues[i];
struct bnxt_cp_ring_info *cpr = rxq->cp_ring;
- bnxt_hwrm_ctx_qstats(bp, cpr->hw_stats_ctx_id, i, bnxt_stats);
+ bnxt_hwrm_ctx_qstats(bp, cpr->hw_stats_ctx_id, i,
+ bnxt_stats, 1);
}
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;
- bnxt_hwrm_ctx_qstats(bp, cpr->hw_stats_ctx_id, i, bnxt_stats);
+ bnxt_hwrm_ctx_qstats(bp, cpr->hw_stats_ctx_id, i,
+ bnxt_stats, 0);
}
bnxt_hwrm_func_qstats(bp, 0xffff, bnxt_stats);
bnxt_stats->rx_nombuf = rte_atomic64_read(&bp->rx_mbuf_alloc_fail);
--
2.7.4
^ permalink raw reply [flat|nested] 191+ messages in thread
* [dpdk-stable] patch 'net/bnxt: fix interrupt handler' has been queued to stable release 17.08.1
2017-11-21 13:15 [dpdk-stable] patch 'gro: fix typo in map file' has been queued to stable release 17.08.1 Yuanhan Liu
` (65 preceding siblings ...)
2017-11-21 13:16 ` [dpdk-stable] patch 'net/bnxt: fix per queue stats display in xstats' " Yuanhan Liu
@ 2017-11-21 13:16 ` Yuanhan Liu
2017-11-21 13:16 ` [dpdk-stable] patch 'net/vmxnet3: fix dereference before null check' " Yuanhan Liu
` (122 subsequent siblings)
189 siblings, 0 replies; 191+ messages in thread
From: Yuanhan Liu @ 2017-11-21 13:16 UTC (permalink / raw)
To: Ajit Khaparde; +Cc: dpdk stable
Hi,
FYI, your patch has been queued to stable release 17.08.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/24/17. So please
shout if anyone has objections.
Thanks.
--yliu
---
>From 9d511bba4ba9e231a9bf44dba24968ec34aecdc1 Mon Sep 17 00:00:00 2001
From: Ajit Khaparde <ajit.khaparde@broadcom.com>
Date: Thu, 28 Sep 2017 16:43:42 -0500
Subject: [PATCH] net/bnxt: fix interrupt handler
[ upstream commit f7ecea911ec52fc94aba82cc65211e613f8b56df ]
In some cases the interrupt handler is accessing cpr, which has
already been freed causing segfaults. This patch avoids such accesses.
Fixes: 7bc8e9a227cc ("net/bnxt: support async link notification")
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
drivers/net/bnxt/bnxt_cpr.c | 2 ++
drivers/net/bnxt/bnxt_irq.c | 3 +++
2 files changed, 5 insertions(+)
diff --git a/drivers/net/bnxt/bnxt_cpr.c b/drivers/net/bnxt/bnxt_cpr.c
index 68979bc..26b2755 100644
--- a/drivers/net/bnxt/bnxt_cpr.c
+++ b/drivers/net/bnxt/bnxt_cpr.c
@@ -183,8 +183,10 @@ void bnxt_free_def_cp_ring(struct bnxt *bp)
return;
bnxt_free_ring(cpr->cp_ring_struct);
+ cpr->cp_ring_struct = NULL;
rte_free(cpr->cp_ring_struct);
rte_free(cpr);
+ bp->def_cp_ring = NULL;
}
/* For the default completion ring only */
diff --git a/drivers/net/bnxt/bnxt_irq.c b/drivers/net/bnxt/bnxt_irq.c
index 47cda7e..79a1196 100644
--- a/drivers/net/bnxt/bnxt_irq.c
+++ b/drivers/net/bnxt/bnxt_irq.c
@@ -55,6 +55,9 @@ static void bnxt_int_handler(void *param)
struct cmpl_base *cmp;
while (1) {
+ if (!cpr || !cpr->cp_ring_struct)
+ return;
+
cons = RING_CMP(cpr->cp_ring_struct, raw_cons);
cmp = &cpr->cp_desc_ring[cons];
--
2.7.4
^ permalink raw reply [flat|nested] 191+ messages in thread
* [dpdk-stable] patch 'net/vmxnet3: fix dereference before null check' has been queued to stable release 17.08.1
2017-11-21 13:15 [dpdk-stable] patch 'gro: fix typo in map file' has been queued to stable release 17.08.1 Yuanhan Liu
` (66 preceding siblings ...)
2017-11-21 13:16 ` [dpdk-stable] patch 'net/bnxt: fix interrupt handler' " Yuanhan Liu
@ 2017-11-21 13:16 ` Yuanhan Liu
2017-11-21 13:16 ` [dpdk-stable] patch 'net/bonding: support bifurcated driver in eal' " Yuanhan Liu
` (121 subsequent siblings)
189 siblings, 0 replies; 191+ messages in thread
From: Yuanhan Liu @ 2017-11-21 13:16 UTC (permalink / raw)
To: Michal Jastrzebski; +Cc: Tomasz Kulasek, Ferruh Yigit, dpdk stable
Hi,
FYI, your patch has been queued to stable release 17.08.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/24/17. So please
shout if anyone has objections.
Thanks.
--yliu
---
>From 0367d411ea10651d99c27d083df8c3149dfb266c Mon Sep 17 00:00:00 2001
From: Michal Jastrzebski <michalx.k.jastrzebski@intel.com>
Date: Fri, 29 Sep 2017 15:04:02 +0200
Subject: [PATCH] net/vmxnet3: fix dereference before null check
[ upstream commit 4d0833e6f8d4c9814b0c8fa1a2f8ed2263ae4856 ]
Coverity reports check_after_deref:
Null-checking rq suggests that it may be null, but it
has already been dereferenced on all paths leading to
the check.
This patch removes NULL checking of "rq" from function
vmxnet3_dev_rx_queue_reset as it is already checked against NULL
one level up the callstack (function vmxnet3_dev_clear_queues).
Coverity issue: 143468
Fixes: 5aecdc17a97d ("vmxnet3: fix stop/restart")
Signed-off-by: Tomasz Kulasek <tomaszx.kulasek@intel.com>
Signed-off-by: Michal Jastrzebski <michalx.k.jastrzebski@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
drivers/net/vmxnet3/vmxnet3_rxtx.c | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/drivers/net/vmxnet3/vmxnet3_rxtx.c b/drivers/net/vmxnet3/vmxnet3_rxtx.c
index 680da17..0c37de7 100644
--- a/drivers/net/vmxnet3/vmxnet3_rxtx.c
+++ b/drivers/net/vmxnet3/vmxnet3_rxtx.c
@@ -265,11 +265,9 @@ vmxnet3_dev_rx_queue_reset(void *rxq)
struct vmxnet3_rx_data_ring *data_ring = &rq->data_ring;
int size;
- if (rq != NULL) {
- /* Release both the cmd_rings mbufs */
- for (i = 0; i < VMXNET3_RX_CMDRING_SIZE; i++)
- vmxnet3_rx_cmd_ring_release_mbufs(&rq->cmd_ring[i]);
- }
+ /* Release both the cmd_rings mbufs */
+ for (i = 0; i < VMXNET3_RX_CMDRING_SIZE; i++)
+ vmxnet3_rx_cmd_ring_release_mbufs(&rq->cmd_ring[i]);
ring0 = &rq->cmd_ring[0];
ring1 = &rq->cmd_ring[1];
--
2.7.4
^ permalink raw reply [flat|nested] 191+ messages in thread
* [dpdk-stable] patch 'net/bonding: support bifurcated driver in eal' has been queued to stable release 17.08.1
2017-11-21 13:15 [dpdk-stable] patch 'gro: fix typo in map file' has been queued to stable release 17.08.1 Yuanhan Liu
` (67 preceding siblings ...)
2017-11-21 13:16 ` [dpdk-stable] patch 'net/vmxnet3: fix dereference before null check' " Yuanhan Liu
@ 2017-11-21 13:16 ` Yuanhan Liu
2017-11-21 13:16 ` [dpdk-stable] patch 'net/bnxt: fix number of MAC addresses for VMDq' " Yuanhan Liu
` (120 subsequent siblings)
189 siblings, 0 replies; 191+ messages in thread
From: Yuanhan Liu @ 2017-11-21 13:16 UTC (permalink / raw)
To: Gowrishankar Muthukrishnan; +Cc: Declan Doherty, Gaetan Rivet, dpdk stable
Hi,
FYI, your patch has been queued to stable release 17.08.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/24/17. So please
shout if anyone has objections.
Thanks.
--yliu
---
>From 368f56095acd2d5a64af05e1fc58ff0b1a4b39b4 Mon Sep 17 00:00:00 2001
From: Gowrishankar Muthukrishnan <gowrishankar.m@linux.vnet.ibm.com>
Date: Wed, 20 Sep 2017 23:34:58 +0530
Subject: [PATCH] net/bonding: support bifurcated driver in eal
[ upstream commit c848b518bbc7c1c22205fb0260cdfff1fa1f0595 ]
At present, creating bonding devices using --vdev is broken for PMD like
mlx5 as it is neither UIO nor VFIO based and hence PMD driver is unknown
to find_port_id_by_pci_addr(), as below.
testpmd <EAL args> --vdev 'net_bonding0,mode=1,slave=<PCI>,socket_id=0'
PMD: bond_ethdev_parse_slave_port_kvarg(150) - Invalid slave port value
(<PCI ID>) specified
EAL: Failed to parse slave ports for bonded device net_bonding0
This patch fixes parsing PCI ID from bonding device params by verifying
it in RTE PCI bus, rather than checking dev->kdrv.
Fixes: eac901ce29be ("ethdev: decouple from PCI device")
Signed-off-by: Gowrishankar Muthukrishnan <gowrishankar.m@linux.vnet.ibm.com>
Acked-by: Declan Doherty <declan.doherty@intel.com>
Reviewed-by: Gaetan Rivet <gaetan.rivet@6wind.com>
---
drivers/net/bonding/rte_eth_bond_args.c | 35 ++++++++++++++++++++++-----------
1 file changed, 24 insertions(+), 11 deletions(-)
diff --git a/drivers/net/bonding/rte_eth_bond_args.c b/drivers/net/bonding/rte_eth_bond_args.c
index bb634c6..7c65dda 100644
--- a/drivers/net/bonding/rte_eth_bond_args.c
+++ b/drivers/net/bonding/rte_eth_bond_args.c
@@ -61,16 +61,6 @@ find_port_id_by_pci_addr(const struct rte_pci_addr *pci_addr)
unsigned i;
for (i = 0; i < rte_eth_dev_count(); i++) {
-
- /* Currently populated by rte_eth_copy_pci_info().
- *
- * TODO: Once the PCI bus has arrived we should have a better
- * way to test for being a PCI device or not.
- */
- if (rte_eth_devices[i].data->kdrv == RTE_KDRV_UNKNOWN ||
- rte_eth_devices[i].data->kdrv == RTE_KDRV_NONE)
- continue;
-
pci_dev = RTE_ETH_DEV_TO_PCI(&rte_eth_devices[i]);
eth_pci_addr = &pci_dev->addr;
@@ -98,6 +88,16 @@ find_port_id_by_dev_name(const char *name)
return -1;
}
+static inline int
+pci_addr_cmp(const struct rte_device *dev, const void *_pci_addr)
+{
+ struct rte_pci_device *pdev;
+ const struct rte_pci_addr *paddr = _pci_addr;
+
+ pdev = RTE_DEV_TO_PCI(*(struct rte_device **)(void *)&dev);
+ return rte_eal_compare_pci_addr(&pdev->addr, paddr);
+}
+
/**
* Parses a port identifier string to a port id by pci address, then by name,
* and finally port id.
@@ -106,10 +106,23 @@ static inline int
parse_port_id(const char *port_str)
{
struct rte_pci_addr dev_addr;
+ struct rte_bus *pci_bus;
+ struct rte_device *dev;
int port_id;
+ pci_bus = rte_bus_find_by_name("pci");
+ if (pci_bus == NULL) {
+ RTE_LOG(ERR, PMD, "unable to find PCI bus\n");
+ return -1;
+ }
+
/* try parsing as pci address, physical devices */
- if (eal_parse_pci_DomBDF(port_str, &dev_addr) == 0) {
+ if (pci_bus->parse(port_str, &dev_addr) == 0) {
+ dev = pci_bus->find_device(NULL, pci_addr_cmp, &dev_addr);
+ if (dev == NULL) {
+ RTE_LOG(ERR, PMD, "unable to find PCI device\n");
+ return -1;
+ }
port_id = find_port_id_by_pci_addr(&dev_addr);
if (port_id < 0)
return -1;
--
2.7.4
^ permalink raw reply [flat|nested] 191+ messages in thread
* [dpdk-stable] patch 'net/bnxt: fix number of MAC addresses for VMDq' has been queued to stable release 17.08.1
2017-11-21 13:15 [dpdk-stable] patch 'gro: fix typo in map file' has been queued to stable release 17.08.1 Yuanhan Liu
` (68 preceding siblings ...)
2017-11-21 13:16 ` [dpdk-stable] patch 'net/bonding: support bifurcated driver in eal' " Yuanhan Liu
@ 2017-11-21 13:16 ` Yuanhan Liu
2017-11-21 13:16 ` [dpdk-stable] patch 'net/mlx5: fix overflow of Rx SW ring' " Yuanhan Liu
` (119 subsequent siblings)
189 siblings, 0 replies; 191+ messages in thread
From: Yuanhan Liu @ 2017-11-21 13:16 UTC (permalink / raw)
To: Ajit Khaparde; +Cc: dpdk stable
Hi,
FYI, your patch has been queued to stable release 17.08.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/24/17. So please
shout if anyone has objections.
Thanks.
--yliu
---
>From de076be0eb63f50fbd75bc197edc493b66b7cf8b Mon Sep 17 00:00:00 2001
From: Ajit Khaparde <ajit.khaparde@broadcom.com>
Date: Thu, 5 Oct 2017 10:06:44 -0500
Subject: [PATCH] net/bnxt: fix number of MAC addresses for VMDq
[ upstream commit a2033fda22ab20df22f98978b1ee0c28de5d5797 ]
We were hardcoding the max MAC addresses to 32, while the HW
can support more than that. This was restricting the number of VMDQ
pools that we could support. Use the value obtained from FW instead.
Fixes: 804e746c7b73 ("net/bnxt: add hardware resource manager init code")
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
drivers/net/bnxt/bnxt_ethdev.c | 6 +++---
drivers/net/bnxt/bnxt_hwrm.c | 2 +-
drivers/net/bnxt/bnxt_rxq.c | 23 +++++++++++++++++++----
3 files changed, 23 insertions(+), 8 deletions(-)
diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
index 79448a7..b311179 100644
--- a/drivers/net/bnxt/bnxt_ethdev.c
+++ b/drivers/net/bnxt/bnxt_ethdev.c
@@ -365,7 +365,7 @@ static void bnxt_dev_info_get_op(struct rte_eth_dev *eth_dev,
dev_info->pci_dev = RTE_ETH_DEV_TO_PCI(eth_dev);
/* MAC Specifics */
- dev_info->max_mac_addrs = MAX_NUM_MAC_ADDR;
+ dev_info->max_mac_addrs = bp->max_l2_ctx;
dev_info->max_hash_mac_addrs = 0;
/* PF/VF specifics */
@@ -1765,11 +1765,11 @@ bnxt_dev_init(struct rte_eth_dev *eth_dev)
goto error_free;
}
eth_dev->data->mac_addrs = rte_zmalloc("bnxt_mac_addr_tbl",
- ETHER_ADDR_LEN * MAX_NUM_MAC_ADDR, 0);
+ ETHER_ADDR_LEN * bp->max_l2_ctx, 0);
if (eth_dev->data->mac_addrs == NULL) {
RTE_LOG(ERR, PMD,
"Failed to alloc %u bytes needed to store MAC addr tbl",
- ETHER_ADDR_LEN * MAX_NUM_MAC_ADDR);
+ ETHER_ADDR_LEN * bp->max_l2_ctx);
rc = -ENOMEM;
goto error_free;
}
diff --git a/drivers/net/bnxt/bnxt_hwrm.c b/drivers/net/bnxt/bnxt_hwrm.c
index d8ecb9a..c54e51a 100644
--- a/drivers/net/bnxt/bnxt_hwrm.c
+++ b/drivers/net/bnxt/bnxt_hwrm.c
@@ -259,7 +259,7 @@ int bnxt_hwrm_cfa_l2_set_rx_mask(struct bnxt *bp,
* by ethtool.
*/
if (vnic->flags & BNXT_VNIC_INFO_BCAST)
- mask = HWRM_CFA_L2_SET_RX_MASK_INPUT_MASK_BCAST;
+ mask |= HWRM_CFA_L2_SET_RX_MASK_INPUT_MASK_BCAST;
if (vnic->flags & BNXT_VNIC_INFO_UNTAGGED)
mask |= HWRM_CFA_L2_SET_RX_MASK_INPUT_MASK_VLAN_NONVLAN;
if (vnic->flags & BNXT_VNIC_INFO_PROMISC)
diff --git a/drivers/net/bnxt/bnxt_rxq.c b/drivers/net/bnxt/bnxt_rxq.c
index 690a599..054cb35 100644
--- a/drivers/net/bnxt/bnxt_rxq.c
+++ b/drivers/net/bnxt/bnxt_rxq.c
@@ -60,6 +60,8 @@ void bnxt_free_rxq_stats(struct bnxt_rx_queue *rxq)
int bnxt_mq_rx_configure(struct bnxt *bp)
{
struct rte_eth_conf *dev_conf = &bp->eth_dev->data->dev_conf;
+ const struct rte_eth_vmdq_rx_conf *conf =
+ &dev_conf->rx_adv_conf.vmdq_rx_conf;
unsigned int i, j, nb_q_per_grp = 1, ring_idx = 0;
int start_grp_id, end_grp_id = 1, rc = 0;
struct bnxt_vnic_info *vnic;
@@ -102,9 +104,6 @@ int bnxt_mq_rx_configure(struct bnxt *bp)
/* Multi-queue mode */
if (dev_conf->rxmode.mq_mode & ETH_MQ_RX_VMDQ_DCB_RSS) {
/* VMDq ONLY, VMDq+RSS, VMDq+DCB, VMDq+DCB+RSS */
- const struct rte_eth_vmdq_rx_conf *conf =
- &dev_conf->rx_adv_conf.vmdq_rx_conf;
-
switch (dev_conf->rxmode.mq_mode) {
case ETH_MQ_RX_VMDQ_RSS:
@@ -156,8 +155,13 @@ int bnxt_mq_rx_configure(struct bnxt *bp)
rxq = bp->eth_dev->data->rx_queues[ring_idx];
rxq->vnic = vnic;
}
- if (i == 0)
+ if (i == 0) {
+ if (dev_conf->rxmode.mq_mode & ETH_MQ_RX_VMDQ_DCB) {
+ bp->eth_dev->data->promiscuous = 1;
+ vnic->flags |= BNXT_VNIC_INFO_PROMISC;
+ }
vnic->func_default = true;
+ }
vnic->ff_pool_idx = i;
vnic->start_grp_id = start_grp_id;
vnic->end_grp_id = end_grp_id;
@@ -172,6 +176,17 @@ int bnxt_mq_rx_configure(struct bnxt *bp)
rc = -ENOMEM;
goto err_out;
}
+ for (j = 0; j < conf->nb_pool_maps; j++) {
+ if (conf->pool_map[j].pools & (1UL << i)) {
+ RTE_LOG(ERR, PMD,
+ "Add vlan %u to vmdq pool %u\n",
+ conf->pool_map[j].vlan_id, i);
+
+ filter->l2_ivlan = conf->pool_map[j].vlan_id;
+ filter->enables |=
+ HWRM_CFA_L2_FILTER_ALLOC_INPUT_ENABLES_L2_OVLAN;
+ }
+ }
/*
* TODO: Configure & associate CFA rule for
* each VNIC for each VMDq with MACVLAN, MACVLAN+TC
--
2.7.4
^ permalink raw reply [flat|nested] 191+ messages in thread
* [dpdk-stable] patch 'net/mlx5: fix overflow of Rx SW ring' has been queued to stable release 17.08.1
2017-11-21 13:15 [dpdk-stable] patch 'gro: fix typo in map file' has been queued to stable release 17.08.1 Yuanhan Liu
` (69 preceding siblings ...)
2017-11-21 13:16 ` [dpdk-stable] patch 'net/bnxt: fix number of MAC addresses for VMDq' " Yuanhan Liu
@ 2017-11-21 13:16 ` Yuanhan Liu
2017-11-21 13:16 ` [dpdk-stable] patch 'net/bnxt: fix compilation with -Og' " Yuanhan Liu
` (118 subsequent siblings)
189 siblings, 0 replies; 191+ messages in thread
From: Yuanhan Liu @ 2017-11-21 13:16 UTC (permalink / raw)
To: Yongseok Koh; +Cc: Martin Weiser, dpdk stable
Hi,
FYI, your patch has been queued to stable release 17.08.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/24/17. So please
shout if anyone has objections.
Thanks.
--yliu
---
>From f29ef55dd26f9c00818258ef1d6b47a3b50726fd Mon Sep 17 00:00:00 2001
From: Yongseok Koh <yskoh@mellanox.com>
Date: Thu, 5 Oct 2017 14:37:29 -0700
Subject: [PATCH] net/mlx5: fix overflow of Rx SW ring
[ upstream commit fc048bd52cb7e3382da86629a5aef89f1377aca8 ]
If vectorized Rx burst is short of mbufs in replenishment, Rx SW ring can
overflow as the Rx burst handles 4 packets in a loop. This is because the
function fills SW ring and its mbufs first and checks validity of
each completion later. So, there should be some buffer slots at the tail of
the ring to protect mbufs which are already owned by application.
Fixes: 6cb559d67b83 ("net/mlx5: add vectorized Rx/Tx burst for x86")
Reported-by: Martin Weiser <martin.weiser@allegro-packets.com>
Signed-off-by: Yongseok Koh <yskoh@mellanox.com>
---
drivers/net/mlx5/mlx5_rxtx_vec_sse.c | 13 +++++++++++--
1 file changed, 11 insertions(+), 2 deletions(-)
diff --git a/drivers/net/mlx5/mlx5_rxtx_vec_sse.c b/drivers/net/mlx5/mlx5_rxtx_vec_sse.c
index 6f4e1e8..b5a7657 100644
--- a/drivers/net/mlx5/mlx5_rxtx_vec_sse.c
+++ b/drivers/net/mlx5/mlx5_rxtx_vec_sse.c
@@ -642,6 +642,13 @@ rxq_cq_decompress_v(struct rxq *rxq,
RTE_BUILD_BUG_ON(offsetof(struct rte_mbuf, hash) !=
offsetof(struct rte_mbuf, rx_descriptor_fields1) + 12);
/*
+ * Not to overflow elts array. Decompress next time after mbuf
+ * replenishment.
+ */
+ if (unlikely(mcqe_n + MLX5_VPMD_DESCS_PER_LOOP >
+ (uint16_t)(rxq->rq_ci - rxq->cq_ci)))
+ return;
+ /*
* A. load mCQEs into a 128bit register.
* B. store rearm data to mbuf.
* C. combine data from mCQEs with rx_descriptor_fields1.
@@ -1031,8 +1038,10 @@ rxq_burst_v(struct rxq *rxq, struct rte_mbuf **pkts, uint16_t pkts_n)
}
elts_idx = rxq->rq_pi & q_mask;
elts = &(*rxq->elts)[elts_idx];
- /* Not to overflow pkts array. */
- pkts_n = RTE_ALIGN_FLOOR(pkts_n - rcvd_pkt, MLX5_VPMD_DESCS_PER_LOOP);
+ pkts_n = RTE_MIN(pkts_n - rcvd_pkt,
+ (uint16_t)(rxq->rq_ci - rxq->cq_ci));
+ /* Not to overflow pkts/elts array. */
+ pkts_n = RTE_ALIGN_FLOOR(pkts_n, MLX5_VPMD_DESCS_PER_LOOP);
/* Not to cross queue end. */
pkts_n = RTE_MIN(pkts_n, q_n - elts_idx);
if (!pkts_n)
--
2.7.4
^ permalink raw reply [flat|nested] 191+ messages in thread
* [dpdk-stable] patch 'net/bnxt: fix compilation with -Og' has been queued to stable release 17.08.1
2017-11-21 13:15 [dpdk-stable] patch 'gro: fix typo in map file' has been queued to stable release 17.08.1 Yuanhan Liu
` (70 preceding siblings ...)
2017-11-21 13:16 ` [dpdk-stable] patch 'net/mlx5: fix overflow of Rx SW ring' " Yuanhan Liu
@ 2017-11-21 13:16 ` Yuanhan Liu
2017-11-21 13:16 ` [dpdk-stable] patch 'net/qede: " Yuanhan Liu
` (117 subsequent siblings)
189 siblings, 0 replies; 191+ messages in thread
From: Yuanhan Liu @ 2017-11-21 13:16 UTC (permalink / raw)
To: Olivier Matz; +Cc: dpdk stable
Hi,
FYI, your patch has been queued to stable release 17.08.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/24/17. So please
shout if anyone has objections.
Thanks.
--yliu
---
>From 1b680e7b1780b4251f1700d711e4661e866c43f6 Mon Sep 17 00:00:00 2001
From: Olivier Matz <olivier.matz@6wind.com>
Date: Mon, 11 Sep 2017 17:13:24 +0200
Subject: [PATCH] net/bnxt: fix compilation with -Og
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
[ upstream commit 4a671fdea9f41ecb0a6113b66d21a8eed5ac06ec ]
The compilation with gcc-6.3.0 and EXTRA_CFLAGS=-Og gives the following
error:
CC rte_pmd_bnxt.o
rte_pmd_bnxt.c: In function ‘rte_pmd_bnxt_set_all_queues_drop_en’:
rte_pmd_bnxt.c:116:6: error: ‘rc’ may be used uninitialized in this
function [-Werror=maybe-uninitialized]
int rc;
^~
This can happen if both bp->nr_vnics and bp->pf.active_vfs are 0.
Fix it by initializing rc to -EINVAL.
Fixes: 49947a13ba9e ("net/bnxt: support Tx loopback, set VF MAC and queues drop")
Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
---
drivers/net/bnxt/rte_pmd_bnxt.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/bnxt/rte_pmd_bnxt.c b/drivers/net/bnxt/rte_pmd_bnxt.c
index 0bf5db5..ef4b19b 100644
--- a/drivers/net/bnxt/rte_pmd_bnxt.c
+++ b/drivers/net/bnxt/rte_pmd_bnxt.c
@@ -113,7 +113,7 @@ int rte_pmd_bnxt_set_all_queues_drop_en(uint8_t port, uint8_t on)
struct rte_eth_dev *eth_dev;
struct bnxt *bp;
uint32_t i;
- int rc;
+ int rc = -EINVAL;
RTE_ETH_VALID_PORTID_OR_ERR_RET(port, -ENODEV);
--
2.7.4
^ permalink raw reply [flat|nested] 191+ messages in thread
* [dpdk-stable] patch 'net/qede: fix compilation with -Og' has been queued to stable release 17.08.1
2017-11-21 13:15 [dpdk-stable] patch 'gro: fix typo in map file' has been queued to stable release 17.08.1 Yuanhan Liu
` (71 preceding siblings ...)
2017-11-21 13:16 ` [dpdk-stable] patch 'net/bnxt: fix compilation with -Og' " Yuanhan Liu
@ 2017-11-21 13:16 ` Yuanhan Liu
2017-11-21 13:16 ` [dpdk-stable] patch 'app/test-crypto-perf: fix memory leak' " Yuanhan Liu
` (116 subsequent siblings)
189 siblings, 0 replies; 191+ messages in thread
From: Yuanhan Liu @ 2017-11-21 13:16 UTC (permalink / raw)
To: Olivier Matz; +Cc: Harish Patil, dpdk stable
Hi,
FYI, your patch has been queued to stable release 17.08.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/24/17. So please
shout if anyone has objections.
Thanks.
--yliu
---
>From fb4b23ee976a022196cc50ca5ea3b827ebd2ba62 Mon Sep 17 00:00:00 2001
From: Olivier Matz <olivier.matz@6wind.com>
Date: Mon, 11 Sep 2017 17:13:25 +0200
Subject: [PATCH] net/qede: fix compilation with -Og
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
[ upstream commit f4b7699c88f74aeb9983aa7ef438f8e7e72eb8c5 ]
The compilation with gcc-6.3.0 and EXTRA_CFLAGS=-Og gives the following
error:
CC qede_rxtx.o
qede_rxtx.c: In function ‘qede_start_queues’:
qede_rxtx.c:797:9: error: ‘rc’ may be used uninitialized in this
function [-Werror=maybe-uninitialized]
return rc;
^~
If there is no Rx or Tx queue, rc will not be initialized. Fix it
by initializing rc to -1.
Fixes: 4c4bdadfa9e7 ("net/qede: refactoring multi-queue implementation")
Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Acked-by: Harish Patil <harish.patil@cavium.com>
---
drivers/net/qede/qede_rxtx.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/qede/qede_rxtx.c b/drivers/net/qede/qede_rxtx.c
index 5c3613c..76e24ab 100644
--- a/drivers/net/qede/qede_rxtx.c
+++ b/drivers/net/qede/qede_rxtx.c
@@ -780,7 +780,7 @@ int qede_start_queues(struct rte_eth_dev *eth_dev)
{
struct qede_dev *qdev = QEDE_INIT_QDEV(eth_dev);
uint8_t id;
- int rc;
+ int rc = -1;
for_each_rss(id) {
rc = qede_rx_queue_start(eth_dev, id);
--
2.7.4
^ permalink raw reply [flat|nested] 191+ messages in thread
* [dpdk-stable] patch 'app/test-crypto-perf: fix memory leak' has been queued to stable release 17.08.1
2017-11-21 13:15 [dpdk-stable] patch 'gro: fix typo in map file' has been queued to stable release 17.08.1 Yuanhan Liu
` (72 preceding siblings ...)
2017-11-21 13:16 ` [dpdk-stable] patch 'net/qede: " Yuanhan Liu
@ 2017-11-21 13:16 ` Yuanhan Liu
2017-11-21 13:16 ` [dpdk-stable] patch 'app/test-crypto-perf: fix compilation with -Og' " Yuanhan Liu
` (115 subsequent siblings)
189 siblings, 0 replies; 191+ messages in thread
From: Yuanhan Liu @ 2017-11-21 13:16 UTC (permalink / raw)
To: Olivier Matz; +Cc: Pablo de Lara, dpdk stable
Hi,
FYI, your patch has been queued to stable release 17.08.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/24/17. So please
shout if anyone has objections.
Thanks.
--yliu
---
>From 8eb554cac576df1d51fae42e6a7653f8512c84bb Mon Sep 17 00:00:00 2001
From: Olivier Matz <olivier.matz@6wind.com>
Date: Mon, 11 Sep 2017 17:13:32 +0200
Subject: [PATCH] app/test-crypto-perf: fix memory leak
[ upstream commit 0afa5e393f3acddfb49ffd7bab858bfec6457697 ]
data is allocated but never freed.
Fixes: f8be1786b1b8 ("app/crypto-perf: introduce performance test application")
Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
---
app/test-crypto-perf/cperf_test_verify.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/app/test-crypto-perf/cperf_test_verify.c b/app/test-crypto-perf/cperf_test_verify.c
index a314646..5221f22 100644
--- a/app/test-crypto-perf/cperf_test_verify.c
+++ b/app/test-crypto-perf/cperf_test_verify.c
@@ -386,6 +386,7 @@ cperf_verify_op(struct rte_crypto_op *op,
options->digest_sz);
}
+ rte_free(data);
return !!res;
}
--
2.7.4
^ permalink raw reply [flat|nested] 191+ messages in thread
* [dpdk-stable] patch 'app/test-crypto-perf: fix compilation with -Og' has been queued to stable release 17.08.1
2017-11-21 13:15 [dpdk-stable] patch 'gro: fix typo in map file' has been queued to stable release 17.08.1 Yuanhan Liu
` (73 preceding siblings ...)
2017-11-21 13:16 ` [dpdk-stable] patch 'app/test-crypto-perf: fix memory leak' " Yuanhan Liu
@ 2017-11-21 13:16 ` Yuanhan Liu
2017-11-21 13:16 ` [dpdk-stable] patch 'net/dpaa2: fix the Tx handling of non HW pool bufs' " Yuanhan Liu
` (114 subsequent siblings)
189 siblings, 0 replies; 191+ messages in thread
From: Yuanhan Liu @ 2017-11-21 13:16 UTC (permalink / raw)
To: Olivier Matz; +Cc: Pablo de Lara, dpdk stable
Hi,
FYI, your patch has been queued to stable release 17.08.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/24/17. So please
shout if anyone has objections.
Thanks.
--yliu
---
>From 94d3517148cd41dfa8d458269dec81d79aecba71 Mon Sep 17 00:00:00 2001
From: Olivier Matz <olivier.matz@6wind.com>
Date: Mon, 11 Sep 2017 17:13:33 +0200
Subject: [PATCH] app/test-crypto-perf: fix compilation with -Og
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
[ upstream commit addaac42a0c3904ac6adde7d211e6ad8d43515d0 ]
The compilation with gcc-6.3.0 and EXTRA_CFLAGS=-Og gives the following
error:
CC cperf_test_verify.o
cperf_test_verify.c: In function ‘cperf_verify_op’:
cperf_test_verify.c:382:5: error: ‘auth’ may be used uninitialized
in this function
[-Werror=maybe-uninitialized]
if (auth == 1) {
^
cperf_test_verify.c:371:5: error: ‘cipher’ may be used uninitialized
in this function
[-Werror=maybe-uninitialized]
if (cipher == 1) {
^
cperf_test_verify.c:384:11: error: ‘auth_offset’ may be used
uninitialized in this function
[-Werror=maybe-uninitialized]
res += memcmp(data + auth_offset,
^~~~~~~~~~~~~~~~~~~~~~~~~~
vector->digest.data,
~~~~~~~~~~~~~~~~~~~~
options->digest_sz);
~~~~~~~~~~~~~~~~~~~
cperf_test_verify.c:377:11: error: ‘cipher_offset’ may be used
uninitialized in this function
[-Werror=maybe-uninitialized]
res += memcmp(data + cipher_offset,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~
vector->plaintext.data,
~~~~~~~~~~~~~~~~~~~~~~~
options->test_buffer_size);
~~~~~~~~~~~~~~~~~~~~~~~~~~
There is no default case in the switch statement, so if options->op_type
is an unknown value, the function will use uninitialized values. Fix it
by adding a default.
Fixes: f8be1786b1b8 ("app/crypto-perf: introduce performance test application")
Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
---
app/test-crypto-perf/cperf_test_verify.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/app/test-crypto-perf/cperf_test_verify.c b/app/test-crypto-perf/cperf_test_verify.c
index 5221f22..36be7b8 100644
--- a/app/test-crypto-perf/cperf_test_verify.c
+++ b/app/test-crypto-perf/cperf_test_verify.c
@@ -366,6 +366,9 @@ cperf_verify_op(struct rte_crypto_op *op,
auth = 1;
auth_offset = vector->aad.length + options->test_buffer_size;
break;
+ default:
+ res = 1;
+ goto out;
}
if (cipher == 1) {
@@ -386,6 +389,7 @@ cperf_verify_op(struct rte_crypto_op *op,
options->digest_sz);
}
+out:
rte_free(data);
return !!res;
}
--
2.7.4
^ permalink raw reply [flat|nested] 191+ messages in thread
* [dpdk-stable] patch 'net/dpaa2: fix the Tx handling of non HW pool bufs' has been queued to stable release 17.08.1
2017-11-21 13:15 [dpdk-stable] patch 'gro: fix typo in map file' has been queued to stable release 17.08.1 Yuanhan Liu
` (74 preceding siblings ...)
2017-11-21 13:16 ` [dpdk-stable] patch 'app/test-crypto-perf: fix compilation with -Og' " Yuanhan Liu
@ 2017-11-21 13:16 ` Yuanhan Liu
2017-11-21 13:17 ` [dpdk-stable] patch 'kni: fix SLE version detection' " Yuanhan Liu
` (113 subsequent siblings)
189 siblings, 0 replies; 191+ messages in thread
From: Yuanhan Liu @ 2017-11-21 13:16 UTC (permalink / raw)
To: Hemant Agrawal; +Cc: dpdk stable
Hi,
FYI, your patch has been queued to stable release 17.08.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/24/17. So please
shout if anyone has objections.
Thanks.
--yliu
---
>From 3c9a34563dbbc5b1fb908bbe453c06a1605f56cc Mon Sep 17 00:00:00 2001
From: Hemant Agrawal <hemant.agrawal@nxp.com>
Date: Sat, 16 Sep 2017 16:22:36 +0530
Subject: [PATCH] net/dpaa2: fix the Tx handling of non HW pool bufs
[ upstream commit 790ec226e9378c38b955c7cf1d2a57ef32568efd ]
The current code is sending 8 packet in each internal loop.
In some of the conditions, mbuf is being allocated or freed.
In case of error, the code is returning without taking care of
such buffer. It is better to send already prepared buffer and err
for the current failure only.
Fixes: 9e5f3e6d3658 ("net/dpaa2: handle non-hardware backed buffer pool")
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
---
drivers/net/dpaa2/dpaa2_rxtx.c | 41 ++++++++++++++++++++++++-----------------
1 file changed, 24 insertions(+), 17 deletions(-)
diff --git a/drivers/net/dpaa2/dpaa2_rxtx.c b/drivers/net/dpaa2/dpaa2_rxtx.c
index 3c057a3..b4cde2c 100644
--- a/drivers/net/dpaa2/dpaa2_rxtx.c
+++ b/drivers/net/dpaa2/dpaa2_rxtx.c
@@ -350,7 +350,6 @@ eth_copy_mbuf_to_fd(struct rte_mbuf *mbuf,
if (rte_dpaa2_mbuf_alloc_bulk(
rte_dpaa2_bpid_info[bpid].bp_list->mp, &mb, 1)) {
PMD_TX_LOG(WARNING, "Unable to allocated DPAA2 buffer");
- rte_pktmbuf_free(mbuf);
return -1;
}
m = (struct rte_mbuf *)mb;
@@ -382,8 +381,6 @@ eth_copy_mbuf_to_fd(struct rte_mbuf *mbuf,
rte_dpaa2_bpid_info[DPAA2_GET_FD_BPID(fd)].meta_data_size,
DPAA2_GET_FD_OFFSET(fd),
DPAA2_GET_FD_LEN(fd));
- /*free the original packet */
- rte_pktmbuf_free(mbuf);
return 0;
}
@@ -580,39 +577,35 @@ dpaa2_dev_tx(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)
mp = mi->pool;
}
/* Not a hw_pkt pool allocated frame */
- if (!mp) {
+ if (unlikely(!mp || !priv->bp_list)) {
PMD_TX_LOG(ERR, "err: no bpool attached");
- goto skip_tx;
+ goto send_n_return;
}
+
if (mp->ops_index != priv->bp_list->dpaa2_ops_index) {
PMD_TX_LOG(ERR, "non hw offload bufffer ");
/* alloc should be from the default buffer pool
* attached to this interface
*/
- if (priv->bp_list) {
- bpid = priv->bp_list->buf_pool.bpid;
- } else {
- PMD_TX_LOG(ERR,
- "err: no bpool attached");
- num_tx = 0;
- goto skip_tx;
- }
+ bpid = priv->bp_list->buf_pool.bpid;
+
if (unlikely((*bufs)->nb_segs > 1)) {
PMD_TX_LOG(ERR, "S/G support not added"
" for non hw offload buffer");
- goto skip_tx;
+ goto send_n_return;
}
if (eth_copy_mbuf_to_fd(*bufs,
&fd_arr[loop], bpid)) {
- bufs++;
- continue;
+ goto send_n_return;
}
+ /* free the original packet */
+ rte_pktmbuf_free(*bufs);
} else {
bpid = mempool_to_bpid(mp);
if (unlikely((*bufs)->nb_segs > 1)) {
if (eth_mbuf_to_sg_fd(*bufs,
&fd_arr[loop], bpid))
- goto skip_tx;
+ goto send_n_return;
} else {
eth_mbuf_to_fd(*bufs,
&fd_arr[loop], bpid);
@@ -630,6 +623,20 @@ dpaa2_dev_tx(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)
dpaa2_q->tx_pkts += frames_to_send;
nb_pkts -= frames_to_send;
}
+ return num_tx;
+
+send_n_return:
+ /* send any already prepared fd */
+ if (loop) {
+ unsigned int i = 0;
+
+ while (i < loop) {
+ i += qbman_swp_enqueue_multiple(swp, &eqdesc,
+ &fd_arr[i], loop - i);
+ }
+ num_tx += loop;
+ dpaa2_q->tx_pkts += loop;
+ }
skip_tx:
return num_tx;
}
--
2.7.4
^ permalink raw reply [flat|nested] 191+ messages in thread
* [dpdk-stable] patch 'kni: fix SLE version detection' has been queued to stable release 17.08.1
2017-11-21 13:15 [dpdk-stable] patch 'gro: fix typo in map file' has been queued to stable release 17.08.1 Yuanhan Liu
` (75 preceding siblings ...)
2017-11-21 13:16 ` [dpdk-stable] patch 'net/dpaa2: fix the Tx handling of non HW pool bufs' " Yuanhan Liu
@ 2017-11-21 13:17 ` Yuanhan Liu
2017-11-21 13:17 ` [dpdk-stable] patch 'hash: fix eviction counter' " Yuanhan Liu
` (112 subsequent siblings)
189 siblings, 0 replies; 191+ messages in thread
From: Yuanhan Liu @ 2017-11-21 13:17 UTC (permalink / raw)
To: Nirmoy Das; +Cc: Ferruh Yigit, dpdk stable
Hi,
FYI, your patch has been queued to stable release 17.08.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/24/17. So please
shout if anyone has objections.
Thanks.
--yliu
---
>From fd80f65193324138f0189c8d890de70bf49b5b48 Mon Sep 17 00:00:00 2001
From: Nirmoy Das <ndas@suse.de>
Date: Fri, 11 Aug 2017 18:33:14 +0200
Subject: [PATCH] kni: fix SLE version detection
[ upstream commit d8bc68bcd214b24f0db585a194662588a67a4f81 ]
detect SLE version reverse chronologically as ">=" is being used.
Fixes: 2972254ce163 ("kni: fix build on Suse 12 SP3")
Signed-off-by: Nirmoy Das <ndas@suse.de>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
lib/librte_eal/linuxapp/kni/ethtool/igb/kcompat.h | 24 +++++++++++------------
1 file changed, 12 insertions(+), 12 deletions(-)
diff --git a/lib/librte_eal/linuxapp/kni/ethtool/igb/kcompat.h b/lib/librte_eal/linuxapp/kni/ethtool/igb/kcompat.h
index e0a0354..e38a756 100644
--- a/lib/librte_eal/linuxapp/kni/ethtool/igb/kcompat.h
+++ b/lib/librte_eal/linuxapp/kni/ethtool/igb/kcompat.h
@@ -697,22 +697,22 @@ struct _kc_ethtool_pauseparam {
#define SLE_VERSION(a,b,c) KERNEL_VERSION(a,b,c)
#endif
#ifdef CONFIG_SUSE_KERNEL
-#if ( LINUX_VERSION_CODE == KERNEL_VERSION(2,6,27) )
-/* SLES11 GA is 2.6.27 based */
-#define SLE_VERSION_CODE SLE_VERSION(11,0,0)
-#elif ( LINUX_VERSION_CODE == KERNEL_VERSION(2,6,32) )
-/* SLES11 SP1 is 2.6.32 based */
-#define SLE_VERSION_CODE SLE_VERSION(11,1,0)
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 4, 57))
+/* SLES12SP3 is at least 4.4.57+ based */
+#define SLE_VERSION_CODE SLE_VERSION(12, 3, 0)
+#elif ( LINUX_VERSION_CODE >= KERNEL_VERSION(3,12,28) )
+/* SLES12 is at least 3.12.28+ based */
+#define SLE_VERSION_CODE SLE_VERSION(12,0,0)
#elif ((LINUX_VERSION_CODE >= KERNEL_VERSION(3,0,61)) && \
(LINUX_VERSION_CODE < KERNEL_VERSION(3,1,0)))
/* SLES11 SP3 is at least 3.0.61+ based */
#define SLE_VERSION_CODE SLE_VERSION(11,3,0)
-#elif ( LINUX_VERSION_CODE >= KERNEL_VERSION(3,12,28) )
-/* SLES12 is at least 3.12.28+ based */
-#define SLE_VERSION_CODE SLE_VERSION(12,0,0)
-#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 4, 57))
-/* SLES12SP3 is at least 4.4.57+ based */
-#define SLE_VERSION_CODE SLE_VERSION(12, 3, 0)
+#elif ( LINUX_VERSION_CODE == KERNEL_VERSION(2,6,32) )
+/* SLES11 SP1 is 2.6.32 based */
+#define SLE_VERSION_CODE SLE_VERSION(11,1,0)
+#elif ( LINUX_VERSION_CODE == KERNEL_VERSION(2,6,27) )
+/* SLES11 GA is 2.6.27 based */
+#define SLE_VERSION_CODE SLE_VERSION(11,0,0)
#endif /* LINUX_VERSION_CODE == KERNEL_VERSION(x,y,z) */
#endif /* CONFIG_SUSE_KERNEL */
#ifndef SLE_VERSION_CODE
--
2.7.4
^ permalink raw reply [flat|nested] 191+ messages in thread
* [dpdk-stable] patch 'hash: fix eviction counter' has been queued to stable release 17.08.1
2017-11-21 13:15 [dpdk-stable] patch 'gro: fix typo in map file' has been queued to stable release 17.08.1 Yuanhan Liu
` (76 preceding siblings ...)
2017-11-21 13:17 ` [dpdk-stable] patch 'kni: fix SLE version detection' " Yuanhan Liu
@ 2017-11-21 13:17 ` Yuanhan Liu
2017-11-21 13:17 ` [dpdk-stable] patch 'mem: fix malloc debug config' " Yuanhan Liu
` (111 subsequent siblings)
189 siblings, 0 replies; 191+ messages in thread
From: Yuanhan Liu @ 2017-11-21 13:17 UTC (permalink / raw)
To: Pablo de Lara; +Cc: Bruce Richardson, dpdk stable
Hi,
FYI, your patch has been queued to stable release 17.08.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/24/17. So please
shout if anyone has objections.
Thanks.
--yliu
---
>From b0c63e4bd8d20f48891a29770a0b0955b5fc3d19 Mon Sep 17 00:00:00 2001
From: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Date: Fri, 22 Sep 2017 05:25:43 +0100
Subject: [PATCH] hash: fix eviction counter
[ upstream commit 98b8ec70604065f511aea0a567b039421bc524cc ]
When adding a new entry in a hash table, there is
a maximum number of evictions that can be
performed. When the counter of these evictions reaches
this maximum, the entry cannot be added, as it is considered
that the algorithm has encountered an infinite loop.
The problem with the current implementation, is that this
counter was declared as a static variable.
If there are multiple threads adding entries in the same table
or in different tables, they should access different counters,
one per core and per table.
Therefore, the variable has been modified to be non-static.
Fixes: 243e93a5046f ("hash: fix unlimited cuckoo path")
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
---
lib/librte_hash/rte_cuckoo_hash.c | 13 ++++++-------
1 file changed, 6 insertions(+), 7 deletions(-)
diff --git a/lib/librte_hash/rte_cuckoo_hash.c b/lib/librte_hash/rte_cuckoo_hash.c
index 87b25c0..e69b911 100644
--- a/lib/librte_hash/rte_cuckoo_hash.c
+++ b/lib/librte_hash/rte_cuckoo_hash.c
@@ -417,9 +417,9 @@ rte_hash_reset(struct rte_hash *h)
/* Search for an entry that can be pushed to its alternative location */
static inline int
-make_space_bucket(const struct rte_hash *h, struct rte_hash_bucket *bkt)
+make_space_bucket(const struct rte_hash *h, struct rte_hash_bucket *bkt,
+ unsigned int *nr_pushes)
{
- static unsigned int nr_pushes;
unsigned i, j;
int ret;
uint32_t next_bucket_idx;
@@ -456,15 +456,14 @@ make_space_bucket(const struct rte_hash *h, struct rte_hash_bucket *bkt)
break;
/* All entries have been pushed, so entry cannot be added */
- if (i == RTE_HASH_BUCKET_ENTRIES || nr_pushes > RTE_HASH_MAX_PUSHES)
+ if (i == RTE_HASH_BUCKET_ENTRIES || ++(*nr_pushes) > RTE_HASH_MAX_PUSHES)
return -ENOSPC;
/* Set flag to indicate that this entry is going to be pushed */
bkt->flag[i] = 1;
- nr_pushes++;
/* Need room in alternative bucket to insert the pushed entry */
- ret = make_space_bucket(h, next_bkt[i]);
+ ret = make_space_bucket(h, next_bkt[i], nr_pushes);
/*
* After recursive function.
* Clear flags and insert the pushed entry
@@ -472,7 +471,6 @@ make_space_bucket(const struct rte_hash *h, struct rte_hash_bucket *bkt)
* or return error
*/
bkt->flag[i] = 0;
- nr_pushes = 0;
if (ret >= 0) {
next_bkt[i]->sig_alt[ret] = bkt->sig_current[i];
next_bkt[i]->sig_current[ret] = bkt->sig_alt[i];
@@ -515,6 +513,7 @@ __rte_hash_add_key_with_hash(const struct rte_hash *h, const void *key,
unsigned n_slots;
unsigned lcore_id;
struct lcore_cache *cached_free_slots = NULL;
+ unsigned int nr_pushes = 0;
if (h->add_key == ADD_KEY_MULTIWRITER)
rte_spinlock_lock(h->multiwriter_lock);
@@ -648,7 +647,7 @@ __rte_hash_add_key_with_hash(const struct rte_hash *h, const void *key,
* if successful or return error and
* store the new slot back in the ring
*/
- ret = make_space_bucket(h, prim_bkt);
+ ret = make_space_bucket(h, prim_bkt, &nr_pushes);
if (ret >= 0) {
prim_bkt->sig_current[ret] = sig;
prim_bkt->sig_alt[ret] = alt_hash;
--
2.7.4
^ permalink raw reply [flat|nested] 191+ messages in thread
* [dpdk-stable] patch 'mem: fix malloc debug config' has been queued to stable release 17.08.1
2017-11-21 13:15 [dpdk-stable] patch 'gro: fix typo in map file' has been queued to stable release 17.08.1 Yuanhan Liu
` (77 preceding siblings ...)
2017-11-21 13:17 ` [dpdk-stable] patch 'hash: fix eviction counter' " Yuanhan Liu
@ 2017-11-21 13:17 ` Yuanhan Liu
2017-11-21 13:17 ` [dpdk-stable] patch 'mem: fix malloc element free in debug mode' " Yuanhan Liu
` (110 subsequent siblings)
189 siblings, 0 replies; 191+ messages in thread
From: Yuanhan Liu @ 2017-11-21 13:17 UTC (permalink / raw)
To: Xueming Li; +Cc: Sergio Gonzalez Monroy, dpdk stable
Hi,
FYI, your patch has been queued to stable release 17.08.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/24/17. So please
shout if anyone has objections.
Thanks.
--yliu
---
>From 93c4fe47db3526d01cae4acc49410c63ec54c805 Mon Sep 17 00:00:00 2001
From: Xueming Li <xuemingl@mellanox.com>
Date: Sat, 9 Sep 2017 15:33:18 +0800
Subject: [PATCH] mem: fix malloc debug config
[ upstream commit 3cd4e0e88349510413c90e2602c8fd7a14cfe6ab ]
This patch replaces broken macro RTE_LIBRTE_MALLOC_DEBUG with
RTE_MALLOC_DEBUG.
Fixes: af75078fece3 ("first public release")
Signed-off-by: Xueming Li <xuemingl@mellanox.com>
Acked-by: Sergio Gonzalez Monroy <sergio.gonzalez.monroy@intel.com>
---
lib/librte_eal/common/malloc_elem.h | 4 ++--
test/test/test_malloc.c | 12 +++++-------
2 files changed, 7 insertions(+), 9 deletions(-)
diff --git a/lib/librte_eal/common/malloc_elem.h b/lib/librte_eal/common/malloc_elem.h
index f04b2d1..ce39129 100644
--- a/lib/librte_eal/common/malloc_elem.h
+++ b/lib/librte_eal/common/malloc_elem.h
@@ -53,13 +53,13 @@ struct malloc_elem {
volatile enum elem_state state;
uint32_t pad;
size_t size;
-#ifdef RTE_LIBRTE_MALLOC_DEBUG
+#ifdef RTE_MALLOC_DEBUG
uint64_t header_cookie; /* Cookie marking start of data */
/* trailer cookie at start + size */
#endif
} __rte_cache_aligned;
-#ifndef RTE_LIBRTE_MALLOC_DEBUG
+#ifndef RTE_MALLOC_DEBUG
static const unsigned MALLOC_ELEM_TRAILER_LEN = 0;
/* dummy function - just check if pointer is non-null */
diff --git a/test/test/test_malloc.c b/test/test/test_malloc.c
index 013fd44..cee6469 100644
--- a/test/test/test_malloc.c
+++ b/test/test/test_malloc.c
@@ -108,8 +108,7 @@ test_align_overlap_per_lcore(__attribute__((unused)) void *arg)
}
for(j = 0; j < 1000 ; j++) {
if( *(char *)p1 != 0) {
- printf("rte_zmalloc didn't zero"
- "the allocated memory\n");
+ printf("rte_zmalloc didn't zero the allocated memory\n");
ret = -1;
}
}
@@ -180,8 +179,7 @@ test_reordered_free_per_lcore(__attribute__((unused)) void *arg)
}
for(j = 0; j < 1000 ; j++) {
if( *(char *)p1 != 0) {
- printf("rte_zmalloc didn't zero"
- "the allocated memory\n");
+ printf("rte_zmalloc didn't zero the allocated memory\n");
ret = -1;
}
}
@@ -293,7 +291,7 @@ test_multi_alloc_statistics(void)
struct rte_malloc_socket_stats pre_stats, post_stats ,first_stats, second_stats;
size_t size = 2048;
int align = 1024;
-#ifndef RTE_LIBRTE_MALLOC_DEBUG
+#ifndef RTE_MALLOC_DEBUG
int trailer_size = 0;
#else
int trailer_size = RTE_CACHE_LINE_SIZE;
@@ -623,7 +621,7 @@ test_rte_malloc_validate(void)
const size_t request_size = 1024;
size_t allocated_size;
char *data_ptr = rte_malloc(NULL, request_size, RTE_CACHE_LINE_SIZE);
-#ifdef RTE_LIBRTE_MALLOC_DEBUG
+#ifdef RTE_MALLOC_DEBUG
int retval;
char *over_write_vals = NULL;
#endif
@@ -645,7 +643,7 @@ test_rte_malloc_validate(void)
if (allocated_size < request_size)
err_return();
-#ifdef RTE_LIBRTE_MALLOC_DEBUG
+#ifdef RTE_MALLOC_DEBUG
/****** change the header to be bad */
char save_buf[64];
--
2.7.4
^ permalink raw reply [flat|nested] 191+ messages in thread
* [dpdk-stable] patch 'mem: fix malloc element free in debug mode' has been queued to stable release 17.08.1
2017-11-21 13:15 [dpdk-stable] patch 'gro: fix typo in map file' has been queued to stable release 17.08.1 Yuanhan Liu
` (78 preceding siblings ...)
2017-11-21 13:17 ` [dpdk-stable] patch 'mem: fix malloc debug config' " Yuanhan Liu
@ 2017-11-21 13:17 ` Yuanhan Liu
2017-11-21 13:17 ` [dpdk-stable] patch 'eal: copy raw strings taken from command line' " Yuanhan Liu
` (109 subsequent siblings)
189 siblings, 0 replies; 191+ messages in thread
From: Yuanhan Liu @ 2017-11-21 13:17 UTC (permalink / raw)
To: Xueming Li; +Cc: Sergio Gonzalez Monroy, dpdk stable
Hi,
FYI, your patch has been queued to stable release 17.08.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/24/17. So please
shout if anyone has objections.
Thanks.
--yliu
---
>From 3f0357d07cf365f5406df0cc236b08a4060498cb Mon Sep 17 00:00:00 2001
From: Xueming Li <xuemingl@mellanox.com>
Date: Sat, 9 Sep 2017 15:33:19 +0800
Subject: [PATCH] mem: fix malloc element free in debug mode
[ upstream commit 41baec55a81467d7733217cd6f81a94e2916348c ]
malloc_elem_free() is clearing(setting to 0) the trailer cookie when
RTE_MALLOC_DEBUG is enabled. In case of joining free neighbor element,
part of joined memory is not getting cleared due to missing the length
of trailer cookie in the middle.
This patch fixes calculation of free memory length to be cleared in
malloc_elem_free() by including trailer cookie.
Fixes: af75078fece3 ("first public release")
Signed-off-by: Xueming Li <xuemingl@mellanox.com>
Acked-by: Sergio Gonzalez Monroy <sergio.gonzalez.monroy@intel.com>
---
lib/librte_eal/common/malloc_elem.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/lib/librte_eal/common/malloc_elem.c b/lib/librte_eal/common/malloc_elem.c
index 1507690..889dffd 100644
--- a/lib/librte_eal/common/malloc_elem.c
+++ b/lib/librte_eal/common/malloc_elem.c
@@ -275,14 +275,14 @@ malloc_elem_free(struct malloc_elem *elem)
return -1;
rte_spinlock_lock(&(elem->heap->lock));
- size_t sz = elem->size - sizeof(*elem);
+ size_t sz = elem->size - sizeof(*elem) - MALLOC_ELEM_TRAILER_LEN;
uint8_t *ptr = (uint8_t *)&elem[1];
struct malloc_elem *next = RTE_PTR_ADD(elem, elem->size);
if (next->state == ELEM_FREE){
/* remove from free list, join to this one */
elem_free_list_remove(next);
join_elem(elem, next);
- sz += sizeof(*elem);
+ sz += (sizeof(*elem) + MALLOC_ELEM_TRAILER_LEN);
}
/* check if previous element is free, if so join with it and return,
@@ -291,8 +291,8 @@ malloc_elem_free(struct malloc_elem *elem)
if (elem->prev != NULL && elem->prev->state == ELEM_FREE) {
elem_free_list_remove(elem->prev);
join_elem(elem->prev, elem);
- sz += sizeof(*elem);
- ptr -= sizeof(*elem);
+ sz += (sizeof(*elem) + MALLOC_ELEM_TRAILER_LEN);
+ ptr -= (sizeof(*elem) + MALLOC_ELEM_TRAILER_LEN);
elem = elem->prev;
}
malloc_elem_free_list_insert(elem);
--
2.7.4
^ permalink raw reply [flat|nested] 191+ messages in thread
* [dpdk-stable] patch 'eal: copy raw strings taken from command line' has been queued to stable release 17.08.1
2017-11-21 13:15 [dpdk-stable] patch 'gro: fix typo in map file' has been queued to stable release 17.08.1 Yuanhan Liu
` (79 preceding siblings ...)
2017-11-21 13:17 ` [dpdk-stable] patch 'mem: fix malloc element free in debug mode' " Yuanhan Liu
@ 2017-11-21 13:17 ` Yuanhan Liu
2017-11-21 13:17 ` [dpdk-stable] patch 'net/virtio: revert not claiming LRO support' " Yuanhan Liu
` (108 subsequent siblings)
189 siblings, 0 replies; 191+ messages in thread
From: Yuanhan Liu @ 2017-11-21 13:17 UTC (permalink / raw)
To: Patrick MacArthur; +Cc: Sergio Gonzalez Monroy, dpdk stable
Hi,
FYI, your patch has been queued to stable release 17.08.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/24/17. So please
shout if anyone has objections.
Thanks.
--yliu
---
>From fc780b6246c648e32a290368f829909bfc0bc735 Mon Sep 17 00:00:00 2001
From: Patrick MacArthur <patrick@patrickmacarthur.net>
Date: Fri, 4 Aug 2017 14:53:57 -0400
Subject: [PATCH] eal: copy raw strings taken from command line
[ upstream commit e3f141879ef480c9e72e95d179c0879aed461406 ]
Normally, command line argument strings are considered immutable, but
SPDK [1] and urdma [2] construct argv arrays to pass to rte_eal_init().
These strings are allocated using malloc() and freed after DPDK
initialization with free(). However, in the case of --file-prefix and
--huge-dir, DPDK takes the pointer to these strings in argv directly. If
a secondary process calls rte_eal_pci_probe() after rte_eal_init()
returns, as is done by SPDK, this causes a use-after-free error because
the strings have been freed by the calling code immediately after
rte_eal_init() returns.
This problem was observed when running SPDK example programs as a
secondary process and causes the secondary processes to fail:
Starting DPDK 16.11.1 initialization...
[ DPDK EAL parameters: identify -c 4 --file-prefix=spdk3260 --base-virtaddr=0x1000000000 --proc-type=auto ]
EAL: Detected 40 lcore(s)
EAL: Auto-detected process type: SECONDARY
EAL: Probing VFIO support...
EAL: VFIO support initialized
EAL: PCI device 0000:81:00.0 on NUMA socket 1
EAL: probe driver: 8086:953 spdk_nvme
EAL: cannot connect to primary process!
EAL: Error - exiting with code: 1
Cause: Requested device 0000:81:00.0 cannot be used
Running strace shows that the file prefix has been zero'd out by the
time that the secondary process attempts to probe the NVMe device.
The use-after-free errors can be easily detected with valgrind:
==8489== Invalid read of size 1
==8489== at 0x4C30D22: strlen (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==8489== by 0x58DB955: vfprintf (vfprintf.c:1637)
==8489== by 0x59A4685: __vsnprintf_chk (vsnprintf_chk.c:63)
==8489== by 0x59A45E7: __snprintf_chk (snprintf_chk.c:34)
==8489== by 0x1246AB: get_socket_path.constprop.0 (in /home/pmacarth/src/spdk/examples/nvme/identify/identify)
==8489== by 0x124B09: vfio_mp_sync_connect_to_primary (in /home/pmacarth/src/spdk/examples/nvme/identify/identify)
==8489== by 0x123BE4: vfio_get_group_fd.part.1 (in /home/pmacarth/src/spdk/examples/nvme/identify/identify)
==8489== by 0x124366: vfio_setup_device (in /home/pmacarth/src/spdk/examples/nvme/identify/identify)
==8489== by 0x126C8A: pci_vfio_map_resource (in /home/pmacarth/src/spdk/examples/nvme/identify/identify)
==8489== by 0x12B115: pci_probe_all_drivers.part.0 (in /home/pmacarth/src/spdk/examples/nvme/identify/identify)
==8489== by 0x12B596: rte_eal_pci_probe (in /home/pmacarth/src/spdk/examples/nvme/identify/identify)
==8489== by 0x11D5B5: spdk_pci_enumerate (pci.c:147)
==8489== Address 0x63f362e is 14 bytes inside a block of size 32 free'd
==8489== at 0x4C2ED5B: free (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==8489== by 0x11E6FB: spdk_free_args (init.c:136)
==8489== by 0x11EBF5: spdk_env_init (init.c:309)
==8489== by 0x10D2AA: main (identify.c:976)
==8489== Block was alloc'd at
==8489== at 0x4C2DB2F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==8489== by 0x11E7D7: _sprintf_alloc (init.c:76)
==8489== by 0x11EA78: spdk_build_eal_cmdline (init.c:251)
==8489== by 0x11EA78: spdk_env_init (init.c:282)
==8489== by 0x10D2AA: main (identify.c:976)
==8489==
Fix this by using strdup() to create separate memory buffers for these
strings. Note that this patch will cause valgrind to report memory
leaks of these buffers as there is nowhere to free them. Using static
buffers is an option but would make these strings have a fixed maximum
length whereas there is currently no limit defined by the API.
[1] http://spdk.io
[2] https://github.com/zrlio/urdma
Fixes: af75078fece3 ("first public release")
Signed-off-by: Patrick MacArthur <patrick@patrickmacarthur.net>
Acked-by: Sergio Gonzalez Monroy <sergio.gonzalez.monroy@intel.com>
---
lib/librte_eal/linuxapp/eal/eal.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/lib/librte_eal/linuxapp/eal/eal.c b/lib/librte_eal/linuxapp/eal/eal.c
index 48f12f4..529d2ce 100644
--- a/lib/librte_eal/linuxapp/eal/eal.c
+++ b/lib/librte_eal/linuxapp/eal/eal.c
@@ -569,11 +569,11 @@ eal_parse_args(int argc, char **argv)
break;
case OPT_HUGE_DIR_NUM:
- internal_config.hugepage_dir = optarg;
+ internal_config.hugepage_dir = strdup(optarg);
break;
case OPT_FILE_PREFIX_NUM:
- internal_config.hugefile_prefix = optarg;
+ internal_config.hugefile_prefix = strdup(optarg);
break;
case OPT_SOCKET_MEM_NUM:
--
2.7.4
^ permalink raw reply [flat|nested] 191+ messages in thread
* [dpdk-stable] patch 'net/virtio: revert not claiming LRO support' has been queued to stable release 17.08.1
2017-11-21 13:15 [dpdk-stable] patch 'gro: fix typo in map file' has been queued to stable release 17.08.1 Yuanhan Liu
` (80 preceding siblings ...)
2017-11-21 13:17 ` [dpdk-stable] patch 'eal: copy raw strings taken from command line' " Yuanhan Liu
@ 2017-11-21 13:17 ` Yuanhan Liu
2017-11-21 13:17 ` [dpdk-stable] patch 'net/virtio: revert not claiming IP checksum offload' " Yuanhan Liu
` (107 subsequent siblings)
189 siblings, 0 replies; 191+ messages in thread
From: Yuanhan Liu @ 2017-11-21 13:17 UTC (permalink / raw)
To: Olivier Matz; +Cc: Yuanhan Liu, dpdk stable
Hi,
FYI, your patch has been queued to stable release 17.08.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/24/17. So please
shout if anyone has objections.
Thanks.
--yliu
---
>From 74a7ac7e7037928d40242f541be4aa3938f5ad42 Mon Sep 17 00:00:00 2001
From: Olivier Matz <olivier.matz@6wind.com>
Date: Thu, 7 Sep 2017 14:13:38 +0200
Subject: [PATCH] net/virtio: revert not claiming LRO support
[ upstream commit ec9f3d122a58934a2c52ae984be7114d03234a11 ]
This reverts
commit 701a64622c26 ("net/virtio: do not claim to support LRO")
Setting rxmode->enable_lro is a way to tell the host that the guest is
ok to receive tso packets. From the guest point of view, it is like
enabling LRO on a physical driver.
Fixes: 701a64622c26 ("net/virtio: do not claim to support LRO")
Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Acked-by: Yuanhan Liu <yliu@fridaylinux.org>
---
drivers/net/virtio/virtio_ethdev.c | 21 +++++++++++++++++++--
1 file changed, 19 insertions(+), 2 deletions(-)
diff --git a/drivers/net/virtio/virtio_ethdev.c b/drivers/net/virtio/virtio_ethdev.c
index e320811..eb2d95a 100644
--- a/drivers/net/virtio/virtio_ethdev.c
+++ b/drivers/net/virtio/virtio_ethdev.c
@@ -1659,9 +1659,11 @@ virtio_dev_configure(struct rte_eth_dev *dev)
{
const struct rte_eth_rxmode *rxmode = &dev->data->dev_conf.rxmode;
struct virtio_hw *hw = dev->data->dev_private;
+ uint64_t req_features;
int ret;
PMD_INIT_LOG(DEBUG, "configure");
+ req_features = VIRTIO_PMD_DEFAULT_GUEST_FEATURES;
if (dev->data->dev_conf.intr_conf.rxq) {
ret = virtio_init_device(dev, hw->req_guest_features);
@@ -1675,10 +1677,23 @@ virtio_dev_configure(struct rte_eth_dev *dev)
"virtio does not support IP checksum");
return -ENOTSUP;
}
+ if (rxmode->enable_lro)
+ req_features |=
+ (1ULL << VIRTIO_NET_F_GUEST_TSO4) |
+ (1ULL << VIRTIO_NET_F_GUEST_TSO6);
- if (rxmode->enable_lro) {
+ /* if request features changed, reinit the device */
+ if (req_features != hw->req_guest_features) {
+ ret = virtio_init_device(dev, req_features);
+ if (ret < 0)
+ return ret;
+ }
+
+ if (rxmode->enable_lro &&
+ (!vtpci_with_feature(hw, VIRTIO_NET_F_GUEST_TSO4) ||
+ !vtpci_with_feature(hw, VIRTIO_NET_F_GUEST_TSO4))) {
PMD_DRV_LOG(NOTICE,
- "virtio does not support Large Receive Offload");
+ "Large Receive Offload not available on this host");
return -ENOTSUP;
}
@@ -1904,6 +1919,8 @@ virtio_dev_info_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info)
}
tso_mask = (1ULL << VIRTIO_NET_F_GUEST_TSO4) |
(1ULL << VIRTIO_NET_F_GUEST_TSO6);
+ if ((host_features & tso_mask) == tso_mask)
+ dev_info->rx_offload_capa |= DEV_RX_OFFLOAD_TCP_LRO;
dev_info->tx_offload_capa = 0;
if (hw->guest_features & (1ULL << VIRTIO_NET_F_CSUM)) {
--
2.7.4
^ permalink raw reply [flat|nested] 191+ messages in thread
* [dpdk-stable] patch 'net/virtio: revert not claiming IP checksum offload' has been queued to stable release 17.08.1
2017-11-21 13:15 [dpdk-stable] patch 'gro: fix typo in map file' has been queued to stable release 17.08.1 Yuanhan Liu
` (81 preceding siblings ...)
2017-11-21 13:17 ` [dpdk-stable] patch 'net/virtio: revert not claiming LRO support' " Yuanhan Liu
@ 2017-11-21 13:17 ` Yuanhan Liu
2017-11-21 13:17 ` [dpdk-stable] patch 'net/virtio: fix log levels in configure' " Yuanhan Liu
` (106 subsequent siblings)
189 siblings, 0 replies; 191+ messages in thread
From: Yuanhan Liu @ 2017-11-21 13:17 UTC (permalink / raw)
To: Olivier Matz; +Cc: Yuanhan Liu, dpdk stable
Hi,
FYI, your patch has been queued to stable release 17.08.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/24/17. So please
shout if anyone has objections.
Thanks.
--yliu
---
>From 71208f62d7f569899207f4d77371833bd1b0c12b Mon Sep 17 00:00:00 2001
From: Olivier Matz <olivier.matz@6wind.com>
Date: Thu, 7 Sep 2017 14:13:39 +0200
Subject: [PATCH] net/virtio: revert not claiming IP checksum offload
[ upstream commit d67d86ce5b0a149946f86161e507402ddce2038d ]
This reverts
commit 4dab342b7522 ("net/virtio: do not falsely claim to do IP checksum").
The description of rxmode->hw_ip_checksum is:
hw_ip_checksum : 1, /**< IP/UDP/TCP checksum offload enable. */
Despite its name, this field can be set by an application to enable L3
and L4 checksums. In case of virtio, only L4 checksum is supported and
L3 checksums flags will always be set to "unknown".
Fixes: 4dab342b7522 ("net/virtio: do not falsely claim to do IP checksum")
Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Acked-by: Yuanhan Liu <yliu@fridaylinux.org>
---
drivers/net/virtio/virtio_ethdev.c | 20 ++++++++++++++------
1 file changed, 14 insertions(+), 6 deletions(-)
diff --git a/drivers/net/virtio/virtio_ethdev.c b/drivers/net/virtio/virtio_ethdev.c
index eb2d95a..7a84817 100644
--- a/drivers/net/virtio/virtio_ethdev.c
+++ b/drivers/net/virtio/virtio_ethdev.c
@@ -1671,12 +1671,13 @@ virtio_dev_configure(struct rte_eth_dev *dev)
return ret;
}
- /* Virtio does L4 checksum but not L3! */
- if (rxmode->hw_ip_checksum) {
- PMD_DRV_LOG(NOTICE,
- "virtio does not support IP checksum");
- return -ENOTSUP;
- }
+ /* The name hw_ip_checksum is a bit confusing since it can be
+ * set by the application to request L3 and/or L4 checksums. In
+ * case of virtio, only L4 checksum is supported.
+ */
+ if (rxmode->hw_ip_checksum)
+ req_features |= (1ULL << VIRTIO_NET_F_GUEST_CSUM);
+
if (rxmode->enable_lro)
req_features |=
(1ULL << VIRTIO_NET_F_GUEST_TSO4) |
@@ -1689,6 +1690,13 @@ virtio_dev_configure(struct rte_eth_dev *dev)
return ret;
}
+ if (rxmode->hw_ip_checksum &&
+ !vtpci_with_feature(hw, VIRTIO_NET_F_GUEST_CSUM)) {
+ PMD_DRV_LOG(NOTICE,
+ "rx checksum not available on this host");
+ return -ENOTSUP;
+ }
+
if (rxmode->enable_lro &&
(!vtpci_with_feature(hw, VIRTIO_NET_F_GUEST_TSO4) ||
!vtpci_with_feature(hw, VIRTIO_NET_F_GUEST_TSO4))) {
--
2.7.4
^ permalink raw reply [flat|nested] 191+ messages in thread
* [dpdk-stable] patch 'net/virtio: fix log levels in configure' has been queued to stable release 17.08.1
2017-11-21 13:15 [dpdk-stable] patch 'gro: fix typo in map file' has been queued to stable release 17.08.1 Yuanhan Liu
` (82 preceding siblings ...)
2017-11-21 13:17 ` [dpdk-stable] patch 'net/virtio: revert not claiming IP checksum offload' " Yuanhan Liu
@ 2017-11-21 13:17 ` Yuanhan Liu
2017-11-21 13:17 ` [dpdk-stable] patch 'net/virtio: fix mbuf port for simple Rx function' " Yuanhan Liu
` (105 subsequent siblings)
189 siblings, 0 replies; 191+ messages in thread
From: Yuanhan Liu @ 2017-11-21 13:17 UTC (permalink / raw)
To: Olivier Matz; +Cc: Yuanhan Liu, dpdk stable
Hi,
FYI, your patch has been queued to stable release 17.08.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/24/17. So please
shout if anyone has objections.
Thanks.
--yliu
---
>From 5b64bcfe071ac7cf3d190fdab5b4bf6dc949a52b Mon Sep 17 00:00:00 2001
From: Olivier Matz <olivier.matz@6wind.com>
Date: Thu, 7 Sep 2017 14:13:41 +0200
Subject: [PATCH] net/virtio: fix log levels in configure
[ upstream commit 78fd97c3343ff0811b84bf3461e16b9252ba72fc ]
On error, we should log with error level.
Fixes: 9f4f2846ef76 ("virtio: support vlan filtering")
Fixes: 86d59b21468a ("net/virtio: support LRO")
Fixes: 96cb6711939e ("net/virtio: support Rx checksum offload")
Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Acked-by: Yuanhan Liu <yliu@fridaylinux.org>
---
drivers/net/virtio/virtio_ethdev.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/net/virtio/virtio_ethdev.c b/drivers/net/virtio/virtio_ethdev.c
index 7a84817..8eee3ff 100644
--- a/drivers/net/virtio/virtio_ethdev.c
+++ b/drivers/net/virtio/virtio_ethdev.c
@@ -1692,7 +1692,7 @@ virtio_dev_configure(struct rte_eth_dev *dev)
if (rxmode->hw_ip_checksum &&
!vtpci_with_feature(hw, VIRTIO_NET_F_GUEST_CSUM)) {
- PMD_DRV_LOG(NOTICE,
+ PMD_DRV_LOG(ERR,
"rx checksum not available on this host");
return -ENOTSUP;
}
@@ -1700,7 +1700,7 @@ virtio_dev_configure(struct rte_eth_dev *dev)
if (rxmode->enable_lro &&
(!vtpci_with_feature(hw, VIRTIO_NET_F_GUEST_TSO4) ||
!vtpci_with_feature(hw, VIRTIO_NET_F_GUEST_TSO4))) {
- PMD_DRV_LOG(NOTICE,
+ PMD_DRV_LOG(ERR,
"Large Receive Offload not available on this host");
return -ENOTSUP;
}
@@ -1713,7 +1713,7 @@ virtio_dev_configure(struct rte_eth_dev *dev)
if (rxmode->hw_vlan_filter
&& !vtpci_with_feature(hw, VIRTIO_NET_F_CTRL_VLAN)) {
- PMD_DRV_LOG(NOTICE,
+ PMD_DRV_LOG(ERR,
"vlan filtering not available on this host");
return -ENOTSUP;
}
--
2.7.4
^ permalink raw reply [flat|nested] 191+ messages in thread
* [dpdk-stable] patch 'net/virtio: fix mbuf port for simple Rx function' has been queued to stable release 17.08.1
2017-11-21 13:15 [dpdk-stable] patch 'gro: fix typo in map file' has been queued to stable release 17.08.1 Yuanhan Liu
` (83 preceding siblings ...)
2017-11-21 13:17 ` [dpdk-stable] patch 'net/virtio: fix log levels in configure' " Yuanhan Liu
@ 2017-11-21 13:17 ` Yuanhan Liu
2017-11-21 13:17 ` [dpdk-stable] patch 'net/virtio: fix queue setup consistency' " Yuanhan Liu
` (104 subsequent siblings)
189 siblings, 0 replies; 191+ messages in thread
From: Yuanhan Liu @ 2017-11-21 13:17 UTC (permalink / raw)
To: Olivier Matz; +Cc: Yuanhan Liu, dpdk stable
Hi,
FYI, your patch has been queued to stable release 17.08.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/24/17. So please
shout if anyone has objections.
Thanks.
--yliu
---
>From 139b1028fbc61da9c1f3ae8e93577b21684da0e6 Mon Sep 17 00:00:00 2001
From: Olivier Matz <olivier.matz@6wind.com>
Date: Thu, 7 Sep 2017 14:13:42 +0200
Subject: [PATCH] net/virtio: fix mbuf port for simple Rx function
[ upstream commit 0c4f909c17af3cff8859439436a8fa0b9a9689c5 ]
The mbuf->port was was not properly set for the first received
mbufs. Fix this by setting it in virtqueue_enqueue_recv_refill_simple(),
which is used to enqueue the first mbuf in the ring.
The function virtio_rxq_rearm_vec(), which is used to rearm the ring
with new mbufs, is correct and does not need to be updated.
Fixes: cab0461234e7 ("virtio: fill Rx avail ring with blank mbufs")
Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Acked-by: Yuanhan Liu <yliu@fridaylinux.org>
---
drivers/net/virtio/virtio_rxtx_simple.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/net/virtio/virtio_rxtx_simple.c b/drivers/net/virtio/virtio_rxtx_simple.c
index 542cf80..54ababa 100644
--- a/drivers/net/virtio/virtio_rxtx_simple.c
+++ b/drivers/net/virtio/virtio_rxtx_simple.c
@@ -65,6 +65,8 @@ virtqueue_enqueue_recv_refill_simple(struct virtqueue *vq,
struct vring_desc *start_dp;
uint16_t desc_idx;
+ cookie->port = vq->rxq.port_id;
+
desc_idx = vq->vq_avail_idx & (vq->vq_nentries - 1);
dxp = &vq->vq_descx[desc_idx];
dxp->cookie = (void *)cookie;
--
2.7.4
^ permalink raw reply [flat|nested] 191+ messages in thread
* [dpdk-stable] patch 'net/virtio: fix queue setup consistency' has been queued to stable release 17.08.1
2017-11-21 13:15 [dpdk-stable] patch 'gro: fix typo in map file' has been queued to stable release 17.08.1 Yuanhan Liu
` (84 preceding siblings ...)
2017-11-21 13:17 ` [dpdk-stable] patch 'net/virtio: fix mbuf port for simple Rx function' " Yuanhan Liu
@ 2017-11-21 13:17 ` Yuanhan Liu
2017-11-21 13:17 ` [dpdk-stable] patch 'net/virtio: fix untrusted scalar value' " Yuanhan Liu
` (103 subsequent siblings)
189 siblings, 0 replies; 191+ messages in thread
From: Yuanhan Liu @ 2017-11-21 13:17 UTC (permalink / raw)
To: Olivier Matz; +Cc: Yuanhan Liu, dpdk stable
Hi,
FYI, your patch has been queued to stable release 17.08.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/24/17. So please
shout if anyone has objections.
Thanks.
--yliu
---
>From a2c2c20a2db84f6eab7c7d889c4593a1c68fd0b6 Mon Sep 17 00:00:00 2001
From: Olivier Matz <olivier.matz@6wind.com>
Date: Thu, 7 Sep 2017 14:13:43 +0200
Subject: [PATCH] net/virtio: fix queue setup consistency
[ upstream commit efc83a1e7fc319876835738871bf968e7ed5c935 ]
In rx/tx queue setup functions, some code is executed only if
use_simple_rxtx == 1. The value of this variable can change depending on
the offload flags or sse support. If Rx queue setup is called before Tx
queue setup, it can result in an invalid configuration:
- dev_configure is called: use_simple_rxtx is initialized to 0
- rx queue setup is called: queues are initialized without simple path
support
- tx queue setup is called: use_simple_rxtx switch to 1, and simple
Rx/Tx handlers are selected
Fix this by postponing a part of Rx/Tx queue initialization in
dev_start(), as it was the case in the initial implementation.
Fixes: 48cec290a3d2 ("net/virtio: move queue configure code to proper place")
Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Acked-by: Yuanhan Liu <yliu@fridaylinux.org>
---
drivers/net/virtio/virtio_ethdev.c | 13 +++++++++++++
drivers/net/virtio/virtio_ethdev.h | 6 ++++++
drivers/net/virtio/virtio_rxtx.c | 40 ++++++++++++++++++++++++++++++--------
3 files changed, 51 insertions(+), 8 deletions(-)
diff --git a/drivers/net/virtio/virtio_ethdev.c b/drivers/net/virtio/virtio_ethdev.c
index 8eee3ff..c7888f1 100644
--- a/drivers/net/virtio/virtio_ethdev.c
+++ b/drivers/net/virtio/virtio_ethdev.c
@@ -1737,6 +1737,19 @@ virtio_dev_start(struct rte_eth_dev *dev)
struct virtnet_rx *rxvq;
struct virtnet_tx *txvq __rte_unused;
struct virtio_hw *hw = dev->data->dev_private;
+ int ret;
+
+ /* Finish the initialization of the queues */
+ for (i = 0; i < dev->data->nb_rx_queues; i++) {
+ ret = virtio_dev_rx_queue_setup_finish(dev, i);
+ if (ret < 0)
+ return ret;
+ }
+ for (i = 0; i < dev->data->nb_tx_queues; i++) {
+ ret = virtio_dev_tx_queue_setup_finish(dev, i);
+ if (ret < 0)
+ return ret;
+ }
/* check if lsc interrupt feature is enabled */
if (dev->data->dev_conf.intr_conf.lsc) {
diff --git a/drivers/net/virtio/virtio_ethdev.h b/drivers/net/virtio/virtio_ethdev.h
index c3413c6..2039bc5 100644
--- a/drivers/net/virtio/virtio_ethdev.h
+++ b/drivers/net/virtio/virtio_ethdev.h
@@ -92,10 +92,16 @@ int virtio_dev_rx_queue_setup(struct rte_eth_dev *dev, uint16_t rx_queue_id,
const struct rte_eth_rxconf *rx_conf,
struct rte_mempool *mb_pool);
+int virtio_dev_rx_queue_setup_finish(struct rte_eth_dev *dev,
+ uint16_t rx_queue_id);
+
int virtio_dev_tx_queue_setup(struct rte_eth_dev *dev, uint16_t tx_queue_id,
uint16_t nb_tx_desc, unsigned int socket_id,
const struct rte_eth_txconf *tx_conf);
+int virtio_dev_tx_queue_setup_finish(struct rte_eth_dev *dev,
+ uint16_t tx_queue_id);
+
uint16_t virtio_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts,
uint16_t nb_pkts);
diff --git a/drivers/net/virtio/virtio_rxtx.c b/drivers/net/virtio/virtio_rxtx.c
index e30377c..a32e322 100644
--- a/drivers/net/virtio/virtio_rxtx.c
+++ b/drivers/net/virtio/virtio_rxtx.c
@@ -421,9 +421,6 @@ virtio_dev_rx_queue_setup(struct rte_eth_dev *dev,
struct virtio_hw *hw = dev->data->dev_private;
struct virtqueue *vq = hw->vqs[vtpci_queue_idx];
struct virtnet_rx *rxvq;
- int error, nbufs;
- struct rte_mbuf *m;
- uint16_t desc_idx;
PMD_INIT_FUNC_TRACE();
@@ -440,10 +437,24 @@ virtio_dev_rx_queue_setup(struct rte_eth_dev *dev,
}
dev->data->rx_queues[queue_idx] = rxvq;
+ return 0;
+}
+
+int
+virtio_dev_rx_queue_setup_finish(struct rte_eth_dev *dev, uint16_t queue_idx)
+{
+ uint16_t vtpci_queue_idx = 2 * queue_idx + VTNET_SQ_RQ_QUEUE_IDX;
+ struct virtio_hw *hw = dev->data->dev_private;
+ struct virtqueue *vq = hw->vqs[vtpci_queue_idx];
+ struct virtnet_rx *rxvq = &vq->rxq;
+ struct rte_mbuf *m;
+ uint16_t desc_idx;
+ int error, nbufs;
+
+ PMD_INIT_FUNC_TRACE();
/* Allocate blank mbufs for the each rx descriptor */
nbufs = 0;
- error = ENOSPC;
if (hw->use_simple_rxtx) {
for (desc_idx = 0; desc_idx < vq->vq_nentries;
@@ -534,7 +545,6 @@ virtio_dev_tx_queue_setup(struct rte_eth_dev *dev,
struct virtqueue *vq = hw->vqs[vtpci_queue_idx];
struct virtnet_tx *txvq;
uint16_t tx_free_thresh;
- uint16_t desc_idx;
PMD_INIT_FUNC_TRACE();
@@ -563,9 +573,24 @@ virtio_dev_tx_queue_setup(struct rte_eth_dev *dev,
vq->vq_free_thresh = tx_free_thresh;
- if (hw->use_simple_rxtx) {
- uint16_t mid_idx = vq->vq_nentries >> 1;
+ dev->data->tx_queues[queue_idx] = txvq;
+ return 0;
+}
+
+int
+virtio_dev_tx_queue_setup_finish(struct rte_eth_dev *dev,
+ uint16_t queue_idx)
+{
+ uint8_t vtpci_queue_idx = 2 * queue_idx + VTNET_SQ_TQ_QUEUE_IDX;
+ struct virtio_hw *hw = dev->data->dev_private;
+ struct virtqueue *vq = hw->vqs[vtpci_queue_idx];
+ uint16_t mid_idx = vq->vq_nentries >> 1;
+ struct virtnet_tx *txvq = &vq->txq;
+ uint16_t desc_idx;
+ PMD_INIT_FUNC_TRACE();
+
+ if (hw->use_simple_rxtx) {
for (desc_idx = 0; desc_idx < mid_idx; desc_idx++) {
vq->vq_ring.avail->ring[desc_idx] =
desc_idx + mid_idx;
@@ -587,7 +612,6 @@ virtio_dev_tx_queue_setup(struct rte_eth_dev *dev,
VIRTQUEUE_DUMP(vq);
- dev->data->tx_queues[queue_idx] = txvq;
return 0;
}
--
2.7.4
^ permalink raw reply [flat|nested] 191+ messages in thread
* [dpdk-stable] patch 'net/virtio: fix untrusted scalar value' has been queued to stable release 17.08.1
2017-11-21 13:15 [dpdk-stable] patch 'gro: fix typo in map file' has been queued to stable release 17.08.1 Yuanhan Liu
` (85 preceding siblings ...)
2017-11-21 13:17 ` [dpdk-stable] patch 'net/virtio: fix queue setup consistency' " Yuanhan Liu
@ 2017-11-21 13:17 ` Yuanhan Liu
2017-11-21 13:17 ` [dpdk-stable] patch 'vhost: fix dereferencing invalid pointer after realloc' " Yuanhan Liu
` (102 subsequent siblings)
189 siblings, 0 replies; 191+ messages in thread
From: Yuanhan Liu @ 2017-11-21 13:17 UTC (permalink / raw)
To: Daniel Mrzyglod; +Cc: Jianfeng Tan, Yuanhan Liu, dpdk stable
Hi,
FYI, your patch has been queued to stable release 17.08.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/24/17. So please
shout if anyone has objections.
Thanks.
--yliu
---
>From 22e47fe5e4e470ed2be68f37a9c60191f40d7023 Mon Sep 17 00:00:00 2001
From: Daniel Mrzyglod <danielx.t.mrzyglod@intel.com>
Date: Fri, 22 Sep 2017 17:21:49 +0200
Subject: [PATCH] net/virtio: fix untrusted scalar value
[ upstream commit 7b3249c56e29bec5f710624335bd4246c2a356fb ]
The unscrutinized value may be incorrectly assumed to be within a certain
range by later operations.
In vhost_user_read: An unscrutinized value from an untrusted source used
in a trusted context - the value of sz_payload may be harmfull and we need
limit them to the max value of payload.
Coverity issue: 139601
Fixes: 6a84c37e3975 ("net/virtio-user: add vhost-user adapter layer")
Signed-off-by: Daniel Mrzyglod <danielx.t.mrzyglod@intel.com>
Acked-by: Jianfeng Tan <jianfeng.tan@intel.com>
Acked-by: Yuanhan Liu <yliu@fridaylinux.org>
---
drivers/net/virtio/virtio_user/vhost_user.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/net/virtio/virtio_user/vhost_user.c b/drivers/net/virtio/virtio_user/vhost_user.c
index 4ad7b21..97bd832 100644
--- a/drivers/net/virtio/virtio_user/vhost_user.c
+++ b/drivers/net/virtio/virtio_user/vhost_user.c
@@ -130,6 +130,10 @@ vhost_user_read(int fd, struct vhost_user_msg *msg)
}
sz_payload = msg->size;
+
+ if ((size_t)sz_payload > sizeof(msg->payload))
+ goto fail;
+
if (sz_payload) {
ret = recv(fd, (void *)((char *)msg + sz_hdr), sz_payload, 0);
if (ret < sz_payload) {
--
2.7.4
^ permalink raw reply [flat|nested] 191+ messages in thread
* [dpdk-stable] patch 'vhost: fix dereferencing invalid pointer after realloc' has been queued to stable release 17.08.1
2017-11-21 13:15 [dpdk-stable] patch 'gro: fix typo in map file' has been queued to stable release 17.08.1 Yuanhan Liu
` (86 preceding siblings ...)
2017-11-21 13:17 ` [dpdk-stable] patch 'net/virtio: fix untrusted scalar value' " Yuanhan Liu
@ 2017-11-21 13:17 ` Yuanhan Liu
2017-11-21 13:17 ` [dpdk-stable] patch 'net/virtio-user: fix TAP name string termination' " Yuanhan Liu
` (101 subsequent siblings)
189 siblings, 0 replies; 191+ messages in thread
From: Yuanhan Liu @ 2017-11-21 13:17 UTC (permalink / raw)
To: Maxime Coquelin; +Cc: Yuanhan Liu, dpdk stable
Hi,
FYI, your patch has been queued to stable release 17.08.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/24/17. So please
shout if anyone has objections.
Thanks.
--yliu
---
>From 5b94b247775e9de7849f2df088d407024f348210 Mon Sep 17 00:00:00 2001
From: Maxime Coquelin <maxime.coquelin@redhat.com>
Date: Thu, 5 Oct 2017 10:36:22 +0200
Subject: [PATCH] vhost: fix dereferencing invalid pointer after realloc
[ upstream commit b0098b5e2174bd4ac901043e1c4dcaad1c19d9d5 ]
numa_realloc() reallocates the virtio_net device structure and
updates the vhost_devices[] table with the new pointer if the rings
are allocated different NUMA node.
Problem is that vhost_user_msg_handler() still dereferences old
pointer afterward.
This patch prevents this by fetching again the dev pointer in
vhost_devices[] after messages have been handled.
Fixes: af295ad4698c ("vhost: realloc device and queues to same numa node as vring desc")
Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Acked-by: Yuanhan Liu <yliu@fridaylinux.org>
---
lib/librte_vhost/vhost_user.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/lib/librte_vhost/vhost_user.c b/lib/librte_vhost/vhost_user.c
index ad2e8d3..d8b84e2 100644
--- a/lib/librte_vhost/vhost_user.c
+++ b/lib/librte_vhost/vhost_user.c
@@ -1102,6 +1102,12 @@ vhost_user_msg_handler(int vid, int fd)
}
+ /*
+ * The virtio_net struct might have been reallocated on a different
+ * NUMA node, so dev pointer might no more be valid.
+ */
+ dev = get_device(vid);
+
if (msg.flags & VHOST_USER_NEED_REPLY) {
msg.payload.u64 = !!ret;
msg.size = sizeof(msg.payload.u64);
--
2.7.4
^ permalink raw reply [flat|nested] 191+ messages in thread
* [dpdk-stable] patch 'net/virtio-user: fix TAP name string termination' has been queued to stable release 17.08.1
2017-11-21 13:15 [dpdk-stable] patch 'gro: fix typo in map file' has been queued to stable release 17.08.1 Yuanhan Liu
` (87 preceding siblings ...)
2017-11-21 13:17 ` [dpdk-stable] patch 'vhost: fix dereferencing invalid pointer after realloc' " Yuanhan Liu
@ 2017-11-21 13:17 ` Yuanhan Liu
2017-11-21 13:17 ` [dpdk-stable] patch 'vhost: check poll error code' " Yuanhan Liu
` (100 subsequent siblings)
189 siblings, 0 replies; 191+ messages in thread
From: Yuanhan Liu @ 2017-11-21 13:17 UTC (permalink / raw)
To: Sebastian Basierski; +Cc: Jianfeng Tan, Yuanhan Liu, dpdk stable
Hi,
FYI, your patch has been queued to stable release 17.08.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/24/17. So please
shout if anyone has objections.
Thanks.
--yliu
---
>From ca7e6e85c42cc82e711bf8e2a324e17675d0b9d0 Mon Sep 17 00:00:00 2001
From: Sebastian Basierski <sebastianx.basierski@intel.com>
Date: Tue, 19 Sep 2017 13:41:04 +0200
Subject: [PATCH] net/virtio-user: fix TAP name string termination
[ upstream commit 907d125e2c3a4801558c2f6988e54f427e1b444a ]
Fix calling strncpy with the a maximum size equal of destination
array size.
Coverity issue: 140732
Fixes: e3b434818bbb ("net/virtio-user: support kernel vhost")
Signed-off-by: Sebastian Basierski <sebastianx.basierski@intel.com>
Acked-by: Jianfeng Tan <jianfeng.tan@intel.com>
Acked-by: Yuanhan Liu <yliu@fridaylinux.org>
---
drivers/net/virtio/virtio_user/vhost_kernel_tap.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/virtio/virtio_user/vhost_kernel_tap.c b/drivers/net/virtio/virtio_user/vhost_kernel_tap.c
index f585de8..689a5cf 100644
--- a/drivers/net/virtio/virtio_user/vhost_kernel_tap.c
+++ b/drivers/net/virtio/virtio_user/vhost_kernel_tap.c
@@ -95,9 +95,9 @@ vhost_kernel_open_tap(char **p_ifname, int hdr_size, int req_mq)
ifr.ifr_flags |= IFF_MULTI_QUEUE;
if (*p_ifname)
- strncpy(ifr.ifr_name, *p_ifname, IFNAMSIZ);
+ strncpy(ifr.ifr_name, *p_ifname, IFNAMSIZ - 1);
else
- strncpy(ifr.ifr_name, "tap%d", IFNAMSIZ);
+ strncpy(ifr.ifr_name, "tap%d", IFNAMSIZ - 1);
if (ioctl(tapfd, TUNSETIFF, (void *)&ifr) == -1) {
PMD_DRV_LOG(ERR, "TUNSETIFF failed: %s", strerror(errno));
goto error;
--
2.7.4
^ permalink raw reply [flat|nested] 191+ messages in thread
* [dpdk-stable] patch 'vhost: check poll error code' has been queued to stable release 17.08.1
2017-11-21 13:15 [dpdk-stable] patch 'gro: fix typo in map file' has been queued to stable release 17.08.1 Yuanhan Liu
` (88 preceding siblings ...)
2017-11-21 13:17 ` [dpdk-stable] patch 'net/virtio-user: fix TAP name string termination' " Yuanhan Liu
@ 2017-11-21 13:17 ` Yuanhan Liu
2017-11-21 13:17 ` [dpdk-stable] patch 'timer: use 64-bit specific code on more platforms' " Yuanhan Liu
` (99 subsequent siblings)
189 siblings, 0 replies; 191+ messages in thread
From: Yuanhan Liu @ 2017-11-21 13:17 UTC (permalink / raw)
To: Kuba Kozak; +Cc: Yuanhan Liu, dpdk stable
Hi,
FYI, your patch has been queued to stable release 17.08.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/24/17. So please
shout if anyone has objections.
Thanks.
--yliu
---
>From f9ab15bf230e9d196c3f296094498ac12ce0f1ec Mon Sep 17 00:00:00 2001
From: Kuba Kozak <kubax.kozak@intel.com>
Date: Fri, 22 Sep 2017 14:17:40 +0200
Subject: [PATCH] vhost: check poll error code
[ upstream commit 66a62101240bb714a6d2d5acd39010675251ffec ]
Add return value check for poll() call.
Coverity issue: 140740
Fixes: 59317cef249c ("vhost: allow many vhost-user ports")
Signed-off-by: Kuba Kozak <kubax.kozak@intel.com>
Acked-by: Yuanhan Liu <yliu@fridaylinux.org>
---
lib/librte_vhost/fd_man.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/lib/librte_vhost/fd_man.c b/lib/librte_vhost/fd_man.c
index 2ceacc9..4c6fed4 100644
--- a/lib/librte_vhost/fd_man.c
+++ b/lib/librte_vhost/fd_man.c
@@ -222,6 +222,7 @@ fdset_event_dispatch(void *arg)
int remove1, remove2;
int need_shrink;
struct fdset *pfdset = arg;
+ int val;
if (pfdset == NULL)
return NULL;
@@ -239,7 +240,9 @@ fdset_event_dispatch(void *arg)
numfds = pfdset->num;
pthread_mutex_unlock(&pfdset->fd_mutex);
- poll(pfdset->rwfds, numfds, 1000 /* millisecs */);
+ val = poll(pfdset->rwfds, numfds, 1000 /* millisecs */);
+ if (val < 0)
+ continue;
need_shrink = 0;
for (i = 0; i < numfds; i++) {
--
2.7.4
^ permalink raw reply [flat|nested] 191+ messages in thread
* [dpdk-stable] patch 'timer: use 64-bit specific code on more platforms' has been queued to stable release 17.08.1
2017-11-21 13:15 [dpdk-stable] patch 'gro: fix typo in map file' has been queued to stable release 17.08.1 Yuanhan Liu
` (89 preceding siblings ...)
2017-11-21 13:17 ` [dpdk-stable] patch 'vhost: check poll error code' " Yuanhan Liu
@ 2017-11-21 13:17 ` Yuanhan Liu
2017-11-21 13:17 ` [dpdk-stable] patch 'net/virtio: fix compilation with -Og' " Yuanhan Liu
` (98 subsequent siblings)
189 siblings, 0 replies; 191+ messages in thread
From: Yuanhan Liu @ 2017-11-21 13:17 UTC (permalink / raw)
To: Jerin Jacob; +Cc: dpdk stable
Hi,
FYI, your patch has been queued to stable release 17.08.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/24/17. So please
shout if anyone has objections.
Thanks.
--yliu
---
>From de146b7000d625a8508ea87a662afe66da261ae4 Mon Sep 17 00:00:00 2001
From: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Date: Sun, 13 Aug 2017 18:03:38 +0530
Subject: [PATCH] timer: use 64-bit specific code on more platforms
[ upstream commit 1e36bf301bbfa79efe340faf07e8cdb968ae34bd ]
64bit load and store will be an atomic operation on all the
64bit processors.
Change RTE_ARCH_X86_64 to RTE_ARCH_64 to reflect the case.
Fixes: 9b15ba895b9f ("timer: use a skip list")
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
---
lib/librte_timer/rte_timer.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/librte_timer/rte_timer.c b/lib/librte_timer/rte_timer.c
index 5ee0840..f1f332d 100644
--- a/lib/librte_timer/rte_timer.c
+++ b/lib/librte_timer/rte_timer.c
@@ -525,7 +525,7 @@ void rte_timer_manage(void)
return;
cur_time = rte_get_timer_cycles();
-#ifdef RTE_ARCH_X86_64
+#ifdef RTE_ARCH_64
/* on 64-bit the value cached in the pending_head.expired will be
* updated atomically, so we can consult that for a quick check here
* outside the lock */
--
2.7.4
^ permalink raw reply [flat|nested] 191+ messages in thread
* [dpdk-stable] patch 'net/virtio: fix compilation with -Og' has been queued to stable release 17.08.1
2017-11-21 13:15 [dpdk-stable] patch 'gro: fix typo in map file' has been queued to stable release 17.08.1 Yuanhan Liu
` (90 preceding siblings ...)
2017-11-21 13:17 ` [dpdk-stable] patch 'timer: use 64-bit specific code on more platforms' " Yuanhan Liu
@ 2017-11-21 13:17 ` Yuanhan Liu
2017-11-21 13:17 ` [dpdk-stable] patch 'net/ark: fix loop counter' " Yuanhan Liu
` (97 subsequent siblings)
189 siblings, 0 replies; 191+ messages in thread
From: Yuanhan Liu @ 2017-11-21 13:17 UTC (permalink / raw)
To: Olivier Matz; +Cc: Maxime Coquelin, dpdk stable
Hi,
FYI, your patch has been queued to stable release 17.08.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/24/17. So please
shout if anyone has objections.
Thanks.
--yliu
---
>From 50edf3f9468b82cf6b1f87ca227324740b7c1203 Mon Sep 17 00:00:00 2001
From: Olivier Matz <olivier.matz@6wind.com>
Date: Mon, 11 Sep 2017 17:13:26 +0200
Subject: [PATCH] net/virtio: fix compilation with -Og
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
[ upstream commit 3976f19e13cf7770597b207651c76b1676b9163a ]
The compilation with gcc-6.3.0 and EXTRA_CFLAGS=-Og gives the following
error:
CC virtio_rxtx.o
virtio_rxtx.c: In function ‘virtio_rx_offload’:
virtio_rxtx.c:680:10: error: ‘csum’ may be used uninitialized in
this function [-Werror=maybe-uninitialized]
csum = ~csum;
~~~~~^~~~~~~
The function rte_raw_cksum_mbuf() may indeed return an error, and
in this case, csum won't be initialized. Fix it by initializing csum
to 0.
Fixes: 96cb6711939e ("net/virtio: support Rx checksum offload")
Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
---
drivers/net/virtio/virtio_rxtx.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/virtio/virtio_rxtx.c b/drivers/net/virtio/virtio_rxtx.c
index a32e322..67e12de 100644
--- a/drivers/net/virtio/virtio_rxtx.c
+++ b/drivers/net/virtio/virtio_rxtx.c
@@ -694,7 +694,7 @@ virtio_rx_offload(struct rte_mbuf *m, struct virtio_net_hdr *hdr)
* In case of SCTP, this will be wrong since it's a CRC
* but there's nothing we can do.
*/
- uint16_t csum, off;
+ uint16_t csum = 0, off;
rte_raw_cksum_mbuf(m, hdr->csum_start,
rte_pktmbuf_pkt_len(m) - hdr->csum_start,
--
2.7.4
^ permalink raw reply [flat|nested] 191+ messages in thread
* [dpdk-stable] patch 'net/ark: fix loop counter' has been queued to stable release 17.08.1
2017-11-21 13:15 [dpdk-stable] patch 'gro: fix typo in map file' has been queued to stable release 17.08.1 Yuanhan Liu
` (91 preceding siblings ...)
2017-11-21 13:17 ` [dpdk-stable] patch 'net/virtio: fix compilation with -Og' " Yuanhan Liu
@ 2017-11-21 13:17 ` Yuanhan Liu
2017-11-21 13:17 ` [dpdk-stable] patch 'net/qede/base: fix return code to align with FW' " Yuanhan Liu
` (96 subsequent siblings)
189 siblings, 0 replies; 191+ messages in thread
From: Yuanhan Liu @ 2017-11-21 13:17 UTC (permalink / raw)
To: John Miller; +Cc: dpdk stable
Hi,
FYI, your patch has been queued to stable release 17.08.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/24/17. So please
shout if anyone has objections.
Thanks.
--yliu
---
>From 31a706d95c1d5e9c8bb6b771dd931ee135eb981f Mon Sep 17 00:00:00 2001
From: John Miller <john.miller@atomicrules.com>
Date: Fri, 6 Oct 2017 14:03:27 -0400
Subject: [PATCH] net/ark: fix loop counter
[ upstream commit 22862a0213d3888d4ba22f8ae0d62d5e0c44b683 ]
Change loop counter that should be based on the number
of rx queues, not tx queues. This only affects debug
output.
Fixes: 727b3fe292bc ("net/ark: integrate PMD")
Signed-off-by: John Miller <john.miller@atomicrules.com>
---
drivers/net/ark/ark_ethdev.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ark/ark_ethdev.c b/drivers/net/ark/ark_ethdev.c
index 6db362b..88eb592 100644
--- a/drivers/net/ark/ark_ethdev.c
+++ b/drivers/net/ark/ark_ethdev.c
@@ -693,7 +693,7 @@ eth_ark_dev_stop(struct rte_eth_dev *dev)
ark_udm_dump_stats(ark->udm.v, "Post stop");
ark_udm_dump_perf(ark->udm.v, "Post stop");
- for (i = 0; i < dev->data->nb_tx_queues; i++)
+ for (i = 0; i < dev->data->nb_rx_queues; i++)
eth_ark_rx_dump_queue(dev, i, __func__);
/* Stop the packet checker if it is running */
--
2.7.4
^ permalink raw reply [flat|nested] 191+ messages in thread
* [dpdk-stable] patch 'net/qede/base: fix return code to align with FW' has been queued to stable release 17.08.1
2017-11-21 13:15 [dpdk-stable] patch 'gro: fix typo in map file' has been queued to stable release 17.08.1 Yuanhan Liu
` (92 preceding siblings ...)
2017-11-21 13:17 ` [dpdk-stable] patch 'net/ark: fix loop counter' " Yuanhan Liu
@ 2017-11-21 13:17 ` Yuanhan Liu
2017-11-21 13:17 ` [dpdk-stable] patch 'app/testpmd: fix DDP package filesize detection' " Yuanhan Liu
` (95 subsequent siblings)
189 siblings, 0 replies; 191+ messages in thread
From: Yuanhan Liu @ 2017-11-21 13:17 UTC (permalink / raw)
To: Rasesh Mody; +Cc: dpdk stable
Hi,
FYI, your patch has been queued to stable release 17.08.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/24/17. So please
shout if anyone has objections.
Thanks.
--yliu
---
>From ba8b52e5acd74b87f81d855cb4e638f609bae2e1 Mon Sep 17 00:00:00 2001
From: Rasesh Mody <rasesh.mody@cavium.com>
Date: Fri, 6 Oct 2017 23:31:11 -0700
Subject: [PATCH] net/qede/base: fix return code to align with FW
[ upstream commit da4ff1c39854d1c2d922c4959aac1c6fd6c182b1 ]
This change aligns the PF behavior with that of the L2-fw, so that flows
(to remove an incorrect MAC) for PF and VF could remain the same.
Fixes: 86a2265e59d7 ("qede: add SRIOV support")
Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
---
drivers/net/qede/base/ecore_sriov.c | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/drivers/net/qede/base/ecore_sriov.c b/drivers/net/qede/base/ecore_sriov.c
index db2873e..ef27147 100644
--- a/drivers/net/qede/base/ecore_sriov.c
+++ b/drivers/net/qede/base/ecore_sriov.c
@@ -3272,12 +3272,13 @@ static void ecore_iov_vf_mbx_ucast_filter(struct ecore_hwfn *p_hwfn,
goto out;
}
- /* Update shadow copy of the VF configuration */
+ /* Update shadow copy of the VF configuration. In case shadow indicates
+ * the action should be blocked return success to VF to imitate the
+ * firmware behaviour in such case.
+ */
if (ecore_iov_vf_update_unicast_shadow(p_hwfn, vf, ¶ms) !=
- ECORE_SUCCESS) {
- status = PFVF_STATUS_FAILURE;
+ ECORE_SUCCESS)
goto out;
- }
/* Determine if the unicast filtering is acceptible by PF */
if ((p_bulletin->valid_bitmap & (1 << VLAN_ADDR_FORCED)) &&
--
2.7.4
^ permalink raw reply [flat|nested] 191+ messages in thread
* [dpdk-stable] patch 'app/testpmd: fix DDP package filesize detection' has been queued to stable release 17.08.1
2017-11-21 13:15 [dpdk-stable] patch 'gro: fix typo in map file' has been queued to stable release 17.08.1 Yuanhan Liu
` (93 preceding siblings ...)
2017-11-21 13:17 ` [dpdk-stable] patch 'net/qede/base: fix return code to align with FW' " Yuanhan Liu
@ 2017-11-21 13:17 ` Yuanhan Liu
2017-11-21 13:17 ` [dpdk-stable] patch 'app/testpmd: fix invalid port id parameters' " Yuanhan Liu
` (94 subsequent siblings)
189 siblings, 0 replies; 191+ messages in thread
From: Yuanhan Liu @ 2017-11-21 13:17 UTC (permalink / raw)
To: Daniel Mrzyglod; +Cc: Beilei Xing, dpdk stable
Hi,
FYI, your patch has been queued to stable release 17.08.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/24/17. So please
shout if anyone has objections.
Thanks.
--yliu
---
>From dff8618c859364a3ebf92e7f8956cd81601d0c78 Mon Sep 17 00:00:00 2001
From: Daniel Mrzyglod <danielx.t.mrzyglod@intel.com>
Date: Fri, 18 Aug 2017 16:17:36 +0200
Subject: [PATCH] app/testpmd: fix DDP package filesize detection
[ upstream commit ce6e3f816d847153299e597467a0f104a493cb82 ]
This issue was about passing unsigned argument where should be signed
number.
In reality this is about wrong usage of fseek and ftell to determine
filesize.
This patch is compliant to suggestions from FIO19-C:
"Do not use fseek() and ftell() to compute the size of a regular file"
Coverity issue: 143454
Fixes: a92a5a2cbbff ("app/testpmd: add command for loading DDP")
Signed-off-by: Daniel Mrzyglod <danielx.t.mrzyglod@intel.com>
Acked-by: Beilei Xing <beilei.xing@intel.com>
---
app/test-pmd/config.c | 39 ++++++++++++++++++++-------------------
1 file changed, 20 insertions(+), 19 deletions(-)
diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c
index 14131d6..56d706a 100644
--- a/app/test-pmd/config.c
+++ b/app/test-pmd/config.c
@@ -40,6 +40,10 @@
#include <inttypes.h>
#include <sys/queue.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <fcntl.h>
+#include <unistd.h>
#include <rte_common.h>
#include <rte_byteorder.h>
@@ -3297,46 +3301,43 @@ port_dcb_info_display(uint8_t port_id)
uint8_t *
open_ddp_package_file(const char *file_path, uint32_t *size)
{
- FILE *fh = fopen(file_path, "rb");
- uint32_t pkg_size;
+ int fd = open(file_path, O_RDONLY);
+ off_t pkg_size;
uint8_t *buf = NULL;
int ret = 0;
+ struct stat st_buf;
if (size)
*size = 0;
- if (fh == NULL) {
+ if (fd == -1) {
printf("%s: Failed to open %s\n", __func__, file_path);
return buf;
}
- ret = fseek(fh, 0, SEEK_END);
- if (ret < 0) {
- fclose(fh);
+ if ((fstat(fd, &st_buf) != 0) || (!S_ISREG(st_buf.st_mode))) {
+ close(fd);
printf("%s: File operations failed\n", __func__);
return buf;
}
- pkg_size = ftell(fh);
+ pkg_size = st_buf.st_size;
+ if (pkg_size < 0) {
+ close(fd);
+ printf("%s: File operations failed\n", __func__);
+ return buf;
+ }
buf = (uint8_t *)malloc(pkg_size);
if (!buf) {
- fclose(fh);
+ close(fd);
printf("%s: Failed to malloc memory\n", __func__);
return buf;
}
- ret = fseek(fh, 0, SEEK_SET);
+ ret = read(fd, buf, pkg_size);
if (ret < 0) {
- fclose(fh);
- printf("%s: File seek operation failed\n", __func__);
- close_ddp_package_file(buf);
- return NULL;
- }
-
- ret = fread(buf, 1, pkg_size, fh);
- if (ret < 0) {
- fclose(fh);
+ close(fd);
printf("%s: File read operation failed\n", __func__);
close_ddp_package_file(buf);
return NULL;
@@ -3345,7 +3346,7 @@ open_ddp_package_file(const char *file_path, uint32_t *size)
if (size)
*size = pkg_size;
- fclose(fh);
+ close(fd);
return buf;
}
--
2.7.4
^ permalink raw reply [flat|nested] 191+ messages in thread
* [dpdk-stable] patch 'app/testpmd: fix invalid port id parameters' has been queued to stable release 17.08.1
2017-11-21 13:15 [dpdk-stable] patch 'gro: fix typo in map file' has been queued to stable release 17.08.1 Yuanhan Liu
` (94 preceding siblings ...)
2017-11-21 13:17 ` [dpdk-stable] patch 'app/testpmd: fix DDP package filesize detection' " Yuanhan Liu
@ 2017-11-21 13:17 ` Yuanhan Liu
2017-11-21 13:17 ` [dpdk-stable] patch 'app/testpmd: fix forward port ids setting' " Yuanhan Liu
` (93 subsequent siblings)
189 siblings, 0 replies; 191+ messages in thread
From: Yuanhan Liu @ 2017-11-21 13:17 UTC (permalink / raw)
To: Li Han; +Cc: Ferruh Yigit, dpdk stable
Hi,
FYI, your patch has been queued to stable release 17.08.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/24/17. So please
shout if anyone has objections.
Thanks.
--yliu
---
>From 15a7b723d238a141d3ac43c10cb9ce3078954988 Mon Sep 17 00:00:00 2001
From: Li Han <han.li1@zte.com.cn>
Date: Tue, 22 Aug 2017 13:03:42 +0800
Subject: [PATCH] app/testpmd: fix invalid port id parameters
[ upstream commit d1f1a0fd8a0b3e5b090e64a8d7d895479e959143 ]
in parse_ringnuma_config/parse_portnuma_config functions, port_id
should be less than RTE_MAX_ETHPORTS, but port_id_is_invalid check
assumes that port_id may be RTE_PORT_ALL (65535).
Also fix port_id storage size.
Fixes: 4468635fdd04 ("app/testpmd: forbid actions on invalid port")
Signed-off-by: Li Han <han.li1@zte.com.cn>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
app/test-pmd/parameters.c | 16 ++++++++++------
1 file changed, 10 insertions(+), 6 deletions(-)
diff --git a/app/test-pmd/parameters.c b/app/test-pmd/parameters.c
index 2f7f70f..31023fe 100644
--- a/app/test-pmd/parameters.c
+++ b/app/test-pmd/parameters.c
@@ -393,7 +393,8 @@ parse_portnuma_config(const char *q_arg)
char s[256];
const char *p, *p0 = q_arg;
char *end;
- uint8_t i,port_id,socket_id;
+ uint8_t i, socket_id;
+ portid_t port_id;
unsigned size;
enum fieldnames {
FLD_PORT = 0,
@@ -423,8 +424,9 @@ parse_portnuma_config(const char *q_arg)
if (errno != 0 || end == str_fld[i] || int_fld[i] > 255)
return -1;
}
- port_id = (uint8_t)int_fld[FLD_PORT];
- if (port_id_is_invalid(port_id, ENABLED_WARN)) {
+ port_id = (portid_t)int_fld[FLD_PORT];
+ if (port_id_is_invalid(port_id, ENABLED_WARN) ||
+ port_id == (portid_t)RTE_PORT_ALL) {
printf("Valid port range is [0");
RTE_ETH_FOREACH_DEV(pid)
printf(", %d", pid);
@@ -448,7 +450,8 @@ parse_ringnuma_config(const char *q_arg)
char s[256];
const char *p, *p0 = q_arg;
char *end;
- uint8_t i,port_id,ring_flag,socket_id;
+ uint8_t i, ring_flag, socket_id;
+ portid_t port_id;
unsigned size;
enum fieldnames {
FLD_PORT = 0,
@@ -482,8 +485,9 @@ parse_ringnuma_config(const char *q_arg)
if (errno != 0 || end == str_fld[i] || int_fld[i] > 255)
return -1;
}
- port_id = (uint8_t)int_fld[FLD_PORT];
- if (port_id_is_invalid(port_id, ENABLED_WARN)) {
+ port_id = (portid_t)int_fld[FLD_PORT];
+ if (port_id_is_invalid(port_id, ENABLED_WARN) ||
+ port_id == (portid_t)RTE_PORT_ALL) {
printf("Valid port range is [0");
RTE_ETH_FOREACH_DEV(pid)
printf(", %d", pid);
--
2.7.4
^ permalink raw reply [flat|nested] 191+ messages in thread
* [dpdk-stable] patch 'app/testpmd: fix forward port ids setting' has been queued to stable release 17.08.1
2017-11-21 13:15 [dpdk-stable] patch 'gro: fix typo in map file' has been queued to stable release 17.08.1 Yuanhan Liu
` (95 preceding siblings ...)
2017-11-21 13:17 ` [dpdk-stable] patch 'app/testpmd: fix invalid port id parameters' " Yuanhan Liu
@ 2017-11-21 13:17 ` Yuanhan Liu
2017-11-21 13:17 ` [dpdk-stable] patch 'app/testpmd: fix quitting in container' " Yuanhan Liu
` (92 subsequent siblings)
189 siblings, 0 replies; 191+ messages in thread
From: Yuanhan Liu @ 2017-11-21 13:17 UTC (permalink / raw)
To: Matan Azrad; +Cc: Jingjing Wu, dpdk stable
Hi,
FYI, your patch has been queued to stable release 17.08.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/24/17. So please
shout if anyone has objections.
Thanks.
--yliu
---
>From 11f0bc180d9fc683fd2b39de8d49f4285a61af72 Mon Sep 17 00:00:00 2001
From: Matan Azrad <matan@mellanox.com>
Date: Sun, 3 Sep 2017 16:19:07 +0300
Subject: [PATCH] app/testpmd: fix forward port ids setting
[ upstream commit 65a7360cc3378f5b3edd59f230141462dd98cfe9 ]
The corrupted code didn't check the port availability when
it was trying to set the forward port IDs array.
However, when it was counting the number of ports, the availability
was checked by RTE_ETH_FOREACH_DEV iterator.
Hence, even when ETH devices ports were not in ATTACHED state,
the testpmd tried to forward traffic by them and got segmentation
fault at queue access time.
For example:
When EAL command line parameters include two devices, the first
is failsafe with two sub devices and the second is any device,
testpmd gets two devices by the iterator and sets for forwarding
both, the failsafe device and the failsafe first sub device
(instead of the second sub device).
After the first failsafe sub device state was changed to DEFERRED,
testpmd tries to forward traffic through the deferred device
because it didn't check the port availability in setting time.
The fix uses the RTE_ETH_FOREACH_DEV iterator for the forward
port IDs default setting.
Fixes: cb894d99eceb ("ethdev: add deferred intermediate device state")
Signed-off-by: Matan Azrad <matan@mellanox.com>
Acked-by: Jingjing Wu <jingjing.wu@intel.com>
---
app/test-pmd/testpmd.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c
index 7d40139..f9bdbf8 100644
--- a/app/test-pmd/testpmd.c
+++ b/app/test-pmd/testpmd.c
@@ -463,9 +463,10 @@ static void
set_default_fwd_ports_config(void)
{
portid_t pt_id;
+ int i = 0;
- for (pt_id = 0; pt_id < nb_ports; pt_id++)
- fwd_ports_ids[pt_id] = pt_id;
+ RTE_ETH_FOREACH_DEV(pt_id)
+ fwd_ports_ids[i++] = pt_id;
nb_cfg_ports = nb_ports;
nb_fwd_ports = nb_ports;
--
2.7.4
^ permalink raw reply [flat|nested] 191+ messages in thread
* [dpdk-stable] patch 'app/testpmd: fix quitting in container' has been queued to stable release 17.08.1
2017-11-21 13:15 [dpdk-stable] patch 'gro: fix typo in map file' has been queued to stable release 17.08.1 Yuanhan Liu
` (96 preceding siblings ...)
2017-11-21 13:17 ` [dpdk-stable] patch 'app/testpmd: fix forward port ids setting' " Yuanhan Liu
@ 2017-11-21 13:17 ` Yuanhan Liu
2017-11-21 13:17 ` [dpdk-stable] patch 'net/mlx5: fix SSE Rx support verification' " Yuanhan Liu
` (91 subsequent siblings)
189 siblings, 0 replies; 191+ messages in thread
From: Yuanhan Liu @ 2017-11-21 13:17 UTC (permalink / raw)
To: Phil Yang; +Cc: Jianbo Liu, dpdk stable
Hi,
FYI, your patch has been queued to stable release 17.08.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/24/17. So please
shout if anyone has objections.
Thanks.
--yliu
---
>From 9ed8e0ed8baee86220785abe1e0c1865f1f99507 Mon Sep 17 00:00:00 2001
From: Phil Yang <phil.yang@arm.com>
Date: Fri, 22 Sep 2017 14:21:32 +0800
Subject: [PATCH] app/testpmd: fix quitting in container
[ upstream commit d9a191a00e817739e2a6ecc01178a29918adf199 ]
In container, the process cannot be terminated by SIGINT/SIGTERM when
execute with 'stats-period' option.
Fixed by adding a flag to exit stats period loop after received either
SIGINT or SIGTERM.
Fixes: cfea1f3048d1 ("app/testpmd: print statistics periodically")
Signed-off-by: Phil Yang <phil.yang@arm.com>
Acked-by: Jianbo Liu <jianbo.liu@linaro.org>
---
app/test-pmd/testpmd.c | 13 ++++++++++++-
1 file changed, 12 insertions(+), 1 deletion(-)
diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c
index f9bdbf8..91e94fc 100644
--- a/app/test-pmd/testpmd.c
+++ b/app/test-pmd/testpmd.c
@@ -183,6 +183,13 @@ uint16_t mbuf_data_size = DEFAULT_MBUF_DATA_SIZE; /**< Mbuf data space size. */
uint32_t param_total_num_mbufs = 0; /**< number of mbufs in all pools - if
* specified on command-line. */
uint16_t stats_period; /**< Period to show statistics (disabled by default) */
+
+/*
+ * In container, it cannot terminate the process which running with 'stats-period'
+ * option. Set flag to exit stats period loop after received SIGINT/SIGTERM.
+ */
+uint8_t f_quit;
+
/*
* Configuration of packet segments used by the "txonly" processing engine.
*/
@@ -2278,6 +2285,8 @@ signal_handler(int signum)
rte_latencystats_uninit();
#endif
force_quit();
+ /* Set flag to indicate the force termination. */
+ f_quit = 1;
/* exit with the expected status */
signal(signum, SIG_DFL);
kill(getpid(), signum);
@@ -2395,6 +2404,8 @@ main(int argc, char** argv)
char c;
int rc;
+ f_quit = 0;
+
printf("No commandline core given, start packet forwarding\n");
start_packet_forwarding(tx_first);
if (stats_period != 0) {
@@ -2404,7 +2415,7 @@ main(int argc, char** argv)
/* Convert to number of cycles */
timer_period = stats_period * rte_get_timer_hz();
- while (1) {
+ while (f_quit == 0) {
cur_time = rte_get_timer_cycles();
diff_time += cur_time - prev_time;
--
2.7.4
^ permalink raw reply [flat|nested] 191+ messages in thread
* [dpdk-stable] patch 'net/mlx5: fix SSE Rx support verification' has been queued to stable release 17.08.1
2017-11-21 13:15 [dpdk-stable] patch 'gro: fix typo in map file' has been queued to stable release 17.08.1 Yuanhan Liu
` (97 preceding siblings ...)
2017-11-21 13:17 ` [dpdk-stable] patch 'app/testpmd: fix quitting in container' " Yuanhan Liu
@ 2017-11-21 13:17 ` Yuanhan Liu
2017-11-21 13:17 ` [dpdk-stable] patch 'net/mlx5: fix clang compilation error' " Yuanhan Liu
` (90 subsequent siblings)
189 siblings, 0 replies; 191+ messages in thread
From: Yuanhan Liu @ 2017-11-21 13:17 UTC (permalink / raw)
To: Nélio Laranjeiro; +Cc: Yongseok Koh, dpdk stable
Hi,
FYI, your patch has been queued to stable release 17.08.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/24/17. So please
shout if anyone has objections.
Thanks.
--yliu
---
>From 6dbcb1760d790ab00e6f0bc075f49d0a6c35f67f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?N=C3=A9lio=20Laranjeiro?= <nelio.laranjeiro@6wind.com>
Date: Mon, 9 Oct 2017 16:44:44 +0200
Subject: [PATCH] net/mlx5: fix SSE Rx support verification
[ upstream commit 9c7dd1ccaf6e361f5a1c76dfdfd8713afda33905 ]
The number of queues in DPDK does not means that the array of queue will be
totally filled, those information are uncorrelated. The number of queues
is provided in the port configuration whereas the array is filled by
calling tx/rx_queue_setup(). As this number of queue is not increased or
decrease according to tx/rx_queue_setup() or tx/rx_queue_release(), PMD
must consider a queue may not be initialised in some position of the array.
Fixes: 6cb559d67b83 ("net/mlx5: add vectorized Rx/Tx burst for x86")
Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Acked-by: Yongseok Koh <yskoh@mellanox.com>
---
drivers/net/mlx5/mlx5_rxtx_vec_sse.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/net/mlx5/mlx5_rxtx_vec_sse.c b/drivers/net/mlx5/mlx5_rxtx_vec_sse.c
index b5a7657..56dcd5a 100644
--- a/drivers/net/mlx5/mlx5_rxtx_vec_sse.c
+++ b/drivers/net/mlx5/mlx5_rxtx_vec_sse.c
@@ -1377,6 +1377,8 @@ priv_check_vec_rx_support(struct priv *priv)
for (i = 0; i < priv->rxqs_n; ++i) {
struct rxq *rxq = (*priv->rxqs)[i];
+ if (!rxq)
+ continue;
if (rxq_check_vec_support(rxq) < 0)
break;
}
--
2.7.4
^ permalink raw reply [flat|nested] 191+ messages in thread
* [dpdk-stable] patch 'net/mlx5: fix clang compilation error' has been queued to stable release 17.08.1
2017-11-21 13:15 [dpdk-stable] patch 'gro: fix typo in map file' has been queued to stable release 17.08.1 Yuanhan Liu
` (98 preceding siblings ...)
2017-11-21 13:17 ` [dpdk-stable] patch 'net/mlx5: fix SSE Rx support verification' " Yuanhan Liu
@ 2017-11-21 13:17 ` Yuanhan Liu
2017-11-21 13:17 ` [dpdk-stable] patch 'net/enic: fix assignment' " Yuanhan Liu
` (89 subsequent siblings)
189 siblings, 0 replies; 191+ messages in thread
From: Yuanhan Liu @ 2017-11-21 13:17 UTC (permalink / raw)
To: Nélio Laranjeiro; +Cc: Yongseok Koh, dpdk stable
Hi,
FYI, your patch has been queued to stable release 17.08.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/24/17. So please
shout if anyone has objections.
Thanks.
--yliu
---
>From 06d7391151d805f4a6d4989e6943645a3d3b4e42 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?N=C3=A9lio=20Laranjeiro?= <nelio.laranjeiro@6wind.com>
Date: Mon, 9 Oct 2017 16:44:52 +0200
Subject: [PATCH] net/mlx5: fix clang compilation error
[ upstream commit 35a010ad48cd6aba911f9c05fc7b5d3d86bf2094 ]
drivers/net/mlx5/mlx5_rxq.c:606:6: error: comparison of constant 4
with expression of type 'enum hash_rxq_flow_type' is always true
[-Werror,-Wtautological-constant-out-of-range-compare]
i != (int)RTE_DIM((*priv->hash_rxqs)[0].special_flow);
~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Clang expects to have an index going upto special_flow size which is
defined by MLX5_MAX_SPECIAL_FLOWS and value is 4. Comparing to an
unrelated enum where index my be lower cause this compilation issue.
Fixes: 36351ea34b92 ("net/mlx: fix build with icc")
Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Acked-by: Yongseok Koh <yskoh@mellanox.com>
---
drivers/net/mlx5/mlx5_rxq.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/net/mlx5/mlx5_rxq.c b/drivers/net/mlx5/mlx5_rxq.c
index 74387a7..f6b1d55 100644
--- a/drivers/net/mlx5/mlx5_rxq.c
+++ b/drivers/net/mlx5/mlx5_rxq.c
@@ -614,11 +614,9 @@ priv_allow_flow_type(struct priv *priv, enum hash_rxq_flow_type type)
int
priv_rehash_flows(struct priv *priv)
{
- enum hash_rxq_flow_type i;
+ size_t i;
- for (i = HASH_RXQ_FLOW_TYPE_PROMISC;
- i != RTE_DIM((*priv->hash_rxqs)[0].special_flow);
- ++i)
+ for (i = 0; i != RTE_DIM((*priv->hash_rxqs)[0].special_flow); ++i)
if (!priv_allow_flow_type(priv, i)) {
priv_special_flow_disable(priv, i);
} else {
--
2.7.4
^ permalink raw reply [flat|nested] 191+ messages in thread
* [dpdk-stable] patch 'net/enic: fix assignment' has been queued to stable release 17.08.1
2017-11-21 13:15 [dpdk-stable] patch 'gro: fix typo in map file' has been queued to stable release 17.08.1 Yuanhan Liu
` (99 preceding siblings ...)
2017-11-21 13:17 ` [dpdk-stable] patch 'net/mlx5: fix clang compilation error' " Yuanhan Liu
@ 2017-11-21 13:17 ` Yuanhan Liu
2017-11-21 13:17 ` [dpdk-stable] patch 'net/i40e: fix uninitialized variable' " Yuanhan Liu
` (88 subsequent siblings)
189 siblings, 0 replies; 191+ messages in thread
From: Yuanhan Liu @ 2017-11-21 13:17 UTC (permalink / raw)
To: Aaron Conole; +Cc: John Daley, dpdk stable
Hi,
FYI, your patch has been queued to stable release 17.08.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/24/17. So please
shout if anyone has objections.
Thanks.
--yliu
---
>From 88b1748cc73dc94bc1a8b23a88f7cc7388ba97f7 Mon Sep 17 00:00:00 2001
From: Aaron Conole <aconole@redhat.com>
Date: Tue, 26 Sep 2017 14:53:27 -0400
Subject: [PATCH] net/enic: fix assignment
[ upstream commit e735c8e20b9c727fd60f9ae1fa86114594c6ec76 ]
As it stands, the existing assignment to mbuf has no effect outside of
the function. Prior to this change, the mbuf argument would contain
an invalid address, but it would not be null. After this change, the
caller gets a null mbuf back.
Fixes: 947d860c821f ("enic: improve Rx performance")
Signed-off-by: Aaron Conole <aconole@redhat.com>
Reviewed-by: John Daley <johndale@cisco.com>
---
drivers/net/enic/enic_main.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/enic/enic_main.c b/drivers/net/enic/enic_main.c
index 9b0439b..cac8b66 100644
--- a/drivers/net/enic/enic_main.c
+++ b/drivers/net/enic/enic_main.c
@@ -224,7 +224,7 @@ enic_free_rq_buf(struct rte_mbuf **mbuf)
return;
rte_pktmbuf_free(*mbuf);
- mbuf = NULL;
+ *mbuf = NULL;
}
void enic_init_vnic_resources(struct enic *enic)
--
2.7.4
^ permalink raw reply [flat|nested] 191+ messages in thread
* [dpdk-stable] patch 'net/i40e: fix uninitialized variable' has been queued to stable release 17.08.1
2017-11-21 13:15 [dpdk-stable] patch 'gro: fix typo in map file' has been queued to stable release 17.08.1 Yuanhan Liu
` (100 preceding siblings ...)
2017-11-21 13:17 ` [dpdk-stable] patch 'net/enic: fix assignment' " Yuanhan Liu
@ 2017-11-21 13:17 ` Yuanhan Liu
2017-11-21 13:17 ` [dpdk-stable] patch 'net/bnxt: fix the association of a MACVLAN per VNIC' " Yuanhan Liu
` (87 subsequent siblings)
189 siblings, 0 replies; 191+ messages in thread
From: Yuanhan Liu @ 2017-11-21 13:17 UTC (permalink / raw)
To: Yong Wang; +Cc: Jingjing Wu, dpdk stable
Hi,
FYI, your patch has been queued to stable release 17.08.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/24/17. So please
shout if anyone has objections.
Thanks.
--yliu
---
>From ea9a868c6b4b860deb16e22b03249ba6926def11 Mon Sep 17 00:00:00 2001
From: Yong Wang <wang.yong19@zte.com.cn>
Date: Tue, 10 Oct 2017 07:24:20 -0400
Subject: [PATCH] net/i40e: fix uninitialized variable
[ upstream commit 47cf8373a1792b4a2c49cc03994f479fd4a693a2 ]
In func i40evf_dev_link_update(), "new_link.link_autoneg" is used in
func call i40evf_dev_atomic_write_link_status(), but is uninitialized.
Fixes: 2a73125b7041 ("i40evf: fix link info update")
Signed-off-by: Yong Wang <wang.yong19@zte.com.cn>
Acked-by: Jingjing Wu <jingjing.wu@intel.com>
---
drivers/net/i40e/i40e_ethdev_vf.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/net/i40e/i40e_ethdev_vf.c b/drivers/net/i40e/i40e_ethdev_vf.c
index 6f4eef7..6933cc2 100644
--- a/drivers/net/i40e/i40e_ethdev_vf.c
+++ b/drivers/net/i40e/i40e_ethdev_vf.c
@@ -2289,6 +2289,8 @@ i40evf_dev_link_update(struct rte_eth_dev *dev,
new_link.link_duplex = ETH_LINK_FULL_DUPLEX;
new_link.link_status = vf->link_up ? ETH_LINK_UP :
ETH_LINK_DOWN;
+ new_link.link_autoneg =
+ dev->data->dev_conf.link_speeds & ETH_LINK_SPEED_FIXED;
i40evf_dev_atomic_write_link_status(dev, &new_link);
--
2.7.4
^ permalink raw reply [flat|nested] 191+ messages in thread
* [dpdk-stable] patch 'net/bnxt: fix the association of a MACVLAN per VNIC' has been queued to stable release 17.08.1
2017-11-21 13:15 [dpdk-stable] patch 'gro: fix typo in map file' has been queued to stable release 17.08.1 Yuanhan Liu
` (101 preceding siblings ...)
2017-11-21 13:17 ` [dpdk-stable] patch 'net/i40e: fix uninitialized variable' " Yuanhan Liu
@ 2017-11-21 13:17 ` Yuanhan Liu
2017-11-21 13:17 ` [dpdk-stable] patch 'net/ixgbe: fix Rx queue interrupt mapping in VF' " Yuanhan Liu
` (86 subsequent siblings)
189 siblings, 0 replies; 191+ messages in thread
From: Yuanhan Liu @ 2017-11-21 13:17 UTC (permalink / raw)
To: Ajit Khaparde; +Cc: dpdk stable
Hi,
FYI, your patch has been queued to stable release 17.08.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/24/17. So please
shout if anyone has objections.
Thanks.
--yliu
---
>From 0a6b9b4dbbc85f88fa96b180e0743686ada5ae7e Mon Sep 17 00:00:00 2001
From: Ajit Khaparde <ajit.khaparde@broadcom.com>
Date: Tue, 10 Oct 2017 09:23:03 -0500
Subject: [PATCH] net/bnxt: fix the association of a MACVLAN per VNIC
[ upstream commit 75cd6fb1d901e3f62fa9b5d9e1eba75777f99efa ]
We were not associating a MAC+VLAN per VNIC filter correctly.
This patch fixes that. Also set the VLAN type appropriately.
Fixes: f92735db1e4c ("net/bnxt: add L2 filter alloc/init/free")
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
drivers/net/bnxt/bnxt_hwrm.c | 22 ++++++++++++++++++++++
drivers/net/bnxt/bnxt_rxq.c | 2 +-
2 files changed, 23 insertions(+), 1 deletion(-)
diff --git a/drivers/net/bnxt/bnxt_hwrm.c b/drivers/net/bnxt/bnxt_hwrm.c
index c54e51a..896405c 100644
--- a/drivers/net/bnxt/bnxt_hwrm.c
+++ b/drivers/net/bnxt/bnxt_hwrm.c
@@ -360,7 +360,23 @@ int bnxt_hwrm_set_filter(struct bnxt *bp,
int rc = 0;
struct hwrm_cfa_l2_filter_alloc_input req = {.req_type = 0 };
struct hwrm_cfa_l2_filter_alloc_output *resp = bp->hwrm_cmd_resp_addr;
+ struct rte_eth_conf *dev_conf = &bp->eth_dev->data->dev_conf;
+ const struct rte_eth_vmdq_rx_conf *conf =
+ &dev_conf->rx_adv_conf.vmdq_rx_conf;
uint32_t enables = 0;
+ uint16_t j = dst_id - 1;
+
+ //TODO: Is there a better way to add VLANs to each VNIC in case of VMDQ
+ if (conf->pool_map[j].pools & (1UL << j)) {
+ RTE_LOG(DEBUG, PMD,
+ "Add vlan %u to vmdq pool %u\n",
+ conf->pool_map[j].vlan_id, j);
+
+ filter->l2_ivlan = conf->pool_map[j].vlan_id;
+ filter->enables |=
+ HWRM_CFA_L2_FILTER_ALLOC_INPUT_ENABLES_L2_IVLAN |
+ HWRM_CFA_L2_FILTER_ALLOC_INPUT_ENABLES_L2_IVLAN_MASK;
+ }
if (filter->fw_l2_filter_id != UINT64_MAX)
bnxt_hwrm_clear_filter(bp, filter);
@@ -385,8 +401,14 @@ int bnxt_hwrm_set_filter(struct bnxt *bp,
HWRM_CFA_L2_FILTER_ALLOC_INPUT_ENABLES_L2_OVLAN)
req.l2_ovlan = filter->l2_ovlan;
if (enables &
+ HWRM_CFA_L2_FILTER_ALLOC_INPUT_ENABLES_L2_IVLAN)
+ req.l2_ovlan = filter->l2_ivlan;
+ if (enables &
HWRM_CFA_L2_FILTER_ALLOC_INPUT_ENABLES_L2_OVLAN_MASK)
req.l2_ovlan_mask = filter->l2_ovlan_mask;
+ if (enables &
+ HWRM_CFA_L2_FILTER_ALLOC_INPUT_ENABLES_L2_IVLAN_MASK)
+ req.l2_ovlan_mask = filter->l2_ivlan_mask;
if (enables & HWRM_CFA_L2_FILTER_ALLOC_INPUT_ENABLES_SRC_ID)
req.src_id = rte_cpu_to_le_32(filter->src_id);
if (enables & HWRM_CFA_L2_FILTER_ALLOC_INPUT_ENABLES_SRC_TYPE)
diff --git a/drivers/net/bnxt/bnxt_rxq.c b/drivers/net/bnxt/bnxt_rxq.c
index 054cb35..2665ed5 100644
--- a/drivers/net/bnxt/bnxt_rxq.c
+++ b/drivers/net/bnxt/bnxt_rxq.c
@@ -184,7 +184,7 @@ int bnxt_mq_rx_configure(struct bnxt *bp)
filter->l2_ivlan = conf->pool_map[j].vlan_id;
filter->enables |=
- HWRM_CFA_L2_FILTER_ALLOC_INPUT_ENABLES_L2_OVLAN;
+ HWRM_CFA_L2_FILTER_ALLOC_INPUT_ENABLES_L2_IVLAN;
}
}
/*
--
2.7.4
^ permalink raw reply [flat|nested] 191+ messages in thread
* [dpdk-stable] patch 'net/ixgbe: fix Rx queue interrupt mapping in VF' has been queued to stable release 17.08.1
2017-11-21 13:15 [dpdk-stable] patch 'gro: fix typo in map file' has been queued to stable release 17.08.1 Yuanhan Liu
` (102 preceding siblings ...)
2017-11-21 13:17 ` [dpdk-stable] patch 'net/bnxt: fix the association of a MACVLAN per VNIC' " Yuanhan Liu
@ 2017-11-21 13:17 ` Yuanhan Liu
2017-11-21 13:17 ` [dpdk-stable] patch 'net/ixgbe: fix VFIO " Yuanhan Liu
` (85 subsequent siblings)
189 siblings, 0 replies; 191+ messages in thread
From: Yuanhan Liu @ 2017-11-21 13:17 UTC (permalink / raw)
To: Wei Dai; +Cc: Wenzhuo Lu, Jianwei Ma, dpdk stable
Hi,
FYI, your patch has been queued to stable release 17.08.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/24/17. So please
shout if anyone has objections.
Thanks.
--yliu
---
>From 2c9f53e59b49dbfde424de012d7a8d719f293f3b Mon Sep 17 00:00:00 2001
From: Wei Dai <wei.dai@intel.com>
Date: Wed, 20 Sep 2017 18:18:13 +0800
Subject: [PATCH] net/ixgbe: fix Rx queue interrupt mapping in VF
[ upstream commit ca9d6597184bddb8d3ee925cb462fcbd51628299 ]
When a VF port is bound to VFIO-PCI, miscellaneous interrupt is
mapped to MSI-X vector 0 and Rx queues interrupt are mapped to
other vectors in vfio_enable_msix( ). To simplify implementation,
all VFIO-PCI bound ixgbe VF Rx queue interrupts can be mapped in
vector 1. And as current igb_uio only support only one vector,
ixgbe VF PMD should use vector 0 for igb_uio and vector 1 for
VFIO-PCI. Without this patch, VF Rx queue interrupt is mapped
to vector 0 in register settings and mapped to VFIO vector 1
in vfio_enable_msix( ), and then all Rx queue interrupts will
be missed.
Fixes: b13bfab4cdbe ("eal: reserve VFIO vector zero for misc interrupt")
Signed-off-by: Wei Dai <wei.dai@intel.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Tested-by: Jianwei Ma <jianwei.ma@intel.com>
---
drivers/net/ixgbe/ixgbe_ethdev.c | 25 ++++++++++++++++++++++---
1 file changed, 22 insertions(+), 3 deletions(-)
diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c
index 858230d..0c431fa 100644
--- a/drivers/net/ixgbe/ixgbe_ethdev.c
+++ b/drivers/net/ixgbe/ixgbe_ethdev.c
@@ -4999,7 +4999,10 @@ ixgbevf_dev_start(struct rte_eth_dev *dev)
/* check and configure queue intr-vector mapping */
if (dev->data->dev_conf.intr_conf.rxq != 0) {
- intr_vector = dev->data->nb_rx_queues;
+ /* According to datasheet, only vector 0/1/2 can be used,
+ * now only one vector is used for Rx queue
+ */
+ intr_vector = 1;
if (rte_intr_efd_enable(intr_handle, intr_vector))
return -1;
}
@@ -5509,9 +5512,12 @@ ixgbevf_dev_rx_queue_intr_enable(struct rte_eth_dev *dev, uint16_t queue_id)
uint32_t mask;
struct ixgbe_hw *hw =
IXGBE_DEV_PRIVATE_TO_HW(dev->data->dev_private);
+ uint32_t vec = IXGBE_MISC_VEC_ID;
mask = IXGBE_READ_REG(hw, IXGBE_VTEIMS);
- mask |= (1 << IXGBE_MISC_VEC_ID);
+ if (rte_intr_allow_others(intr_handle))
+ vec = IXGBE_RX_VEC_START;
+ mask |= (1 << vec);
RTE_SET_USED(queue_id);
IXGBE_WRITE_REG(hw, IXGBE_VTEIMS, mask);
@@ -5526,9 +5532,14 @@ ixgbevf_dev_rx_queue_intr_disable(struct rte_eth_dev *dev, uint16_t queue_id)
uint32_t mask;
struct ixgbe_hw *hw =
IXGBE_DEV_PRIVATE_TO_HW(dev->data->dev_private);
+ struct rte_pci_device *pci_dev = RTE_ETH_DEV_TO_PCI(dev);
+ struct rte_intr_handle *intr_handle = &pci_dev->intr_handle;
+ uint32_t vec = IXGBE_MISC_VEC_ID;
mask = IXGBE_READ_REG(hw, IXGBE_VTEIMS);
- mask &= ~(1 << IXGBE_MISC_VEC_ID);
+ if (rte_intr_allow_others(intr_handle))
+ vec = IXGBE_RX_VEC_START;
+ mask &= ~(1 << vec);
RTE_SET_USED(queue_id);
IXGBE_WRITE_REG(hw, IXGBE_VTEIMS, mask);
@@ -5670,6 +5681,7 @@ ixgbevf_configure_msix(struct rte_eth_dev *dev)
IXGBE_DEV_PRIVATE_TO_HW(dev->data->dev_private);
uint32_t q_idx;
uint32_t vector_idx = IXGBE_MISC_VEC_ID;
+ uint32_t base = IXGBE_MISC_VEC_ID;
/* Configure VF other cause ivar */
ixgbevf_set_ivar_map(hw, -1, 1, vector_idx);
@@ -5680,6 +5692,11 @@ ixgbevf_configure_msix(struct rte_eth_dev *dev)
if (!rte_intr_dp_is_en(intr_handle))
return;
+ if (rte_intr_allow_others(intr_handle)) {
+ base = IXGBE_RX_VEC_START;
+ vector_idx = IXGBE_RX_VEC_START;
+ }
+
/* Configure all RX queues of VF */
for (q_idx = 0; q_idx < dev->data->nb_rx_queues; q_idx++) {
/* Force all queue use vector 0,
@@ -5687,6 +5704,8 @@ ixgbevf_configure_msix(struct rte_eth_dev *dev)
*/
ixgbevf_set_ivar_map(hw, 0, q_idx, vector_idx);
intr_handle->intr_vec[q_idx] = vector_idx;
+ if (vector_idx < base + intr_handle->nb_efd - 1)
+ vector_idx++;
}
}
--
2.7.4
^ permalink raw reply [flat|nested] 191+ messages in thread
* [dpdk-stable] patch 'net/ixgbe: fix VFIO interrupt mapping in VF' has been queued to stable release 17.08.1
2017-11-21 13:15 [dpdk-stable] patch 'gro: fix typo in map file' has been queued to stable release 17.08.1 Yuanhan Liu
` (103 preceding siblings ...)
2017-11-21 13:17 ` [dpdk-stable] patch 'net/ixgbe: fix Rx queue interrupt mapping in VF' " Yuanhan Liu
@ 2017-11-21 13:17 ` Yuanhan Liu
2017-11-21 13:17 ` [dpdk-stable] patch 'ethdev: revert use port name from device structure' " Yuanhan Liu
` (84 subsequent siblings)
189 siblings, 0 replies; 191+ messages in thread
From: Yuanhan Liu @ 2017-11-21 13:17 UTC (permalink / raw)
To: Wei Dai; +Cc: Wenzhuo Lu, Jianwei Ma, dpdk stable
Hi,
FYI, your patch has been queued to stable release 17.08.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/24/17. So please
shout if anyone has objections.
Thanks.
--yliu
---
>From 4c23366c3653d0708e4415cbfe0c8266d16740c3 Mon Sep 17 00:00:00 2001
From: Wei Dai <wei.dai@intel.com>
Date: Thu, 28 Sep 2017 10:28:33 +0800
Subject: [PATCH] net/ixgbe: fix VFIO interrupt mapping in VF
[ upstream commit 06938770186afcfd05a4d6d3addee12645c9c558 ]
When a VF port is bound to VFIO-PIC, only miscellaneous interrupt
is mapped to VFIO vector 0 in eth_ixgbevf_dev_init( ).
In ixgbevf_dev_start(), if previous VFIO interrupt mapping set in
eth_ixgbevf_dev_init( ) is not cleard, it will fail when calling
rte_intr_enable( ) tries to map Rx queue interrupt to other VFIO
vectors. This patch clears the VFIO interrupt mappings before
setting both miscellaneous and Rx queue interrupt mappings again
to avoid failure.
Fixes: 77234603fba0 ("net/ixgbe: support VF mailbox interrupt for link up/down")
Signed-off-by: Wei Dai <wei.dai@intel.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Tested-by: Jianwei Ma <jianwei.ma@intel.com>
---
drivers/net/ixgbe/ixgbe_ethdev.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c
index 0c431fa..7bef6f9 100644
--- a/drivers/net/ixgbe/ixgbe_ethdev.c
+++ b/drivers/net/ixgbe/ixgbe_ethdev.c
@@ -5019,6 +5019,15 @@ ixgbevf_dev_start(struct rte_eth_dev *dev)
}
ixgbevf_configure_msix(dev);
+ /* When a VF port is bound to VFIO-PCI, only miscellaneous interrupt
+ * is mapped to VFIO vector 0 in eth_ixgbevf_dev_init( ).
+ * If previous VFIO interrupt mapping setting in eth_ixgbevf_dev_init( )
+ * is not cleared, it will fail when following rte_intr_enable( ) tries
+ * to map Rx queue interrupt to other VFIO vectors.
+ * So clear uio/vfio intr/evevnfd first to avoid failure.
+ */
+ rte_intr_disable(intr_handle);
+
rte_intr_enable(intr_handle);
/* Re-enable interrupt for VF */
--
2.7.4
^ permalink raw reply [flat|nested] 191+ messages in thread
* [dpdk-stable] patch 'ethdev: revert use port name from device structure' has been queued to stable release 17.08.1
2017-11-21 13:15 [dpdk-stable] patch 'gro: fix typo in map file' has been queued to stable release 17.08.1 Yuanhan Liu
` (104 preceding siblings ...)
2017-11-21 13:17 ` [dpdk-stable] patch 'net/ixgbe: fix VFIO " Yuanhan Liu
@ 2017-11-21 13:17 ` Yuanhan Liu
2017-11-21 13:17 ` [dpdk-stable] patch 'net/ixgbe: fix uninitialized variable' " Yuanhan Liu
` (83 subsequent siblings)
189 siblings, 0 replies; 191+ messages in thread
From: Yuanhan Liu @ 2017-11-21 13:17 UTC (permalink / raw)
To: Ferruh Yigit; +Cc: Adrien Mazarguil, Thomas Monjalon, dpdk stable
Hi,
FYI, your patch has been queued to stable release 17.08.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/24/17. So please
shout if anyone has objections.
Thanks.
--yliu
---
>From 0e131afbde6c0cb7f8b04aadcc4a36585063fb7d Mon Sep 17 00:00:00 2001
From: Ferruh Yigit <ferruh.yigit@intel.com>
Date: Fri, 22 Sep 2017 12:30:07 +0100
Subject: [PATCH] ethdev: revert use port name from device structure
[ upstream commit 72e3efb149ccb72626e77f8926d4dc812fad4e4f ]
This reverts commit a1e7c17555e8f77d520ba5f06ed26c00e77a2bd1.
Original commit assumes there is 1:1 mapping between physical device and
ethdev port, so that device name can be used per port instead of ethdev
name field.
But one physical device may have multiple ethdev ports and each port
needs its own unique name.
One issue reported here:
http://dpdk.org/ml/archives/users/2017-September/002484.html
So reverting back the commit to continue using ethdev name field per
port.
Fixes: a1e7c17555e8 ("ethdev: use device name from device structure")
Reported-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
---
lib/librte_ether/rte_ethdev.c | 25 ++++++++++---------------
1 file changed, 10 insertions(+), 15 deletions(-)
diff --git a/lib/librte_ether/rte_ethdev.c b/lib/librte_ether/rte_ethdev.c
index 0597641..ec7d0e7 100644
--- a/lib/librte_ether/rte_ethdev.c
+++ b/lib/librte_ether/rte_ethdev.c
@@ -178,11 +178,9 @@ rte_eth_dev_allocated(const char *name)
unsigned i;
for (i = 0; i < RTE_MAX_ETHPORTS; i++) {
- if (rte_eth_devices[i].state == RTE_ETH_DEV_ATTACHED &&
- rte_eth_devices[i].device) {
- if (!strcmp(rte_eth_devices[i].device->name, name))
- return &rte_eth_devices[i];
- }
+ if ((rte_eth_devices[i].state == RTE_ETH_DEV_ATTACHED) &&
+ strcmp(rte_eth_devices[i].data->name, name) == 0)
+ return &rte_eth_devices[i];
}
return NULL;
}
@@ -319,7 +317,7 @@ rte_eth_dev_count(void)
int
rte_eth_dev_get_name_by_port(uint8_t port_id, char *name)
{
- const char *tmp;
+ char *tmp;
RTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -EINVAL);
@@ -330,7 +328,7 @@ rte_eth_dev_get_name_by_port(uint8_t port_id, char *name)
/* shouldn't check 'rte_eth_devices[i].data',
* because it might be overwritten by VDEV PMD */
- tmp = rte_eth_devices[port_id].device->name;
+ tmp = rte_eth_dev_data[port_id].name;
strcpy(name, tmp);
return 0;
}
@@ -338,7 +336,6 @@ rte_eth_dev_get_name_by_port(uint8_t port_id, char *name)
int
rte_eth_dev_get_port_by_name(const char *name, uint8_t *port_id)
{
- int ret;
int i;
if (name == NULL) {
@@ -347,13 +344,11 @@ rte_eth_dev_get_port_by_name(const char *name, uint8_t *port_id)
}
RTE_ETH_FOREACH_DEV(i) {
- if (!rte_eth_devices[i].device)
- continue;
+ if (!strncmp(name,
+ rte_eth_dev_data[i].name, strlen(name))) {
- ret = strncmp(name, rte_eth_devices[i].device->name,
- strlen(name));
- if (ret == 0) {
*port_id = i;
+
return 0;
}
}
@@ -436,8 +431,8 @@ rte_eth_dev_detach(uint8_t port_id, char *name)
if (rte_eth_dev_is_detachable(port_id))
goto err;
- snprintf(name, RTE_DEV_NAME_MAX_LEN, "%s",
- rte_eth_devices[port_id].device->name);
+ snprintf(name, sizeof(rte_eth_devices[port_id].data->name),
+ "%s", rte_eth_devices[port_id].data->name);
ret = rte_eal_dev_detach(rte_eth_devices[port_id].device);
if (ret < 0)
--
2.7.4
^ permalink raw reply [flat|nested] 191+ messages in thread
* [dpdk-stable] patch 'net/ixgbe: fix uninitialized variable' has been queued to stable release 17.08.1
2017-11-21 13:15 [dpdk-stable] patch 'gro: fix typo in map file' has been queued to stable release 17.08.1 Yuanhan Liu
` (105 preceding siblings ...)
2017-11-21 13:17 ` [dpdk-stable] patch 'ethdev: revert use port name from device structure' " Yuanhan Liu
@ 2017-11-21 13:17 ` Yuanhan Liu
2017-11-21 13:17 ` [dpdk-stable] patch 'examples/l2fwd-crypto: fix uninitialized errno value' " Yuanhan Liu
` (82 subsequent siblings)
189 siblings, 0 replies; 191+ messages in thread
From: Yuanhan Liu @ 2017-11-21 13:17 UTC (permalink / raw)
To: Yong Wang; +Cc: Wenzhuo Lu, dpdk stable
Hi,
FYI, your patch has been queued to stable release 17.08.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/24/17. So please
shout if anyone has objections.
Thanks.
--yliu
---
>From 1ad441dabf7f32569e90daa2c01201861fc50eab Mon Sep 17 00:00:00 2001
From: Yong Wang <wang.yong19@zte.com.cn>
Date: Mon, 18 Sep 2017 23:17:24 -0400
Subject: [PATCH] net/ixgbe: fix uninitialized variable
[ upstream commit 457ea93fda4ee8e0ea08a862e89a1fbdf0121d9c ]
In func ixgbe_dev_link_update(), "link.link_autoneg" is used in func
call rte_ixgbe_dev_atomic_write_link_status(), but is uninitialized.
Fixes: 82113036e4e5 ("ethdev: redesign link speed config")
Signed-off-by: Yong Wang <wang.yong19@zte.com.cn>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
---
drivers/net/ixgbe/ixgbe_ethdev.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c
index 7bef6f9..feff0a7 100644
--- a/drivers/net/ixgbe/ixgbe_ethdev.c
+++ b/drivers/net/ixgbe/ixgbe_ethdev.c
@@ -3927,6 +3927,7 @@ ixgbe_dev_link_update_share(struct rte_eth_dev *dev,
link.link_status = ETH_LINK_DOWN;
link.link_speed = 0;
link.link_duplex = ETH_LINK_HALF_DUPLEX;
+ link.link_autoneg = ETH_LINK_AUTONEG;
memset(&old, 0, sizeof(old));
rte_ixgbe_dev_atomic_read_link_status(dev, &old);
--
2.7.4
^ permalink raw reply [flat|nested] 191+ messages in thread
* [dpdk-stable] patch 'examples/l2fwd-crypto: fix uninitialized errno value' has been queued to stable release 17.08.1
2017-11-21 13:15 [dpdk-stable] patch 'gro: fix typo in map file' has been queued to stable release 17.08.1 Yuanhan Liu
` (106 preceding siblings ...)
2017-11-21 13:17 ` [dpdk-stable] patch 'net/ixgbe: fix uninitialized variable' " Yuanhan Liu
@ 2017-11-21 13:17 ` Yuanhan Liu
2017-11-21 13:17 ` [dpdk-stable] patch 'app/crypto-perf: " Yuanhan Liu
` (81 subsequent siblings)
189 siblings, 0 replies; 191+ messages in thread
From: Yuanhan Liu @ 2017-11-21 13:17 UTC (permalink / raw)
To: Hemant Agrawal; +Cc: Pablo de Lara, Kirill Rybalchenko, dpdk stable
Hi,
FYI, your patch has been queued to stable release 17.08.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/24/17. So please
shout if anyone has objections.
Thanks.
--yliu
---
>From be44b93c0d2f7fba058fc8f96d24d9d163ce3b92 Mon Sep 17 00:00:00 2001
From: Hemant Agrawal <hemant.agrawal@nxp.com>
Date: Wed, 23 Aug 2017 17:54:03 +0530
Subject: [PATCH] examples/l2fwd-crypto: fix uninitialized errno value
[ upstream commit 455446276493a68117f738b2b778f2791751a2a7 ]
errno should be initialized to 0 before calling strtol
Fixes: 1df9c0109f4c ("examples/l2fwd-crypto: parse key parameters")
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Reviewed-by: Kirill Rybalchenko <kirill.rybalchenko@intel.com>
---
examples/l2fwd-crypto/main.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/examples/l2fwd-crypto/main.c b/examples/l2fwd-crypto/main.c
index f020be3..17673a3 100644
--- a/examples/l2fwd-crypto/main.c
+++ b/examples/l2fwd-crypto/main.c
@@ -1088,6 +1088,7 @@ parse_key(uint8_t *data, char *input_arg)
unsigned byte_count;
char *token;
+ errno = 0;
for (byte_count = 0, token = strtok(input_arg, ":");
(byte_count < MAX_KEY_SIZE) && (token != NULL);
token = strtok(NULL, ":")) {
--
2.7.4
^ permalink raw reply [flat|nested] 191+ messages in thread
* [dpdk-stable] patch 'app/crypto-perf: fix uninitialized errno value' has been queued to stable release 17.08.1
2017-11-21 13:15 [dpdk-stable] patch 'gro: fix typo in map file' has been queued to stable release 17.08.1 Yuanhan Liu
` (107 preceding siblings ...)
2017-11-21 13:17 ` [dpdk-stable] patch 'examples/l2fwd-crypto: fix uninitialized errno value' " Yuanhan Liu
@ 2017-11-21 13:17 ` Yuanhan Liu
2017-11-21 13:17 ` [dpdk-stable] patch 'crypto/aesni_gcm: fix zero data operation' " Yuanhan Liu
` (80 subsequent siblings)
189 siblings, 0 replies; 191+ messages in thread
From: Yuanhan Liu @ 2017-11-21 13:17 UTC (permalink / raw)
To: Hemant Agrawal; +Cc: Kirill Rybalchenko, dpdk stable
Hi,
FYI, your patch has been queued to stable release 17.08.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/24/17. So please
shout if anyone has objections.
Thanks.
--yliu
---
>From ad07339df5da3abd898b0e623d00e8343f7fda7a Mon Sep 17 00:00:00 2001
From: Hemant Agrawal <hemant.agrawal@nxp.com>
Date: Tue, 5 Sep 2017 11:47:01 +0530
Subject: [PATCH] app/crypto-perf: fix uninitialized errno value
[ upstream commit 5c49049dd9d265f9a2086020ec7c34d3bce3c037 ]
errno should be initialized to 0 before calling strtol
Fixes: f6cefe253cc8 ("app/crypto-perf: add range/list of sizes")
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Reviewed-by: Kirill Rybalchenko <kirill.rybalchenko@intel.com>
---
app/test-crypto-perf/cperf_options_parsing.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/app/test-crypto-perf/cperf_options_parsing.c b/app/test-crypto-perf/cperf_options_parsing.c
index 085aa8f..663f53f 100644
--- a/app/test-crypto-perf/cperf_options_parsing.c
+++ b/app/test-crypto-perf/cperf_options_parsing.c
@@ -137,6 +137,7 @@ parse_range(const char *arg, uint32_t *min, uint32_t *max, uint32_t *inc)
if (copy_arg == NULL)
return -1;
+ errno = 0;
token = strtok(copy_arg, ":");
/* Parse minimum value */
@@ -203,6 +204,7 @@ parse_list(const char *arg, uint32_t *list, uint32_t *min, uint32_t *max)
if (copy_arg == NULL)
return -1;
+ errno = 0;
token = strtok(copy_arg, ",");
/* Parse first value */
--
2.7.4
^ permalink raw reply [flat|nested] 191+ messages in thread
* [dpdk-stable] patch 'crypto/aesni_gcm: fix zero data operation' has been queued to stable release 17.08.1
2017-11-21 13:15 [dpdk-stable] patch 'gro: fix typo in map file' has been queued to stable release 17.08.1 Yuanhan Liu
` (108 preceding siblings ...)
2017-11-21 13:17 ` [dpdk-stable] patch 'app/crypto-perf: " Yuanhan Liu
@ 2017-11-21 13:17 ` Yuanhan Liu
2017-11-21 13:17 ` [dpdk-stable] patch 'crypto/aesni_mb: fix invalid session error' " Yuanhan Liu
` (79 subsequent siblings)
189 siblings, 0 replies; 191+ messages in thread
From: Yuanhan Liu @ 2017-11-21 13:17 UTC (permalink / raw)
To: Pablo de Lara; +Cc: Kirill Rybalchenko, dpdk stable
Hi,
FYI, your patch has been queued to stable release 17.08.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/24/17. So please
shout if anyone has objections.
Thanks.
--yliu
---
>From d77890226baf1a254688f0a35c4877f518755f9e Mon Sep 17 00:00:00 2001
From: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Date: Mon, 14 Aug 2017 01:45:21 +0100
Subject: [PATCH] crypto/aesni_gcm: fix zero data operation
[ upstream commit 41d2437f7c679dcbfc8b7697fde0b17765eea1ed ]
When data length passed to the PMD was zero,
the PMD was trying to get more data from a non-existent
next segment.
Fixes: 9c2a5775c028 ("crypto/aesni_gcm: migrate from MB library to ISA-L")
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Reviewed-by: Kirill Rybalchenko <kirill.rybalchenko@intel.com>
---
drivers/crypto/aesni_gcm/aesni_gcm_pmd.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/crypto/aesni_gcm/aesni_gcm_pmd.c b/drivers/crypto/aesni_gcm/aesni_gcm_pmd.c
index d9c91d0..05c68fb 100644
--- a/drivers/crypto/aesni_gcm/aesni_gcm_pmd.c
+++ b/drivers/crypto/aesni_gcm/aesni_gcm_pmd.c
@@ -224,7 +224,7 @@ process_gcm_crypto_op(struct aesni_gcm_qp *qp, struct rte_crypto_op *op,
RTE_ASSERT(m_src != NULL);
- while (offset >= m_src->data_len) {
+ while (offset >= m_src->data_len && data_length != 0) {
offset -= m_src->data_len;
m_src = m_src->next;
--
2.7.4
^ permalink raw reply [flat|nested] 191+ messages in thread
* [dpdk-stable] patch 'crypto/aesni_mb: fix invalid session error' has been queued to stable release 17.08.1
2017-11-21 13:15 [dpdk-stable] patch 'gro: fix typo in map file' has been queued to stable release 17.08.1 Yuanhan Liu
` (109 preceding siblings ...)
2017-11-21 13:17 ` [dpdk-stable] patch 'crypto/aesni_gcm: fix zero data operation' " Yuanhan Liu
@ 2017-11-21 13:17 ` Yuanhan Liu
2017-11-21 13:17 ` [dpdk-stable] patch 'test/crypto: fix dpaa2 sec macros and definitions' " Yuanhan Liu
` (78 subsequent siblings)
189 siblings, 0 replies; 191+ messages in thread
From: Yuanhan Liu @ 2017-11-21 13:17 UTC (permalink / raw)
To: Sergio Gonzalez Monroy; +Cc: dpdk stable
Hi,
FYI, your patch has been queued to stable release 17.08.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/24/17. So please
shout if anyone has objections.
Thanks.
--yliu
---
>From b98e5dee6d6cb8b05e12d89a6150d305825e3083 Mon Sep 17 00:00:00 2001
From: Sergio Gonzalez Monroy <sergio.gonzalez.monroy@intel.com>
Date: Thu, 7 Sep 2017 12:50:36 +0100
Subject: [PATCH] crypto/aesni_mb: fix invalid session error
[ upstream commit 6fcd9fdf379b8218202e7213623da9b7359bb518 ]
Setting an invalid session in the crypto op results in SEGFAULT because
the JOB user_data was never set to the crypto op.
Fixes: 0f548b50a160 ("crypto/aesni_mb: process crypto op on dequeue")
Signed-off-by: Sergio Gonzalez Monroy <sergio.gonzalez.monroy@intel.com>
---
drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c b/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c
index 16e1451..f64ff61 100644
--- a/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c
+++ b/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c
@@ -626,13 +626,16 @@ flush_mb_mgr(struct aesni_mb_qp *qp, struct rte_crypto_op **ops,
}
static inline JOB_AES_HMAC *
-set_job_null_op(JOB_AES_HMAC *job)
+set_job_null_op(JOB_AES_HMAC *job, struct rte_crypto_op *op)
{
job->chain_order = HASH_CIPHER;
job->cipher_mode = NULL_CIPHER;
job->hash_alg = NULL_HASH;
job->cipher_direction = DECRYPT;
+ /* Set user data to be crypto operation data struct */
+ job->user_data = op;
+
return job;
}
@@ -670,7 +673,7 @@ aesni_mb_pmd_dequeue_burst(void *queue_pair, struct rte_crypto_op **ops,
retval = set_mb_job_params(job, qp, op);
if (unlikely(retval != 0)) {
qp->stats.dequeue_err_count++;
- set_job_null_op(job);
+ set_job_null_op(job, op);
}
/* Submit job to multi-buffer for processing */
--
2.7.4
^ permalink raw reply [flat|nested] 191+ messages in thread
* [dpdk-stable] patch 'test/crypto: fix dpaa2 sec macros and definitions' has been queued to stable release 17.08.1
2017-11-21 13:15 [dpdk-stable] patch 'gro: fix typo in map file' has been queued to stable release 17.08.1 Yuanhan Liu
` (110 preceding siblings ...)
2017-11-21 13:17 ` [dpdk-stable] patch 'crypto/aesni_mb: fix invalid session error' " Yuanhan Liu
@ 2017-11-21 13:17 ` Yuanhan Liu
2017-11-21 13:17 ` [dpdk-stable] patch 'app/crypto-perf: fix packet length check' " Yuanhan Liu
` (77 subsequent siblings)
189 siblings, 0 replies; 191+ messages in thread
From: Yuanhan Liu @ 2017-11-21 13:17 UTC (permalink / raw)
To: Akhil Goyal; +Cc: dpdk stable
Hi,
FYI, your patch has been queued to stable release 17.08.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/24/17. So please
shout if anyone has objections.
Thanks.
--yliu
---
>From 924ddf40244fcf2edb364cd2c988f295bbebd097 Mon Sep 17 00:00:00 2001
From: Akhil Goyal <akhil.goyal@nxp.com>
Date: Thu, 5 Oct 2017 18:20:08 +0530
Subject: [PATCH] test/crypto: fix dpaa2 sec macros and definitions
[ upstream commit 1633ead54f33c4bc4931b0a06d20a732eb53c5f0 ]
Fixes: 7a364faef185 ("cryptodev: remove crypto device type enumeration")
Signed-off-by: Akhil Goyal <akhil.goyal@nxp.com>
---
test/test/test_cryptodev.c | 2 +-
test/test/test_cryptodev_blockcipher.c | 4 ++--
test/test/test_cryptodev_perf.c | 4 ++--
3 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/test/test/test_cryptodev.c b/test/test/test_cryptodev.c
index a4116c6..132f99c 100644
--- a/test/test/test_cryptodev.c
+++ b/test/test/test_cryptodev.c
@@ -1816,7 +1816,7 @@ test_authonly_dpaa2_sec_all(void)
ts_params->session_mpool,
ts_params->valid_devs[0],
rte_cryptodev_driver_id_get(
- RTE_STR(RTE_CRYPTODEV_DPAA2_SEC_PMD)),
+ RTE_STR(CRYPTODEV_NAME_DPAA2_SEC_PMD)),
BLKCIPHER_AUTHONLY_TYPE);
TEST_ASSERT_EQUAL(status, 0, "Test failed");
diff --git a/test/test/test_cryptodev_blockcipher.c b/test/test/test_cryptodev_blockcipher.c
index 6089af4..baa8512 100644
--- a/test/test/test_cryptodev_blockcipher.c
+++ b/test/test/test_cryptodev_blockcipher.c
@@ -602,7 +602,7 @@ test_blockcipher_all_tests(struct rte_mempool *mbuf_pool,
int openssl_pmd = rte_cryptodev_driver_id_get(
RTE_STR(CRYPTODEV_NAME_OPENSSL_PMD));
- int dpaa2_pmd = rte_cryptodev_driver_id_get(
+ int dpaa2_sec_pmd = rte_cryptodev_driver_id_get(
RTE_STR(CRYPTODEV_NAME_DPAA2_SEC_PMD));
int scheduler_pmd = rte_cryptodev_driver_id_get(
RTE_STR(CRYPTODEV_NAME_SCHEDULER_PMD));
@@ -668,7 +668,7 @@ test_blockcipher_all_tests(struct rte_mempool *mbuf_pool,
target_pmd_mask = BLOCKCIPHER_TEST_TARGET_PMD_ARMV8;
else if (driver_id == scheduler_pmd)
target_pmd_mask = BLOCKCIPHER_TEST_TARGET_PMD_SCHEDULER;
- else if (driver_id == dpaa2_pmd)
+ else if (driver_id == dpaa2_sec_pmd)
target_pmd_mask = BLOCKCIPHER_TEST_TARGET_PMD_DPAA2_SEC;
else
TEST_ASSERT(0, "Unrecognized cryptodev type");
diff --git a/test/test/test_cryptodev_perf.c b/test/test/test_cryptodev_perf.c
index 3b57e6d..5df2e6e 100644
--- a/test/test/test_cryptodev_perf.c
+++ b/test/test/test_cryptodev_perf.c
@@ -211,7 +211,7 @@ static const char *pmd_name(uint8_t driver_id)
{
uint8_t null_pmd = rte_cryptodev_driver_id_get(
RTE_STR(CRYPTODEV_NAME_NULL_PMD));
- uint8_t dpaa2_pmd = rte_cryptodev_driver_id_get(
+ uint8_t dpaa2_sec_pmd = rte_cryptodev_driver_id_get(
RTE_STR(CRYPTODEV_NAME_DPAA2_SEC_PMD));
uint8_t snow3g_pmd = rte_cryptodev_driver_id_get(
RTE_STR(CRYPTODEV_NAME_SNOW3G_PMD));
@@ -232,7 +232,7 @@ static const char *pmd_name(uint8_t driver_id)
return RTE_STR(CRYPTODEV_NAME_QAT_SYM_PMD);
else if (driver_id == snow3g_pmd)
return RTE_STR(CRYPTODEV_NAME_SNOW3G_PMD);
- else if (driver_id == dpaa2_pmd)
+ else if (driver_id == dpaa2_sec_pmd)
return RTE_STR(CRYPTODEV_NAME_DPAA2_SEC_PMD);
else
return "";
--
2.7.4
^ permalink raw reply [flat|nested] 191+ messages in thread
* [dpdk-stable] patch 'app/crypto-perf: fix packet length check' has been queued to stable release 17.08.1
2017-11-21 13:15 [dpdk-stable] patch 'gro: fix typo in map file' has been queued to stable release 17.08.1 Yuanhan Liu
` (111 preceding siblings ...)
2017-11-21 13:17 ` [dpdk-stable] patch 'test/crypto: fix dpaa2 sec macros and definitions' " Yuanhan Liu
@ 2017-11-21 13:17 ` Yuanhan Liu
2017-11-21 13:17 ` [dpdk-stable] patch 'app/crypto-perf: parse AEAD data from vectors' " Yuanhan Liu
` (76 subsequent siblings)
189 siblings, 0 replies; 191+ messages in thread
From: Yuanhan Liu @ 2017-11-21 13:17 UTC (permalink / raw)
To: Pablo de Lara; +Cc: Radu Nicolau, dpdk stable
Hi,
FYI, your patch has been queued to stable release 17.08.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/24/17. So please
shout if anyone has objections.
Thanks.
--yliu
---
>From 4aabfc44fee23980745f805cfdc736a2ee0461fc Mon Sep 17 00:00:00 2001
From: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Date: Thu, 5 Oct 2017 06:28:00 +0100
Subject: [PATCH] app/crypto-perf: fix packet length check
[ upstream commit 0c2173c166da8abba93ed4a2f602ad523ee7a59a ]
When using DES-CBC, packet size has to be multiple
of 8 bytes, but if a list of packets is provided.
the check was not correct.
Fixes: fc4600fb2520 ("app/crypto-perf: add extra option checks")
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Radu Nicolau <radu.nicolau@intel.com>
---
app/test-crypto-perf/cperf_options_parsing.c | 18 +++++++++++++++---
1 file changed, 15 insertions(+), 3 deletions(-)
diff --git a/app/test-crypto-perf/cperf_options_parsing.c b/app/test-crypto-perf/cperf_options_parsing.c
index 663f53f..3f933bc 100644
--- a/app/test-crypto-perf/cperf_options_parsing.c
+++ b/app/test-crypto-perf/cperf_options_parsing.c
@@ -832,14 +832,26 @@ check_cipher_buffer_length(struct cperf_options *options)
if (options->cipher_algo == RTE_CRYPTO_CIPHER_DES_CBC ||
options->cipher_algo == RTE_CRYPTO_CIPHER_3DES_CBC ||
options->cipher_algo == RTE_CRYPTO_CIPHER_3DES_ECB) {
- for (buffer_size = options->min_buffer_size;
- buffer_size < options->max_buffer_size;
- buffer_size += options->inc_buffer_size) {
+ if (options->inc_buffer_size != 0)
+ buffer_size = options->min_buffer_size;
+ else
+ buffer_size = options->buffer_size_list[0];
+
+ while (buffer_size <= options->max_buffer_size) {
if ((buffer_size % DES_BLOCK_SIZE) != 0) {
RTE_LOG(ERR, USER1, "Some of the buffer sizes are "
"not suitable for the algorithm selected\n");
return -EINVAL;
}
+
+ if (options->inc_buffer_size != 0)
+ buffer_size += options->inc_buffer_size;
+ else {
+ if (++buffer_size_idx == options->buffer_size_count)
+ break;
+ buffer_size = options->buffer_size_list[buffer_size_idx];
+ }
+
}
}
--
2.7.4
^ permalink raw reply [flat|nested] 191+ messages in thread
* [dpdk-stable] patch 'app/crypto-perf: parse AEAD data from vectors' has been queued to stable release 17.08.1
2017-11-21 13:15 [dpdk-stable] patch 'gro: fix typo in map file' has been queued to stable release 17.08.1 Yuanhan Liu
` (112 preceding siblings ...)
2017-11-21 13:17 ` [dpdk-stable] patch 'app/crypto-perf: fix packet length check' " Yuanhan Liu
@ 2017-11-21 13:17 ` Yuanhan Liu
2017-11-21 13:17 ` [dpdk-stable] patch 'crypto/openssl: fix AEAD parameters' " Yuanhan Liu
` (75 subsequent siblings)
189 siblings, 0 replies; 191+ messages in thread
From: Yuanhan Liu @ 2017-11-21 13:17 UTC (permalink / raw)
To: Pablo de Lara; +Cc: Akhil Goyal, dpdk stable
Hi,
FYI, your patch has been queued to stable release 17.08.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/24/17. So please
shout if anyone has objections.
Thanks.
--yliu
---
>From 8075b7d25a247d5a8780cb69ef041740b8723106 Mon Sep 17 00:00:00 2001
From: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Date: Wed, 4 Oct 2017 04:46:08 +0100
Subject: [PATCH] app/crypto-perf: parse AEAD data from vectors
[ upstream commit da181392529487311a13f2717342d2dc17a1e1ab ]
Since DPDK 17.08, there is specific parameters
for AEAD algorithm, like AES-GCM. When verifying
crypto operations with test vectors, the parser
was not reading AEAD data (such as IV or key).
Fixes: 8a5b494a7f99 ("app/test-crypto-perf: add AEAD parameters")
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
---
app/test-crypto-perf/cperf_test_vector_parsing.c | 55 ++++++++++++++++++++++++
1 file changed, 55 insertions(+)
diff --git a/app/test-crypto-perf/cperf_test_vector_parsing.c b/app/test-crypto-perf/cperf_test_vector_parsing.c
index 148a604..3952632 100644
--- a/app/test-crypto-perf/cperf_test_vector_parsing.c
+++ b/app/test-crypto-perf/cperf_test_vector_parsing.c
@@ -116,6 +116,20 @@ show_test_vector(struct cperf_test_vector *test_vector)
printf("\n");
}
+ if (test_vector->aead_key.data) {
+ printf("\naead_key =\n");
+ for (i = 0; i < test_vector->aead_key.length; ++i) {
+ if ((i % wrap == 0) && (i != 0))
+ printf("\n");
+ if (i == (uint32_t)(test_vector->aead_key.length - 1))
+ printf("0x%02x", test_vector->aead_key.data[i]);
+ else
+ printf("0x%02x, ",
+ test_vector->aead_key.data[i]);
+ }
+ printf("\n");
+ }
+
if (test_vector->cipher_iv.data) {
printf("\ncipher_iv =\n");
for (i = 0; i < test_vector->cipher_iv.length; ++i) {
@@ -142,6 +156,19 @@ show_test_vector(struct cperf_test_vector *test_vector)
printf("\n");
}
+ if (test_vector->aead_iv.data) {
+ printf("\naead_iv =\n");
+ for (i = 0; i < test_vector->aead_iv.length; ++i) {
+ if ((i % wrap == 0) && (i != 0))
+ printf("\n");
+ if (i == (uint32_t)(test_vector->aead_iv.length - 1))
+ printf("0x%02x", test_vector->aead_iv.data[i]);
+ else
+ printf("0x%02x, ", test_vector->aead_iv.data[i]);
+ }
+ printf("\n");
+ }
+
if (test_vector->ciphertext.data) {
printf("\nciphertext =\n");
for (i = 0; i < test_vector->ciphertext.length; ++i) {
@@ -345,6 +372,20 @@ parse_entry(char *entry, struct cperf_test_vector *vector,
vector->auth_key.length = opts->auth_key_sz;
}
+ } else if (strstr(key_token, "aead_key")) {
+ rte_free(vector->aead_key.data);
+ vector->aead_key.data = data;
+ if (tc_found)
+ vector->aead_key.length = data_length;
+ else {
+ if (opts->aead_key_sz > data_length) {
+ printf("Global aead_key shorter than "
+ "aead_key_sz\n");
+ return -1;
+ }
+ vector->aead_key.length = opts->aead_key_sz;
+ }
+
} else if (strstr(key_token, "cipher_iv")) {
rte_free(vector->cipher_iv.data);
vector->cipher_iv.data = data;
@@ -373,6 +414,20 @@ parse_entry(char *entry, struct cperf_test_vector *vector,
vector->auth_iv.length = opts->auth_iv_sz;
}
+ } else if (strstr(key_token, "aead_iv")) {
+ rte_free(vector->aead_iv.data);
+ vector->aead_iv.data = data;
+ if (tc_found)
+ vector->aead_iv.length = data_length;
+ else {
+ if (opts->aead_iv_sz > data_length) {
+ printf("Global aead iv shorter than "
+ "aead_iv_sz\n");
+ return -1;
+ }
+ vector->aead_iv.length = opts->aead_iv_sz;
+ }
+
} else if (strstr(key_token, "ciphertext")) {
rte_free(vector->ciphertext.data);
vector->ciphertext.data = data;
--
2.7.4
^ permalink raw reply [flat|nested] 191+ messages in thread
* [dpdk-stable] patch 'crypto/openssl: fix AEAD parameters' has been queued to stable release 17.08.1
2017-11-21 13:15 [dpdk-stable] patch 'gro: fix typo in map file' has been queued to stable release 17.08.1 Yuanhan Liu
` (113 preceding siblings ...)
2017-11-21 13:17 ` [dpdk-stable] patch 'app/crypto-perf: parse AEAD data from vectors' " Yuanhan Liu
@ 2017-11-21 13:17 ` Yuanhan Liu
2017-11-21 13:17 ` [dpdk-stable] patch 'drivers/crypto: use snprintf return value correctly' " Yuanhan Liu
` (74 subsequent siblings)
189 siblings, 0 replies; 191+ messages in thread
From: Yuanhan Liu @ 2017-11-21 13:17 UTC (permalink / raw)
To: Pablo de Lara; +Cc: Fan Zhang, dpdk stable
Hi,
FYI, your patch has been queued to stable release 17.08.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/24/17. So please
shout if anyone has objections.
Thanks.
--yliu
---
>From a1dd2f047252c9187027998e5e4265ef666d24e2 Mon Sep 17 00:00:00 2001
From: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Date: Thu, 21 Sep 2017 14:11:17 +0100
Subject: [PATCH] crypto/openssl: fix AEAD parameters
[ upstream commit 0d21bc3872ae1769cd4908d125e6666a0e04baae ]
When using AES-GCM with OpenSSL, cipher direction
and authentication operation were being set incorrectly,
as the PMD was looking at the cipher and authentication
transform, instead of the new AEAD.
Fixes: b79e4c00af0e ("cryptodev: use AES-GCM/CCM as AEAD algorithms")
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Fan Zhang <roy.fan.zhang@intel.com>
---
drivers/crypto/openssl/rte_openssl_pmd.c | 15 +++++++++------
1 file changed, 9 insertions(+), 6 deletions(-)
diff --git a/drivers/crypto/openssl/rte_openssl_pmd.c b/drivers/crypto/openssl/rte_openssl_pmd.c
index 0bd5f98..2bc1570 100644
--- a/drivers/crypto/openssl/rte_openssl_pmd.c
+++ b/drivers/crypto/openssl/rte_openssl_pmd.c
@@ -425,8 +425,15 @@ static int
openssl_set_session_aead_parameters(struct openssl_session *sess,
const struct rte_crypto_sym_xform *xform)
{
- /* Select cipher direction */
- sess->cipher.direction = xform->cipher.op;
+ /* Select cipher direction and auth operation */
+ if (xform->aead.op == RTE_CRYPTO_AEAD_OP_ENCRYPT) {
+ sess->cipher.direction = RTE_CRYPTO_CIPHER_OP_ENCRYPT;
+ sess->auth.operation = RTE_CRYPTO_AUTH_OP_GENERATE;
+ } else {
+ sess->cipher.direction = RTE_CRYPTO_CIPHER_OP_DECRYPT;
+ sess->auth.operation = RTE_CRYPTO_AUTH_OP_VERIFY;
+ }
+
/* Select cipher key */
sess->cipher.key.length = xform->aead.key.length;
@@ -434,10 +441,6 @@ openssl_set_session_aead_parameters(struct openssl_session *sess,
sess->iv.offset = xform->aead.iv.offset;
sess->iv.length = xform->aead.iv.length;
- /* Select auth generate/verify */
- sess->auth.operation = xform->auth.op;
- sess->auth.algo = xform->auth.algo;
-
/* Select auth algo */
switch (xform->aead.algo) {
case RTE_CRYPTO_AEAD_AES_GCM:
--
2.7.4
^ permalink raw reply [flat|nested] 191+ messages in thread
* [dpdk-stable] patch 'drivers/crypto: use snprintf return value correctly' has been queued to stable release 17.08.1
2017-11-21 13:15 [dpdk-stable] patch 'gro: fix typo in map file' has been queued to stable release 17.08.1 Yuanhan Liu
` (114 preceding siblings ...)
2017-11-21 13:17 ` [dpdk-stable] patch 'crypto/openssl: fix AEAD parameters' " Yuanhan Liu
@ 2017-11-21 13:17 ` Yuanhan Liu
2017-11-21 13:17 ` [dpdk-stable] patch 'net/i40e: fix flexible payload configuration' " Yuanhan Liu
` (73 subsequent siblings)
189 siblings, 0 replies; 191+ messages in thread
From: Yuanhan Liu @ 2017-11-21 13:17 UTC (permalink / raw)
To: Tomasz Duszynski; +Cc: Bruce Richardson, dpdk stable
Hi,
FYI, your patch has been queued to stable release 17.08.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/24/17. So please
shout if anyone has objections.
Thanks.
--yliu
---
>From 7585c3a773d90351f149b991b0945e16ff92613a Mon Sep 17 00:00:00 2001
From: Tomasz Duszynski <tdu@semihalf.com>
Date: Wed, 11 Oct 2017 13:05:07 +0200
Subject: [PATCH] drivers/crypto: use snprintf return value correctly
[ upstream commit 6ab25e634f51b98b18bd3095cd09858c4a9489fe ]
snprintf return value is the length of was encoded into destination
array excluding '\0'. Thus return value equal to the length of the
destination array or more means truncation.
This commit fixes improper use of the return value.
Fixes: eec136f3c54f ("aesni_gcm: add driver for AES-GCM crypto operations")
Fixes: 924e84f87306 ("aesni_mb: add driver for multi buffer based crypto")
Fixes: 0f548b50a160 ("crypto/aesni_mb: process crypto op on dequeue")
Fixes: 169ca3db550c ("crypto/armv8: add PMD optimized for ARMv8 processors")
Fixes: 2773c86d061a ("crypto/kasumi: add driver for KASUMI library")
Fixes: 94b0ad8e0aa5 ("null_crypto: add driver for null crypto operations")
Fixes: d61f70b4c918 ("crypto/libcrypto: add driver for OpenSSL library")
Fixes: 3aafc423cf4d ("snow3g: add driver for SNOW 3G library")
Fixes: cf7685d68f00 ("crypto/zuc: add driver for ZUC library")
Signed-off-by: Tomasz Duszynski <tdu@semihalf.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
---
drivers/crypto/aesni_gcm/aesni_gcm_pmd_ops.c | 2 +-
drivers/crypto/aesni_mb/rte_aesni_mb_pmd_ops.c | 4 ++--
drivers/crypto/armv8/rte_armv8_pmd_ops.c | 2 +-
drivers/crypto/kasumi/rte_kasumi_pmd_ops.c | 2 +-
drivers/crypto/null/null_crypto_pmd_ops.c | 2 +-
drivers/crypto/openssl/rte_openssl_pmd_ops.c | 2 +-
drivers/crypto/snow3g/rte_snow3g_pmd_ops.c | 2 +-
drivers/crypto/zuc/rte_zuc_pmd_ops.c | 2 +-
8 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/drivers/crypto/aesni_gcm/aesni_gcm_pmd_ops.c b/drivers/crypto/aesni_gcm/aesni_gcm_pmd_ops.c
index 48400ac..0f315f0 100644
--- a/drivers/crypto/aesni_gcm/aesni_gcm_pmd_ops.c
+++ b/drivers/crypto/aesni_gcm/aesni_gcm_pmd_ops.c
@@ -195,7 +195,7 @@ aesni_gcm_pmd_qp_set_unique_name(struct rte_cryptodev *dev,
"aesni_gcm_pmd_%u_qp_%u",
dev->data->dev_id, qp->id);
- if (n > sizeof(qp->name))
+ if (n >= sizeof(qp->name))
return -1;
return 0;
diff --git a/drivers/crypto/aesni_mb/rte_aesni_mb_pmd_ops.c b/drivers/crypto/aesni_mb/rte_aesni_mb_pmd_ops.c
index 692b354..d8e9e73 100644
--- a/drivers/crypto/aesni_mb/rte_aesni_mb_pmd_ops.c
+++ b/drivers/crypto/aesni_mb/rte_aesni_mb_pmd_ops.c
@@ -355,7 +355,7 @@ aesni_mb_pmd_qp_set_unique_name(struct rte_cryptodev *dev,
"aesni_mb_pmd_%u_qp_%u",
dev->data->dev_id, qp->id);
- if (n > sizeof(qp->name))
+ if (n >= sizeof(qp->name))
return -1;
return 0;
@@ -373,7 +373,7 @@ aesni_mb_pmd_qp_create_processed_ops_ring(struct aesni_mb_qp *qp,
"%s_%s",
qp->name, str);
- if (n > sizeof(ring_name))
+ if (n >= sizeof(ring_name))
return NULL;
r = rte_ring_lookup(ring_name);
diff --git a/drivers/crypto/armv8/rte_armv8_pmd_ops.c b/drivers/crypto/armv8/rte_armv8_pmd_ops.c
index 00297be..63776b2 100644
--- a/drivers/crypto/armv8/rte_armv8_pmd_ops.c
+++ b/drivers/crypto/armv8/rte_armv8_pmd_ops.c
@@ -209,7 +209,7 @@ armv8_crypto_pmd_qp_set_unique_name(struct rte_cryptodev *dev,
n = snprintf(qp->name, sizeof(qp->name), "armv8_crypto_pmd_%u_qp_%u",
dev->data->dev_id, qp->id);
- if (n > sizeof(qp->name))
+ if (n >= sizeof(qp->name))
return -1;
return 0;
diff --git a/drivers/crypto/kasumi/rte_kasumi_pmd_ops.c b/drivers/crypto/kasumi/rte_kasumi_pmd_ops.c
index 8033114..4da12f3 100644
--- a/drivers/crypto/kasumi/rte_kasumi_pmd_ops.c
+++ b/drivers/crypto/kasumi/rte_kasumi_pmd_ops.c
@@ -183,7 +183,7 @@ kasumi_pmd_qp_set_unique_name(struct rte_cryptodev *dev,
"kasumi_pmd_%u_qp_%u",
dev->data->dev_id, qp->id);
- if (n > sizeof(qp->name))
+ if (n >= sizeof(qp->name))
return -1;
return 0;
diff --git a/drivers/crypto/null/null_crypto_pmd_ops.c b/drivers/crypto/null/null_crypto_pmd_ops.c
index 7615320..c427050 100644
--- a/drivers/crypto/null/null_crypto_pmd_ops.c
+++ b/drivers/crypto/null/null_crypto_pmd_ops.c
@@ -175,7 +175,7 @@ null_crypto_pmd_qp_set_unique_name(struct rte_cryptodev *dev,
"null_crypto_pmd_%u_qp_%u",
dev->data->dev_id, qp->id);
- if (n > sizeof(qp->name))
+ if (n >= sizeof(qp->name))
return -1;
return 0;
diff --git a/drivers/crypto/openssl/rte_openssl_pmd_ops.c b/drivers/crypto/openssl/rte_openssl_pmd_ops.c
index 8cdd0b2..34c4103 100644
--- a/drivers/crypto/openssl/rte_openssl_pmd_ops.c
+++ b/drivers/crypto/openssl/rte_openssl_pmd_ops.c
@@ -549,7 +549,7 @@ openssl_pmd_qp_set_unique_name(struct rte_cryptodev *dev,
"openssl_pmd_%u_qp_%u",
dev->data->dev_id, qp->id);
- if (n > sizeof(qp->name))
+ if (n >= sizeof(qp->name))
return -1;
return 0;
diff --git a/drivers/crypto/snow3g/rte_snow3g_pmd_ops.c b/drivers/crypto/snow3g/rte_snow3g_pmd_ops.c
index ae9569c..157a2de 100644
--- a/drivers/crypto/snow3g/rte_snow3g_pmd_ops.c
+++ b/drivers/crypto/snow3g/rte_snow3g_pmd_ops.c
@@ -184,7 +184,7 @@ snow3g_pmd_qp_set_unique_name(struct rte_cryptodev *dev,
"snow3g_pmd_%u_qp_%u",
dev->data->dev_id, qp->id);
- if (n > sizeof(qp->name))
+ if (n >= sizeof(qp->name))
return -1;
return 0;
diff --git a/drivers/crypto/zuc/rte_zuc_pmd_ops.c b/drivers/crypto/zuc/rte_zuc_pmd_ops.c
index 52c6aed..243c099 100644
--- a/drivers/crypto/zuc/rte_zuc_pmd_ops.c
+++ b/drivers/crypto/zuc/rte_zuc_pmd_ops.c
@@ -184,7 +184,7 @@ zuc_pmd_qp_set_unique_name(struct rte_cryptodev *dev,
"zuc_pmd_%u_qp_%u",
dev->data->dev_id, qp->id);
- if (n > sizeof(qp->name))
+ if (n >= sizeof(qp->name))
return -1;
return 0;
--
2.7.4
^ permalink raw reply [flat|nested] 191+ messages in thread
* [dpdk-stable] patch 'net/i40e: fix flexible payload configuration' has been queued to stable release 17.08.1
2017-11-21 13:15 [dpdk-stable] patch 'gro: fix typo in map file' has been queued to stable release 17.08.1 Yuanhan Liu
` (115 preceding siblings ...)
2017-11-21 13:17 ` [dpdk-stable] patch 'drivers/crypto: use snprintf return value correctly' " Yuanhan Liu
@ 2017-11-21 13:17 ` Yuanhan Liu
2017-11-21 13:17 ` [dpdk-stable] patch 'net/i40e: fix mbuf free in vector Tx' " Yuanhan Liu
` (72 subsequent siblings)
189 siblings, 0 replies; 191+ messages in thread
From: Yuanhan Liu @ 2017-11-21 13:17 UTC (permalink / raw)
To: Andrey Chilikin; +Cc: Beilei Xing, dpdk stable
Hi,
FYI, your patch has been queued to stable release 17.08.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/24/17. So please
shout if anyone has objections.
Thanks.
--yliu
---
>From 31bd08ad1c82f121c79d023829e73cf593ebdeca Mon Sep 17 00:00:00 2001
From: Andrey Chilikin <andrey.chilikin@intel.com>
Date: Fri, 6 Oct 2017 19:11:26 +0100
Subject: [PATCH] net/i40e: fix flexible payload configuration
[ upstream commit 1edc13a83b0d41f7ab982996f5a1ef9c5ee13b7b ]
Removed legacy writes to ORT/PIT registers from
i40e_GLQF_reg_init(struct i40e_hw *hw) function.
Latest NVM versions contain all relevant values
and these values should not be overwritten by SW to
maintain driver/firmware compatibility and to avoid
conflicts with dynamic device personalization profiles.
Fixes: f05ec7d77e41 ("i40e: initialize flow director flexible payload setting")
Signed-off-by: Andrey Chilikin <andrey.chilikin@intel.com>
Acked-by: Beilei Xing <beilei.xing@intel.com>
---
drivers/net/i40e/i40e_ethdev.c | 23 +++++++++++------------
1 file changed, 11 insertions(+), 12 deletions(-)
diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c
index 1adc8c8..9f978f7 100644
--- a/drivers/net/i40e/i40e_ethdev.c
+++ b/drivers/net/i40e/i40e_ethdev.c
@@ -701,23 +701,22 @@ RTE_PMD_REGISTER_KMOD_DEP(net_i40e, "* igb_uio | uio_pci_generic | vfio-pci");
static inline void i40e_GLQF_reg_init(struct i40e_hw *hw)
{
/*
- * Initialize registers for flexible payload, which should be set by NVM.
- * This should be removed from code once it is fixed in NVM.
+ * Force global configuration for flexible payload
+ * to the first 16 bytes of the corresponding L2/L3/L4 paylod.
+ * This should be removed from code once proper
+ * configuration API is added to avoid configuration conflicts
+ * between ports of the same device.
*/
- I40E_WRITE_REG(hw, I40E_GLQF_ORT(18), 0x00000030);
- I40E_WRITE_REG(hw, I40E_GLQF_ORT(19), 0x00000030);
- I40E_WRITE_REG(hw, I40E_GLQF_ORT(26), 0x0000002B);
- I40E_WRITE_REG(hw, I40E_GLQF_ORT(30), 0x0000002B);
I40E_WRITE_REG(hw, I40E_GLQF_ORT(33), 0x000000E0);
I40E_WRITE_REG(hw, I40E_GLQF_ORT(34), 0x000000E3);
I40E_WRITE_REG(hw, I40E_GLQF_ORT(35), 0x000000E6);
- I40E_WRITE_REG(hw, I40E_GLQF_ORT(20), 0x00000031);
- I40E_WRITE_REG(hw, I40E_GLQF_ORT(23), 0x00000031);
- I40E_WRITE_REG(hw, I40E_GLQF_ORT(63), 0x0000002D);
- I40E_WRITE_REG(hw, I40E_GLQF_PIT(16), 0x00007480);
- I40E_WRITE_REG(hw, I40E_GLQF_PIT(17), 0x00007440);
- /* Initialize registers for parsing packet type of QinQ */
+ /*
+ * Initialize registers for parsing packet type of QinQ
+ * This should be removed from code once proper
+ * configuration API is added to avoid configuration conflicts
+ * between ports of the same device.
+ */
I40E_WRITE_REG(hw, I40E_GLQF_ORT(40), 0x00000029);
I40E_WRITE_REG(hw, I40E_GLQF_PIT(9), 0x00009420);
}
--
2.7.4
^ permalink raw reply [flat|nested] 191+ messages in thread
* [dpdk-stable] patch 'net/i40e: fix mbuf free in vector Tx' has been queued to stable release 17.08.1
2017-11-21 13:15 [dpdk-stable] patch 'gro: fix typo in map file' has been queued to stable release 17.08.1 Yuanhan Liu
` (116 preceding siblings ...)
2017-11-21 13:17 ` [dpdk-stable] patch 'net/i40e: fix flexible payload configuration' " Yuanhan Liu
@ 2017-11-21 13:17 ` Yuanhan Liu
2017-11-21 13:17 ` [dpdk-stable] patch 'net/i40e: fix VF initialization error' " Yuanhan Liu
` (71 subsequent siblings)
189 siblings, 0 replies; 191+ messages in thread
From: Yuanhan Liu @ 2017-11-21 13:17 UTC (permalink / raw)
To: Qi Zhang; +Cc: Bruce Richardson, dpdk stable
Hi,
FYI, your patch has been queued to stable release 17.08.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/24/17. So please
shout if anyone has objections.
Thanks.
--yliu
---
>From 5186fb1a5e511c316317c6ae1aa1cbb5f301dc6f Mon Sep 17 00:00:00 2001
From: Qi Zhang <qi.z.zhang@intel.com>
Date: Tue, 10 Oct 2017 09:22:05 -0400
Subject: [PATCH] net/i40e: fix mbuf free in vector Tx
[ upstream commit 24853544c84c152dabcd013b9ee723a059e0d5dd ]
vPMD tx does not set sw_ring's mbuf to NULL after free.
Therefore, in cases where the vector transmit function is in
use, we must use the appropriate index and threshold values
for the queue to only free the unreleased mbufs
Fixes: b4669bb95038 ("i40e: add vector Tx")
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
---
drivers/net/i40e/i40e_rxtx.c | 26 ++++++++++++++++++++++++--
1 file changed, 24 insertions(+), 2 deletions(-)
diff --git a/drivers/net/i40e/i40e_rxtx.c b/drivers/net/i40e/i40e_rxtx.c
index 3a7b68e..f3d1c10 100644
--- a/drivers/net/i40e/i40e_rxtx.c
+++ b/drivers/net/i40e/i40e_rxtx.c
@@ -2309,18 +2309,40 @@ i40e_reset_rx_queue(struct i40e_rx_queue *rxq)
void
i40e_tx_queue_release_mbufs(struct i40e_tx_queue *txq)
{
+ struct rte_eth_dev *dev;
uint16_t i;
+ dev = &rte_eth_devices[txq->port_id];
+
if (!txq || !txq->sw_ring) {
PMD_DRV_LOG(DEBUG, "Pointer to rxq or sw_ring is NULL");
return;
}
- for (i = 0; i < txq->nb_tx_desc; i++) {
- if (txq->sw_ring[i].mbuf) {
+ /**
+ * vPMD tx will not set sw_ring's mbuf to NULL after free,
+ * so need to free remains more carefully.
+ */
+ if (dev->tx_pkt_burst == i40e_xmit_pkts_vec) {
+ i = txq->tx_next_dd - txq->tx_rs_thresh + 1;
+ if (txq->tx_tail < i) {
+ for (; i < txq->nb_tx_desc; i++) {
+ rte_pktmbuf_free_seg(txq->sw_ring[i].mbuf);
+ txq->sw_ring[i].mbuf = NULL;
+ }
+ i = 0;
+ }
+ for (; i < txq->tx_tail; i++) {
rte_pktmbuf_free_seg(txq->sw_ring[i].mbuf);
txq->sw_ring[i].mbuf = NULL;
}
+ } else {
+ for (i = 0; i < txq->nb_tx_desc; i++) {
+ if (txq->sw_ring[i].mbuf) {
+ rte_pktmbuf_free_seg(txq->sw_ring[i].mbuf);
+ txq->sw_ring[i].mbuf = NULL;
+ }
+ }
}
}
--
2.7.4
^ permalink raw reply [flat|nested] 191+ messages in thread
* [dpdk-stable] patch 'net/i40e: fix VF initialization error' has been queued to stable release 17.08.1
2017-11-21 13:15 [dpdk-stable] patch 'gro: fix typo in map file' has been queued to stable release 17.08.1 Yuanhan Liu
` (117 preceding siblings ...)
2017-11-21 13:17 ` [dpdk-stable] patch 'net/i40e: fix mbuf free in vector Tx' " Yuanhan Liu
@ 2017-11-21 13:17 ` Yuanhan Liu
2017-11-21 13:17 ` [dpdk-stable] patch 'examples/l2fwd_fork: fix message pool init' " Yuanhan Liu
` (70 subsequent siblings)
189 siblings, 0 replies; 191+ messages in thread
From: Yuanhan Liu @ 2017-11-21 13:17 UTC (permalink / raw)
To: Jingjing Wu; +Cc: dpdk stable
Hi,
FYI, your patch has been queued to stable release 17.08.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/24/17. So please
shout if anyone has objections.
Thanks.
--yliu
---
>From d43e926baec2ff48caa5eb2c6e6f528d8b327e12 Mon Sep 17 00:00:00 2001
From: Jingjing Wu <jingjing.wu@intel.com>
Date: Tue, 10 Oct 2017 06:08:30 +0800
Subject: [PATCH] net/i40e: fix VF initialization error
[ upstream commit 8cacf78469a78b42557895ad1c2b40fbee864f53 ]
In igb_uio, FLR is issued during open device file. i40evf is trying
to initialize admin queue when driver probe, while the FLR is not
done by host driver. That will cause initialization fail.
This patch is adding the checking if VF reset is done before
adimin queue initialization.
Fixes: b58eedfc7dd5 ("igb_uio: issue FLR during open and release of device file")
Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
---
drivers/net/i40e/i40e_ethdev_vf.c | 44 ++++++++++++++++++++++++++-------------
1 file changed, 30 insertions(+), 14 deletions(-)
diff --git a/drivers/net/i40e/i40e_ethdev_vf.c b/drivers/net/i40e/i40e_ethdev_vf.c
index 6933cc2..616829a 100644
--- a/drivers/net/i40e/i40e_ethdev_vf.c
+++ b/drivers/net/i40e/i40e_ethdev_vf.c
@@ -1241,10 +1241,30 @@ i40evf_enable_irq0(struct i40e_hw *hw)
}
static int
-i40evf_reset_vf(struct i40e_hw *hw)
+i40evf_check_vf_reset_done(struct i40e_hw *hw)
{
int i, reset;
+ for (i = 0; i < MAX_RESET_WAIT_CNT; i++) {
+ reset = I40E_READ_REG(hw, I40E_VFGEN_RSTAT) &
+ I40E_VFGEN_RSTAT_VFR_STATE_MASK;
+ reset = reset >> I40E_VFGEN_RSTAT_VFR_STATE_SHIFT;
+ if (reset == VIRTCHNL_VFR_VFACTIVE ||
+ reset == VIRTCHNL_VFR_COMPLETED)
+ break;
+ rte_delay_ms(50);
+ }
+
+ if (i >= MAX_RESET_WAIT_CNT)
+ return -1;
+
+ return 0;
+}
+static int
+i40evf_reset_vf(struct i40e_hw *hw)
+{
+ int ret;
+
if (i40e_vf_reset(hw) != I40E_SUCCESS) {
PMD_INIT_LOG(ERR, "Reset VF NIC failed");
return -1;
@@ -1260,19 +1280,10 @@ i40evf_reset_vf(struct i40e_hw *hw)
*/
rte_delay_ms(200);
- for (i = 0; i < MAX_RESET_WAIT_CNT; i++) {
- reset = rd32(hw, I40E_VFGEN_RSTAT) &
- I40E_VFGEN_RSTAT_VFR_STATE_MASK;
- reset = reset >> I40E_VFGEN_RSTAT_VFR_STATE_SHIFT;
- if (VIRTCHNL_VFR_COMPLETED == reset || VIRTCHNL_VFR_VFACTIVE == reset)
- break;
- else
- rte_delay_ms(50);
- }
-
- if (i >= MAX_RESET_WAIT_CNT) {
- PMD_INIT_LOG(ERR, "Reset VF NIC failed");
- return -1;
+ ret = i40evf_check_vf_reset_done(hw);
+ if (ret) {
+ PMD_INIT_LOG(ERR, "VF is still resetting");
+ return ret;
}
return 0;
@@ -1295,6 +1306,10 @@ i40evf_init_vf(struct rte_eth_dev *dev)
goto err;
}
+ err = i40evf_check_vf_reset_done(hw);
+ if (err)
+ goto err;
+
i40e_init_adminq_parameter(hw);
err = i40e_init_adminq(hw);
if (err) {
@@ -1319,6 +1334,7 @@ i40evf_init_vf(struct rte_eth_dev *dev)
PMD_INIT_LOG(ERR, "init_adminq failed");
goto err;
}
+
vf->aq_resp = rte_zmalloc("vf_aq_resp", I40E_AQ_BUF_SZ, 0);
if (!vf->aq_resp) {
PMD_INIT_LOG(ERR, "unable to allocate vf_aq_resp memory");
--
2.7.4
^ permalink raw reply [flat|nested] 191+ messages in thread
* [dpdk-stable] patch 'examples/l2fwd_fork: fix message pool init' has been queued to stable release 17.08.1
2017-11-21 13:15 [dpdk-stable] patch 'gro: fix typo in map file' has been queued to stable release 17.08.1 Yuanhan Liu
` (118 preceding siblings ...)
2017-11-21 13:17 ` [dpdk-stable] patch 'net/i40e: fix VF initialization error' " Yuanhan Liu
@ 2017-11-21 13:17 ` Yuanhan Liu
2017-11-21 13:17 ` [dpdk-stable] patch 'vfio: fix secondary process initialization' " Yuanhan Liu
` (69 subsequent siblings)
189 siblings, 0 replies; 191+ messages in thread
From: Yuanhan Liu @ 2017-11-21 13:17 UTC (permalink / raw)
To: Xueming Li; +Cc: dpdk stable
Hi,
FYI, your patch has been queued to stable release 17.08.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/24/17. So please
shout if anyone has objections.
Thanks.
--yliu
---
>From 565b0213735eb4e2a25b4660caf69f96796801a3 Mon Sep 17 00:00:00 2001
From: Xueming Li <xuemingl@mellanox.com>
Date: Fri, 15 Sep 2017 23:37:21 +0800
Subject: [PATCH] examples/l2fwd_fork: fix message pool init
[ upstream commit 9b85b871cc52d1219f5a68131059e539f7ee9916 ]
Some invalid callback functions are provided to rte_pktmbuf_pool_init()
without their associated data causing a segmentation fault when the
function tries to use it. In this example, those callbacks are not
necessary, they can be safely replaced by NULL pointers.
Fixes: 95e8005a56e8 ("examples/l2fwd_fork: new app")
Signed-off-by: Xueming Li <xuemingl@mellanox.com>
---
examples/multi_process/l2fwd_fork/main.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/examples/multi_process/l2fwd_fork/main.c b/examples/multi_process/l2fwd_fork/main.c
index f8a626b..2e70c2f 100644
--- a/examples/multi_process/l2fwd_fork/main.c
+++ b/examples/multi_process/l2fwd_fork/main.c
@@ -1204,10 +1204,7 @@ main(int argc, char **argv)
message_pool = rte_mempool_create("ms_msg_pool",
NB_CORE_MSGBUF * RTE_MAX_LCORE,
sizeof(enum l2fwd_cmd), NB_CORE_MSGBUF / 2,
- 0,
- rte_pktmbuf_pool_init, NULL,
- rte_pktmbuf_init, NULL,
- rte_socket_id(), 0);
+ 0, NULL, NULL, NULL, NULL, rte_socket_id(), 0);
if (message_pool == NULL)
rte_exit(EXIT_FAILURE, "Create msg mempool failed\n");
--
2.7.4
^ permalink raw reply [flat|nested] 191+ messages in thread
* [dpdk-stable] patch 'vfio: fix secondary process initialization' has been queued to stable release 17.08.1
2017-11-21 13:15 [dpdk-stable] patch 'gro: fix typo in map file' has been queued to stable release 17.08.1 Yuanhan Liu
` (119 preceding siblings ...)
2017-11-21 13:17 ` [dpdk-stable] patch 'examples/l2fwd_fork: fix message pool init' " Yuanhan Liu
@ 2017-11-21 13:17 ` Yuanhan Liu
2017-11-21 13:17 ` [dpdk-stable] patch 'net/virtio: flush Rx queues on start' " Yuanhan Liu
` (68 subsequent siblings)
189 siblings, 0 replies; 191+ messages in thread
From: Yuanhan Liu @ 2017-11-21 13:17 UTC (permalink / raw)
To: Anatoly Burakov; +Cc: dpdk stable
Hi,
FYI, your patch has been queued to stable release 17.08.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/24/17. So please
shout if anyone has objections.
Thanks.
--yliu
---
>From 0b4818ab16b92bcfcb77f1696ad3f9b50a41ae02 Mon Sep 17 00:00:00 2001
From: Anatoly Burakov <anatoly.burakov@intel.com>
Date: Fri, 20 Oct 2017 14:23:52 +0100
Subject: [PATCH] vfio: fix secondary process initialization
[ upstream commit 69f7504949e95f6ad89260fb59da90f0f1fede87 ]
When getting group fd from primary process, secondary wasn't storing
the fd anywhere, leading to a (harmless) error message in EAL logs,
and (not so harmless) potential problems when hot-unplugging devices
managed by VFIO in a secondary process.
Fix it by actually storing the group fd whenever we get a valid one
from the secondary process.
Fixes: 94c0776b1bad ("vfio: support hotplug")
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
---
lib/librte_eal/linuxapp/eal/eal_vfio.c | 15 +++++++++------
1 file changed, 9 insertions(+), 6 deletions(-)
diff --git a/lib/librte_eal/linuxapp/eal/eal_vfio.c b/lib/librte_eal/linuxapp/eal/eal_vfio.c
index 946df7e..3f048f1 100644
--- a/lib/librte_eal/linuxapp/eal/eal_vfio.c
+++ b/lib/librte_eal/linuxapp/eal/eal_vfio.c
@@ -68,8 +68,8 @@ vfio_get_group_fd(int iommu_group_no)
{
int i;
int vfio_group_fd;
- int group_idx = -1;
char filename[PATH_MAX];
+ struct vfio_group *cur_grp;
/* check if we already have the group descriptor open */
for (i = 0; i < VFIO_MAX_GROUPS; i++)
@@ -85,12 +85,12 @@ vfio_get_group_fd(int iommu_group_no)
/* Now lets get an index for the new group */
for (i = 0; i < VFIO_MAX_GROUPS; i++)
if (vfio_cfg.vfio_groups[i].group_no == -1) {
- group_idx = i;
+ cur_grp = &vfio_cfg.vfio_groups[i];
break;
}
/* This should not happen */
- if (group_idx == -1) {
+ if (i == VFIO_MAX_GROUPS) {
RTE_LOG(ERR, EAL, "No VFIO group free slot found\n");
return -1;
}
@@ -123,8 +123,8 @@ vfio_get_group_fd(int iommu_group_no)
/* noiommu group found */
}
- vfio_cfg.vfio_groups[group_idx].group_no = iommu_group_no;
- vfio_cfg.vfio_groups[group_idx].fd = vfio_group_fd;
+ cur_grp->group_no = iommu_group_no;
+ cur_grp->fd = vfio_group_fd;
vfio_cfg.vfio_active_groups++;
return vfio_group_fd;
}
@@ -157,9 +157,12 @@ vfio_get_group_fd(int iommu_group_no)
return 0;
case SOCKET_OK:
vfio_group_fd = vfio_mp_sync_receive_fd(socket_fd);
- /* if we got the fd, return it */
+ /* if we got the fd, store it and return it */
if (vfio_group_fd > 0) {
close(socket_fd);
+ cur_grp->group_no = iommu_group_no;
+ cur_grp->fd = vfio_group_fd;
+ vfio_cfg.vfio_active_groups++;
return vfio_group_fd;
}
/* fall-through on error */
--
2.7.4
^ permalink raw reply [flat|nested] 191+ messages in thread
* [dpdk-stable] patch 'net/virtio: flush Rx queues on start' has been queued to stable release 17.08.1
2017-11-21 13:15 [dpdk-stable] patch 'gro: fix typo in map file' has been queued to stable release 17.08.1 Yuanhan Liu
` (120 preceding siblings ...)
2017-11-21 13:17 ` [dpdk-stable] patch 'vfio: fix secondary process initialization' " Yuanhan Liu
@ 2017-11-21 13:17 ` Yuanhan Liu
2017-11-21 13:17 ` [dpdk-stable] patch 'net/virtio: check error on setting non block flag' " Yuanhan Liu
` (67 subsequent siblings)
189 siblings, 0 replies; 191+ messages in thread
From: Yuanhan Liu @ 2017-11-21 13:17 UTC (permalink / raw)
To: Tiwei Bie; +Cc: Jens Freimann, Yuanhan Liu, dpdk stable
Hi,
FYI, your patch has been queued to stable release 17.08.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/24/17. So please
shout if anyone has objections.
Thanks.
--yliu
---
>From f4e455b776f61ec7fbdfb5dce6ba34ad9016689b Mon Sep 17 00:00:00 2001
From: Tiwei Bie <tiwei.bie@intel.com>
Date: Fri, 20 Oct 2017 10:09:28 +0800
Subject: [PATCH] net/virtio: flush Rx queues on start
[ upstream commit d8227497ec5c3de75fe378e09fc9673ae097fa73 ]
After starting a device, the driver shouldn't deliver the
packets that already existed before the device is started
to applications. Otherwise it will lead to incorrect packet
collection for port state. This patch fixes this issue by
flushing the Rx queues when starting the device.
Fixes: a85786dc816f ("virtio: fix states handling during initialization")
Signed-off-by: Tiwei Bie <tiwei.bie@intel.com>
Reviewed-by: Jens Freimann <jfreimann@redhat.com>
Acked-by: Yuanhan Liu <yliu@fridaylinux.org>
---
drivers/net/virtio/virtio_ethdev.c | 2 ++
drivers/net/virtio/virtio_rxtx.c | 2 +-
drivers/net/virtio/virtqueue.c | 25 +++++++++++++++++++++++++
drivers/net/virtio/virtqueue.h | 5 +++++
4 files changed, 33 insertions(+), 1 deletion(-)
diff --git a/drivers/net/virtio/virtio_ethdev.c b/drivers/net/virtio/virtio_ethdev.c
index c7888f1..dbd01fb 100644
--- a/drivers/net/virtio/virtio_ethdev.c
+++ b/drivers/net/virtio/virtio_ethdev.c
@@ -1787,6 +1787,8 @@ virtio_dev_start(struct rte_eth_dev *dev)
for (i = 0; i < dev->data->nb_rx_queues; i++) {
rxvq = dev->data->rx_queues[i];
+ /* Flush the old packets */
+ virtqueue_flush(rxvq->vq);
virtqueue_notify(rxvq->vq);
}
diff --git a/drivers/net/virtio/virtio_rxtx.c b/drivers/net/virtio/virtio_rxtx.c
index 67e12de..7d5b510 100644
--- a/drivers/net/virtio/virtio_rxtx.c
+++ b/drivers/net/virtio/virtio_rxtx.c
@@ -81,7 +81,7 @@ virtio_dev_rx_queue_done(void *rxq, uint16_t offset)
return VIRTQUEUE_NUSED(vq) >= offset;
}
-static void
+void
vq_ring_free_chain(struct virtqueue *vq, uint16_t desc_idx)
{
struct vring_desc *dp, *dp_tail;
diff --git a/drivers/net/virtio/virtqueue.c b/drivers/net/virtio/virtqueue.c
index 9ad77b8..c3a536f 100644
--- a/drivers/net/virtio/virtqueue.c
+++ b/drivers/net/virtio/virtqueue.c
@@ -59,3 +59,28 @@ virtqueue_detatch_unused(struct virtqueue *vq)
}
return NULL;
}
+
+/* Flush the elements in the used ring. */
+void
+virtqueue_flush(struct virtqueue *vq)
+{
+ struct vring_used_elem *uep;
+ struct vq_desc_extra *dxp;
+ uint16_t used_idx, desc_idx;
+ uint16_t nb_used, i;
+
+ nb_used = VIRTQUEUE_NUSED(vq);
+
+ for (i = 0; i < nb_used; i++) {
+ used_idx = vq->vq_used_cons_idx & (vq->vq_nentries - 1);
+ uep = &vq->vq_ring.used->ring[used_idx];
+ desc_idx = (uint16_t)uep->id;
+ dxp = &vq->vq_descx[desc_idx];
+ if (dxp->cookie != NULL) {
+ rte_pktmbuf_free(dxp->cookie);
+ dxp->cookie = NULL;
+ }
+ vq->vq_used_cons_idx++;
+ vq_ring_free_chain(vq, desc_idx);
+ }
+}
diff --git a/drivers/net/virtio/virtqueue.h b/drivers/net/virtio/virtqueue.h
index 2e12086..9fffcd8 100644
--- a/drivers/net/virtio/virtqueue.h
+++ b/drivers/net/virtio/virtqueue.h
@@ -304,6 +304,9 @@ void virtqueue_dump(struct virtqueue *vq);
*/
struct rte_mbuf *virtqueue_detatch_unused(struct virtqueue *vq);
+/* Flush the elements in the used ring. */
+void virtqueue_flush(struct virtqueue *vq);
+
static inline int
virtqueue_full(const struct virtqueue *vq)
{
@@ -312,6 +315,8 @@ virtqueue_full(const struct virtqueue *vq)
#define VIRTQUEUE_NUSED(vq) ((uint16_t)((vq)->vq_ring.used->idx - (vq)->vq_used_cons_idx))
+void vq_ring_free_chain(struct virtqueue *vq, uint16_t desc_idx);
+
static inline void
vq_update_avail_idx(struct virtqueue *vq)
{
--
2.7.4
^ permalink raw reply [flat|nested] 191+ messages in thread
* [dpdk-stable] patch 'net/virtio: check error on setting non block flag' has been queued to stable release 17.08.1
2017-11-21 13:15 [dpdk-stable] patch 'gro: fix typo in map file' has been queued to stable release 17.08.1 Yuanhan Liu
` (121 preceding siblings ...)
2017-11-21 13:17 ` [dpdk-stable] patch 'net/virtio: flush Rx queues on start' " Yuanhan Liu
@ 2017-11-21 13:17 ` Yuanhan Liu
2017-11-21 13:17 ` [dpdk-stable] patch 'net/virtio: fix Tx packet length stats' " Yuanhan Liu
` (66 subsequent siblings)
189 siblings, 0 replies; 191+ messages in thread
From: Yuanhan Liu @ 2017-11-21 13:17 UTC (permalink / raw)
To: Sebastian Basierski; +Cc: Jianfeng Tan, Yuanhan Liu, dpdk stable
Hi,
FYI, your patch has been queued to stable release 17.08.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/24/17. So please
shout if anyone has objections.
Thanks.
--yliu
---
>From f7f178534c5cb2c582a8e8b6d0e774947fba19fe Mon Sep 17 00:00:00 2001
From: Sebastian Basierski <sebastianx.basierski@intel.com>
Date: Tue, 24 Oct 2017 10:17:38 +0200
Subject: [PATCH] net/virtio: check error on setting non block flag
[ upstream commit 2fd826a301b5a872cad0b67c807d3011693321c7 ]
Report an error message if the flag O_NONBLOCK setting fails,
then return from function.
Coverity issue: 143439
Fixes: ef53b6030039 ("net/virtio-user: support LSC")
Signed-off-by: Sebastian Basierski <sebastianx.basierski@intel.com>
Acked-by: Jianfeng Tan <jianfeng.tan@intel.com>
Acked-by: Yuanhan Liu <yliu@fridaylinux.org>
---
drivers/net/virtio/virtio_user_ethdev.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/drivers/net/virtio/virtio_user_ethdev.c b/drivers/net/virtio/virtio_user_ethdev.c
index c961444..52582de 100644
--- a/drivers/net/virtio/virtio_user_ethdev.c
+++ b/drivers/net/virtio/virtio_user_ethdev.c
@@ -86,7 +86,11 @@ virtio_user_read_dev_config(struct virtio_hw *hw, size_t offset,
int flags;
flags = fcntl(dev->vhostfd, F_GETFL);
- fcntl(dev->vhostfd, F_SETFL, flags | O_NONBLOCK);
+ if (fcntl(dev->vhostfd, F_SETFL,
+ flags | O_NONBLOCK) == -1) {
+ PMD_DRV_LOG(ERR, "error setting O_NONBLOCK flag");
+ return;
+ }
r = recv(dev->vhostfd, buf, 128, MSG_PEEK);
if (r == 0 || (r < 0 && errno != EAGAIN)) {
dev->status &= (~VIRTIO_NET_S_LINK_UP);
--
2.7.4
^ permalink raw reply [flat|nested] 191+ messages in thread
* [dpdk-stable] patch 'net/virtio: fix Tx packet length stats' has been queued to stable release 17.08.1
2017-11-21 13:15 [dpdk-stable] patch 'gro: fix typo in map file' has been queued to stable release 17.08.1 Yuanhan Liu
` (122 preceding siblings ...)
2017-11-21 13:17 ` [dpdk-stable] patch 'net/virtio: check error on setting non block flag' " Yuanhan Liu
@ 2017-11-21 13:17 ` Yuanhan Liu
2017-11-21 13:17 ` [dpdk-stable] patch 'igb_uio: remove device reset in open' " Yuanhan Liu
` (65 subsequent siblings)
189 siblings, 0 replies; 191+ messages in thread
From: Yuanhan Liu @ 2017-11-21 13:17 UTC (permalink / raw)
To: Zhiyong Yang; +Cc: Maxime Coquelin, Yuanhan Liu, dpdk stable
Hi,
FYI, your patch has been queued to stable release 17.08.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/24/17. So please
shout if anyone has objections.
Thanks.
--yliu
---
>From 09c3348dee1c3aeb2564ee5a7055a33672c1691c Mon Sep 17 00:00:00 2001
From: Zhiyong Yang <zhiyong.yang@intel.com>
Date: Tue, 24 Oct 2017 11:06:14 +0800
Subject: [PATCH] net/virtio: fix Tx packet length stats
[ upstream commit f1216c1eca5a54706af9f13133d06b3477099f8b ]
In the function virtqueue_enqueue_xmit(), when can_push is true,
vtnet_hdr_size is added to pkt_len by calling rte_pktmbuf_prepend.
which is wrong for pkt stats, virtio header length should be subtracted
before calling stats function.
Fixes: 58169a9c8153 ("net/virtio: support Tx checksum offload")
Signed-off-by: Zhiyong Yang <zhiyong.yang@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Acked-by: Yuanhan Liu <yliu@fridaylinux.org>
---
drivers/net/virtio/virtio_rxtx.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/net/virtio/virtio_rxtx.c b/drivers/net/virtio/virtio_rxtx.c
index 7d5b510..217677a 100644
--- a/drivers/net/virtio/virtio_rxtx.c
+++ b/drivers/net/virtio/virtio_rxtx.c
@@ -300,6 +300,10 @@ virtqueue_enqueue_xmit(struct virtnet_tx *txvq, struct rte_mbuf *cookie,
/* prepend cannot fail, checked by caller */
hdr = (struct virtio_net_hdr *)
rte_pktmbuf_prepend(cookie, head_size);
+ /* rte_pktmbuf_prepend() counts the hdr size to the pkt length,
+ * which is wrong. Below subtract restores correct pkt size.
+ */
+ cookie->pkt_len -= head_size;
/* if offload disabled, it is not zeroed below, do it now */
if (offload == 0) {
ASSIGN_UNLESS_EQUAL(hdr->csum_start, 0);
--
2.7.4
^ permalink raw reply [flat|nested] 191+ messages in thread
* [dpdk-stable] patch 'igb_uio: remove device reset in open' has been queued to stable release 17.08.1
2017-11-21 13:15 [dpdk-stable] patch 'gro: fix typo in map file' has been queued to stable release 17.08.1 Yuanhan Liu
` (123 preceding siblings ...)
2017-11-21 13:17 ` [dpdk-stable] patch 'net/virtio: fix Tx packet length stats' " Yuanhan Liu
@ 2017-11-21 13:17 ` Yuanhan Liu
2017-11-21 13:17 ` [dpdk-stable] patch 'examples/qos_sched: fix uninitialized config' " Yuanhan Liu
` (64 subsequent siblings)
189 siblings, 0 replies; 191+ messages in thread
From: Yuanhan Liu @ 2017-11-21 13:17 UTC (permalink / raw)
To: Ferruh Yigit; +Cc: Harish Patil, Shijith Thotton, Jingjing Wu, dpdk stable
Hi,
FYI, your patch has been queued to stable release 17.08.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/24/17. So please
shout if anyone has objections.
Thanks.
--yliu
---
>From 2b61a9f0ab54a9699834ba8c174ea5199e4de815 Mon Sep 17 00:00:00 2001
From: Ferruh Yigit <ferruh.yigit@intel.com>
Date: Fri, 20 Oct 2017 17:55:11 +0100
Subject: [PATCH] igb_uio: remove device reset in open
[ upstream commit f73b38e9245d77d4d6b5861f8d203c0bf5120b15 ]
Remove device reset during application start, the reset for application
exit still there.
Reset in open removed because of following comments:
1- Device reset not completed when VF driver loaded, which cause VF PMD
initialization error.
Adding delay can solve the issue but will increase driver load time.
2- Reset will be issues all devices unconditionally, not very efficient
way.
Fixes: b58eedfc7dd5 ("igb_uio: issue FLR during open and release of device file")
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Tested-by: Harish Patil <harish.patil@cavium.com>
Tested-by: Shijith Thotton <shijith.thotton@caviumnetworks.com>
Tested-by: Jingjing Wu <jingjing.wu@intel.com>
---
lib/librte_eal/linuxapp/igb_uio/igb_uio.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/lib/librte_eal/linuxapp/igb_uio/igb_uio.c b/lib/librte_eal/linuxapp/igb_uio/igb_uio.c
index 07a19a3..db5280b 100644
--- a/lib/librte_eal/linuxapp/igb_uio/igb_uio.c
+++ b/lib/librte_eal/linuxapp/igb_uio/igb_uio.c
@@ -179,8 +179,6 @@ igbuio_pci_open(struct uio_info *info, struct inode *inode)
struct rte_uio_pci_dev *udev = info->priv;
struct pci_dev *dev = udev->pdev;
- pci_reset_function(dev);
-
/* set bus master, which was cleared by the reset function */
pci_set_master(dev);
--
2.7.4
^ permalink raw reply [flat|nested] 191+ messages in thread
* [dpdk-stable] patch 'examples/qos_sched: fix uninitialized config' has been queued to stable release 17.08.1
2017-11-21 13:15 [dpdk-stable] patch 'gro: fix typo in map file' has been queued to stable release 17.08.1 Yuanhan Liu
` (124 preceding siblings ...)
2017-11-21 13:17 ` [dpdk-stable] patch 'igb_uio: remove device reset in open' " Yuanhan Liu
@ 2017-11-21 13:17 ` Yuanhan Liu
2017-11-21 13:17 ` [dpdk-stable] patch 'examples/vhost_scsi: fix product id string termination' " Yuanhan Liu
` (63 subsequent siblings)
189 siblings, 0 replies; 191+ messages in thread
From: Yuanhan Liu @ 2017-11-21 13:17 UTC (permalink / raw)
To: Jasvinder Singh; +Cc: dpdk stable
Hi,
FYI, your patch has been queued to stable release 17.08.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/24/17. So please
shout if anyone has objections.
Thanks.
--yliu
---
>From 957ddc36fb18752b2b1920507817cb609cab3690 Mon Sep 17 00:00:00 2001
From: Jasvinder Singh <jasvinder.singh@intel.com>
Date: Tue, 24 Oct 2017 10:09:57 +0100
Subject: [PATCH] examples/qos_sched: fix uninitialized config
[ upstream commit 96b5077cfaf95cd38dc7644e39036ad94e6435c8 ]
Fix problem with uninitialized rx/tx deferred_start flags of the struct
rte_eth_rxconf/txconf by initializing with 0 value (deferred start of
the rx/tx queues is turned off). This setting allows device rx/tx
queues to start with rte_eth_dev_start().
Coverity issue: 194999, 195009
Fixes: de3cfa2c9823 ("sched: initial import")
Signed-off-by: Jasvinder Singh <jasvinder.singh@intel.com>
---
examples/qos_sched/init.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/examples/qos_sched/init.c b/examples/qos_sched/init.c
index a82cbd7..7d54fdb 100644
--- a/examples/qos_sched/init.c
+++ b/examples/qos_sched/init.c
@@ -118,6 +118,7 @@ app_init_port(uint8_t portid, struct rte_mempool *mp)
rx_conf.rx_thresh.wthresh = rx_thresh.wthresh;
rx_conf.rx_free_thresh = 32;
rx_conf.rx_drop_en = 0;
+ rx_conf.rx_deferred_start = 0;
tx_conf.tx_thresh.pthresh = tx_thresh.pthresh;
tx_conf.tx_thresh.hthresh = tx_thresh.hthresh;
@@ -125,6 +126,7 @@ app_init_port(uint8_t portid, struct rte_mempool *mp)
tx_conf.tx_free_thresh = 0;
tx_conf.tx_rs_thresh = 0;
tx_conf.txq_flags = ETH_TXQ_FLAGS_NOMULTSEGS | ETH_TXQ_FLAGS_NOOFFLOADS;
+ tx_conf.tx_deferred_start = 0;
/* init port */
RTE_LOG(INFO, APP, "Initializing port %"PRIu8"... ", portid);
--
2.7.4
^ permalink raw reply [flat|nested] 191+ messages in thread
* [dpdk-stable] patch 'examples/vhost_scsi: fix product id string termination' has been queued to stable release 17.08.1
2017-11-21 13:15 [dpdk-stable] patch 'gro: fix typo in map file' has been queued to stable release 17.08.1 Yuanhan Liu
` (125 preceding siblings ...)
2017-11-21 13:17 ` [dpdk-stable] patch 'examples/qos_sched: fix uninitialized config' " Yuanhan Liu
@ 2017-11-21 13:17 ` Yuanhan Liu
2017-11-21 13:17 ` [dpdk-stable] patch 'crypto/dpaa2_sec: remove ICV memset on decryption side' " Yuanhan Liu
` (62 subsequent siblings)
189 siblings, 0 replies; 191+ messages in thread
From: Yuanhan Liu @ 2017-11-21 13:17 UTC (permalink / raw)
To: Jacek Piasecki; +Cc: Maxime Coquelin, dpdk stable
Hi,
FYI, your patch has been queued to stable release 17.08.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/24/17. So please
shout if anyone has objections.
Thanks.
--yliu
---
>From ed143fcf2f36820679cb7eb54603f717816b6341 Mon Sep 17 00:00:00 2001
From: Jacek Piasecki <jacekx.piasecki@intel.com>
Date: Wed, 25 Oct 2017 12:07:18 +0200
Subject: [PATCH] examples/vhost_scsi: fix product id string termination
[ upstream commit 681459bf9cd5778ada011e6d8d681436ec5394f0 ]
Use snprintf instead strncpy to get safe null string termination.
There was possible to get not terminated string after strncpy operation.
Coverity issue: 158631
Fixes: db75c7af19bb ("examples/vhost_scsi: introduce a new sample app")
Signed-off-by: Jacek Piasecki <jacekx.piasecki@intel.com>
Acked-by: Maxime Coquelin <maxime.coquelin@redhat.com>
---
examples/vhost_scsi/scsi.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/examples/vhost_scsi/scsi.c b/examples/vhost_scsi/scsi.c
index 54d3104..fd430ec 100644
--- a/examples/vhost_scsi/scsi.c
+++ b/examples/vhost_scsi/scsi.c
@@ -307,7 +307,9 @@ vhost_bdev_scsi_inquiry_command(struct vhost_block_dev *bdev,
strncpy((char *)inqdata->t10_vendor_id, "INTEL", 8);
/* PRODUCT IDENTIFICATION */
- strncpy((char *)inqdata->product_id, bdev->product_name, 16);
+ snprintf((char *)inqdata->product_id,
+ RTE_DIM(inqdata->product_id), "%s",
+ bdev->product_name);
/* PRODUCT REVISION LEVEL */
strncpy((char *)inqdata->product_rev, "0001", 4);
--
2.7.4
^ permalink raw reply [flat|nested] 191+ messages in thread
* [dpdk-stable] patch 'crypto/dpaa2_sec: remove ICV memset on decryption side' has been queued to stable release 17.08.1
2017-11-21 13:15 [dpdk-stable] patch 'gro: fix typo in map file' has been queued to stable release 17.08.1 Yuanhan Liu
` (126 preceding siblings ...)
2017-11-21 13:17 ` [dpdk-stable] patch 'examples/vhost_scsi: fix product id string termination' " Yuanhan Liu
@ 2017-11-21 13:17 ` Yuanhan Liu
2017-11-21 13:17 ` [dpdk-stable] patch 'crypto/dpaa2_sec: add check for segmented buffer' " Yuanhan Liu
` (61 subsequent siblings)
189 siblings, 0 replies; 191+ messages in thread
From: Yuanhan Liu @ 2017-11-21 13:17 UTC (permalink / raw)
To: Alok Makhariya; +Cc: Akhil Goyal, dpdk stable
Hi,
FYI, your patch has been queued to stable release 17.08.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/24/17. So please
shout if anyone has objections.
Thanks.
--yliu
---
>From 875dceb08394bd77019055c53f6ab3fa66db51de Mon Sep 17 00:00:00 2001
From: Alok Makhariya <alok.makhariya@nxp.com>
Date: Thu, 12 Oct 2017 18:37:24 +0530
Subject: [PATCH] crypto/dpaa2_sec: remove ICV memset on decryption side
[ upstream commit 6d93f7cff0d39022be86f69fae4b9eb7ffcd3e1d ]
Since the packet lengths are modified, it is not required to
explicitly reset the ICV.
Fixes: 13273250eec5 ("crypto/dpaa2_sec: support AES-GCM and CTR")
Fixes: 8d1f3a5d751b ("crypto/dpaa2_sec: support crypto operation")
Signed-off-by: Alok Makhariya <alok.makhariya@nxp.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
---
drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c b/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
index e0f6cfc..61c1eae 100644
--- a/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
+++ b/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
@@ -203,7 +203,6 @@ build_authenc_gcm_fd(dpaa2_sec_session *sess,
old_icv = (uint8_t *)(sge + 1);
memcpy(old_icv, sym_op->aead.digest.data,
sess->digest_length);
- memset(sym_op->aead.digest.data, 0, sess->digest_length);
DPAA2_SET_FLE_ADDR(sge, DPAA2_VADDR_TO_IOVA(old_icv));
sge->length = sess->digest_length;
DPAA2_SET_FD_LEN(fd, (sym_op->aead.data.length +
@@ -342,7 +341,6 @@ build_authenc_fd(dpaa2_sec_session *sess,
old_icv = (uint8_t *)(sge + 1);
memcpy(old_icv, sym_op->auth.digest.data,
sess->digest_length);
- memset(sym_op->auth.digest.data, 0, sess->digest_length);
DPAA2_SET_FLE_ADDR(sge, DPAA2_VADDR_TO_IOVA(old_icv));
sge->length = sess->digest_length;
DPAA2_SET_FD_LEN(fd, (sym_op->auth.data.length +
@@ -436,7 +434,6 @@ build_auth_fd(dpaa2_sec_session *sess, struct rte_crypto_op *op,
old_digest = (uint8_t *)(sge + 1);
rte_memcpy(old_digest, sym_op->auth.digest.data,
sess->digest_length);
- memset(sym_op->auth.digest.data, 0, sess->digest_length);
DPAA2_SET_FLE_ADDR(sge, DPAA2_VADDR_TO_IOVA(old_digest));
sge->length = sess->digest_length;
fle->length = sym_op->auth.data.length +
--
2.7.4
^ permalink raw reply [flat|nested] 191+ messages in thread
* [dpdk-stable] patch 'crypto/dpaa2_sec: add check for segmented buffer' has been queued to stable release 17.08.1
2017-11-21 13:15 [dpdk-stable] patch 'gro: fix typo in map file' has been queued to stable release 17.08.1 Yuanhan Liu
` (127 preceding siblings ...)
2017-11-21 13:17 ` [dpdk-stable] patch 'crypto/dpaa2_sec: remove ICV memset on decryption side' " Yuanhan Liu
@ 2017-11-21 13:17 ` Yuanhan Liu
2017-11-21 13:17 ` [dpdk-stable] patch 'examples/ipsec-secgw: fix IP version check' " Yuanhan Liu
` (60 subsequent siblings)
189 siblings, 0 replies; 191+ messages in thread
From: Yuanhan Liu @ 2017-11-21 13:17 UTC (permalink / raw)
To: Alok Makhariya; +Cc: Akhil Goyal, dpdk stable
Hi,
FYI, your patch has been queued to stable release 17.08.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/24/17. So please
shout if anyone has objections.
Thanks.
--yliu
---
>From f1ff0980416e1cbf447e6ae981a167c44b907423 Mon Sep 17 00:00:00 2001
From: Alok Makhariya <alok.makhariya@nxp.com>
Date: Fri, 13 Oct 2017 21:08:54 +0530
Subject: [PATCH] crypto/dpaa2_sec: add check for segmented buffer
[ upstream commit 9b0b95a48c0e171454cfca4231cecac7d470a75c ]
The code would crash for segmented buffer if no check.
Fixes: 8d1f3a5d751b ("crypto/dpaa2_sec: support crypto operation")
Signed-off-by: Alok Makhariya <alok.makhariya@nxp.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
---
drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c b/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
index 61c1eae..28d8af5 100644
--- a/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
+++ b/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
@@ -548,7 +548,13 @@ build_sec_fd(dpaa2_sec_session *sess, struct rte_crypto_op *op,
int ret = -1;
PMD_INIT_FUNC_TRACE();
-
+ /*
+ * Segmented buffer is not supported.
+ */
+ if (!rte_pktmbuf_is_contiguous(op->sym->m_src)) {
+ op->status = RTE_CRYPTO_OP_STATUS_ERROR;
+ return -ENOTSUP;
+ }
switch (sess->ctxt_type) {
case DPAA2_SEC_CIPHER:
ret = build_cipher_fd(sess, op, fd, bpid);
--
2.7.4
^ permalink raw reply [flat|nested] 191+ messages in thread
* [dpdk-stable] patch 'examples/ipsec-secgw: fix IP version check' has been queued to stable release 17.08.1
2017-11-21 13:15 [dpdk-stable] patch 'gro: fix typo in map file' has been queued to stable release 17.08.1 Yuanhan Liu
` (128 preceding siblings ...)
2017-11-21 13:17 ` [dpdk-stable] patch 'crypto/dpaa2_sec: add check for segmented buffer' " Yuanhan Liu
@ 2017-11-21 13:17 ` Yuanhan Liu
2017-11-21 13:17 ` [dpdk-stable] patch 'cryptodev: fix build with -Ofast' " Yuanhan Liu
` (59 subsequent siblings)
189 siblings, 0 replies; 191+ messages in thread
From: Yuanhan Liu @ 2017-11-21 13:17 UTC (permalink / raw)
To: Tomasz Duszynski; +Cc: Sergio Gonzalez Monroy, Aviad Yehezkel, dpdk stable
Hi,
FYI, your patch has been queued to stable release 17.08.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/24/17. So please
shout if anyone has objections.
Thanks.
--yliu
---
>From 9c69c762a3857fac47f1769332337215bbc1ad9b Mon Sep 17 00:00:00 2001
From: Tomasz Duszynski <tdu@semihalf.com>
Date: Fri, 13 Oct 2017 14:50:09 +0200
Subject: [PATCH] examples/ipsec-secgw: fix IP version check
[ upstream commit 3417350e7f1726d6495e0d85e2212f6d4f959e4e ]
Since new_ip and ip4 are overlapping buffers copying ip4 over new_ip
using memmove() might overwrite memory at ip4. This could happen if
following condition holds:
ip_hdr_len > sizeof(struct esp_hdr) + sa->iv_len
Thus using ip4 to check ip version is wrong as it might not contain
proper value.
Fixes: f159e70b0922 ("examples/ipsec-secgw: support transport mode")
Signed-off-by: Tomasz Duszynski <tdu@semihalf.com>
Acked-by: Sergio Gonzalez Monroy <sergio.gonzalez.monroy@intel.com>
Reviewed-by: Aviad Yehezkel <aviadye@mellanox.com>
---
examples/ipsec-secgw/esp.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/examples/ipsec-secgw/esp.c b/examples/ipsec-secgw/esp.c
index 70bb81f..56ad7a0 100644
--- a/examples/ipsec-secgw/esp.c
+++ b/examples/ipsec-secgw/esp.c
@@ -306,8 +306,8 @@ esp_outbound(struct rte_mbuf *m, struct ipsec_sa *sa,
sizeof(struct esp_hdr) + sa->iv_len);
memmove(new_ip, ip4, ip_hdr_len);
esp = (struct esp_hdr *)(new_ip + ip_hdr_len);
+ ip4 = (struct ip *)new_ip;
if (likely(ip4->ip_v == IPVERSION)) {
- ip4 = (struct ip *)new_ip;
ip4->ip_p = IPPROTO_ESP;
ip4->ip_len = htons(rte_pktmbuf_data_len(m));
} else {
--
2.7.4
^ permalink raw reply [flat|nested] 191+ messages in thread
* [dpdk-stable] patch 'cryptodev: fix build with -Ofast' has been queued to stable release 17.08.1
2017-11-21 13:15 [dpdk-stable] patch 'gro: fix typo in map file' has been queued to stable release 17.08.1 Yuanhan Liu
` (129 preceding siblings ...)
2017-11-21 13:17 ` [dpdk-stable] patch 'examples/ipsec-secgw: fix IP version check' " Yuanhan Liu
@ 2017-11-21 13:17 ` Yuanhan Liu
2017-11-21 13:17 ` [dpdk-stable] patch 'examples/ipsec-secgw: fix IPv6 payload length' " Yuanhan Liu
` (58 subsequent siblings)
189 siblings, 0 replies; 191+ messages in thread
From: Yuanhan Liu @ 2017-11-21 13:17 UTC (permalink / raw)
To: Ian Stokes; +Cc: Pablo de Lara, dpdk stable
Hi,
FYI, your patch has been queued to stable release 17.08.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/24/17. So please
shout if anyone has objections.
Thanks.
--yliu
---
>From fbbe623c2aa3d64aa72c377e7b6e4f9c6051acde Mon Sep 17 00:00:00 2001
From: Ian Stokes <ian.stokes@intel.com>
Date: Tue, 17 Oct 2017 15:15:06 +0100
Subject: [PATCH] cryptodev: fix build with -Ofast
[ upstream commit 812f48370f93198f082f98a69f0882b6ae1bde61 ]
When compiling with an application that includes rte_cryptodev.h with
Ofast, an error is reported regarding enumeration
RTE_CRYPTO_OP_TYPE_UNDEFINED not handled in switch case in function
__rte_crypto_op_reset().
Fix this by adding a case for RTE_CRYPTO_OP_TYPE_UNDEFINED.
Fixes: c0f87eb5252b ("cryptodev: change burst API to be crypto op oriented")
Signed-off-by: Ian Stokes <ian.stokes@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
---
lib/librte_cryptodev/rte_crypto.h | 1 +
1 file changed, 1 insertion(+)
diff --git a/lib/librte_cryptodev/rte_crypto.h b/lib/librte_cryptodev/rte_crypto.h
index 10fe080..3ef9e41 100644
--- a/lib/librte_cryptodev/rte_crypto.h
+++ b/lib/librte_cryptodev/rte_crypto.h
@@ -144,6 +144,7 @@ __rte_crypto_op_reset(struct rte_crypto_op *op, enum rte_crypto_op_type type)
case RTE_CRYPTO_OP_TYPE_SYMMETRIC:
__rte_crypto_sym_op_reset(op->sym);
break;
+ case RTE_CRYPTO_OP_TYPE_UNDEFINED:
default:
break;
}
--
2.7.4
^ permalink raw reply [flat|nested] 191+ messages in thread
* [dpdk-stable] patch 'examples/ipsec-secgw: fix IPv6 payload length' has been queued to stable release 17.08.1
2017-11-21 13:15 [dpdk-stable] patch 'gro: fix typo in map file' has been queued to stable release 17.08.1 Yuanhan Liu
` (130 preceding siblings ...)
2017-11-21 13:17 ` [dpdk-stable] patch 'cryptodev: fix build with -Ofast' " Yuanhan Liu
@ 2017-11-21 13:17 ` Yuanhan Liu
2017-11-21 13:17 ` [dpdk-stable] patch 'examples/ipsec-secgw: fix crypto device mapping' " Yuanhan Liu
` (57 subsequent siblings)
189 siblings, 0 replies; 191+ messages in thread
From: Yuanhan Liu @ 2017-11-21 13:17 UTC (permalink / raw)
To: Tomasz Duszynski; +Cc: Sergio Gonzalez Monroy, dpdk stable
Hi,
FYI, your patch has been queued to stable release 17.08.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/24/17. So please
shout if anyone has objections.
Thanks.
--yliu
---
>From c4729ac031f3a79afad358506d7b2adbb141ae50 Mon Sep 17 00:00:00 2001
From: Tomasz Duszynski <tdu@semihalf.com>
Date: Fri, 13 Oct 2017 10:04:36 +0200
Subject: [PATCH] examples/ipsec-secgw: fix IPv6 payload length
[ upstream commit b43a81319b2411bbdb96bd349cd3cdfd66714777 ]
IPv6 payload length header field should contain only the number of bytes
following the IPv6 header and not the entire packet size.
Fixes: f159e70b0922 ("examples/ipsec-secgw: support transport mode")
Fixes: 906257e965b7 ("examples/ipsec-secgw: support IPv6")
Signed-off-by: Tomasz Duszynski <tdu@semihalf.com>
Acked-by: Sergio Gonzalez Monroy <sergio.gonzalez.monroy@intel.com>
---
examples/ipsec-secgw/esp.c | 6 ++++--
examples/ipsec-secgw/ipip.h | 3 ++-
2 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/examples/ipsec-secgw/esp.c b/examples/ipsec-secgw/esp.c
index 56ad7a0..063e63f 100644
--- a/examples/ipsec-secgw/esp.c
+++ b/examples/ipsec-secgw/esp.c
@@ -211,7 +211,8 @@ esp_inbound_post(struct rte_mbuf *m, struct ipsec_sa *sa,
/* XXX No option headers supported */
memmove(ip6, ip, sizeof(struct ip6_hdr));
ip6->ip6_nxt = *nexthdr;
- ip6->ip6_plen = htons(rte_pktmbuf_data_len(m));
+ ip6->ip6_plen = htons(rte_pktmbuf_data_len(m) -
+ sizeof(struct ip6_hdr));
}
} else
ipip_inbound(m, sizeof(struct esp_hdr) + sa->iv_len);
@@ -313,7 +314,8 @@ esp_outbound(struct rte_mbuf *m, struct ipsec_sa *sa,
} else {
ip6 = (struct ip6_hdr *)new_ip;
ip6->ip6_nxt = IPPROTO_ESP;
- ip6->ip6_plen = htons(rte_pktmbuf_data_len(m));
+ ip6->ip6_plen = htons(rte_pktmbuf_data_len(m) -
+ sizeof(struct ip6_hdr));
}
}
diff --git a/examples/ipsec-secgw/ipip.h b/examples/ipsec-secgw/ipip.h
index ff1dccd..93393d5 100644
--- a/examples/ipsec-secgw/ipip.h
+++ b/examples/ipsec-secgw/ipip.h
@@ -72,7 +72,8 @@ ipip_outbound(struct rte_mbuf *m, uint32_t offset, uint32_t is_ipv6,
/* Per RFC4301 5.1.2.1 */
outip6->ip6_flow = htonl(IP6_VERSION << 28 | ds_ecn << 20);
- outip6->ip6_plen = htons(rte_pktmbuf_data_len(m));
+ outip6->ip6_plen = htons(rte_pktmbuf_data_len(m) -
+ sizeof(struct ip6_hdr));
outip6->ip6_nxt = IPPROTO_ESP;
outip6->ip6_hops = IPDEFTTL;
--
2.7.4
^ permalink raw reply [flat|nested] 191+ messages in thread
* [dpdk-stable] patch 'examples/ipsec-secgw: fix crypto device mapping' has been queued to stable release 17.08.1
2017-11-21 13:15 [dpdk-stable] patch 'gro: fix typo in map file' has been queued to stable release 17.08.1 Yuanhan Liu
` (131 preceding siblings ...)
2017-11-21 13:17 ` [dpdk-stable] patch 'examples/ipsec-secgw: fix IPv6 payload length' " Yuanhan Liu
@ 2017-11-21 13:17 ` Yuanhan Liu
2017-11-21 13:17 ` [dpdk-stable] patch 'examples/ipsec-secgw: fix session creation' " Yuanhan Liu
` (56 subsequent siblings)
189 siblings, 0 replies; 191+ messages in thread
From: Yuanhan Liu @ 2017-11-21 13:17 UTC (permalink / raw)
To: Aviad Yehezkel; +Cc: Radu Nicolau, Pablo de Lara, dpdk stable
Hi,
FYI, your patch has been queued to stable release 17.08.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/24/17. So please
shout if anyone has objections.
Thanks.
--yliu
---
>From 4dae0331ced1aa154aefd706bb19950a404f553b Mon Sep 17 00:00:00 2001
From: Aviad Yehezkel <aviadye@mellanox.com>
Date: Tue, 24 Oct 2017 15:48:57 +0300
Subject: [PATCH] examples/ipsec-secgw: fix crypto device mapping
[ upstream commit 15f81cbf65d361e0b922e0d86db381084a2a5124 ]
AEAD algorithms were not being added in the mapping
between algorithms and crypto devices, only cipher and
authentication chained algorithms.
Fixes: 501e9c226adf ("examples/ipsec-secgw: add AEAD parameters")
Signed-off-by: Aviad Yehezkel <aviadye@mellanox.com>
Acked-by: Radu Nicolau <radu.nicolau@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
---
examples/ipsec-secgw/ipsec-secgw.c | 13 +++++++++++--
examples/ipsec-secgw/ipsec.h | 1 +
2 files changed, 12 insertions(+), 2 deletions(-)
diff --git a/examples/ipsec-secgw/ipsec-secgw.c b/examples/ipsec-secgw/ipsec-secgw.c
index 99dc270..b431a63 100644
--- a/examples/ipsec-secgw/ipsec-secgw.c
+++ b/examples/ipsec-secgw/ipsec-secgw.c
@@ -1113,7 +1113,8 @@ add_mapping(struct rte_hash *map, const char *str, uint16_t cdev_id,
uint16_t qp, struct lcore_params *params,
struct ipsec_ctx *ipsec_ctx,
const struct rte_cryptodev_capabilities *cipher,
- const struct rte_cryptodev_capabilities *auth)
+ const struct rte_cryptodev_capabilities *auth,
+ const struct rte_cryptodev_capabilities *aead)
{
int32_t ret = 0;
unsigned long i;
@@ -1124,6 +1125,8 @@ add_mapping(struct rte_hash *map, const char *str, uint16_t cdev_id,
key.cipher_algo = cipher->sym.cipher.algo;
if (auth)
key.auth_algo = auth->sym.auth.algo;
+ if (aead)
+ key.aead_algo = aead->sym.aead.algo;
ret = rte_hash_lookup(map, &key);
if (ret != -ENOENT)
@@ -1192,6 +1195,12 @@ add_cdev_mapping(struct rte_cryptodev_info *dev_info, uint16_t cdev_id,
if (i->op != RTE_CRYPTO_OP_TYPE_SYMMETRIC)
continue;
+ if (i->sym.xform_type == RTE_CRYPTO_SYM_XFORM_AEAD) {
+ ret |= add_mapping(map, str, cdev_id, qp, params,
+ ipsec_ctx, NULL, NULL, i);
+ continue;
+ }
+
if (i->sym.xform_type != RTE_CRYPTO_SYM_XFORM_CIPHER)
continue;
@@ -1204,7 +1213,7 @@ add_cdev_mapping(struct rte_cryptodev_info *dev_info, uint16_t cdev_id,
continue;
ret |= add_mapping(map, str, cdev_id, qp, params,
- ipsec_ctx, i, j);
+ ipsec_ctx, i, j, NULL);
}
}
diff --git a/examples/ipsec-secgw/ipsec.h b/examples/ipsec-secgw/ipsec.h
index da1fb1b..7d057ae 100644
--- a/examples/ipsec-secgw/ipsec.h
+++ b/examples/ipsec-secgw/ipsec.h
@@ -150,6 +150,7 @@ struct cdev_key {
uint16_t lcore_id;
uint8_t cipher_algo;
uint8_t auth_algo;
+ uint8_t aead_algo;
};
struct socket_ctx {
--
2.7.4
^ permalink raw reply [flat|nested] 191+ messages in thread
* [dpdk-stable] patch 'examples/ipsec-secgw: fix session creation' has been queued to stable release 17.08.1
2017-11-21 13:15 [dpdk-stable] patch 'gro: fix typo in map file' has been queued to stable release 17.08.1 Yuanhan Liu
` (132 preceding siblings ...)
2017-11-21 13:17 ` [dpdk-stable] patch 'examples/ipsec-secgw: fix crypto device mapping' " Yuanhan Liu
@ 2017-11-21 13:17 ` Yuanhan Liu
2017-11-21 13:17 ` [dpdk-stable] patch 'examples/ipsec-secgw: fix AAD length setting' " Yuanhan Liu
` (55 subsequent siblings)
189 siblings, 0 replies; 191+ messages in thread
From: Yuanhan Liu @ 2017-11-21 13:17 UTC (permalink / raw)
To: Aviad Yehezkel; +Cc: Radu Nicolau, Pablo de Lara, dpdk stable
Hi,
FYI, your patch has been queued to stable release 17.08.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/24/17. So please
shout if anyone has objections.
Thanks.
--yliu
---
>From 86117fed92c93cecdd4420165e8b448b0946054b Mon Sep 17 00:00:00 2001
From: Aviad Yehezkel <aviadye@mellanox.com>
Date: Tue, 24 Oct 2017 15:48:58 +0300
Subject: [PATCH] examples/ipsec-secgw: fix session creation
[ upstream commit d00f38905cb45ebb4fecf509079d7486c1a244ae ]
Search for session also with AEAD algorithms.
Fixes: 501e9c226adf ("examples/ipsec-secgw: add AEAD parameters")
Signed-off-by: Aviad Yehezkel <aviadye@mellanox.com>
Acked-by: Radu Nicolau <radu.nicolau@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
---
examples/ipsec-secgw/ipsec.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/examples/ipsec-secgw/ipsec.c b/examples/ipsec-secgw/ipsec.c
index 0afb9d6..36fb8c8 100644
--- a/examples/ipsec-secgw/ipsec.c
+++ b/examples/ipsec-secgw/ipsec.c
@@ -56,13 +56,17 @@ create_session(struct ipsec_ctx *ipsec_ctx, struct ipsec_sa *sa)
key.cipher_algo = (uint8_t)sa->cipher_algo;
key.auth_algo = (uint8_t)sa->auth_algo;
+ key.aead_algo = (uint8_t)sa->aead_algo;
ret = rte_hash_lookup_data(ipsec_ctx->cdev_map, &key,
(void **)&cdev_id_qp);
if (ret < 0) {
RTE_LOG(ERR, IPSEC, "No cryptodev: core %u, cipher_algo %u, "
- "auth_algo %u\n", key.lcore_id, key.cipher_algo,
- key.auth_algo);
+ "auth_algo %u, aead_algo %u\n",
+ key.lcore_id,
+ key.cipher_algo,
+ key.auth_algo,
+ key.aead_algo);
return -1;
}
--
2.7.4
^ permalink raw reply [flat|nested] 191+ messages in thread
* [dpdk-stable] patch 'examples/ipsec-secgw: fix AAD length setting' has been queued to stable release 17.08.1
2017-11-21 13:15 [dpdk-stable] patch 'gro: fix typo in map file' has been queued to stable release 17.08.1 Yuanhan Liu
` (133 preceding siblings ...)
2017-11-21 13:17 ` [dpdk-stable] patch 'examples/ipsec-secgw: fix session creation' " Yuanhan Liu
@ 2017-11-21 13:17 ` Yuanhan Liu
2017-11-21 13:17 ` [dpdk-stable] patch 'examples/l2fwd-crypto: fix physical address " Yuanhan Liu
` (54 subsequent siblings)
189 siblings, 0 replies; 191+ messages in thread
From: Yuanhan Liu @ 2017-11-21 13:17 UTC (permalink / raw)
To: Aviad Yehezkel; +Cc: Radu Nicolau, Pablo de Lara, dpdk stable
Hi,
FYI, your patch has been queued to stable release 17.08.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/24/17. So please
shout if anyone has objections.
Thanks.
--yliu
---
>From 6949f55cf3fe556e34bbcc5c7037bec04dd62256 Mon Sep 17 00:00:00 2001
From: Aviad Yehezkel <aviadye@mellanox.com>
Date: Tue, 24 Oct 2017 15:48:59 +0300
Subject: [PATCH] examples/ipsec-secgw: fix AAD length setting
[ upstream commit 4040126053d8dd79dbd63b721fa6b73bd3863e0e ]
Fixes: 501e9c226adf ("examples/ipsec-secgw: add AEAD parameters")
Signed-off-by: Aviad Yehezkel <aviadye@mellanox.com>
Acked-by: Radu Nicolau <radu.nicolau@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
---
examples/ipsec-secgw/sa.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/examples/ipsec-secgw/sa.c b/examples/ipsec-secgw/sa.c
index 7be0e62..0f5c4fe 100644
--- a/examples/ipsec-secgw/sa.c
+++ b/examples/ipsec-secgw/sa.c
@@ -375,7 +375,6 @@ parse_sa_tokens(char **tokens, uint32_t n_tokens,
rule->auth_algo = algo->algo;
rule->auth_key_len = algo->key_len;
rule->digest_len = algo->digest_len;
- rule->aad_len = algo->key_len;
/* NULL algorithm and combined algos do not
* require auth key
@@ -431,7 +430,7 @@ parse_sa_tokens(char **tokens, uint32_t n_tokens,
rule->aead_algo = algo->algo;
rule->cipher_key_len = algo->key_len;
rule->digest_len = algo->digest_len;
- rule->aad_len = algo->key_len;
+ rule->aad_len = algo->aad_len;
rule->block_size = algo->block_size;
rule->iv_len = algo->iv_len;
--
2.7.4
^ permalink raw reply [flat|nested] 191+ messages in thread
* [dpdk-stable] patch 'examples/l2fwd-crypto: fix physical address setting' has been queued to stable release 17.08.1
2017-11-21 13:15 [dpdk-stable] patch 'gro: fix typo in map file' has been queued to stable release 17.08.1 Yuanhan Liu
` (134 preceding siblings ...)
2017-11-21 13:17 ` [dpdk-stable] patch 'examples/ipsec-secgw: fix AAD length setting' " Yuanhan Liu
@ 2017-11-21 13:17 ` Yuanhan Liu
2017-11-21 13:18 ` [dpdk-stable] patch 'crypto/qat: fix HMAC supported digest sizes' " Yuanhan Liu
` (53 subsequent siblings)
189 siblings, 0 replies; 191+ messages in thread
From: Yuanhan Liu @ 2017-11-21 13:17 UTC (permalink / raw)
To: Pablo de Lara; +Cc: dpdk stable
Hi,
FYI, your patch has been queued to stable release 17.08.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/24/17. So please
shout if anyone has objections.
Thanks.
--yliu
---
>From 43413e5bfc29f6713e7836a1e418f3a30229955d Mon Sep 17 00:00:00 2001
From: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Date: Tue, 24 Oct 2017 11:14:41 +0100
Subject: [PATCH] examples/l2fwd-crypto: fix physical address setting
[ upstream commit f12a5b5b27bc1dfb7e1296c92b13e58f68b26aaf ]
For AEAD algorithms, the physical address for the digest
was being set incorrectly.
Fixes: 2661f4fbe93d ("examples/l2fwd-crypto: add AEAD parameters")
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
---
examples/l2fwd-crypto/main.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/examples/l2fwd-crypto/main.c b/examples/l2fwd-crypto/main.c
index 17673a3..49ee08c 100644
--- a/examples/l2fwd-crypto/main.c
+++ b/examples/l2fwd-crypto/main.c
@@ -548,7 +548,7 @@ l2fwd_simple_crypto_enqueue(struct rte_mbuf *m,
uint8_t *) + ipdata_offset + data_len;
}
- op->sym->auth.digest.phys_addr = rte_pktmbuf_mtophys_offset(m,
+ op->sym->aead.digest.phys_addr = rte_pktmbuf_mtophys_offset(m,
rte_pktmbuf_pkt_len(m) - cparams->digest_length);
if (cparams->aad.length) {
--
2.7.4
^ permalink raw reply [flat|nested] 191+ messages in thread
* [dpdk-stable] patch 'crypto/qat: fix HMAC supported digest sizes' has been queued to stable release 17.08.1
2017-11-21 13:15 [dpdk-stable] patch 'gro: fix typo in map file' has been queued to stable release 17.08.1 Yuanhan Liu
` (135 preceding siblings ...)
2017-11-21 13:17 ` [dpdk-stable] patch 'examples/l2fwd-crypto: fix physical address " Yuanhan Liu
@ 2017-11-21 13:18 ` Yuanhan Liu
2017-11-21 13:18 ` [dpdk-stable] patch 'net/i40e: fix TM node parameter checking' " Yuanhan Liu
` (52 subsequent siblings)
189 siblings, 0 replies; 191+ messages in thread
From: Yuanhan Liu @ 2017-11-21 13:18 UTC (permalink / raw)
To: Pablo de Lara; +Cc: Arkadiusz Kusztal, dpdk stable
Hi,
FYI, your patch has been queued to stable release 17.08.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/24/17. So please
shout if anyone has objections.
Thanks.
--yliu
---
>From 3fbb5918ce70830fd65c84b7c2b0e8a79a53794e Mon Sep 17 00:00:00 2001
From: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Date: Mon, 23 Oct 2017 11:37:09 +0100
Subject: [PATCH] crypto/qat: fix HMAC supported digest sizes
[ upstream commit 0ef45a9ae8d5b3792afbb2e32103affaad22cbe4 ]
For HMAC algorithms (MD5-HMAC, SHAx-HMAC), the supported
digest sizes are not a fixed value, but a range between
1 and the maximum digest size for those algorithms.
Fixes: 26c2e4ad5ad4 ("cryptodev: add capabilities discovery")
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Arkadiusz Kusztal <arkadiuszx.kusztal@intel.com>
---
drivers/crypto/qat/qat_crypto_capabilities.h | 24 ++++++++++++------------
1 file changed, 12 insertions(+), 12 deletions(-)
diff --git a/drivers/crypto/qat/qat_crypto_capabilities.h b/drivers/crypto/qat/qat_crypto_capabilities.h
index 7012007..e85fe80 100644
--- a/drivers/crypto/qat/qat_crypto_capabilities.h
+++ b/drivers/crypto/qat/qat_crypto_capabilities.h
@@ -48,9 +48,9 @@
.increment = 1 \
}, \
.digest_size = { \
- .min = 20, \
+ .min = 1, \
.max = 20, \
- .increment = 0 \
+ .increment = 1 \
}, \
.iv_size = { 0 } \
}, } \
@@ -69,9 +69,9 @@
.increment = 1 \
}, \
.digest_size = { \
- .min = 28, \
+ .min = 1, \
.max = 28, \
- .increment = 0 \
+ .increment = 1 \
}, \
.iv_size = { 0 } \
}, } \
@@ -90,9 +90,9 @@
.increment = 1 \
}, \
.digest_size = { \
- .min = 32, \
+ .min = 1, \
.max = 32, \
- .increment = 0 \
+ .increment = 1 \
}, \
.iv_size = { 0 } \
}, } \
@@ -111,9 +111,9 @@
.increment = 1 \
}, \
.digest_size = { \
- .min = 48, \
+ .min = 1, \
.max = 48, \
- .increment = 0 \
+ .increment = 1 \
}, \
.iv_size = { 0 } \
}, } \
@@ -132,9 +132,9 @@
.increment = 1 \
}, \
.digest_size = { \
- .min = 64, \
+ .min = 1, \
.max = 64, \
- .increment = 0 \
+ .increment = 1 \
}, \
.iv_size = { 0 } \
}, } \
@@ -153,9 +153,9 @@
.increment = 1 \
}, \
.digest_size = { \
- .min = 16, \
+ .min = 1, \
.max = 16, \
- .increment = 0 \
+ .increment = 1 \
}, \
.iv_size = { 0 } \
}, } \
--
2.7.4
^ permalink raw reply [flat|nested] 191+ messages in thread
* [dpdk-stable] patch 'net/i40e: fix TM node parameter checking' has been queued to stable release 17.08.1
2017-11-21 13:15 [dpdk-stable] patch 'gro: fix typo in map file' has been queued to stable release 17.08.1 Yuanhan Liu
` (136 preceding siblings ...)
2017-11-21 13:18 ` [dpdk-stable] patch 'crypto/qat: fix HMAC supported digest sizes' " Yuanhan Liu
@ 2017-11-21 13:18 ` Yuanhan Liu
2017-11-21 13:18 ` [dpdk-stable] patch 'net/i40e: fix TM level capability getting' " Yuanhan Liu
` (51 subsequent siblings)
189 siblings, 0 replies; 191+ messages in thread
From: Yuanhan Liu @ 2017-11-21 13:18 UTC (permalink / raw)
To: Wenzhuo Lu; +Cc: Cristian Dumitrescu, dpdk stable
Hi,
FYI, your patch has been queued to stable release 17.08.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/24/17. So please
shout if anyone has objections.
Thanks.
--yliu
---
>From b9f2c910a224f12d9781ec7185b66707a7682454 Mon Sep 17 00:00:00 2001
From: Wenzhuo Lu <wenzhuo.lu@intel.com>
Date: Tue, 17 Oct 2017 13:50:34 +0800
Subject: [PATCH] net/i40e: fix TM node parameter checking
[ upstream commit 1be6985827ff4f189e827f19de5e26d4f5ca8a73 ]
Only queue nodes should be taken as leaf nodes, all
the other nodes are non-leaf nodes.
Correct it when checking the parameters of the TM nodes.
Fixes: 03a249b62bbd ("net/i40e: support adding TM node")
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
---
drivers/net/i40e/i40e_tm.c | 12 +++++++-----
1 file changed, 7 insertions(+), 5 deletions(-)
diff --git a/drivers/net/i40e/i40e_tm.c b/drivers/net/i40e/i40e_tm.c
index d90313a..fe99215 100644
--- a/drivers/net/i40e/i40e_tm.c
+++ b/drivers/net/i40e/i40e_tm.c
@@ -374,11 +374,13 @@ i40e_tm_node_search(struct rte_eth_dev *dev,
}
static int
-i40e_node_param_check(uint32_t node_id, uint32_t parent_node_id,
+i40e_node_param_check(struct rte_eth_dev *dev, uint32_t node_id,
uint32_t priority, uint32_t weight,
struct rte_tm_node_params *params,
struct rte_tm_error *error)
{
+ struct i40e_hw *hw = I40E_DEV_PRIVATE_TO_HW(dev->data->dev_private);
+
if (node_id == RTE_TM_NODE_ID_NULL) {
error->type = RTE_TM_ERROR_TYPE_NODE_ID;
error->message = "invalid node id";
@@ -409,8 +411,8 @@ i40e_node_param_check(uint32_t node_id, uint32_t parent_node_id,
return -EINVAL;
}
- /* for root node */
- if (parent_node_id == RTE_TM_NODE_ID_NULL) {
+ /* for non-leaf node */
+ if (node_id >= hw->func_caps.num_tx_qp) {
if (params->nonleaf.wfq_weight_mode) {
error->type =
RTE_TM_ERROR_TYPE_NODE_PARAMS_WFQ_WEIGHT_MODE;
@@ -433,7 +435,7 @@ i40e_node_param_check(uint32_t node_id, uint32_t parent_node_id,
return 0;
}
- /* for TC or queue node */
+ /* for leaf node */
if (params->leaf.cman) {
error->type = RTE_TM_ERROR_TYPE_NODE_PARAMS_CMAN;
error->message = "Congestion management not supported";
@@ -494,7 +496,7 @@ i40e_node_add(struct rte_eth_dev *dev, uint32_t node_id,
return -EINVAL;
}
- ret = i40e_node_param_check(node_id, parent_node_id, priority, weight,
+ ret = i40e_node_param_check(dev, node_id, priority, weight,
params, error);
if (ret)
return ret;
--
2.7.4
^ permalink raw reply [flat|nested] 191+ messages in thread
* [dpdk-stable] patch 'net/i40e: fix TM level capability getting' has been queued to stable release 17.08.1
2017-11-21 13:15 [dpdk-stable] patch 'gro: fix typo in map file' has been queued to stable release 17.08.1 Yuanhan Liu
` (137 preceding siblings ...)
2017-11-21 13:18 ` [dpdk-stable] patch 'net/i40e: fix TM node parameter checking' " Yuanhan Liu
@ 2017-11-21 13:18 ` Yuanhan Liu
2017-11-21 13:18 ` [dpdk-stable] patch 'net/ixgbe: fix TM node parameter checking' " Yuanhan Liu
` (50 subsequent siblings)
189 siblings, 0 replies; 191+ messages in thread
From: Yuanhan Liu @ 2017-11-21 13:18 UTC (permalink / raw)
To: Wenzhuo Lu; +Cc: Cristian Dumitrescu, dpdk stable
Hi,
FYI, your patch has been queued to stable release 17.08.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/24/17. So please
shout if anyone has objections.
Thanks.
--yliu
---
>From 51587c009af9828ca60f8018bd417bb862e4d288 Mon Sep 17 00:00:00 2001
From: Wenzhuo Lu <wenzhuo.lu@intel.com>
Date: Tue, 17 Oct 2017 13:50:35 +0800
Subject: [PATCH] net/i40e: fix TM level capability getting
[ upstream commit 0d0f144831b24d5b54a75631de9f6c5b9074b4ce ]
Only queue nodes should be taken as leaf nodes, all
the other nodes are non-leaf nodes.
Correct it when getting the TM level capability.
Fixes: 0fb1ef1e7930 ("net/i40e: support getting TM level capability")
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
---
drivers/net/i40e/i40e_tm.c | 41 +++++++++++++++++++++++------------------
1 file changed, 23 insertions(+), 18 deletions(-)
diff --git a/drivers/net/i40e/i40e_tm.c b/drivers/net/i40e/i40e_tm.c
index fe99215..d46a972 100644
--- a/drivers/net/i40e/i40e_tm.c
+++ b/drivers/net/i40e/i40e_tm.c
@@ -755,15 +755,34 @@ i40e_level_capabilities_get(struct rte_eth_dev *dev,
cap->n_nodes_max = 1;
cap->n_nodes_nonleaf_max = 1;
cap->n_nodes_leaf_max = 0;
- cap->non_leaf_nodes_identical = true;
- cap->leaf_nodes_identical = true;
+ } else if (level_id == I40E_TM_NODE_TYPE_TC) {
+ /* TC */
+ cap->n_nodes_max = I40E_MAX_TRAFFIC_CLASS;
+ cap->n_nodes_nonleaf_max = I40E_MAX_TRAFFIC_CLASS;
+ cap->n_nodes_leaf_max = 0;
+ } else {
+ /* queue */
+ cap->n_nodes_max = hw->func_caps.num_tx_qp;
+ cap->n_nodes_nonleaf_max = 0;
+ cap->n_nodes_leaf_max = hw->func_caps.num_tx_qp;
+ }
+
+ cap->non_leaf_nodes_identical = true;
+ cap->leaf_nodes_identical = true;
+
+ if (level_id != I40E_TM_NODE_TYPE_QUEUE) {
cap->nonleaf.shaper_private_supported = true;
cap->nonleaf.shaper_private_dual_rate_supported = false;
cap->nonleaf.shaper_private_rate_min = 0;
/* 40Gbps -> 5GBps */
cap->nonleaf.shaper_private_rate_max = 5000000000ull;
cap->nonleaf.shaper_shared_n_max = 0;
- cap->nonleaf.sched_n_children_max = I40E_MAX_TRAFFIC_CLASS;
+ if (level_id == I40E_TM_NODE_TYPE_PORT)
+ cap->nonleaf.sched_n_children_max =
+ I40E_MAX_TRAFFIC_CLASS;
+ else
+ cap->nonleaf.sched_n_children_max =
+ hw->func_caps.num_tx_qp;
cap->nonleaf.sched_sp_n_priorities_max = 1;
cap->nonleaf.sched_wfq_n_children_per_group_max = 0;
cap->nonleaf.sched_wfq_n_groups_max = 0;
@@ -773,21 +792,7 @@ i40e_level_capabilities_get(struct rte_eth_dev *dev,
return 0;
}
- /* TC or queue node */
- if (level_id == I40E_TM_NODE_TYPE_TC) {
- /* TC */
- cap->n_nodes_max = I40E_MAX_TRAFFIC_CLASS;
- cap->n_nodes_nonleaf_max = I40E_MAX_TRAFFIC_CLASS;
- cap->n_nodes_leaf_max = 0;
- cap->non_leaf_nodes_identical = true;
- } else {
- /* queue */
- cap->n_nodes_max = hw->func_caps.num_tx_qp;
- cap->n_nodes_nonleaf_max = 0;
- cap->n_nodes_leaf_max = hw->func_caps.num_tx_qp;
- cap->non_leaf_nodes_identical = true;
- }
- cap->leaf_nodes_identical = true;
+ /* queue node */
cap->leaf.shaper_private_supported = true;
cap->leaf.shaper_private_dual_rate_supported = false;
cap->leaf.shaper_private_rate_min = 0;
--
2.7.4
^ permalink raw reply [flat|nested] 191+ messages in thread
* [dpdk-stable] patch 'net/ixgbe: fix TM node parameter checking' has been queued to stable release 17.08.1
2017-11-21 13:15 [dpdk-stable] patch 'gro: fix typo in map file' has been queued to stable release 17.08.1 Yuanhan Liu
` (138 preceding siblings ...)
2017-11-21 13:18 ` [dpdk-stable] patch 'net/i40e: fix TM level capability getting' " Yuanhan Liu
@ 2017-11-21 13:18 ` Yuanhan Liu
2017-11-21 13:18 ` [dpdk-stable] patch 'net/ixgbe: fix TM level capability getting' " Yuanhan Liu
` (49 subsequent siblings)
189 siblings, 0 replies; 191+ messages in thread
From: Yuanhan Liu @ 2017-11-21 13:18 UTC (permalink / raw)
To: Wenzhuo Lu; +Cc: Cristian Dumitrescu, dpdk stable
Hi,
FYI, your patch has been queued to stable release 17.08.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/24/17. So please
shout if anyone has objections.
Thanks.
--yliu
---
>From 007cf2deff0b6d92e46cf590b6ac7ac6de17313e Mon Sep 17 00:00:00 2001
From: Wenzhuo Lu <wenzhuo.lu@intel.com>
Date: Tue, 17 Oct 2017 13:50:36 +0800
Subject: [PATCH] net/ixgbe: fix TM node parameter checking
[ upstream commit 6bff19690d46a51cb8b5d38d0e0307bc73480673 ]
Only queue nodes should be taken as leaf nodes, all
the other nodes are non-leaf nodes.
Correct it when checking the parameters of the TM nodes.
Fixes: e0ff4d304ccf ("net/ixgbe: support adding TM node")
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
---
drivers/net/ixgbe/ixgbe_tm.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/drivers/net/ixgbe/ixgbe_tm.c b/drivers/net/ixgbe/ixgbe_tm.c
index cdcf45c..e7d8d39 100644
--- a/drivers/net/ixgbe/ixgbe_tm.c
+++ b/drivers/net/ixgbe/ixgbe_tm.c
@@ -482,7 +482,7 @@ ixgbe_queue_base_nb_get(struct rte_eth_dev *dev, uint16_t tc_node_no,
}
static int
-ixgbe_node_param_check(uint32_t node_id, uint32_t parent_node_id,
+ixgbe_node_param_check(struct rte_eth_dev *dev, uint32_t node_id,
uint32_t priority, uint32_t weight,
struct rte_tm_node_params *params,
struct rte_tm_error *error)
@@ -517,8 +517,8 @@ ixgbe_node_param_check(uint32_t node_id, uint32_t parent_node_id,
return -EINVAL;
}
- /* for root node */
- if (parent_node_id == RTE_TM_NODE_ID_NULL) {
+ /* for non-leaf node */
+ if (node_id >= dev->data->nb_tx_queues) {
/* check the unsupported parameters */
if (params->nonleaf.wfq_weight_mode) {
error->type =
@@ -542,7 +542,7 @@ ixgbe_node_param_check(uint32_t node_id, uint32_t parent_node_id,
return 0;
}
- /* for TC or queue node */
+ /* for leaf node */
/* check the unsupported parameters */
if (params->leaf.cman) {
error->type = RTE_TM_ERROR_TYPE_NODE_PARAMS_CMAN;
@@ -606,7 +606,7 @@ ixgbe_node_add(struct rte_eth_dev *dev, uint32_t node_id,
return -EINVAL;
}
- ret = ixgbe_node_param_check(node_id, parent_node_id, priority, weight,
+ ret = ixgbe_node_param_check(dev, node_id, priority, weight,
params, error);
if (ret)
return ret;
--
2.7.4
^ permalink raw reply [flat|nested] 191+ messages in thread
* [dpdk-stable] patch 'net/ixgbe: fix TM level capability getting' has been queued to stable release 17.08.1
2017-11-21 13:15 [dpdk-stable] patch 'gro: fix typo in map file' has been queued to stable release 17.08.1 Yuanhan Liu
` (139 preceding siblings ...)
2017-11-21 13:18 ` [dpdk-stable] patch 'net/ixgbe: fix TM node parameter checking' " Yuanhan Liu
@ 2017-11-21 13:18 ` Yuanhan Liu
2017-11-21 13:18 ` [dpdk-stable] patch 'net/i40e: fix not supporting NULL TM profile' " Yuanhan Liu
` (48 subsequent siblings)
189 siblings, 0 replies; 191+ messages in thread
From: Yuanhan Liu @ 2017-11-21 13:18 UTC (permalink / raw)
To: Wenzhuo Lu; +Cc: dpdk stable
Hi,
FYI, your patch has been queued to stable release 17.08.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/24/17. So please
shout if anyone has objections.
Thanks.
--yliu
---
>From a0c7813525be0c630e058ca58fbbb2f8847650d9 Mon Sep 17 00:00:00 2001
From: Wenzhuo Lu <wenzhuo.lu@intel.com>
Date: Tue, 17 Oct 2017 13:50:37 +0800
Subject: [PATCH] net/ixgbe: fix TM level capability getting
[ upstream commit 7039bcacb9abb6faa2f16c63fdbf52ca4f1a707e ]
Only queue nodes should be taken as leaf nodes, all
the other nodes are non-leaf nodes.
Correct it when getting the TM level capability.
Fixes: 596988e193f7 ("net/ixgbe: support getting TM level capability")
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
---
drivers/net/ixgbe/ixgbe_tm.c | 41 +++++++++++++++++++++++------------------
1 file changed, 23 insertions(+), 18 deletions(-)
diff --git a/drivers/net/ixgbe/ixgbe_tm.c b/drivers/net/ixgbe/ixgbe_tm.c
index e7d8d39..5c9b24c 100644
--- a/drivers/net/ixgbe/ixgbe_tm.c
+++ b/drivers/net/ixgbe/ixgbe_tm.c
@@ -876,15 +876,34 @@ ixgbe_level_capabilities_get(struct rte_eth_dev *dev,
cap->n_nodes_max = 1;
cap->n_nodes_nonleaf_max = 1;
cap->n_nodes_leaf_max = 0;
- cap->non_leaf_nodes_identical = true;
- cap->leaf_nodes_identical = true;
+ } else if (level_id == IXGBE_TM_NODE_TYPE_TC) {
+ /* TC */
+ cap->n_nodes_max = IXGBE_DCB_MAX_TRAFFIC_CLASS;
+ cap->n_nodes_nonleaf_max = IXGBE_DCB_MAX_TRAFFIC_CLASS;
+ cap->n_nodes_leaf_max = 0;
+ } else {
+ /* queue */
+ cap->n_nodes_max = hw->mac.max_tx_queues;
+ cap->n_nodes_nonleaf_max = 0;
+ cap->n_nodes_leaf_max = hw->mac.max_tx_queues;
+ }
+
+ cap->non_leaf_nodes_identical = true;
+ cap->leaf_nodes_identical = true;
+
+ if (level_id != IXGBE_TM_NODE_TYPE_QUEUE) {
cap->nonleaf.shaper_private_supported = true;
cap->nonleaf.shaper_private_dual_rate_supported = false;
cap->nonleaf.shaper_private_rate_min = 0;
/* 10Gbps -> 1.25GBps */
cap->nonleaf.shaper_private_rate_max = 1250000000ull;
cap->nonleaf.shaper_shared_n_max = 0;
- cap->nonleaf.sched_n_children_max = IXGBE_DCB_MAX_TRAFFIC_CLASS;
+ if (level_id == IXGBE_TM_NODE_TYPE_PORT)
+ cap->nonleaf.sched_n_children_max =
+ IXGBE_DCB_MAX_TRAFFIC_CLASS;
+ else
+ cap->nonleaf.sched_n_children_max =
+ hw->mac.max_tx_queues;
cap->nonleaf.sched_sp_n_priorities_max = 1;
cap->nonleaf.sched_wfq_n_children_per_group_max = 0;
cap->nonleaf.sched_wfq_n_groups_max = 0;
@@ -894,21 +913,7 @@ ixgbe_level_capabilities_get(struct rte_eth_dev *dev,
return 0;
}
- /* TC or queue node */
- if (level_id == IXGBE_TM_NODE_TYPE_TC) {
- /* TC */
- cap->n_nodes_max = IXGBE_DCB_MAX_TRAFFIC_CLASS;
- cap->n_nodes_nonleaf_max = IXGBE_DCB_MAX_TRAFFIC_CLASS;
- cap->n_nodes_leaf_max = 0;
- cap->non_leaf_nodes_identical = true;
- } else {
- /* queue */
- cap->n_nodes_max = hw->mac.max_tx_queues;
- cap->n_nodes_nonleaf_max = 0;
- cap->n_nodes_leaf_max = hw->mac.max_tx_queues;
- cap->non_leaf_nodes_identical = true;
- }
- cap->leaf_nodes_identical = true;
+ /* queue node */
cap->leaf.shaper_private_supported = true;
cap->leaf.shaper_private_dual_rate_supported = false;
cap->leaf.shaper_private_rate_min = 0;
--
2.7.4
^ permalink raw reply [flat|nested] 191+ messages in thread
* [dpdk-stable] patch 'net/i40e: fix not supporting NULL TM profile' has been queued to stable release 17.08.1
2017-11-21 13:15 [dpdk-stable] patch 'gro: fix typo in map file' has been queued to stable release 17.08.1 Yuanhan Liu
` (140 preceding siblings ...)
2017-11-21 13:18 ` [dpdk-stable] patch 'net/ixgbe: fix TM level capability getting' " Yuanhan Liu
@ 2017-11-21 13:18 ` Yuanhan Liu
2017-11-21 13:18 ` [dpdk-stable] patch 'net/ixgbe: " Yuanhan Liu
` (47 subsequent siblings)
189 siblings, 0 replies; 191+ messages in thread
From: Yuanhan Liu @ 2017-11-21 13:18 UTC (permalink / raw)
To: Wenzhuo Lu; +Cc: Cristian Dumitrescu, dpdk stable
Hi,
FYI, your patch has been queued to stable release 17.08.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/24/17. So please
shout if anyone has objections.
Thanks.
--yliu
---
>From cc3355ab5cca439926fcd0c9cc581e24a8f2441b Mon Sep 17 00:00:00 2001
From: Wenzhuo Lu <wenzhuo.lu@intel.com>
Date: Tue, 17 Oct 2017 13:50:38 +0800
Subject: [PATCH] net/i40e: fix not supporting NULL TM profile
[ upstream commit 70039fe684bf4c547e7ce12510afd8d80fb0bbbe ]
It's by design that APP can add a TM node without shaper
profile. But i40e doesn't support it currently.
Fixes: 03a249b62bbd ("net/i40e: support adding TM node")
Fixes: cac29c3c00a4 ("net/i40e: support committing TM hierarchy")
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
---
drivers/net/i40e/i40e_tm.c | 47 +++++++++++++++++++++++++++++++---------------
1 file changed, 32 insertions(+), 15 deletions(-)
diff --git a/drivers/net/i40e/i40e_tm.c b/drivers/net/i40e/i40e_tm.c
index d46a972..f4d1cb8 100644
--- a/drivers/net/i40e/i40e_tm.c
+++ b/drivers/net/i40e/i40e_tm.c
@@ -480,7 +480,7 @@ i40e_node_add(struct rte_eth_dev *dev, uint32_t node_id,
struct i40e_pf *pf = I40E_DEV_PRIVATE_TO_PF(dev->data->dev_private);
enum i40e_tm_node_type node_type = I40E_TM_NODE_TYPE_MAX;
enum i40e_tm_node_type parent_node_type = I40E_TM_NODE_TYPE_MAX;
- struct i40e_tm_shaper_profile *shaper_profile;
+ struct i40e_tm_shaper_profile *shaper_profile = NULL;
struct i40e_tm_node *tm_node;
struct i40e_tm_node *parent_node;
uint16_t tc_nb = 0;
@@ -509,12 +509,15 @@ i40e_node_add(struct rte_eth_dev *dev, uint32_t node_id,
}
/* check the shaper profile id */
- shaper_profile = i40e_shaper_profile_search(dev,
- params->shaper_profile_id);
- if (!shaper_profile) {
- error->type = RTE_TM_ERROR_TYPE_NODE_PARAMS_SHAPER_PROFILE_ID;
- error->message = "shaper profile not exist";
- return -EINVAL;
+ if (params->shaper_profile_id != RTE_TM_SHAPER_PROFILE_ID_NONE) {
+ shaper_profile = i40e_shaper_profile_search(
+ dev, params->shaper_profile_id);
+ if (!shaper_profile) {
+ error->type =
+ RTE_TM_ERROR_TYPE_NODE_PARAMS_SHAPER_PROFILE_ID;
+ error->message = "shaper profile not exist";
+ return -EINVAL;
+ }
}
/* root node if not have a parent */
@@ -551,7 +554,8 @@ i40e_node_add(struct rte_eth_dev *dev, uint32_t node_id,
pf->tm_conf.root = tm_node;
/* increase the reference counter of the shaper profile */
- shaper_profile->reference_count++;
+ if (shaper_profile)
+ shaper_profile->reference_count++;
return 0;
}
@@ -633,7 +637,8 @@ i40e_node_add(struct rte_eth_dev *dev, uint32_t node_id,
tm_node->parent->reference_count++;
/* increase the reference counter of the shaper profile */
- shaper_profile->reference_count++;
+ if (shaper_profile)
+ shaper_profile->reference_count++;
return 0;
}
@@ -680,14 +685,16 @@ i40e_node_delete(struct rte_eth_dev *dev, uint32_t node_id,
/* root node */
if (node_type == I40E_TM_NODE_TYPE_PORT) {
- tm_node->shaper_profile->reference_count--;
+ if (tm_node->shaper_profile)
+ tm_node->shaper_profile->reference_count--;
rte_free(tm_node);
pf->tm_conf.root = NULL;
return 0;
}
/* TC or queue node */
- tm_node->shaper_profile->reference_count--;
+ if (tm_node->shaper_profile)
+ tm_node->shaper_profile->reference_count--;
tm_node->parent->reference_count--;
if (node_type == I40E_TM_NODE_TYPE_TC) {
TAILQ_REMOVE(&pf->tm_conf.tc_list, tm_node, node);
@@ -895,11 +902,15 @@ i40e_hierarchy_commit(struct rte_eth_dev *dev,
* If the port has a max bandwidth, the TCs should have none.
*/
/* port */
- bw = pf->tm_conf.root->shaper_profile->profile.peak.rate;
+ if (pf->tm_conf.root->shaper_profile)
+ bw = pf->tm_conf.root->shaper_profile->profile.peak.rate;
+ else
+ bw = 0;
if (bw) {
/* check if any TC has a max bandwidth */
TAILQ_FOREACH(tm_node, tc_list, node) {
- if (tm_node->shaper_profile->profile.peak.rate) {
+ if (tm_node->shaper_profile &&
+ tm_node->shaper_profile->profile.peak.rate) {
error->type = RTE_TM_ERROR_TYPE_SHAPER_PROFILE;
error->message = "no port and TC max bandwidth"
" in parallel";
@@ -943,7 +954,10 @@ i40e_hierarchy_commit(struct rte_eth_dev *dev,
}
tc_map &= ~BIT_ULL(i);
- bw = tm_node->shaper_profile->profile.peak.rate;
+ if (tm_node->shaper_profile)
+ bw = tm_node->shaper_profile->profile.peak.rate;
+ else
+ bw = 0;
if (!bw)
continue;
@@ -954,7 +968,10 @@ i40e_hierarchy_commit(struct rte_eth_dev *dev,
}
TAILQ_FOREACH(tm_node, queue_list, node) {
- bw = tm_node->shaper_profile->profile.peak.rate;
+ if (tm_node->shaper_profile)
+ bw = tm_node->shaper_profile->profile.peak.rate;
+ else
+ bw = 0;
if (bw) {
error->type = RTE_TM_ERROR_TYPE_NODE_PARAMS;
error->message = "not support queue QoS";
--
2.7.4
^ permalink raw reply [flat|nested] 191+ messages in thread
* [dpdk-stable] patch 'net/ixgbe: fix not supporting NULL TM profile' has been queued to stable release 17.08.1
2017-11-21 13:15 [dpdk-stable] patch 'gro: fix typo in map file' has been queued to stable release 17.08.1 Yuanhan Liu
` (141 preceding siblings ...)
2017-11-21 13:18 ` [dpdk-stable] patch 'net/i40e: fix not supporting NULL TM profile' " Yuanhan Liu
@ 2017-11-21 13:18 ` Yuanhan Liu
2017-11-21 13:18 ` [dpdk-stable] patch 'net/i40e: fix parent when adding TM node' " Yuanhan Liu
` (46 subsequent siblings)
189 siblings, 0 replies; 191+ messages in thread
From: Yuanhan Liu @ 2017-11-21 13:18 UTC (permalink / raw)
To: Wenzhuo Lu; +Cc: Cristian Dumitrescu, dpdk stable
Hi,
FYI, your patch has been queued to stable release 17.08.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/24/17. So please
shout if anyone has objections.
Thanks.
--yliu
---
>From c0ac57f227578fd1f2d2d68c363bf476a18da776 Mon Sep 17 00:00:00 2001
From: Wenzhuo Lu <wenzhuo.lu@intel.com>
Date: Tue, 17 Oct 2017 13:50:39 +0800
Subject: [PATCH] net/ixgbe: fix not supporting NULL TM profile
[ upstream commit a20a3c8c8bcea2bdad97e38494c09fa22e4f4be3 ]
It's by design that APP can add a TM node without shaper
profile. But ixgbe doesn't support it currently.
Fixes: e0ff4d304ccf ("net/ixgbe: support adding TM node")
Fixes: 5713ade69776 ("net/ixgbe: support committing TM hierarchy")
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
---
drivers/net/ixgbe/ixgbe_tm.c | 40 ++++++++++++++++++++++++++--------------
1 file changed, 26 insertions(+), 14 deletions(-)
diff --git a/drivers/net/ixgbe/ixgbe_tm.c b/drivers/net/ixgbe/ixgbe_tm.c
index 5c9b24c..2b27ac1 100644
--- a/drivers/net/ixgbe/ixgbe_tm.c
+++ b/drivers/net/ixgbe/ixgbe_tm.c
@@ -588,7 +588,7 @@ ixgbe_node_add(struct rte_eth_dev *dev, uint32_t node_id,
IXGBE_DEV_PRIVATE_TO_TM_CONF(dev->data->dev_private);
enum ixgbe_tm_node_type node_type = IXGBE_TM_NODE_TYPE_MAX;
enum ixgbe_tm_node_type parent_node_type = IXGBE_TM_NODE_TYPE_MAX;
- struct ixgbe_tm_shaper_profile *shaper_profile;
+ struct ixgbe_tm_shaper_profile *shaper_profile = NULL;
struct ixgbe_tm_node *tm_node;
struct ixgbe_tm_node *parent_node;
uint8_t nb_tcs;
@@ -619,12 +619,15 @@ ixgbe_node_add(struct rte_eth_dev *dev, uint32_t node_id,
}
/* check the shaper profile id */
- shaper_profile = ixgbe_shaper_profile_search(dev,
- params->shaper_profile_id);
- if (!shaper_profile) {
- error->type = RTE_TM_ERROR_TYPE_NODE_PARAMS_SHAPER_PROFILE_ID;
- error->message = "shaper profile not exist";
- return -EINVAL;
+ if (params->shaper_profile_id != RTE_TM_SHAPER_PROFILE_ID_NONE) {
+ shaper_profile = ixgbe_shaper_profile_search(
+ dev, params->shaper_profile_id);
+ if (!shaper_profile) {
+ error->type =
+ RTE_TM_ERROR_TYPE_NODE_PARAMS_SHAPER_PROFILE_ID;
+ error->message = "shaper profile not exist";
+ return -EINVAL;
+ }
}
/* root node if not have a parent */
@@ -662,7 +665,8 @@ ixgbe_node_add(struct rte_eth_dev *dev, uint32_t node_id,
tm_conf->root = tm_node;
/* increase the reference counter of the shaper profile */
- shaper_profile->reference_count++;
+ if (shaper_profile)
+ shaper_profile->reference_count++;
return 0;
}
@@ -753,7 +757,8 @@ ixgbe_node_add(struct rte_eth_dev *dev, uint32_t node_id,
tm_node->parent->reference_count++;
/* increase the reference counter of the shaper profile */
- shaper_profile->reference_count++;
+ if (shaper_profile)
+ shaper_profile->reference_count++;
return 0;
}
@@ -801,14 +806,16 @@ ixgbe_node_delete(struct rte_eth_dev *dev, uint32_t node_id,
/* root node */
if (node_type == IXGBE_TM_NODE_TYPE_PORT) {
- tm_node->shaper_profile->reference_count--;
+ if (tm_node->shaper_profile)
+ tm_node->shaper_profile->reference_count--;
rte_free(tm_node);
tm_conf->root = NULL;
return 0;
}
/* TC or queue node */
- tm_node->shaper_profile->reference_count--;
+ if (tm_node->shaper_profile)
+ tm_node->shaper_profile->reference_count--;
tm_node->parent->reference_count--;
if (node_type == IXGBE_TM_NODE_TYPE_TC) {
TAILQ_REMOVE(&tm_conf->tc_list, tm_node, node);
@@ -1003,7 +1010,8 @@ ixgbe_hierarchy_commit(struct rte_eth_dev *dev,
goto done;
/* not support port max bandwidth yet */
- if (tm_conf->root->shaper_profile->profile.peak.rate) {
+ if (tm_conf->root->shaper_profile &&
+ tm_conf->root->shaper_profile->profile.peak.rate) {
error->type = RTE_TM_ERROR_TYPE_SHAPER_PROFILE;
error->message = "no port max bandwidth";
goto fail_clear;
@@ -1011,7 +1019,8 @@ ixgbe_hierarchy_commit(struct rte_eth_dev *dev,
/* HW not support TC max bandwidth */
TAILQ_FOREACH(tm_node, &tm_conf->tc_list, node) {
- if (tm_node->shaper_profile->profile.peak.rate) {
+ if (tm_node->shaper_profile &&
+ tm_node->shaper_profile->profile.peak.rate) {
error->type = RTE_TM_ERROR_TYPE_SHAPER_PROFILE;
error->message = "no TC max bandwidth";
goto fail_clear;
@@ -1020,7 +1029,10 @@ ixgbe_hierarchy_commit(struct rte_eth_dev *dev,
/* queue max bandwidth */
TAILQ_FOREACH(tm_node, &tm_conf->queue_list, node) {
- bw = tm_node->shaper_profile->profile.peak.rate;
+ if (tm_node->shaper_profile)
+ bw = tm_node->shaper_profile->profile.peak.rate;
+ else
+ bw = 0;
if (bw) {
/* interpret Bps to Mbps */
bw = bw * 8 / 1000 / 1000;
--
2.7.4
^ permalink raw reply [flat|nested] 191+ messages in thread
* [dpdk-stable] patch 'net/i40e: fix parent when adding TM node' has been queued to stable release 17.08.1
2017-11-21 13:15 [dpdk-stable] patch 'gro: fix typo in map file' has been queued to stable release 17.08.1 Yuanhan Liu
` (142 preceding siblings ...)
2017-11-21 13:18 ` [dpdk-stable] patch 'net/ixgbe: " Yuanhan Liu
@ 2017-11-21 13:18 ` Yuanhan Liu
2017-11-21 13:18 ` [dpdk-stable] patch 'net/qede: fix supported packet types' " Yuanhan Liu
` (45 subsequent siblings)
189 siblings, 0 replies; 191+ messages in thread
From: Yuanhan Liu @ 2017-11-21 13:18 UTC (permalink / raw)
To: Wenzhuo Lu; +Cc: Cristian Dumitrescu, dpdk stable
Hi,
FYI, your patch has been queued to stable release 17.08.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/24/17. So please
shout if anyone has objections.
Thanks.
--yliu
---
>From ee7d9bf79f352f15506d6b61f64d58a64daef558 Mon Sep 17 00:00:00 2001
From: Wenzhuo Lu <wenzhuo.lu@intel.com>
Date: Tue, 17 Oct 2017 13:50:40 +0800
Subject: [PATCH] net/i40e: fix parent when adding TM node
[ upstream commit 49b6b461afa1418c6fc53237447e456a5242d95d ]
Queue's parent is TC not port. It's wrong to always set
the parent to root.
Fixes: e0ff4d304ccf ("net/ixgbe: support adding TM node")
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
---
drivers/net/i40e/i40e_tm.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/i40e/i40e_tm.c b/drivers/net/i40e/i40e_tm.c
index f4d1cb8..49afd51 100644
--- a/drivers/net/i40e/i40e_tm.c
+++ b/drivers/net/i40e/i40e_tm.c
@@ -621,7 +621,7 @@ i40e_node_add(struct rte_eth_dev *dev, uint32_t node_id,
tm_node->priority = priority;
tm_node->weight = weight;
tm_node->reference_count = 0;
- tm_node->parent = pf->tm_conf.root;
+ tm_node->parent = parent_node;
tm_node->shaper_profile = shaper_profile;
(void)rte_memcpy(&tm_node->params, params,
sizeof(struct rte_tm_node_params));
--
2.7.4
^ permalink raw reply [flat|nested] 191+ messages in thread
* [dpdk-stable] patch 'net/qede: fix supported packet types' has been queued to stable release 17.08.1
2017-11-21 13:15 [dpdk-stable] patch 'gro: fix typo in map file' has been queued to stable release 17.08.1 Yuanhan Liu
` (143 preceding siblings ...)
2017-11-21 13:18 ` [dpdk-stable] patch 'net/i40e: fix parent when adding TM node' " Yuanhan Liu
@ 2017-11-21 13:18 ` Yuanhan Liu
2017-11-21 13:18 ` [dpdk-stable] patch 'net/qede: fix to re-enable LRO during device start' " Yuanhan Liu
` (44 subsequent siblings)
189 siblings, 0 replies; 191+ messages in thread
From: Yuanhan Liu @ 2017-11-21 13:18 UTC (permalink / raw)
To: Harish Patil; +Cc: Rasesh Mody, dpdk stable
Hi,
FYI, your patch has been queued to stable release 17.08.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/24/17. So please
shout if anyone has objections.
Thanks.
--yliu
---
>From 0c3e40ca54f27d0b0593b5aadf24ac250646791d Mon Sep 17 00:00:00 2001
From: Harish Patil <harish.patil@cavium.com>
Date: Wed, 18 Oct 2017 18:13:29 -0700
Subject: [PATCH] net/qede: fix supported packet types
[ upstream commit fb88acb59ac7be5cf20d1570e0c66e3e91167c53 ]
Update/fix supported ptypes to return both inner and outer headers,
tunnel_type, fragmented and VLAN packet types.
Fixes: 3d4bb4411683 ("net/qede: add fastpath support for VXLAN tunneling")
Fixes: 2ea6f76aff40 ("qede: add core driver")
Signed-off-by: Harish Patil <harish.patil@cavium.com>
Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
---
drivers/net/qede/qede_ethdev.c | 14 +++
drivers/net/qede/qede_rxtx.c | 223 +++++++++++++++++++++++++++++++++++------
drivers/net/qede/qede_rxtx.h | 23 ++++-
3 files changed, 227 insertions(+), 33 deletions(-)
diff --git a/drivers/net/qede/qede_ethdev.c b/drivers/net/qede/qede_ethdev.c
index 4e9e89f..4d4a96d 100644
--- a/drivers/net/qede/qede_ethdev.c
+++ b/drivers/net/qede/qede_ethdev.c
@@ -1806,8 +1806,22 @@ static const uint32_t *
qede_dev_supported_ptypes_get(struct rte_eth_dev *eth_dev)
{
static const uint32_t ptypes[] = {
+ RTE_PTYPE_L2_ETHER,
+ RTE_PTYPE_L2_ETHER_VLAN,
RTE_PTYPE_L3_IPV4,
RTE_PTYPE_L3_IPV6,
+ RTE_PTYPE_L4_TCP,
+ RTE_PTYPE_L4_UDP,
+ RTE_PTYPE_TUNNEL_VXLAN,
+ RTE_PTYPE_L4_FRAG,
+ /* Inner */
+ RTE_PTYPE_INNER_L2_ETHER,
+ RTE_PTYPE_INNER_L2_ETHER_VLAN,
+ RTE_PTYPE_INNER_L3_IPV4,
+ RTE_PTYPE_INNER_L3_IPV6,
+ RTE_PTYPE_INNER_L4_TCP,
+ RTE_PTYPE_INNER_L4_UDP,
+ RTE_PTYPE_INNER_L4_FRAG,
RTE_PTYPE_UNKNOWN
};
diff --git a/drivers/net/qede/qede_rxtx.c b/drivers/net/qede/qede_rxtx.c
index 76e24ab..b02b3f5 100644
--- a/drivers/net/qede/qede_rxtx.c
+++ b/drivers/net/qede/qede_rxtx.c
@@ -844,6 +844,109 @@ static inline uint8_t qede_check_notunn_csum_l4(uint16_t flag)
return 0;
}
+/* Returns outer L3 and L4 packet_type for tunneled packets */
+static inline uint32_t qede_rx_cqe_to_pkt_type_outer(struct rte_mbuf *m)
+{
+ uint32_t packet_type = RTE_PTYPE_UNKNOWN;
+ struct ether_hdr *eth_hdr;
+ struct ipv4_hdr *ipv4_hdr;
+ struct ipv6_hdr *ipv6_hdr;
+
+ eth_hdr = rte_pktmbuf_mtod(m, struct ether_hdr *);
+ if (eth_hdr->ether_type == rte_cpu_to_be_16(ETHER_TYPE_IPv4)) {
+ packet_type |= RTE_PTYPE_L3_IPV4;
+ ipv4_hdr = rte_pktmbuf_mtod_offset(m, struct ipv4_hdr *,
+ sizeof(struct ether_hdr));
+ if (ipv4_hdr->next_proto_id == IPPROTO_TCP)
+ packet_type |= RTE_PTYPE_L4_TCP;
+ else if (ipv4_hdr->next_proto_id == IPPROTO_UDP)
+ packet_type |= RTE_PTYPE_L4_UDP;
+ } else if (eth_hdr->ether_type == rte_cpu_to_be_16(ETHER_TYPE_IPv6)) {
+ packet_type |= RTE_PTYPE_L3_IPV6;
+ ipv6_hdr = rte_pktmbuf_mtod_offset(m, struct ipv6_hdr *,
+ sizeof(struct ether_hdr));
+ if (ipv6_hdr->proto == IPPROTO_TCP)
+ packet_type |= RTE_PTYPE_L4_TCP;
+ else if (ipv6_hdr->proto == IPPROTO_UDP)
+ packet_type |= RTE_PTYPE_L4_UDP;
+ }
+
+ return packet_type;
+}
+
+static inline uint32_t qede_rx_cqe_to_pkt_type_inner(uint16_t flags)
+{
+ uint16_t val;
+
+ /* Lookup table */
+ static const uint32_t
+ ptype_lkup_tbl[QEDE_PKT_TYPE_MAX] __rte_cache_aligned = {
+ [QEDE_PKT_TYPE_IPV4] = RTE_PTYPE_INNER_L3_IPV4 |
+ RTE_PTYPE_INNER_L2_ETHER,
+ [QEDE_PKT_TYPE_IPV6] = RTE_PTYPE_INNER_L3_IPV6 |
+ RTE_PTYPE_INNER_L2_ETHER,
+ [QEDE_PKT_TYPE_IPV4_TCP] = RTE_PTYPE_INNER_L3_IPV4 |
+ RTE_PTYPE_INNER_L4_TCP |
+ RTE_PTYPE_INNER_L2_ETHER,
+ [QEDE_PKT_TYPE_IPV6_TCP] = RTE_PTYPE_INNER_L3_IPV6 |
+ RTE_PTYPE_INNER_L4_TCP |
+ RTE_PTYPE_INNER_L2_ETHER,
+ [QEDE_PKT_TYPE_IPV4_UDP] = RTE_PTYPE_INNER_L3_IPV4 |
+ RTE_PTYPE_INNER_L4_UDP |
+ RTE_PTYPE_INNER_L2_ETHER,
+ [QEDE_PKT_TYPE_IPV6_UDP] = RTE_PTYPE_INNER_L3_IPV6 |
+ RTE_PTYPE_INNER_L4_UDP |
+ RTE_PTYPE_INNER_L2_ETHER,
+ /* Frags with no VLAN */
+ [QEDE_PKT_TYPE_IPV4_FRAG] = RTE_PTYPE_INNER_L3_IPV4 |
+ RTE_PTYPE_INNER_L4_FRAG |
+ RTE_PTYPE_INNER_L2_ETHER,
+ [QEDE_PKT_TYPE_IPV6_FRAG] = RTE_PTYPE_INNER_L3_IPV6 |
+ RTE_PTYPE_INNER_L4_FRAG |
+ RTE_PTYPE_INNER_L2_ETHER,
+ /* VLANs */
+ [QEDE_PKT_TYPE_IPV4_VLAN] = RTE_PTYPE_INNER_L3_IPV4 |
+ RTE_PTYPE_INNER_L2_ETHER_VLAN,
+ [QEDE_PKT_TYPE_IPV6_VLAN] = RTE_PTYPE_INNER_L3_IPV6 |
+ RTE_PTYPE_INNER_L2_ETHER_VLAN,
+ [QEDE_PKT_TYPE_IPV4_TCP_VLAN] = RTE_PTYPE_INNER_L3_IPV4 |
+ RTE_PTYPE_INNER_L4_TCP |
+ RTE_PTYPE_INNER_L2_ETHER_VLAN,
+ [QEDE_PKT_TYPE_IPV6_TCP_VLAN] = RTE_PTYPE_INNER_L3_IPV6 |
+ RTE_PTYPE_INNER_L4_TCP |
+ RTE_PTYPE_INNER_L2_ETHER_VLAN,
+ [QEDE_PKT_TYPE_IPV4_UDP_VLAN] = RTE_PTYPE_INNER_L3_IPV4 |
+ RTE_PTYPE_INNER_L4_UDP |
+ RTE_PTYPE_INNER_L2_ETHER_VLAN,
+ [QEDE_PKT_TYPE_IPV6_UDP_VLAN] = RTE_PTYPE_INNER_L3_IPV6 |
+ RTE_PTYPE_INNER_L4_UDP |
+ RTE_PTYPE_INNER_L2_ETHER_VLAN,
+ /* Frags with VLAN */
+ [QEDE_PKT_TYPE_IPV4_VLAN_FRAG] = RTE_PTYPE_INNER_L3_IPV4 |
+ RTE_PTYPE_INNER_L4_FRAG |
+ RTE_PTYPE_INNER_L2_ETHER_VLAN,
+ [QEDE_PKT_TYPE_IPV6_VLAN_FRAG] = RTE_PTYPE_INNER_L3_IPV6 |
+ RTE_PTYPE_INNER_L4_FRAG |
+ RTE_PTYPE_INNER_L2_ETHER_VLAN,
+ };
+
+ /* Bits (0..3) provides L3/L4 protocol type */
+ /* Bits (4,5) provides frag and VLAN info */
+ val = ((PARSING_AND_ERR_FLAGS_L3TYPE_MASK <<
+ PARSING_AND_ERR_FLAGS_L3TYPE_SHIFT) |
+ (PARSING_AND_ERR_FLAGS_L4PROTOCOL_MASK <<
+ PARSING_AND_ERR_FLAGS_L4PROTOCOL_SHIFT) |
+ (PARSING_AND_ERR_FLAGS_IPV4FRAG_MASK <<
+ PARSING_AND_ERR_FLAGS_IPV4FRAG_SHIFT) |
+ (PARSING_AND_ERR_FLAGS_TAG8021QEXIST_MASK <<
+ PARSING_AND_ERR_FLAGS_TAG8021QEXIST_SHIFT)) & flags;
+
+ if (val < QEDE_PKT_TYPE_MAX)
+ return ptype_lkup_tbl[val];
+
+ return RTE_PTYPE_UNKNOWN;
+}
+
static inline uint32_t qede_rx_cqe_to_pkt_type(uint16_t flags)
{
uint16_t val;
@@ -851,24 +954,68 @@ static inline uint32_t qede_rx_cqe_to_pkt_type(uint16_t flags)
/* Lookup table */
static const uint32_t
ptype_lkup_tbl[QEDE_PKT_TYPE_MAX] __rte_cache_aligned = {
- [QEDE_PKT_TYPE_IPV4] = RTE_PTYPE_L3_IPV4,
- [QEDE_PKT_TYPE_IPV6] = RTE_PTYPE_L3_IPV6,
- [QEDE_PKT_TYPE_IPV4_TCP] = RTE_PTYPE_L3_IPV4 | RTE_PTYPE_L4_TCP,
- [QEDE_PKT_TYPE_IPV6_TCP] = RTE_PTYPE_L3_IPV6 | RTE_PTYPE_L4_TCP,
- [QEDE_PKT_TYPE_IPV4_UDP] = RTE_PTYPE_L3_IPV4 | RTE_PTYPE_L4_UDP,
- [QEDE_PKT_TYPE_IPV6_UDP] = RTE_PTYPE_L3_IPV6 | RTE_PTYPE_L4_UDP,
+ [QEDE_PKT_TYPE_IPV4] = RTE_PTYPE_L3_IPV4 | RTE_PTYPE_L2_ETHER,
+ [QEDE_PKT_TYPE_IPV6] = RTE_PTYPE_L3_IPV6 | RTE_PTYPE_L2_ETHER,
+ [QEDE_PKT_TYPE_IPV4_TCP] = RTE_PTYPE_L3_IPV4 |
+ RTE_PTYPE_L4_TCP |
+ RTE_PTYPE_L2_ETHER,
+ [QEDE_PKT_TYPE_IPV6_TCP] = RTE_PTYPE_L3_IPV6 |
+ RTE_PTYPE_L4_TCP |
+ RTE_PTYPE_L2_ETHER,
+ [QEDE_PKT_TYPE_IPV4_UDP] = RTE_PTYPE_L3_IPV4 |
+ RTE_PTYPE_L4_UDP |
+ RTE_PTYPE_L2_ETHER,
+ [QEDE_PKT_TYPE_IPV6_UDP] = RTE_PTYPE_L3_IPV6 |
+ RTE_PTYPE_L4_UDP |
+ RTE_PTYPE_L2_ETHER,
+ /* Frags with no VLAN */
+ [QEDE_PKT_TYPE_IPV4_FRAG] = RTE_PTYPE_L3_IPV4 |
+ RTE_PTYPE_L4_FRAG |
+ RTE_PTYPE_L2_ETHER,
+ [QEDE_PKT_TYPE_IPV6_FRAG] = RTE_PTYPE_L3_IPV6 |
+ RTE_PTYPE_L4_FRAG |
+ RTE_PTYPE_L2_ETHER,
+ /* VLANs */
+ [QEDE_PKT_TYPE_IPV4_VLAN] = RTE_PTYPE_L3_IPV4 |
+ RTE_PTYPE_L2_ETHER_VLAN,
+ [QEDE_PKT_TYPE_IPV6_VLAN] = RTE_PTYPE_L3_IPV6 |
+ RTE_PTYPE_L2_ETHER_VLAN,
+ [QEDE_PKT_TYPE_IPV4_TCP_VLAN] = RTE_PTYPE_L3_IPV4 |
+ RTE_PTYPE_L4_TCP |
+ RTE_PTYPE_L2_ETHER_VLAN,
+ [QEDE_PKT_TYPE_IPV6_TCP_VLAN] = RTE_PTYPE_L3_IPV6 |
+ RTE_PTYPE_L4_TCP |
+ RTE_PTYPE_L2_ETHER_VLAN,
+ [QEDE_PKT_TYPE_IPV4_UDP_VLAN] = RTE_PTYPE_L3_IPV4 |
+ RTE_PTYPE_L4_UDP |
+ RTE_PTYPE_L2_ETHER_VLAN,
+ [QEDE_PKT_TYPE_IPV6_UDP_VLAN] = RTE_PTYPE_L3_IPV6 |
+ RTE_PTYPE_L4_UDP |
+ RTE_PTYPE_L2_ETHER_VLAN,
+ /* Frags with VLAN */
+ [QEDE_PKT_TYPE_IPV4_VLAN_FRAG] = RTE_PTYPE_L3_IPV4 |
+ RTE_PTYPE_L4_FRAG |
+ RTE_PTYPE_L2_ETHER_VLAN,
+ [QEDE_PKT_TYPE_IPV6_VLAN_FRAG] = RTE_PTYPE_L3_IPV6 |
+ RTE_PTYPE_L4_FRAG |
+ RTE_PTYPE_L2_ETHER_VLAN,
};
/* Bits (0..3) provides L3/L4 protocol type */
+ /* Bits (4,5) provides frag and VLAN info */
val = ((PARSING_AND_ERR_FLAGS_L3TYPE_MASK <<
PARSING_AND_ERR_FLAGS_L3TYPE_SHIFT) |
(PARSING_AND_ERR_FLAGS_L4PROTOCOL_MASK <<
- PARSING_AND_ERR_FLAGS_L4PROTOCOL_SHIFT)) & flags;
+ PARSING_AND_ERR_FLAGS_L4PROTOCOL_SHIFT) |
+ (PARSING_AND_ERR_FLAGS_IPV4FRAG_MASK <<
+ PARSING_AND_ERR_FLAGS_IPV4FRAG_SHIFT) |
+ (PARSING_AND_ERR_FLAGS_TAG8021QEXIST_MASK <<
+ PARSING_AND_ERR_FLAGS_TAG8021QEXIST_SHIFT)) & flags;
if (val < QEDE_PKT_TYPE_MAX)
- return ptype_lkup_tbl[val] | RTE_PTYPE_L2_ETHER;
- else
- return RTE_PTYPE_UNKNOWN;
+ return ptype_lkup_tbl[val];
+
+ return RTE_PTYPE_UNKNOWN;
}
static inline uint8_t
@@ -1100,6 +1247,27 @@ qede_process_sg_pkts(void *p_rxq, struct rte_mbuf *rx_mb,
return 0;
}
+#ifdef RTE_LIBRTE_QEDE_DEBUG_RX
+static inline void
+print_rx_bd_info(struct rte_mbuf *m, struct qede_rx_queue *rxq,
+ uint8_t bitfield)
+{
+ PMD_RX_LOG(INFO, rxq,
+ "len 0x%x bf 0x%x hash_val 0x%x"
+ " ol_flags 0x%04lx l2=%s l3=%s l4=%s tunn=%s"
+ " inner_l2=%s inner_l3=%s inner_l4=%s\n",
+ m->data_len, bitfield, m->hash.rss,
+ (unsigned long)m->ol_flags,
+ rte_get_ptype_l2_name(m->packet_type),
+ rte_get_ptype_l3_name(m->packet_type),
+ rte_get_ptype_l4_name(m->packet_type),
+ rte_get_ptype_tunnel_name(m->packet_type),
+ rte_get_ptype_inner_l2_name(m->packet_type),
+ rte_get_ptype_inner_l3_name(m->packet_type),
+ rte_get_ptype_inner_l4_name(m->packet_type));
+}
+#endif
+
uint16_t
qede_recv_pkts(void *p_rxq, struct rte_mbuf **rx_pkts, uint16_t nb_pkts)
{
@@ -1120,7 +1288,6 @@ qede_recv_pkts(void *p_rxq, struct rte_mbuf **rx_pkts, uint16_t nb_pkts)
uint16_t parse_flag;
#ifdef RTE_LIBRTE_QEDE_DEBUG_RX
uint8_t bitfield_val;
- enum rss_hash_type htype;
#endif
uint8_t tunn_parse_flag;
uint8_t j;
@@ -1214,8 +1381,6 @@ qede_recv_pkts(void *p_rxq, struct rte_mbuf **rx_pkts, uint16_t nb_pkts)
rss_hash = rte_le_to_cpu_32(fp_cqe->rss_hash);
#ifdef RTE_LIBRTE_QEDE_DEBUG_RX
bitfield_val = fp_cqe->bitfields;
- htype = (uint8_t)GET_FIELD(bitfield_val,
- ETH_FAST_PATH_RX_REG_CQE_RSS_HASH_TYPE);
#endif
} else {
parse_flag =
@@ -1226,8 +1391,6 @@ qede_recv_pkts(void *p_rxq, struct rte_mbuf **rx_pkts, uint16_t nb_pkts)
vlan_tci = rte_le_to_cpu_16(cqe_start_tpa->vlan_tag);
#ifdef RTE_LIBRTE_QEDE_DEBUG_RX
bitfield_val = cqe_start_tpa->bitfields;
- htype = (uint8_t)GET_FIELD(bitfield_val,
- ETH_FAST_PATH_RX_TPA_START_CQE_RSS_HASH_TYPE);
#endif
rss_hash = rte_le_to_cpu_32(cqe_start_tpa->rss_hash);
}
@@ -1247,8 +1410,17 @@ qede_recv_pkts(void *p_rxq, struct rte_mbuf **rx_pkts, uint16_t nb_pkts)
else
flags = fp_cqe->tunnel_pars_flags.flags;
tunn_parse_flag = flags;
+ /* Tunnel_type */
packet_type =
qede_rx_cqe_to_tunn_pkt_type(tunn_parse_flag);
+
+ /* Inner header */
+ packet_type |=
+ qede_rx_cqe_to_pkt_type_inner(parse_flag);
+
+ /* Outer L3/L4 types is not available in CQE */
+ packet_type |=
+ qede_rx_cqe_to_pkt_type_outer(rx_mb);
}
} else {
PMD_RX_LOG(INFO, rxq, "Rx non-tunneled packet\n");
@@ -1275,21 +1447,16 @@ qede_recv_pkts(void *p_rxq, struct rte_mbuf **rx_pkts, uint16_t nb_pkts)
}
}
- if (CQE_HAS_VLAN(parse_flag)) {
+ if (CQE_HAS_VLAN(parse_flag) ||
+ CQE_HAS_OUTER_VLAN(parse_flag)) {
+ /* Note: FW doesn't indicate Q-in-Q packet */
ol_flags |= PKT_RX_VLAN_PKT;
if (qdev->vlan_strip_flg) {
ol_flags |= PKT_RX_VLAN_STRIPPED;
rx_mb->vlan_tci = vlan_tci;
}
}
- if (CQE_HAS_OUTER_VLAN(parse_flag)) {
- ol_flags |= PKT_RX_QINQ_PKT;
- if (qdev->vlan_strip_flg) {
- rx_mb->vlan_tci = vlan_tci;
- ol_flags |= PKT_RX_QINQ_STRIPPED;
- }
- rx_mb->vlan_tci_outer = 0;
- }
+
/* RSS Hash */
if (qdev->rss_enable) {
ol_flags |= PKT_RX_RSS_HASH;
@@ -1341,11 +1508,9 @@ qede_recv_pkts(void *p_rxq, struct rte_mbuf **rx_pkts, uint16_t nb_pkts)
rx_mb->ol_flags = ol_flags;
rx_mb->data_len = len;
rx_mb->packet_type = packet_type;
- PMD_RX_LOG(INFO, rxq,
- "pkt_type 0x%04x len %u hash_type %d hash_val 0x%x"
- " ol_flags 0x%04lx\n",
- packet_type, len, htype, rx_mb->hash.rss,
- (unsigned long)ol_flags);
+#ifdef RTE_LIBRTE_QEDE_DEBUG_RX
+ print_rx_bd_info(rx_mb, rxq, bitfield_val);
+#endif
if (!tpa_start_flg) {
rx_mb->nb_segs = fp_cqe->bd_num;
rx_mb->pkt_len = pkt_len;
diff --git a/drivers/net/qede/qede_rxtx.h b/drivers/net/qede/qede_rxtx.h
index b551fd6..acf9e47 100644
--- a/drivers/net/qede/qede_rxtx.h
+++ b/drivers/net/qede/qede_rxtx.h
@@ -84,7 +84,8 @@
/* Macros for non-tunnel packet types lkup table */
#define QEDE_PKT_TYPE_UNKNOWN 0x0
-#define QEDE_PKT_TYPE_MAX 0xf
+#define QEDE_PKT_TYPE_MAX 0x3f
+
#define QEDE_PKT_TYPE_IPV4 0x1
#define QEDE_PKT_TYPE_IPV6 0x2
#define QEDE_PKT_TYPE_IPV4_TCP 0x5
@@ -92,6 +93,20 @@
#define QEDE_PKT_TYPE_IPV4_UDP 0x9
#define QEDE_PKT_TYPE_IPV6_UDP 0xa
+/* For frag pkts, corresponding IP bits is set */
+#define QEDE_PKT_TYPE_IPV4_FRAG 0x11
+#define QEDE_PKT_TYPE_IPV6_FRAG 0x12
+
+#define QEDE_PKT_TYPE_IPV4_VLAN 0x21
+#define QEDE_PKT_TYPE_IPV6_VLAN 0x22
+#define QEDE_PKT_TYPE_IPV4_TCP_VLAN 0x25
+#define QEDE_PKT_TYPE_IPV6_TCP_VLAN 0x26
+#define QEDE_PKT_TYPE_IPV4_UDP_VLAN 0x29
+#define QEDE_PKT_TYPE_IPV6_UDP_VLAN 0x2a
+
+#define QEDE_PKT_TYPE_IPV4_VLAN_FRAG 0x31
+#define QEDE_PKT_TYPE_IPV6_VLAN_FRAG 0x32
+
/* Macros for tunneled packets with next protocol lkup table */
#define QEDE_PKT_TYPE_TUNN_GENEVE 0x1
#define QEDE_PKT_TYPE_TUNN_GRE 0x2
@@ -99,12 +114,12 @@
/* Bit 2 is don't care bit */
#define QEDE_PKT_TYPE_TUNN_L2_TENID_NOEXIST_GENEVE 0x9
-#define QEDE_PKT_TYPE_TUNN_L2_TENID_NOEXIST_GRE 0xa
+#define QEDE_PKT_TYPE_TUNN_L2_TENID_NOEXIST_GRE 0xa
#define QEDE_PKT_TYPE_TUNN_L2_TENID_NOEXIST_VXLAN 0xb
#define QEDE_PKT_TYPE_TUNN_L2_TENID_EXIST_GENEVE 0xd
#define QEDE_PKT_TYPE_TUNN_L2_TENID_EXIST_GRE 0xe
-#define QEDE_PKT_TYPE_TUNN_L2_TENID_EXIST_VXLAN 0xf
+#define QEDE_PKT_TYPE_TUNN_L2_TENID_EXIST_VXLAN 0xf
#define QEDE_PKT_TYPE_TUNN_IPV4_TENID_NOEXIST_GENEVE 0x11
@@ -112,7 +127,7 @@
#define QEDE_PKT_TYPE_TUNN_IPV4_TENID_NOEXIST_VXLAN 0x13
#define QEDE_PKT_TYPE_TUNN_IPV4_TENID_EXIST_GENEVE 0x15
-#define QEDE_PKT_TYPE_TUNN_IPV4_TENID_EXIST_GRE 0x16
+#define QEDE_PKT_TYPE_TUNN_IPV4_TENID_EXIST_GRE 0x16
#define QEDE_PKT_TYPE_TUNN_IPV4_TENID_EXIST_VXLAN 0x17
--
2.7.4
^ permalink raw reply [flat|nested] 191+ messages in thread
* [dpdk-stable] patch 'net/qede: fix to re-enable LRO during device start' has been queued to stable release 17.08.1
2017-11-21 13:15 [dpdk-stable] patch 'gro: fix typo in map file' has been queued to stable release 17.08.1 Yuanhan Liu
` (144 preceding siblings ...)
2017-11-21 13:18 ` [dpdk-stable] patch 'net/qede: fix supported packet types' " Yuanhan Liu
@ 2017-11-21 13:18 ` Yuanhan Liu
2017-11-21 13:18 ` [dpdk-stable] patch 'net/failsafe: fix PCI devices init' " Yuanhan Liu
` (43 subsequent siblings)
189 siblings, 0 replies; 191+ messages in thread
From: Yuanhan Liu @ 2017-11-21 13:18 UTC (permalink / raw)
To: Harish Patil; +Cc: dpdk stable
Hi,
FYI, your patch has been queued to stable release 17.08.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/24/17. So please
shout if anyone has objections.
Thanks.
--yliu
---
>From d1afebc38dcb92056d92abcfffdbd8279de342dd Mon Sep 17 00:00:00 2001
From: Harish Patil <harish.patil@cavium.com>
Date: Wed, 18 Oct 2017 18:13:31 -0700
Subject: [PATCH] net/qede: fix to re-enable LRO during device start
[ upstream commit daee4e07fc0cb6386cb8d6e84d811d2203699683 ]
Move LRO configuration from dev_configure to dev_start so that
LRO configuration can be re-enabled following a port restart.
Fixes: 9a6d30ae6d46 ("net/qede: refactoring vport handling code")
Signed-off-by: Harish Patil <harish.patil@cavium.com>
---
drivers/net/qede/qede_ethdev.c | 29 ++++++++++++-----------------
1 file changed, 12 insertions(+), 17 deletions(-)
diff --git a/drivers/net/qede/qede_ethdev.c b/drivers/net/qede/qede_ethdev.c
index 4d4a96d..b502551 100644
--- a/drivers/net/qede/qede_ethdev.c
+++ b/drivers/net/qede/qede_ethdev.c
@@ -520,7 +520,7 @@ int qede_enable_tpa(struct rte_eth_dev *eth_dev, bool flg)
return -1;
}
}
-
+ qdev->enable_lro = flg;
DP_INFO(edev, "LRO is %s\n", flg ? "enabled" : "disabled");
return 0;
@@ -1078,6 +1078,7 @@ static void qede_fastpath_start(struct ecore_dev *edev)
static int qede_dev_start(struct rte_eth_dev *eth_dev)
{
+ struct rte_eth_rxmode *rxmode = ð_dev->data->dev_conf.rxmode;
struct qede_dev *qdev = QEDE_INIT_QDEV(eth_dev);
struct ecore_dev *edev = QEDE_INIT_EDEV(qdev);
@@ -1088,10 +1089,15 @@ static int qede_dev_start(struct rte_eth_dev *eth_dev)
if (qede_update_mtu(eth_dev, qdev->new_mtu))
goto err;
qdev->mtu = qdev->new_mtu;
- /* If MTU has changed then update TPA too */
- if (qdev->enable_lro)
- if (qede_enable_tpa(eth_dev, true))
- goto err;
+ }
+
+ /* Configure TPA parameters */
+ if (rxmode->enable_lro) {
+ if (qede_enable_tpa(eth_dev, true))
+ return -EINVAL;
+ /* Enable scatter mode for LRO */
+ if (!rxmode->enable_scatter)
+ eth_dev->data->scattered_rx = 1;
}
/* Start queues */
@@ -1103,7 +1109,7 @@ static int qede_dev_start(struct rte_eth_dev *eth_dev)
* Also, we would like to retain similar behavior in PF case, so we
* don't do PF/VF specific check here.
*/
- if (eth_dev->data->dev_conf.rxmode.mq_mode == ETH_MQ_RX_RSS)
+ if (rxmode->mq_mode == ETH_MQ_RX_RSS)
if (qede_config_rss(eth_dev))
goto err;
@@ -1139,7 +1145,6 @@ static void qede_dev_stop(struct rte_eth_dev *eth_dev)
if (qdev->enable_lro)
qede_enable_tpa(eth_dev, false);
- /* TODO: Do we need disable LRO or RSS */
/* Stop queues */
qede_stop_queues(eth_dev);
@@ -1226,16 +1231,6 @@ static int qede_dev_configure(struct rte_eth_dev *eth_dev)
qdev->mtu = rxmode->max_rx_pkt_len;
qdev->new_mtu = qdev->mtu;
- /* Configure TPA parameters */
- if (rxmode->enable_lro) {
- if (qede_enable_tpa(eth_dev, true))
- return -EINVAL;
- /* Enable scatter mode for LRO */
- if (!rxmode->enable_scatter)
- eth_dev->data->scattered_rx = 1;
- }
- qdev->enable_lro = rxmode->enable_lro;
-
/* Enable VLAN offloads by default */
qede_vlan_offload_set(eth_dev, ETH_VLAN_STRIP_MASK |
ETH_VLAN_FILTER_MASK |
--
2.7.4
^ permalink raw reply [flat|nested] 191+ messages in thread
* [dpdk-stable] patch 'net/failsafe: fix PCI devices init' has been queued to stable release 17.08.1
2017-11-21 13:15 [dpdk-stable] patch 'gro: fix typo in map file' has been queued to stable release 17.08.1 Yuanhan Liu
` (145 preceding siblings ...)
2017-11-21 13:18 ` [dpdk-stable] patch 'net/qede: fix to re-enable LRO during device start' " Yuanhan Liu
@ 2017-11-21 13:18 ` Yuanhan Liu
2017-11-21 13:18 ` [dpdk-stable] patch 'app/testpmd: fix RSS structure initialisation' " Yuanhan Liu
` (42 subsequent siblings)
189 siblings, 0 replies; 191+ messages in thread
From: Yuanhan Liu @ 2017-11-21 13:18 UTC (permalink / raw)
To: Raslan Darawsheh; +Cc: Gaetan Rivet, dpdk stable
Hi,
FYI, your patch has been queued to stable release 17.08.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/24/17. So please
shout if anyone has objections.
Thanks.
--yliu
---
>From f3c4dadfb0dd02a54d4734d89bd842094942b07c Mon Sep 17 00:00:00 2001
From: Raslan Darawsheh <rasland@mellanox.com>
Date: Fri, 20 Oct 2017 00:15:00 +0300
Subject: [PATCH] net/failsafe: fix PCI devices init
[ upstream commit b8f4fa4103eaaf082d42ad85f01b1a08e74b89d6 ]
When trying to attach a port as a sub-device, the ethdev port
was compared with devargs.
In the case of a PCI device, the name in devargs is the PCI address.
And since DPDK 17.08, the devargs name of the underlying device was
used to match an ethdev port:
a1e7c17555e8 ("ethdev: use device name from device structure")
But the recent commit 72e3efb149cc has reverted this wrong matching
to use the ethdev port name as identifier of the port.
It impacts functions like rte_eth_dev_allocated() used in failsafe
for matching ports with given devargs.
The fix is to search for matching devargs in underlying device of
all ethdev ports.
If many ports match the same PCI device, only the first one is matched.
This limitation was already present in previous implementation of
rte_eth_dev_allocated(), and must be adressed later with a better
devargs syntax.
Fixes: 72e3efb149cc ("ethdev: revert use port name from device structure")
Signed-off-by: Raslan Darawsheh <rasland@mellanox.com>
Acked-by: Gaetan Rivet <gaetan.rivet@6wind.com>
---
drivers/net/failsafe/failsafe_eal.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/drivers/net/failsafe/failsafe_eal.c b/drivers/net/failsafe/failsafe_eal.c
index aeb87a0..19d26f5 100644
--- a/drivers/net/failsafe/failsafe_eal.c
+++ b/drivers/net/failsafe/failsafe_eal.c
@@ -41,6 +41,7 @@ fs_bus_init(struct rte_eth_dev *dev)
struct sub_device *sdev;
struct rte_devargs *da;
uint8_t i;
+ uint16_t j;
int ret;
FOREACH_SUBDEV(sdev, i, dev) {
@@ -57,7 +58,13 @@ fs_bus_init(struct rte_eth_dev *dev)
rte_errno ? ")" : "");
continue;
}
- ETH(sdev) = rte_eth_dev_allocated(da->name);
+ RTE_ETH_FOREACH_DEV(j) {
+ if (strcmp(rte_eth_devices[j].device->name,
+ da->name) == 0) {
+ ETH(sdev) = &rte_eth_devices[j];
+ break;
+ }
+ }
if (ETH(sdev) == NULL) {
ERROR("sub_device %d init went wrong", i);
return -ENODEV;
--
2.7.4
^ permalink raw reply [flat|nested] 191+ messages in thread
* [dpdk-stable] patch 'app/testpmd: fix RSS structure initialisation' has been queued to stable release 17.08.1
2017-11-21 13:15 [dpdk-stable] patch 'gro: fix typo in map file' has been queued to stable release 17.08.1 Yuanhan Liu
` (146 preceding siblings ...)
2017-11-21 13:18 ` [dpdk-stable] patch 'net/failsafe: fix PCI devices init' " Yuanhan Liu
@ 2017-11-21 13:18 ` Yuanhan Liu
2017-11-21 13:18 ` [dpdk-stable] patch 'net/enic: fix packet loss after MTU change' " Yuanhan Liu
` (41 subsequent siblings)
189 siblings, 0 replies; 191+ messages in thread
From: Yuanhan Liu @ 2017-11-21 13:18 UTC (permalink / raw)
To: Nélio Laranjeiro; +Cc: Yongseok Koh, dpdk stable
Hi,
FYI, your patch has been queued to stable release 17.08.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/24/17. So please
shout if anyone has objections.
Thanks.
--yliu
---
>From 866fa82301543413bafe119a44728b33cc532ab1 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?N=C3=A9lio=20Laranjeiro?= <nelio.laranjeiro@6wind.com>
Date: Mon, 23 Oct 2017 13:17:56 +0200
Subject: [PATCH] app/testpmd: fix RSS structure initialisation
[ upstream commit f3fb0e46251080aced4354afb41decb0dc8eae2d ]
Struct rss_conf.rss_key_len is not initialised forcing the user to
verify the rss_conf.rss_key pointer to know if the key is present
or not. rss_conf.rss_key_len should have a valid length according
to the size of the rss_key pointed.
Fixes: 560e02ee5237 ("app/testpmd: configure RSS without restart")
Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Acked-by: Yongseok Koh <yskoh@mellanox.com>
---
app/test-pmd/cmdline.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c
index cd8c358..a9494db 100644
--- a/app/test-pmd/cmdline.c
+++ b/app/test-pmd/cmdline.c
@@ -1688,7 +1688,7 @@ cmd_config_rss_parsed(void *parsed_result,
__attribute__((unused)) void *data)
{
struct cmd_config_rss *res = parsed_result;
- struct rte_eth_rss_conf rss_conf;
+ struct rte_eth_rss_conf rss_conf = { .rss_key_len = 0, };
int diag;
uint8_t i;
--
2.7.4
^ permalink raw reply [flat|nested] 191+ messages in thread
* [dpdk-stable] patch 'net/enic: fix packet loss after MTU change' has been queued to stable release 17.08.1
2017-11-21 13:15 [dpdk-stable] patch 'gro: fix typo in map file' has been queued to stable release 17.08.1 Yuanhan Liu
` (147 preceding siblings ...)
2017-11-21 13:18 ` [dpdk-stable] patch 'app/testpmd: fix RSS structure initialisation' " Yuanhan Liu
@ 2017-11-21 13:18 ` Yuanhan Liu
2017-11-21 13:18 ` [dpdk-stable] patch 'net/ixgbe: fix PF DCB info' " Yuanhan Liu
` (40 subsequent siblings)
189 siblings, 0 replies; 191+ messages in thread
From: Yuanhan Liu @ 2017-11-21 13:18 UTC (permalink / raw)
To: John Daley; +Cc: dpdk stable
Hi,
FYI, your patch has been queued to stable release 17.08.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/24/17. So please
shout if anyone has objections.
Thanks.
--yliu
---
>From 41a054797a3c2cd727ae4e3b2770ad042ce9004d Mon Sep 17 00:00:00 2001
From: John Daley <johndale@cisco.com>
Date: Mon, 23 Oct 2017 13:23:00 -0700
Subject: [PATCH] net/enic: fix packet loss after MTU change
[ upstream commit ea5f15b1c49a687eaa57d435a8bf68e553b50b30 ]
If multiple Rx queues and Rx Scatter are used and the MTU is
modified so that the number of mbufs per packet changes, packet
loss is possible.
The enic completion queue index was miscalculated leaving the
upper half of the queues uninitialized after an MTU change, possibly
leading to completions on those queues not getting processed.
Fixes: c3e09182bcd6 ("net/enic: support scatter Rx in MTU update")
Signed-off-by: John Daley <johndale@cisco.com>
---
drivers/net/enic/enic_main.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/net/enic/enic_main.c b/drivers/net/enic/enic_main.c
index cac8b66..cc71bf2 100644
--- a/drivers/net/enic/enic_main.c
+++ b/drivers/net/enic/enic_main.c
@@ -1117,11 +1117,12 @@ static int
enic_reinit_rq(struct enic *enic, unsigned int rq_idx)
{
struct vnic_rq *sop_rq, *data_rq;
- unsigned int cq_idx = enic_cq_rq(enic, rq_idx);
+ unsigned int cq_idx;
int rc = 0;
sop_rq = &enic->rq[enic_rte_rq_idx_to_sop_idx(rq_idx)];
data_rq = &enic->rq[enic_rte_rq_idx_to_data_idx(rq_idx)];
+ cq_idx = rq_idx;
vnic_cq_clean(&enic->cq[cq_idx]);
vnic_cq_init(&enic->cq[cq_idx],
--
2.7.4
^ permalink raw reply [flat|nested] 191+ messages in thread
* [dpdk-stable] patch 'net/ixgbe: fix PF DCB info' has been queued to stable release 17.08.1
2017-11-21 13:15 [dpdk-stable] patch 'gro: fix typo in map file' has been queued to stable release 17.08.1 Yuanhan Liu
` (148 preceding siblings ...)
2017-11-21 13:18 ` [dpdk-stable] patch 'net/enic: fix packet loss after MTU change' " Yuanhan Liu
@ 2017-11-21 13:18 ` Yuanhan Liu
2017-11-21 13:18 ` [dpdk-stable] patch 'app/testpmd: fix mapping of user priority to DCB TC' " Yuanhan Liu
` (39 subsequent siblings)
189 siblings, 0 replies; 191+ messages in thread
From: Yuanhan Liu @ 2017-11-21 13:18 UTC (permalink / raw)
To: Wei Dai; +Cc: Jingjing Wu, dpdk stable
Hi,
FYI, your patch has been queued to stable release 17.08.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/24/17. So please
shout if anyone has objections.
Thanks.
--yliu
---
>From b2262809af07a1c4b31fd1e3b4dbc0de25725ea0 Mon Sep 17 00:00:00 2001
From: Wei Dai <wei.dai@intel.com>
Date: Mon, 23 Oct 2017 14:43:57 +0800
Subject: [PATCH] net/ixgbe: fix PF DCB info
[ upstream commit 9be9050134aaf09089f0cfb7723159eecc4a15e5 ]
When SRIOV is active, the function ixgbe_dev_get_dcb_info( )
should return the DCB traffic class info of its own queues,
not including any DCB info of the queues of any its VF.
When VMDQ is active, all queues are belonged to the PF,
the function ixgbe_dev_get_dcb_info can return DCB info
of all queues.
Fixes: 89d6728c7837 ("ethdev: get DCB information")
Signed-off-by: Wei Dai <wei.dai@intel.com>
Reviewed-by: Jingjing Wu <jingjing.wu@intel.com>
---
drivers/net/ixgbe/ixgbe_ethdev.c | 30 ++++++++++++++++++++++--------
1 file changed, 22 insertions(+), 8 deletions(-)
diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c
index feff0a7..feb50c0 100644
--- a/drivers/net/ixgbe/ixgbe_ethdev.c
+++ b/drivers/net/ixgbe/ixgbe_ethdev.c
@@ -7182,6 +7182,8 @@ ixgbe_dev_get_dcb_info(struct rte_eth_dev *dev,
struct ixgbe_dcb_config *dcb_config =
IXGBE_DEV_PRIVATE_TO_DCB_CFG(dev->data->dev_private);
struct ixgbe_dcb_tc_config *tc;
+ struct rte_eth_dcb_tc_queue_mapping *tc_queue;
+ uint8_t nb_tcs;
uint8_t i, j;
if (dev->data->dev_conf.rxmode.mq_mode & ETH_MQ_RX_DCB_FLAG)
@@ -7189,19 +7191,31 @@ ixgbe_dev_get_dcb_info(struct rte_eth_dev *dev,
else
dcb_info->nb_tcs = 1;
+ tc_queue = &dcb_info->tc_queue;
+ nb_tcs = dcb_info->nb_tcs;
+
if (dcb_config->vt_mode) { /* vt is enabled*/
struct rte_eth_vmdq_dcb_conf *vmdq_rx_conf =
&dev->data->dev_conf.rx_adv_conf.vmdq_dcb_conf;
for (i = 0; i < ETH_DCB_NUM_USER_PRIORITIES; i++)
dcb_info->prio_tc[i] = vmdq_rx_conf->dcb_tc[i];
- for (i = 0; i < vmdq_rx_conf->nb_queue_pools; i++) {
- for (j = 0; j < dcb_info->nb_tcs; j++) {
- dcb_info->tc_queue.tc_rxq[i][j].base =
- i * dcb_info->nb_tcs + j;
- dcb_info->tc_queue.tc_rxq[i][j].nb_queue = 1;
- dcb_info->tc_queue.tc_txq[i][j].base =
- i * dcb_info->nb_tcs + j;
- dcb_info->tc_queue.tc_txq[i][j].nb_queue = 1;
+ if (RTE_ETH_DEV_SRIOV(dev).active > 0) {
+ for (j = 0; j < nb_tcs; j++) {
+ tc_queue->tc_rxq[0][j].base = j;
+ tc_queue->tc_rxq[0][j].nb_queue = 1;
+ tc_queue->tc_txq[0][j].base = j;
+ tc_queue->tc_txq[0][j].nb_queue = 1;
+ }
+ } else {
+ for (i = 0; i < vmdq_rx_conf->nb_queue_pools; i++) {
+ for (j = 0; j < nb_tcs; j++) {
+ tc_queue->tc_rxq[i][j].base =
+ i * nb_tcs + j;
+ tc_queue->tc_rxq[i][j].nb_queue = 1;
+ tc_queue->tc_txq[i][j].base =
+ i * nb_tcs + j;
+ tc_queue->tc_txq[i][j].nb_queue = 1;
+ }
}
}
} else { /* vt is disabled*/
--
2.7.4
^ permalink raw reply [flat|nested] 191+ messages in thread
* [dpdk-stable] patch 'app/testpmd: fix mapping of user priority to DCB TC' has been queued to stable release 17.08.1
2017-11-21 13:15 [dpdk-stable] patch 'gro: fix typo in map file' has been queued to stable release 17.08.1 Yuanhan Liu
` (149 preceding siblings ...)
2017-11-21 13:18 ` [dpdk-stable] patch 'net/ixgbe: fix PF DCB info' " Yuanhan Liu
@ 2017-11-21 13:18 ` Yuanhan Liu
2017-11-21 13:18 ` [dpdk-stable] patch 'net/mlx5: fix packet type flags for Ethernet only frame' " Yuanhan Liu
` (38 subsequent siblings)
189 siblings, 0 replies; 191+ messages in thread
From: Yuanhan Liu @ 2017-11-21 13:18 UTC (permalink / raw)
To: Wei Dai; +Cc: Jingjing Wu, dpdk stable
Hi,
FYI, your patch has been queued to stable release 17.08.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/24/17. So please
shout if anyone has objections.
Thanks.
--yliu
---
>From 4e03edef339f1c0c6ef1364d94d00719672652c0 Mon Sep 17 00:00:00 2001
From: Wei Dai <wei.dai@intel.com>
Date: Mon, 23 Oct 2017 15:25:16 +0800
Subject: [PATCH] app/testpmd: fix mapping of user priority to DCB TC
[ upstream commit f59908fe499bc0e908295bf8ef874048f55186cd ]
When number of DCB traffic class is 4, user priority should be
mapped to traffic class 0/1/2/3.
Fixes: cb60ede6e3b6 ("ethdev: rename DCB field in config structs")
Signed-off-by: Wei Dai <wei.dai@intel.com>
Acked-by: Jingjing Wu <jingjing.wu@intel.com>
---
app/test-pmd/testpmd.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c
index 91e94fc..91db1aa 100644
--- a/app/test-pmd/testpmd.c
+++ b/app/test-pmd/testpmd.c
@@ -2119,8 +2119,8 @@ get_eth_dcb_conf(struct rte_eth_conf *eth_conf,
1 << (i % vmdq_rx_conf->nb_queue_pools);
}
for (i = 0; i < ETH_DCB_NUM_USER_PRIORITIES; i++) {
- vmdq_rx_conf->dcb_tc[i] = i;
- vmdq_tx_conf->dcb_tc[i] = i;
+ vmdq_rx_conf->dcb_tc[i] = i % num_tcs;
+ vmdq_tx_conf->dcb_tc[i] = i % num_tcs;
}
/* set DCB mode of RX and TX of multiple queues */
--
2.7.4
^ permalink raw reply [flat|nested] 191+ messages in thread
* [dpdk-stable] patch 'net/mlx5: fix packet type flags for Ethernet only frame' has been queued to stable release 17.08.1
2017-11-21 13:15 [dpdk-stable] patch 'gro: fix typo in map file' has been queued to stable release 17.08.1 Yuanhan Liu
` (150 preceding siblings ...)
2017-11-21 13:18 ` [dpdk-stable] patch 'app/testpmd: fix mapping of user priority to DCB TC' " Yuanhan Liu
@ 2017-11-21 13:18 ` Yuanhan Liu
2017-11-21 13:18 ` [dpdk-stable] patch 'app/testpmd: fix build without ixgbe and bnxt PMDs' " Yuanhan Liu
` (37 subsequent siblings)
189 siblings, 0 replies; 191+ messages in thread
From: Yuanhan Liu @ 2017-11-21 13:18 UTC (permalink / raw)
To: Shahaf Shuler; +Cc: Yongseok Koh, Nelio Laranjeiro, dpdk stable
Hi,
FYI, your patch has been queued to stable release 17.08.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/24/17. So please
shout if anyone has objections.
Thanks.
--yliu
---
>From 671c00910fcaaade3e98f0e689bbff3f922d61d6 Mon Sep 17 00:00:00 2001
From: Shahaf Shuler <shahafs@mellanox.com>
Date: Tue, 24 Oct 2017 09:16:09 +0300
Subject: [PATCH] net/mlx5: fix packet type flags for Ethernet only frame
[ upstream commit 3ca63b88a8c9c79d3ca630e2ed6cdff110b382b0 ]
Considering the PMD supports only Ethernet transport, packet which
arrives without any packet type flags in the completion should be
marked with L2_ETHER flag.
Fixes: ea16068c0064 ("net/mlx5: fix L4 packet type support")
Signed-off-by: Shahaf Shuler <shahafs@mellanox.com>
Acked-by: Yongseok Koh <yskoh@mellanox.com>
Acked-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
---
drivers/net/mlx5/mlx5_rxtx.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/net/mlx5/mlx5_rxtx.c b/drivers/net/mlx5/mlx5_rxtx.c
index 986c229..40c6a4f 100644
--- a/drivers/net/mlx5/mlx5_rxtx.c
+++ b/drivers/net/mlx5/mlx5_rxtx.c
@@ -105,6 +105,8 @@ mlx5_set_ptype_table(void)
* bit[6] = tunneled
* bit[7] = outer_l3_type
*/
+ /* L2 */
+ (*p)[0x00] = RTE_PTYPE_L2_ETHER;
/* L3 */
(*p)[0x01] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV6_EXT_UNKNOWN |
RTE_PTYPE_L4_NONFRAG;
--
2.7.4
^ permalink raw reply [flat|nested] 191+ messages in thread
* [dpdk-stable] patch 'app/testpmd: fix build without ixgbe and bnxt PMDs' has been queued to stable release 17.08.1
2017-11-21 13:15 [dpdk-stable] patch 'gro: fix typo in map file' has been queued to stable release 17.08.1 Yuanhan Liu
` (151 preceding siblings ...)
2017-11-21 13:18 ` [dpdk-stable] patch 'net/mlx5: fix packet type flags for Ethernet only frame' " Yuanhan Liu
@ 2017-11-21 13:18 ` Yuanhan Liu
2017-11-21 13:18 ` [dpdk-stable] patch 'net/bnxt: fix Tx offload capability' " Yuanhan Liu
` (36 subsequent siblings)
189 siblings, 0 replies; 191+ messages in thread
From: Yuanhan Liu @ 2017-11-21 13:18 UTC (permalink / raw)
To: Aviad Yehezkel; +Cc: Ferruh Yigit, dpdk stable
Hi,
FYI, your patch has been queued to stable release 17.08.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/24/17. So please
shout if anyone has objections.
Thanks.
--yliu
---
>From f8328c0ed60bea5867a7f21a7bfceb7e32304baf Mon Sep 17 00:00:00 2001
From: Aviad Yehezkel <aviadye@mellanox.com>
Date: Tue, 24 Oct 2017 17:48:16 +0300
Subject: [PATCH] app/testpmd: fix build without ixgbe and bnxt PMDs
[ upstream commit 59e4985a24d58ffad1c205a148ef3ac4ca2c5093 ]
Fixes: 4cfe399f6550 ("net/bnxt: support to set VF rxmode")
Fixes: 36735a932ca7 ("net/bnxt: support set VF QOS and MAC anti spoof")
Signed-off-by: Aviad Yehezkel <aviadye@mellanox.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
app/test-pmd/cmdline.c | 2 ++
app/test-pmd/config.c | 4 ++++
2 files changed, 6 insertions(+)
diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c
index a9494db..fb47a13 100644
--- a/app/test-pmd/cmdline.c
+++ b/app/test-pmd/cmdline.c
@@ -7135,6 +7135,8 @@ cmd_set_vf_rxmode_parsed(void *parsed_result,
rx_mode |= ETH_VMDQ_ACCEPT_MULTICAST;
}
+ RTE_SET_USED(is_on);
+
#ifdef RTE_LIBRTE_IXGBE_PMD
if (ret == -ENOTSUP)
ret = rte_pmd_ixgbe_set_vf_rxmode(res->port_id, res->vf_id,
diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c
index 56d706a..ae4d793 100644
--- a/app/test-pmd/config.c
+++ b/app/test-pmd/config.c
@@ -3096,6 +3096,10 @@ set_vf_rate_limit(portid_t port_id, uint16_t vf, uint16_t rate, uint64_t q_msk)
{
int diag = -ENOTSUP;
+ RTE_SET_USED(vf);
+ RTE_SET_USED(rate);
+ RTE_SET_USED(q_msk);
+
#ifdef RTE_LIBRTE_IXGBE_PMD
if (diag == -ENOTSUP)
diag = rte_pmd_ixgbe_set_vf_rate_limit(port_id, vf, rate,
--
2.7.4
^ permalink raw reply [flat|nested] 191+ messages in thread
* [dpdk-stable] patch 'net/bnxt: fix Tx offload capability' has been queued to stable release 17.08.1
2017-11-21 13:15 [dpdk-stable] patch 'gro: fix typo in map file' has been queued to stable release 17.08.1 Yuanhan Liu
` (152 preceding siblings ...)
2017-11-21 13:18 ` [dpdk-stable] patch 'app/testpmd: fix build without ixgbe and bnxt PMDs' " Yuanhan Liu
@ 2017-11-21 13:18 ` Yuanhan Liu
2017-11-21 13:18 ` [dpdk-stable] patch 'net/bnxt: fix Rx " Yuanhan Liu
` (35 subsequent siblings)
189 siblings, 0 replies; 191+ messages in thread
From: Yuanhan Liu @ 2017-11-21 13:18 UTC (permalink / raw)
To: Ajit Khaparde; +Cc: dpdk stable
Hi,
FYI, your patch has been queued to stable release 17.08.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/24/17. So please
shout if anyone has objections.
Thanks.
--yliu
---
>From 99cd083afbf9b6c71518ab6d7deba35824b37760 Mon Sep 17 00:00:00 2001
From: Ajit Khaparde <ajit.khaparde@broadcom.com>
Date: Tue, 24 Oct 2017 16:19:40 -0500
Subject: [PATCH] net/bnxt: fix Tx offload capability
[ upstream commit 1a54416d9af74c48b58a37e7f0e85824f7bc39dc ]
We are not indicating VLAN insert capability of HW. Fixing it.
Fixes: 0a6d2a720078 ("net/bnxt: get device infos")
Signed-off-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 b311179..6878530 100644
--- a/drivers/net/bnxt/bnxt_ethdev.c
+++ b/drivers/net/bnxt/bnxt_ethdev.c
@@ -386,7 +386,8 @@ static void bnxt_dev_info_get_op(struct rte_eth_dev *eth_dev,
dev_info->max_rx_pktlen = BNXT_MAX_MTU + ETHER_HDR_LEN + ETHER_CRC_LEN
+ VLAN_TAG_SIZE;
dev_info->rx_offload_capa = 0;
- dev_info->tx_offload_capa = DEV_TX_OFFLOAD_IPV4_CKSUM |
+ dev_info->tx_offload_capa = DEV_TX_OFFLOAD_VLAN_INSERT |
+ DEV_TX_OFFLOAD_IPV4_CKSUM |
DEV_TX_OFFLOAD_TCP_CKSUM |
DEV_TX_OFFLOAD_UDP_CKSUM |
DEV_TX_OFFLOAD_TCP_TSO |
--
2.7.4
^ permalink raw reply [flat|nested] 191+ messages in thread
* [dpdk-stable] patch 'net/bnxt: fix Rx offload capability' has been queued to stable release 17.08.1
2017-11-21 13:15 [dpdk-stable] patch 'gro: fix typo in map file' has been queued to stable release 17.08.1 Yuanhan Liu
` (153 preceding siblings ...)
2017-11-21 13:18 ` [dpdk-stable] patch 'net/bnxt: fix Tx offload capability' " Yuanhan Liu
@ 2017-11-21 13:18 ` Yuanhan Liu
2017-11-21 13:18 ` [dpdk-stable] patch 'net/bnxt: handle Rx multi queue creation properly' " Yuanhan Liu
` (34 subsequent siblings)
189 siblings, 0 replies; 191+ messages in thread
From: Yuanhan Liu @ 2017-11-21 13:18 UTC (permalink / raw)
To: Ajit Khaparde; +Cc: dpdk stable
Hi,
FYI, your patch has been queued to stable release 17.08.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/24/17. So please
shout if anyone has objections.
Thanks.
--yliu
---
>From 128e177d6850fb746626f63e7a5439050c148321 Mon Sep 17 00:00:00 2001
From: Ajit Khaparde <ajit.khaparde@broadcom.com>
Date: Tue, 24 Oct 2017 16:19:41 -0500
Subject: [PATCH] net/bnxt: fix Rx offload capability
[ upstream commit 0489c654e5190f49783f5cffff6f5714e42525bf ]
We are not setting the rx_offload capabilities. Fixing that.
Fixes: 0a6d2a720078 ("net/bnxt: get device infos")
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
drivers/net/bnxt/bnxt_ethdev.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
index 6878530..9ad5e8a 100644
--- a/drivers/net/bnxt/bnxt_ethdev.c
+++ b/drivers/net/bnxt/bnxt_ethdev.c
@@ -385,7 +385,11 @@ static void bnxt_dev_info_get_op(struct rte_eth_dev *eth_dev,
dev_info->min_rx_bufsize = 1;
dev_info->max_rx_pktlen = BNXT_MAX_MTU + ETHER_HDR_LEN + ETHER_CRC_LEN
+ VLAN_TAG_SIZE;
- dev_info->rx_offload_capa = 0;
+ dev_info->rx_offload_capa = DEV_RX_OFFLOAD_VLAN_STRIP |
+ DEV_RX_OFFLOAD_IPV4_CKSUM |
+ DEV_RX_OFFLOAD_UDP_CKSUM |
+ DEV_RX_OFFLOAD_TCP_CKSUM |
+ DEV_RX_OFFLOAD_OUTER_IPV4_CKSUM;
dev_info->tx_offload_capa = DEV_TX_OFFLOAD_VLAN_INSERT |
DEV_TX_OFFLOAD_IPV4_CKSUM |
DEV_TX_OFFLOAD_TCP_CKSUM |
--
2.7.4
^ permalink raw reply [flat|nested] 191+ messages in thread
* [dpdk-stable] patch 'net/bnxt: handle Rx multi queue creation properly' has been queued to stable release 17.08.1
2017-11-21 13:15 [dpdk-stable] patch 'gro: fix typo in map file' has been queued to stable release 17.08.1 Yuanhan Liu
` (154 preceding siblings ...)
2017-11-21 13:18 ` [dpdk-stable] patch 'net/bnxt: fix Rx " Yuanhan Liu
@ 2017-11-21 13:18 ` Yuanhan Liu
2017-11-21 13:18 ` [dpdk-stable] patch 'net/bnxt: remove redundant code parsing pool map' " Yuanhan Liu
` (33 subsequent siblings)
189 siblings, 0 replies; 191+ messages in thread
From: Yuanhan Liu @ 2017-11-21 13:18 UTC (permalink / raw)
To: Ajit Khaparde; +Cc: dpdk stable
Hi,
FYI, your patch has been queued to stable release 17.08.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/24/17. So please
shout if anyone has objections.
Thanks.
--yliu
---
>From c1fc3619ba5f2104ef9286e5d81be1a45f7377ae Mon Sep 17 00:00:00 2001
From: Ajit Khaparde <ajit.khaparde@broadcom.com>
Date: Tue, 24 Oct 2017 16:19:42 -0500
Subject: [PATCH] net/bnxt: handle Rx multi queue creation properly
[ upstream commit 8103a57ab432a968f75aad661f7c9905bad77d1a ]
This patch simplifies logic for RSS queue creation.
1) Do not hardcode number of VNIC pools in case of RSS
2) Log a message if Number of queues is > RTE_ETHDEV_QUEUE_STAT_CNTRS
3) Move the check for allocation of l2_filter inside the for loop.
Fixes: 6133f207970c ("net/bnxt: add Rx queue create/destroy")
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
drivers/net/bnxt/bnxt_ethdev.c | 5 +++++
drivers/net/bnxt/bnxt_rxq.c | 18 ++++++------------
2 files changed, 11 insertions(+), 12 deletions(-)
diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
index 9ad5e8a..4ccae5b 100644
--- a/drivers/net/bnxt/bnxt_ethdev.c
+++ b/drivers/net/bnxt/bnxt_ethdev.c
@@ -521,6 +521,11 @@ static int bnxt_dev_start_op(struct rte_eth_dev *eth_dev)
int vlan_mask = 0;
int rc;
+ if (bp->rx_cp_nr_rings > RTE_ETHDEV_QUEUE_STAT_CNTRS) {
+ RTE_LOG(ERR, PMD,
+ "RxQ cnt %d > CONFIG_RTE_ETHDEV_QUEUE_STAT_CNTRS %d\n",
+ bp->rx_cp_nr_rings, RTE_ETHDEV_QUEUE_STAT_CNTRS);
+ }
bp->dev_stopped = 0;
rc = bnxt_init_nic(bp);
diff --git a/drivers/net/bnxt/bnxt_rxq.c b/drivers/net/bnxt/bnxt_rxq.c
index 2665ed5..ed168cc 100644
--- a/drivers/net/bnxt/bnxt_rxq.c
+++ b/drivers/net/bnxt/bnxt_rxq.c
@@ -68,7 +68,6 @@ int bnxt_mq_rx_configure(struct bnxt *bp)
struct bnxt_filter_info *filter;
enum rte_eth_nb_pools pools = bp->rx_cp_nr_rings, max_pools = 0;
struct bnxt_rx_queue *rxq;
- bool rss_dflt_cr = false;
bp->nr_vnics = 0;
@@ -119,7 +118,7 @@ int bnxt_mq_rx_configure(struct bnxt *bp)
pools = max_pools;
break;
case ETH_MQ_RX_RSS:
- pools = 1;
+ pools = bp->rx_cp_nr_rings;
break;
default:
RTE_LOG(ERR, PMD, "Unsupported mq_mod %d\n",
@@ -128,13 +127,6 @@ int bnxt_mq_rx_configure(struct bnxt *bp)
goto err_out;
}
}
- /*
- * If MQ RX w/o RSS no need for per VNIC filter.
- */
- if ((dev_conf->rxmode.mq_mode & ETH_MQ_RX_VMDQ_DCB) ||
- (bp->rx_cp_nr_rings &&
- !(dev_conf->rxmode.mq_mode & ETH_MQ_RX_RSS)))
- rss_dflt_cr = true;
nb_q_per_grp = bp->rx_cp_nr_rings / pools;
start_grp_id = 0;
@@ -151,7 +143,7 @@ int bnxt_mq_rx_configure(struct bnxt *bp)
STAILQ_INSERT_TAIL(&bp->ff_pool[i], vnic, next);
bp->nr_vnics++;
- for (j = 0, ring_idx = 0; j < nb_q_per_grp; j++, ring_idx++) {
+ for (j = 0; j < nb_q_per_grp; j++, ring_idx++) {
rxq = bp->eth_dev->data->rx_queues[ring_idx];
rxq->vnic = vnic;
}
@@ -166,8 +158,10 @@ int bnxt_mq_rx_configure(struct bnxt *bp)
vnic->start_grp_id = start_grp_id;
vnic->end_grp_id = end_grp_id;
- if (rss_dflt_cr && i) {
- vnic->rss_dflt_cr = true;
+ if (i) {
+ if (dev_conf->rxmode.mq_mode & ETH_MQ_RX_VMDQ_DCB ||
+ !(dev_conf->rxmode.mq_mode & ETH_MQ_RX_RSS))
+ vnic->rss_dflt_cr = true;
goto skip_filter_allocation;
}
filter = bnxt_alloc_filter(bp);
--
2.7.4
^ permalink raw reply [flat|nested] 191+ messages in thread
* [dpdk-stable] patch 'net/bnxt: remove redundant code parsing pool map' has been queued to stable release 17.08.1
2017-11-21 13:15 [dpdk-stable] patch 'gro: fix typo in map file' has been queued to stable release 17.08.1 Yuanhan Liu
` (155 preceding siblings ...)
2017-11-21 13:18 ` [dpdk-stable] patch 'net/bnxt: handle Rx multi queue creation properly' " Yuanhan Liu
@ 2017-11-21 13:18 ` Yuanhan Liu
2017-11-21 13:18 ` [dpdk-stable] patch 'net/bnxt: fix a bit shift operation' " Yuanhan Liu
` (32 subsequent siblings)
189 siblings, 0 replies; 191+ messages in thread
From: Yuanhan Liu @ 2017-11-21 13:18 UTC (permalink / raw)
To: Ajit Khaparde; +Cc: dpdk stable
Hi,
FYI, your patch has been queued to stable release 17.08.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/24/17. So please
shout if anyone has objections.
Thanks.
--yliu
---
>From 4e6a1f8eb1749e01060454dd233bb21344597e35 Mon Sep 17 00:00:00 2001
From: Ajit Khaparde <ajit.khaparde@broadcom.com>
Date: Tue, 24 Oct 2017 16:19:43 -0500
Subject: [PATCH] net/bnxt: remove redundant code parsing pool map
[ upstream commit 6eda9e550e3d5e70949fb452c70113a326e785df ]
This patch removes some redundant code from bnxt_mq_rx_configure().
Fixes: 75cd6fb1d901 ("net/bnxt: fix the association of a MACVLAN per VNIC")
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
drivers/net/bnxt/bnxt_rxq.c | 11 -----------
1 file changed, 11 deletions(-)
diff --git a/drivers/net/bnxt/bnxt_rxq.c b/drivers/net/bnxt/bnxt_rxq.c
index ed168cc..6715fbd 100644
--- a/drivers/net/bnxt/bnxt_rxq.c
+++ b/drivers/net/bnxt/bnxt_rxq.c
@@ -170,17 +170,6 @@ int bnxt_mq_rx_configure(struct bnxt *bp)
rc = -ENOMEM;
goto err_out;
}
- for (j = 0; j < conf->nb_pool_maps; j++) {
- if (conf->pool_map[j].pools & (1UL << i)) {
- RTE_LOG(ERR, PMD,
- "Add vlan %u to vmdq pool %u\n",
- conf->pool_map[j].vlan_id, i);
-
- filter->l2_ivlan = conf->pool_map[j].vlan_id;
- filter->enables |=
- HWRM_CFA_L2_FILTER_ALLOC_INPUT_ENABLES_L2_IVLAN;
- }
- }
/*
* TODO: Configure & associate CFA rule for
* each VNIC for each VMDq with MACVLAN, MACVLAN+TC
--
2.7.4
^ permalink raw reply [flat|nested] 191+ messages in thread
* [dpdk-stable] patch 'net/bnxt: fix a bit shift operation' has been queued to stable release 17.08.1
2017-11-21 13:15 [dpdk-stable] patch 'gro: fix typo in map file' has been queued to stable release 17.08.1 Yuanhan Liu
` (156 preceding siblings ...)
2017-11-21 13:18 ` [dpdk-stable] patch 'net/bnxt: remove redundant code parsing pool map' " Yuanhan Liu
@ 2017-11-21 13:18 ` Yuanhan Liu
2017-11-21 13:18 ` [dpdk-stable] patch 'net/bnxt: fix a potential null pointer dereference' " Yuanhan Liu
` (31 subsequent siblings)
189 siblings, 0 replies; 191+ messages in thread
From: Yuanhan Liu @ 2017-11-21 13:18 UTC (permalink / raw)
To: Ajit Khaparde; +Cc: dpdk stable
Hi,
FYI, your patch has been queued to stable release 17.08.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/24/17. So please
shout if anyone has objections.
Thanks.
--yliu
---
>From 5170477b882cd4642cb2b623e63c5d5e977cd478 Mon Sep 17 00:00:00 2001
From: Ajit Khaparde <ajit.khaparde@broadcom.com>
Date: Tue, 24 Oct 2017 16:19:45 -0500
Subject: [PATCH] net/bnxt: fix a bit shift operation
[ upstream commit 9c7b0242963a3c51f586a04b006b48de7571e4ac ]
We are left shifting more bits than we should be doing.
This patch fixes that.
Coverity issue: 127546
Fixes: 778b759ba10e ("net/bnxt: add MAC address")
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
drivers/net/bnxt/bnxt_ethdev.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
index 4ccae5b..d6854da 100644
--- a/drivers/net/bnxt/bnxt_ethdev.c
+++ b/drivers/net/bnxt/bnxt_ethdev.c
@@ -609,13 +609,14 @@ static void bnxt_mac_addr_remove_op(struct rte_eth_dev *eth_dev,
uint64_t pool_mask = eth_dev->data->mac_pool_sel[index];
struct bnxt_vnic_info *vnic;
struct bnxt_filter_info *filter, *temp_filter;
- int i;
+ uint32_t pool = RTE_MIN(MAX_FF_POOLS, ETH_64_POOLS);
+ uint32_t i;
/*
* Loop through all VNICs from the specified filter flow pools to
* remove the corresponding MAC addr filter
*/
- for (i = 0; i < MAX_FF_POOLS; i++) {
+ for (i = 0; i < pool; i++) {
if (!(pool_mask & (1ULL << i)))
continue;
--
2.7.4
^ permalink raw reply [flat|nested] 191+ messages in thread
* [dpdk-stable] patch 'net/bnxt: fix a potential null pointer dereference' has been queued to stable release 17.08.1
2017-11-21 13:15 [dpdk-stable] patch 'gro: fix typo in map file' has been queued to stable release 17.08.1 Yuanhan Liu
` (157 preceding siblings ...)
2017-11-21 13:18 ` [dpdk-stable] patch 'net/bnxt: fix a bit shift operation' " Yuanhan Liu
@ 2017-11-21 13:18 ` Yuanhan Liu
2017-11-21 13:18 ` Yuanhan Liu
` (30 subsequent siblings)
189 siblings, 0 replies; 191+ messages in thread
From: Yuanhan Liu @ 2017-11-21 13:18 UTC (permalink / raw)
To: Ajit Khaparde; +Cc: dpdk stable
Hi,
FYI, your patch has been queued to stable release 17.08.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/24/17. So please
shout if anyone has objections.
Thanks.
--yliu
---
>From 02a05f0af5c90f2b917e42c139134da7977b983e Mon Sep 17 00:00:00 2001
From: Ajit Khaparde <ajit.khaparde@broadcom.com>
Date: Tue, 24 Oct 2017 16:19:49 -0500
Subject: [PATCH] net/bnxt: fix a potential null pointer dereference
[ upstream commit 8ec40353d4b1aacb9158755f3e82a8a9ee7df59c ]
Coverity issue: 195046
Fixes: f7ecea911ec5 ("net/bnxt: fix interrupt handler")
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
drivers/net/bnxt/bnxt_irq.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/drivers/net/bnxt/bnxt_irq.c b/drivers/net/bnxt/bnxt_irq.c
index 79a1196..49436cf 100644
--- a/drivers/net/bnxt/bnxt_irq.c
+++ b/drivers/net/bnxt/bnxt_irq.c
@@ -50,10 +50,14 @@ static void bnxt_int_handler(void *param)
struct rte_eth_dev *eth_dev = (struct rte_eth_dev *)param;
struct bnxt *bp = (struct bnxt *)eth_dev->data->dev_private;
struct bnxt_cp_ring_info *cpr = bp->def_cp_ring;
- uint32_t raw_cons = cpr->cp_raw_cons;
- uint32_t cons;
struct cmpl_base *cmp;
+ uint32_t raw_cons;
+ uint32_t cons;
+
+ if (cpr == NULL)
+ return;
+ raw_cons = cpr->cp_raw_cons;
while (1) {
if (!cpr || !cpr->cp_ring_struct)
return;
--
2.7.4
^ permalink raw reply [flat|nested] 191+ messages in thread
* [dpdk-stable] patch 'net/bnxt: fix a potential null pointer dereference' has been queued to stable release 17.08.1
2017-11-21 13:15 [dpdk-stable] patch 'gro: fix typo in map file' has been queued to stable release 17.08.1 Yuanhan Liu
` (158 preceding siblings ...)
2017-11-21 13:18 ` [dpdk-stable] patch 'net/bnxt: fix a potential null pointer dereference' " Yuanhan Liu
@ 2017-11-21 13:18 ` Yuanhan Liu
2017-11-21 13:18 ` [dpdk-stable] patch 'net/bnxt: fix a pointer deref before null check' " Yuanhan Liu
` (29 subsequent siblings)
189 siblings, 0 replies; 191+ messages in thread
From: Yuanhan Liu @ 2017-11-21 13:18 UTC (permalink / raw)
To: Ajit Khaparde; +Cc: dpdk stable
Hi,
FYI, your patch has been queued to stable release 17.08.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/24/17. So please
shout if anyone has objections.
Thanks.
--yliu
---
>From deae7b1ece6a436318d3fc598953630259884986 Mon Sep 17 00:00:00 2001
From: Ajit Khaparde <ajit.khaparde@broadcom.com>
Date: Tue, 24 Oct 2017 16:19:50 -0500
Subject: [PATCH] net/bnxt: fix a potential null pointer dereference
[ upstream commit faabf471da1dcde474ed84b7e311388962d86925 ]
Coverity issue: 158634
Fixes: daef48efe5e5 ("net/bnxt: support set MTU")
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
drivers/net/bnxt/bnxt_ring.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/net/bnxt/bnxt_ring.c b/drivers/net/bnxt/bnxt_ring.c
index 9d0ae27..583c825 100644
--- a/drivers/net/bnxt/bnxt_ring.c
+++ b/drivers/net/bnxt/bnxt_ring.c
@@ -323,8 +323,10 @@ int bnxt_alloc_hwrm_rings(struct bnxt *bp)
ring = rxr->ag_ring_struct;
/* Agg ring */
- if (ring == NULL)
+ if (ring == NULL) {
RTE_LOG(ERR, PMD, "Alloc AGG Ring is NULL!\n");
+ goto err_out;
+ }
rc = bnxt_hwrm_ring_alloc(bp, ring,
HWRM_RING_ALLOC_INPUT_RING_TYPE_RX,
--
2.7.4
^ permalink raw reply [flat|nested] 191+ messages in thread
* [dpdk-stable] patch 'net/bnxt: fix a pointer deref before null check' has been queued to stable release 17.08.1
2017-11-21 13:15 [dpdk-stable] patch 'gro: fix typo in map file' has been queued to stable release 17.08.1 Yuanhan Liu
` (159 preceding siblings ...)
2017-11-21 13:18 ` Yuanhan Liu
@ 2017-11-21 13:18 ` Yuanhan Liu
2017-11-21 13:18 ` [dpdk-stable] patch 'net/bnxt: fix an unused value' " Yuanhan Liu
` (28 subsequent siblings)
189 siblings, 0 replies; 191+ messages in thread
From: Yuanhan Liu @ 2017-11-21 13:18 UTC (permalink / raw)
To: Ajit Khaparde; +Cc: dpdk stable
Hi,
FYI, your patch has been queued to stable release 17.08.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/24/17. So please
shout if anyone has objections.
Thanks.
--yliu
---
>From ec951ccf3460de14a0c488921a4183f1b3dcc94b Mon Sep 17 00:00:00 2001
From: Ajit Khaparde <ajit.khaparde@broadcom.com>
Date: Tue, 24 Oct 2017 16:19:51 -0500
Subject: [PATCH] net/bnxt: fix a pointer deref before null check
[ upstream commit 60fff858ad2db8c607501b6dd8e3f190a3793913 ]
Coverity issue: 158634
Fixes: daef48efe5e5 ("net/bnxt: support set MTU")
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
drivers/net/bnxt/bnxt_rxr.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/bnxt/bnxt_rxr.c b/drivers/net/bnxt/bnxt_rxr.c
index 28105b0..eb32a63 100644
--- a/drivers/net/bnxt/bnxt_rxr.c
+++ b/drivers/net/bnxt/bnxt_rxr.c
@@ -388,11 +388,11 @@ static int bnxt_rx_pkt(struct rte_mbuf **rx_pkt,
cons = rxcmp->opaque;
mbuf = bnxt_consume_rx_buf(rxr, cons);
- rte_prefetch0(mbuf);
-
if (mbuf == NULL)
return -EBUSY;
+ rte_prefetch0(mbuf);
+
mbuf->nb_segs = 1;
mbuf->next = NULL;
mbuf->pkt_len = rxcmp->len;
--
2.7.4
^ permalink raw reply [flat|nested] 191+ messages in thread
* [dpdk-stable] patch 'net/bnxt: fix an unused value' has been queued to stable release 17.08.1
2017-11-21 13:15 [dpdk-stable] patch 'gro: fix typo in map file' has been queued to stable release 17.08.1 Yuanhan Liu
` (160 preceding siblings ...)
2017-11-21 13:18 ` [dpdk-stable] patch 'net/bnxt: fix a pointer deref before null check' " Yuanhan Liu
@ 2017-11-21 13:18 ` Yuanhan Liu
2017-11-21 13:18 ` [dpdk-stable] patch 'net/bnxt: check VLANs from pool map only for VMDq' " Yuanhan Liu
` (27 subsequent siblings)
189 siblings, 0 replies; 191+ messages in thread
From: Yuanhan Liu @ 2017-11-21 13:18 UTC (permalink / raw)
To: Ajit Khaparde; +Cc: dpdk stable
Hi,
FYI, your patch has been queued to stable release 17.08.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/24/17. So please
shout if anyone has objections.
Thanks.
--yliu
---
>From 1e32ff23905332390190920509f060ff95095b80 Mon Sep 17 00:00:00 2001
From: Ajit Khaparde <ajit.khaparde@broadcom.com>
Date: Tue, 24 Oct 2017 16:19:52 -0500
Subject: [PATCH] net/bnxt: fix an unused value
[ upstream commit 8159471a3ab27bb3439495fd87143d0bccbcb597 ]
return value stored in "rc" but it has been overwritten before use.
Coverity issue: 147216
Fixes: 7a5b0874440e ("net/bnxt: support to add a VF MAC address")
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
drivers/net/bnxt/rte_pmd_bnxt.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/bnxt/rte_pmd_bnxt.c b/drivers/net/bnxt/rte_pmd_bnxt.c
index ef4b19b..84ff019 100644
--- a/drivers/net/bnxt/rte_pmd_bnxt.c
+++ b/drivers/net/bnxt/rte_pmd_bnxt.c
@@ -709,7 +709,7 @@ int rte_pmd_bnxt_mac_addr_add(uint8_t port, struct ether_addr *addr,
/* If the VF currently uses a random MAC, update default to this one */
if (bp->pf.vf_info[vf_id].random_mac) {
if (rte_pmd_bnxt_get_vf_rx_status(port, vf_id) <= 0)
- rc = bnxt_hwrm_func_vf_mac(bp, vf_id, (uint8_t *)addr);
+ bnxt_hwrm_func_vf_mac(bp, vf_id, (uint8_t *)addr);
}
/* query the default VNIC id used by the function */
--
2.7.4
^ permalink raw reply [flat|nested] 191+ messages in thread
* [dpdk-stable] patch 'net/bnxt: check VLANs from pool map only for VMDq' has been queued to stable release 17.08.1
2017-11-21 13:15 [dpdk-stable] patch 'gro: fix typo in map file' has been queued to stable release 17.08.1 Yuanhan Liu
` (161 preceding siblings ...)
2017-11-21 13:18 ` [dpdk-stable] patch 'net/bnxt: fix an unused value' " Yuanhan Liu
@ 2017-11-21 13:18 ` Yuanhan Liu
2017-11-21 13:18 ` [dpdk-stable] patch 'net/bonding: fix check slaves link properties' " Yuanhan Liu
` (26 subsequent siblings)
189 siblings, 0 replies; 191+ messages in thread
From: Yuanhan Liu @ 2017-11-21 13:18 UTC (permalink / raw)
To: Ajit Khaparde; +Cc: dpdk stable
Hi,
FYI, your patch has been queued to stable release 17.08.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/24/17. So please
shout if anyone has objections.
Thanks.
--yliu
---
>From ad9f7d9ceadeefecb8dd64471fc3ff0e2387fa3e Mon Sep 17 00:00:00 2001
From: Ajit Khaparde <ajit.khaparde@broadcom.com>
Date: Tue, 24 Oct 2017 16:19:53 -0500
Subject: [PATCH] net/bnxt: check VLANs from pool map only for VMDq
[ upstream commit bb102e136816d85901fceeaf2aaf7138cb581e87 ]
Fixes: 75cd6fb1d901 ("net/bnxt: fix the association of a MACVLAN per VNIC")
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
drivers/net/bnxt/bnxt_hwrm.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/net/bnxt/bnxt_hwrm.c b/drivers/net/bnxt/bnxt_hwrm.c
index 896405c..27885c0 100644
--- a/drivers/net/bnxt/bnxt_hwrm.c
+++ b/drivers/net/bnxt/bnxt_hwrm.c
@@ -367,7 +367,8 @@ int bnxt_hwrm_set_filter(struct bnxt *bp,
uint16_t j = dst_id - 1;
//TODO: Is there a better way to add VLANs to each VNIC in case of VMDQ
- if (conf->pool_map[j].pools & (1UL << j)) {
+ if ((dev_conf->rxmode.mq_mode & ETH_MQ_RX_VMDQ_FLAG) &&
+ conf->pool_map[j].pools & (1UL << j)) {
RTE_LOG(DEBUG, PMD,
"Add vlan %u to vmdq pool %u\n",
conf->pool_map[j].vlan_id, j);
--
2.7.4
^ permalink raw reply [flat|nested] 191+ messages in thread
* [dpdk-stable] patch 'net/bonding: fix check slaves link properties' has been queued to stable release 17.08.1
2017-11-21 13:15 [dpdk-stable] patch 'gro: fix typo in map file' has been queued to stable release 17.08.1 Yuanhan Liu
` (162 preceding siblings ...)
2017-11-21 13:18 ` [dpdk-stable] patch 'net/bnxt: check VLANs from pool map only for VMDq' " Yuanhan Liu
@ 2017-11-21 13:18 ` Yuanhan Liu
2017-11-21 13:18 ` [dpdk-stable] patch 'eal/x86: fix atomic cmpset' " Yuanhan Liu
` (25 subsequent siblings)
189 siblings, 0 replies; 191+ messages in thread
From: Yuanhan Liu @ 2017-11-21 13:18 UTC (permalink / raw)
To: Tomasz Kulasek; +Cc: Ferruh Yigit, dpdk stable
Hi,
FYI, your patch has been queued to stable release 17.08.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/24/17. So please
shout if anyone has objections.
Thanks.
--yliu
---
>From 880edabf1d1ad1a1be33aac10aba2f0f97032647 Mon Sep 17 00:00:00 2001
From: Tomasz Kulasek <tomaszx.kulasek@intel.com>
Date: Fri, 20 Oct 2017 17:49:26 +0200
Subject: [PATCH] net/bonding: fix check slaves link properties
[ upstream commit 6abd94d72ab5b6787391a823d246e0288bd3ace0 ]
Result of slaves link properties validation is not used when new slave
is added.
This patch uses the value of link_properties_valid() to determinate if
slave can be used in the bonding. If function fails, error is returned
preventing to add slave with invalid link properties.
Coverity issue: 158661
Fixes: deba8a2f8b0b ("net/bonding: fix link properties management")
Signed-off-by: Tomasz Kulasek <tomaszx.kulasek@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
drivers/net/bonding/rte_eth_bond_api.c | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/drivers/net/bonding/rte_eth_bond_api.c b/drivers/net/bonding/rte_eth_bond_api.c
index de1d9e0..ecda494 100644
--- a/drivers/net/bonding/rte_eth_bond_api.c
+++ b/drivers/net/bonding/rte_eth_bond_api.c
@@ -302,8 +302,13 @@ __eth_bond_slave_add_lock_free(uint8_t bonded_port_id, uint8_t slave_port_id)
internals->tx_offload_capa &= dev_info.tx_offload_capa;
internals->flow_type_rss_offloads &= dev_info.flow_type_rss_offloads;
- link_properties_valid(bonded_eth_dev,
- &slave_eth_dev->data->dev_link);
+ if (link_properties_valid(bonded_eth_dev,
+ &slave_eth_dev->data->dev_link) != 0) {
+ RTE_BOND_LOG(ERR, "Invalid link properties for slave %d"
+ " in bonding mode %d", slave_port_id,
+ internals->mode);
+ return -1;
+ }
/* RETA size is GCD of all slaves RETA sizes, so, if all sizes will be
* the power of 2, the lower one is GCD
--
2.7.4
^ permalink raw reply [flat|nested] 191+ messages in thread
* [dpdk-stable] patch 'eal/x86: fix atomic cmpset' has been queued to stable release 17.08.1
2017-11-21 13:15 [dpdk-stable] patch 'gro: fix typo in map file' has been queued to stable release 17.08.1 Yuanhan Liu
` (163 preceding siblings ...)
2017-11-21 13:18 ` [dpdk-stable] patch 'net/bonding: fix check slaves link properties' " Yuanhan Liu
@ 2017-11-21 13:18 ` Yuanhan Liu
2017-11-21 13:18 ` [dpdk-stable] patch 'examples/multi_process: fix received message length' " Yuanhan Liu
` (24 subsequent siblings)
189 siblings, 0 replies; 191+ messages in thread
From: Yuanhan Liu @ 2017-11-21 13:18 UTC (permalink / raw)
To: Nikhil Rao; +Cc: Job Abraham, Bruce Richardson, dpdk stable
Hi,
FYI, your patch has been queued to stable release 17.08.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/24/17. So please
shout if anyone has objections.
Thanks.
--yliu
---
>From 9778ba324d3cee8f14bbc008a43b8df7dfee4392 Mon Sep 17 00:00:00 2001
From: Nikhil Rao <nikhil.rao@intel.com>
Date: Fri, 30 Sep 2016 02:54:53 +0530
Subject: [PATCH] eal/x86: fix atomic cmpset
[ upstream commit 9d1c2a6a912bebde1139157b950e39ffa7192c9d ]
The original code used movl instead of xchgl, this caused
rte_atomic64_cmpset to use ebx as the lower dword of the source
to cmpxchg8b instead of the lower dword of function argument "src".
Fixes: af75078fece3 ("first public release")
Reported-by: Job Abraham <job.abraham@intel.com>
Signed-off-by: Nikhil Rao <nikhil.rao@intel.com>
Tested-by: Job Abraham <job.abraham@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
---
lib/librte_eal/common/include/arch/x86/rte_atomic_32.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/librte_eal/common/include/arch/x86/rte_atomic_32.h b/lib/librte_eal/common/include/arch/x86/rte_atomic_32.h
index 2e04c75..fb3abf1 100644
--- a/lib/librte_eal/common/include/arch/x86/rte_atomic_32.h
+++ b/lib/librte_eal/common/include/arch/x86/rte_atomic_32.h
@@ -81,7 +81,7 @@ rte_atomic64_cmpset(volatile uint64_t *dst, uint64_t exp, uint64_t src)
: "memory" ); /* no-clobber list */
#else
asm volatile (
- "mov %%ebx, %%edi\n"
+ "xchgl %%ebx, %%edi;\n"
MPLOCKED
"cmpxchg8b (%[dst]);"
"setz %[res];"
--
2.7.4
^ permalink raw reply [flat|nested] 191+ messages in thread
* [dpdk-stable] patch 'examples/multi_process: fix received message length' has been queued to stable release 17.08.1
2017-11-21 13:15 [dpdk-stable] patch 'gro: fix typo in map file' has been queued to stable release 17.08.1 Yuanhan Liu
` (164 preceding siblings ...)
2017-11-21 13:18 ` [dpdk-stable] patch 'eal/x86: fix atomic cmpset' " Yuanhan Liu
@ 2017-11-21 13:18 ` Yuanhan Liu
2017-11-21 13:18 ` [dpdk-stable] patch 'lpm6: fix compilation with -Og' " Yuanhan Liu
` (23 subsequent siblings)
189 siblings, 0 replies; 191+ messages in thread
From: Yuanhan Liu @ 2017-11-21 13:18 UTC (permalink / raw)
To: Xueming Li; +Cc: dpdk stable
Hi,
FYI, your patch has been queued to stable release 17.08.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/24/17. So please
shout if anyone has objections.
Thanks.
--yliu
---
>From 69289ee30af469d5fd0d55d1d37cd41fea2621fe Mon Sep 17 00:00:00 2001
From: Xueming Li <xuemingl@mellanox.com>
Date: Thu, 26 Oct 2017 16:29:23 +0800
Subject: [PATCH] examples/multi_process: fix received message length
[ upstream commit 0acd8ed3330a629658e3864d78a6bd4b78de321e ]
Simple_mp example receives message size less than 64 chars while send
side accepts chars less than 128, this leads to different result when
sending text length larger than 64.
This patch uses same buffer length on both message pool and command
line.
Fixes: af75078fece3 ("first public release")
Signed-off-by: Xueming Li <xuemingl@mellanox.com>
---
examples/multi_process/simple_mp/main.c | 4 ++--
examples/multi_process/simple_mp/mp_commands.c | 2 +-
examples/multi_process/simple_mp/mp_commands.h | 1 -
3 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/examples/multi_process/simple_mp/main.c b/examples/multi_process/simple_mp/main.c
index 2843d94..53b87c5 100644
--- a/examples/multi_process/simple_mp/main.c
+++ b/examples/multi_process/simple_mp/main.c
@@ -67,6 +67,7 @@
#include <rte_mempool.h>
#include <cmdline_rdline.h>
#include <cmdline_parse.h>
+#include <cmdline_parse_string.h>
#include <cmdline_socket.h>
#include <cmdline.h>
#include "mp_commands.h"
@@ -76,7 +77,6 @@
static const char *_MSG_POOL = "MSG_POOL";
static const char *_SEC_2_PRI = "SEC_2_PRI";
static const char *_PRI_2_SEC = "PRI_2_SEC";
-const unsigned string_size = 64;
struct rte_ring *send_ring, *recv_ring;
struct rte_mempool *message_pool;
@@ -121,7 +121,7 @@ main(int argc, char **argv)
send_ring = rte_ring_create(_PRI_2_SEC, ring_size, rte_socket_id(), flags);
recv_ring = rte_ring_create(_SEC_2_PRI, ring_size, rte_socket_id(), flags);
message_pool = rte_mempool_create(_MSG_POOL, pool_size,
- string_size, pool_cache, priv_data_sz,
+ STR_TOKEN_SIZE, pool_cache, priv_data_sz,
NULL, NULL, NULL, NULL,
rte_socket_id(), flags);
} else {
diff --git a/examples/multi_process/simple_mp/mp_commands.c b/examples/multi_process/simple_mp/mp_commands.c
index 8da244b..cde3abd 100644
--- a/examples/multi_process/simple_mp/mp_commands.c
+++ b/examples/multi_process/simple_mp/mp_commands.c
@@ -78,7 +78,7 @@ static void cmd_send_parsed(void *parsed_result,
if (rte_mempool_get(message_pool, &msg) < 0)
rte_panic("Failed to get message buffer\n");
- snprintf((char *)msg, string_size, "%s", res->message);
+ snprintf((char *)msg, STR_TOKEN_SIZE, "%s", res->message);
if (rte_ring_enqueue(send_ring, msg) < 0) {
printf("Failed to send message - message discarded\n");
rte_mempool_put(message_pool, msg);
diff --git a/examples/multi_process/simple_mp/mp_commands.h b/examples/multi_process/simple_mp/mp_commands.h
index 7e9a4ab..452b364 100644
--- a/examples/multi_process/simple_mp/mp_commands.h
+++ b/examples/multi_process/simple_mp/mp_commands.h
@@ -34,7 +34,6 @@
#ifndef _SIMPLE_MP_COMMANDS_H_
#define _SIMPLE_MP_COMMANDS_H_
-extern const unsigned string_size;
extern struct rte_ring *send_ring;
extern struct rte_mempool *message_pool;
extern volatile int quit;
--
2.7.4
^ permalink raw reply [flat|nested] 191+ messages in thread
* [dpdk-stable] patch 'lpm6: fix compilation with -Og' has been queued to stable release 17.08.1
2017-11-21 13:15 [dpdk-stable] patch 'gro: fix typo in map file' has been queued to stable release 17.08.1 Yuanhan Liu
` (165 preceding siblings ...)
2017-11-21 13:18 ` [dpdk-stable] patch 'examples/multi_process: fix received message length' " Yuanhan Liu
@ 2017-11-21 13:18 ` Yuanhan Liu
2017-11-21 13:18 ` [dpdk-stable] patch 'net/failsafe: fix Rx clean race' " Yuanhan Liu
` (22 subsequent siblings)
189 siblings, 0 replies; 191+ messages in thread
From: Yuanhan Liu @ 2017-11-21 13:18 UTC (permalink / raw)
To: Olivier Matz; +Cc: Bruce Richardson, dpdk stable
Hi,
FYI, your patch has been queued to stable release 17.08.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/24/17. So please
shout if anyone has objections.
Thanks.
--yliu
---
>From 0ef25011c661e4089e8fc8cbc814e4c1d46f424e Mon Sep 17 00:00:00 2001
From: Olivier Matz <olivier.matz@6wind.com>
Date: Mon, 11 Sep 2017 17:13:31 +0200
Subject: [PATCH] lpm6: fix compilation with -Og
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
[ upstream commit 1f148d8eaf3baaf123fd8bf692947fe9437a5ab6 ]
The compilation with gcc-6.3.0 and EXTRA_CFLAGS=-Og gives the following
error:
CC rte_lpm6.o
rte_lpm6.c: In function ‘rte_lpm6_add_v1705’:
rte_lpm6.c:442:11: error: ‘tbl_next’ may be used uninitialized in
this function [-Werror=maybe-uninitialized]
if (!tbl[tbl_index].valid) {
^
rte_lpm6.c:521:29: note: ‘tbl_next’ was declared here
struct rte_lpm6_tbl_entry *tbl_next;
^~~~~~~~
This is a false positive from gcc. Fix it by initializing tbl_next
to NULL.
Fixes: 5c510e13a9cb ("lpm: add IPv6 support")
Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
---
lib/librte_lpm/rte_lpm6.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/librte_lpm/rte_lpm6.c b/lib/librte_lpm/rte_lpm6.c
index b4a7df3..f9496fe 100644
--- a/lib/librte_lpm/rte_lpm6.c
+++ b/lib/librte_lpm/rte_lpm6.c
@@ -518,7 +518,7 @@ rte_lpm6_add_v1705(struct rte_lpm6 *lpm, uint8_t *ip, uint8_t depth,
uint32_t next_hop)
{
struct rte_lpm6_tbl_entry *tbl;
- struct rte_lpm6_tbl_entry *tbl_next;
+ struct rte_lpm6_tbl_entry *tbl_next = NULL;
int32_t rule_index;
int status;
uint8_t masked_ip[RTE_LPM6_IPV6_ADDR_SIZE];
--
2.7.4
^ permalink raw reply [flat|nested] 191+ messages in thread
* [dpdk-stable] patch 'net/failsafe: fix Rx clean race' has been queued to stable release 17.08.1
2017-11-21 13:15 [dpdk-stable] patch 'gro: fix typo in map file' has been queued to stable release 17.08.1 Yuanhan Liu
` (166 preceding siblings ...)
2017-11-21 13:18 ` [dpdk-stable] patch 'lpm6: fix compilation with -Og' " Yuanhan Liu
@ 2017-11-21 13:18 ` Yuanhan Liu
2017-11-21 13:18 ` [dpdk-stable] patch 'net/bnxt: do not set hash type unnecessarily' " Yuanhan Liu
` (21 subsequent siblings)
189 siblings, 0 replies; 191+ messages in thread
From: Yuanhan Liu @ 2017-11-21 13:18 UTC (permalink / raw)
To: Matan Azrad; +Cc: Gaetan Rivet, dpdk stable
Hi,
FYI, your patch has been queued to stable release 17.08.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/24/17. So please
shout if anyone has objections.
Thanks.
--yliu
---
>From c4803dd1ad0aa2e1bea862f2f16659c03035cb75 Mon Sep 17 00:00:00 2001
From: Matan Azrad <matan@mellanox.com>
Date: Sun, 22 Oct 2017 05:51:08 +0000
Subject: [PATCH] net/failsafe: fix Rx clean race
[ upstream commit 295f7ed2dd452aba090080f380c2981b366aa2da ]
When removing a device, the fail-safe checks that it is not within its
datapath before cleaning it.
When checking whether an Rx burst should be performed on a device, the
remove flag is not checked. Thus the port could still enter its datapath
and miss a removal round. Furthermore, there is a race between the
thread removing the device and the polling thread.
Check the remove flag before entering a sub-device Rx burst when in safe
mode. This check mitigates the aforementioned race condition.
Fixes: 72a57bfd9a0e ("net/failsafe: add fast burst functions")
Signed-off-by: Matan Azrad <matan@mellanox.com>
Acked-by: Gaetan Rivet <gaetan.rivet@6wind.com>
---
drivers/net/failsafe/failsafe_rxtx.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/net/failsafe/failsafe_rxtx.c b/drivers/net/failsafe/failsafe_rxtx.c
index 7311421..70157c8 100644
--- a/drivers/net/failsafe/failsafe_rxtx.c
+++ b/drivers/net/failsafe/failsafe_rxtx.c
@@ -43,7 +43,8 @@ fs_rx_unsafe(struct sub_device *sdev)
{
return (ETH(sdev) == NULL) ||
(ETH(sdev)->rx_pkt_burst == NULL) ||
- (sdev->state != DEV_STARTED);
+ (sdev->state != DEV_STARTED) ||
+ (sdev->remove != 0);
}
static inline int
--
2.7.4
^ permalink raw reply [flat|nested] 191+ messages in thread
* [dpdk-stable] patch 'net/bnxt: do not set hash type unnecessarily' has been queued to stable release 17.08.1
2017-11-21 13:15 [dpdk-stable] patch 'gro: fix typo in map file' has been queued to stable release 17.08.1 Yuanhan Liu
` (167 preceding siblings ...)
2017-11-21 13:18 ` [dpdk-stable] patch 'net/failsafe: fix Rx clean race' " Yuanhan Liu
@ 2017-11-21 13:18 ` Yuanhan Liu
2017-11-21 13:18 ` [dpdk-stable] patch 'net/i40e: fix mirror with firmware 6.0' " Yuanhan Liu
` (20 subsequent siblings)
189 siblings, 0 replies; 191+ messages in thread
From: Yuanhan Liu @ 2017-11-21 13:18 UTC (permalink / raw)
To: Ajit Khaparde; +Cc: dpdk stable
Hi,
FYI, your patch has been queued to stable release 17.08.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/24/17. So please
shout if anyone has objections.
Thanks.
--yliu
---
>From d3320ab971a0959dc63ec44ad4cb5d2a5f595ce1 Mon Sep 17 00:00:00 2001
From: Ajit Khaparde <ajit.khaparde@broadcom.com>
Date: Thu, 26 Oct 2017 21:30:24 -0500
Subject: [PATCH] net/bnxt: do not set hash type unnecessarily
[ upstream commit 652380382175cd64841b578d2a3d449d8105511c ]
We are wrongly "OR-ing" the vnic->hash_type instead of assigning
the new hash type thereby wrongly configuring hash settings.
Fixing it.
Fixes: fcc0aa1edc10 ("net/bnxt: add RSS hash configuration")
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
drivers/net/bnxt/bnxt_rxq.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/bnxt/bnxt_rxq.c b/drivers/net/bnxt/bnxt_rxq.c
index 6715fbd..969b433 100644
--- a/drivers/net/bnxt/bnxt_rxq.c
+++ b/drivers/net/bnxt/bnxt_rxq.c
@@ -206,7 +206,7 @@ out:
for (i = 0; i < bp->nr_vnics; i++) {
STAILQ_FOREACH(vnic, &bp->ff_pool[i], next) {
- vnic->hash_type |= hash_type;
+ vnic->hash_type = hash_type;
/*
* Use the supplied key if the key length is
--
2.7.4
^ permalink raw reply [flat|nested] 191+ messages in thread
* [dpdk-stable] patch 'net/i40e: fix mirror with firmware 6.0' has been queued to stable release 17.08.1
2017-11-21 13:15 [dpdk-stable] patch 'gro: fix typo in map file' has been queued to stable release 17.08.1 Yuanhan Liu
` (168 preceding siblings ...)
2017-11-21 13:18 ` [dpdk-stable] patch 'net/bnxt: do not set hash type unnecessarily' " Yuanhan Liu
@ 2017-11-21 13:18 ` Yuanhan Liu
2017-11-21 13:18 ` [dpdk-stable] patch 'net/bnxt: fix VLAN spoof configuration' " Yuanhan Liu
` (19 subsequent siblings)
189 siblings, 0 replies; 191+ messages in thread
From: Yuanhan Liu @ 2017-11-21 13:18 UTC (permalink / raw)
To: Qi Zhang; +Cc: Beilei Xing, dpdk stable
Hi,
FYI, your patch has been queued to stable release 17.08.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/24/17. So please
shout if anyone has objections.
Thanks.
--yliu
---
>From 8025a68efad0da737d4a0d4d72512171b9996f4f Mon Sep 17 00:00:00 2001
From: Qi Zhang <qi.z.zhang@intel.com>
Date: Tue, 31 Oct 2017 10:26:42 -0400
Subject: [PATCH] net/i40e: fix mirror with firmware 6.0
[ upstream commit d8a4baafe8756ce95e12deac89599d74e53e27a1 ]
Value of I40E_GL_SWR_PRI_JOIN_MAP_0 need to be corrected or mirror
does not work on latest firmware 6.0.
Fixes: 77370db964f7 ("net/i40e: fix ethertype filter for new FW")
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Beilei Xing <beilei.xing@intel.com>
---
drivers/net/i40e/i40e_ethdev.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c
index 9f978f7..5f1c50c 100644
--- a/drivers/net/i40e/i40e_ethdev.c
+++ b/drivers/net/i40e/i40e_ethdev.c
@@ -9271,7 +9271,7 @@ i40e_pctype_to_flowtype(enum i40e_filter_pctype pctype)
/* For both X710 and XL710 */
#define I40E_GL_SWR_PRI_JOIN_MAP_0_VALUE_1 0x10000200
-#define I40E_GL_SWR_PRI_JOIN_MAP_0_VALUE_2 0x20000200
+#define I40E_GL_SWR_PRI_JOIN_MAP_0_VALUE_2 0x203F0200
#define I40E_GL_SWR_PRI_JOIN_MAP_0 0x26CE00
#define I40E_GL_SWR_PRI_JOIN_MAP_2_VALUE 0x011f0200
--
2.7.4
^ permalink raw reply [flat|nested] 191+ messages in thread
* [dpdk-stable] patch 'net/bnxt: fix VLAN spoof configuration' has been queued to stable release 17.08.1
2017-11-21 13:15 [dpdk-stable] patch 'gro: fix typo in map file' has been queued to stable release 17.08.1 Yuanhan Liu
` (169 preceding siblings ...)
2017-11-21 13:18 ` [dpdk-stable] patch 'net/i40e: fix mirror with firmware 6.0' " Yuanhan Liu
@ 2017-11-21 13:18 ` Yuanhan Liu
2017-11-21 13:18 ` [dpdk-stable] patch 'net/i40e: fix Rx packets number for NEON' " Yuanhan Liu
` (18 subsequent siblings)
189 siblings, 0 replies; 191+ messages in thread
From: Yuanhan Liu @ 2017-11-21 13:18 UTC (permalink / raw)
To: Ajit Khaparde; +Cc: dpdk stable
Hi,
FYI, your patch has been queued to stable release 17.08.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/24/17. So please
shout if anyone has objections.
Thanks.
--yliu
---
>From 82892e52a3979a4179a7c6a0cd72357dce2734f9 Mon Sep 17 00:00:00 2001
From: Ajit Khaparde <ajit.khaparde@broadcom.com>
Date: Tue, 31 Oct 2017 09:45:57 -0500
Subject: [PATCH] net/bnxt: fix VLAN spoof configuration
[ upstream commit 81f1d2395749e76c3de286b4333cd28728370083 ]
We are not programming the vlan_spoof setting currently owing to
an unnecessary check. This patch fixes that.
Fixes: 36735a932ca7 ("net/bnxt: support set VF QOS and MAC anti spoof")
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
drivers/net/bnxt/rte_pmd_bnxt.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/drivers/net/bnxt/rte_pmd_bnxt.c b/drivers/net/bnxt/rte_pmd_bnxt.c
index 84ff019..a2ac89d 100644
--- a/drivers/net/bnxt/rte_pmd_bnxt.c
+++ b/drivers/net/bnxt/rte_pmd_bnxt.c
@@ -322,9 +322,6 @@ int rte_pmd_bnxt_set_vf_vlan_anti_spoof(uint8_t port, uint16_t vf, uint8_t on)
if (vf >= dev_info.max_vfs)
return -EINVAL;
- if (on == bp->pf.vf_info[vf].vlan_spoof_en)
- return 0;
-
rc = bnxt_hwrm_func_cfg_vf_set_vlan_anti_spoof(bp, vf, on);
if (!rc) {
bp->pf.vf_info[vf].vlan_spoof_en = on;
--
2.7.4
^ permalink raw reply [flat|nested] 191+ messages in thread
* [dpdk-stable] patch 'net/i40e: fix Rx packets number for NEON' has been queued to stable release 17.08.1
2017-11-21 13:15 [dpdk-stable] patch 'gro: fix typo in map file' has been queued to stable release 17.08.1 Yuanhan Liu
` (170 preceding siblings ...)
2017-11-21 13:18 ` [dpdk-stable] patch 'net/bnxt: fix VLAN spoof configuration' " Yuanhan Liu
@ 2017-11-21 13:18 ` Yuanhan Liu
2017-11-21 13:18 ` [dpdk-stable] patch 'net/bonding: fix default aggregator mode to stable' " Yuanhan Liu
` (17 subsequent siblings)
189 siblings, 0 replies; 191+ messages in thread
From: Yuanhan Liu @ 2017-11-21 13:18 UTC (permalink / raw)
To: Jianbo Liu; +Cc: dpdk stable
Hi,
FYI, your patch has been queued to stable release 17.08.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/24/17. So please
shout if anyone has objections.
Thanks.
--yliu
---
>From d5029d5181f1d9a1e5b876feecd48fa7e04de704 Mon Sep 17 00:00:00 2001
From: Jianbo Liu <jianbo.liu@arm.com>
Date: Tue, 31 Oct 2017 13:52:44 +0800
Subject: [PATCH] net/i40e: fix Rx packets number for NEON
[ upstream commit 987990bbf8d95c72dfb952dd6060062d31247d9d ]
Fix i40e stop receiving on ARM, as the statuses of RX descriptors
are not consistent, which is caused by cacheable hugepages.
Fixes: ae0eb310f253 ("net/i40e: implement vector PMD for ARM")
Signed-off-by: Jianbo Liu <jianbo.liu@arm.com>
---
drivers/net/i40e/i40e_rxtx_vec_neon.c | 19 ++++++++++++-------
1 file changed, 12 insertions(+), 7 deletions(-)
diff --git a/drivers/net/i40e/i40e_rxtx_vec_neon.c b/drivers/net/i40e/i40e_rxtx_vec_neon.c
index 694e91f..9b26421 100644
--- a/drivers/net/i40e/i40e_rxtx_vec_neon.c
+++ b/drivers/net/i40e/i40e_rxtx_vec_neon.c
@@ -197,8 +197,7 @@ desc_to_olflags_v(struct i40e_rx_queue *rxq, uint64x2_t descs[4],
}
#define PKTLEN_SHIFT 10
-
-#define I40E_VPMD_DESC_DD_MASK 0x0001000100010001ULL
+#define I40E_UINT16_BIT (CHAR_BIT * sizeof(uint16_t))
static inline void
desc_to_ptype_v(uint64x2_t descs[4], struct rte_mbuf **rx_pkts,
@@ -230,7 +229,6 @@ _recv_raw_pkts_vec(struct i40e_rx_queue *rxq, struct rte_mbuf **rx_pkts,
struct i40e_rx_entry *sw_ring;
uint16_t nb_pkts_recd;
int pos;
- uint64_t var;
uint32_t *ptype_tbl = rxq->vsi->adapter->ptype_tbl;
/* mask to shuffle from desc. to mbuf */
@@ -364,7 +362,6 @@ _recv_raw_pkts_vec(struct i40e_rx_queue *rxq, struct rte_mbuf **rx_pkts,
/* C.2 get 4 pkts staterr value */
staterr = vzipq_u16(sterr_tmp1.val[1],
sterr_tmp2.val[1]).val[0];
- stat = vgetq_lane_u64(vreinterpretq_u64_u16(staterr), 0);
desc_to_olflags_v(rxq, descs, &rx_pkts[pos]);
@@ -429,6 +426,12 @@ _recv_raw_pkts_vec(struct i40e_rx_queue *rxq, struct rte_mbuf **rx_pkts,
rx_pkts[pos + 3]->next = NULL;
}
+ staterr = vshlq_n_u16(staterr, I40E_UINT16_BIT - 1);
+ staterr = vreinterpretq_u16_s16(
+ vshrq_n_s16(vreinterpretq_s16_u16(staterr),
+ I40E_UINT16_BIT - 1));
+ stat = ~vgetq_lane_u64(vreinterpretq_u64_u16(staterr), 0);
+
rte_prefetch_non_temporal(rxdp + RTE_I40E_DESCS_PER_LOOP);
/* D.3 copy final 1,2 data to rx_pkts */
@@ -438,10 +441,12 @@ _recv_raw_pkts_vec(struct i40e_rx_queue *rxq, struct rte_mbuf **rx_pkts,
pkt_mb1);
desc_to_ptype_v(descs, &rx_pkts[pos], ptype_tbl);
/* C.4 calc avaialbe number of desc */
- var = __builtin_popcountll(stat & I40E_VPMD_DESC_DD_MASK);
- nb_pkts_recd += var;
- if (likely(var != RTE_I40E_DESCS_PER_LOOP))
+ if (unlikely(stat == 0)) {
+ nb_pkts_recd += RTE_I40E_DESCS_PER_LOOP;
+ } else {
+ nb_pkts_recd += __builtin_ctzl(stat) / I40E_UINT16_BIT;
break;
+ }
}
/* Update our internal tail pointer */
--
2.7.4
^ permalink raw reply [flat|nested] 191+ messages in thread
* [dpdk-stable] patch 'net/bonding: fix default aggregator mode to stable' has been queued to stable release 17.08.1
2017-11-21 13:15 [dpdk-stable] patch 'gro: fix typo in map file' has been queued to stable release 17.08.1 Yuanhan Liu
` (171 preceding siblings ...)
2017-11-21 13:18 ` [dpdk-stable] patch 'net/i40e: fix Rx packets number for NEON' " Yuanhan Liu
@ 2017-11-21 13:18 ` Yuanhan Liu
2017-11-21 13:18 ` [dpdk-stable] patch 'net/dpaa2: set queues after reconfiguration' " Yuanhan Liu
` (16 subsequent siblings)
189 siblings, 0 replies; 191+ messages in thread
From: Yuanhan Liu @ 2017-11-21 13:18 UTC (permalink / raw)
To: Daniel Mrzyglod; +Cc: Michal Jastrzebski, dpdk stable
Hi,
FYI, your patch has been queued to stable release 17.08.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/24/17. So please
shout if anyone has objections.
Thanks.
--yliu
---
>From ddcd2dcf8017331df4b1f8d0dbfd69eae936a530 Mon Sep 17 00:00:00 2001
From: Daniel Mrzyglod <danielx.t.mrzyglod@intel.com>
Date: Fri, 20 Oct 2017 16:32:54 +0200
Subject: [PATCH] net/bonding: fix default aggregator mode to stable
[ upstream commit 7ff0ec78d0d864478d0e1994e13363079b97fec3 ]
This patch change default aggregator mode to stable
when using rte_eth_bond_create()
Fixes: 6d72657ce379 ("net/bonding: add other aggregator modes")
Signed-off-by: Daniel Mrzyglod <danielx.t.mrzyglod@intel.com>
Acked-by: Michal Jastrzebski <michalx.k.jastrzebski@intel.com>
---
drivers/net/bonding/rte_eth_bond_pmd.c | 21 ++++++++++++++++++++-
1 file changed, 20 insertions(+), 1 deletion(-)
diff --git a/drivers/net/bonding/rte_eth_bond_pmd.c b/drivers/net/bonding/rte_eth_bond_pmd.c
index d783320..90fa8ee 100644
--- a/drivers/net/bonding/rte_eth_bond_pmd.c
+++ b/drivers/net/bonding/rte_eth_bond_pmd.c
@@ -2838,6 +2838,7 @@ bond_probe(struct rte_vdev_device *dev)
struct rte_kvargs *kvlist;
uint8_t bonding_mode, socket_id/*, agg_mode*/;
int arg_count, port_id;
+ uint8_t agg_mode;
if (!dev)
return -EINVAL;
@@ -2895,6 +2896,25 @@ bond_probe(struct rte_vdev_device *dev)
internals = rte_eth_devices[port_id].data->dev_private;
internals->kvlist = kvlist;
+
+ if (rte_kvargs_count(kvlist, PMD_BOND_AGG_MODE_KVARG) == 1) {
+ if (rte_kvargs_process(kvlist,
+ PMD_BOND_AGG_MODE_KVARG,
+ &bond_ethdev_parse_slave_agg_mode_kvarg,
+ &agg_mode) != 0) {
+ RTE_LOG(ERR, EAL,
+ "Failed to parse agg selection mode for bonded device %s\n",
+ name);
+ goto parse_error;
+ }
+
+ if (internals->mode == BONDING_MODE_8023AD)
+ rte_eth_bond_8023ad_agg_selection_set(port_id,
+ agg_mode);
+ } else {
+ rte_eth_bond_8023ad_agg_selection_set(port_id, AGG_STABLE);
+ }
+
RTE_LOG(INFO, EAL, "Create bonded device %s on port %d in mode %u on "
"socket %u.\n", name, port_id, bonding_mode, socket_id);
return 0;
@@ -3061,7 +3081,6 @@ bond_ethdev_configure(struct rte_eth_dev *dev)
name);
}
if (internals->mode == BONDING_MODE_8023AD)
- if (agg_mode != 0)
rte_eth_bond_8023ad_agg_selection_set(port_id,
agg_mode);
}
--
2.7.4
^ permalink raw reply [flat|nested] 191+ messages in thread
* [dpdk-stable] patch 'net/dpaa2: set queues after reconfiguration' has been queued to stable release 17.08.1
2017-11-21 13:15 [dpdk-stable] patch 'gro: fix typo in map file' has been queued to stable release 17.08.1 Yuanhan Liu
` (172 preceding siblings ...)
2017-11-21 13:18 ` [dpdk-stable] patch 'net/bonding: fix default aggregator mode to stable' " Yuanhan Liu
@ 2017-11-21 13:18 ` Yuanhan Liu
2017-11-21 13:18 ` [dpdk-stable] patch 'net/enic: fix TSO for packets greater than 9208 bytes' " Yuanhan Liu
` (15 subsequent siblings)
189 siblings, 0 replies; 191+ messages in thread
From: Yuanhan Liu @ 2017-11-21 13:18 UTC (permalink / raw)
To: Akhil Goyal; +Cc: Hemant Agrawal, dpdk stable
Hi,
FYI, your patch has been queued to stable release 17.08.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/24/17. So please
shout if anyone has objections.
Thanks.
--yliu
---
>From 00b1d94fff31facd786cb71e7941133fbe2bd246 Mon Sep 17 00:00:00 2001
From: Akhil Goyal <akhil.goyal@nxp.com>
Date: Wed, 1 Nov 2017 13:46:41 +0530
Subject: [PATCH] net/dpaa2: set queues after reconfiguration
[ upstream commit f9989673654c1d177f2be6e6fc1778453a141b45 ]
if dpaa2_dev_tx_queue_setup is called multiple times, the
assignment of device->data->tx_queues is not done, as a result
tx_queues remain NULL after reconfiguration.
This patch sets the tx_queues from the device private data to the
usable device tx queues.
Fixes: 7ae777d064e8 ("net/dpaa2: add support for congestion notification")
Signed-off-by: Akhil Goyal <akhil.goyal@nxp.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
---
drivers/net/dpaa2/dpaa2_ethdev.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/net/dpaa2/dpaa2_ethdev.c b/drivers/net/dpaa2/dpaa2_ethdev.c
index 429b3a0..3709713 100644
--- a/drivers/net/dpaa2/dpaa2_ethdev.c
+++ b/drivers/net/dpaa2/dpaa2_ethdev.c
@@ -455,8 +455,10 @@ dpaa2_dev_tx_queue_setup(struct rte_eth_dev *dev,
PMD_INIT_FUNC_TRACE();
/* Return if queue already configured */
- if (dpaa2_q->flow_id != 0xffff)
+ if (dpaa2_q->flow_id != 0xffff) {
+ dev->data->tx_queues[tx_queue_id] = dpaa2_q;
return 0;
+ }
memset(&tx_conf_cfg, 0, sizeof(struct dpni_queue));
memset(&tx_flow_cfg, 0, sizeof(struct dpni_queue));
--
2.7.4
^ permalink raw reply [flat|nested] 191+ messages in thread
* [dpdk-stable] patch 'net/enic: fix TSO for packets greater than 9208 bytes' has been queued to stable release 17.08.1
2017-11-21 13:15 [dpdk-stable] patch 'gro: fix typo in map file' has been queued to stable release 17.08.1 Yuanhan Liu
` (173 preceding siblings ...)
2017-11-21 13:18 ` [dpdk-stable] patch 'net/dpaa2: set queues after reconfiguration' " Yuanhan Liu
@ 2017-11-21 13:18 ` Yuanhan Liu
2017-11-21 13:18 ` [dpdk-stable] patch 'net/vmxnet3: fix memory leak when releasing queues' " Yuanhan Liu
` (14 subsequent siblings)
189 siblings, 0 replies; 191+ messages in thread
From: Yuanhan Liu @ 2017-11-21 13:18 UTC (permalink / raw)
To: John Daley; +Cc: dpdk stable
Hi,
FYI, your patch has been queued to stable release 17.08.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/24/17. So please
shout if anyone has objections.
Thanks.
--yliu
---
>From 741a487b3c7c8acf29fb46e4b4019978fbb8615f Mon Sep 17 00:00:00 2001
From: John Daley <johndale@cisco.com>
Date: Wed, 1 Nov 2017 22:47:10 -0700
Subject: [PATCH] net/enic: fix TSO for packets greater than 9208 bytes
[ upstream commit cafba10bc16905b974063ae3b5feb5f3fbba991d ]
A check was previously added to drop Tx packets greater than what the Nic
is capable of sending since such packets can freeze the send queue. The
check did not account for TSO packets however, so TSO was limited to 9208
bytes.
Check packet length only for non-TSO packets. Also insure that TSO packet
segment size plus the headers do not exceed what the Nic is capable of
since this also can freeze the send queue.
Use the PKT_TX_TCP_SEG ol_flag instead of m->tso_segsz which is the
preferred way to check for TSO.
Fixes: ed6e564c214e ("net/enic: fix memory leak with oversized Tx packets")
Signed-off-by: John Daley <johndale@cisco.com>
---
drivers/net/enic/enic_rxtx.c | 25 +++++++++++++++++++------
1 file changed, 19 insertions(+), 6 deletions(-)
diff --git a/drivers/net/enic/enic_rxtx.c b/drivers/net/enic/enic_rxtx.c
index a39172f..76e023d 100644
--- a/drivers/net/enic/enic_rxtx.c
+++ b/drivers/net/enic/enic_rxtx.c
@@ -546,12 +546,15 @@ uint16_t enic_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts,
uint64_t bus_addr;
uint8_t offload_mode;
uint16_t header_len;
+ uint64_t tso;
+ rte_atomic64_t *tx_oversized;
enic_cleanup_wq(enic, wq);
wq_desc_avail = vnic_wq_desc_avail(wq);
head_idx = wq->head_idx;
desc_count = wq->ring.desc_count;
ol_flags_mask = PKT_TX_VLAN_PKT | PKT_TX_IP_CKSUM | PKT_TX_L4_MASK;
+ tx_oversized = &enic->soft_stats.tx_oversized;
nb_pkts = RTE_MIN(nb_pkts, ENIC_TX_XMIT_MAX);
@@ -561,10 +564,12 @@ uint16_t enic_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts,
data_len = tx_pkt->data_len;
ol_flags = tx_pkt->ol_flags;
nb_segs = tx_pkt->nb_segs;
+ tso = ol_flags & PKT_TX_TCP_SEG;
- if (pkt_len > ENIC_TX_MAX_PKT_SIZE) {
+ /* drop packet if it's too big to send */
+ if (unlikely(!tso && pkt_len > ENIC_TX_MAX_PKT_SIZE)) {
rte_pktmbuf_free(tx_pkt);
- rte_atomic64_inc(&enic->soft_stats.tx_oversized);
+ rte_atomic64_inc(tx_oversized);
continue;
}
@@ -587,13 +592,21 @@ uint16_t enic_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts,
offload_mode = WQ_ENET_OFFLOAD_MODE_CSUM;
header_len = 0;
- if (tx_pkt->tso_segsz) {
+ if (tso) {
header_len = tso_header_len(tx_pkt);
- if (header_len) {
- offload_mode = WQ_ENET_OFFLOAD_MODE_TSO;
- mss = tx_pkt->tso_segsz;
+
+ /* Drop if non-TCP packet or TSO seg size is too big */
+ if (unlikely(header_len == 0 || ((tx_pkt->tso_segsz +
+ header_len) > ENIC_TX_MAX_PKT_SIZE))) {
+ rte_pktmbuf_free(tx_pkt);
+ rte_atomic64_inc(tx_oversized);
+ continue;
}
+
+ offload_mode = WQ_ENET_OFFLOAD_MODE_TSO;
+ mss = tx_pkt->tso_segsz;
}
+
if ((ol_flags & ol_flags_mask) && (header_len == 0)) {
if (ol_flags & PKT_TX_IP_CKSUM)
mss |= ENIC_CALC_IP_CKSUM;
--
2.7.4
^ permalink raw reply [flat|nested] 191+ messages in thread
* [dpdk-stable] patch 'net/vmxnet3: fix memory leak when releasing queues' has been queued to stable release 17.08.1
2017-11-21 13:15 [dpdk-stable] patch 'gro: fix typo in map file' has been queued to stable release 17.08.1 Yuanhan Liu
` (174 preceding siblings ...)
2017-11-21 13:18 ` [dpdk-stable] patch 'net/enic: fix TSO for packets greater than 9208 bytes' " Yuanhan Liu
@ 2017-11-21 13:18 ` Yuanhan Liu
2017-11-21 13:18 ` [dpdk-stable] patch 'net/ixgbe: fix filter parser for L2 tunnel' " Yuanhan Liu
` (13 subsequent siblings)
189 siblings, 0 replies; 191+ messages in thread
From: Yuanhan Liu @ 2017-11-21 13:18 UTC (permalink / raw)
To: Chas Williams; +Cc: Luca Boccassi, dpdk stable
Hi,
FYI, your patch has been queued to stable release 17.08.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/24/17. So please
shout if anyone has objections.
Thanks.
--yliu
---
>From 996c4b6128cc106b714835e0d28103bef3ae5532 Mon Sep 17 00:00:00 2001
From: Chas Williams <chas3@att.com>
Date: Wed, 1 Nov 2017 16:38:20 -0400
Subject: [PATCH] net/vmxnet3: fix memory leak when releasing queues
[ upstream commit aad14460a066e400c1787126972a475b93a52012 ]
At the end of the queue release, we can free the containers for the
queue objects.
Fixes: dfaff37fc46d ("vmxnet3: import new vmxnet3 poll mode driver implementation")
Signed-off-by: Chas Williams <chas3@att.com>
Reviewed-by: Luca Boccassi <bluca@debian.org>
---
drivers/net/vmxnet3/vmxnet3_rxtx.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/drivers/net/vmxnet3/vmxnet3_rxtx.c b/drivers/net/vmxnet3/vmxnet3_rxtx.c
index 0c37de7..715edc2 100644
--- a/drivers/net/vmxnet3/vmxnet3_rxtx.c
+++ b/drivers/net/vmxnet3/vmxnet3_rxtx.c
@@ -203,6 +203,8 @@ vmxnet3_dev_tx_queue_release(void *txq)
vmxnet3_cmd_ring_release(&tq->cmd_ring);
/* Release the memzone */
rte_memzone_free(tq->mz);
+ /* Release the queue */
+ rte_free(tq);
}
}
@@ -223,6 +225,9 @@ vmxnet3_dev_rx_queue_release(void *rxq)
/* Release the memzone */
rte_memzone_free(rq->mz);
+
+ /* Release the queue */
+ rte_free(rq);
}
}
--
2.7.4
^ permalink raw reply [flat|nested] 191+ messages in thread
* [dpdk-stable] patch 'net/ixgbe: fix filter parser for L2 tunnel' has been queued to stable release 17.08.1
2017-11-21 13:15 [dpdk-stable] patch 'gro: fix typo in map file' has been queued to stable release 17.08.1 Yuanhan Liu
` (175 preceding siblings ...)
2017-11-21 13:18 ` [dpdk-stable] patch 'net/vmxnet3: fix memory leak when releasing queues' " Yuanhan Liu
@ 2017-11-21 13:18 ` Yuanhan Liu
2017-11-21 13:18 ` [dpdk-stable] patch 'net/i40e: fix VFIO interrupt mapping in VF' " Yuanhan Liu
` (12 subsequent siblings)
189 siblings, 0 replies; 191+ messages in thread
From: Yuanhan Liu @ 2017-11-21 13:18 UTC (permalink / raw)
To: Wei Zhao; +Cc: Yuan Peng, Wei Dai, dpdk stable
Hi,
FYI, your patch has been queued to stable release 17.08.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/24/17. So please
shout if anyone has objections.
Thanks.
--yliu
---
>From 8bf5b2c0dd8d615d757578afff81ec808cfa470e Mon Sep 17 00:00:00 2001
From: Wei Zhao <wei.zhao1@intel.com>
Date: Fri, 3 Nov 2017 15:38:38 +0800
Subject: [PATCH] net/ixgbe: fix filter parser for L2 tunnel
[ upstream commit 52960057f1d4958b541331ccba88c3241ebe9613 ]
The action for L2 tunnel should be VF or PF, not QUEUE.
Fixes: 99e7003831c ("net/ixgbe: parse L2 tunnel filter")
Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
Tested-by: Yuan Peng <yuan.peng@intel.com>
Acked-by: Wei Dai <wei.dai@intel.com>
---
drivers/net/ixgbe/ixgbe_flow.c | 29 ++++++++++++++++++++---------
1 file changed, 20 insertions(+), 9 deletions(-)
diff --git a/drivers/net/ixgbe/ixgbe_flow.c b/drivers/net/ixgbe/ixgbe_flow.c
index d679608..a63ae1b 100644
--- a/drivers/net/ixgbe/ixgbe_flow.c
+++ b/drivers/net/ixgbe/ixgbe_flow.c
@@ -1004,7 +1004,7 @@ ixgbe_parse_syn_filter(struct rte_eth_dev *dev,
* The first not void item can be E_TAG.
* The next not void item must be END.
* action:
- * The first not void action should be QUEUE.
+ * The first not void action should be VF or PF.
* The next not void action should be END.
* pattern example:
* ITEM Spec Mask
@@ -1015,7 +1015,8 @@ ixgbe_parse_syn_filter(struct rte_eth_dev *dev,
* item->last should be NULL.
*/
static int
-cons_parse_l2_tn_filter(const struct rte_flow_attr *attr,
+cons_parse_l2_tn_filter(struct rte_eth_dev *dev,
+ const struct rte_flow_attr *attr,
const struct rte_flow_item pattern[],
const struct rte_flow_action actions[],
struct rte_eth_l2_tunnel_conf *filter,
@@ -1025,7 +1026,8 @@ cons_parse_l2_tn_filter(const struct rte_flow_attr *attr,
const struct rte_flow_item_e_tag *e_tag_spec;
const struct rte_flow_item_e_tag *e_tag_mask;
const struct rte_flow_action *act;
- const struct rte_flow_action_queue *act_q;
+ const struct rte_flow_action_vf *act_vf;
+ struct rte_pci_device *pci_dev = RTE_ETH_DEV_TO_PCI(dev);
if (!pattern) {
rte_flow_error_set(error, EINVAL,
@@ -1133,9 +1135,10 @@ cons_parse_l2_tn_filter(const struct rte_flow_attr *attr,
return -rte_errno;
}
- /* check if the first not void action is QUEUE. */
+ /* check if the first not void action is VF or PF. */
act = next_no_void_action(actions, NULL);
- if (act->type != RTE_FLOW_ACTION_TYPE_QUEUE) {
+ if (act->type != RTE_FLOW_ACTION_TYPE_VF &&
+ act->type != RTE_FLOW_ACTION_TYPE_PF) {
memset(filter, 0, sizeof(struct rte_eth_l2_tunnel_conf));
rte_flow_error_set(error, EINVAL,
RTE_FLOW_ERROR_TYPE_ACTION,
@@ -1143,8 +1146,12 @@ cons_parse_l2_tn_filter(const struct rte_flow_attr *attr,
return -rte_errno;
}
- act_q = (const struct rte_flow_action_queue *)act->conf;
- filter->pool = act_q->index;
+ if (act->type == RTE_FLOW_ACTION_TYPE_VF) {
+ act_vf = (const struct rte_flow_action_vf *)act->conf;
+ filter->pool = act_vf->id;
+ } else {
+ filter->pool = pci_dev->max_vfs;
+ }
/* check if the next not void item is END */
act = next_no_void_action(actions, act);
@@ -1169,8 +1176,10 @@ ixgbe_parse_l2_tn_filter(struct rte_eth_dev *dev,
{
int ret = 0;
struct ixgbe_hw *hw = IXGBE_DEV_PRIVATE_TO_HW(dev->data->dev_private);
+ struct rte_pci_device *pci_dev = RTE_ETH_DEV_TO_PCI(dev);
+ uint16_t vf_num;
- ret = cons_parse_l2_tn_filter(attr, pattern,
+ ret = cons_parse_l2_tn_filter(dev, attr, pattern,
actions, l2_tn_filter, error);
if (hw->mac.type != ixgbe_mac_X550 &&
@@ -1183,7 +1192,9 @@ ixgbe_parse_l2_tn_filter(struct rte_eth_dev *dev,
return -rte_errno;
}
- if (l2_tn_filter->pool >= dev->data->nb_rx_queues)
+ vf_num = pci_dev->max_vfs;
+
+ if (l2_tn_filter->pool > vf_num)
return -rte_errno;
return ret;
--
2.7.4
^ permalink raw reply [flat|nested] 191+ messages in thread
* [dpdk-stable] patch 'net/i40e: fix VFIO interrupt mapping in VF' has been queued to stable release 17.08.1
2017-11-21 13:15 [dpdk-stable] patch 'gro: fix typo in map file' has been queued to stable release 17.08.1 Yuanhan Liu
` (176 preceding siblings ...)
2017-11-21 13:18 ` [dpdk-stable] patch 'net/ixgbe: fix filter parser for L2 tunnel' " Yuanhan Liu
@ 2017-11-21 13:18 ` Yuanhan Liu
2017-11-21 13:18 ` [dpdk-stable] patch 'net/failsafe: fix VLAN stripping configuration' " Yuanhan Liu
` (11 subsequent siblings)
189 siblings, 0 replies; 191+ messages in thread
From: Yuanhan Liu @ 2017-11-21 13:18 UTC (permalink / raw)
To: Wei Dai; +Cc: Lei Yao, Jingjing Wu, dpdk stable
Hi,
FYI, your patch has been queued to stable release 17.08.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/24/17. So please
shout if anyone has objections.
Thanks.
--yliu
---
>From 92b91537df0f4e70b44b7a02d01e8fdba0528a37 Mon Sep 17 00:00:00 2001
From: Wei Dai <wei.dai@intel.com>
Date: Fri, 3 Nov 2017 16:47:29 +0800
Subject: [PATCH] net/i40e: fix VFIO interrupt mapping in VF
[ upstream commit 66b8304f9d5f8be5dccd169a7ced4fb6c058b488 ]
When a VF port is bound to VFIO-PIC, only miscellaneous interrupt
is mapped to VFIO vector 0 in i40evf_dev_init( ).
In i40evf_dev_interrupt_handle( ) and i40evf_dev_rx_queue_intr_enable( ),
if previous VFIO interrupt mapping set in i40evf_dev_init( ) is not
cleared, it will fail when PMD tries to map Rx queue interrupt to other
VFIO vectors by calling rte_intr_enable( ).
This patch clears the VFIO interrupt mappings before setting both
miscellaneous and Rx queue interrupt mappings again to avoid failure.
And remove the calling of rte_intr_enable( ) in
i40evf_dev_interrupt_handler( ) as there is no need to map VFIO interrupt
in this function repeatedly.
Fixes: 4b90a3ff26c5 ("i40evf: support Rx interrupt")
Signed-off-by: Wei Dai <wei.dai@intel.com>
Tested-by: Lei Yao <lei.a.yao@intel.com>
Acked-by: Jingjing Wu <jingjing.wu@intel.com>
---
drivers/net/i40e/i40e_ethdev_vf.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/drivers/net/i40e/i40e_ethdev_vf.c b/drivers/net/i40e/i40e_ethdev_vf.c
index 616829a..06622bc 100644
--- a/drivers/net/i40e/i40e_ethdev_vf.c
+++ b/drivers/net/i40e/i40e_ethdev_vf.c
@@ -1565,7 +1565,6 @@ i40evf_dev_interrupt_handler(void *param)
done:
i40evf_enable_irq0(hw);
- rte_intr_enable(dev->intr_handle);
}
static int
@@ -2230,7 +2229,20 @@ i40evf_dev_start(struct rte_eth_dev *dev)
goto err_mac;
}
+ /* When a VF port is bound to VFIO-PCI, only miscellaneous interrupt
+ * is mapped to VFIO vector 0 in i40evf_dev_init( ).
+ * If previous VFIO interrupt mapping set in i40evf_dev_init( ) is
+ * not cleared, it will fail when rte_intr_enable( ) tries to map Rx
+ * queue interrupt to other VFIO vectors.
+ * So clear uio/vfio intr/evevnfd first to avoid failure.
+ */
+ if (dev->data->dev_conf.intr_conf.rxq != 0) {
+ rte_intr_disable(intr_handle);
+ rte_intr_enable(intr_handle);
+ }
+
i40evf_enable_queues_intr(dev);
+
return 0;
err_mac:
--
2.7.4
^ permalink raw reply [flat|nested] 191+ messages in thread
* [dpdk-stable] patch 'net/failsafe: fix VLAN stripping configuration' has been queued to stable release 17.08.1
2017-11-21 13:15 [dpdk-stable] patch 'gro: fix typo in map file' has been queued to stable release 17.08.1 Yuanhan Liu
` (177 preceding siblings ...)
2017-11-21 13:18 ` [dpdk-stable] patch 'net/i40e: fix VFIO interrupt mapping in VF' " Yuanhan Liu
@ 2017-11-21 13:18 ` Yuanhan Liu
2017-11-21 13:18 ` [dpdk-stable] patch 'examples/l3fwd: fix NEON instructions' " Yuanhan Liu
` (10 subsequent siblings)
189 siblings, 0 replies; 191+ messages in thread
From: Yuanhan Liu @ 2017-11-21 13:18 UTC (permalink / raw)
To: Ophir Munk; +Cc: Thomas Monjalon, dpdk stable
Hi,
FYI, your patch has been queued to stable release 17.08.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/24/17. So please
shout if anyone has objections.
Thanks.
--yliu
---
>From edb9348247221ad49dc087b83dcbf8b2e022b46b Mon Sep 17 00:00:00 2001
From: Ophir Munk <ophirmu@mellanox.com>
Date: Thu, 2 Nov 2017 17:27:03 +0000
Subject: [PATCH] net/failsafe: fix VLAN stripping configuration
[ upstream commit e28d4ee4f0d9aeb39ffc6e7b999b2dac30f4ab1a ]
failsafe device has vlan stripping configured at startup however once
a sub device is found as non-capable of vlan-stripping failsafe
updates it configuration and removes vlan stripping from it.
This update occurs only once at startup. Following a later plugin
attempt and in case of vlan stripping mismatch between failsafe
configuration and device capability - failsafe cannot recover and the
device remains constantly in plug out state.
The sequence of events leading to this situation is described as
follows:
1. Start testpmd with failsafe where mlx4 is a sub device (not capable
of vlan stripping). Expected printout:
PMD: net_failsafe: Disabling VLAN stripping offload
2. Execute:
testpmd> port stop all
testpmd> port config all max-pkt-len 2048
testpmd> port start all
3. Do a plug out (e.g. disable sriov)
4. Do a plug in (e.g. enable sriov)
5. Expected result: failsafe successfully configures and starts its sub
devices
Actual result: failsafe is continuously failing with these messages:
PMD: net_failsafe: VLAN stripping offload requested but not supported by
sub_device 0
PMD: net_failsafe: device already configured, cannot fix live
configuration
PMD: net_failsafe: Unable to synchronize sub device state
Root cause analysis: at startup failsafe removes vlan stripping from its
configuration. After executing "port config all max-pkt-len 2048"
testpmd marks failsafe in need for configuration update.
After executing "port start all" testpmd overrides failsafe
configuration with its own configuration which includes vlan stripping
During the plugin attempt failsafe refuses to update its configuration
by removing vlan stripping since it has already updated its
configuration at startup.
The fix is for failsafe to stop validation and disabling non-supported
offloads in its sub-devices.
Fixes: bbc6a53dda44 ("net/failsafe: support Rx offload capabilities")
Signed-off-by: Ophir Munk <ophirmu@mellanox.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
---
drivers/net/failsafe/failsafe_ops.c | 118 ------------------------------------
1 file changed, 118 deletions(-)
diff --git a/drivers/net/failsafe/failsafe_ops.c b/drivers/net/failsafe/failsafe_ops.c
index ff9ad15..6c34bf0 100644
--- a/drivers/net/failsafe/failsafe_ops.c
+++ b/drivers/net/failsafe/failsafe_ops.c
@@ -79,132 +79,14 @@ static struct rte_eth_dev_info default_infos = {
.flow_type_rss_offloads = 0x0,
};
-/**
- * Check whether a specific offloading capability
- * is supported by a sub_device.
- *
- * @return
- * 0: all requested capabilities are supported by the sub_device
- * positive value: This flag at least is not supported by the sub_device
- */
-static int
-fs_port_offload_validate(struct rte_eth_dev *dev,
- struct sub_device *sdev)
-{
- struct rte_eth_dev_info infos = {0};
- struct rte_eth_conf *cf;
- uint32_t cap;
-
- cf = &dev->data->dev_conf;
- SUBOPS(sdev, dev_infos_get)(ETH(sdev), &infos);
- /* RX capabilities */
- cap = infos.rx_offload_capa;
- if (cf->rxmode.hw_vlan_strip &&
- ((cap & DEV_RX_OFFLOAD_VLAN_STRIP) == 0)) {
- WARN("VLAN stripping offload requested but not supported by sub_device %d",
- SUB_ID(sdev));
- return DEV_RX_OFFLOAD_VLAN_STRIP;
- }
- if (cf->rxmode.hw_ip_checksum &&
- ((cap & (DEV_RX_OFFLOAD_IPV4_CKSUM |
- DEV_RX_OFFLOAD_UDP_CKSUM |
- DEV_RX_OFFLOAD_TCP_CKSUM)) !=
- (DEV_RX_OFFLOAD_IPV4_CKSUM |
- DEV_RX_OFFLOAD_UDP_CKSUM |
- DEV_RX_OFFLOAD_TCP_CKSUM))) {
- WARN("IP checksum offload requested but not supported by sub_device %d",
- SUB_ID(sdev));
- return DEV_RX_OFFLOAD_IPV4_CKSUM |
- DEV_RX_OFFLOAD_UDP_CKSUM |
- DEV_RX_OFFLOAD_TCP_CKSUM;
- }
- if (cf->rxmode.enable_lro &&
- ((cap & DEV_RX_OFFLOAD_TCP_LRO) == 0)) {
- WARN("TCP LRO offload requested but not supported by sub_device %d",
- SUB_ID(sdev));
- return DEV_RX_OFFLOAD_TCP_LRO;
- }
- if (cf->rxmode.hw_vlan_extend &&
- ((cap & DEV_RX_OFFLOAD_QINQ_STRIP) == 0)) {
- WARN("Stacked VLAN stripping offload requested but not supported by sub_device %d",
- SUB_ID(sdev));
- return DEV_RX_OFFLOAD_QINQ_STRIP;
- }
- /* TX capabilities */
- /* Nothing to do, no tx capa supported */
- return 0;
-}
-
-/*
- * Disable the dev_conf flag related to an offload capability flag
- * within an ethdev configuration.
- */
-static int
-fs_port_disable_offload(struct rte_eth_conf *cf,
- uint32_t ol_cap)
-{
- switch (ol_cap) {
- case DEV_RX_OFFLOAD_VLAN_STRIP:
- INFO("Disabling VLAN stripping offload");
- cf->rxmode.hw_vlan_strip = 0;
- break;
- case DEV_RX_OFFLOAD_IPV4_CKSUM:
- case DEV_RX_OFFLOAD_UDP_CKSUM:
- case DEV_RX_OFFLOAD_TCP_CKSUM:
- case (DEV_RX_OFFLOAD_IPV4_CKSUM |
- DEV_RX_OFFLOAD_UDP_CKSUM |
- DEV_RX_OFFLOAD_TCP_CKSUM):
- INFO("Disabling IP checksum offload");
- cf->rxmode.hw_ip_checksum = 0;
- break;
- case DEV_RX_OFFLOAD_TCP_LRO:
- INFO("Disabling TCP LRO offload");
- cf->rxmode.enable_lro = 0;
- break;
- case DEV_RX_OFFLOAD_QINQ_STRIP:
- INFO("Disabling stacked VLAN stripping offload");
- cf->rxmode.hw_vlan_extend = 0;
- break;
- default:
- DEBUG("Unable to disable offload capability: %" PRIx32,
- ol_cap);
- return -1;
- }
- return 0;
-}
-
static int
fs_dev_configure(struct rte_eth_dev *dev)
{
struct sub_device *sdev;
uint8_t i;
- int capa_flag;
int ret;
FOREACH_SUBDEV(sdev, i, dev) {
- if (sdev->state != DEV_PROBED)
- continue;
- DEBUG("Checking capabilities for sub_device %d", i);
- while ((capa_flag = fs_port_offload_validate(dev, sdev))) {
- /*
- * Refuse to change configuration if multiple devices
- * are present and we already have configured at least
- * some of them.
- */
- if (PRIV(dev)->state >= DEV_ACTIVE &&
- PRIV(dev)->subs_tail > 1) {
- ERROR("device already configured, cannot fix live configuration");
- return -1;
- }
- ret = fs_port_disable_offload(&dev->data->dev_conf,
- capa_flag);
- if (ret) {
- ERROR("Unable to disable offload capability");
- return ret;
- }
- }
- }
- FOREACH_SUBDEV(sdev, i, dev) {
int rmv_interrupt = 0;
int lsc_interrupt = 0;
int lsc_enabled;
--
2.7.4
^ permalink raw reply [flat|nested] 191+ messages in thread
* [dpdk-stable] patch 'examples/l3fwd: fix NEON instructions' has been queued to stable release 17.08.1
2017-11-21 13:15 [dpdk-stable] patch 'gro: fix typo in map file' has been queued to stable release 17.08.1 Yuanhan Liu
` (178 preceding siblings ...)
2017-11-21 13:18 ` [dpdk-stable] patch 'net/failsafe: fix VLAN stripping configuration' " Yuanhan Liu
@ 2017-11-21 13:18 ` Yuanhan Liu
2017-11-21 13:18 ` [dpdk-stable] patch 'examples/l3fwd: fix aliasing in port grouping' " Yuanhan Liu
` (9 subsequent siblings)
189 siblings, 0 replies; 191+ messages in thread
From: Yuanhan Liu @ 2017-11-21 13:18 UTC (permalink / raw)
To: Guduri Prathyusha; +Cc: Jianbo Liu, Jerin Jacob, dpdk stable
Hi,
FYI, your patch has been queued to stable release 17.08.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/24/17. So please
shout if anyone has objections.
Thanks.
--yliu
---
>From 70332c6240a284fc2f246421daff01a33fea4c91 Mon Sep 17 00:00:00 2001
From: Guduri Prathyusha <gprathyusha@caviumnetworks.com>
Date: Mon, 30 Oct 2017 13:01:26 +0530
Subject: [PATCH] examples/l3fwd: fix NEON instructions
[ upstream commit 3a4475e51d13ec3328b291061c38b7c5643a86ee ]
To group consecutive packets with same destination port in bursts of 4
neon intrinsic data types dp1 and dp2 are calculated such that if
dst_port[]={a,b,c,d,e,f,g,h,i...} dp1 should contain: <a,b,c,d> and
dp2 should contain: <b,c,d,e> in the first iteration. dp1 should
be <e,f,g,h> and dp2 should be <f,g,h,i> in the next iteration.
Whereas the existing code incorrectly calculates dp1 as <d,e,f,g> from
second iteration.
This patch fixes the incorrect ARM NEON instructions on dp1.
Fixes: 569b290cdb36 ("examples/l3fwd: add NEON implementation")
Signed-off-by: Guduri Prathyusha <gprathyusha@caviumnetworks.com>
Acked-by: Jianbo Liu <jianbo.liu@arm.com>
Acked-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
---
examples/l3fwd/l3fwd_neon.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/examples/l3fwd/l3fwd_neon.h b/examples/l3fwd/l3fwd_neon.h
index 42d50d3..4bc1613 100644
--- a/examples/l3fwd/l3fwd_neon.h
+++ b/examples/l3fwd/l3fwd_neon.h
@@ -192,7 +192,7 @@ send_packets_multi(struct lcore_conf *qconf, struct rte_mbuf **pkts_burst,
* dp1:
* <d[j], d[j+1], d[j+2], d[j+3], ... >
*/
- dp1 = vextq_u16(dp1, dp1, FWDSTEP - 1);
+ dp1 = vextq_u16(dp2, dp1, FWDSTEP - 1);
}
/*
--
2.7.4
^ permalink raw reply [flat|nested] 191+ messages in thread
* [dpdk-stable] patch 'examples/l3fwd: fix aliasing in port grouping' has been queued to stable release 17.08.1
2017-11-21 13:15 [dpdk-stable] patch 'gro: fix typo in map file' has been queued to stable release 17.08.1 Yuanhan Liu
` (179 preceding siblings ...)
2017-11-21 13:18 ` [dpdk-stable] patch 'examples/l3fwd: fix NEON instructions' " Yuanhan Liu
@ 2017-11-21 13:18 ` Yuanhan Liu
2017-11-21 13:18 ` [dpdk-stable] patch 'net/igb: fix Rx interrupt with VFIO and MSI-X' " Yuanhan Liu
` (8 subsequent siblings)
189 siblings, 0 replies; 191+ messages in thread
From: Yuanhan Liu @ 2017-11-21 13:18 UTC (permalink / raw)
To: Guduri Prathyusha; +Cc: Jerin Jacob, Jianbo Liu, dpdk stable
Hi,
FYI, your patch has been queued to stable release 17.08.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/24/17. So please
shout if anyone has objections.
Thanks.
--yliu
---
>From c592d2de222f21cbed30470654d855ee8bfeb115 Mon Sep 17 00:00:00 2001
From: Guduri Prathyusha <gprathyusha@caviumnetworks.com>
Date: Fri, 3 Nov 2017 16:13:51 +0530
Subject: [PATCH] examples/l3fwd: fix aliasing in port grouping
[ upstream commit 01ac23460c36927e019473e71b582223ad6b79c5 ]
With -f-strict-aliasing enabled by default from -O2, gcc > 5.x gives
undefined behavior in port_groupx4 in ARM. 'pn' and 'pnum' are
two different pointers pointing to same chunk of memory and
with -f-strict-aliasing the pointers are assumed to be pointing to
different memory and compiler reorders instructions that depend on
pnum and pn. This breaks port grouping algorithm.
This patch eliminates the above problem by introducing a compiler
barrier between the instructions that depend on pnum, pn and lp.
Fixes: 569b290cdb36 ("examples/l3fwd: add NEON implementation")
Signed-off-by: Guduri Prathyusha <gprathyusha@caviumnetworks.com>
Acked-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Acked-by: Jianbo Liu <jianbo.liu@arm.com>
---
examples/l3fwd/l3fwd_neon.h | 1 +
1 file changed, 1 insertion(+)
diff --git a/examples/l3fwd/l3fwd_neon.h b/examples/l3fwd/l3fwd_neon.h
index 4bc1613..b319b5a 100644
--- a/examples/l3fwd/l3fwd_neon.h
+++ b/examples/l3fwd/l3fwd_neon.h
@@ -114,6 +114,7 @@ port_groupx4(uint16_t pn[FWDSTEP + 1], uint16_t *lp, uint16x8_t dp1,
/* update last port counter. */
lp[0] += gptbl[v].lpv;
+ rte_compiler_barrier();
/* if dest port value has changed. */
if (v != GRPMSK) {
--
2.7.4
^ permalink raw reply [flat|nested] 191+ messages in thread
* [dpdk-stable] patch 'net/igb: fix Rx interrupt with VFIO and MSI-X' has been queued to stable release 17.08.1
2017-11-21 13:15 [dpdk-stable] patch 'gro: fix typo in map file' has been queued to stable release 17.08.1 Yuanhan Liu
` (180 preceding siblings ...)
2017-11-21 13:18 ` [dpdk-stable] patch 'examples/l3fwd: fix aliasing in port grouping' " Yuanhan Liu
@ 2017-11-21 13:18 ` Yuanhan Liu
2017-11-21 13:18 ` [dpdk-stable] patch 'net/kni: remove driver struct forward declaration' " Yuanhan Liu
` (7 subsequent siblings)
189 siblings, 0 replies; 191+ messages in thread
From: Yuanhan Liu @ 2017-11-21 13:18 UTC (permalink / raw)
To: Xiaoyun Li; +Cc: Wenzhuo Lu, dpdk stable
Hi,
FYI, your patch has been queued to stable release 17.08.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/24/17. So please
shout if anyone has objections.
Thanks.
--yliu
---
>From 0d14a24150ce07af0ba35d2caac8f6e307994050 Mon Sep 17 00:00:00 2001
From: Xiaoyun Li <xiaoyun.li@intel.com>
Date: Mon, 6 Nov 2017 10:41:40 +0800
Subject: [PATCH] net/igb: fix Rx interrupt with VFIO and MSI-X
[ upstream commit 88e04712f40fca9dd3ab98dd549e27791c320b75 ]
When using VFIO and MSIX interrupt mode, cannot get Rx interrupts. Because
when enabling the interrupt vectors, the offset is computed in a way which
only supports IGB_UIO. But the offset should be different when using VFIO.
This patch fixes this issue.
Fixes: c3cd3de0ab50 ("igb: enable Rx queue interrupts for PF")
Signed-off-by: Xiaoyun Li <xiaoyun.li@intel.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
---
drivers/net/e1000/igb_ethdev.c | 16 ++++++++++++++--
1 file changed, 14 insertions(+), 2 deletions(-)
diff --git a/drivers/net/e1000/igb_ethdev.c b/drivers/net/e1000/igb_ethdev.c
index 8078a1e..5f5dc18 100644
--- a/drivers/net/e1000/igb_ethdev.c
+++ b/drivers/net/e1000/igb_ethdev.c
@@ -5382,7 +5382,14 @@ eth_igb_rx_queue_intr_disable(struct rte_eth_dev *dev, uint16_t queue_id)
{
struct e1000_hw *hw =
E1000_DEV_PRIVATE_TO_HW(dev->data->dev_private);
- uint32_t mask = 1 << queue_id;
+ struct rte_pci_device *pci_dev = RTE_ETH_DEV_TO_PCI(dev);
+ struct rte_intr_handle *intr_handle = &pci_dev->intr_handle;
+ uint32_t vec = E1000_MISC_VEC_ID;
+
+ if (rte_intr_allow_others(intr_handle))
+ vec = E1000_RX_VEC_START;
+
+ uint32_t mask = 1 << (queue_id + vec);
E1000_WRITE_REG(hw, E1000_EIMC, mask);
E1000_WRITE_FLUSH(hw);
@@ -5397,7 +5404,12 @@ eth_igb_rx_queue_intr_enable(struct rte_eth_dev *dev, uint16_t queue_id)
E1000_DEV_PRIVATE_TO_HW(dev->data->dev_private);
struct rte_pci_device *pci_dev = RTE_ETH_DEV_TO_PCI(dev);
struct rte_intr_handle *intr_handle = &pci_dev->intr_handle;
- uint32_t mask = 1 << queue_id;
+ uint32_t vec = E1000_MISC_VEC_ID;
+
+ if (rte_intr_allow_others(intr_handle))
+ vec = E1000_RX_VEC_START;
+
+ uint32_t mask = 1 << (queue_id + vec);
uint32_t regval;
regval = E1000_READ_REG(hw, E1000_EIMS);
--
2.7.4
^ permalink raw reply [flat|nested] 191+ messages in thread
* [dpdk-stable] patch 'net/kni: remove driver struct forward declaration' has been queued to stable release 17.08.1
2017-11-21 13:15 [dpdk-stable] patch 'gro: fix typo in map file' has been queued to stable release 17.08.1 Yuanhan Liu
` (181 preceding siblings ...)
2017-11-21 13:18 ` [dpdk-stable] patch 'net/igb: fix Rx interrupt with VFIO and MSI-X' " Yuanhan Liu
@ 2017-11-21 13:18 ` Yuanhan Liu
2017-11-21 13:18 ` [dpdk-stable] patch 'net/pcap: fix memory leak in dumper open' " Yuanhan Liu
` (6 subsequent siblings)
189 siblings, 0 replies; 191+ messages in thread
From: Yuanhan Liu @ 2017-11-21 13:18 UTC (permalink / raw)
To: Rami Rosen; +Cc: Ferruh Yigit, dpdk stable
Hi,
FYI, your patch has been queued to stable release 17.08.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/24/17. So please
shout if anyone has objections.
Thanks.
--yliu
---
>From 29371433630742f6ee50a8717ac03563f316d1d5 Mon Sep 17 00:00:00 2001
From: Rami Rosen <rami.rosen@intel.com>
Date: Sat, 4 Nov 2017 14:03:49 +0200
Subject: [PATCH] net/kni: remove driver struct forward declaration
[ upstream commit cbc3661f8b496f73ec20b8f5354fa6c299eaa53f ]
This patch removes the forward declaration of eth_kni_drv
in rte_eth_kni.c; this forward declaration was made unnecessary
by commit 050fe6e9ff970ff92d842912136be8f9f52e171f
("drivers/net: use ethdev allocation helper for vdev"), which
removes the usage of eth_kni_drv in the eth_kni_create() method.
Fixes: 050fe6e9ff97 ("drivers/net: use ethdev allocation helper for vdev")
Signed-off-by: Rami Rosen <rami.rosen@intel.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
drivers/net/kni/rte_eth_kni.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/net/kni/rte_eth_kni.c b/drivers/net/kni/rte_eth_kni.c
index 72a2733..fbe067a 100644
--- a/drivers/net/kni/rte_eth_kni.c
+++ b/drivers/net/kni/rte_eth_kni.c
@@ -356,8 +356,6 @@ static const struct eth_dev_ops eth_kni_ops = {
.stats_reset = eth_kni_stats_reset,
};
-static struct rte_vdev_driver eth_kni_drv;
-
static struct rte_eth_dev *
eth_kni_create(struct rte_vdev_device *vdev,
struct eth_kni_args *args,
--
2.7.4
^ permalink raw reply [flat|nested] 191+ messages in thread
* [dpdk-stable] patch 'net/pcap: fix memory leak in dumper open' has been queued to stable release 17.08.1
2017-11-21 13:15 [dpdk-stable] patch 'gro: fix typo in map file' has been queued to stable release 17.08.1 Yuanhan Liu
` (182 preceding siblings ...)
2017-11-21 13:18 ` [dpdk-stable] patch 'net/kni: remove driver struct forward declaration' " Yuanhan Liu
@ 2017-11-21 13:18 ` Yuanhan Liu
2017-11-21 13:18 ` [dpdk-stable] patch 'app/testpmd: fix forwarding between non consecutive ports' " Yuanhan Liu
` (5 subsequent siblings)
189 siblings, 0 replies; 191+ messages in thread
From: Yuanhan Liu @ 2017-11-21 13:18 UTC (permalink / raw)
To: Stefan Baranoff; +Cc: Ferruh Yigit, dpdk stable
Hi,
FYI, your patch has been queued to stable release 17.08.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/24/17. So please
shout if anyone has objections.
Thanks.
--yliu
---
>From 3367368167c948ddd0f5ae016962b62c176d95a1 Mon Sep 17 00:00:00 2001
From: Stefan Baranoff <sbaranoff@gmail.com>
Date: Sun, 5 Nov 2017 12:24:45 -0500
Subject: [PATCH] net/pcap: fix memory leak in dumper open
[ upstream commit e59196e01c1456e8ea0e9b2056651ef64dc17b78 ]
In open_single_tx_pcap there is a call to pcap_open_dead which calls
malloc to create and return a pcap_t. That object is never freed in
this case. Other places it is freed by passing it back similar to the
way the pcap_dumper_t is in this case.
The pcap_t is only used to create the pcap_dumper_t and is never used
again so freeing it here is safe and much simpler than trying to pass
it back to be freed in eth_dev_stop along with the other
pcap_t/pcap_dumper_t objects.
Fixes: 4c173302c307 ("pcap: add new driver")
Signed-off-by: Stefan Baranoff <sbaranoff@gmail.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
drivers/net/pcap/rte_eth_pcap.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/net/pcap/rte_eth_pcap.c b/drivers/net/pcap/rte_eth_pcap.c
index defb3b4..d6d4f8e 100644
--- a/drivers/net/pcap/rte_eth_pcap.c
+++ b/drivers/net/pcap/rte_eth_pcap.c
@@ -411,11 +411,13 @@ open_single_tx_pcap(const char *pcap_filename, pcap_dumper_t **dumper)
/* The dumper is created using the previous pcap_t reference */
*dumper = pcap_dump_open(tx_pcap, pcap_filename);
if (*dumper == NULL) {
+ pcap_close(tx_pcap);
RTE_LOG(ERR, PMD, "Couldn't open %s for writing.\n",
pcap_filename);
return -1;
}
+ pcap_close(tx_pcap);
return 0;
}
--
2.7.4
^ permalink raw reply [flat|nested] 191+ messages in thread
* [dpdk-stable] patch 'app/testpmd: fix forwarding between non consecutive ports' has been queued to stable release 17.08.1
2017-11-21 13:15 [dpdk-stable] patch 'gro: fix typo in map file' has been queued to stable release 17.08.1 Yuanhan Liu
` (183 preceding siblings ...)
2017-11-21 13:18 ` [dpdk-stable] patch 'net/pcap: fix memory leak in dumper open' " Yuanhan Liu
@ 2017-11-21 13:18 ` Yuanhan Liu
2017-11-21 13:18 ` [dpdk-stable] patch 'app/testpmd: fix topology error message' " Yuanhan Liu
` (4 subsequent siblings)
189 siblings, 0 replies; 191+ messages in thread
From: Yuanhan Liu @ 2017-11-21 13:18 UTC (permalink / raw)
To: Ophir Munk; +Cc: Raslan Darawsheh, Pablo de Lara, dpdk stable
Hi,
FYI, your patch has been queued to stable release 17.08.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/24/17. So please
shout if anyone has objections.
Thanks.
--yliu
---
>From ef9e21d051e711c34e795e0f0d632c31a70630a4 Mon Sep 17 00:00:00 2001
From: Ophir Munk <ophirmu@mellanox.com>
Date: Tue, 7 Nov 2017 13:52:30 +0000
Subject: [PATCH] app/testpmd: fix forwarding between non consecutive ports
[ upstream commit fafee5e9caaf439b29a6e10600e91b8de81eff66 ]
When defining two failsafe devices in testpmd the port numbers of the
failsafe devices may not be consecutive.
For example: if failsafe device includes a PCI device and a TAP device
then failsafe port numbers would be 0 and 3.
Port 0 - failsafe #1 device
Port 1 - PCI #1 device
Port 2 - TAP #1 device
Port 3 - failsafe #2 device
Port 4 - PCI #2 device
Port 5 - TAP #2 device
If forwarding is defined between the failsafe devices including a peer
address the forwarding should be between peer addresses of ports 0
and 3. Instead testpmd establishes forwarding between peer addresses
of consecutive ports 0 and 1. This commit fixes this bug.
Fixes: af75078fece3 ("first public release")
Signed-off-by: Ophir Munk <ophirmu@mellanox.com>
Signed-off-by: Raslan Darawsheh <rasland@mellanox.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
---
app/test-pmd/config.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c
index ae4d793..af78d7a 100644
--- a/app/test-pmd/config.c
+++ b/app/test-pmd/config.c
@@ -1885,7 +1885,7 @@ simple_fwd_config_setup(void)
fwd_streams[i]->rx_queue = 0;
fwd_streams[i]->tx_port = fwd_ports_ids[j];
fwd_streams[i]->tx_queue = 0;
- fwd_streams[i]->peer_addr = j;
+ fwd_streams[i]->peer_addr = fwd_streams[i]->tx_port;
fwd_streams[i]->retry_enabled = retry_enabled;
if (port_topology == PORT_TOPOLOGY_PAIRED) {
@@ -1893,7 +1893,7 @@ simple_fwd_config_setup(void)
fwd_streams[j]->rx_queue = 0;
fwd_streams[j]->tx_port = fwd_ports_ids[i];
fwd_streams[j]->tx_queue = 0;
- fwd_streams[j]->peer_addr = i;
+ fwd_streams[j]->peer_addr = fwd_streams[j]->tx_port;
fwd_streams[j]->retry_enabled = retry_enabled;
}
}
--
2.7.4
^ permalink raw reply [flat|nested] 191+ messages in thread
* [dpdk-stable] patch 'app/testpmd: fix topology error message' has been queued to stable release 17.08.1
2017-11-21 13:15 [dpdk-stable] patch 'gro: fix typo in map file' has been queued to stable release 17.08.1 Yuanhan Liu
` (184 preceding siblings ...)
2017-11-21 13:18 ` [dpdk-stable] patch 'app/testpmd: fix forwarding between non consecutive ports' " Yuanhan Liu
@ 2017-11-21 13:18 ` Yuanhan Liu
2017-11-21 13:18 ` [dpdk-stable] patch 'net/mlx5: fix tunneled TCP/UDP packet type' " Yuanhan Liu
` (3 subsequent siblings)
189 siblings, 0 replies; 191+ messages in thread
From: Yuanhan Liu @ 2017-11-21 13:18 UTC (permalink / raw)
To: Pablo de Lara; +Cc: dpdk stable
Hi,
FYI, your patch has been queued to stable release 17.08.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/24/17. So please
shout if anyone has objections.
Thanks.
--yliu
---
>From c1fac88ae881fb72f114ec11c809b266cd7d8272 Mon Sep 17 00:00:00 2001
From: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Date: Tue, 7 Nov 2017 18:11:26 +0000
Subject: [PATCH] app/testpmd: fix topology error message
[ upstream commit 7535883327ad37b0631edd6ae1a3315400a6b95b ]
Fixes: 3e2006d6186c ("app/testpmd: add loopback topology")
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
---
app/test-pmd/parameters.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/app/test-pmd/parameters.c b/app/test-pmd/parameters.c
index 31023fe..1035f80 100644
--- a/app/test-pmd/parameters.c
+++ b/app/test-pmd/parameters.c
@@ -936,7 +936,7 @@ launch_args_parse(int argc, char** argv)
port_topology = PORT_TOPOLOGY_LOOP;
else
rte_exit(EXIT_FAILURE, "port-topology %s invalid -"
- " must be: paired or chained \n",
+ " must be: paired, chained or loop\n",
optarg);
}
if (!strcmp(lgopts[opt_idx].name, "forward-mode"))
--
2.7.4
^ permalink raw reply [flat|nested] 191+ messages in thread
* [dpdk-stable] patch 'net/mlx5: fix tunneled TCP/UDP packet type' has been queued to stable release 17.08.1
2017-11-21 13:15 [dpdk-stable] patch 'gro: fix typo in map file' has been queued to stable release 17.08.1 Yuanhan Liu
` (185 preceding siblings ...)
2017-11-21 13:18 ` [dpdk-stable] patch 'app/testpmd: fix topology error message' " Yuanhan Liu
@ 2017-11-21 13:18 ` Yuanhan Liu
2017-11-21 13:18 ` [dpdk-stable] patch 'net/qede: remove duplicate includes' " Yuanhan Liu
` (2 subsequent siblings)
189 siblings, 0 replies; 191+ messages in thread
From: Yuanhan Liu @ 2017-11-21 13:18 UTC (permalink / raw)
To: Yongseok Koh; +Cc: Xueming Li, Shahaf Shuler, dpdk stable
Hi,
FYI, your patch has been queued to stable release 17.08.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/24/17. So please
shout if anyone has objections.
Thanks.
--yliu
---
>From c34f2aa1820ceb30699ce4db56431e4e0888cdca Mon Sep 17 00:00:00 2001
From: Yongseok Koh <yskoh@mellanox.com>
Date: Tue, 7 Nov 2017 11:04:49 -0800
Subject: [PATCH] net/mlx5: fix tunneled TCP/UDP packet type
[ upstream commit 6c897093f2eb085af36d4de3a3464649e3b402eb ]
If tunneled bit is set in the HW descriptor, the l4_hdr_type bits
describe the inner packet.
Fixes: ea16068c0064 ("net/mlx5: fix L4 packet type support")
Reported-by: Xueming Li <xuemingl@mellanox.com>
Signed-off-by: Yongseok Koh <yskoh@mellanox.com>
Acked-by: Shahaf Shuler <shahafs@mellanox.com>
---
drivers/net/mlx5/mlx5_rxtx.c | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/drivers/net/mlx5/mlx5_rxtx.c b/drivers/net/mlx5/mlx5_rxtx.c
index 40c6a4f..96df92a 100644
--- a/drivers/net/mlx5/mlx5_rxtx.c
+++ b/drivers/net/mlx5/mlx5_rxtx.c
@@ -173,29 +173,29 @@ mlx5_set_ptype_table(void)
/* Tunneled - TCP */
(*p)[0x45] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV4_EXT_UNKNOWN |
RTE_PTYPE_INNER_L3_IPV6_EXT_UNKNOWN |
- RTE_PTYPE_L4_TCP;
+ RTE_PTYPE_INNER_L4_TCP;
(*p)[0x46] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV4_EXT_UNKNOWN |
RTE_PTYPE_INNER_L3_IPV4_EXT_UNKNOWN |
- RTE_PTYPE_L4_TCP;
+ RTE_PTYPE_INNER_L4_TCP;
(*p)[0xc5] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV6_EXT_UNKNOWN |
RTE_PTYPE_INNER_L3_IPV6_EXT_UNKNOWN |
- RTE_PTYPE_L4_TCP;
+ RTE_PTYPE_INNER_L4_TCP;
(*p)[0xc6] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV6_EXT_UNKNOWN |
RTE_PTYPE_INNER_L3_IPV4_EXT_UNKNOWN |
- RTE_PTYPE_L4_TCP;
+ RTE_PTYPE_INNER_L4_TCP;
/* Tunneled - UDP */
(*p)[0x49] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV4_EXT_UNKNOWN |
RTE_PTYPE_INNER_L3_IPV6_EXT_UNKNOWN |
- RTE_PTYPE_L4_UDP;
+ RTE_PTYPE_INNER_L4_UDP;
(*p)[0x4a] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV4_EXT_UNKNOWN |
RTE_PTYPE_INNER_L3_IPV4_EXT_UNKNOWN |
- RTE_PTYPE_L4_UDP;
+ RTE_PTYPE_INNER_L4_UDP;
(*p)[0xc9] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV6_EXT_UNKNOWN |
RTE_PTYPE_INNER_L3_IPV6_EXT_UNKNOWN |
- RTE_PTYPE_L4_UDP;
+ RTE_PTYPE_INNER_L4_UDP;
(*p)[0xca] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV6_EXT_UNKNOWN |
RTE_PTYPE_INNER_L3_IPV4_EXT_UNKNOWN |
- RTE_PTYPE_L4_UDP;
+ RTE_PTYPE_INNER_L4_UDP;
}
/**
--
2.7.4
^ permalink raw reply [flat|nested] 191+ messages in thread
* [dpdk-stable] patch 'net/qede: remove duplicate includes' has been queued to stable release 17.08.1
2017-11-21 13:15 [dpdk-stable] patch 'gro: fix typo in map file' has been queued to stable release 17.08.1 Yuanhan Liu
` (186 preceding siblings ...)
2017-11-21 13:18 ` [dpdk-stable] patch 'net/mlx5: fix tunneled TCP/UDP packet type' " Yuanhan Liu
@ 2017-11-21 13:18 ` Yuanhan Liu
2017-11-21 13:18 ` [dpdk-stable] patch 'net/qede/base: fix division by zero' " Yuanhan Liu
2017-11-21 13:18 ` [dpdk-stable] patch 'net/qede: fix icc build' " Yuanhan Liu
189 siblings, 0 replies; 191+ messages in thread
From: Yuanhan Liu @ 2017-11-21 13:18 UTC (permalink / raw)
To: Rasesh Mody; +Cc: dpdk stable
Hi,
FYI, your patch has been queued to stable release 17.08.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/24/17. So please
shout if anyone has objections.
Thanks.
--yliu
---
>From 0251c3342f6fee65dc7f836912a602199478d05c Mon Sep 17 00:00:00 2001
From: Rasesh Mody <rasesh.mody@cavium.com>
Date: Tue, 7 Nov 2017 00:34:21 -0800
Subject: [PATCH] net/qede: remove duplicate includes
[ upstream commit a96b86a12b532d10ad4ed04798ba994c619240ff ]
Fixes: ec94dbc57362 ("qede: add base driver")
Fixes: 2ea6f76aff40 ("qede: add core driver")
Fixes: 622075356e8f ("net/qede: support ntuple and flow director filter")
Fixes: 52d94b57e1c7 ("net/qede: add slowpath support for VXLAN tunneling")
Fixes: 8b3ee85efe11 ("net/qede: fix RSS table entries for 100G adapter")
Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
---
drivers/net/qede/base/ecore_dev.c | 1 -
drivers/net/qede/base/ecore_int.c | 1 -
drivers/net/qede/qede_ethdev.h | 4 ----
3 files changed, 6 deletions(-)
diff --git a/drivers/net/qede/base/ecore_dev.c b/drivers/net/qede/base/ecore_dev.c
index be55ba4..9ff1945 100644
--- a/drivers/net/qede/base/ecore_dev.c
+++ b/drivers/net/qede/base/ecore_dev.c
@@ -28,7 +28,6 @@
#include "mcp_public.h"
#include "ecore_iro.h"
#include "nvm_cfg.h"
-#include "ecore_dev_api.h"
#include "ecore_dcbx.h"
#include "ecore_l2.h"
diff --git a/drivers/net/qede/base/ecore_int.c b/drivers/net/qede/base/ecore_int.c
index b57c510..c55fb61 100644
--- a/drivers/net/qede/base/ecore_int.c
+++ b/drivers/net/qede/base/ecore_int.c
@@ -9,7 +9,6 @@
#include "bcm_osal.h"
#include "ecore.h"
#include "ecore_spq.h"
-#include "reg_addr.h"
#include "ecore_gtt_reg_addr.h"
#include "ecore_init_ops.h"
#include "ecore_rt_defs.h"
diff --git a/drivers/net/qede/qede_ethdev.h b/drivers/net/qede/qede_ethdev.h
index a3254b1..dde3548 100644
--- a/drivers/net/qede/qede_ethdev.h
+++ b/drivers/net/qede/qede_ethdev.h
@@ -29,15 +29,11 @@
#include "base/ecore_chain.h"
#include "base/ecore_status.h"
#include "base/ecore_hsi_eth.h"
-#include "base/ecore_dev_api.h"
#include "base/ecore_iov_api.h"
#include "base/ecore_cxt.h"
#include "base/nvm_cfg.h"
-#include "base/ecore_iov_api.h"
#include "base/ecore_sp_commands.h"
#include "base/ecore_l2.h"
-#include "base/ecore_dev_api.h"
-#include "base/ecore_l2.h"
#include "qede_logs.h"
#include "qede_if.h"
--
2.7.4
^ permalink raw reply [flat|nested] 191+ messages in thread
* [dpdk-stable] patch 'net/qede/base: fix division by zero' has been queued to stable release 17.08.1
2017-11-21 13:15 [dpdk-stable] patch 'gro: fix typo in map file' has been queued to stable release 17.08.1 Yuanhan Liu
` (187 preceding siblings ...)
2017-11-21 13:18 ` [dpdk-stable] patch 'net/qede: remove duplicate includes' " Yuanhan Liu
@ 2017-11-21 13:18 ` Yuanhan Liu
2017-11-21 13:18 ` [dpdk-stable] patch 'net/qede: fix icc build' " Yuanhan Liu
189 siblings, 0 replies; 191+ messages in thread
From: Yuanhan Liu @ 2017-11-21 13:18 UTC (permalink / raw)
To: Rasesh Mody; +Cc: dpdk stable
Hi,
FYI, your patch has been queued to stable release 17.08.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/24/17. So please
shout if anyone has objections.
Thanks.
--yliu
---
>From 1cfbc439b6d9bf1f4d220b0760371affe67d108d Mon Sep 17 00:00:00 2001
From: Rasesh Mody <rasesh.mody@cavium.com>
Date: Tue, 7 Nov 2017 00:34:24 -0800
Subject: [PATCH] net/qede/base: fix division by zero
[ upstream commit 5b5f9675d332f192388a9e89a779b0285139e0e2 ]
Fix division by zero in calculating the regpair elements per page
Remove unused API ecore_cxt_free_proto_ilt()
Coverity issue: 1379423, 1379428
Fixes: 22d07d939c3c ("net/qede/base: update")
Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
---
drivers/net/qede/base/ecore_cxt.c | 32 +-------------------------------
1 file changed, 1 insertion(+), 31 deletions(-)
diff --git a/drivers/net/qede/base/ecore_cxt.c b/drivers/net/qede/base/ecore_cxt.c
index 688118b..cec4aee 100644
--- a/drivers/net/qede/base/ecore_cxt.c
+++ b/drivers/net/qede/base/ecore_cxt.c
@@ -69,6 +69,7 @@ union type0_task_context {
/* TYPE-1 task context - ROCE */
union type1_task_context {
+ struct regpair reserved; /* @DPDK */
};
struct src_ent {
@@ -2220,34 +2221,3 @@ ecore_cxt_free_ilt_range(struct ecore_hwfn *p_hwfn,
return ECORE_SUCCESS;
}
-
-enum _ecore_status_t ecore_cxt_free_proto_ilt(struct ecore_hwfn *p_hwfn,
- enum protocol_type proto)
-{
- enum _ecore_status_t rc;
- u32 cid;
-
- /* Free Connection CXT */
- rc = ecore_cxt_free_ilt_range(p_hwfn, ECORE_ELEM_CXT,
- ecore_cxt_get_proto_cid_start(p_hwfn,
- proto),
- ecore_cxt_get_proto_cid_count(p_hwfn,
- proto,
- &cid));
-
- if (rc)
- return rc;
-
- /* Free Task CXT */
- rc = ecore_cxt_free_ilt_range(p_hwfn, ECORE_ELEM_TASK, 0,
- ecore_cxt_get_proto_tid_count(p_hwfn,
- proto));
- if (rc)
- return rc;
-
- /* Free TSDM CXT */
- rc = ecore_cxt_free_ilt_range(p_hwfn, ECORE_ELEM_SRQ, 0,
- ecore_cxt_get_srq_count(p_hwfn));
-
- return rc;
-}
--
2.7.4
^ permalink raw reply [flat|nested] 191+ messages in thread
* [dpdk-stable] patch 'net/qede: fix icc build' has been queued to stable release 17.08.1
2017-11-21 13:15 [dpdk-stable] patch 'gro: fix typo in map file' has been queued to stable release 17.08.1 Yuanhan Liu
` (188 preceding siblings ...)
2017-11-21 13:18 ` [dpdk-stable] patch 'net/qede/base: fix division by zero' " Yuanhan Liu
@ 2017-11-21 13:18 ` Yuanhan Liu
189 siblings, 0 replies; 191+ messages in thread
From: Yuanhan Liu @ 2017-11-21 13:18 UTC (permalink / raw)
To: Ferruh Yigit; +Cc: dpdk stable
Hi,
FYI, your patch has been queued to stable release 17.08.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/24/17. So please
shout if anyone has objections.
Thanks.
--yliu
---
>From 598f586393503526798d17aa220ab1de31febdba Mon Sep 17 00:00:00 2001
From: Ferruh Yigit <ferruh.yigit@intel.com>
Date: Tue, 7 Nov 2017 23:38:11 +0000
Subject: [PATCH] net/qede: fix icc build
[ upstream commit e8f8f595188b155a2a08009e895dd8654a93f015 ]
observed icc version "icc (ICC) 18.0.0 20170811"
build error:
.../dpdk/drivers/net/qede/qede_ethdev.c(1475):
error #279: controlling expression is constant
assert(false && "Unable to start periodic timer");
^
Warning disabled in Makefile.
Fixes: 2af14ca79c0a ("net/qede: support 100G")
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
drivers/net/qede/Makefile | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/net/qede/Makefile b/drivers/net/qede/Makefile
index f03441d..13ae946 100644
--- a/drivers/net/qede/Makefile
+++ b/drivers/net/qede/Makefile
@@ -69,8 +69,9 @@ CFLAGS_BASE_DRIVER += -Wno-sometimes-uninitialized
ifeq ($(shell clang -Wno-pointer-bool-conversion -Werror -E - < /dev/null > /dev/null 2>&1; echo $$?),0)
CFLAGS_BASE_DRIVER += -Wno-pointer-bool-conversion
endif
-else
-CFLAGS_BASE_DRIVER += -wd188 #188: enumerated type mixed with another type
+else #ICC
+CFLAGS_BASE_DRIVER += -wd188 #188: enumerated type mixed with another type
+CFLAGS_qede_ethdev.o += -wd279 #279: controlling expression is constant
endif
#
--
2.7.4
^ permalink raw reply [flat|nested] 191+ messages in thread
end of thread, other threads:[~2017-11-21 13:31 UTC | newest]
Thread overview: 191+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-11-21 13:15 [dpdk-stable] patch 'gro: fix typo in map file' has been queued to stable release 17.08.1 Yuanhan Liu
2017-11-21 13:15 ` [dpdk-stable] patch 'service: fix build with gcc 4.9' " Yuanhan Liu
2017-11-21 13:15 ` [dpdk-stable] patch 'eal: initialize logging before bus' " Yuanhan Liu
2017-11-21 13:15 ` [dpdk-stable] patch 'ethdev: fix ABI version' " Yuanhan Liu
2017-11-21 13:15 ` [dpdk-stable] patch 'net: fix inner L2 length in packet type parser' " Yuanhan Liu
2017-11-21 13:15 ` [dpdk-stable] patch 'vfio: fix close unchecked file descriptor' " Yuanhan Liu
2017-11-21 13:15 ` [dpdk-stable] patch 'eal: fix auxv open check for ARM and PPC' " Yuanhan Liu
2017-11-21 13:15 ` [dpdk-stable] patch 'net/ixgbe: fix MAC VLAN filter fail problem' " Yuanhan Liu
2017-11-21 13:15 ` [dpdk-stable] patch 'net/i40e: fix flow control watermark mismatch' " Yuanhan Liu
2017-11-21 13:15 ` [dpdk-stable] patch 'net/nfp: fix RSS' " Yuanhan Liu
2017-11-21 13:15 ` [dpdk-stable] patch 'net/nfp: fix Rx interrupt when multiqueue' " Yuanhan Liu
2017-11-21 13:15 ` [dpdk-stable] patch 'net/i40e: fix PF notify issue when VF is not up' " Yuanhan Liu
2017-11-21 13:15 ` [dpdk-stable] patch 'net/failsafe: fix Tx sub device deactivating' " Yuanhan Liu
2017-11-21 13:15 ` [dpdk-stable] patch 'net/ixgbe: fix mapping of user priority to TC' " Yuanhan Liu
2017-11-21 13:15 ` [dpdk-stable] patch 'net/mlx5: fix locking in xstats functions' " Yuanhan Liu
2017-11-21 13:15 ` [dpdk-stable] patch 'net/enic: fix possible null pointer dereference' " Yuanhan Liu
2017-11-21 13:15 ` [dpdk-stable] patch 'net/qede: " Yuanhan Liu
2017-11-21 13:16 ` [dpdk-stable] patch 'net/failsafe: fix parameters parsing' " Yuanhan Liu
2017-11-21 13:16 ` [dpdk-stable] patch 'net/i40e: fix interrupt throttling setting in PF' " Yuanhan Liu
2017-11-21 13:16 ` [dpdk-stable] patch 'net/failsafe: fix failsafe bus uninit return value' " Yuanhan Liu
2017-11-21 13:16 ` [dpdk-stable] patch 'net/sfc: specify correct scale table size on Rx start' " Yuanhan Liu
2017-11-21 13:16 ` [dpdk-stable] patch 'net/i40e: fix VF device stop issue' " Yuanhan Liu
2017-11-21 13:16 ` [dpdk-stable] patch 'net/mlx5: fix clang build' " Yuanhan Liu
2017-11-21 13:16 ` [dpdk-stable] patch 'net/mlx5: fix probe failure report' " Yuanhan Liu
2017-11-21 13:16 ` [dpdk-stable] patch 'net/failsafe: fix errno set on command execution' " Yuanhan Liu
2017-11-21 13:16 ` [dpdk-stable] patch 'net/sfc: fix unused variable in RSS-agnostic build' " Yuanhan Liu
2017-11-21 13:16 ` [dpdk-stable] patch 'net/sfc/base: fix default RSS context check on Siena' " Yuanhan Liu
2017-11-21 13:16 ` [dpdk-stable] patch 'net/failsafe: fix adding MAC error report miss' " Yuanhan Liu
2017-11-21 13:16 ` [dpdk-stable] patch 'net/mlx5: fix tunnel offload detection' " Yuanhan Liu
2017-11-21 13:16 ` [dpdk-stable] patch 'net/cxgbe: fix memory leak' " Yuanhan Liu
2017-11-21 13:16 ` [dpdk-stable] patch 'net/ixgbe: fix adding a mirror rule' " Yuanhan Liu
2017-11-21 13:16 ` [dpdk-stable] patch 'net/vmxnet3: fix MAC address set' " Yuanhan Liu
2017-11-21 13:16 ` [dpdk-stable] patch 'net/i40e: fix memory leak if VF init fails' " Yuanhan Liu
2017-11-21 13:16 ` [dpdk-stable] patch 'net/i40e: fix i40evf MAC filter table' " Yuanhan Liu
2017-11-21 13:16 ` [dpdk-stable] patch 'net/mlx5: fix calculating TSO inline size' " Yuanhan Liu
2017-11-21 13:16 ` [dpdk-stable] patch 'net/mlx5: fix num seg assumption in SSE Tx' " Yuanhan Liu
2017-11-21 13:16 ` [dpdk-stable] patch 'net/mlx5: fix Tx stats error counter definition' " Yuanhan Liu
2017-11-21 13:16 ` [dpdk-stable] patch 'net/mlx5: fix Tx stats error counter logic' " Yuanhan Liu
2017-11-21 13:16 ` [dpdk-stable] patch 'net/i40e: fix packet count for PF' " Yuanhan Liu
2017-11-21 13:16 ` [dpdk-stable] patch 'net/bonding: fix slaves capacity check' " Yuanhan Liu
2017-11-21 13:16 ` [dpdk-stable] patch 'test: fix assignment operation' " Yuanhan Liu
2017-11-21 13:16 ` [dpdk-stable] patch 'net/tap: fix flow and port commands' " Yuanhan Liu
2017-11-21 13:16 ` [dpdk-stable] patch 'net/mlx5: fix TSO segment size verification' " Yuanhan Liu
2017-11-21 13:16 ` [dpdk-stable] patch 'net/liquidio: fix uninitialized variable' " Yuanhan Liu
2017-11-21 13:16 ` [dpdk-stable] patch 'net/igb: fix memcpy length' " Yuanhan Liu
2017-11-21 13:16 ` [dpdk-stable] patch 'net/i40e: fix variable assignment' " Yuanhan Liu
2017-11-21 13:16 ` [dpdk-stable] patch 'net/qede/base: fix to use a passed ptt handle' " Yuanhan Liu
2017-11-21 13:16 ` [dpdk-stable] patch 'net/tap: fix unregistering callback with invalid fd' " Yuanhan Liu
2017-11-21 13:16 ` [dpdk-stable] patch 'net/vmxnet3: fix unintentional integer overflow' " Yuanhan Liu
2017-11-21 13:16 ` [dpdk-stable] patch 'net/enic: fix multi-process operation' " Yuanhan Liu
2017-11-21 13:16 ` [dpdk-stable] patch 'net/i40e: fix clear xstats bug in VF' " Yuanhan Liu
2017-11-21 13:16 ` [dpdk-stable] patch 'app/testpmd: fix packet throughput after stats reset' " Yuanhan Liu
2017-11-21 13:16 ` [dpdk-stable] patch 'net/i40e: fix assignment of enum values' " Yuanhan Liu
2017-11-21 13:16 ` [dpdk-stable] patch 'net/i40e: fix mirror rule reset when port is closed' " Yuanhan Liu
2017-11-21 13:16 ` [dpdk-stable] patch 'net/bnxt: fix HWRM macros and locking' " Yuanhan Liu
2017-11-21 13:16 ` [dpdk-stable] patch 'net/bnxt: use 64-bits of address for VLAN table' " Yuanhan Liu
2017-11-21 13:16 ` [dpdk-stable] patch 'net/bnxt: fix an issue with group id calculation' " Yuanhan Liu
2017-11-21 13:16 ` [dpdk-stable] patch 'net/bnxt: fix calculation of number of pools' " Yuanhan Liu
2017-11-21 13:16 ` [dpdk-stable] patch 'net/bnxt: handle multi queue mode properly' " Yuanhan Liu
2017-11-21 13:16 ` [dpdk-stable] patch 'net/bnxt: fix Rx handling and buffer allocation logic' " Yuanhan Liu
2017-11-21 13:16 ` [dpdk-stable] patch 'net/bnxt: fix an issue with broadcast traffic' " Yuanhan Liu
2017-11-21 13:16 ` [dpdk-stable] patch 'net/bnxt: fix usage of VMDq flags' " Yuanhan Liu
2017-11-21 13:16 ` [dpdk-stable] patch 'net/bnxt: set checksum offload flags correctly' " Yuanhan Liu
2017-11-21 13:16 ` [dpdk-stable] patch 'net/bnxt: update status of Rx IP/L4 CKSUM' " Yuanhan Liu
2017-11-21 13:16 ` [dpdk-stable] patch 'net/bnxt: fix config RSS update' " Yuanhan Liu
2017-11-21 13:16 ` [dpdk-stable] patch 'net/bnxt: set the hash key size' " Yuanhan Liu
2017-11-21 13:16 ` [dpdk-stable] patch 'net/bnxt: fix per queue stats display in xstats' " Yuanhan Liu
2017-11-21 13:16 ` [dpdk-stable] patch 'net/bnxt: fix interrupt handler' " Yuanhan Liu
2017-11-21 13:16 ` [dpdk-stable] patch 'net/vmxnet3: fix dereference before null check' " Yuanhan Liu
2017-11-21 13:16 ` [dpdk-stable] patch 'net/bonding: support bifurcated driver in eal' " Yuanhan Liu
2017-11-21 13:16 ` [dpdk-stable] patch 'net/bnxt: fix number of MAC addresses for VMDq' " Yuanhan Liu
2017-11-21 13:16 ` [dpdk-stable] patch 'net/mlx5: fix overflow of Rx SW ring' " Yuanhan Liu
2017-11-21 13:16 ` [dpdk-stable] patch 'net/bnxt: fix compilation with -Og' " Yuanhan Liu
2017-11-21 13:16 ` [dpdk-stable] patch 'net/qede: " Yuanhan Liu
2017-11-21 13:16 ` [dpdk-stable] patch 'app/test-crypto-perf: fix memory leak' " Yuanhan Liu
2017-11-21 13:16 ` [dpdk-stable] patch 'app/test-crypto-perf: fix compilation with -Og' " Yuanhan Liu
2017-11-21 13:16 ` [dpdk-stable] patch 'net/dpaa2: fix the Tx handling of non HW pool bufs' " Yuanhan Liu
2017-11-21 13:17 ` [dpdk-stable] patch 'kni: fix SLE version detection' " Yuanhan Liu
2017-11-21 13:17 ` [dpdk-stable] patch 'hash: fix eviction counter' " Yuanhan Liu
2017-11-21 13:17 ` [dpdk-stable] patch 'mem: fix malloc debug config' " Yuanhan Liu
2017-11-21 13:17 ` [dpdk-stable] patch 'mem: fix malloc element free in debug mode' " Yuanhan Liu
2017-11-21 13:17 ` [dpdk-stable] patch 'eal: copy raw strings taken from command line' " Yuanhan Liu
2017-11-21 13:17 ` [dpdk-stable] patch 'net/virtio: revert not claiming LRO support' " Yuanhan Liu
2017-11-21 13:17 ` [dpdk-stable] patch 'net/virtio: revert not claiming IP checksum offload' " Yuanhan Liu
2017-11-21 13:17 ` [dpdk-stable] patch 'net/virtio: fix log levels in configure' " Yuanhan Liu
2017-11-21 13:17 ` [dpdk-stable] patch 'net/virtio: fix mbuf port for simple Rx function' " Yuanhan Liu
2017-11-21 13:17 ` [dpdk-stable] patch 'net/virtio: fix queue setup consistency' " Yuanhan Liu
2017-11-21 13:17 ` [dpdk-stable] patch 'net/virtio: fix untrusted scalar value' " Yuanhan Liu
2017-11-21 13:17 ` [dpdk-stable] patch 'vhost: fix dereferencing invalid pointer after realloc' " Yuanhan Liu
2017-11-21 13:17 ` [dpdk-stable] patch 'net/virtio-user: fix TAP name string termination' " Yuanhan Liu
2017-11-21 13:17 ` [dpdk-stable] patch 'vhost: check poll error code' " Yuanhan Liu
2017-11-21 13:17 ` [dpdk-stable] patch 'timer: use 64-bit specific code on more platforms' " Yuanhan Liu
2017-11-21 13:17 ` [dpdk-stable] patch 'net/virtio: fix compilation with -Og' " Yuanhan Liu
2017-11-21 13:17 ` [dpdk-stable] patch 'net/ark: fix loop counter' " Yuanhan Liu
2017-11-21 13:17 ` [dpdk-stable] patch 'net/qede/base: fix return code to align with FW' " Yuanhan Liu
2017-11-21 13:17 ` [dpdk-stable] patch 'app/testpmd: fix DDP package filesize detection' " Yuanhan Liu
2017-11-21 13:17 ` [dpdk-stable] patch 'app/testpmd: fix invalid port id parameters' " Yuanhan Liu
2017-11-21 13:17 ` [dpdk-stable] patch 'app/testpmd: fix forward port ids setting' " Yuanhan Liu
2017-11-21 13:17 ` [dpdk-stable] patch 'app/testpmd: fix quitting in container' " Yuanhan Liu
2017-11-21 13:17 ` [dpdk-stable] patch 'net/mlx5: fix SSE Rx support verification' " Yuanhan Liu
2017-11-21 13:17 ` [dpdk-stable] patch 'net/mlx5: fix clang compilation error' " Yuanhan Liu
2017-11-21 13:17 ` [dpdk-stable] patch 'net/enic: fix assignment' " Yuanhan Liu
2017-11-21 13:17 ` [dpdk-stable] patch 'net/i40e: fix uninitialized variable' " Yuanhan Liu
2017-11-21 13:17 ` [dpdk-stable] patch 'net/bnxt: fix the association of a MACVLAN per VNIC' " Yuanhan Liu
2017-11-21 13:17 ` [dpdk-stable] patch 'net/ixgbe: fix Rx queue interrupt mapping in VF' " Yuanhan Liu
2017-11-21 13:17 ` [dpdk-stable] patch 'net/ixgbe: fix VFIO " Yuanhan Liu
2017-11-21 13:17 ` [dpdk-stable] patch 'ethdev: revert use port name from device structure' " Yuanhan Liu
2017-11-21 13:17 ` [dpdk-stable] patch 'net/ixgbe: fix uninitialized variable' " Yuanhan Liu
2017-11-21 13:17 ` [dpdk-stable] patch 'examples/l2fwd-crypto: fix uninitialized errno value' " Yuanhan Liu
2017-11-21 13:17 ` [dpdk-stable] patch 'app/crypto-perf: " Yuanhan Liu
2017-11-21 13:17 ` [dpdk-stable] patch 'crypto/aesni_gcm: fix zero data operation' " Yuanhan Liu
2017-11-21 13:17 ` [dpdk-stable] patch 'crypto/aesni_mb: fix invalid session error' " Yuanhan Liu
2017-11-21 13:17 ` [dpdk-stable] patch 'test/crypto: fix dpaa2 sec macros and definitions' " Yuanhan Liu
2017-11-21 13:17 ` [dpdk-stable] patch 'app/crypto-perf: fix packet length check' " Yuanhan Liu
2017-11-21 13:17 ` [dpdk-stable] patch 'app/crypto-perf: parse AEAD data from vectors' " Yuanhan Liu
2017-11-21 13:17 ` [dpdk-stable] patch 'crypto/openssl: fix AEAD parameters' " Yuanhan Liu
2017-11-21 13:17 ` [dpdk-stable] patch 'drivers/crypto: use snprintf return value correctly' " Yuanhan Liu
2017-11-21 13:17 ` [dpdk-stable] patch 'net/i40e: fix flexible payload configuration' " Yuanhan Liu
2017-11-21 13:17 ` [dpdk-stable] patch 'net/i40e: fix mbuf free in vector Tx' " Yuanhan Liu
2017-11-21 13:17 ` [dpdk-stable] patch 'net/i40e: fix VF initialization error' " Yuanhan Liu
2017-11-21 13:17 ` [dpdk-stable] patch 'examples/l2fwd_fork: fix message pool init' " Yuanhan Liu
2017-11-21 13:17 ` [dpdk-stable] patch 'vfio: fix secondary process initialization' " Yuanhan Liu
2017-11-21 13:17 ` [dpdk-stable] patch 'net/virtio: flush Rx queues on start' " Yuanhan Liu
2017-11-21 13:17 ` [dpdk-stable] patch 'net/virtio: check error on setting non block flag' " Yuanhan Liu
2017-11-21 13:17 ` [dpdk-stable] patch 'net/virtio: fix Tx packet length stats' " Yuanhan Liu
2017-11-21 13:17 ` [dpdk-stable] patch 'igb_uio: remove device reset in open' " Yuanhan Liu
2017-11-21 13:17 ` [dpdk-stable] patch 'examples/qos_sched: fix uninitialized config' " Yuanhan Liu
2017-11-21 13:17 ` [dpdk-stable] patch 'examples/vhost_scsi: fix product id string termination' " Yuanhan Liu
2017-11-21 13:17 ` [dpdk-stable] patch 'crypto/dpaa2_sec: remove ICV memset on decryption side' " Yuanhan Liu
2017-11-21 13:17 ` [dpdk-stable] patch 'crypto/dpaa2_sec: add check for segmented buffer' " Yuanhan Liu
2017-11-21 13:17 ` [dpdk-stable] patch 'examples/ipsec-secgw: fix IP version check' " Yuanhan Liu
2017-11-21 13:17 ` [dpdk-stable] patch 'cryptodev: fix build with -Ofast' " Yuanhan Liu
2017-11-21 13:17 ` [dpdk-stable] patch 'examples/ipsec-secgw: fix IPv6 payload length' " Yuanhan Liu
2017-11-21 13:17 ` [dpdk-stable] patch 'examples/ipsec-secgw: fix crypto device mapping' " Yuanhan Liu
2017-11-21 13:17 ` [dpdk-stable] patch 'examples/ipsec-secgw: fix session creation' " Yuanhan Liu
2017-11-21 13:17 ` [dpdk-stable] patch 'examples/ipsec-secgw: fix AAD length setting' " Yuanhan Liu
2017-11-21 13:17 ` [dpdk-stable] patch 'examples/l2fwd-crypto: fix physical address " Yuanhan Liu
2017-11-21 13:18 ` [dpdk-stable] patch 'crypto/qat: fix HMAC supported digest sizes' " Yuanhan Liu
2017-11-21 13:18 ` [dpdk-stable] patch 'net/i40e: fix TM node parameter checking' " Yuanhan Liu
2017-11-21 13:18 ` [dpdk-stable] patch 'net/i40e: fix TM level capability getting' " Yuanhan Liu
2017-11-21 13:18 ` [dpdk-stable] patch 'net/ixgbe: fix TM node parameter checking' " Yuanhan Liu
2017-11-21 13:18 ` [dpdk-stable] patch 'net/ixgbe: fix TM level capability getting' " Yuanhan Liu
2017-11-21 13:18 ` [dpdk-stable] patch 'net/i40e: fix not supporting NULL TM profile' " Yuanhan Liu
2017-11-21 13:18 ` [dpdk-stable] patch 'net/ixgbe: " Yuanhan Liu
2017-11-21 13:18 ` [dpdk-stable] patch 'net/i40e: fix parent when adding TM node' " Yuanhan Liu
2017-11-21 13:18 ` [dpdk-stable] patch 'net/qede: fix supported packet types' " Yuanhan Liu
2017-11-21 13:18 ` [dpdk-stable] patch 'net/qede: fix to re-enable LRO during device start' " Yuanhan Liu
2017-11-21 13:18 ` [dpdk-stable] patch 'net/failsafe: fix PCI devices init' " Yuanhan Liu
2017-11-21 13:18 ` [dpdk-stable] patch 'app/testpmd: fix RSS structure initialisation' " Yuanhan Liu
2017-11-21 13:18 ` [dpdk-stable] patch 'net/enic: fix packet loss after MTU change' " Yuanhan Liu
2017-11-21 13:18 ` [dpdk-stable] patch 'net/ixgbe: fix PF DCB info' " Yuanhan Liu
2017-11-21 13:18 ` [dpdk-stable] patch 'app/testpmd: fix mapping of user priority to DCB TC' " Yuanhan Liu
2017-11-21 13:18 ` [dpdk-stable] patch 'net/mlx5: fix packet type flags for Ethernet only frame' " Yuanhan Liu
2017-11-21 13:18 ` [dpdk-stable] patch 'app/testpmd: fix build without ixgbe and bnxt PMDs' " Yuanhan Liu
2017-11-21 13:18 ` [dpdk-stable] patch 'net/bnxt: fix Tx offload capability' " Yuanhan Liu
2017-11-21 13:18 ` [dpdk-stable] patch 'net/bnxt: fix Rx " Yuanhan Liu
2017-11-21 13:18 ` [dpdk-stable] patch 'net/bnxt: handle Rx multi queue creation properly' " Yuanhan Liu
2017-11-21 13:18 ` [dpdk-stable] patch 'net/bnxt: remove redundant code parsing pool map' " Yuanhan Liu
2017-11-21 13:18 ` [dpdk-stable] patch 'net/bnxt: fix a bit shift operation' " Yuanhan Liu
2017-11-21 13:18 ` [dpdk-stable] patch 'net/bnxt: fix a potential null pointer dereference' " Yuanhan Liu
2017-11-21 13:18 ` Yuanhan Liu
2017-11-21 13:18 ` [dpdk-stable] patch 'net/bnxt: fix a pointer deref before null check' " Yuanhan Liu
2017-11-21 13:18 ` [dpdk-stable] patch 'net/bnxt: fix an unused value' " Yuanhan Liu
2017-11-21 13:18 ` [dpdk-stable] patch 'net/bnxt: check VLANs from pool map only for VMDq' " Yuanhan Liu
2017-11-21 13:18 ` [dpdk-stable] patch 'net/bonding: fix check slaves link properties' " Yuanhan Liu
2017-11-21 13:18 ` [dpdk-stable] patch 'eal/x86: fix atomic cmpset' " Yuanhan Liu
2017-11-21 13:18 ` [dpdk-stable] patch 'examples/multi_process: fix received message length' " Yuanhan Liu
2017-11-21 13:18 ` [dpdk-stable] patch 'lpm6: fix compilation with -Og' " Yuanhan Liu
2017-11-21 13:18 ` [dpdk-stable] patch 'net/failsafe: fix Rx clean race' " Yuanhan Liu
2017-11-21 13:18 ` [dpdk-stable] patch 'net/bnxt: do not set hash type unnecessarily' " Yuanhan Liu
2017-11-21 13:18 ` [dpdk-stable] patch 'net/i40e: fix mirror with firmware 6.0' " Yuanhan Liu
2017-11-21 13:18 ` [dpdk-stable] patch 'net/bnxt: fix VLAN spoof configuration' " Yuanhan Liu
2017-11-21 13:18 ` [dpdk-stable] patch 'net/i40e: fix Rx packets number for NEON' " Yuanhan Liu
2017-11-21 13:18 ` [dpdk-stable] patch 'net/bonding: fix default aggregator mode to stable' " Yuanhan Liu
2017-11-21 13:18 ` [dpdk-stable] patch 'net/dpaa2: set queues after reconfiguration' " Yuanhan Liu
2017-11-21 13:18 ` [dpdk-stable] patch 'net/enic: fix TSO for packets greater than 9208 bytes' " Yuanhan Liu
2017-11-21 13:18 ` [dpdk-stable] patch 'net/vmxnet3: fix memory leak when releasing queues' " Yuanhan Liu
2017-11-21 13:18 ` [dpdk-stable] patch 'net/ixgbe: fix filter parser for L2 tunnel' " Yuanhan Liu
2017-11-21 13:18 ` [dpdk-stable] patch 'net/i40e: fix VFIO interrupt mapping in VF' " Yuanhan Liu
2017-11-21 13:18 ` [dpdk-stable] patch 'net/failsafe: fix VLAN stripping configuration' " Yuanhan Liu
2017-11-21 13:18 ` [dpdk-stable] patch 'examples/l3fwd: fix NEON instructions' " Yuanhan Liu
2017-11-21 13:18 ` [dpdk-stable] patch 'examples/l3fwd: fix aliasing in port grouping' " Yuanhan Liu
2017-11-21 13:18 ` [dpdk-stable] patch 'net/igb: fix Rx interrupt with VFIO and MSI-X' " Yuanhan Liu
2017-11-21 13:18 ` [dpdk-stable] patch 'net/kni: remove driver struct forward declaration' " Yuanhan Liu
2017-11-21 13:18 ` [dpdk-stable] patch 'net/pcap: fix memory leak in dumper open' " Yuanhan Liu
2017-11-21 13:18 ` [dpdk-stable] patch 'app/testpmd: fix forwarding between non consecutive ports' " Yuanhan Liu
2017-11-21 13:18 ` [dpdk-stable] patch 'app/testpmd: fix topology error message' " Yuanhan Liu
2017-11-21 13:18 ` [dpdk-stable] patch 'net/mlx5: fix tunneled TCP/UDP packet type' " Yuanhan Liu
2017-11-21 13:18 ` [dpdk-stable] patch 'net/qede: remove duplicate includes' " Yuanhan Liu
2017-11-21 13:18 ` [dpdk-stable] patch 'net/qede/base: fix division by zero' " Yuanhan Liu
2017-11-21 13:18 ` [dpdk-stable] patch 'net/qede: fix icc build' " Yuanhan Liu
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).