> -----Original Message----- > From: dev [mailto:dev-bounces at dpdk.org] On Behalf Of Jijiang Liu > Sent: Saturday, October 11, 2014 6:56 AM > To: dev at dpdk.org > Subject: [dpdk-dev] [PATCH v5 4/8]librte_ether:add a common filter API > > Introduce a new filter framewok in librte_ether. As to the implemetation > discussion, please refer to > http://dpdk.org/ml/archives/dev/2014-September/005179.html, and VxLAN > tunnel filter implementation is based on > it. > > Signed-off-by: Jijiang Liu <jijiang.liu at intel.com> > Acked-by: Helin Zhang <helin.zhang at intel.com> > Acked-by: Jingjing Wu <jingjing.wu at intel.com> > > --- > lib/librte_ether/Makefile | 1 + > lib/librte_ether/rte_eth_ctrl.h | 152 > +++++++++++++++++++++++++++++++++++++++ > lib/librte_ether/rte_ethdev.c | 32 ++++++++ > lib/librte_ether/rte_ethdev.h | 56 +++++++++++--- > 4 files changed, 229 insertions(+), 12 deletions(-) > create mode 100644 lib/librte_ether/rte_eth_ctrl.h > [...] > +++ b/lib/librte_ether/rte_eth_ctrl.h
[...] > +/** > + * Tunnel Packet filter configuration. > + */ > +struct rte_eth_tunnel_filter_conf { > + struct ether_addr *outer_mac; /**< Outer MAC address fiter. */ > + struct ether_addr *inner_mac; /**< Inner MAC address fiter. */ > + uint16_t inner_vlan; /**< Inner VLAN fiter. */ > + enum rte_tunnel_iptype ip_type; /**< IP address type. */ > + union { > + uint32_t ipv4_addr; /**< IPv4 source address to match. */ > + uint32_t ipv6_addr[4]; /**< IPv6 source address to match. */ > + } ip_addr; /**< IPv4/IPv6 source address to match (union of above). > */ > + > + uint8_t filter_type; /**< Filter type. */ This should be enum rte_tunnel_filter_type filter_type, and not uint8_t filter_type. > + uint8_t to_queue; /**< Use MAC and VLAN to point to a queue. > */ > + enum rte_eth_tunnel_type tunnel_type; /**< Tunnel Type. */ > + uint32_t tenant_id; /** < Tenant number. */ > + uint16_t queue_id; /** < queue number. */ > +}; > + [...]