From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 24660A0544; Wed, 6 Jul 2022 02:29:16 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 53C0442B6C; Wed, 6 Jul 2022 02:29:01 +0200 (CEST) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id 824AC410D3 for ; Wed, 6 Jul 2022 02:28:58 +0200 (CEST) Received: by linux.microsoft.com (Postfix, from userid 1004) id B381720DDCB7; Tue, 5 Jul 2022 17:28:57 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com B381720DDCB7 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxonhyperv.com; s=default; t=1657067337; bh=S/gM2PHK/lVBPr4FwDoJQrEWzhsNVK9mET+HUTzeMbk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:Reply-To:From; b=S+zGHiqC5zUX5Wq2HHyGDiAGVqlxPdA76gmXbBUCokHi4yvM07n1HFi3K0Ie996au F+s91wD5/76YRYM98tqtqE2r0+hBQJHCv7JHl1ac5dTLQhxd7/2EGE6Pm4pAPxnQBq 7EV5ARqM+fguHm8wyh6X5s+g+pDf73c4I7/5aJLM= From: longli@linuxonhyperv.com To: Ferruh Yigit Cc: dev@dpdk.org, Ajay Sharma , Stephen Hemminger , Long Li Subject: [Patch v2 03/17] net/mana: add function to report support ptypes Date: Tue, 5 Jul 2022 17:28:34 -0700 Message-Id: <1657067328-18374-4-git-send-email-longli@linuxonhyperv.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1657067328-18374-1-git-send-email-longli@linuxonhyperv.com> References: <1657067328-18374-1-git-send-email-longli@linuxonhyperv.com> X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: longli@microsoft.com Errors-To: dev-bounces@dpdk.org From: Long Li Report supported protocol types. Signed-off-by: Long Li --- drivers/net/mana/mana.c | 16 ++++++++++++++++ drivers/net/mana/mana.h | 2 -- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/drivers/net/mana/mana.c b/drivers/net/mana/mana.c index 1ea2cecd37..5deea1b03a 100644 --- a/drivers/net/mana/mana.c +++ b/drivers/net/mana/mana.c @@ -110,9 +110,25 @@ mana_dev_close(struct rte_eth_dev *dev) return 0; } +static const uint32_t *mana_supported_ptypes(struct rte_eth_dev *dev __rte_unused) +{ + static const uint32_t ptypes[] = { + RTE_PTYPE_L2_ETHER, + RTE_PTYPE_L3_IPV4_EXT_UNKNOWN, + RTE_PTYPE_L3_IPV6_EXT_UNKNOWN, + RTE_PTYPE_L4_FRAG, + RTE_PTYPE_L4_TCP, + RTE_PTYPE_L4_UDP, + RTE_PTYPE_UNKNOWN + }; + + return ptypes; +} + const struct eth_dev_ops mana_dev_ops = { .dev_configure = mana_dev_configure, .dev_close = mana_dev_close, + .dev_supported_ptypes_get = mana_supported_ptypes, }; const struct eth_dev_ops mana_dev_sec_ops = { diff --git a/drivers/net/mana/mana.h b/drivers/net/mana/mana.h index 66873394b9..c433940022 100644 --- a/drivers/net/mana/mana.h +++ b/drivers/net/mana/mana.h @@ -168,8 +168,6 @@ extern int mana_logtype_init; #define PMD_INIT_FUNC_TRACE() PMD_INIT_LOG(DEBUG, " >>") -const uint32_t *mana_supported_ptypes(struct rte_eth_dev *dev); - uint16_t mana_rx_burst_removed(void *dpdk_rxq, struct rte_mbuf **pkts, uint16_t pkts_n); -- 2.17.1