From: Ferruh Yigit <ferruh.yigit@intel.com>
To: Robert Sanford <rsanford2@gmail.com>
Cc: Jingjing Wu <jingjing.wu@intel.com>,
declan.doherty@intel.com, pablo.de.lara.guarch@intel.com,
olivier.matz@6wind.com, DPDK <dev@dpdk.org>
Subject: Re: [dpdk-dev] [PATCH 1/4] testpmd: fix LACP ports to work with idle links
Date: Wed, 1 Nov 2017 13:06:38 -0700 [thread overview]
Message-ID: <0952b643-5737-d075-1866-84e85ce4a065@intel.com> (raw)
In-Reply-To: <a650226d-1beb-a1af-aa7c-ff0e01f15b9a@intel.com>
On 10/30/2017 6:07 PM, Ferruh Yigit wrote:
> On 6/21/2017 6:25 PM, jingjing.wu at intel.com (Wu, Jingjing) wrote:
>>> -----Original Message-----
>>> From: rsanford2 at gmail.com
>>> Sent: Tuesday, August 2, 2016 4:43 AM
>>> Subject: [dpdk-dev] [PATCH 1/4] testpmd: fix LACP ports to work with idle links
>>>
>>> Problem: When there is little or no TX traffic on an LACP port (bonding mode 4),
>>> we don't call its tx burst function in a timely manner, and thus we don't
>>> transmit LACPDUs when we should.
>>>
>>> Solution: Add and maintain an "lacp_master" flag in rte_port struct.
>>> In the main packet forwarding loop, if port is an LACP master, in 1 out of N
>>> loops force an empty call to the tx burst API.
>>>
>>> Signed-off-by: Robert Sanford <rsanford at akamai.com>
>>> ---
>>> app/test-pmd/cmdline.c | 9 +++++++++
>>> app/test-pmd/testpmd.c | 37 +++++++++++++++++++++++++++++++++++++
>>> app/test-pmd/testpmd.h | 4 ++++
>>> 3 files changed, 50 insertions(+), 0 deletions(-)
>>>
>>> diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c index
>>> f90befc..2a629ee 100644
>>> --- a/app/test-pmd/cmdline.c
>>> +++ b/app/test-pmd/cmdline.c
>>> @@ -3975,6 +3975,10 @@ static void cmd_set_bonding_mode_parsed(void
>>> *parsed_result,
>>> /* Set the bonding mode for the relevant port. */
>>> if (0 != rte_eth_bond_mode_set(port_id, res->value))
>>> printf("\t Failed to set bonding mode for port = %d.\n", port_id);
>>> + else if (res->value == BONDING_MODE_8023AD)
>>> + set_port_lacp_master(port_id);
>>> + else
>>> + clear_port_lacp_master(port_id);
>>> }
>>>
>>> cmdline_parse_token_string_t cmd_setbonding_mode_set = @@ -4408,6
>>> +4412,11 @@ static void cmd_create_bonded_device_parsed(void
>>> *parsed_result,
>>> reconfig(port_id, res->socket);
>>> rte_eth_promiscuous_enable(port_id);
>>> ports[port_id].enabled = 1;
>>> +
>>> + if (res->mode == BONDING_MODE_8023AD)
>>> + set_port_lacp_master(port_id);
>>> + else
>>> + clear_port_lacp_master(port_id);
>>> }
>>>
>>> }
>>> diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c index
>>> 1428974..806667e 100644
>>> --- a/app/test-pmd/testpmd.c
>>> +++ b/app/test-pmd/testpmd.c
>>> @@ -920,12 +920,28 @@ run_pkt_fwd_on_lcore(struct fwd_lcore *fc,
>>> packet_fwd_t pkt_fwd)
>>> struct fwd_stream **fsm;
>>> streamid_t nb_fs;
>>> streamid_t sm_id;
>>> + unsigned int loop_count = 0;
>>>
>>> fsm = &fwd_streams[fc->stream_idx];
>>> nb_fs = fc->stream_nb;
>>> do {
>>> for (sm_id = 0; sm_id < nb_fs; sm_id++)
>>> (*pkt_fwd)(fsm[sm_id]);
>>> +
>>> + /*
>>> + * Per rte_eth_bond.h, we must invoke LACP master's tx
>>> + * burst function at least once every 100 ms.
>>> + */
>>> + loop_count++;
>>> + if (likely(loop_count % 1024 != 0))
>>> + continue;
>>> + for (sm_id = 0; sm_id < nb_fs; sm_id++) {
>>> + struct fwd_stream *fs = fsm[sm_id];
>>> +
>>> + if (port_is_lacp_master(fs->tx_port))
>>> + rte_eth_tx_burst(fs->tx_port, fs->tx_queue,
>>> + NULL, 0);
>>> + }
>> By add tx_burst here will change default logic. Some fwd engine are usually used to measure
>> Performance . Additional cycle in fast path may impact that. It would be better to move additional
>> sending to your fwd engine.
>
> Hi Robert,
>
> This patchset is older than a year and not responded back to latest comments.
>
> Is this still a valid patch?
> Do you have any objection to remove this from patchwork?
Patches are updated as rejected.
>
> Thanks,
> ferruh
>
next prev parent reply other threads:[~2017-11-01 20:06 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-08-01 20:42 [dpdk-dev] [PATCH 0/4] net/bonding: bonding and LACP fixes Robert Sanford
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 [this message]
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=0952b643-5737-d075-1866-84e85ce4a065@intel.com \
--to=ferruh.yigit@intel.com \
--cc=declan.doherty@intel.com \
--cc=dev@dpdk.org \
--cc=jingjing.wu@intel.com \
--cc=olivier.matz@6wind.com \
--cc=pablo.de.lara.guarch@intel.com \
--cc=rsanford2@gmail.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).