* Question about flow_type_rss_offloads in rte_eth_dev_info
@ 2022-04-22 3:55 lihuisong (C)
2022-04-22 11:41 ` Andrew Rybchenko
0 siblings, 1 reply; 4+ messages in thread
From: lihuisong (C) @ 2022-04-22 3:55 UTC (permalink / raw)
To: dev; +Cc: Thomas Monjalon, ferruh.yigit, huangdaode
Hi, all.
The RTE_ETH_FLOW_XXX macros, are used to display supported flow types
for PMD
based on the rte_eth_dev_info.flow_type_rss_offloads in the
port_infos_display() of
testpmd.
And PMD assigns RSS offload capability bit, like RTE_ETH_RSS_XXX, to
this field.
The usage of RTE_ETH_RSS_XXX macros are described as follows in:
/*
* Below macros are defined for RSS offload types, they can be used to
* fill rte_eth_rss_conf.rss_hf or rte_flow_action_rss.types.
*/
#define RTE_ETH_RSS_IPV4 RTE_BIT64(2)
But RTE_ETH_FLOW_MAX is 24, and the number of RTE_ETH_FLOW_XXX micro far
less than
the number of RTE_ETH_RSS_XXX. If PMD sets RSS offload capability bit
out range of
RTE_ETH_FLOW_XXX, like RTE_ETH_RSS_L3_SRC_ONLY, to this field, testpmd
will display
"user defined 63" when run 'show port info 0'. This is a problem that I
have now.
On the other hand, rx_adv_conf.rte_eth_rss_conf.rss_hf from App must be
within the
rte_eth_dev_info.flow_type_rss_offloads in dev_configure.
To sum up, I'm a little confused right now.
How should PMD populate the field "flow_type_rss_offloads" in struct
rte_eth_dev_info?
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Question about flow_type_rss_offloads in rte_eth_dev_info
2022-04-22 3:55 Question about flow_type_rss_offloads in rte_eth_dev_info lihuisong (C)
@ 2022-04-22 11:41 ` Andrew Rybchenko
2022-04-24 10:03 ` lihuisong (C)
2022-04-29 1:47 ` lihuisong (C)
0 siblings, 2 replies; 4+ messages in thread
From: Andrew Rybchenko @ 2022-04-22 11:41 UTC (permalink / raw)
To: lihuisong (C), dev; +Cc: Thomas Monjalon, ferruh.yigit, huangdaode
Hi,
On 4/22/22 06:55, lihuisong (C) wrote:
> Hi, all.
>
> The RTE_ETH_FLOW_XXX macros, are used to display supported flow types
> for PMD based on the rte_eth_dev_info.flow_type_rss_offloads in the
> port_infos_display() of testpmd.
That's true and it is wrong in testpmd. RTE_ETH_RSS_* and
RTE_ETH_FLOW_* are intentionally disconnected right now.
flow_type_rss_offloads docmentation is a bit misleading saying
that "the bit offset also means flow type". For example,
RTE_ETH_RSS_L4_CHKSUM and RTE_ETH_RSS_L3_SRC_ONLY hardly mean
flow type. I think the documentation must be fixed - it should
just refer to RTE_ETH_RSS_* defines.
So, returning to testpmd, "Supported RSS offload flow types"
code should be reworked to avoid RTE_ETH_FLOW_* usage.
flowtype_to_str() should be kept intact since it is used for
FDIR commands which operate with flows, not RSS bit-field.
A new function should be implemented which uses maps
RTE_ETH_RSS_* bits into string to be printed.
> And PMD assigns RSS offload capability bit, like RTE_ETH_RSS_XXX, to
> this field.
> The usage of RTE_ETH_RSS_XXX macros are described as follows in:
> /*
> * Below macros are defined for RSS offload types, they can be used to
> * fill rte_eth_rss_conf.rss_hf or rte_flow_action_rss.types.
> */
> #define RTE_ETH_RSS_IPV4 RTE_BIT64(2)
>
> But RTE_ETH_FLOW_MAX is 24, and the number of RTE_ETH_FLOW_XXX micro far
> less than
> the number of RTE_ETH_RSS_XXX. If PMD sets RSS offload capability bit
> out range of
> RTE_ETH_FLOW_XXX, like RTE_ETH_RSS_L3_SRC_ONLY, to this field, testpmd
> will display
> "user defined 63" when run 'show port info 0'. This is a problem that I
> have now.
>
> On the other hand, rx_adv_conf.rte_eth_rss_conf.rss_hf from App must be
> within the
> rte_eth_dev_info.flow_type_rss_offloads in dev_configure.
>
> To sum up, I'm a little confused right now.
> How should PMD populate the field "flow_type_rss_offloads" in struct
> rte_eth_dev_info?
flow_type_rss_offloads should be populated in terms of
RTE_ETH_RSS_* bits.
Andrew.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Question about flow_type_rss_offloads in rte_eth_dev_info
2022-04-22 11:41 ` Andrew Rybchenko
@ 2022-04-24 10:03 ` lihuisong (C)
2022-04-29 1:47 ` lihuisong (C)
1 sibling, 0 replies; 4+ messages in thread
From: lihuisong (C) @ 2022-04-24 10:03 UTC (permalink / raw)
To: Andrew Rybchenko, dev; +Cc: Thomas Monjalon, ferruh.yigit, huangdaode
在 2022/4/22 19:41, Andrew Rybchenko 写道:
> Hi,
>
> On 4/22/22 06:55, lihuisong (C) wrote:
>> Hi, all.
>>
>> The RTE_ETH_FLOW_XXX macros, are used to display supported flow types
>> for PMD based on the rte_eth_dev_info.flow_type_rss_offloads in the
>> port_infos_display() of testpmd.
>
> That's true and it is wrong in testpmd. RTE_ETH_RSS_* and
> RTE_ETH_FLOW_* are intentionally disconnected right now.
>
> flow_type_rss_offloads docmentation is a bit misleading saying
> that "the bit offset also means flow type". For example,
> RTE_ETH_RSS_L4_CHKSUM and RTE_ETH_RSS_L3_SRC_ONLY hardly mean
> flow type. I think the documentation must be fixed - it should
> just refer to RTE_ETH_RSS_* defines.
>
> So, returning to testpmd, "Supported RSS offload flow types"
> code should be reworked to avoid RTE_ETH_FLOW_* usage.
> flowtype_to_str() should be kept intact since it is used for
> FDIR commands which operate with flows, not RSS bit-field.
> A new function should be implemented which uses maps
> RTE_ETH_RSS_* bits into string to be printed.
Thanks for the clarification.
Ok, I'll refer to the port_rss_hash_conf_show() to fix it.
>
>> And PMD assigns RSS offload capability bit, like RTE_ETH_RSS_XXX, to
>> this field.
>> The usage of RTE_ETH_RSS_XXX macros are described as follows in:
>> /*
>> * Below macros are defined for RSS offload types, they can be used to
>> * fill rte_eth_rss_conf.rss_hf or rte_flow_action_rss.types.
>> */
>> #define RTE_ETH_RSS_IPV4 RTE_BIT64(2)
>>
>> But RTE_ETH_FLOW_MAX is 24, and the number of RTE_ETH_FLOW_XXX micro
>> far less than
>> the number of RTE_ETH_RSS_XXX. If PMD sets RSS offload capability bit
>> out range of
>> RTE_ETH_FLOW_XXX, like RTE_ETH_RSS_L3_SRC_ONLY, to this field,
>> testpmd will display
>> "user defined 63" when run 'show port info 0'. This is a problem that
>> I have now.
>>
>> On the other hand, rx_adv_conf.rte_eth_rss_conf.rss_hf from App must
>> be within the
>> rte_eth_dev_info.flow_type_rss_offloads in dev_configure.
>>
>> To sum up, I'm a little confused right now.
>> How should PMD populate the field "flow_type_rss_offloads" in struct
>> rte_eth_dev_info?
>
> flow_type_rss_offloads should be populated in terms of
> RTE_ETH_RSS_* bits.
I got it, Thanks, Andrew.
The definition of this field is also a bit unfriendly.
>
> Andrew.
> .
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Question about flow_type_rss_offloads in rte_eth_dev_info
2022-04-22 11:41 ` Andrew Rybchenko
2022-04-24 10:03 ` lihuisong (C)
@ 2022-04-29 1:47 ` lihuisong (C)
1 sibling, 0 replies; 4+ messages in thread
From: lihuisong (C) @ 2022-04-29 1:47 UTC (permalink / raw)
To: Andrew Rybchenko, dev; +Cc: Thomas Monjalon, ferruh.yigit, huangdaode
Hi, Andrew
"Supported RSS offload flow types" code in testpmd has been reworked in
the following patchset:
http://patchwork.dpdk.org/project/dpdk/list/?series=22657
Series title: fix RSS types display
Please review, thanks.
在 2022/4/22 19:41, Andrew Rybchenko 写道:
> Hi,
>
> On 4/22/22 06:55, lihuisong (C) wrote:
>> Hi, all.
>>
>> The RTE_ETH_FLOW_XXX macros, are used to display supported flow types
>> for PMD based on the rte_eth_dev_info.flow_type_rss_offloads in the
>> port_infos_display() of testpmd.
>
> That's true and it is wrong in testpmd. RTE_ETH_RSS_* and
> RTE_ETH_FLOW_* are intentionally disconnected right now.
>
> flow_type_rss_offloads docmentation is a bit misleading saying
> that "the bit offset also means flow type". For example,
> RTE_ETH_RSS_L4_CHKSUM and RTE_ETH_RSS_L3_SRC_ONLY hardly mean
> flow type. I think the documentation must be fixed - it should
> just refer to RTE_ETH_RSS_* defines.
>
> So, returning to testpmd, "Supported RSS offload flow types"
> code should be reworked to avoid RTE_ETH_FLOW_* usage.
> flowtype_to_str() should be kept intact since it is used for
> FDIR commands which operate with flows, not RSS bit-field.
> A new function should be implemented which uses maps
> RTE_ETH_RSS_* bits into string to be printed.
>
>> And PMD assigns RSS offload capability bit, like RTE_ETH_RSS_XXX, to
>> this field.
>> The usage of RTE_ETH_RSS_XXX macros are described as follows in:
>> /*
>> * Below macros are defined for RSS offload types, they can be used to
>> * fill rte_eth_rss_conf.rss_hf or rte_flow_action_rss.types.
>> */
>> #define RTE_ETH_RSS_IPV4 RTE_BIT64(2)
>>
>> But RTE_ETH_FLOW_MAX is 24, and the number of RTE_ETH_FLOW_XXX micro
>> far less than
>> the number of RTE_ETH_RSS_XXX. If PMD sets RSS offload capability bit
>> out range of
>> RTE_ETH_FLOW_XXX, like RTE_ETH_RSS_L3_SRC_ONLY, to this field,
>> testpmd will display
>> "user defined 63" when run 'show port info 0'. This is a problem that
>> I have now.
>>
>> On the other hand, rx_adv_conf.rte_eth_rss_conf.rss_hf from App must
>> be within the
>> rte_eth_dev_info.flow_type_rss_offloads in dev_configure.
>>
>> To sum up, I'm a little confused right now.
>> How should PMD populate the field "flow_type_rss_offloads" in struct
>> rte_eth_dev_info?
>
> flow_type_rss_offloads should be populated in terms of
> RTE_ETH_RSS_* bits.
>
> Andrew.
> .
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2022-04-29 1:47 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-22 3:55 Question about flow_type_rss_offloads in rte_eth_dev_info lihuisong (C)
2022-04-22 11:41 ` Andrew Rybchenko
2022-04-24 10:03 ` lihuisong (C)
2022-04-29 1:47 ` lihuisong (C)
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).