[v2] net/nfp: advertise no support for keeping flow rules

Message ID 20230203015926.5235-1-chaoyong.he@corigine.com (mailing list archive)
State Rejected, archived
Delegated to: Ferruh Yigit
Headers
Series [v2] net/nfp: advertise no support for keeping flow rules |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation success Compilation OK
ci/iol-intel-Functional success Functional Testing PASS
ci/intel-Testing success Testing PASS
ci/iol-mellanox-Performance success Performance Testing PASS
ci/iol-broadcom-Performance success Performance Testing PASS
ci/iol-intel-Performance success Performance Testing PASS
ci/github-robot: build success github build: passed
ci/loongarch-compilation success Compilation OK
ci/loongarch-unit-testing success Unit Testing PASS
ci/iol-aarch64-unit-testing success Testing PASS
ci/iol-testing success Testing PASS
ci/iol-x86_64-unit-testing success Testing PASS
ci/iol-x86_64-compile-testing success Testing PASS
ci/iol-aarch64-compile-testing success Testing PASS
ci/iol-abi-testing success Testing PASS

Commit Message

Chaoyong He Feb. 3, 2023, 1:59 a.m. UTC
  From: Peng Zhang <peng.zhang@corigine.com>

Explicitly clear the RTE_ETH_DEV_CAPA_FLOW_RULE_KEEP capability
bit to match behavior of other PMDs. This was missed when first
adding flow support for the NFP PMD.

Fixes: 30ecce522732 ("net/nfp: support flow API")
Cc: chaoyong.he@corigine.com
Cc: stable@dpdk.org

Signed-off-by: Peng Zhang <peng.zhang@corigine.com>
Reviewed-by: Chaoyong He <chaoyong.he@corigine.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@corigine.com>
---
v2:
* Fix the wrongly 'Reviewed-by' tag.
---
 drivers/net/nfp/nfp_common.c | 1 +
 1 file changed, 1 insertion(+)
  

Comments

Ferruh Yigit Feb. 10, 2023, 8:28 p.m. UTC | #1
On 2/3/2023 1:59 AM, Chaoyong He wrote:
> From: Peng Zhang <peng.zhang@corigine.com>
> 
> Explicitly clear the RTE_ETH_DEV_CAPA_FLOW_RULE_KEEP capability
> bit to match behavior of other PMDs. This was missed when first
> adding flow support for the NFP PMD.
> 
> Fixes: 30ecce522732 ("net/nfp: support flow API")
> Cc: chaoyong.he@corigine.com
> Cc: stable@dpdk.org
> 
> Signed-off-by: Peng Zhang <peng.zhang@corigine.com>
> Reviewed-by: Chaoyong He <chaoyong.he@corigine.com>
> Reviewed-by: Niklas Söderlund <niklas.soderlund@corigine.com>
> ---
> v2:
> * Fix the wrongly 'Reviewed-by' tag.
> ---
>  drivers/net/nfp/nfp_common.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/net/nfp/nfp_common.c b/drivers/net/nfp/nfp_common.c
> index 71711bfa22..5c191b01ef 100644
> --- a/drivers/net/nfp/nfp_common.c
> +++ b/drivers/net/nfp/nfp_common.c
> @@ -794,6 +794,7 @@ nfp_net_infos_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info)
>  	dev_info->speed_capa = RTE_ETH_LINK_SPEED_1G | RTE_ETH_LINK_SPEED_10G |
>  			       RTE_ETH_LINK_SPEED_25G | RTE_ETH_LINK_SPEED_40G |
>  			       RTE_ETH_LINK_SPEED_50G | RTE_ETH_LINK_SPEED_100G;
> +	dev_info->dev_capa &= ~RTE_ETH_DEV_CAPA_FLOW_RULE_KEEP;
>  
>  	return 0;
>  }

Nack

Above code has no impact, it has been added to drivers to highlight this
feature to driver maintainers.

This feature is added to ethdev layer and requires driver support, but
driver maintainer may miss that this feature exists at all. With above
change driver maintainer can chose to remove that line meaning they are
aware but not prefer to support this feature or properly add support it.

For your case, no need to add it explicitly, if driver doesn't support
RTE_ETH_DEV_CAPA_FLOW_RULE_KEEP, no action is needed.
  

Patch

diff --git a/drivers/net/nfp/nfp_common.c b/drivers/net/nfp/nfp_common.c
index 71711bfa22..5c191b01ef 100644
--- a/drivers/net/nfp/nfp_common.c
+++ b/drivers/net/nfp/nfp_common.c
@@ -794,6 +794,7 @@  nfp_net_infos_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info)
 	dev_info->speed_capa = RTE_ETH_LINK_SPEED_1G | RTE_ETH_LINK_SPEED_10G |
 			       RTE_ETH_LINK_SPEED_25G | RTE_ETH_LINK_SPEED_40G |
 			       RTE_ETH_LINK_SPEED_50G | RTE_ETH_LINK_SPEED_100G;
+	dev_info->dev_capa &= ~RTE_ETH_DEV_CAPA_FLOW_RULE_KEEP;
 
 	return 0;
 }