From nobody Fri Dec 19 22:03:00 2025 Delivered-To: importer@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+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1678441424; cv=none; d=zohomail.com; s=zohoarc; b=TNBY50Lw7RgiF1zovFed7eq/zwOE72Yt+HwFeOL8zcknuCSa6bSEWwZxZv+KtA1iJXUBTqOTCBoc7IDpYQjQgPseOXBcFoBQN/5v5gVmwr4WgbPhSoQGJOdW46ikpI+ObUykb9v5kCeKkBGA2dTmqlaxrhMMC2mvyHwDwS7sIIU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1678441424; h=Content-Type: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:To; bh=BJWHCyiybHqubAP9hRuV8tlgsc9B0KlA+MAALiuykj4=; b=LWrVAUkv88QrENpgBTCYRX3CGRKRSL+HBPNCWh4nxu730d7UFyEP3HcKt7ZmyjXJ4c6CeIHBi3YVcvXexLxEVdUuY8tlSj/81p0Qbs+PV818AtN4pFu1l/cLwymLP8a0KMf/dWZckXuxJ24N8aJiWmsEX18QeypEjDTg9k2R1nQ= 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+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1678441424925826.3903953331023; Fri, 10 Mar 2023 01:43:44 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1paZBL-0004vt-Kd; Fri, 10 Mar 2023 04:36:59 -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 1paZBI-0004oW-LF for qemu-devel@nongnu.org; Fri, 10 Mar 2023 04:36:57 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1paZBG-0008Rh-RY for qemu-devel@nongnu.org; Fri, 10 Mar 2023 04:36:56 -0500 Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-270-_u3kYpKZOGGtZ1qjlM37vw-1; Fri, 10 Mar 2023 04:36:52 -0500 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id B671C857A84; Fri, 10 Mar 2023 09:36:51 +0000 (UTC) Received: from localhost.localdomain (ovpn-12-41.pek2.redhat.com [10.72.12.41]) by smtp.corp.redhat.com (Postfix) with ESMTP id CC3CD40C1106; Fri, 10 Mar 2023 09:36:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1678441014; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=BJWHCyiybHqubAP9hRuV8tlgsc9B0KlA+MAALiuykj4=; b=CpmGsQQTfaeO8unc65VQhegThVm4QQvsmkER9P+Bcz2H9SgbTZhr7nb3O2149BK6x3C6Tt lY+/p0sRcnzZPB6VQwQbdO9KWY6+aQObnAZuYP3b93TxSUfu5ClKeOMtDwxh12dkCPNYNu WAfzynUl6+dK5KOMkaDQiq6Udm217Cs= X-MC-Unique: _u3kYpKZOGGtZ1qjlM37vw-1 From: Jason Wang To: qemu-devel@nongnu.org, peter.maydell@linaro.org Cc: Akihiko Odaki , Jason Wang Subject: [PULL V2 30/44] e1000e: Combine rx traces Date: Fri, 10 Mar 2023 17:35:12 +0800 Message-Id: <20230310093526.30828-31-jasowang@redhat.com> In-Reply-To: <20230310093526.30828-1-jasowang@redhat.com> References: <20230310093526.30828-1-jasowang@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.1 on 10.11.54.2 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+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.133.124; envelope-from=jasowang@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1678441426692100003 Content-Type: text/plain; charset="utf-8" From: Akihiko Odaki 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 Signed-off-by: Jason Wang --- 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 76c7814..4fec6df 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 f7257a0..d24ba94 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.7.4