DPDK patches and discussions
 help / color / mirror / Atom feed
From: Ferruh Yigit <ferruh.yigit@intel.com>
To: Viacheslav Ovsiienko <viacheslavo@mellanox.com>, dev@dpdk.org
Cc: thomas@monjalon.net, bernard.iremonger@intel.com, stable@dpdk.org
Subject: Re: [dpdk-dev] [dpdk-stable] [PATCH] app/testpmd: fix txonly flow generation entropy
Date: Mon, 10 Feb 2020 14:02:19 +0000	[thread overview]
Message-ID: <15cb05eb-1d32-4d81-320b-36e4e8e76ab5@intel.com> (raw)
In-Reply-To: <1581267759-698-1-git-send-email-viacheslavo@mellanox.com>

On 2/9/2020 5:02 PM, Viacheslav Ovsiienko wrote:
> The testpmd application in txonly forwarding mode has an option
> to generate the packet flows by varying the destination IP address.
> The patch increments the IP for each packet sent, this improves
> the entropy and RSS distibution on the peer receiving size
> is getting more uniform.

The IP address already incremented for each packet sent [1], I can't see what
this patch adds.

[1]
http://lxr.dpdk.org/dpdk/v19.11/source/app/test-pmd/txonly.c#L208


btw, for reference the option mentioned is "--txonly-multi-flow" and it has been
added with:
commit: 82010ef55e7c ("app/testpmd: make txonly mode generate multiple flows")

> 
> Fixes: 82010ef55e7c ("app/testpmd: make txonly mode generate multiple flows")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
> ---
>  app/test-pmd/txonly.c | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/app/test-pmd/txonly.c b/app/test-pmd/txonly.c
> index 4b5bec4..8a1989f 100644
> --- a/app/test-pmd/txonly.c
> +++ b/app/test-pmd/txonly.c
> @@ -153,7 +153,6 @@
>  		const uint16_t vlan_tci_outer, const uint64_t ol_flags)
>  {
>  	struct rte_mbuf *pkt_segs[RTE_MAX_SEGS_PER_PKT];
> -	uint8_t  ip_var = RTE_PER_LCORE(_ip_var);
>  	struct rte_mbuf *pkt_seg;
>  	uint32_t nb_segs, pkt_len;
>  	uint8_t i;
> @@ -193,6 +192,7 @@
>  	copy_buf_to_pkt(&pkt_ip_hdr, sizeof(pkt_ip_hdr), pkt,
>  			sizeof(struct rte_ether_hdr));
>  	if (txonly_multi_flow) {
> +		uint8_t  ip_var = RTE_PER_LCORE(_ip_var);
>  		struct rte_ipv4_hdr *ip_hdr;
>  		uint32_t addr;
>  
> @@ -208,6 +208,7 @@
>  		 */
>  		addr = (tx_ip_dst_addr | (ip_var++ << 8)) + rte_lcore_id();
>  		ip_hdr->src_addr = rte_cpu_to_be_32(addr);
> +		RTE_PER_LCORE(_ip_var) = ip_var;
>  	}
>  	copy_buf_to_pkt(&pkt_udp_hdr, sizeof(pkt_udp_hdr), pkt,
>  			sizeof(struct rte_ether_hdr) +
> @@ -315,7 +316,7 @@
>  	fs->tx_packets += nb_tx;
>  
>  	if (txonly_multi_flow)
> -		RTE_PER_LCORE(_ip_var) += nb_tx;
> +		RTE_PER_LCORE(_ip_var) -= nb_pkt - nb_tx;
>  
>  #ifdef RTE_TEST_PMD_RECORD_BURST_STATS
>  	fs->tx_burst_stats.pkt_burst_spread[nb_tx]++;
> 


  reply	other threads:[~2020-02-10 14:02 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-09 17:02 [dpdk-dev] " Viacheslav Ovsiienko
2020-02-10 14:02 ` Ferruh Yigit [this message]
2020-02-11 19:57   ` [dpdk-dev] [dpdk-stable] " Slava Ovsiienko
2020-02-12  8:59     ` Ferruh Yigit
2020-02-12 17:26 ` Ferruh Yigit

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=15cb05eb-1d32-4d81-320b-36e4e8e76ab5@intel.com \
    --to=ferruh.yigit@intel.com \
    --cc=bernard.iremonger@intel.com \
    --cc=dev@dpdk.org \
    --cc=stable@dpdk.org \
    --cc=thomas@monjalon.net \
    --cc=viacheslavo@mellanox.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).