DPDK patches and discussions
 help / color / mirror / Atom feed
From: Andriy Berestovskyy <aber@semihalf.com>
To: yangbo <yangbo_588@outlook.com>
Cc: dev@dpdk.org
Subject: Re: [dpdk-dev] About bond api lacp problem.
Date: Mon, 18 Apr 2016 10:08:53 +0200	[thread overview]
Message-ID: <CAOysbxoZwEoFh7oqXgCA68ChcEAwj=w6B5PQK1XFmo0eNE5mjA@mail.gmail.com> (raw)
In-Reply-To: <BLU437-SMTP2844C58A9E72C750179070AA690@phx.gbl>

Hi,
Basically, you have to make sure you call rte_eth_tx_burst() every 100
ms in your forwarding loop. Here is such an example:

const uint64_t bond_tx_cycles = (rte_get_timer_hz() + MS_PER_S - 1) *
100 / MS_PER_S;
uint64_t cur_bond_cycles, diff_cycles;
uint64_t last_bond_tx_cycles = 0;

  /* Inside your forwarding loop: */
  cur_bond_cycles = rte_get_timer_cycles();

  diff_cycles = cur_bond_cycles - last_bond_tx_cycles;
  if (diff_cycles > bond_tx_cycles) {
      last_bond_tx_cycles = cur_bond_cycles;
      rte_eth_tx_burst(bond_port_id, 0, NULL, 0);
  }

There is a user@dpdk.org mailing list, please address such questions there.

Regards,
Andriy

On Sat, Apr 16, 2016 at 11:41 AM, yangbo <yangbo_588@outlook.com> wrote:
> Hi,
>
> How to understand bond api comments:
>
> for LACP mode to work the rx/tx burst functions must be invoked at least once every 100ms, otherwise the out-of-band LACP messages will not be handled with the expected latency and this may cause the link status to be incorrectly marked as down or failure to correctly negotiate with peers.
>
>
> can any one give me example or more detail info ?
>
> I am extremely grateful for it.



-- 
Andriy Berestovskyy

      reply	other threads:[~2016-04-18  8:09 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-16  9:41 yangbo
2016-04-18  8:08 ` Andriy Berestovskyy [this message]

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='CAOysbxoZwEoFh7oqXgCA68ChcEAwj=w6B5PQK1XFmo0eNE5mjA@mail.gmail.com' \
    --to=aber@semihalf.com \
    --cc=dev@dpdk.org \
    --cc=yangbo_588@outlook.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).