DPDK patches and discussions
 help / color / mirror / Atom feed
From: Thomas Monjalon <thomas@monjalon.net>
To: Louise Kilheeney <louise.kilheeney@intel.com>
Cc: dev@dpdk.org, stable@dpdk.org
Subject: Re: [dpdk-dev] [dpdk-stable] [PATCH] examples/l2fwd-keepalive: fix packet drops limited mbufs
Date: Sun, 26 Apr 2020 23:12:20 +0200	[thread overview]
Message-ID: <2525651.hTDNKPQEx9@thomas> (raw)
In-Reply-To: <20200311120456.36510-1-louise.kilheeney@intel.com>

11/03/2020 13:04, Louise Kilheeney:
> MBUF pool of size 8192 was causing packet loss when using four ports. To
> fix this issue this patch specifies the number of MBUF's per port
> instead of having one set MBUF pool size, this way it will adapt to any
> number of ports.
> 
> Fixes: e64833f2273a ("examples/l2fwd-keepalive: add sample application")
> 
> Cc: stable@dpdk.org

No blank line between Fixes and Cc lines please.

> 
> Signed-off-by: Louise Kilheeney <louise.kilheeney@intel.com>
> ---
>  examples/l2fwd-keepalive/main.c | 17 ++++++++++-------
>  1 file changed, 10 insertions(+), 7 deletions(-)
> 
> diff --git a/examples/l2fwd-keepalive/main.c b/examples/l2fwd-keepalive/main.c
> index b36834974..0f0010d51 100644
> --- a/examples/l2fwd-keepalive/main.c
> +++ b/examples/l2fwd-keepalive/main.c
>  	nb_ports = rte_eth_dev_count_avail();
>  	if (nb_ports == 0)
>  		rte_exit(EXIT_FAILURE, "No Ethernet ports - bye\n");
>  
> +	/* create the mbuf pool */
> +	unsigned int total_nb_mbufs = NB_MBUF_PER_PORT * nb_ports;

Please avoid declaring a variable in the middle of a function.
This code style is too much modern for DPDK ;-)
It could break on a random compiler.




  parent reply	other threads:[~2020-04-26 21:12 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-11 12:04 [dpdk-dev] " Louise Kilheeney
2020-03-13  3:07 ` [dpdk-dev] [dpdk-stable] " Jiang, MaoX
2020-04-26 21:13   ` Thomas Monjalon
2020-04-26 21:12 ` Thomas Monjalon [this message]
2020-04-27  1:38 ` Jiang, MaoX
2020-04-27 14:57 ` [dpdk-dev] [PATCH v2] " Louise Kilheeney
2020-04-29  2:29   ` Xie, WeiX
2020-05-11 16:16   ` [dpdk-dev] [dpdk-stable] " Thomas Monjalon

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=2525651.hTDNKPQEx9@thomas \
    --to=thomas@monjalon.net \
    --cc=dev@dpdk.org \
    --cc=louise.kilheeney@intel.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).