DPDK patches and discussions
 help / color / mirror / Atom feed
From: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>
To: "Wu, Jingjing" <jingjing.wu@intel.com>
Cc: "'dev@dpdk.org'" <dev@dpdk.org>, Felix Marti <felix@chelsio.com>,
	Nirranjan Kirubaharan <nirranjan@chelsio.com>,
	Kumar A S <kumaras@chelsio.com>
Subject: Re: [dpdk-dev] [RFC v2 1/2] ethdev: add packet filter flow and new behavior switch to fdir
Date: Thu, 14 Jan 2016 18:47:30 +0530	[thread overview]
Message-ID: <20160114131728.GA2434@scalar.blr.asicdesigners.com> (raw)
In-Reply-To: <9BB6961774997848B5B42BEC655768F8D85DED@SHSMSX104.ccr.corp.intel.com>

Hi Jingjing,

On Thursday, January 01/14/16, 2016 at 00:48:17 -0800, Wu, Jingjing wrote:
> Hi, Rahul
> 
> Just another thought, please consider about it:
> 
> Add a new flow type like
> 
> #define RTE_ETH_FLOW_IPV6_UDP_EX        17
> +#define RTE_ETH_FLOW_RAW_PKT             18
> 
> Then add a new item in rte_eth_fdir_flow
> union rte_eth_fdir_flow {
> 	struct rte_eth_l2_flow     l2_flow;
> 	struct rte_eth_udpv4_flow  udp4_flow;
> 	struct rte_eth_tcpv4_flow  tcp4_flow;
> 	struct rte_eth_sctpv4_flow sctp4_flow;
> 	struct rte_eth_ipv4_flow   ip4_flow;
> 	struct rte_eth_udpv6_flow  udp6_flow;
> 	struct rte_eth_tcpv6_flow  tcp6_flow;
> 	struct rte_eth_sctpv6_flow sctp6_flow;
> 	struct rte_eth_ipv6_flow   ipv6_flow;
> 	struct rte_eth_mac_vlan_flow mac_vlan_flow;
> 	struct rte_eth_tunnel_flow   tunnel_flow;
> +	uint8_t raw_pkt[80];
> };
> 
> Then add mask item in rte_eth_fdir_input:
> 
> struct rte_eth_fdir_input {
> 	uint16_t flow_type;
> 	union rte_eth_fdir_flow flow;
> +	union rte_eth_fdir_flow flow_mask;
> 	/**< Flow fields to match, dependent on flow_type */
> 	struct rte_eth_fdir_flow_ext flow_ext;
> 	/**< Additional fields to match */
> };
> 
> Then the filter can be added just in a format of raw packet, it looks generic, and even other NIC can use this too.
> 
> Thanks
> Jingjing

This approach seems generic enough to allow any vendor specific data
to be passed in filter as well.  However, 80 seems to be too low for
multiple flow types that can be combined in the same filter rule.
I think size of 256 seems reasonable.

Could the same thing be done for action arguments as well? Can we add
the same generic info to rte_eth_fdir_action too?

struct rte_eth_fdir_action {
        uint16_t rx_queue;
	enum rte_eth_fdir_behavior behavior;
	enum rte_eth_fdir_status report_status;
	uint8_t flex_off;
+       uint8_t behavior_arg[256];
};

This way, we can pass vendor specific action arguments too. What do
you think?

Also, now if we take this approach then, I am wondering, that all
vendors would need to document their own vendor-specific format of
taking filter match and filter action arguments, right?

And probably, even come up with their own example application showing
how to apply filters via dpdk on their card?

Thanks,
Rahul

  reply	other threads:[~2016-01-14 13:18 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
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 [this message]
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=20160114131728.GA2434@scalar.blr.asicdesigners.com \
    --to=rahul.lakkireddy@chelsio.com \
    --cc=dev@dpdk.org \
    --cc=felix@chelsio.com \
    --cc=jingjing.wu@intel.com \
    --cc=kumaras@chelsio.com \
    --cc=nirranjan@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).