[v2,4/4] net/iavf: add support for runtime queue reconfiguration

Message ID 20230831123337.871496-5-bruce.richardson@intel.com (mailing list archive)
State Accepted, archived
Delegated to: Qi Zhang
Headers
Series Fix i40e/iavf queue reconfig and restarting |

Checks

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

Commit Message

Bruce Richardson Aug. 31, 2023, 12:33 p.m. UTC
  Unlike the i40e driver, the iavf driver does not advertise support for
runtime reconfiguration, meaning that application using the same
hardware may get different behaviour when using a PF vs a VF. On testing
with a 40G NIC, the only blocker to reconfiguring an RX queue on the fly
is the fact that this support is not advertised by the driver.

Add support for runtime reconfig by reporting it in the device info
flags.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
---
 doc/guides/nics/features/iavf.ini | 2 ++
 drivers/net/iavf/iavf_ethdev.c    | 4 +++-
 2 files changed, 5 insertions(+), 1 deletion(-)
  

Comments

Qi Zhang Sept. 5, 2023, 2:25 a.m. UTC | #1
> -----Original Message-----
> From: Bruce Richardson <bruce.richardson@intel.com>
> Sent: Thursday, August 31, 2023 8:34 PM
> To: dev@dpdk.org
> Cc: Richardson, Bruce <bruce.richardson@intel.com>
> Subject: [PATCH v2 4/4] net/iavf: add support for runtime queue
> reconfiguration
> 
> Unlike the i40e driver, the iavf driver does not advertise support for runtime
> reconfiguration, meaning that application using the same hardware may get
> different behaviour when using a PF vs a VF. On testing with a 40G NIC, the
> only blocker to reconfiguring an RX queue on the fly is the fact that this
> support is not advertised by the driver.
> 
> Add support for runtime reconfig by reporting it in the device info flags.
> 
> Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
> ---
>  doc/guides/nics/features/iavf.ini | 2 ++
>  drivers/net/iavf/iavf_ethdev.c    | 4 +++-
>  2 files changed, 5 insertions(+), 1 deletion(-)
> 
> diff --git a/doc/guides/nics/features/iavf.ini
> b/doc/guides/nics/features/iavf.ini
> index b72cd98484..db4f92ce71 100644
> --- a/doc/guides/nics/features/iavf.ini
> +++ b/doc/guides/nics/features/iavf.ini
> @@ -11,6 +11,8 @@ Speed capabilities   = Y
>  Link status          = Y
>  Rx interrupt         = Y
>  Queue start/stop     = Y
> +Runtime Rx queue setup = Y
> +Runtime Tx queue setup = Y
>  Power mgmt address monitor = Y
>  MTU update           = Y
>  Scattered Rx         = Y
> diff --git a/drivers/net/iavf/iavf_ethdev.c b/drivers/net/iavf/iavf_ethdev.c
> index f2fc5a5621..22fbd7d6b2 100644
> --- a/drivers/net/iavf/iavf_ethdev.c
> +++ b/drivers/net/iavf/iavf_ethdev.c
> @@ -1127,7 +1127,9 @@ iavf_dev_info_get(struct rte_eth_dev *dev, struct
> rte_eth_dev_info *dev_info)
>  	dev_info->reta_size = vf->vf_res->rss_lut_size;
>  	dev_info->flow_type_rss_offloads = IAVF_RSS_OFFLOAD_ALL;
>  	dev_info->max_mac_addrs = IAVF_NUM_MACADDR_MAX;
> -	dev_info->dev_capa &= ~RTE_ETH_DEV_CAPA_FLOW_RULE_KEEP;
> +	dev_info->dev_capa =
> +		RTE_ETH_DEV_CAPA_RUNTIME_RX_QUEUE_SETUP |
> +		RTE_ETH_DEV_CAPA_RUNTIME_TX_QUEUE_SETUP;
>  	dev_info->rx_offload_capa =
>  		RTE_ETH_RX_OFFLOAD_VLAN_STRIP |
>  		RTE_ETH_RX_OFFLOAD_QINQ_STRIP |
> --
> 2.39.2

Acked-by: Qi Zhang <qi.z.zhang@intel.com>

Squashed with Patch 3/4, applied to dpdk-next-net-intel.

Thanks
Qi
  

Patch

diff --git a/doc/guides/nics/features/iavf.ini b/doc/guides/nics/features/iavf.ini
index b72cd98484..db4f92ce71 100644
--- a/doc/guides/nics/features/iavf.ini
+++ b/doc/guides/nics/features/iavf.ini
@@ -11,6 +11,8 @@  Speed capabilities   = Y
 Link status          = Y
 Rx interrupt         = Y
 Queue start/stop     = Y
+Runtime Rx queue setup = Y
+Runtime Tx queue setup = Y
 Power mgmt address monitor = Y
 MTU update           = Y
 Scattered Rx         = Y
diff --git a/drivers/net/iavf/iavf_ethdev.c b/drivers/net/iavf/iavf_ethdev.c
index f2fc5a5621..22fbd7d6b2 100644
--- a/drivers/net/iavf/iavf_ethdev.c
+++ b/drivers/net/iavf/iavf_ethdev.c
@@ -1127,7 +1127,9 @@  iavf_dev_info_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info)
 	dev_info->reta_size = vf->vf_res->rss_lut_size;
 	dev_info->flow_type_rss_offloads = IAVF_RSS_OFFLOAD_ALL;
 	dev_info->max_mac_addrs = IAVF_NUM_MACADDR_MAX;
-	dev_info->dev_capa &= ~RTE_ETH_DEV_CAPA_FLOW_RULE_KEEP;
+	dev_info->dev_capa =
+		RTE_ETH_DEV_CAPA_RUNTIME_RX_QUEUE_SETUP |
+		RTE_ETH_DEV_CAPA_RUNTIME_TX_QUEUE_SETUP;
 	dev_info->rx_offload_capa =
 		RTE_ETH_RX_OFFLOAD_VLAN_STRIP |
 		RTE_ETH_RX_OFFLOAD_QINQ_STRIP |