Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753363AbdLHMsD (ORCPT ); Fri, 8 Dec 2017 07:48:03 -0500 Received: from mail-by2nam03on0045.outbound.protection.outlook.com ([104.47.42.45]:35916 "EHLO NAM03-BY2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752588AbdLHMsB (ORCPT ); Fri, 8 Dec 2017 07:48:01 -0500 Authentication-Results: spf=fail (sender IP is 192.88.168.50) smtp.mailfrom=nxp.com; nxp.com; dkim=none (message not signed) header.d=none;nxp.com; dmarc=fail action=none header.from=nxp.com; From: Ioana Radulescu To: CC: , , Subject: [PATCH 3/6] staging: fsl-dpaa2/eth: Add counter for skb reallocs Date: Fri, 8 Dec 2017 06:47:55 -0600 Message-ID: <20171208124758.2732-4-ruxandra.radulescu@nxp.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20171208124758.2732-1-ruxandra.radulescu@nxp.com> References: <20171208124758.2732-1-ruxandra.radulescu@nxp.com> X-EOPAttributedMessage: 0 X-Matching-Connectors: 131572108773049912;(91ab9b29-cfa4-454e-5278-08d120cd25b8);() X-Forefront-Antispam-Report: CIP:192.88.168.50;IPV:NLI;CTRY:US;EFV:NLI;SFV:NSPM;SFS:(10009020)(336005)(7966004)(39860400002)(39380400002)(346002)(376002)(2980300002)(1109001)(1110001)(339900001)(189003)(199004)(105606002)(106466001)(36756003)(86362001)(316002)(16586007)(54906003)(97736004)(50466002)(104016004)(498600001)(2351001)(33646002)(48376002)(1076002)(53936002)(81166006)(68736007)(81156014)(6916009)(2950100002)(6666003)(8676002)(47776003)(4326008)(76176011)(2906002)(5660300001)(356003)(77096006)(8656006)(305945005)(8936002)(50226002)(51416003)(85426001);DIR:OUT;SFP:1101;SCL:1;SRVR:BN3PR03MB2356;H:tx30smr01.am.freescale.net;FPR:;SPF:Fail;PTR:InfoDomainNonexistent;MX:1;A:1;LANG:en; X-Microsoft-Exchange-Diagnostics: 1;BN1AFFO11FD024;1:KnJYvz/ad1zdANkoHQthpTa+mPh5hqMko43kxCquf7S9uCGRnDPpom2Okf7uq3FTVFo19R+1cCrfU7r0XJkzgEWCmSPXTxfJhY5+JFgoDUIBHB7lrvUXz1FQzXhhR2FQ MIME-Version: 1.0 Content-Type: text/plain X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 6a2b419c-10ac-4c7d-4638-08d53e39e83b X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(5600026)(4604075)(4534020)(4628075)(201703131517081)(2017052603307);SRVR:BN3PR03MB2356; X-Microsoft-Exchange-Diagnostics: 1;BN3PR03MB2356;3:xkiEckzuKl0vzShKPcenek25iKbnGcuPQ+6amhjNsWZ9705q8a2vXyTuTlqXsp6W9C2ZTAcfeVpJmEdcn+dVOLk++C9fNLVVyIxZCgGdz0JWZGkTVoiYPmY1x1gvTqkzBUF/7GIMNOutifUWbT6OEu6Q7Sa3+lJJwWeF422Yq6Z/2xsJBQJTjOkKj9OWH67CXqlGdwutWbgv0cgbdd17pCQf0QGsxQXlWnhy5aMF4T53feduX/s/tYx5vQvz7M/PhjmuiwD2NguGXIuWJDabfveMgBCJwxp9Vke51RdO4X38DfXHyXTCqX9MbPaYryJuYa+54An5fny9adlicy7RGTErqJPR8ZgXsyEksE58wLM=;25:rog0Opi6jZAS0ish8yokldeClGkccFIBVbps+otvrhPKx1d7PMv2Uzn/T+SxOzCkHqvpijFNSw4orAzkEaagbfF6siAbgbqomewo11KdWEgsPChhTjiKykmMnYKLHkkrYk2eX59/bFroGGelsT7ZsGFBBxJ4IPUKNAQY3u6Kw/PiA97cLF3PA7JXe6QpSkXzncoORjuX57AcvCzwnbtYQtSsYKIj1CmxWrFZhXFiySzKv6WZMtNgNn64o7UPUdMjaqn1cxAgq2fTPVYQvWfY1XDs4RE/Eb4eVtw9krQKlpvNDF9Tm/xlYI3olopsi+dx8hryGHEhJ7iemY0yOq9iPw== X-MS-TrafficTypeDiagnostic: BN3PR03MB2356: X-Microsoft-Exchange-Diagnostics: 1;BN3PR03MB2356;31:j9rS3bS7SnDUuVfofmHtnFiJnbagL9gzAXMVPpqTp2Szm8LwphfubwUmSs+521a17j4Yio2DIShuSLtmOyq6FAwpS5FGkKXhONI9NznIVpCsCWATugrvVWXlRBHRz6MOlgFnX1zttOsUIMfUgL8qF49yhRevZqPt1VXcsku+cw+lA+nbUpHCtjz+WMNOJBSu8mOq66loX7tnNE8eEjccXg0kHx7BHvsIjx9Lucp0HsY=;4:2uL822+IW4pYl+zM1ODGhA15pnG4vRFZjQh7JbbGpVKvpQSpa1TPTwVQB85husyp+o3+BqLTmStZUUisAweVETH4adS137xPfrrgz2kQp2qFkGEftjitlfHQwEEILDGvhynN48LPRPiyX6ZIIO5ODPlaOx6LTzoamuJWY34/ka/effImwaQPyqbGErR0zJPGfBgLK/EjHOe21S9YQgLKi1SCdZqwHyfZImR/GhxIjCN1PSyM64aKbqxNIgryoYZFkibRqXRKpH7wbAu5Ym3Wr1zrQiCsUcfXo98da0Co4qO4LaRLusyrKI5TtGjq2pnJ5rmNbpBwZ8itnoVcwOofbEfdbouA5BcndF53UJYEpNs= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(185117386973197)(275809806118684); X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(6095135)(2401047)(8121501046)(5005006)(93006095)(93001095)(3002001)(10201501046)(3231022)(6055026)(6096035)(20161123556025)(20161123561025)(20161123563025)(20161123565025)(201703131430075)(201703131441075)(201703131448075)(201703131433075)(201703161259150)(20161123559100)(201708071742011);SRVR:BN3PR03MB2356;BCL:0;PCL:0;RULEID:(100000803101)(100110400095)(400006);SRVR:BN3PR03MB2356; X-Forefront-PRVS: 0515208626 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1;BN3PR03MB2356;23:vjtSQgHDoT73Adolu0PXKAscUM3oiRV1EQZKyonTq?= =?us-ascii?Q?rzyS2+Hlt69k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mi43Z0iu4C9qhbqq6ARSTgIvxknWOrrCmhexFf39d10eMEBhlcgNQaFpQBsTEWbzjFzLz2X5TNkRyx51jAx+q3MrnLvN35QhIHV3rbSdZFz0u2uuYCLN15yM5tkezC5p9B SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Dec 2017 12:47:57.1333 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 6a2b419c-10ac-4c7d-4638-08d53e39e83b X-MS-Exchange-CrossTenant-Id: 5afe0b00-7697-4969-b663-5eab37d5f47e X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=5afe0b00-7697-4969-b663-5eab37d5f47e;Ip=[192.88.168.50];Helo=[tx30smr01.am.freescale.net] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN3PR03MB2356 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1860 Lines: 48 Add a counter for the number of egress frames that need to be realloc'ed due to insufficient headroom space. Signed-off-by: Ioana Radulescu --- drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.c | 1 + drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.h | 1 + drivers/staging/fsl-dpaa2/ethernet/dpaa2-ethtool.c | 1 + 3 files changed, 3 insertions(+) diff --git a/drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.c b/drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.c index 04db65c..6de6cdd 100644 --- a/drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.c +++ b/drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.c @@ -578,6 +578,7 @@ static netdev_tx_t dpaa2_eth_tx(struct sk_buff *skb, struct net_device *net_dev) percpu_stats->tx_dropped++; goto err_alloc_headroom; } + percpu_extras->tx_reallocs++; dev_kfree_skb(skb); skb = ns; } diff --git a/drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.h b/drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.h index 63b09d1..6940a98 100644 --- a/drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.h +++ b/drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.h @@ -231,6 +231,7 @@ struct dpaa2_eth_drv_stats { __u64 tx_conf_bytes; __u64 tx_sg_frames; __u64 tx_sg_bytes; + __u64 tx_reallocs; __u64 rx_sg_frames; __u64 rx_sg_bytes; /* Enqueues retried due to portal busy */ diff --git a/drivers/staging/fsl-dpaa2/ethernet/dpaa2-ethtool.c b/drivers/staging/fsl-dpaa2/ethernet/dpaa2-ethtool.c index ebe8fd6..070a3f2 100644 --- a/drivers/staging/fsl-dpaa2/ethernet/dpaa2-ethtool.c +++ b/drivers/staging/fsl-dpaa2/ethernet/dpaa2-ethtool.c @@ -62,6 +62,7 @@ static char dpaa2_ethtool_extras[][ETH_GSTRING_LEN] = { "[drv] tx conf bytes", "[drv] tx sg frames", "[drv] tx sg bytes", + "[drv] tx realloc frames", "[drv] rx sg frames", "[drv] rx sg bytes", "[drv] enqueue portal busy", -- 2.7.4