From patchwork Tue Dec 31 20:22:10 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 854414 Delivered-To: patch@linaro.org Received: by 2002:a5d:4888:0:b0:385:e875:8a9e with SMTP id g8csp7089809wrq; Tue, 31 Dec 2024 12:24:47 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCUVBv/nBDRv4qO7Eu6RlyuJTkXO9TayHShxzfIJ5uUzAfLhtBk0SYm6+BVsyImZ/0+QTHgrRQ==@linaro.org X-Google-Smtp-Source: AGHT+IHRWS6fqziEoBLzPxDekKwbYXbj41+auKaP/fvHdCKllojJ3Tk0GY2YVH+1tgWubTEA+S3h X-Received: by 2002:a05:620a:4113:b0:7b6:f1be:4f7e with SMTP id af79cd13be357-7b9ba79d383mr6048056085a.26.1735676686975; Tue, 31 Dec 2024 12:24:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1735676686; cv=none; d=google.com; s=arc-20240605; b=C3RTXsDmvYTcO6+izuWro2vR416hE1PuGmZLxos6tq5TzqWgueBUlfV8BzNjXXaslR FSPztroKd54Uyd+nSf1/rYdlMw5ji8x6yF6LzSVBFgKxRIW4PRycrixomRicNrYVHjFP si0yundJn9MBqy+JbJFij5IOk5VkiDbXm3qoMf4brvTYp8chOHeuP2Gl0i+SfjdEWwbe qYzW8VQzZSzfyOWVL39UvMHCueDpYlT0+KW9DIs/0M04IQ6+JxiVXw0JKCgeD82CeTBm 3rqLFSPCmFCVfx7sdKmh6VEpS6m7vZn6rfm0GrgKTetCVP1BLAVAY6ZwZk438O568dsq vOaw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=zAtQI+p6Q7jzylh2/ogAG38eWfi5o3sJewecVz2TXgE=; fh=lA8KdGRRCLcXxei5dR52XWsTSutqQE1F1yBegzCCPPE=; b=iC2wH9ultU4WVOrdR+uTVcg6T7CGC7aKuZbzXsYVuEsL5mQTqbh9q2y3PwClYxb41f aYAFBXJDZXErxdGpRNxLtrL2X14jz7kMe3VF1EnKfta0yl2f8IMY93EOB/7TgY6TVyyx x2IDKwUdH/OwkwQPCcPBLyp67Rh4NVnDSKWw1HgOlJklEwe6LXXskl7lr8gOhx36Zw9k nvr3hqaFtV50MziHONK7oEbafvnu50neOr+tBO8utY5cIy+H+G/ofZ6OlQhFayJR3PWC FR/gtb8GHwPUfzw8iinHzwGMEYeU6O6w0SEHnpMR09jA3+92mivIrUFT+ur9vGdaiHd4 oGmA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=lksDLVO8; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id af79cd13be357-7b9ac53e593si3141260385a.639.2024.12.31.12.24.46 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 31 Dec 2024 12:24:46 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=lksDLVO8; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tSim0-0003Dm-PS; Tue, 31 Dec 2024 15:23:28 -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 1tSilz-00038R-AF for qemu-devel@nongnu.org; Tue, 31 Dec 2024 15:23:27 -0500 Received: from mail-wm1-x32f.google.com ([2a00:1450:4864:20::32f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tSilx-0000s1-OB for qemu-devel@nongnu.org; Tue, 31 Dec 2024 15:23:27 -0500 Received: by mail-wm1-x32f.google.com with SMTP id 5b1f17b1804b1-4361f65ca01so102676625e9.1 for ; Tue, 31 Dec 2024 12:23:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1735676604; x=1736281404; 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=zAtQI+p6Q7jzylh2/ogAG38eWfi5o3sJewecVz2TXgE=; b=lksDLVO8MMT2zdTou2LfD8DJx//bj3uL0V/ljn3CPhGdNd9ZEYsY7blc9bMKehGHoQ s1K/9KWiRmX2QWvT0kF8AZqTCLZ09JJzfrPz28FwrLDX0/wDyasfUjd2pMEuROKW0Uli MS87MDAaBF32jVdo2FZ/8LH0YMcShfzboPhV+hKFPQZ4Y6A1387F4DAmxktp0dMgdBt/ FZeVi3V93rJiNY7h0js7rkuI9G35pXcN3oOxOQYAlkl/EApXiNi03aAVAt9XADX2UMZf 2nY4Ds0S+kYlL11Xo17hJf2Gdv957u6T8legACLjtANcQMrcNf+kN0i1zI5/TzWVum4u y9YQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1735676604; x=1736281404; 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=zAtQI+p6Q7jzylh2/ogAG38eWfi5o3sJewecVz2TXgE=; b=O5lQKUeRITCIA95g2nAWv/HT7wFr9S9WX9ArrR0fm01Cq0i/4hKAsbZXIF/mHeNcOL ciV8lzXSy94TDcRkd3dlbA1UPNLm2lUeDfqUzqWMHr83F27RubzbRzfkxCoFlWNSAvg8 Dc2NNbNeRcxhMG57gDeamhbjnoifw8vUcOilgLxJ+/CzY3oKdxAqxSso96S3/vyVX87K sfHwfjKd5wR6X3NfE53xEO9iyiAiAyGZ/RSBHKyoosu/EUgXgqBhRXj5E6C1k+Hpxak9 bbauPantMvx3fmZ5lAJp5truAtm+PjiDIdXovk7Ob57QRm51yWiBxAufQCu/3L8bZ4Ov pLFw== X-Gm-Message-State: AOJu0YyObfitvyTnvza/gN+rLK1HO/i/iTwCAb5ICyx75qPNQyk5TeHE i4vI6jpq1a4pHPxfukqIWBQpqWTlZGQQkFr1F/Us4+N1BQb2t1mtesjd/8XO19fiGFst8lxmTiC 1UnA= X-Gm-Gg: ASbGnctF6uio+mf4lwE42TJ4Y0qY2xsuPdjMJ6DDFSIRRqYDwqT7cvmUGhLsbInaG+L A5fQsWZc7N+eUsWQD3KjqC5L3y434qsmf33g5rRu3yybwqxEJ4ZI4iWHcLFmsX2xTim1RQlI/ZI wEIhomt81GMb5JRqs1yAlkaDWnVOsWwtLe2E8Je3EKOjKySJIR6ZEK9HQlJkVgRL4Qas1lIDbNN DVD8pOIi0rM1FTpglw/+Tu+1CxlmQYGLwUJAk+WH3wZ8nh0xOr4dm6BJ6ufYn2Yb1fF2WRVuSu+ QK4NPcFuBgRQBfCtzHhK1WbATHbtS64= X-Received: by 2002:a05:600c:4fd3:b0:436:5165:f1ec with SMTP id 5b1f17b1804b1-43668b769f8mr360121505e9.30.1735676603868; Tue, 31 Dec 2024 12:23:23 -0800 (PST) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-43656a0b361sm431655555e9.0.2024.12.31.12.23.23 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 31 Dec 2024 12:23:23 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , "Edgar E. Iglesias" Subject: [PULL 11/29] hw/net/xilinx_ethlite: Convert some debug logs to trace events Date: Tue, 31 Dec 2024 21:22:10 +0100 Message-ID: <20241231202228.28819-12-philmd@linaro.org> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20241231202228.28819-1-philmd@linaro.org> References: <20241231202228.28819-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32f; envelope-from=philmd@linaro.org; helo=mail-wm1-x32f.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=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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Edgar E. Iglesias Message-Id: <20241112181044.92193-3-philmd@linaro.org> --- 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 f3eb2af1934..c38a71c71be 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" #define D(x) #define R_TX_BUF0 0 @@ -194,13 +195,13 @@ static ssize_t eth_rx(NetClientState *nc, const uint8_t *buf, size_t size) return size; 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; } D(qemu_log("%s %zd rxbase=%x\n", __func__, size, rxbase)); if (size > (R_MAX - R_RX_BUF0 - rxbase) * 4) { - D(qemu_log("ethlite packet is too big, size=%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 6100ec324a7..c35bfb2eb8d 100644 --- a/hw/net/trace-events +++ b/hw/net/trace-events @@ -513,3 +513,7 @@ xen_netdev_connect(int dev, unsigned int tx, unsigned int 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, const 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 status %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