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 DAFD5A0568; Mon, 2 Mar 2020 09:17:19 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id BA74E1BFF3; Mon, 2 Mar 2020 09:17:19 +0100 (CET) Received: from NAM10-MW2-obe.outbound.protection.outlook.com (mail-mw2nam10on2086.outbound.protection.outlook.com [40.107.94.86]) by dpdk.org (Postfix) with ESMTP id 705812E81 for ; Mon, 2 Mar 2020 09:17:18 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=R1+ObhHMR1jcetA3616pK+887Vsu9ngHRvHIBmGQCMXk/pU5ppiSIt+uh1m6Vr0l2jB+kr+Fxw63RA8ruBm2TQOvb7yIHIAL0lZkq8ieBAmJxK+tY4LDHdnSCXkDpxbdckhOwxS2HssvFwfJXOrDxxs0W3XoDH/Nw/338uX1vMhKNKpu0m46tlgbLSneul4JgpejMBHcT3BECa6xolmw6nF5UnevYAvp4Ks+mf3QoOk25YhYV1f/cEWDFfXIgiyfZa+L2ltmpzcrKh2ZA3WJbMEvgQXHWbT1s4vOkwvrzaN0i5Lptv7I6DRTHEhbwS9zp9GQsTBQIfbPwQmVn7ytuA== 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=RbD2smelytmCLQG+LEiXqawns8TpsVSrAvtgomRcDck=; b=j1txWHykDWa1h/CSxJn/WsocPzzcj3bx2TRL684wQAqw+QaSVO+QAqYMUhkEx7ygVYn2NWnmD21ffEbAgTdrbX82GcVIgHEVx0ROVDXN0KbMuY5yhiswhnd/aYhsPROP47vpCrnPeQmGXu/MxTFhL8yEtsnt9Xtj5nDVP+QER6y4HZP+dy6F7j9dEjh/xuQjgBJbk1ffPjQ8VBCeJe5YzigXtobxFhxfEfokW8hNMujcdL+7gSSSP6NAzz4OrdtIRKCg4nsT2zgu3wtyKm6Z0O8yyoUf/Pg7/1vjNqiRiSZ64FKpKVcijfeWO7yBE9997vN8HKdfRNpiWdYwrTUN0g== 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=RbD2smelytmCLQG+LEiXqawns8TpsVSrAvtgomRcDck=; b=R/btDsKSf1xmlcjaabZeqNQf21uXfblVnchR0BQ8PnAJf4fp65ePTaJNCfpC2s9wozG/Zo1GLh/niXUDO7YcdX6Exc0hykGRKomfcOhZNcUT+Y9iTDWInynV/qOrfPY9VzFwD3gv+9PoJo8PlZVIHzuil+NiK4TDN949lzf+xnA= 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 DM5PR1201MB0026.namprd12.prod.outlook.com (2603:10b6:4:52::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2772.18; Mon, 2 Mar 2020 08:17:15 +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:15 +0000 From: asomalap@amd.com To: dev@dpdk.org Cc: Ravi1.Kumar@amd.com Date: Mon, 2 Mar 2020 13:46:53 +0530 Message-Id: <20200302081655.100443-1-asomalap@amd.com> X-Mailer: git-send-email 2.17.1 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:14 +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: 023da9ed-2ad3-4751-a0df-08d7be821e0f X-MS-TrafficTypeDiagnostic: DM5PR1201MB0026:|DM5PR1201MB0026: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:1079; X-Forefront-PRVS: 033054F29A X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4636009)(376002)(346002)(39860400002)(136003)(396003)(366004)(199004)(189003)(7696005)(52116002)(16526019)(6666004)(36756003)(2906002)(26005)(478600001)(2616005)(956004)(316002)(186003)(66946007)(5660300002)(81156014)(81166006)(8936002)(9686003)(6486002)(4326008)(8676002)(1076003)(6916009)(66556008)(66476007); DIR:OUT; SFP:1101; SCL:1; SRVR:DM5PR1201MB0026; 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: UNPdUnfkxc2FXXmeHHLdRmfS81He1mMcZvZZf7H4NefJKke+hUeTC9aKJIAxDZtXUcyDHd2QU0ERVNUCP7GQMFWKowlEsE8SH35TvgYVzSvKGqEpezk2i73D96y8/A4FEkqdKfL9jl9VoQbbg37h4b1hUaihE4ZgJjBCH1ZfUIUAwcqj4abM1vTOUEmnfimnV+66Xx+SLWfYaKD/JNHJqF6dq03dwTz86qMzQOx1B3uADL5QUFLrIhg2F2dRlgJrj6N6pBqjXHn/VwyfHsdGqahgkt6mQevI+uc2jX06uxKtFI08787ZcGHEItnloomlcCQX62Kl/HV6NaYIxK40OvP9/t+wJvG9QQOfG9WpqB5+Ku6d3NVI1oChAHSghyf9qDRDJon37zXx6cA2ik9EdV6DJvt3C25VktH2drdDy9M1eZMbvFPUF2AXNxITFgK3 X-MS-Exchange-AntiSpam-MessageData: gxG89EYSdExZ4f37VKFpt6nuG/pXzoia4E56961R+hp2SceK965l7K9dgctpRvQsFJ//kDU81Qq+YAX5al83UH/W0eKevboht6e/pHJGLIC0SywvjU9VeuoIY4YYn72tKVEMT/RBl5uuRwwZkr7nRw== X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: 023da9ed-2ad3-4751-a0df-08d7be821e0f X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 Mar 2020 08:17:15.6780 (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: bzynNqMOUrcNQm9ntvt1CXBBN+xIEuDmOQeUyFZN249tUWTW+g2RjyuDKw7LSxd94VW2uQt6zkWYwpXL1KV0xg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR1201MB0026 Subject: [dpdk-dev] [PATCH v1 1/3] net/axgbe: support for rxq and txq info 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 axgbe_rxq_info_get, axgbe_txq_info_get Signed-off-by: Amaranath Somalapuram --- drivers/net/axgbe/axgbe_ethdev.c | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/drivers/net/axgbe/axgbe_ethdev.c b/drivers/net/axgbe/axgbe_ethdev.c index d0b6f091f..887b4829d 100644 --- a/drivers/net/axgbe/axgbe_ethdev.c +++ b/drivers/net/axgbe/axgbe_ethdev.c @@ -44,6 +44,10 @@ axgbe_dev_xstats_get_names_by_id(struct rte_eth_dev *dev, static int axgbe_dev_xstats_reset(struct rte_eth_dev *dev); static int axgbe_dev_info_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info); +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); struct axgbe_xstats { char name[RTE_ETH_XSTATS_NAME_SIZE]; @@ -170,6 +174,8 @@ static const struct eth_dev_ops axgbe_eth_dev_ops = { .rx_queue_release = axgbe_dev_rx_queue_release, .tx_queue_setup = axgbe_dev_tx_queue_setup, .tx_queue_release = axgbe_dev_tx_queue_release, + .rxq_info_get = axgbe_rxq_info_get, + .txq_info_get = axgbe_txq_info_get, }; static int axgbe_phy_reset(struct axgbe_port *pdata) @@ -816,6 +822,30 @@ axgbe_dev_info_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info) return 0; } +void +axgbe_rxq_info_get(struct rte_eth_dev *dev, uint16_t queue_id, + struct rte_eth_rxq_info *qinfo) +{ + struct axgbe_rx_queue *rxq; + + rxq = dev->data->rx_queues[queue_id]; + qinfo->mp = rxq->mb_pool; + qinfo->scattered_rx = dev->data->scattered_rx; + qinfo->nb_desc = rxq->nb_desc; + qinfo->conf.rx_free_thresh = rxq->free_thresh; +} + +void +axgbe_txq_info_get(struct rte_eth_dev *dev, uint16_t queue_id, + struct rte_eth_txq_info *qinfo) +{ + struct axgbe_tx_queue *txq; + + txq = dev->data->tx_queues[queue_id]; + qinfo->nb_desc = txq->nb_desc; + qinfo->conf.tx_free_thresh = txq->free_thresh; +} + static void axgbe_get_all_hw_features(struct axgbe_port *pdata) { unsigned int mac_hfr0, mac_hfr1, mac_hfr2; -- 2.17.1