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 5CC34A0561; Fri, 28 Feb 2020 11:45:39 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 4265C1BFE8; Fri, 28 Feb 2020 11:45:39 +0100 (CET) Received: from NAM11-CO1-obe.outbound.protection.outlook.com (mail-co1nam11on2083.outbound.protection.outlook.com [40.107.220.83]) by dpdk.org (Postfix) with ESMTP id 8B3143B5 for ; Fri, 28 Feb 2020 11:45:37 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ZJ/FbBlNh9jX/eywFyKsQR0wCOFx4yDeUFvIMdOwV6nPx+M4l5OmZgztWD6jvhV6huqM8cXdf8Y7lH4g/g3+/a2uLO1A8MZXHM4LnVf1P6s+uWmM6un4RtI0wYXcLmhM/34Hs2u0o0BsQ1gXzc0fV45PM2XiRIAwEJFG3jk2QBx8KOevXpS/MNihOQdKOCJGiwyz2foQ87Bm6YzrrinRHdxTU0/jCwk6Ixs1QBdgU2Lzecp9O274nZjTS+20kJzSXNOTYbcsCU2ab32rrhbA+YubDX9zLb+cfKdgedxMUB4Aogs0pdqfgL1MbUT5HDJP8MgyQMqGHj77BkyftsGV4w== 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=aXiANNodORzQLmWztexyP4XVbT/7aBX+ZD7Gd/u1ib+DVDhs9arnePXaV0oUtCLoFjdoZOe+o+4V51ozoD75EifBDIymZaJhqok66crgCRKk0jBbGnuDRgyi9LcdXsLu+tYXotHCGmL6MoSk8cO1ZikjCQKFsg68ZX1o7HjwevFOxXyhzuQZyV6lydQuIAH+G5uAYyk0JELMZecs28oujNYWCDwnilBjrg70XAsa/njUSsz2jO36GjjYy08JKW0IDYzwDG3WLyee737vhGukXWbICHGNMNpz6MoKo6TwWx9kK8PE8d8D9vfw9hKf/Euf04CZw/bXWM270cL07VcPBA== 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=vXNGpEUeh+MG5qo+U0oRwvGfHtsRi6X22SWbLWxBl/ef6uqKeh+wd/gRgtdpQyoPktjOcPr5FjbBfoRNZWgaMdn76pqyTnhkD9wgPau77HZWkdOYLfVRMWWYE+SIV9frW7lHf3HYUNUz9yXvUOaPH6/np6hMhPw7M4DioiBHy/M= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Amaranath.Somalapuram@amd.com; Received: from CY4PR1201MB2471.namprd12.prod.outlook.com (2603:10b6:903:d0::10) by CY4PR1201MB0149.namprd12.prod.outlook.com (2603:10b6:910:1c::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2750.21; Fri, 28 Feb 2020 10:45:36 +0000 Received: from CY4PR1201MB2471.namprd12.prod.outlook.com ([fe80::297a:4763:6e7f:bbce]) by CY4PR1201MB2471.namprd12.prod.outlook.com ([fe80::297a:4763:6e7f:bbce%11]) with mapi id 15.20.2772.018; Fri, 28 Feb 2020 10:45:36 +0000 From: asomalap@amd.com To: dev@dpdk.org Cc: Ravi1.Kumar@amd.com Date: Fri, 28 Feb 2020 16:15:10 +0530 Message-Id: <20200228104510.2114-1-asomalap@amd.com> X-Mailer: git-send-email 2.17.1 Content-Type: text/plain X-ClientProxiedBy: MAXPR01CA0095.INDPRD01.PROD.OUTLOOK.COM (2603:1096:a00:5d::13) To CY4PR1201MB2471.namprd12.prod.outlook.com (2603:10b6:903:d0::10) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from amd.amd.com (165.204.156.251) by MAXPR01CA0095.INDPRD01.PROD.OUTLOOK.COM (2603:1096:a00:5d::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2772.14 via Frontend Transport; Fri, 28 Feb 2020 10:45:35 +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: 7da22d6e-ef2c-40c9-1b2c-08d7bc3b57df X-MS-TrafficTypeDiagnostic: CY4PR1201MB0149:|CY4PR1201MB0149: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:1303; X-Forefront-PRVS: 0327618309 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4636009)(136003)(346002)(366004)(39860400002)(396003)(376002)(199004)(189003)(478600001)(5660300002)(7696005)(16526019)(186003)(52116002)(6916009)(9686003)(316002)(36756003)(2906002)(66556008)(66946007)(66476007)(4326008)(1076003)(6486002)(2616005)(8936002)(8676002)(81166006)(81156014)(6666004)(956004)(26005); DIR:OUT; SFP:1101; SCL:1; SRVR:CY4PR1201MB0149; H:CY4PR1201MB2471.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: 5XmeaoTz+dHtM/BpbWia3lUS4LP7ktBHJpS2KpxAUpeaLeRyx2nNx/YsLGGE/a8Yq124JdhPP108KrTNyz638SKZOIl0uWol40/+aMNlWdaL96YpFlSGRCH+RxZsGFIFGPV8ScQewNSZdFHHag6kKnRb482FmCuRhal1uxGw1hldpEPq0tj8Kld9u8gl+gBPd0Au+a7YVGlj44arbg2uqb7jIPigzfG5dQeKLy8i1D6c0fc44szfrovzct1VgoHxLeBlLAp4glc4Y5a6zZ1URw43OfXZTBRDeW+dLX7bBOZDYtDuEU96xQTkvev5y2B9Ylro8IOaXo0LXhXgPfGnMCC9jDePTg8nB9eo05H4CE0liJ3xhR+k51F3eYHRy7HNsuzAI/jGRr82zC8++bpyCMWz3l0LrjKFM8xmmXd6NSoJDsUclv+oTFbNHsDPrQ3E X-MS-Exchange-AntiSpam-MessageData: gfXDZ18jfGsTjn3wRauatgfH1WMgNiX5Mi9ODmV3uOA8sPVwOsh7nSwAyZHvzFzEr8SIPWe3EC9S5GXWmE3tsnRgJOLVy6eJ8Usz3LMIwPoOiaQyjDAP8veUKyFZx2zsoNa3qQFr4AJDvwD/9SFexQ== X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: 7da22d6e-ef2c-40c9-1b2c-08d7bc3b57df X-MS-Exchange-CrossTenant-OriginalArrivalTime: 28 Feb 2020 10:45:36.1565 (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: aZd6qryP7P02N/iyRvcPH1fM84y67hv7jcMt8OvK+FrWirpEz0SPjX1Idu8yQWTCC7b2HqteUTx/ff2FIlK/Ug== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR1201MB0149 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