From: "Zhang, Helin" <helin.zhang@intel.com>
To: "Ananyev, Konstantin" <konstantin.ananyev@intel.com>,
"dev@dpdk.org" <dev@dpdk.org>
Subject: Re: [dpdk-dev] [PATCH RFC 5/7] ethdev: unification of flow types
Date: Mon, 22 Dec 2014 02:33:07 +0000 [thread overview]
Message-ID: <F35DEAC7BCE34641BA9FAC6BCA4A12E70A7D7A5B@SHSMSX104.ccr.corp.intel.com> (raw)
In-Reply-To: <2601191342CEEE43887BDE71AB977258213C23C4@IRSMSX105.ger.corp.intel.com>
Hi Konstantin
> > -
> > -/**
> > * A structure used to define the input for IPV4 flow
> > */
> > struct rte_eth_ipv4_flow {
> > @@ -291,7 +302,7 @@ struct rte_eth_fdir_flow_ext {
> > * A structure used to define the input for a flow director filter entry
> > */
> > struct rte_eth_fdir_input {
> > - enum rte_eth_flow_type flow_type; /**< Type of flow */
> > + uint16_t flow_type; /**< Type of flow */
>
> Wonder, why do you need to switch from int to uinsigned short for flow_type?
> Konstantin
Actually there are same things in rte_ethdev.h and rte_eth_ctrl.h, though seems different.
The goal is to unify them, so the original type of MACRO was chosen. Using uint16_t but
not enum is also beneficial for compilation, as rte_eth_ctrl.h is included in rte_ethdev.h.
In rte_ethdev.h, it is,
/* Supported RSS offloads */
/* for 1G & 10G */
#define ETH_RSS_IPV4_SHIFT 0
#define ETH_RSS_IPV4_TCP_SHIFT 1
#define ETH_RSS_IPV6_SHIFT 2
#define ETH_RSS_IPV6_EX_SHIFT 3
#define ETH_RSS_IPV6_TCP_SHIFT 4
#define ETH_RSS_IPV6_TCP_EX_SHIFT 5
#define ETH_RSS_IPV4_UDP_SHIFT 6
#define ETH_RSS_IPV6_UDP_SHIFT 7
#define ETH_RSS_IPV6_UDP_EX_SHIFT 8
/* 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
In rte_eth_ctrl.h, it is,
/**
* Flow type
*/
enum rte_eth_flow_type {
RTE_ETH_FLOW_TYPE_NONE = 0,
RTE_ETH_FLOW_TYPE_UDPV4,
RTE_ETH_FLOW_TYPE_TCPV4,
RTE_ETH_FLOW_TYPE_SCTPV4,
RTE_ETH_FLOW_TYPE_IPV4_OTHER,
RTE_ETH_FLOW_TYPE_FRAG_IPV4,
RTE_ETH_FLOW_TYPE_UDPV6,
RTE_ETH_FLOW_TYPE_TCPV6,
RTE_ETH_FLOW_TYPE_SCTPV6,
RTE_ETH_FLOW_TYPE_IPV6_OTHER,
RTE_ETH_FLOW_TYPE_FRAG_IPV6,
RTE_ETH_FLOW_TYPE_MAX = 64,
};
Regards,
Helin
>
> > union rte_eth_fdir_flow flow;
> > /**< Flow fields to match, dependent on flow_type */
> > struct rte_eth_fdir_flow_ext flow_ext; @@ -371,7 +382,7 @@ struct
> > rte_eth_flex_payload_cfg {
> > * for each flow type
> > */
> > struct rte_eth_fdir_flex_mask {
> > - enum rte_eth_flow_type flow_type; /**< Flow type */
> > + uint16_t flow_type; /**< Flow type */
> > uint8_t mask[RTE_ETH_FDIR_MAX_FLEXLEN];
> > /**< Mask for the whole flexible payload */ }; @@ -385,7 +396,7 @@
> > struct rte_eth_fdir_flex_conf {
> > uint16_t nb_flexmasks; /**< The number of following mask */
> > struct rte_eth_flex_payload_cfg flex_set[RTE_ETH_PAYLOAD_MAX];
> > /**< Flex payload configuration for each payload type */
> > - struct rte_eth_fdir_flex_mask flex_mask[RTE_ETH_FLOW_TYPE_MAX];
> > + struct rte_eth_fdir_flex_mask flex_mask[ETH_FLOW_TYPE_MAX];
> > /**< Flex mask configuration for each flow type */ };
next prev parent reply other threads:[~2014-12-22 2:33 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-12-19 7:26 [dpdk-dev] [PATCH RFC 0/7] unification of flow types and RSS offload types Helin Zhang
2014-12-19 7:26 ` [dpdk-dev] [PATCH RFC 1/7] app/test-pmd: code style fix Helin Zhang
2014-12-19 7:26 ` [dpdk-dev] [PATCH RFC 2/7] ethdev: " Helin Zhang
2014-12-19 7:26 ` [dpdk-dev] [PATCH RFC 3/7] i40e: " Helin Zhang
2014-12-19 7:26 ` [dpdk-dev] [PATCH RFC 4/7] ethdev: fix of calculating the size of flow type mask array Helin Zhang
2014-12-19 7:26 ` [dpdk-dev] [PATCH RFC 5/7] ethdev: unification of flow types Helin Zhang
2014-12-19 14:59 ` Ananyev, Konstantin
2014-12-22 2:33 ` Zhang, Helin [this message]
2014-12-19 7:26 ` [dpdk-dev] [PATCH RFC 6/7] ethdev: unification of RSS offload types Helin Zhang
2014-12-19 7:26 ` [dpdk-dev] [PATCH RFC 7/7] app/testpmd: support new rss offloads Helin Zhang
2015-01-12 6:17 ` [dpdk-dev] [PATCH RFC 0/7] unification of flow types and RSS offload types Zhang, Helin
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=F35DEAC7BCE34641BA9FAC6BCA4A12E70A7D7A5B@SHSMSX104.ccr.corp.intel.com \
--to=helin.zhang@intel.com \
--cc=dev@dpdk.org \
--cc=konstantin.ananyev@intel.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).