DPDK patches and discussions
 help / color / mirror / Atom feed
From: Kyle Larose <klarose@sandvine.com>
To: "dev@dpdk.org" <dev@dpdk.org>
Cc: Declan Doherty <declan.doherty@intel.com>
Subject: [dpdk-dev] rte_eth_bond: Packets are received by lag despite interface not collecting
Date: Thu, 23 Nov 2017 22:56:23 +0000	[thread overview]
Message-ID: <D76BBBCF97F57144BB5FCF08007244A7EDB603FB@wtl-exchp-1.sandvine.com> (raw)

Hello,

I've run into some unexpected behaviour in the rte_eth_bond pmd using 8023ad mode with dedicated queues. bond_ethdev_rx_burst_8023ad_fast_queue iterates over all active slaves, and receives from each. This incorrectly ignores whether or not the interface is collecting. If it is not collecting, the packets should be discarded.

 Setup:
- 4x10G X710 links in a 8023ad lag. 3 are connected to a switch, another to a traffic generator.
- The 3 links form the lag fine. The 4th is taken out of the distribution logic, since the generator is not participating in LACP

Problem:
- If I send packets to a link that is not in the collecting state, the application receives those packets from the lag. It should not

Analysis:
 - Interfaces which are up but not collecting are considered active from the 8023ad lag's perspective
 - bond_ethdev_rx_burst_8023ad_fast_queue receives traffic from all active lags
 - Thus, regardless of the lacp state of the interface, traffic is received

Solution:
 - I think that bond_ethdev_rx_burst_8023ad_fast_queue went a little too far in its performance optimizations. It should still check the state of the slave prior to accepting the packets.

 My suggestion:

 1) If the slave is collecting, receive as normal. 
 2) Otherwise, receive the packets into the rx buffer, then free them, and count them as being discarded due to the slave not collecting (this could be useful for diagnostics).
 3) We receive to drain the rx queue, and so we can count. If we didn't we could get a burst of stale packets when the link starts collecting again.
 3) To try to prevent links in this state from consuming too much CPU resources, we could receive only portion of the burst size at a time.
    Presumably it shouldn't be getting *too* much traffic, but if it is, it'd probably be better to overflow the rxq and drop.


Thoughts?

Thanks,

Kyle

                 reply	other threads:[~2017-11-23 22:56 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=D76BBBCF97F57144BB5FCF08007244A7EDB603FB@wtl-exchp-1.sandvine.com \
    --to=klarose@sandvine.com \
    --cc=declan.doherty@intel.com \
    --cc=dev@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).