-----Original Message-----
From: Wang, ShougangX
Sent: Friday, March 6, 2020 10:24 AM
To: dev@dpdk.org
Cc: Rong, Leyi <leyi.r...@intel.com>; Wu, Jingjing <jingjing...@intel.com>;
Wang, ShougangX <shougangx.w...@intel.com>
Subject: [PATCH] net/iavf: unify Rx ptype table
From: Wang Shougang <shougangx.w...@intel.com>
This patch unified the Rx ptype table.
Signed-off-by: Wang Shougang <shougangx.w...@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