From patchwork Tue Mar 19 21:11:43 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ira Weiny X-Patchwork-Id: 10860835 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 61C48922 for ; Wed, 20 Mar 2019 05:13:12 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 43348299DC for ; Wed, 20 Mar 2019 05:13:12 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 36073299F5; Wed, 20 Mar 2019 05:13:12 +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=-6.4 required=2.0 tests=BAYES_00,DATE_IN_PAST_06_12, MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id AA283299DC for ; Wed, 20 Mar 2019 05:13:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726113AbfCTFNL (ORCPT ); Wed, 20 Mar 2019 01:13:11 -0400 Received: from mga04.intel.com ([192.55.52.120]:58735 "EHLO mga04.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725300AbfCTFNK (ORCPT ); Wed, 20 Mar 2019 01:13:10 -0400 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 19 Mar 2019 22:13:10 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.60,247,1549958400"; d="scan'208";a="153950071" Received: from iweiny-desk2.sc.intel.com ([10.3.52.157]) by fmsmga004.fm.intel.com with ESMTP; 19 Mar 2019 22:13:10 -0700 From: ira.weiny@intel.com To: Jason Gunthorpe , Steven Rostedt Cc: linux-rdma@vger.kernel.org, Ira Weiny Subject: [PATCH V7 0/6] Add MAD stack trace points Date: Tue, 19 Mar 2019 14:11:43 -0700 Message-Id: <20190319211149.5447-1-ira.weiny@intel.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Ira Weiny Major issue of the umad buffer usage has been fixed. Easiest way to do this was to just add a "send" vs "recv" trace point for the read case. I also placed these traces where they would only fire if there were no errors as the mad gets requeued in the case of error. Changing the umad trace points required updating the BPF sample code. Changes for V7: Added reviewed by lines Used rdma_ah_get_dlid() helper (bit cleaner code) Fix use of user buffer in umad traces Update BPF sample for new umad traces Changes for V6: Changes from V5: Merge using the trace structe in create_mad_addr_info() Fixed version for TRACEPOINTS off Changes for V5: checkpatch cleanup Remove if statements and use calls in TP_fast_assign for cleaner trace code Changes for V4: Change dev_name to dev_index Changes for V3: Rebased on current RDMA for next Change license text to SPDX tag Change dev_name to string from array Reorder fields for more compact ring buffer utilization Use a defined roce address type for safer memcpy/memset Adjust BPF to new umad format Changes for v2: Update MAINTAINERS as indicated from Doug Now CC'ing the Tracing maintainers so they are aware of the additions [1] https://www.spinics.net/lists/linux-rdma/msg29109.html Ira Weiny (6): IB/MAD: Add send path trace points IB/MAD: Add recv path trace point IB/MAD: Add agent trace points IB/UMAD: Add umad trace points IB/MAD: Add SMP details to MAD tracing BPF: Add sample code for new ib_umad tracepoint MAINTAINERS | 4 + drivers/infiniband/core/mad.c | 48 +++- drivers/infiniband/core/user_mad.c | 12 + include/trace/events/ib_mad.h | 390 +++++++++++++++++++++++++++++ include/trace/events/ib_umad.h | 126 ++++++++++ samples/bpf/Makefile | 3 + samples/bpf/ibumad_kern.c | 144 +++++++++++ samples/bpf/ibumad_user.c | 122 +++++++++ 8 files changed, 848 insertions(+), 1 deletion(-) create mode 100644 include/trace/events/ib_mad.h create mode 100644 include/trace/events/ib_umad.h create mode 100644 samples/bpf/ibumad_kern.c create mode 100644 samples/bpf/ibumad_user.c