From patchwork Thu Jun 2 19:12:28 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Dmitry Fleytman X-Patchwork-Id: 9151095 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 C0A556074E for ; Thu, 2 Jun 2016 19:13:02 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id AE66328309 for ; Thu, 2 Jun 2016 19:13:02 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A322D28328; Thu, 2 Jun 2016 19:13:02 +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.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id EBC3028309 for ; Thu, 2 Jun 2016 19:13:01 +0000 (UTC) Received: from localhost ([::1]:49867 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b8Y38-0002pK-4n for patchwork-qemu-devel@patchwork.kernel.org; Thu, 02 Jun 2016 15:12:58 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:43723) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b8Y2r-0002p3-Sy for qemu-devel@nongnu.org; Thu, 02 Jun 2016 15:12:43 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1b8Y2o-0006uC-Lb for qemu-devel@nongnu.org; Thu, 02 Jun 2016 15:12:41 -0400 Received: from mail-wm0-x243.google.com ([2a00:1450:400c:c09::243]:33916) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b8Y2n-0006sw-R0 for qemu-devel@nongnu.org; Thu, 02 Jun 2016 15:12:38 -0400 Received: by mail-wm0-x243.google.com with SMTP id n184so17716770wmn.1 for ; Thu, 02 Jun 2016 12:12:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=daynix-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=2x4HDGfNRZ5ZlnsMQQWBkwxZ0GqnhMRRRXoe6e7KA28=; b=YqKzPb6gfAFRiGfklB6wor0bx9sRUS50nBfHesMnkCDVboDlqzXfNE+h7z5naugu/s IvDLGwCnGwCDndQc5PRj+kXaIommGLe+VNexUZlfXQakZaPVbjI5KhUzNcU30Aeav6V4 gAYS2QlHtj5qmB+TNhziwQlOo8HvIiQU8b/MB+oOxef9xq0Yg1titEopuWYARFrx6yAh yVZ7FxzKQCNQHRjMb7dpfsm+z2QB5kvH/OJrO+b0hoG4Hqje7RQrVmjGQu5CEzCPuE+y QNM+Cqdr6fOuKgJUpbPEYoyuG8mN3ihD54atuiNW6BCF5BXDS2bwJ9v0ugYFgjmw1eR2 hp2A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=2x4HDGfNRZ5ZlnsMQQWBkwxZ0GqnhMRRRXoe6e7KA28=; b=ZukZs7iXhDJrlx0WAmok42+UBgUrWaOSeWaOukwdHfrro5XibqiT5DwYRIrYdUoozo 8GTPFK8BoSi3VXuxBtmcYo4GxBQwrfGfml67PuU9Y6YBE4qeBHE0Abz3j4ii4ctEHlFB pjPnjiZ9jn7Q1t0eVaD1CMCS449TB0+Z0ldGkphk1y/5JDowUpZ4wi1pYR+PnFg83HMT AE1RfbvKeFNIsISLksZ4L3p1iBaeLTIjGzyWZn0V+g0Omi7C05EhK16iYMZxj7xNMb0R LZo0SMUlcQLVnwdpbj6G01TL37b9J1KxXadUsxMcdcL1zGhiPaDpJAvsYgMgYOZxz9de si7w== X-Gm-Message-State: ALyK8tLUwxUq6rtMsHJEULx52xru0BiZx+lnlarzHF7G//ujzQZbwiJW7/Lo4YEpqqX1FQ== X-Received: by 10.194.11.97 with SMTP id p1mr9916488wjb.159.1464894756961; Thu, 02 Jun 2016 12:12:36 -0700 (PDT) Received: from bark.daynix ([5.102.236.99]) by smtp.gmail.com with ESMTPSA id t3sm41796973wmf.20.2016.06.02.12.12.34 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 02 Jun 2016 12:12:35 -0700 (PDT) From: Dmitry Fleytman To: qemu-devel@nongnu.org Date: Thu, 2 Jun 2016 22:12:28 +0300 Message-Id: <1464894748-27803-1-git-send-email-dmitry@daynix.com> X-Mailer: git-send-email 2.5.5 MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2a00:1450:400c:c09::243 Subject: [Qemu-devel] [PATCH] e1000e: Fix build with ust trace backend X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Yan Vugenfirer , Peter Maydell , Jason Wang , Leonid Bloch , Shmulik Ladkani Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP ust trace backend has limitation of maximum 10 arguments per event. Traces with more arguments cannot be compiled for this backend. Trace e1000e_rx_rss_ip6 introduced by previous commits has 11 arguments and fails to compile with ust trace backend. This patch fixes the problem by splitting this tracepoint into two successive tracepoints with smaller number of arguments. For more information see comment regarding TP_ARGS in lttng/tracepoint.h: /* * TP_ARGS takes tuples of type, argument separated by a comma. * It can take up to 10 tuples (which means that less than 10 tuples is * fine too). * Each tuple is also separated by a comma. */ Build log generated by this problem: In file included from ./trace/generated-tracers.h:9:0, from /home/travis/build/qemu/qemu/include/trace.h:4, from util/oslib-posix.c:36: ./trace/generated-ust-provider.h:16556:3: error: unknown type name ‘_TP_EXPROTO_Bool’ In file included from /home/travis/build/qemu/qemu/include/trace.h:4:0, from util/oslib-posix.c:36: ./trace/generated-tracers.h: In function ‘trace_e1000e_rx_rss_ip6’: ./trace/generated-tracers.h:8379:431: error: expected string literal before ‘_SDT_ASM_OPERANDS_ipv6_enabled’ ./trace/generated-tracers.h:8379:431: error: implicit declaration of function ‘__tracepoint_cb_qemu___e1000e_rx_rss_ip6’ [-Werror=implicit-function-declaration] ./trace/generated-tracers.h:8379:431: error: nested extern declaration of ‘__tracepoint_cb_qemu___e1000e_rx_rss_ip6’ [-Werror=nested-externs] cc1: all warnings being treated as errors make: *** [util/oslib-posix.o] Error 1 make: *** Waiting for unfinished jobs.... In file included from ./trace/generated-tracers.h:9:0, from /home/travis/build/qemu/qemu/include/trace.h:4, from util/hbitmap.c:16: ./trace/generated-ust-provider.h:16556:3: error: unknown type name ‘_TP_EXPROTO_Bool’ In file included from /home/travis/build/qemu/qemu/include/trace.h:4:0, from util/hbitmap.c:16: ./trace/generated-tracers.h: In function ‘trace_e1000e_rx_rss_ip6’: ./trace/generated-tracers.h:8379:431: error: expected string literal before ‘_SDT_ASM_OPERANDS_ipv6_enabled’ ./trace/generated-tracers.h:8379:431: error: implicit declaration of function ‘__tracepoint_cb_qemu___e1000e_rx_rss_ip6’ [-Werror=implicit-function-declaration] ./trace/generated-tracers.h:8379:431: error: nested extern declaration of ‘__tracepoint_cb_qemu___e1000e_rx_rss_ip6’ [-Werror=nested-externs] cc1: all warnings being treated as errors make: *** [util/hbitmap.o] Error 1 Signed-off-by: Dmitry Fleytman --- hw/net/e1000e_core.c | 11 +++++++++-- trace-events | 3 ++- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/hw/net/e1000e_core.c b/hw/net/e1000e_core.c index 6a44ea1..4549acb 100644 --- a/hw/net/e1000e_core.c +++ b/hw/net/e1000e_core.c @@ -523,8 +523,15 @@ e1000e_rss_get_hash_type(E1000ECore *core, struct NetRxPkt *pkt) bool ex_dis = core->mac[RFCTL] & E1000_RFCTL_IPV6_EX_DIS; bool new_ex_dis = core->mac[RFCTL] & E1000_RFCTL_NEW_IPV6_EXT_DIS; - trace_e1000e_rx_rss_ip6(core->mac[RFCTL], - ex_dis, new_ex_dis, istcp, + /* + * Following two traces must not be combined because resulting + * event will have 11 arguments totally and some trace backends + * (at least "ust") have limitation of maximum 10 arguments per + * event. Events with more arguments fail to compile for + * backends like these. + */ + trace_e1000e_rx_rss_ip6_rfctl(core->mac[RFCTL]); + trace_e1000e_rx_rss_ip6(ex_dis, new_ex_dis, istcp, ip6info->has_ext_hdrs, ip6info->rss_ex_dst_valid, ip6info->rss_ex_src_valid, diff --git a/trace-events b/trace-events index 68ebac9..c50b870 100644 --- a/trace-events +++ b/trace-events @@ -2064,7 +2064,8 @@ e1000e_rx_rss_started(void) "Starting RSS processing" e1000e_rx_rss_disabled(void) "RSS is disabled" e1000e_rx_rss_type(uint32_t type) "RSS type is %u" e1000e_rx_rss_ip4(bool isfragment, bool istcp, uint32_t mrqc, bool tcpipv4_enabled, bool ipv4_enabled) "RSS IPv4: fragment %d, tcp %d, mrqc 0x%X, tcpipv4 enabled %d, ipv4 enabled %d" -e1000e_rx_rss_ip6(uint32_t rfctl, bool ex_dis, bool new_ex_dis, bool istcp, bool has_ext_headers, bool ex_dst_valid, bool ex_src_valid, uint32_t mrqc, bool tcpipv6_enabled, bool ipv6ex_enabled, bool ipv6_enabled) "RSS IPv6: rfctl 0x%X, ex_dis: %d, new_ex_dis: %d, tcp %d, has_ext_headers %d, ex_dst_valid %d, ex_src_valid %d, mrqc 0x%X, tcpipv6 enabled %d, ipv6ex enabled %d, ipv6 enabled %d" +e1000e_rx_rss_ip6_rfctl(uint32_t rfctl) "RSS IPv6: rfctl 0x%X" +e1000e_rx_rss_ip6(bool ex_dis, bool new_ex_dis, bool istcp, bool has_ext_headers, bool ex_dst_valid, bool ex_src_valid, uint32_t mrqc, bool tcpipv6_enabled, bool ipv6ex_enabled, bool ipv6_enabled) "RSS IPv6: ex_dis: %d, new_ex_dis: %d, tcp %d, has_ext_headers %d, ex_dst_valid %d, ex_src_valid %d, mrqc 0x%X, tcpipv6 enabled %d, ipv6ex enabled %d, ipv6 enabled %d" e1000e_rx_rss_dispatched_to_queue(int queue_idx) "Packet being dispatched to queue %d" e1000e_rx_metadata_protocols(bool isip4, bool isip6, bool isudp, bool istcp) "protocols: ip4: %d, ip6: %d, udp: %d, tcp: %d"