DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Liu, Jijiang" <jijiang.liu@intel.com>
To: Thomas Monjalon <thomas.monjalon@6wind.com>
Cc: "dev@dpdk.org" <dev@dpdk.org>
Subject: Re: [dpdk-dev] [PATCH v2 3/7]rte_ether:add API of VxLAN packet filter in librte_ether
Date: Thu, 28 Aug 2014 00:55:58 +0000	[thread overview]
Message-ID: <1ED644BD7E0A5F4091CF203DAFB8E4CC01D6319C@SHSMSX101.ccr.corp.intel.com> (raw)
In-Reply-To: <3586297.ZW2M4AoP7m@xps13>



> -----Original Message-----
> From: Thomas Monjalon [mailto:thomas.monjalon@6wind.com]
> Sent: Wednesday, August 27, 2014 11:12 PM
> To: Liu, Jijiang
> Cc: dev@dpdk.org
> Subject: Re: [dpdk-dev] [PATCH v2 3/7]rte_ether:add API of VxLAN packet filter
> in librte_ether
> 
> 2014-08-26 15:31, Jijiang Liu:
> > +enum rte_tunnel_filter_type {
> > +	RTE_TUNNEL_FILTER_TYPE_NONE = 0,
> > +	RTE_TUNNEL_FILTER_IMAC_IVLAN, /**< Filter by inner MAC and VLAN ID.
> */
> > +	RTE_TUNNEL_FILTER_IMAC_IVLAN_TENID,
> > +	/**< Filter by inner MAC address and VLAN ID, tenned ID. */
> > +	RTE_TUNNEL_FILTER_IMAC_TENID, /**< Filter by inner MAC and tenant
> ID. */
> > +	RTE_TUNNEL_FILTER_IMAC, /**< Filter by inner MAC address */
> > +	RTE_TUNNEL_FILTER_OMAC_TENID_IMAC,
> > +	/**< Filter by outer MAC address, tenant ID and Inner MAC */
> > +	RTE_TUNNEL_FILTER_TYPE_MAX,
> > +};
> [...]
> >  /**
> > + * 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. */
> > +	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. */
> > +};
> [...]
> > +typedef int (*eth_tunnel_filter_set_t)(struct rte_eth_dev *dev,
> > +				      struct rte_eth_tunnel_filter_conf *tunnel_filter,
> > +				      uint8_t filter_count, uint8_t add); /**< @internal
> Set
> > +tunnel filter */
> [...]
> > + /**
> > + * Add tunnel filter configuration of Ethernet device
> > + *
> > + * @param port_id
> > + *   The port identifier of the Ethernet device.
> > + * @param tunnel_filter
> > + *   Where to store the current Tunneling UDP configuration
> > + *   of the Ethernet device.
> > + * @param filter_count
> > + *   How many filters are going to added.
> > + * @param add
> > + *   0: remove tunnel filter
> > + *   1: add tunnel filter
> > + *
> > + * @return
> > + *   - (0) if successful.
> > + *   - (-ENODEV) if port identifier is invalid.
> > + *   - (-EINVAL) if bad parameter.
> > + *   - (-ENOTSUP) if hardware doesn't support tunnel type.
> > + */
> > +int
> > +rte_eth_dev_tunnel_filter_set(uint8_t port_id,
> > +			struct rte_eth_tunnel_filter_conf *tunnel_filter,
> > +			uint8_t filter_count, uint8_t add);
> 
> I wonder if we could use a common function to set all kind of filters?
> 
> Thoughts are welcome.
> 
> --
> Thomas

The rte_eth_dev_tunnel_filter_set() is a common filter function for tunneling packet, which can set all kind of filters.
But now I just implemented and tested VxLAN tunneling packet in this function, another tunneling packets support will be here later.
Look at the structure definition, which support another tunneling types. 
struct rte_eth_tunnel_filter_conf {
    ...
    enum rte_eth_tunnel_type tunnel_type; /**< Tunnel Type. */
    ...
}
--
Jijiang Liu

  reply	other threads:[~2014-08-28  0:51 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-26  7:31 [dpdk-dev] [PATCH v2 0/7]]Support VxLAN on Fortville Jijiang Liu
2014-08-26  7:31 ` [dpdk-dev] [PATCH v2 1/7]i40e:support VxLAN packet identification Jijiang Liu
2014-08-27 14:58   ` Thomas Monjalon
2014-08-28  1:33     ` Liu, Jijiang
2014-08-28  8:33       ` Thomas Monjalon
2014-08-26  7:31 ` [dpdk-dev] [PATCH v2 2/7]]app/test-pmd:test " Jijiang Liu
2014-08-26  7:31 ` [dpdk-dev] [PATCH v2 3/7]rte_ether:add API of VxLAN packet filter in librte_ether Jijiang Liu
2014-08-27 15:12   ` Thomas Monjalon
2014-08-28  0:55     ` Liu, Jijiang [this message]
2014-08-28  8:36       ` Thomas Monjalon
2014-08-28 11:02         ` Liu, Jijiang
2014-08-28 12:31           ` Thomas Monjalon
2014-08-26  7:31 ` [dpdk-dev] [PATCH v2 4/7]i40e:implement API of VxLAN packet filter in librte_pmd_i40e Jijiang Liu
2014-08-26  7:31 ` [dpdk-dev] [PATCH v2 5/7]]app/testpmd:test VxLAN packet filter API Jijiang Liu
2014-08-26  7:31 ` [dpdk-dev] [PATCH v2 6/7]i40e:support VxLAN Tx checksum offload Jijiang Liu
2014-08-26  7:31 ` [dpdk-dev] [PATCH v2 7/7]app/testpmd:test " Jijiang Liu
2014-08-27  8:17 ` [dpdk-dev] [PATCH v2 0/7]]Support VxLAN on Fortville Liu, Yong

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1ED644BD7E0A5F4091CF203DAFB8E4CC01D6319C@SHSMSX101.ccr.corp.intel.com \
    --to=jijiang.liu@intel.com \
    --cc=dev@dpdk.org \
    --cc=thomas.monjalon@6wind.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).