From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM05-CO1-obe.outbound.protection.outlook.com (mail-eopbgr720058.outbound.protection.outlook.com [40.107.72.58]) by dpdk.org (Postfix) with ESMTP id 998624CC5; Sat, 9 Mar 2019 15:03:48 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=AQUANTIA1COM.onmicrosoft.com; s=selector1-aquantia-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=fUIpjn9B7SFQijR47zwQy2EjzrY0iHLPsFA5M5D+Xg8=; b=bRJzMBGrhQMGr7h9BJfc4Ch40kHxAt9UCtQ0Nu2eHvroKhwdJdWFg0WPLS6ucUdZY4WoZSkZlIsqfAI6ud5zZ97ZWXidkM9gtVTKQd0KYwS+6IL9THdvAWGlg3A/nydjceTffU7cD0x3kAyVpGpczi3yNkQx9gtCmLjwAaqURvc= Received: from DM6PR11MB3625.namprd11.prod.outlook.com (20.178.230.149) by DM6PR11MB2892.namprd11.prod.outlook.com (20.177.216.89) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1686.18; Sat, 9 Mar 2019 14:03:46 +0000 Received: from DM6PR11MB3625.namprd11.prod.outlook.com ([fe80::d145:a1f4:ed34:e31b]) by DM6PR11MB3625.namprd11.prod.outlook.com ([fe80::d145:a1f4:ed34:e31b%3]) with mapi id 15.20.1665.020; Sat, 9 Mar 2019 14:03:46 +0000 From: Igor Russkikh To: "dev@dpdk.org" CC: Pavel Belous , Igor Russkikh , "stable@dpdk.org" Thread-Topic: [PATCH v2 10/10] net/atlantic: fix xstats to return correct number of items Thread-Index: AQHU1oDoHbME+4uVJ0aaepIaewVdjg== Date: Sat, 9 Mar 2019 14:03:45 +0000 Message-ID: <1f87d939b0dca15529c98bb920fe88d749753c19.1552138867.git.igor.russkikh@aquantia.com> References: In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-clientproxiedby: HE1PR05CA0278.eurprd05.prod.outlook.com (2603:10a6:3:fc::30) To DM6PR11MB3625.namprd11.prod.outlook.com (2603:10b6:5:13a::21) authentication-results: spf=none (sender IP is ) smtp.mailfrom=Igor.Russkikh@aquantia.com; x-ms-exchange-messagesentrepresentingtype: 1 x-mailer: git-send-email 2.17.1 x-originating-ip: [95.79.108.179] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: f21c0b59-e336-44e2-66a3-08d6a4980b20 x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600127)(711020)(4605104)(2017052603328)(7153060)(7193020); SRVR:DM6PR11MB2892; x-ms-traffictypediagnostic: DM6PR11MB2892: x-microsoft-exchange-diagnostics: =?iso-8859-1?Q?1; DM6PR11MB2892; 23:kdDeAGyDwFEirs0TRwzc0Hdb6rWAIyW3PaymnH9?= =?iso-8859-1?Q?pmpz9pdCyel8LTjBOlwUFLEdqgkm1knXcPq7pSXgG7RxMYBXe1llkwP233?= =?iso-8859-1?Q?iLm/qHlqyVlXjykP4YF/7QRAAoOyQJAM5M42iGXXsj6xA/pGo3VigoBKhb?= =?iso-8859-1?Q?BGORNbJr0ib23EdpeiFPtQOD0fhpjJHEwrWW9KviuVEZ6eDyzYbnoovSiX?= =?iso-8859-1?Q?c8bfrj44XlohLzEUpiVFoM7SdgUhIG9mzqYpf9BZOnjeYsldRfN+78rqr+?= =?iso-8859-1?Q?BqYfKkTfRP3YnWoM92j8mXgU7uYAoBFQFhZC84aZnD0F/6IBOUqoQUlSKZ?= =?iso-8859-1?Q?ObNdGQYZZTEX8XhJgp0Gh6DryHLDRX6QYwPoVMSBjWLGSJuR7e2Xnb+1Vr?= =?iso-8859-1?Q?D2DcaJnfI7wMgA6rUSS0rk1ncACX/Z8Gd76PntP6moyT0w3imMJCeI5P8Q?= =?iso-8859-1?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ront-prvs: 0971922F40 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(366004)(199004)(189003)(106356001)(5660300002)(6116002)(26005)(4326008)(99286004)(52116002)(2906002)(3846002)(76176011)(2351001)(105586002)(14454004)(102836004)(97736004)(476003)(68736007)(44832011)(386003)(186003)(486006)(11346002)(446003)(2616005)(6506007)(450100002)(25786009)(2501003)(86362001)(305945005)(7736002)(72206003)(8676002)(6486002)(256004)(118296001)(8936002)(66066001)(6436002)(81156014)(1730700003)(4744005)(53936002)(5640700003)(81166006)(50226002)(71190400001)(6916009)(54906003)(36756003)(498600001)(71200400001)(6512007); DIR:OUT; SFP:1101; SCL:1; SRVR:DM6PR11MB2892; H:DM6PR11MB3625.namprd11.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; received-spf: None (protection.outlook.com: aquantia.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: p0CgcTkaCr8vD8KqDsaofO84saMOZJ/65HoKrr3l0cLQCBjEvZbRA9gy5k3ckKmCc8q8ow2GDOhC6tb27PbhbHDWuutCAblDt3GCkLVAgABfVR1GpDahxxCk73EhusP/ZpHk2FZNNxCB2npJIo6B8I8HqC3iTmYF3MaOI7/pBnSZIzjvlObyCI5zy3iAkAl4UxVaPddM515BxH74bwk/nQI/jtienvtsMjCpr9Jge1DXkuJul09o9KnlkTVz4C+/CdJqEPbktbU3GtgBG1DlyvDBY4ZVSuqJASy/3pTK2inVrDKA53usCbd3T+q2d215McG4dTRvkTlt3dmPMbfmrcO+BCNu72af9k51wne8I1lfAsZiAw6VtaK1/pfdEsJZuqTCu1NS+P4ULoKkHt0iXRQAn4YOc3N7+/PMbc6Cx6M= Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: aquantia.com X-MS-Exchange-CrossTenant-Network-Message-Id: f21c0b59-e336-44e2-66a3-08d6a4980b20 X-MS-Exchange-CrossTenant-originalarrivaltime: 09 Mar 2019 14:03:45.2453 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 83e2e134-991c-4ede-8ced-34d47e38e6b1 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR11MB2892 Subject: [dpdk-stable] [PATCH v2 10/10] net/atlantic: fix xstats to return correct number of items X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 09 Mar 2019 14:03:49 -0000 Max number of xstats items was returned instead of actual number of filled in records. Cc: stable@dpdk.org Fixes: fbe059e87209 ("net/atlantic: implement device statistics") Signed-off-by: Igor Russkikh --- drivers/net/atlantic/atl_ethdev.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/atlantic/atl_ethdev.c b/drivers/net/atlantic/atl_e= thdev.c index f2674f0cafe9..0f6edf878fe8 100644 --- a/drivers/net/atlantic/atl_ethdev.c +++ b/drivers/net/atlantic/atl_ethdev.c @@ -758,7 +758,7 @@ atl_dev_xstats_get_names(struct rte_eth_dev *dev __rte_= unused, snprintf(xstats_names[i].name, RTE_ETH_XSTATS_NAME_SIZE, "%s", atl_xstats_tbl[i].name); =20 - return size; + return i; } =20 static int @@ -778,7 +778,7 @@ atl_dev_xstats_get(struct rte_eth_dev *dev, struct rte_= eth_xstat *stats, atl_xstats_tbl[i].offset); } =20 - return n; + return i; } =20 static int --=20 2.17.1