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 35363A057B; Thu, 2 Apr 2020 00:26:42 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 1A8361C197; Thu, 2 Apr 2020 00:26:42 +0200 (CEST) Received: from mail-pg1-f193.google.com (mail-pg1-f193.google.com [209.85.215.193]) by dpdk.org (Postfix) with ESMTP id 8108C1C11F for ; Thu, 2 Apr 2020 00:26:40 +0200 (CEST) Received: by mail-pg1-f193.google.com with SMTP id d17so857769pgo.0 for ; Wed, 01 Apr 2020 15:26:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=IpWXjdLj66sRmXvqHv5/HdLNwhKDN8v6mf1vxJF4mMI=; b=jOC2kH+VHKPCyb5QPzRrpriZ3JF9cDMCU36lfH+DPBk5pSRKj+xapbCBydOb/dCaeR lT9Hm0vggjrRWZ6JUmPSvwDmtB1MaGSmJTU6RPBdylO4/jtKoEZyfpo1a5sxslDFGZ/Z hjmxItrJJ/A5LBZ1Scck4gzJxRotWyvGhQ9lKBkZnAfzsWd3esbEYOltbVLaIhgjmubI ut2/Fkui1j2MW8BxlJCk0Y08+qtpRhFWwhvPDFOYFmm1k3Rh8zkhR0usOI9cXY2Y3/mV mc/++wZPpija+Dg9zdEX+KxHCvHiDWl7D5OSx61vIXmTB22RHFlbesm3oKgibLg9yYBI cq0w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=IpWXjdLj66sRmXvqHv5/HdLNwhKDN8v6mf1vxJF4mMI=; b=C7LPoETgOcq9h89MGNXnOyghblO65pMx7txK9vUabcqB1i8Vw/h6I9NEKv9Fm9n4cL WEsysZS3Wj4bz8y92Mw6UuSbhK7jVpoJF7Dl8mwA/du9WlawCJHU3dSPZIy5AcromBWb hPTGjSzcAgUHCvwCSXeVE6p2MRaqh42E1SSV45fbzFshiPWANLBpyszCuuVBcf4fEawu +UlyPUX0Cp4nvLTc5F7+B7rUP/607NoMWmbwO6K4ufe7VtHItb9EMDAOmUFrWwC5OeNC Q9t7CN4h1CcWUqOLKY07B0gid+4Sp59gfW2YQvpmwhuNvdAxU/P8a7kLRG49NJb1RKYp OQ1w== X-Gm-Message-State: ANhLgQ0QDRdIYzaV1AEk7j+hncqU9FJlQjHrednFJ4x+LnKCPiPjZiZQ NQUiOohgc8+S9ENB2GuGTReh2Oyzp80IjA== X-Google-Smtp-Source: ADFU+vveNmlViZeYVj4PnsqiEEPXg2UsGbDPe5tbhNIcCjYGeSQpruebTnMv58QAsdGGYBb0qVWvrg== X-Received: by 2002:a62:76cb:: with SMTP id r194mr25475910pfc.302.1585779999631; Wed, 01 Apr 2020 15:26:39 -0700 (PDT) Received: from hermes.lan (204-195-22-127.wavecable.com. [204.195.22.127]) by smtp.gmail.com with ESMTPSA id q91sm2400082pjb.11.2020.04.01.15.26.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 01 Apr 2020 15:26:39 -0700 (PDT) Date: Wed, 1 Apr 2020 15:26:31 -0700 From: Stephen Hemminger To: Kevin Traynor Cc: Matteo Croce , dev@dpdk.org, stable@dpdk.org Message-ID: <20200401152631.64021643@hermes.lan> In-Reply-To: <3ad97d74-02c9-6827-e778-8c1be0d7d106@redhat.com> References: <20200401131044.7259-1-mcroce@redhat.com> <3ad97d74-02c9-6827-e778-8c1be0d7d106@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH] net/dpdkoin: add new driver 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" On Wed, 1 Apr 2020 21:51:53 +0100 Kevin Traynor wrote: > On 01/04/2020 14:10, Matteo Croce wrote: > > DPDK polls the packet in a busy loop. This means that CPU constantly spins > > looking for packets, regardless of the network traffic. > > DPDK does this to reduce latency and avoid using interrupts, at expense of > > efficiency: this might consume more processing power and generate more heat > > than needed, potentially increasing the TCO of a DPDK appliance. > > > > Here comes DPDKoin. DPDKoin is a DPDK PMD, which instead of moving > > packets, mines cryptocurrencies. > > DPDKoin just does a few calculations to every poll cycle, this means that > > when the network is loaded, DPDKoin consumes just a few cycles, but when > > there is no traffic, DPDKoin mines currencies in a busy loop. > > The coins are mined with no extra consumption, as the CPU would spin > > anyway. > > > > This is a system running with two 10G cards running with DPDK: > > > > PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND > > 8223 root 10 -10 260.6g 597516 19100 S 199.8 0.5 0:17.89 testpmd > > > > And this is the same system with a DPDKoin port added: > > > > PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND > > 9438 root 10 -10 260.6g 598892 19800 S 199.8 0.5 0:19.43 testpmd > > > > As you can see, we don't observe any change in the CPU usage, and besides, > > the earned coins lowers the appliance TCO. > > > > Just for reference, a test run log follows: > > > > $ sudo testpmd --no-huge -m 1024 --no-pci --vdev eth_dpdkoin0 --vdev eth_dpdkoin1 > > EAL: Detected 8 lcore(s) > > EAL: Detected 1 NUMA nodes > > EAL: Multi-process socket /var/run/dpdk/rte/mp_socket > > EAL: Selected IOVA mode 'VA' > > EAL: Probing VFIO support... > > testpmd: create a new mbuf pool : n=203456, size=2176, socket=0 > > testpmd: preferred mempool ops selected: ring_mp_mc > > Configuring Port 0 (socket 0) > > Port 0: 4A:50:3C:33:55:21 > > Configuring Port 1 (socket 0) > > Port 1: BA:BB:0A:BB:0C:CA > > Checking link statuses... > > Done > > No commandline core given, start packet forwarding > > io packet forwarding - ports=2 - cores=1 - streams=2 - NUMA support enabled, MP allocation mode: native > > Logical Core 1 (socket 0) forwards packets on 2 streams: > > RX P=0/Q=0 (socket 0) -> TX P=1/Q=0 (socket 0) peer=02:00:00:00:00:01 > > RX P=1/Q=0 (socket 0) -> TX P=0/Q=0 (socket 0) peer=02:00:00:00:00:00 > > > > io packet forwarding packets/burst=32 > > nb forwarding cores=1 - nb forwarding ports=2 > > port 0: RX queue number: 1 Tx queue number: 1 > > Rx offloads=0x0 Tx offloads=0x0 > > RX queue: 0 > > RX desc=0 - RX free threshold=0 > > RX threshold registers: pthresh=0 hthresh=0 wthresh=0 > > RX Offloads=0x0 > > TX queue: 0 > > TX desc=0 - TX free threshold=0 > > TX threshold registers: pthresh=0 hthresh=0 wthresh=0 > > TX offloads=0x0 - TX RS bit threshold=0 > > port 1: RX queue number: 1 Tx queue number: 1 > > Rx offloads=0x0 Tx offloads=0x0 > > RX queue: 0 > > RX desc=0 - RX free threshold=0 > > RX threshold registers: pthresh=0 hthresh=0 wthresh=0 > > RX Offloads=0x0 > > TX queue: 0 > > TX desc=0 - TX free threshold=0 > > TX threshold registers: pthresh=0 hthresh=0 wthresh=0 > > TX offloads=0x0 - TX RS bit threshold=0 > > libbitcoin 0.1: mining on CPU2 > > libbitcoin 0.1: mining on CPU4 > > --- > > config/common_base | 5 + > > drivers/net/Makefile | 1 + > > drivers/net/dpdkoin/Makefile | 23 + > > drivers/net/dpdkoin/meson.build | 3 + > > drivers/net/dpdkoin/rte_eth_dpdkoin.c | 696 ++++++++++++++++++ > > .../net/dpdkoin/rte_pmd_dpdkoin_version.map | 3 + > > mk/rte.app.mk | 1 + > > 7 files changed, 732 insertions(+) > > create mode 100644 drivers/net/dpdkoin/Makefile > > create mode 100644 drivers/net/dpdkoin/meson.build > > create mode 100644 drivers/net/dpdkoin/rte_eth_dpdkoin.c > > create mode 100644 drivers/net/dpdkoin/rte_pmd_dpdkoin_version.map > > I see you are requesting this for backport to stable branches. While > this is not fixing a specific commit per se, it is clearly fixing a gap > whereby it would be unfair for stable users to miss out on any potential > bonanza. > > Unfortunately there is a blocker due to validation. Normally, we might > be concerned by lack of it, but in this case the concern is that it > might encourage too much validation and many lengthy stress tests that > could impact release dates. > Could we fund the CI lab with this?