From nobody Sat Nov 23 22:50:49 2024 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=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1731435152; cv=none; d=zohomail.com; s=zohoarc; b=l62nhNXI2KjebdibMR5PlRhSKYborTRxtjH1uTva7l4bf+NA8alfRpqYgwS9GWaPOWX8SXkUSJ+4N0InN/+WKZXD2mnKX0St9MnIKpIkXvWLgtgM7HOW3rqxY+O2rQelXmARbWnR5NqW735qEevaPKbjM43PKQRCx5YcwsWpHac= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1731435152; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=ZQmPPVoGs75Oc0X7p2l9C1PUIeVlzMNRobjeBMri9rg=; b=HwbLx9YZqMcnIdap3z53Fd9NCuTSHeZWUo8iggOzuwzNDQaCT9d7989SozQIgWmHcVwVhogFZZMhOvGDle3zfe6knToFq8TOfh3j++6Z7KAPLMqc2c+mFIv8Twzm0AMWSFxZTEcukBAFsPixqpITSr1lSl3uAW29qIAlTFf2Y6M= 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 1731435152178922.3317189639301; Tue, 12 Nov 2024 10:12:32 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tAvMK-00050w-GH; Tue, 12 Nov 2024 13:11:26 -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 1tAvM7-0004xB-Rj for qemu-devel@nongnu.org; Tue, 12 Nov 2024 13:11:13 -0500 Received: from mail-lf1-x12e.google.com ([2a00:1450:4864:20::12e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tAvM2-0001sj-Sw for qemu-devel@nongnu.org; Tue, 12 Nov 2024 13:11:10 -0500 Received: by mail-lf1-x12e.google.com with SMTP id 2adb3069b0e04-539f72c913aso10478719e87.1 for ; Tue, 12 Nov 2024 10:11:05 -0800 (PST) Received: from localhost.localdomain (cnf78-h01-176-184-27-250.dsl.sta.abo.bbox.fr. [176.184.27.250]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-432aa737c86sm262860325e9.38.2024.11.12.10.10.59 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 12 Nov 2024 10:11:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1731435063; x=1732039863; darn=nongnu.org; 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=ZQmPPVoGs75Oc0X7p2l9C1PUIeVlzMNRobjeBMri9rg=; b=Bkuy9+OPXMZT9cbrByOma1Ovv+5ysola10Jw57nqWV/59MX5oTDfkNHRdn1E+kVNLx FWRsYbOqaMnYaSxYg/athElhWxfT7fvNCdzQqtMyM7WptTXoKHgnxVb9Xno4cJDJ8GQx vLXxkLUsAV0DEz0++rWJnHXteX2V4wvO1In+6Gb/1j9NGwdXU0xFObPd+eHnJ2pSXYKi u1BE7u5oKPCqikc1mHHZNhtAFSszUeeP6jCwMekcaru3/XZC8PP/VQbG6rG1ZJS5uDHU lvo6wSyVx/R3dJBmIsRgEDCOBftewe/Mx5TLntrPwwzb5xeI3rtXsXHKiTMWVWp/puRp 57bw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1731435063; x=1732039863; 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=ZQmPPVoGs75Oc0X7p2l9C1PUIeVlzMNRobjeBMri9rg=; b=KwozNpoEABOsWw6nAupyn0oyZ8gn4Yy77dJJkH2974x6yYWld+aE1+PTPFyahGYRWY l3gDAWXN2ilACgeMnDxJaKSWsVHuHHnC7LtDdH4zazQHwAZEy9MJ5yi5azo4f4/Gzhkq XPnH004/S8zsBoYqeBg94TJETgAPUiiVK49heLIKsg05qw0hQ9z0JVSo5UrPHbBLVSYL VpwFzR4GHpWJHrvSP5dqyqOowdqTjcAuQ+gX5X0GJL9S+Y5hexlbzFe74VNEzYrjubS/ eSyJ2tzJNUUQRsaDXdOGf+KrK2eVXLyFv4fhXrhgBtq5zZ3iCMgzHxYAtL8HgSYaCSAm B3AQ== X-Gm-Message-State: AOJu0Yyk7nb3ysU1f/cuiWCldXwrRLzFq1Dj97NoKcjC/uZB8xd+NVsw az4PKv225XicJ0pnOFvKDBzOAPBotlNxaugCB4FdH19S7X2jEkIdfiuoedJNr2DaRp73RzhcKm8 3 X-Google-Smtp-Source: AGHT+IFZWKbdEW9hPzJFEVzeUgKYL+XJ6A+Y/g4rxQpqBUcX/s3/vMv6nOdTkznz39rzBBl5m4Alig== X-Received: by 2002:a05:6512:1042:b0:539:e60a:6dd0 with SMTP id 2adb3069b0e04-53d862f8170mr8876660e87.51.1731435061922; Tue, 12 Nov 2024 10:11:01 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: "Edgar E. Iglesias" , Richard Henderson , Peter Maydell , Anton Johansson , Jason Wang , qemu-arm@nongnu.org, =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Thomas Huth , Alistair Francis , Paolo Bonzini , Gustavo Romero , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH 02/20] hw/net/xilinx_ethlite: Convert some debug logs to trace events Date: Tue, 12 Nov 2024 19:10:26 +0100 Message-ID: <20241112181044.92193-3-philmd@linaro.org> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20241112181044.92193-1-philmd@linaro.org> References: <20241112181044.92193-1-philmd@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" 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+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::12e; envelope-from=philmd@linaro.org; helo=mail-lf1-x12e.google.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, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable 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 @linaro.org) X-ZM-MESSAGEID: 1731435152951116600 Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Edgar E. Iglesias --- hw/net/xilinx_ethlite.c | 5 +++-- hw/net/trace-events | 4 ++++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/hw/net/xilinx_ethlite.c b/hw/net/xilinx_ethlite.c index e84b4cdd35..bb330a233f 100644 --- a/hw/net/xilinx_ethlite.c +++ b/hw/net/xilinx_ethlite.c @@ -30,6 +30,7 @@ #include "hw/irq.h" #include "hw/qdev-properties.h" #include "net/net.h" +#include "trace.h" =20 #define D(x) #define R_TX_BUF0 0 @@ -198,13 +199,13 @@ static ssize_t eth_rx(NetClientState *nc, const uint8= _t *buf, size_t size) return size; =20 if (s->regs[rxbase + R_RX_CTRL0] & CTRL_S) { - D(qemu_log("ethlite lost packet %x\n", s->regs[R_RX_CTRL0])); + trace_ethlite_pkt_lost(s->regs[R_RX_CTRL0]); return -1; } =20 D(qemu_log("%s %zd rxbase=3D%x\n", __func__, size, rxbase)); if (size > (R_MAX - R_RX_BUF0 - rxbase) * 4) { - D(qemu_log("ethlite packet is too big, size=3D%x\n", size)); + trace_ethlite_pkt_size_too_big(size); return -1; } memcpy(&s->regs[rxbase + R_RX_BUF0], buf, size); diff --git a/hw/net/trace-events b/hw/net/trace-events index d0f1d8c0fb..2b36cd967e 100644 --- a/hw/net/trace-events +++ b/hw/net/trace-events @@ -511,3 +511,7 @@ xen_netdev_connect(int dev, unsigned int tx, unsigned i= nt rx, int port) "vif%u t xen_netdev_frontend_changed(const char *dev, int state) "vif%s state %d" xen_netdev_tx(int dev, int ref, int off, int len, unsigned int flags, cons= t char *c, const char *d, const char *m, const char *e) "vif%u ref %u off %= u len %u flags 0x%x%s%s%s%s" xen_netdev_rx(int dev, int idx, int status, int flags) "vif%u idx %d statu= s %d flags 0x%x" + +# xilinx_ethlite.c +ethlite_pkt_lost(uint32_t rx_ctrl) "rx_ctrl:0x%" PRIx32 +ethlite_pkt_size_too_big(uint64_t size) "size:0x%" PRIx64 --=20 2.45.2