[PATCH v2 26/36] net/ionic: advertise supported packet types
Andrew Boyer
andrew.boyer at amd.com
Tue Oct 18 21:41:21 CEST 2022
This improves performance, since clients may be able to skip SW
packet classification.
Signed-off-by: Andrew Boyer <andrew.boyer at amd.com>
---
doc/guides/rel_notes/release_22_11.rst | 1 +
drivers/net/ionic/ionic_ethdev.c | 1 +
drivers/net/ionic/ionic_rxtx.c | 19 +++++++++++++++++++
drivers/net/ionic/ionic_rxtx.h | 2 ++
4 files changed, 23 insertions(+)
diff --git a/doc/guides/rel_notes/release_22_11.rst b/doc/guides/rel_notes/release_22_11.rst
index 4ad525375f..0db516157c 100644
--- a/doc/guides/rel_notes/release_22_11.rst
+++ b/doc/guides/rel_notes/release_22_11.rst
@@ -147,6 +147,7 @@ New Features
* Updated to reflect that Pensando has been acquired by AMD.
* Enhanced data path to provide substantial performance improvements.
* Added support for mbuf fast free.
+ * Added support for advertising packet types.
* **Updated Intel iavf driver.**
diff --git a/drivers/net/ionic/ionic_ethdev.c b/drivers/net/ionic/ionic_ethdev.c
index 7d21bc0a9b..2560a30fe4 100644
--- a/drivers/net/ionic/ionic_ethdev.c
+++ b/drivers/net/ionic/ionic_ethdev.c
@@ -70,6 +70,7 @@ static const struct rte_eth_desc_lim tx_desc_lim_v1 = {
static const struct eth_dev_ops ionic_eth_dev_ops = {
.dev_infos_get = ionic_dev_info_get,
+ .dev_supported_ptypes_get = ionic_dev_supported_ptypes_get,
.dev_configure = ionic_dev_configure,
.mtu_set = ionic_dev_mtu_set,
.dev_start = ionic_dev_start,
diff --git a/drivers/net/ionic/ionic_rxtx.c b/drivers/net/ionic/ionic_rxtx.c
index 697e6dcc15..f92cf3fb46 100644
--- a/drivers/net/ionic/ionic_rxtx.c
+++ b/drivers/net/ionic/ionic_rxtx.c
@@ -850,6 +850,25 @@ static const uint32_t ionic_ptype_table[IONIC_RXQ_COMP_PKT_TYPE_MASK]
RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV6 | RTE_PTYPE_L4_UDP,
};
+const uint32_t *
+ionic_dev_supported_ptypes_get(struct rte_eth_dev *dev __rte_unused)
+{
+ /* See ionic_ptype_table[] */
+ static const uint32_t ptypes[] = {
+ RTE_PTYPE_L2_ETHER,
+ RTE_PTYPE_L2_ETHER_TIMESYNC,
+ RTE_PTYPE_L2_ETHER_LLDP,
+ RTE_PTYPE_L2_ETHER_ARP,
+ RTE_PTYPE_L3_IPV4,
+ RTE_PTYPE_L3_IPV6,
+ RTE_PTYPE_L4_TCP,
+ RTE_PTYPE_L4_UDP,
+ RTE_PTYPE_UNKNOWN
+ };
+
+ return ptypes;
+}
+
/*
* Cleans one descriptor. Connects the filled mbufs into a chain.
* Does not advance the tail index.
diff --git a/drivers/net/ionic/ionic_rxtx.h b/drivers/net/ionic/ionic_rxtx.h
index 6f9f3f92c6..e4c56d734d 100644
--- a/drivers/net/ionic/ionic_rxtx.h
+++ b/drivers/net/ionic/ionic_rxtx.h
@@ -40,4 +40,6 @@ void ionic_rxq_info_get(struct rte_eth_dev *dev, uint16_t queue_id,
void ionic_txq_info_get(struct rte_eth_dev *dev, uint16_t queue_id,
struct rte_eth_txq_info *qinfo);
+const uint32_t *ionic_dev_supported_ptypes_get(struct rte_eth_dev *dev);
+
#endif /* _IONIC_RXTX_H_ */
--
2.17.1
More information about the dev
mailing list