From nobody Mon Sep 16 19:25:56 2024 Delivered-To: importer2@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer2=patchew.org@nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1675222846; cv=none; d=zohomail.com; s=zohoarc; b=J1RYxTVqYUGKbFU8T8dHpDdeG/ETZivEEX5jHM7vdMKHKC2exF0xk6UFAoibhU04+m3SEu5Uqr8+6ywkvNdI4fmqlrDcwNCo6s7Pk9gkIJGbZ73ZdSDyyXGFVftgOVlmTjt8df14byha6+4ow/OLX4zHxmi6Y7yLma82b2APi2c= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1675222846; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject; bh=jC2oma+4dx0vXgHNVPLx5yQddrN4Crk9daChNzOuQT8=; b=mBn6aocdl/0qkoPEm/wxYqznqJyfF6dAba9EmUAhZQ7DNEBT7SoowlWmxaNvXLJMc/OhsRQwWEKTOdDGSOTibQsve/60eh8SRqqLn/KSoEXw5cRktg4bS79WRU2M4pFozU3froPiw+hzviSHvTarKsHEiH0qMfc2sAXQCORflo0= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer2=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1675222846607917.3484018675321; Tue, 31 Jan 2023 19:40:46 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pN3w3-0001Ac-Mn; Tue, 31 Jan 2023 22:37:23 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pN3w1-0000vf-QA for qemu-devel@nongnu.org; Tue, 31 Jan 2023 22:37:21 -0500 Received: from mail-pl1-x631.google.com ([2607:f8b0:4864:20::631]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pN3w0-0000fb-11 for qemu-devel@nongnu.org; Tue, 31 Jan 2023 22:37:21 -0500 Received: by mail-pl1-x631.google.com with SMTP id z1so9643068plg.6 for ; Tue, 31 Jan 2023 19:37:19 -0800 (PST) Received: from alarm.flets-east.jp ([2400:4050:a840:1e00:4457:c267:5e09:481b]) by smtp.gmail.com with ESMTPSA id x15-20020a170902ec8f00b001968b529c98sm4185557plg.128.2023.01.31.19.37.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 31 Jan 2023 19:37:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=daynix-com.20210112.gappssmtp.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=jC2oma+4dx0vXgHNVPLx5yQddrN4Crk9daChNzOuQT8=; b=V4RPtpSqaO8XQG+pvyCSUwWDFuapm3YN1iDb5ARbPGChK+TmJdt81sug0pKLElKsxn AnK2zGLfSRnS+V67Q0IpXk4FHLvmcwR63EYsayg1dV9Sz9ZHtDdpz713ZWDCsv/N/wQy p2+vFayhbujVdr7h/zZvLsQc46clkVa08bb1nQePx1dwGDsYMBdlTycKtUO7xgouSm67 g88iC6gPPr0fPBYXDFtlPOVisJqsdN7aRnis0A3rbh+vQ5/Bwol3admbP/r7ShJS4izU 0v5EJXIa4J3BkqQmekHXM+Ou3Usboznoq6POBiViVgLickAMxgGc2UkDktZkAyvkFKLC qz6A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=jC2oma+4dx0vXgHNVPLx5yQddrN4Crk9daChNzOuQT8=; b=0V4OAPBEorv6mbQfXjzf0+xJfeAhkimnpu4t106V2JO/zi3PRUryAjV76cx9dYpGXZ EhjUwoIZbsenibilc1MTMlmq+Y4r6h4Irlmd5J0VN8KCxIcOzVp3807uVciVMVFK3w22 Qun7mfMRxXssAKGFIg/8WuozGOQI3SpWE6fgwf19f8YKP1l5KY3fdAWEzgbqiKpRA3T9 Yn80ImVnDcF8e0LHokyMKIYqopNEoYWiQuzueLWYL9TODUIgsyTmP1pziW+1VS7yZbfO I0RRbm8VNUiJQSSqsQlMlZdC+iW6/H2BjzNFYW+RY6M8/ADHVXZOqaGfjyUCoYjBXXOX opWQ== X-Gm-Message-State: AO0yUKWwAkRogUe4gtORslPEQS6KFlYREQr3RTPPjhjIdDLGCAuKux3h lh+ahEhXdWpAfO4AsH/fb7KbZw== X-Google-Smtp-Source: AK7set+gpw1My7NE1FRoICA2UUFjnjqR0gT4L3UsklFrHhGOAcoYcXjQG43RZiYmPMv94rqVhcG1dA== X-Received: by 2002:a05:6a20:a581:b0:bb:ccef:f896 with SMTP id bc1-20020a056a20a58100b000bbcceff896mr1074887pzb.12.1675222638704; Tue, 31 Jan 2023 19:37:18 -0800 (PST) From: Akihiko Odaki To: Cc: Jason Wang , Dmitry Fleytman , Thomas Huth , Laurent Vivier , Paolo Bonzini , qemu-devel@nongnu.org, qemu-ppc@nongnu.org, "Michael S . Tsirkin" , Yan Vugenfirer , Yuri Benditovich , Sriram Yagnaraman , Alexander Bulekov , Akihiko Odaki Subject: [PATCH v5 29/29] e1000e: Combine rx traces Date: Wed, 1 Feb 2023 12:35:39 +0900 Message-Id: <20230201033539.30049-30-akihiko.odaki@daynix.com> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230201033539.30049-1-akihiko.odaki@daynix.com> References: <20230201033539.30049-1-akihiko.odaki@daynix.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer2=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: none client-ip=2607:f8b0:4864:20::631; envelope-from=akihiko.odaki@daynix.com; helo=mail-pl1-x631.google.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_NONE=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer2=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer2=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @daynix-com.20210112.gappssmtp.com) X-ZM-MESSAGEID: 1675222847192100001 Content-Type: text/plain; charset="utf-8" Whether a packet will be written back to the guest depends on the remaining space of the queue. Therefore, e1000e_rx_written_to_guest and e1000e_rx_not_written_to_guest should log the index of the queue instead of generated interrupts. This also removes the need of e1000e_rx_rss_dispatched_to_queue, which logs the queue index. Signed-off-by: Akihiko Odaki Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- hw/net/e1000e_core.c | 6 ++---- hw/net/trace-events | 5 ++--- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/hw/net/e1000e_core.c b/hw/net/e1000e_core.c index 76c7814cb8..4fec6dfe7e 100644 --- a/hw/net/e1000e_core.c +++ b/hw/net/e1000e_core.c @@ -1759,8 +1759,6 @@ e1000e_receive_internal(E1000ECore *core, const struc= t iovec *iov, int iovcnt, e1000e_rss_parse_packet(core, core->rx_pkt, &rss_info); e1000e_rx_ring_init(core, &rxr, rss_info.queue); =20 - trace_e1000e_rx_rss_dispatched_to_queue(rxr.i->idx); - total_size =3D net_rx_pkt_get_total_len(core->rx_pkt) + e1000x_fcs_len(core->mac); =20 @@ -1786,12 +1784,12 @@ e1000e_receive_internal(E1000ECore *core, const str= uct iovec *iov, int iovcnt, rdmts_hit =3D e1000e_rx_descr_threshold_hit(core, rxr.i); n |=3D e1000e_rx_wb_interrupt_cause(core, rxr.i->idx, rdmts_hit); =20 - trace_e1000e_rx_written_to_guest(n); + trace_e1000e_rx_written_to_guest(rxr.i->idx); } else { n |=3D E1000_ICS_RXO; retval =3D 0; =20 - trace_e1000e_rx_not_written_to_guest(n); + trace_e1000e_rx_not_written_to_guest(rxr.i->idx); } =20 if (!e1000e_intrmgr_delay_rx_causes(core, &n)) { diff --git a/hw/net/trace-events b/hw/net/trace-events index f7257a0693..d24ba945dc 100644 --- a/hw/net/trace-events +++ b/hw/net/trace-events @@ -165,8 +165,8 @@ e1000e_rx_descr(int ridx, uint64_t base, uint8_t len) "= Next RX descriptor: ring e1000e_rx_set_rctl(uint32_t rctl) "RCTL =3D 0x%x" e1000e_rx_receive_iov(int iovcnt) "Received vector of %d fragments" e1000e_rx_flt_dropped(void) "Received packet dropped by RX filter" -e1000e_rx_written_to_guest(uint32_t causes) "Received packet written to gu= est (ICR causes %u)" -e1000e_rx_not_written_to_guest(uint32_t causes) "Received packet NOT writt= en to guest (ICR causes %u)" +e1000e_rx_written_to_guest(int queue_idx) "Received packet written to gues= t (queue %d)" +e1000e_rx_not_written_to_guest(int queue_idx) "Received packet NOT written= to guest (queue %d)" e1000e_rx_interrupt_set(uint32_t causes) "Receive interrupt set (ICR cause= s %u)" e1000e_rx_interrupt_delayed(uint32_t causes) "Receive interrupt delayed (I= CR causes %u)" e1000e_rx_set_cso(int cso_state) "RX CSO state set to %d" @@ -180,7 +180,6 @@ 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, tcp= ipv4 enabled %d, ipv4 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_h= eaders, bool ex_dst_valid, bool ex_src_valid, uint32_t mrqc, bool tcpipv6_e= nabled, 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, m= rqc 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" =20 e1000e_rx_metadata_protocols(bool isip4, bool isip6, bool isudp, bool istc= p) "protocols: ip4: %d, ip6: %d, udp: %d, tcp: %d" e1000e_rx_metadata_vlan(uint16_t vlan_tag) "VLAN tag is 0x%X" --=20 2.39.1