patches for DPDK stable branches
 help / color / mirror / Atom feed
* [dpdk-stable] patch 'mk: fix cross build' has been queued to LTS release 17.11.4
@ 2018-07-27  2:27 Yongseok Koh
  2018-07-27  2:27 ` [dpdk-stable] patch 'bus/dpaa: fix phandle support for Linux 4.16' " Yongseok Koh
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: Yongseok Koh @ 2018-07-27  2:27 UTC (permalink / raw)
  To: Gavin Hu
  Cc: Honnappa Nagarahalli, Steve Capper, Ali Alnubani,
	Thomas Monjalon, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.4

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

Thanks.

Yongseok

---
>From 6c29e90b93ed3aca8f0a22b0f167b6974ddf89a0 Mon Sep 17 00:00:00 2001
From: Gavin Hu <gavin.hu@arm.com>
Date: Sat, 30 Jun 2018 01:27:33 +0800
Subject: [PATCH] mk: fix cross build
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

[ upstream commit ebaa070de85e49ad01214b1940c7cdcdba2f4ef6 ]

The "-Wimplicit-fallthrough=2" option was introduced into gcc 7.0, it was
enabled when the cross compiler gcc is greater than 7.0, but for the host
side buildtools/pmdinfogen, if the native gcc is older than 7.0, or the
host cc compiler is clang, it should not be enabled.

The fix is to differentiate the host gcc Werror options from the cross gcc.

gcc -Wp,-MD,./.pmdinfogen.o.d.tmp  -W -Wall -Wstrict-prototypes
-Wmissing-prototypes -Wmissing-declarations -Wold-style-definition
-Wpointer-arith -Wcast-align -Wnested-externs -Wcast-qual
-Wformat-nonliteral -Wformat-security -Wundef -Wwrite-strings -Wdeprecated
-Werror -Wimplicit-fallthrough=2 -Dbbb -Wno-format-truncation -g
-I/dpdk/build/include    -o pmdinfogen.o -c
~/dpdk/buildtools/pmdinfogen/pmdinfogen.c gcc: error:
unrecognized command line option ‘-Wimplicit-fallthrough=2’

Fixes: ced3e6f8 ("mk: adjust gcc flags for new gcc 7 warnings")

Signed-off-by: Gavin Hu <gavin.hu@arm.com>
Reviewed-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
Reviewed-by: Steve Capper <steve.capper@arm.com>
Tested-by: Ali Alnubani <alialnu@mellanox.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
---
 buildtools/pmdinfogen/Makefile           | 2 +-
 mk/toolchain/gcc/rte.toolchain-compat.mk | 5 +++++
 mk/toolchain/gcc/rte.vars.mk             | 9 +++++++++
 3 files changed, 15 insertions(+), 1 deletion(-)

diff --git a/buildtools/pmdinfogen/Makefile b/buildtools/pmdinfogen/Makefile
index bf07b6f2e..ff7a5fae6 100644
--- a/buildtools/pmdinfogen/Makefile
+++ b/buildtools/pmdinfogen/Makefile
@@ -41,7 +41,7 @@ HOSTAPP = dpdk-pmdinfogen
 #
 SRCS-y += pmdinfogen.c
 
-HOST_CFLAGS += $(WERROR_FLAGS) -g
+HOST_CFLAGS += $(HOST_WERROR_FLAGS) -g
 HOST_CFLAGS += -I$(RTE_OUTPUT)/include
 
 include $(RTE_SDK)/mk/rte.hostapp.mk
diff --git a/mk/toolchain/gcc/rte.toolchain-compat.mk b/mk/toolchain/gcc/rte.toolchain-compat.mk
index 01ac7e232..8dbd4417e 100644
--- a/mk/toolchain/gcc/rte.toolchain-compat.mk
+++ b/mk/toolchain/gcc/rte.toolchain-compat.mk
@@ -42,6 +42,11 @@ GCC_MAJOR = $(shell echo __GNUC__ | $(CC) -E -x c - | tail -n 1)
 GCC_MINOR = $(shell echo __GNUC_MINOR__ | $(CC) -E -x c - | tail -n 1)
 GCC_VERSION = $(GCC_MAJOR)$(GCC_MINOR)
 
+HOST_GCC_MAJOR = $(shell echo __GNUC__ | $(HOSTCC) -E -x c - | tail -n 1)
+HOST_GCC_MINOR = $(shell echo __GNUC_MINOR__ | $(HOSTCC) -E -x c - | tail -n 1)
+HOST_GCC_PATCHLEVEL = $(shell echo __GNUC_PATCHLEVEL__ | $(HOSTCC) -E -x c - | tail -n 1)
+HOST_GCC_VERSION = $(HOST_GCC_MAJOR)$(HOST_GCC_MINOR)
+
 # if GCC is older than 4.x
 ifeq ($(shell test $(GCC_VERSION) -lt 40 && echo 1), 1)
 	MACHINE_CFLAGS =
diff --git a/mk/toolchain/gcc/rte.vars.mk b/mk/toolchain/gcc/rte.vars.mk
index 3b907e201..e7008c052 100644
--- a/mk/toolchain/gcc/rte.vars.mk
+++ b/mk/toolchain/gcc/rte.vars.mk
@@ -99,6 +99,15 @@ ifeq ($(shell test $(GCC_VERSION) -lt 47 && echo 1), 1)
 WERROR_FLAGS += -Wno-uninitialized
 endif
 
+HOST_WERROR_FLAGS := $(WERROR_FLAGS)
+
+ifeq ($(shell test $(HOST_GCC_VERSION) -gt 70 && echo 1), 1)
+# Tell GCC only to error for switch fallthroughs without a suitable comment
+HOST_WERROR_FLAGS += -Wimplicit-fallthrough=2
+# Ignore errors for snprintf truncation
+HOST_WERROR_FLAGS += -Wno-format-truncation
+endif
+
 ifeq ($(shell test $(GCC_VERSION) -gt 70 && echo 1), 1)
 # Tell GCC only to error for switch fallthroughs without a suitable comment
 WERROR_FLAGS += -Wimplicit-fallthrough=2
-- 
2.11.0

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

* [dpdk-stable] patch 'bus/dpaa: fix phandle support for Linux 4.16' has been queued to LTS release 17.11.4
  2018-07-27  2:27 [dpdk-stable] patch 'mk: fix cross build' has been queued to LTS release 17.11.4 Yongseok Koh
@ 2018-07-27  2:27 ` Yongseok Koh
  2018-07-27  2:27 ` [dpdk-stable] patch 'bus/dpaa: fix buffer offset setting in FMAN' " Yongseok Koh
                   ` (7 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: Yongseok Koh @ 2018-07-27  2:27 UTC (permalink / raw)
  To: Alok Makhariya; +Cc: Shreyansh Jain, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.4

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

Thanks.

Yongseok

---
>From 355273223377907c533b5705b3259a18e652c5d3 Mon Sep 17 00:00:00 2001
From: Alok Makhariya <alok.makhariya@nxp.com>
Date: Fri, 6 Jul 2018 13:39:58 +0530
Subject: [PATCH] bus/dpaa: fix phandle support for Linux 4.16

[ upstream commit a4f24c37074c0c9f1068ef9e1a90c0b3dd0147c4 ]

Fixes: 2183c6f69d7e ("bus/dpaa: add OF parser for device scanning")

Signed-off-by: Alok Makhariya <alok.makhariya@nxp.com>
Acked-by: Shreyansh Jain <shreyansh.jain@nxp.com>
---
 drivers/bus/dpaa/base/fman/of.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/drivers/bus/dpaa/base/fman/of.c b/drivers/bus/dpaa/base/fman/of.c
index b2d7c0205..cada41241 100644
--- a/drivers/bus/dpaa/base/fman/of.c
+++ b/drivers/bus/dpaa/base/fman/of.c
@@ -215,6 +215,11 @@ linear_dir(struct dt_dir *d)
 				DPAA_BUS_LOG(DEBUG, "Duplicate lphandle in %s",
 					     d->node.node.full_name);
 			d->lphandle = f;
+		} else if (!strcmp(f->node.node.name, "phandle")) {
+			if (d->lphandle)
+				DPAA_BUS_LOG(DEBUG, "Duplicate lphandle in %s",
+					     d->node.node.full_name);
+			d->lphandle = f;
 		} else if (!strcmp(f->node.node.name, "#address-cells")) {
 			if (d->a_cells)
 				DPAA_BUS_LOG(DEBUG, "Duplicate a_cells in %s",
-- 
2.11.0

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

* [dpdk-stable] patch 'bus/dpaa: fix buffer offset setting in FMAN' has been queued to LTS release 17.11.4
  2018-07-27  2:27 [dpdk-stable] patch 'mk: fix cross build' has been queued to LTS release 17.11.4 Yongseok Koh
  2018-07-27  2:27 ` [dpdk-stable] patch 'bus/dpaa: fix phandle support for Linux 4.16' " Yongseok Koh
@ 2018-07-27  2:27 ` Yongseok Koh
  2018-07-27  2:27 ` [dpdk-stable] patch 'hash: fix multiwriter lock memory allocation' " Yongseok Koh
                   ` (6 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: Yongseok Koh @ 2018-07-27  2:27 UTC (permalink / raw)
  To: Hemant Agrawal; +Cc: Shreyansh Jain, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.4

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

Thanks.

Yongseok

---
>From a709e79b168a93d9ac3d8215b49623e3688d4b35 Mon Sep 17 00:00:00 2001
From: Hemant Agrawal <hemant.agrawal@nxp.com>
Date: Fri, 6 Jul 2018 13:40:00 +0530
Subject: [PATCH] bus/dpaa: fix buffer offset setting in FMAN

[ upstream commit 0975e5df8380b82fd74997997221447e565efc2b ]

The buffer offset was incorrectly being set at 64,
thus not honoring the packet headroom.

Fixes: 6d6b4f49a155 ("bus/dpaa: add FMAN hardware operations")

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Acked-by: Shreyansh Jain <shreyansh.jain@nxp.com>
---
 drivers/bus/dpaa/base/fman/fman_hw.c | 20 +++++++++++---------
 1 file changed, 11 insertions(+), 9 deletions(-)

diff --git a/drivers/bus/dpaa/base/fman/fman_hw.c b/drivers/bus/dpaa/base/fman/fman_hw.c
index 077c17c07..d66efa12a 100644
--- a/drivers/bus/dpaa/base/fman/fman_hw.c
+++ b/drivers/bus/dpaa/base/fman/fman_hw.c
@@ -39,6 +39,8 @@
 #include <fsl_fman_crc64.h>
 #include <fsl_bman.h>
 
+#define FMAN_SP_EXT_BUF_MARG_START_SHIFT            16
+
 /* Instantiate the global variable that the inline CRC64 implementation (in
  * <fsl_fman.h>) depends on.
  */
@@ -445,20 +447,16 @@ fman_if_set_fc_quanta(struct fman_if *fm_if, u16 pause_quanta)
 int
 fman_if_get_fdoff(struct fman_if *fm_if)
 {
-	u32 fmbm_ricp;
+	u32 fmbm_rebm;
 	int fdoff;
-	int iceof_mask = 0x001f0000;
-	int icsz_mask = 0x0000001f;
 
 	struct __fman_if *__if = container_of(fm_if, struct __fman_if, __if);
 
 	assert(fman_ccsr_map_fd != -1);
 
-	fmbm_ricp =
-		   in_be32(&((struct rx_bmi_regs *)__if->bmi_map)->fmbm_ricp);
-	/*iceof + icsz*/
-	fdoff = ((fmbm_ricp & iceof_mask) >> 16) * 16 +
-		(fmbm_ricp & icsz_mask) * 16;
+	fmbm_rebm = in_be32(&((struct rx_bmi_regs *)__if->bmi_map)->fmbm_rebm);
+
+	fdoff = (fmbm_rebm >> FMAN_SP_EXT_BUF_MARG_START_SHIFT) & 0x1ff;
 
 	return fdoff;
 }
@@ -525,12 +523,16 @@ fman_if_set_fdoff(struct fman_if *fm_if, uint32_t fd_offset)
 {
 	struct __fman_if *__if = container_of(fm_if, struct __fman_if, __if);
 	unsigned int *fmbm_rebm;
+	int val = 0;
+	int fmbm_mask = 0x01ff0000;
+
+	val = fd_offset << FMAN_SP_EXT_BUF_MARG_START_SHIFT;
 
 	assert(fman_ccsr_map_fd != -1);
 
 	fmbm_rebm = &((struct rx_bmi_regs *)__if->bmi_map)->fmbm_rebm;
 
-	out_be32(fmbm_rebm, in_be32(fmbm_rebm) | (fd_offset << 16));
+	out_be32(fmbm_rebm, (in_be32(fmbm_rebm) & ~fmbm_mask) | val);
 }
 
 void
-- 
2.11.0

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

* [dpdk-stable] patch 'hash: fix multiwriter lock memory allocation' has been queued to LTS release 17.11.4
  2018-07-27  2:27 [dpdk-stable] patch 'mk: fix cross build' has been queued to LTS release 17.11.4 Yongseok Koh
  2018-07-27  2:27 ` [dpdk-stable] patch 'bus/dpaa: fix phandle support for Linux 4.16' " Yongseok Koh
  2018-07-27  2:27 ` [dpdk-stable] patch 'bus/dpaa: fix buffer offset setting in FMAN' " Yongseok Koh
@ 2018-07-27  2:27 ` Yongseok Koh
  2018-07-27  2:27 ` [dpdk-stable] patch 'hash: fix a multi-writer race condition' " Yongseok Koh
                   ` (5 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: Yongseok Koh @ 2018-07-27  2:27 UTC (permalink / raw)
  To: Yipeng Wang; +Cc: Pablo de Lara, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.4

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

Thanks.

Yongseok

---
>From f0e6f88b0975443aa72cedf233fbe002c8aaf733 Mon Sep 17 00:00:00 2001
From: Yipeng Wang <yipeng1.wang@intel.com>
Date: Tue, 10 Jul 2018 09:59:54 -0700
Subject: [PATCH] hash: fix multiwriter lock memory allocation

[ upstream commit 27c813679ea961b94d3184c09e50a055ad726da3 ]

When malloc for multiwriter_lock, the align should be
RTE_CACHE_LINE_SIZE rather than LCORE_CACHE_SIZE.

Also there should be check to verify the success of
rte_malloc.

Fixes: be856325cba3 ("hash: add scalable multi-writer insertion with Intel TSX")

Signed-off-by: Yipeng Wang <yipeng1.wang@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
---
 lib/librte_hash/rte_cuckoo_hash.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/lib/librte_hash/rte_cuckoo_hash.c b/lib/librte_hash/rte_cuckoo_hash.c
index cbf78fab2..bc7a9d998 100644
--- a/lib/librte_hash/rte_cuckoo_hash.c
+++ b/lib/librte_hash/rte_cuckoo_hash.c
@@ -302,7 +302,10 @@ rte_hash_create(const struct rte_hash_parameters *params)
 			h->add_key = ADD_KEY_MULTIWRITER;
 			h->multiwriter_lock = rte_malloc(NULL,
 							sizeof(rte_spinlock_t),
-							LCORE_CACHE_SIZE);
+							RTE_CACHE_LINE_SIZE);
+			if (h->multiwriter_lock == NULL)
+				goto err_unlock;
+
 			rte_spinlock_init(h->multiwriter_lock);
 		}
 	} else
-- 
2.11.0

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

* [dpdk-stable] patch 'hash: fix a multi-writer race condition' has been queued to LTS release 17.11.4
  2018-07-27  2:27 [dpdk-stable] patch 'mk: fix cross build' has been queued to LTS release 17.11.4 Yongseok Koh
                   ` (2 preceding siblings ...)
  2018-07-27  2:27 ` [dpdk-stable] patch 'hash: fix multiwriter lock memory allocation' " Yongseok Koh
@ 2018-07-27  2:27 ` Yongseok Koh
  2018-07-27  2:27 ` [dpdk-stable] patch 'hash: fix key slot size accuracy' " Yongseok Koh
                   ` (4 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: Yongseok Koh @ 2018-07-27  2:27 UTC (permalink / raw)
  To: Yipeng Wang; +Cc: Pablo de Lara, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.4

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

Thanks.

Yongseok

---
>From dabc158fbd4a9d581811dce0e5a7272452ba7f9e Mon Sep 17 00:00:00 2001
From: Yipeng Wang <yipeng1.wang@intel.com>
Date: Tue, 10 Jul 2018 09:59:55 -0700
Subject: [PATCH] hash: fix a multi-writer race condition

[ upstream commit eb067d431d9411a0054bc3ec084b0e9eadbb0a16 ]

Current multi-writer implementation uses Intel TSX to
protect the cuckoo path moving but not the cuckoo
path searching. After searching, we need to verify again if
the same empty slot still exists at the beginning of the TSX
region. Otherwise another writer could occupy the empty slot
before the TSX region. Current code does not verify.

Fixes: be856325cba3 ("hash: add scalable multi-writer insertion with Intel TSX")

Signed-off-by: Yipeng Wang <yipeng1.wang@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
---
 lib/librte_hash/rte_cuckoo_hash_x86.h | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/lib/librte_hash/rte_cuckoo_hash_x86.h b/lib/librte_hash/rte_cuckoo_hash_x86.h
index 0c94244a6..a2f1663ec 100644
--- a/lib/librte_hash/rte_cuckoo_hash_x86.h
+++ b/lib/librte_hash/rte_cuckoo_hash_x86.h
@@ -95,6 +95,9 @@ rte_hash_cuckoo_move_insert_mw_tm(const struct rte_hash *h,
 	while (try < RTE_HASH_TSX_MAX_RETRY) {
 		status = rte_xbegin();
 		if (likely(status == RTE_XBEGIN_STARTED)) {
+			/* In case empty slot was gone before entering TSX */
+			if (curr_bkt->key_idx[curr_slot] != EMPTY_SLOT)
+				rte_xabort(RTE_XABORT_CUCKOO_PATH_INVALIDED);
 			while (likely(curr_node->prev != NULL)) {
 				prev_node = curr_node->prev;
 				prev_bkt = prev_node->bkt;
-- 
2.11.0

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

* [dpdk-stable] patch 'hash: fix key slot size accuracy' has been queued to LTS release 17.11.4
  2018-07-27  2:27 [dpdk-stable] patch 'mk: fix cross build' has been queued to LTS release 17.11.4 Yongseok Koh
                   ` (3 preceding siblings ...)
  2018-07-27  2:27 ` [dpdk-stable] patch 'hash: fix a multi-writer race condition' " Yongseok Koh
@ 2018-07-27  2:27 ` Yongseok Koh
  2018-07-27  2:27 ` [dpdk-stable] patch 'eal: fix return codes on thread naming failure' " Yongseok Koh
                   ` (3 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: Yongseok Koh @ 2018-07-27  2:27 UTC (permalink / raw)
  To: Yipeng Wang; +Cc: Pablo de Lara, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.4

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

Thanks.

Yongseok

---
>From 9dc73dd86775a6c5980f5c9cf69398c292bd920c Mon Sep 17 00:00:00 2001
From: Yipeng Wang <yipeng1.wang@intel.com>
Date: Tue, 10 Jul 2018 09:59:56 -0700
Subject: [PATCH] hash: fix key slot size accuracy

[ upstream commit 575a48c961f47f1078bd1ceacf8484fb1038f7f8 ]

This commit calculates the needed key slot size more
accurately. The previous local cache fix requires
the free slot ring to be larger than actually needed.
The calculation of the value is inaccurate.

Fixes: 5915699153d7 ("hash: fix scaling by reducing contention")

Signed-off-by: Yipeng Wang <yipeng1.wang@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
---
 lib/librte_hash/rte_cuckoo_hash.c | 16 +++++++++++-----
 1 file changed, 11 insertions(+), 5 deletions(-)

diff --git a/lib/librte_hash/rte_cuckoo_hash.c b/lib/librte_hash/rte_cuckoo_hash.c
index bc7a9d998..9be514dcc 100644
--- a/lib/librte_hash/rte_cuckoo_hash.c
+++ b/lib/librte_hash/rte_cuckoo_hash.c
@@ -154,13 +154,13 @@ rte_hash_create(const struct rte_hash_parameters *params)
 		 * except for the first cache
 		 */
 		num_key_slots = params->entries + (RTE_MAX_LCORE - 1) *
-					LCORE_CACHE_SIZE + 1;
+					(LCORE_CACHE_SIZE - 1) + 1;
 	else
 		num_key_slots = params->entries + 1;
 
 	snprintf(ring_name, sizeof(ring_name), "HT_%s", params->name);
 	/* Create ring (Dummy slot index is not enqueued) */
-	r = rte_ring_create(ring_name, rte_align32pow2(num_key_slots - 1),
+	r = rte_ring_create(ring_name, rte_align32pow2(num_key_slots),
 			params->socket_id, 0);
 	if (r == NULL) {
 		RTE_LOG(ERR, HASH, "memory allocation failed\n");
@@ -312,7 +312,7 @@ rte_hash_create(const struct rte_hash_parameters *params)
 		h->add_key = ADD_KEY_SINGLEWRITER;
 
 	/* Populate free slots ring. Entry zero is reserved for key misses. */
-	for (i = 1; i < params->entries + 1; i++)
+	for (i = 1; i < num_key_slots; i++)
 		rte_ring_sp_enqueue(r, (void *)((uintptr_t) i));
 
 	te->data = (void *) h;
@@ -394,7 +394,7 @@ void
 rte_hash_reset(struct rte_hash *h)
 {
 	void *ptr;
-	unsigned i;
+	uint32_t tot_ring_cnt, i;
 
 	if (h == NULL)
 		return;
@@ -407,7 +407,13 @@ rte_hash_reset(struct rte_hash *h)
 		rte_pause();
 
 	/* Repopulate the free slots ring. Entry zero is reserved for key misses */
-	for (i = 1; i < h->entries + 1; i++)
+	if (h->hw_trans_mem_support)
+		tot_ring_cnt = h->entries + (RTE_MAX_LCORE - 1) *
+					(LCORE_CACHE_SIZE - 1);
+	else
+		tot_ring_cnt = h->entries;
+
+	for (i = 1; i < tot_ring_cnt + 1; i++)
 		rte_ring_sp_enqueue(h->free_slots, (void *)((uintptr_t) i));
 
 	if (h->hw_trans_mem_support) {
-- 
2.11.0

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

* [dpdk-stable] patch 'eal: fix return codes on thread naming failure' has been queued to LTS release 17.11.4
  2018-07-27  2:27 [dpdk-stable] patch 'mk: fix cross build' has been queued to LTS release 17.11.4 Yongseok Koh
                   ` (4 preceding siblings ...)
  2018-07-27  2:27 ` [dpdk-stable] patch 'hash: fix key slot size accuracy' " Yongseok Koh
@ 2018-07-27  2:27 ` Yongseok Koh
  2018-07-27  2:27 ` [dpdk-stable] patch 'eal/linux: fix invalid syntax in interrupts' " Yongseok Koh
                   ` (2 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: Yongseok Koh @ 2018-07-27  2:27 UTC (permalink / raw)
  To: Dariusz Stojaczyk; +Cc: Anatoly Burakov, Olivier Matz, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.4

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

Thanks.

Yongseok

---
>From 5d33178a0e3bdab6619bd47da8f7f8848a4ad02c Mon Sep 17 00:00:00 2001
From: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Date: Tue, 10 Jul 2018 12:44:46 +0200
Subject: [PATCH] eal: fix return codes on thread naming failure

[ upstream commit 82dcc8b4bcb8adcb7fc819839833e74a3d0ad497 ]

The doc says this function returns negative errno
on error, but it currently returns either -1 or
positive errno.

It was incorrectly assumed that pthread_setname_np()
returns negative error numbers. It always returns
positive ones, so this patch negates its return value
before returning.

Fixes: 3901ed99c2f8 ("eal: fix thread naming on FreeBSD")

Signed-off-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
Reviewed-by: Olivier Matz <olivier.matz@6wind.com>
---
 lib/librte_eal/linuxapp/eal/eal_thread.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/librte_eal/linuxapp/eal/eal_thread.c b/lib/librte_eal/linuxapp/eal/eal_thread.c
index e9a579e46..c3947d731 100644
--- a/lib/librte_eal/linuxapp/eal/eal_thread.c
+++ b/lib/librte_eal/linuxapp/eal/eal_thread.c
@@ -205,7 +205,7 @@ int rte_sys_gettid(void)
 
 int rte_thread_setname(pthread_t id, const char *name)
 {
-	int ret = -1;
+	int ret = ENOSYS;
 #if defined(__GLIBC__) && defined(__GLIBC_PREREQ)
 #if __GLIBC_PREREQ(2, 12)
 	ret = pthread_setname_np(id, name);
@@ -213,5 +213,5 @@ int rte_thread_setname(pthread_t id, const char *name)
 #endif
 	RTE_SET_USED(id);
 	RTE_SET_USED(name);
-	return ret;
+	return -ret;
 }
-- 
2.11.0

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

* [dpdk-stable] patch 'eal/linux: fix invalid syntax in interrupts' has been queued to LTS release 17.11.4
  2018-07-27  2:27 [dpdk-stable] patch 'mk: fix cross build' has been queued to LTS release 17.11.4 Yongseok Koh
                   ` (5 preceding siblings ...)
  2018-07-27  2:27 ` [dpdk-stable] patch 'eal: fix return codes on thread naming failure' " Yongseok Koh
@ 2018-07-27  2:27 ` Yongseok Koh
  2018-07-27  2:27 ` [dpdk-stable] patch 'eal/linux: fix uninitialized value' " Yongseok Koh
  2018-07-27  2:27 ` [dpdk-stable] patch 'vfio: fix PCI address comparison' " Yongseok Koh
  8 siblings, 0 replies; 10+ messages in thread
From: Yongseok Koh @ 2018-07-27  2:27 UTC (permalink / raw)
  To: Anatoly Burakov; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.4

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

Thanks.

Yongseok

---
>From 7c00b9020f98f0a887655730406bccfb78d3b0b2 Mon Sep 17 00:00:00 2001
From: Anatoly Burakov <anatoly.burakov@intel.com>
Date: Fri, 1 Jun 2018 10:08:10 +0100
Subject: [PATCH] eal/linux: fix invalid syntax in interrupts

[ upstream commit 462dd3722eb7dec0db5833fbccb044e06d2a8e50 ]

Parentheses were missing. It worked because macro is enclosed in
parentheses, so syntax was valid after macro expansion.

Bugzilla ID: 58
Fixes: 0a45657a6794 ("pci: rework interrupt handling")

Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
---
 lib/librte_eal/linuxapp/eal/eal_interrupts.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/librte_eal/linuxapp/eal/eal_interrupts.c b/lib/librte_eal/linuxapp/eal/eal_interrupts.c
index 1c20693d9..e1179b85d 100644
--- a/lib/librte_eal/linuxapp/eal/eal_interrupts.c
+++ b/lib/librte_eal/linuxapp/eal/eal_interrupts.c
@@ -449,7 +449,7 @@ rte_intr_callback_register(const struct rte_intr_handle *intr_handle,
 	TAILQ_FOREACH(src, &intr_sources, next) {
 		if (src->intr_handle.fd == intr_handle->fd) {
 			/* we had no interrupts for this */
-			if TAILQ_EMPTY(&src->callbacks)
+			if (TAILQ_EMPTY(&src->callbacks))
 				wake_thread = 1;
 
 			TAILQ_INSERT_TAIL(&(src->callbacks), callback, next);
-- 
2.11.0

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

* [dpdk-stable] patch 'eal/linux: fix uninitialized value' has been queued to LTS release 17.11.4
  2018-07-27  2:27 [dpdk-stable] patch 'mk: fix cross build' has been queued to LTS release 17.11.4 Yongseok Koh
                   ` (6 preceding siblings ...)
  2018-07-27  2:27 ` [dpdk-stable] patch 'eal/linux: fix invalid syntax in interrupts' " Yongseok Koh
@ 2018-07-27  2:27 ` Yongseok Koh
  2018-07-27  2:27 ` [dpdk-stable] patch 'vfio: fix PCI address comparison' " Yongseok Koh
  8 siblings, 0 replies; 10+ messages in thread
From: Yongseok Koh @ 2018-07-27  2:27 UTC (permalink / raw)
  To: Anatoly Burakov; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.4

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

Thanks.

Yongseok

---
>From f9fc2aa9da0581adcd93a88fa2c1af45816eb875 Mon Sep 17 00:00:00 2001
From: Anatoly Burakov <anatoly.burakov@intel.com>
Date: Fri, 1 Jun 2018 10:08:11 +0100
Subject: [PATCH] eal/linux: fix uninitialized value

[ upstream commit 96712b33afa547a6b872f15e5e723e8120b33ad6 ]

The value is not used, but some static analyzers may give out a
warning. Fix it by assigning default value of zero.

Bugzilla ID: 58
Fixes: cdc242f260e7 ("eal/linux: support running as unprivileged user")

Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
---
 lib/librte_eal/linuxapp/eal/eal_memory.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/librte_eal/linuxapp/eal/eal_memory.c b/lib/librte_eal/linuxapp/eal/eal_memory.c
index 17c20d4b3..0913895df 100644
--- a/lib/librte_eal/linuxapp/eal/eal_memory.c
+++ b/lib/librte_eal/linuxapp/eal/eal_memory.c
@@ -95,7 +95,7 @@ static bool phys_addrs_available = true;
 static void
 test_phys_addrs_available(void)
 {
-	uint64_t tmp;
+	uint64_t tmp = 0;
 	phys_addr_t physaddr;
 
 	if (!rte_eal_has_hugepages()) {
-- 
2.11.0

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

* [dpdk-stable] patch 'vfio: fix PCI address comparison' has been queued to LTS release 17.11.4
  2018-07-27  2:27 [dpdk-stable] patch 'mk: fix cross build' has been queued to LTS release 17.11.4 Yongseok Koh
                   ` (7 preceding siblings ...)
  2018-07-27  2:27 ` [dpdk-stable] patch 'eal/linux: fix uninitialized value' " Yongseok Koh
@ 2018-07-27  2:27 ` Yongseok Koh
  8 siblings, 0 replies; 10+ messages in thread
From: Yongseok Koh @ 2018-07-27  2:27 UTC (permalink / raw)
  To: Qi Zhang; +Cc: Gaetan Rivet, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.4

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

Thanks.

Yongseok

---
>From 8cd25bd5635f6b7e9e36dea7eee8919355531cb6 Mon Sep 17 00:00:00 2001
From: Qi Zhang <qi.z.zhang@intel.com>
Date: Thu, 12 Jul 2018 22:01:42 +0800
Subject: [PATCH] vfio: fix PCI address comparison

[ upstream commit 2a3de3710fbc54499867b44951b5b41cdb2aba35 ]

When use memcmp to compare two PCI address, sizeof(struct rte_pci_addr)
is 4 bytes aligned, and it is 8. While only 7 byte of struct rte_pci_addr
is valid. So compare the 8th byte will cause the unexpected result, which
happens when repeatedly attach/detach a device.

Fixes: 94c0776b1bad ("vfio: support hotplug")

Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Gaetan Rivet <gaetan.rivet@6wind.com>
---
 drivers/bus/pci/linux/pci_vfio.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/bus/pci/linux/pci_vfio.c b/drivers/bus/pci/linux/pci_vfio.c
index e7d7f5dc1..745db260c 100644
--- a/drivers/bus/pci/linux/pci_vfio.c
+++ b/drivers/bus/pci/linux/pci_vfio.c
@@ -671,7 +671,7 @@ pci_vfio_unmap_resource(struct rte_pci_device *dev)
 	vfio_res_list = RTE_TAILQ_CAST(rte_vfio_tailq.head, mapped_pci_res_list);
 	/* Get vfio_res */
 	TAILQ_FOREACH(vfio_res, vfio_res_list, next) {
-		if (memcmp(&vfio_res->pci_addr, &dev->addr, sizeof(dev->addr)))
+		if (rte_pci_addr_cmp(&vfio_res->pci_addr, &dev->addr))
 			continue;
 		break;
 	}
-- 
2.11.0

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

end of thread, other threads:[~2018-07-27  2:28 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-07-27  2:27 [dpdk-stable] patch 'mk: fix cross build' has been queued to LTS release 17.11.4 Yongseok Koh
2018-07-27  2:27 ` [dpdk-stable] patch 'bus/dpaa: fix phandle support for Linux 4.16' " Yongseok Koh
2018-07-27  2:27 ` [dpdk-stable] patch 'bus/dpaa: fix buffer offset setting in FMAN' " Yongseok Koh
2018-07-27  2:27 ` [dpdk-stable] patch 'hash: fix multiwriter lock memory allocation' " Yongseok Koh
2018-07-27  2:27 ` [dpdk-stable] patch 'hash: fix a multi-writer race condition' " Yongseok Koh
2018-07-27  2:27 ` [dpdk-stable] patch 'hash: fix key slot size accuracy' " Yongseok Koh
2018-07-27  2:27 ` [dpdk-stable] patch 'eal: fix return codes on thread naming failure' " Yongseok Koh
2018-07-27  2:27 ` [dpdk-stable] patch 'eal/linux: fix invalid syntax in interrupts' " Yongseok Koh
2018-07-27  2:27 ` [dpdk-stable] patch 'eal/linux: fix uninitialized value' " Yongseok Koh
2018-07-27  2:27 ` [dpdk-stable] patch 'vfio: fix PCI address comparison' " Yongseok Koh

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).