[spp] [PATCH 1/2] spp_nfv: add master lcore in status msg

ogawa.yasufumi at lab.ntt.co.jp ogawa.yasufumi at lab.ntt.co.jp
Wed May 8 03:59:28 CEST 2019


From: Yasufumi Ogawa <ogawa.yasufumi at lab.ntt.co.jp>

To know which one is master lcore is required for considering core
assignment if master is shared among mulit processes. This update is to
add master lcore ID in response of status command.

Signed-off-by: Yasufumi Ogawa <ogawa.yasufumi at lab.ntt.co.jp>
---
 src/nfv/nfv_status.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/nfv/nfv_status.c b/src/nfv/nfv_status.c
index d29e083..7e3dbd4 100644
--- a/src/nfv/nfv_status.c
+++ b/src/nfv/nfv_status.c
@@ -55,6 +55,8 @@ append_lcore_info_json(char *str,
 		uint8_t lcore_id_used[RTE_MAX_LCORE])
 {
 	int i;
+	sprintf(str + strlen(str), "\"master-lcore\":%d,",
+			rte_get_master_lcore());
 	sprintf(str + strlen(str), "\"lcores\":[");
 	for (i = 0; i < RTE_MAX_LCORE; i++) {
 		if (lcore_id_used[i] == 1)
-- 
2.17.1



More information about the spp mailing list