DPDK patches and discussions
 help / color / mirror / Atom feed
From: Ferruh Yigit <ferruh.yigit@intel.com>
To: Hemant Agrawal <hemant.agrawal@nxp.com>, "dev@dpdk.org" <dev@dpdk.org>
Subject: Re: [dpdk-dev] [PATCH v6 1/8] net/dpaa: add support for fmlib in dpdk
Date: Wed, 2 Sep 2020 14:32:22 +0100	[thread overview]
Message-ID: <a7d48e26-68cd-9569-1808-3069eb2cdce3@intel.com> (raw)
In-Reply-To: <AM6PR04MB4456443C84A73EC52CB15166892F0@AM6PR04MB4456.eurprd04.prod.outlook.com>

On 9/2/2020 6:15 AM, Hemant Agrawal wrote:
> Hi Ferruh,
> 
>> -----Original Message-----
>> From: Ferruh Yigit <ferruh.yigit@intel.com>
>> Sent: Tuesday, September 1, 2020 9:19 PM
>> To: Hemant Agrawal <hemant.agrawal@nxp.com>; dev@dpdk.org
>> Subject: Re: [PATCH v6 1/8] net/dpaa: add support for fmlib in dpdk
>>
>> On 9/1/2020 1:36 PM, Hemant Agrawal wrote:
>>> DPAA platorm MAC interface is known as FMAN i.e. Frame Manager.
>>> There are two ways to control it.
>>> 1. Statically configure the queues and classification rules before the
>>> start of the application using FMC tool.
>>> 2. Dynamically configure it within application by making API calls of
>>> fmlib.
>>>
>>> The fmlib or Frame Manager library provides an API on top of the Frame
>>> Manager driver ioctl calls, that provides a user space application
>>> with a simple way to configure driver parameters and PCD (parse -
>>> classify - distribute) rules.
>>>
>>> This patch integrates the base fmlib so that various queue config, RSS
>>> and classification related features can be supported on DPAA platform.
>>>
>>> Signed-off-by: Sachin Saxena <sachin.saxena@nxp.com>
>>> Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
>>> ---
>>>  doc/guides/nics/dpaa.rst                  |   52 +-
>>>  doc/guides/platform/dpaa.rst              |   21 +-
>>>  drivers/net/dpaa/fmlib/dpaa_integration.h |   50 +
>>>  drivers/net/dpaa/fmlib/fm_ext.h           |  463 ++
>>>  drivers/net/dpaa/fmlib/fm_lib.c           |  561 ++
>>>  drivers/net/dpaa/fmlib/fm_pcd_ext.h       | 5787
>> +++++++++++++++++++++
>>>  drivers/net/dpaa/fmlib/fm_port_ext.h      | 3350 ++++++++++++
>>>  drivers/net/dpaa/fmlib/ncsw_ext.h         |  158 +
>>>  drivers/net/dpaa/fmlib/net_ext.h          |  411 ++
>>>  drivers/net/dpaa/meson.build              |    3 +-
>>>  10 files changed, 10849 insertions(+), 7 deletions(-)  create mode
>>> 100644 drivers/net/dpaa/fmlib/dpaa_integration.h
>>>  create mode 100644 drivers/net/dpaa/fmlib/fm_ext.h  create mode
>>> 100644 drivers/net/dpaa/fmlib/fm_lib.c  create mode 100644
>>> drivers/net/dpaa/fmlib/fm_pcd_ext.h
>>>  create mode 100644 drivers/net/dpaa/fmlib/fm_port_ext.h
>>>  create mode 100644 drivers/net/dpaa/fmlib/ncsw_ext.h  create mode
>>> 100644 drivers/net/dpaa/fmlib/net_ext.h
>>>
>>> diff --git a/doc/guides/nics/dpaa.rst b/doc/guides/nics/dpaa.rst index
>>> 17839a920..7e6010471 100644
>>> --- a/doc/guides/nics/dpaa.rst
>>> +++ b/doc/guides/nics/dpaa.rst
>>> @@ -1,5 +1,5 @@
>>>  ..  SPDX-License-Identifier: BSD-3-Clause
>>> -    Copyright 2017 NXP
>>> +    Copyright 2017,2020 NXP
>>>
>>>
>>>  DPAA Poll Mode Driver
>>> @@ -21,6 +21,7 @@ Contents summary
>>>
>>>  - DPAA overview
>>>  - DPAA driver architecture overview
>>> +- FMAN configuration tools and library
>>>
>>>  .. _dpaa_overview:
>>>
>>> @@ -285,6 +286,55 @@ for details.
>>>        Done
>>>        testpmd>
>>>
>>> +FMAN Config
>>> +-----------
>>> +
>>> +Frame Manager is also responsible for parser, classify and distribute
>>> +functionality in the DPAA.
>>> +
>>> +   FMAN supports:
>>> +   Packet parsing at wire speed. It supports standard protocols parsing and
>>> +   identification by HW
>> (VLAN/IP/UDP/TCP/SCTP/PPPoE/PPP/MPLS/GRE/IPSec).
>>> +   It supports non-standard UDF header parsing for custom protocols.
>>> +   Classification / Distribution: Coarse classification based on Key
>> generation
>>> +   Hash and exact match lookup
>>> +
>>> +FMC - FMAN Configuration Tool
>>> +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>>> +   This tool is available in User Space. The tool is used to configure FMAN
>>> +   Physical (MAC) or Ephemeral (OH)ports for Parse/Classify/distribute.
>>> +   The PCDs can be hash based where a set of fields are key input for hash
>>> +   generation within FMAN keygen. The hash value is used to generate a
>> FQID for
>>> +   frame. There is a provision to setup exact match lookup too where field
>>> +   values within a packet drives corresponding FQID.
>>> +   Currently it works on XML file inputs.
>>> +
>>> +   Limitations:
>>> +   1.For Dynamic Configuration change, currently no support is available.
>>> +   E.g. enable/disable a port, a operator (set of VLANs and associate rules).
>>> +
>>> +   2.During FMC configuration, port for which policy is being configured is
>>> +   brought down and the policy is flushed on port before new policy is
>> updated
>>> +   for the port. Support is required to add/append/delete etc.
>>> +
>>> +   3.FMC, being a separate user-space application, needs to be invoked
>> from
>>> +   Shell.
>>> +
>>> +
>>> +   The details can be found in FMC Doc at:
>>> +   `Frame Mnager Configuration Tool
>> <https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fww
>> w.nxp.com%2Fdocs%2Fen%2Fapplication-
>> note%2FAN4760.pdf&amp;data=02%7C01%7Chemant.agrawal%40nxp.com%
>> 7Cdb7eda614491479976c508d84e8e8c42%7C686ea1d3bc2b4c6fa92cd99c5c30
>> 1635%7C0%7C1%7C637345721434145756&amp;sdata=ynJeLWqw0hPTya5IRt
>> GviovNA7mAGIZ8k3XSFcZyLP4%3D&amp;reserved=0>`_.
>>> +
>>> +FMLIB
>>> +~~~~~
>>> +   The Frame Manager library provides an API on top of the Frame
>> Manager driver
>>> +   ioctl calls, that provides a user space application with a simple way to
>>> +   configure driver parameters and PCD (parse - classify - distribute) rules.
>>> +
>>> +   This is an alternate to the FMC based configuration. This libray provides
>>> +   direct ioctl based interfaces for FMAN configuration as used by the FMC
>> tool
>>> +   as well. This helps in overcoming the main limitaiton of FMC - i.e. lack
>>> +   of dynamic configuration.
>>> +
>>>  Limitations
>>>  -----------
>>>
>>> diff --git a/doc/guides/platform/dpaa.rst
>>> b/doc/guides/platform/dpaa.rst index 6005f2221..20a0e3932 100644
>>> --- a/doc/guides/platform/dpaa.rst
>>> +++ b/doc/guides/platform/dpaa.rst
>>> @@ -58,17 +58,28 @@ compatible board:
>>>
>>>  4. **FMC Tool**
>>>
>>> -   Before any DPDK application can be executed, the Frame Manager
>> Configuration
>>> -   Tool (FMC) need to be executed to set the configurations of the queues.
>> This
>>> +   If one is planning to use more than 1 Recv queue and hardware
>> capability to
>>> +   parse, classify and distribute the packets, the Frame Manager
>> Configuration
>>> +   Tool (FMC) need to be executed to set the configurations of the queues
>> before
>>> +   running the DPAA based DPDK application. This setting is persistent, the
>>> +   configuration will remain in the hardware till it is
>>> + re-configured. This
>>>     includes the queue state, RSS and other policies.
>>>     This tool can be obtained from `NXP (Freescale) Public Git Repository
>> <https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fsour
>> ce.codeaurora.org%2Fexternal%2Fqoriq%2Fqoriq-
>> components%2Ffmc&amp;data=02%7C01%7Chemant.agrawal%40nxp.com%
>> 7Cdb7eda614491479976c508d84e8e8c42%7C686ea1d3bc2b4c6fa92cd99c5c30
>> 1635%7C0%7C1%7C637345721434145756&amp;sdata=pwOJGxY%2BGTkcpdk
>> O%2BKwoVejywmOeGsWbudo9OPSDqPU%3D&amp;reserved=0>`_.
>>>
>>>     This tool needs configuration files which are available in the
>>>     :ref:`DPDK Extra Scripts <extra_scripts>`, described below for DPDK
>> usages.
>>>
>>> -As an alternative method, DPAA PMD can also be executed using images
>>> provided -as part of SDK from NXP. The SDK includes all the above
>>> prerequisites necessary -to bring up a DPAA board.
>>> +   Note that DPAA PMD can also be executed using images provided
>>> +   as part of SDK from NXP. The SDK includes all the above prerequisites
>>> +   necessary (i.e. fmc tool) to bring up a DPAA board.
>>> +
>>> +   As an alternate method, DPAA PMDs starting from DPDK 20.11 also
>> support the
>>> +   fmlib library integration. The driver will detect about any existing FMC
>>> +   based config (if /tmp/fmc.bin is present). DPAA FMD will be used only if
>> no
>>> +   previous fmc config is existing.
>>> +
>>> +   Note that fmlib based integratin rely on underlying fmd driver in kernel,
>>> +   which is available as part of NXP kernel or NXP SDK.
>>
>> Hi Hemant,
>>
>> Thanks for the documentation.
>>
>> Can it be possible to give a little more detail related to the 'fmd' module, like
>> its folder etc..
>>
>> Another thing is with current patch 'dpaa' driver becomes completely
>> dependent to the 'fmd' kernel module [1] and PMD won't run without it, was
>> the dependency always there indirectly?
> 
> [Hemant]  I thought, I was clear in my documentation. 
> " This libray provides direct ioctl based interfaces for FMAN configuration as used by the FMC tool  as well"
> FMD always exist in the kernel for DPAA.  At present FMC is using it via IOCTL calls and FMC is indepdent tools with limitations for DPDK.
> Now, we have directly used those ioctl calls via fmlib in DPDK. 
> 
>> And does it make sense to support no 'fmd' kernel module case, as done
>> previously?
> [Hemant] FMD is already part of DPAA supported kernels.


OK, so what I understand is 'fmd' module was already an indirect dependency and
there is no point to support 'dpaa' for no 'fmd' available case.

Can you just give the location of the 'fmd' module, in case someone would like
to check the corresponding code for an ioctl call, it may help.


>>
>>
>> [1]
>> 'dpaa_fm_init()' will fail if the kernel driver is missing, which will cause PMD
>> driver probe, 'rte_dpaa_probe()' to fail.


  reply	other threads:[~2020-09-02 13:32 UTC|newest]

Thread overview: 81+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-10 17:19 [dpdk-dev] [PATCH v2 1/9] net/dpaa: support Rxq and Txq info routines Hemant Agrawal
2020-07-10 17:19 ` [dpdk-dev] [PATCH v2 2/9] net/dpaa: add support for fmlib in dpdk Hemant Agrawal
2020-07-10 17:19 ` [dpdk-dev] [PATCH v2 3/9] net/dpaa: add VSP support in FMLIB Hemant Agrawal
2020-07-10 17:19 ` [dpdk-dev] [PATCH v2 4/9] net/dpaa: add support for fmcless mode Hemant Agrawal
2020-07-10 17:19 ` [dpdk-dev] [PATCH v2 5/9] bus/dpaa: add shared MAC support Hemant Agrawal
2020-07-10 17:19 ` [dpdk-dev] [PATCH v2 6/9] bus/dpaa: add Virtual Storage Profile port init Hemant Agrawal
2020-07-10 17:19 ` [dpdk-dev] [PATCH v2 7/9] net/dpaa: add support for Virtual Storage Profile Hemant Agrawal
2020-07-10 17:19 ` [dpdk-dev] [PATCH v2 8/9] net/dpaa: add fmc parser support for VSP Hemant Agrawal
2020-07-10 17:19 ` [dpdk-dev] [PATCH v2 9/9] net/dpaa: add RSS update func with FMCless Hemant Agrawal
2020-07-11  8:17 ` [dpdk-dev] [PATCH v3 1/8] net/dpaa: add support for fmlib in dpdk Hemant Agrawal
2020-07-11  8:17   ` [dpdk-dev] [PATCH v3 2/8] net/dpaa: add VSP support in FMLIB Hemant Agrawal
2020-07-11  8:17   ` [dpdk-dev] [PATCH v3 3/8] net/dpaa: add support for fmcless mode Hemant Agrawal
2020-07-11  8:17   ` [dpdk-dev] [PATCH v3 4/8] bus/dpaa: add shared MAC support Hemant Agrawal
2020-07-11  8:17   ` [dpdk-dev] [PATCH v3 5/8] bus/dpaa: add Virtual Storage Profile port init Hemant Agrawal
2020-07-11  8:17   ` [dpdk-dev] [PATCH v3 6/8] net/dpaa: add support for Virtual Storage Profile Hemant Agrawal
2020-07-11  8:17   ` [dpdk-dev] [PATCH v3 7/8] net/dpaa: add fmc parser support for VSP Hemant Agrawal
2020-07-11  8:17   ` [dpdk-dev] [PATCH v3 8/8] net/dpaa: add RSS update func with FMCless Hemant Agrawal
2020-07-17 11:36   ` [dpdk-dev] [PATCH v3 1/8] net/dpaa: add support for fmlib in dpdk Ferruh Yigit
2020-07-19 20:10     ` Thomas Monjalon
2020-07-20  4:50       ` Hemant Agrawal
2020-07-20 17:06         ` Thomas Monjalon
2020-07-21  3:26           ` Hemant Agrawal
2020-07-20 18:42         ` Stephen Hemminger
2020-07-28 13:41         ` David Marchand
2020-07-29  6:39           ` Hemant Agrawal
2020-07-29 12:07             ` Thomas Monjalon
2020-07-29 14:33             ` Kevin Traynor
2020-07-20  9:51       ` Ferruh Yigit
2020-08-11 12:29   ` [dpdk-dev] [PATCH v4 " Hemant Agrawal
2020-08-11 12:29     ` [dpdk-dev] [PATCH v4 2/8] net/dpaa: add VSP support in FMLIB Hemant Agrawal
2020-08-11 12:29     ` [dpdk-dev] [PATCH v4 3/8] net/dpaa: add support for fmcless mode Hemant Agrawal
2020-08-11 12:29     ` [dpdk-dev] [PATCH v4 4/8] bus/dpaa: add shared MAC support Hemant Agrawal
2020-08-11 12:29     ` [dpdk-dev] [PATCH v4 5/8] bus/dpaa: add Virtual Storage Profile port init Hemant Agrawal
2020-08-11 12:29     ` [dpdk-dev] [PATCH v4 6/8] net/dpaa: add support for Virtual Storage Profile Hemant Agrawal
2020-08-11 12:30     ` [dpdk-dev] [PATCH v4 7/8] net/dpaa: add fmc parser support for VSP Hemant Agrawal
2020-08-11 12:30     ` [dpdk-dev] [PATCH v4 8/8] net/dpaa: add RSS update func with FMCless Hemant Agrawal
2020-08-13 18:01     ` [dpdk-dev] [PATCH v5 1/8] net/dpaa: add support for fmlib in dpdk Hemant Agrawal
2020-08-13 18:01       ` [dpdk-dev] [PATCH v5 2/8] net/dpaa: add VSP support in FMLIB Hemant Agrawal
2020-08-13 18:01       ` [dpdk-dev] [PATCH v5 3/8] net/dpaa: add support for fmcless mode Hemant Agrawal
2020-08-13 18:01       ` [dpdk-dev] [PATCH v5 4/8] bus/dpaa: add shared MAC support Hemant Agrawal
2020-08-13 18:01       ` [dpdk-dev] [PATCH v5 5/8] bus/dpaa: add Virtual Storage Profile port init Hemant Agrawal
2020-08-13 18:01       ` [dpdk-dev] [PATCH v5 6/8] net/dpaa: add support for Virtual Storage Profile Hemant Agrawal
2020-08-13 18:01       ` [dpdk-dev] [PATCH v5 7/8] net/dpaa: add fmc parser support for VSP Hemant Agrawal
2020-08-13 18:01       ` [dpdk-dev] [PATCH v5 8/8] net/dpaa: add RSS update func with FMCless Hemant Agrawal
2020-08-26 13:54       ` [dpdk-dev] [PATCH v5 1/8] net/dpaa: add support for fmlib in dpdk Ferruh Yigit
2020-08-26 14:52         ` Ferruh Yigit
2020-08-26 17:06           ` Hemant Agrawal
2020-08-26 21:20             ` Ferruh Yigit
2020-09-01 12:36       ` [dpdk-dev] [PATCH v6 " Hemant Agrawal
2020-09-01 12:36         ` [dpdk-dev] [PATCH v6 2/8] net/dpaa: add VSP support in FMLIB Hemant Agrawal
2020-09-01 12:36         ` [dpdk-dev] [PATCH v6 3/8] net/dpaa: add support for fmcless mode Hemant Agrawal
2020-09-01 12:36         ` [dpdk-dev] [PATCH v6 4/8] bus/dpaa: add shared MAC support Hemant Agrawal
2020-09-01 12:36         ` [dpdk-dev] [PATCH v6 5/8] bus/dpaa: add Virtual Storage Profile port init Hemant Agrawal
2020-09-01 12:36         ` [dpdk-dev] [PATCH v6 6/8] net/dpaa: add support for Virtual Storage Profile Hemant Agrawal
2020-09-01 12:36         ` [dpdk-dev] [PATCH v6 7/8] net/dpaa: add fmc parser support for VSP Hemant Agrawal
2020-09-01 12:36         ` [dpdk-dev] [PATCH v6 8/8] net/dpaa: add RSS update func with FMCless Hemant Agrawal
2020-09-01 15:48         ` [dpdk-dev] [PATCH v6 1/8] net/dpaa: add support for fmlib in dpdk Ferruh Yigit
2020-09-02  5:15           ` Hemant Agrawal
2020-09-02 13:32             ` Ferruh Yigit [this message]
2020-09-03  3:24               ` Hemant Agrawal
2020-09-03 19:54                 ` Ferruh Yigit
2020-09-04  8:29         ` [dpdk-dev] [PATCH v7 1/7] net/dpaa: add VSP support in FMLIB Hemant Agrawal
2020-09-04  8:29           ` [dpdk-dev] [PATCH v7 2/7] net/dpaa: add support for fmcless mode Hemant Agrawal
2020-09-04  8:29           ` [dpdk-dev] [PATCH v7 3/7] bus/dpaa: add shared MAC support Hemant Agrawal
2020-09-04  8:29           ` [dpdk-dev] [PATCH v7 4/7] bus/dpaa: add Virtual Storage Profile port init Hemant Agrawal
2020-09-04  8:29           ` [dpdk-dev] [PATCH v7 5/7] net/dpaa: add support for Virtual Storage Profile Hemant Agrawal
2020-09-04  8:29           ` [dpdk-dev] [PATCH v7 6/7] net/dpaa: add fmc parser support for VSP Hemant Agrawal
2020-09-04  8:29           ` [dpdk-dev] [PATCH v7 7/7] net/dpaa: add RSS update func with FMCless Hemant Agrawal
2020-09-04  8:39           ` [dpdk-dev] [PATCH v8 1/8] net/dpaa: add support for fmlib in dpdk Hemant Agrawal
2020-09-04  8:39             ` [dpdk-dev] [PATCH v8 2/8] net/dpaa: add VSP support in FMLIB Hemant Agrawal
2020-09-04  8:39             ` [dpdk-dev] [PATCH v8 3/8] net/dpaa: add support for fmcless mode Hemant Agrawal
2020-09-04  8:39             ` [dpdk-dev] [PATCH v8 4/8] bus/dpaa: add shared MAC support Hemant Agrawal
2020-09-04  8:39             ` [dpdk-dev] [PATCH v8 5/8] bus/dpaa: add Virtual Storage Profile port init Hemant Agrawal
2020-09-04  8:39             ` [dpdk-dev] [PATCH v8 6/8] net/dpaa: add support for Virtual Storage Profile Hemant Agrawal
2020-09-04  8:39             ` [dpdk-dev] [PATCH v8 7/8] net/dpaa: add fmc parser support for VSP Hemant Agrawal
2020-09-04  8:39             ` [dpdk-dev] [PATCH v8 8/8] net/dpaa: add RSS update func with FMCless Hemant Agrawal
2020-09-04 12:51             ` [dpdk-dev] [PATCH v8 1/8] net/dpaa: add support for fmlib in dpdk Ferruh Yigit
2020-09-08  9:55               ` Ferruh Yigit
2020-09-08 10:19                 ` Thomas Monjalon
2020-09-08 12:10                   ` Ferruh Yigit
2020-09-09 11:16                     ` [dpdk-dev] [dpdk-ci] " Ferruh Yigit

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=a7d48e26-68cd-9569-1808-3069eb2cdce3@intel.com \
    --to=ferruh.yigit@intel.com \
    --cc=dev@dpdk.org \
    --cc=hemant.agrawal@nxp.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).