From: "Wu, Jingjing" <jingjing.wu@intel.com>
To: Thomas Monjalon <thomas.monjalon@6wind.com>
Cc: "dev@dpdk.org" <dev@dpdk.org>
Subject: Re: [dpdk-dev] [PATCH v4 04/21] ethdev: define structures for adding/deleting flow director
Date: Tue, 28 Oct 2014 01:18:27 +0000 [thread overview]
Message-ID: <9BB6961774997848B5B42BEC655768F8B2467E@SHSMSX104.ccr.corp.intel.com> (raw)
In-Reply-To: <3042428.RIRLHjG5pO@xps13>
Hi, Thomas
> -----Original Message-----
> From: Thomas Monjalon [mailto:thomas.monjalon@6wind.com]
> Sent: Tuesday, October 28, 2014 12:58 AM
> To: Wu, Jingjing
> Cc: dev@dpdk.org
> Subject: Re: [dpdk-dev] [PATCH v4 04/21] ethdev: define structures for
> adding/deleting flow director
>
> 2014-10-22 09:01, Jingjing Wu:
> > +/**
> > + * A structure used to define the input for IPV4 UDP flow */ struct
> > +rte_eth_udpv4_flow {
> > + uint32_t src_ip; /**< IPv4 source address to match. */
> > + uint32_t dst_ip; /**< IPv4 destination address to match. */
> > + uint16_t src_port; /**< UDP Source port to match. */
> > + uint16_t dst_port; /**< UDP Destination port to match. */
> > +};
> > +
> > +/**
> > + * A structure used to define the input for IPV4 TCP flow */ struct
> > +rte_eth_tcpv4_flow {
> > + uint32_t src_ip; /**< IPv4 source address to match. */
> > + uint32_t dst_ip; /**< IPv4 destination address to match. */
> > + uint16_t src_port; /**< TCP Source port to match. */
> > + uint16_t dst_port; /**< TCP Destination port to match. */
> > +};
> > +
> > +/**
> > + * A structure used to define the input for IPV4 SCTP flow */ struct
> > +rte_eth_sctpv4_flow {
> > + uint32_t src_ip; /**< IPv4 source address to match. */
> > + uint32_t dst_ip; /**< IPv4 destination address to match. */
> > + uint32_t verify_tag; /**< verify tag to match */
> > +};
> > +
> > +/**
> > + * A structure used to define the input for IPV4 flow */ struct
> > +rte_eth_ipv4_flow {
> > + uint32_t src_ip; /**< IPv4 source address to match. */
> > + uint32_t dst_ip; /**< IPv4 destination address to match. */
> > +};
>
> Why not defining only 1 structure?
> struct rte_eth_ipv4_flow {
> uint32_t src_ip;
> uint32_t dst_ip;
> uint16_t src_port;
> uint16_t dst_port;
> uint32_t sctp_tag;
> };
>
> I think the same structure could be used for many filters (not only flow
> director).
>
Yes, one structure can contain all the elements we need, but I think it will be clearer that each kind of flow type has its key words.
> > +#define RTE_ETH_FDIR_MAX_FLEXWORD_LEN 8
> > +/**
> > + * A structure used to contain extend input of flow */ struct
> > +rte_eth_fdir_flow_ext {
> > + uint16_t vlan_tci;
> > + uint8_t num_flexwords; /**< number of flexwords */
> > + uint16_t flexwords[RTE_ETH_FDIR_MAX_FLEXWORD_LEN];
> > + uint16_t dest_id; /**< destination vsi or pool id*/
> > +};
>
> Flexword should be explained.
>
The flexword means the application can choose a part of packet's payload as key words to compare match. It is flexible. In Ixgbe, the flexwords is 1 word (2 bytes), while Fortville extend it to 8 words.
> > +/**
> > + * A structure used to define the input for an flow director filter
> > +entry
>
> typo: for *a* flow director
Yes, will change.
>
> > + */
> > +struct rte_eth_fdir_input {
> > + enum rte_eth_flow_type flow_type; /**< type of flow */
> > + union rte_eth_fdir_flow flow; /**< specific flow structure */
> > + struct rte_eth_fdir_flow_ext flow_ext; /**< specific flow info */ };
>
> I don't understand the logic behind flow/flow_ext.
> Why flow_ext is not merged into flow ?
>
The flow defines the key words for each flow_type, while the flow_ext has other elements which have little to do with flow_type. For example the flexword, dst_id (can used as pool id), I think it is not reasonable to make it as an element in the flow.
> > +/**
> > + * Flow director report status
> > + */
> > +enum rte_eth_fdir_status {
> > + RTE_ETH_FDIR_NO_REPORT_STATUS = 0, /**< no report FDIR. */
> > + RTE_ETH_FDIR_REPORT_FD_ID, /**< only report FD ID. */
> > + RTE_ETH_FDIR_REPORT_FD_ID_FLEX_4, /**< report FD ID and 4 flex
> bytes. */
> > + RTE_ETH_FDIR_REPORT_FLEX_8, /**< report 8 flex bytes. */
> > +};
>
> The names and explanations are cryptics.
The enum defines what will be reported when FIR match. Can be FD_ID or flex bytes
> Is FD redundant with FDIR?
Yes, good point. Will remove FD.
>
> > +/**
> > + * A structure used to define an action when match FDIR packet filter.
> > + */
> > +struct rte_eth_fdir_action {
> > + uint16_t rx_queue; /**< queue assigned to if fdir match. */
> > + uint16_t cnt_idx; /**< statistic counter index */
>
> what is the action of "statistic counter index"?
When FD match happened, the counter will increase. Fortville can support to configure the different counter for filter entries. The action is a part of a filter entry, so this element means which counter the entry will use.
>
> > + uint8_t drop; /**< accept or reject */
> > + uint8_t flex_off; /**< offset used define words to report */
>
> still difficult to understand the flex logic
Just as mentioned above, Fortville can support 8 flex words comparing. But for reporting, only 4 or 8 bytes in the flex words can be reported. So need to specify the offset to choose the 4 or 8 bytes.
>
> > + enum rte_eth_fdir_status report_status; /**< status report option
> > +*/ };
>
> > +/**
> > + * A structure used to define the flow director filter entry by
> > +filter_ctl API
> > + * to support RTE_ETH_FILTER_FDIR with RTE_ETH_FILTER_ADD and
> > + * RTE_ETH_FILTER_DELETE operations.
> > + */
> > +struct rte_eth_fdir_filter {
> > + uint32_t soft_id; /**< id */
>
> Should the application handle the id numbering?
> Why is it soft_id instead of id?
Yes, the soft_id is just id, is also reported id when entry match. The id is specified by user, and can be used to identify this entry, application should handle it.
>
> > + struct rte_eth_fdir_input input; /**< input set */
> > + struct rte_eth_fdir_action action; /**< action taken when match */
> > +};
>
> It's really a hard job to define a clear and easy to use API.
> It would be really interesting to have more people involved in this discussion.
Agree too.
Thank you!
> Thanks
> --
> Thomas
next prev parent reply other threads:[~2014-10-28 1:11 UTC|newest]
Thread overview: 123+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-26 6:03 [dpdk-dev] [PATCH v3 00/20] Support flow director programming on Fortville Jingjing Wu
2014-09-26 6:03 ` [dpdk-dev] [PATCH v3 01/20] i40e: set up and initialize flow director Jingjing Wu
2014-09-26 6:03 ` [dpdk-dev] [PATCH v3 02/20] i40e: tear down " Jingjing Wu
2014-09-26 6:03 ` [dpdk-dev] [PATCH v3 03/20] i40e: initialize flexible payload setting Jingjing Wu
2014-09-26 6:03 ` [dpdk-dev] [PATCH v3 04/20] lib/librte_ether: new filter APIs definition Jingjing Wu
2014-09-26 6:03 ` [dpdk-dev] [PATCH v3 05/20] lib/librte_ether: define structures for adding/deleting flow director Jingjing Wu
2014-09-26 6:03 ` [dpdk-dev] [PATCH v3 06/20] i40e: implement operations to add/delete " Jingjing Wu
2014-09-26 6:03 ` [dpdk-dev] [PATCH v3 07/20] app/test-pmd: add test commands to add/delete flow director filter Jingjing Wu
2014-09-26 6:03 ` [dpdk-dev] [PATCH v3 08/20] i40e: match counter for flow director Jingjing Wu
2014-09-26 6:03 ` [dpdk-dev] [PATCH v3 09/20] i40e: report flow director match info to mbuf Jingjing Wu
2014-09-26 6:03 ` [dpdk-dev] [PATCH v3 10/20] lib/librte_ether: define structures for getting flow director information Jingjing Wu
2014-09-26 6:03 ` [dpdk-dev] [PATCH v3 11/20] i40e: implement operations to get fdir info Jingjing Wu
2014-09-26 6:03 ` [dpdk-dev] [PATCH v3 12/20] app/test-pmd: display fdir statistics Jingjing Wu
2014-09-26 6:03 ` [dpdk-dev] [PATCH v3 13/20] i40e: implement operation to flush flow director table Jingjing Wu
2014-09-26 6:03 ` [dpdk-dev] [PATCH v3 14/20] app/test-pmd: add test command " Jingjing Wu
2014-09-26 6:03 ` [dpdk-dev] [PATCH v3 15/20] lib/librte_ether: define structures for configuring flexible payload Jingjing Wu
2014-09-26 6:03 ` [dpdk-dev] [PATCH v316/20] i40e: implement operations to configure " Jingjing Wu
2014-09-26 6:03 ` [dpdk-dev] [PATCH v3 17/20] app/test-pmd: add test command " Jingjing Wu
2014-09-26 6:03 ` [dpdk-dev] [PATCH v3 18/20] lib/librte_ether: define structures for configuring flex masks Jingjing Wu
2014-09-26 6:03 ` [dpdk-dev] [PATCH v3 19/20] i40e: implement operations to configure flexible masks Jingjing Wu
2014-09-26 6:03 ` [dpdk-dev] [PATCH v3 20/20] app/test-pmd: add test command " Jingjing Wu
2014-10-13 15:58 ` De Lara Guarch, Pablo
2014-10-22 1:01 ` [dpdk-dev] [PATCH v4 00/21] Support flow director programming on Fortville Jingjing Wu
2014-10-22 1:01 ` [dpdk-dev] [PATCH v4 01/21] i40e: set up and initialize flow director Jingjing Wu
2014-10-22 1:01 ` [dpdk-dev] [PATCH v4 02/21] i40e: tear down " Jingjing Wu
2014-10-22 1:01 ` [dpdk-dev] [PATCH v4 03/21] i40e: initialize flexible payload setting Jingjing Wu
2014-10-22 1:01 ` [dpdk-dev] [PATCH v4 04/21] ethdev: define structures for adding/deleting flow director Jingjing Wu
2014-10-27 16:57 ` Thomas Monjalon
2014-10-28 1:18 ` Wu, Jingjing [this message]
2014-10-28 13:17 ` Thomas Monjalon
2014-10-29 1:29 ` Wu, Jingjing
2014-10-22 1:01 ` [dpdk-dev] [PATCH v4 05/21] i40e: implement operations to add/delete " Jingjing Wu
2014-10-22 1:01 ` [dpdk-dev] [PATCH v4 06/21] testpmd: add test commands to add/delete flow director filter Jingjing Wu
2014-10-28 13:23 ` Thomas Monjalon
2014-10-22 1:01 ` [dpdk-dev] [PATCH v4 07/21] i40e: match counter for flow director Jingjing Wu
2014-10-22 1:01 ` [dpdk-dev] [PATCH v4 08/21] mbuf: extend fdir field Jingjing Wu
2014-10-28 13:28 ` Thomas Monjalon
2014-10-29 1:45 ` Wu, Jingjing
2014-10-22 1:01 ` [dpdk-dev] [PATCH v4 09/21] i40e: report flow director match info to mbuf Jingjing Wu
2014-10-22 1:01 ` [dpdk-dev] [PATCH v4 10/21] testpmd: print extended fdir info in mbuf Jingjing Wu
2014-10-22 1:01 ` [dpdk-dev] [PATCH v4 11/21] ethdev: define structures for getting flow director information Jingjing Wu
2014-10-28 13:44 ` Thomas Monjalon
2014-10-29 2:10 ` Wu, Jingjing
2014-10-29 9:48 ` Thomas Monjalon
2014-10-22 1:01 ` [dpdk-dev] [PATCH v4 12/21] i40e: implement operations to get fdir info Jingjing Wu
2014-10-22 1:01 ` [dpdk-dev] [PATCH v4 13/21] testpmd: display fdir statistics Jingjing Wu
2014-10-22 1:01 ` [dpdk-dev] [PATCH v4 14/21] i40e: implement operation to flush flow director table Jingjing Wu
2014-10-22 1:01 ` [dpdk-dev] [PATCH v4 15/21] testpmd: add test command " Jingjing Wu
2014-10-28 13:53 ` Thomas Monjalon
2014-10-22 1:01 ` [dpdk-dev] [PATCH v4 16/21] ethdev: define structures for configuring flexible payload Jingjing Wu
2014-10-28 14:14 ` Thomas Monjalon
2014-10-29 3:21 ` Wu, Jingjing
2014-10-29 9:55 ` Thomas Monjalon
2014-10-22 1:01 ` [dpdk-dev] [PATCH v4 17/21] i40e: implement operations to configure " Jingjing Wu
2014-10-22 1:01 ` [dpdk-dev] [PATCH v4 18/21] testpmd: add test command " Jingjing Wu
2014-10-22 1:01 ` [dpdk-dev] [PATCH v4 19/21] ethdev: define structures for configuring flex masks Jingjing Wu
2014-10-22 1:01 ` [dpdk-dev] [PATCH v4 20/21] i40e: implement operations to configure flexible masks Jingjing Wu
2014-10-22 1:01 ` [dpdk-dev] [PATCH v4 21/21] testpmd: add test command " Jingjing Wu
2014-10-28 14:18 ` Thomas Monjalon
2014-10-29 2:35 ` Wu, Jingjing
2014-10-27 15:22 ` [dpdk-dev] [PATCH v4 00/21] Support flow director programming on Fortville Thomas Monjalon
2014-10-28 0:48 ` Zhang, Helin
2014-10-30 7:26 ` [dpdk-dev] [PATCH v5 " Jingjing Wu
2014-10-30 7:26 ` [dpdk-dev] [PATCH v5 01/21] i40e: set up and initialize flow director Jingjing Wu
2014-10-30 8:25 ` Wu, Jingjing
2014-10-30 7:26 ` [dpdk-dev] [PATCH v5 02/21] i40e: tear down " Jingjing Wu
2014-11-19 7:53 ` Cao, Min
2014-10-30 7:26 ` [dpdk-dev] [PATCH v5 03/21] i40e: initialize flexible payload setting Jingjing Wu
2014-10-30 7:26 ` [dpdk-dev] [PATCH v5 04/21] ethdev: define structures for adding/deleting flow director Jingjing Wu
2014-10-30 7:26 ` [dpdk-dev] [PATCH v5 05/21] i40e: implement operations to add/delete " Jingjing Wu
2014-11-05 21:18 ` De Lara Guarch, Pablo
2014-11-13 9:50 ` Thomas Monjalon
2014-11-13 11:36 ` Wu, Jingjing
2014-10-30 7:26 ` [dpdk-dev] [PATCH v5 06/21] testpmd: add test commands to add/delete flow director filter Jingjing Wu
2014-10-30 7:26 ` [dpdk-dev] [PATCH v5 07/21] i40e: match counter for flow director Jingjing Wu
2014-10-30 7:26 ` [dpdk-dev] [PATCH v5 08/21] mbuf: extend fdir field Jingjing Wu
2014-10-30 7:26 ` [dpdk-dev] [PATCH v5 09/21] i40e: report flow director match info to mbuf Jingjing Wu
2014-10-30 7:26 ` [dpdk-dev] [PATCH v5 10/21] testpmd: print extended fdir info in mbuf Jingjing Wu
2014-10-30 7:26 ` [dpdk-dev] [PATCH v5 11/21] ethdev: define structures for getting flow director information Jingjing Wu
2014-10-30 7:26 ` [dpdk-dev] [PATCH v5 12/21] i40e: implement operations to get fdir info Jingjing Wu
2014-10-30 7:26 ` [dpdk-dev] [PATCH v5 13/21] testpmd: display fdir statistics Jingjing Wu
2014-10-30 7:26 ` [dpdk-dev] [PATCH v5 14/21] i40e: implement operation to flush flow director table Jingjing Wu
2014-10-30 7:26 ` [dpdk-dev] [PATCH v5 15/21] testpmd: add test command " Jingjing Wu
2014-10-30 7:26 ` [dpdk-dev] [PATCH v5 16/21] ethdev: define structures for configuring flexible payload Jingjing Wu
2014-10-30 7:26 ` [dpdk-dev] [PATCH v5 17/21] i40e: implement operations to configure " Jingjing Wu
2014-10-30 7:26 ` [dpdk-dev] [PATCH v5 18/21] testpmd: add test command " Jingjing Wu
2014-10-30 7:26 ` [dpdk-dev] [PATCH v5 19/21] ethdev: define structures for configuring flex masks Jingjing Wu
2014-10-30 7:26 ` [dpdk-dev] [PATCH v5 20/21] i40e: implement operations to configure flexible masks Jingjing Wu
2014-10-30 7:26 ` [dpdk-dev] [PATCH v5 21/21] testpmd: add test command " Jingjing Wu
2014-10-30 8:07 ` [dpdk-dev] [PATCH v5 01/21] i40e: set up and initialize flow director Jingjing Wu
2014-11-21 0:46 ` [dpdk-dev] [PATCH v6 00/22] Support flow director programming on Fortville Jingjing Wu
2014-11-21 0:46 ` [dpdk-dev] [PATCH v6 01/22] i40e: set up and initialize flow director Jingjing Wu
2014-11-21 0:46 ` [dpdk-dev] [PATCH v6 02/22] i40e: tear down " Jingjing Wu
2014-11-21 0:46 ` [dpdk-dev] [PATCH v6 03/22] i40e: initialize flexible payload setting Jingjing Wu
2014-11-21 0:46 ` [dpdk-dev] [PATCH v6 04/22] ethdev: define structures for adding/deleting flow director Jingjing Wu
2014-11-21 0:46 ` [dpdk-dev] [PATCH v6 05/22] i40e: define functions for transition between flow_type and pctype Jingjing Wu
2014-11-21 0:46 ` [dpdk-dev] [PATCH v6 06/22] i40e: implement operations to add/delete flow director Jingjing Wu
2014-11-21 0:46 ` [dpdk-dev] [PATCH v6 07/22] testpmd: add test commands to add/delete flow director filter Jingjing Wu
2014-11-21 0:46 ` [dpdk-dev] [PATCH v6 08/22] i40e: match counter for flow director Jingjing Wu
2014-11-21 0:46 ` [dpdk-dev] [PATCH v6 09/22] mbuf: extend fdir field Jingjing Wu
2014-11-21 17:03 ` Chilikin, Andrey
2014-11-21 19:34 ` Ananyev, Konstantin
2014-11-21 19:37 ` Chilikin, Andrey
2014-11-21 0:46 ` [dpdk-dev] [PATCH v6 10/22] i40e: report flow director match info to mbuf Jingjing Wu
2014-11-21 0:46 ` [dpdk-dev] [PATCH v6 11/22] testpmd: print extended fdir info in mbuf Jingjing Wu
2014-11-21 0:46 ` [dpdk-dev] [PATCH v6 12/22] i40e: implement operation to flush flow director table Jingjing Wu
2014-11-21 0:46 ` [dpdk-dev] [PATCH v6 13/22] testpmd: add test command " Jingjing Wu
2014-11-21 0:46 ` [dpdk-dev] [PATCH v6 14/22] ethdev: define structures for getting flow director information Jingjing Wu
2014-11-21 0:46 ` [dpdk-dev] [PATCH v6 15/22] i40e: implement operations to get fdir info Jingjing Wu
2014-11-21 0:46 ` [dpdk-dev] [PATCH v6 16/22] ethdev: define structures for getting flow director statistics Jingjing Wu
2014-11-21 0:46 ` [dpdk-dev] [PATCH v6 17/22] i40e: implement operations to get fdir statistics Jingjing Wu
2014-11-21 0:46 ` [dpdk-dev] [PATCH v6 18/22] testpmd: display fdir info Jingjing Wu
2014-11-21 0:46 ` [dpdk-dev] [PATCH v6 19/22] ethdev: add flexible payload setting in eth_conf Jingjing Wu
2014-11-21 0:46 ` [dpdk-dev] [PATCH v6 20/22] i40e: take flow director flexible payload configuration Jingjing Wu
2014-11-21 0:46 ` [dpdk-dev] [PATCH v6 21/22] testpmd: add test command to configure flexible mask Jingjing Wu
2014-11-21 0:46 ` [dpdk-dev] [PATCH v6 22/22] testpmd: add test command to configure flexible payload Jingjing Wu
2014-11-21 11:34 ` [dpdk-dev] [PATCH v6 00/22] Support flow director programming on Fortville Ananyev, Konstantin
2014-11-24 23:20 ` Thomas Monjalon
2014-11-25 4:51 ` Wu, Jingjing
2014-11-25 9:23 ` Thomas Monjalon
2014-10-30 7:34 ` [dpdk-dev] [PATCH v4 00/21] " Cao, Min
2014-11-19 7:53 ` Cao, Min
2014-10-30 7:12 ` [dpdk-dev] [PATCH v3 00/20] " Cao, Min
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=9BB6961774997848B5B42BEC655768F8B2467E@SHSMSX104.ccr.corp.intel.com \
--to=jingjing.wu@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).