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 86B37A0561; Fri, 28 Feb 2020 11:45:09 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 512821BFCE; Fri, 28 Feb 2020 11:45:08 +0100 (CET) Received: from NAM11-CO1-obe.outbound.protection.outlook.com (mail-co1nam11on2076.outbound.protection.outlook.com [40.107.220.76]) by dpdk.org (Postfix) with ESMTP id 89D0E3B5 for ; Fri, 28 Feb 2020 11:45:06 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=l8NR3RLduLh6CIotvv5+VliyJm3pnQUSJrX8r+V46lGCicPaf7gEnTuGctkRe+iVQ/+mlfLdEa4KtsvojDx5Lzs5HYb709X2ELTs2Kx+cNUFymPBrj1L0wPtnWbkb/HdH4pTVq5FcpJN8DZQIYc4DAJXqgrGlxPPfTh3/XZS9xY5/YQYn9TNUmzv816INwXoAUdS+fbMbEd11dXm3nrwl7AeCYfQeWia0WeNKqP9+C1b//0GXh3RYmd8IEKN9sOTbkkICIfnugFN0WzHNDTqzIS9t8BOyggaQqo5vr+JxKpScLSL6yal/juD8a6dtDa7KRD2ek13xXlzQjBVKTS+AA== 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=LQKZf5ZJezWMtZUSGdswLP/CA030B6VNHeL732XwMPHQc2VooNdTY8NeBy/fDDRv9WOgXOg2klgsObp7OLpIUb+rjsJ40eVvG2wULjE7BSFw094VbRBDRnwsEN+mzKdz6IkW/CD4+fPHO5eFevS4T5+ubNQY/z2fPW3FaWHshgzLcUJS3ILBf2UYVTwDu7RWdI37qFyDnpth8q82WKUfsviDXyzTaIi2xyrbQ90dHN6yJlQx8O58Ml1IW6tgFPyxX+jutIj8u0LCLOQ6qZAZ+oGchxXho/i7NsNBXHJ76g8MbLUcIc8NtwPhQnPSMMDwpQ6wUeT4fWtbsKvW2actHA== 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=fyGMqycZvcIGtnqA+Eloqz8LW7ufQtCqaCM/Oa0GRpIhtraDjB1x16Dn51pSkxDGGhweJCxRt4gBzvquuarvczENJexCvPvjiuAxV+hCw6uKxv4UzI8U2ryOPY1a+SblnfI1g+HpQ3vCloYy6DpI3M3QU05i9j/lDhFtVkXj22U= 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:01 +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:01 +0000 From: asomalap@amd.com To: dev@dpdk.org Cc: Ravi1.Kumar@amd.com Date: Fri, 28 Feb 2020 16:14:40 +0530 Message-Id: <20200228104440.1882-1-asomalap@amd.com> X-Mailer: git-send-email 2.17.1 Content-Type: text/plain X-ClientProxiedBy: MA1PR0101CA0043.INDPRD01.PROD.OUTLOOK.COM (2603:1096:a00:22::29) 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 MA1PR0101CA0043.INDPRD01.PROD.OUTLOOK.COM (2603:1096:a00:22::29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2772.16 via Frontend Transport; Fri, 28 Feb 2020 10:45:00 +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: d00ae326-8559-4adc-c77e-08d7bc3b4327 X-MS-TrafficTypeDiagnostic: CY4PR1201MB0149:|CY4PR1201MB0149: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:1079; 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: 4zLXl0O0KNjf4E75zDPGPoLbEcNNw6amHm8w+o1sOBL2kz6z9rMXqEiuy1o+u4ObDbYPawJj4lITkCOrr3NBjKf19QcQB+l/2/UvW3EMreq9Yc+yPn1bz9Ie+GAEZnYA9q1JhG/OMQXzWGHcP7cjUPSciJDti29V/TAP8IlBQmWnOPw8t9ECF4G1O7Yakdoe2ZchniI0/tydcqAqfVplQejFksvMhpbR4f6tveAPkzb082/V2wI0wxzcX1/8LLta/61v/xSizxwmjB3U7r2NFaYTtUpTh4hXY5hrx8aTnEwTD4NuDvEQnEOoCcriZETFL5OFYVd0lMSpWnX0lHZFIECnTgsnPf64HecTDiB2twpDlvAoAGiye0Ym843d1Avf2Efce6RVrAPxhn6x/RVoMNg3v2Zt6R5xAIAjIdH3+zD8GEldnJq0s930jaH0+vqL X-MS-Exchange-AntiSpam-MessageData: 36qS6tmjN4NNk/Fqh5oRVfPnQSWvNRQTcQ5D8GF3eXS5H5se5pl8aRgbbD5OhnBjKMP+vUDhx9Fxpx32dwwesFEOZu8Hz3tU1XxhTT+bVBn4GPxhgWGxVASz2SppfZK4XOs2wD2gnuBvl64liTvtDw== X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: d00ae326-8559-4adc-c77e-08d7bc3b4327 X-MS-Exchange-CrossTenant-OriginalArrivalTime: 28 Feb 2020 10:45:01.4396 (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: WmEhxNyTsxdC3EtdbGCTEa7sPQ0OV3fawbIehzOVJLjcg0MEzP1e2TmLteTiu2no9uP46FiAqU4/W/zpqudCSQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR1201MB0149 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