DPDK patches and discussions
 help / color / mirror / Atom feed
From: Declan Doherty <declan.doherty@intel.com>
To: Alejandro Lucero <alejandro.lucero@netronome.com>,
	Mohammad Abdul Awal <mohammad.abdul.awal@intel.com>
Cc: dev <dev@dpdk.org>, Remy Horton <remy.horton@intel.com>
Subject: Re: [dpdk-dev] [RFC 0/5] Port Representor for control and monitoring of VF devices
Date: Thu, 7 Sep 2017 14:13:28 +0100	[thread overview]
Message-ID: <a4735865-7065-ad40-da14-8f3f54a8d3e1@intel.com> (raw)
In-Reply-To: <CAD+H992OysoKOb1XCJ11UnTNEZkA4D_BvUE+4FSjpFVR=Tsveg@mail.gmail.com>

On 07/09/2017 11:01 AM, Alejandro Lucero wrote:
> I understand this is the representor idea suiting Intel cards but it does
> not cover other possibilities.
>
> At least, Netronome and Mellanox require a representor not just for
> controlling a VF, but also for sending and receiving packets through the
> representor PMD.
>

Hey Alejandro,

What we've proposed here doesn't preclude the support of a data path on 
the representor pmd as the functionality which the PMD supports is 
dependent on how the parent device running the representor broker 
configures each representor instance. As you note in the case of our 
current generation of IO devices supporting a data path doesn't make 
sense, but I think this framework could support that functionality if 
required.

> I sent an abstract for a presentation in next Dublin Users meeting, and
> discussing the representor idea was in the agenda.
>

I've also submitted an presentation which I got notification was 
accepted this morning which is based on the RFC, so maybe we should 
collaborate on a presentation if there is a large overlap?

> By the way, I remember there was reticence about adding control plane to
> DPDK. What is the current official DPDK position in this regard?
>

I also remember there was concerns about adding control plane APIs to 
DPDK, hence the RFC, but I think the advantage of the representor port 
approach is that there are no new public API being introduced, with only 
back-end support in the PMDs which wish to support this functionality.

>
>
> On Thu, Sep 7, 2017 at 9:35 AM, Mohammad Abdul Awal <
> mohammad.abdul.awal@intel.com> wrote:
>
>> Signed-off-by: Mohammad Abdul Awal <mohammad.abdul.awal@intel.com>
>> Signed-off-by: Remy Horton <remy.horton@intel.com>
>> Signed-off-by: Declan Doherty <declan.doherty@intel.com>
>> ---
>> This RFC introduces a port representor based model for the control,
>> management
>> and monitoring of SR-IOV virtual function (VF) devices for control plane
>> applications which have bound the devices physical function.
>>
>> Port Representors are virtual poll mode drivers (PMD) which provide a
>> logical
>> representation in DPDK for VF ports for control and monitoring. Each port
>> representor PMD represents a single VF and is associated with it's parent
>> physical function (PF) PMD which provides the back-end hooks for the
>> representor
>> device ops and defines the control domain to which that port belongs.This
>> allows to use existing DPDK APIs to monitor and control the port without
>> the
>> need to create and maintain VF specific APIs.
>>
>>
>> +-----------------------------+   +---------------+  +---------------+
>> |        Control Plane        |   |   Data Plane  |  |   Data Plane  |
>> |         Application         |   |   Application |  |   Application |
>> +-----------------------------+   +---------------+  +---------------+
>> |         eth dev api         |   |  eth dev api  |  |  eth dev api  |
>> +-----------------------------+   +---------------+  +---------------+
>> +-------+  +-------+  +-------+   +---------------+  +---------------+
>> |  PF0  |  | Port  |  | Port  |   |    VF0 PMD    |  |    VF0 PMD    |
>> |  PMD  <--+ Rep 0 |  | Rep 1 |   +---------------+  +------+--------+
>> |       |  | PMD   |  | PMD   |                             |
>> +---+--^+  +-------+  +-+-----+                             |
>>     |  |                |  |                                |
>>     |  +----------------+  |                                |
>>     |                      |                                |
>>     |                      |                                |
>> +--------------------------------+                          |
>> |   |  HW (logical view)   |     |                          |
>> | --+------+ +-------+ +---+---+ |                          |
>> | |   PF   | |  VF0  | |  VF1  | |                          |
>> | |        | |       | |       +----------------------------+
>> | +--------+ +-------+ +-------+ |
>> | +----------------------------+ |
>> | |        VEB                 | |
>> | +----------------------------+ |
>> | +--------+                     |
>> | |  Port  |                     |
>> | |   0    |                     |
>> | +--------+                     |
>> +--------------------------------+
>>
>> The figure above shows a deployment where the PF is bound to a DPDK control
>> plane application which uses representor ports to manage the configuration
>> and
>> monitoring of it's VF ports. Each virtual function is represented in the
>> application by a representor port PMD which enables control of the
>> corresponding
>> VF through eth dev APIs on the representor PMD such as:
>>
>> - void rte_eth_promiscuous_enable(uint8_t port_id);
>> - void rte_eth_promiscuous_disable(uint8_t port_id);
>> - void rte_eth_allmulticast_enable(uint8_t port_id);
>> - void rte_eth_allmulticast_disable(uint8_t port_id);
>> - int rte_eth_dev_mac_addr_add(uint8_t port, struct ether_addr *mac_addr,
>>         uint32_t pool);
>> - int rte_eth_dev_set_vlan_offload(uint8_t port_id, int offload_mask);
>>
>> as well as monitoring through API's like
>>
>> - void rte_eth_link_get(uint8_t port_id, struct rte_eth_link *link);
>> - int rte_eth_stats_get(uint8_t port_id, struct rte_eth_stats *stats);
>>
>> The port representor infrastructure is enabled through a single common,
>> device
>> independent, virtual PMD whos context is initialized and enabled through a
>> broker instance running within the context of the physical function device
>> driver.
>>
>> +-------------------------+       +-------------------------+
>> |        rte_ethdev       |       |       rte_ethdev        |
>> +-------------------------+       +-------------------------+
>> |  Physical Function PMD  |       |  Port Reperesentor PMD  |
>> |         +-------------+ |       | +---------+ +---------+ |
>> |         | Representor | |       | | dev_data| | dev_ops | |
>> |         |    Broker   | |       | +----+----+ +----+----+ |
>> |         | +---------+ | |       +------|-----------|------+
>> |         | | VF Port | | |              |           |
>> |         | | Context +------------------+           |
>> |         | +---------+ | |                          |
>> |         | +---------+ | |                          |
>> |         | | Handler +------------------------------+
>> |         | |   Ops   | | |
>> |         | +---------+ | |
>> |         +-------------+ |
>> +-------------------------+
>>
>> Creation of representor ports can be achieved either through the --vdev EAL
>> option or through the rte_vdev_init() API. Each port representor requires
>> the
>> BDF of it's parent PF and the Virtual Function ID of the port which the
>> representor will support. During initialization of the representor PMD, it
>> calls
>> the broker API to register itself with the PF PMD and to get it's context
>> configured which includes the setting up of it's context and ops function
>> handlers.
>>
>>
>> As the port representor model is based around the paradigm of using
>> standard
>> port based APIs, it will allow future expansion of functionality without
>> the
>> need to add new APIs. For example it should be possible to support
>> configuration
>> of egress QoS parameters using existing TM APIs by extending the port
>> representor PMD/broker infrastructure.
>>
>> Mohammad Abdul Awal (5):
>>   Implemented port representor broker infrastructure, created BDF to
>>     port     function.
>>   added --enable-representor command line argument in EAL to load
>>     representor broker infrastructure.
>>   Implement port representor PMD
>>   Enable port representor PMD and broker for fortville PMD driver
>>   Enable port representor PMD and broker for ixgbe PMD driver.
>>
>>  config/common_base                                 |   5 +
>>  drivers/net/Makefile                               |   2 +
>>  drivers/net/i40e/Makefile                          |   1 +
>>  drivers/net/i40e/i40e_ethdev.c                     |  17 +
>>  drivers/net/i40e/i40e_prep_ops.c                   | 402 +++++++++
>>  drivers/net/i40e/i40e_prep_ops.h                   |  41 +
>>  drivers/net/i40e/rte_pmd_i40e.c                    |  47 +
>>  drivers/net/i40e/rte_pmd_i40e.h                    |  18 +
>>  drivers/net/ixgbe/Makefile                         |   2 +-
>>  drivers/net/ixgbe/ixgbe_ethdev.c                   |  33 +-
>>  drivers/net/ixgbe/ixgbe_ethdev.h                   |  11 +
>>  drivers/net/ixgbe/ixgbe_prep_ops.c                 | 279 ++++++
>>  drivers/net/ixgbe/ixgbe_prep_ops.h                 |  41 +
>>  drivers/net/representor/Makefile                   |  51 ++
>>  drivers/net/representor/rte_eth_representor.c      | 973
>> +++++++++++++++++++++
>>  .../representor/rte_pmd_representor_version.map    |   4 +
>>  lib/librte_eal/bsdapp/eal/eal.c                    |   6 +
>>  lib/librte_eal/common/eal_common_options.c         |   1 +
>>  lib/librte_eal/common/eal_internal_cfg.h           |   2 +
>>  lib/librte_eal/common/eal_options.h                |   2 +
>>  lib/librte_eal/common/include/rte_eal.h            |   8 +
>>  lib/librte_eal/linuxapp/eal/eal.c                  |   9 +
>>  lib/librte_ether/Makefile                          |   2 +
>>  lib/librte_ether/rte_ethdev.c                      |  93 ++
>>  lib/librte_ether/rte_ethdev.h                      |  26 +
>>  lib/librte_ether/rte_ethdev_vdev.h                 |  37 +-
>>  lib/librte_ether/rte_ether_version.map             |   9 +
>>  lib/librte_ether/rte_port_representor.c            | 160 ++++
>>  lib/librte_ether/rte_port_representor.h            | 289 ++++++
>>  mk/rte.app.mk                                      |   1 +
>>  30 files changed, 2556 insertions(+), 16 deletions(-)
>>  create mode 100644 drivers/net/i40e/i40e_prep_ops.c
>>  create mode 100644 drivers/net/i40e/i40e_prep_ops.h
>>  create mode 100644 drivers/net/ixgbe/ixgbe_prep_ops.c
>>  create mode 100644 drivers/net/ixgbe/ixgbe_prep_ops.h
>>  create mode 100644 drivers/net/representor/Makefile
>>  create mode 100644 drivers/net/representor/rte_eth_representor.c
>>  create mode 100644 drivers/net/representor/rte_
>> pmd_representor_version.map
>>  create mode 100644 lib/librte_ether/rte_port_representor.c
>>  create mode 100644 lib/librte_ether/rte_port_representor.h
>>
>> --
>> 2.7.4
>>
>>
>

  reply	other threads:[~2017-09-07 13:13 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-07  8:35 Mohammad Abdul Awal
2017-09-07  8:35 ` [dpdk-dev] [RFC 1/5] Implemented port representor broker infrastructure, created BDF to port function Mohammad Abdul Awal
2017-09-07  8:35 ` [dpdk-dev] [RFC 2/5] added --enable-representor command line argument in EAL to load representor broker infrastructure Mohammad Abdul Awal
2017-09-07  8:35 ` [dpdk-dev] [RFC 3/5] Implement port representor PMD Mohammad Abdul Awal
2017-09-07  8:35 ` [dpdk-dev] [RFC 4/5] Enable port representor PMD and broker for fortville PMD driver Mohammad Abdul Awal
2017-09-07  8:35 ` [dpdk-dev] [RFC 5/5] Enable port representor PMD and broker for ixgbe " Mohammad Abdul Awal
2017-09-07 10:01 ` [dpdk-dev] [RFC 0/5] Port Representor for control and monitoring of VF devices Alejandro Lucero
2017-09-07 13:13   ` Declan Doherty [this message]
2017-09-08 13:59     ` Alejandro Lucero
2017-12-21 14:51       ` Alex Rosenbaum
2017-12-22 14:31         ` Mohammad Abdul Awal
2017-12-22 22:33           ` Alex Rosenbaum
2017-12-27  9:40             ` Mohammad Abdul Awal
2017-12-27 15:50               ` Alex Rosenbaum
2018-01-02 15:19                 ` Mohammad Abdul Awal

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=a4735865-7065-ad40-da14-8f3f54a8d3e1@intel.com \
    --to=declan.doherty@intel.com \
    --cc=alejandro.lucero@netronome.com \
    --cc=dev@dpdk.org \
    --cc=mohammad.abdul.awal@intel.com \
    --cc=remy.horton@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).