[dpdk-dev] [PATCH v5 1/5] lib: add Port Representor library

Andrew Rybchenko arybchenko at solarflare.com
Tue Jan 30 10:23:28 CET 2018


On 01/10/2018 06:54 PM, Remy Horton wrote:
> Port Representors provide a logical presentation in DPDK of VF (virtual
> function) ports for the purposes of control and monitoring. Each port
> representor device 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.
>
> The library provides the broker infrastructure to be instantiated by
> base driver and corresponding methods to manage the broker
> infrastructure. The broker keeps records of list of representor PMDs.
> The library also provides methods to manage the representor PMDs by the
> broker.
>
> Signed-off-by: Declan Doherty <declan.doherty at intel.com>
> Signed-off-by: Mohammad Abdul Awal <mohammad.abdul.awal at intel.com>
> Signed-off-by: Remy Horton <remy.horton at intel.com>
> ---
>   MAINTAINERS                                        |   9 +-
>   config/common_base                                 |   5 +
>   doc/api/doxy-api-index.md                          |   1 +
>   doc/api/doxy-api.conf                              |   1 +
>   doc/guides/prog_guide/index.rst                    |   1 +
>   doc/guides/prog_guide/representor_lib.rst          |  62 ++++
>   doc/guides/rel_notes/release_18_02.rst             |  10 +
>   lib/Makefile                                       |   3 +
>   lib/librte_eal/common/eal_common_log.c             |   1 +
>   lib/librte_eal/common/include/rte_log.h            |   1 +
>   lib/librte_representor/Makefile                    |  26 ++
>   lib/librte_representor/rte_port_representor.c      | 345 +++++++++++++++++++++
>   lib/librte_representor/rte_port_representor.h      |  60 ++++
>   .../rte_port_representor_driver.h                  | 140 +++++++++
>   .../rte_port_representor_version.map               |   8 +
>   mk/rte.app.mk                                      |   1 +
>   16 files changed, 673 insertions(+), 1 deletion(-)
>   create mode 100644 doc/guides/prog_guide/representor_lib.rst
>   create mode 100644 lib/librte_representor/Makefile
>   create mode 100644 lib/librte_representor/rte_port_representor.c
>   create mode 100644 lib/librte_representor/rte_port_representor.h
>   create mode 100644 lib/librte_representor/rte_port_representor_driver.h
>   create mode 100644 lib/librte_representor/rte_port_representor_version.map

It look like it deserves an entry in the doc/guides/nics/features.

Also right now it is bound to rte_eth_dev inside, but does not bound to
ethdev outside (API, naming).  May be it is really good since it could be
useful to other cases of VFs (not networking).

Ideally it should use dynamic logging from the very beginning.

Also there is a work to standardize device identification in current
release cycle. I think it would be good if the first argument of
rte_representor_register/unregister() follow it (right now it is
something like pci_0000:01:00.1). May be it is not a problem to
change it in the next release cycle if the API is EXPERIMENTAL.

Wouldn't it be easier for user if register/unregister gets VFs
device string on input (not PF string plus VF number).
It is just a question and I'd like to know your thoughts on it.

<...>

> diff --git a/lib/librte_representor/rte_port_representor_version.map b/lib/librte_representor/rte_port_representor_version.map
> new file mode 100644
> index 0000000..b26600c
> --- /dev/null
> +++ b/lib/librte_representor/rte_port_representor_version.map
> @@ -0,0 +1,8 @@
> +DPDK_18.02 {
> +	global:
> +
> +	rte_representor_port_register;
> +	rte_representor_port_unregister;
> +
> +	local: *;
> +};

As I understand it should be EXPERIMENTAL (with __rte_experimental and
EXPERIMENTAL marks in the doxygen documentation as well).

<...>

Acked-by: Andrew Rybchenko <arybchenko at solarflare.com>


More information about the dev mailing list