DPDK patches and discussions
 help / color / mirror / Atom feed
From: Ferruh Yigit <ferruh.yigit@intel.com>
To: Matteo Croce <mcroce@redhat.com>, dev@dpdk.org
Cc: stable@dpdk.org
Subject: Re: [dpdk-dev] [PATCH] net/dpdkoin: add new driver
Date: Wed, 1 Apr 2020 14:33:35 +0100	[thread overview]
Message-ID: <76858e65-545f-cedc-0094-cc0f4a56aa59@intel.com> (raw)
In-Reply-To: <20200401131044.7259-1-mcroce@redhat.com>

On 4/1/2020 2:10 PM, 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.

:)

<...>

> +	/* finally assign rx and tx ops */
> +	if (packet_copy) {
> +		eth_dev->rx_pkt_burst = eth_dpdkoin_copy_rx;
> +		eth_dev->tx_pkt_burst = eth_dpdkoin_copy_tx;
> +	} else {
> +		eth_dev->rx_pkt_burst = eth_dpdkoin_rx;
> +		eth_dev->tx_pkt_burst = eth_dpdkoin_tx;
> +	}

This is the biggest give away, but still good job :)

  reply	other threads:[~2020-04-01 13:33 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-01 13:10 Matteo Croce
2020-04-01 13:33 ` Ferruh Yigit [this message]
2020-04-01 18:40 ` Aaron Conole
2020-04-01 20:51 ` Kevin Traynor
2020-04-01 22:26   ` Stephen Hemminger

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=76858e65-545f-cedc-0094-cc0f4a56aa59@intel.com \
    --to=ferruh.yigit@intel.com \
    --cc=dev@dpdk.org \
    --cc=mcroce@redhat.com \
    --cc=stable@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).