From patchwork Mon Jan 14 00:02:33 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Samuel Thibault X-Patchwork-Id: 10761463 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 646F1746 for ; Mon, 14 Jan 2019 00:12:54 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3EFE9288D0 for ; Mon, 14 Jan 2019 00:12:54 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1B9C1288D4; Mon, 14 Jan 2019 00:12:54 +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=-2.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id AF779288D0 for ; Mon, 14 Jan 2019 00:12:53 +0000 (UTC) Received: from localhost ([127.0.0.1]:39183 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gips4-00081z-3I for patchwork-qemu-devel@patchwork.kernel.org; Sun, 13 Jan 2019 19:12:52 -0500 Received: from eggs.gnu.org ([209.51.188.92]:51160) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gipk5-0002xS-6W for qemu-devel@nongnu.org; Sun, 13 Jan 2019 19:04:40 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gipk3-0006NB-18 for qemu-devel@nongnu.org; Sun, 13 Jan 2019 19:04:37 -0500 Received: from hera.aquilenet.fr ([2a0c:e300::1]:57256) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gipk2-0006Jw-Jh for qemu-devel@nongnu.org; Sun, 13 Jan 2019 19:04:34 -0500 Received: from localhost (localhost [127.0.0.1]) by hera.aquilenet.fr (Postfix) with ESMTP id 36D811B75; Mon, 14 Jan 2019 01:04:18 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at aquilenet.fr Received: from hera.aquilenet.fr ([127.0.0.1]) by localhost (hera.aquilenet.fr [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id aTaeutIrdInX; Mon, 14 Jan 2019 01:04:17 +0100 (CET) Received: from function.home (lfbn-1-11161-124.w86-213.abo.wanadoo.fr [86.213.235.124]) by hera.aquilenet.fr (Postfix) with ESMTPSA id A9E2E1B98; Mon, 14 Jan 2019 01:04:07 +0100 (CET) Received: from samy by function.home with local (Exim 4.92-RC4) (envelope-from ) id 1gipjZ-0007nX-0O; Mon, 14 Jan 2019 01:04:05 +0100 From: Samuel Thibault To: qemu-devel@nongnu.org Date: Mon, 14 Jan 2019 01:02:33 +0100 Message-Id: <20190114000326.29847-13-samuel.thibault@ens-lyon.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190114000326.29847-1-samuel.thibault@ens-lyon.org> References: <20190114000326.29847-1-samuel.thibault@ens-lyon.org> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a0c:e300::1 Subject: [Qemu-devel] [PULL 12/65] slirp: add tftp tracing 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: jan.kiszka@siemens.com, Gerd Hoffmann , stefanha@redhat.com, Samuel Thibault , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP From: Gerd Hoffmann Useful when debugging pxeboot, to see what the guest tries to do. Signed-off-by: Gerd Hoffmann Reviewed-by: Liam Merwick Reviewed-by: Philippe Mathieu-Daudé Tested-by: Philippe Mathieu-Daudé Signed-off-by: Samuel Thibault --- Makefile.objs | 1 + slirp/tftp.c | 3 +++ slirp/trace-events | 5 +++++ 3 files changed, 9 insertions(+) create mode 100644 slirp/trace-events diff --git a/Makefile.objs b/Makefile.objs index 456115992a..2121120492 100644 --- a/Makefile.objs +++ b/Makefile.objs @@ -193,6 +193,7 @@ trace-events-subdirs += net trace-events-subdirs += qapi trace-events-subdirs += qom trace-events-subdirs += scsi +trace-events-subdirs += slirp trace-events-subdirs += target/arm trace-events-subdirs += target/i386 trace-events-subdirs += target/mips diff --git a/slirp/tftp.c b/slirp/tftp.c index a9bc4bb1b6..735b57aa55 100644 --- a/slirp/tftp.c +++ b/slirp/tftp.c @@ -26,6 +26,7 @@ #include "slirp.h" #include "qemu-common.h" #include "qemu/cutils.h" +#include "trace.h" static inline int tftp_session_in_use(struct tftp_session *spt) { @@ -204,6 +205,7 @@ static void tftp_send_error(struct tftp_session *spt, struct mbuf *m; struct tftp_t *tp; + trace_slirp_tftp_error(msg); m = m_get(spt->slirp); if (!m) { @@ -323,6 +325,7 @@ static void tftp_handle_rrq(Slirp *slirp, struct sockaddr_storage *srcsas, break; } } + trace_slirp_tftp_rrq(req_fname); /* check mode */ if ((pktlen - k) < 6) { diff --git a/slirp/trace-events b/slirp/trace-events new file mode 100644 index 0000000000..ff8f656e8c --- /dev/null +++ b/slirp/trace-events @@ -0,0 +1,5 @@ +# See docs/devel/tracing.txt for syntax documentation. + +# slirp/tftp.c +slirp_tftp_rrq(const char *file) "file: %s" +slirp_tftp_error(const char *file) "msg: %s"