DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [pktgen PATCH 0/6] fix compilation
@ 2017-07-25 22:21 Thomas Monjalon
  2017-07-25 22:21 ` [dpdk-dev] [pktgen PATCH 1/6] remove unused functions Thomas Monjalon
                   ` (6 more replies)
  0 siblings, 7 replies; 14+ messages in thread
From: Thomas Monjalon @ 2017-07-25 22:21 UTC (permalink / raw)
  To: keith.wiles; +Cc: dev

Some errors were seen when trying to compile with gcc 7 or clang,
for 32-bit, and with DPDK 17.08-rc2.

Thomas Monjalon (6):
  remove unused functions
  fix screen type saving
  fix compilation of printf based functions
  fix compilation with gcc 7
  fix 32-bit build
  fix build with dpdk-17.08-rc2

 app/Makefile             |  3 ---
 app/cli-functions.c      |  2 +-
 app/lpktgenlib.c         | 12 ++----------
 app/pktgen-cmds.c        | 18 +++++++++---------
 app/pktgen-latency.c     | 26 ++++++++++++++------------
 app/pktgen-log.c         |  1 +
 app/pktgen-port-cfg.h    |  2 +-
 app/pktgen-stats.c       | 47 ++++++++++++++++++++++++++++-------------------
 lib/cli/cli.c            |  2 +-
 lib/cli/cli_cmds.c       |  6 +++---
 lib/cli/cli_common.h     |  1 +
 lib/cli/cli_map.c        |  2 +-
 lib/cli/cli_scrn.c       |  5 ++++-
 lib/cli/cli_scrn.h       |  1 +
 lib/common/l2p.c         | 34 ----------------------------------
 lib/common/mbuf.h        |  3 +++
 lib/common/port_config.c | 10 +---------
 17 files changed, 71 insertions(+), 104 deletions(-)

-- 
2.13.2

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

* [dpdk-dev] [pktgen PATCH 1/6] remove unused functions
  2017-07-25 22:21 [dpdk-dev] [pktgen PATCH 0/6] fix compilation Thomas Monjalon
@ 2017-07-25 22:21 ` Thomas Monjalon
  2017-07-25 22:21 ` [dpdk-dev] [pktgen PATCH 2/6] fix screen type saving Thomas Monjalon
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 14+ messages in thread
From: Thomas Monjalon @ 2017-07-25 22:21 UTC (permalink / raw)
  To: keith.wiles; +Cc: dev

clang compilations stops on unused static functions.
Some are removed, other one is commented out, according to the context.

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
---
 app/lpktgenlib.c | 12 ++----------
 lib/common/l2p.c | 34 ----------------------------------
 2 files changed, 2 insertions(+), 44 deletions(-)

diff --git a/app/lpktgenlib.c b/app/lpktgenlib.c
index dccf3cd..bd1dff3 100644
--- a/app/lpktgenlib.c
+++ b/app/lpktgenlib.c
@@ -82,6 +82,7 @@ setf_integer(lua_State *L, const char *name, lua_Integer value)
 	lua_setfield(L, -2, name);
 }
 
+#if 0 /* not used */
 /**************************************************************************//**
  *
  * setf_integer - Helper routine to set Lua variables.
@@ -100,6 +101,7 @@ setf_function(lua_State *L, const char *name, lua_CFunction fn)
 	lua_pushcclosure(L, fn, 0);
 	lua_setfield(L, -2, name);
 }
+#endif
 
 /**************************************************************************//**
  *
@@ -207,16 +209,6 @@ getf_string(lua_State *L, const char *field)
 	return value;
 }
 
-static inline void
-parse_portlist(const char *buf, void *pl)
-{
-#if (RTE_VERSION >= RTE_VERSION_NUM(2, 0, 0, 0))
-	rte_parse_portlist((char *)(uintptr_t)buf, pl);
-#else
-	cmdline_parse_portlist(NULL, buf, pl, PORTLIST_TOKEN_SIZE);
-#endif
-}
-
 /**************************************************************************//**
  *
  * pktgen_set - Set a number of Pktgen values.
diff --git a/lib/common/l2p.c b/lib/common/l2p.c
index 45ac363..3783236 100644
--- a/lib/common/l2p.c
+++ b/lib/common/l2p.c
@@ -79,14 +79,6 @@ typedef struct lcore_port_s {
 
 static lp_t lp_data, *lp = &lp_data;
 
-static inline uint8_t
-_bget(uint8_t *p, uint16_t idx)
-{
-	int32_t c = (idx / 8);
-
-	return p[c] & (1 << (idx - (c * 8)));
-}
-
 static inline int
 _btst(uint8_t *p, uint16_t idx)
 {
@@ -279,32 +271,6 @@ pg_parse_port_list(char *list, ps_t *ps)
 	return 0;
 }
 
-static inline void
-pg_dump_lcore_map(const char *t, uint8_t *m)
-{
-	int i;
-
-	fprintf(stderr, "%s( ", t);
-
-	for (i = 0; i < RTE_MAX_LCORE; i++)
-		if (_btst(m, i) )
-			fprintf(stderr, "%d ", i);
-	fprintf(stderr, ")");
-}
-
-static inline void
-pg_dump_port_map(const char *t, uint8_t *m)
-{
-	int i;
-
-	fprintf(stderr, "%s( ", t);
-
-	for (i = 0; i < RTE_MAX_ETHPORTS; i++)
-		if (_btst(m, i) )
-			fprintf(stderr, "%d ", i);
-	fprintf(stderr, ")");
-}
-
 /**************************************************************************//**
  *
  * pg_parse_matrix - Parse the command line argument for port configuration
-- 
2.13.2

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

* [dpdk-dev] [pktgen PATCH 2/6] fix screen type saving
  2017-07-25 22:21 [dpdk-dev] [pktgen PATCH 0/6] fix compilation Thomas Monjalon
  2017-07-25 22:21 ` [dpdk-dev] [pktgen PATCH 1/6] remove unused functions Thomas Monjalon
@ 2017-07-25 22:21 ` Thomas Monjalon
  2017-07-25 22:21 ` [dpdk-dev] [pktgen PATCH 3/6] fix compilation of printf based functions Thomas Monjalon
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 14+ messages in thread
From: Thomas Monjalon @ 2017-07-25 22:21 UTC (permalink / raw)
  To: keith.wiles; +Cc: dev

Seen with clang:
error: explicitly assigning value of variable of type 'int' to itself

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
---
 lib/cli/cli_scrn.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/cli/cli_scrn.c b/lib/cli/cli_scrn.c
index be7df4a..b195e92 100644
--- a/lib/cli/cli_scrn.c
+++ b/lib/cli/cli_scrn.c
@@ -160,7 +160,7 @@ scrn_create(int scrn_type, int16_t nrows, int16_t ncols, int theme)
 	scrn->nrows = nrows;
 	scrn->ncols = ncols;
 	scrn->theme = theme;
-	scrn_type   = scrn_type;
+	scrn->type  = scrn_type;
 
 	if (scrn_type == SCRN_STDIN_TYPE) {
 		if (scrn_stdin_setup()) {
-- 
2.13.2

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

* [dpdk-dev] [pktgen PATCH 3/6] fix compilation of printf based functions
  2017-07-25 22:21 [dpdk-dev] [pktgen PATCH 0/6] fix compilation Thomas Monjalon
  2017-07-25 22:21 ` [dpdk-dev] [pktgen PATCH 1/6] remove unused functions Thomas Monjalon
  2017-07-25 22:21 ` [dpdk-dev] [pktgen PATCH 2/6] fix screen type saving Thomas Monjalon
@ 2017-07-25 22:21 ` Thomas Monjalon
  2017-07-25 22:21 ` [dpdk-dev] [pktgen PATCH 4/6] fix compilation with gcc 7 Thomas Monjalon
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 14+ messages in thread
From: Thomas Monjalon @ 2017-07-25 22:21 UTC (permalink / raw)
  To: keith.wiles; +Cc: dev

Functions with printf style must be declared with
	__attribute__((format(printf,
Otherwise there is this compilation error:
	error: format string is not a string literal

Other errors fixed:
- "%*s" must match an int value
- "% " is not a valid printf format string

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
---
 app/Makefile         | 3 ---
 app/pktgen-log.c     | 1 +
 lib/cli/cli.c        | 2 +-
 lib/cli/cli_common.h | 1 +
 lib/cli/cli_map.c    | 2 +-
 lib/cli/cli_scrn.c   | 3 +++
 lib/cli/cli_scrn.h   | 1 +
 7 files changed, 8 insertions(+), 5 deletions(-)

diff --git a/app/Makefile b/app/Makefile
index b290c8d..5bddb07 100644
--- a/app/Makefile
+++ b/app/Makefile
@@ -43,9 +43,6 @@ include $(RTE_SDK)/mk/rte.vars.mk
 # binary name
 APP = pktgen
 
-CFLAGS_commands.o := -Wno-format-nonliteral
-CFLAGS_pktgen-log.o := -Wno-format-nonliteral
-
 CFLAGS += -O3 -g $(WERROR_FLAGS) -fno-stack-protector
 CFLAGS += -I$(RTE_SRCDIR) -I$(RTE_SRCDIR)/../lib/common
 
diff --git a/app/pktgen-log.c b/app/pktgen-log.c
index 019834c..598eb1f 100644
--- a/app/pktgen-log.c
+++ b/app/pktgen-log.c
@@ -99,6 +99,7 @@ pktgen_log_set_screen_level(int level)
 
 /* Log the provided message to the log screen and optionally a file. */
 void
+__attribute__((format(printf, 5, 6)))
 pktgen_log(int level, const char *file, long line,
 	   const char *func, const char *fmt, ...)
 {
diff --git a/lib/cli/cli.c b/lib/cli/cli.c
index d833947..bba0eb3 100644
--- a/lib/cli/cli.c
+++ b/lib/cli/cli.c
@@ -696,7 +696,7 @@ cli_pause(const char *msg, const char *keys)
 		if (cli_poll(&c))
 			if (strchr(keys, c)) {
 				/* clear the line of the prompt */
-				cli_printf("\r%*s\r", strlen(prompt), " ");
+				cli_printf("\r%*s\r", (int)strlen(prompt), " ");
 				return c;
 			}
 	} while (this_cli->quit_flag == 0);
diff --git a/lib/cli/cli_common.h b/lib/cli/cli_common.h
index 476d40e..59c2de5 100644
--- a/lib/cli/cli_common.h
+++ b/lib/cli/cli_common.h
@@ -71,6 +71,7 @@ extern "C" {
  */
 
 static inline void
+__attribute__((format(printf, 1, 2)))
 cli_printf(const char *fmt, ...)
 {
     va_list vaList;
diff --git a/lib/cli/cli_map.c b/lib/cli/cli_map.c
index 4fd5181..0fa34f8 100644
--- a/lib/cli/cli_map.c
+++ b/lib/cli/cli_map.c
@@ -162,7 +162,7 @@ decode_map(const char *fmt)
 	}
 
 	switch (fmt[1]) {
-	case '%': cli_printf("% "); break;
+	case '%': cli_printf("%% "); break;
 	case 'd': cli_printf("<32bit number> "); break;
 	case 'D': cli_printf("<64bit number> "); break;
 	case 'h': cli_printf("<32bit hex> "); break;
diff --git a/lib/cli/cli_scrn.c b/lib/cli/cli_scrn.c
index b195e92..692698e 100644
--- a/lib/cli/cli_scrn.c
+++ b/lib/cli/cli_scrn.c
@@ -50,6 +50,7 @@
 RTE_DEFINE_PER_LCORE(struct cli_scrn *, scrn);
 
 void
+__attribute__((format(printf, 3, 4)))
 scrn_printf(int16_t r, int16_t c, const char *fmt, ...)
 {
 	va_list vaList;
@@ -63,6 +64,7 @@ scrn_printf(int16_t r, int16_t c, const char *fmt, ...)
 }
 
 void
+__attribute__((format(printf, 3, 4)))
 scrn_cprintf(int16_t r, int16_t ncols, const char *fmt, ...)
 {
 	va_list vaList;
@@ -80,6 +82,7 @@ scrn_cprintf(int16_t r, int16_t ncols, const char *fmt, ...)
 }
 
 void
+__attribute__((format(printf, 4, 5)))
 scrn_fprintf(int16_t r, int16_t c, FILE *f, const char *fmt, ...)
 {
 	va_list vaList;
diff --git a/lib/cli/cli_scrn.h b/lib/cli/cli_scrn.h
index c841623..1bfb8f0 100644
--- a/lib/cli/cli_scrn.h
+++ b/lib/cli/cli_scrn.h
@@ -106,6 +106,7 @@ typedef enum {
 typedef uint8_t cli_rgb_t;
 
 static inline void
+__attribute__((format(printf, 1, 2)))
 scrn_puts(const char *fmt, ...)
 {
 	struct cli_scrn *scrn = this_scrn;
-- 
2.13.2

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

* [dpdk-dev] [pktgen PATCH 4/6] fix compilation with gcc 7
  2017-07-25 22:21 [dpdk-dev] [pktgen PATCH 0/6] fix compilation Thomas Monjalon
                   ` (2 preceding siblings ...)
  2017-07-25 22:21 ` [dpdk-dev] [pktgen PATCH 3/6] fix compilation of printf based functions Thomas Monjalon
@ 2017-07-25 22:21 ` Thomas Monjalon
  2017-07-25 22:21 ` [dpdk-dev] [pktgen PATCH 5/6] fix 32-bit build Thomas Monjalon
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 14+ messages in thread
From: Thomas Monjalon @ 2017-07-25 22:21 UTC (permalink / raw)
  To: keith.wiles; +Cc: dev

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
---
 lib/common/mbuf.h | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/lib/common/mbuf.h b/lib/common/mbuf.h
index 0191b28..31bfa96 100644
--- a/lib/common/mbuf.h
+++ b/lib/common/mbuf.h
@@ -90,6 +90,7 @@ pg_pktmbuf_alloc_bulk(struct rte_mempool *pool,
 			rte_mbuf_refcnt_set(mbufs[idx], 1);
 			pktmbuf_reset(mbufs[idx]);
 			idx++;
+			/* fall-through */
 		case 3:
 #ifdef RTE_ASSERT
 			RTE_ASSERT(rte_mbuf_refcnt_read(mbufs[idx]) == 0);
@@ -99,6 +100,7 @@ pg_pktmbuf_alloc_bulk(struct rte_mempool *pool,
 			rte_mbuf_refcnt_set(mbufs[idx], 1);
 			pktmbuf_reset(mbufs[idx]);
 			idx++;
+			/* fall-through */
 		case 2:
 #ifdef RTE_ASSERT
 			RTE_ASSERT(rte_mbuf_refcnt_read(mbufs[idx]) == 0);
@@ -108,6 +110,7 @@ pg_pktmbuf_alloc_bulk(struct rte_mempool *pool,
 			rte_mbuf_refcnt_set(mbufs[idx], 1);
 			pktmbuf_reset(mbufs[idx]);
 			idx++;
+			/* fall-through */
 		case 1:
 #ifdef RTE_ASSERT
 			RTE_ASSERT(rte_mbuf_refcnt_read(mbufs[idx]) == 0);
-- 
2.13.2

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

* [dpdk-dev] [pktgen PATCH 5/6] fix 32-bit build
  2017-07-25 22:21 [dpdk-dev] [pktgen PATCH 0/6] fix compilation Thomas Monjalon
                   ` (3 preceding siblings ...)
  2017-07-25 22:21 ` [dpdk-dev] [pktgen PATCH 4/6] fix compilation with gcc 7 Thomas Monjalon
@ 2017-07-25 22:21 ` Thomas Monjalon
  2017-07-25 22:21 ` [dpdk-dev] [pktgen PATCH 6/6] fix build with dpdk-17.08-rc2 Thomas Monjalon
  2017-07-26  3:54 ` [dpdk-dev] [pktgen PATCH 0/6] fix compilation Wiles, Keith
  6 siblings, 0 replies; 14+ messages in thread
From: Thomas Monjalon @ 2017-07-25 22:21 UTC (permalink / raw)
  To: keith.wiles; +Cc: dev

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
---
 app/cli-functions.c      |  2 +-
 app/pktgen-cmds.c        | 18 +++++++++---------
 app/pktgen-latency.c     | 26 ++++++++++++++------------
 app/pktgen-port-cfg.h    |  2 +-
 app/pktgen-stats.c       | 47 ++++++++++++++++++++++++++++-------------------
 lib/cli/cli_cmds.c       |  6 +++---
 lib/common/port_config.c |  2 +-
 7 files changed, 57 insertions(+), 46 deletions(-)

diff --git a/app/cli-functions.c b/app/cli-functions.c
index 9832026..56d5ddd 100644
--- a/app/cli-functions.c
+++ b/app/cli-functions.c
@@ -890,7 +890,7 @@ debug_cmd(int argc, char **argv)
 			break;
 		case 60:
 		case 61:
-			addr = (void *)strtoull(argv[2], NULL, 0);
+			addr = (void *)(uintptr_t)strtoull(argv[2], NULL, 0);
 			if (argc == 3)
 				len = 64;
 			else
diff --git a/app/pktgen-cmds.c b/app/pktgen-cmds.c
index e5fdb9d..a39124d 100644
--- a/app/pktgen-cmds.c
+++ b/app/pktgen-cmds.c
@@ -116,7 +116,7 @@ pktgen_script_save(char *path)
 
 	/* TODO: Determine DPDK arguments for rank and memory, default for now. */
 	fprintf(fd, "# Command line arguments: (DPDK args are defaults)\n");
-	fprintf(fd, "# %s -c %lx -n 3 -m 512 --proc-type %s -- ",
+	fprintf(fd, "# %s -c %" PRIx64 " -n 3 -m 512 --proc-type %s -- ",
 		pktgen.argv[0],
 		lcore,
 		(rte_eal_process_type() ==
@@ -171,7 +171,7 @@ pktgen_script_save(char *path)
 		if (rte_atomic64_read(&info->transmit_count) == 0)
 			strcpy(buff, "Forever");
 		else
-			snprintf(buff, sizeof(buff), "%ld",
+			snprintf(buff, sizeof(buff), "%" PRIu64,
 				 rte_atomic64_read(&info->transmit_count));
 		fprintf(fd, "#\n");
 		flags = rte_atomic32_read(&info->port_flags);
@@ -183,7 +183,7 @@ pktgen_script_save(char *path)
 		fprintf(fd, "Link: %s\n", buff);
 
 		fprintf(fd, "#\n# Set up the primary port information:\n");
-		fprintf(fd, "set %d count %ld\n", info->pid,
+		fprintf(fd, "set %d count %" PRIu64 "\n", info->pid,
 			rte_atomic64_read(&info->transmit_count));
 		fprintf(fd, "set %d size %d\n", info->pid, pkt->pktSize + FCS_SIZE);
 		fprintf(fd, "set %d rate %g\n", info->pid, info->tx_rate);
@@ -226,7 +226,7 @@ pktgen_script_save(char *path)
 		}
 		fprintf(fd, "\n");
 
-		fprintf(fd, "set %d jitter %lu\n", i, info->jitter_threshold);
+		fprintf(fd, "set %d jitter %" PRIu64 "\n", i, info->jitter_threshold);
 		fprintf(fd, "%sable %d mpls\n",
 			(flags & SEND_MPLS_LABEL) ? "en" : "dis", i);
 		sprintf(buff, "%x", pkt->mpls_entry);
@@ -454,7 +454,7 @@ pktgen_lua_save(char *path)
 
 	/* TODO: Determine DPDK arguments for rank and memory, default for now. */
 	fprintf(fd, "-- Command line arguments: (DPDK args are defaults)\n");
-	fprintf(fd, "-- %s -c %lx -n 3 -m 512 --proc-type %s -- ",
+	fprintf(fd, "-- %s -c %" PRIx64 " -n 3 -m 512 --proc-type %s -- ",
 		pktgen.argv[0],
 		lcore,
 		(rte_eal_process_type() ==
@@ -497,7 +497,7 @@ pktgen_lua_save(char *path)
 		if (rte_atomic64_read(&info->transmit_count) == 0)
 			strcpy(buff, "Forever");
 		else
-			snprintf(buff, sizeof(buff), "%ld",
+			snprintf(buff, sizeof(buff), "%" PRIu64,
 				 rte_atomic64_read(&info->transmit_count));
 		fprintf(fd, "-- \n");
 		flags = rte_atomic32_read(&info->port_flags);
@@ -509,7 +509,7 @@ pktgen_lua_save(char *path)
 		fprintf(fd, "Link: %s\n", buff);
 
 		fprintf(fd, "--\n-- Set up the primary port information:\n");
-		fprintf(fd, "pktgen.set('%d', 'count', %ld);\n", info->pid,
+		fprintf(fd, "pktgen.set('%d', 'count', %" PRIu64 ");\n", info->pid,
 			rte_atomic64_read(&info->transmit_count));
 		fprintf(fd, "pktgen.set('%d', 'size', %d);\n", info->pid, pkt->pktSize + FCS_SIZE);
 		fprintf(fd, "pktgen.set('%d', 'rate', %g);\n", info->pid, info->tx_rate);
@@ -551,7 +551,7 @@ pktgen_lua_save(char *path)
 		fprintf(fd, "\n");
 
 		fflush(fd);
-		fprintf(fd, "pktgen.jitter('%d', %lu);\n", i, info->jitter_threshold);
+		fprintf(fd, "pktgen.jitter('%d', %" PRIu64 ");\n", i, info->jitter_threshold);
 		fprintf(fd, "pktgen.mpls('%d', '%sable');\n", i,
 			(flags & SEND_MPLS_LABEL) ? "en" : "dis");
 		sprintf(buff, "%x", pkt->mpls_entry);
@@ -871,7 +871,7 @@ pktgen_transmit_count_rate(int port, char *buff, int len)
 	if (rte_atomic64_read(&info->transmit_count) == 0)
 		snprintf(buff, len, "Forever /%g%%", info->tx_rate);
 	else
-		snprintf(buff, len, "%ld /%g%%",
+		snprintf(buff, len, "%" PRIu64 " /%g%%",
 			 rte_atomic64_read(&info->transmit_count),
 			 info->tx_rate);
 
diff --git a/app/pktgen-latency.c b/app/pktgen-latency.c
index 7c01bec..2ed718a 100644
--- a/app/pktgen-latency.c
+++ b/app/pktgen-latency.c
@@ -238,13 +238,15 @@ pktgen_page_latency(void)
 
 		/* Rx/Tx pkts/s rate */
 		row = LINK_STATE_ROW + 1;
-		snprintf(buff, sizeof(buff), "%lu/%lu", info->max_ipackets, info->rate_stats.ipackets);
+		snprintf(buff, sizeof(buff), "%" PRIu64 "/%" PRIu64,
+		         info->max_ipackets, info->rate_stats.ipackets);
 		scrn_printf(row++, col, "%*s", COLUMN_WIDTH_1, buff);
 
-		snprintf(buff, sizeof(buff), "%lu/%lu", info->max_opackets, info->rate_stats.opackets);
+		snprintf(buff, sizeof(buff), "%" PRIu64 "/%" PRIu64,
+		         info->max_opackets, info->rate_stats.opackets);
 		scrn_printf(row++, col, "%*s", COLUMN_WIDTH_1, buff);
 
-		snprintf(buff, sizeof(buff), "%lu/%lu",
+		snprintf(buff, sizeof(buff), "%" PRIu64 "/%" PRIu64,
 		         iBitsTotal(info->rate_stats) / Million,
 		         oBitsTotal(info->rate_stats) / Million);
 		scrn_printf(row++,  col, "%*s", COLUMN_WIDTH_1, buff);
@@ -285,24 +287,24 @@ pktgen_page_latency(void)
 			info->latency_nb_pkts = 0;
 			info->avg_latency     = 0;
 		}
-		snprintf(buff, sizeof(buff), "%lu", avg_lat);
+		snprintf(buff, sizeof(buff), "%" PRIu64, avg_lat);
 		scrn_printf(row++, col, "%*s", COLUMN_WIDTH_1, buff);
 
-		snprintf(buff, sizeof(buff), "%lu", info->jitter_threshold);
+		snprintf(buff, sizeof(buff), "%" PRIu64, info->jitter_threshold);
 		scrn_printf(row++, col, "%*s", COLUMN_WIDTH_1, buff);
 
-		snprintf(buff, sizeof(buff), "%lu", info->jitter_count);
+		snprintf(buff, sizeof(buff), "%" PRIu64, info->jitter_count);
 		scrn_printf(row++, col, "%*s", COLUMN_WIDTH_1, buff);
 
-		snprintf(buff, sizeof(buff), "%lu", info->prev_stats.ipackets);
+		snprintf(buff, sizeof(buff), "%" PRIu64, info->prev_stats.ipackets);
 		scrn_printf(row++, col, "%*s", COLUMN_WIDTH_1, buff);
 
 		avg_lat = 0;
 		if (info->prev_stats.ipackets)
-			snprintf(buff, sizeof(buff), "%lu",
+			snprintf(buff, sizeof(buff), "%" PRIu64,
 				 (info->jitter_count * 100) / info->prev_stats.ipackets);
 		else
-			snprintf(buff, sizeof(buff), "%lu", avg_lat);
+			snprintf(buff, sizeof(buff), "%" PRIu64, avg_lat);
 
 		scrn_printf(row++, col, "%*s", COLUMN_WIDTH_1, buff);
 
@@ -312,15 +314,15 @@ pktgen_page_latency(void)
 	/* Display the total pkts/s for all ports */
 	col = (COLUMN_WIDTH_1 * display_cnt) + COLUMN_WIDTH_0;
 	row = LINK_STATE_ROW + 1;
-	snprintf(buff, sizeof(buff), "%lu/%lu",
+	snprintf(buff, sizeof(buff), "%" PRIu64 "/%" PRIu64,
 	         pktgen.max_total_ipackets, pktgen.cumm_rate_totals.ipackets);
 	scrn_printf(row++, col, "%*s", COLUMN_WIDTH_3, buff);
 	scrn_eol();
-	snprintf(buff, sizeof(buff), "%lu/%lu",
+	snprintf(buff, sizeof(buff), "%" PRIu64 "/%" PRIu64,
 	         pktgen.max_total_opackets, pktgen.cumm_rate_totals.opackets);
 	scrn_printf(row++, col, "%*s", COLUMN_WIDTH_3, buff);
 	scrn_eol();
-	snprintf(buff, sizeof(buff), "%lu/%lu",
+	snprintf(buff, sizeof(buff), "%" PRIu64 "/%" PRIu64,
 	         iBitsTotal(pktgen.cumm_rate_totals) / Million,
 	         oBitsTotal(pktgen.cumm_rate_totals) / Million);
 	scrn_printf(row++, col, "%*s", COLUMN_WIDTH_3, buff);
diff --git a/app/pktgen-port-cfg.h b/app/pktgen-port-cfg.h
index 8f931f4..825297f 100644
--- a/app/pktgen-port-cfg.h
+++ b/app/pktgen-port-cfg.h
@@ -338,7 +338,7 @@ pktgen_dump_dev_info(FILE *f, const char *msg, struct rte_eth_dev_info *di, uint
 		di->max_vmdq_pools);
 	fprintf(
 		f,
-		"   rx_offload_capa:%4d, tx_offload_capa   :%4d, reta_size     :%6d, flow_type_rss_offloads:%016lx\n",
+		"   rx_offload_capa:%4d, tx_offload_capa   :%4d, reta_size     :%6d, flow_type_rss_offloads:%016" PRIx64 "\n",
 		di->rx_offload_capa,
 		di->tx_offload_capa,
 		di->reta_size,
diff --git a/app/pktgen-stats.c b/app/pktgen-stats.c
index 4719085..15cffd8 100644
--- a/app/pktgen-stats.c
+++ b/app/pktgen-stats.c
@@ -339,13 +339,15 @@ pktgen_page_stats(void)
 
 		/* Rx/Tx pkts/s rate */
 		row = LINK_STATE_ROW + 1;
-		snprintf(buff, sizeof(buff), "%lu/%lu", info->max_ipackets, rate->ipackets);
+		snprintf(buff, sizeof(buff), "%" PRIu64 "/%" PRIu64,
+		         info->max_ipackets, rate->ipackets);
 		scrn_printf(row++, col, "%*s", COLUMN_WIDTH_1, buff);
 
-		snprintf(buff, sizeof(buff), "%lu/%lu", info->max_opackets, rate->opackets);
+		snprintf(buff, sizeof(buff), "%" PRIu64 "/%" PRIu64,
+		         info->max_opackets, rate->opackets);
 		scrn_printf(row++, col, "%*s", COLUMN_WIDTH_1, buff);
 
-		snprintf(buff, sizeof(buff), "%lu/%lu",
+		snprintf(buff, sizeof(buff), "%" PRIu64 "/%" PRIu64,
 		         iBitsTotal(info->rate_stats) / Million,
 		         oBitsTotal(info->rate_stats) / Million);
 		scrn_printf(row++,  col, "%*s", COLUMN_WIDTH_1, buff);
@@ -360,12 +362,14 @@ pktgen_page_stats(void)
 		scrn_printf(row++, col, "%*llu", COLUMN_WIDTH_1, info->sizes._256_511);
 		scrn_printf(row++, col, "%*llu", COLUMN_WIDTH_1, info->sizes._512_1023);
 		scrn_printf(row++, col, "%*llu", COLUMN_WIDTH_1, info->sizes._1024_1518);
-		snprintf(buff, sizeof(buff), "%lu/%lu", info->sizes.runt, info->sizes.jumbo);
+		snprintf(buff, sizeof(buff), "%" PRIu64 "/%" PRIu64,
+		         info->sizes.runt, info->sizes.jumbo);
 		scrn_printf(row++, col, "%*s", COLUMN_WIDTH_1, buff);
 
 		/* Rx/Tx Errors */
 		row = PKT_TOTALS_ROW;
-		snprintf(buff, sizeof(buff), "%lu/%lu", prev->ierrors, prev->oerrors);
+		snprintf(buff, sizeof(buff), "%" PRIu64 "/%" PRIu64,
+		         prev->ierrors, prev->oerrors);
 		scrn_printf(row++, col, "%*s", COLUMN_WIDTH_1, buff);
 
 		/* Total Rx/Tx */
@@ -376,30 +380,32 @@ pktgen_page_stats(void)
 		scrn_printf(row++, col, "%*llu", COLUMN_WIDTH_1, iBitsTotal(info->prev_stats) / Million);
 		scrn_printf(row++, col, "%*llu", COLUMN_WIDTH_1, oBitsTotal(info->prev_stats) / Million);
 
-		snprintf(buff, sizeof(buff), "%lu/%lu", info->stats.arp_pkts, info->stats.echo_pkts);
+		snprintf(buff, sizeof(buff), "%" PRIu64 "/%" PRIu64,
+		         info->stats.arp_pkts, info->stats.echo_pkts);
 		scrn_printf(row++, col, "%*s", COLUMN_WIDTH_1, buff);
 
 		if (pktgen.flags & TX_DEBUG_FLAG) {
-			snprintf(buff, sizeof(buff), "%lu", info->stats.tx_failed);
+			snprintf(buff, sizeof(buff), "%" PRIu64, info->stats.tx_failed);
 			scrn_printf(row++, col, "%*s", COLUMN_WIDTH_1, buff);
-			snprintf(buff, sizeof(buff), "%lu/%lu", info->tx_pps, info->tx_cycles);
+			snprintf(buff, sizeof(buff), "%" PRIu64 "/%" PRIu64,
+			         info->tx_pps, info->tx_cycles);
 			scrn_printf(row++, col, "%*s", COLUMN_WIDTH_1, buff);
 
-			snprintf(buff, sizeof(buff), "%lu", info->stats.imissed);
+			snprintf(buff, sizeof(buff), "%" PRIu64, info->stats.imissed);
 			scrn_printf(row++, col, "%*s", COLUMN_WIDTH_1, buff);
 #if RTE_VERSION < RTE_VERSION_NUM(2, 2, 0, 0)
-			snprintf(buff, sizeof(buff), "%lu", info->stats.ibadcrc);
+			snprintf(buff, sizeof(buff), "%" PRIu64, info->stats.ibadcrc);
 			scrn_printf(row++, col, "%*s", COLUMN_WIDTH_1, buff);
-			snprintf(buff, sizeof(buff), "%lu", info->stats.ibadlen);
+			snprintf(buff, sizeof(buff), "%" PRIu64, info->stats.ibadlen);
 			scrn_printf(row++, col, "%*s", COLUMN_WIDTH_1, buff);
 #endif
 #if RTE_VERSION < RTE_VERSION_NUM(16, 4, 0, 0)
-			snprintf(buff, sizeof(buff), "%lu", info->stats.imcasts);
+			snprintf(buff, sizeof(buff), "%" PRIu64, info->stats.imcasts);
 			scrn_printf(row++, col, "%*s", COLUMN_WIDTH_1, buff);
 #else
 			scrn_printf(row++, col, "%*s", COLUMN_WIDTH_1, "None");
 #endif
-			snprintf(buff, sizeof(buff), "%lu", info->stats.rx_nombuf);
+			snprintf(buff, sizeof(buff), "%" PRIu64, info->stats.rx_nombuf);
 			scrn_printf(row++, col, "%*s", COLUMN_WIDTH_1, buff);
 		}
 		display_cnt++;
@@ -408,15 +414,15 @@ pktgen_page_stats(void)
 	/* Display the total pkts/s for all ports */
 	col = (COLUMN_WIDTH_1 * display_cnt) + COLUMN_WIDTH_0;
 	row = LINK_STATE_ROW + 1;
-	snprintf(buff, sizeof(buff), "%lu/%lu",
+	snprintf(buff, sizeof(buff), "%" PRIu64 "/%" PRIu64,
 	         pktgen.max_total_ipackets, cumm->ipackets);
 	scrn_printf(row++, col, "%*s", COLUMN_WIDTH_3, buff);
 	scrn_eol();
-	snprintf(buff, sizeof(buff), "%lu/%lu",
+	snprintf(buff, sizeof(buff), "%" PRIu64 "/%" PRIu64,
 	         pktgen.max_total_opackets, cumm->opackets);
 	scrn_printf(row++, col, "%*s", COLUMN_WIDTH_3, buff);
 	scrn_eol();
-	snprintf(buff, sizeof(buff), "%lu/%lu",
+	snprintf(buff, sizeof(buff), "%" PRIu64 "/%" PRIu64,
 	         iBitsTotal(pktgen.cumm_rate_totals) / Million,
 	         oBitsTotal(pktgen.cumm_rate_totals) / Million);
 	scrn_printf(row++, col, "%*s", COLUMN_WIDTH_3, buff);
@@ -553,7 +559,8 @@ pktgen_page_phys_stats(void)
 
         rte_eth_stats_get(pid, &stats);
 
-        snprintf(buff, sizeof(buff), "%lu/%lu", s->ipackets, s->opackets);
+        snprintf(buff, sizeof(buff), "%" PRIu64 "/%" PRIu64,
+		         s->ipackets, s->opackets);
 
         /* Total Rx/Tx */
         scrn_printf(row++, col, "%*s", COLUMN_WIDTH_3, buff);
@@ -568,7 +575,8 @@ pktgen_page_phys_stats(void)
 
         rte_eth_stats_get(pid, &stats);
 
-        snprintf(buff, sizeof(buff), "%lu/%lu", s->ierrors, s->imissed);
+        snprintf(buff, sizeof(buff), "%" PRIu64 "/%" PRIu64,
+		         s->ierrors, s->imissed);
 
         scrn_printf(row++, col, "%*s", COLUMN_WIDTH_3, buff);
     }
@@ -584,7 +592,8 @@ pktgen_page_phys_stats(void)
         rte_eth_stats_get(pid, &stats);
 
         r = &pktgen.info[pid].rate_stats;
-        snprintf(buff, sizeof(buff), "%lu/%lu", r->ipackets, r->opackets);
+        snprintf(buff, sizeof(buff), "%" PRIu64 "/%" PRIu64,
+		         r->ipackets, r->opackets);
 
         scrn_printf(row++, col, "%*s", COLUMN_WIDTH_3, buff);
     }
diff --git a/lib/cli/cli_cmds.c b/lib/cli/cli_cmds.c
index 92ef412..4322e56 100644
--- a/lib/cli/cli_cmds.c
+++ b/lib/cli/cli_cmds.c
@@ -423,9 +423,9 @@ sizes_cmd(int argc, char **argv)
 		return 0;
 	}
 
-	cli_printf("  sizeof(struct cli)      %lu\n", sizeof(struct cli));
-	cli_printf("  sizeof(struct cli_node) %lu\n", sizeof(struct cli_node));
-	cli_printf("  sizeof(args_t)          %lu\n", sizeof(args_t));
+	cli_printf("  sizeof(struct cli)      %zu\n", sizeof(struct cli));
+	cli_printf("  sizeof(struct cli_node) %zu\n", sizeof(struct cli_node));
+	cli_printf("  sizeof(args_t)          %zu\n", sizeof(args_t));
 	cli_printf("  Total number of Nodes   %d\n", this_cli->nb_nodes);
 	cli_printf("  Number History lines    %d\n", this_cli->nb_hist);
 	cli_printf("  CLI_DEFAULT_NB_NODES    %d\n", CLI_DEFAULT_NB_NODES);
diff --git a/lib/common/port_config.c b/lib/common/port_config.c
index f742576..c3b427a 100644
--- a/lib/common/port_config.c
+++ b/lib/common/port_config.c
@@ -194,7 +194,7 @@ create_blacklist(uint64_t portmask,
 		return 0;
 
 	fprintf(stdout,
-		"Ports: Port Mask: %016lx blacklisted = --, not-blacklisted = ++\n",
+		"Ports: Port Mask: %016" PRIx64 " blacklisted = --, not-blacklisted = ++\n",
 		portmask);
 	idx = 0;
 	for (i = 0; i < port_cnt; i++) {
-- 
2.13.2

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

* [dpdk-dev] [pktgen PATCH 6/6] fix build with dpdk-17.08-rc2
  2017-07-25 22:21 [dpdk-dev] [pktgen PATCH 0/6] fix compilation Thomas Monjalon
                   ` (4 preceding siblings ...)
  2017-07-25 22:21 ` [dpdk-dev] [pktgen PATCH 5/6] fix 32-bit build Thomas Monjalon
@ 2017-07-25 22:21 ` Thomas Monjalon
  2017-07-26  3:54 ` [dpdk-dev] [pktgen PATCH 0/6] fix compilation Wiles, Keith
  6 siblings, 0 replies; 14+ messages in thread
From: Thomas Monjalon @ 2017-07-25 22:21 UTC (permalink / raw)
  To: keith.wiles; +Cc: dev

The DEVTYPE API was changed in dpdk-17.08-rc1 and was reverted
in dpdk-17.08-rc2.

Fixes: 5653601bd0f5 ("fix changes for DPDK 17.08")

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
---
 lib/common/port_config.c | 8 --------
 1 file changed, 8 deletions(-)

diff --git a/lib/common/port_config.c b/lib/common/port_config.c
index c3b427a..94c21f7 100644
--- a/lib/common/port_config.c
+++ b/lib/common/port_config.c
@@ -161,14 +161,6 @@ free_portdesc(uint8_t **portdesc, uint32_t num)
 	}
 }
 
-#ifndef RTE_DEVTYPE_BLACKLISTED_PCI
-#define RTE_DEVTYPE_BLACKLISTED_PCI RTE_DEVTYPE_BLACKLISTED
-#endif
-
-#ifndef RTE_DEVTYPE_WHITELISTED_PCI
-#define RTE_DEVTYPE_WHITELISTED_PCI RTE_DEVTYPE_WHITELISTED
-#endif
-
 /**************************************************************************//**
  *
  * create_blacklist - Create a port blacklist.
-- 
2.13.2

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

* Re: [dpdk-dev] [pktgen PATCH 0/6] fix compilation
  2017-07-25 22:21 [dpdk-dev] [pktgen PATCH 0/6] fix compilation Thomas Monjalon
                   ` (5 preceding siblings ...)
  2017-07-25 22:21 ` [dpdk-dev] [pktgen PATCH 6/6] fix build with dpdk-17.08-rc2 Thomas Monjalon
@ 2017-07-26  3:54 ` Wiles, Keith
  2017-07-26  4:40   ` Roberts, Lee A.
  2017-07-26  5:39   ` Thomas Monjalon
  6 siblings, 2 replies; 14+ messages in thread
From: Wiles, Keith @ 2017-07-26  3:54 UTC (permalink / raw)
  To: Thomas Monjalon; +Cc: dev


> On Jul 25, 2017, at 5:21 PM, Thomas Monjalon <thomas@monjalon.net> wrote:
> 
> Some errors were seen when trying to compile with gcc 7 or clang,
> for 32-bit, and with DPDK 17.08-rc2.
> 
> Thomas Monjalon (6):
>  remove unused functions
>  fix screen type saving
>  fix compilation of printf based functions
>  fix compilation with gcc 7
>  fix 32-bit build
>  fix build with dpdk-17.08-rc2
> 
> app/Makefile             |  3 ---
> app/cli-functions.c      |  2 +-
> app/lpktgenlib.c         | 12 ++----------
> app/pktgen-cmds.c        | 18 +++++++++---------
> app/pktgen-latency.c     | 26 ++++++++++++++------------
> app/pktgen-log.c         |  1 +
> app/pktgen-port-cfg.h    |  2 +-
> app/pktgen-stats.c       | 47 ++++++++++++++++++++++++++++-------------------
> lib/cli/cli.c            |  2 +-
> lib/cli/cli_cmds.c       |  6 +++---
> lib/cli/cli_common.h     |  1 +
> lib/cli/cli_map.c        |  2 +-
> lib/cli/cli_scrn.c       |  5 ++++-
> lib/cli/cli_scrn.h       |  1 +
> lib/common/l2p.c         | 34 ----------------------------------
> lib/common/mbuf.h        |  3 +++
> lib/common/port_config.c | 10 +---------
> 17 files changed, 71 insertions(+), 104 deletions(-)

Acked by: Keith Wiles <keith.wiles@intel.com>

I did apply these changes and in testing with i40e Pktgen now only sends a few thousand packets then stops sending. I am sure these patches are not the problem, but did you try out Pktgen to see if it worked with 17.08-rc2? Which version of Pktgen did you use?

I tried with clang and gcc both behave the same.

I noticed a new message:
i40e_dev_start(): please call hierarchy_commit() before starting the port
i40e_dev_start(): please call hierarchy_commit() before starting the port
i40e_dev_start(): please call hierarchy_commit() before starting the port
i40e_dev_start(): please call hierarchy_commit() before starting the port

and I tried to add the call in pktgen, but it had no effect. To me the TM API should be defaulted to the original mode and just work unless someone needs to use the TM APIs. The hierarchy_commit routine could not need to be called in the normal case is my guess.

> 
> -- 
> 2.13.2
> 

Regards,
Keith

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

* Re: [dpdk-dev] [pktgen PATCH 0/6] fix compilation
  2017-07-26  3:54 ` [dpdk-dev] [pktgen PATCH 0/6] fix compilation Wiles, Keith
@ 2017-07-26  4:40   ` Roberts, Lee A.
  2017-07-26  5:39   ` Thomas Monjalon
  1 sibling, 0 replies; 14+ messages in thread
From: Roberts, Lee A. @ 2017-07-26  4:40 UTC (permalink / raw)
  To: Wiles, Keith, Thomas Monjalon; +Cc: dev



> -----Original Message-----
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Wiles, Keith
> Sent: Tuesday, July 25, 2017 9:54 PM
> To: Thomas Monjalon <thomas@monjalon.net>
> Cc: dev@dpdk.org
> Subject: Re: [dpdk-dev] [pktgen PATCH 0/6] fix compilation
> 
> 
> > On Jul 25, 2017, at 5:21 PM, Thomas Monjalon <thomas@monjalon.net> wrote:
> >
> > Some errors were seen when trying to compile with gcc 7 or clang,
> > for 32-bit, and with DPDK 17.08-rc2.
> >
> > Thomas Monjalon (6):
> >  remove unused functions
> >  fix screen type saving
> >  fix compilation of printf based functions
> >  fix compilation with gcc 7
> >  fix 32-bit build
> >  fix build with dpdk-17.08-rc2
> >
> > app/Makefile             |  3 ---
> > app/cli-functions.c      |  2 +-
> > app/lpktgenlib.c         | 12 ++----------
> > app/pktgen-cmds.c        | 18 +++++++++---------
> > app/pktgen-latency.c     | 26 ++++++++++++++------------
> > app/pktgen-log.c         |  1 +
> > app/pktgen-port-cfg.h    |  2 +-
> > app/pktgen-stats.c       | 47 ++++++++++++++++++++++++++++-------------------
> > lib/cli/cli.c            |  2 +-
> > lib/cli/cli_cmds.c       |  6 +++---
> > lib/cli/cli_common.h     |  1 +
> > lib/cli/cli_map.c        |  2 +-
> > lib/cli/cli_scrn.c       |  5 ++++-
> > lib/cli/cli_scrn.h       |  1 +
> > lib/common/l2p.c         | 34 ----------------------------------
> > lib/common/mbuf.h        |  3 +++
> > lib/common/port_config.c | 10 +---------
> > 17 files changed, 71 insertions(+), 104 deletions(-)
> 
> Acked by: Keith Wiles <keith.wiles@intel.com>
> 
> I did apply these changes and in testing with i40e Pktgen now only sends a few thousand packets then
> stops sending. I am sure these patches are not the problem, but did you try out Pktgen to see if it
> worked with 17.08-rc2? Which version of Pktgen did you use?
> 
> I tried with clang and gcc both behave the same.
> 
> I noticed a new message:
> i40e_dev_start(): please call hierarchy_commit() before starting the port
> i40e_dev_start(): please call hierarchy_commit() before starting the port
> i40e_dev_start(): please call hierarchy_commit() before starting the port
> i40e_dev_start(): please call hierarchy_commit() before starting the port
> 
> and I tried to add the call in pktgen, but it had no effect. To me the TM API should be defaulted to
> the original mode and just work unless someone needs to use the TM APIs. The hierarchy_commit routine
> could not need to be called in the normal case is my guess.
> 
> >
> > --
> > 2.13.2
> >
> 
> Regards,
> Keith

I also noticed an issue with pktgen sending a limited number (many thousand) of packets when
using smaller packet sizes (64B, 128B) while using the ixgbe driver with an X550 (actually,
HPE-branded X550).  I had applied the "[dpdk-dev] [PATCH] net/ixgbe: add support of 2.5G and 5G"
patch from Wei Dai to dpdk-17.08-rc2 before building pktgen-3.3.7 on RHEL 7.3.

I was using pktgen to generate packets on both ports of the X550 at 2.5G and 5G rates, but
noticed that transmission would stop after a few seconds for smaller packet sizes.

                                              - Lee Roberts

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

* Re: [dpdk-dev] [pktgen PATCH 0/6] fix compilation
  2017-07-26  3:54 ` [dpdk-dev] [pktgen PATCH 0/6] fix compilation Wiles, Keith
  2017-07-26  4:40   ` Roberts, Lee A.
@ 2017-07-26  5:39   ` Thomas Monjalon
  2017-07-26 14:35     ` [dpdk-dev] hierarchy_commit() message displayed when not using TM Wiles, Keith
  2017-07-26 14:52     ` [dpdk-dev] [pktgen PATCH 0/6] fix compilation Wiles, Keith
  1 sibling, 2 replies; 14+ messages in thread
From: Thomas Monjalon @ 2017-07-26  5:39 UTC (permalink / raw)
  To: Wiles, Keith; +Cc: dev

26/07/2017 06:54, Wiles, Keith:
> 
> > On Jul 25, 2017, at 5:21 PM, Thomas Monjalon <thomas@monjalon.net> wrote:
> > 
> > Some errors were seen when trying to compile with gcc 7 or clang,
> > for 32-bit, and with DPDK 17.08-rc2.
> > 
> > Thomas Monjalon (6):
> >  remove unused functions
> >  fix screen type saving
> >  fix compilation of printf based functions
> >  fix compilation with gcc 7
> >  fix 32-bit build
> >  fix build with dpdk-17.08-rc2
> > 
> > app/Makefile             |  3 ---
> > app/cli-functions.c      |  2 +-
> > app/lpktgenlib.c         | 12 ++----------
> > app/pktgen-cmds.c        | 18 +++++++++---------
> > app/pktgen-latency.c     | 26 ++++++++++++++------------
> > app/pktgen-log.c         |  1 +
> > app/pktgen-port-cfg.h    |  2 +-
> > app/pktgen-stats.c       | 47 ++++++++++++++++++++++++++++-------------------
> > lib/cli/cli.c            |  2 +-
> > lib/cli/cli_cmds.c       |  6 +++---
> > lib/cli/cli_common.h     |  1 +
> > lib/cli/cli_map.c        |  2 +-
> > lib/cli/cli_scrn.c       |  5 ++++-
> > lib/cli/cli_scrn.h       |  1 +
> > lib/common/l2p.c         | 34 ----------------------------------
> > lib/common/mbuf.h        |  3 +++
> > lib/common/port_config.c | 10 +---------
> > 17 files changed, 71 insertions(+), 104 deletions(-)
> 
> Acked by: Keith Wiles <keith.wiles@intel.com>
> 
> I did apply these changes and in testing with i40e Pktgen now only sends a few thousand packets then stops sending. I am sure these patches are not the problem, but did you try out Pktgen to see if it worked with 17.08-rc2? Which version of Pktgen did you use?

I have not tested these patches except for compilation.
I was just trying to enable testing for more people
(with different compilers than yours).

> I tried with clang and gcc both behave the same.
> 
> I noticed a new message:
> i40e_dev_start(): please call hierarchy_commit() before starting the port
> i40e_dev_start(): please call hierarchy_commit() before starting the port
> i40e_dev_start(): please call hierarchy_commit() before starting the port
> i40e_dev_start(): please call hierarchy_commit() before starting the port
> 
> and I tried to add the call in pktgen, but it had no effect. To me the TM API should be defaulted to the original mode and just work unless someone needs to use the TM APIs. The hierarchy_commit routine could not need to be called in the normal case is my guess.

Interesting.
Please start a new email thread for this bug, cc Wenzhuo and Cristian.
Thanks

PS: I've noticed that you are the author of all the pktgen commits.
Are you using git-am when applying patches from other contributors?

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

* [dpdk-dev] hierarchy_commit() message displayed when not using TM
  2017-07-26  5:39   ` Thomas Monjalon
@ 2017-07-26 14:35     ` Wiles, Keith
  2017-07-26 14:58       ` Lu, Wenzhuo
  2017-07-26 14:52     ` [dpdk-dev] [pktgen PATCH 0/6] fix compilation Wiles, Keith
  1 sibling, 1 reply; 14+ messages in thread
From: Wiles, Keith @ 2017-07-26 14:35 UTC (permalink / raw)
  To: Thomas Monjalon; +Cc: DPDK, Dumitrescu, Cristian, Lu, Wenzhuo


> On Jul 26, 2017, at 12:39 AM, Thomas Monjalon <thomas@monjalon.net> wrote:
> 
>> I noticed a new message:
>> i40e_dev_start(): please call hierarchy_commit() before starting the port
>> i40e_dev_start(): please call hierarchy_commit() before starting the port
>> i40e_dev_start(): please call hierarchy_commit() before starting the port
>> i40e_dev_start(): please call hierarchy_commit() before starting the port
>> 
>> and I tried to add the call in pktgen, but it had no effect. To me the TM API should be defaulted to the original mode and just work unless someone needs to use the TM APIs. The hierarchy_commit routine could not need to be called in the normal case is my guess.
> 
> PS: I've noticed that you are the author of all the pktgen commits.
> Are you using git-am when applying patches from other contributors?

Cristian and Wenzhuo responded in another email and the messages above will be fixed.

Regards,
Keith

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

* Re: [dpdk-dev] [pktgen PATCH 0/6] fix compilation
  2017-07-26  5:39   ` Thomas Monjalon
  2017-07-26 14:35     ` [dpdk-dev] hierarchy_commit() message displayed when not using TM Wiles, Keith
@ 2017-07-26 14:52     ` Wiles, Keith
  2017-07-26 15:01       ` Thomas Monjalon
  1 sibling, 1 reply; 14+ messages in thread
From: Wiles, Keith @ 2017-07-26 14:52 UTC (permalink / raw)
  To: Thomas Monjalon; +Cc: dev


> On Jul 26, 2017, at 12:39 AM, Thomas Monjalon <thomas@monjalon.net> wrote:
> 
> 26/07/2017 06:54, Wiles, Keith:
>> 
>>> On Jul 25, 2017, at 5:21 PM, Thomas Monjalon <thomas@monjalon.net> wrote:
>>> 
>>> Some errors were seen when trying to compile with gcc 7 or clang,
>>> for 32-bit, and with DPDK 17.08-rc2.
>>> 
>>> Thomas Monjalon (6):
>>> remove unused functions
>>> fix screen type saving
>>> fix compilation of printf based functions
>>> fix compilation with gcc 7
>>> fix 32-bit build
>>> fix build with dpdk-17.08-rc2
>>> 
>>> app/Makefile             |  3 ---
>>> app/cli-functions.c      |  2 +-
>>> app/lpktgenlib.c         | 12 ++----------
>>> app/pktgen-cmds.c        | 18 +++++++++---------
>>> app/pktgen-latency.c     | 26 ++++++++++++++------------
>>> app/pktgen-log.c         |  1 +
>>> app/pktgen-port-cfg.h    |  2 +-
>>> app/pktgen-stats.c       | 47 ++++++++++++++++++++++++++++-------------------
>>> lib/cli/cli.c            |  2 +-
>>> lib/cli/cli_cmds.c       |  6 +++---
>>> lib/cli/cli_common.h     |  1 +
>>> lib/cli/cli_map.c        |  2 +-
>>> lib/cli/cli_scrn.c       |  5 ++++-
>>> lib/cli/cli_scrn.h       |  1 +
>>> lib/common/l2p.c         | 34 ----------------------------------
>>> lib/common/mbuf.h        |  3 +++
>>> lib/common/port_config.c | 10 +---------
>>> 17 files changed, 71 insertions(+), 104 deletions(-)
>> 
>> Acked by: Keith Wiles <keith.wiles@intel.com>
>> 
>> I did apply these changes and in testing with i40e Pktgen now only sends a few thousand packets then stops sending. I am sure these patches are not the problem, but did you try out Pktgen to see if it worked with 17.08-rc2? Which version of Pktgen did you use?
> 
> I have not tested these patches except for compilation.
> I was just trying to enable testing for more people
> (with different compilers than yours).
> 
>> I tried with clang and gcc both behave the same.
>> 
>> I noticed a new message:
>> i40e_dev_start(): please call hierarchy_commit() before starting the port
>> i40e_dev_start(): please call hierarchy_commit() before starting the port
>> i40e_dev_start(): please call hierarchy_commit() before starting the port
>> i40e_dev_start(): please call hierarchy_commit() before starting the port
>> 
>> and I tried to add the call in pktgen, but it had no effect. To me the TM API should be defaulted to the original mode and just work unless someone needs to use the TM APIs. The hierarchy_commit routine could not need to be called in the normal case is my guess.
> 
> Interesting.
> Please start a new email thread for this bug, cc Wenzhuo and Cristian.
> Thanks
> 
> PS: I've noticed that you are the author of all the pktgen commits.
> Are you using git-am when applying patches from other contributors?

Yes, I do use git am, but most changes are based on bug reports and not patches. A few people have requested I do not show their name in the commit logs for some reason or privacy concerns.

In this case when I find the TX problem you will see your patches are applied. The previous patch for Intel DPDK, I had squashed it into changes I was making for all of the copyright changes. I should have stashed my changes and applied your patch instead, sorry.

Regards,
Keith

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

* Re: [dpdk-dev] hierarchy_commit() message displayed when not using TM
  2017-07-26 14:35     ` [dpdk-dev] hierarchy_commit() message displayed when not using TM Wiles, Keith
@ 2017-07-26 14:58       ` Lu, Wenzhuo
  0 siblings, 0 replies; 14+ messages in thread
From: Lu, Wenzhuo @ 2017-07-26 14:58 UTC (permalink / raw)
  To: Wiles, Keith, Thomas Monjalon; +Cc: DPDK, Dumitrescu, Cristian

Hi Keith, Thomas,

> -----Original Message-----
> From: Wiles, Keith
> Sent: Wednesday, July 26, 2017 10:35 AM
> To: Thomas Monjalon <thomas@monjalon.net>
> Cc: DPDK <dev@dpdk.org>; Dumitrescu, Cristian
> <cristian.dumitrescu@intel.com>; Lu, Wenzhuo <wenzhuo.lu@intel.com>
> Subject: hierarchy_commit() message displayed when not using TM
> 
> 
> > On Jul 26, 2017, at 12:39 AM, Thomas Monjalon <thomas@monjalon.net>
> wrote:
> >
> >> I noticed a new message:
> >> i40e_dev_start(): please call hierarchy_commit() before starting the port
> >> i40e_dev_start(): please call hierarchy_commit() before starting the port
> >> i40e_dev_start(): please call hierarchy_commit() before starting the port
> >> i40e_dev_start(): please call hierarchy_commit() before starting the port
> >>
> >> and I tried to add the call in pktgen, but it had no effect. To me the TM API
> should be defaulted to the original mode and just work unless someone
> needs to use the TM APIs. The hierarchy_commit routine could not need to
> be called in the normal case is my guess.
> >
> > PS: I've noticed that you are the author of all the pktgen commits.
> > Are you using git-am when applying patches from other contributors?
> 
> Cristian and Wenzhuo responded in another email and the messages above
> will be fixed.
Just FYI, I've sent the patches to fix it.

> 
> Regards,
> Keith

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

* Re: [dpdk-dev] [pktgen PATCH 0/6] fix compilation
  2017-07-26 14:52     ` [dpdk-dev] [pktgen PATCH 0/6] fix compilation Wiles, Keith
@ 2017-07-26 15:01       ` Thomas Monjalon
  0 siblings, 0 replies; 14+ messages in thread
From: Thomas Monjalon @ 2017-07-26 15:01 UTC (permalink / raw)
  To: Wiles, Keith; +Cc: dev

26/07/2017 17:52, Wiles, Keith:
> > On Jul 26, 2017, at 12:39 AM, Thomas Monjalon <thomas@monjalon.net> wrote:
> > PS: I've noticed that you are the author of all the pktgen commits.
> > Are you using git-am when applying patches from other contributors?
> 
> Yes, I do use git am, but most changes are based on bug reports and not patches. A few people have requested I do not show their name in the commit logs for some reason or privacy concerns.
> 
> In this case when I find the TX problem you will see your patches are applied. The previous patch for Intel DPDK, I had squashed it into changes I was making for all of the copyright changes. I should have stashed my changes and applied your patch instead, sorry.

No problem, I just wanted to make sure we agree on patch management.
Thanks

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

end of thread, other threads:[~2017-07-26 15:01 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-07-25 22:21 [dpdk-dev] [pktgen PATCH 0/6] fix compilation Thomas Monjalon
2017-07-25 22:21 ` [dpdk-dev] [pktgen PATCH 1/6] remove unused functions Thomas Monjalon
2017-07-25 22:21 ` [dpdk-dev] [pktgen PATCH 2/6] fix screen type saving Thomas Monjalon
2017-07-25 22:21 ` [dpdk-dev] [pktgen PATCH 3/6] fix compilation of printf based functions Thomas Monjalon
2017-07-25 22:21 ` [dpdk-dev] [pktgen PATCH 4/6] fix compilation with gcc 7 Thomas Monjalon
2017-07-25 22:21 ` [dpdk-dev] [pktgen PATCH 5/6] fix 32-bit build Thomas Monjalon
2017-07-25 22:21 ` [dpdk-dev] [pktgen PATCH 6/6] fix build with dpdk-17.08-rc2 Thomas Monjalon
2017-07-26  3:54 ` [dpdk-dev] [pktgen PATCH 0/6] fix compilation Wiles, Keith
2017-07-26  4:40   ` Roberts, Lee A.
2017-07-26  5:39   ` Thomas Monjalon
2017-07-26 14:35     ` [dpdk-dev] hierarchy_commit() message displayed when not using TM Wiles, Keith
2017-07-26 14:58       ` Lu, Wenzhuo
2017-07-26 14:52     ` [dpdk-dev] [pktgen PATCH 0/6] fix compilation Wiles, Keith
2017-07-26 15:01       ` Thomas Monjalon

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