From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by dpdk.space (Postfix) with ESMTP id 01720A0096 for ; Fri, 7 Jun 2019 07:51:22 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 977A82C5E; Fri, 7 Jun 2019 07:51:21 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by dpdk.org (Postfix) with ESMTP id A311E3DC for ; Fri, 7 Jun 2019 07:51:20 +0200 (CEST) Received: from pps.filterd (m0045849.ppops.net [127.0.0.1]) by mx0a-0016f401.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x575o1od011012; Thu, 6 Jun 2019 22:51:19 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : subject : date : message-id : references : in-reply-to : content-type : mime-version; s=pfpt0818; bh=dgbJ6XkPk1LYQvsdFZnjFTrJHncaDLPISBRsqTZeDSA=; b=O7U8G84x7bt2Hno+5StnXdGWdqdZPV141Q9NQ5H4ylebGn0rflwgd36IwxT6PjVh9ZQ6 Ti69gmYYC/j4azmncuaqUSozMaI8EnRYbhM1hLOFzbVsi9gaVvEbjLmC7rKZo7GpKjRO hsS72hAfuBstbIdHcetZaJjFcD6ZjCK3NtBABjHtSiPjru8MsLOPAx/tz7976k2p7+Ie 1DEWnbtsXznFlW6mtSwpPpRxP1J3s823lf+6xB0RIeePH/QcdhpDXU4bft8q5zkLLQD+ 1L/NsRIdk6mclinKgV4/ONVtvwmOAH4LBVBxwzHZhW6RzKR3URh/54PGwq6CjsZNN+II 5A== Received: from sc-exch04.marvell.com ([199.233.58.184]) by mx0a-0016f401.pphosted.com with ESMTP id 2syack1qx0-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Thu, 06 Jun 2019 22:51:19 -0700 Received: from SC-EXCH01.marvell.com (10.93.176.81) by SC-EXCH04.marvell.com (10.93.176.84) with Microsoft SMTP Server (TLS) id 15.0.1367.3; Thu, 6 Jun 2019 22:51:19 -0700 Received: from NAM01-BN3-obe.outbound.protection.outlook.com (104.47.33.57) by SC-EXCH01.marvell.com (10.93.176.81) with Microsoft SMTP Server (TLS) id 15.0.1367.3 via Frontend Transport; Thu, 6 Jun 2019 22:51:18 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.onmicrosoft.com; s=selector2-marvell-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=dgbJ6XkPk1LYQvsdFZnjFTrJHncaDLPISBRsqTZeDSA=; b=aLVlCPnllOtbxKpuwEVTeH+R3ySaKYs9do2Pm6SCwmqmd/brh5BoP6pfZl1Qf7W6QTBsruun3u0G3S4kE12ToFwLq0XG0QOUr6/xkun5h8J2ATqt3KyrFupqUYiYBZitrPnGtRexKfOXNfYkGmkd3IswiiGNDpdbubRbRUt8pwg= Received: from CH2PR18MB3381.namprd18.prod.outlook.com (52.132.246.204) by CH2PR18MB3414.namprd18.prod.outlook.com (52.132.247.17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1943.22; Fri, 7 Jun 2019 05:51:17 +0000 Received: from CH2PR18MB3381.namprd18.prod.outlook.com ([fe80::f142:410a:f977:1908]) by CH2PR18MB3381.namprd18.prod.outlook.com ([fe80::f142:410a:f977:1908%3]) with mapi id 15.20.1965.011; Fri, 7 Jun 2019 05:51:17 +0000 From: Vamsi Krishna Attunuru To: Ferruh Yigit , Jerin Jacob Kollanukkaran , "dev@dpdk.org" , John McNamara , Marko Kovacevic , Nithin Kumar Dabilpuram , Kiran Kumar Kokkilagadda Thread-Topic: [EXT] Re: [dpdk-dev] [PATCH v1 48/58] net/octeontx2: add FW version get operation Thread-Index: AQHVGVesWvN6Rls1zUqWOmBld8G2v6aO0N6AgADl6eI= Date: Fri, 7 Jun 2019 05:51:17 +0000 Message-ID: References: <20190602152434.23996-1-jerinj@marvell.com> <20190602152434.23996-49-jerinj@marvell.com>, In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [115.113.156.3] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 52f01691-c603-418b-5fdf-08d6eb0c28b0 x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(7168020)(4627221)(201703031133081)(201702281549075)(8990200)(5600148)(711020)(4605104)(1401327)(2017052603328)(7193020); SRVR:CH2PR18MB3414; x-ms-traffictypediagnostic: CH2PR18MB3414: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:6790; x-forefront-prvs: 0061C35778 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(136003)(396003)(39850400004)(346002)(376002)(366004)(199004)(189003)(81166006)(6606003)(6636002)(9686003)(66946007)(476003)(478600001)(7696005)(68736007)(2501003)(5660300002)(6506007)(76116006)(53546011)(73956011)(229853002)(55016002)(7736002)(52536014)(486006)(64756008)(66476007)(25786009)(54896002)(446003)(66066001)(14454004)(66556008)(6436002)(110136005)(6116002)(99286004)(186003)(256004)(6246003)(11346002)(33656002)(74316002)(76176011)(66446008)(3846002)(19627405001)(81156014)(26005)(55236004)(86362001)(53936002)(2906002)(316002)(8936002)(71190400001)(8676002)(102836004)(71200400001); DIR:OUT; SFP:1101; SCL:1; SRVR:CH2PR18MB3414; H:CH2PR18MB3381.namprd18.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; received-spf: None (protection.outlook.com: marvell.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: LxdltUCE/hx3a5+aaUfYvc807+P/xHuvEaTObGJbgMNtohg/TONByaHqc5NgTrd2K6ENt7+HR0uRigj+aiYEXlRTzDaFAM7EJNCmCQNo6bQz4yMRlkRUouaKSWakuTG/arnnh6TPxSGDUchzShGbA0f7HGcxpsgVfcTqZsMyxL75DxK4B6TlRXbHNzh7j06XkuNlSlqgNuD9xud9dmEnxXKWAZGg7I2nRWmVnddsuQy4dKdaJcpcUJwArpUNWA3snsw8Juvy6tMnbl9GeHBXcP2axe1PyVwiNr1WYzQyBtn8D+7pI9xvrJnM1MViMhJ6DjYKqkpDx/gVevPjJblkoAOrFunENOTm0SxWZD1a/E37R2ZlPr8NFwJRJLrmOLPAPblp54llW6iXD9hOKbh0Qd5QdOConj33NItfQl7MViw= MIME-Version: 1.0 X-MS-Exchange-CrossTenant-Network-Message-Id: 52f01691-c603-418b-5fdf-08d6eb0c28b0 X-MS-Exchange-CrossTenant-originalarrivaltime: 07 Jun 2019 05:51:17.3256 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 70e1fb47-1155-421d-87fc-2e58f638b6e0 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: vattunuru@marvell.com X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH2PR18MB3414 X-OriginatorOrg: marvell.com X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:, , definitions=2019-06-07_02:, , signatures=0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.15 Subject: Re: [dpdk-dev] [EXT] Re: [PATCH v1 48/58] net/octeontx2: add FW version get operation 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: Ferruh Yigit Sent: Thursday, June 6, 2019 9:36 PM To: Jerin Jacob Kollanukkaran; dev@dpdk.org; John McNamara; Marko Kovacevic= ; Nithin Kumar Dabilpuram; Kiran Kumar Kokkilagadda Cc: Vamsi Krishna Attunuru Subject: [EXT] Re: [dpdk-dev] [PATCH v1 48/58] net/octeontx2: add FW versio= n get operation External Email ---------------------------------------------------------------------- On 6/2/2019 4:24 PM, jerinj@marvell.com wrote: > From: Vamsi Attunuru > > Add firmware version get operation. > > Signed-off-by: Vamsi Attunuru <...> > @@ -209,6 +209,28 @@ otx2_nix_tx_done_cleanup(void *txq, uint32_t free_cn= t) > return 0; > } > > +int > +otx2_nix_fw_version_get(struct rte_eth_dev *eth_dev, char *fw_version, > + size_t fw_size) > +{ > + struct otx2_eth_dev *dev =3D otx2_eth_pmd_priv(eth_dev); > + int rc =3D (int)fw_size; > + > + if (fw_size > sizeof(dev->mkex_pfl_name)) > + rc =3D sizeof(dev->mkex_pfl_name); > + > + rc =3D strlcpy(fw_version, (char *)dev->mkex_pfl_name, rc); > + > + rc +=3D 1; /* Add the size of '\0' */ > + if (fw_size < (uint32_t)rc) > + goto done; > + else > + return 0; > + > +done: > + return rc; > +} Up to you but this can be done without a 'goto': Agreed, will fix it in v2. ... if (fw_size < (uint32_t)rc) return rc; return 0; }