Skip to content

Commit

Permalink
net/igb: fix global variable multiple definitions
Browse files Browse the repository at this point in the history
[ upstream commit b6730d9 ]

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: 22bb134 ("net/igb: create consistent filter")
Fixes: 424ae91 ("net/e1000: move RSS to flow API")

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
  • Loading branch information
Ferruh Yigit authored and kevintraynor committed Dec 9, 2019
1 parent 0616dbe commit e314e78
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 6 deletions.
12 changes: 6 additions & 6 deletions drivers/net/e1000/e1000_ethdev.h
Expand Up @@ -344,17 +344,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;

Expand Down
7 changes: 7 additions & 0 deletions drivers/net/e1000/igb_flow.c
Expand Up @@ -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
Expand Down

0 comments on commit e314e78

Please sign in to comment.