* [spp] [PATCH 0/7] patches for DPDK v18.05
@ 2018-06-19 11:37 Kenta Shinohara
2018-06-19 11:37 ` [spp] [PATCH 1/7] spp_nfv: fix deprecated use of rte_eth_dev_count Kenta Shinohara
` (7 more replies)
0 siblings, 8 replies; 17+ messages in thread
From: Kenta Shinohara @ 2018-06-19 11:37 UTC (permalink / raw)
To: spp, ferruh.yigit; +Cc: Kenta Shinohara
Hi,
These patches are fixing for SPP's compile and execution error
on DPDK v18.05.
Kenta Shinohara (7):
spp_nfv: fix deprecated use of rte_eth_dev_count
spp_primary: fix deprecated use of rte_eth_dev_count
spp_vm: fix deprecated use of rte_eth_dev_count
spp_vf: fix deprecated use of rte_eth_dev_count
spp_vm: fix changing spec of rte_mem_config
shared: fix for updating API of DPDK v18.05
spp_vm: add DALLOW_EXPERIMENTAL_API on CFLAGS
src/nfv/nfv.c | 2 +-
src/primary/init.c | 2 +-
src/shared/common.c | 13 ++++++++++++-
src/vf/spp_vf.c | 2 +-
src/vm/Makefile | 1 +
src/vm/init.c | 2 +-
src/vm/main.c | 11 +++++++----
7 files changed, 24 insertions(+), 9 deletions(-)
--
2.15.1 (Apple Git-101)
^ permalink raw reply [flat|nested] 17+ messages in thread
* [spp] [PATCH 1/7] spp_nfv: fix deprecated use of rte_eth_dev_count
2018-06-19 11:37 [spp] [PATCH 0/7] patches for DPDK v18.05 Kenta Shinohara
@ 2018-06-19 11:37 ` Kenta Shinohara
2018-06-21 10:51 ` Yasufumi Ogawa
2018-06-19 11:37 ` [spp] [PATCH 2/7] spp_primary: " Kenta Shinohara
` (6 subsequent siblings)
7 siblings, 1 reply; 17+ messages in thread
From: Kenta Shinohara @ 2018-06-19 11:37 UTC (permalink / raw)
To: spp, ferruh.yigit; +Cc: Kenta Shinohara
A method 'rte_eth_dev_count' changes to 'rte_eth_dev_count_avail'
because rte_eth_dev_count is deprecated on DPDK v18.05.
build error:
/home/k-shino/spp/src/nfv/nfv.c: In function ‘main’:
/home/k-shino/spp/src/nfv/nfv.c:941:2: warning: ‘rte_eth_dev_count’ is
deprecated [-Wdeprecated-declarations]
nb_ports = rte_eth_dev_count();
^ In file included from /home/k-shino/spp/src/nfv/../shared/common.h
:21:0,
from /home/k-shino/spp/src/nfv/nfv.c:12:
/home/k-shino/.dpdkenv/versions/dpdk-18.05@x86_64-native-linuxapp-gcc/
x86_64-native-linuxapp-gcc/include/rte_ethdev.h:1439:10: note: declared
here
uint16_t rte_eth_dev_count(void);
^
Signed-off-by: Kenta Shinohara <shinohara.kenta@lab.ntt.co.jp>
---
src/nfv/nfv.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/nfv/nfv.c b/src/nfv/nfv.c
index f677691..103b96a 100644
--- a/src/nfv/nfv.c
+++ b/src/nfv/nfv.c
@@ -905,7 +905,7 @@ main(int argc, char *argv[])
port_map_init();
/* Check that there is an even number of ports to send/receive on. */
- nb_ports = rte_eth_dev_count();
+ nb_ports = rte_eth_dev_count_avail();
if (nb_ports > RTE_MAX_ETHPORTS)
nb_ports = RTE_MAX_ETHPORTS;
--
2.15.1 (Apple Git-101)
^ permalink raw reply [flat|nested] 17+ messages in thread
* [spp] [PATCH 2/7] spp_primary: fix deprecated use of rte_eth_dev_count
2018-06-19 11:37 [spp] [PATCH 0/7] patches for DPDK v18.05 Kenta Shinohara
2018-06-19 11:37 ` [spp] [PATCH 1/7] spp_nfv: fix deprecated use of rte_eth_dev_count Kenta Shinohara
@ 2018-06-19 11:37 ` Kenta Shinohara
2018-06-21 10:52 ` Yasufumi Ogawa
2018-06-19 11:37 ` [spp] [PATCH 3/7] spp_vm: " Kenta Shinohara
` (5 subsequent siblings)
7 siblings, 1 reply; 17+ messages in thread
From: Kenta Shinohara @ 2018-06-19 11:37 UTC (permalink / raw)
To: spp, ferruh.yigit; +Cc: Kenta Shinohara
This patch is same as previous one.
Signed-off-by: Kenta Shinohara <shinohara.kenta@lab.ntt.co.jp>
---
src/primary/init.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/primary/init.c b/src/primary/init.c
index 2630783..5c9f15c 100644
--- a/src/primary/init.c
+++ b/src/primary/init.c
@@ -145,7 +145,7 @@ init(int argc, char *argv[])
argv += retval;
/* get total number of ports */
- total_ports = rte_eth_dev_count();
+ total_ports = rte_eth_dev_count_avail();
/* set up array for port data */
if (rte_eal_process_type() == RTE_PROC_SECONDARY) {
--
2.15.1 (Apple Git-101)
^ permalink raw reply [flat|nested] 17+ messages in thread
* [spp] [PATCH 3/7] spp_vm: fix deprecated use of rte_eth_dev_count
2018-06-19 11:37 [spp] [PATCH 0/7] patches for DPDK v18.05 Kenta Shinohara
2018-06-19 11:37 ` [spp] [PATCH 1/7] spp_nfv: fix deprecated use of rte_eth_dev_count Kenta Shinohara
2018-06-19 11:37 ` [spp] [PATCH 2/7] spp_primary: " Kenta Shinohara
@ 2018-06-19 11:37 ` Kenta Shinohara
2018-06-21 10:52 ` Yasufumi Ogawa
2018-06-19 11:37 ` [spp] [PATCH 4/7] spp_vf: " Kenta Shinohara
` (4 subsequent siblings)
7 siblings, 1 reply; 17+ messages in thread
From: Kenta Shinohara @ 2018-06-19 11:37 UTC (permalink / raw)
To: spp, ferruh.yigit; +Cc: Kenta Shinohara
This patch is same as previous one.
Signed-off-by: Kenta Shinohara <shinohara.kenta@lab.ntt.co.jp>
---
src/vm/init.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/vm/init.c b/src/vm/init.c
index fb9b7ec..7714b56 100644
--- a/src/vm/init.c
+++ b/src/vm/init.c
@@ -102,7 +102,7 @@ init(int argc, char *argv[])
argv += retval;
/* get total number of ports */
- total_ports = rte_eth_dev_count();
+ total_ports = rte_eth_dev_count_avail();
/* set up array for port data */
mz = rte_memzone_lookup(MZ_PORT_INFO);
--
2.15.1 (Apple Git-101)
^ permalink raw reply [flat|nested] 17+ messages in thread
* [spp] [PATCH 4/7] spp_vf: fix deprecated use of rte_eth_dev_count
2018-06-19 11:37 [spp] [PATCH 0/7] patches for DPDK v18.05 Kenta Shinohara
` (2 preceding siblings ...)
2018-06-19 11:37 ` [spp] [PATCH 3/7] spp_vm: " Kenta Shinohara
@ 2018-06-19 11:37 ` Kenta Shinohara
2018-06-21 10:52 ` Yasufumi Ogawa
2018-06-19 11:37 ` [spp] [PATCH 5/7] spp_vm: fix changing spec of rte_mem_config Kenta Shinohara
` (3 subsequent siblings)
7 siblings, 1 reply; 17+ messages in thread
From: Kenta Shinohara @ 2018-06-19 11:37 UTC (permalink / raw)
To: spp, ferruh.yigit; +Cc: Kenta Shinohara
This patch is same as previous one.
Signed-off-by: Kenta Shinohara <shinohara.kenta@lab.ntt.co.jp>
---
src/vf/spp_vf.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/vf/spp_vf.c b/src/vf/spp_vf.c
index fb45b83..32f25fd 100644
--- a/src/vf/spp_vf.c
+++ b/src/vf/spp_vf.c
@@ -774,7 +774,7 @@ set_nic_interface(void)
int nic_cnt = 0;
/* NIC Setting */
- g_iface_info.num_nic = rte_eth_dev_count();
+ g_iface_info.num_nic = rte_eth_dev_count_avail();
if (g_iface_info.num_nic > RTE_MAX_ETHPORTS)
g_iface_info.num_nic = RTE_MAX_ETHPORTS;
--
2.15.1 (Apple Git-101)
^ permalink raw reply [flat|nested] 17+ messages in thread
* [spp] [PATCH 5/7] spp_vm: fix changing spec of rte_mem_config
2018-06-19 11:37 [spp] [PATCH 0/7] patches for DPDK v18.05 Kenta Shinohara
` (3 preceding siblings ...)
2018-06-19 11:37 ` [spp] [PATCH 4/7] spp_vf: " Kenta Shinohara
@ 2018-06-19 11:37 ` Kenta Shinohara
2018-06-21 10:53 ` Yasufumi Ogawa
2018-06-19 11:37 ` [spp] [PATCH 6/7] shared: fix for updating API of DPDK v18.05 Kenta Shinohara
` (2 subsequent siblings)
7 siblings, 1 reply; 17+ messages in thread
From: Kenta Shinohara @ 2018-06-19 11:37 UTC (permalink / raw)
To: spp, ferruh.yigit; +Cc: Kenta Shinohara
Spp_vm is encountered the following error on DPDK v18.05.
build error:
/home/k-shino/spp/src/vm/main.c: In function ‘get_memzone_by_addr’:
/home/k-shino/spp/src/vm/main.c:321:14: error: ‘struct rte_mem_config’
has no member named ‘memzone’
tmp = &mcfg->memzone[i];
^
/home/k-shino/.dpdkenv/versions/dpdk-18.05@x86_64-native-linuxapp-gcc/
mk/internal/rte.compile-pre.mk:114: recipe for target 'main.o' failed
make[3]: *** [main.o] Error 1
/home/k-shino/.dpdkenv/versions/dpdk-18.05@x86_64-native-linuxapp-gcc/
mk/rte.extapp.mk:14: recipe for target 'all' failed make[2]: *** [all]
Error 2
/home/k-shino/.dpdkenv/versions/dpdk-18.05@x86_64-native-linuxapp-gcc/
mk/rte.extsubdir.mk:21: recipe for target 'vm' failed make[1]: *** [vm
] Error 2
/home/k-shino/.dpdkenv/versions/dpdk-18.05@x86_64-native-linuxapp-gcc/
mk/rte.extsubdir.mk:21: recipe for target 'src' failed make: *** [src]
Error 2
This error caused by changing specification of struct 'rte_fbarray'.
To fix this, use 'rte_fbarray_get' and experimental method
'rte_fbarray_find_next_used' instead of array 'memzone[]'.
Signed-off-by: Kenta Shinohara <shinohara.kenta@lab.ntt.co.jp>
---
src/vm/main.c | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
diff --git a/src/vm/main.c b/src/vm/main.c
index 94ba8d1..6522d55 100644
--- a/src/vm/main.c
+++ b/src/vm/main.c
@@ -340,19 +340,22 @@ get_memzone_by_addr(const void *addr)
{
struct rte_memzone *tmp, *mz;
struct rte_mem_config *mcfg;
+ struct rte_fbarray *arr;
int i;
mcfg = rte_eal_get_configuration()->mem_config;
+ arr = &mcfg->memzones;
mz = NULL;
/* find memzone for the ring */
- for (i = 0; i < RTE_MAX_MEMZONE; i++) {
- tmp = &mcfg->memzone[i];
-
- if (tmp->addr_64 == (uint64_t) addr) {
+ i = rte_fbarray_find_next_used(arr, 0);
+ while (i >= 0) {
+ tmp = rte_fbarray_get(arr, i);
+ if (mz->addr_64 == (uint64_t) addr) {
mz = tmp;
break;
}
+ i = rte_fbarray_find_next_used(arr, i+1);
}
return mz;
--
2.15.1 (Apple Git-101)
^ permalink raw reply [flat|nested] 17+ messages in thread
* [spp] [PATCH 6/7] shared: fix for updating API of DPDK v18.05
2018-06-19 11:37 [spp] [PATCH 0/7] patches for DPDK v18.05 Kenta Shinohara
` (4 preceding siblings ...)
2018-06-19 11:37 ` [spp] [PATCH 5/7] spp_vm: fix changing spec of rte_mem_config Kenta Shinohara
@ 2018-06-19 11:37 ` Kenta Shinohara
2018-06-21 10:53 ` Yasufumi Ogawa
2018-06-19 11:37 ` [spp] [PATCH 7/7] spp_vm: add DALLOW_EXPERIMENTAL_API on CFLAGS Kenta Shinohara
2018-06-21 10:49 ` [spp] [PATCH 0/7] patches for DPDK v18.05 Yasufumi Ogawa
7 siblings, 1 reply; 17+ messages in thread
From: Kenta Shinohara @ 2018-06-19 11:37 UTC (permalink / raw)
To: spp, ferruh.yigit; +Cc: Kenta Shinohara
An error has occured while executing spp primary.
execution error:
k-shino@tyrannosaurus:~/dpdk1805/spp$ sudo ./src/primary/x86_64-native
-linuxapp-gcc/spp_primary -l 2 -n 4 --socket-mem 512 --huge-dir=/dev/h
ugepages --proc-type=primary -- -p 0x02 -n 1 -s 192.168.122.1:5555
EAL: Detected 6 lcore(s)
EAL: Detected 1 NUMA nodes
EAL: Multi-process socket /var/run/.rte_unix
EAL: Probing VFIO support...
EAL: VFIO support initialized
EAL: PCI device 0000:00:19.0 on NUMA socket 0
EAL: probe driver: 8086:153a net_e1000_em
EAL: PCI device 0000:04:00.0 on NUMA socket 0
EAL: probe driver: 8086:105e net_e1000_em
EAL: PCI device 0000:04:00.1 on NUMA socket 0
EAL: probe driver: 8086:105e net_e1000_em
APP: Port 1 init ... eth_em_tx_queue_setup(): 0xcd1680: Tx queue offlo
ads 0x801d don't match port offloads 0x0 or supported port offloads 0x
f or supported queue offloads 0xf
EAL: Error - exiting with code: 1
Cause: Cannot initialise port 0
This error is caused by updating API of 'eth_em_tx_queue_setup()'.
To fix this, replace 5th argument of the method from 'NULL', which is
referenced from examples/l2fwd/main.c.
Signed-off-by: Kenta Shinohara <shinohara.kenta@lab.ntt.co.jp>
---
src/shared/common.c | 13 ++++++++++++-
1 file changed, 12 insertions(+), 1 deletion(-)
diff --git a/src/shared/common.c b/src/shared/common.c
index b11cb6d..10115d1 100644
--- a/src/shared/common.c
+++ b/src/shared/common.c
@@ -115,10 +115,21 @@ init_port(uint16_t port_num, struct rte_mempool *pktmbuf_pool)
const uint16_t tx_ring_size = RTE_MP_TX_DESC_DEFAULT;
uint16_t q;
int retval;
+ struct rte_eth_dev_info dev_info;
+ struct rte_eth_conf local_port_conf = port_conf;
+ struct rte_eth_txconf txq_conf;
RTE_LOG(INFO, APP, "Port %u init ... ", port_num);
fflush(stdout);
+ rte_eth_dev_info_get(port_num, &dev_info);
+ if (dev_info.tx_offload_capa & DEV_TX_OFFLOAD_MBUF_FAST_FREE)
+ local_port_conf.txmode.offloads |=
+ DEV_TX_OFFLOAD_MBUF_FAST_FREE;
+ txq_conf = dev_info.default_txconf;
+ txq_conf.txq_flags = ETH_TXQ_FLAGS_IGNORE;
+ txq_conf.offloads = local_port_conf.txmode.offloads;
+
/*
* Standard DPDK port initialisation - config port, then set up
* rx and tx rings
@@ -137,7 +148,7 @@ init_port(uint16_t port_num, struct rte_mempool *pktmbuf_pool)
for (q = 0; q < tx_rings; q++) {
retval = rte_eth_tx_queue_setup(port_num, q, tx_ring_size,
- rte_eth_dev_socket_id(port_num), NULL);
+ rte_eth_dev_socket_id(port_num), &txq_conf);
if (retval < 0)
return retval;
}
--
2.15.1 (Apple Git-101)
^ permalink raw reply [flat|nested] 17+ messages in thread
* [spp] [PATCH 7/7] spp_vm: add DALLOW_EXPERIMENTAL_API on CFLAGS
2018-06-19 11:37 [spp] [PATCH 0/7] patches for DPDK v18.05 Kenta Shinohara
` (5 preceding siblings ...)
2018-06-19 11:37 ` [spp] [PATCH 6/7] shared: fix for updating API of DPDK v18.05 Kenta Shinohara
@ 2018-06-19 11:37 ` Kenta Shinohara
2018-06-21 10:54 ` Yasufumi Ogawa
2018-06-21 10:49 ` [spp] [PATCH 0/7] patches for DPDK v18.05 Yasufumi Ogawa
7 siblings, 1 reply; 17+ messages in thread
From: Kenta Shinohara @ 2018-06-19 11:37 UTC (permalink / raw)
To: spp, ferruh.yigit; +Cc: Kenta Shinohara
According to the spec change of DPDK API, spp_vm requires to use
experimental method 'rte_fbarray_find_next_used'.
(See commit 8adf77c46fcf ("spp_vm: fix changing spec of rte_mem_config")
for detail of change)
To avoid compile warning, add '-DALLOW_EXPERIMENTAL_API' flag
to CFLAGS parameter.
Signed-off-by: Kenta Shinohara <shinohara.kenta@lab.ntt.co.jp>
---
src/vm/Makefile | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/vm/Makefile b/src/vm/Makefile
index 8996d84..2d7d402 100644
--- a/src/vm/Makefile
+++ b/src/vm/Makefile
@@ -51,6 +51,7 @@ SRCS-y := main.c init.c args.c ../shared/common.c
INC := $(wildcard *.h)
+CFLAGS += -DALLOW_EXPERIMENTAL_API
CFLAGS += $(WERROR_FLAGS) -O3
CFLAGS += -I$(SRCDIR)/../shared
--
2.15.1 (Apple Git-101)
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [spp] [PATCH 0/7] patches for DPDK v18.05
2018-06-19 11:37 [spp] [PATCH 0/7] patches for DPDK v18.05 Kenta Shinohara
` (6 preceding siblings ...)
2018-06-19 11:37 ` [spp] [PATCH 7/7] spp_vm: add DALLOW_EXPERIMENTAL_API on CFLAGS Kenta Shinohara
@ 2018-06-21 10:49 ` Yasufumi Ogawa
2018-08-15 15:44 ` Ferruh Yigit
7 siblings, 1 reply; 17+ messages in thread
From: Yasufumi Ogawa @ 2018-06-21 10:49 UTC (permalink / raw)
To: Kenta Shinohara, spp, ferruh.yigit
On 2018/06/19 20:37, Kenta Shinohara wrote:
> Hi,
>
> These patches are fixing for SPP's compile and execution error
> on DPDK v18.05.
I confirmed that the compile error is fixed and works it works fine on my Ubuntu 16.04 environment. Very thanks for your
contribution!
Yasufumi
>
> Kenta Shinohara (7):
> spp_nfv: fix deprecated use of rte_eth_dev_count
> spp_primary: fix deprecated use of rte_eth_dev_count
> spp_vm: fix deprecated use of rte_eth_dev_count
> spp_vf: fix deprecated use of rte_eth_dev_count
> spp_vm: fix changing spec of rte_mem_config
> shared: fix for updating API of DPDK v18.05
> spp_vm: add DALLOW_EXPERIMENTAL_API on CFLAGS
>
> src/nfv/nfv.c | 2 +-
> src/primary/init.c | 2 +-
> src/shared/common.c | 13 ++++++++++++-
> src/vf/spp_vf.c | 2 +-
> src/vm/Makefile | 1 +
> src/vm/init.c | 2 +-
> src/vm/main.c | 11 +++++++----
> 7 files changed, 24 insertions(+), 9 deletions(-)
>
--
Yasufumi Ogawa
NTT Network Service Systems Labs
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [spp] [PATCH 1/7] spp_nfv: fix deprecated use of rte_eth_dev_count
2018-06-19 11:37 ` [spp] [PATCH 1/7] spp_nfv: fix deprecated use of rte_eth_dev_count Kenta Shinohara
@ 2018-06-21 10:51 ` Yasufumi Ogawa
0 siblings, 0 replies; 17+ messages in thread
From: Yasufumi Ogawa @ 2018-06-21 10:51 UTC (permalink / raw)
To: Kenta Shinohara, spp, ferruh.yigit
On 2018/06/19 20:37, Kenta Shinohara wrote:
> A method 'rte_eth_dev_count' changes to 'rte_eth_dev_count_avail'
> because rte_eth_dev_count is deprecated on DPDK v18.05.
>
> build error:
> /home/k-shino/spp/src/nfv/nfv.c: In function ‘main’:
> /home/k-shino/spp/src/nfv/nfv.c:941:2: warning: ‘rte_eth_dev_count’ is
> deprecated [-Wdeprecated-declarations]
> nb_ports = rte_eth_dev_count();
> ^ In file included from /home/k-shino/spp/src/nfv/../shared/common.h
> :21:0,
> from /home/k-shino/spp/src/nfv/nfv.c:12:
> /home/k-shino/.dpdkenv/versions/dpdk-18.05@x86_64-native-linuxapp-gcc/
> x86_64-native-linuxapp-gcc/include/rte_ethdev.h:1439:10: note: declared
> here
> uint16_t rte_eth_dev_count(void);
> ^
>
> Signed-off-by: Kenta Shinohara <shinohara.kenta@lab.ntt.co.jp>
Thanks!
Acked-by: Yasufumi Ogawa <ogawa.yasufumi@lab.ntt.co.jp>
>
> ---
> src/nfv/nfv.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/src/nfv/nfv.c b/src/nfv/nfv.c
> index f677691..103b96a 100644
> --- a/src/nfv/nfv.c
> +++ b/src/nfv/nfv.c
> @@ -905,7 +905,7 @@ main(int argc, char *argv[])
> port_map_init();
>
> /* Check that there is an even number of ports to send/receive on. */
> - nb_ports = rte_eth_dev_count();
> + nb_ports = rte_eth_dev_count_avail();
> if (nb_ports > RTE_MAX_ETHPORTS)
> nb_ports = RTE_MAX_ETHPORTS;
>
>
--
Yasufumi Ogawa
NTT Network Service Systems Labs
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [spp] [PATCH 2/7] spp_primary: fix deprecated use of rte_eth_dev_count
2018-06-19 11:37 ` [spp] [PATCH 2/7] spp_primary: " Kenta Shinohara
@ 2018-06-21 10:52 ` Yasufumi Ogawa
0 siblings, 0 replies; 17+ messages in thread
From: Yasufumi Ogawa @ 2018-06-21 10:52 UTC (permalink / raw)
To: Kenta Shinohara, spp, ferruh.yigit
On 2018/06/19 20:37, Kenta Shinohara wrote:
> This patch is same as previous one.
>
> Signed-off-by: Kenta Shinohara <shinohara.kenta@lab.ntt.co.jp>
Thanks!
Acked-by: Yasufumi Ogawa <ogawa.yasufumi@lab.ntt.co.jp>
>
> ---
> src/primary/init.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/src/primary/init.c b/src/primary/init.c
> index 2630783..5c9f15c 100644
> --- a/src/primary/init.c
> +++ b/src/primary/init.c
> @@ -145,7 +145,7 @@ init(int argc, char *argv[])
> argv += retval;
>
> /* get total number of ports */
> - total_ports = rte_eth_dev_count();
> + total_ports = rte_eth_dev_count_avail();
>
> /* set up array for port data */
> if (rte_eal_process_type() == RTE_PROC_SECONDARY) {
>
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [spp] [PATCH 3/7] spp_vm: fix deprecated use of rte_eth_dev_count
2018-06-19 11:37 ` [spp] [PATCH 3/7] spp_vm: " Kenta Shinohara
@ 2018-06-21 10:52 ` Yasufumi Ogawa
0 siblings, 0 replies; 17+ messages in thread
From: Yasufumi Ogawa @ 2018-06-21 10:52 UTC (permalink / raw)
To: Kenta Shinohara, spp, ferruh.yigit
On 2018/06/19 20:37, Kenta Shinohara wrote:
> This patch is same as previous one.
>
> Signed-off-by: Kenta Shinohara <shinohara.kenta@lab.ntt.co.jp>
Thanks!
Acked-by: Yasufumi Ogawa <ogawa.yasufumi@lab.ntt.co.jp>
>
> ---
> src/vm/init.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/src/vm/init.c b/src/vm/init.c
> index fb9b7ec..7714b56 100644
> --- a/src/vm/init.c
> +++ b/src/vm/init.c
> @@ -102,7 +102,7 @@ init(int argc, char *argv[])
> argv += retval;
>
> /* get total number of ports */
> - total_ports = rte_eth_dev_count();
> + total_ports = rte_eth_dev_count_avail();
>
> /* set up array for port data */
> mz = rte_memzone_lookup(MZ_PORT_INFO);
>
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [spp] [PATCH 4/7] spp_vf: fix deprecated use of rte_eth_dev_count
2018-06-19 11:37 ` [spp] [PATCH 4/7] spp_vf: " Kenta Shinohara
@ 2018-06-21 10:52 ` Yasufumi Ogawa
0 siblings, 0 replies; 17+ messages in thread
From: Yasufumi Ogawa @ 2018-06-21 10:52 UTC (permalink / raw)
To: Kenta Shinohara, spp, ferruh.yigit
On 2018/06/19 20:37, Kenta Shinohara wrote:
> This patch is same as previous one.
>
> Signed-off-by: Kenta Shinohara <shinohara.kenta@lab.ntt.co.jp>
Thanks!
Acked-by: Yasufumi Ogawa <ogawa.yasufumi@lab.ntt.co.jp>
>
> ---
> src/vf/spp_vf.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/src/vf/spp_vf.c b/src/vf/spp_vf.c
> index fb45b83..32f25fd 100644
> --- a/src/vf/spp_vf.c
> +++ b/src/vf/spp_vf.c
> @@ -774,7 +774,7 @@ set_nic_interface(void)
> int nic_cnt = 0;
>
> /* NIC Setting */
> - g_iface_info.num_nic = rte_eth_dev_count();
> + g_iface_info.num_nic = rte_eth_dev_count_avail();
> if (g_iface_info.num_nic > RTE_MAX_ETHPORTS)
> g_iface_info.num_nic = RTE_MAX_ETHPORTS;
>
>
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [spp] [PATCH 5/7] spp_vm: fix changing spec of rte_mem_config
2018-06-19 11:37 ` [spp] [PATCH 5/7] spp_vm: fix changing spec of rte_mem_config Kenta Shinohara
@ 2018-06-21 10:53 ` Yasufumi Ogawa
0 siblings, 0 replies; 17+ messages in thread
From: Yasufumi Ogawa @ 2018-06-21 10:53 UTC (permalink / raw)
To: Kenta Shinohara, spp, ferruh.yigit
On 2018/06/19 20:37, Kenta Shinohara wrote:
> Spp_vm is encountered the following error on DPDK v18.05.
>
> build error:
> /home/k-shino/spp/src/vm/main.c: In function ‘get_memzone_by_addr’:
> /home/k-shino/spp/src/vm/main.c:321:14: error: ‘struct rte_mem_config’
> has no member named ‘memzone’
> tmp = &mcfg->memzone[i];
> ^
> /home/k-shino/.dpdkenv/versions/dpdk-18.05@x86_64-native-linuxapp-gcc/
> mk/internal/rte.compile-pre.mk:114: recipe for target 'main.o' failed
> make[3]: *** [main.o] Error 1
> /home/k-shino/.dpdkenv/versions/dpdk-18.05@x86_64-native-linuxapp-gcc/
> mk/rte.extapp.mk:14: recipe for target 'all' failed make[2]: *** [all]
> Error 2
> /home/k-shino/.dpdkenv/versions/dpdk-18.05@x86_64-native-linuxapp-gcc/
> mk/rte.extsubdir.mk:21: recipe for target 'vm' failed make[1]: *** [vm
> ] Error 2
> /home/k-shino/.dpdkenv/versions/dpdk-18.05@x86_64-native-linuxapp-gcc/
> mk/rte.extsubdir.mk:21: recipe for target 'src' failed make: *** [src]
> Error 2
>
> This error caused by changing specification of struct 'rte_fbarray'.
> To fix this, use 'rte_fbarray_get' and experimental method
> 'rte_fbarray_find_next_used' instead of array 'memzone[]'.
>
> Signed-off-by: Kenta Shinohara <shinohara.kenta@lab.ntt.co.jp>
Thanks!
Acked-by: Yasufumi Ogawa <ogawa.yasufumi@lab.ntt.co.jp>
>
> ---
> src/vm/main.c | 11 +++++++----
> 1 file changed, 7 insertions(+), 4 deletions(-)
>
> diff --git a/src/vm/main.c b/src/vm/main.c
> index 94ba8d1..6522d55 100644
> --- a/src/vm/main.c
> +++ b/src/vm/main.c
> @@ -340,19 +340,22 @@ get_memzone_by_addr(const void *addr)
> {
> struct rte_memzone *tmp, *mz;
> struct rte_mem_config *mcfg;
> + struct rte_fbarray *arr;
> int i;
>
> mcfg = rte_eal_get_configuration()->mem_config;
> + arr = &mcfg->memzones;
> mz = NULL;
>
> /* find memzone for the ring */
> - for (i = 0; i < RTE_MAX_MEMZONE; i++) {
> - tmp = &mcfg->memzone[i];
> -
> - if (tmp->addr_64 == (uint64_t) addr) {
> + i = rte_fbarray_find_next_used(arr, 0);
> + while (i >= 0) {
> + tmp = rte_fbarray_get(arr, i);
> + if (mz->addr_64 == (uint64_t) addr) {
> mz = tmp;
> break;
> }
> + i = rte_fbarray_find_next_used(arr, i+1);
> }
>
> return mz;
>
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [spp] [PATCH 6/7] shared: fix for updating API of DPDK v18.05
2018-06-19 11:37 ` [spp] [PATCH 6/7] shared: fix for updating API of DPDK v18.05 Kenta Shinohara
@ 2018-06-21 10:53 ` Yasufumi Ogawa
0 siblings, 0 replies; 17+ messages in thread
From: Yasufumi Ogawa @ 2018-06-21 10:53 UTC (permalink / raw)
To: Kenta Shinohara, spp, ferruh.yigit
On 2018/06/19 20:37, Kenta Shinohara wrote:
> An error has occured while executing spp primary.
>
> execution error:
> k-shino@tyrannosaurus:~/dpdk1805/spp$ sudo ./src/primary/x86_64-native
> -linuxapp-gcc/spp_primary -l 2 -n 4 --socket-mem 512 --huge-dir=/dev/h
> ugepages --proc-type=primary -- -p 0x02 -n 1 -s 192.168.122.1:5555
> EAL: Detected 6 lcore(s)
> EAL: Detected 1 NUMA nodes
> EAL: Multi-process socket /var/run/.rte_unix
> EAL: Probing VFIO support...
> EAL: VFIO support initialized
> EAL: PCI device 0000:00:19.0 on NUMA socket 0
> EAL: probe driver: 8086:153a net_e1000_em
> EAL: PCI device 0000:04:00.0 on NUMA socket 0
> EAL: probe driver: 8086:105e net_e1000_em
> EAL: PCI device 0000:04:00.1 on NUMA socket 0
> EAL: probe driver: 8086:105e net_e1000_em
> APP: Port 1 init ... eth_em_tx_queue_setup(): 0xcd1680: Tx queue offlo
> ads 0x801d don't match port offloads 0x0 or supported port offloads 0x
> f or supported queue offloads 0xf
> EAL: Error - exiting with code: 1
> Cause: Cannot initialise port 0
>
> This error is caused by updating API of 'eth_em_tx_queue_setup()'.
> To fix this, replace 5th argument of the method from 'NULL', which is
> referenced from examples/l2fwd/main.c.
>
> Signed-off-by: Kenta Shinohara <shinohara.kenta@lab.ntt.co.jp>
Thanks!
Acked-by: Yasufumi Ogawa <ogawa.yasufumi@lab.ntt.co.jp>
>
> ---
> src/shared/common.c | 13 ++++++++++++-
> 1 file changed, 12 insertions(+), 1 deletion(-)
>
> diff --git a/src/shared/common.c b/src/shared/common.c
> index b11cb6d..10115d1 100644
> --- a/src/shared/common.c
> +++ b/src/shared/common.c
> @@ -115,10 +115,21 @@ init_port(uint16_t port_num, struct rte_mempool *pktmbuf_pool)
> const uint16_t tx_ring_size = RTE_MP_TX_DESC_DEFAULT;
> uint16_t q;
> int retval;
> + struct rte_eth_dev_info dev_info;
> + struct rte_eth_conf local_port_conf = port_conf;
> + struct rte_eth_txconf txq_conf;
>
> RTE_LOG(INFO, APP, "Port %u init ... ", port_num);
> fflush(stdout);
>
> + rte_eth_dev_info_get(port_num, &dev_info);
> + if (dev_info.tx_offload_capa & DEV_TX_OFFLOAD_MBUF_FAST_FREE)
> + local_port_conf.txmode.offloads |=
> + DEV_TX_OFFLOAD_MBUF_FAST_FREE;
> + txq_conf = dev_info.default_txconf;
> + txq_conf.txq_flags = ETH_TXQ_FLAGS_IGNORE;
> + txq_conf.offloads = local_port_conf.txmode.offloads;
> +
> /*
> * Standard DPDK port initialisation - config port, then set up
> * rx and tx rings
> @@ -137,7 +148,7 @@ init_port(uint16_t port_num, struct rte_mempool *pktmbuf_pool)
>
> for (q = 0; q < tx_rings; q++) {
> retval = rte_eth_tx_queue_setup(port_num, q, tx_ring_size,
> - rte_eth_dev_socket_id(port_num), NULL);
> + rte_eth_dev_socket_id(port_num), &txq_conf);
> if (retval < 0)
> return retval;
> }
>
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [spp] [PATCH 7/7] spp_vm: add DALLOW_EXPERIMENTAL_API on CFLAGS
2018-06-19 11:37 ` [spp] [PATCH 7/7] spp_vm: add DALLOW_EXPERIMENTAL_API on CFLAGS Kenta Shinohara
@ 2018-06-21 10:54 ` Yasufumi Ogawa
0 siblings, 0 replies; 17+ messages in thread
From: Yasufumi Ogawa @ 2018-06-21 10:54 UTC (permalink / raw)
To: Kenta Shinohara, spp, ferruh.yigit
On 2018/06/19 20:37, Kenta Shinohara wrote:
> According to the spec change of DPDK API, spp_vm requires to use
> experimental method 'rte_fbarray_find_next_used'.
> (See commit 8adf77c46fcf ("spp_vm: fix changing spec of rte_mem_config")
> for detail of change)
> To avoid compile warning, add '-DALLOW_EXPERIMENTAL_API' flag
> to CFLAGS parameter.
>
> Signed-off-by: Kenta Shinohara <shinohara.kenta@lab.ntt.co.jp>
Thanks!
Acked-by: Yasufumi Ogawa <ogawa.yasufumi@lab.ntt.co.jp>
>
> ---
> src/vm/Makefile | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/src/vm/Makefile b/src/vm/Makefile
> index 8996d84..2d7d402 100644
> --- a/src/vm/Makefile
> +++ b/src/vm/Makefile
> @@ -51,6 +51,7 @@ SRCS-y := main.c init.c args.c ../shared/common.c
>
> INC := $(wildcard *.h)
>
> +CFLAGS += -DALLOW_EXPERIMENTAL_API
> CFLAGS += $(WERROR_FLAGS) -O3
> CFLAGS += -I$(SRCDIR)/../shared
>
>
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [spp] [PATCH 0/7] patches for DPDK v18.05
2018-06-21 10:49 ` [spp] [PATCH 0/7] patches for DPDK v18.05 Yasufumi Ogawa
@ 2018-08-15 15:44 ` Ferruh Yigit
0 siblings, 0 replies; 17+ messages in thread
From: Ferruh Yigit @ 2018-08-15 15:44 UTC (permalink / raw)
To: Yasufumi Ogawa, Kenta Shinohara, spp
On 6/21/2018 11:49 AM, Yasufumi Ogawa wrote:
> On 2018/06/19 20:37, Kenta Shinohara wrote:
>> Hi,
>>
>> These patches are fixing for SPP's compile and execution error
>> on DPDK v18.05.
> I confirmed that the compile error is fixed and works it works fine on my Ubuntu 16.04 environment. Very thanks for your
> contribution!
Series applied, thanks.
>
> Yasufumi
>>
>> Kenta Shinohara (7):
>> spp_nfv: fix deprecated use of rte_eth_dev_count
>> spp_primary: fix deprecated use of rte_eth_dev_count
>> spp_vm: fix deprecated use of rte_eth_dev_count
>> spp_vf: fix deprecated use of rte_eth_dev_count
>> spp_vm: fix changing spec of rte_mem_config
>> shared: fix for updating API of DPDK v18.05
>> spp_vm: add DALLOW_EXPERIMENTAL_API on CFLAGS
^ permalink raw reply [flat|nested] 17+ messages in thread
end of thread, other threads:[~2018-08-15 15:44 UTC | newest]
Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-06-19 11:37 [spp] [PATCH 0/7] patches for DPDK v18.05 Kenta Shinohara
2018-06-19 11:37 ` [spp] [PATCH 1/7] spp_nfv: fix deprecated use of rte_eth_dev_count Kenta Shinohara
2018-06-21 10:51 ` Yasufumi Ogawa
2018-06-19 11:37 ` [spp] [PATCH 2/7] spp_primary: " Kenta Shinohara
2018-06-21 10:52 ` Yasufumi Ogawa
2018-06-19 11:37 ` [spp] [PATCH 3/7] spp_vm: " Kenta Shinohara
2018-06-21 10:52 ` Yasufumi Ogawa
2018-06-19 11:37 ` [spp] [PATCH 4/7] spp_vf: " Kenta Shinohara
2018-06-21 10:52 ` Yasufumi Ogawa
2018-06-19 11:37 ` [spp] [PATCH 5/7] spp_vm: fix changing spec of rte_mem_config Kenta Shinohara
2018-06-21 10:53 ` Yasufumi Ogawa
2018-06-19 11:37 ` [spp] [PATCH 6/7] shared: fix for updating API of DPDK v18.05 Kenta Shinohara
2018-06-21 10:53 ` Yasufumi Ogawa
2018-06-19 11:37 ` [spp] [PATCH 7/7] spp_vm: add DALLOW_EXPERIMENTAL_API on CFLAGS Kenta Shinohara
2018-06-21 10:54 ` Yasufumi Ogawa
2018-06-21 10:49 ` [spp] [PATCH 0/7] patches for DPDK v18.05 Yasufumi Ogawa
2018-08-15 15:44 ` Ferruh Yigit
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).