From mboxrd@z Thu Jan 1 00:00:00 1970 From: Gagandeep Singh Subject: [PATCH v3 2/3] net/enetc: support packet parse type Date: Fri, 28 Sep 2018 10:46:46 +0530 Message-ID: <20180928051647.32341-3-g.singh@nxp.com> References: <20180913094201.17098-1-g.singh@nxp.com> <20180928051647.32341-1-g.singh@nxp.com> Mime-Version: 1.0 Content-Type: text/plain Cc: pankaj.chauhan@nxp.com, Gagandeep Singh To: dev@dpdk.org, ferruh.yigit@intel.com Return-path: Received: from EUR02-AM5-obe.outbound.protection.outlook.com (mail-eopbgr00044.outbound.protection.outlook.com [40.107.0.44]) by dpdk.org (Postfix) with ESMTP id 117A21B114 for ; Fri, 28 Sep 2018 07:17:45 +0200 (CEST) In-Reply-To: <20180928051647.32341-1-g.singh@nxp.com> List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Signed-off-by: Gagandeep Singh --- drivers/net/enetc/enetc_ethdev.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/drivers/net/enetc/enetc_ethdev.c b/drivers/net/enetc/enetc_ethdev.c index 2d90d8fd5..3e1c934cb 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, }; /** @@ -165,6 +167,23 @@ enetc_dev_close(struct rte_eth_dev *dev __rte_unused) PMD_INIT_FUNC_TRACE(); } +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) -- 2.17.1