DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH 0/2] LACP control packet filtering offload
@ 2017-05-27 11:27 Tomasz Kulasek
  2017-05-27 11:27 ` [dpdk-dev] [PATCH 1/2] " Tomasz Kulasek
                   ` (2 more replies)
  0 siblings, 3 replies; 23+ messages in thread
From: Tomasz Kulasek @ 2017-05-27 11:27 UTC (permalink / raw)
  To: dev; +Cc: declan.doherty

1. Overview

  Packet processing in the current path for bonding in mode 4, requires
  parse all packets in the fast path, to classify and process LACP
  packets.

  The idea of performance improvement is to use hardware offloads to
  improve packet classification.

2. Scope of work

   a) Optimization of software LACP packet classification by using
      packet_type metadata to eliminate the requirement of parsing each
      packet in the received burst.

   b) Implementation of classification mechanism using flow director to
      redirect LACP packets to the dedicated queue (not visible by
      application).

      - Filter pattern choosing (not all filters are supported by all
        devices),
      - Changing processing path to speed up non-LACP packets
        processing,
      - Handle LACP packets from dedicated Rx queue and send to the
        dedicated Tx queue,

   c) Creation of fallback mechanism allowing to select the most
      preferable method of processing:

      - Flow director,
      - Packet type metadata,
      - Software parsing,

3. Implementation

3.1. Packet type

   The packet_type approach would result in a performance improvement
   as packets data would no longer be required to be read, but with this
   approach the bonded driver would still need to look at the mbuf of
   each packet thereby having an impact on the achievable Rx
   performance.

   There's not packet_type value describing LACP packets directly.
   However, it can be used to limit number of packets required to be
   parsed, e.g. if packet_type indicates >L2 packets.

   It should improve performance while well-known non-LACP packets can
   be skipped without the need to look up into its data.

3.2. Flow director

   Using rte_flow API and pattern on ethernet type of packet (0x8809),
   we can configure flow director to redirect slow packets to separated
   queue.

   An independent Rx queues for LACP would remove the requirement to
   filter all ingress traffic in sw which should result in a performance
   increase. Other queues stay untouched and processing of packets on
   the fast path will be reduced to simple packet collecting from
   slaves.

   Separated Tx queue for LACP daemon allows to send LACP responses
   immediately, without interfering into Tx fast path.

   RECEIVE

         .---------------.
         | Slave 0       |
         |      .------. |
         |  Fd  | Rxq  | |
   Rx ======o==>|      |==============.
         |  |   +======+ |            |      .---------------.
         |  `-->| LACP |--------.     |      | Bonding       |
         |      `------' |      |     |      |      .------. |
         `---------------'      |     |      |      |      | |
                                |     >============>|      |=======> Rx
         .---------------.      |     |      |      +======+ |
         | Slave 1       |      |     |      |      | XXXX | |
         |      .------. |      |     |      |      `------' |
         |  Fd  | Rxq  | |      |     |      `---------------'
   Rx ======o==>|      |=============='        .-----------.
         |  |   +======+ |      |             /             \
         |  `-->| LACP |--------+----------->+  LACP DAEMON  |
         |      `------' |             Tx <---\             /
         `---------------'                     `-----------'

   All slow packets received by slaves in bonding are redirected to the
   separated queue using flow director. Other packets are collected from
   slaves and exposed to the application with Rx burst on bonded device.

   TRANSMIT

         .---------------.
         | Slave 0       |
         |      .------. |
         |      |      | |
   Tx <=====+===|      |<=============.
         |  |   |------| |            |      .---------------.
         |  `---| LACP |<-------.     |      | Bonding       |
         |      `------' |      |     |      |      .------. |
         `---------------'      |     |      |      |      | |
                                |     +<============|      |<====== Tx
         .---------------.      |     |      |      +======+ |
         | Slave 1       |      |     |      |      | XXXX | |
         |      .------. |      |     |      |      `------' |
         |      |      | |      |     |      `---------------'
   Tx <=====+===|      |<============='  Rx    .-----------.
         |  |   |------| |      |         `-->/             \
         |  `---| LACP |<-------+------------+  LACP DAEMON  |
         |      `------' |                    \             /
         `---------------'                     `-----------'

   On transmit, packets are propagated on the slaves. While we have
   separated Tx queue for LACP responses, it can be sent regardless of
   the fast path.

   LACP DAEMON

   In this mode whole slow packets are handled in LACP DAEMON.


Tomasz Kulasek (2):
  LACP control packet filtering offload
  test-pmd: add set bonding slow_queue hw/sw

 app/test-pmd/cmdline.c                            |  58 ++++
 drivers/net/bonding/rte_eth_bond_8023ad.c         | 141 +++++++--
 drivers/net/bonding/rte_eth_bond_8023ad.h         |   6 +
 drivers/net/bonding/rte_eth_bond_8023ad_private.h |  15 +
 drivers/net/bonding/rte_eth_bond_pmd.c            | 345 +++++++++++++++++++++-
 drivers/net/bonding/rte_eth_bond_version.map      |   9 +
 6 files changed, 539 insertions(+), 35 deletions(-)

-- 
1.9.1

^ permalink raw reply	[flat|nested] 23+ messages in thread
* Re: [dpdk-dev] [PATCH v3 3/4] net/bond: dedicated hw queues for LACP control traffic
@ 2017-12-14  3:13 Linhaifeng
  0 siblings, 0 replies; 23+ messages in thread
From: Linhaifeng @ 2017-12-14  3:13 UTC (permalink / raw)
  To: Kulasek, TomaszX, Doherty, Declan, dev; +Cc: Lilijun (Jerry), jichaoyang

Hi, Tomasz

Thanks for the reply!

I thought that the patch was used to resolve the "lacp loss" problem. We know when the traffic is large enough 
 bond may loss the lacp packets and slave would out of sync.

My question is, are there any solutions to solve the "lacp loss" problem?


-----Original Message-----
发件人: Kulasek, TomaszX [mailto:tomaszx.kulasek@intel.com] 
发送时间: 2017年12月13日 20:42
收件人: Linhaifeng <haifeng.lin@huawei.com>; Doherty, Declan <declan.doherty@intel.com>; dev@dpdk.org
主题: RE: [dpdk-dev] [PATCH v3 3/4] net/bond: dedicated hw queues for LACP control traffic

Hi,

> -----Original Message-----
> From: linhaifeng [mailto:haifeng.lin@huawei.com]
> Sent: Wednesday, December 13, 2017 09:16
> To: Doherty, Declan <declan.doherty@intel.com>; dev@dpdk.org
> Cc: Kulasek, TomaszX <tomaszx.kulasek@intel.com>
> Subject: Re: [dpdk-dev] [PATCH v3 3/4] net/bond: dedicated hw queues 
> for LACP control traffic
> 
> Hi,
> 
> What is the purpose of this patch? fix problem or improve performance?
> 
> 在 2017/7/5 0:46, Declan Doherty 写道:
> > From: Tomasz Kulasek <tomaszx.kulasek@intel.com>
> >
> > Add support for hardware flow classification of LACP control plane 
> > traffic to be redirect to a dedicated receive queue on each slave 
> > which is not visible to application. Also enables a dedicate 
> > transmit queue for LACP traffic which allows complete decoupling of 
> > control and data paths.
> 

This is performance improvement.

Tomasz

^ permalink raw reply	[flat|nested] 23+ messages in thread

end of thread, other threads:[~2017-12-14  3:13 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-05-27 11:27 [dpdk-dev] [PATCH 0/2] LACP control packet filtering offload Tomasz Kulasek
2017-05-27 11:27 ` [dpdk-dev] [PATCH 1/2] " Tomasz Kulasek
2017-05-29  8:10   ` Adrien Mazarguil
2017-06-29  9:18   ` Declan Doherty
2017-05-27 11:27 ` [dpdk-dev] [PATCH 2/2] test-pmd: add set bonding slow_queue hw/sw Tomasz Kulasek
2017-06-29 16:20 ` [dpdk-dev] [PATCH v2 0/2] LACP control packet filtering offload Tomasz Kulasek
2017-06-29 16:20   ` [dpdk-dev] [PATCH v2 1/2] " Tomasz Kulasek
2017-06-29 16:20   ` [dpdk-dev] [PATCH v2 2/2] test-pmd: add set bonding slow_queue hw/sw Tomasz Kulasek
2017-07-04 16:46   ` [dpdk-dev] [PATCH v3 0/4] LACP control packet filtering acceleration Declan Doherty
2017-07-04 16:46     ` [dpdk-dev] [PATCH v3 1/4] net/bond: calculate number of bonding tx/rx queues Declan Doherty
2017-07-04 16:46     ` [dpdk-dev] [PATCH v3 2/4] net/bond: use ptype flags for LACP rx filtering Declan Doherty
2017-07-04 19:54       ` Declan Doherty
2017-07-04 16:46     ` [dpdk-dev] [PATCH v3 3/4] net/bond: dedicated hw queues for LACP control traffic Declan Doherty
2017-07-04 19:55       ` Declan Doherty
2017-07-05 11:19       ` Ferruh Yigit
2017-07-05 11:33       ` Ferruh Yigit
2017-12-13  8:16       ` linhaifeng
2017-12-13 12:41         ` Kulasek, TomaszX
2017-07-04 16:46     ` [dpdk-dev] [PATCH v3 4/4] app/test-pmd: add cmd for dedicated LACP rx/tx queues Declan Doherty
2017-07-04 19:56       ` Declan Doherty
2017-07-05 11:33       ` Ferruh Yigit
2017-07-05 11:35     ` [dpdk-dev] [PATCH v3 0/4] LACP control packet filtering acceleration Ferruh Yigit
2017-12-14  3:13 [dpdk-dev] [PATCH v3 3/4] net/bond: dedicated hw queues for LACP control traffic Linhaifeng

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).