[dpdk-dev] [PATCH] doc: fix wrong config option

2020-05-12 Thread Matteo Croce
The documentation says that CONFIG_ENABLE_LTO enables LTO during the build, but the correct value actually is CONFIG_RTE_ENABLE_LTO Fixes: 098cc0fea3be ("build: add option to enable LTO") Signed-off-by: Matteo Croce --- doc/guides/prog_guide/lto.rst | 2 +- 1 file changed, 1 inser

[dpdk-dev] [PATCH] net/dpdkoin: add new driver

2020-04-01 Thread Matteo Croce
DPDK polls the packet in a busy loop. This means that CPU constantly spins looking for packets, regardless of the network traffic. DPDK does this to reduce latency and avoid using interrupts, at expense of efficiency: this might consume more processing power and generate more heat than needed, pote

[dpdk-dev] Statistics consistency

2019-03-13 Thread Matteo Croce
Is this an intended behaviour? Should the fields be aligned? Regards, -- Matteo Croce per aspera ad upstream

Re: [dpdk-dev] [RFC PATCH] use strlcpy for string copies

2018-02-23 Thread Matteo Croce
, 0, sizeof(tmp)); > > - snprintf(tmp2, sizeof(tmp2), "%s", CIRBUF_STR_HEAD); > + strlcpy(tmp2, CIRBUF_STR_HEAD, sizeof(tmp2)); > > /* > * initialize circular buffer > diff --git a/test/test/test_eal_flags.c b/test/test/test_eal_flags.c > index 37c42efe8..93eb7a481 100644 > --- a/test/test/test_eal_flags.c > +++ b/test/test/test_eal_flags.c > @@ -1151,11 +1151,12 @@ test_memory_flags(void) > /* add one extra socket */ > for (i = 0; i < num_sockets + 1; i++) { > snprintf(buf, sizeof(buf), "%s%s", invalid_socket_mem, > DEFAULT_MEM_SIZE); > - snprintf(invalid_socket_mem, sizeof(invalid_socket_mem), > "%s", buf); > + strlcpy(invalid_socket_mem, buf, sizeof(invalid_socket_mem)); > > if (num_sockets + 1 - i > 1) { > snprintf(buf, sizeof(buf), "%s,", invalid_socket_mem); > - snprintf(invalid_socket_mem, > sizeof(invalid_socket_mem), "%s", buf); > + strlcpy(invalid_socket_mem, buf, > + sizeof(invalid_socket_mem)); > } > } > > @@ -1167,11 +1168,12 @@ test_memory_flags(void) > /* add one extra socket */ > for (i = 0; i < num_sockets; i++) { > snprintf(buf, sizeof(buf), "%s%s", valid_socket_mem, > DEFAULT_MEM_SIZE); > - snprintf(valid_socket_mem, sizeof(valid_socket_mem), "%s", > buf); > + strlcpy(valid_socket_mem, buf, sizeof(valid_socket_mem)); > > if (num_sockets - i > 1) { > snprintf(buf, sizeof(buf), "%s,", valid_socket_mem); > - snprintf(valid_socket_mem, sizeof(valid_socket_mem), > "%s", buf); > + strlcpy(valid_socket_mem, buf, > + sizeof(valid_socket_mem)); > } > } > > diff --git a/test/test/test_malloc.c b/test/test/test_malloc.c > index d23192cf1..ccc5feaec 100644 > --- a/test/test/test_malloc.c > +++ b/test/test/test_malloc.c > @@ -378,7 +378,7 @@ test_realloc(void) > printf("NULL pointer returned from rte_zmalloc\n"); > return -1; > } > - snprintf(ptr1, size1, "%s" ,hello_str); > + strlcpy(ptr1, hello_str, size1); > char *ptr2 = rte_realloc(ptr1, size2, RTE_CACHE_LINE_SIZE); > if (!ptr2){ > rte_free(ptr1); > -- > 2.14.3 > Safety first, looks good to me. -- Matteo Croce per aspera ad upstream

Re: [dpdk-dev] [PATCH v2] i40e: remove warning

2017-12-14 Thread Matteo Croce
On Thu, Dec 14, 2017 at 9:40 PM, Matteo Croce wrote: > Fix a printf warning which made the compilation fail when compiling > with GCC 7.2 and -Werror: > > error: format %llu expects argument of type long long unsigned int, > but argument 8 has type u64 {aka long unsigned int}

[dpdk-dev] [PATCH v2] i40e: remove warning

2017-12-14 Thread Matteo Croce
Fix a printf warning which made the compilation fail when compiling with GCC 7.2 and -Werror: error: format %llu expects argument of type long long unsigned int, but argument 8 has type u64 {aka long unsigned int} [-Werror=format=] Signed-off-by: Matteo Croce --- v2: - used PRI*64 macros

Re: [dpdk-dev] [PATCH] i40e: remove warning

2017-12-14 Thread Matteo Croce
On Thu, Dec 14, 2017 at 9:15 PM, Kyle Larose wrote: > > >> -Original Message- >> From: dev [mailto:dev-boun...@dpdk.org] On Behalf Of Matteo Croce >> Sent: Thursday, December 14, 2017 1:23 PM >> To: dev@dpdk.org >> Subject: [dpdk-dev] [PATCH] i40

[dpdk-dev] [PATCH] i40e: remove warning

2017-12-14 Thread Matteo Croce
Fix a printf warning which made the compilation fail when compiling with GCC 7.2 and -Werror: error: format ‘%llu’ expects argument of type ‘long long unsigned int’, but argument 8 has type ‘u64 {aka long unsigned int}’ [-Werror=format=] Signed-off-by: Matteo Croce --- drivers/net/i40e