From 0ed3d39215bbc54959bf8c9305233c69a11eacf4 Mon Sep 17 00:00:00 2001 From: whl739 Date: Thu, 14 Jun 2018 22:50:11 +0800 Subject: [PATCH] Config: if proc-id is not configured, use 0. --- .gitignore | 11 +++++++++++ lib/ff_config.c | 4 ++-- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 4474d47b..144d7e98 100644 --- a/.gitignore +++ b/.gitignore @@ -22,3 +22,14 @@ lib/vnode_if_newproto.h lib/vnode_if_typedef.h app/nginx-1.11.10/Makefile app/nginx-1.11.10/objs/ +tools/arp/arp +tools/ifconfig/ifconfig +tools/ipfw/ipfw +tools/netstat/netstat +tools/netstat/nl_defs.h +tools/netstat/nl_symbols.c +tools/ngctl/ngctl +tools/route/keywords.h +tools/route/route +tools/sysctl/sysctl +tools/top/top diff --git a/lib/ff_config.c b/lib/ff_config.c index aab8627b..77070b24 100644 --- a/lib/ff_config.c +++ b/lib/ff_config.c @@ -523,8 +523,8 @@ ff_parse_args(struct ff_config *cfg, int argc, char *const argv[]) } if ((uint16_t)cfg->dpdk.proc_id > RTE_MAX_LCORE) { - printf("proc_id:%d is too large\n", cfg->dpdk.proc_id); - return -1; + printf("invalid proc_id:%d, use default 0\n", cfg->dpdk.proc_id); + cfg->dpdk.proc_id = 0; } return 0;