DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Wu, Jingjing" <jingjing.wu@intel.com>
To: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>,
	"dev@dpdk.org" <dev@dpdk.org>
Cc: Kumar Sanghvi <kumaras@chelsio.com>,
	Felix Marti <felix@chelsio.com>,
	Nirranjan Kirubaharan <nirranjan@chelsio.com>
Subject: Re: [dpdk-dev] [RFC v2 1/2] ethdev: add packet filter flow and new	behavior switch to fdir
Date: Wed, 13 Jan 2016 01:12:47 +0000	[thread overview]
Message-ID: <9BB6961774997848B5B42BEC655768F8D74B6B@SHSMSX104.ccr.corp.intel.com> (raw)
In-Reply-To: <ba130385fe9b7af56d558d0e486a43c6e52ca169.1450448999.git.rahul.lakkireddy@chelsio.com>

> 
> diff --git a/lib/librte_ether/rte_eth_ctrl.h b/lib/librte_ether/rte_eth_ctrl.h
> index ce224ad..5cc22a0 100644
> --- a/lib/librte_ether/rte_eth_ctrl.h
> +++ b/lib/librte_ether/rte_eth_ctrl.h
> @@ -74,7 +74,11 @@ extern "C" {
>  #define RTE_ETH_FLOW_IPV6_EX            15
>  #define RTE_ETH_FLOW_IPV6_TCP_EX        16
>  #define RTE_ETH_FLOW_IPV6_UDP_EX        17
> -#define RTE_ETH_FLOW_MAX                18
> +#define RTE_ETH_FLOW_PKT_FILTER_IPV4_TCP 18 #define
> +RTE_ETH_FLOW_PKT_FILTER_IPV4_UDP 19 #define
> +RTE_ETH_FLOW_PKT_FILTER_IPV6_TCP 20 #define
> +RTE_ETH_FLOW_PKT_FILTER_IPV6_UDP 21
> +#define RTE_ETH_FLOW_MAX                22
> 
How to distinguish RTE_ETH_FLOW_PKT_FILTER_IPV4_XX with RTE_ETH_FLOW_NONFRAG_IPV4_XX, what is the difference?
>  /**
>   * Feature filter types
> @@ -407,6 +411,9 @@ struct rte_eth_l2_flow {  struct rte_eth_ipv4_flow {
>  	uint32_t src_ip;      /**< IPv4 source address to match. */
>  	uint32_t dst_ip;      /**< IPv4 destination address to match. */
> +	uint8_t tos;          /**< IPV4 type of service to match. */
> +	uint8_t proto;        /**< IPV4 proto to match. */
> +	uint8_t ttl;          /**< IPV4 time to live to match. */
>  };
> 
>  /**
> @@ -443,6 +450,10 @@ struct rte_eth_sctpv4_flow {  struct
> rte_eth_ipv6_flow {
>  	uint32_t src_ip[4];      /**< IPv6 source address to match. */
>  	uint32_t dst_ip[4];      /**< IPv6 destination address to match. */
> +	uint8_t  tc;             /**< IPv6 traffic class to match. */
> +	uint32_t flow_label;     /**< IPv6 flow label to match. */
> +	uint8_t  next_header;    /**< IPv6 next header to match. */
> +	uint8_t  hop_limit;      /**< IPv6 hop limits to match. */
>  };
> 
There is also a patch http://dpdk.org/dev/patchwork/patch/9661/ which added these fields. Maybe we can merge them together.
> +struct rte_eth_pkt_filter_flow {
> +	enum rte_eth_pkt_filter_type type;   /**< Type of filter */
> +	enum rte_eth_pkt_filter_type prio;
> +	/**< Prioritize the filter type when a packet matches several types */
> +	struct rte_eth_pkt_filter pkt;      /**< Packet fields to match. */
> +	struct rte_eth_pkt_filter mask;     /**< Mask for matched fields. */
> +};
> +
> +/**
>   * An union contains the inputs for all types of flow
>   */
>  union rte_eth_fdir_flow {
> @@ -514,6 +570,7 @@ union rte_eth_fdir_flow {
>  	struct rte_eth_ipv6_flow   ipv6_flow;
>  	struct rte_eth_mac_vlan_flow mac_vlan_flow;
>  	struct rte_eth_tunnel_flow   tunnel_flow;
> +	struct rte_eth_pkt_filter_flow pkt_filter_flow;
>  };
Why not use rte_eth_XX_flow directly but add a new one? Is it because of the mask? If so, how about to add a field in rte_eth_fdir_input like:
struct rte_eth_fdir_input {
    uint16_t flow_type;
    union rte_eth_fdir_flow flow;
    /**< Flow fields to match, dependent on flow_type */
    union rte_eth_fdir_flow flow_mask;
    struct rte_eth_fdir_flow_ext flow_ext;
    /**< Additional fields to match */
};

Thanks
Jingjing

  reply	other threads:[~2016-01-13  1:13 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-10 14:01 [dpdk-dev] [RFC 0/3] ethdev: Enhancements to flow director filter Rahul Lakkireddy
2015-12-10 14:01 ` [dpdk-dev] [RFC 1/3] ethdev: add packet filter flow and new behavior switch to fdir Rahul Lakkireddy
2015-12-10 15:46   ` Chilikin, Andrey
2015-12-11  7:08     ` Rahul Lakkireddy
2015-12-10 14:01 ` [dpdk-dev] [RFC 2/3] testpmd: add an example to show packet filter flow Rahul Lakkireddy
2015-12-10 14:01 ` [dpdk-dev] [RFC 3/3] doc: announce ABI change for filtering support Rahul Lakkireddy
2015-12-15  8:40   ` Rahul Lakkireddy
2015-12-15  8:55     ` Thomas Monjalon
2015-12-15 13:51       ` Rahul Lakkireddy
2015-12-15 13:57         ` Thomas Monjalon
2015-12-23 12:41 ` [dpdk-dev] [RFC v2 0/2] ethdev: Enhancements to flow director filter Rahul Lakkireddy
2015-12-23 12:41   ` [dpdk-dev] [RFC v2 1/2] ethdev: add packet filter flow and new behavior switch to fdir Rahul Lakkireddy
2016-01-13  1:12     ` Wu, Jingjing [this message]
2016-01-13  8:49       ` Rahul Lakkireddy
2016-01-13 13:16         ` Wu, Jingjing
2016-01-14  8:48           ` Wu, Jingjing
2016-01-14 13:17             ` Rahul Lakkireddy
2016-01-15  1:30               ` Wu, Jingjing
2016-01-15  7:11                 ` Rahul Lakkireddy
2015-12-23 12:41   ` [dpdk-dev] [RFC v2 2/2] testpmd: add an example to show packet filter flow Rahul Lakkireddy
2016-01-11 13:50   ` [dpdk-dev] [RFC v2 0/2] ethdev: Enhancements to flow director filter Rahul Lakkireddy

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=9BB6961774997848B5B42BEC655768F8D74B6B@SHSMSX104.ccr.corp.intel.com \
    --to=jingjing.wu@intel.com \
    --cc=dev@dpdk.org \
    --cc=felix@chelsio.com \
    --cc=kumaras@chelsio.com \
    --cc=nirranjan@chelsio.com \
    --cc=rahul.lakkireddy@chelsio.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).