DPDK usage discussions
 help / color / mirror / Atom feed
From: "Nutman, Richard" <Richard.Nutman@grassvalley.com>
To: "users@dpdk.org" <users@dpdk.org>
Subject: Re: [dpdk-users] rte_eth_tx_burst duplicate packets
Date: Mon, 28 Jan 2019 11:07:41 +0000	[thread overview]
Message-ID: <809831a9f2e2411fa8eac3a69746f57d@DCRIC1EXC05PA.mcp.local> (raw)
In-Reply-To: <CAM-kPquh6ZnHo2iZX75FxV_ixCZCv7Vz2jsyTkH4J2eYtGW9Vw@mail.gmail.com>

It seems you are receiving in bursts of 10, but for sending you only send 1 packet at a time.
Send batches of packets to rte_eth_tx_burst to improve sending efficiency.

> 
> Hi,
> 
> I am just writing my first a traffic generator code.
> The program sends predefined quantity of frames(Ethernet/IP/UDP) in each
> seconds. It use 2 loops 1 for seconds the other for the packets in each
> second.
> 
> for sending I use a while loop
> 
>                 sent=0;
>                 while (sent==0){
>                     sent = rte_eth_tx_burst(eth_id, 0, &pkts, 1);
> 
>                 }
> for reviving
> recv = rte_eth_rx_burst(eth_id, 0, pktr_burst2, 10);
> 
> in the initialization phase I put the packet in the mbuf. In the UDP data filed is
> a counter which increasing in every second(with this I would like to identify
> the possible packet drops er sec bases)
> 
> with lower load the program works fine but close to 100% of performance
> 
> Forward frames sent: 8000000
> Forward frames received: 8000336
> Reverse frames sent: 8000000
> Reverse frames received: 7990793
> 
> 
> 
> Results  in 1 sec sent 800000  recvd  799972 and difference -28 Results  in 2 sec
> sent 800000  recvd  799888 and difference -112 Results  in 3 sec sent 800000
> recvd  800000 and difference 0 Results  in 4 sec sent 800000  recvd  800000
> and difference 0 Results  in 5 sec sent 800000  recvd  800000 and difference 0
> Results  in 6 sec sent 800000  recvd  800000 and difference 0 Results  in 7 sec
> sent 800000  recvd  800120 and difference 120 Results  in 8 sec sent 800000
> recvd  799880 and difference -120 Results  in 9 sec sent 800000  recvd  800000
> and difference 0 Results  in 10 sec sent 800000  recvd  800476 and difference
> 476
> 
> It received more packets than sent.
> 
> Are there any solution to fix this issue?
> 
> 
> Many Thanks,
> 
> Peter


**********************************************************************
DISCLAIMER:
Privileged and/or Confidential information may be contained in this message. If you are not the addressee of this message, you may not copy, use or deliver this message to anyone. In such event, you should destroy the message and kindly notify the sender by reply e-mail. It is understood that opinions or conclusions that do not relate to the official business of the company are neither given nor endorsed by the company. Thank You.

  reply	other threads:[~2019-01-28 11:07 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-23  7:16 Peter Balint
2019-01-28 11:07 ` Nutman, Richard [this message]
2019-01-28 19:16 ` Pierre Laurent

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=809831a9f2e2411fa8eac3a69746f57d@DCRIC1EXC05PA.mcp.local \
    --to=richard.nutman@grassvalley.com \
    --cc=users@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).