From patchwork Fri Apr 28 09:50:32 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ioana Ciocoi Radulescu X-Patchwork-Id: 9704377 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 5D3DC602B7 for ; Fri, 28 Apr 2017 09:53:43 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 47B4820952 for ; Fri, 28 Apr 2017 09:53:43 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3A7D828652; Fri, 28 Apr 2017 09:53:43 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=2.0 tests=BAD_ENC_HEADER,BAYES_00, DKIM_SIGNED,DKIM_VALID autolearn=unavailable version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 8833B20952 for ; Fri, 28 Apr 2017 09:53:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=D4ax3YVMfN8TC0YBR9eX2L7D3eKRprclDoS8+LClBTI=; b=ETfajD7yNdd/LM isAWx7Suxm8tjcfVvaLaZCnI6OdlPBnQNeyauTcvoVTIyImRGiJgOS785KoNWC81yDFGvCdAwK5N4 X/KA+YvnV3uAhw4xO4ztGHn4a64QrO8BDHhF1V/GTS/X/s515UpsVuht3MuQcfSim7PNEvArwEn68 +hoIWZGNmzXTHFb09+qf2Hu1lRakOxJAy/PM9XInbzw01tZlXODfpGbdUPPl95ff2sRbtPfbpWjJg lHFm0fhKTCFfa3frIumIVrTM6EREL55XczOG/4VdQ/356ha5ujQimmX9eg9t5y4BclbMxvSy141OM jhYYKvtqO5POT0OjN6fg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1d42ar-0004Dg-Fp; Fri, 28 Apr 2017 09:53:41 +0000 Received: from mail-bl2nam02on0054.outbound.protection.outlook.com ([104.47.38.54] helo=NAM02-BL2-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1d42YG-0001uQ-Fo for linux-arm-kernel@lists.infradead.org; Fri, 28 Apr 2017 09:51:04 +0000 Received: from BLUPR0301CA0034.namprd03.prod.outlook.com (10.162.113.172) by BY1PR0301MB1190.namprd03.prod.outlook.com (10.160.195.149) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1047.13; Fri, 28 Apr 2017 09:50:37 +0000 Received: from BN1BFFO11FD011.protection.gbl (2a01:111:f400:7c10::1:104) by BLUPR0301CA0034.outlook.office365.com (2a01:111:e400:5259::44) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1061.12 via Frontend Transport; Fri, 28 Apr 2017 09:50:36 +0000 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; Received-SPF: Fail (protection.outlook.com: domain of nxp.com does not designate 192.88.168.50 as permitted sender) receiver=protection.outlook.com; client-ip=192.88.168.50; helo=tx30smr01.am.freescale.net; Received: from tx30smr01.am.freescale.net (192.88.168.50) by BN1BFFO11FD011.mail.protection.outlook.com (10.58.144.74) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.1047.9 via Frontend Transport; Fri, 28 Apr 2017 09:50:36 +0000 Received: from rhuath.am.freescale.net (rhuath.am.freescale.net [10.81.117.102]) by tx30smr01.am.freescale.net (8.14.3/8.14.0) with ESMTP id v3S9oYog012229; Fri, 28 Apr 2017 02:50:35 -0700 From: Ioana Radulescu To: Subject: [PATCH v3 7/9] staging: fsl-dpaa2/eth: Add trace points Date: Fri, 28 Apr 2017 04:50:32 -0500 Message-ID: <20170428095034.8842-8-ruxandra.radulescu@nxp.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170428095034.8842-1-ruxandra.radulescu@nxp.com> References: <20170428095034.8842-1-ruxandra.radulescu@nxp.com> X-EOPAttributedMessage: 0 X-Matching-Connectors: 131378466369672034; (91ab9b29-cfa4-454e-5278-08d120cd25b8); () X-Forefront-Antispam-Report: CIP:192.88.168.50; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(6009001)(336005)(39850400002)(39380400002)(39450400003)(39400400002)(39840400002)(39860400002)(39410400002)(2980300002)(1110001)(1109001)(339900001)(199003)(189002)(9170700003)(7416002)(305945005)(47776003)(4326008)(50226002)(53936002)(1076002)(76176999)(106466001)(54906002)(105606002)(8936002)(2906002)(104016004)(2351001)(50986999)(38730400002)(81166006)(36756003)(48376002)(5003940100001)(189998001)(85426001)(110136004)(6916009)(575784001)(77096006)(39060400002)(356003)(8676002)(6666003)(8656002)(86362001)(2950100002)(33646002)(5660300001)(50466002)(2004002); DIR:OUT; SFP:1101; SCL:1; SRVR:BY1PR0301MB1190; H:tx30smr01.am.freescale.net; FPR:; SPF:Fail; MLV:ovrnspm; A:1; MX:1; PTR:InfoDomainNonexistent; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BN1BFFO11FD011; 1:xZf5cSTvsHgm+k7zVC5g7pAazAHT8zbyIaMKP1yf74DfChzwrvgaqXVvlIE+1bLS+m56yvqTFgRlJ9+FY1zK2gvGDnBOGUf6XNAfM6DTA8w+uzxsDXV6EQUehRYgHCrorJBSSVJSCJtGAMlyoNEMJsS9b4hvLCCBSgF0OcYmfGt+ZFP3A1tUsu8FLf9lRtQ2rVXlDJUyLCIe4z48+nvNmSaVC7p49S14HdAnpt5NwAyWFEVoQwoMFEpDp3AhoQyJGdcugwhY+5EftO8EOcSuuQHalqQThqua5Gca5qdgAlPulE+bDhQyg+vxqA98WlGmHNeD0XSpHsJFpNH1WPHvYWyfhiSOQ1+1P8lGK1LNka1gZ+HKbirBXGSRSbvb116N6BKKj4QvCrt34ZimDNQmHusLg3KpAuhbKNVfMxlR+jG7sETX7jKMXfv/r9Ry57BXKfaVpDpcygiL6rHkKf2ec10YWf3SLEmNfugMMn51BDDbg19gXHpr/Gll1MrJZlIGb9U6OHOGf8qNyOUnAHjmWDsN+m9gq2VM3YEvQDuvTFwIOoEyXsOhATzzYgrqAQ7NdGo//PqRxIvr+islX4WcRpjUIwMcuecjlIySaWpuFmp228Ukthr6ZUxBCxPy4nVBu3wW/ehuRN+VL35Li+8CfCubMeClBhQrE+UKeg8U7XKHpyFJwUoIf3pBbjY280m4CXRKpNGxTdsI9mtasgma63Y32WwOLmf7omTn//7lA30= MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 5ff7d570-85b2-4faa-d0a2-08d48e1c058b X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(201703131430075)(201703131517081); SRVR:BY1PR0301MB1190; X-Microsoft-Exchange-Diagnostics: 1; BY1PR0301MB1190; 3:jlBcmqKJX2Nhh6/m+InOFomS/rAltRd1myZpXMVq00KsAeykEsGzUdPAr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/QsPmINo9hnJEFrYoKGyiUlhuCzNKNcx1uxoGmPvg6S68O3hzrXgvrgsLTNYAhMPY9xVfQ5rhmbp56szkEqB3JUvOTLpNyL9uk7IGKMA== X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(185117386973197); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6095135)(601004)(2401047)(13015025)(13017025)(13023025)(13018025)(8121501046)(5005006)(13024025)(93006095)(93001095)(3002001)(10201501046)(6055026)(6096035)(20161123563025)(201703131430075)(201703131433075)(201703131441075)(201703131448075)(201703161259150)(20161123565025)(20161123561025)(20161123556025); SRVR:BY1PR0301MB1190; BCL:0; PCL:0; RULEID:(400006); SRVR:BY1PR0301MB1190; X-Microsoft-Exchange-Diagnostics: 1; BY1PR0301MB1190; 4:Dl3nwMasu48/sFkjrg7ZuvAMlNdfrQrqeXJWLaCd9b77HpbHAUS2S3ErbmEWo5hB7mx346OHL46Lvqj6TwMsXUWpdDqjMvtZqYXg1ApwT1L+sUowvNvxo9qUfdv0ilc/uRq2pOQfcepsTSr6qg1519m9i3uHk1/m6JbvzJ7dU/6GawD0XKK4Rvrfm9Pf/p9iVoXlCyHwjfenhGH7O2INNa7qyofcuRYU5vcWe7eWGV/J8Hgp5kws0uDanN7vYbj9TOBSlAdLa6O4Hz1Ient+4a8LoUyEyaSoNhtp24kgX8bgmbis8iIISHeVnn6ubjDlzBAtqHAYR1LjuwnDtEElaLwxl2+qaKkBJd/o9ZC5qvIsk1M64NPZqMGcGRu5as+nwY1QuXsoSOH0HHaZ57jFhUwsWdv92x5IBPCJPsTYVl7f1o6EfPIO7S/iBCD/HGPATiG7KK4xn42Vpg/b1bttilZq/5WyjhpisufuZDtI+ERhng0IMAMOe1KiICNsYsrsTDnSLDV6aiToVDZbggUjaS2YTBaeKZQKRE2bU0LMBwlplLQauWsf+7i/Ths1pFfKI0aT8TTB4uBorYl3JJkp9VTkjSg7lVrc9S2AxWAPi/ukcU3eTmH3C/AOawwgl/G9qL22cmrAT4/JXDbycAwPIr2VWjcEDzuhaLBIGhe7HSWHDvxxt3eqNPUx2smCia34FgXBFl4fj3YuPhAZBInZr7nh4tyF5SVkFkT0xlU/awlnoEKtZJJWyNl0sfpIuHQWMG47B3j2rDdfw0akNY1fqitWh/Len0TKtq/GIYrDxgyR4zydJyC1drt6CfdXosDJ2jGlYB+55PHdP0f7VVpi4bjWa3vGBp1CLfbyU9MG4eX8bVDepS4867ccB64SYw2XuypGcZ5YqcTOdbCq/ADRXfxCPzPs53ltx1yueN8RPC4= X-Forefront-PRVS: 029174C036 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BY1PR0301MB1190; 23:dPeCFtCqp3LgK82xldL66kgDsnES6tK+oP2kyV1?= =?us-ascii?Q?YkTvfdXk6UdBK5pw6pyyKYIoYm26uNYYBtIFLyoXLCW+MgCnhg6AriZ3Wos2?= =?us-ascii?Q?GCdefmKdYWzbbACWUMyonc2LOJNANYcKtF/ew+WNC1KTvkpDLa9Kj7J5Ljs4?= =?us-ascii?Q?+TiGp4hHwTw2Grxc12F3v1fx9Z0UL6SSfZkxkzfngLHcMtcE4o5DB3bvBxZP?= =?us-ascii?Q?4wOHq8VSVrpWNlJ55nIysS2/EX+UrZvEaZ8oUR70V5gWh0jYgiy0RLst+u1g?= =?us-ascii?Q?KCIgOtNnMyLSiKt39uA7ULewzPEfFpUYfc7OFgmvMmAdiD8cEfMeFFlvrL5U?= =?us-ascii?Q?nBLU9qTeO73PRdRgTcR6on/yStySQNChzQzdno21Av/reOTJ9oqqVTPfdQEN?= =?us-ascii?Q?D8Sw43VJj6SEU0IV1KJEox0Lo664BFusVq/m373suPuussikTnJK4HFa7ScH?= =?us-ascii?Q?DxoqjpGYw1LSZmUHUxXoU8H6uIFCNMMwr535pfpxH7Z3fvL/ocJQ68Pnm4fb?= =?us-ascii?Q?hMymNFoZKHQa5HIXi80stR55MABPCOMkbpCu67DQb6RA5GUxWT3yJC2dWctn?= =?us-ascii?Q?XgYRUK07ZXiSv94P+1f9ZD4lVb+LVz7epv42y4Y6mIouHuoLaIEzKaG5KRKU?= =?us-ascii?Q?izJxDmHo1Ba9B+KOeUwEa955KacfJUwcH4+/fI/LXOJ5y/J+vHeWA+hKN4zK?= =?us-ascii?Q?WglQVOKWr2yokheNP9AlMvrhB+IWfX5NZsRCHFHqx+dKRxjqXbxQpd0PUVSE?= =?us-ascii?Q?czQiLL4jb14WB1y66r78MZXPCktFjupcN5zSddypv2/C7Fir67X5kymH0S0m?= =?us-ascii?Q?vFRpAeGlrnuecdphB+KSplyFj9D0avbZB/SWLXw9734MoWuCOdwDISRIzemR?= =?us-ascii?Q?WBs7m5+dW7Gd5AMWC3QwAjPZA+0XpUZJ6Mbjq8126ttCooWibECpD023JDY1?= =?us-ascii?Q?V1915Pm12wVs5om0dbATt/tFJGKxYZF6dk6vTDbZrimVUprjr9V8wYWhPU2m?= =?us-ascii?Q?d5l4HJSegRZYY89Kq4bG8ga8a8607dbE3NIbBMODMsK4ZfsimICM92hOGwb3?= =?us-ascii?Q?wjv4e5ydWeLo52RbxmygRCC1vkptGJQQy1PuD1O8bhqk2Lwvyxx2Rabblg/V?= =?us-ascii?Q?9yq2dHGDUMw7R97UHyB0uwOm7tcFJXbH/JGOR8GdI7IMWQ0IXLlsk5nvhnS7?= =?us-ascii?Q?u/39m8iLC0QRX5N7MvT6bgTLDo4IMTH98FDBcHIqQw4nIrgMxZ9/XG79PRlA?= =?us-ascii?Q?GnsbiMGzbenp063abYioFzDPL4sEgQZZqVhdazQ2WFFjVu9KHna/igI9lrUl?= =?us-ascii?Q?+xU+MXCtOWwOrSB1JdrltmpI=3D?= X-Microsoft-Exchange-Diagnostics: 1; BY1PR0301MB1190; 6:miIHcM8Yv3poklDeH0YV6OUXpze+TH1JXfMeNtJqSw26g8ZI3/467k9kEB78/DXY9gzBeK8qHJYlEqzwxTrwKnCwpjmRPlTDl0RktyNmN83TsY1hzjjz5NfEWCwy7Ju/jVCu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HU0w8eKWyaGLPeupnlnvcjvpd3Ax4Sb6hRWRRdserixSMjszs41KOFqw== X-MS-Exchange-CrossTenant-OriginalArrivalTime: 28 Apr 2017 09:50:36.6396 (UTC) 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: BY1PR0301MB1190 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170428_025100_798271_9914728A X-CRM114-Status: GOOD ( 17.17 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devel@driverdev.osuosl.org, stuyoder@gmail.com, arnd@arndb.de, haiying.wang@nxp.com, roy.pledge@nxp.com, ruxandra.radulescu@nxp.com, alexandru.marginean@nxp.com, linux-kernel@vger.kernel.org, agraf@suse.de, bogdan.hamciuc@nxp.com, bogdan.purcareata@nxp.com, linux-arm-kernel@lists.infradead.org, laurentiu.tudor@nxp.com Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Add trace events in significant places of the data path. Useful for debuggging. Signed-off-by: Ioana Radulescu --- v3: no changes v2: no changes drivers/staging/fsl-dpaa2/ethernet/Makefile | 3 + .../staging/fsl-dpaa2/ethernet/dpaa2-eth-trace.h | 185 +++++++++++++++++++++ drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.c | 21 +++ drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.h | 2 + 4 files changed, 211 insertions(+) create mode 100644 drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth-trace.h diff --git a/drivers/staging/fsl-dpaa2/ethernet/Makefile b/drivers/staging/fsl-dpaa2/ethernet/Makefile index 4327ebe803cb..77b0b74f835a 100644 --- a/drivers/staging/fsl-dpaa2/ethernet/Makefile +++ b/drivers/staging/fsl-dpaa2/ethernet/Makefile @@ -5,3 +5,6 @@ obj-$(CONFIG_FSL_DPAA2_ETH) += fsl-dpaa2-eth.o fsl-dpaa2-eth-objs := dpaa2-eth.o dpaa2-ethtool.o dpni.o + +# Needed by the tracing framework +CFLAGS_dpaa2-eth.o := -I$(src) diff --git a/drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth-trace.h b/drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth-trace.h new file mode 100644 index 000000000000..3b040e8d6a4e --- /dev/null +++ b/drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth-trace.h @@ -0,0 +1,185 @@ +/* Copyright 2014-2015 Freescale Semiconductor Inc. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the name of Freescale Semiconductor nor the + * names of its contributors may be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * + * ALTERNATIVELY, this software may be distributed under the terms of the + * GNU General Public License ("GPL") as published by the Free Software + * Foundation, either version 2 of that License or (at your option) any + * later version. + * + * THIS SOFTWARE IS PROVIDED BY Freescale Semiconductor ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL Freescale Semiconductor BE LIABLE FOR ANY + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#undef TRACE_SYSTEM +#define TRACE_SYSTEM dpaa2_eth + +#if !defined(_DPAA2_ETH_TRACE_H) || defined(TRACE_HEADER_MULTI_READ) +#define _DPAA2_ETH_TRACE_H + +#include +#include +#include "dpaa2-eth.h" +#include + +#define TR_FMT "[%s] fd: addr=0x%llx, len=%u, off=%u" +/* trace_printk format for raw buffer event class */ +#define TR_BUF_FMT "[%s] vaddr=%p size=%zu dma_addr=%pad map_size=%zu bpid=%d" + +/* This is used to declare a class of events. + * individual events of this type will be defined below. + */ + +/* Store details about a frame descriptor */ +DECLARE_EVENT_CLASS(dpaa2_eth_fd, + /* Trace function prototype */ + TP_PROTO(struct net_device *netdev, + const struct dpaa2_fd *fd), + + /* Repeat argument list here */ + TP_ARGS(netdev, fd), + + /* A structure containing the relevant information we want + * to record. Declare name and type for each normal element, + * name, type and size for arrays. Use __string for variable + * length strings. + */ + TP_STRUCT__entry( + __field(u64, fd_addr) + __field(u32, fd_len) + __field(u16, fd_offset) + __string(name, netdev->name) + ), + + /* The function that assigns values to the above declared + * fields + */ + TP_fast_assign( + __entry->fd_addr = dpaa2_fd_get_addr(fd); + __entry->fd_len = dpaa2_fd_get_len(fd); + __entry->fd_offset = dpaa2_fd_get_offset(fd); + __assign_str(name, netdev->name); + ), + + /* This is what gets printed when the trace event is + * triggered. + */ + TP_printk(TR_FMT, + __get_str(name), + __entry->fd_addr, + __entry->fd_len, + __entry->fd_offset) +); + +/* Now declare events of the above type. Format is: + * DEFINE_EVENT(class, name, proto, args), with proto and args same as for class + */ + +/* Tx (egress) fd */ +DEFINE_EVENT(dpaa2_eth_fd, dpaa2_tx_fd, + TP_PROTO(struct net_device *netdev, + const struct dpaa2_fd *fd), + + TP_ARGS(netdev, fd) +); + +/* Rx fd */ +DEFINE_EVENT(dpaa2_eth_fd, dpaa2_rx_fd, + TP_PROTO(struct net_device *netdev, + const struct dpaa2_fd *fd), + + TP_ARGS(netdev, fd) +); + +/* Tx confirmation fd */ +DEFINE_EVENT(dpaa2_eth_fd, dpaa2_tx_conf_fd, + TP_PROTO(struct net_device *netdev, + const struct dpaa2_fd *fd), + + TP_ARGS(netdev, fd) +); + +/* Log data about raw buffers. Useful for tracing DPBP content. */ +TRACE_EVENT(dpaa2_eth_buf_seed, + /* Trace function prototype */ + TP_PROTO(struct net_device *netdev, + /* virtual address and size */ + void *vaddr, + size_t size, + /* dma map address and size */ + dma_addr_t dma_addr, + size_t map_size, + /* buffer pool id, if relevant */ + u16 bpid), + + /* Repeat argument list here */ + TP_ARGS(netdev, vaddr, size, dma_addr, map_size, bpid), + + /* A structure containing the relevant information we want + * to record. Declare name and type for each normal element, + * name, type and size for arrays. Use __string for variable + * length strings. + */ + TP_STRUCT__entry( + __field(void *, vaddr) + __field(size_t, size) + __field(dma_addr_t, dma_addr) + __field(size_t, map_size) + __field(u16, bpid) + __string(name, netdev->name) + ), + + /* The function that assigns values to the above declared + * fields + */ + TP_fast_assign( + __entry->vaddr = vaddr; + __entry->size = size; + __entry->dma_addr = dma_addr; + __entry->map_size = map_size; + __entry->bpid = bpid; + __assign_str(name, netdev->name); + ), + + /* This is what gets printed when the trace event is + * triggered. + */ + TP_printk(TR_BUF_FMT, + __get_str(name), + __entry->vaddr, + __entry->size, + &__entry->dma_addr, + __entry->map_size, + __entry->bpid) +); + +/* If only one event of a certain type needs to be declared, use TRACE_EVENT(). + * The syntax is the same as for DECLARE_EVENT_CLASS(). + */ + +#endif /* _DPAA2_ETH_TRACE_H */ + +/* This must be outside ifdef _DPAA2_ETH_TRACE_H */ +#undef TRACE_INCLUDE_PATH +#define TRACE_INCLUDE_PATH . +#undef TRACE_INCLUDE_FILE +#define TRACE_INCLUDE_FILE dpaa2-eth-trace +#include diff --git a/drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.c b/drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.c index 67f007bdbe79..6f9eed66c64d 100644 --- a/drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.c +++ b/drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.c @@ -42,6 +42,12 @@ #include "../../fsl-mc/include/mc-sys.h" #include "dpaa2-eth.h" +/* CREATE_TRACE_POINTS only needs to be defined once. Other dpa files + * using trace events only need to #include + */ +#define CREATE_TRACE_POINTS +#include "dpaa2-eth-trace.h" + MODULE_LICENSE("Dual BSD/GPL"); MODULE_AUTHOR("Freescale Semiconductor, Inc"); MODULE_DESCRIPTION("Freescale DPAA2 Ethernet Driver"); @@ -213,6 +219,9 @@ static void dpaa2_eth_rx(struct dpaa2_eth_priv *priv, struct dpaa2_fas *fas; u32 status = 0; + /* Tracing point */ + trace_dpaa2_rx_fd(priv->net_dev, fd); + dma_unmap_single(dev, addr, DPAA2_ETH_RX_BUF_SIZE, DMA_FROM_DEVICE); vaddr = phys_to_virt(addr); @@ -583,6 +592,9 @@ static int dpaa2_eth_tx(struct sk_buff *skb, struct net_device *net_dev) goto err_build_fd; } + /* Tracing point */ + trace_dpaa2_tx_fd(net_dev, &fd); + /* TxConf FQ selection primarily based on cpu affinity; this is * non-migratable context, so it's safe to call smp_processor_id(). */ @@ -623,6 +635,9 @@ static void dpaa2_eth_tx_conf(struct dpaa2_eth_priv *priv, struct dpaa2_eth_drv_stats *percpu_extras; u32 status = 0; + /* Tracing point */ + trace_dpaa2_tx_conf_fd(priv->net_dev, fd); + percpu_extras = this_cpu_ptr(priv->percpu_extras); percpu_extras->tx_conf_frames++; percpu_extras->tx_conf_bytes += dpaa2_fd_get_len(fd); @@ -707,6 +722,12 @@ static int add_bufs(struct dpaa2_eth_priv *priv, u16 bpid) goto err_map; buf_array[i] = addr; + + /* tracing point */ + trace_dpaa2_eth_buf_seed(priv->net_dev, + buf, DPAA2_ETH_BUF_RAW_SIZE, + addr, DPAA2_ETH_RX_BUF_SIZE, + bpid); } release_bufs: diff --git a/drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.h b/drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.h index f2b0a60795fe..c67cced55b72 100644 --- a/drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.h +++ b/drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.h @@ -43,6 +43,8 @@ #include "dpni.h" #include "dpni-cmd.h" +#include "dpaa2-eth-trace.h" + #define DPAA2_ETH_STORE_SIZE 16 /* Maximum number of scatter-gather entries in an ingress frame,