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 6836FA04DD; Thu, 19 Nov 2020 12:26:22 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 1D9D63B5; Thu, 19 Nov 2020 12:26:21 +0100 (CET) Received: from NAM11-DM6-obe.outbound.protection.outlook.com (mail-dm6nam11on2072.outbound.protection.outlook.com [40.107.223.72]) by dpdk.org (Postfix) with ESMTP id E66812AB for ; Thu, 19 Nov 2020 12:26:17 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=mMGyZxFz3CxaQaBoOw376G7p3oFTZ4WOZvUS0dF9Lp1u4Zmqu0e4h5nqKzuKZNZyiwGFckjpBEEpijeq4Bjs4qQ//kuiSscIKDIaS3qo2LNXQA5PQWmkf25ynz10m9wk7k2oILjpd6He3RIyLCxJTSj9OOD12/ZiUcfh8f4cNwXfhhASmKCme8c874spyPRMbNqkwIbQ0s6tizzLlwVS2T2WqsBvclfNCG+wd96DN9gzrWLXLBw1G88ylyjBbC5uYJxH7yyupNX8k0gvnsJhwtTn+Kh154UP5VkweU+uOuEIYhNztEWsueRGj9kOzQjh5j77t88ziCwH5EaClIBUjQ== 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=XxsAFZ0RpKB472hiK3LBus7XsrRewCT7hsPpXXS5OFY=; b=ddXIRHAy8ICmNspwgbL63KiZsNRUYYRG09UommU5EYh8G8wpUTBPUjzz6LI9ZDrlE8Spp6mihEtmsrMKFmlKBlLOS/FCuPLiepP77QLbf2iKoGFVP+myHymnyZ8Ttl/VCB7IKN2icnUrvS1L+DmOLZBfmZZY8NmtXwblCEdksWHE8UUqZtJOhkYo+oy7SHpz3d8O/6OnKH8zbuldBMjI1iZHGQ24p0EDXShubdZukwxtgDyRrjNpIt8EWpmAMzJJbRwWB+p4tPEq6oOp2WnZOeqO1GF8lLH5r1/BRYGS4BIPbkgu3zM/syd9UThj8CqhaTqBm6v9fYv43M7YcVRCVw== 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=XxsAFZ0RpKB472hiK3LBus7XsrRewCT7hsPpXXS5OFY=; b=QJiQpsNzjFLVd89QMG3Vl/1f07er1ixvrecZE8N4MUrKrjGd7qFGjuJ/7GlAw9OQDNy3CMmm4qdBsQaU33BnPZIh0zY/g+rOgxJ74wfVAaYxRCukms08Fuww7n3YPTQR/JtFQSMnX07D7K4Ch663FlnS6kem6yErs+sPuNGxrhk= Received: from MWHPR1201MB2542.namprd12.prod.outlook.com (2603:10b6:300:e8::20) by MW2PR12MB2586.namprd12.prod.outlook.com (2603:10b6:907:11::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3564.26; Thu, 19 Nov 2020 11:26:14 +0000 Received: from MWHPR1201MB2542.namprd12.prod.outlook.com ([fe80::e5d1:2be0:3306:6b26]) by MWHPR1201MB2542.namprd12.prod.outlook.com ([fe80::e5d1:2be0:3306:6b26%9]) with mapi id 15.20.3564.028; Thu, 19 Nov 2020 11:26:14 +0000 From: "Sebastian, Selwin" To: "Sebastian, Selwin" , "dev@dpdk.org" CC: "Somalapuram, Amaranath" Thread-Topic: [dpdk-dev] [PATCH v1] net/axgbe: add support for reading FW version Thread-Index: AQHWvkVQIsTwAZbBYUW+mSSPpIK/M6nPUQbA Date: Thu, 19 Nov 2020 11:26:13 +0000 Message-ID: References: <20201119072607.5717-1-selwin.sebastian@amd.com> In-Reply-To: <20201119072607.5717-1-selwin.sebastian@amd.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: msip_labels: MSIP_Label_76546daa-41b6-470c-bb85-f6f40f044d7f_Enabled=true; MSIP_Label_76546daa-41b6-470c-bb85-f6f40f044d7f_SetDate=2020-11-19T11:26:05Z; MSIP_Label_76546daa-41b6-470c-bb85-f6f40f044d7f_Method=Standard; MSIP_Label_76546daa-41b6-470c-bb85-f6f40f044d7f_Name=Internal Use Only - Unrestricted; MSIP_Label_76546daa-41b6-470c-bb85-f6f40f044d7f_SiteId=3dd8961f-e488-4e60-8e11-a82d994e183d; MSIP_Label_76546daa-41b6-470c-bb85-f6f40f044d7f_ActionId=cfdbd6df-31ca-4c13-bb42-a0a911b315e1; MSIP_Label_76546daa-41b6-470c-bb85-f6f40f044d7f_ContentBits=1 msip_justification: I confirm the recipients are approved for sharing this content authentication-results: amd.com; dkim=none (message not signed) header.d=none;amd.com; dmarc=none action=none header.from=amd.com; x-originating-ip: [49.207.195.130] x-ms-publictraffictype: Email x-ms-office365-filtering-ht: Tenant x-ms-office365-filtering-correlation-id: 29a64787-1bb9-4917-3c12-08d88c7dec88 x-ms-traffictypediagnostic: MW2PR12MB2586: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:962; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: JVQ1ErSLQsrMQt/shBX3+P2ejAyb2BVOGy6Rflqsr3u1EugOApIRyqVV3kxfs4iVR/h8jT6FZl89y+XSq8SEs9DVnD0intPtPAwhm9YcqpFlBlJPigHxkvDFNgM054tGlnmggZfgRLg+oLBIq7zgkC0F+0eM7gTKOHpCUPPZeu1trZ96WwULX+7Fr8DGLPXX4QmfBJ5GTlha+4OSrfpDe0L+OKjbvcxkflIJavTu0Kvfp3ywYBnCHFDEaLRv1pofLOfR+zA0DwxpbPMJqjuWO2fLjhgp1xCFgbF9k8uRpbA3zDBMl5WfaiHjeN5dGp7nUhwOFaGSjuHt+cNZu4viJw== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:MWHPR1201MB2542.namprd12.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(39860400002)(346002)(376002)(366004)(396003)(136003)(186003)(66446008)(64756008)(66556008)(55236004)(52536014)(7696005)(5660300002)(478600001)(6506007)(53546011)(33656002)(26005)(76116006)(66476007)(2906002)(66946007)(9686003)(71200400001)(86362001)(83380400001)(4326008)(316002)(55016002)(110136005)(8936002)(8676002); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata: gRWLnSZfNy4CO9mT0iaDzxhAG6xpOGlw3WfXgYkg+h2l7u3c507+Kn0pt6pDY93JlbgkVymYJHRbyo4B2DctpjAyK+IzJ92mxhIVtLfxBBTDFUjwOfyXuerfV6V47jfvbmI4RkXaXjp4LJPt9zaqMeUU6kzCKoBnJceH6Fw6Ey7jWUq58I/gf0PMvMDnZCifzZDfm04mWAF1nEZqnjXOcnnnAdSE1S3KlA8dmvpDCHP6bMQNZunuyvsjocKvfTutSJxENbXCNho1OpIRo+dSWfs+ZUxzlsaJUfeXkPaNAsO/hv5c9mz5Kx8QMsJwWdikqi3kLJ8SwnTnEwYBCrAl2oZe+tBPpDwloFSULCzUO/GvopUeOvwKg+Mam77KTPlpsVh3Byg4AO7Q4WTXIdgvOqyRHKDWo5gsoVViUcrp2/7bHRwAURPgvoL7aVPWmaCApMMJKuBgTj/URVYgDBmI7ByxBACHa+8ecoBJmVB6aMGubspjPrGBIlkttBZmE0jOAovh4nh/7vmxIYfLYCh4qZjaTPOnZNZcfepWsvF0MRGJ2HM+cyDYOhQ5FfEIdNrvwIUmK6jfNFpnEwk8NfJ/X/wmh+giz9JUgZRcgZhyOkxJ1hDo+bCWYfiedoSlLvv6D4/M8EuOtPLbGLhqvCuqFA== Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: MWHPR1201MB2542.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 29a64787-1bb9-4917-3c12-08d88c7dec88 X-MS-Exchange-CrossTenant-originalarrivaltime: 19 Nov 2020 11:26:13.8087 (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: ehozNCCYozq90I9U5bZaAHNhdLdv6iRlYKaOpYy7VlorOvyyJeptUzYzvXqD6XlZj1h4d2FoIjIdIjxGYumuZw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MW2PR12MB2586 Subject: Re: [dpdk-dev] [PATCH v1] net/axgbe: add support for reading FW version 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" [AMD Official Use Only - Internal Distribution Only] +Amar -----Original Message----- From: dev On Behalf Of selwin.sebastian@amd.com Sent: Thursday, November 19, 2020 12:56 PM To: dev@dpdk.org Subject: [dpdk-dev] [PATCH v1] net/axgbe: add support for reading FW versio= n [CAUTION: External Email] From: Selwin Sebastian Added support for fw_version_get API Signed-off-by: Selwin Sebastian --- doc/guides/nics/features/axgbe.ini | 1 + drivers/net/axgbe/axgbe_ethdev.c | 1 + drivers/net/axgbe/axgbe_rxtx.c | 21 +++++++++++++++++++++ drivers/net/axgbe/axgbe_rxtx.h | 3 +++ 4 files changed, 26 insertions(+) diff --git a/doc/guides/nics/features/axgbe.ini b/doc/guides/nics/features/= axgbe.ini index 34df0d1ee..3adc5639f 100644 --- a/doc/guides/nics/features/axgbe.ini +++ b/doc/guides/nics/features/axgbe.ini @@ -17,6 +17,7 @@ CRC offload =3D Y L3 checksum offload =3D Y L4 checksum offload =3D Y Basic stats =3D Y +FW version =3D Y Linux UIO =3D Y x86-32 =3D Y x86-64 =3D Y diff --git a/drivers/net/axgbe/axgbe_ethdev.c b/drivers/net/axgbe/axgbe_eth= dev.c index cfe6aba73..1982c6a8e 100644 --- a/drivers/net/axgbe/axgbe_ethdev.c +++ b/drivers/net/axgbe/axgbe_ethdev.c @@ -257,6 +257,7 @@ static const struct eth_dev_ops axgbe_eth_dev_ops =3D { .timesync_adjust_time =3D axgbe_timesync_adjust_time, .timesync_read_time =3D axgbe_timesync_read_time, .timesync_write_time =3D axgbe_timesync_write_time, + .fw_version_get =3D axgbe_dev_fw_version_get, }; static int axgbe_phy_reset(struct axgbe_port *pdata) diff --git a/drivers/= net/axgbe/axgbe_rxtx.c b/drivers/net/axgbe/axgbe_rxtx.c index 032e3cebc..22= 7be33fa 100644 --- a/drivers/net/axgbe/axgbe_rxtx.c +++ b/drivers/net/axgbe/axgbe_rxtx.c @@ -571,6 +571,27 @@ int axgbe_dev_tx_queue_setup(struct rte_eth_dev *dev, = uint16_t queue_idx, return 0; } +int axgbe_dev_fw_version_get(struct rte_eth_dev *eth_dev, + char *fw_version, size_t fw_size) { + struct axgbe_port *pdata; + struct axgbe_hw_features *hw_feat; + char fw_ver[32]; + + pdata =3D (struct axgbe_port *)eth_dev->data->dev_private; + hw_feat =3D &pdata->hw_feat; + + if (fw_version =3D=3D NULL || fw_size <=3D 0) + return -EINVAL; + + snprintf(fw_version, sizeof(fw_ver), "%d.%d.%d", + AXGMAC_GET_BITS(hw_feat->version, MAC_VR, USERVER), + AXGMAC_GET_BITS(hw_feat->version, MAC_VR, DEVID), + AXGMAC_GET_BITS(hw_feat->version, MAC_VR,=20 + SNPSVER)); + + return 0; +} + static void axgbe_txq_prepare_tx_stop(struct axgbe_port *pdata, unsigned int queue) { diff --git a/d= rivers/net/axgbe/axgbe_rxtx.h b/drivers/net/axgbe/axgbe_rxtx.h index f2fbe9= 299..c2b11bb0e 100644 --- a/drivers/net/axgbe/axgbe_rxtx.h +++ b/drivers/net/axgbe/axgbe_rxtx.h @@ -162,6 +162,9 @@ void axgbe_dev_disable_tx(struct rte_eth_dev *dev); in= t axgbe_dev_tx_queue_start(struct rte_eth_dev *dev, uint16_t tx_queue_id); = int axgbe_dev_tx_queue_stop(struct rte_eth_dev *dev, uint16_t tx_queue_id)= ; +int axgbe_dev_fw_version_get(struct rte_eth_dev *eth_dev, + char *fw_version, size_t fw_size); + uint16_t axgbe_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts, uint16_t nb_pkts); uint16_t axgbe_xmit_pkts_vec(v= oid *tx_queue, struct rte_mbuf **tx_pkts, -- 2.17.1