DPDK patches and discussions
 help / color / mirror / Atom feed
From: Maxime Coquelin <maxime.coquelin@redhat.com>
To: Shahaf Shuler <shahafs@mellanox.com>,
	"bernard.iremonger@intel.com" <bernard.iremonger@intel.com>,
	"dev@dpdk.org" <dev@dpdk.org>
Cc: "ailan@redhat.com" <ailan@redhat.com>,
	"jan.scheurich@ericsson.com" <jan.scheurich@ericsson.com>,
	"vkaplans@redhat.com" <vkaplans@redhat.com>,
	"bruce.richardson@intel.com" <bruce.richardson@intel.com>,
	Thomas Monjalon <thomas@monjalon.net>,
	"konstantin.ananyev@intel.com" <konstantin.ananyev@intel.com>,
	"ferruh.yigit@intel.com" <ferruh.yigit@intel.com>,
	Jens Freimann <jfreimann@redhat.com>
Subject: Re: [dpdk-dev] [PATCH v4 1/2] testpmd: add forwarding mode to simulate a noisy neighbour
Date: Fri, 29 Jun 2018 16:23:20 +0200	[thread overview]
Message-ID: <94e0a21b-e071-8ace-f80b-e0e3c3557fb0@redhat.com> (raw)
In-Reply-To: <DB7PR05MB4426256FE2865A0BC4EB361DC3490@DB7PR05MB4426.eurprd05.prod.outlook.com>

Hi Sharaf,

On 06/26/2018 02:17 PM, Shahaf Shuler wrote:
>> +/*
>> + * Forwarding of packets in I/O mode.
>> + * Forward packets "as-is".
>> + * This is the fastest possible forwarding operation, as it does not
>> +access
>> + * to packets data.
>> + */
>> +static void
>> +pkt_burst_noisy_vnf(struct fwd_stream *fs) {
>> +	struct rte_mbuf *pkts_burst[MAX_PKT_BURST];
>> +	uint16_t nb_rx;
>> +	uint16_t nb_tx = 0;
>> +	uint32_t retry;
>> +	const uint64_t freq_khz = rte_get_timer_hz() / 1000;
>> +	struct noisy_config *ncf = &noisy_cfg[fs->tx_queue];
>> +	struct rte_mbuf *tmp_pkts[MAX_PKT_BURST];
>> +	uint16_t nb_enqd;
>> +	uint16_t nb_deqd = 0;
>> +	uint64_t delta_ms;
>> +	uint64_t now;
>> +
>> +	/*
>> +	 * Receive a burst of packets and forward them.
>> +	 */
>> +	nb_rx = rte_eth_rx_burst(fs->rx_port, fs->rx_queue,
>> +			pkts_burst, nb_pkt_per_burst);
>> +	if (unlikely(nb_rx == 0))
>> +		return;
>> +	fs->rx_packets += nb_rx;
>> +
>> +	if (noisy_bsize_before_send > 0) {
>> +		if (rte_ring_free_count(ncf->f) >= nb_rx) {
>> +			/* enqueue into fifo */
>> +			nb_enqd = fifo_put(ncf->f, pkts_burst, nb_rx);
>> +			if (nb_enqd < nb_rx)
>> +				nb_rx = nb_enqd;
> Am not sure I understand this part.
> The simulation of the memory lookups should happen for every packet **before** deciding on the output queue. Isn't it more realistic to simulate the memory access after the rx_burst?
> 

The idea with the series is to simulate the noise caused by other VNFs
running on the same cores (it is not simulating memory accesses on the
burst of packets being handled).

Maxime

  parent reply	other threads:[~2018-06-29 14:23 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-23  8:08 [dpdk-dev] [PATCH v4 0/2] testpmd: simulating noisy host environment Maxime Coquelin
2018-06-23  8:08 ` [dpdk-dev] [PATCH v4 1/2] testpmd: add forwarding mode to simulate a noisy neighbour Maxime Coquelin
2018-06-26 11:09   ` Iremonger, Bernard
2018-06-29 13:38     ` Maxime Coquelin
2018-06-29 14:05       ` Iremonger, Bernard
2018-06-29 14:24         ` Maxime Coquelin
2018-06-29 14:28         ` Thomas Monjalon
2018-06-26 12:17   ` Shahaf Shuler
2018-06-26 13:38     ` Ferruh Yigit
2018-06-27 13:51       ` Shahaf Shuler
2018-06-27 14:09         ` Maxime Coquelin
2018-06-29 14:23     ` Maxime Coquelin [this message]
2018-06-27 11:43   ` Kevin Traynor
2018-06-27 14:12   ` Adrien Mazarguil
2018-06-23  8:08 ` [dpdk-dev] [PATCH v4 2/2] testpmd: update testpmd doc to include noisy forwarding mode Maxime Coquelin
2018-06-26 11:12   ` Iremonger, Bernard

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=94e0a21b-e071-8ace-f80b-e0e3c3557fb0@redhat.com \
    --to=maxime.coquelin@redhat.com \
    --cc=ailan@redhat.com \
    --cc=bernard.iremonger@intel.com \
    --cc=bruce.richardson@intel.com \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@intel.com \
    --cc=jan.scheurich@ericsson.com \
    --cc=jfreimann@redhat.com \
    --cc=konstantin.ananyev@intel.com \
    --cc=shahafs@mellanox.com \
    --cc=thomas@monjalon.net \
    --cc=vkaplans@redhat.com \
    /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).