From: Kenta Shinohara <shinohara.kenta@lab.ntt.co.jp>
To: spp@dpdk.org, ferruh.yigit@intel.com
Cc: Kenta Shinohara <shinohara.kenta@lab.ntt.co.jp>
Subject: [spp] [PATCH 5/7] spp_vm: fix changing spec of rte_mem_config
Date: Tue, 19 Jun 2018 20:37:18 +0900 [thread overview]
Message-ID: <20180619113720.8336-6-shinohara.kenta@lab.ntt.co.jp> (raw)
In-Reply-To: <20180619113720.8336-1-shinohara.kenta@lab.ntt.co.jp>
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)
next prev parent reply other threads:[~2018-06-19 11:37 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
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 ` Kenta Shinohara [this message]
2018-06-21 10:53 ` [spp] [PATCH 5/7] spp_vm: fix changing spec of rte_mem_config 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180619113720.8336-6-shinohara.kenta@lab.ntt.co.jp \
--to=shinohara.kenta@lab.ntt.co.jp \
--cc=ferruh.yigit@intel.com \
--cc=spp@dpdk.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).