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 982F0A054F; Sat, 24 Sep 2022 04:46:12 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 480CC42BE1; Sat, 24 Sep 2022 04:46:03 +0200 (CEST) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id 6023942BD0 for ; Sat, 24 Sep 2022 04:45:54 +0200 (CEST) Received: by linux.microsoft.com (Postfix, from userid 1004) id B820120C32C1; Fri, 23 Sep 2022 19:45:53 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com B820120C32C1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxonhyperv.com; s=default; t=1663987553; bh=2PU0OFLcA4Z7UWyo676oE4YrOyWamAbdCRjdMgs12W8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:Reply-To:From; b=CONsXtrDL6mPcWp2fIf8rg697fNUy450D0XOvgYVDpiXYYA39hvlk8JlSISRKG40Y n+kafzBvHofF7J9Gnnpx0lGUiV+fp+0enzVo8XcqZvetf0m8KJk99h12PtdyYolpTZ thSO+q6y0vpcdIF28E3PQ09ea+rLNU5u1vk3VHcw= From: longli@linuxonhyperv.com To: Ferruh Yigit Cc: dev@dpdk.org, Ajay Sharma , Stephen Hemminger , Long Li Subject: [Patch v9 03/18] net/mana: report supported ptypes Date: Fri, 23 Sep 2022 19:45:31 -0700 Message-Id: <1663987546-15982-4-git-send-email-longli@linuxonhyperv.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1663987546-15982-1-git-send-email-longli@linuxonhyperv.com> References: <1662674189-29524-1-git-send-email-longli@linuxonhyperv.com> <1663987546-15982-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 --- Change log. v7: change link_speed to RTE_ETH_SPEED_NUM_100G drivers/net/mana/mana.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/drivers/net/mana/mana.c b/drivers/net/mana/mana.c index 64069e2b9f..5fc656110f 100644 --- a/drivers/net/mana/mana.c +++ b/drivers/net/mana/mana.c @@ -118,9 +118,26 @@ 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; +} + static 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, }; static const struct eth_dev_ops mana_dev_secondary_ops = { -- 2.17.1