From: Robert Sanford <rsanford2@gmail.com>
To: dev@dpdk.org
Cc: declan.doherty@intel.com, pablo.de.lara.guarch@intel.com,
olivier.matz@6wind.com
Subject: [dpdk-dev] [PATCH 0/4] net/bonding: bonding and LACP fixes
Date: Mon, 1 Aug 2016 16:42:52 -0400 [thread overview]
Message-ID: <1470084176-79932-1-git-send-email-rsanford@akamai.com> (raw)
In this patch series, we fix two bonding driver bugs and
enhance testpmd so that bonding mode 4 (LACP) ports remain
operational even when idle.
1. Problem: testpmd does not call bonding mode 4 (LACP) ports' tx
burst function at least every 100 ms, as mandated.
Solution: Enhance testpmd's packet forwarding loop to infrequently
invoke the tx burst API for bonding ports in mode 4, to transmit
LACPDUs to the partner in a timely manner.
2. Problem: Bonding driver (item 3 below) needs to know how many
objects may become cached in a memory pool. Solution: Rename
macros that calculate a mempool cache flush threshold, and move
them from rte_mempool.c to rte_mempool.h.
3. Problem: With little or no tx traffic, LACP tx machine may run out
of mbufs. Solution: When calculating the minimum number of mbufs
required in a bonding mode 4 slave's private (tx LACPDU) pool,
include the maximum number of mbufs that may be cached in the
pool's per-core caches.
4. Problem: When configuring a bonding device, we don't properly
propagate most of the settings from the master to the slaves.
Solution: Fix slave_configure() to correctly pass configuration
data to rte_eth_dev_configure() on behalf of the slaves.
Notes for configuring and running testpmd: We specify four ethernet
devices in the arguments, because testpmd expects an even number.
We configure two devices to be slaves under one bonded device, one
device to be the other side of the forwarding bridge, and we ignore
the fourth eth dev.
+-------------+ +-------+ +--------+
|client A |<==>|DPDK | | |
|bonded device| |testpmd|<===>|client B|
|with 2 slaves|<==>| | | |
+-------------+ +-------+ +--------+
To reproduce the out of buffers problem (#3), apply patch 1/4, run
testpmd (with example args and commands shown below), and run ping
from client A, like this: "ping -i18 -c10 clientB". After about five
minutes, one of the slaves will run out of LACPDU mbufs.
Example testpmd args:
./testpmd -c 0x00000555 -n 2 \
--log-level 7 \
--pci-whitelist "01:00.0" \
--pci-whitelist "01:00.1" \
--pci-whitelist "05:00.0" \
--pci-whitelist "84:00.0" \
--master-lcore 0 -- \
--interactive --portmask=0xf --numa --socket-num=0 --auto-start \
--coremask=0x00000554 --rxd=512 --txd=256 \
--burst=32 --mbcache=64 \
--nb-cores=2 --rxq=1 --txq=1
Example testpmd commands to reconfigure into bonding mode 4:
stop
port stop all
create bonded device 4 0
add bonding slave 2 4
add bonding slave 3 4
port start 0
port start 1
port start 4
set portlist 4,0
start
Robert Sanford (4):
testpmd: fix LACP ports to work with idle links
mempool: make cache flush threshold macro public
net/bonding: another fix to LACP mempool size
net/bonding: fix configuration of LACP slaves
app/test-pmd/cmdline.c | 9 +++++++
app/test-pmd/testpmd.c | 37 +++++++++++++++++++++++++++++
app/test-pmd/testpmd.h | 4 +++
drivers/net/bonding/rte_eth_bond_8023ad.c | 10 +++++--
drivers/net/bonding/rte_eth_bond_pmd.c | 28 +++++----------------
lib/librte_mempool/rte_mempool.c | 8 +----
lib/librte_mempool/rte_mempool.h | 7 +++++
7 files changed, 73 insertions(+), 30 deletions(-)
next reply other threads:[~2016-08-01 20:44 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-08-01 20:42 Robert Sanford [this message]
2016-08-01 20:42 ` [dpdk-dev] [PATCH 1/4] testpmd: fix LACP ports to work with idle links Robert Sanford
2017-06-22 1:25 ` Wu, Jingjing
2017-10-31 1:07 ` Ferruh Yigit
2017-11-01 20:06 ` Ferruh Yigit
2016-08-01 20:42 ` [dpdk-dev] [PATCH 2/4] mempool: make cache flush threshold macro public Robert Sanford
2016-08-23 15:09 ` Olivier MATZ
2016-08-23 16:07 ` Sanford, Robert
2016-08-24 16:15 ` Olivier MATZ
2016-08-01 20:42 ` [dpdk-dev] [PATCH 3/4] net/bonding: another fix to LACP mempool size Robert Sanford
2016-08-23 15:09 ` Olivier MATZ
2016-08-23 20:01 ` Sanford, Robert
2016-08-24 16:14 ` Olivier MATZ
2016-11-07 16:02 ` Kulasek, TomaszX
2016-08-01 20:42 ` [dpdk-dev] [PATCH 4/4] net/bonding: fix configuration of LACP slaves Robert Sanford
2016-11-07 16:03 ` Kulasek, TomaszX
2017-02-08 17:14 ` [dpdk-dev] [PATCH 0/4] net/bonding: bonding and LACP fixes Thomas Monjalon
2017-03-09 13:19 ` Thomas Monjalon
2017-03-09 16:57 ` Declan Doherty
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=1470084176-79932-1-git-send-email-rsanford@akamai.com \
--to=rsanford2@gmail.com \
--cc=declan.doherty@intel.com \
--cc=dev@dpdk.org \
--cc=olivier.matz@6wind.com \
--cc=pablo.de.lara.guarch@intel.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).