From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM02-SN1-obe.outbound.protection.outlook.com (mail-eopbgr770050.outbound.protection.outlook.com [40.107.77.50]) by dpdk.org (Postfix) with ESMTP id B17FA5B2A; Tue, 12 Mar 2019 16:25:13 +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=liRBXwd6gBDGPl1jNq3k3bp+9mJNuYuVANKgNi8whTU=; b=RdQrCrDYCN0cDitcvIL/jlb0fn/JioDJY5bcxVh714OsN6gWe9G+JeD1hRqcPl1Dqgb3WNxAHlA3WPZeyUt2uxKLWLgtBKGyyjTKotLPrzltgm+mcZmud9UL61YkasGmTSuQzka+TyAFbo1bwUqJqQ/nu8wuciwkPskegeugCZ0= Received: from DM6PR11MB3625.namprd11.prod.outlook.com (20.178.230.149) by DM6PR11MB3068.namprd11.prod.outlook.com (20.177.218.153) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1686.19; Tue, 12 Mar 2019 15:25:12 +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.1686.021; Tue, 12 Mar 2019 15:25:12 +0000 From: Igor Russkikh To: "dev@dpdk.org" CC: Pavel Belous , Igor Russkikh , "stable@dpdk.org" Thread-Topic: [PATCH v3 10/10] net/atlantic: fix xstats to return correct number of items Thread-Index: AQHU2OfH5pSr13jPjEakE0goEMUHUA== Date: Tue, 12 Mar 2019 15:25:10 +0000 Message-ID: <7ff8c44079f5bd9adc1370988c97a8aabb48e94f.1552402263.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: HE1PR0901CA0050.eurprd09.prod.outlook.com (2603:10a6:3:45::18) 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: 41143940-9830-4b7b-691f-08d6a6feea10 x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600127)(711020)(4605104)(2017052603328)(7153060)(7193020); SRVR:DM6PR11MB3068; x-ms-traffictypediagnostic: DM6PR11MB3068: x-microsoft-exchange-diagnostics: =?iso-8859-1?Q?1; DM6PR11MB3068; 23:dLLN4GJ3codYrNFbJrRlTpFD/qQKHfIYTfdk5/3?= =?iso-8859-1?Q?edqkt6RJouIDMvJDh5S+5gWnu20BaToklkEGhuA1XGgNqzPi4yaFpMvsV4?= =?iso-8859-1?Q?wtqWjjvd20Xs2CZSSukLBwcKM5gjs23Gb9T+uyPE/AS8MprGax+QJquHAu?= =?iso-8859-1?Q?ZBx93/2A0tyyKBF9DrSCJmZBcPtRsglPkeBAz8w4AlgX+JPXym6B9dFqW4?= =?iso-8859-1?Q?VT1jHiIJ9u761FgmtQSInc0nDKX9w+IKd9OBGT+cF/LKCovbLO0mgpfbQ6?= =?iso-8859-1?Q?NbD5H8OJmV1zzTyX155TC/LkmqNTRtxksCQeadO23Rwjx5TThL4+hpSJpT?= =?iso-8859-1?Q?CtVs3gbDGawE4gJyjaX5qrFqbcywXeDNsNrTDc1qz3K79B6CRVKqjDBNVL?= =?iso-8859-1?Q?XFHkJiLwy3Tv5NQwN7FatQ5Qzos/3mH0F0imstMFTWMwjfmgPo9DSXx7Wp?= =?iso-8859-1?Q?Zs/97W8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Ke?= =?iso-8859-1?Q?HRT6R5InkrGIakmTdVih8//e54qT7MMl708TWkel0SwajJmw+qZsNXBDbz?= =?iso-8859-1?Q?LYDO9hdynpIEug=3D?= x-microsoft-antispam-prvs: x-forefront-prvs: 09749A275C x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(376002)(346002)(136003)(366004)(39850400004)(396003)(199004)(189003)(72206003)(97736004)(4326008)(14454004)(81166006)(2906002)(4744005)(5660300002)(6916009)(8676002)(71200400001)(478600001)(25786009)(118296001)(71190400001)(86362001)(256004)(1730700003)(3846002)(81156014)(36756003)(68736007)(6116002)(305945005)(54906003)(316002)(446003)(8936002)(44832011)(53936002)(5640700003)(26005)(11346002)(476003)(76176011)(66066001)(106356001)(99286004)(2616005)(105586002)(186003)(450100002)(386003)(52116002)(7736002)(6436002)(6486002)(2351001)(6506007)(2501003)(6512007)(102836004)(50226002)(486006); DIR:OUT; SFP:1101; SCL:1; SRVR:DM6PR11MB3068; 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: F0I7GpMl7StRaxjSc6h8wn77ea/OIwudg+vrck4WBVLYjbBGaJSPEf5RT1PUCnWNmjws5QfuAF7XvMms6qy4Lobcif8FtONGdGi3RKYC2KvgCKFY/LAlOUORxMqfZnvrLZ+FBtschIoxQrL6HA7rzn+6HFDBBWwwk+ZY51m6Hfim6BZnmJAauVmeDEjOtqCy/KpktNgr5v+qdkmfWdL2F1ij9AwTHujlcD+0t8MkZg07XW8hUkMTDMtZXgpiwWVUpStdLZef+noH22KTcqk8BXccAsY6Huv7K/3+hTocOGd36hz3bBov+O4sw2NJLmreNAJBeLXe+YoZWkNjVHoRD3V+m6aUQyXw0h3FXuwK+wKNumsk5ef9LVkjs6tN+svEz0fFpzYHDExLoBsFUR1953OJdMHrWpTkntrV4ghsm0o= 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: 41143940-9830-4b7b-691f-08d6a6feea10 X-MS-Exchange-CrossTenant-originalarrivaltime: 12 Mar 2019 15:25:10.2304 (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: DM6PR11MB3068 Subject: [dpdk-dev] [PATCH v3 10/10] net/atlantic: fix xstats to return correct number of items 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: , X-List-Received-Date: Tue, 12 Mar 2019 15:25:14 -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 b05dc545d0b1..5c62d137b255 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