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 v2 2/7] ethdev: define new ethdev API rx_classification_filter_ctl
Date: Thu, 28 Aug 2014 03:30:13 +0000 [thread overview]
Message-ID: <9BB6961774997848B5B42BEC655768F8ADBEF0@SHSMSX104.ccr.corp.intel.com> (raw)
In-Reply-To: <3024593.z48vgEy6Ts@xps13>
HI, Thomas
Just as zhang, helin's said in his pacth "[dpdk-dev] [PATCH 2/5] ethdev: add new ops of 'check_command_supported' and 'rx_classification_filter_ctl'":
'rx_classification_filter_ctl' is for receive classification filter configuring. e.g. hash function configuration, flow director configuration. It is a common API where a lot of commands can be implemented for different sub features.
We want to implement several common API for NIC specific features, to avoid creating quite a lot of ops in 'struct eth_dev_ops'. The idea came from ioctl.
Because about flow director feature, there is large gap between i40e and ixgbe. The existed flow director APIs looks specific to IXGBE, so I choose this new API to implement i40e's flow director feature.
Here, I briefly describe how the new 'rx_classification_filter_ctl' works:
The API is like below:
typedef int (*eth_rx_classification_filter_ctl_t)(struct rte_eth_dev *dev,
enum rte_eth_command cmd,
void *arg);
Define a head file called rte_i40e.h in lib/librte_pmd_i40e, which contains the definition about structures specific to i40e, linked to the arg parameters above.
Define a head file called rte_eth_features.h in lib/librte_ether, which contains the commands' definition linked to cmd parameters above.
And if user want to use i40e specific features, then the head file rte_i40e.h need to be included user's application, for example, test-pmd. And user can encode these structures and call XXX_ctl API to configure their features.
Do you think it make sense?
And about the rename things, I will move it to a separate patch.
> -----Original Message-----
> From: Thomas Monjalon [mailto:thomas.monjalon@6wind.com]
> Sent: Wednesday, August 27, 2014 10:23 PM
> To: Wu, Jingjing
> Cc: dev@dpdk.org
> Subject: Re: [dpdk-dev] [PATCH v2 2/7] ethdev: define new ethdev API
> rx_classification_filter_ctl
>
> Hi Jingjing,
>
> 2014-08-27 10:13, Jingjing Wu:
> > support a new ethdev API rx_classification_filter_ctl for all
> > the configuration or queries for receive classification filters.
> > this patch supports commands the API used below:
> > RTE_CMD_FDIR_RULE_ADD
> > RTE_CMD_FDIR_RULE_DEL
> > RTE_CMD_FDIR_FLUSH
> > RTE_CMD_FDIR_INFO_GET
>
> Could you explain why existing API (flow director + filters) is not enough?
> I'd really like to see a common API for all filtering stuff.
>
> > -/* for 40G only */
> > -#define ETH_RSS_NONF_IPV4_UDP_SHIFT 31
> > -#define ETH_RSS_NONF_IPV4_TCP_SHIFT 33
> > -#define ETH_RSS_NONF_IPV4_SCTP_SHIFT 34
> > -#define ETH_RSS_NONF_IPV4_OTHER_SHIFT 35
> > -#define ETH_RSS_FRAG_IPV4_SHIFT 36
> > -#define ETH_RSS_NONF_IPV6_UDP_SHIFT 41
> > -#define ETH_RSS_NONF_IPV6_TCP_SHIFT 43
> > -#define ETH_RSS_NONF_IPV6_SCTP_SHIFT 44
> > -#define ETH_RSS_NONF_IPV6_OTHER_SHIFT 45
> > -#define ETH_RSS_FRAG_IPV6_SHIFT 46
> > -#define ETH_RSS_FCOE_OX_SHIFT 48
> > -#define ETH_RSS_FCOE_RX_SHIFT 49
> > -#define ETH_RSS_FCOE_OTHER_SHIFT 50
> > -#define ETH_RSS_L2_PAYLOAD_SHIFT 63
> > +/* Packet Classification Type for 40G only */
> > +#define ETH_PCTYPE_NONF_IPV4_UDP 31
> > +#define ETH_PCTYPE_NONF_IPV4_TCP 33
> > +#define ETH_PCTYPE_NONF_IPV4_SCTP 34
> > +#define ETH_PCTYPE_NONF_IPV4_OTHER 35
> > +#define ETH_PCTYPE_FRAG_IPV4 36
> > +#define ETH_PCTYPE_NONF_IPV6_UDP 41
> > +#define ETH_PCTYPE_NONF_IPV6_TCP 43
> > +#define ETH_PCTYPE_NONF_IPV6_SCTP 44
> > +#define ETH_PCTYPE_NONF_IPV6_OTHER 45
> > +#define ETH_PCTYPE_FRAG_IPV6 46
> > +#define ETH_PCTYPE_FCOE_OX 48 /* not used */
> > +#define ETH_PCTYPE_FCOE_RX 49 /* not used */
> > +#define ETH_PCTYPE_FCOE_OTHER 50 /* not used */
> > +#define ETH_PCTYPE_L2_PAYLOAD 63
>
> Why is it specific to i40e? Could we have something generic?
> Please take care at having only generic things in librte_ether.
>
> By the way, these renamings should be in a separated patch.
>
> --
> Thomas
next prev parent reply other threads:[~2014-08-28 3:26 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-08-27 2:13 [dpdk-dev] [PATCH v2 0/7] Support flow director programming on fortville Jingjing Wu
2014-08-27 2:13 ` [dpdk-dev] [PATCH v2 1/7] i40e: flow director resource reserve and initialize on i40e Jingjing Wu
2014-08-27 14:17 ` Thomas Monjalon
2014-08-28 2:56 ` Wu, Jingjing
2014-08-27 2:13 ` [dpdk-dev] [PATCH v2 2/7] ethdev: define new ethdev API rx_classification_filter_ctl Jingjing Wu
2014-08-27 14:22 ` Thomas Monjalon
2014-08-28 3:30 ` Wu, Jingjing [this message]
2014-08-28 10:55 ` Thomas Monjalon
2014-08-28 11:48 ` Ananyev, Konstantin
2014-08-28 14:07 ` Wu, Jingjing
2014-08-28 13:39 ` Wu, Jingjing
2014-08-28 14:20 ` Thomas Monjalon
2014-08-28 14:31 ` Wu, Jingjing
2014-08-27 2:13 ` [dpdk-dev] [PATCH v2 3/7] i40e: function implement in i40e for flow director filter programming Jingjing Wu
2014-08-27 14:24 ` Thomas Monjalon
2014-08-28 2:57 ` Wu, Jingjing
2014-08-27 2:13 ` [dpdk-dev] [PATCH v2 4/7] i40e: function implement in i40e for flow director flush and info get Jingjing Wu
2014-08-27 2:13 ` [dpdk-dev] [PATCH v2 5/7] fix the Marco conflict Jingjing Wu
2014-08-27 14:27 ` Thomas Monjalon
2014-08-28 3:39 ` Wu, Jingjing
2014-08-28 8:55 ` Thomas Monjalon
2014-08-28 14:37 ` Wu, Jingjing
2014-08-28 14:46 ` Thomas Monjalon
2014-08-27 2:13 ` [dpdk-dev] [PATCH v2 6/7] i40e: support FD ID report and match counter for i40e flow director Jingjing Wu
2014-08-27 2:13 ` [dpdk-dev] [PATCH v2 7/7]app/testpmd: add commands and config functions for i40e flow director support Jingjing Wu
2014-08-27 14:35 ` Thomas Monjalon
2014-08-27 16:54 ` Venkatesan, Venky
2014-08-28 3:51 ` Wu, Jingjing
2014-08-28 8:50 ` Thomas Monjalon
2014-08-28 9:01 ` Wu, Jingjing
2014-08-28 11:00 ` Thomas Monjalon
2014-08-28 11:30 ` Ananyev, Konstantin
2014-08-28 12:02 ` Thomas Monjalon
2014-09-24 4:52 ` [dpdk-dev] [PATCH v2 0/7] Support flow director programming on fortville 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=9BB6961774997848B5B42BEC655768F8ADBEF0@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).