[dpdk-dev] [RFC,v3] ethdev: extend RSS offload types
Ori Kam
orika at mellanox.com
Tue Jul 30 08:06:56 CEST 2019
Hi Simei,
> -----Original Message-----
> From: dev <dev-bounces at dpdk.org> On Behalf Of simei
> Sent: Monday, July 29, 2019 5:44 AM
> To: qi.z.zhang at intel.com; jingjing.wu at intel.com; ferruh.yigit at intel.com;
> Adrien Mazarguil <adrien.mazarguil at 6wind.com>
> Cc: dev at dpdk.org; simei.su at intel.com
> Subject: [dpdk-dev] [RFC,v3] ethdev: extend RSS offload types
>
> From: Simei Su <simei.su at intel.com>
>
> Make it easier to represent to define macro values as (1ULL << ###).
>
> This RFC reserves several bits as input set selection from bottom
> of the 64 bits. The flow type is combined with input set to
> represent rss types.
>
Why reserve from the bottom? and not from the first available space?
> for example:
> ETH_RSS_IPV4 | ETH_RSS_INSET_L3_SRC: hash on src ip address only
> ETH_RSS_IPV4_UDP | ETH_RSS_INSET_L4_DST: hash on src/dst IP and
> dst UDP port
> ETH_RSS_L2_PAYLOAD | ETH_RSS_INSET_L2_DST: hash on dst mac address
>
What happens when the user set ETH_RSS_IPV4? From what I understand from your RFC this will do nothing
since no bits where enabled, am I correct?
If I'm correct this may break applications.
> Signed-off-by: Simei Su <simei.su at intel.com>
> ---
> lib/librte_ethdev/rte_ethdev.h | 13 +++++++++++++
> 1 file changed, 13 insertions(+)
>
> diff --git a/lib/librte_ethdev/rte_ethdev.h b/lib/librte_ethdev/rte_ethdev.h
> index dc6596b..8af6355 100644
> --- a/lib/librte_ethdev/rte_ethdev.h
> +++ b/lib/librte_ethdev/rte_ethdev.h
> @@ -508,6 +508,19 @@ struct rte_eth_rss_conf {
> #define ETH_RSS_GENEVE (1ULL << RTE_ETH_FLOW_GENEVE)
> #define ETH_RSS_NVGRE (1ULL << RTE_ETH_FLOW_NVGRE)
>
> +/*
> + * The following six macros are used combined with ETH_RSS_* to
> + * represent rss types. The structure rte_flow_action_rss.types is
> + * 64-bit wide and we reserve couple bits here for input set selection
> + * from bottom of the 64 bits.
> + */
> +#define ETH_RSS_INSET_L2_SRC (1ULL << 63)
> +#define ETH_RSS_INSET_L2_DST (1ULL << 62)
> +#define ETH_RSS_INSET_L3_SRC (1ULL << 61)
> +#define ETH_RSS_INSET_L3_DST (1ULL << 60)
> +#define ETH_RSS_INSET_L4_SRC (1ULL << 59)
> +#define ETH_RSS_INSET_L4_DST (1ULL << 58)
> +
> #define ETH_RSS_IP ( \
> ETH_RSS_IPV4 | \
> ETH_RSS_FRAG_IPV4 | \
> --
> 1.8.3.1
Thanks,
Ori Kam
More information about the dev
mailing list