From b6730d93a13ace701d4f53adcdbbd7c50a90cfbd Mon Sep 17 00:00:00 2001 From: Ferruh Yigit Date: Thu, 5 Sep 2019 15:53:07 +0100 Subject: [PATCH] net/igb: fix global variable multiple definitions Filtering related global variables are defined in a header file which was causing multiple definitions of the variables, fixed it by moving them to the .c file. Issue has been detected by '-fno-common' gcc flag. Fixes: 22bb13410cb2 ("net/igb: create consistent filter") Fixes: 424ae915baf0 ("net/e1000: move RSS to flow API") Cc: stable@dpdk.org Signed-off-by: Ferruh Yigit --- drivers/net/e1000/e1000_ethdev.h | 12 ++++++------ drivers/net/e1000/igb_flow.c | 7 +++++++ 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/drivers/net/e1000/e1000_ethdev.h b/drivers/net/e1000/e1000_ethdev.h index 01ff9433b3..1e41ae9de1 100644 --- a/drivers/net/e1000/e1000_ethdev.h +++ b/drivers/net/e1000/e1000_ethdev.h @@ -351,17 +351,17 @@ struct igb_flow_mem { }; TAILQ_HEAD(igb_ntuple_filter_list, igb_ntuple_filter_ele); -struct igb_ntuple_filter_list igb_filter_ntuple_list; +extern struct igb_ntuple_filter_list igb_filter_ntuple_list; TAILQ_HEAD(igb_ethertype_filter_list, igb_ethertype_filter_ele); -struct igb_ethertype_filter_list igb_filter_ethertype_list; +extern struct igb_ethertype_filter_list igb_filter_ethertype_list; TAILQ_HEAD(igb_syn_filter_list, igb_eth_syn_filter_ele); -struct igb_syn_filter_list igb_filter_syn_list; +extern struct igb_syn_filter_list igb_filter_syn_list; TAILQ_HEAD(igb_flex_filter_list, igb_flex_filter_ele); -struct igb_flex_filter_list igb_filter_flex_list; +extern struct igb_flex_filter_list igb_filter_flex_list; TAILQ_HEAD(igb_rss_filter_list, igb_rss_conf_ele); -struct igb_rss_filter_list igb_filter_rss_list; +extern struct igb_rss_filter_list igb_filter_rss_list; TAILQ_HEAD(igb_flow_mem_list, igb_flow_mem); -struct igb_flow_mem_list igb_flow_list; +extern struct igb_flow_mem_list igb_flow_list; extern const struct rte_flow_ops igb_flow_ops; diff --git a/drivers/net/e1000/igb_flow.c b/drivers/net/e1000/igb_flow.c index 4e0b38fcf1..31ca9bb1c3 100644 --- a/drivers/net/e1000/igb_flow.c +++ b/drivers/net/e1000/igb_flow.c @@ -49,6 +49,13 @@ #define IGB_FLEX_RAW_NUM 12 +struct igb_flow_mem_list igb_flow_list; +struct igb_ntuple_filter_list igb_filter_ntuple_list; +struct igb_ethertype_filter_list igb_filter_ethertype_list; +struct igb_syn_filter_list igb_filter_syn_list; +struct igb_flex_filter_list igb_filter_flex_list; +struct igb_rss_filter_list igb_filter_rss_list; + /** * Please aware there's an asumption for all the parsers. * rte_flow_item is using big endian, rte_flow_attr and -- 2.20.1