[v2,12/12] net/cpfl: support Rx/Tx queue setup for representor

Message ID 20230816150541.144532-13-beilei.xing@intel.com (mailing list archive)
State Superseded, archived
Delegated to: Qi Zhang
Headers
Series net/cpfl: support port representor |

Checks

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

Commit Message

Xing, Beilei Aug. 16, 2023, 3:05 p.m. UTC
  From: Beilei Xing <beilei.xing@intel.com>

Add dummy Rx/Tx queue setup functions for representor.

Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
Signed-off-by: Beilei Xing <beilei.xing@intel.com>
---
 drivers/net/cpfl/cpfl_representor.c | 26 ++++++++++++++++++++++++++
 1 file changed, 26 insertions(+)
  

Comments

Liu, Mingxia Sept. 6, 2023, 3:02 a.m. UTC | #1
> -----Original Message-----
> From: Xing, Beilei <beilei.xing@intel.com>
> Sent: Wednesday, August 16, 2023 11:06 PM
> To: Wu, Jingjing <jingjing.wu@intel.com>
> Cc: dev@dpdk.org; Liu, Mingxia <mingxia.liu@intel.com>; Xing, Beilei
> <beilei.xing@intel.com>
> Subject: [PATCH v2 12/12] net/cpfl: support Rx/Tx queue setup for representor
> 
> From: Beilei Xing <beilei.xing@intel.com>
> 
> Add dummy Rx/Tx queue setup functions for representor.
> 
> Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
> Signed-off-by: Beilei Xing <beilei.xing@intel.com>
> ---
>  drivers/net/cpfl/cpfl_representor.c | 26 ++++++++++++++++++++++++++
>  1 file changed, 26 insertions(+)
> 
> diff --git a/drivers/net/cpfl/cpfl_representor.c
> b/drivers/net/cpfl/cpfl_representor.c
> index 5b5c959727..58e0d91d97 100644
> --- a/drivers/net/cpfl/cpfl_representor.c
> +++ b/drivers/net/cpfl/cpfl_representor.c
> @@ -285,6 +285,29 @@ cpfl_repr_dev_stop(struct rte_eth_dev *dev)
>  	return 0;
>  }
> 
> +static int
> +idpf_repr_rx_queue_setup(__rte_unused struct rte_eth_dev *dev,
> +			 __rte_unused uint16_t queue_id,
> +			 __rte_unused uint16_t nb_desc,
> +			 __rte_unused unsigned int socket_id,
> +			 __rte_unused const struct rte_eth_rxconf *conf,
> +			 __rte_unused struct rte_mempool *pool) {
> +	/* Dummy */
> +	return 0;
> +}
> +
> +static int
> +idpf_repr_tx_queue_setup(__rte_unused struct rte_eth_dev *dev,
> +			 __rte_unused uint16_t queue_id,
> +			 __rte_unused uint16_t nb_desc,
> +			 __rte_unused unsigned int socket_id,
> +			 __rte_unused const struct rte_eth_txconf *conf) {
> +	/* Dummy */
> +	return 0;
> +}
> +
>  static int
>  cpfl_repr_link_update(struct rte_eth_dev *ethdev,
>  		      __rte_unused int wait_to_complete) @@ -309,6 +332,9 @@
> static const struct eth_dev_ops cpfl_repr_dev_ops = {
>  	.dev_close		= cpfl_repr_dev_close,
>  	.dev_infos_get		= cpfl_repr_dev_info_get,
> 
> +	.rx_queue_setup		= idpf_repr_rx_queue_setup,
> +	.tx_queue_setup		= idpf_repr_tx_queue_setup,
> +
[Liu, Mingxia] How about using function name cpfl_repr_xxx() ?

>  	.link_update		= cpfl_repr_link_update,
>  };
> 
> --
> 2.34.1
  

Patch

diff --git a/drivers/net/cpfl/cpfl_representor.c b/drivers/net/cpfl/cpfl_representor.c
index 5b5c959727..58e0d91d97 100644
--- a/drivers/net/cpfl/cpfl_representor.c
+++ b/drivers/net/cpfl/cpfl_representor.c
@@ -285,6 +285,29 @@  cpfl_repr_dev_stop(struct rte_eth_dev *dev)
 	return 0;
 }
 
+static int
+idpf_repr_rx_queue_setup(__rte_unused struct rte_eth_dev *dev,
+			 __rte_unused uint16_t queue_id,
+			 __rte_unused uint16_t nb_desc,
+			 __rte_unused unsigned int socket_id,
+			 __rte_unused const struct rte_eth_rxconf *conf,
+			 __rte_unused struct rte_mempool *pool)
+{
+	/* Dummy */
+	return 0;
+}
+
+static int
+idpf_repr_tx_queue_setup(__rte_unused struct rte_eth_dev *dev,
+			 __rte_unused uint16_t queue_id,
+			 __rte_unused uint16_t nb_desc,
+			 __rte_unused unsigned int socket_id,
+			 __rte_unused const struct rte_eth_txconf *conf)
+{
+	/* Dummy */
+	return 0;
+}
+
 static int
 cpfl_repr_link_update(struct rte_eth_dev *ethdev,
 		      __rte_unused int wait_to_complete)
@@ -309,6 +332,9 @@  static const struct eth_dev_ops cpfl_repr_dev_ops = {
 	.dev_close		= cpfl_repr_dev_close,
 	.dev_infos_get		= cpfl_repr_dev_info_get,
 
+	.rx_queue_setup		= idpf_repr_rx_queue_setup,
+	.tx_queue_setup		= idpf_repr_tx_queue_setup,
+
 	.link_update		= cpfl_repr_link_update,
 };