From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 7B1E4A04B7; Wed, 2 Sep 2020 10:30:31 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id F35511C066; Wed, 2 Sep 2020 10:30:30 +0200 (CEST) Received: from new4-smtp.messagingengine.com (new4-smtp.messagingengine.com [66.111.4.230]) by dpdk.org (Postfix) with ESMTP id 5FB0D4C99 for ; Wed, 2 Sep 2020 10:30:29 +0200 (CEST) Received: from compute7.internal (compute7.nyi.internal [10.202.2.47]) by mailnew.nyi.internal (Postfix) with ESMTP id 9961D5803D8; Wed, 2 Sep 2020 04:30:27 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute7.internal (MEProxy); Wed, 02 Sep 2020 04:30:27 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding:content-type; s=fm2; bh= vk3EmMdHRXL0p6zNpCnD4tC9xioP1JqW9/HUE7Edkyw=; b=My0LnJiaxzMUoHfQ PJeBs3kWWoNf1CUW2F/ICsZ51uyP89tqWFpQnwLwYskkbSRkAJJJUYp2V9AIlgXc 1HwPxL3xCwLeYSScbaLSGUeQkeo26vMM97bJyKpKOJrc79DAep1DqFnI8S0kSlUJ A+Ifu5gRt3fX3HiWlowtNZn3vnRhoqvg/wCOHjUreGYTMRLsUjIIF6l+LJ61FS1Y 3Drnts2F9JeEuaxuq0TC7QJYC4qgOTt/yEHJcfP/zzd2VrW1zZfBHx3sefjY+KoP QaPukgQQK8mSWY4OicWK8D/wiZQWlXAbtC5B2c/scJGR0BpYaie5JZBzq1EibeuH mK5MKQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm3; bh=vk3EmMdHRXL0p6zNpCnD4tC9xioP1JqW9/HUE7Edk yw=; b=VYbu1FxbypuvttfiBO8MP55bnEBW78S90WVQ/Ji3swj3s70KF1o0BJYoF yHoW16s8UvM6YqqS/QJctcxaLxFxzEk/1ed6IV6/xsEvlV8SxDeCCqkGONOw5zLS HRovLg4BMDqmbSv82tNx5jWstloErm9Q0Fiw56kXccZvHObBPcc0f3afEtiNaq/I bw3rRXRFzz/KJLRfw3xOS3u1eo7kVqg+5IEOP7Ojm6IA8xYRc4A6Cf8OJo/LOz8x Zaxy2cZ2blBFtMH4e3IRDXukEk6z6/WsPdCuIM4HdUq6+mWnCih1c/V1eU1kp0nh vnFHGuD5juI9kkaPaPDPdxcH/weOA== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduiedrudefledgtdehucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvufffkfgjfhgggfgtsehtufertddttddvnecuhfhrohhmpefvhhhomhgr shcuofhonhhjrghlohhnuceothhhohhmrghssehmohhnjhgrlhhonhdrnhgvtheqnecugg ftrfgrthhtvghrnhepgffhteelfeeuueeuvddtteeugfevtdeftdeiudfgkeeileeikedu hfdvvdeitddvnecuffhomhgrihhnpehfohhsuggvmhdrohhrghdplhhinhhugihfohhunh gurghtihhonhdrohhrghenucfkphepjeejrddufeegrddvtdefrddukeegnecuvehluhhs thgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepthhhohhmrghssehmoh hnjhgrlhhonhdrnhgvth X-ME-Proxy: Received: from xps.localnet (184.203.134.77.rev.sfr.net [77.134.203.184]) by mail.messagingengine.com (Postfix) with ESMTPA id D8BCC328005E; Wed, 2 Sep 2020 04:30:23 -0400 (EDT) From: Thomas Monjalon To: Henning Schild Cc: Felix Moessbauer , dev@dpdk.org, ktraynor@redhat.com, ali.rizvi@emumba.com, Muhammad Ahmad , david.hunt@intel.com, reshma.pattan@intel.com, konstantin.ananyev@intel.com, bruce.richardson@intel.com, ferruh.yigit@intel.com, jerinj@marvell.com, honnappa.nagarahalli@arm.com, olivier.matz@6wind.com, lijuan.tu@intel.com, Owen Hilyard , Morten =?ISO-8859-1?Q?Br=F8rup?= , viacheslavo@nvidia.com, Stephen Hemminger , anatoly.burakov@intel.com Date: Wed, 02 Sep 2020 10:30:22 +0200 Message-ID: <5248652.g7J0A8DjWB@thomas> In-Reply-To: <20200902095605.4c8e9373@md1za8fc.ad001.siemens.net> References: <20200709092711.14900-3-felix.moessbauer@siemens.com> <7023104.8KzyT1xApx@thomas> <20200902095605.4c8e9373@md1za8fc.ad001.siemens.net> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Subject: Re: [dpdk-dev] [PATCH v4 2/2] Add l2reflect measurement application X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 02/09/2020 09:56, Henning Schild: > Am Tue, 01 Sep 2020 17:07:38 +0200 > schrieb Thomas Monjalon : > > > 28/08/2020 16:22, Henning Schild: > > > Thomas, > > > > > > what is the state on this one? Any more steps to take or people to > > > involve? > > > > I can try adding some key people in Cc list, > > while doing a quick review. > > > > > > > I first showed that in action back in 2016 on FOSDEM. > > > https://archive.fosdem.org/2016/schedule/event/virt_iaas_real_time_cloud/ > > > After my talk two devs from dpdk approached me because they liked > > > the idea of a "network cyclictest". It took us some time to finally > > > go upstream with it, unfortunately i do not recall names. > > > > I think I was one of them. > > > > There will be some talks about latency in the next virtual DPDK event: > > https://events.linuxfoundation.org/dpdk-userspace-summit/program/schedule/ > > (speakers are Cc'ed) > > Thanks, that sure looks like we are not the only ones who are > interested in latency and probably a way to measure it. From other > doing it as well it would be nice to hear how they currently do that. > > > > This application can potentially be integrated into the test-suite > > > for QA, making sure no changes heavily increase the package > > > transmission worst case timing. > > > > Good > > > > > > > Felix Moessbauer wrote: > > > > > > > The l2reflect application implements a ping-pong benchmark to > > > > measure the latency between two instances. For communication, > > > > we use raw ethernet and send one packet at a time. The timing data > > > > is collected locally and min/max/avg values are displayed in a > > > > TUI. Finally, a histogram of the latencies is printed which can be > > > > further processed with the jitterdebugger visualization scripts. > > > > Please can you show an example of script usage? [...] > > > > + * Copyright(c) 2020 Siemens AG > > > > + * > > > > + * authors: > > > > + * Felix Moessbauer > > > > + * Henning Schild > > > > It is uncommon to mention authors in the file. > > In general, git metadata covers this info. > > Any special requirement? > > That application has some history. Written by me and eventually > improved for upstream by Felix. The idea here was to give credit to two > people with just one author field in git. If that is really in the way, > we can drop it and make Felix the sole author. You are both marked as authors thanks to the sign-off: Signed-off-by: Felix Moessbauer Signed-off-by: Henning Schild [...] > > > > +__rte_format_printf(1, 0) > > > > +static void > > > > +trace_write(const char *fmt, ...) > > > > +{ > > > > + va_list ap; > > > > + char buf[256]; > > > > + int n, err; > > > > + > > > > + if (trace_fd == 0) > > > > + trace_fd = > > > > open("/sys/kernel/debug/tracing/trace_marker", > > > > + O_WRONLY); > > > > Why not using rte_trace framework? > > I am not sure where rte_trace ends up eventually. But the idea here is > to have kernel traces when looking at latency peaks. You might just be > looking at an incorrect host tuning when you see a spike i.e. higher > prio threads on your possibly isolated core. > It is not tracing dpdk, but more how it fits in the overall picture. How Linux trace helps more than DPDK one? Because of scheduler context? Anyway this is Linux-specific. [...] > > If I understand well, this requires a special cabling? > > Would it be possible to measure latency of hardware NIC internal > > loopback or software PMD loopback? > > Not sure. We always want to see the full picture ... i.e would also > want to see if a NIC is slow to put a packet on the "wire". > For testing we do use multi-port NICs with cable-loops. The other setup > is Qemus with the application inside and a dpdk-based vhost switch. But > that virtual setup is also not trivial. In fact we usually do make that > switch send the packets over the cable-loop to again cover the whole > way the packets go "in reality". That's why I wonder whether it should be located in DTS. [...] > > > > +cjson = dependency('libcjson', required: false) > > > > Some other parts require jansson: > > jansson = dependency('jansson', required: false) > > How libcjson is different? Would it be possible to unify dependency? > > > > > > +if not is_linux > > > > + build = false > > > > Why limiting to Linux? > > Probably because of the RT stuff (sched param setting, mlock) and the > tracing. I would propose it like that and hope that others might ifdef > when enabling other OSs. Yes that's reasonnable to support only Linux in the first version. > Maintaining low latency requires quite a bit of host tuning. This can > get especially tricky when consuming the whole CPU with polling, you > can starve your OS. The application alone does not do that for you, not > even on Linux. Like cyclictest or jitterdebugger i would see it as a > tool that requires knowledge to measure correctly. And it should > probably be added as such, with an integration into automated tests and > support for other OSs possibly coming in the future. Such integration can be done in DTS. > I hope that others doing dpdk for low latency on preempt-rt will find > it useful as is. They might have been looking for something like it, > possibly have something like it in their test-labs and did not publish > it yet. Thanks for publishing.