From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 51C94A0568; Mon, 2 Mar 2020 09:17:29 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id B617F1C01B; Mon, 2 Mar 2020 09:17:22 +0100 (CET) Received: from NAM04-CO1-obe.outbound.protection.outlook.com (mail-eopbgr690075.outbound.protection.outlook.com [40.107.69.75]) by dpdk.org (Postfix) with ESMTP id 13F8C2E81 for ; Mon, 2 Mar 2020 09:17:19 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=gb6naMcWpL8vHzxduBjsIU/5stCTLkqikrmpJFNPM9XRJRgKCjbDuy7c5hYEKNN5WjpTYhpRVIyNPPkCxqn3GFdDPLmjA5PGmxHPkoQ3Uhv4Z3rIHObdBv7vUCb+1sHKc5jClhKS9brWK1w1ohfIg2cbXJQ/42bkzEKLLL951kItNSZVA1FWFOYBtdki0UY+t+lXv48VXDiO7c8WfIChOAosghyVcGmryl+DvtxzFKszN88QX0W+jzQ9FDUj0W8ALVTgQNYMK6O14lkhw3arUh50f2uoc8Q+Et/KVXFPXsWeTaQv38HnFAowMnKf4XLL6i6QRnStjkstqjWXxGt5Bg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=MwUc8hzroT09OdwEpDAtPzXR51dgQ5tu1fQcn9z4bt0=; b=J57pv8VjcgnUkilLkXyvN17ygc6EOe9RuNMIAX8ViOGA1l8FsWxVkXmqiLdLNq+y2bT6o3GAoJLP5N7sCDNuY/I+IqrF76FrcxZcIBMuAP3o8xyqsox15/F8AuoiUSCevVFY0cG2O90Na3ldp/NC2nIY/Cjx7Cydvq7U5p+6Jqd009CeM0ohhoryngYWG3EC495DyWi1Sqn1L3HBWU73hOYvpIRPCbUmLz6KVz/NkNiwwZmCbkM9oKIE9uVf3qomBFePtKdL/GLu0G9FHey1jlymz2naJpH3UCwAARXBMS3W2yUdppRVchIY1PrVxTPm5SuGxrn59F7fMA/CrAKsSw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=amd.com; dmarc=pass action=none header.from=amd.com; dkim=pass header.d=amd.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amdcloud.onmicrosoft.com; s=selector2-amdcloud-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=MwUc8hzroT09OdwEpDAtPzXR51dgQ5tu1fQcn9z4bt0=; b=0e9V3daB3dUpyNidWELm5pcr8YWmY9iUR0Nfl0ZUCn57sU+IUO2uSE8SDqRo+m9AQqtry8RvPQowuCoH7HUOGuqAbjpVMl1K7lEMa/qlOVsAWCBQ/gkHvHY7PjZrZVAH7XD+ohDBqJhs/Dr5fK2LtYntYfDhO8myHWhYNOYNy9c= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Amaranath.Somalapuram@amd.com; Received: from DM5PR1201MB2474.namprd12.prod.outlook.com (2603:10b6:3:e3::8) by DM5PR1201MB0092.namprd12.prod.outlook.com (2603:10b6:4:54::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2772.15; Mon, 2 Mar 2020 08:17:17 +0000 Received: from DM5PR1201MB2474.namprd12.prod.outlook.com ([fe80::f914:4efa:e6a:8d81]) by DM5PR1201MB2474.namprd12.prod.outlook.com ([fe80::f914:4efa:e6a:8d81%11]) with mapi id 15.20.2772.019; Mon, 2 Mar 2020 08:17:17 +0000 From: asomalap@amd.com To: dev@dpdk.org Cc: Ravi1.Kumar@amd.com Date: Mon, 2 Mar 2020 13:46:54 +0530 Message-Id: <20200302081655.100443-2-asomalap@amd.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200302081655.100443-1-asomalap@amd.com> References: <20200302081655.100443-1-asomalap@amd.com> Content-Type: text/plain X-ClientProxiedBy: MAXPR0101CA0046.INDPRD01.PROD.OUTLOOK.COM (2603:1096:a00:d::32) To DM5PR1201MB2474.namprd12.prod.outlook.com (2603:10b6:3:e3::8) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from amd.amd.com (165.204.156.251) by MAXPR0101CA0046.INDPRD01.PROD.OUTLOOK.COM (2603:1096:a00:d::32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2772.19 via Frontend Transport; Mon, 2 Mar 2020 08:17:16 +0000 X-Mailer: git-send-email 2.17.1 X-Originating-IP: [165.204.156.251] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: a151545a-d218-485c-1622-08d7be821ee4 X-MS-TrafficTypeDiagnostic: DM5PR1201MB0092:|DM5PR1201MB0092: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:1303; X-Forefront-PRVS: 033054F29A X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4636009)(366004)(346002)(39860400002)(136003)(396003)(376002)(199004)(189003)(9686003)(316002)(2616005)(956004)(52116002)(36756003)(6486002)(5660300002)(7696005)(26005)(16526019)(1076003)(186003)(2906002)(6916009)(8936002)(4326008)(81166006)(8676002)(478600001)(66946007)(81156014)(6666004)(66476007)(66556008); DIR:OUT; SFP:1101; SCL:1; SRVR:DM5PR1201MB0092; H:DM5PR1201MB2474.namprd12.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; Received-SPF: None (protection.outlook.com: amd.com does not designate permitted sender hosts) X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: c3Y953DYPwawv4reTXxkgPQJq6HZpFQvhorUq54tEPg5idEjPt6mQ9Si5HYdVO6/WP+6gy1Sy/OGrthTsJJNe/RYkALrBe2pzHvFj80h9+ZOULG5PKOh6+GN51gApnax2d8Pqa6dTeOte7UsRsgbJ300r8728kQ3As+hj+1WxUzYYcLqaxTV9znBfSc7jVB//PYT9FcwO5gEaXHJveK/C04TgrlLejLp5fZkJw5gMpQJAnAKdW3+diu0UJ0GCI9gw4fkuloYgGO5pfPGk0Bhi4VqpwU1ReMAzp7fWTIG/FnfawSjiCr4HQqpcKtjOCL3090IEFRvZYiXcPDvH0z0TjyM1qePeiaL8N9PLHLUFPGa5DDiO1MgfH9uKTjDtUStxzW6Xtr0UXUdrDVFonuTIqsNm9vDG20kQgyk/z1R1zovm1SDpJ/AvyBaxhaYOysu X-MS-Exchange-AntiSpam-MessageData: gNzki6MxcWt8ucS4X0h1uCJLv6/HkUl7f+KIMq55xnajcH2s2/y2ZKXlGLwaaungrpgMjM2E4L1Z24vBBp13GG4ONM99AcL8GFbxICJa4+AhFxzbXTvtyF+Boc052ytYouljxD+yBEEHvpfImNciUg== X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: a151545a-d218-485c-1622-08d7be821ee4 X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 Mar 2020 08:17:17.4302 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: NCH7Itx3F9UwrXT/ATPOWMelzIPSVu4T6KCBu0UC1aa/nbiVDtc0af/KpV0kmyMm8fSKNoRP2c31KnBqy0bQlA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR1201MB0092 Subject: [dpdk-dev] [PATCH v1 2/3] net/axgbe: get packet types API X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" From: Amaranath Somalapuram Adding api for eth_dev_supported_ptypes_get_t Signed-off-by: Amaranath Somalapuram --- drivers/net/axgbe/axgbe_ethdev.c | 37 ++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/drivers/net/axgbe/axgbe_ethdev.c b/drivers/net/axgbe/axgbe_ethdev.c index 887b4829d..70b198f79 100644 --- a/drivers/net/axgbe/axgbe_ethdev.c +++ b/drivers/net/axgbe/axgbe_ethdev.c @@ -48,6 +48,7 @@ static void axgbe_rxq_info_get(struct rte_eth_dev *dev, uint16_t queue_id, struct rte_eth_rxq_info *qinfo); static void axgbe_txq_info_get(struct rte_eth_dev *dev, uint16_t queue_id, struct rte_eth_txq_info *qinfo); +const uint32_t *axgbe_dev_supported_ptypes_get(struct rte_eth_dev *dev); struct axgbe_xstats { char name[RTE_ETH_XSTATS_NAME_SIZE]; @@ -176,6 +177,7 @@ static const struct eth_dev_ops axgbe_eth_dev_ops = { .tx_queue_release = axgbe_dev_tx_queue_release, .rxq_info_get = axgbe_rxq_info_get, .txq_info_get = axgbe_txq_info_get, + .dev_supported_ptypes_get = axgbe_dev_supported_ptypes_get, }; static int axgbe_phy_reset(struct axgbe_port *pdata) @@ -845,6 +847,41 @@ axgbe_txq_info_get(struct rte_eth_dev *dev, uint16_t queue_id, qinfo->nb_desc = txq->nb_desc; qinfo->conf.tx_free_thresh = txq->free_thresh; } +const uint32_t * +axgbe_dev_supported_ptypes_get(struct rte_eth_dev *dev) +{ + 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_EXT_UNKNOWN, + RTE_PTYPE_L3_IPV6_EXT_UNKNOWN, + RTE_PTYPE_L4_FRAG, + RTE_PTYPE_L4_ICMP, + RTE_PTYPE_L4_NONFRAG, + RTE_PTYPE_L4_SCTP, + RTE_PTYPE_L4_TCP, + RTE_PTYPE_L4_UDP, + RTE_PTYPE_TUNNEL_GRENAT, + RTE_PTYPE_TUNNEL_IP, + RTE_PTYPE_INNER_L2_ETHER, + RTE_PTYPE_INNER_L2_ETHER_VLAN, + RTE_PTYPE_INNER_L3_IPV4_EXT_UNKNOWN, + RTE_PTYPE_INNER_L3_IPV6_EXT_UNKNOWN, + RTE_PTYPE_INNER_L4_FRAG, + RTE_PTYPE_INNER_L4_ICMP, + RTE_PTYPE_INNER_L4_NONFRAG, + RTE_PTYPE_INNER_L4_SCTP, + RTE_PTYPE_INNER_L4_TCP, + RTE_PTYPE_INNER_L4_UDP, + RTE_PTYPE_UNKNOWN + }; + + if (dev->rx_pkt_burst == axgbe_recv_pkts) + return ptypes; + return NULL; +} static void axgbe_get_all_hw_features(struct axgbe_port *pdata) { -- 2.17.1