From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR01-DB5-obe.outbound.protection.outlook.com (mail-db5eur01on0043.outbound.protection.outlook.com [104.47.2.43]) by dpdk.org (Postfix) with ESMTP id 7E142726F; Wed, 25 Apr 2018 14:59:14 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=2yx2CzfZps9CUhIFDCiOdlosfqwcE1mqKHULGE60x+E=; b=GXPiQFkIFx4Y0SCeaT6qnH297CLXRaFDsEV40zvtoETMBt+ucZk7O9RvHl0uFUfICh9zZfDj9jxmN/YjzNoRZd67B0X6iwpO3SotMVrLHJQ2EE1K8pnnb+1pxYPVSIaipOkyBnzLBMRuV8PNKZF6F/kF3uhClirFd852kjG6dNI= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=hemant.agrawal@nxp.com; Received: from bf-netperf1.ap.freescale.net (14.142.187.166) by DB4PR04MB0765.eurprd04.prod.outlook.com (2a01:111:e400:984d::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.696.15; Wed, 25 Apr 2018 12:59:10 +0000 From: Hemant Agrawal To: dev@dpdk.org Cc: ferruh.yigit@intel.com, shreyansh.jain@nxp.com, stable@dpdk.org Date: Wed, 25 Apr 2018 18:27:01 +0530 Message-Id: <1524661022-21484-4-git-send-email-hemant.agrawal@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1524661022-21484-1-git-send-email-hemant.agrawal@nxp.com> References: <1524661022-21484-1-git-send-email-hemant.agrawal@nxp.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [14.142.187.166] X-ClientProxiedBy: MAXPR0101CA0035.INDPRD01.PROD.OUTLOOK.COM (2603:1096:a00:d::21) To DB4PR04MB0765.eurprd04.prod.outlook.com (2a01:111:e400:984d::18) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(48565401081)(5600026)(4534165)(7168020)(4627221)(201703031133081)(201702281549075)(2017052603328)(7153060)(7193020); SRVR:DB4PR04MB0765; X-Microsoft-Exchange-Diagnostics: 1; DB4PR04MB0765; 3:sM4rBpyWlX2enWcydLsTq50i1MbxGXj+kM+OjRuy5/MNc681L1mG4+rtEa75cXovM1x4n5f4dnVOUulnlEUloNRyveKQiHL1GReuPQYoVWXBn+gsNbBZGhQdV0aVa1xtliP8nD4q622GcosleoaR/sgecba161+Gs+IJ5Pri7lw8Jf1vyityWp65XT9PKoICRK5dwmqUqPmieKS5sTbP6IaUUO40uZRl/4fPx6wbavg6tp9c1mApX+HYvel/wmrR; 25:64KGfpqMyBeKsqUJTyig43E/rs7/bJI7iptKM3BSOfppm6ozE2aIbYjLIrCgfRoMjGa7TAl8ajFs0qx/VDyw86OPsEGxOpGxlxC3tDbwWvARdvXaomX6xRrSURWRHzMKc8bohDL+zYG4sqRixsMhr2gqHwTeKH0q70LeFQfYKQYIkHmVvL0RWBeH0ah1JecIYXJCP8Ojqte5nQZ8UV2qQ+BWq9wuoyveV4MQgsvIvjY2ORm0AhKRs63XiB5n5LS2JVWNcdyINtX6/Ao1wAteX/pHwVRGW9roMwXnqCCU2SDjESZAJCKcZCG4Uc4ogRp0h/paXXX4vBlGGyTgzueEfi4ogOMeYXunwDdHExucdd0=; 31:wn9UQFyDZoUQGcR4xU9347YDEZz3dGPfPuWHylw+yAVHr9X2ojlxiKBzm+U447QFHzI+4vmHXrLIx1JS/ZsuFTai8npmFGFbBpHiLslrsgCPFuy7QScHOERqRv/+G92ITPbiHjdBC3YkqF9EW5AVqmL6MQj0vSY2LjZyyFPhICN/qquybC3nqAHSq4Uej9nkhRVqExRM6oW6pvdtJuE/hNgG4zXbHTWjIFdBLhHAMHs= X-MS-TrafficTypeDiagnostic: DB4PR04MB0765: X-Microsoft-Exchange-Diagnostics: 1; DB4PR04MB0765; 20:KC5rEN177ZGNgyRrkiQ7YQf1i5dnNQiuOOwZcDSomvBR3x9SXs4Cmxid5tGhWCYaeiCdi/+578HII/ZQjtkjzZ/f9pUwjShVFPi5cAAzq5EfHtv4aPY8HmtNZSNiPluJilCchAPxVQ2R5VOpxkVG+Tvw7IKJ0Y4YZ8/dgxQFwv1uh6eYdZWWPVFamT0pV4jrOKeTAjqFwsR9NxW7x2aWI0qPlD92fRsC5OlvNi/Ph4f5e2FHVkMTP4q3vvILKppuB7q7gjvrmS7H6uyh8yUxDmV2CQK8/r4LW0bX9WDReso5jWyJVKZD92iYmJQmROfM4AyWkFf2FIonapYO8XtwcNNlyvEEYB9HUFSbZ+yFN4m/FpwBz+R62ZxgDKypE2ZYBFNxMe043s02T2EtocwRVHOT5zR3hGPNLqSRVZAbZm2l3qlnLIR0RlocE9e4qRfDCALP77V7WOyahJOaBhWglrIkbEZtSNibz6+VvfPiEhl7+yoS9VsTHe3msrxAADJd; 4:srrp0/T99e3kpDfk/QS0PKgigFpv5YYDIMWWn7ExjwsZ2ALlHbIVs3D1GDizY/T9B9+lQZAPXqBctsj1N5FAzjyBA/d2lUqALedhBUQ2MQtqJQoDQLiZUtVehVZ0DMQzHBYgQTUqU7qdqzPHHpKLC1m9yCV+pc3c7L8D2Vuf75OkWBmeBxhI4qu8RRRbC8j4d0HEAJIBJvSInCf3rSgCxt2ZTshmL/BzPftXxmcddxFIyrtpo1MKEwaR7FeYH/exxaujZ5xP61OljXhaHJxhUTwtxlGaNK0bhZEMAWfgd6A56ttdfWERYdHh56QYq13qgCiaC67NUmzuYQwwos6Z5Ao7QoKQ5TtIJRAhdlVWUfY= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(278428928389397)(185117386973197); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(3231232)(944501410)(52105095)(93006095)(93001095)(3002001)(10201501046)(6055026)(6041310)(20161123564045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123562045)(20161123560045)(20161123558120)(6072148)(201708071742011); SRVR:DB4PR04MB0765; BCL:0; PCL:0; RULEID:; SRVR:DB4PR04MB0765; X-Forefront-PRVS: 06530126A4 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(979002)(39380400002)(346002)(376002)(39860400002)(396003)(366004)(189003)(199004)(3846002)(186003)(26005)(6506007)(956004)(76176011)(97736004)(2616005)(11346002)(105586002)(446003)(6486002)(5009440100003)(486006)(386003)(52116002)(2351001)(2361001)(51416003)(5660300001)(25786009)(478600001)(2906002)(44832011)(316002)(16586007)(50226002)(47776003)(6666003)(6916009)(36756003)(8936002)(476003)(6512007)(106356001)(6116002)(55236004)(66066001)(53936002)(16526019)(68736007)(4326008)(86362001)(7736002)(81156014)(8676002)(81166006)(50466002)(305945005)(48376002)(110426005)(969003)(989001)(999001)(1009001)(1019001); DIR:OUT; SFP:1101; SCL:1; SRVR:DB4PR04MB0765; H:bf-netperf1.ap.freescale.net; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; Received-SPF: None (protection.outlook.com: nxp.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; DB4PR04MB0765; 23:/JvwxyL5YNn+1+pY7PRv/YZeIim52FN/XatJs47kB?= =?us-ascii?Q?A1Ho/h7KwYbe94nVzewqdc1cZIqNv8w5hXbF2F3F8ea5RjOa+kl8dRs0hO19?= =?us-ascii?Q?1IxEGy7IOj//2ZflgOyJ4U5SwwcPT1SewrySsTELQKOKccaDEpDVjH3zyFUu?= =?us-ascii?Q?Zf9ghxsSjWph3t+yanbqz/LvURllwP2EXXlHiVyueSy6ctN+H6sXx3/+rmOM?= =?us-ascii?Q?zZY2nXn4Z+PuB5dT7mNOykcJCwfeJMcs3/sriu/umjjsUV0txDQ/CTKT0a5W?= =?us-ascii?Q?KMQWRdnoOAnjvUst8uCzNOsz+6uEvc0gRPJV+WDKs4BrWl19aPxkupkJZDs3?= =?us-ascii?Q?r3rrah3CZcpEvN/sZuBiQ9KWoSzLIHcU3joWrBmHXAId0OYuoBCqnpTDR6AG?= =?us-ascii?Q?bUnkl7WrWfvqmENpliNzZ2k89KYQv4M1mf5/Lg00PPcWVHDtbrW5lY6FqLVj?= =?us-ascii?Q?/IGKduFZFr5LYfAATO0uoMLvglu/myocwlo2YxuMP4wodA6ENQPCjtMXP5qG?= =?us-ascii?Q?vIrqRYphvDEGt5h41gRp45TIB/2wO4oAswxMG5KZiDsVpyL6V5LPzqr50kNr?= =?us-ascii?Q?iHUtMV/AUszrfcIdWkdKqCEy6IfXXm6+eqrJonMJxIdX0l46zVcVg6hV1RJe?= =?us-ascii?Q?bdLM8qg4HXllaczoexCawkl/so+CB4dLtkDSe8ELpR6UX1Ige+SJMEAmKVAZ?= =?us-ascii?Q?/tG72phEjCneNqAALtT0XfrR+QcF6caObK1JPgbQbqFFUg+hpODtQev26cS7?= =?us-ascii?Q?vaWlnddGkUe8oqFQ5edXRYbCd13uo+qxld6g+AhYcsQsocaIjOB1jS1VJHmG?= =?us-ascii?Q?i9sy0vM2K3GCNLcXrtaM61P0lxjqXxnrMJwGjAtibvNMcP8fx1bjKxVMLwc1?= =?us-ascii?Q?s76NTasAs76HjWsS2lFtXxRefZXP9/2nhpxAHBpXugY8ppoojVBio4UHLJyR?= =?us-ascii?Q?kobSNzNJ28mIUtrwbT6fqdqnmsSknbsvl+Nnx6zs94v4Zdy0ydrmCEk3os6Y?= =?us-ascii?Q?xOZsB/5bEulqBEFhGxNfYkgyFYukm4AQ+WFoiPqfr3QK41Uw8ucp7XqmjYJ3?= =?us-ascii?Q?yq46xBJWzjc2Tqve8sIkYl96mydqUr2dzot9cIlFok1TclByDNK5NWpd1beE?= =?us-ascii?Q?WrdpKdCM0VQvdmLzS9S/SYP60p4GQBFlkV4uGWsPWsbLceaPR3WkQzhHSt3e?= =?us-ascii?Q?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Sdf6zIiSqIaiuLIKbaUdRI4nb7JolY2GZZNIgNatqjhg5vmoEUzKIgdEHx1AlIRAvM0ufKVMLvFCnWiYRpiEMgD6EnG185YWCkIue4tIaDyxwk7FpXj0EUOz54jzR2L2SiiROSk=; 24:0+QeevOzHmZK7s2gw3ZDNrbMVb+Ravtmk//xNpxhYw8L665K3TaZYY+ty4DZfvogygdc9WvVXg+cnoaPG01MAteQaJ5En/gxugRXyDtTk3k= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; DB4PR04MB0765; 7:yw97fz5ut3LzsF9Iv1jkC+DPD9PPbKrpw3LZKFd/rcQfVk0SybLvM5HtQNZ6PAklynKgCzUIfIYwwbKadPtKYLrL2uVNdGaqbrYQst8CqOL/RGSrf3j98t8enk2Sz/80kjG8hEtWAN55FSliaSNUQGp4BorMU9kuSHJVtmqtQNSapSVFBZRB7lAEN7iGfF/9S+75YTayS+JP0/SIhtRMEc+V8Q6P6mqkVmRUj8XlsiJU+H3XIZG1Oi0rrlu3OLet X-MS-Office365-Filtering-Correlation-Id: 757f3986-b494-4894-c091-08d5aaac5782 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 Apr 2018 12:59:10.8483 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 757f3986-b494-4894-c091-08d5aaac5782 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB4PR04MB0765 Subject: [dpdk-dev] [PATCH 4/5] net/dpaa: fix the xstats implementation 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: Wed, 25 Apr 2018 12:59:14 -0000 Some of the applications are expecting that if n is 0, it shall return the supported number of stats. e.g. VPP Fixes: b21ed3e2a16d ("net/dpaa: support extended statistics") Cc: stable@dpdk.org Signed-off-by: Hemant Agrawal --- drivers/net/dpaa/dpaa_ethdev.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/net/dpaa/dpaa_ethdev.c b/drivers/net/dpaa/dpaa_ethdev.c index b2740b4..136f716 100644 --- a/drivers/net/dpaa/dpaa_ethdev.c +++ b/drivers/net/dpaa/dpaa_ethdev.c @@ -354,12 +354,12 @@ dpaa_dev_xstats_get(struct rte_eth_dev *dev, struct rte_eth_xstat *xstats, unsigned int i = 0, num = RTE_DIM(dpaa_xstats_strings); uint64_t values[sizeof(struct dpaa_if_stats) / 8]; - if (xstats == NULL) - return 0; - if (n < num) return num; + if (xstats == NULL) + return 0; + fman_if_stats_get_all(dpaa_intf->fif, values, sizeof(struct dpaa_if_stats) / 8); -- 2.7.4