summaryrefslogtreecommitdiff
path: root/drivers/net/enetc
diff options
context:
space:
mode:
authorGagandeep Singh <g.singh@nxp.com>2018-10-03 19:06:07 +0530
committerFerruh Yigit <ferruh.yigit@intel.com>2018-10-11 18:53:49 +0200
commit3756a4c6f83bf2abf61b1b1c343fe63773d0436b (patch)
treeb3e884cc3a273267648eeaaf5630cde3eabe9ec3 /drivers/net/enetc
parent469c6111a799bd3af231ae3254e3a610a5621b45 (diff)
downloaddpdk-next-eventdev-3756a4c6f83bf2abf61b1b1c343fe63773d0436b.zip
dpdk-next-eventdev-3756a4c6f83bf2abf61b1b1c343fe63773d0436b.tar.gz
dpdk-next-eventdev-3756a4c6f83bf2abf61b1b1c343fe63773d0436b.tar.xz
net/enetc: support packet type parsing
enable supported packet parse types feature Signed-off-by: Gagandeep Singh <g.singh@nxp.com> Acked-by: Shreyansh Jain <shreyansh.jain@nxp.com> Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Diffstat (limited to 'drivers/net/enetc')
-rw-r--r--drivers/net/enetc/enetc_ethdev.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/drivers/net/enetc/enetc_ethdev.c b/drivers/net/enetc/enetc_ethdev.c
index dfe7dda..3ee7bb4 100644
--- a/drivers/net/enetc/enetc_ethdev.c
+++ b/drivers/net/enetc/enetc_ethdev.c
@@ -28,6 +28,7 @@ static int enetc_tx_queue_setup(struct rte_eth_dev *dev, uint16_t tx_queue_id,
uint16_t nb_tx_desc, unsigned int socket_id,
const struct rte_eth_txconf *tx_conf);
static void enetc_tx_queue_release(void *txq);
+static const uint32_t *enetc_supported_ptypes_get(struct rte_eth_dev *dev);
/*
* The set of PCI devices this driver supports
@@ -50,6 +51,7 @@ static const struct eth_dev_ops enetc_ops = {
.rx_queue_release = enetc_rx_queue_release,
.tx_queue_setup = enetc_tx_queue_setup,
.tx_queue_release = enetc_tx_queue_release,
+ .dev_supported_ptypes_get = enetc_supported_ptypes_get,
};
/**
@@ -182,6 +184,23 @@ enetc_dev_close(struct rte_eth_dev *dev)
dev->data->nb_tx_queues = 0;
}
+static const uint32_t *
+enetc_supported_ptypes_get(struct rte_eth_dev *dev __rte_unused)
+{
+ static const uint32_t ptypes[] = {
+ RTE_PTYPE_L2_ETHER,
+ RTE_PTYPE_L3_IPV4,
+ RTE_PTYPE_L3_IPV6,
+ RTE_PTYPE_L4_TCP,
+ RTE_PTYPE_L4_UDP,
+ RTE_PTYPE_L4_SCTP,
+ RTE_PTYPE_L4_ICMP,
+ RTE_PTYPE_UNKNOWN
+ };
+
+ return ptypes;
+}
+
/* return 0 means link status changed, -1 means not changed */
static int
enetc_link_update(struct rte_eth_dev *dev, int wait_to_complete __rte_unused)