[dpdk-dev] [PATCH] net/iavf: unify Rx ptype table

Wu, Jingjing jingjing.wu at intel.com
Mon Mar 23 03:09:06 CET 2020



-----Original Message-----
From: Wang, ShougangX 
Sent: Friday, March 6, 2020 10:24 AM
To: dev at dpdk.org
Cc: Rong, Leyi <leyi.rong at intel.com>; Wu, Jingjing <jingjing.wu at intel.com>; Wang, ShougangX <shougangx.wang at intel.com>
Subject: [PATCH] net/iavf: unify Rx ptype table

From: Wang Shougang <shougangx.wang at intel.com>

This patch unified the Rx ptype table.

Signed-off-by: Wang Shougang <shougangx.wang at intel.com>
---
 drivers/net/iavf/iavf.h               |   3 +-
 drivers/net/iavf/iavf_ethdev.c        |   3 +
 drivers/net/iavf/iavf_rxtx.c          | 604 +++++++++++++++++++++++---
 drivers/net/iavf/iavf_rxtx.h          |   3 +
 drivers/net/iavf/iavf_rxtx_vec_avx2.c |  21 +-  drivers/net/iavf/iavf_rxtx_vec_sse.c  |  25 +-
 6 files changed, 561 insertions(+), 98 deletions(-)

diff --git a/drivers/net/iavf/iavf.h b/drivers/net/iavf/iavf.h index fe25d807c..526040c6e 100644
--- a/drivers/net/iavf/iavf.h
+++ b/drivers/net/iavf/iavf.h
@@ -119,7 +119,7 @@ struct iavf_info {
 	uint16_t rxq_map[IAVF_MAX_MSIX_VECTORS];  };
 
-#define IAVF_MAX_PKT_TYPE 256
+#define IAVF_MAX_PKT_TYPE 1024
 
 /* Structure to store private data for each VF instance. */  struct iavf_adapter { @@ -131,6 +131,7 @@ struct iavf_adapter {
 	/* For vector PMD */
 	bool rx_vec_allowed;
 	bool tx_vec_allowed;
+	const uint32_t *ptype_tbl;
 	bool stopped;
 };
 
diff --git a/drivers/net/iavf/iavf_ethdev.c b/drivers/net/iavf/iavf_ethdev.c index 34913f9c4..ee9f82249 100644
--- a/drivers/net/iavf/iavf_ethdev.c
+++ b/drivers/net/iavf/iavf_ethdev.c
@@ -1334,6 +1334,9 @@ iavf_dev_init(struct rte_eth_dev *eth_dev)
 		return -1;
 	}
 
+	/* set default ptype table */
+	adapter->ptype_tbl = iavf_get_default_ptype_table();
+
As the ptype table is static, is that necessary to define a function to get it? Is there any consideration for future extension?


Thanks
Jingjing


More information about the dev mailing list