DPDK patches and discussions
 help / color / mirror / Atom feed
* [PATCH] net/idpf: optimize the code of IDPF PMD
@ 2023-06-26 14:05 Mingxia Liu
  2023-06-30  8:32 ` Zhang, Qi Z
  0 siblings, 1 reply; 2+ messages in thread
From: Mingxia Liu @ 2023-06-26 14:05 UTC (permalink / raw)
  To: dev; +Cc: jingjing.wu, beilei.xing, Mingxia Liu

This patch moves 'struct eth_dev_ops idpf_eth_dev_ops = {...}'
block just after idpf_dev_close(), to group dev_ops related
code together.

Signed-off-by: Mingxia Liu <mingxia.liu@intel.com>
---
 drivers/net/idpf/idpf_ethdev.c | 56 +++++++++++++++++-----------------
 1 file changed, 28 insertions(+), 28 deletions(-)

diff --git a/drivers/net/idpf/idpf_ethdev.c b/drivers/net/idpf/idpf_ethdev.c
index bfdac92b95..801da57472 100644
--- a/drivers/net/idpf/idpf_ethdev.c
+++ b/drivers/net/idpf/idpf_ethdev.c
@@ -839,6 +839,34 @@ idpf_dev_close(struct rte_eth_dev *dev)
 	return 0;
 }
 
+static const struct eth_dev_ops idpf_eth_dev_ops = {
+	.dev_configure			= idpf_dev_configure,
+	.dev_close			= idpf_dev_close,
+	.rx_queue_setup			= idpf_rx_queue_setup,
+	.tx_queue_setup			= idpf_tx_queue_setup,
+	.dev_infos_get			= idpf_dev_info_get,
+	.dev_start			= idpf_dev_start,
+	.dev_stop			= idpf_dev_stop,
+	.link_update			= idpf_dev_link_update,
+	.rx_queue_start			= idpf_rx_queue_start,
+	.tx_queue_start			= idpf_tx_queue_start,
+	.rx_queue_stop			= idpf_rx_queue_stop,
+	.tx_queue_stop			= idpf_tx_queue_stop,
+	.rx_queue_release		= idpf_dev_rx_queue_release,
+	.tx_queue_release		= idpf_dev_tx_queue_release,
+	.mtu_set			= idpf_dev_mtu_set,
+	.dev_supported_ptypes_get	= idpf_dev_supported_ptypes_get,
+	.stats_get			= idpf_dev_stats_get,
+	.stats_reset			= idpf_dev_stats_reset,
+	.reta_update			= idpf_rss_reta_update,
+	.reta_query			= idpf_rss_reta_query,
+	.rss_hash_update		= idpf_rss_hash_update,
+	.rss_hash_conf_get		= idpf_rss_hash_conf_get,
+	.xstats_get			= idpf_dev_xstats_get,
+	.xstats_get_names		= idpf_dev_xstats_get_names,
+	.xstats_reset			= idpf_dev_xstats_reset,
+};
+
 static int
 insert_value(struct idpf_devargs *devargs, uint16_t id)
 {
@@ -1206,34 +1234,6 @@ idpf_adapter_ext_init(struct rte_pci_device *pci_dev, struct idpf_adapter_ext *a
 	return ret;
 }
 
-static const struct eth_dev_ops idpf_eth_dev_ops = {
-	.dev_configure			= idpf_dev_configure,
-	.dev_close			= idpf_dev_close,
-	.rx_queue_setup			= idpf_rx_queue_setup,
-	.tx_queue_setup			= idpf_tx_queue_setup,
-	.dev_infos_get			= idpf_dev_info_get,
-	.dev_start			= idpf_dev_start,
-	.dev_stop			= idpf_dev_stop,
-	.link_update			= idpf_dev_link_update,
-	.rx_queue_start			= idpf_rx_queue_start,
-	.tx_queue_start			= idpf_tx_queue_start,
-	.rx_queue_stop			= idpf_rx_queue_stop,
-	.tx_queue_stop			= idpf_tx_queue_stop,
-	.rx_queue_release		= idpf_dev_rx_queue_release,
-	.tx_queue_release		= idpf_dev_tx_queue_release,
-	.mtu_set			= idpf_dev_mtu_set,
-	.dev_supported_ptypes_get	= idpf_dev_supported_ptypes_get,
-	.stats_get			= idpf_dev_stats_get,
-	.stats_reset			= idpf_dev_stats_reset,
-	.reta_update			= idpf_rss_reta_update,
-	.reta_query			= idpf_rss_reta_query,
-	.rss_hash_update		= idpf_rss_hash_update,
-	.rss_hash_conf_get		= idpf_rss_hash_conf_get,
-	.xstats_get			= idpf_dev_xstats_get,
-	.xstats_get_names		= idpf_dev_xstats_get_names,
-	.xstats_reset			= idpf_dev_xstats_reset,
-};
-
 static uint16_t
 idpf_vport_idx_alloc(struct idpf_adapter_ext *ad)
 {
-- 
2.34.1


^ permalink raw reply	[flat|nested] 2+ messages in thread

* RE: [PATCH] net/idpf: optimize the code of IDPF PMD
  2023-06-26 14:05 [PATCH] net/idpf: optimize the code of IDPF PMD Mingxia Liu
@ 2023-06-30  8:32 ` Zhang, Qi Z
  0 siblings, 0 replies; 2+ messages in thread
From: Zhang, Qi Z @ 2023-06-30  8:32 UTC (permalink / raw)
  To: Liu, Mingxia, dev; +Cc: Wu, Jingjing, Xing, Beilei, Liu, Mingxia



> -----Original Message-----
> From: Mingxia Liu <mingxia.liu@intel.com>
> Sent: Monday, June 26, 2023 10:06 PM
> To: dev@dpdk.org
> Cc: Wu, Jingjing <jingjing.wu@intel.com>; Xing, Beilei <beilei.xing@intel.com>;
> Liu, Mingxia <mingxia.liu@intel.com>
> Subject: [PATCH] net/idpf: optimize the code of IDPF PMD

net/idpf: reorder code.

> 
> This patch moves 'struct eth_dev_ops idpf_eth_dev_ops = {...}'
> block just after idpf_dev_close(), to group dev_ops related code together.
> 
> Signed-off-by: Mingxia Liu <mingxia.liu@intel.com>

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

Applied to dpdk-next-net-intel.

Thanks
Qi



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-06-30  8:32 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-06-26 14:05 [PATCH] net/idpf: optimize the code of IDPF PMD Mingxia Liu
2023-06-30  8:32 ` Zhang, Qi Z

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).