DPDK patches and discussions
 help / color / mirror / Atom feed
Search results ordered by [date|relevance]  view[summary|nested|Atom feed]
thread overview below | download: 
* Re: [dpdk-dev] [PATCH 04/12] vdev: move to drivers/bus
  @ 2017-09-18 11:47  0%       ` De Lara Guarch, Pablo
  2017-09-19  6:01  0%         ` Tan, Jianfeng
  0 siblings, 1 reply; 200+ results
From: De Lara Guarch, Pablo @ 2017-09-18 11:47 UTC (permalink / raw)
  To: Tan, Jianfeng, Gaëtan Rivet
  Cc: dev, Richardson, Bruce, Ananyev, Konstantin, thomas, yliu,
	maxime.coquelin, mtetsuyah, Yigit, Ferruh



> -----Original Message-----
> From: Tan, Jianfeng
> Sent: Tuesday, August 29, 2017 11:48 PM
> To: Gaëtan Rivet <gaetan.rivet@6wind.com>
> Cc: dev@dpdk.org; Richardson, Bruce <bruce.richardson@intel.com>;
> Ananyev, Konstantin <konstantin.ananyev@intel.com>; De Lara Guarch,
> Pablo <pablo.de.lara.guarch@intel.com>; thomas@monjalon.net;
> yliu@fridaylinux.org; maxime.coquelin@redhat.com;
> mtetsuyah@gmail.com; Yigit, Ferruh <ferruh.yigit@intel.com>
> Subject: Re: [dpdk-dev] [PATCH 04/12] vdev: move to drivers/bus
> 
> Hi Gaetan,
> 
> 
> On 8/29/2017 6:04 AM, Gaëtan Rivet wrote:
> > On Fri, Aug 25, 2017 at 09:40:44AM +0000, Jianfeng Tan wrote:
> >> Move the vdev bus from lib/librte_eal to drivers/bus.
> >>
> >> As the crypto vdev helper function refers to data structure
> >> in rte_vdev.h, so we move those helper function into drivers/bus
> >> too.
> >>
> >> Signed-off-by: Jianfeng Tan <jianfeng.tan@intel.com>
> >> ---
> >>   config/common_base                        |   5 +
> >>   drivers/bus/Makefile                      |   2 +
> >>   drivers/bus/vdev/Makefile                 |  57 +++++
> >>   drivers/bus/vdev/rte_bus_vdev_version.map |  10 +
> >>   drivers/bus/vdev/rte_cryptodev_vdev.c     | 154 ++++++++++++++
> >>   drivers/bus/vdev/rte_cryptodev_vdev.h     | 100 +++++++++
> >>   drivers/bus/vdev/rte_vdev.h               | 153 +++++++++++++
> >>   drivers/bus/vdev/vdev.c                   | 342
> ++++++++++++++++++++++++++++++
> >>   lib/librte_cryptodev/Makefile             |   2 -
> >>   lib/librte_cryptodev/rte_cryptodev_vdev.c | 154 --------------
> >>   lib/librte_cryptodev/rte_cryptodev_vdev.h | 100 ---------
> >>   lib/librte_eal/bsdapp/eal/Makefile        |   1 -
> >>   lib/librte_eal/common/Makefile            |   2 +-
> >>   lib/librte_eal/common/eal_common_vdev.c   | 342 --------------------------
> ----
> >>   lib/librte_eal/common/include/rte_dev.h   |  24 +--
> >>   lib/librte_eal/common/include/rte_vdev.h  | 131 ------------
> >>   lib/librte_eal/linuxapp/eal/Makefile      |   1 -
> >>   mk/rte.app.mk                             |   1 +
> >>   18 files changed, 826 insertions(+), 755 deletions(-)
> >>   create mode 100644 drivers/bus/vdev/Makefile
> >>   create mode 100644 drivers/bus/vdev/rte_bus_vdev_version.map
> >>   create mode 100644 drivers/bus/vdev/rte_cryptodev_vdev.c
> >>   create mode 100644 drivers/bus/vdev/rte_cryptodev_vdev.h
> >>   create mode 100644 drivers/bus/vdev/rte_vdev.h
> >>   create mode 100644 drivers/bus/vdev/vdev.c
> >>   delete mode 100644 lib/librte_cryptodev/rte_cryptodev_vdev.c
> >>   delete mode 100644 lib/librte_cryptodev/rte_cryptodev_vdev.h
> >>   delete mode 100644 lib/librte_eal/common/eal_common_vdev.c
> >>   delete mode 100644 lib/librte_eal/common/include/rte_vdev.h
> >>
> >> diff --git a/config/common_base b/config/common_base
> >> index 5e97a08..aca0994 100644
> >> --- a/config/common_base
> >> +++ b/config/common_base
> >> @@ -750,3 +750,8 @@ CONFIG_RTE_APP_CRYPTO_PERF=y
> >>   # Compile the eventdev application
> >>   #
> >>   CONFIG_RTE_APP_EVENTDEV=y
> >> +
> >> +#
> >> +# Compile the vdev bus
> >> +#
> >> +CONFIG_RTE_LIBRTE_VDEV=y
> > Why not CONFIG_RTE_LIBRTE_VDEV_BUS?
> > It would seem more consistent.
> 
> Was trying to be consistent with the directory name, drivers/bus/vdev.
> Do you think that directory should also be renamed?
> 
> >
> >> diff --git a/drivers/bus/Makefile b/drivers/bus/Makefile
> >> index 0224214..9b6d45e 100644
> >> --- a/drivers/bus/Makefile
> >> +++ b/drivers/bus/Makefile
> >> @@ -35,4 +35,6 @@ core-libs := librte_eal librte_mbuf librte_mempool
> librte_ring librte_ether
> >>   DIRS-$(CONFIG_RTE_LIBRTE_FSLMC_BUS) += fslmc
> >>   DEPDIRS-fslmc = $(core-libs)
> >>
> >> +DIRS-$(CONFIG_RTE_LIBRTE_VDEV) += vdev
> >> +
> >>   include $(RTE_SDK)/mk/rte.subdir.mk
> >> diff --git a/drivers/bus/vdev/Makefile b/drivers/bus/vdev/Makefile
> >> new file mode 100644
> >> index 0000000..30c4813
> >> --- /dev/null
> >> +++ b/drivers/bus/vdev/Makefile
> >> @@ -0,0 +1,57 @@
> >> +#   BSD LICENSE
> >> +#
> >> +#   Copyright(c) 2017 Intel Corporation. All rights reserved.
> >> +#   All rights reserved.
> >> +#
> >> +#   Redistribution and use in source and binary forms, with or without
> >> +#   modification, are permitted provided that the following conditions
> >> +#   are met:
> >> +#
> >> +#     * Redistributions of source code must retain the above copyright
> >> +#       notice, this list of conditions and the following disclaimer.
> >> +#     * Redistributions in binary form must reproduce the above
> copyright
> >> +#       notice, this list of conditions and the following disclaimer in
> >> +#       the documentation and/or other materials provided with the
> >> +#       distribution.
> >> +#     * Neither the name of Intel Corporation nor the names of its
> >> +#       contributors may be used to endorse or promote products
> derived
> >> +#       from this software without specific prior written permission.
> >> +#
> >> +#   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
> CONTRIBUTORS
> >> +#   "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,
> BUT NOT
> >> +#   LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
> FITNESS FOR
> >> +#   A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
> COPYRIGHT
> >> +#   OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
> INCIDENTAL,
> >> +#   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
> BUT NOT
> >> +#   LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
> LOSS OF USE,
> >> +#   DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
> AND ON ANY
> >> +#   THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
> TORT
> >> +#   (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
> OF THE USE
> >> +#   OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
> DAMAGE.
> >> +
> >> +include $(RTE_SDK)/mk/rte.vars.mk
> >> +
> >> +#
> >> +# library name
> >> +#
> >> +LIB = librte_bus_vdev.a
> >> +
> >> +CFLAGS += -O3
> >> +CFLAGS += $(WERROR_FLAGS)
> >> +
> >> +# versioning export map
> >> +EXPORT_MAP := rte_bus_vdev_version.map
> >> +
> >> +# library version
> >> +LIBABIVER := 1
> >> +
> >> +SRCS-y += vdev.c
> >> +SRCS-y += rte_cryptodev_vdev.c
> >> +
> >> +#
> >> +# Export include files
> >> +#
> >> +SYMLINK-y-include += rte_vdev.h
> >> +SYMLINK-y-include += rte_cryptodev_vdev.h
> >> +
> > Let's say the cryptodev lib must be updated.
> > I understand the need to move rte_cryptodev_vdev.h outside
> > librte_cryptodev, but I guess this exposes the vdev bus to ABI / API
> > instability due to a third-party subsystem?
> 
> Thank you for bringing up this question. I really don't want to move
> these crypto-specific files into bus/vdev/. It's just some helper
> functions to be called by crypto vdev drivers. And what's more, the only
> dependence on vdev is that the API rte_cryptodev_vdev_pmd_init() has a
> parameter of struct rte_vdev_device, which is totally not necessary, as
> it only needs a struct rte_device parameter.
> 
> In all, I'd prefer to change this specific API and move those
> crypto-specific files back to lib/librte_crypto (just like ether dev and
> eventdev); but it needs API change announcement.
> 
> Any thoughts?

I think we should keep this API in cryptodev. It looks strange to have some
Crypto specific functions in a file like this that should contain generic vdev
functions.

> 
> >
> > I did something somewhat similar for PCI:
> > http://dpdk.org/ml/archives/dev/2017-August/073525.html
> 
> I prefer your way to move those things to specific dev folder.
> 
> >
> > I don't know which solution is best, but something certainly needs to be
> > done.
> >
> > ---
> >
> > Beside the `why`, about the `how`: shouldn't this file compilation and
> > symlink be conditioned to CONFIG_RTE_LIBRTE_CRYPTODEV=y?
> >
> > i.e.: SYMLINK-$(CONFIG_RTE_LIBRTE_CRYPTODEV)-include +=
> rte_cryptodev_vdev.h
> 
> Yes, make sense.
> 
> Thanks,
> Jianfeng
> 
> 

Btw, for future times, strip out all the text where there are no comments,
so it is easier to review by others.

Thanks,
Pablo

^ permalink raw reply	[relevance 0%]

* Re: [dpdk-dev] [PATCH] doc: add note on hardware support deprecation
  @ 2017-09-18 13:49  0% ` Mcnamara, John
  2017-09-18 13:59 21% ` [dpdk-dev] [PATCH v2] " Bruce Richardson
  1 sibling, 0 replies; 200+ results
From: Mcnamara, John @ 2017-09-18 13:49 UTC (permalink / raw)
  To: Richardson, Bruce, dev; +Cc: Richardson, Bruce



> -----Original Message-----
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Bruce Richardson
> Sent: Friday, September 15, 2017 2:41 PM
> To: dev@dpdk.org
> Cc: Richardson, Bruce <bruce.richardson@intel.com>
> Subject: [dpdk-dev] [PATCH] doc: add note on hardware support deprecation
> 
> Following agreement at the DPDK Technical Board meeting [1], the policy
> that hardware support deprecation should be treated as though it were an
> ABI break needs to be documented in the contributors guide.
> 
> [1] http://dpdk.org/ml/archives/dev/2017-September/074613.html
> 
> Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>

> ...

> 
> +.. note::
> +
> +        Updates to the minimum HW requirements, which drop support for


s/HW/hardware

The next only needs to be indented 3 spaces to align with the directive.

Apart from that:

Acked-by: John McNamara <john.mcnamara@intel.com>

^ permalink raw reply	[relevance 0%]

* [dpdk-dev] [PATCH v2] doc: add note on hardware support deprecation
    2017-09-18 13:49  0% ` Mcnamara, John
@ 2017-09-18 13:59 21% ` Bruce Richardson
  2017-10-13 20:46  0%   ` Thomas Monjalon
  1 sibling, 1 reply; 200+ results
From: Bruce Richardson @ 2017-09-18 13:59 UTC (permalink / raw)
  To: john.mcnamara, dev; +Cc: Bruce Richardson

Following agreement at the DPDK Technical Board meeting [1], the policy
that hardware support deprecation should be treated as though it were an
ABI break needs to be documented in the contributors guide.

[1] http://dpdk.org/ml/archives/dev/2017-September/074613.html

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
---
V2: change HW abbreviation to "hardware" and reduce indentation of note to
    3 spaces only.

 doc/guides/contributing/versioning.rst | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/doc/guides/contributing/versioning.rst b/doc/guides/contributing/versioning.rst
index 8aaf370da..2ec561647 100644
--- a/doc/guides/contributing/versioning.rst
+++ b/doc/guides/contributing/versioning.rst
@@ -18,6 +18,8 @@ General Guidelines
 #. The modification of symbols can generally be managed with versioning
 #. The removal of symbols generally is an ABI break and requires bumping of the
    LIBABIVER macro
+#. Updates to the minimum hardware requirements, which drop support for hardware which
+   was previously supported, should be treated as an ABI change.
 
 What is an ABI
 --------------
@@ -77,6 +79,13 @@ for significant reasons, such as performance enhancements. ABI breakage due to
 changes such as reorganizing public structure fields for aesthetic or
 readability purposes should be avoided.
 
+.. note::
+
+   Updates to the minimum hardware requirements, which drop support for hardware
+   which was previously supported, should be treated as an ABI change, and
+   follow the relevant deprecation policy procedures as above: 3 acks and
+   announcement at least one release in advance.
+
 Examples of Deprecation Notices
 -------------------------------
 
-- 
2.13.5

^ permalink raw reply	[relevance 21%]

* Re: [dpdk-dev] [PATCH v1 4/4] doc: remove dpdk iova aware notice
  @ 2017-09-18 18:44  0%   ` Mcnamara, John
  0 siblings, 0 replies; 200+ results
From: Mcnamara, John @ 2017-09-18 18:44 UTC (permalink / raw)
  To: Santosh Shukla, dev; +Cc: olivier.matz, thomas, jerin.jacob, hemant.agrawal



> -----Original Message-----
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Santosh Shukla
> Sent: Monday, August 14, 2017 4:16 PM
> To: dev@dpdk.org
> Cc: olivier.matz@6wind.com; thomas@monjalon.net;
> jerin.jacob@caviumnetworks.com; hemant.agrawal@nxp.com; Santosh Shukla
> <santosh.shukla@caviumnetworks.com>
> Subject: [dpdk-dev] [PATCH v1 4/4] doc: remove dpdk iova aware notice
> 
> Removed dpdk iova aware ABI deprecation notice, and updated ABI change
> details in release_17.11.rst.
> 
> Signed-off-by: Santosh Shukla <santosh.shukla@caviumnetworks.com>

Acked-by: John McNamara <john.mcnamara@intel.com>

^ permalink raw reply	[relevance 0%]

* Re: [dpdk-dev] [PATCH] net/nfp: remove firmware ABI check
  @ 2017-09-18 19:00  4% ` Ferruh Yigit
  0 siblings, 0 replies; 200+ results
From: Ferruh Yigit @ 2017-09-18 19:00 UTC (permalink / raw)
  To: Alejandro Lucero, dev

On 9/11/2017 2:44 PM, Alejandro Lucero wrote:
> Link speed is not advertised in old firmwares. However, it is safe
> to remove the check because reading NFP_NET_CFG_STS returns 0 in
> those cases.
> 
> Signed-off-by: Alejandro Lucero <alejandro.lucero@netronome.com>

Applied to dpdk-next-net/master, thanks.

^ permalink raw reply	[relevance 4%]

* Re: [dpdk-dev] [PATCH 04/12] vdev: move to drivers/bus
  2017-09-18 11:47  0%       ` De Lara Guarch, Pablo
@ 2017-09-19  6:01  0%         ` Tan, Jianfeng
  0 siblings, 0 replies; 200+ results
From: Tan, Jianfeng @ 2017-09-19  6:01 UTC (permalink / raw)
  To: De Lara Guarch, Pablo, Gaëtan Rivet
  Cc: dev, Richardson, Bruce, Ananyev, Konstantin, thomas, yliu,
	maxime.coquelin, mtetsuyah, Yigit, Ferruh

Hi Pablo

> -----Original Message-----
> From: De Lara Guarch, Pablo
> Sent: Monday, September 18, 2017 7:48 PM
> To: Tan, Jianfeng; Gaëtan Rivet
> Cc: dev@dpdk.org; Richardson, Bruce; Ananyev, Konstantin;
> thomas@monjalon.net; yliu@fridaylinux.org; maxime.coquelin@redhat.com;
> mtetsuyah@gmail.com; Yigit, Ferruh
> Subject: RE: [dpdk-dev] [PATCH 04/12] vdev: move to drivers/bus
> 
> 
...
> > > Let's say the cryptodev lib must be updated.
> > > I understand the need to move rte_cryptodev_vdev.h outside
> > > librte_cryptodev, but I guess this exposes the vdev bus to ABI / API
> > > instability due to a third-party subsystem?
> >
> > Thank you for bringing up this question. I really don't want to move
> > these crypto-specific files into bus/vdev/. It's just some helper
> > functions to be called by crypto vdev drivers. And what's more, the only
> > dependence on vdev is that the API rte_cryptodev_vdev_pmd_init() has a
> > parameter of struct rte_vdev_device, which is totally not necessary, as
> > it only needs a struct rte_device parameter.
> >
> > In all, I'd prefer to change this specific API and move those
> > crypto-specific files back to lib/librte_crypto (just like ether dev and
> > eventdev); but it needs API change announcement.
> >
> > Any thoughts?
> 
> I think we should keep this API in cryptodev. It looks strange to have some
> Crypto specific functions in a file like this that should contain generic vdev
> functions.

OK, I'll try to put those files back, see if possible to add a dependency on librte_bus_vdev in lib_cryptodev.

...
> 
> Btw, for future times, strip out all the text where there are no comments,
> so it is easier to review by others.

Thank you for the reminder.

Thanks,
Jianfeng 

> 
> Thanks,
> Pablo

^ permalink raw reply	[relevance 0%]

* Re: [dpdk-dev] [PATCH v3] devtools: rework abi checker script
  @ 2017-09-19  9:15  7%     ` Olivier MATZ
  0 siblings, 0 replies; 200+ results
From: Olivier MATZ @ 2017-09-19  9:15 UTC (permalink / raw)
  To: Neil Horman; +Cc: dev, bruce.richardson

Hi Neil,

On Wed, Sep 13, 2017 at 11:00:13AM -0400, Neil Horman wrote:
> On Mon, Sep 11, 2017 at 10:46:35AM +0200, Olivier Matz wrote:
> > The initial version of the script had some limitations:
> > - cannot work on a non-clean workspace
> > - environment variables are not documented
> > - no compilation log in case of failure
> > - return success even it abi is incompatible
> > 
> > This patch addresses these issues and rework the code.
> > 
> > Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
> > ---
> > 
> > v2->v3:
> > - fix when not launched from dpdk root dir
> > - use "-Og -Wno-error" instead of "-O0"
> > - fix typo in commit log
> > 
> > v1->v2:
> > - use /usr/bin/env to find bash (which is required)
> > - fix displayed path to html reports
> > - reword help for -f option
> > 
> >  devtools/validate-abi.sh | 392 ++++++++++++++++++++++++-----------------------
> >  1 file changed, 200 insertions(+), 192 deletions(-)
> > 
> 
> This is alot closer, I think theres just a little wierdness left.  When running
> this checker script, the end of the log shows this:
> 
> CMD: abi-compliance-checker -l librte_vhost.so -old /home/nhorman/git/dpdk/devtools/abi-check/222555480/librte_vhost.so.dump -new /home/nhorman/git/dpdk/devtools/abi-check/02657b4ad/librte_vhost.so.dump
> NOTICE: At least one call to abi-compliance-checker returned an error.
> NOTICE: ABI may be incompatible, please check logs for details.
> NOTICE: Incompatible list:  librte_cryptodev.so librte_eal.so librte_efd.so librte_ethdev.so librte_eventdev.so librte_hash.so librte_pdump.so librte_pmd_crypto_scheduler.so librte_pmd_ring.so librte_ring.so
> 
> Which I think is something of a false positive.  The line:
> NOTICE: At least one call to abi-compliance-checker returned an error.
>
> I think is emitted simply because abi-compilance-checker returns non-zero and
> reports that error if it finds any incompatibilities.  I'm not sure we want to
> flag that as an error per se.  It gives the impression something has gone wrong,
> rather than correctly identifying that there are incompatibilities.
> 
> Though on the other hand, maybe we do want to set that red flag so people look
> at what the incompatibilities are.  As I say it out loud, perhaps that
> preferable.

Yes, I can remove this line
"At least one call to abi-compliance-checker returned an error."
which does not give a lot of info anyway.

While reproducing the issue, I also realized that the report path
was not preoperly fixed. So I'm sending a v4 with these fixes.

Thanks,
Olivier

^ permalink raw reply	[relevance 7%]

* Re: [dpdk-dev] [PATCH v2 5/5] doc: remove dpdk iova aware notice
  @ 2017-09-19 13:38  0%     ` Mcnamara, John
  0 siblings, 0 replies; 200+ results
From: Mcnamara, John @ 2017-09-19 13:38 UTC (permalink / raw)
  To: Santosh Shukla, dev; +Cc: thomas, jerin.jacob, hemant.agrawal, olivier.matz



> -----Original Message-----
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Santosh Shukla
> Sent: Tuesday, September 5, 2017 11:31 AM
> To: dev@dpdk.org
> Cc: thomas@monjalon.net; jerin.jacob@caviumnetworks.com;
> hemant.agrawal@nxp.com; olivier.matz@6wind.com; Santosh Shukla
> <santosh.shukla@caviumnetworks.com>
> Subject: [dpdk-dev] [PATCH v2 5/5] doc: remove dpdk iova aware notice
> 
> Removed dpdk iova aware ABI deprecation notice, and updated ABI change
> details in release_17.11.rst.
> 
> Signed-off-by: Santosh Shukla <santosh.shukla@caviumnetworks.com>

Acked-by: John McNamara <john.mcnamara@intel.com>

^ permalink raw reply	[relevance 0%]

* [dpdk-dev] [PATCH v4 3/3] doc: update timer lib docs
  @ 2017-09-19 17:02  3%   ` Erik Gabriel Carrillo
  0 siblings, 0 replies; 200+ results
From: Erik Gabriel Carrillo @ 2017-09-19 17:02 UTC (permalink / raw)
  To: rsanford; +Cc: dev, john.mcnamara, Erik Carrillo

From: Erik Carrillo <erik.g.carrillo@intel.com>

This change updates the timer library documentation to
reflect a change to the organization of the skiplists
in the implementation.

Signed-off-by: Erik Gabriel Carrillo <erik.g.carrillo@intel.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
---
v4:
* Made changes suggested by John Mcnamara[1].

[1] http://dpdk.org/ml/archives/dev/2017-September/075819.html

 doc/guides/prog_guide/timer_lib.rst    | 31 +++++++++++++++++++------------
 doc/guides/rel_notes/release_17_11.rst |  7 +++++++
 2 files changed, 26 insertions(+), 12 deletions(-)

diff --git a/doc/guides/prog_guide/timer_lib.rst b/doc/guides/prog_guide/timer_lib.rst
index f437417..e1f64ac 100644
--- a/doc/guides/prog_guide/timer_lib.rst
+++ b/doc/guides/prog_guide/timer_lib.rst
@@ -1,5 +1,5 @@
 ..  BSD LICENSE
-    Copyright(c) 2010-2014 Intel Corporation. All rights reserved.
+    Copyright(c) 2010-2017 Intel Corporation. All rights reserved.
     All rights reserved.
 
     Redistribution and use in source and binary forms, with or without
@@ -53,16 +53,19 @@ Refer to the `callout manual <http://www.daemon-systems.org/man/callout.9.html>`
 Implementation Details
 ----------------------
 
-Timers are tracked on a per-lcore basis,
-with all pending timers for a core being maintained in order of timer expiry in a skiplist data structure.
-The skiplist used has ten levels and each entry in the table appears in each level with probability ¼^level.
+Timers are tracked on a per-lcore basis, with all pending timers for a core being maintained in order of timer
+expiry in either a single skiplist data structure or an array of skiplists, depending on whether
+the lcore has been configured for multiple pending lists. Multiple pending lists can be enabled when an
+application experiences contention for a single list for that lcore; skiplists corresponding to every other
+enabled lcore will be created.
+Each skiplist data structure has ten levels and each entry in the table appears in each level with probability 0.25^level.
 This means that all entries are present in level 0, 1 in every 4 entries is present at level 1,
 one in every 16 at level 2 and so on up to level 9.
 This means that adding and removing entries from the timer list for a core can be done in log(n) time,
 up to 4^10 entries, that is, approximately 1,000,000 timers per lcore.
 
 A timer structure contains a special field called status,
-which is a union of a timer state (stopped, pending, running, config) and an owner (lcore id).
+which is a union of a timer state (stopped, pending, running, config), an index (lcore id), and an owner (lcore id).
 Depending on the timer state, we know if a timer is present in a list or not:
 
 *   STOPPED: no owner, not in a list
@@ -75,19 +78,23 @@ Depending on the timer state, we know if a timer is present in a list or not:
 
 Resetting or stopping a timer while it is in a CONFIG or RUNNING state is not allowed.
 When modifying the state of a timer,
-a Compare And Swap instruction should be used to guarantee that the status (state+owner) is modified atomically.
-
-Inside the rte_timer_manage() function,
-the skiplist is used as a regular list by iterating along the level 0 list, which contains all timer entries,
-until an entry which has not yet expired has been encountered.
-To improve performance in the case where there are entries in the timer list but none of those timers have yet expired,
+a Compare And Swap instruction should be used to guarantee that the status (state+index+owner) is modified atomically.
+
+Inside the rte_timer_manage() function, the timer lists are processed.
+If multiple pending lists have been enabled for an lcore, then each skiplist will
+be traversed sequentially, and run lists will be broken out and then processed.
+If multiple pending lists are not enabled for an lcore, then only a single skiplist will be traversed.
+A skiplist is used as a regular list by iterating along the level
+0 list, which contains all timer entries, until an entry which has not yet expired has been encountered.
+To improve performance in the case where there are entries in a skiplist but none of those timers have yet expired,
 the expiry time of the first list entry is maintained within the per-core timer list structure itself.
 On 64-bit platforms, this value can be checked without the need to take a lock on the overall structure.
 (Since expiry times are maintained as 64-bit values,
 a check on the value cannot be done on 32-bit platforms without using either a compare-and-swap (CAS) instruction or using a lock,
 so this additional check is skipped in favor of checking as normal once the lock has been taken.)
 On both 64-bit and 32-bit platforms,
-a call to rte_timer_manage() returns without taking a lock in the case where the timer list for the calling core is empty.
+rte_timer_manage() can either return or continue on to an lcore's next skiplist without taking a lock in the case where a timer list is empty,
+depending on whether or not the lcore has multiple pending lists.
 
 Use Cases
 ---------
diff --git a/doc/guides/rel_notes/release_17_11.rst b/doc/guides/rel_notes/release_17_11.rst
index 170f4f9..4683cbe 100644
--- a/doc/guides/rel_notes/release_17_11.rst
+++ b/doc/guides/rel_notes/release_17_11.rst
@@ -110,6 +110,13 @@ API Changes
    Also, make sure to start the actual text at the margin.
    =========================================================
 
+* **Updated timer library.**
+
+  The timer library has been updated; it can now support multiple timer lists
+  per lcore where it previously only had one.  This functionality is off by
+  default but can be enabled in cases where contention for a single list is
+  an issue with the new function ``rte_timer_subsystem_set_multi_pendlists()``.
+
 
 ABI Changes
 -----------
-- 
2.6.4

^ permalink raw reply	[relevance 3%]

* Re: [dpdk-dev] [PATCH v5] ethdev: add return code to rte_eth_stats_reset()
  @ 2017-09-19 17:14  0%   ` Ferruh Yigit
  2017-09-20 14:01  0%     ` David Harton (dharton)
  2017-09-20 14:11  3%   ` [dpdk-dev] [PATCH v6] " David C Harton
  1 sibling, 1 reply; 200+ results
From: Ferruh Yigit @ 2017-09-19 17:14 UTC (permalink / raw)
  To: David Harton, thomas; +Cc: dev

On 9/1/2017 3:26 AM, David Harton wrote:
> Some devices do not support reset of eth stats.  An application may
> need to know not to clear shadow stats if the device cannot.
> 
> rte_eth_stats_reset is updated to provide a return code to share
> whether the device supports reset or not.
> 
> Signed-off-by: David Harton <dharton@cisco.com>
> ---
> 
> v5:
> * squashed doc patch
> * moved rel_note change from ABI to API section
> 
> v4:
> * commented return values
> 
> v3:
> * overcame noob errors and figured out patch challenged
> 
> v2:
> * fixed soft tab issue inserted while moving changes
> 
>  doc/guides/rel_notes/release_17_11.rst | 13 +++++++++++++
>  lib/librte_ether/rte_ethdev.c          |  8 +++++---
>  lib/librte_ether/rte_ethdev.h          |  6 +++++-
>  3 files changed, 23 insertions(+), 4 deletions(-)
> 
> diff --git a/doc/guides/rel_notes/release_17_11.rst b/doc/guides/rel_notes/release_17_11.rst
> index 22df4fd..6282667 100644
> --- a/doc/guides/rel_notes/release_17_11.rst
> +++ b/doc/guides/rel_notes/release_17_11.rst
> @@ -110,6 +110,19 @@ API Changes
>     Also, make sure to start the actual text at the margin.
>     =========================================================
>  
> +* **Modified the return type of rte_eth_stats_reset.**
> +
> +  Changed return type of ``rte_eth_stats_reset`` from ``void`` to ``int``
> +  so the caller may know whether a device supports the operation or not
> +  and if the operation was carried out.
> +

> +* **Modified the vlan_offload_set_t function prototype in the ethdev library.**
> +
> +  Changed the function prototype of ``vlan_offload_set_t``.  The return value
> +  has been changed from ``void`` to ``int`` so the caller to knows whether
> +  the backing device supports the operation or if the operation was
> +  successfully performed.
> +

Is this addition to the document related to this patch?

>  * **Modified the vlan_offload_set_t function prototype in the ethdev library.**
>  
>    Changed the function prototype of ``vlan_offload_set_t``.  The return value
> diff --git a/lib/librte_ether/rte_ethdev.c b/lib/librte_ether/rte_ethdev.c
> index 05e52b8..f0f1775 100644
> --- a/lib/librte_ether/rte_ethdev.c
> +++ b/lib/librte_ether/rte_ethdev.c
> @@ -1341,17 +1341,19 @@ struct rte_eth_dev *
>  	return 0;
>  }
>  
> -void
> +int
>  rte_eth_stats_reset(uint8_t port_id)
>  {
>  	struct rte_eth_dev *dev;
>  
> -	RTE_ETH_VALID_PORTID_OR_RET(port_id);
> +	RTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -ENODEV);
>  	dev = &rte_eth_devices[port_id];
>  
> -	RTE_FUNC_PTR_OR_RET(*dev->dev_ops->stats_reset);
> +	RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->stats_reset, -ENOTSUP);
>  	(*dev->dev_ops->stats_reset)(dev);
>  	dev->data->rx_mbuf_alloc_failed = 0;
> +
> +	return 0;
>  }
>  
>  static int
> diff --git a/lib/librte_ether/rte_ethdev.h b/lib/librte_ether/rte_ethdev.h
> index 7254fd0..9110725 100644
> --- a/lib/librte_ether/rte_ethdev.h
> +++ b/lib/librte_ether/rte_ethdev.h
> @@ -2246,8 +2246,12 @@ int rte_eth_tx_queue_setup(uint8_t port_id, uint16_t tx_queue_id,
>   *
>   * @param port_id
>   *   The port identifier of the Ethernet device.
> + * @return
> + *   - (0) if device notified to reset stats.
> + *   - (-ENOTSUP) if hardware doesn't support.
> + *   - (-ENODEV) if *port_id* invalid.
>   */
> -void rte_eth_stats_reset(uint8_t port_id);
> +int rte_eth_stats_reset(uint8_t port_id);
>  
>  /**
>   * Retrieve names of extended statistics of an Ethernet device.
> 

^ permalink raw reply	[relevance 0%]

* [dpdk-dev] [PATCH v4] devtools: rework abi checker script
    @ 2017-09-20  9:12 27%   ` Olivier Matz
  2017-09-21 15:40  7%     ` Neil Horman
  2017-10-05  7:53 27%     ` [dpdk-dev] [PATCH v5] " Olivier Matz
  1 sibling, 2 replies; 200+ results
From: Olivier Matz @ 2017-09-20  9:12 UTC (permalink / raw)
  To: dev, nhorman, bruce.richardson

The initial version of the script had some limitations:
- cannot work on a non-clean workspace
- environment variables are not documented
- no compilation log in case of failure
- return success even it abi is incompatible

This patch addresses these issues and rework the code.

Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
---

v3->v4:
- clarify logs on incompatible abi
- log when an error returned an error
- [really] fix the report path
- log the output of make config in the proper file

v2->v3:
- fix when not launched from dpdk root dir
- use "-Og -Wno-error" instead of "-O0"
- fix typo in commit log

v1->v2:
- use /usr/bin/env to find bash (which is required)
- fix displayed path to html reports
- reword help for -f option


 devtools/validate-abi.sh | 397 ++++++++++++++++++++++++-----------------------
 1 file changed, 205 insertions(+), 192 deletions(-)

diff --git a/devtools/validate-abi.sh b/devtools/validate-abi.sh
index 0accc99b1..8caf43e83 100755
--- a/devtools/validate-abi.sh
+++ b/devtools/validate-abi.sh
@@ -1,7 +1,8 @@
-#!/bin/sh
+#!/usr/bin/env bash
 #   BSD LICENSE
 #
 #   Copyright(c) 2015 Neil Horman. All rights reserved.
+#   Copyright(c) 2017 6WIND S.A.
 #   All rights reserved.
 #
 #   Redistribution and use in source and binary forms, with or without
@@ -27,236 +28,248 @@
 #   (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
 #   OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
-TAG1=$1
-TAG2=$2
-TARGET=$3
-ABI_DIR=`mktemp -d -p /tmp ABI.XXXXXX`
+set -e
 
-usage() {
-	echo "$0 <REV1> <REV2> <TARGET>"
-}
+abicheck=abi-compliance-checker
+abidump=abi-dumper
+default_dst=abi-check
+default_target=x86_64-native-linuxapp-gcc
 
-log() {
-	local level=$1
-	shift
-	echo "$*"
+# trap on error
+err_report() {
+    echo "$0: error at line $1"
 }
+trap 'err_report $LINENO' ERR
 
-validate_tags() {
+print_usage () {
+	cat <<- END_OF_HELP
+	$(basename $0) [options] <rev1> <rev2>
 
-	if [ -z "$HASH1" ]
-	then
-		echo "invalid revision: $TAG1"
-		return
-	fi
-	if [ -z "$HASH2" ]
-	then
-		echo "invalid revision: $TAG2"
-		return
-	fi
+	This script compares the ABI of 2 git revisions of the current
+	workspace. The output is a html report and a compilation log.
+
+	The objective is to make sure that applications built against
+	DSOs from the first revision can still run when executed using
+	the DSOs built from the second revision.
+
+	<rev1> and <rev2> are git commit id or tags.
+
+	Options:
+	  -h		show this help
+	  -j <num>	enable parallel compilation with <num> threads
+	  -v		show compilation logs on the console
+	  -d <dir>	change working directory (default is ${default_dst})
+	  -t <target>	the dpdk target to use (default is ${default_target})
+	  -f		overwrite existing files in destination directory
+
+	The script returns 0 on success, or the value of last failing
+	call of ${abicheck} (incompatible abi or the tool has run with errors).
+	The errors returned by ${abidump} are ignored.
+
+	END_OF_HELP
 }
 
-validate_args() {
-	if [ -z "$TAG1" ]
-	then
-		echo "Must Specify REV1"
-		return
-	fi
-	if [ -z "$TAG2" ]
-	then
-		echo "Must Specify REV2"
-		return
-	fi
-	if [ -z "$TARGET" ]
-	then
-		echo "Must Specify a build target"
+# log in the file, and on stdout if verbose
+# $1: level string
+# $2: string to be logged
+log() {
+	echo "$1: $2"
+	if [ "${verbose}" != "true" ]; then
+		echo "$1: $2" >&3
 	fi
 }
 
+# launch a command and log it, taking care of surrounding spaces with quotes
+cmd() {
+	local i s whitespace ret
+	s=""
+	whitespace="[[:space:]]"
+	for i in "$@"; do
+		if [[ $i =~ $whitespace ]]; then
+			i=\"$i\"
+		fi
+		if [ -z "$s" ]; then
+			s="$i"
+		else
+			s="$s $i"
+		fi
+	done
+
+	ret=0
+	log "CMD" "$s"
+	"$@" || ret=$?
+	if [ "$ret" != "0" ]; then
+		log "CMD" "previous command returned $ret"
+	fi
+
+	return $ret
+}
 
-cleanup_and_exit() {
-	rm -rf $ABI_DIR
-	git checkout $CURRENT_BRANCH
-	exit $1
+# redirect or copy stderr/stdout to a file
+# the syntax is unfamiliar, but it makes the rest of the
+# code easier to read, avoiding the use of pipes
+set_log_file() {
+	# save original stdout and stderr in fd 3 and 4
+	exec 3>&1
+	exec 4>&2
+	# create a new fd 5 that send to a file
+	exec 5> >(cat > $1)
+	# send stdout and stderr to fd 5
+	if [ "${verbose}" = "true" ]; then
+		exec 1> >(tee /dev/fd/5 >&3)
+		exec 2> >(tee /dev/fd/5 >&4)
+	else
+		exec 1>&5
+		exec 2>&5
+	fi
 }
 
 # Make sure we configure SHARED libraries
 # Also turn off IGB and KNI as those require kernel headers to build
 fixup_config() {
-	sed -i -e"$ a\CONFIG_RTE_BUILD_SHARED_LIB=y" config/defconfig_$TARGET
-	sed -i -e"$ a\CONFIG_RTE_NEXT_ABI=n" config/defconfig_$TARGET
-	sed -i -e"$ a\CONFIG_RTE_EAL_IGB_UIO=n" config/defconfig_$TARGET
-	sed -i -e"$ a\CONFIG_RTE_LIBRTE_KNI=n" config/defconfig_$TARGET
-	sed -i -e"$ a\CONFIG_RTE_KNI_KMOD=n" config/defconfig_$TARGET
+	local conf=config/defconfig_$target
+	cmd sed -i -e"$ a\CONFIG_RTE_BUILD_SHARED_LIB=y" $conf
+	cmd sed -i -e"$ a\CONFIG_RTE_NEXT_ABI=n" $conf
+	cmd sed -i -e"$ a\CONFIG_RTE_EAL_IGB_UIO=n" $conf
+	cmd sed -i -e"$ a\CONFIG_RTE_LIBRTE_KNI=n" $conf
+	cmd sed -i -e"$ a\CONFIG_RTE_KNI_KMOD=n" $conf
 }
 
-###########################################
-#START
-############################################
+# build dpdk for the given tag and dump abi
+# $1: hash of the revision
+gen_abi() {
+	local i
+
+	cmd git clone ${dpdkroot} ${dst}/${1}
+	cmd cd ${dst}/${1}
+
+	log "INFO" "Checking out version ${1} of the dpdk"
+	# Move to the old version of the tree
+	cmd git checkout ${1}
+
+	fixup_config
+
+	# Now configure the build
+	log "INFO" "Configuring DPDK ${1}"
+	cmd make config T=$target O=$target
+
+	# Checking abi compliance relies on using the dwarf information in
+	# the shared objects. Build with -g to include them.
+	log "INFO" "Building DPDK ${1}. This might take a moment"
+	cmd make -j$parallel O=$target V=1 EXTRA_CFLAGS="-g -Og -Wno-error" \
+	    EXTRA_LDFLAGS="-g" || log "INFO" "The build failed"
+
+	# Move to the lib directory
+	cmd cd ${PWD}/$target/lib
+	log "INFO" "Collecting ABI information for ${1}"
+	for i in *.so; do
+		[ -e "$i" ] || break
+		cmd $abidump ${i} -o $dst/${1}/${i}.dump -lver ${1} || true
+		# hack to ignore empty SymbolsInfo section (no public ABI)
+		if grep -q "'SymbolInfo' => {}," $dst/${1}/${i}.dump \
+				2> /dev/null; then
+			log "INFO" "${i} has no public ABI, remove dump file"
+			cmd rm -f $dst/${1}/${i}.dump
+		fi
+	done
+}
 
-#trap on ctrl-c to clean up
-trap cleanup_and_exit SIGINT
+verbose=false
+parallel=1
+dst=${default_dst}
+target=${default_target}
+force=0
+while getopts j:vd:t:fh ARG ; do
+	case $ARG in
+		j ) parallel=$OPTARG ;;
+		v ) verbose=true ;;
+		d ) dst=$OPTARG ;;
+		t ) target=$OPTARG ;;
+		f ) force=1 ;;
+		h ) print_usage ; exit 0 ;;
+		? ) print_usage ; exit 1 ;;
+	esac
+done
+shift $(($OPTIND - 1))
 
-if [ -z "$DPDK_MAKE_JOBS" ]
-then
-	# This counts the number of cpus on the system
-	if [ -e /usr/bin/lscpu ]
-	then
-		DPDK_MAKE_JOBS=`lscpu -p=cpu | grep -v "#" | wc -l`
-	else
-		DPDK_MAKE_JOBS=1
-	fi
+if [ $# != 2 ]; then
+	print_usage
+	exit 1
 fi
 
-#Save the current branch
-CURRENT_BRANCH=`git branch | grep \* | cut -d' ' -f2`
+tag1=$1
+tag2=$2
 
-if [ -z "$CURRENT_BRANCH" ]
-then
-	CURRENT_BRANCH=`git log --pretty=format:%H HEAD~1..HEAD`
-fi
+# convert path to absolute
+case "${dst}" in
+	/*) ;;
+	*) dst=${PWD}/${dst} ;;
+esac
+dpdkroot=$(readlink -e $(dirname $0)/..)
 
-if [ -n "$VERBOSE" ]
-then
-	export VERBOSE=/dev/stdout
-else
-	export VERBOSE=/dev/null
+if [ -e "${dst}" -a "$force" = 0 ]; then
+	echo "The ${dst} directory is not empty. Remove it, use another"
+	echo "one (-d <dir>), or force overriding (-f)"
+	exit 1
 fi
 
-# Validate that we have all the arguments we need
-res=$(validate_args)
-if [ -n "$res" ]
-then
-	echo $res
-	usage
-	cleanup_and_exit 1
-fi
+rm -rf ${dst}
+mkdir -p ${dst}
+set_log_file ${dst}/abi-check.log
+log "INFO" "Logs available in ${dst}/abi-check.log"
 
-HASH1=$(git show -s --format=%H "$TAG1" -- 2> /dev/null | tail -1)
-HASH2=$(git show -s --format=%H "$TAG2" -- 2> /dev/null | tail -1)
+command -v ${abicheck} || log "INFO" "Can't find ${abicheck} utility"
+command -v ${abidump} || log "INFO" "Can't find ${abidump} utility"
 
-# Make sure our tags exist
-res=$(validate_tags)
-if [ -n "$res" ]
-then
-	echo $res
-	cleanup_and_exit 1
-fi
+hash1=$(git show -s --format=%h "$tag1" -- 2> /dev/null | tail -1)
+hash2=$(git show -s --format=%h "$tag2" -- 2> /dev/null | tail -1)
 
 # Make hashes available in output for non-local reference
-TAG1="$TAG1 ($HASH1)"
-TAG2="$TAG2 ($HASH2)"
-
-ABICHECK=`which abi-compliance-checker 2>/dev/null`
-if [ $? -ne 0 ]
-then
-	log "INFO" "Can't find abi-compliance-checker utility"
-	cleanup_and_exit 1
-fi
-
-ABIDUMP=`which abi-dumper 2>/dev/null`
-if [ $? -ne 0 ]
-then
-	log "INFO" "Can't find abi-dumper utility"
-	cleanup_and_exit 1
-fi
+tag1="$tag1 ($hash1)"
+tag2="$tag2 ($hash2)"
 
-log "INFO" "We're going to check and make sure that applications built"
-log "INFO" "against DPDK DSOs from version $TAG1 will still run when executed"
-log "INFO" "against DPDK DSOs built from version $TAG2."
-log "INFO" ""
-
-# Check to make sure we have a clean tree
-git status | grep -q clean
-if [ $? -ne 0 ]
-then
-	log "WARN" "Working directory not clean, aborting"
-	cleanup_and_exit 1
+if [ "$hash1" = "$hash2" ]; then
+	log "ERROR" "$tag1 and $tag2 are the same revisions"
+	exit 1
 fi
 
-# Move to the root of the git tree
-cd $(dirname $0)/..
+cmd mkdir -p ${dst}
 
-log "INFO" "Checking out version $TAG1 of the dpdk"
-# Move to the old version of the tree
-git checkout $HASH1
+# dump abi for each revision
+gen_abi ${hash1}
+gen_abi ${hash2}
 
-fixup_config
+# compare the abi dumps
+cmd cd ${dst}
+ret=0
+list=""
+for i in ${hash2}/*.dump; do
+	name=`basename $i`
+	libname=${name%.dump}
 
-# Checking abi compliance relies on using the dwarf information in
-# The shared objects.  Thats only included in the DSO's if we build
-# with -g
-export EXTRA_CFLAGS="$EXTRA_CFLAGS -g -O0"
-export EXTRA_LDFLAGS="$EXTRA_LDFLAGS -g"
-
-# Now configure the build
-log "INFO" "Configuring DPDK $TAG1"
-make config T=$TARGET O=$TARGET > $VERBOSE 2>&1
-
-log "INFO" "Building DPDK $TAG1. This might take a moment"
-make -j$DPDK_MAKE_JOBS O=$TARGET > $VERBOSE 2>&1
-
-if [ $? -ne 0 ]
-then
-	log "INFO" "THE BUILD FAILED.  ABORTING"
-	cleanup_and_exit 1
-fi
+	if [ ! -f ${hash1}/$name ]; then
+		log "INFO" "$NAME does not exist in $tag1. skipping..."
+		continue
+	fi
 
-# Move to the lib directory
-cd $TARGET/lib
-log "INFO" "COLLECTING ABI INFORMATION FOR $TAG1"
-for i in `ls *.so`
-do
-	$ABIDUMP $i -o $ABI_DIR/$i-ABI-0.dump -lver $HASH1
+	local_ret=0
+	cmd $abicheck -l $libname \
+	    -old ${hash1}/$name -new ${hash2}/$name || local_ret=$?
+	if [ $local_ret != 0 ]; then
+		log "NOTICE" "$abicheck returned $local_ret"
+		ret=$local_ret
+		list="$list $libname"
+	fi
 done
-cd ../..
-
-# Now clean the tree, checkout the second tag, and rebuild
-git clean -f -d
-git reset --hard
-# Move to the new version of the tree
-log "INFO" "Checking out version $TAG2 of the dpdk"
-git checkout $HASH2
-
-fixup_config
-
-# Now configure the build
-log "INFO" "Configuring DPDK $TAG2"
-make config T=$TARGET O=$TARGET > $VERBOSE 2>&1
-
-log "INFO" "Building DPDK $TAG2. This might take a moment"
-make -j$DPDK_MAKE_JOBS O=$TARGET > $VERBOSE 2>&1
 
-if [ $? -ne 0 ]
-then
-	log "INFO" "THE BUILD FAILED.  ABORTING"
-	cleanup_and_exit 1
+if [ $ret != 0 ]; then
+	log "NOTICE" "ABI may be incompatible, check reports/logs for details."
+	log "NOTICE" "Incompatible list: $list"
+else
+	log "NOTICE" "No error detected, ABI is compatible."
 fi
 
-cd $TARGET/lib
-log "INFO" "COLLECTING ABI INFORMATION FOR $TAG2"
-for i in `ls *.so`
-do
-	$ABIDUMP $i -o $ABI_DIR/$i-ABI-1.dump -lver $HASH2
-done
-cd ../..
-
-# Start comparison of ABI dumps
-for i in `ls $ABI_DIR/*-1.dump`
-do
-	NEWNAME=`basename $i`
-	OLDNAME=`basename $i | sed -e"s/1.dump/0.dump/"`
-	LIBNAME=`basename $i | sed -e"s/-ABI-1.dump//"`
-
-	if [ ! -f $ABI_DIR/$OLDNAME ]
-	then
-		log "INFO" "$OLDNAME DOES NOT EXIST IN $TAG1. SKIPPING..."
-	fi
-
-	#compare the abi dumps
-	$ABICHECK -l $LIBNAME -old $ABI_DIR/$OLDNAME -new $ABI_DIR/$NEWNAME
-done
+log "INFO" "Logs are in ${dst}/abi-check.log"
+log "INFO" "HTML reports are in ${dst}/compat_reports directory"
 
-git reset --hard
-log "INFO" "ABI CHECK COMPLETE.  REPORTS ARE IN compat_report directory"
-cleanup_and_exit 0
+exit $ret
-- 
2.11.0

^ permalink raw reply	[relevance 27%]

* Re: [dpdk-dev] [PATCH 05/11] lib/librte_mbuf: add security crypto flags and mbuf fields
  @ 2017-09-20  9:43  4%     ` Olivier MATZ
  0 siblings, 0 replies; 200+ results
From: Olivier MATZ @ 2017-09-20  9:43 UTC (permalink / raw)
  To: Boris Pismenny
  Cc: declan.doherty, pablo.de.lara.guarch, hemant.agrawal,
	radu.nicolau, Aviad Yehezkel, Thomas Monjalon, sandeep.malik,
	jerin.jacob, Akhil Goyal, dev, Nélio Laranjeiro

Hi Boris,

Some comments inline.

On Mon, Sep 18, 2017 at 07:54:03AM +0000, Boris Pismenny wrote:
> Hi Olivier,
> 
> On 9/14/2017 11:27 AM, Akhil Goyal wrote:
> > 
> > From: Boris Pismenny <borisp@mellanox.com>
> > 
> > add security crypto flags and update mbuf fields to support
> > IPsec crypto offload for transmitted packets, and to indicate
> > crypto result for received packets.
> > 
> > Signed-off-by: Aviad Yehezkel <aviadye@mellanox.com>
> > Signed-off-by: Boris Pismenny <borisp@mellanox.com>
> > Signed-off-by: Radu Nicolau <radu.nicolau@intel.com>
> > ---
> >  lib/librte_mbuf/rte_mbuf.c |  6 ++++++
> >  lib/librte_mbuf/rte_mbuf.h | 32 +++++++++++++++++++++++++++++---
> >  2 files changed, 35 insertions(+), 3 deletions(-)
> > 
> > diff --git a/lib/librte_mbuf/rte_mbuf.c b/lib/librte_mbuf/rte_mbuf.c
> > index 26a62b8..bbd42a6 100644
> > --- a/lib/librte_mbuf/rte_mbuf.c
> > +++ b/lib/librte_mbuf/rte_mbuf.c
> > @@ -323,6 +323,8 @@ const char *rte_get_rx_ol_flag_name(uint64_t mask)
> >  	case PKT_RX_QINQ_STRIPPED: return "PKT_RX_QINQ_STRIPPED";
> >  	case PKT_RX_LRO: return "PKT_RX_LRO";
> >  	case PKT_RX_TIMESTAMP: return "PKT_RX_TIMESTAMP";
> > +	case PKT_RX_SEC_OFFLOAD: return "PKT_RX_SECURITY_OFFLOAD";
> > +	case PKT_RX_SEC_OFFLOAD_FAILED: return
> > "PKT_RX_SECURITY_OFFLOAD_FAILED";

I think the string should be the same than the macro.
(SEC vs SECURITY)

> ...
> > +/**
> > + * Indicate that security offload processing was applied on the RX packet.
> > + */
> > +#define PKT_RX_SEC_OFFLOAD		(1ULL << 18)
> > +
> > +/**
> > + * Indicate that security offload processing failed on the RX packet.
> > + */
> > +#define PKT_RX_SEC_OFFLOAD_FAILED  (1ULL << 19)
> > +

If the presence of these flags implies that some fields are
valid (ex: inner_esp_next_proto), it should be specified in
the API comments.

> ...
> > @@ -456,8 +472,18 @@ struct rte_mbuf {
> >  			uint32_t l3_type:4; /**< (Outer) L3 type. */
> >  			uint32_t l4_type:4; /**< (Outer) L4 type. */
> >  			uint32_t tun_type:4; /**< Tunnel type. */
> > -			uint32_t inner_l2_type:4; /**< Inner L2 type. */
> > -			uint32_t inner_l3_type:4; /**< Inner L3 type. */
> > +			RTE_STD_C11
> > +			union {
> > +				uint8_t inner_esp_next_proto;
> > +
> > +				__extension__
> > +				struct {
> > +					uint8_t inner_l2_type:4;
> > +					/**< Inner L2 type. */
> > +					uint8_t inner_l3_type:4;
> > +					/**< Inner L3 type. */
> > +				};
> > +			};
> >  			uint32_t inner_l4_type:4; /**< Inner L4 type. */
> >  		};
> >  	};

The (quite useless) API comment is missing. I think we should
have it for consistency.

Can you please also detail in which conditions inner_esp_next_proto is
valid, and when inner_l2/l3_type is valid?

> What do you think about this change to mbuf?
> 
> It doesn't increase the mbuf size and it replaces some fields that have no meaning
> in IPsec encapsulations (inner L2 and L3) with a meaningful field of the correct
> size (inner_esp_next_proto - 8 bytes).
> 
> We later use this for IPsec offload on both Tx and Rx to indicate the packet format.
> 

Strangely, the abi-checker script finds an abi change. To me, it looks
like a false positive of abi-checker. The html output says:

  Field inner_l2_type has been removed from this type.
  Applications will access incorrect memory when attempting to access this field.

  Field inner_l3_type has been removed from this type.
  Applications will access incorrect memory when attempting to access this field.

  [−] affected symbols: 3 (15.8%)
  __rte_pktmbuf_read ( struct rte_mbuf const* m, uint32_t off, uint32_t len, void* buf ) @@ DPDK_16.11
  Field 'm.unnamed1.unnamed0' in 1st parameter 'm' (pointer) has type 'anon-struct-rte_mbuf.h-454'.
  rte_mbuf_sanity_check ( struct rte_mbuf const* m, int is_header ) @@ DPDK_2.0
  Field 'm.unnamed1.unnamed0' in 1st parameter 'm' (pointer) has type 'anon-struct-rte_mbuf.h-454'.
  rte_pktmbuf_dump ( FILE* f, struct rte_mbuf const* m, unsigned int dump_len ) @@ DPDK_2.0
  Field 'm.unnamed1.unnamed0' in 2nd parameter 'm' (pointer) has type 'anon-struct-rte_mbuf.h-454'.

If someone has a better explanation :)
You can reproduce it with the following patch:
http://dpdk.org/dev/patchwork/patch/28985/


However, with pahole, we can check that the sizes/offsets are
correct and also, the following test program behaves as expected:

  #include <stdio.h>
  #include <stdint.h>
  #include <string.h>
  #include <unistd.h>
  #include <sys/mman.h>
  
  struct mbuf1 {
  	union {
  		uint32_t           packet_type;
  		struct {
  			uint32_t   l2_type:4;
  			uint32_t   l3_type:4;
  			uint32_t   l4_type:4;
  			uint32_t   tun_type:4;
  			uint32_t   inner_l2_type:4;
  			uint32_t   inner_l3_type:4;
  			uint32_t   inner_l4_type:4;
  		};
  	};
  };
  
  struct mbuf2 {
  	union {
  		uint32_t           packet_type;
  		struct {
  			uint32_t   l2_type:4;
  			uint32_t   l3_type:4;
  			uint32_t   l4_type:4;
  			uint32_t   tun_type:4;
  			union {
  				uint8_t inner_esp_next_proto;
  				struct {
  					uint8_t inner_l2_type:4;
  					uint8_t inner_l3_type:4;
  				};
  			};
  			uint32_t   inner_l4_type:4;
  		};
  	};
  };
  
  int main(void)
  {
  	struct mbuf1 m1;
  	struct mbuf2 m2;
  
  	m1.l2_type = 0x1;
  	m1.l3_type = 0x2;
  	m1.l4_type = 0x3;
  	m1.tun_type = 0x4;
  	m1.inner_l2_type = 0x5;
  	m1.inner_l3_type = 0x6;
  	m1.inner_l4_type = 0x7;
  
  	printf("m1.l2_type=%x\n", m1.l2_type);
  	printf("m1.l3_type=%x\n", m1.l3_type);
  	printf("m1.l4_type=%x\n", m1.l4_type);
  	printf("m1.tun_type=%x\n", m1.tun_type);
  	printf("m1.inner_l2_type=%x\n", m1.inner_l2_type);
  	printf("m1.inner_l3_type=%x\n", m1.inner_l3_type);
  	printf("m1.inner_l4_type=%x\n", m1.inner_l4_type);
  
  	memcpy(&m2, &m1, sizeof(m2));
  
  	printf("m2.l2_type=%x\n", m2.l2_type);
  	printf("m2.l3_type=%x\n", m2.l3_type);
  	printf("m2.l4_type=%x\n", m2.l4_type);
  	printf("m2.tun_type=%x\n", m2.tun_type);
  	printf("m2.inner_l2_type=%x\n", m2.inner_l2_type);
  	printf("m2.inner_l3_type=%x\n", m2.inner_l3_type);
  	printf("m2.inner_l4_type=%x\n", m2.inner_l4_type);
  
  	return 0;
  }


Olivier

^ permalink raw reply	[relevance 4%]

* [dpdk-dev] [PATCH v5 0/5]
  @ 2017-09-20 13:35  4% ` Harry van Haaren
  2017-09-20 13:36  3%   ` [dpdk-dev] [PATCH v5 4/5] eventdev: add device started attribute Harry van Haaren
  2017-09-20 13:36  4%   ` [dpdk-dev] [PATCH v5 5/5] eventdev: bump library version Harry van Haaren
  0 siblings, 2 replies; 200+ results
From: Harry van Haaren @ 2017-09-20 13:35 UTC (permalink / raw)
  To: dev; +Cc: jerin.jacob, Harry van Haaren

This patchset refactors the eventdev API to be more flexible
and capable. In particular, the API is capable of returning an
error value if an invalid device, port or attribute ID is passed
in, which was not possible with the previous APIs.

The implementation of this patchset is based on a v1 patch[1],
and after some discussion this API was seen as the best solution.

In terms of flexibility, the attribute id allows addition of new
common eventdev layer attributes without breaking ABI or adding
new functions. Note that these attributes are not data-path, and
that PMDs should continue to use the xstats API for reporting any
unique PMD statistics that are available.

Regarding API/ABI compatibility, I have removed the functions from
the .map files - please review the .map file changes for ABI issues
carefully.

The last patch of this series adds a started attribute to the device,
allowing the application to query if a device is currently running.

-Harry

[1] http://dpdk.org/dev/patchwork/patch/27152/

---

v5:
- Bump library version of Eventdev (Jerin)
  - http://dpdk.org/ml/archives/dev/2017-September/075551.html

v4:
- Rework based on review by Jerin
  - default: cases into switches
  - Remove old functions from .map file
  - Remove /* out */ parameters
  - Rework header file definitions to match logical order
- Rework patch split
  - Cleaner removal of queue_count() function

v3:
- Fix checkpatch issues... somehow I broke my checkpatch script :/

v2:
- New APIs design based on discussion of initial patch.


Harry van Haaren (5):
  eventdev: add port attribute function
  eventdev: add dev attribute get function
  eventdev: add queue attribute function
  eventdev: add device started attribute
  eventdev: bump library version

 doc/guides/rel_notes/release_17_11.rst       |   2 +-
 lib/librte_eventdev/Makefile                 |   2 +-
 lib/librte_eventdev/rte_eventdev.c           |  97 ++++++++++++------
 lib/librte_eventdev/rte_eventdev.h           | 115 +++++++++++----------
 lib/librte_eventdev/rte_eventdev_version.map |  14 ++-
 test/test/test_eventdev.c                    | 132 +++++++++++++++++++------
 test/test/test_eventdev_octeontx.c           | 143 ++++++++++++++++++++-------
 7 files changed, 347 insertions(+), 158 deletions(-)

-- 
2.7.4

^ permalink raw reply	[relevance 4%]

* [dpdk-dev] [PATCH v5 4/5] eventdev: add device started attribute
  2017-09-20 13:35  4% ` [dpdk-dev] [PATCH v5 0/5] Harry van Haaren
@ 2017-09-20 13:36  3%   ` Harry van Haaren
  2017-09-20 13:36  4%   ` [dpdk-dev] [PATCH v5 5/5] eventdev: bump library version Harry van Haaren
  1 sibling, 0 replies; 200+ results
From: Harry van Haaren @ 2017-09-20 13:36 UTC (permalink / raw)
  To: dev; +Cc: jerin.jacob, Harry van Haaren

This commit adds an attribute to the eventdev, allowing applications
to retrieve if the eventdev is running or stopped. Note that no API
or ABI changes were required in adding the statistic, and code changes
are minimal.

Signed-off-by: Harry van Haaren <harry.van.haaren@intel.com>
Acked-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
---
 lib/librte_eventdev/rte_eventdev.c | 3 +++
 lib/librte_eventdev/rte_eventdev.h | 4 ++++
 2 files changed, 7 insertions(+)

diff --git a/lib/librte_eventdev/rte_eventdev.c b/lib/librte_eventdev/rte_eventdev.c
index 73e1df0..480b26e 100644
--- a/lib/librte_eventdev/rte_eventdev.c
+++ b/lib/librte_eventdev/rte_eventdev.c
@@ -740,6 +740,9 @@ rte_event_dev_attr_get(uint8_t dev_id, uint32_t attr_id,
 	case RTE_EVENT_DEV_ATTR_QUEUE_COUNT:
 		*attr_value = dev->data->nb_queues;
 		break;
+	case RTE_EVENT_DEV_ATTR_STARTED:
+		*attr_value = dev->data->dev_started;
+		break;
 	default:
 		return -EINVAL;
 	}
diff --git a/lib/librte_eventdev/rte_eventdev.h b/lib/librte_eventdev/rte_eventdev.h
index 3fd447a..1b629fc 100644
--- a/lib/librte_eventdev/rte_eventdev.h
+++ b/lib/librte_eventdev/rte_eventdev.h
@@ -407,6 +407,10 @@ rte_event_dev_info_get(uint8_t dev_id, struct rte_event_dev_info *dev_info);
  * The count of queues.
  */
 #define RTE_EVENT_DEV_ATTR_QUEUE_COUNT 1
+/**
+ * The status of the device, zero for stopped, non-zero for started.
+ */
+#define RTE_EVENT_DEV_ATTR_STARTED 2
 
 /**
  * Get an attribute from a device.
-- 
2.7.4

^ permalink raw reply	[relevance 3%]

* [dpdk-dev] [PATCH v5 5/5] eventdev: bump library version
  2017-09-20 13:35  4% ` [dpdk-dev] [PATCH v5 0/5] Harry van Haaren
  2017-09-20 13:36  3%   ` [dpdk-dev] [PATCH v5 4/5] eventdev: add device started attribute Harry van Haaren
@ 2017-09-20 13:36  4%   ` Harry van Haaren
  1 sibling, 0 replies; 200+ results
From: Harry van Haaren @ 2017-09-20 13:36 UTC (permalink / raw)
  To: dev; +Cc: jerin.jacob, Harry van Haaren

This commit bumps the library version to refect the ABI change
caused by removing the individual rte_event_port_count, queue_count,
and other get functions. These functions are superseded by the
get-attribute style API, which allows fetching values without API/ABI
changes.

Signed-off-by: Harry van Haaren <harry.van.haaren@intel.com>
---
 doc/guides/rel_notes/release_17_11.rst | 2 +-
 lib/librte_eventdev/Makefile           | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/doc/guides/rel_notes/release_17_11.rst b/doc/guides/rel_notes/release_17_11.rst
index 170f4f9..c09b1a1 100644
--- a/doc/guides/rel_notes/release_17_11.rst
+++ b/doc/guides/rel_notes/release_17_11.rst
@@ -152,7 +152,7 @@ The libraries prepended with a plus sign were incremented in this version.
      librte_distributor.so.1
      librte_eal.so.5
      librte_ethdev.so.7
-     librte_eventdev.so.2
+   + librte_eventdev.so.3
      librte_gro.so.1
      librte_hash.so.2
      librte_ip_frag.so.1
diff --git a/lib/librte_eventdev/Makefile b/lib/librte_eventdev/Makefile
index 410578a..7d73ca9 100644
--- a/lib/librte_eventdev/Makefile
+++ b/lib/librte_eventdev/Makefile
@@ -34,7 +34,7 @@ include $(RTE_SDK)/mk/rte.vars.mk
 LIB = librte_eventdev.a
 
 # library version
-LIBABIVER := 2
+LIBABIVER := 3
 
 # build flags
 CFLAGS += -O3
-- 
2.7.4

^ permalink raw reply	[relevance 4%]

* Re: [dpdk-dev] [PATCH v5] ethdev: add return code to rte_eth_stats_reset()
  2017-09-19 17:14  0%   ` Ferruh Yigit
@ 2017-09-20 14:01  0%     ` David Harton (dharton)
  2017-09-20 16:55  0%       ` Ferruh Yigit
  0 siblings, 1 reply; 200+ results
From: David Harton (dharton) @ 2017-09-20 14:01 UTC (permalink / raw)
  To: Ferruh Yigit, thomas; +Cc: dev



> -----Original Message-----
> From: Ferruh Yigit [mailto:ferruh.yigit@intel.com]
> 
> On 9/1/2017 3:26 AM, David Harton wrote:
> > Some devices do not support reset of eth stats.  An application may
> > need to know not to clear shadow stats if the device cannot.
> >
> > rte_eth_stats_reset is updated to provide a return code to share
> > whether the device supports reset or not.
> >
> > Signed-off-by: David Harton <dharton@cisco.com>
> > ---
> >
> > v5:
> > * squashed doc patch
> > * moved rel_note change from ABI to API section
> >
> > v4:
> > * commented return values
> >
> > v3:
> > * overcame noob errors and figured out patch challenged
> >
> > v2:
> > * fixed soft tab issue inserted while moving changes
> >
> >  doc/guides/rel_notes/release_17_11.rst | 13 +++++++++++++
> >  lib/librte_ether/rte_ethdev.c          |  8 +++++---
> >  lib/librte_ether/rte_ethdev.h          |  6 +++++-
> >  3 files changed, 23 insertions(+), 4 deletions(-)
> >
> > diff --git a/doc/guides/rel_notes/release_17_11.rst
> > b/doc/guides/rel_notes/release_17_11.rst
> > index 22df4fd..6282667 100644
> > --- a/doc/guides/rel_notes/release_17_11.rst
> > +++ b/doc/guides/rel_notes/release_17_11.rst
> > @@ -110,6 +110,19 @@ API Changes
> >     Also, make sure to start the actual text at the margin.
> >     =========================================================
> >
> > +* **Modified the return type of rte_eth_stats_reset.**
> > +
> > +  Changed return type of ``rte_eth_stats_reset`` from ``void`` to
> > + ``int``  so the caller may know whether a device supports the
> > + operation or not  and if the operation was carried out.
> > +
> 
> > +* **Modified the vlan_offload_set_t function prototype in the ethdev
> > +library.**
> > +
> > +  Changed the function prototype of ``vlan_offload_set_t``.  The
> > + return value  has been changed from ``void`` to ``int`` so the
> > + caller to knows whether  the backing device supports the operation
> > + or if the operation was  successfully performed.
> > +
> 
> Is this addition to the document related to this patch?

Good catch.  No. :(

I must have mishandled the rebase I did to update this patch.  V6 coming.  
Would be great if you could re-ACK afterwards so this one can move.

Thanks,
Dave

> 
> >  * **Modified the vlan_offload_set_t function prototype in the ethdev
> > library.**
> >
> >    Changed the function prototype of ``vlan_offload_set_t``.  The
> > return value diff --git a/lib/librte_ether/rte_ethdev.c
> > b/lib/librte_ether/rte_ethdev.c index 05e52b8..f0f1775 100644
> > --- a/lib/librte_ether/rte_ethdev.c
> > +++ b/lib/librte_ether/rte_ethdev.c
> > @@ -1341,17 +1341,19 @@ struct rte_eth_dev *
> >  	return 0;
> >  }
> >
> > -void
> > +int
> >  rte_eth_stats_reset(uint8_t port_id)
> >  {
> >  	struct rte_eth_dev *dev;
> >
> > -	RTE_ETH_VALID_PORTID_OR_RET(port_id);
> > +	RTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -ENODEV);
> >  	dev = &rte_eth_devices[port_id];
> >
> > -	RTE_FUNC_PTR_OR_RET(*dev->dev_ops->stats_reset);
> > +	RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->stats_reset, -ENOTSUP);
> >  	(*dev->dev_ops->stats_reset)(dev);
> >  	dev->data->rx_mbuf_alloc_failed = 0;
> > +
> > +	return 0;
> >  }
> >
> >  static int
> > diff --git a/lib/librte_ether/rte_ethdev.h
> > b/lib/librte_ether/rte_ethdev.h index 7254fd0..9110725 100644
> > --- a/lib/librte_ether/rte_ethdev.h
> > +++ b/lib/librte_ether/rte_ethdev.h
> > @@ -2246,8 +2246,12 @@ int rte_eth_tx_queue_setup(uint8_t port_id,
> uint16_t tx_queue_id,
> >   *
> >   * @param port_id
> >   *   The port identifier of the Ethernet device.
> > + * @return
> > + *   - (0) if device notified to reset stats.
> > + *   - (-ENOTSUP) if hardware doesn't support.
> > + *   - (-ENODEV) if *port_id* invalid.
> >   */
> > -void rte_eth_stats_reset(uint8_t port_id);
> > +int rte_eth_stats_reset(uint8_t port_id);
> >
> >  /**
> >   * Retrieve names of extended statistics of an Ethernet device.
> >


^ permalink raw reply	[relevance 0%]

* [dpdk-dev] [PATCH v6] ethdev: add return code to rte_eth_stats_reset()
    2017-09-19 17:14  0%   ` Ferruh Yigit
@ 2017-09-20 14:11  3%   ` David C Harton
  1 sibling, 0 replies; 200+ results
From: David C Harton @ 2017-09-20 14:11 UTC (permalink / raw)
  To: thomas, ferruh.yigit; +Cc: dev, David Harton

From: David Harton <dharton@cisco.com>

Some devices do not support reset of eth stats.  An application may
need to know not to clear shadow stats if the device cannot.

rte_eth_stats_reset is updated to provide a return code to share
whether the device supports reset or not.

Signed-off-by: David Harton <dharton@cisco.com>
---

v6:
* removed duplicated entry on rel_notes

v5:
* squashed doc patch
* moved rel_note change from ABI to API section

v4:
* commented return values

v3:
* overcame noob errors and figured out patch challenged

v2:
* fixed soft tab issue inserted while moving changes

 doc/guides/rel_notes/release_17_11.rst | 6 ++++++
 lib/librte_ether/rte_ethdev.c          | 8 +++++---
 lib/librte_ether/rte_ethdev.h          | 6 +++++-
 3 files changed, 16 insertions(+), 4 deletions(-)

diff --git a/doc/guides/rel_notes/release_17_11.rst b/doc/guides/rel_notes/release_17_11.rst
index 22df4fd..9b77c31 100644
--- a/doc/guides/rel_notes/release_17_11.rst
+++ b/doc/guides/rel_notes/release_17_11.rst
@@ -110,6 +110,12 @@ API Changes
    Also, make sure to start the actual text at the margin.
    =========================================================
 
+* **Modified the return type of rte_eth_stats_reset.**
+
+  Changed return type of ``rte_eth_stats_reset`` from ``void`` to ``int``
+  so the caller may know whether a device supports the operation or not
+  and if the operation was carried out.
+
 * **Modified the vlan_offload_set_t function prototype in the ethdev library.**
 
   Changed the function prototype of ``vlan_offload_set_t``.  The return value
diff --git a/lib/librte_ether/rte_ethdev.c b/lib/librte_ether/rte_ethdev.c
index 05e52b8..f0f1775 100644
--- a/lib/librte_ether/rte_ethdev.c
+++ b/lib/librte_ether/rte_ethdev.c
@@ -1341,17 +1341,19 @@ rte_eth_stats_get(uint8_t port_id, struct rte_eth_stats *stats)
 	return 0;
 }
 
-void
+int
 rte_eth_stats_reset(uint8_t port_id)
 {
 	struct rte_eth_dev *dev;
 
-	RTE_ETH_VALID_PORTID_OR_RET(port_id);
+	RTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -ENODEV);
 	dev = &rte_eth_devices[port_id];
 
-	RTE_FUNC_PTR_OR_RET(*dev->dev_ops->stats_reset);
+	RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->stats_reset, -ENOTSUP);
 	(*dev->dev_ops->stats_reset)(dev);
 	dev->data->rx_mbuf_alloc_failed = 0;
+
+	return 0;
 }
 
 static int
diff --git a/lib/librte_ether/rte_ethdev.h b/lib/librte_ether/rte_ethdev.h
index 7254fd0..9110725 100644
--- a/lib/librte_ether/rte_ethdev.h
+++ b/lib/librte_ether/rte_ethdev.h
@@ -2246,8 +2246,12 @@ int rte_eth_stats_get(uint8_t port_id, struct rte_eth_stats *stats);
  *
  * @param port_id
  *   The port identifier of the Ethernet device.
+ * @return
+ *   - (0) if device notified to reset stats.
+ *   - (-ENOTSUP) if hardware doesn't support.
+ *   - (-ENODEV) if *port_id* invalid.
  */
-void rte_eth_stats_reset(uint8_t port_id);
+int rte_eth_stats_reset(uint8_t port_id);
 
 /**
  * Retrieve names of extended statistics of an Ethernet device.
-- 
2.10.3.dirty

^ permalink raw reply	[relevance 3%]

* [dpdk-dev] [PATCH v3 3/6] net/i40e: implement dynamic mapping of sw flow types to hw pctypes
  @ 2017-09-20 14:33  4%   ` Kirill Rybalchenko
  2017-09-25  9:44  0%     ` Xing, Beilei
    1 sibling, 1 reply; 200+ results
From: Kirill Rybalchenko @ 2017-09-20 14:33 UTC (permalink / raw)
  To: dev; +Cc: kirill.rybalchenko, andrey.chilikin, beilei.xing, jingjing.wu

Implement dynamic mapping of software flow types to hardware pctypes.
This allows to add new flow types and pctypes for DDP without changing
API of the driver. The mapping table is located in private
data area for particular network adapter and can be individually
modified with set of appropriate functions.

v2:
Re-arrange patchset to avoid compillation errors.
Remove usage of statically defined flow types and pctypes.

v3:
Changed prototypes of some static functions.
Fixed bugs in i40e_pctype_to_flowtype and i40e_flowtype_to_pctype
functions.
Various small modifications after reviewing.

Signed-off-by: Kirill Rybalchenko <kirill.rybalchenko@intel.com>
---
 drivers/net/i40e/i40e_ethdev.c    | 343 ++++++++++++--------------------------
 drivers/net/i40e/i40e_ethdev.h    |  17 +-
 drivers/net/i40e/i40e_ethdev_vf.c |  16 +-
 drivers/net/i40e/i40e_fdir.c      |  54 +++---
 drivers/net/i40e/i40e_flow.c      |   5 +-
 drivers/net/i40e/i40e_rxtx.c      |  57 +++++++
 drivers/net/i40e/i40e_rxtx.h      |   1 +
 7 files changed, 208 insertions(+), 285 deletions(-)

diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c
index 18eac07..e396f73 100644
--- a/drivers/net/i40e/i40e_ethdev.c
+++ b/drivers/net/i40e/i40e_ethdev.c
@@ -1064,6 +1064,7 @@ eth_i40e_dev_init(struct rte_eth_dev *dev)
 		return 0;
 	}
 	i40e_set_default_ptype_table(dev);
+	i40e_set_default_pctype_table(dev);
 	pci_dev = RTE_ETH_DEV_TO_PCI(dev);
 	intr_handle = &pci_dev->intr_handle;
 
@@ -3000,7 +3001,7 @@ i40e_dev_info_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info)
 	dev_info->hash_key_size = (I40E_PFQF_HKEY_MAX_INDEX + 1) *
 						sizeof(uint32_t);
 	dev_info->reta_size = pf->hash_lut_size;
-	dev_info->flow_type_rss_offloads = I40E_RSS_OFFLOAD_ALL;
+	dev_info->flow_type_rss_offloads = pf->adapter->flow_types_mask;
 
 	dev_info->default_rxconf = (struct rte_eth_rxconf) {
 		.rx_thresh = {
@@ -6591,104 +6592,36 @@ i40e_vsi_delete_mac(struct i40e_vsi *vsi, struct ether_addr *addr)
 
 /* Configure hash enable flags for RSS */
 uint64_t
-i40e_config_hena(uint64_t flags, enum i40e_mac_type type)
+i40e_config_hena(const struct i40e_adapter *adapter, uint64_t flags)
 {
 	uint64_t hena = 0;
+	int i;
 
 	if (!flags)
 		return hena;
 
-	if (flags & ETH_RSS_FRAG_IPV4)
-		hena |= 1ULL << I40E_FILTER_PCTYPE_FRAG_IPV4;
-	if (flags & ETH_RSS_NONFRAG_IPV4_TCP) {
-		if (type == I40E_MAC_X722) {
-			hena |= (1ULL << I40E_FILTER_PCTYPE_NONF_IPV4_TCP) |
-			 (1ULL << I40E_FILTER_PCTYPE_NONF_IPV4_TCP_SYN_NO_ACK);
-		} else
-			hena |= 1ULL << I40E_FILTER_PCTYPE_NONF_IPV4_TCP;
-	}
-	if (flags & ETH_RSS_NONFRAG_IPV4_UDP) {
-		if (type == I40E_MAC_X722) {
-			hena |= (1ULL << I40E_FILTER_PCTYPE_NONF_IPV4_UDP) |
-			 (1ULL << I40E_FILTER_PCTYPE_NONF_UNICAST_IPV4_UDP) |
-			 (1ULL << I40E_FILTER_PCTYPE_NONF_MULTICAST_IPV4_UDP);
-		} else
-			hena |= 1ULL << I40E_FILTER_PCTYPE_NONF_IPV4_UDP;
-	}
-	if (flags & ETH_RSS_NONFRAG_IPV4_SCTP)
-		hena |= 1ULL << I40E_FILTER_PCTYPE_NONF_IPV4_SCTP;
-	if (flags & ETH_RSS_NONFRAG_IPV4_OTHER)
-		hena |= 1ULL << I40E_FILTER_PCTYPE_NONF_IPV4_OTHER;
-	if (flags & ETH_RSS_FRAG_IPV6)
-		hena |= 1ULL << I40E_FILTER_PCTYPE_FRAG_IPV6;
-	if (flags & ETH_RSS_NONFRAG_IPV6_TCP) {
-		if (type == I40E_MAC_X722) {
-			hena |= (1ULL << I40E_FILTER_PCTYPE_NONF_IPV6_TCP) |
-			 (1ULL << I40E_FILTER_PCTYPE_NONF_IPV6_TCP_SYN_NO_ACK);
-		} else
-			hena |= 1ULL << I40E_FILTER_PCTYPE_NONF_IPV6_TCP;
+	for (i = RTE_ETH_FLOW_UNKNOWN + 1; i < I40E_FLOW_TYPE_MAX; i++) {
+		if (flags & (1ULL << i))
+			hena |= adapter->pctypes_tbl[i];
 	}
-	if (flags & ETH_RSS_NONFRAG_IPV6_UDP) {
-		if (type == I40E_MAC_X722) {
-			hena |= (1ULL << I40E_FILTER_PCTYPE_NONF_IPV6_UDP) |
-			 (1ULL << I40E_FILTER_PCTYPE_NONF_UNICAST_IPV6_UDP) |
-			 (1ULL << I40E_FILTER_PCTYPE_NONF_MULTICAST_IPV6_UDP);
-		} else
-			hena |= 1ULL << I40E_FILTER_PCTYPE_NONF_IPV6_UDP;
-	}
-	if (flags & ETH_RSS_NONFRAG_IPV6_SCTP)
-		hena |= 1ULL << I40E_FILTER_PCTYPE_NONF_IPV6_SCTP;
-	if (flags & ETH_RSS_NONFRAG_IPV6_OTHER)
-		hena |= 1ULL << I40E_FILTER_PCTYPE_NONF_IPV6_OTHER;
-	if (flags & ETH_RSS_L2_PAYLOAD)
-		hena |= 1ULL << I40E_FILTER_PCTYPE_L2_PAYLOAD;
 
 	return hena;
 }
 
 /* Parse the hash enable flags */
 uint64_t
-i40e_parse_hena(uint64_t flags)
+i40e_parse_hena(const struct i40e_adapter *adapter, uint64_t flags)
 {
 	uint64_t rss_hf = 0;
 
 	if (!flags)
 		return rss_hf;
-	if (flags & (1ULL << I40E_FILTER_PCTYPE_FRAG_IPV4))
-		rss_hf |= ETH_RSS_FRAG_IPV4;
-	if (flags & (1ULL << I40E_FILTER_PCTYPE_NONF_IPV4_TCP))
-		rss_hf |= ETH_RSS_NONFRAG_IPV4_TCP;
-	if (flags & (1ULL << I40E_FILTER_PCTYPE_NONF_IPV4_TCP_SYN_NO_ACK))
-		rss_hf |= ETH_RSS_NONFRAG_IPV4_TCP;
-	if (flags & (1ULL << I40E_FILTER_PCTYPE_NONF_IPV4_UDP))
-		rss_hf |= ETH_RSS_NONFRAG_IPV4_UDP;
-	if (flags & (1ULL << I40E_FILTER_PCTYPE_NONF_UNICAST_IPV4_UDP))
-		rss_hf |= ETH_RSS_NONFRAG_IPV4_UDP;
-	if (flags & (1ULL << I40E_FILTER_PCTYPE_NONF_MULTICAST_IPV4_UDP))
-		rss_hf |= ETH_RSS_NONFRAG_IPV4_UDP;
-	if (flags & (1ULL << I40E_FILTER_PCTYPE_NONF_IPV4_SCTP))
-		rss_hf |= ETH_RSS_NONFRAG_IPV4_SCTP;
-	if (flags & (1ULL << I40E_FILTER_PCTYPE_NONF_IPV4_OTHER))
-		rss_hf |= ETH_RSS_NONFRAG_IPV4_OTHER;
-	if (flags & (1ULL << I40E_FILTER_PCTYPE_FRAG_IPV6))
-		rss_hf |= ETH_RSS_FRAG_IPV6;
-	if (flags & (1ULL << I40E_FILTER_PCTYPE_NONF_IPV6_TCP))
-		rss_hf |= ETH_RSS_NONFRAG_IPV6_TCP;
-	if (flags & (1ULL << I40E_FILTER_PCTYPE_NONF_IPV6_TCP_SYN_NO_ACK))
-		rss_hf |= ETH_RSS_NONFRAG_IPV6_TCP;
-	if (flags & (1ULL << I40E_FILTER_PCTYPE_NONF_IPV6_UDP))
-		rss_hf |= ETH_RSS_NONFRAG_IPV6_UDP;
-	if (flags & (1ULL << I40E_FILTER_PCTYPE_NONF_UNICAST_IPV6_UDP))
-		rss_hf |= ETH_RSS_NONFRAG_IPV6_UDP;
-	if (flags & (1ULL << I40E_FILTER_PCTYPE_NONF_MULTICAST_IPV6_UDP))
-		rss_hf |= ETH_RSS_NONFRAG_IPV6_UDP;
-	if (flags & (1ULL << I40E_FILTER_PCTYPE_NONF_IPV6_SCTP))
-		rss_hf |= ETH_RSS_NONFRAG_IPV6_SCTP;
-	if (flags & (1ULL << I40E_FILTER_PCTYPE_NONF_IPV6_OTHER))
-		rss_hf |= ETH_RSS_NONFRAG_IPV6_OTHER;
-	if (flags & (1ULL << I40E_FILTER_PCTYPE_L2_PAYLOAD))
-		rss_hf |= ETH_RSS_L2_PAYLOAD;
+	int i;
 
+	for (i = RTE_ETH_FLOW_UNKNOWN + 1; i < I40E_FLOW_TYPE_MAX; i++) {
+		if (flags & adapter->pctypes_tbl[i])
+			rss_hf |= (1ULL << i);
+	}
 	return rss_hf;
 }
 
@@ -6779,7 +6712,7 @@ i40e_hw_rss_hash_set(struct i40e_pf *pf, struct rte_eth_rss_conf *rss_conf)
 	if (ret)
 		return ret;
 
-	hena = i40e_config_hena(rss_conf->rss_hf, hw->mac.type);
+	hena = i40e_config_hena(pf->adapter, rss_conf->rss_hf);
 	i40e_write_rx_ctl(hw, I40E_PFQF_HENA(0), (uint32_t)hena);
 	i40e_write_rx_ctl(hw, I40E_PFQF_HENA(1), (uint32_t)(hena >> 32));
 	I40E_WRITE_FLUSH(hw);
@@ -6793,14 +6726,13 @@ i40e_dev_rss_hash_update(struct rte_eth_dev *dev,
 {
 	struct i40e_pf *pf = I40E_DEV_PRIVATE_TO_PF(dev->data->dev_private);
 	struct i40e_hw *hw = I40E_DEV_PRIVATE_TO_HW(dev->data->dev_private);
-	uint64_t rss_hf = rss_conf->rss_hf & I40E_RSS_OFFLOAD_ALL;
+	uint64_t rss_hf = rss_conf->rss_hf & pf->adapter->flow_types_mask;
 	uint64_t hena;
 
 	hena = (uint64_t)i40e_read_rx_ctl(hw, I40E_PFQF_HENA(0));
 	hena |= ((uint64_t)i40e_read_rx_ctl(hw, I40E_PFQF_HENA(1))) << 32;
-	if (!(hena & ((hw->mac.type == I40E_MAC_X722)
-		 ? I40E_RSS_HENA_ALL_X722
-		 : I40E_RSS_HENA_ALL))) { /* RSS disabled */
+
+	if (!(hena & pf->adapter->pctypes_mask)) { /* RSS disabled */
 		if (rss_hf != 0) /* Enable RSS */
 			return -EINVAL;
 		return 0; /* Nothing to do */
@@ -6825,7 +6757,7 @@ i40e_dev_rss_hash_conf_get(struct rte_eth_dev *dev,
 
 	hena = (uint64_t)i40e_read_rx_ctl(hw, I40E_PFQF_HENA(0));
 	hena |= ((uint64_t)i40e_read_rx_ctl(hw, I40E_PFQF_HENA(1))) << 32;
-	rss_conf->rss_hf = i40e_parse_hena(hena);
+	rss_conf->rss_hf = i40e_parse_hena(pf->adapter, hena);
 
 	return 0;
 }
@@ -7600,7 +7532,7 @@ i40e_pf_config_rss(struct i40e_pf *pf)
 	}
 
 	rss_conf = pf->dev_data->dev_conf.rx_adv_conf.rss_conf;
-	if ((rss_conf.rss_hf & I40E_RSS_OFFLOAD_ALL) == 0) {
+	if ((rss_conf.rss_hf & pf->adapter->flow_types_mask) == 0) {
 		i40e_pf_disable_rss(pf);
 		return 0;
 	}
@@ -7821,9 +7753,9 @@ static int
 i40e_get_hash_filter_global_config(struct i40e_hw *hw,
 				   struct rte_eth_hash_global_conf *g_cfg)
 {
-	uint32_t reg, mask = I40E_FLOW_TYPES;
-	uint16_t i;
-	enum i40e_filter_pctype pctype;
+	struct i40e_adapter *adapter = (struct i40e_adapter *)hw->back;
+	uint32_t reg;
+	uint16_t i, j;
 
 	memset(g_cfg, 0, sizeof(*g_cfg));
 	reg = i40e_read_rx_ctl(hw, I40E_GLQF_CTL);
@@ -7834,29 +7766,37 @@ i40e_get_hash_filter_global_config(struct i40e_hw *hw,
 	PMD_DRV_LOG(DEBUG, "Hash function is %s",
 		(reg & I40E_GLQF_CTL_HTOEP_MASK) ? "Toeplitz" : "Simple XOR");
 
-	for (i = 0; mask && i < RTE_ETH_FLOW_MAX; i++) {
-		if (!(mask & (1UL << i)))
-			continue;
-		mask &= ~(1UL << i);
-		/* Bit set indicats the coresponding flow type is supported */
-		g_cfg->valid_bit_mask[0] |= (1UL << i);
-		/* if flowtype is invalid, continue */
-		if (!I40E_VALID_FLOW(i))
-			continue;
-		pctype = i40e_flowtype_to_pctype(i);
-		reg = i40e_read_rx_ctl(hw, I40E_GLQF_HSYM(pctype));
-		if (reg & I40E_GLQF_HSYM_SYMH_ENA_MASK)
-			g_cfg->sym_hash_enable_mask[0] |= (1UL << i);
+	/*
+	 * We work only with lowest 32 bits which is not correct, but to work
+	 * properly the valid_bit_mask size should be increased up to 64 bits
+	 * and this will brake ABI. This modification will be done in next release
+	 */
+	g_cfg->valid_bit_mask[0] = (uint32_t)adapter->flow_types_mask;
+
+	for (i = RTE_ETH_FLOW_UNKNOWN + 1; i < UINT32_BIT; i++) {
+		if (adapter->pctypes_tbl[i]) {
+			for (j = I40E_FILTER_PCTYPE_INVALID + 1;
+			     j < I40E_FILTER_PCTYPE_MAX; j++) {
+				if (adapter->pctypes_tbl[i] & (1ULL << j)) {
+					reg = i40e_read_rx_ctl(hw, I40E_GLQF_HSYM(j));
+					if (reg & I40E_GLQF_HSYM_SYMH_ENA_MASK) {
+						g_cfg->sym_hash_enable_mask[0] |=
+									(1UL << i);
+					}
+				}
+			}
+		}
 	}
 
 	return 0;
 }
 
 static int
-i40e_hash_global_config_check(struct rte_eth_hash_global_conf *g_cfg)
+i40e_hash_global_config_check(struct rte_eth_hash_global_conf *g_cfg,
+			      struct i40e_adapter *adapter)
 {
 	uint32_t i;
-	uint32_t mask0, i40e_mask = I40E_FLOW_TYPES;
+	uint32_t mask0, i40e_mask = adapter->flow_types_mask;
 
 	if (g_cfg->hash_func != RTE_ETH_HASH_FUNCTION_TOEPLITZ &&
 		g_cfg->hash_func != RTE_ETH_HASH_FUNCTION_SIMPLE_XOR &&
@@ -7899,64 +7839,32 @@ static int
 i40e_set_hash_filter_global_config(struct i40e_hw *hw,
 				   struct rte_eth_hash_global_conf *g_cfg)
 {
+	struct i40e_adapter *adapter = (struct i40e_adapter *)hw->back;
 	int ret;
-	uint16_t i;
+	uint16_t i, j;
 	uint32_t reg;
-	uint32_t mask0 = g_cfg->valid_bit_mask[0];
-	enum i40e_filter_pctype pctype;
+	/*
+	 * We work only with lowest 32 bits which is not correct, but to work
+	 * properly the valid_bit_mask size should be increased up to 64 bits
+	 * and this will brake ABI. This modification will be done in next release
+	 */
+	uint32_t mask0 = g_cfg->valid_bit_mask[0] & (uint32_t)adapter->flow_types_mask;
 
 	/* Check the input parameters */
-	ret = i40e_hash_global_config_check(g_cfg);
+	ret = i40e_hash_global_config_check(g_cfg, adapter);
 	if (ret < 0)
 		return ret;
 
-	for (i = 0; mask0 && i < UINT32_BIT; i++) {
-		if (!(mask0 & (1UL << i)))
-			continue;
-		mask0 &= ~(1UL << i);
-		/* if flowtype is invalid, continue */
-		if (!I40E_VALID_FLOW(i))
-			continue;
-		pctype = i40e_flowtype_to_pctype(i);
-		reg = (g_cfg->sym_hash_enable_mask[0] & (1UL << i)) ?
-				I40E_GLQF_HSYM_SYMH_ENA_MASK : 0;
-		if (hw->mac.type == I40E_MAC_X722) {
-			if (pctype == I40E_FILTER_PCTYPE_NONF_IPV4_UDP) {
-				i40e_write_rx_ctl(hw, I40E_GLQF_HSYM(
-				  I40E_FILTER_PCTYPE_NONF_IPV4_UDP), reg);
-				i40e_write_rx_ctl(hw, I40E_GLQF_HSYM(
-				  I40E_FILTER_PCTYPE_NONF_UNICAST_IPV4_UDP),
-				  reg);
-				i40e_write_rx_ctl(hw, I40E_GLQF_HSYM(
-				  I40E_FILTER_PCTYPE_NONF_MULTICAST_IPV4_UDP),
-				  reg);
-			} else if (pctype == I40E_FILTER_PCTYPE_NONF_IPV4_TCP) {
-				i40e_write_rx_ctl(hw, I40E_GLQF_HSYM(
-				  I40E_FILTER_PCTYPE_NONF_IPV4_TCP), reg);
-				i40e_write_rx_ctl(hw, I40E_GLQF_HSYM(
-				  I40E_FILTER_PCTYPE_NONF_IPV4_TCP_SYN_NO_ACK),
-				  reg);
-			} else if (pctype == I40E_FILTER_PCTYPE_NONF_IPV6_UDP) {
-				i40e_write_rx_ctl(hw, I40E_GLQF_HSYM(
-				  I40E_FILTER_PCTYPE_NONF_IPV6_UDP), reg);
-				i40e_write_rx_ctl(hw, I40E_GLQF_HSYM(
-				  I40E_FILTER_PCTYPE_NONF_UNICAST_IPV6_UDP),
-				  reg);
-				i40e_write_rx_ctl(hw, I40E_GLQF_HSYM(
-				  I40E_FILTER_PCTYPE_NONF_MULTICAST_IPV6_UDP),
-				  reg);
-			} else if (pctype == I40E_FILTER_PCTYPE_NONF_IPV6_TCP) {
-				i40e_write_rx_ctl(hw, I40E_GLQF_HSYM(
-				  I40E_FILTER_PCTYPE_NONF_IPV6_TCP), reg);
-				i40e_write_rx_ctl(hw, I40E_GLQF_HSYM(
-				  I40E_FILTER_PCTYPE_NONF_IPV6_TCP_SYN_NO_ACK),
-				  reg);
-			} else {
-				i40e_write_rx_ctl(hw, I40E_GLQF_HSYM(pctype),
-				  reg);
+	for (i = RTE_ETH_FLOW_UNKNOWN + 1; i < UINT32_BIT; i++) {
+		if (mask0 & (1UL << i)) {
+			reg = (g_cfg->sym_hash_enable_mask[0] & (1UL << i)) ?
+					I40E_GLQF_HSYM_SYMH_ENA_MASK : 0;
+
+			for (j = I40E_FILTER_PCTYPE_INVALID + 1;
+			     j < I40E_FILTER_PCTYPE_MAX; j++) {
+				if (adapter->pctypes_tbl[i] & (1ULL << j))
+					i40e_write_rx_ctl(hw, I40E_GLQF_HSYM(j), reg);
 			}
-		} else {
-			i40e_write_rx_ctl(hw, I40E_GLQF_HSYM(pctype), reg);
 		}
 	}
 
@@ -8581,13 +8489,10 @@ i40e_filter_input_set_init(struct i40e_pf *pf)
 
 	for (pctype = I40E_FILTER_PCTYPE_NONF_IPV4_UDP;
 	     pctype <= I40E_FILTER_PCTYPE_L2_PAYLOAD; pctype++) {
-		if (hw->mac.type == I40E_MAC_X722) {
-			if (!I40E_VALID_PCTYPE_X722(pctype))
-				continue;
-		} else {
-			if (!I40E_VALID_PCTYPE(pctype))
-				continue;
-		}
+		uint16_t flow_type = i40e_pctype_to_flowtype(pf->adapter, pctype);
+
+		if (flow_type == RTE_ETH_FLOW_UNKNOWN)
+			continue;
 
 		input_set = i40e_get_default_input_set(pctype);
 
@@ -8650,7 +8555,8 @@ i40e_hash_filter_inset_select(struct i40e_hw *hw,
 		return -EINVAL;
 	}
 
-	if (!I40E_VALID_FLOW(conf->flow_type)) {
+	pctype = i40e_flowtype_to_pctype(pf->adapter, conf->flow_type);
+	if (pctype == I40E_FILTER_PCTYPE_INVALID) {
 		PMD_DRV_LOG(ERR, "invalid flow_type input.");
 		return -EINVAL;
 	}
@@ -8658,10 +8564,8 @@ i40e_hash_filter_inset_select(struct i40e_hw *hw,
 	if (hw->mac.type == I40E_MAC_X722) {
 		/* get translated pctype value in fd pctype register */
 		pctype = (enum i40e_filter_pctype)i40e_read_rx_ctl(hw,
-			I40E_GLQF_FD_PCTYPES((int)i40e_flowtype_to_pctype(
-			conf->flow_type)));
-	} else
-		pctype = i40e_flowtype_to_pctype(conf->flow_type);
+			I40E_GLQF_FD_PCTYPES((int)pctype));
+	}
 
 	ret = i40e_parse_input_set(&input_set, pctype, conf->field,
 				   conf->inset_size);
@@ -8669,11 +8573,7 @@ i40e_hash_filter_inset_select(struct i40e_hw *hw,
 		PMD_DRV_LOG(ERR, "Failed to parse input set");
 		return -EINVAL;
 	}
-	if (i40e_validate_input_set(pctype, RTE_ETH_FILTER_HASH,
-				    input_set) != 0) {
-		PMD_DRV_LOG(ERR, "Invalid input set");
-		return -EINVAL;
-	}
+
 	if (conf->op == RTE_ETH_INPUT_SET_ADD) {
 		/* get inset value in register */
 		inset_reg = i40e_read_rx_ctl(hw, I40E_GLQF_HASH_INSET(1, pctype));
@@ -8727,24 +8627,19 @@ i40e_fdir_filter_inset_select(struct i40e_pf *pf,
 		return -EINVAL;
 	}
 
-	if (!I40E_VALID_FLOW(conf->flow_type)) {
+	pctype = i40e_flowtype_to_pctype(pf->adapter, conf->flow_type);
+
+	if (pctype == I40E_FILTER_PCTYPE_INVALID) {
 		PMD_DRV_LOG(ERR, "invalid flow_type input.");
 		return -EINVAL;
 	}
 
-	pctype = i40e_flowtype_to_pctype(conf->flow_type);
-
 	ret = i40e_parse_input_set(&input_set, pctype, conf->field,
 				   conf->inset_size);
 	if (ret) {
 		PMD_DRV_LOG(ERR, "Failed to parse input set");
 		return -EINVAL;
 	}
-	if (i40e_validate_input_set(pctype, RTE_ETH_FILTER_FDIR,
-				    input_set) != 0) {
-		PMD_DRV_LOG(ERR, "Invalid input set");
-		return -EINVAL;
-	}
 
 	/* get inset value in register */
 	inset_reg = i40e_read_rx_ctl(hw, I40E_PRTQF_FD_INSET(pctype, 1));
@@ -9183,72 +9078,42 @@ i40e_hw_init(struct rte_eth_dev *dev)
 	i40e_set_symmetric_hash_enable_per_port(hw, 0);
 }
 
+/*
+ * For X722 it is possible to have multiple pctypes mapped to the same flowtype
+ * however this function will return only one highest pctype index,
+ * which is not quite correct. This is known problem of i40e driver
+ * and needs to be fixed later.
+ */
 enum i40e_filter_pctype
-i40e_flowtype_to_pctype(uint16_t flow_type)
-{
-	static const enum i40e_filter_pctype pctype_table[] = {
-		[RTE_ETH_FLOW_FRAG_IPV4] = I40E_FILTER_PCTYPE_FRAG_IPV4,
-		[RTE_ETH_FLOW_NONFRAG_IPV4_UDP] =
-			I40E_FILTER_PCTYPE_NONF_IPV4_UDP,
-		[RTE_ETH_FLOW_NONFRAG_IPV4_TCP] =
-			I40E_FILTER_PCTYPE_NONF_IPV4_TCP,
-		[RTE_ETH_FLOW_NONFRAG_IPV4_SCTP] =
-			I40E_FILTER_PCTYPE_NONF_IPV4_SCTP,
-		[RTE_ETH_FLOW_NONFRAG_IPV4_OTHER] =
-			I40E_FILTER_PCTYPE_NONF_IPV4_OTHER,
-		[RTE_ETH_FLOW_FRAG_IPV6] = I40E_FILTER_PCTYPE_FRAG_IPV6,
-		[RTE_ETH_FLOW_NONFRAG_IPV6_UDP] =
-			I40E_FILTER_PCTYPE_NONF_IPV6_UDP,
-		[RTE_ETH_FLOW_NONFRAG_IPV6_TCP] =
-			I40E_FILTER_PCTYPE_NONF_IPV6_TCP,
-		[RTE_ETH_FLOW_NONFRAG_IPV6_SCTP] =
-			I40E_FILTER_PCTYPE_NONF_IPV6_SCTP,
-		[RTE_ETH_FLOW_NONFRAG_IPV6_OTHER] =
-			I40E_FILTER_PCTYPE_NONF_IPV6_OTHER,
-		[RTE_ETH_FLOW_L2_PAYLOAD] = I40E_FILTER_PCTYPE_L2_PAYLOAD,
-	};
+i40e_flowtype_to_pctype(const struct i40e_adapter *adapter, uint16_t flow_type)
+{
+	int i;
+	uint64_t pctype_mask;
 
-	return pctype_table[flow_type];
+	if (flow_type < I40E_FLOW_TYPE_MAX) {
+		pctype_mask = adapter->pctypes_tbl[flow_type];
+		for (i = I40E_FILTER_PCTYPE_MAX - 1; i > 0; i--) {
+			if (pctype_mask & (1ULL << i))
+				return (enum i40e_filter_pctype)i;
+		}
+	}
+	return I40E_FILTER_PCTYPE_INVALID;
 }
 
 uint16_t
-i40e_pctype_to_flowtype(enum i40e_filter_pctype pctype)
+i40e_pctype_to_flowtype(const struct i40e_adapter *adapter,
+			enum i40e_filter_pctype pctype)
 {
-	static const uint16_t flowtype_table[] = {
-		[I40E_FILTER_PCTYPE_FRAG_IPV4] = RTE_ETH_FLOW_FRAG_IPV4,
-		[I40E_FILTER_PCTYPE_NONF_IPV4_UDP] =
-			RTE_ETH_FLOW_NONFRAG_IPV4_UDP,
-		[I40E_FILTER_PCTYPE_NONF_UNICAST_IPV4_UDP] =
-			RTE_ETH_FLOW_NONFRAG_IPV4_UDP,
-		[I40E_FILTER_PCTYPE_NONF_MULTICAST_IPV4_UDP] =
-			RTE_ETH_FLOW_NONFRAG_IPV4_UDP,
-		[I40E_FILTER_PCTYPE_NONF_IPV4_TCP] =
-			RTE_ETH_FLOW_NONFRAG_IPV4_TCP,
-		[I40E_FILTER_PCTYPE_NONF_IPV4_TCP_SYN_NO_ACK] =
-			RTE_ETH_FLOW_NONFRAG_IPV4_TCP,
-		[I40E_FILTER_PCTYPE_NONF_IPV4_SCTP] =
-			RTE_ETH_FLOW_NONFRAG_IPV4_SCTP,
-		[I40E_FILTER_PCTYPE_NONF_IPV4_OTHER] =
-			RTE_ETH_FLOW_NONFRAG_IPV4_OTHER,
-		[I40E_FILTER_PCTYPE_FRAG_IPV6] = RTE_ETH_FLOW_FRAG_IPV6,
-		[I40E_FILTER_PCTYPE_NONF_IPV6_UDP] =
-			RTE_ETH_FLOW_NONFRAG_IPV6_UDP,
-		[I40E_FILTER_PCTYPE_NONF_UNICAST_IPV6_UDP] =
-			RTE_ETH_FLOW_NONFRAG_IPV6_UDP,
-		[I40E_FILTER_PCTYPE_NONF_MULTICAST_IPV6_UDP] =
-			RTE_ETH_FLOW_NONFRAG_IPV6_UDP,
-		[I40E_FILTER_PCTYPE_NONF_IPV6_TCP] =
-			RTE_ETH_FLOW_NONFRAG_IPV6_TCP,
-		[I40E_FILTER_PCTYPE_NONF_IPV6_TCP_SYN_NO_ACK] =
-			RTE_ETH_FLOW_NONFRAG_IPV6_TCP,
-		[I40E_FILTER_PCTYPE_NONF_IPV6_SCTP] =
-			RTE_ETH_FLOW_NONFRAG_IPV6_SCTP,
-		[I40E_FILTER_PCTYPE_NONF_IPV6_OTHER] =
-			RTE_ETH_FLOW_NONFRAG_IPV6_OTHER,
-		[I40E_FILTER_PCTYPE_L2_PAYLOAD] = RTE_ETH_FLOW_L2_PAYLOAD,
-	};
+	uint16_t flowtype;
+	uint64_t pctype_mask = 1ULL << pctype;
+
+	for (flowtype = RTE_ETH_FLOW_UNKNOWN + 1; flowtype < I40E_FLOW_TYPE_MAX;
+	     flowtype++) {
+		if (adapter->pctypes_tbl[flowtype] & pctype_mask)
+			return flowtype;
+	}
 
-	return flowtype_table[pctype];
+	return RTE_ETH_FLOW_UNKNOWN;
 }
 
 /*
diff --git a/drivers/net/i40e/i40e_ethdev.h b/drivers/net/i40e/i40e_ethdev.h
index ad80f0f..e87f846 100644
--- a/drivers/net/i40e/i40e_ethdev.h
+++ b/drivers/net/i40e/i40e_ethdev.h
@@ -852,7 +852,8 @@ struct i40e_vf {
 	uint64_t flags;
 };
 
-#define I40E_MAX_PKT_TYPE 256
+#define I40E_MAX_PKT_TYPE  256
+#define I40E_FLOW_TYPE_MAX 64
 
 /*
  * Structure to store private data for each PF/VF instance.
@@ -881,6 +882,10 @@ struct i40e_adapter {
 
 	/* ptype mapping table */
 	uint32_t ptype_tbl[I40E_MAX_PKT_TYPE] __rte_cache_min_aligned;
+	/* flow type to pctype mapping table */
+	uint64_t pctypes_tbl[I40E_FLOW_TYPE_MAX] __rte_cache_min_aligned;
+	uint64_t flow_types_mask;
+	uint64_t pctypes_mask;
 };
 
 extern const struct rte_flow_ops i40e_flow_ops;
@@ -925,8 +930,8 @@ int i40e_vsi_vlan_pvid_set(struct i40e_vsi *vsi,
 			   struct i40e_vsi_vlan_pvid_info *info);
 int i40e_vsi_config_vlan_stripping(struct i40e_vsi *vsi, bool on);
 int i40e_vsi_config_vlan_filter(struct i40e_vsi *vsi, bool on);
-uint64_t i40e_config_hena(uint64_t flags, enum i40e_mac_type type);
-uint64_t i40e_parse_hena(uint64_t flags);
+uint64_t i40e_config_hena(const struct i40e_adapter *adapter, uint64_t flags);
+uint64_t i40e_parse_hena(const struct i40e_adapter *adapter, uint64_t flags);
 enum i40e_status_code i40e_fdir_setup_tx_resources(struct i40e_pf *pf);
 enum i40e_status_code i40e_fdir_setup_rx_resources(struct i40e_pf *pf);
 int i40e_fdir_setup(struct i40e_pf *pf);
@@ -935,8 +940,10 @@ const struct rte_memzone *i40e_memzone_reserve(const char *name,
 					int socket_id);
 int i40e_fdir_configure(struct rte_eth_dev *dev);
 void i40e_fdir_teardown(struct i40e_pf *pf);
-enum i40e_filter_pctype i40e_flowtype_to_pctype(uint16_t flow_type);
-uint16_t i40e_pctype_to_flowtype(enum i40e_filter_pctype pctype);
+enum i40e_filter_pctype  i40e_flowtype_to_pctype(const struct i40e_adapter *adapter,
+						 uint16_t flow_type);
+uint16_t i40e_pctype_to_flowtype(const struct i40e_adapter *adapter,
+				 enum i40e_filter_pctype pctype);
 int i40e_fdir_ctrl_func(struct rte_eth_dev *dev,
 			  enum rte_filter_op filter_op,
 			  void *arg);
diff --git a/drivers/net/i40e/i40e_ethdev_vf.c b/drivers/net/i40e/i40e_ethdev_vf.c
index f4ee424..1fd6f11 100644
--- a/drivers/net/i40e/i40e_ethdev_vf.c
+++ b/drivers/net/i40e/i40e_ethdev_vf.c
@@ -1398,6 +1398,7 @@ i40evf_dev_init(struct rte_eth_dev *eth_dev)
 		return 0;
 	}
 	i40e_set_default_ptype_table(eth_dev);
+	i40e_set_default_pctype_table(eth_dev);
 	rte_eth_copy_pci_info(eth_dev, pci_dev);
 	eth_dev->data->dev_flags |= RTE_ETH_DEV_DETACHABLE;
 
@@ -2133,7 +2134,7 @@ i40evf_dev_info_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info)
 	dev_info->max_rx_pktlen = I40E_FRAME_SIZE_MAX;
 	dev_info->hash_key_size = (I40E_VFQF_HKEY_MAX_INDEX + 1) * sizeof(uint32_t);
 	dev_info->reta_size = ETH_RSS_RETA_SIZE_64;
-	dev_info->flow_type_rss_offloads = I40E_RSS_OFFLOAD_ALL;
+	dev_info->flow_type_rss_offloads = vf->adapter->flow_types_mask;
 	dev_info->max_mac_addrs = I40E_NUM_MACADDR_MAX;
 	dev_info->rx_offload_capa =
 		DEV_RX_OFFLOAD_VLAN_STRIP |
@@ -2443,7 +2444,7 @@ i40evf_hw_rss_hash_set(struct i40e_vf *vf, struct rte_eth_rss_conf *rss_conf)
 	if (ret)
 		return ret;
 
-	hena = i40e_config_hena(rss_conf->rss_hf, hw->mac.type);
+	hena = i40e_config_hena(vf->adapter, rss_conf->rss_hf);
 	i40e_write_rx_ctl(hw, I40E_VFQF_HENA(0), (uint32_t)hena);
 	i40e_write_rx_ctl(hw, I40E_VFQF_HENA(1), (uint32_t)(hena >> 32));
 	I40EVF_WRITE_FLUSH(hw);
@@ -2486,7 +2487,7 @@ i40evf_config_rss(struct i40e_vf *vf)
 	}
 
 	rss_conf = vf->dev_data->dev_conf.rx_adv_conf.rss_conf;
-	if ((rss_conf.rss_hf & I40E_RSS_OFFLOAD_ALL) == 0) {
+	if ((rss_conf.rss_hf & vf->adapter->flow_types_mask) == 0) {
 		i40evf_disable_rss(vf);
 		PMD_DRV_LOG(DEBUG, "No hash flag is set");
 		return 0;
@@ -2511,14 +2512,13 @@ i40evf_dev_rss_hash_update(struct rte_eth_dev *dev,
 {
 	struct i40e_vf *vf = I40EVF_DEV_PRIVATE_TO_VF(dev->data->dev_private);
 	struct i40e_hw *hw = I40E_DEV_PRIVATE_TO_HW(dev->data->dev_private);
-	uint64_t rss_hf = rss_conf->rss_hf & I40E_RSS_OFFLOAD_ALL;
+	uint64_t rss_hf = rss_conf->rss_hf & vf->adapter->flow_types_mask;
 	uint64_t hena;
 
 	hena = (uint64_t)i40e_read_rx_ctl(hw, I40E_VFQF_HENA(0));
 	hena |= ((uint64_t)i40e_read_rx_ctl(hw, I40E_VFQF_HENA(1))) << 32;
-	if (!(hena & ((hw->mac.type == I40E_MAC_X722)
-		 ? I40E_RSS_HENA_ALL_X722
-		 : I40E_RSS_HENA_ALL))) { /* RSS disabled */
+
+	if (!(hena & vf->adapter->pctypes_mask)) { /* RSS disabled */
 		if (rss_hf != 0) /* Enable RSS */
 			return -EINVAL;
 		return 0;
@@ -2544,7 +2544,7 @@ i40evf_dev_rss_hash_conf_get(struct rte_eth_dev *dev,
 
 	hena = (uint64_t)i40e_read_rx_ctl(hw, I40E_VFQF_HENA(0));
 	hena |= ((uint64_t)i40e_read_rx_ctl(hw, I40E_VFQF_HENA(1))) << 32;
-	rss_conf->rss_hf = i40e_parse_hena(hena);
+	rss_conf->rss_hf = i40e_parse_hena(vf->adapter, hena);
 
 	return 0;
 }
diff --git a/drivers/net/i40e/i40e_fdir.c b/drivers/net/i40e/i40e_fdir.c
index 84c0a1f..810d384 100644
--- a/drivers/net/i40e/i40e_fdir.c
+++ b/drivers/net/i40e/i40e_fdir.c
@@ -344,15 +344,10 @@ i40e_init_flx_pld(struct i40e_pf *pf)
 	/* initialize the masks */
 	for (pctype = I40E_FILTER_PCTYPE_NONF_IPV4_UDP;
 	     pctype <= I40E_FILTER_PCTYPE_L2_PAYLOAD; pctype++) {
-		if (hw->mac.type == I40E_MAC_X722) {
-			if (!I40E_VALID_PCTYPE_X722(
-				 (enum i40e_filter_pctype)pctype))
-				continue;
-		} else {
-			if (!I40E_VALID_PCTYPE(
-				 (enum i40e_filter_pctype)pctype))
-				continue;
-		}
+		uint16_t flow_type = i40e_pctype_to_flowtype(pf->adapter, pctype);
+
+		if (flow_type == RTE_ETH_FLOW_UNKNOWN)
+			continue;
 		pf->fdir.flex_mask[pctype].word_mask = 0;
 		i40e_write_rx_ctl(hw, I40E_PRTQF_FD_FLXINSET(pctype), 0);
 		for (i = 0; i < I40E_FDIR_BITMASK_NUM_WORD; i++) {
@@ -449,7 +444,8 @@ i40e_check_fdir_flex_payload(const struct rte_eth_flex_payload_cfg *flex_cfg)
  * arguments are valid
  */
 static int
-i40e_check_fdir_flex_conf(const struct rte_eth_fdir_flex_conf *conf)
+i40e_check_fdir_flex_conf(const struct rte_eth_fdir_flex_conf *conf,
+			  const struct i40e_adapter *adapter)
 {
 	const struct rte_eth_flex_payload_cfg *flex_cfg;
 	const struct rte_eth_fdir_flex_mask *flex_mask;
@@ -486,8 +482,11 @@ i40e_check_fdir_flex_conf(const struct rte_eth_fdir_flex_conf *conf)
 		return -EINVAL;
 	}
 	for (i = 0; i < conf->nb_flexmasks; i++) {
+		enum i40e_filter_pctype pctype;
+
 		flex_mask = &conf->flex_mask[i];
-		if (!I40E_VALID_FLOW(flex_mask->flow_type)) {
+		pctype = i40e_flowtype_to_pctype(adapter, flex_mask->flow_type);
+		if (pctype == I40E_FILTER_PCTYPE_INVALID) {
 			PMD_DRV_LOG(WARNING, "invalid flow type.");
 			return -EINVAL;
 		}
@@ -650,7 +649,7 @@ i40e_fdir_configure(struct rte_eth_dev *dev)
 	i40e_init_flx_pld(pf); /* set flex config to default value */
 
 	conf = &dev->data->dev_conf.fdir_conf.flex_conf;
-	ret = i40e_check_fdir_flex_conf(conf);
+	ret = i40e_check_fdir_flex_conf(conf, pf->adapter);
 	if (ret < 0) {
 		PMD_DRV_LOG(ERR, " invalid configuration arguments.");
 		return -EINVAL;
@@ -664,11 +663,11 @@ i40e_fdir_configure(struct rte_eth_dev *dev)
 			/* get translated pctype value in fd pctype register */
 			pctype = (enum i40e_filter_pctype)i40e_read_rx_ctl(
 				hw, I40E_GLQF_FD_PCTYPES(
-				(int)i40e_flowtype_to_pctype(
+				(int)i40e_flowtype_to_pctype(pf->adapter,
 				conf->flex_mask[i].flow_type)));
 		} else
-			pctype = i40e_flowtype_to_pctype(
-				conf->flex_mask[i].flow_type);
+			pctype = i40e_flowtype_to_pctype(pf->adapter,
+							 conf->flex_mask[i].flow_type);
 
 		i40e_set_flex_mask_on_pctype(pf, pctype, &conf->flex_mask[i]);
 	}
@@ -1100,7 +1099,8 @@ i40e_add_del_fdir_filter(struct rte_eth_dev *dev,
 		return -ENOTSUP;
 	}
 
-	if (!I40E_VALID_FLOW(filter->input.flow_type)) {
+	pctype = i40e_flowtype_to_pctype(pf->adapter, filter->input.flow_type);
+	if (pctype == I40E_FILTER_PCTYPE_INVALID) {
 		PMD_DRV_LOG(ERR, "invalid flow_type input.");
 		return -EINVAL;
 	}
@@ -1141,12 +1141,8 @@ i40e_add_del_fdir_filter(struct rte_eth_dev *dev,
 	if (hw->mac.type == I40E_MAC_X722) {
 		/* get translated pctype value in fd pctype register */
 		pctype = (enum i40e_filter_pctype)i40e_read_rx_ctl(
-			hw, I40E_GLQF_FD_PCTYPES(
-			(int)i40e_flowtype_to_pctype(
-			filter->input.flow_type)));
-	} else
-		pctype = i40e_flowtype_to_pctype(filter->input.flow_type);
-
+			hw, I40E_GLQF_FD_PCTYPES((int)pctype));
+	}
 	ret = i40e_fdir_filter_programming(pf, pctype, filter, add);
 	if (ret < 0) {
 		PMD_DRV_LOG(ERR, "fdir programming fails for PCTYPE(%u).",
@@ -1384,7 +1380,6 @@ i40e_fdir_info_get_flex_mask(struct i40e_pf *pf,
 {
 	struct i40e_fdir_flex_mask *mask;
 	struct rte_eth_fdir_flex_mask *ptr = flex_mask;
-	struct i40e_hw *hw = I40E_PF_TO_HW(pf);
 	uint16_t flow_type;
 	uint8_t i, j;
 	uint16_t off_bytes, mask_tmp;
@@ -1393,14 +1388,11 @@ i40e_fdir_info_get_flex_mask(struct i40e_pf *pf,
 	     i <= I40E_FILTER_PCTYPE_L2_PAYLOAD;
 	     i++) {
 		mask =  &pf->fdir.flex_mask[i];
-		if (hw->mac.type == I40E_MAC_X722) {
-			if (!I40E_VALID_PCTYPE_X722((enum i40e_filter_pctype)i))
-				continue;
-		} else {
-			if (!I40E_VALID_PCTYPE((enum i40e_filter_pctype)i))
-				continue;
-		}
-		flow_type = i40e_pctype_to_flowtype((enum i40e_filter_pctype)i);
+		flow_type = i40e_pctype_to_flowtype(pf->adapter,
+						    (enum i40e_filter_pctype)i);
+		if (flow_type == RTE_ETH_FLOW_UNKNOWN)
+			continue;
+
 		for (j = 0; j < I40E_FDIR_MAX_FLEXWORD_NUM; j++) {
 			if (mask->word_mask & I40E_FLEX_WORD_MASK(j)) {
 				ptr->mask[j * sizeof(uint16_t)] = UINT8_MAX;
diff --git a/drivers/net/i40e/i40e_flow.c b/drivers/net/i40e/i40e_flow.c
index b92719a..5d8afc6 100644
--- a/drivers/net/i40e/i40e_flow.c
+++ b/drivers/net/i40e/i40e_flow.c
@@ -2776,8 +2776,9 @@ i40e_flow_parse_fdir_pattern(struct rte_eth_dev *dev,
 		}
 	}
 
-	pctype = i40e_flowtype_to_pctype(flow_type);
-	if (pctype == 0 || pctype > I40E_FILTER_PCTYPE_L2_PAYLOAD) {
+	pctype = i40e_flowtype_to_pctype(pf->adapter, flow_type);
+	if (pctype == I40E_FILTER_PCTYPE_INVALID ||
+	    pctype > I40E_FILTER_PCTYPE_L2_PAYLOAD) {
 		rte_flow_error_set(error, EINVAL,
 				   RTE_FLOW_ERROR_TYPE_ITEM, item,
 				   "Unsupported flow type");
diff --git a/drivers/net/i40e/i40e_rxtx.c b/drivers/net/i40e/i40e_rxtx.c
index 3a7b68e..0c8ad00 100644
--- a/drivers/net/i40e/i40e_rxtx.c
+++ b/drivers/net/i40e/i40e_rxtx.c
@@ -2943,6 +2943,63 @@ i40e_set_default_ptype_table(struct rte_eth_dev *dev)
 		ad->ptype_tbl[i] = i40e_get_default_pkt_type(i);
 }
 
+void __attribute__((cold))
+i40e_set_default_pctype_table(struct rte_eth_dev *dev)
+{
+	struct i40e_adapter *ad = I40E_DEV_PRIVATE_TO_ADAPTER(dev->data->dev_private);
+	struct i40e_hw *hw = I40E_DEV_PRIVATE_TO_HW(dev->data->dev_private);
+	int i;
+
+	for (i = 0; i < I40E_FLOW_TYPE_MAX; i++)
+		ad->pctypes_tbl[i] = 0ULL;
+	ad->flow_types_mask = 0ULL;
+	ad->pctypes_mask = 0ULL;
+
+	ad->pctypes_tbl[RTE_ETH_FLOW_FRAG_IPV4] =
+				(1ULL << I40E_FILTER_PCTYPE_FRAG_IPV4);
+	ad->pctypes_tbl[RTE_ETH_FLOW_NONFRAG_IPV4_UDP] =
+				(1ULL << I40E_FILTER_PCTYPE_NONF_IPV4_UDP);
+	ad->pctypes_tbl[RTE_ETH_FLOW_NONFRAG_IPV4_TCP] =
+				(1ULL << I40E_FILTER_PCTYPE_NONF_IPV4_TCP);
+	ad->pctypes_tbl[RTE_ETH_FLOW_NONFRAG_IPV4_SCTP] =
+				(1ULL << I40E_FILTER_PCTYPE_NONF_IPV4_SCTP);
+	ad->pctypes_tbl[RTE_ETH_FLOW_NONFRAG_IPV4_OTHER] =
+				(1ULL << I40E_FILTER_PCTYPE_NONF_IPV4_OTHER);
+	ad->pctypes_tbl[RTE_ETH_FLOW_FRAG_IPV6] =
+				(1ULL << I40E_FILTER_PCTYPE_FRAG_IPV6);
+	ad->pctypes_tbl[RTE_ETH_FLOW_NONFRAG_IPV6_UDP] =
+				(1ULL << I40E_FILTER_PCTYPE_NONF_IPV6_UDP);
+	ad->pctypes_tbl[RTE_ETH_FLOW_NONFRAG_IPV6_TCP] =
+				(1ULL << I40E_FILTER_PCTYPE_NONF_IPV6_TCP);
+	ad->pctypes_tbl[RTE_ETH_FLOW_NONFRAG_IPV6_SCTP] =
+				(1ULL << I40E_FILTER_PCTYPE_NONF_IPV6_SCTP);
+	ad->pctypes_tbl[RTE_ETH_FLOW_NONFRAG_IPV6_OTHER] =
+				(1ULL << I40E_FILTER_PCTYPE_NONF_IPV6_OTHER);
+	ad->pctypes_tbl[RTE_ETH_FLOW_L2_PAYLOAD] =
+				(1ULL << I40E_FILTER_PCTYPE_L2_PAYLOAD);
+
+	if (hw->mac.type == I40E_MAC_X722) {
+		ad->pctypes_tbl[RTE_ETH_FLOW_NONFRAG_IPV4_UDP] |=
+				(1ULL << I40E_FILTER_PCTYPE_NONF_UNICAST_IPV4_UDP);
+		ad->pctypes_tbl[RTE_ETH_FLOW_NONFRAG_IPV4_UDP] |=
+				(1ULL << I40E_FILTER_PCTYPE_NONF_MULTICAST_IPV4_UDP);
+		ad->pctypes_tbl[RTE_ETH_FLOW_NONFRAG_IPV4_TCP] |=
+				(1ULL << I40E_FILTER_PCTYPE_NONF_IPV4_TCP_SYN_NO_ACK);
+		ad->pctypes_tbl[RTE_ETH_FLOW_NONFRAG_IPV6_UDP] |=
+				(1ULL << I40E_FILTER_PCTYPE_NONF_UNICAST_IPV6_UDP);
+		ad->pctypes_tbl[RTE_ETH_FLOW_NONFRAG_IPV6_UDP] |=
+				(1ULL << I40E_FILTER_PCTYPE_NONF_MULTICAST_IPV6_UDP);
+		ad->pctypes_tbl[RTE_ETH_FLOW_NONFRAG_IPV6_TCP] |=
+				(1ULL << I40E_FILTER_PCTYPE_NONF_IPV6_TCP_SYN_NO_ACK);
+	}
+
+	for (i = 0; i < I40E_FLOW_TYPE_MAX; i++) {
+		if (ad->pctypes_tbl[i])
+			ad->flow_types_mask |= (1ULL << i);
+		ad->pctypes_mask |= ad->pctypes_tbl[i];
+	}
+}
+
 /* Stubs needed for linkage when CONFIG_RTE_I40E_INC_VECTOR is set to 'n' */
 int __attribute__((weak))
 i40e_rx_vec_dev_conf_condition_check(struct rte_eth_dev __rte_unused *dev)
diff --git a/drivers/net/i40e/i40e_rxtx.h b/drivers/net/i40e/i40e_rxtx.h
index 20084d6..2a58ced 100644
--- a/drivers/net/i40e/i40e_rxtx.h
+++ b/drivers/net/i40e/i40e_rxtx.h
@@ -255,6 +255,7 @@ void i40e_set_tx_function_flag(struct rte_eth_dev *dev,
 			       struct i40e_tx_queue *txq);
 void i40e_set_tx_function(struct rte_eth_dev *dev);
 void i40e_set_default_ptype_table(struct rte_eth_dev *dev);
+void i40e_set_default_pctype_table(struct rte_eth_dev *dev);
 
 /* For each value it means, datasheet of hardware can tell more details
  *
-- 
2.5.5

^ permalink raw reply	[relevance 4%]

* Re: [dpdk-dev] [PATCH v5] ethdev: add return code to rte_eth_stats_reset()
  2017-09-20 14:01  0%     ` David Harton (dharton)
@ 2017-09-20 16:55  0%       ` Ferruh Yigit
  0 siblings, 0 replies; 200+ results
From: Ferruh Yigit @ 2017-09-20 16:55 UTC (permalink / raw)
  To: David Harton (dharton), thomas; +Cc: dev

On 9/20/2017 3:01 PM, David Harton (dharton) wrote:
> 
> 
>> -----Original Message-----
>> From: Ferruh Yigit [mailto:ferruh.yigit@intel.com]
>>
>> On 9/1/2017 3:26 AM, David Harton wrote:
>>> Some devices do not support reset of eth stats.  An application may
>>> need to know not to clear shadow stats if the device cannot.
>>>
>>> rte_eth_stats_reset is updated to provide a return code to share
>>> whether the device supports reset or not.
>>>
>>> Signed-off-by: David Harton <dharton@cisco.com>
>>> ---
>>>
>>> v5:
>>> * squashed doc patch
>>> * moved rel_note change from ABI to API section
>>>
>>> v4:
>>> * commented return values
>>>
>>> v3:
>>> * overcame noob errors and figured out patch challenged
>>>
>>> v2:
>>> * fixed soft tab issue inserted while moving changes
>>>
>>>  doc/guides/rel_notes/release_17_11.rst | 13 +++++++++++++
>>>  lib/librte_ether/rte_ethdev.c          |  8 +++++---
>>>  lib/librte_ether/rte_ethdev.h          |  6 +++++-
>>>  3 files changed, 23 insertions(+), 4 deletions(-)
>>>
>>> diff --git a/doc/guides/rel_notes/release_17_11.rst
>>> b/doc/guides/rel_notes/release_17_11.rst
>>> index 22df4fd..6282667 100644
>>> --- a/doc/guides/rel_notes/release_17_11.rst
>>> +++ b/doc/guides/rel_notes/release_17_11.rst
>>> @@ -110,6 +110,19 @@ API Changes
>>>     Also, make sure to start the actual text at the margin.
>>>     =========================================================
>>>
>>> +* **Modified the return type of rte_eth_stats_reset.**
>>> +
>>> +  Changed return type of ``rte_eth_stats_reset`` from ``void`` to
>>> + ``int``  so the caller may know whether a device supports the
>>> + operation or not  and if the operation was carried out.
>>> +
>>
>>> +* **Modified the vlan_offload_set_t function prototype in the ethdev
>>> +library.**
>>> +
>>> +  Changed the function prototype of ``vlan_offload_set_t``.  The
>>> + return value  has been changed from ``void`` to ``int`` so the
>>> + caller to knows whether  the backing device supports the operation
>>> + or if the operation was  successfully performed.
>>> +
>>
>> Is this addition to the document related to this patch?
> 
> Good catch.  No. :(
> 
> I must have mishandled the rebase I did to update this patch.  V6 coming.  
> Would be great if you could re-ACK afterwards so this one can move.

I think you can carry the previous Ack for this case. Since main part of
the patch that acked will not be changed...

> 
> Thanks,
> Dave

<...>

^ permalink raw reply	[relevance 0%]

* [dpdk-dev] [PATCH v4 0/5] increase port_id range
  @ 2017-09-21  8:32  4% ` Zhiyong Yang
  2017-09-21  8:32  8%   ` [dpdk-dev] [PATCH v4 1/5] net/bonding: remove bonding APIs using ABI versioning Zhiyong Yang
                     ` (2 more replies)
  0 siblings, 3 replies; 200+ results
From: Zhiyong Yang @ 2017-09-21  8:32 UTC (permalink / raw)
  To: dev; +Cc: thomas, ferruh.yigit

port_id is currently defined as uint8_t, which is limited to the range
0 to 255. A larger range is required for vdev scalability.

It is necessary for a redefinition of port_id to extend it from
1 bytes to 2 bytes. All ethdev APIs and usages related to port_id will
be changed at the same time.

Discussion about port_id is the following thread.
http://www.dpdk.org/dev/patchwork/patch/23208/

Changes in V2:
1. cover more PMDs to increase port_id range.
2. cover more examples to increase port_id range.
3. add 17.11 release note.

Changes in V3:
1.  cover mlx4 and mlx5.
2.  add to increase port_id range in test code.
3.  The patch "librte_mbuf: modify port initialization value" is merged
    into the patchset.

Changes in V4:
1.  Add a patch to remove bonding APIs using ABI versioning according to
    Ferruh's comments.
2.  Unify to use typedef portid_t in testpmd code.
3.  Update release note and deprecation doc in 2/5
4.  Fix some issues according to comments.

Note: 3/5 and 4/5 patches' compilling depends on 2/5 patch since 2/5 patch
breaks lib/PMD API/ABI.

Zhiyong Yang (5):
  net/bonding: remove bonding APIs using ABI versioning
  ethdev: increase port_id range
  examples: increase port_id range
  test: increase port_id range
  librte_mbuf: modify port initialization value

 app/pdump/main.c                                   |   2 +-
 app/test-pmd/cmdline.c                             |   6 +-
 app/test-pmd/config.c                              |   4 +-
 app/test-pmd/ieee1588fwd.c                         |  26 +--
 app/test-pmd/parameters.c                          |   2 +-
 app/test-pmd/rxonly.c                              |   2 +-
 app/test-pmd/testpmd.c                             |  18 +-
 app/test-pmd/testpmd.h                             |   4 +-
 doc/guides/rel_notes/deprecation.rst               |   6 -
 doc/guides/rel_notes/release_17_11.rst             |  18 +-
 drivers/net/af_packet/Makefile                     |   2 +-
 drivers/net/af_packet/rte_eth_af_packet.c          |   2 +-
 drivers/net/ark/ark_ethdev.c                       |   2 +-
 drivers/net/avp/Makefile                           |   2 +-
 drivers/net/avp/avp_ethdev.c                       |   2 +-
 drivers/net/bnx2x/Makefile                         |   2 +-
 drivers/net/bnx2x/bnx2x_rxtx.h                     |   4 +-
 drivers/net/bnxt/Makefile                          |   2 +-
 drivers/net/bnxt/bnxt.h                            |   2 +-
 drivers/net/bnxt/bnxt_ethdev.c                     |   4 +-
 drivers/net/bnxt/bnxt_rxq.h                        |   2 +-
 drivers/net/bnxt/bnxt_txq.h                        |   2 +-
 drivers/net/bnxt/rte_pmd_bnxt.c                    |  32 +--
 drivers/net/bnxt/rte_pmd_bnxt.h                    |  32 +--
 drivers/net/bonding/Makefile                       |   2 +-
 drivers/net/bonding/rte_eth_bond.h                 |  42 ++--
 drivers/net/bonding/rte_eth_bond_8023ad.c          | 193 +++--------------
 drivers/net/bonding/rte_eth_bond_8023ad.h          |  48 ++--
 drivers/net/bonding/rte_eth_bond_8023ad_private.h  |  12 +-
 drivers/net/bonding/rte_eth_bond_alb.c             |   6 +-
 drivers/net/bonding/rte_eth_bond_alb.h             |   6 +-
 drivers/net/bonding/rte_eth_bond_api.c             |  64 +++---
 drivers/net/bonding/rte_eth_bond_args.c            |   2 +-
 drivers/net/bonding/rte_eth_bond_pmd.c             |  62 +++---
 drivers/net/bonding/rte_eth_bond_private.h         |  45 ++--
 drivers/net/bonding/rte_eth_bond_version.map       |   4 -
 drivers/net/e1000/Makefile                         |   2 +-
 drivers/net/e1000/em_ethdev.c                      |   2 +-
 drivers/net/e1000/em_rxtx.c                        |   4 +-
 drivers/net/e1000/igb_rxtx.c                       |   4 +-
 drivers/net/failsafe/Makefile                      |   2 +-
 drivers/net/failsafe/failsafe_ether.c              |   4 +-
 drivers/net/failsafe/failsafe_private.h            |   4 +-
 drivers/net/fm10k/Makefile                         |   2 +-
 drivers/net/fm10k/fm10k.h                          |   6 +-
 drivers/net/i40e/Makefile                          |   2 +-
 drivers/net/i40e/i40e_ethdev.c                     |   5 +-
 drivers/net/i40e/i40e_rxtx.h                       |   4 +-
 drivers/net/i40e/rte_pmd_i40e.c                    |  50 ++---
 drivers/net/i40e/rte_pmd_i40e.h                    |  48 ++--
 drivers/net/ixgbe/Makefile                         |   2 +-
 drivers/net/ixgbe/ixgbe_ethdev.c                   |   5 +-
 drivers/net/ixgbe/ixgbe_rxtx.h                     |   4 +-
 drivers/net/ixgbe/rte_pmd_ixgbe.c                  |  60 ++---
 drivers/net/ixgbe/rte_pmd_ixgbe.h                  |  64 +++---
 drivers/net/mlx5/mlx5_rxtx.h                       |   4 +-
 drivers/net/nfp/nfp_net.c                          |  16 +-
 drivers/net/nfp/nfp_net_pmd.h                      |   2 +-
 drivers/net/null/Makefile                          |   2 +-
 drivers/net/null/rte_eth_null.c                    |   2 +-
 drivers/net/pcap/Makefile                          |   2 +-
 drivers/net/pcap/rte_eth_pcap.c                    |   2 +-
 drivers/net/qede/qede_if.h                         |   2 +-
 drivers/net/ring/rte_eth_ring.c                    |   2 +-
 drivers/net/szedata2/rte_eth_szedata2.c            |   2 +-
 drivers/net/thunderx/nicvf_struct.h                |   2 +-
 drivers/net/vhost/Makefile                         |   2 +-
 drivers/net/vhost/rte_eth_vhost.c                  |   6 +-
 drivers/net/vhost/rte_eth_vhost.h                  |   4 +-
 drivers/net/virtio/Makefile                        |   2 +-
 drivers/net/virtio/virtio_pci.h                    |   2 +-
 drivers/net/virtio/virtio_rxtx.h                   |   6 +-
 drivers/net/vmxnet3/vmxnet3_ring.h                 |   4 +-
 examples/bond/main.c                               |  16 +-
 examples/distributor/main.c                        |  26 +--
 examples/exception_path/main.c                     |  35 ++-
 examples/ip_fragmentation/main.c                   |  33 +--
 examples/ip_pipeline/init.c                        |   4 +-
 examples/ip_reassembly/main.c                      |  34 +--
 examples/ipv4_multicast/main.c                     |  30 +--
 examples/kni/main.c                                |  30 +--
 examples/l2fwd-cat/l2fwd-cat.c                     |  12 +-
 examples/l2fwd-jobstats/main.c                     |  34 +--
 examples/l2fwd-keepalive/main.c                    |  50 ++---
 examples/l2fwd/main.c                              |  47 ++--
 examples/l3fwd-acl/main.c                          |   9 +-
 examples/l3fwd-power/main.c                        |  60 ++---
 examples/l3fwd-vf/main.c                           |  50 +++--
 examples/l3fwd/l3fwd.h                             |  10 +-
 examples/l3fwd/l3fwd_common.h                      |   2 +-
 examples/l3fwd/l3fwd_em.c                          |   2 +-
 examples/l3fwd/l3fwd_em.h                          |   6 +-
 examples/l3fwd/l3fwd_em_hlm.h                      |  14 +-
 examples/l3fwd/l3fwd_lpm.c                         |  15 +-
 examples/l3fwd/l3fwd_lpm.h                         |   4 +-
 examples/l3fwd/l3fwd_lpm_neon.h                    |   4 +-
 examples/l3fwd/l3fwd_lpm_sse.h                     |   4 +-
 examples/l3fwd/main.c                              |  30 +--
 examples/link_status_interrupt/main.c              |   9 +-
 examples/load_balancer/config.c                    |  14 +-
 examples/load_balancer/init.c                      |  34 ++-
 examples/load_balancer/main.h                      |  11 +-
 examples/load_balancer/runtime.c                   |  12 +-
 .../client_server_mp/mp_client/client.c            |  17 +-
 .../client_server_mp/mp_server/args.c              |   4 +-
 .../client_server_mp/mp_server/args.h              |   2 +-
 .../client_server_mp/mp_server/init.c              |  11 +-
 .../client_server_mp/mp_server/main.c              |   2 +-
 .../multi_process/client_server_mp/shared/common.h |   4 +-
 examples/multi_process/l2fwd_fork/main.c           |  23 +-
 examples/netmap_compat/lib/compat_netmap.c         |  52 +++--
 examples/netmap_compat/lib/compat_netmap.h         |   2 +-
 examples/packet_ordering/main.c                    |  19 +-
 examples/performance-thread/l3fwd-thread/main.c    | 143 ++++++------
 examples/ptpclient/ptpclient.c                     |   4 +-
 examples/qos_sched/args.c                          |  12 +-
 examples/qos_sched/init.c                          |  31 +--
 examples/qos_sched/main.c                          |  14 +-
 examples/qos_sched/main.h                          |  24 +-
 examples/qos_sched/stats.c                         |  16 +-
 examples/quota_watermark/qw/init.c                 |   4 +-
 examples/quota_watermark/qw/main.c                 |  10 +-
 examples/rxtx_callbacks/main.c                     |   8 +-
 examples/server_node_efd/server/main.c             |   2 +-
 examples/server_node_efd/shared/common.h           |   4 +-
 examples/skeleton/basicfwd.c                       |  12 +-
 examples/vhost/main.c                              |  10 +-
 lib/librte_bitratestats/Makefile                   |   2 +-
 lib/librte_bitratestats/rte_bitrate.c              |   2 +-
 lib/librte_bitratestats/rte_bitrate.h              |   2 +-
 lib/librte_ether/Makefile                          |   2 +-
 lib/librte_ether/rte_ethdev.c                      | 241 +++++++++++----------
 lib/librte_ether/rte_ethdev.h                      | 238 ++++++++++----------
 lib/librte_ether/rte_flow.c                        |   2 +-
 lib/librte_ether/rte_flow_driver.h                 |   2 +-
 lib/librte_ether/rte_tm.c                          |  62 +++---
 lib/librte_ether/rte_tm.h                          |  60 ++---
 lib/librte_ether/rte_tm_driver.h                   |   2 +-
 lib/librte_kni/Makefile                            |   2 +-
 lib/librte_kni/rte_kni.h                           |   6 +-
 lib/librte_latencystats/rte_latencystats.c         |  12 +-
 lib/librte_mbuf/rte_mbuf.c                         |   2 +-
 lib/librte_mbuf/rte_mbuf.h                         |   4 +-
 lib/librte_pdump/Makefile                          |   2 +-
 lib/librte_pdump/rte_pdump.c                       |  16 +-
 lib/librte_pdump/rte_pdump.h                       |   4 +-
 lib/librte_port/Makefile                           |   2 +-
 lib/librte_port/rte_port_ethdev.c                  |   6 +-
 lib/librte_port/rte_port_ethdev.h                  |   6 +-
 test/test/test_kni.c                               |  12 +-
 test/test/test_link_bonding.c                      |  40 ++--
 test/test/test_link_bonding_mode4.c                |  12 +-
 test/test/test_pmd_perf.c                          |  30 +--
 test/test/test_pmd_ring_perf.c                     |   2 +-
 test/test/virtual_pmd.c                            |  24 +-
 test/test/virtual_pmd.h                            |  28 +--
 156 files changed, 1402 insertions(+), 1498 deletions(-)

-- 
2.13.3

^ permalink raw reply	[relevance 4%]

* [dpdk-dev] [PATCH v4 1/5] net/bonding: remove bonding APIs using ABI versioning
  2017-09-21  8:32  4% ` [dpdk-dev] [PATCH v4 0/5] " Zhiyong Yang
@ 2017-09-21  8:32  8%   ` Zhiyong Yang
  2017-09-21 10:36  4%     ` Ferruh Yigit
  2017-09-21  8:32  1%   ` [dpdk-dev] [PATCH v4 2/5] ethdev: increase port_id range Zhiyong Yang
  2017-09-25  3:22  4%   ` [dpdk-dev] [PATCH v5 0/5] " Zhiyong Yang
  2 siblings, 1 reply; 200+ results
From: Zhiyong Yang @ 2017-09-21  8:32 UTC (permalink / raw)
  To: dev; +Cc: thomas, ferruh.yigit, Zhiyong Yang

There are two bonding APIs using ABI versioning, and both have
port_id as parameter. Since we are already breaking ABI, no need
to keep older versions of APIs.

Signed-off-by: Zhiyong Yang <zhiyong.yang@intel.com>
---
 drivers/net/bonding/rte_eth_bond_8023ad.c    | 139 +--------------------------
 drivers/net/bonding/rte_eth_bond_8023ad.h    |  18 ----
 drivers/net/bonding/rte_eth_bond_version.map |   4 -
 3 files changed, 2 insertions(+), 159 deletions(-)

diff --git a/drivers/net/bonding/rte_eth_bond_8023ad.c b/drivers/net/bonding/rte_eth_bond_8023ad.c
index 20b5a8961..efb9c6e77 100644
--- a/drivers/net/bonding/rte_eth_bond_8023ad.c
+++ b/drivers/net/bonding/rte_eth_bond_8023ad.c
@@ -1114,17 +1114,6 @@ bond_mode_8023ad_conf_get(struct rte_eth_dev *dev,
 }
 
 static void
-bond_mode_8023ad_conf_get_v1607(struct rte_eth_dev *dev,
-		struct rte_eth_bond_8023ad_conf *conf)
-{
-	struct bond_dev_private *internals = dev->data->dev_private;
-	struct mode8023ad_private *mode4 = &internals->mode4;
-
-	bond_mode_8023ad_conf_get(dev, conf);
-	conf->slowrx_cb = mode4->slowrx_cb;
-}
-
-static void
 bond_mode_8023ad_conf_get_v1708(struct rte_eth_dev *dev,
 		struct rte_eth_bond_8023ad_conf *conf)
 {
@@ -1171,27 +1160,6 @@ bond_mode_8023ad_conf_assign(struct mode8023ad_private *mode4,
 	mode4->dedicated_queues.tx_qid = UINT16_MAX;
 }
 
-static void
-bond_mode_8023ad_setup_v20(struct rte_eth_dev *dev,
-		struct rte_eth_bond_8023ad_conf *conf)
-{
-	struct rte_eth_bond_8023ad_conf def_conf;
-	struct bond_dev_private *internals = dev->data->dev_private;
-	struct mode8023ad_private *mode4 = &internals->mode4;
-
-	if (conf == NULL) {
-		conf = &def_conf;
-		bond_mode_8023ad_conf_get_default(conf);
-	}
-
-	bond_mode_8023ad_stop(dev);
-	bond_mode_8023ad_conf_assign(mode4, conf);
-
-	if (dev->data->dev_started)
-		bond_mode_8023ad_start(dev);
-}
-
-
 void
 bond_mode_8023ad_setup(struct rte_eth_dev *dev,
 		struct rte_eth_bond_8023ad_conf *conf)
@@ -1207,27 +1175,6 @@ bond_mode_8023ad_setup(struct rte_eth_dev *dev,
 
 	bond_mode_8023ad_stop(dev);
 	bond_mode_8023ad_conf_assign(mode4, conf);
-
-
-	if (dev->data->dev_started)
-		bond_mode_8023ad_start(dev);
-}
-
-static void
-bond_mode_8023ad_setup_v1708(struct rte_eth_dev *dev,
-		struct rte_eth_bond_8023ad_conf *conf)
-{
-	struct rte_eth_bond_8023ad_conf def_conf;
-	struct bond_dev_private *internals = dev->data->dev_private;
-	struct mode8023ad_private *mode4 = &internals->mode4;
-
-	if (conf == NULL) {
-		conf = &def_conf;
-		bond_mode_8023ad_conf_get_default(conf);
-	}
-
-	bond_mode_8023ad_stop(dev);
-	bond_mode_8023ad_conf_assign(mode4, conf);
 	mode4->slowrx_cb = conf->slowrx_cb;
 	mode4->agg_selection = AGG_STABLE;
 
@@ -1358,43 +1305,7 @@ bond_mode_8023ad_handle_slow_pkt(struct bond_dev_private *internals,
 }
 
 int
-rte_eth_bond_8023ad_conf_get_v20(uint8_t port_id,
-		struct rte_eth_bond_8023ad_conf *conf)
-{
-	struct rte_eth_dev *bond_dev;
-
-	if (valid_bonded_port_id(port_id) != 0)
-		return -EINVAL;
-
-	if (conf == NULL)
-		return -EINVAL;
-
-	bond_dev = &rte_eth_devices[port_id];
-	bond_mode_8023ad_conf_get(bond_dev, conf);
-	return 0;
-}
-VERSION_SYMBOL(rte_eth_bond_8023ad_conf_get, _v20, 2.0);
-
-int
-rte_eth_bond_8023ad_conf_get_v1607(uint8_t port_id,
-		struct rte_eth_bond_8023ad_conf *conf)
-{
-	struct rte_eth_dev *bond_dev;
-
-	if (valid_bonded_port_id(port_id) != 0)
-		return -EINVAL;
-
-	if (conf == NULL)
-		return -EINVAL;
-
-	bond_dev = &rte_eth_devices[port_id];
-	bond_mode_8023ad_conf_get_v1607(bond_dev, conf);
-	return 0;
-}
-VERSION_SYMBOL(rte_eth_bond_8023ad_conf_get, _v1607, 16.07);
-
-int
-rte_eth_bond_8023ad_conf_get_v1708(uint8_t port_id,
+rte_eth_bond_8023ad_conf_get(uint8_t port_id,
 		struct rte_eth_bond_8023ad_conf *conf)
 {
 	struct rte_eth_dev *bond_dev;
@@ -1409,10 +1320,6 @@ rte_eth_bond_8023ad_conf_get_v1708(uint8_t port_id,
 	bond_mode_8023ad_conf_get_v1708(bond_dev, conf);
 	return 0;
 }
-MAP_STATIC_SYMBOL(int rte_eth_bond_8023ad_conf_get(uint8_t port_id,
-		struct rte_eth_bond_8023ad_conf *conf),
-		rte_eth_bond_8023ad_conf_get_v1708);
-BIND_DEFAULT_SYMBOL(rte_eth_bond_8023ad_conf_get, _v1708, 17.08);
 
 int
 rte_eth_bond_8023ad_agg_selection_set(uint8_t port_id,
@@ -1483,25 +1390,7 @@ bond_8023ad_setup_validate(uint8_t port_id,
 }
 
 int
-rte_eth_bond_8023ad_setup_v20(uint8_t port_id,
-		struct rte_eth_bond_8023ad_conf *conf)
-{
-	struct rte_eth_dev *bond_dev;
-	int err;
-
-	err = bond_8023ad_setup_validate(port_id, conf);
-	if (err != 0)
-		return err;
-
-	bond_dev = &rte_eth_devices[port_id];
-	bond_mode_8023ad_setup_v20(bond_dev, conf);
-
-	return 0;
-}
-VERSION_SYMBOL(rte_eth_bond_8023ad_setup, _v20, 2.0);
-
-int
-rte_eth_bond_8023ad_setup_v1607(uint8_t port_id,
+rte_eth_bond_8023ad_setup(uint8_t port_id,
 		struct rte_eth_bond_8023ad_conf *conf)
 {
 	struct rte_eth_dev *bond_dev;
@@ -1516,30 +1405,6 @@ rte_eth_bond_8023ad_setup_v1607(uint8_t port_id,
 
 	return 0;
 }
-VERSION_SYMBOL(rte_eth_bond_8023ad_setup, _v1607, 16.07);
-
-
-int
-rte_eth_bond_8023ad_setup_v1708(uint8_t port_id,
-		struct rte_eth_bond_8023ad_conf *conf)
-{
-	struct rte_eth_dev *bond_dev;
-	int err;
-
-	err = bond_8023ad_setup_validate(port_id, conf);
-	if (err != 0)
-		return err;
-
-	bond_dev = &rte_eth_devices[port_id];
-	bond_mode_8023ad_setup_v1708(bond_dev, conf);
-
-	return 0;
-}
-BIND_DEFAULT_SYMBOL(rte_eth_bond_8023ad_setup, _v1708, 17.08);
-MAP_STATIC_SYMBOL(int rte_eth_bond_8023ad_setup(uint8_t port_id,
-		struct rte_eth_bond_8023ad_conf *conf),
-		rte_eth_bond_8023ad_setup_v1708);
-
 
 
 
diff --git a/drivers/net/bonding/rte_eth_bond_8023ad.h b/drivers/net/bonding/rte_eth_bond_8023ad.h
index 1d353c734..d609745e0 100644
--- a/drivers/net/bonding/rte_eth_bond_8023ad.h
+++ b/drivers/net/bonding/rte_eth_bond_8023ad.h
@@ -194,15 +194,6 @@ struct rte_eth_bond_8023ad_slave_info {
 int
 rte_eth_bond_8023ad_conf_get(uint8_t port_id,
 		struct rte_eth_bond_8023ad_conf *conf);
-int
-rte_eth_bond_8023ad_conf_get_v20(uint8_t port_id,
-		struct rte_eth_bond_8023ad_conf *conf);
-int
-rte_eth_bond_8023ad_conf_get_v1607(uint8_t port_id,
-		struct rte_eth_bond_8023ad_conf *conf);
-int
-rte_eth_bond_8023ad_conf_get_v1708(uint8_t port_id,
-		struct rte_eth_bond_8023ad_conf *conf);
 
 /**
  * @internal
@@ -218,15 +209,6 @@ rte_eth_bond_8023ad_conf_get_v1708(uint8_t port_id,
 int
 rte_eth_bond_8023ad_setup(uint8_t port_id,
 		struct rte_eth_bond_8023ad_conf *conf);
-int
-rte_eth_bond_8023ad_setup_v20(uint8_t port_id,
-		struct rte_eth_bond_8023ad_conf *conf);
-int
-rte_eth_bond_8023ad_setup_v1607(uint8_t port_id,
-		struct rte_eth_bond_8023ad_conf *conf);
-int
-rte_eth_bond_8023ad_setup_v1708(uint8_t port_id,
-		struct rte_eth_bond_8023ad_conf *conf);
 
 /**
  * @internal
diff --git a/drivers/net/bonding/rte_eth_bond_version.map b/drivers/net/bonding/rte_eth_bond_version.map
index 0f4e847da..ec3374b0f 100644
--- a/drivers/net/bonding/rte_eth_bond_version.map
+++ b/drivers/net/bonding/rte_eth_bond_version.map
@@ -1,8 +1,6 @@
 DPDK_2.0 {
 	global:
 
-	rte_eth_bond_8023ad_conf_get;
-	rte_eth_bond_8023ad_setup;
 	rte_eth_bond_active_slaves_get;
 	rte_eth_bond_create;
 	rte_eth_bond_link_monitoring_set;
@@ -39,8 +37,6 @@ DPDK_16.07 {
 	rte_eth_bond_8023ad_ext_distrib;
 	rte_eth_bond_8023ad_ext_distrib_get;
 	rte_eth_bond_8023ad_ext_slowtx;
-	rte_eth_bond_8023ad_conf_get;
-	rte_eth_bond_8023ad_setup;
 
 } DPDK_16.04;
 
-- 
2.13.3

^ permalink raw reply	[relevance 8%]

* [dpdk-dev] [PATCH v4 2/5] ethdev: increase port_id range
  2017-09-21  8:32  4% ` [dpdk-dev] [PATCH v4 0/5] " Zhiyong Yang
  2017-09-21  8:32  8%   ` [dpdk-dev] [PATCH v4 1/5] net/bonding: remove bonding APIs using ABI versioning Zhiyong Yang
@ 2017-09-21  8:32  1%   ` Zhiyong Yang
  2017-09-25  3:22  4%   ` [dpdk-dev] [PATCH v5 0/5] " Zhiyong Yang
  2 siblings, 0 replies; 200+ results
From: Zhiyong Yang @ 2017-09-21  8:32 UTC (permalink / raw)
  To: dev; +Cc: thomas, ferruh.yigit, Zhiyong Yang

Extend port_id definition from uint8_t to uint16_t in lib and drivers
data structures, specifically rte_eth_dev_data. Modify the APIs,
drivers and app using port_id at the same time.

Fix some checkpatch issues from the original code and remove some
unnecessary cast operations.

release_17_11 and deprecation have been updated in the patch.

Signed-off-by: Zhiyong Yang <zhiyong.yang@intel.com>
---
 app/pdump/main.c                                  |   2 +-
 app/test-pmd/cmdline.c                            |   6 +-
 app/test-pmd/config.c                             |   4 +-
 app/test-pmd/ieee1588fwd.c                        |  26 ++-
 app/test-pmd/parameters.c                         |   2 +-
 app/test-pmd/rxonly.c                             |   2 +-
 app/test-pmd/testpmd.c                            |  18 +-
 app/test-pmd/testpmd.h                            |   4 +-
 doc/guides/rel_notes/deprecation.rst              |   6 -
 doc/guides/rel_notes/release_17_11.rst            |  18 +-
 drivers/net/af_packet/Makefile                    |   2 +-
 drivers/net/af_packet/rte_eth_af_packet.c         |   2 +-
 drivers/net/ark/ark_ethdev.c                      |   2 +-
 drivers/net/avp/Makefile                          |   2 +-
 drivers/net/avp/avp_ethdev.c                      |   2 +-
 drivers/net/bnx2x/Makefile                        |   2 +-
 drivers/net/bnx2x/bnx2x_rxtx.h                    |   4 +-
 drivers/net/bnxt/Makefile                         |   2 +-
 drivers/net/bnxt/bnxt.h                           |   2 +-
 drivers/net/bnxt/bnxt_ethdev.c                    |   4 +-
 drivers/net/bnxt/bnxt_rxq.h                       |   2 +-
 drivers/net/bnxt/bnxt_txq.h                       |   2 +-
 drivers/net/bnxt/rte_pmd_bnxt.c                   |  32 +--
 drivers/net/bnxt/rte_pmd_bnxt.h                   |  32 +--
 drivers/net/bonding/Makefile                      |   2 +-
 drivers/net/bonding/rte_eth_bond.h                |  42 ++--
 drivers/net/bonding/rte_eth_bond_8023ad.c         |  60 +++---
 drivers/net/bonding/rte_eth_bond_8023ad.h         |  30 +--
 drivers/net/bonding/rte_eth_bond_8023ad_private.h |  12 +-
 drivers/net/bonding/rte_eth_bond_alb.c            |   6 +-
 drivers/net/bonding/rte_eth_bond_alb.h            |   6 +-
 drivers/net/bonding/rte_eth_bond_api.c            |  64 +++---
 drivers/net/bonding/rte_eth_bond_args.c           |   2 +-
 drivers/net/bonding/rte_eth_bond_pmd.c            |  62 +++---
 drivers/net/bonding/rte_eth_bond_private.h        |  45 ++--
 drivers/net/e1000/Makefile                        |   2 +-
 drivers/net/e1000/em_ethdev.c                     |   2 +-
 drivers/net/e1000/em_rxtx.c                       |   4 +-
 drivers/net/e1000/igb_rxtx.c                      |   4 +-
 drivers/net/failsafe/Makefile                     |   2 +-
 drivers/net/failsafe/failsafe_ether.c             |   4 +-
 drivers/net/failsafe/failsafe_private.h           |   4 +-
 drivers/net/fm10k/Makefile                        |   2 +-
 drivers/net/fm10k/fm10k.h                         |   6 +-
 drivers/net/i40e/Makefile                         |   2 +-
 drivers/net/i40e/i40e_ethdev.c                    |   5 +-
 drivers/net/i40e/i40e_rxtx.h                      |   4 +-
 drivers/net/i40e/rte_pmd_i40e.c                   |  50 ++---
 drivers/net/i40e/rte_pmd_i40e.h                   |  48 ++---
 drivers/net/ixgbe/Makefile                        |   2 +-
 drivers/net/ixgbe/ixgbe_ethdev.c                  |   5 +-
 drivers/net/ixgbe/ixgbe_rxtx.h                    |   4 +-
 drivers/net/ixgbe/rte_pmd_ixgbe.c                 |  60 +++---
 drivers/net/ixgbe/rte_pmd_ixgbe.h                 |  64 +++---
 drivers/net/mlx5/mlx5_rxtx.h                      |   4 +-
 drivers/net/nfp/nfp_net.c                         |  16 +-
 drivers/net/nfp/nfp_net_pmd.h                     |   2 +-
 drivers/net/null/Makefile                         |   2 +-
 drivers/net/null/rte_eth_null.c                   |   2 +-
 drivers/net/pcap/Makefile                         |   2 +-
 drivers/net/pcap/rte_eth_pcap.c                   |   2 +-
 drivers/net/qede/qede_if.h                        |   2 +-
 drivers/net/ring/rte_eth_ring.c                   |   2 +-
 drivers/net/szedata2/rte_eth_szedata2.c           |   2 +-
 drivers/net/thunderx/nicvf_struct.h               |   2 +-
 drivers/net/vhost/Makefile                        |   2 +-
 drivers/net/vhost/rte_eth_vhost.c                 |   6 +-
 drivers/net/vhost/rte_eth_vhost.h                 |   4 +-
 drivers/net/virtio/Makefile                       |   2 +-
 drivers/net/virtio/virtio_pci.h                   |   2 +-
 drivers/net/virtio/virtio_rxtx.h                  |   6 +-
 drivers/net/vmxnet3/vmxnet3_ring.h                |   4 +-
 lib/librte_bitratestats/Makefile                  |   2 +-
 lib/librte_bitratestats/rte_bitrate.c             |   2 +-
 lib/librte_bitratestats/rte_bitrate.h             |   2 +-
 lib/librte_ether/Makefile                         |   2 +-
 lib/librte_ether/rte_ethdev.c                     | 241 +++++++++++-----------
 lib/librte_ether/rte_ethdev.h                     | 238 ++++++++++-----------
 lib/librte_ether/rte_flow.c                       |   2 +-
 lib/librte_ether/rte_flow_driver.h                |   2 +-
 lib/librte_ether/rte_tm.c                         |  62 +++---
 lib/librte_ether/rte_tm.h                         |  60 +++---
 lib/librte_ether/rte_tm_driver.h                  |   2 +-
 lib/librte_kni/Makefile                           |   2 +-
 lib/librte_kni/rte_kni.h                          |   6 +-
 lib/librte_latencystats/rte_latencystats.c        |  12 +-
 lib/librte_pdump/Makefile                         |   2 +-
 lib/librte_pdump/rte_pdump.c                      |  16 +-
 lib/librte_pdump/rte_pdump.h                      |   4 +-
 lib/librte_port/Makefile                          |   2 +-
 lib/librte_port/rte_port_ethdev.c                 |   6 +-
 lib/librte_port/rte_port_ethdev.h                 |   6 +-
 92 files changed, 773 insertions(+), 747 deletions(-)

diff --git a/app/pdump/main.c b/app/pdump/main.c
index 3b13753d9..090a50cfc 100644
--- a/app/pdump/main.c
+++ b/app/pdump/main.c
@@ -623,7 +623,7 @@ static void
 create_mp_ring_vdev(void)
 {
 	int i;
-	uint8_t portid;
+	uint16_t portid;
 	struct pdump_tuples *pt = NULL;
 	struct rte_mempool *mbuf_pool = NULL;
 	char vdev_args[SIZE];
diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c
index ccdf239d6..d9d083888 100644
--- a/app/test-pmd/cmdline.c
+++ b/app/test-pmd/cmdline.c
@@ -4588,7 +4588,7 @@ struct cmd_show_bonding_config_result {
 	cmdline_fixed_string_t show;
 	cmdline_fixed_string_t bonding;
 	cmdline_fixed_string_t config;
-	uint8_t port_id;
+	portid_t port_id;
 };
 
 static void cmd_show_bonding_config_parsed(void *parsed_result,
@@ -4597,7 +4597,7 @@ static void cmd_show_bonding_config_parsed(void *parsed_result,
 {
 	struct cmd_show_bonding_config_result *res = parsed_result;
 	int bonding_mode, agg_mode;
-	uint8_t slaves[RTE_MAX_ETHPORTS];
+	portid_t slaves[RTE_MAX_ETHPORTS];
 	int num_slaves, num_active_slaves;
 	int primary_id;
 	int i;
@@ -11500,7 +11500,7 @@ struct cmd_vf_vlan_stripq_result {
 	cmdline_fixed_string_t vf;
 	cmdline_fixed_string_t vlan;
 	cmdline_fixed_string_t stripq;
-	uint8_t port_id;
+	portid_t port_id;
 	uint16_t vf_id;
 	cmdline_fixed_string_t on_off;
 };
diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c
index 3ae3e1cd8..155136dd5 100644
--- a/app/test-pmd/config.c
+++ b/app/test-pmd/config.c
@@ -358,7 +358,7 @@ rx_queue_infos_display(portid_t port_id, uint16_t queue_id)
 
 	rc = rte_eth_rx_queue_info_get(port_id, queue_id, &qinfo);
 	if (rc != 0) {
-		printf("Failed to retrieve information for port: %hhu, "
+		printf("Failed to retrieve information for port: %u, "
 			"RX queue: %hu\nerror desc: %s(%d)\n",
 			port_id, queue_id, strerror(-rc), rc);
 		return;
@@ -391,7 +391,7 @@ tx_queue_infos_display(portid_t port_id, uint16_t queue_id)
 
 	rc = rte_eth_tx_queue_info_get(port_id, queue_id, &qinfo);
 	if (rc != 0) {
-		printf("Failed to retrieve information for port: %hhu, "
+		printf("Failed to retrieve information for port: %u, "
 			"TX queue: %hu\nerror desc: %s(%d)\n",
 			port_id, queue_id, strerror(-rc), rc);
 		return;
diff --git a/app/test-pmd/ieee1588fwd.c b/app/test-pmd/ieee1588fwd.c
index 51170ee3e..91ee78646 100644
--- a/app/test-pmd/ieee1588fwd.c
+++ b/app/test-pmd/ieee1588fwd.c
@@ -86,12 +86,11 @@ port_ieee1588_rx_timestamp_check(portid_t pi, uint32_t index)
 	struct timespec timestamp = {0, 0};
 
 	if (rte_eth_timesync_read_rx_timestamp(pi, &timestamp, index) < 0) {
-		printf("Port %u RX timestamp registers not valid\n",
-		       (unsigned) pi);
+		printf("Port %u RX timestamp registers not valid\n", pi);
 		return;
 	}
 	printf("Port %u RX timestamp value %lu s %lu ns\n",
-	       (unsigned) pi, timestamp.tv_sec, timestamp.tv_nsec);
+		pi, timestamp.tv_sec, timestamp.tv_nsec);
 }
 
 #define MAX_TX_TMST_WAIT_MICROSECS 1000 /**< 1 milli-second */
@@ -110,12 +109,12 @@ port_ieee1588_tx_timestamp_check(portid_t pi)
 	if (wait_us >= MAX_TX_TMST_WAIT_MICROSECS) {
 		printf("Port %u TX timestamp registers not valid after "
 		       "%u micro-seconds\n",
-		       (unsigned) pi, (unsigned) MAX_TX_TMST_WAIT_MICROSECS);
+		       pi, MAX_TX_TMST_WAIT_MICROSECS);
 		return;
 	}
 	printf("Port %u TX timestamp value %lu s %lu ns validated after "
 	       "%u micro-second%s\n",
-	       (unsigned) pi, timestamp.tv_sec, timestamp.tv_nsec, wait_us,
+	       pi, timestamp.tv_sec, timestamp.tv_nsec, wait_us,
 	       (wait_us == 1) ? "" : "s");
 }
 
@@ -148,11 +147,11 @@ ieee1588_packet_fwd(struct fwd_stream *fs)
 		if (eth_type == ETHER_TYPE_1588) {
 			printf("Port %u Received PTP packet not filtered"
 			       " by hardware\n",
-			       (unsigned) fs->rx_port);
+			       fs->rx_port);
 		} else {
 			printf("Port %u Received non PTP packet type=0x%4x "
 			       "len=%u\n",
-			       (unsigned) fs->rx_port, eth_type,
+			       fs->rx_port, eth_type,
 			       (unsigned) mb->pkt_len);
 		}
 		rte_pktmbuf_free(mb);
@@ -161,7 +160,7 @@ ieee1588_packet_fwd(struct fwd_stream *fs)
 	if (eth_type != ETHER_TYPE_1588) {
 		printf("Port %u Received NON PTP packet incorrectly"
 		       " detected by hardware\n",
-		       (unsigned) fs->rx_port);
+		       fs->rx_port);
 		rte_pktmbuf_free(mb);
 		return;
 	}
@@ -175,19 +174,19 @@ ieee1588_packet_fwd(struct fwd_stream *fs)
 	if (ptp_hdr->version != 0x02) {
 		printf("Port %u Received PTP V2 Ethernet frame with wrong PTP"
 		       " protocol version 0x%x (should be 0x02)\n",
-		       (unsigned) fs->rx_port, ptp_hdr->version);
+		       fs->rx_port, ptp_hdr->version);
 		rte_pktmbuf_free(mb);
 		return;
 	}
 	if (ptp_hdr->msg_id != PTP_SYNC_MESSAGE) {
 		printf("Port %u Received PTP V2 Ethernet frame with unexpected"
 		       " message ID 0x%x (expected 0x0 - PTP_SYNC_MESSAGE)\n",
-		       (unsigned) fs->rx_port, ptp_hdr->msg_id);
+		       fs->rx_port, ptp_hdr->msg_id);
 		rte_pktmbuf_free(mb);
 		return;
 	}
 	printf("Port %u IEEE1588 PTP V2 SYNC Message filtered by hardware\n",
-	       (unsigned) fs->rx_port);
+	       fs->rx_port);
 
 	/*
 	 * Check that the received PTP packet has been timestamped by the
@@ -196,7 +195,7 @@ ieee1588_packet_fwd(struct fwd_stream *fs)
 	if (! (mb->ol_flags & PKT_RX_IEEE1588_TMST)) {
 		printf("Port %u Received PTP packet not timestamped"
 		       " by hardware\n",
-		       (unsigned) fs->rx_port);
+		       fs->rx_port);
 		rte_pktmbuf_free(mb);
 		return;
 	}
@@ -216,8 +215,7 @@ ieee1588_packet_fwd(struct fwd_stream *fs)
 	mb->ol_flags |= PKT_TX_IEEE1588_TMST;
 	fs->tx_packets += 1;
 	if (rte_eth_tx_burst(fs->rx_port, fs->tx_queue, &mb, 1) == 0) {
-		printf("Port %u sent PTP packet dropped\n",
-		       (unsigned) fs->rx_port);
+		printf("Port %u sent PTP packet dropped\n", fs->rx_port);
 		fs->fwd_dropped += 1;
 		rte_pktmbuf_free(mb);
 		return;
diff --git a/app/test-pmd/parameters.c b/app/test-pmd/parameters.c
index 2f7f70fd6..31287d71d 100644
--- a/app/test-pmd/parameters.c
+++ b/app/test-pmd/parameters.c
@@ -734,7 +734,7 @@ launch_args_parse(int argc, char** argv)
 			if (!strcmp(lgopts[opt_idx].name, "nb-ports")) {
 				n = atoi(optarg);
 				if (n > 0 && n <= nb_ports)
-					nb_fwd_ports = (uint8_t) n;
+					nb_fwd_ports = n;
 				else
 					rte_exit(EXIT_FAILURE,
 						 "Invalid port %d\n", n);
diff --git a/app/test-pmd/rxonly.c b/app/test-pmd/rxonly.c
index 5ef021905..57df01468 100644
--- a/app/test-pmd/rxonly.c
+++ b/app/test-pmd/rxonly.c
@@ -122,7 +122,7 @@ pkt_burst_receive(struct fwd_stream *fs)
 	 */
 	if (verbose_level > 0)
 		printf("port %u/queue %u: received %u packets\n",
-		       (unsigned) fs->rx_port,
+		       fs->rx_port,
 		       (unsigned) fs->rx_queue,
 		       (unsigned) nb_rx);
 	for (i = 0; i < nb_rx; i++) {
diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c
index e097ee04e..477e2e7ad 100644
--- a/app/test-pmd/testpmd.c
+++ b/app/test-pmd/testpmd.c
@@ -390,7 +390,7 @@ struct gro_status gro_ports[RTE_MAX_ETHPORTS];
 /* Forward function declarations */
 static void map_port_queue_stats_mapping_registers(uint8_t pi, struct rte_port *port);
 static void check_all_ports_link_status(uint32_t port_mask);
-static int eth_event_callback(uint8_t port_id,
+static int eth_event_callback(portid_t port_id,
 			      enum rte_eth_event_type type,
 			      void *param, void *ret_param);
 
@@ -1816,7 +1816,8 @@ check_all_ports_link_status(uint32_t port_mask)
 {
 #define CHECK_INTERVAL 100 /* 100ms */
 #define MAX_CHECK_TIME 90 /* 9s (90 * 100ms) in total */
-	uint8_t portid, count, all_ports_up, print_flag = 0;
+	portid_t portid;
+	uint8_t count, all_ports_up, print_flag = 0;
 	struct rte_eth_link link;
 
 	printf("Checking link statuses...\n");
@@ -1831,14 +1832,13 @@ check_all_ports_link_status(uint32_t port_mask)
 			/* print link status if flag set */
 			if (print_flag == 1) {
 				if (link.link_status)
-					printf("Port %d Link Up - speed %u "
-						"Mbps - %s\n", (uint8_t)portid,
-						(unsigned)link.link_speed,
+					printf(
+					"Port%d Link Up. speed %u Mbps- %s\n",
+					portid, link.link_speed,
 				(link.link_duplex == ETH_LINK_FULL_DUPLEX) ?
 					("full-duplex") : ("half-duplex\n"));
 				else
-					printf("Port %d Link Down\n",
-						(uint8_t)portid);
+					printf("Port %d Link Down\n", portid);
 				continue;
 			}
 			/* clear all_ports_up flag if any link down */
@@ -1885,7 +1885,7 @@ rmv_event_callback(void *arg)
 
 /* This function is used by the interrupt thread */
 static int
-eth_event_callback(uint8_t port_id, enum rte_eth_event_type type, void *param,
+eth_event_callback(portid_t port_id, enum rte_eth_event_type type, void *param,
 		  void *ret_param)
 {
 	static const char * const event_desc[] = {
@@ -2328,7 +2328,7 @@ int
 main(int argc, char** argv)
 {
 	int  diag;
-	uint8_t port_id;
+	portid_t port_id;
 
 	signal(SIGINT, signal_handler);
 	signal(SIGTERM, signal_handler);
diff --git a/app/test-pmd/testpmd.h b/app/test-pmd/testpmd.h
index 1d1ee7587..657c1235c 100644
--- a/app/test-pmd/testpmd.h
+++ b/app/test-pmd/testpmd.h
@@ -78,7 +78,7 @@
 #define UMA_NO_CONFIG  0xFF
 
 typedef uint8_t  lcoreid_t;
-typedef uint8_t  portid_t;
+typedef uint16_t portid_t;
 typedef uint16_t queueid_t;
 typedef uint16_t streamid_t;
 
@@ -283,7 +283,7 @@ enum dcb_mode_enable
 #define MAX_RX_QUEUE_STATS_MAPPINGS 4096 /* MAX_PORT of 32 @ 128 rx_queues/port */
 
 struct queue_stats_mappings {
-	uint8_t port_id;
+	portid_t port_id;
 	uint16_t queue_id;
 	uint8_t stats_counter_id;
 } __rte_cache_aligned;
diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst
index 3362f3350..45eb5c4a9 100644
--- a/doc/guides/rel_notes/deprecation.rst
+++ b/doc/guides/rel_notes/deprecation.rst
@@ -76,12 +76,6 @@ Deprecation Notices
   done by the EAL and not by the ``ethdev`` layer anymore. Users relying on this
   flag being present only have to remove their checks to follow the change.
 
-* ABI/API changes are planned for 17.11 in all structures which include port_id
-  definition such as "rte_eth_dev_data", "rte_port_ethdev_reader_params",
-  "rte_port_ethdev_writer_params", and so on. The definition of port_id will be
-  changed from 8 bits to 16 bits in order to support more than 256 ports in
-  DPDK. All APIs which have port_id parameter will be changed at the same time.
-
 * ethdev: An ABI change is planned for 17.11 for the structure rte_eth_dev_data.
   The size of the unique name will increase RTE_ETH_NAME_MAX_LEN from 32 to
   64 characters to allow using a globally unique identifier (GUID) in this field.
diff --git a/doc/guides/rel_notes/release_17_11.rst b/doc/guides/rel_notes/release_17_11.rst
index 8bf91bd40..6ff730e9e 100644
--- a/doc/guides/rel_notes/release_17_11.rst
+++ b/doc/guides/rel_notes/release_17_11.rst
@@ -41,6 +41,11 @@ New Features
      Also, make sure to start the actual text at the margin.
      =========================================================
 
+* **Extended port_id range from uint8_t to uint16_t.**
+
+  Increased port_id range from 8 bits to 16 bits in order to support more than
+  256 ports in dpdk. All ethdev APIs which have port_id parameter are changed
+  in the meantime.
 
 Resolved Issues
 ---------------
@@ -144,7 +149,10 @@ ABI Changes
    Also, make sure to start the actual text at the margin.
    =========================================================
 
+* **Extended port_id range.**
 
+  The size of the field ``port_id`` in the ``rte_eth_dev_data`` structure
+  changed, as described in the `New Features` section.
 
 Shared Library Versions
 -----------------------
@@ -165,19 +173,19 @@ The libraries prepended with a plus sign were incremented in this version.
 .. code-block:: diff
 
      librte_acl.so.2
-     librte_bitratestats.so.1
+     librte_bitratestats.so.2
      librte_cfgfile.so.2
      librte_cmdline.so.2
      librte_cryptodev.so.3
      librte_distributor.so.1
      librte_eal.so.5
-     librte_ethdev.so.7
+     librte_ethdev.so.8
      librte_eventdev.so.2
      librte_gro.so.1
      librte_hash.so.2
      librte_ip_frag.so.1
      librte_jobstats.so.1
-     librte_kni.so.2
+     librte_kni.so.3
      librte_kvargs.so.1
      librte_latencystats.so.1
      librte_lpm.so.2
@@ -186,11 +194,11 @@ The libraries prepended with a plus sign were incremented in this version.
      librte_meter.so.1
      librte_metrics.so.1
      librte_net.so.1
-     librte_pdump.so.1
+     librte_pdump.so.2
      librte_pipeline.so.3
      librte_pmd_bond.so.1
      librte_pmd_ring.so.2
-     librte_port.so.3
+     librte_port.so.4
      librte_power.so.1
      librte_reorder.so.1
      librte_ring.so.1
diff --git a/drivers/net/af_packet/Makefile b/drivers/net/af_packet/Makefile
index 70d517c16..4d62b7dbd 100644
--- a/drivers/net/af_packet/Makefile
+++ b/drivers/net/af_packet/Makefile
@@ -40,7 +40,7 @@ LIB = librte_pmd_af_packet.a
 
 EXPORT_MAP := rte_pmd_af_packet_version.map
 
-LIBABIVER := 1
+LIBABIVER := 2
 
 CFLAGS += -O3
 CFLAGS += $(WERROR_FLAGS)
diff --git a/drivers/net/af_packet/rte_eth_af_packet.c b/drivers/net/af_packet/rte_eth_af_packet.c
index 9a47852ca..483b0c107 100644
--- a/drivers/net/af_packet/rte_eth_af_packet.c
+++ b/drivers/net/af_packet/rte_eth_af_packet.c
@@ -75,7 +75,7 @@ struct pkt_rx_queue {
 	unsigned int framenum;
 
 	struct rte_mempool *mb_pool;
-	uint8_t in_port;
+	uint16_t in_port;
 
 	volatile unsigned long rx_pkts;
 	volatile unsigned long err_pkts;
diff --git a/drivers/net/ark/ark_ethdev.c b/drivers/net/ark/ark_ethdev.c
index 6db362b04..893284733 100644
--- a/drivers/net/ark/ark_ethdev.c
+++ b/drivers/net/ark/ark_ethdev.c
@@ -641,7 +641,7 @@ eth_ark_dev_stop(struct rte_eth_dev *dev)
 	for (i = 0; i < dev->data->nb_tx_queues; i++) {
 		status = eth_ark_tx_queue_stop(dev, i);
 		if (status != 0) {
-			uint8_t port = dev->data->port_id;
+			uint16_t port = dev->data->port_id;
 			PMD_DRV_LOG(ERR,
 				    "tx_queue stop anomaly"
 				    " port %u, queue %u\n",
diff --git a/drivers/net/avp/Makefile b/drivers/net/avp/Makefile
index cd465aac9..7ffb4d172 100644
--- a/drivers/net/avp/Makefile
+++ b/drivers/net/avp/Makefile
@@ -42,7 +42,7 @@ CFLAGS += $(WERROR_FLAGS) -I$(SRCDIR)
 
 EXPORT_MAP := rte_pmd_avp_version.map
 
-LIBABIVER := 1
+LIBABIVER := 2
 
 # install public header files to enable compilation of the hypervisor level
 # dpdk application
diff --git a/drivers/net/avp/avp_ethdev.c b/drivers/net/avp/avp_ethdev.c
index c746a0e2c..b5cc955f2 100644
--- a/drivers/net/avp/avp_ethdev.c
+++ b/drivers/net/avp/avp_ethdev.c
@@ -190,7 +190,7 @@ struct avp_dev {
 	struct rte_eth_dev_data *dev_data;
 	/**< Back pointer to ethernet device data */
 	volatile uint32_t flags; /**< Device operational flags */
-	uint8_t port_id; /**< Ethernet port identifier */
+	uint16_t port_id; /**< Ethernet port identifier */
 	struct rte_mempool *pool; /**< pkt mbuf mempool */
 	unsigned int guest_mbuf_size; /**< local pool mbuf size */
 	unsigned int host_mbuf_size; /**< host mbuf size */
diff --git a/drivers/net/bnx2x/Makefile b/drivers/net/bnx2x/Makefile
index e12310691..7a1c77523 100644
--- a/drivers/net/bnx2x/Makefile
+++ b/drivers/net/bnx2x/Makefile
@@ -12,7 +12,7 @@ LDLIBS += -lz
 
 EXPORT_MAP := rte_pmd_bnx2x_version.map
 
-LIBABIVER := 1
+LIBABIVER := 2
 
 ifeq ($(CONFIG_RTE_TOOLCHAIN_ICC),y)
 CFLAGS += -wd188 #188: enumerated type mixed with another type
diff --git a/drivers/net/bnx2x/bnx2x_rxtx.h b/drivers/net/bnx2x/bnx2x_rxtx.h
index 2e38ec26a..9600e0f1c 100644
--- a/drivers/net/bnx2x/bnx2x_rxtx.h
+++ b/drivers/net/bnx2x/bnx2x_rxtx.h
@@ -41,7 +41,7 @@ struct bnx2x_rx_queue {
 	uint16_t                   rx_cq_head;           /**< Index of current rcq bd. */
 	uint16_t                   rx_cq_tail;           /**< Index of last rcq bd. */
 	uint16_t                   queue_id;             /**< RX queue index. */
-	uint8_t                    port_id;              /**< Device port identifier. */
+	uint16_t                   port_id;              /**< Device port identifier. */
 	struct bnx2x_softc           *sc;                  /**< Ptr to dev_private data. */
 };
 
@@ -62,7 +62,7 @@ struct bnx2x_tx_queue {
 	uint16_t                   nb_tx_avail;          /**< Number of TX descriptors available. */
 	uint16_t                   nb_tx_pages;          /**< number of TX pages */
 	uint16_t                   queue_id;             /**< TX queue index. */
-	uint8_t                    port_id;              /**< Device port identifier. */
+	uint16_t                   port_id;              /**< Device port identifier. */
 	struct bnx2x_softc           *sc;                  /**< Ptr to dev_private data */
 };
 
diff --git a/drivers/net/bnxt/Makefile b/drivers/net/bnxt/Makefile
index b03f65dc9..55b49b538 100644
--- a/drivers/net/bnxt/Makefile
+++ b/drivers/net/bnxt/Makefile
@@ -40,7 +40,7 @@ LIB = librte_pmd_bnxt.a
 
 EXPORT_MAP := rte_pmd_bnxt_version.map
 
-LIBABIVER := 1
+LIBABIVER := 2
 
 CFLAGS += -O3
 CFLAGS += $(WERROR_FLAGS)
diff --git a/drivers/net/bnxt/bnxt.h b/drivers/net/bnxt/bnxt.h
index 405d94deb..26a9018b5 100644
--- a/drivers/net/bnxt/bnxt.h
+++ b/drivers/net/bnxt/bnxt.h
@@ -126,7 +126,7 @@ struct bnxt_pf_info {
 #define BNXT_FIRST_VF_FID	128
 #define BNXT_PF_RINGS_USED(bp)	bnxt_get_num_queues(bp)
 #define BNXT_PF_RINGS_AVAIL(bp)	(bp->pf.max_cp_rings - BNXT_PF_RINGS_USED(bp))
-	uint8_t			port_id;
+	uint16_t		port_id;
 	uint16_t		first_vf_id;
 	uint16_t		active_vfs;
 	uint16_t		max_vfs;
diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
index c9d11228b..2e817535e 100644
--- a/drivers/net/bnxt/bnxt_ethdev.c
+++ b/drivers/net/bnxt/bnxt_ethdev.c
@@ -489,13 +489,13 @@ static void bnxt_print_link_info(struct rte_eth_dev *eth_dev)
 
 	if (link->link_status)
 		RTE_LOG(INFO, PMD, "Port %d Link Up - speed %u Mbps - %s\n",
-			(uint8_t)(eth_dev->data->port_id),
+			eth_dev->data->port_id,
 			(uint32_t)link->link_speed,
 			(link->link_duplex == ETH_LINK_FULL_DUPLEX) ?
 			("full-duplex") : ("half-duplex\n"));
 	else
 		RTE_LOG(INFO, PMD, "Port %d Link Down\n",
-			(uint8_t)(eth_dev->data->port_id));
+			eth_dev->data->port_id);
 }
 
 static int bnxt_dev_lsc_intr_setup(struct rte_eth_dev *eth_dev)
diff --git a/drivers/net/bnxt/bnxt_rxq.h b/drivers/net/bnxt/bnxt_rxq.h
index 01aaa007f..cea0785d1 100644
--- a/drivers/net/bnxt/bnxt_rxq.h
+++ b/drivers/net/bnxt/bnxt_rxq.h
@@ -48,7 +48,7 @@ struct bnxt_rx_queue {
 	uint16_t		rx_free_thresh; /* max free RX desc to hold */
 	uint16_t		queue_id; /* RX queue index */
 	uint16_t		reg_idx; /* RX queue register index */
-	uint8_t			port_id; /* Device port identifier */
+	uint16_t		port_id; /* Device port identifier */
 	uint8_t			crc_len; /* 0 if CRC stripped, 4 otherwise */
 
 	struct bnxt		*bp;
diff --git a/drivers/net/bnxt/bnxt_txq.h b/drivers/net/bnxt/bnxt_txq.h
index 16f3a0bdd..f753c10f2 100644
--- a/drivers/net/bnxt/bnxt_txq.h
+++ b/drivers/net/bnxt/bnxt_txq.h
@@ -46,7 +46,7 @@ struct bnxt_tx_queue {
 	uint16_t		tx_next_rs; /* next desc to set RS bit */
 	uint16_t		queue_id; /* TX queue index */
 	uint16_t		reg_idx; /* TX queue register index */
-	uint8_t			port_id; /* Device port identifier */
+	uint16_t		port_id; /* Device port identifier */
 	uint8_t			pthresh; /* Prefetch threshold register */
 	uint8_t			hthresh; /* Host threshold register */
 	uint8_t			wthresh; /* Write-back threshold reg */
diff --git a/drivers/net/bnxt/rte_pmd_bnxt.c b/drivers/net/bnxt/rte_pmd_bnxt.c
index c343d9033..63fc27911 100644
--- a/drivers/net/bnxt/rte_pmd_bnxt.c
+++ b/drivers/net/bnxt/rte_pmd_bnxt.c
@@ -67,7 +67,7 @@ int bnxt_rcv_msg_from_vf(struct bnxt *bp, uint16_t vf_id, void *msg)
 		true : false;
 }
 
-int rte_pmd_bnxt_set_tx_loopback(uint8_t port, uint8_t on)
+int rte_pmd_bnxt_set_tx_loopback(uint16_t port, uint8_t on)
 {
 	struct rte_eth_dev *eth_dev;
 	struct bnxt *bp;
@@ -108,7 +108,7 @@ rte_pmd_bnxt_set_all_queues_drop_en_cb(struct bnxt_vnic_info *vnic, void *onptr)
 	vnic->bd_stall = !(*on);
 }
 
-int rte_pmd_bnxt_set_all_queues_drop_en(uint8_t port, uint8_t on)
+int rte_pmd_bnxt_set_all_queues_drop_en(uint16_t port, uint8_t on)
 {
 	struct rte_eth_dev *eth_dev;
 	struct bnxt *bp;
@@ -159,7 +159,7 @@ int rte_pmd_bnxt_set_all_queues_drop_en(uint8_t port, uint8_t on)
 	return rc;
 }
 
-int rte_pmd_bnxt_set_vf_mac_addr(uint8_t port, uint16_t vf,
+int rte_pmd_bnxt_set_vf_mac_addr(uint16_t port, uint16_t vf,
 				struct ether_addr *mac_addr)
 {
 	struct rte_eth_dev *dev;
@@ -191,7 +191,7 @@ int rte_pmd_bnxt_set_vf_mac_addr(uint8_t port, uint16_t vf,
 	return rc;
 }
 
-int rte_pmd_bnxt_set_vf_rate_limit(uint8_t port, uint16_t vf,
+int rte_pmd_bnxt_set_vf_rate_limit(uint16_t port, uint16_t vf,
 				uint16_t tx_rate, uint64_t q_msk)
 {
 	struct rte_eth_dev *eth_dev;
@@ -241,7 +241,7 @@ int rte_pmd_bnxt_set_vf_rate_limit(uint8_t port, uint16_t vf,
 	return rc;
 }
 
-int rte_pmd_bnxt_set_vf_mac_anti_spoof(uint8_t port, uint16_t vf, uint8_t on)
+int rte_pmd_bnxt_set_vf_mac_anti_spoof(uint16_t port, uint16_t vf, uint8_t on)
 {
 	struct rte_eth_dev_info dev_info;
 	struct rte_eth_dev *dev;
@@ -294,7 +294,7 @@ int rte_pmd_bnxt_set_vf_mac_anti_spoof(uint8_t port, uint16_t vf, uint8_t on)
 	return rc;
 }
 
-int rte_pmd_bnxt_set_vf_vlan_anti_spoof(uint8_t port, uint16_t vf, uint8_t on)
+int rte_pmd_bnxt_set_vf_vlan_anti_spoof(uint16_t port, uint16_t vf, uint8_t on)
 {
 	struct rte_eth_dev_info dev_info;
 	struct rte_eth_dev *dev;
@@ -350,7 +350,7 @@ rte_pmd_bnxt_set_vf_vlan_stripq_cb(struct bnxt_vnic_info *vnic, void *onptr)
 }
 
 int
-rte_pmd_bnxt_set_vf_vlan_stripq(uint8_t port, uint16_t vf, uint8_t on)
+rte_pmd_bnxt_set_vf_vlan_stripq(uint16_t port, uint16_t vf, uint8_t on)
 {
 	struct rte_eth_dev *dev;
 	struct rte_eth_dev_info dev_info;
@@ -385,7 +385,7 @@ rte_pmd_bnxt_set_vf_vlan_stripq(uint8_t port, uint16_t vf, uint8_t on)
 	return rc;
 }
 
-int rte_pmd_bnxt_set_vf_rxmode(uint8_t port, uint16_t vf,
+int rte_pmd_bnxt_set_vf_rxmode(uint16_t port, uint16_t vf,
 				uint16_t rx_mask, uint8_t on)
 {
 	struct rte_eth_dev *dev;
@@ -477,7 +477,7 @@ static int bnxt_set_vf_table(struct bnxt *bp, uint16_t vf)
 	return rc;
 }
 
-int rte_pmd_bnxt_set_vf_vlan_filter(uint8_t port, uint16_t vlan,
+int rte_pmd_bnxt_set_vf_vlan_filter(uint16_t port, uint16_t vlan,
 				    uint64_t vf_mask, uint8_t vlan_on)
 {
 	struct bnxt_vlan_table_entry *ve;
@@ -570,7 +570,7 @@ int rte_pmd_bnxt_set_vf_vlan_filter(uint8_t port, uint16_t vlan,
 	return rc;
 }
 
-int rte_pmd_bnxt_get_vf_stats(uint8_t port,
+int rte_pmd_bnxt_get_vf_stats(uint16_t port,
 			      uint16_t vf_id,
 			      struct rte_eth_stats *stats)
 {
@@ -598,7 +598,7 @@ int rte_pmd_bnxt_get_vf_stats(uint8_t port,
 	return bnxt_hwrm_func_qstats(bp, bp->pf.first_vf_id + vf_id, stats);
 }
 
-int rte_pmd_bnxt_reset_vf_stats(uint8_t port,
+int rte_pmd_bnxt_reset_vf_stats(uint16_t port,
 				uint16_t vf_id)
 {
 	struct rte_eth_dev *dev;
@@ -625,7 +625,7 @@ int rte_pmd_bnxt_reset_vf_stats(uint8_t port,
 	return bnxt_hwrm_func_clr_stats(bp, bp->pf.first_vf_id + vf_id);
 }
 
-int rte_pmd_bnxt_get_vf_rx_status(uint8_t port, uint16_t vf_id)
+int rte_pmd_bnxt_get_vf_rx_status(uint16_t port, uint16_t vf_id)
 {
 	struct rte_eth_dev *dev;
 	struct rte_eth_dev_info dev_info;
@@ -651,7 +651,7 @@ int rte_pmd_bnxt_get_vf_rx_status(uint8_t port, uint16_t vf_id)
 	return bnxt_vf_vnic_count(bp, vf_id);
 }
 
-int rte_pmd_bnxt_get_vf_tx_drop_count(uint8_t port, uint16_t vf_id,
+int rte_pmd_bnxt_get_vf_tx_drop_count(uint16_t port, uint16_t vf_id,
 				      uint64_t *count)
 {
 	struct rte_eth_dev *dev;
@@ -679,7 +679,7 @@ int rte_pmd_bnxt_get_vf_tx_drop_count(uint8_t port, uint16_t vf_id,
 					     count);
 }
 
-int rte_pmd_bnxt_mac_addr_add(uint8_t port, struct ether_addr *addr,
+int rte_pmd_bnxt_mac_addr_add(uint16_t port, struct ether_addr *addr,
 				uint32_t vf_id)
 {
 	struct rte_eth_dev *dev;
@@ -756,7 +756,7 @@ int rte_pmd_bnxt_mac_addr_add(uint8_t port, struct ether_addr *addr,
 }
 
 int
-rte_pmd_bnxt_set_vf_vlan_insert(uint8_t port, uint16_t vf,
+rte_pmd_bnxt_set_vf_vlan_insert(uint16_t port, uint16_t vf,
 		uint16_t vlan_id)
 {
 	struct rte_eth_dev *dev;
@@ -793,7 +793,7 @@ rte_pmd_bnxt_set_vf_vlan_insert(uint8_t port, uint16_t vf,
 	return rc;
 }
 
-int rte_pmd_bnxt_set_vf_persist_stats(uint8_t port, uint16_t vf, uint8_t on)
+int rte_pmd_bnxt_set_vf_persist_stats(uint16_t port, uint16_t vf, uint8_t on)
 {
 	struct rte_eth_dev_info dev_info;
 	struct rte_eth_dev *dev;
diff --git a/drivers/net/bnxt/rte_pmd_bnxt.h b/drivers/net/bnxt/rte_pmd_bnxt.h
index c4c4770e3..f881d30d6 100644
--- a/drivers/net/bnxt/rte_pmd_bnxt.h
+++ b/drivers/net/bnxt/rte_pmd_bnxt.h
@@ -78,7 +78,7 @@ struct rte_pmd_bnxt_mb_event_param {
  *   - (-ENODEV) if *port* invalid.
  *   - (-EINVAL) if bad parameter.
  */
-int rte_pmd_bnxt_set_vf_mac_anti_spoof(uint8_t port, uint16_t vf, uint8_t on);
+int rte_pmd_bnxt_set_vf_mac_anti_spoof(uint16_t port, uint16_t vf, uint8_t on);
 
 /**
  * Set the VF MAC address.
@@ -94,7 +94,7 @@ int rte_pmd_bnxt_set_vf_mac_anti_spoof(uint8_t port, uint16_t vf, uint8_t on);
  *   - (-ENODEV) if *port* invalid.
  *   - (-EINVAL) if *vf* or *mac_addr* is invalid.
  */
-int rte_pmd_bnxt_set_vf_mac_addr(uint8_t port, uint16_t vf,
+int rte_pmd_bnxt_set_vf_mac_addr(uint16_t port, uint16_t vf,
 		struct ether_addr *mac_addr);
 
 /**
@@ -115,7 +115,7 @@ int rte_pmd_bnxt_set_vf_mac_addr(uint8_t port, uint16_t vf,
  *   - (-EINVAL) if bad parameter.
  */
 int
-rte_pmd_bnxt_set_vf_vlan_stripq(uint8_t port, uint16_t vf, uint8_t on);
+rte_pmd_bnxt_set_vf_vlan_stripq(uint16_t port, uint16_t vf, uint8_t on);
 
 /**
  * Enable/Disable vf vlan insert
@@ -134,7 +134,7 @@ rte_pmd_bnxt_set_vf_vlan_stripq(uint8_t port, uint16_t vf, uint8_t on);
  *   - (-EINVAL) if bad parameter.
  */
 int
-rte_pmd_bnxt_set_vf_vlan_insert(uint8_t port, uint16_t vf,
+rte_pmd_bnxt_set_vf_vlan_insert(uint16_t port, uint16_t vf,
 		uint16_t vlan_id);
 
 /**
@@ -156,7 +156,7 @@ rte_pmd_bnxt_set_vf_vlan_insert(uint8_t port, uint16_t vf,
  *   - (-ENODEV) if *port_id* invalid.
  *   - (-EINVAL) if bad parameter.
  */
-int rte_pmd_bnxt_set_vf_vlan_filter(uint8_t port, uint16_t vlan,
+int rte_pmd_bnxt_set_vf_vlan_filter(uint16_t port, uint16_t vlan,
 				    uint64_t vf_mask, uint8_t vlan_on);
 
 /**
@@ -173,7 +173,7 @@ int rte_pmd_bnxt_set_vf_vlan_filter(uint8_t port, uint16_t vlan,
  *   - (-ENODEV) if *port* invalid.
  *   - (-EINVAL) if bad parameter.
  */
-int rte_pmd_bnxt_set_tx_loopback(uint8_t port, uint8_t on);
+int rte_pmd_bnxt_set_tx_loopback(uint16_t port, uint8_t on);
 
 /**
  * set all queues drop enable bit
@@ -189,7 +189,7 @@ int rte_pmd_bnxt_set_tx_loopback(uint8_t port, uint8_t on);
  *   - (-ENODEV) if *port* invalid.
  *   - (-EINVAL) if bad parameter.
  */
-int rte_pmd_bnxt_set_all_queues_drop_en(uint8_t port, uint8_t on);
+int rte_pmd_bnxt_set_all_queues_drop_en(uint16_t port, uint8_t on);
 
 /**
  * Set the VF rate limit.
@@ -207,7 +207,7 @@ int rte_pmd_bnxt_set_all_queues_drop_en(uint8_t port, uint8_t on);
  *   - (-ENODEV) if *port* invalid.
  *   - (-EINVAL) if *vf* or *mac_addr* is invalid.
  */
-int rte_pmd_bnxt_set_vf_rate_limit(uint8_t port, uint16_t vf,
+int rte_pmd_bnxt_set_vf_rate_limit(uint16_t port, uint16_t vf,
 				uint16_t tx_rate, uint64_t q_msk);
 
 /**
@@ -226,7 +226,7 @@ int rte_pmd_bnxt_set_vf_rate_limit(uint8_t port, uint16_t vf,
  *   - (-EINVAL) if bad parameter.
  */
 
-int rte_pmd_bnxt_get_vf_stats(uint8_t port,
+int rte_pmd_bnxt_get_vf_stats(uint16_t port,
 			      uint16_t vf_id,
 			      struct rte_eth_stats *stats);
 
@@ -242,7 +242,7 @@ int rte_pmd_bnxt_get_vf_stats(uint8_t port,
  *   - (-ENODEV) if *port* invalid.
  *   - (-EINVAL) if bad parameter.
  */
-int rte_pmd_bnxt_reset_vf_stats(uint8_t port,
+int rte_pmd_bnxt_reset_vf_stats(uint16_t port,
 				uint16_t vf_id);
 
 /**
@@ -261,7 +261,7 @@ int rte_pmd_bnxt_reset_vf_stats(uint8_t port,
  *   - (-ENODEV) if *port* invalid.
  *   - (-EINVAL) if bad parameter.
  */
-int rte_pmd_bnxt_set_vf_vlan_anti_spoof(uint8_t port, uint16_t vf, uint8_t on);
+int rte_pmd_bnxt_set_vf_vlan_anti_spoof(uint16_t port, uint16_t vf, uint8_t on);
 
 /**
  * Set RX L2 Filtering mode of a VF of an Ethernet device.
@@ -280,7 +280,7 @@ int rte_pmd_bnxt_set_vf_vlan_anti_spoof(uint8_t port, uint16_t vf, uint8_t on);
  *   - (-ENODEV) if *port_id* invalid.
  *   - (-EINVAL) if bad parameter.
  */
-int rte_pmd_bnxt_set_vf_rxmode(uint8_t port, uint16_t vf,
+int rte_pmd_bnxt_set_vf_rxmode(uint16_t port, uint16_t vf,
 				uint16_t rx_mask, uint8_t on);
 
 /**
@@ -297,7 +297,7 @@ int rte_pmd_bnxt_set_vf_rxmode(uint8_t port, uint16_t vf,
  *   - (-ENOMEM) on an allocation failure
  *   - (-1) firmware interface error
  */
-int rte_pmd_bnxt_get_vf_rx_status(uint8_t port, uint16_t vf_id);
+int rte_pmd_bnxt_get_vf_rx_status(uint16_t port, uint16_t vf_id);
 
 /**
  * Queries the TX drop counter for the function
@@ -313,7 +313,7 @@ int rte_pmd_bnxt_get_vf_rx_status(uint8_t port, uint16_t vf_id);
  *   - (-EINVAL) invalid vf_id specified.
  *   - (-ENOTSUP) Ethernet device is not a PF
  */
-int rte_pmd_bnxt_get_vf_tx_drop_count(uint8_t port, uint16_t vf_id,
+int rte_pmd_bnxt_get_vf_tx_drop_count(uint16_t port, uint16_t vf_id,
 				      uint64_t *count);
 
 /**
@@ -331,7 +331,7 @@ int rte_pmd_bnxt_get_vf_tx_drop_count(uint8_t port, uint16_t vf_id,
  *   - (-ENOTSUP) Ethernet device is not a PF
  *   - (-ENOMEM) on an allocation failure
  */
-int rte_pmd_bnxt_mac_addr_add(uint8_t port, struct ether_addr *mac_addr,
+int rte_pmd_bnxt_mac_addr_add(uint16_t port, struct ether_addr *mac_addr,
 				uint32_t vf_id);
 
 /**
@@ -350,5 +350,5 @@ int rte_pmd_bnxt_mac_addr_add(uint8_t port, struct ether_addr *mac_addr,
  *   - (-ENODEV) if *port* invalid.
  *   - (-EINVAL) if bad parameter.
  */
-int rte_pmd_bnxt_set_vf_persist_stats(uint8_t port, uint16_t vf, uint8_t on);
+int rte_pmd_bnxt_set_vf_persist_stats(uint16_t port, uint16_t vf, uint8_t on);
 #endif /* _PMD_BNXT_H_ */
diff --git a/drivers/net/bonding/Makefile b/drivers/net/bonding/Makefile
index 910c932da..ffc0c3cf7 100644
--- a/drivers/net/bonding/Makefile
+++ b/drivers/net/bonding/Makefile
@@ -41,7 +41,7 @@ CFLAGS += $(WERROR_FLAGS)
 
 EXPORT_MAP := rte_eth_bond_version.map
 
-LIBABIVER := 1
+LIBABIVER := 2
 
 #
 # all source are stored in SRCS-y
diff --git a/drivers/net/bonding/rte_eth_bond.h b/drivers/net/bonding/rte_eth_bond.h
index 8efbf0713..36b4e0643 100644
--- a/drivers/net/bonding/rte_eth_bond.h
+++ b/drivers/net/bonding/rte_eth_bond.h
@@ -151,7 +151,7 @@ rte_eth_bond_free(const char *name);
  *	0 on success, negative value otherwise
  */
 int
-rte_eth_bond_slave_add(uint8_t bonded_port_id, uint8_t slave_port_id);
+rte_eth_bond_slave_add(uint16_t bonded_port_id, uint16_t slave_port_id);
 
 /**
  * Remove a slave rte_eth_dev device from the bonded device
@@ -163,7 +163,7 @@ rte_eth_bond_slave_add(uint8_t bonded_port_id, uint8_t slave_port_id);
  *	0 on success, negative value otherwise
  */
 int
-rte_eth_bond_slave_remove(uint8_t bonded_port_id, uint8_t slave_port_id);
+rte_eth_bond_slave_remove(uint16_t bonded_port_id, uint16_t slave_port_id);
 
 /**
  * Set link bonding mode of bonded device
@@ -175,7 +175,7 @@ rte_eth_bond_slave_remove(uint8_t bonded_port_id, uint8_t slave_port_id);
  *	0 on success, negative value otherwise
  */
 int
-rte_eth_bond_mode_set(uint8_t bonded_port_id, uint8_t mode);
+rte_eth_bond_mode_set(uint16_t bonded_port_id, uint8_t mode);
 
 /**
  * Get link bonding mode of bonded device
@@ -186,7 +186,7 @@ rte_eth_bond_mode_set(uint8_t bonded_port_id, uint8_t mode);
  *	link bonding mode on success, negative value otherwise
  */
 int
-rte_eth_bond_mode_get(uint8_t bonded_port_id);
+rte_eth_bond_mode_get(uint16_t bonded_port_id);
 
 /**
  * Set slave rte_eth_dev as primary slave of bonded device
@@ -198,7 +198,7 @@ rte_eth_bond_mode_get(uint8_t bonded_port_id);
  *	0 on success, negative value otherwise
  */
 int
-rte_eth_bond_primary_set(uint8_t bonded_port_id, uint8_t slave_port_id);
+rte_eth_bond_primary_set(uint16_t bonded_port_id, uint16_t slave_port_id);
 
 /**
  * Get primary slave of bonded device
@@ -209,7 +209,7 @@ rte_eth_bond_primary_set(uint8_t bonded_port_id, uint8_t slave_port_id);
  *	Port Id of primary slave on success, -1 on failure
  */
 int
-rte_eth_bond_primary_get(uint8_t bonded_port_id);
+rte_eth_bond_primary_get(uint16_t bonded_port_id);
 
 /**
  * Populate an array with list of the slaves port id's of the bonded device
@@ -223,7 +223,8 @@ rte_eth_bond_primary_get(uint8_t bonded_port_id);
  *	negative value otherwise
  */
 int
-rte_eth_bond_slaves_get(uint8_t bonded_port_id, uint8_t slaves[], uint8_t len);
+rte_eth_bond_slaves_get(uint16_t bonded_port_id, uint16_t slaves[],
+			uint16_t len);
 
 /**
  * Populate an array with list of the active slaves port id's of the bonded
@@ -238,8 +239,8 @@ rte_eth_bond_slaves_get(uint8_t bonded_port_id, uint8_t slaves[], uint8_t len);
  *	negative value otherwise
  */
 int
-rte_eth_bond_active_slaves_get(uint8_t bonded_port_id, uint8_t slaves[],
-		uint8_t len);
+rte_eth_bond_active_slaves_get(uint16_t bonded_port_id, uint16_t slaves[],
+				uint16_t len);
 
 /**
  * Set explicit MAC address to use on bonded device and it's slaves.
@@ -252,7 +253,7 @@ rte_eth_bond_active_slaves_get(uint8_t bonded_port_id, uint8_t slaves[],
  *	0 on success, negative value otherwise
  */
 int
-rte_eth_bond_mac_address_set(uint8_t bonded_port_id,
+rte_eth_bond_mac_address_set(uint16_t bonded_port_id,
 		struct ether_addr *mac_addr);
 
 /**
@@ -265,7 +266,7 @@ rte_eth_bond_mac_address_set(uint8_t bonded_port_id,
  *	0 on success, negative value otherwise
  */
 int
-rte_eth_bond_mac_address_reset(uint8_t bonded_port_id);
+rte_eth_bond_mac_address_reset(uint16_t bonded_port_id);
 
 /**
  * Set the transmit policy for bonded device to use when it is operating in
@@ -279,7 +280,7 @@ rte_eth_bond_mac_address_reset(uint8_t bonded_port_id);
  *	0 on success, negative value otherwise.
  */
 int
-rte_eth_bond_xmit_policy_set(uint8_t bonded_port_id, uint8_t policy);
+rte_eth_bond_xmit_policy_set(uint16_t bonded_port_id, uint8_t policy);
 
 /**
  * Get the transmit policy set on bonded device for balance mode operation
@@ -290,7 +291,7 @@ rte_eth_bond_xmit_policy_set(uint8_t bonded_port_id, uint8_t policy);
  *	Balance transmit policy on success, negative value otherwise.
  */
 int
-rte_eth_bond_xmit_policy_get(uint8_t bonded_port_id);
+rte_eth_bond_xmit_policy_get(uint16_t bonded_port_id);
 
 /**
  * Set the link monitoring frequency (in ms) for monitoring the link status of
@@ -304,7 +305,7 @@ rte_eth_bond_xmit_policy_get(uint8_t bonded_port_id);
  */
 
 int
-rte_eth_bond_link_monitoring_set(uint8_t bonded_port_id, uint32_t internal_ms);
+rte_eth_bond_link_monitoring_set(uint16_t bonded_port_id, uint32_t internal_ms);
 
 /**
  * Get the current link monitoring frequency (in ms) for monitoring of the link
@@ -316,8 +317,7 @@ rte_eth_bond_link_monitoring_set(uint8_t bonded_port_id, uint32_t internal_ms);
  *	Monitoring interval on success, negative value otherwise.
  */
 int
-rte_eth_bond_link_monitoring_get(uint8_t bonded_port_id);
-
+rte_eth_bond_link_monitoring_get(uint16_t bonded_port_id);
 
 /**
  * Set the period in milliseconds for delaying the disabling of a bonded link
@@ -330,7 +330,8 @@ rte_eth_bond_link_monitoring_get(uint8_t bonded_port_id);
  *  0 on success, negative value otherwise.
  */
 int
-rte_eth_bond_link_down_prop_delay_set(uint8_t bonded_port_id, uint32_t delay_ms);
+rte_eth_bond_link_down_prop_delay_set(uint16_t bonded_port_id,
+				       uint32_t delay_ms);
 
 /**
  * Get the period in milliseconds set for delaying the disabling of a bonded
@@ -342,7 +343,7 @@ rte_eth_bond_link_down_prop_delay_set(uint8_t bonded_port_id, uint32_t delay_ms)
  *  Delay period on success, negative value otherwise.
  */
 int
-rte_eth_bond_link_down_prop_delay_get(uint8_t bonded_port_id);
+rte_eth_bond_link_down_prop_delay_get(uint16_t bonded_port_id);
 
 /**
  * Set the period in milliseconds for delaying the enabling of a bonded link
@@ -355,7 +356,8 @@ rte_eth_bond_link_down_prop_delay_get(uint8_t bonded_port_id);
  *  0 on success, negative value otherwise.
  */
 int
-rte_eth_bond_link_up_prop_delay_set(uint8_t bonded_port_id, uint32_t delay_ms);
+rte_eth_bond_link_up_prop_delay_set(uint16_t bonded_port_id,
+				    uint32_t delay_ms);
 
 /**
  * Get the period in milliseconds set for delaying the enabling of a bonded
@@ -367,7 +369,7 @@ rte_eth_bond_link_up_prop_delay_set(uint8_t bonded_port_id, uint32_t delay_ms);
  *  Delay period on success, negative value otherwise.
  */
 int
-rte_eth_bond_link_up_prop_delay_get(uint8_t bonded_port_id);
+rte_eth_bond_link_up_prop_delay_get(uint16_t bonded_port_id);
 
 
 #ifdef __cplusplus
diff --git a/drivers/net/bonding/rte_eth_bond_8023ad.c b/drivers/net/bonding/rte_eth_bond_8023ad.c
index efb9c6e77..c0a0b6e21 100644
--- a/drivers/net/bonding/rte_eth_bond_8023ad.c
+++ b/drivers/net/bonding/rte_eth_bond_8023ad.c
@@ -209,7 +209,7 @@ set_warning_flags(struct port *port, uint16_t flags)
 }
 
 static void
-show_warnings(uint8_t slave_id)
+show_warnings(uint16_t slave_id)
 {
 	struct port *port = &mode_8023ad_ports[slave_id];
 	uint8_t warnings;
@@ -278,7 +278,7 @@ record_default(struct port *port)
  * @param port			Port on which LACPDU was received.
  */
 static void
-rx_machine(struct bond_dev_private *internals, uint8_t slave_id,
+rx_machine(struct bond_dev_private *internals, uint16_t slave_id,
 		struct lacpdu *lacp)
 {
 	struct port *agg, *port = &mode_8023ad_ports[slave_id];
@@ -399,7 +399,7 @@ rx_machine(struct bond_dev_private *internals, uint8_t slave_id,
  * @param port			Port to handle state machine.
  */
 static void
-periodic_machine(struct bond_dev_private *internals, uint8_t slave_id)
+periodic_machine(struct bond_dev_private *internals, uint16_t slave_id)
 {
 	struct port *port = &mode_8023ad_ports[slave_id];
 	/* Calculate if either site is LACP enabled */
@@ -461,7 +461,7 @@ periodic_machine(struct bond_dev_private *internals, uint8_t slave_id)
  * @param port			Port to handle state machine.
  */
 static void
-mux_machine(struct bond_dev_private *internals, uint8_t slave_id)
+mux_machine(struct bond_dev_private *internals, uint16_t slave_id)
 {
 	struct port *port = &mode_8023ad_ports[slave_id];
 
@@ -564,7 +564,7 @@ mux_machine(struct bond_dev_private *internals, uint8_t slave_id)
  * @param port
  */
 static void
-tx_machine(struct bond_dev_private *internals, uint8_t slave_id)
+tx_machine(struct bond_dev_private *internals, uint16_t slave_id)
 {
 	struct port *agg, *port = &mode_8023ad_ports[slave_id];
 
@@ -688,11 +688,11 @@ static void
 selection_logic(struct bond_dev_private *internals, uint8_t slave_id)
 {
 	struct port *agg, *port;
-	uint8_t slaves_count, new_agg_id, i, j = 0;
-	uint8_t *slaves;
+	uint16_t slaves_count, new_agg_id, i, j = 0;
+	uint16_t *slaves;
 	uint64_t agg_bandwidth[8] = {0};
 	uint64_t agg_count[8] = {0};
-	uint8_t default_slave = 0;
+	uint16_t default_slave = 0;
 	uint8_t mode_count_id, mode_band_id;
 	struct rte_eth_link link_info;
 
@@ -923,7 +923,8 @@ bond_mode_8023ad_periodic_cb(void *arg)
 }
 
 void
-bond_mode_8023ad_activate_slave(struct rte_eth_dev *bond_dev, uint8_t slave_id)
+bond_mode_8023ad_activate_slave(struct rte_eth_dev *bond_dev,
+				uint16_t slave_id)
 {
 	struct bond_dev_private *internals = bond_dev->data->dev_private;
 
@@ -951,7 +952,7 @@ bond_mode_8023ad_activate_slave(struct rte_eth_dev *bond_dev, uint8_t slave_id)
 	memcpy(&port->actor, &initial, sizeof(struct port_params));
 	/* Standard requires that port ID must be grater than 0.
 	 * Add 1 do get corresponding port_number */
-	port->actor.port_number = rte_cpu_to_be_16((uint16_t)slave_id + 1);
+	port->actor.port_number = rte_cpu_to_be_16(slave_id + 1);
 
 	memcpy(&port->partner, &initial, sizeof(struct port_params));
 
@@ -1022,12 +1023,12 @@ bond_mode_8023ad_activate_slave(struct rte_eth_dev *bond_dev, uint8_t slave_id)
 
 int
 bond_mode_8023ad_deactivate_slave(struct rte_eth_dev *bond_dev,
-		uint8_t slave_id)
+				   uint16_t slave_id)
 {
 	struct bond_dev_private *internals = bond_dev->data->dev_private;
 	void *pkt = NULL;
 	struct port *port;
-	uint8_t i;
+	uint16_t i;
 
 	/* Given slave must be in active list */
 	RTE_ASSERT(find_slave_by_id(internals->active_slaves,
@@ -1066,7 +1067,7 @@ bond_mode_8023ad_mac_address_update(struct rte_eth_dev *bond_dev)
 	struct bond_dev_private *internals = bond_dev->data->dev_private;
 	struct ether_addr slave_addr;
 	struct port *slave, *agg_slave;
-	uint8_t slave_id, i, j;
+	uint16_t slave_id, i, j;
 
 	bond_mode_8023ad_stop(bond_dev);
 
@@ -1224,7 +1225,7 @@ bond_mode_8023ad_stop(struct rte_eth_dev *bond_dev)
 
 void
 bond_mode_8023ad_handle_slow_pkt(struct bond_dev_private *internals,
-	uint8_t slave_id, struct rte_mbuf *pkt)
+				  uint16_t slave_id, struct rte_mbuf *pkt)
 {
 	struct mode8023ad_private *mode4 = &internals->mode4;
 	struct port *port = &mode_8023ad_ports[slave_id];
@@ -1305,7 +1306,7 @@ bond_mode_8023ad_handle_slow_pkt(struct bond_dev_private *internals,
 }
 
 int
-rte_eth_bond_8023ad_conf_get(uint8_t port_id,
+rte_eth_bond_8023ad_conf_get(uint16_t port_id,
 		struct rte_eth_bond_8023ad_conf *conf)
 {
 	struct rte_eth_dev *bond_dev;
@@ -1322,7 +1323,7 @@ rte_eth_bond_8023ad_conf_get(uint8_t port_id,
 }
 
 int
-rte_eth_bond_8023ad_agg_selection_set(uint8_t port_id,
+rte_eth_bond_8023ad_agg_selection_set(uint16_t port_id,
 		enum rte_bond_8023ad_agg_selection agg_selection)
 {
 	struct rte_eth_dev *bond_dev;
@@ -1344,7 +1345,7 @@ rte_eth_bond_8023ad_agg_selection_set(uint8_t port_id,
 	return 0;
 }
 
-int rte_eth_bond_8023ad_agg_selection_get(uint8_t port_id)
+int rte_eth_bond_8023ad_agg_selection_get(uint16_t port_id)
 {
 	struct rte_eth_dev *bond_dev;
 	struct bond_dev_private *internals;
@@ -1365,7 +1366,7 @@ int rte_eth_bond_8023ad_agg_selection_get(uint8_t port_id)
 
 
 static int
-bond_8023ad_setup_validate(uint8_t port_id,
+bond_8023ad_setup_validate(uint16_t port_id,
 		struct rte_eth_bond_8023ad_conf *conf)
 {
 	if (valid_bonded_port_id(port_id) != 0)
@@ -1389,8 +1390,9 @@ bond_8023ad_setup_validate(uint8_t port_id,
 	return 0;
 }
 
+
 int
-rte_eth_bond_8023ad_setup(uint8_t port_id,
+rte_eth_bond_8023ad_setup(uint16_t port_id,
 		struct rte_eth_bond_8023ad_conf *conf)
 {
 	struct rte_eth_dev *bond_dev;
@@ -1411,7 +1413,7 @@ rte_eth_bond_8023ad_setup(uint8_t port_id,
 
 
 int
-rte_eth_bond_8023ad_slave_info(uint8_t port_id, uint8_t slave_id,
+rte_eth_bond_8023ad_slave_info(uint16_t port_id, uint16_t slave_id,
 		struct rte_eth_bond_8023ad_slave_info *info)
 {
 	struct rte_eth_dev *bond_dev;
@@ -1444,7 +1446,7 @@ rte_eth_bond_8023ad_slave_info(uint8_t port_id, uint8_t slave_id,
 }
 
 static int
-bond_8023ad_ext_validate(uint8_t port_id, uint8_t slave_id)
+bond_8023ad_ext_validate(uint16_t port_id, uint16_t slave_id)
 {
 	struct rte_eth_dev *bond_dev;
 	struct bond_dev_private *internals;
@@ -1472,7 +1474,8 @@ bond_8023ad_ext_validate(uint8_t port_id, uint8_t slave_id)
 }
 
 int
-rte_eth_bond_8023ad_ext_collect(uint8_t port_id, uint8_t slave_id, int enabled)
+rte_eth_bond_8023ad_ext_collect(uint16_t port_id, uint16_t slave_id,
+				int enabled)
 {
 	struct port *port;
 	int res;
@@ -1492,7 +1495,8 @@ rte_eth_bond_8023ad_ext_collect(uint8_t port_id, uint8_t slave_id, int enabled)
 }
 
 int
-rte_eth_bond_8023ad_ext_distrib(uint8_t port_id, uint8_t slave_id, int enabled)
+rte_eth_bond_8023ad_ext_distrib(uint16_t port_id, uint16_t slave_id,
+				int enabled)
 {
 	struct port *port;
 	int res;
@@ -1512,7 +1516,7 @@ rte_eth_bond_8023ad_ext_distrib(uint8_t port_id, uint8_t slave_id, int enabled)
 }
 
 int
-rte_eth_bond_8023ad_ext_distrib_get(uint8_t port_id, uint8_t slave_id)
+rte_eth_bond_8023ad_ext_distrib_get(uint16_t port_id, uint16_t slave_id)
 {
 	struct port *port;
 	int err;
@@ -1526,7 +1530,7 @@ rte_eth_bond_8023ad_ext_distrib_get(uint8_t port_id, uint8_t slave_id)
 }
 
 int
-rte_eth_bond_8023ad_ext_collect_get(uint8_t port_id, uint8_t slave_id)
+rte_eth_bond_8023ad_ext_collect_get(uint16_t port_id, uint16_t slave_id)
 {
 	struct port *port;
 	int err;
@@ -1540,7 +1544,7 @@ rte_eth_bond_8023ad_ext_collect_get(uint8_t port_id, uint8_t slave_id)
 }
 
 int
-rte_eth_bond_8023ad_ext_slowtx(uint8_t port_id, uint8_t slave_id,
+rte_eth_bond_8023ad_ext_slowtx(uint16_t port_id, uint16_t slave_id,
 		struct rte_mbuf *lacp_pkt)
 {
 	struct port *port;
@@ -1601,7 +1605,7 @@ bond_mode_8023ad_ext_periodic_cb(void *arg)
 }
 
 int
-rte_eth_bond_8023ad_dedicated_queues_enable(uint8_t port)
+rte_eth_bond_8023ad_dedicated_queues_enable(uint16_t port)
 {
 	int retval = 0;
 	struct rte_eth_dev *dev = &rte_eth_devices[port];
@@ -1625,7 +1629,7 @@ rte_eth_bond_8023ad_dedicated_queues_enable(uint8_t port)
 }
 
 int
-rte_eth_bond_8023ad_dedicated_queues_disable(uint8_t port)
+rte_eth_bond_8023ad_dedicated_queues_disable(uint16_t port)
 {
 	int retval = 0;
 	struct rte_eth_dev *dev = &rte_eth_devices[port];
diff --git a/drivers/net/bonding/rte_eth_bond_8023ad.h b/drivers/net/bonding/rte_eth_bond_8023ad.h
index d609745e0..2874336d3 100644
--- a/drivers/net/bonding/rte_eth_bond_8023ad.h
+++ b/drivers/net/bonding/rte_eth_bond_8023ad.h
@@ -64,7 +64,7 @@ extern "C" {
 #define MARKER_TLV_TYPE_INFO                0x01
 #define MARKER_TLV_TYPE_RESP                0x02
 
-typedef void (*rte_eth_bond_8023ad_ext_slowrx_fn)(uint8_t slave_id,
+typedef void (*rte_eth_bond_8023ad_ext_slowrx_fn)(uint16_t slave_id,
 						  struct rte_mbuf *lacp_pkt);
 
 enum rte_bond_8023ad_selection {
@@ -176,7 +176,7 @@ struct rte_eth_bond_8023ad_slave_info {
 	struct port_params actor;
 	uint8_t partner_state;
 	struct port_params partner;
-	uint8_t agg_port_id;
+	uint16_t agg_port_id;
 };
 
 /**
@@ -192,7 +192,7 @@ struct rte_eth_bond_8023ad_slave_info {
  *   -EINVAL if conf is NULL
  */
 int
-rte_eth_bond_8023ad_conf_get(uint8_t port_id,
+rte_eth_bond_8023ad_conf_get(uint16_t port_id,
 		struct rte_eth_bond_8023ad_conf *conf);
 
 /**
@@ -207,7 +207,7 @@ rte_eth_bond_8023ad_conf_get(uint8_t port_id,
  *   -EINVAL if configuration is invalid.
  */
 int
-rte_eth_bond_8023ad_setup(uint8_t port_id,
+rte_eth_bond_8023ad_setup(uint16_t port_id,
 		struct rte_eth_bond_8023ad_conf *conf);
 
 /**
@@ -223,7 +223,7 @@ rte_eth_bond_8023ad_setup(uint8_t port_id,
  *       bonded device or is not inactive).
  */
 int
-rte_eth_bond_8023ad_slave_info(uint8_t port_id, uint8_t slave_id,
+rte_eth_bond_8023ad_slave_info(uint16_t port_id, uint16_t slave_id,
 		struct rte_eth_bond_8023ad_slave_info *conf);
 
 #ifdef __cplusplus
@@ -241,7 +241,8 @@ rte_eth_bond_8023ad_slave_info(uint8_t port_id, uint8_t slave_id,
  *   -EINVAL if slave is not valid.
  */
 int
-rte_eth_bond_8023ad_ext_collect(uint8_t port_id, uint8_t slave_id, int enabled);
+rte_eth_bond_8023ad_ext_collect(uint16_t port_id, uint16_t slave_id,
+				int enabled);
 
 /**
  * Get COLLECTING flag from slave port actor state.
@@ -254,7 +255,7 @@ rte_eth_bond_8023ad_ext_collect(uint8_t port_id, uint8_t slave_id, int enabled);
  *   -EINVAL if slave is not valid.
  */
 int
-rte_eth_bond_8023ad_ext_collect_get(uint8_t port_id, uint8_t slave_id);
+rte_eth_bond_8023ad_ext_collect_get(uint16_t port_id, uint16_t slave_id);
 
 /**
  * Configure a slave port to start distributing.
@@ -267,7 +268,8 @@ rte_eth_bond_8023ad_ext_collect_get(uint8_t port_id, uint8_t slave_id);
  *   -EINVAL if slave is not valid.
  */
 int
-rte_eth_bond_8023ad_ext_distrib(uint8_t port_id, uint8_t slave_id, int enabled);
+rte_eth_bond_8023ad_ext_distrib(uint16_t port_id, uint16_t slave_id,
+				int enabled);
 
 /**
  * Get DISTRIBUTING flag from slave port actor state.
@@ -280,7 +282,7 @@ rte_eth_bond_8023ad_ext_distrib(uint8_t port_id, uint8_t slave_id, int enabled);
  *   -EINVAL if slave is not valid.
  */
 int
-rte_eth_bond_8023ad_ext_distrib_get(uint8_t port_id, uint8_t slave_id);
+rte_eth_bond_8023ad_ext_distrib_get(uint16_t port_id, uint16_t slave_id);
 
 /**
  * LACPDU transmit path for external 802.3ad state machine.  Caller retains
@@ -294,7 +296,7 @@ rte_eth_bond_8023ad_ext_distrib_get(uint8_t port_id, uint8_t slave_id);
  *   0 on success, negative value otherwise.
  */
 int
-rte_eth_bond_8023ad_ext_slowtx(uint8_t port_id, uint8_t slave_id,
+rte_eth_bond_8023ad_ext_slowtx(uint16_t port_id, uint16_t slave_id,
 		struct rte_mbuf *lacp_pkt);
 
 /**
@@ -320,7 +322,7 @@ rte_eth_bond_8023ad_ext_slowtx(uint8_t port_id, uint8_t slave_id,
  *   0 on success, negative value otherwise.
  */
 int
-rte_eth_bond_8023ad_dedicated_queues_enable(uint8_t port_id);
+rte_eth_bond_8023ad_dedicated_queues_enable(uint16_t port_id);
 
 /**
  * Disable slow queue on slaves
@@ -337,7 +339,7 @@ rte_eth_bond_8023ad_dedicated_queues_enable(uint8_t port_id);
  *
  */
 int
-rte_eth_bond_8023ad_dedicated_queues_disable(uint8_t port_id);
+rte_eth_bond_8023ad_dedicated_queues_disable(uint16_t port_id);
 
 /*
  * Get aggregator mode for 8023ad
@@ -347,7 +349,7 @@ rte_eth_bond_8023ad_dedicated_queues_disable(uint8_t port_id);
  *   agregator mode on success, negative value otherwise
  */
 int
-rte_eth_bond_8023ad_agg_selection_get(uint8_t port_id);
+rte_eth_bond_8023ad_agg_selection_get(uint16_t port_id);
 
 /**
  * Set aggregator mode for 8023ad
@@ -356,6 +358,6 @@ rte_eth_bond_8023ad_agg_selection_get(uint8_t port_id);
  *   0 on success, negative value otherwise
  */
 int
-rte_eth_bond_8023ad_agg_selection_set(uint8_t port_id,
+rte_eth_bond_8023ad_agg_selection_set(uint16_t port_id,
 		enum rte_bond_8023ad_agg_selection agg_selection);
 #endif /* RTE_ETH_BOND_8023AD_H_ */
diff --git a/drivers/net/bonding/rte_eth_bond_8023ad_private.h b/drivers/net/bonding/rte_eth_bond_8023ad_private.h
index d46e44a84..9ee5ca23d 100644
--- a/drivers/net/bonding/rte_eth_bond_8023ad_private.h
+++ b/drivers/net/bonding/rte_eth_bond_8023ad_private.h
@@ -279,7 +279,7 @@ bond_mode_8023ad_stop(struct rte_eth_dev *dev);
  */
 void
 bond_mode_8023ad_handle_slow_pkt(struct bond_dev_private *internals,
-	uint8_t slave_id, struct rte_mbuf *pkt);
+				 uint16_t slave_id, struct rte_mbuf *pkt);
 
 /**
  * @internal
@@ -293,7 +293,7 @@ bond_mode_8023ad_handle_slow_pkt(struct bond_dev_private *internals,
  *  0 on success, negative value otherwise.
  */
 void
-bond_mode_8023ad_activate_slave(struct rte_eth_dev *dev, uint8_t port_id);
+bond_mode_8023ad_activate_slave(struct rte_eth_dev *dev, uint16_t port_id);
 
 /**
  * @internal
@@ -307,7 +307,7 @@ bond_mode_8023ad_activate_slave(struct rte_eth_dev *dev, uint8_t port_id);
  *  0 on success, negative value otherwise.
  */
 int
-bond_mode_8023ad_deactivate_slave(struct rte_eth_dev *dev, uint8_t slave_pos);
+bond_mode_8023ad_deactivate_slave(struct rte_eth_dev *dev, uint16_t slave_pos);
 
 /**
  * Updates state when MAC was changed on bonded device or one of its slaves.
@@ -318,12 +318,12 @@ bond_mode_8023ad_mac_address_update(struct rte_eth_dev *bond_dev);
 
 int
 bond_ethdev_8023ad_flow_verify(struct rte_eth_dev *bond_dev,
-		uint8_t slave_port);
+				uint16_t slave_port);
 
 int
-bond_ethdev_8023ad_flow_set(struct rte_eth_dev *bond_dev, uint8_t slave_port);
+bond_ethdev_8023ad_flow_set(struct rte_eth_dev *bond_dev, uint16_t slave_port);
 
 int
-bond_8023ad_slow_pkt_hw_filter_supported(uint8_t port_id);
+bond_8023ad_slow_pkt_hw_filter_supported(uint16_t port_id);
 
 #endif /* RTE_ETH_BOND_8023AD_H_ */
diff --git a/drivers/net/bonding/rte_eth_bond_alb.c b/drivers/net/bonding/rte_eth_bond_alb.c
index d9d37495d..f7efbb78e 100644
--- a/drivers/net/bonding/rte_eth_bond_alb.c
+++ b/drivers/net/bonding/rte_eth_bond_alb.c
@@ -148,7 +148,7 @@ void bond_mode_alb_arp_recv(struct ether_hdr *eth_h, uint16_t offset,
 	rte_spinlock_unlock(&internals->mode6.lock);
 }
 
-uint8_t
+uint16_t
 bond_mode_alb_arp_xmit(struct ether_hdr *eth_h, uint16_t offset,
 		struct bond_dev_private *internals)
 {
@@ -220,13 +220,13 @@ bond_mode_alb_arp_xmit(struct ether_hdr *eth_h, uint16_t offset,
 	return internals->current_primary_port;
 }
 
-uint8_t
+uint16_t
 bond_mode_alb_arp_upd(struct client_data *client_info,
 		struct rte_mbuf *pkt, struct bond_dev_private *internals)
 {
 	struct ether_hdr *eth_h;
 	struct arp_hdr *arp_h;
-	uint8_t slave_idx;
+	uint16_t slave_idx;
 
 	rte_spinlock_lock(&internals->mode6.lock);
 	eth_h = rte_pktmbuf_mtod(pkt, struct ether_hdr *);
diff --git a/drivers/net/bonding/rte_eth_bond_alb.h b/drivers/net/bonding/rte_eth_bond_alb.h
index fd7c3aeb4..9f17f7c85 100644
--- a/drivers/net/bonding/rte_eth_bond_alb.h
+++ b/drivers/net/bonding/rte_eth_bond_alb.h
@@ -51,7 +51,7 @@ struct client_data {
 	uint32_t cli_ip;
 	/**< Client IP address */
 
-	uint8_t slave_idx;
+	uint16_t slave_idx;
 	/**< Index of slave on which we connect with that client */
 	uint8_t in_use;
 	/**< Flag indicating if entry in client table is currently used */
@@ -113,7 +113,7 @@ bond_mode_alb_arp_recv(struct ether_hdr *eth_h, uint16_t offset,
  * @return
  * Index of slave on which packet should be sent.
  */
-uint8_t
+uint16_t
 bond_mode_alb_arp_xmit(struct ether_hdr *eth_h, uint16_t offset,
 		struct bond_dev_private *internals);
 
@@ -127,7 +127,7 @@ bond_mode_alb_arp_xmit(struct ether_hdr *eth_h, uint16_t offset,
  * @return
  * Index of slawe on which packet should be sent.
  */
-uint8_t
+uint16_t
 bond_mode_alb_arp_upd(struct client_data *client_info,
 		struct rte_mbuf *pkt, struct bond_dev_private *internals);
 
diff --git a/drivers/net/bonding/rte_eth_bond_api.c b/drivers/net/bonding/rte_eth_bond_api.c
index de1d9e0db..957390f71 100644
--- a/drivers/net/bonding/rte_eth_bond_api.c
+++ b/drivers/net/bonding/rte_eth_bond_api.c
@@ -56,14 +56,14 @@ check_for_bonded_ethdev(const struct rte_eth_dev *eth_dev)
 }
 
 int
-valid_bonded_port_id(uint8_t port_id)
+valid_bonded_port_id(uint16_t port_id)
 {
 	RTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -1);
 	return check_for_bonded_ethdev(&rte_eth_devices[port_id]);
 }
 
 int
-valid_slave_port_id(uint8_t port_id, uint8_t mode)
+valid_slave_port_id(uint16_t port_id, uint8_t mode)
 {
 	RTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -1);
 
@@ -80,7 +80,7 @@ valid_slave_port_id(uint8_t port_id, uint8_t mode)
 }
 
 void
-activate_slave(struct rte_eth_dev *eth_dev, uint8_t port_id)
+activate_slave(struct rte_eth_dev *eth_dev, uint16_t port_id)
 {
 	struct bond_dev_private *internals = eth_dev->data->dev_private;
 	uint8_t active_count = internals->active_slave_count;
@@ -107,11 +107,11 @@ activate_slave(struct rte_eth_dev *eth_dev, uint8_t port_id)
 }
 
 void
-deactivate_slave(struct rte_eth_dev *eth_dev, uint8_t port_id)
+deactivate_slave(struct rte_eth_dev *eth_dev, uint16_t port_id)
 {
-	uint8_t slave_pos;
+	uint16_t slave_pos;
 	struct bond_dev_private *internals = eth_dev->data->dev_private;
-	uint8_t active_count = internals->active_slave_count;
+	uint16_t active_count = internals->active_slave_count;
 
 	if (internals->mode == BONDING_MODE_8023AD) {
 		bond_mode_8023ad_stop(eth_dev);
@@ -153,7 +153,7 @@ rte_eth_bond_create(const char *name, uint8_t mode, uint8_t socket_id)
 {
 	struct bond_dev_private *internals;
 	char devargs[52];
-	uint8_t port_id;
+	uint16_t port_id;
 	int ret;
 
 	if (name == NULL) {
@@ -193,7 +193,7 @@ rte_eth_bond_free(const char *name)
 }
 
 static int
-slave_vlan_filter_set(uint8_t bonded_port_id, uint8_t slave_port_id)
+slave_vlan_filter_set(uint16_t bonded_port_id, uint16_t slave_port_id)
 {
 	struct rte_eth_dev *bonded_eth_dev;
 	struct bond_dev_private *internals;
@@ -233,7 +233,7 @@ slave_vlan_filter_set(uint8_t bonded_port_id, uint8_t slave_port_id)
 }
 
 static int
-__eth_bond_slave_add_lock_free(uint8_t bonded_port_id, uint8_t slave_port_id)
+__eth_bond_slave_add_lock_free(uint16_t bonded_port_id, uint16_t slave_port_id)
 {
 	struct rte_eth_dev *bonded_eth_dev, *slave_eth_dev;
 	struct bond_dev_private *internals;
@@ -363,7 +363,7 @@ __eth_bond_slave_add_lock_free(uint8_t bonded_port_id, uint8_t slave_port_id)
 }
 
 int
-rte_eth_bond_slave_add(uint8_t bonded_port_id, uint8_t slave_port_id)
+rte_eth_bond_slave_add(uint16_t bonded_port_id, uint16_t slave_port_id)
 {
 	struct rte_eth_dev *bonded_eth_dev;
 	struct bond_dev_private *internals;
@@ -387,7 +387,8 @@ rte_eth_bond_slave_add(uint8_t bonded_port_id, uint8_t slave_port_id)
 }
 
 static int
-__eth_bond_slave_remove_lock_free(uint8_t bonded_port_id, uint8_t slave_port_id)
+__eth_bond_slave_remove_lock_free(uint16_t bonded_port_id,
+				   uint16_t slave_port_id)
 {
 	struct rte_eth_dev *bonded_eth_dev;
 	struct bond_dev_private *internals;
@@ -466,7 +467,7 @@ __eth_bond_slave_remove_lock_free(uint8_t bonded_port_id, uint8_t slave_port_id)
 }
 
 int
-rte_eth_bond_slave_remove(uint8_t bonded_port_id, uint8_t slave_port_id)
+rte_eth_bond_slave_remove(uint16_t bonded_port_id, uint16_t slave_port_id)
 {
 	struct rte_eth_dev *bonded_eth_dev;
 	struct bond_dev_private *internals;
@@ -488,7 +489,7 @@ rte_eth_bond_slave_remove(uint8_t bonded_port_id, uint8_t slave_port_id)
 }
 
 int
-rte_eth_bond_mode_set(uint8_t bonded_port_id, uint8_t mode)
+rte_eth_bond_mode_set(uint16_t bonded_port_id, uint8_t mode)
 {
 	if (valid_bonded_port_id(bonded_port_id) != 0)
 		return -1;
@@ -497,7 +498,7 @@ rte_eth_bond_mode_set(uint8_t bonded_port_id, uint8_t mode)
 }
 
 int
-rte_eth_bond_mode_get(uint8_t bonded_port_id)
+rte_eth_bond_mode_get(uint16_t bonded_port_id)
 {
 	struct bond_dev_private *internals;
 
@@ -510,7 +511,7 @@ rte_eth_bond_mode_get(uint8_t bonded_port_id)
 }
 
 int
-rte_eth_bond_primary_set(uint8_t bonded_port_id, uint8_t slave_port_id)
+rte_eth_bond_primary_set(uint16_t bonded_port_id, uint16_t slave_port_id)
 {
 	struct bond_dev_private *internals;
 
@@ -531,7 +532,7 @@ rte_eth_bond_primary_set(uint8_t bonded_port_id, uint8_t slave_port_id)
 }
 
 int
-rte_eth_bond_primary_get(uint8_t bonded_port_id)
+rte_eth_bond_primary_get(uint16_t bonded_port_id)
 {
 	struct bond_dev_private *internals;
 
@@ -547,7 +548,8 @@ rte_eth_bond_primary_get(uint8_t bonded_port_id)
 }
 
 int
-rte_eth_bond_slaves_get(uint8_t bonded_port_id, uint8_t slaves[], uint8_t len)
+rte_eth_bond_slaves_get(uint16_t bonded_port_id, uint16_t slaves[],
+			uint16_t len)
 {
 	struct bond_dev_private *internals;
 	uint8_t i;
@@ -570,8 +572,8 @@ rte_eth_bond_slaves_get(uint8_t bonded_port_id, uint8_t slaves[], uint8_t len)
 }
 
 int
-rte_eth_bond_active_slaves_get(uint8_t bonded_port_id, uint8_t slaves[],
-		uint8_t len)
+rte_eth_bond_active_slaves_get(uint16_t bonded_port_id, uint16_t slaves[],
+				uint16_t len)
 {
 	struct bond_dev_private *internals;
 
@@ -586,13 +588,14 @@ rte_eth_bond_active_slaves_get(uint8_t bonded_port_id, uint8_t slaves[],
 	if (internals->active_slave_count > len)
 		return -1;
 
-	memcpy(slaves, internals->active_slaves, internals->active_slave_count);
+	memcpy(slaves, internals->active_slaves,
+	internals->active_slave_count * sizeof(internals->active_slaves[0]));
 
 	return internals->active_slave_count;
 }
 
 int
-rte_eth_bond_mac_address_set(uint8_t bonded_port_id,
+rte_eth_bond_mac_address_set(uint16_t bonded_port_id,
 		struct ether_addr *mac_addr)
 {
 	struct rte_eth_dev *bonded_eth_dev;
@@ -618,7 +621,7 @@ rte_eth_bond_mac_address_set(uint8_t bonded_port_id,
 }
 
 int
-rte_eth_bond_mac_address_reset(uint8_t bonded_port_id)
+rte_eth_bond_mac_address_reset(uint16_t bonded_port_id)
 {
 	struct rte_eth_dev *bonded_eth_dev;
 	struct bond_dev_private *internals;
@@ -647,7 +650,7 @@ rte_eth_bond_mac_address_reset(uint8_t bonded_port_id)
 }
 
 int
-rte_eth_bond_xmit_policy_set(uint8_t bonded_port_id, uint8_t policy)
+rte_eth_bond_xmit_policy_set(uint16_t bonded_port_id, uint8_t policy)
 {
 	struct bond_dev_private *internals;
 
@@ -677,7 +680,7 @@ rte_eth_bond_xmit_policy_set(uint8_t bonded_port_id, uint8_t policy)
 }
 
 int
-rte_eth_bond_xmit_policy_get(uint8_t bonded_port_id)
+rte_eth_bond_xmit_policy_get(uint16_t bonded_port_id)
 {
 	struct bond_dev_private *internals;
 
@@ -690,7 +693,7 @@ rte_eth_bond_xmit_policy_get(uint8_t bonded_port_id)
 }
 
 int
-rte_eth_bond_link_monitoring_set(uint8_t bonded_port_id, uint32_t internal_ms)
+rte_eth_bond_link_monitoring_set(uint16_t bonded_port_id, uint32_t internal_ms)
 {
 	struct bond_dev_private *internals;
 
@@ -704,7 +707,7 @@ rte_eth_bond_link_monitoring_set(uint8_t bonded_port_id, uint32_t internal_ms)
 }
 
 int
-rte_eth_bond_link_monitoring_get(uint8_t bonded_port_id)
+rte_eth_bond_link_monitoring_get(uint16_t bonded_port_id)
 {
 	struct bond_dev_private *internals;
 
@@ -717,7 +720,8 @@ rte_eth_bond_link_monitoring_get(uint8_t bonded_port_id)
 }
 
 int
-rte_eth_bond_link_down_prop_delay_set(uint8_t bonded_port_id, uint32_t delay_ms)
+rte_eth_bond_link_down_prop_delay_set(uint16_t bonded_port_id,
+				       uint32_t delay_ms)
 
 {
 	struct bond_dev_private *internals;
@@ -732,7 +736,7 @@ rte_eth_bond_link_down_prop_delay_set(uint8_t bonded_port_id, uint32_t delay_ms)
 }
 
 int
-rte_eth_bond_link_down_prop_delay_get(uint8_t bonded_port_id)
+rte_eth_bond_link_down_prop_delay_get(uint16_t bonded_port_id)
 {
 	struct bond_dev_private *internals;
 
@@ -745,7 +749,7 @@ rte_eth_bond_link_down_prop_delay_get(uint8_t bonded_port_id)
 }
 
 int
-rte_eth_bond_link_up_prop_delay_set(uint8_t bonded_port_id, uint32_t delay_ms)
+rte_eth_bond_link_up_prop_delay_set(uint16_t bonded_port_id, uint32_t delay_ms)
 
 {
 	struct bond_dev_private *internals;
@@ -760,7 +764,7 @@ rte_eth_bond_link_up_prop_delay_set(uint8_t bonded_port_id, uint32_t delay_ms)
 }
 
 int
-rte_eth_bond_link_up_prop_delay_get(uint8_t bonded_port_id)
+rte_eth_bond_link_up_prop_delay_get(uint16_t bonded_port_id)
 {
 	struct bond_dev_private *internals;
 
diff --git a/drivers/net/bonding/rte_eth_bond_args.c b/drivers/net/bonding/rte_eth_bond_args.c
index bb634c62e..04d1f4e8f 100644
--- a/drivers/net/bonding/rte_eth_bond_args.c
+++ b/drivers/net/bonding/rte_eth_bond_args.c
@@ -153,7 +153,7 @@ bond_ethdev_parse_slave_port_kvarg(const char *key,
 			return -1;
 		} else
 			slave_ports->slaves[slave_ports->slave_count++] =
-					(uint8_t)port_id;
+					port_id;
 	}
 	return 0;
 }
diff --git a/drivers/net/bonding/rte_eth_bond_pmd.c b/drivers/net/bonding/rte_eth_bond_pmd.c
index 3ee70baa0..0566e25ba 100644
--- a/drivers/net/bonding/rte_eth_bond_pmd.c
+++ b/drivers/net/bonding/rte_eth_bond_pmd.c
@@ -174,7 +174,7 @@ const struct rte_flow_attr flow_attr_8023ad = {
 
 int
 bond_ethdev_8023ad_flow_verify(struct rte_eth_dev *bond_dev,
-		uint8_t slave_port) {
+				uint16_t slave_port) {
 	struct rte_flow_error error;
 	struct bond_dev_private *internals = (struct bond_dev_private *)
 			(bond_dev->data->dev_private);
@@ -202,12 +202,12 @@ bond_ethdev_8023ad_flow_verify(struct rte_eth_dev *bond_dev,
 }
 
 int
-bond_8023ad_slow_pkt_hw_filter_supported(uint8_t port_id) {
+bond_8023ad_slow_pkt_hw_filter_supported(uint16_t port_id) {
 	struct rte_eth_dev *bond_dev = &rte_eth_devices[port_id];
 	struct bond_dev_private *internals = (struct bond_dev_private *)
 			(bond_dev->data->dev_private);
 	struct rte_eth_dev_info bond_info, slave_info;
-	uint8_t idx;
+	uint16_t idx;
 
 	/* Verify if all slaves in bonding supports flow director and */
 	if (internals->slave_count > 0) {
@@ -230,7 +230,7 @@ bond_8023ad_slow_pkt_hw_filter_supported(uint8_t port_id) {
 }
 
 int
-bond_ethdev_8023ad_flow_set(struct rte_eth_dev *bond_dev, uint8_t slave_port) {
+bond_ethdev_8023ad_flow_set(struct rte_eth_dev *bond_dev, uint16_t slave_port) {
 
 	struct rte_flow_error error;
 	struct bond_dev_private *internals = (struct bond_dev_private *)
@@ -270,10 +270,10 @@ bond_ethdev_rx_burst_8023ad_fast_queue(void *queue, struct rte_mbuf **bufs,
 	struct bond_rx_queue *bd_rx_q = (struct bond_rx_queue *)queue;
 	struct bond_dev_private *internals = bd_rx_q->dev_private;
 	uint16_t num_rx_total = 0;	/* Total number of received packets */
-	uint8_t slaves[RTE_MAX_ETHPORTS];
-	uint8_t slave_count;
+	uint16_t slaves[RTE_MAX_ETHPORTS];
+	uint16_t slave_count;
 
-	uint8_t i, idx;
+	uint16_t i, idx;
 
 	/* Copy slave list to protect against slave up/down changes during tx
 	 * bursting */
@@ -302,8 +302,8 @@ bond_ethdev_tx_burst_8023ad_fast_queue(void *queue, struct rte_mbuf **bufs,
 	struct bond_dev_private *internals;
 	struct bond_tx_queue *bd_tx_q;
 
-	uint8_t num_of_slaves;
-	uint8_t slaves[RTE_MAX_ETHPORTS];
+	uint16_t num_of_slaves;
+	uint16_t slaves[RTE_MAX_ETHPORTS];
 	 /* positions in slaves, not ID */
 	uint8_t distributing_offsets[RTE_MAX_ETHPORTS];
 	uint8_t distributing_count;
@@ -394,8 +394,8 @@ bond_ethdev_rx_burst_8023ad(void *queue, struct rte_mbuf **bufs,
 
 	const uint16_t ether_type_slow_be = rte_be_to_cpu_16(ETHER_TYPE_SLOW);
 	uint16_t num_rx_total = 0;	/* Total number of received packets */
-	uint8_t slaves[RTE_MAX_ETHPORTS];
-	uint8_t slave_count, idx;
+	uint16_t slaves[RTE_MAX_ETHPORTS];
+	uint16_t slave_count, idx;
 
 	uint8_t collecting;  /* current slave collecting status */
 	const uint8_t promisc = internals->promiscuous_en;
@@ -673,8 +673,8 @@ bond_ethdev_tx_burst_round_robin(void *queue, struct rte_mbuf **bufs,
 	struct rte_mbuf *slave_bufs[RTE_MAX_ETHPORTS][nb_pkts];
 	uint16_t slave_nb_pkts[RTE_MAX_ETHPORTS] = { 0 };
 
-	uint8_t num_of_slaves;
-	uint8_t slaves[RTE_MAX_ETHPORTS];
+	uint16_t num_of_slaves;
+	uint16_t slaves[RTE_MAX_ETHPORTS];
 
 	uint16_t num_tx_total = 0, num_tx_slave;
 
@@ -904,7 +904,7 @@ bandwidth_cmp(const void *a, const void *b)
 }
 
 static void
-bandwidth_left(uint8_t port_id, uint64_t load, uint8_t update_idx,
+bandwidth_left(uint16_t port_id, uint64_t load, uint8_t update_idx,
 		struct bwg_slave *bwg_slave)
 {
 	struct rte_eth_link link_status;
@@ -970,10 +970,10 @@ bond_ethdev_tx_burst_tlb(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)
 	struct rte_eth_dev *primary_port =
 			&rte_eth_devices[internals->primary_port];
 	uint16_t num_tx_total = 0;
-	uint8_t i, j;
+	uint16_t i, j;
 
-	uint8_t num_of_slaves = internals->active_slave_count;
-	uint8_t slaves[RTE_MAX_ETHPORTS];
+	uint16_t num_of_slaves = internals->active_slave_count;
+	uint16_t slaves[RTE_MAX_ETHPORTS];
 
 	struct ether_hdr *ether_hdr;
 	struct ether_addr primary_slave_addr;
@@ -1059,7 +1059,7 @@ bond_ethdev_tx_burst_alb(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)
 
 	uint16_t num_send, num_not_send = 0;
 	uint16_t num_tx_total = 0;
-	uint8_t slave_idx;
+	uint16_t slave_idx;
 
 	int i, j;
 
@@ -1178,8 +1178,8 @@ bond_ethdev_tx_burst_balance(void *queue, struct rte_mbuf **bufs,
 	struct bond_dev_private *internals;
 	struct bond_tx_queue *bd_tx_q;
 
-	uint8_t num_of_slaves;
-	uint8_t slaves[RTE_MAX_ETHPORTS];
+	uint16_t num_of_slaves;
+	uint16_t slaves[RTE_MAX_ETHPORTS];
 
 	uint16_t num_tx_total = 0, num_tx_slave = 0, tx_fail_total = 0;
 
@@ -1239,8 +1239,8 @@ bond_ethdev_tx_burst_8023ad(void *queue, struct rte_mbuf **bufs,
 	struct bond_dev_private *internals;
 	struct bond_tx_queue *bd_tx_q;
 
-	uint8_t num_of_slaves;
-	uint8_t slaves[RTE_MAX_ETHPORTS];
+	uint16_t num_of_slaves;
+	uint16_t slaves[RTE_MAX_ETHPORTS];
 	 /* positions in slaves, not ID */
 	uint8_t distributing_offsets[RTE_MAX_ETHPORTS];
 	uint8_t distributing_count;
@@ -1333,7 +1333,7 @@ bond_ethdev_tx_burst_broadcast(void *queue, struct rte_mbuf **bufs,
 	struct bond_tx_queue *bd_tx_q;
 
 	uint8_t tx_failed_flag = 0, num_of_slaves;
-	uint8_t slaves[RTE_MAX_ETHPORTS];
+	uint16_t slaves[RTE_MAX_ETHPORTS];
 
 	uint16_t max_nb_of_tx_pkts = 0;
 
@@ -1861,7 +1861,7 @@ slave_add(struct bond_dev_private *internals,
 
 void
 bond_ethdev_primary_set(struct bond_dev_private *internals,
-		uint8_t slave_port_id)
+			uint16_t slave_port_id)
 {
 	int i;
 
@@ -2125,7 +2125,7 @@ static int
 bond_ethdev_vlan_filter_set(struct rte_eth_dev *dev, uint16_t vlan_id, int on)
 {
 	int res;
-	uint8_t i;
+	uint16_t i;
 	struct bond_dev_private *internals = dev->data->dev_private;
 
 	/* don't do this while a slave is being added */
@@ -2137,7 +2137,7 @@ bond_ethdev_vlan_filter_set(struct rte_eth_dev *dev, uint16_t vlan_id, int on)
 		rte_bitmap_clear(internals->vlan_filter_bmp, vlan_id);
 
 	for (i = 0; i < internals->slave_count; i++) {
-		uint8_t port_id = internals->slaves[i].port_id;
+		uint16_t port_id = internals->slaves[i].port_id;
 
 		res = rte_eth_dev_vlan_filter(port_id, vlan_id, on);
 		if (res == ENOTSUP)
@@ -2277,7 +2277,7 @@ bond_ethdev_slave_link_status_change_monitor(void *cb_arg)
 static int
 bond_ethdev_link_update(struct rte_eth_dev *ethdev, int wait_to_complete)
 {
-	void (*link_update)(uint8_t port_id, struct rte_eth_link *eth_link);
+	void (*link_update)(uint16_t port_id, struct rte_eth_link *eth_link);
 
 	struct bond_dev_private *bond_ctx;
 	struct rte_eth_link slave_link;
@@ -2466,7 +2466,7 @@ bond_ethdev_delayed_lsc_propagation(void *arg)
 }
 
 int
-bond_ethdev_lsc_event_callback(uint8_t port_id, enum rte_eth_event_type type,
+bond_ethdev_lsc_event_callback(uint16_t port_id, enum rte_eth_event_type type,
 		void *param, void *ret_param __rte_unused)
 {
 	struct rte_eth_dev *bonded_eth_dev;
@@ -2951,7 +2951,7 @@ bond_ethdev_configure(struct rte_eth_dev *dev)
 	struct bond_dev_private *internals = dev->data->dev_private;
 	struct rte_kvargs *kvlist = internals->kvlist;
 	int arg_count;
-	uint8_t port_id = dev - rte_eth_devices;
+	uint16_t port_id = dev - rte_eth_devices;
 	uint8_t agg_mode;
 
 	static const uint8_t default_rss_key[40] = {
@@ -3086,7 +3086,7 @@ bond_ethdev_configure(struct rte_eth_dev *dev)
 	/* Parse/set primary slave port id*/
 	arg_count = rte_kvargs_count(kvlist, PMD_BOND_PRIMARY_SLAVE_KVARG);
 	if (arg_count == 1) {
-		uint8_t primary_slave_port_id;
+		uint16_t primary_slave_port_id;
 
 		if (rte_kvargs_process(kvlist,
 				PMD_BOND_PRIMARY_SLAVE_KVARG,
@@ -3099,7 +3099,7 @@ bond_ethdev_configure(struct rte_eth_dev *dev)
 		}
 
 		/* Set balance mode transmit policy*/
-		if (rte_eth_bond_primary_set(port_id, (uint8_t)primary_slave_port_id)
+		if (rte_eth_bond_primary_set(port_id, primary_slave_port_id)
 				!= 0) {
 			RTE_LOG(ERR, EAL,
 					"Failed to set primary slave port %d on bonded device %s\n",
diff --git a/drivers/net/bonding/rte_eth_bond_private.h b/drivers/net/bonding/rte_eth_bond_private.h
index 1fe6ff880..9362cffac 100644
--- a/drivers/net/bonding/rte_eth_bond_private.h
+++ b/drivers/net/bonding/rte_eth_bond_private.h
@@ -93,12 +93,12 @@ struct bond_tx_queue {
 
 /** Bonded slave devices structure */
 struct bond_ethdev_slave_ports {
-	uint8_t slaves[RTE_MAX_ETHPORTS];	/**< Slave port id array */
-	uint8_t slave_count;				/**< Number of slaves */
+	uint16_t slaves[RTE_MAX_ETHPORTS];	/**< Slave port id array */
+	uint16_t slave_count;				/**< Number of slaves */
 };
 
 struct bond_slave_details {
-	uint8_t port_id;
+	uint16_t port_id;
 
 	uint8_t link_status_poll_enabled;
 	uint8_t link_status_wait_to_complete;
@@ -114,14 +114,14 @@ typedef uint16_t (*xmit_hash_t)(const struct rte_mbuf *buf, uint8_t slave_count)
 
 /** Link Bonding PMD device private configuration Structure */
 struct bond_dev_private {
-	uint8_t port_id;					/**< Port Id of Bonded Port */
+	uint16_t port_id;			/**< Port Id of Bonded Port */
 	uint8_t mode;						/**< Link Bonding Mode */
 
 	rte_spinlock_t lock;
 
-	uint8_t primary_port;				/**< Primary Slave Port */
-	uint8_t current_primary_port;		/**< Primary Slave Port */
-	uint8_t user_defined_primary_port;
+	uint16_t primary_port;			/**< Primary Slave Port */
+	uint16_t current_primary_port;		/**< Primary Slave Port */
+	uint16_t user_defined_primary_port;
 	/**< Flag for whether primary port is user defined or not */
 
 	uint8_t balance_xmit_policy;
@@ -144,16 +144,17 @@ struct bond_dev_private {
 	uint16_t nb_rx_queues;			/**< Total number of rx queues */
 	uint16_t nb_tx_queues;			/**< Total number of tx queues*/
 
-	uint8_t active_slave;		/**< Next active_slave to poll */
-	uint8_t active_slave_count;		/**< Number of active slaves */
-	uint8_t active_slaves[RTE_MAX_ETHPORTS];	/**< Active slave list */
+	uint16_t active_slave;		/**< Next active_slave to poll */
+	uint16_t active_slave_count;		/**< Number of active slaves */
+	uint16_t active_slaves[RTE_MAX_ETHPORTS];    /**< Active slave list */
 
-	uint8_t slave_count;			/**< Number of bonded slaves */
+	uint16_t slave_count;			/**< Number of bonded slaves */
 	struct bond_slave_details slaves[RTE_MAX_ETHPORTS];
 	/**< Arary of bonded slaves details */
 
 	struct mode8023ad_private mode4;
-	uint8_t tlb_slaves_order[RTE_MAX_ETHPORTS]; /* TLB active slaves send order */
+	/**< TLB active slaves send order */
+	uint16_t tlb_slaves_order[RTE_MAX_ETHPORTS];
 	struct mode_alb_private mode6;
 
 	uint32_t rx_offload_capa;            /** Rx offload capability */
@@ -186,10 +187,10 @@ check_for_bonded_ethdev(const struct rte_eth_dev *eth_dev);
 
 /* Search given slave array to find position of given id.
  * Return slave pos or slaves_count if not found. */
-static inline uint8_t
-find_slave_by_id(uint8_t *slaves, uint8_t slaves_count, uint8_t slave_id) {
+static inline uint16_t
+find_slave_by_id(uint16_t *slaves, uint16_t slaves_count, uint16_t slave_id) {
 
-	uint8_t pos;
+	uint16_t pos;
 	for (pos = 0; pos < slaves_count; pos++) {
 		if (slave_id == slaves[pos])
 			break;
@@ -199,19 +200,19 @@ find_slave_by_id(uint8_t *slaves, uint8_t slaves_count, uint8_t slave_id) {
 }
 
 int
-valid_port_id(uint8_t port_id);
+valid_port_id(uint16_t port_id);
 
 int
-valid_bonded_port_id(uint8_t port_id);
+valid_bonded_port_id(uint16_t port_id);
 
 int
-valid_slave_port_id(uint8_t port_id, uint8_t mode);
+valid_slave_port_id(uint16_t port_id, uint8_t mode);
 
 void
-deactivate_slave(struct rte_eth_dev *eth_dev, uint8_t port_id);
+deactivate_slave(struct rte_eth_dev *eth_dev, uint16_t port_id);
 
 void
-activate_slave(struct rte_eth_dev *eth_dev, uint8_t port_id);
+activate_slave(struct rte_eth_dev *eth_dev, uint16_t port_id);
 
 void
 link_properties_set(struct rte_eth_dev *bonded_eth_dev,
@@ -255,10 +256,10 @@ xmit_l34_hash(const struct rte_mbuf *buf, uint8_t slave_count);
 
 void
 bond_ethdev_primary_set(struct bond_dev_private *internals,
-		uint8_t slave_port_id);
+		uint16_t slave_port_id);
 
 int
-bond_ethdev_lsc_event_callback(uint8_t port_id, enum rte_eth_event_type type,
+bond_ethdev_lsc_event_callback(uint16_t port_id, enum rte_eth_event_type type,
 		void *param, void *ret_param);
 
 int
diff --git a/drivers/net/e1000/Makefile b/drivers/net/e1000/Makefile
index ffdf36d37..a94ac7605 100644
--- a/drivers/net/e1000/Makefile
+++ b/drivers/net/e1000/Makefile
@@ -41,7 +41,7 @@ CFLAGS += $(WERROR_FLAGS)
 
 EXPORT_MAP := rte_pmd_e1000_version.map
 
-LIBABIVER := 1
+LIBABIVER := 2
 
 ifeq ($(CONFIG_RTE_TOOLCHAIN_ICC),y)
 #
diff --git a/drivers/net/e1000/em_ethdev.c b/drivers/net/e1000/em_ethdev.c
index 3d4ab9368..a59947d78 100644
--- a/drivers/net/e1000/em_ethdev.c
+++ b/drivers/net/e1000/em_ethdev.c
@@ -1624,7 +1624,7 @@ eth_em_interrupt_action(struct rte_eth_dev *dev,
 	rte_em_dev_atomic_read_link_status(dev, &link);
 	if (link.link_status) {
 		PMD_INIT_LOG(INFO, " Port %d: Link Up - speed %u Mbps - %s",
-			     dev->data->port_id, (unsigned)link.link_speed,
+			     dev->data->port_id, link.link_speed,
 			     link.link_duplex == ETH_LINK_FULL_DUPLEX ?
 			     "full-duplex" : "half-duplex");
 	} else {
diff --git a/drivers/net/e1000/em_rxtx.c b/drivers/net/e1000/em_rxtx.c
index 31819c5bd..06ba68e39 100644
--- a/drivers/net/e1000/em_rxtx.c
+++ b/drivers/net/e1000/em_rxtx.c
@@ -119,7 +119,7 @@ struct em_rx_queue {
 	uint16_t            nb_rx_hold; /**< number of held free RX desc. */
 	uint16_t            rx_free_thresh; /**< max free RX desc to hold. */
 	uint16_t            queue_id;   /**< RX queue index. */
-	uint8_t             port_id;    /**< Device port identifier. */
+	uint16_t            port_id;    /**< Device port identifier. */
 	uint8_t             pthresh;    /**< Prefetch threshold register. */
 	uint8_t             hthresh;    /**< Host threshold register. */
 	uint8_t             wthresh;    /**< Write-back threshold register. */
@@ -186,7 +186,7 @@ struct em_tx_queue {
 	/** Total number of TX descriptors ready to be allocated. */
 	uint16_t               nb_tx_free;
 	uint16_t               queue_id; /**< TX queue index. */
-	uint8_t                port_id;  /**< Device port identifier. */
+	uint16_t               port_id;  /**< Device port identifier. */
 	uint8_t                pthresh;  /**< Prefetch threshold register. */
 	uint8_t                hthresh;  /**< Host threshold register. */
 	uint8_t                wthresh;  /**< Write-back threshold register. */
diff --git a/drivers/net/e1000/igb_rxtx.c b/drivers/net/e1000/igb_rxtx.c
index 1c80a2a1b..a800d9c2b 100644
--- a/drivers/net/e1000/igb_rxtx.c
+++ b/drivers/net/e1000/igb_rxtx.c
@@ -122,7 +122,7 @@ struct igb_rx_queue {
 	uint16_t            rx_free_thresh; /**< max free RX desc to hold. */
 	uint16_t            queue_id;   /**< RX queue index. */
 	uint16_t            reg_idx;    /**< RX queue register index. */
-	uint8_t             port_id;    /**< Device port identifier. */
+	uint16_t            port_id;    /**< Device port identifier. */
 	uint8_t             pthresh;    /**< Prefetch threshold register. */
 	uint8_t             hthresh;    /**< Host threshold register. */
 	uint8_t             wthresh;    /**< Write-back threshold register. */
@@ -191,7 +191,7 @@ struct igb_tx_queue {
 	/**< Index of first used TX descriptor. */
 	uint16_t               queue_id; /**< TX queue index. */
 	uint16_t               reg_idx;  /**< TX queue register index. */
-	uint8_t                port_id;  /**< Device port identifier. */
+	uint16_t               port_id;  /**< Device port identifier. */
 	uint8_t                pthresh;  /**< Prefetch threshold register. */
 	uint8_t                hthresh;  /**< Host threshold register. */
 	uint8_t                wthresh;  /**< Write-back threshold register. */
diff --git a/drivers/net/failsafe/Makefile b/drivers/net/failsafe/Makefile
index d516d3621..e6bfad728 100644
--- a/drivers/net/failsafe/Makefile
+++ b/drivers/net/failsafe/Makefile
@@ -36,7 +36,7 @@ LIB = librte_pmd_failsafe.a
 
 EXPORT_MAP := rte_pmd_failsafe_version.map
 
-LIBABIVER := 1
+LIBABIVER := 2
 
 # Sources are stored in SRCS-y
 SRCS-$(CONFIG_RTE_LIBRTE_PMD_FAILSAFE) += failsafe.c
diff --git a/drivers/net/failsafe/failsafe_ether.c b/drivers/net/failsafe/failsafe_ether.c
index a3a8cce95..1c8a9337e 100644
--- a/drivers/net/failsafe/failsafe_ether.c
+++ b/drivers/net/failsafe/failsafe_ether.c
@@ -400,7 +400,7 @@ failsafe_eth_dev_state_sync(struct rte_eth_dev *dev)
 }
 
 int
-failsafe_eth_rmv_event_callback(uint8_t port_id __rte_unused,
+failsafe_eth_rmv_event_callback(uint16_t port_id __rte_unused,
 				enum rte_eth_event_type event __rte_unused,
 				void *cb_arg, void *out __rte_unused)
 {
@@ -419,7 +419,7 @@ failsafe_eth_rmv_event_callback(uint8_t port_id __rte_unused,
 }
 
 int
-failsafe_eth_lsc_event_callback(uint8_t port_id __rte_unused,
+failsafe_eth_lsc_event_callback(uint16_t port_id __rte_unused,
 				enum rte_eth_event_type event __rte_unused,
 				void *cb_arg, void *out __rte_unused)
 {
diff --git a/drivers/net/failsafe/failsafe_private.h b/drivers/net/failsafe/failsafe_private.h
index 0361cf434..4ae6e6c5f 100644
--- a/drivers/net/failsafe/failsafe_private.h
+++ b/drivers/net/failsafe/failsafe_private.h
@@ -180,10 +180,10 @@ int failsafe_eal_uninit(struct rte_eth_dev *dev);
 
 int failsafe_eth_dev_state_sync(struct rte_eth_dev *dev);
 void failsafe_dev_remove(struct rte_eth_dev *dev);
-int failsafe_eth_rmv_event_callback(uint8_t port_id,
+int failsafe_eth_rmv_event_callback(uint16_t port_id,
 				    enum rte_eth_event_type type,
 				    void *arg, void *out);
-int failsafe_eth_lsc_event_callback(uint8_t port_id,
+int failsafe_eth_lsc_event_callback(uint16_t port_id,
 				    enum rte_eth_event_type event,
 				    void *cb_arg, void *out);
 
diff --git a/drivers/net/fm10k/Makefile b/drivers/net/fm10k/Makefile
index e0024f052..5034064e4 100644
--- a/drivers/net/fm10k/Makefile
+++ b/drivers/net/fm10k/Makefile
@@ -41,7 +41,7 @@ CFLAGS += $(WERROR_FLAGS)
 
 EXPORT_MAP := rte_pmd_fm10k_version.map
 
-LIBABIVER := 1
+LIBABIVER := 2
 
 ifeq ($(CONFIG_RTE_TOOLCHAIN_ICC),y)
 #
diff --git a/drivers/net/fm10k/fm10k.h b/drivers/net/fm10k/fm10k.h
index 8e1a95062..060982b10 100644
--- a/drivers/net/fm10k/fm10k.h
+++ b/drivers/net/fm10k/fm10k.h
@@ -204,7 +204,7 @@ struct fm10k_rx_queue {
 	uint16_t rxrearm_nb;     /* number of remaining to be re-armed */
 	uint16_t rxrearm_start;  /* the idx we start the re-arming from */
 	uint16_t rx_using_sse; /* indicates that vector RX is in use */
-	uint8_t port_id;
+	uint16_t port_id;
 	uint8_t drop_en;
 	uint8_t rx_deferred_start; /* don't start this queue in dev start. */
 	uint16_t rx_ftag_en; /* indicates FTAG RX supported */
@@ -241,7 +241,7 @@ struct fm10k_tx_queue {
 	volatile uint32_t *tail_ptr;
 	uint32_t txq_flags; /* Holds flags for this TXq */
 	uint16_t nb_desc;
-	uint8_t port_id;
+	uint16_t port_id;
 	uint8_t tx_deferred_start; /** don't start this queue in dev start. */
 	uint16_t queue_id;
 	uint16_t tx_ftag_en; /* indicates FTAG TX supported */
@@ -289,7 +289,7 @@ static inline uint16_t fifo_remove(struct fifo *fifo)
 }
 
 static inline void
-fm10k_pktmbuf_reset(struct rte_mbuf *mb, uint8_t in_port)
+fm10k_pktmbuf_reset(struct rte_mbuf *mb, uint16_t in_port)
 {
 	rte_mbuf_refcnt_set(mb, 1);
 	mb->next = NULL;
diff --git a/drivers/net/i40e/Makefile b/drivers/net/i40e/Makefile
index 55c79a60a..1290d7f32 100644
--- a/drivers/net/i40e/Makefile
+++ b/drivers/net/i40e/Makefile
@@ -42,7 +42,7 @@ CFLAGS += -DX722_A0_SUPPORT
 
 EXPORT_MAP := rte_pmd_i40e_version.map
 
-LIBABIVER := 1
+LIBABIVER := 2
 
 #
 # Add extra flags for base driver files (also known as shared code)
diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c
index f12aefa5d..c4c6aec1d 100644
--- a/drivers/net/i40e/i40e_ethdev.c
+++ b/drivers/net/i40e/i40e_ethdev.c
@@ -1920,8 +1920,9 @@ i40e_dev_start(struct rte_eth_dev *dev)
 	hw->adapter_stopped = 0;
 
 	if (dev->data->dev_conf.link_speeds & ETH_LINK_SPEED_FIXED) {
-		PMD_INIT_LOG(ERR, "Invalid link_speeds for port %hhu; autonegotiation disabled",
-			     dev->data->port_id);
+		PMD_INIT_LOG(ERR,
+		"Invalid link_speeds for port %u, autonegotiation disabled",
+			      dev->data->port_id);
 		return -EINVAL;
 	}
 
diff --git a/drivers/net/i40e/i40e_rxtx.h b/drivers/net/i40e/i40e_rxtx.h
index 20084d649..ff2ab8575 100644
--- a/drivers/net/i40e/i40e_rxtx.h
+++ b/drivers/net/i40e/i40e_rxtx.h
@@ -121,7 +121,7 @@ struct i40e_rx_queue {
 	uint16_t rxrearm_start;	/**< the idx we start the re-arming from */
 	uint64_t mbuf_initializer; /**< value to init mbufs */
 
-	uint8_t port_id; /**< device port ID */
+	uint16_t port_id; /**< device port ID */
 	uint8_t crc_len; /**< 0 if CRC stripped, 4 otherwise */
 	uint16_t queue_id; /**< RX queue index */
 	uint16_t reg_idx; /**< RX queue register index */
@@ -167,7 +167,7 @@ struct i40e_tx_queue {
 	uint8_t pthresh; /**< Prefetch threshold register. */
 	uint8_t hthresh; /**< Host threshold register. */
 	uint8_t wthresh; /**< Write-back threshold reg. */
-	uint8_t port_id; /**< Device port identifier. */
+	uint16_t port_id; /**< Device port identifier. */
 	uint16_t queue_id; /**< TX queue index. */
 	uint16_t reg_idx;
 	uint32_t txq_flags;
diff --git a/drivers/net/i40e/rte_pmd_i40e.c b/drivers/net/i40e/rte_pmd_i40e.c
index f12b7f4a1..3728d39b9 100644
--- a/drivers/net/i40e/rte_pmd_i40e.c
+++ b/drivers/net/i40e/rte_pmd_i40e.c
@@ -41,7 +41,7 @@
 #include "rte_pmd_i40e.h"
 
 int
-rte_pmd_i40e_ping_vfs(uint8_t port, uint16_t vf)
+rte_pmd_i40e_ping_vfs(uint16_t port, uint16_t vf)
 {
 	struct rte_eth_dev *dev;
 	struct i40e_pf *pf;
@@ -66,7 +66,7 @@ rte_pmd_i40e_ping_vfs(uint8_t port, uint16_t vf)
 }
 
 int
-rte_pmd_i40e_set_vf_mac_anti_spoof(uint8_t port, uint16_t vf_id, uint8_t on)
+rte_pmd_i40e_set_vf_mac_anti_spoof(uint16_t port, uint16_t vf_id, uint8_t on)
 {
 	struct rte_eth_dev *dev;
 	struct i40e_pf *pf;
@@ -170,7 +170,7 @@ i40e_add_rm_all_vlan_filter(struct i40e_vsi *vsi, uint8_t add)
 }
 
 int
-rte_pmd_i40e_set_vf_vlan_anti_spoof(uint8_t port, uint16_t vf_id, uint8_t on)
+rte_pmd_i40e_set_vf_vlan_anti_spoof(uint16_t port, uint16_t vf_id, uint8_t on)
 {
 	struct rte_eth_dev *dev;
 	struct i40e_pf *pf;
@@ -430,7 +430,7 @@ i40e_vsi_set_tx_loopback(struct i40e_vsi *vsi, uint8_t on)
 }
 
 int
-rte_pmd_i40e_set_tx_loopback(uint8_t port, uint8_t on)
+rte_pmd_i40e_set_tx_loopback(uint16_t port, uint8_t on)
 {
 	struct rte_eth_dev *dev;
 	struct i40e_pf *pf;
@@ -473,7 +473,7 @@ rte_pmd_i40e_set_tx_loopback(uint8_t port, uint8_t on)
 }
 
 int
-rte_pmd_i40e_set_vf_unicast_promisc(uint8_t port, uint16_t vf_id, uint8_t on)
+rte_pmd_i40e_set_vf_unicast_promisc(uint16_t port, uint16_t vf_id, uint8_t on)
 {
 	struct rte_eth_dev *dev;
 	struct i40e_pf *pf;
@@ -514,7 +514,7 @@ rte_pmd_i40e_set_vf_unicast_promisc(uint8_t port, uint16_t vf_id, uint8_t on)
 }
 
 int
-rte_pmd_i40e_set_vf_multicast_promisc(uint8_t port, uint16_t vf_id, uint8_t on)
+rte_pmd_i40e_set_vf_multicast_promisc(uint16_t port, uint16_t vf_id, uint8_t on)
 {
 	struct rte_eth_dev *dev;
 	struct i40e_pf *pf;
@@ -555,7 +555,7 @@ rte_pmd_i40e_set_vf_multicast_promisc(uint8_t port, uint16_t vf_id, uint8_t on)
 }
 
 int
-rte_pmd_i40e_set_vf_mac_addr(uint8_t port, uint16_t vf_id,
+rte_pmd_i40e_set_vf_mac_addr(uint16_t port, uint16_t vf_id,
 			     struct ether_addr *mac_addr)
 {
 	struct i40e_mac_filter *f;
@@ -598,7 +598,7 @@ rte_pmd_i40e_set_vf_mac_addr(uint8_t port, uint16_t vf_id,
 
 /* Set vlan strip on/off for specific VF from host */
 int
-rte_pmd_i40e_set_vf_vlan_stripq(uint8_t port, uint16_t vf_id, uint8_t on)
+rte_pmd_i40e_set_vf_vlan_stripq(uint16_t port, uint16_t vf_id, uint8_t on)
 {
 	struct rte_eth_dev *dev;
 	struct i40e_pf *pf;
@@ -633,7 +633,7 @@ rte_pmd_i40e_set_vf_vlan_stripq(uint8_t port, uint16_t vf_id, uint8_t on)
 	return ret;
 }
 
-int rte_pmd_i40e_set_vf_vlan_insert(uint8_t port, uint16_t vf_id,
+int rte_pmd_i40e_set_vf_vlan_insert(uint16_t port, uint16_t vf_id,
 				    uint16_t vlan_id)
 {
 	struct rte_eth_dev *dev;
@@ -698,7 +698,7 @@ int rte_pmd_i40e_set_vf_vlan_insert(uint8_t port, uint16_t vf_id,
 	return ret;
 }
 
-int rte_pmd_i40e_set_vf_broadcast(uint8_t port, uint16_t vf_id,
+int rte_pmd_i40e_set_vf_broadcast(uint16_t port, uint16_t vf_id,
 				  uint8_t on)
 {
 	struct rte_eth_dev *dev;
@@ -764,7 +764,7 @@ int rte_pmd_i40e_set_vf_broadcast(uint8_t port, uint16_t vf_id,
 	return ret;
 }
 
-int rte_pmd_i40e_set_vf_vlan_tag(uint8_t port, uint16_t vf_id, uint8_t on)
+int rte_pmd_i40e_set_vf_vlan_tag(uint16_t port, uint16_t vf_id, uint8_t on)
 {
 	struct rte_eth_dev *dev;
 	struct i40e_pf *pf;
@@ -858,7 +858,7 @@ i40e_vlan_filter_count(struct i40e_vsi *vsi)
 	return count;
 }
 
-int rte_pmd_i40e_set_vf_vlan_filter(uint8_t port, uint16_t vlan_id,
+int rte_pmd_i40e_set_vf_vlan_filter(uint16_t port, uint16_t vlan_id,
 				    uint64_t vf_mask, uint8_t on)
 {
 	struct rte_eth_dev *dev;
@@ -941,7 +941,7 @@ int rte_pmd_i40e_set_vf_vlan_filter(uint8_t port, uint16_t vlan_id,
 }
 
 int
-rte_pmd_i40e_get_vf_stats(uint8_t port,
+rte_pmd_i40e_get_vf_stats(uint16_t port,
 			  uint16_t vf_id,
 			  struct rte_eth_stats *stats)
 {
@@ -986,7 +986,7 @@ rte_pmd_i40e_get_vf_stats(uint8_t port,
 }
 
 int
-rte_pmd_i40e_reset_vf_stats(uint8_t port,
+rte_pmd_i40e_reset_vf_stats(uint16_t port,
 			    uint16_t vf_id)
 {
 	struct rte_eth_dev *dev;
@@ -1020,7 +1020,7 @@ rte_pmd_i40e_reset_vf_stats(uint8_t port,
 }
 
 int
-rte_pmd_i40e_set_vf_max_bw(uint8_t port, uint16_t vf_id, uint32_t bw)
+rte_pmd_i40e_set_vf_max_bw(uint16_t port, uint16_t vf_id, uint32_t bw)
 {
 	struct rte_eth_dev *dev;
 	struct i40e_pf *pf;
@@ -1109,7 +1109,7 @@ rte_pmd_i40e_set_vf_max_bw(uint8_t port, uint16_t vf_id, uint32_t bw)
 }
 
 int
-rte_pmd_i40e_set_vf_tc_bw_alloc(uint8_t port, uint16_t vf_id,
+rte_pmd_i40e_set_vf_tc_bw_alloc(uint16_t port, uint16_t vf_id,
 				uint8_t tc_num, uint8_t *bw_weight)
 {
 	struct rte_eth_dev *dev;
@@ -1223,7 +1223,7 @@ rte_pmd_i40e_set_vf_tc_bw_alloc(uint8_t port, uint16_t vf_id,
 }
 
 int
-rte_pmd_i40e_set_vf_tc_max_bw(uint8_t port, uint16_t vf_id,
+rte_pmd_i40e_set_vf_tc_max_bw(uint16_t port, uint16_t vf_id,
 			      uint8_t tc_no, uint32_t bw)
 {
 	struct rte_eth_dev *dev;
@@ -1341,7 +1341,7 @@ rte_pmd_i40e_set_vf_tc_max_bw(uint8_t port, uint16_t vf_id,
 }
 
 int
-rte_pmd_i40e_set_tc_strict_prio(uint8_t port, uint8_t tc_map)
+rte_pmd_i40e_set_tc_strict_prio(uint16_t port, uint8_t tc_map)
 {
 	struct rte_eth_dev *dev;
 	struct i40e_pf *pf;
@@ -1513,7 +1513,7 @@ i40e_add_rm_profile_info(struct i40e_hw *hw, uint8_t *profile_info_sec)
 
 /* Check if the profile info exists */
 static int
-i40e_check_profile_info(uint8_t port, uint8_t *profile_info_sec)
+i40e_check_profile_info(uint16_t port, uint8_t *profile_info_sec)
 {
 	struct rte_eth_dev *dev = &rte_eth_devices[port];
 	struct i40e_hw *hw = I40E_DEV_PRIVATE_TO_HW(dev->data->dev_private);
@@ -1557,7 +1557,7 @@ i40e_check_profile_info(uint8_t port, uint8_t *profile_info_sec)
 }
 
 int
-rte_pmd_i40e_process_ddp_package(uint8_t port, uint8_t *buff,
+rte_pmd_i40e_process_ddp_package(uint16_t port, uint8_t *buff,
 				 uint32_t size,
 				 enum rte_pmd_i40e_package_op op)
 {
@@ -1863,7 +1863,7 @@ int rte_pmd_i40e_get_ddp_info(uint8_t *pkg_buff, uint32_t pkg_size,
 }
 
 int
-rte_pmd_i40e_get_ddp_list(uint8_t port, uint8_t *buff, uint32_t size)
+rte_pmd_i40e_get_ddp_list(uint16_t port, uint8_t *buff, uint32_t size)
 {
 	struct rte_eth_dev *dev;
 	struct i40e_hw *hw;
@@ -1991,7 +1991,7 @@ static int check_invalid_ptype_mapping(
 
 int
 rte_pmd_i40e_ptype_mapping_update(
-			uint8_t port,
+			uint16_t port,
 			struct rte_pmd_i40e_ptype_mapping *mapping_items,
 			uint16_t count,
 			uint8_t exclusive)
@@ -2027,7 +2027,7 @@ rte_pmd_i40e_ptype_mapping_update(
 	return 0;
 }
 
-int rte_pmd_i40e_ptype_mapping_reset(uint8_t port)
+int rte_pmd_i40e_ptype_mapping_reset(uint16_t port)
 {
 	struct rte_eth_dev *dev;
 
@@ -2044,7 +2044,7 @@ int rte_pmd_i40e_ptype_mapping_reset(uint8_t port)
 }
 
 int rte_pmd_i40e_ptype_mapping_get(
-			uint8_t port,
+			uint16_t port,
 			struct rte_pmd_i40e_ptype_mapping *mapping_items,
 			uint16_t size,
 			uint16_t *count,
@@ -2078,7 +2078,7 @@ int rte_pmd_i40e_ptype_mapping_get(
 	return 0;
 }
 
-int rte_pmd_i40e_ptype_mapping_replace(uint8_t port,
+int rte_pmd_i40e_ptype_mapping_replace(uint16_t port,
 				       uint32_t target,
 				       uint8_t mask,
 				       uint32_t pkt_type)
diff --git a/drivers/net/i40e/rte_pmd_i40e.h b/drivers/net/i40e/rte_pmd_i40e.h
index 356fa89d7..7f32a59b1 100644
--- a/drivers/net/i40e/rte_pmd_i40e.h
+++ b/drivers/net/i40e/rte_pmd_i40e.h
@@ -157,7 +157,7 @@ struct rte_pmd_i40e_ptype_mapping {
  *   - (-ENODEV) if *port* invalid.
  *   - (-EINVAL) if *vf* invalid.
  */
-int rte_pmd_i40e_ping_vfs(uint8_t port, uint16_t vf);
+int rte_pmd_i40e_ping_vfs(uint16_t port, uint16_t vf);
 
 /**
  * Enable/Disable VF MAC anti spoofing.
@@ -174,7 +174,7 @@ int rte_pmd_i40e_ping_vfs(uint8_t port, uint16_t vf);
  *   - (-ENODEV) if *port* invalid.
  *   - (-EINVAL) if bad parameter.
  */
-int rte_pmd_i40e_set_vf_mac_anti_spoof(uint8_t port,
+int rte_pmd_i40e_set_vf_mac_anti_spoof(uint16_t port,
 				       uint16_t vf_id,
 				       uint8_t on);
 
@@ -193,7 +193,7 @@ int rte_pmd_i40e_set_vf_mac_anti_spoof(uint8_t port,
  *   - (-ENODEV) if *port* invalid.
  *   - (-EINVAL) if bad parameter.
  */
-int rte_pmd_i40e_set_vf_vlan_anti_spoof(uint8_t port,
+int rte_pmd_i40e_set_vf_vlan_anti_spoof(uint16_t port,
 					uint16_t vf_id,
 					uint8_t on);
 
@@ -210,7 +210,7 @@ int rte_pmd_i40e_set_vf_vlan_anti_spoof(uint8_t port,
  *   - (-ENODEV) if *port* invalid.
  *   - (-EINVAL) if bad parameter.
  */
-int rte_pmd_i40e_set_tx_loopback(uint8_t port,
+int rte_pmd_i40e_set_tx_loopback(uint16_t port,
 				 uint8_t on);
 
 /**
@@ -228,7 +228,7 @@ int rte_pmd_i40e_set_tx_loopback(uint8_t port,
  *   - (-ENODEV) if *port* invalid.
  *   - (-EINVAL) if bad parameter.
  */
-int rte_pmd_i40e_set_vf_unicast_promisc(uint8_t port,
+int rte_pmd_i40e_set_vf_unicast_promisc(uint16_t port,
 					uint16_t vf_id,
 					uint8_t on);
 
@@ -247,7 +247,7 @@ int rte_pmd_i40e_set_vf_unicast_promisc(uint8_t port,
  *   - (-ENODEV) if *port* invalid.
  *   - (-EINVAL) if bad parameter.
  */
-int rte_pmd_i40e_set_vf_multicast_promisc(uint8_t port,
+int rte_pmd_i40e_set_vf_multicast_promisc(uint16_t port,
 					  uint16_t vf_id,
 					  uint8_t on);
 
@@ -271,7 +271,7 @@ int rte_pmd_i40e_set_vf_multicast_promisc(uint8_t port,
  *   - (-ENODEV) if *port* invalid.
  *   - (-EINVAL) if *vf* or *mac_addr* is invalid.
  */
-int rte_pmd_i40e_set_vf_mac_addr(uint8_t port, uint16_t vf_id,
+int rte_pmd_i40e_set_vf_mac_addr(uint16_t port, uint16_t vf_id,
 				 struct ether_addr *mac_addr);
 
 /**
@@ -291,7 +291,7 @@ int rte_pmd_i40e_set_vf_mac_addr(uint8_t port, uint16_t vf_id,
  *   - (-EINVAL) if bad parameter.
  */
 int
-rte_pmd_i40e_set_vf_vlan_stripq(uint8_t port, uint16_t vf, uint8_t on);
+rte_pmd_i40e_set_vf_vlan_stripq(uint16_t port, uint16_t vf, uint8_t on);
 
 /**
  * Enable/Disable vf vlan insert
@@ -309,7 +309,7 @@ rte_pmd_i40e_set_vf_vlan_stripq(uint8_t port, uint16_t vf, uint8_t on);
  *   - (-ENODEV) if *port* invalid.
  *   - (-EINVAL) if bad parameter.
  */
-int rte_pmd_i40e_set_vf_vlan_insert(uint8_t port, uint16_t vf_id,
+int rte_pmd_i40e_set_vf_vlan_insert(uint16_t port, uint16_t vf_id,
 				    uint16_t vlan_id);
 
 /**
@@ -328,7 +328,7 @@ int rte_pmd_i40e_set_vf_vlan_insert(uint8_t port, uint16_t vf_id,
  *   - (-ENODEV) if *port* invalid.
  *   - (-EINVAL) if bad parameter.
  */
-int rte_pmd_i40e_set_vf_broadcast(uint8_t port, uint16_t vf_id,
+int rte_pmd_i40e_set_vf_broadcast(uint16_t port, uint16_t vf_id,
 				  uint8_t on);
 
 /**
@@ -347,7 +347,7 @@ int rte_pmd_i40e_set_vf_broadcast(uint8_t port, uint16_t vf_id,
  *   - (-ENODEV) if *port* invalid.
  *   - (-EINVAL) if bad parameter.
  */
-int rte_pmd_i40e_set_vf_vlan_tag(uint8_t port, uint16_t vf_id, uint8_t on);
+int rte_pmd_i40e_set_vf_vlan_tag(uint16_t port, uint16_t vf_id, uint8_t on);
 
 /**
  * Enable/Disable VF VLAN filter
@@ -368,7 +368,7 @@ int rte_pmd_i40e_set_vf_vlan_tag(uint8_t port, uint16_t vf_id, uint8_t on);
  *   - (-EINVAL) if bad parameter.
  *   - (-ENOTSUP) not supported by firmware.
  */
-int rte_pmd_i40e_set_vf_vlan_filter(uint8_t port, uint16_t vlan_id,
+int rte_pmd_i40e_set_vf_vlan_filter(uint16_t port, uint16_t vlan_id,
 				    uint64_t vf_mask, uint8_t on);
 
 /**
@@ -393,7 +393,7 @@ int rte_pmd_i40e_set_vf_vlan_filter(uint8_t port, uint16_t vlan_id,
  *   - (-EINVAL) if bad parameter.
  */
 
-int rte_pmd_i40e_get_vf_stats(uint8_t port,
+int rte_pmd_i40e_get_vf_stats(uint16_t port,
 			      uint16_t vf_id,
 			      struct rte_eth_stats *stats);
 
@@ -409,7 +409,7 @@ int rte_pmd_i40e_get_vf_stats(uint8_t port,
  *   - (-ENODEV) if *port* invalid.
  *   - (-EINVAL) if bad parameter.
  */
-int rte_pmd_i40e_reset_vf_stats(uint8_t port,
+int rte_pmd_i40e_reset_vf_stats(uint16_t port,
 				uint16_t vf_id);
 
 /**
@@ -434,7 +434,7 @@ int rte_pmd_i40e_reset_vf_stats(uint8_t port,
  *   - (-EINVAL) if bad parameter.
  *   - (-ENOTSUP) not supported by firmware.
  */
-int rte_pmd_i40e_set_vf_max_bw(uint8_t port,
+int rte_pmd_i40e_set_vf_max_bw(uint16_t port,
 			       uint16_t vf_id,
 			       uint32_t bw);
 
@@ -459,7 +459,7 @@ int rte_pmd_i40e_set_vf_max_bw(uint8_t port,
  *   - (-EINVAL) if bad parameter.
  *   - (-ENOTSUP) not supported by firmware.
  */
-int rte_pmd_i40e_set_vf_tc_bw_alloc(uint8_t port,
+int rte_pmd_i40e_set_vf_tc_bw_alloc(uint16_t port,
 				    uint16_t vf_id,
 				    uint8_t tc_num,
 				    uint8_t *bw_weight);
@@ -484,7 +484,7 @@ int rte_pmd_i40e_set_vf_tc_bw_alloc(uint8_t port,
  *   - (-EINVAL) if bad parameter.
  *   - (-ENOTSUP) not supported by firmware.
  */
-int rte_pmd_i40e_set_vf_tc_max_bw(uint8_t port,
+int rte_pmd_i40e_set_vf_tc_max_bw(uint16_t port,
 				  uint16_t vf_id,
 				  uint8_t tc_no,
 				  uint32_t bw);
@@ -502,7 +502,7 @@ int rte_pmd_i40e_set_vf_tc_max_bw(uint8_t port,
  *   - (-EINVAL) if bad parameter.
  *   - (-ENOTSUP) not supported by firmware.
  */
-int rte_pmd_i40e_set_tc_strict_prio(uint8_t port, uint8_t tc_map);
+int rte_pmd_i40e_set_tc_strict_prio(uint16_t port, uint8_t tc_map);
 
 /**
  * Load/Unload a ddp package
@@ -523,7 +523,7 @@ int rte_pmd_i40e_set_tc_strict_prio(uint8_t port, uint8_t tc_map);
  *   - (-EACCES) if profile does not exist.
  *   - (-ENOTSUP) if operation not supported.
  */
-int rte_pmd_i40e_process_ddp_package(uint8_t port, uint8_t *buff,
+int rte_pmd_i40e_process_ddp_package(uint16_t port, uint8_t *buff,
 				     uint32_t size,
 				     enum rte_pmd_i40e_package_op op);
 
@@ -561,7 +561,7 @@ int rte_pmd_i40e_get_ddp_info(uint8_t *pkg, uint32_t pkg_size,
  *   - (-ENODEV) if *port* invalid.
  *   - (-EINVAL) if bad parameter.
  */
-int rte_pmd_i40e_get_ddp_list(uint8_t port, uint8_t *buff, uint32_t size);
+int rte_pmd_i40e_get_ddp_list(uint16_t port, uint8_t *buff, uint32_t size);
 
 /**
  * Update hardware defined ptype to software defined packet type
@@ -581,7 +581,7 @@ int rte_pmd_i40e_get_ddp_list(uint8_t port, uint8_t *buff, uint32_t size);
  *	set other PTYPEs maps to PTYPE_UNKNOWN.
  */
 int rte_pmd_i40e_ptype_mapping_update(
-			uint8_t port,
+			uint16_t port,
 			struct rte_pmd_i40e_ptype_mapping *mapping_items,
 			uint16_t count,
 			uint8_t exclusive);
@@ -593,7 +593,7 @@ int rte_pmd_i40e_ptype_mapping_update(
  * @param port
  *    pointer to port identifier of the device
  */
-int rte_pmd_i40e_ptype_mapping_reset(uint8_t port);
+int rte_pmd_i40e_ptype_mapping_reset(uint16_t port);
 
 /**
  * Get hardware defined ptype to software defined ptype
@@ -612,7 +612,7 @@ int rte_pmd_i40e_ptype_mapping_reset(uint8_t port);
  *    -(!0) only return mapping items which packet_type != RTE_PTYPE_UNKNOWN.
  */
 int rte_pmd_i40e_ptype_mapping_get(
-			uint8_t port,
+			uint16_t port,
 			struct rte_pmd_i40e_ptype_mapping *mapping_items,
 			uint16_t size,
 			uint16_t *count,
@@ -632,7 +632,7 @@ int rte_pmd_i40e_ptype_mapping_get(
  * @param pkt_type
  *    the new packet type to overwrite
  */
-int rte_pmd_i40e_ptype_mapping_replace(uint8_t port,
+int rte_pmd_i40e_ptype_mapping_replace(uint16_t port,
 				       uint32_t target,
 				       uint8_t mask,
 				       uint32_t pkt_type);
diff --git a/drivers/net/ixgbe/Makefile b/drivers/net/ixgbe/Makefile
index 5e57cb353..18ad4feca 100644
--- a/drivers/net/ixgbe/Makefile
+++ b/drivers/net/ixgbe/Makefile
@@ -41,7 +41,7 @@ CFLAGS += $(WERROR_FLAGS)
 
 EXPORT_MAP := rte_pmd_ixgbe_version.map
 
-LIBABIVER := 1
+LIBABIVER := 2
 
 ifeq ($(CONFIG_RTE_TOOLCHAIN_ICC),y)
 #
diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c
index 9ca5cbcd3..d873c409f 100644
--- a/drivers/net/ixgbe/ixgbe_ethdev.c
+++ b/drivers/net/ixgbe/ixgbe_ethdev.c
@@ -2508,8 +2508,9 @@ ixgbe_dev_start(struct rte_eth_dev *dev)
 	*    - fixed speed: TODO implement
 	*/
 	if (dev->data->dev_conf.link_speeds & ETH_LINK_SPEED_FIXED) {
-		PMD_INIT_LOG(ERR, "Invalid link_speeds for port %hhu; fix speed not supported",
-			     dev->data->port_id);
+		PMD_INIT_LOG(ERR,
+		"Invalid link_speeds for port %u, fix speed not supported",
+				dev->data->port_id);
 		return -EINVAL;
 	}
 
diff --git a/drivers/net/ixgbe/ixgbe_rxtx.h b/drivers/net/ixgbe/ixgbe_rxtx.h
index 85feb0bdc..81c527fad 100644
--- a/drivers/net/ixgbe/ixgbe_rxtx.h
+++ b/drivers/net/ixgbe/ixgbe_rxtx.h
@@ -148,7 +148,7 @@ struct ixgbe_rx_queue {
 	uint16_t            queue_id; /**< RX queue index. */
 	uint16_t            reg_idx;  /**< RX queue register index. */
 	uint16_t            pkt_type_mask;  /**< Packet type mask for different NICs. */
-	uint8_t             port_id;  /**< Device port identifier. */
+	uint16_t            port_id;  /**< Device port identifier. */
 	uint8_t             crc_len;  /**< 0 if CRC stripped, 4 otherwise. */
 	uint8_t             drop_en;  /**< If not 0, set SRRCTL.Drop_En. */
 	uint8_t             rx_deferred_start; /**< not in global dev start. */
@@ -237,7 +237,7 @@ struct ixgbe_tx_queue {
 	uint16_t tx_next_rs; /**< next desc to set RS bit */
 	uint16_t            queue_id;      /**< TX queue index. */
 	uint16_t            reg_idx;       /**< TX queue register index. */
-	uint8_t             port_id;       /**< Device port identifier. */
+	uint16_t            port_id;       /**< Device port identifier. */
 	uint8_t             pthresh;       /**< Prefetch threshold register. */
 	uint8_t             hthresh;       /**< Host threshold register. */
 	uint8_t             wthresh;       /**< Write-back threshold reg. */
diff --git a/drivers/net/ixgbe/rte_pmd_ixgbe.c b/drivers/net/ixgbe/rte_pmd_ixgbe.c
index 79897ff64..f12737857 100644
--- a/drivers/net/ixgbe/rte_pmd_ixgbe.c
+++ b/drivers/net/ixgbe/rte_pmd_ixgbe.c
@@ -38,7 +38,7 @@
 #include "rte_pmd_ixgbe.h"
 
 int
-rte_pmd_ixgbe_set_vf_mac_addr(uint8_t port, uint16_t vf,
+rte_pmd_ixgbe_set_vf_mac_addr(uint16_t port, uint16_t vf,
 			      struct ether_addr *mac_addr)
 {
 	struct ixgbe_hw *hw;
@@ -73,7 +73,7 @@ rte_pmd_ixgbe_set_vf_mac_addr(uint8_t port, uint16_t vf,
 }
 
 int
-rte_pmd_ixgbe_ping_vf(uint8_t port, uint16_t vf)
+rte_pmd_ixgbe_ping_vf(uint16_t port, uint16_t vf)
 {
 	struct ixgbe_hw *hw;
 	struct ixgbe_vf_info *vfinfo;
@@ -105,7 +105,7 @@ rte_pmd_ixgbe_ping_vf(uint8_t port, uint16_t vf)
 }
 
 int
-rte_pmd_ixgbe_set_vf_vlan_anti_spoof(uint8_t port, uint16_t vf, uint8_t on)
+rte_pmd_ixgbe_set_vf_vlan_anti_spoof(uint16_t port, uint16_t vf, uint8_t on)
 {
 	struct ixgbe_hw *hw;
 	struct ixgbe_mac_info *mac;
@@ -135,7 +135,7 @@ rte_pmd_ixgbe_set_vf_vlan_anti_spoof(uint8_t port, uint16_t vf, uint8_t on)
 }
 
 int
-rte_pmd_ixgbe_set_vf_mac_anti_spoof(uint8_t port, uint16_t vf, uint8_t on)
+rte_pmd_ixgbe_set_vf_mac_anti_spoof(uint16_t port, uint16_t vf, uint8_t on)
 {
 	struct ixgbe_hw *hw;
 	struct ixgbe_mac_info *mac;
@@ -164,7 +164,7 @@ rte_pmd_ixgbe_set_vf_mac_anti_spoof(uint8_t port, uint16_t vf, uint8_t on)
 }
 
 int
-rte_pmd_ixgbe_set_vf_vlan_insert(uint8_t port, uint16_t vf, uint16_t vlan_id)
+rte_pmd_ixgbe_set_vf_vlan_insert(uint16_t port, uint16_t vf, uint16_t vlan_id)
 {
 	struct ixgbe_hw *hw;
 	uint32_t ctrl;
@@ -200,7 +200,7 @@ rte_pmd_ixgbe_set_vf_vlan_insert(uint8_t port, uint16_t vf, uint16_t vlan_id)
 }
 
 int
-rte_pmd_ixgbe_set_tx_loopback(uint8_t port, uint8_t on)
+rte_pmd_ixgbe_set_tx_loopback(uint16_t port, uint8_t on)
 {
 	struct ixgbe_hw *hw;
 	uint32_t ctrl;
@@ -230,7 +230,7 @@ rte_pmd_ixgbe_set_tx_loopback(uint8_t port, uint8_t on)
 }
 
 int
-rte_pmd_ixgbe_set_all_queues_drop_en(uint8_t port, uint8_t on)
+rte_pmd_ixgbe_set_all_queues_drop_en(uint16_t port, uint8_t on)
 {
 	struct ixgbe_hw *hw;
 	uint32_t reg_value;
@@ -260,7 +260,7 @@ rte_pmd_ixgbe_set_all_queues_drop_en(uint8_t port, uint8_t on)
 }
 
 int
-rte_pmd_ixgbe_set_vf_split_drop_en(uint8_t port, uint16_t vf, uint8_t on)
+rte_pmd_ixgbe_set_vf_split_drop_en(uint16_t port, uint16_t vf, uint8_t on)
 {
 	struct ixgbe_hw *hw;
 	uint32_t reg_value;
@@ -295,7 +295,7 @@ rte_pmd_ixgbe_set_vf_split_drop_en(uint8_t port, uint16_t vf, uint8_t on)
 }
 
 int
-rte_pmd_ixgbe_set_vf_vlan_stripq(uint8_t port, uint16_t vf, uint8_t on)
+rte_pmd_ixgbe_set_vf_vlan_stripq(uint16_t port, uint16_t vf, uint8_t on)
 {
 	struct rte_eth_dev *dev;
 	struct rte_pci_device *pci_dev;
@@ -342,7 +342,7 @@ rte_pmd_ixgbe_set_vf_vlan_stripq(uint8_t port, uint16_t vf, uint8_t on)
 }
 
 int
-rte_pmd_ixgbe_set_vf_rxmode(uint8_t port, uint16_t vf,
+rte_pmd_ixgbe_set_vf_rxmode(uint16_t port, uint16_t vf,
 			    uint16_t rx_mask, uint8_t on)
 {
 	int val = 0;
@@ -389,7 +389,7 @@ rte_pmd_ixgbe_set_vf_rxmode(uint8_t port, uint16_t vf,
 }
 
 int
-rte_pmd_ixgbe_set_vf_rx(uint8_t port, uint16_t vf, uint8_t on)
+rte_pmd_ixgbe_set_vf_rx(uint16_t port, uint16_t vf, uint8_t on)
 {
 	struct rte_eth_dev *dev;
 	struct rte_pci_device *pci_dev;
@@ -439,7 +439,7 @@ rte_pmd_ixgbe_set_vf_rx(uint8_t port, uint16_t vf, uint8_t on)
 }
 
 int
-rte_pmd_ixgbe_set_vf_tx(uint8_t port, uint16_t vf, uint8_t on)
+rte_pmd_ixgbe_set_vf_tx(uint16_t port, uint16_t vf, uint8_t on)
 {
 	struct rte_eth_dev *dev;
 	struct rte_pci_device *pci_dev;
@@ -489,7 +489,7 @@ rte_pmd_ixgbe_set_vf_tx(uint8_t port, uint16_t vf, uint8_t on)
 }
 
 int
-rte_pmd_ixgbe_set_vf_vlan_filter(uint8_t port, uint16_t vlan,
+rte_pmd_ixgbe_set_vf_vlan_filter(uint16_t port, uint16_t vlan,
 				 uint64_t vf_mask, uint8_t vlan_on)
 {
 	struct rte_eth_dev *dev;
@@ -524,7 +524,7 @@ rte_pmd_ixgbe_set_vf_vlan_filter(uint8_t port, uint16_t vlan,
 }
 
 int
-rte_pmd_ixgbe_set_vf_rate_limit(uint8_t port, uint16_t vf,
+rte_pmd_ixgbe_set_vf_rate_limit(uint16_t port, uint16_t vf,
 				uint16_t tx_rate, uint64_t q_msk)
 {
 	struct rte_eth_dev *dev;
@@ -540,7 +540,7 @@ rte_pmd_ixgbe_set_vf_rate_limit(uint8_t port, uint16_t vf,
 }
 
 int
-rte_pmd_ixgbe_macsec_enable(uint8_t port, uint8_t en, uint8_t rp)
+rte_pmd_ixgbe_macsec_enable(uint16_t port, uint8_t en, uint8_t rp)
 {
 	struct ixgbe_hw *hw;
 	struct rte_eth_dev *dev;
@@ -623,7 +623,7 @@ rte_pmd_ixgbe_macsec_enable(uint8_t port, uint8_t en, uint8_t rp)
 }
 
 int
-rte_pmd_ixgbe_macsec_disable(uint8_t port)
+rte_pmd_ixgbe_macsec_disable(uint16_t port)
 {
 	struct ixgbe_hw *hw;
 	struct rte_eth_dev *dev;
@@ -687,7 +687,7 @@ rte_pmd_ixgbe_macsec_disable(uint8_t port)
 }
 
 int
-rte_pmd_ixgbe_macsec_config_txsc(uint8_t port, uint8_t *mac)
+rte_pmd_ixgbe_macsec_config_txsc(uint16_t port, uint8_t *mac)
 {
 	struct ixgbe_hw *hw;
 	struct rte_eth_dev *dev;
@@ -712,7 +712,7 @@ rte_pmd_ixgbe_macsec_config_txsc(uint8_t port, uint8_t *mac)
 }
 
 int
-rte_pmd_ixgbe_macsec_config_rxsc(uint8_t port, uint8_t *mac, uint16_t pi)
+rte_pmd_ixgbe_macsec_config_rxsc(uint16_t port, uint8_t *mac, uint16_t pi)
 {
 	struct ixgbe_hw *hw;
 	struct rte_eth_dev *dev;
@@ -738,7 +738,7 @@ rte_pmd_ixgbe_macsec_config_rxsc(uint8_t port, uint8_t *mac, uint16_t pi)
 }
 
 int
-rte_pmd_ixgbe_macsec_select_txsa(uint8_t port, uint8_t idx, uint8_t an,
+rte_pmd_ixgbe_macsec_select_txsa(uint16_t port, uint8_t idx, uint8_t an,
 				 uint32_t pn, uint8_t *key)
 {
 	struct ixgbe_hw *hw;
@@ -794,7 +794,7 @@ rte_pmd_ixgbe_macsec_select_txsa(uint8_t port, uint8_t idx, uint8_t an,
 }
 
 int
-rte_pmd_ixgbe_macsec_select_rxsa(uint8_t port, uint8_t idx, uint8_t an,
+rte_pmd_ixgbe_macsec_select_rxsa(uint16_t port, uint8_t idx, uint8_t an,
 				 uint32_t pn, uint8_t *key)
 {
 	struct ixgbe_hw *hw;
@@ -837,7 +837,7 @@ rte_pmd_ixgbe_macsec_select_rxsa(uint8_t port, uint8_t idx, uint8_t an,
 }
 
 int
-rte_pmd_ixgbe_set_tc_bw_alloc(uint8_t port,
+rte_pmd_ixgbe_set_tc_bw_alloc(uint16_t port,
 			      uint8_t tc_num,
 			      uint8_t *bw_weight)
 {
@@ -911,7 +911,7 @@ rte_pmd_ixgbe_set_tc_bw_alloc(uint8_t port,
 
 #ifdef RTE_LIBRTE_IXGBE_BYPASS
 int
-rte_pmd_ixgbe_bypass_init(uint8_t port_id)
+rte_pmd_ixgbe_bypass_init(uint16_t port_id)
 {
 	struct rte_eth_dev *dev;
 
@@ -926,7 +926,7 @@ rte_pmd_ixgbe_bypass_init(uint8_t port_id)
 }
 
 int
-rte_pmd_ixgbe_bypass_state_show(uint8_t port_id, uint32_t *state)
+rte_pmd_ixgbe_bypass_state_show(uint16_t port_id, uint32_t *state)
 {
 	struct rte_eth_dev *dev;
 
@@ -940,7 +940,7 @@ rte_pmd_ixgbe_bypass_state_show(uint8_t port_id, uint32_t *state)
 }
 
 int
-rte_pmd_ixgbe_bypass_state_set(uint8_t port_id, uint32_t *new_state)
+rte_pmd_ixgbe_bypass_state_set(uint16_t port_id, uint32_t *new_state)
 {
 	struct rte_eth_dev *dev;
 
@@ -954,7 +954,7 @@ rte_pmd_ixgbe_bypass_state_set(uint8_t port_id, uint32_t *new_state)
 }
 
 int
-rte_pmd_ixgbe_bypass_event_show(uint8_t port_id,
+rte_pmd_ixgbe_bypass_event_show(uint16_t port_id,
 				uint32_t event,
 				uint32_t *state)
 {
@@ -970,7 +970,7 @@ rte_pmd_ixgbe_bypass_event_show(uint8_t port_id,
 }
 
 int
-rte_pmd_ixgbe_bypass_event_store(uint8_t port_id,
+rte_pmd_ixgbe_bypass_event_store(uint16_t port_id,
 				 uint32_t event,
 				 uint32_t state)
 {
@@ -986,7 +986,7 @@ rte_pmd_ixgbe_bypass_event_store(uint8_t port_id,
 }
 
 int
-rte_pmd_ixgbe_bypass_wd_timeout_store(uint8_t port_id, uint32_t timeout)
+rte_pmd_ixgbe_bypass_wd_timeout_store(uint16_t port_id, uint32_t timeout)
 {
 	struct rte_eth_dev *dev;
 
@@ -1000,7 +1000,7 @@ rte_pmd_ixgbe_bypass_wd_timeout_store(uint8_t port_id, uint32_t timeout)
 }
 
 int
-rte_pmd_ixgbe_bypass_ver_show(uint8_t port_id, uint32_t *ver)
+rte_pmd_ixgbe_bypass_ver_show(uint16_t port_id, uint32_t *ver)
 {
 	struct rte_eth_dev *dev;
 
@@ -1014,7 +1014,7 @@ rte_pmd_ixgbe_bypass_ver_show(uint8_t port_id, uint32_t *ver)
 }
 
 int
-rte_pmd_ixgbe_bypass_wd_timeout_show(uint8_t port_id, uint32_t *wd_timeout)
+rte_pmd_ixgbe_bypass_wd_timeout_show(uint16_t port_id, uint32_t *wd_timeout)
 {
 	struct rte_eth_dev *dev;
 
@@ -1028,7 +1028,7 @@ rte_pmd_ixgbe_bypass_wd_timeout_show(uint8_t port_id, uint32_t *wd_timeout)
 }
 
 int
-rte_pmd_ixgbe_bypass_wd_reset(uint8_t port_id)
+rte_pmd_ixgbe_bypass_wd_reset(uint16_t port_id)
 {
 	struct rte_eth_dev *dev;
 
diff --git a/drivers/net/ixgbe/rte_pmd_ixgbe.h b/drivers/net/ixgbe/rte_pmd_ixgbe.h
index d33c285db..81b18f876 100644
--- a/drivers/net/ixgbe/rte_pmd_ixgbe.h
+++ b/drivers/net/ixgbe/rte_pmd_ixgbe.h
@@ -53,7 +53,7 @@
  *   - (-ENODEV) if *port* invalid.
  *   - (-EINVAL) if *vf* invalid.
  */
-int rte_pmd_ixgbe_ping_vf(uint8_t port, uint16_t vf);
+int rte_pmd_ixgbe_ping_vf(uint16_t port, uint16_t vf);
 
 /**
  * Set the VF MAC address.
@@ -69,7 +69,7 @@ int rte_pmd_ixgbe_ping_vf(uint8_t port, uint16_t vf);
  *   - (-ENODEV) if *port* invalid.
  *   - (-EINVAL) if *vf* or *mac_addr* is invalid.
  */
-int rte_pmd_ixgbe_set_vf_mac_addr(uint8_t port, uint16_t vf,
+int rte_pmd_ixgbe_set_vf_mac_addr(uint16_t port, uint16_t vf,
 		struct ether_addr *mac_addr);
 
 /**
@@ -87,7 +87,8 @@ int rte_pmd_ixgbe_set_vf_mac_addr(uint8_t port, uint16_t vf,
  *   - (-ENODEV) if *port* invalid.
  *   - (-EINVAL) if bad parameter.
  */
-int rte_pmd_ixgbe_set_vf_vlan_anti_spoof(uint8_t port, uint16_t vf, uint8_t on);
+int rte_pmd_ixgbe_set_vf_vlan_anti_spoof(uint16_t port, uint16_t vf,
+					 uint8_t on);
 
 /**
  * Enable/Disable VF MAC anti spoofing.
@@ -104,7 +105,7 @@ int rte_pmd_ixgbe_set_vf_vlan_anti_spoof(uint8_t port, uint16_t vf, uint8_t on);
  *   - (-ENODEV) if *port* invalid.
  *   - (-EINVAL) if bad parameter.
  */
-int rte_pmd_ixgbe_set_vf_mac_anti_spoof(uint8_t port, uint16_t vf, uint8_t on);
+int rte_pmd_ixgbe_set_vf_mac_anti_spoof(uint16_t port, uint16_t vf, uint8_t on);
 
 /**
  * Enable/Disable vf vlan insert
@@ -122,7 +123,7 @@ int rte_pmd_ixgbe_set_vf_mac_anti_spoof(uint8_t port, uint16_t vf, uint8_t on);
  *   - (-ENODEV) if *port* invalid.
  *   - (-EINVAL) if bad parameter.
  */
-int rte_pmd_ixgbe_set_vf_vlan_insert(uint8_t port, uint16_t vf,
+int rte_pmd_ixgbe_set_vf_vlan_insert(uint16_t port, uint16_t vf,
 		uint16_t vlan_id);
 
 /**
@@ -139,7 +140,7 @@ int rte_pmd_ixgbe_set_vf_vlan_insert(uint8_t port, uint16_t vf,
  *   - (-ENODEV) if *port* invalid.
  *   - (-EINVAL) if bad parameter.
  */
-int rte_pmd_ixgbe_set_tx_loopback(uint8_t port, uint8_t on);
+int rte_pmd_ixgbe_set_tx_loopback(uint16_t port, uint8_t on);
 
 /**
  * set all queues drop enable bit
@@ -155,7 +156,7 @@ int rte_pmd_ixgbe_set_tx_loopback(uint8_t port, uint8_t on);
  *   - (-ENODEV) if *port* invalid.
  *   - (-EINVAL) if bad parameter.
  */
-int rte_pmd_ixgbe_set_all_queues_drop_en(uint8_t port, uint8_t on);
+int rte_pmd_ixgbe_set_all_queues_drop_en(uint16_t port, uint8_t on);
 
 /**
  * set drop enable bit in the VF split rx control register
@@ -174,7 +175,7 @@ int rte_pmd_ixgbe_set_all_queues_drop_en(uint8_t port, uint8_t on);
  *   - (-EINVAL) if bad parameter.
  */
 
-int rte_pmd_ixgbe_set_vf_split_drop_en(uint8_t port, uint16_t vf, uint8_t on);
+int rte_pmd_ixgbe_set_vf_split_drop_en(uint16_t port, uint16_t vf, uint8_t on);
 
 /**
  * Enable/Disable vf vlan strip for all queues in a pool
@@ -194,7 +195,7 @@ int rte_pmd_ixgbe_set_vf_split_drop_en(uint8_t port, uint16_t vf, uint8_t on);
  *   - (-EINVAL) if bad parameter.
  */
 int
-rte_pmd_ixgbe_set_vf_vlan_stripq(uint8_t port, uint16_t vf, uint8_t on);
+rte_pmd_ixgbe_set_vf_vlan_stripq(uint16_t port, uint16_t vf, uint8_t on);
 
 /**
  * Enable MACsec offload.
@@ -212,7 +213,7 @@ rte_pmd_ixgbe_set_vf_vlan_stripq(uint8_t port, uint16_t vf, uint8_t on);
  *   - (-ENODEV) if *port* invalid.
  *   - (-ENOTSUP) if hardware doesn't support this feature.
  */
-int rte_pmd_ixgbe_macsec_enable(uint8_t port, uint8_t en, uint8_t rp);
+int rte_pmd_ixgbe_macsec_enable(uint16_t port, uint8_t en, uint8_t rp);
 
 /**
  * Disable MACsec offload.
@@ -224,7 +225,7 @@ int rte_pmd_ixgbe_macsec_enable(uint8_t port, uint8_t en, uint8_t rp);
  *   - (-ENODEV) if *port* invalid.
  *   - (-ENOTSUP) if hardware doesn't support this feature.
  */
-int rte_pmd_ixgbe_macsec_disable(uint8_t port);
+int rte_pmd_ixgbe_macsec_disable(uint16_t port);
 
 /**
  * Configure Tx SC (Secure Connection).
@@ -238,7 +239,7 @@ int rte_pmd_ixgbe_macsec_disable(uint8_t port);
  *   - (-ENODEV) if *port* invalid.
  *   - (-ENOTSUP) if hardware doesn't support this feature.
  */
-int rte_pmd_ixgbe_macsec_config_txsc(uint8_t port, uint8_t *mac);
+int rte_pmd_ixgbe_macsec_config_txsc(uint16_t port, uint8_t *mac);
 
 /**
  * Configure Rx SC (Secure Connection).
@@ -254,7 +255,7 @@ int rte_pmd_ixgbe_macsec_config_txsc(uint8_t port, uint8_t *mac);
  *   - (-ENODEV) if *port* invalid.
  *   - (-ENOTSUP) if hardware doesn't support this feature.
  */
-int rte_pmd_ixgbe_macsec_config_rxsc(uint8_t port, uint8_t *mac, uint16_t pi);
+int rte_pmd_ixgbe_macsec_config_rxsc(uint16_t port, uint8_t *mac, uint16_t pi);
 
 /**
  * Enable Tx SA (Secure Association).
@@ -275,7 +276,7 @@ int rte_pmd_ixgbe_macsec_config_rxsc(uint8_t port, uint8_t *mac, uint16_t pi);
  *   - (-ENOTSUP) if hardware doesn't support this feature.
  *   - (-EINVAL) if bad parameter.
  */
-int rte_pmd_ixgbe_macsec_select_txsa(uint8_t port, uint8_t idx, uint8_t an,
+int rte_pmd_ixgbe_macsec_select_txsa(uint16_t port, uint8_t idx, uint8_t an,
 		uint32_t pn, uint8_t *key);
 
 /**
@@ -297,7 +298,7 @@ int rte_pmd_ixgbe_macsec_select_txsa(uint8_t port, uint8_t idx, uint8_t an,
  *   - (-ENOTSUP) if hardware doesn't support this feature.
  *   - (-EINVAL) if bad parameter.
  */
-int rte_pmd_ixgbe_macsec_select_rxsa(uint8_t port, uint8_t idx, uint8_t an,
+int rte_pmd_ixgbe_macsec_select_rxsa(uint16_t port, uint8_t idx, uint8_t an,
 		uint32_t pn, uint8_t *key);
 
 /**
@@ -323,7 +324,8 @@ int rte_pmd_ixgbe_macsec_select_rxsa(uint8_t port, uint8_t idx, uint8_t an,
 *   - (-EINVAL) if bad parameter.
 */
 int
-rte_pmd_ixgbe_set_vf_rxmode(uint8_t port, uint16_t vf, uint16_t rx_mask, uint8_t on);
+rte_pmd_ixgbe_set_vf_rxmode(uint16_t port, uint16_t vf, uint16_t rx_mask,
+			     uint8_t on);
 
 /**
 * Enable or disable a VF traffic receive of an Ethernet device.
@@ -342,7 +344,7 @@ rte_pmd_ixgbe_set_vf_rxmode(uint8_t port, uint16_t vf, uint16_t rx_mask, uint8_t
 *   - (-EINVAL) if bad parameter.
 */
 int
-rte_pmd_ixgbe_set_vf_rx(uint8_t port, uint16_t vf, uint8_t on);
+rte_pmd_ixgbe_set_vf_rx(uint16_t port, uint16_t vf, uint8_t on);
 
 /**
 * Enable or disable a VF traffic transmit of the Ethernet device.
@@ -361,7 +363,7 @@ rte_pmd_ixgbe_set_vf_rx(uint8_t port, uint16_t vf, uint8_t on);
 *   - (-EINVAL) if bad parameter.
 */
 int
-rte_pmd_ixgbe_set_vf_tx(uint8_t port, uint16_t vf, uint8_t on);
+rte_pmd_ixgbe_set_vf_tx(uint16_t port, uint16_t vf, uint8_t on);
 
 /**
 * Enable/Disable hardware VF VLAN filtering by an Ethernet device of
@@ -383,7 +385,8 @@ rte_pmd_ixgbe_set_vf_tx(uint8_t port, uint16_t vf, uint8_t on);
 *   - (-EINVAL) if bad parameter.
 */
 int
-rte_pmd_ixgbe_set_vf_vlan_filter(uint8_t port, uint16_t vlan, uint64_t vf_mask, uint8_t vlan_on);
+rte_pmd_ixgbe_set_vf_vlan_filter(uint16_t port, uint16_t vlan,
+				 uint64_t vf_mask, uint8_t vlan_on);
 
 /**
  * Set the rate limitation for a vf on an Ethernet device.
@@ -402,7 +405,8 @@ rte_pmd_ixgbe_set_vf_vlan_filter(uint8_t port, uint16_t vlan, uint64_t vf_mask,
  *   - (-ENODEV) if *port_id* invalid.
  *   - (-EINVAL) if bad parameter.
  */
-int rte_pmd_ixgbe_set_vf_rate_limit(uint8_t port, uint16_t vf, uint16_t tx_rate, uint64_t q_msk);
+int rte_pmd_ixgbe_set_vf_rate_limit(uint16_t port, uint16_t vf,
+				     uint16_t tx_rate, uint64_t q_msk);
 
 /**
  * Set all the TCs' bandwidth weight.
@@ -423,7 +427,7 @@ int rte_pmd_ixgbe_set_vf_rate_limit(uint8_t port, uint16_t vf, uint16_t tx_rate,
  *   - (-EINVAL) if bad parameter.
  *   - (-ENOTSUP) not supported by firmware.
  */
-int rte_pmd_ixgbe_set_tc_bw_alloc(uint8_t port,
+int rte_pmd_ixgbe_set_tc_bw_alloc(uint16_t port,
 				  uint8_t tc_num,
 				  uint8_t *bw_weight);
 
@@ -439,7 +443,7 @@ int rte_pmd_ixgbe_set_tc_bw_alloc(uint8_t port,
  *   - (-ENOTSUP) if hardware doesn't support.
  *   - (-EINVAL) if bad parameter.
  */
-int rte_pmd_ixgbe_bypass_init(uint8_t port);
+int rte_pmd_ixgbe_bypass_init(uint16_t port);
 
 /**
  * Return bypass state.
@@ -456,7 +460,7 @@ int rte_pmd_ixgbe_bypass_init(uint8_t port);
  *   - (-ENOTSUP) if hardware doesn't support.
  *   - (-EINVAL) if bad parameter.
  */
-int rte_pmd_ixgbe_bypass_state_show(uint8_t port, uint32_t *state);
+int rte_pmd_ixgbe_bypass_state_show(uint16_t port, uint32_t *state);
 
 /**
  * Set bypass state
@@ -473,7 +477,7 @@ int rte_pmd_ixgbe_bypass_state_show(uint8_t port, uint32_t *state);
  *   - (-ENOTSUP) if hardware doesn't support.
  *   - (-EINVAL) if bad parameter.
  */
-int rte_pmd_ixgbe_bypass_state_set(uint8_t port, uint32_t *new_state);
+int rte_pmd_ixgbe_bypass_state_set(uint16_t port, uint32_t *new_state);
 
 /**
  * Return bypass state when given event occurs.
@@ -497,7 +501,7 @@ int rte_pmd_ixgbe_bypass_state_set(uint8_t port, uint32_t *new_state);
  *   - (-ENOTSUP) if hardware doesn't support.
  *   - (-EINVAL) if bad parameter.
  */
-int rte_pmd_ixgbe_bypass_event_show(uint8_t port,
+int rte_pmd_ixgbe_bypass_event_show(uint16_t port,
 				    uint32_t event,
 				    uint32_t *state);
 
@@ -523,7 +527,7 @@ int rte_pmd_ixgbe_bypass_event_show(uint8_t port,
  *   - (-ENOTSUP) if hardware doesn't support.
  *   - (-EINVAL) if bad parameter.
  */
-int rte_pmd_ixgbe_bypass_event_store(uint8_t port,
+int rte_pmd_ixgbe_bypass_event_store(uint16_t port,
 				     uint32_t event,
 				     uint32_t state);
 
@@ -547,7 +551,7 @@ int rte_pmd_ixgbe_bypass_event_store(uint8_t port,
  *   - (-ENOTSUP) if hardware doesn't support.
  *   - (-EINVAL) if bad parameter.
  */
-int rte_pmd_ixgbe_bypass_wd_timeout_store(uint8_t port, uint32_t timeout);
+int rte_pmd_ixgbe_bypass_wd_timeout_store(uint16_t port, uint32_t timeout);
 
 /**
  * Get bypass firmware version.
@@ -561,7 +565,7 @@ int rte_pmd_ixgbe_bypass_wd_timeout_store(uint8_t port, uint32_t timeout);
  *   - (-ENOTSUP) if hardware doesn't support.
  *   - (-EINVAL) if bad parameter.
  */
-int rte_pmd_ixgbe_bypass_ver_show(uint8_t port, uint32_t *ver);
+int rte_pmd_ixgbe_bypass_ver_show(uint16_t port, uint32_t *ver);
 
 /**
  * Return bypass watchdog timeout in seconds
@@ -583,7 +587,7 @@ int rte_pmd_ixgbe_bypass_ver_show(uint8_t port, uint32_t *ver);
  *   - (-ENOTSUP) if hardware doesn't support.
  *   - (-EINVAL) if bad parameter.
  */
-int rte_pmd_ixgbe_bypass_wd_timeout_show(uint8_t port, uint32_t *wd_timeout);
+int rte_pmd_ixgbe_bypass_wd_timeout_show(uint16_t port, uint32_t *wd_timeout);
 
 /**
  * Reset bypass watchdog timer
@@ -595,7 +599,7 @@ int rte_pmd_ixgbe_bypass_wd_timeout_show(uint8_t port, uint32_t *wd_timeout);
  *   - (-ENOTSUP) if hardware doesn't support.
  *   - (-EINVAL) if bad parameter.
  */
-int rte_pmd_ixgbe_bypass_wd_reset(uint8_t port);
+int rte_pmd_ixgbe_bypass_wd_reset(uint16_t port);
 
 
 /**
diff --git a/drivers/net/mlx5/mlx5_rxtx.h b/drivers/net/mlx5/mlx5_rxtx.h
index 7de1d1086..238a64f43 100644
--- a/drivers/net/mlx5/mlx5_rxtx.h
+++ b/drivers/net/mlx5/mlx5_rxtx.h
@@ -112,14 +112,14 @@ struct rxq {
 	unsigned int sges_n:2; /* Log 2 of SGEs (max buffers per packet). */
 	unsigned int cqe_n:4; /* Log 2 of CQ elements. */
 	unsigned int elts_n:4; /* Log 2 of Mbufs. */
-	unsigned int port_id:8;
 	unsigned int rss_hash:1; /* RSS hash result is enabled. */
 	unsigned int mark:1; /* Marked flow available on the queue. */
 	unsigned int pending_err:1; /* CQE error needs to be handled. */
 	unsigned int trim_elts:1; /* Whether elts needs clean-up. */
-	unsigned int :6; /* Remaining bits. */
+	unsigned int :14; /* Remaining bits. */
 	volatile uint32_t *rq_db;
 	volatile uint32_t *cq_db;
+	uint16_t port_id;
 	uint16_t rq_ci;
 	uint16_t rq_pi;
 	uint16_t cq_ci;
diff --git a/drivers/net/nfp/nfp_net.c b/drivers/net/nfp/nfp_net.c
index 92b03c4cb..f1b968fc2 100644
--- a/drivers/net/nfp/nfp_net.c
+++ b/drivers/net/nfp/nfp_net.c
@@ -1240,12 +1240,12 @@ nfp_net_dev_link_status_print(struct rte_eth_dev *dev)
 	nfp_net_dev_atomic_read_link_status(dev, &link);
 	if (link.link_status)
 		RTE_LOG(INFO, PMD, "Port %d: Link Up - speed %u Mbps - %s\n",
-			(int)(dev->data->port_id), (unsigned)link.link_speed,
+			dev->data->port_id, link.link_speed,
 			link.link_duplex == ETH_LINK_FULL_DUPLEX
 			? "full-duplex" : "half-duplex");
 	else
 		RTE_LOG(INFO, PMD, " Port %d: Link Down\n",
-			(int)(dev->data->port_id));
+			dev->data->port_id);
 
 	RTE_LOG(INFO, PMD, "PCI Address: %04d:%02d:%02d:%d\n",
 		pci_dev->addr.domain, pci_dev->addr.bus,
@@ -1549,7 +1549,7 @@ nfp_net_tx_queue_setup(struct rte_eth_dev *dev, uint16_t queue_idx,
 			"tx_free_thresh must be less than the number of TX "
 			"descriptors. (tx_free_thresh=%u port=%d "
 			"queue=%d)\n", (unsigned int)tx_free_thresh,
-			(int)dev->data->port_id, (int)queue_idx);
+			dev->data->port_id, (int)queue_idx);
 		return -(EINVAL);
 	}
 
@@ -1847,9 +1847,9 @@ nfp_net_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts, uint16_t nb_pkts)
 		 */
 		new_mb = rte_pktmbuf_alloc(rxq->mem_pool);
 		if (unlikely(new_mb == NULL)) {
-			RTE_LOG_DP(DEBUG, PMD, "RX mbuf alloc failed port_id=%u "
-				"queue_id=%u\n", (unsigned)rxq->port_id,
-				(unsigned)rxq->qidx);
+			RTE_LOG_DP(DEBUG, PMD,
+			"RX mbuf alloc failed port_id=%u queue_id=%u\n",
+				rxq->port_id, (unsigned int)rxq->qidx);
 			nfp_net_mbuf_alloc_failed(rxq);
 			break;
 		}
@@ -1933,7 +1933,7 @@ nfp_net_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts, uint16_t nb_pkts)
 		return nb_hold;
 
 	PMD_RX_LOG(DEBUG, "RX  port_id=%u queue_id=%u, %d packets received\n",
-		   (unsigned)rxq->port_id, (unsigned)rxq->qidx, nb_hold);
+		   rxq->port_id, (unsigned int)rxq->qidx, nb_hold);
 
 	nb_hold += rxq->nb_rx_hold;
 
@@ -1944,7 +1944,7 @@ nfp_net_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts, uint16_t nb_pkts)
 	rte_wmb();
 	if (nb_hold > rxq->rx_free_thresh) {
 		PMD_RX_LOG(DEBUG, "port=%u queue=%u nb_hold=%u avail=%u\n",
-			   (unsigned)rxq->port_id, (unsigned)rxq->qidx,
+			   rxq->port_id, (unsigned int)rxq->qidx,
 			   (unsigned)nb_hold, (unsigned)avail);
 		nfp_qcp_ptr_add(rxq->qcp_fl, NFP_QCP_WRITE_PTR, nb_hold);
 		nb_hold = 0;
diff --git a/drivers/net/nfp/nfp_net_pmd.h b/drivers/net/nfp/nfp_net_pmd.h
index eec56bc1c..828d0d35b 100644
--- a/drivers/net/nfp/nfp_net_pmd.h
+++ b/drivers/net/nfp/nfp_net_pmd.h
@@ -250,7 +250,7 @@ struct nfp_net_txq {
 	uint32_t tx_hthresh;   /* not used by now. Future? */
 	uint32_t tx_wthresh;   /* not used by now. Future? */
 	uint32_t txq_flags;    /* not used by now. Future? */
-	uint8_t  port_id;
+	uint16_t port_id;
 	int qidx;
 	int tx_qcidx;
 	__le64 dma;
diff --git a/drivers/net/null/Makefile b/drivers/net/null/Makefile
index 77810bced..fdd7c5813 100644
--- a/drivers/net/null/Makefile
+++ b/drivers/net/null/Makefile
@@ -41,7 +41,7 @@ CFLAGS += $(WERROR_FLAGS)
 
 EXPORT_MAP := rte_pmd_null_version.map
 
-LIBABIVER := 2
+LIBABIVER := 3
 
 #
 # all source are stored in SRCS-y
diff --git a/drivers/net/null/rte_eth_null.c b/drivers/net/null/rte_eth_null.c
index 5aef0591e..fa9313dec 100644
--- a/drivers/net/null/rte_eth_null.c
+++ b/drivers/net/null/rte_eth_null.c
@@ -68,7 +68,7 @@ struct null_queue {
 struct pmd_internals {
 	unsigned packet_size;
 	unsigned packet_copy;
-	uint8_t port_id;
+	uint16_t port_id;
 
 	struct null_queue rx_null_queues[RTE_MAX_QUEUES_PER_PORT];
 	struct null_queue tx_null_queues[RTE_MAX_QUEUES_PER_PORT];
diff --git a/drivers/net/pcap/Makefile b/drivers/net/pcap/Makefile
index 7ebd0bef2..f731b126e 100644
--- a/drivers/net/pcap/Makefile
+++ b/drivers/net/pcap/Makefile
@@ -43,7 +43,7 @@ LDLIBS += -lpcap
 
 EXPORT_MAP := rte_pmd_pcap_version.map
 
-LIBABIVER := 1
+LIBABIVER := 2
 
 #
 # all source are stored in SRCS-y
diff --git a/drivers/net/pcap/rte_eth_pcap.c b/drivers/net/pcap/rte_eth_pcap.c
index defb3b419..b51f16cbd 100644
--- a/drivers/net/pcap/rte_eth_pcap.c
+++ b/drivers/net/pcap/rte_eth_pcap.c
@@ -75,7 +75,7 @@ struct queue_stat {
 
 struct pcap_rx_queue {
 	pcap_t *pcap;
-	uint8_t in_port;
+	uint16_t in_port;
 	struct rte_mempool *mb_pool;
 	struct queue_stat rx_stat;
 	char name[PATH_MAX];
diff --git a/drivers/net/qede/qede_if.h b/drivers/net/qede/qede_if.h
index 9864bb448..96f0d351d 100644
--- a/drivers/net/qede/qede_if.h
+++ b/drivers/net/qede/qede_if.h
@@ -97,7 +97,7 @@ struct qed_link_output {
 	uint32_t speed;		/* In Mb/s */
 	uint32_t adv_speed;	/* Speed mask */
 	uint8_t duplex;		/* In DUPLEX defs */
-	uint8_t port;		/* In PORT defs */
+	uint16_t port;		/* In PORT defs */
 	bool autoneg;
 	uint32_t pause_config;
 };
diff --git a/drivers/net/ring/rte_eth_ring.c b/drivers/net/ring/rte_eth_ring.c
index 464d3d384..e3fa7b0e2 100644
--- a/drivers/net/ring/rte_eth_ring.c
+++ b/drivers/net/ring/rte_eth_ring.c
@@ -394,7 +394,7 @@ rte_eth_from_rings(const char *name, struct rte_ring *const rx_queues[],
 	};
 	char args_str[32] = { 0 };
 	char ring_name[32] = { 0 };
-	uint8_t port_id = RTE_MAX_ETHPORTS;
+	uint16_t port_id = RTE_MAX_ETHPORTS;
 	int ret;
 
 	/* do some parameter checking */
diff --git a/drivers/net/szedata2/rte_eth_szedata2.c b/drivers/net/szedata2/rte_eth_szedata2.c
index 9c0d57cc1..d141acf0e 100644
--- a/drivers/net/szedata2/rte_eth_szedata2.c
+++ b/drivers/net/szedata2/rte_eth_szedata2.c
@@ -71,7 +71,7 @@
 struct szedata2_rx_queue {
 	struct szedata *sze;
 	uint8_t rx_channel;
-	uint8_t in_port;
+	uint16_t in_port;
 	struct rte_mempool *mb_pool;
 	volatile uint64_t rx_pkts;
 	volatile uint64_t rx_bytes;
diff --git a/drivers/net/thunderx/nicvf_struct.h b/drivers/net/thunderx/nicvf_struct.h
index 4ee6c3bb0..e54a96f8e 100644
--- a/drivers/net/thunderx/nicvf_struct.h
+++ b/drivers/net/thunderx/nicvf_struct.h
@@ -100,7 +100,7 @@ struct nicvf_rxq {
 	uint16_t queue_id;
 	uint16_t precharge_cnt;
 	uint8_t rx_drop_en;
-	uint8_t  port_id;
+	uint16_t port_id;
 	uint8_t  rbptr_offset;
 } __rte_cache_aligned;
 
diff --git a/drivers/net/vhost/Makefile b/drivers/net/vhost/Makefile
index 3ba8ad64f..258a917c7 100644
--- a/drivers/net/vhost/Makefile
+++ b/drivers/net/vhost/Makefile
@@ -43,7 +43,7 @@ CFLAGS += $(WERROR_FLAGS)
 
 EXPORT_MAP := rte_pmd_vhost_version.map
 
-LIBABIVER := 1
+LIBABIVER := 2
 
 #
 # all source are stored in SRCS-y
diff --git a/drivers/net/vhost/rte_eth_vhost.c b/drivers/net/vhost/rte_eth_vhost.c
index 0dac5e60e..04179b4db 100644
--- a/drivers/net/vhost/rte_eth_vhost.c
+++ b/drivers/net/vhost/rte_eth_vhost.c
@@ -105,7 +105,7 @@ struct vhost_queue {
 	rte_atomic32_t while_queuing;
 	struct pmd_internal *internal;
 	struct rte_mempool *mb_pool;
-	uint8_t port;
+	uint16_t port;
 	uint16_t virtqueue_id;
 	struct vhost_stats stats;
 };
@@ -705,7 +705,7 @@ static struct vhost_device_ops vhost_ops = {
 };
 
 int
-rte_eth_vhost_get_queue_event(uint8_t port_id,
+rte_eth_vhost_get_queue_event(uint16_t port_id,
 		struct rte_eth_vhost_queue_event *event)
 {
 	struct rte_vhost_vring_state *state;
@@ -742,7 +742,7 @@ rte_eth_vhost_get_queue_event(uint8_t port_id,
 }
 
 int
-rte_eth_vhost_get_vid_from_port_id(uint8_t port_id)
+rte_eth_vhost_get_vid_from_port_id(uint16_t port_id)
 {
 	struct internal_list *list;
 	struct rte_eth_dev *eth_dev;
diff --git a/drivers/net/vhost/rte_eth_vhost.h b/drivers/net/vhost/rte_eth_vhost.h
index 39ca77197..948f3c810 100644
--- a/drivers/net/vhost/rte_eth_vhost.h
+++ b/drivers/net/vhost/rte_eth_vhost.h
@@ -69,7 +69,7 @@ struct rte_eth_vhost_queue_event {
  *  - On success, zero.
  *  - On failure, a negative value.
  */
-int rte_eth_vhost_get_queue_event(uint8_t port_id,
+int rte_eth_vhost_get_queue_event(uint16_t port_id,
 		struct rte_eth_vhost_queue_event *event);
 
 /**
@@ -79,7 +79,7 @@ int rte_eth_vhost_get_queue_event(uint8_t port_id,
  *  - On success, the 'vid' associated with 'port_id'.
  *  - On failure, a negative value.
  */
-int rte_eth_vhost_get_vid_from_port_id(uint8_t port_id);
+int rte_eth_vhost_get_vid_from_port_id(uint16_t port_id);
 
 #ifdef __cplusplus
 }
diff --git a/drivers/net/virtio/Makefile b/drivers/net/virtio/Makefile
index b21b87814..ad4b695a3 100644
--- a/drivers/net/virtio/Makefile
+++ b/drivers/net/virtio/Makefile
@@ -41,7 +41,7 @@ CFLAGS += $(WERROR_FLAGS)
 
 EXPORT_MAP := rte_pmd_virtio_version.map
 
-LIBABIVER := 1
+LIBABIVER := 2
 
 #
 # all source are stored in SRCS-y
diff --git a/drivers/net/virtio/virtio_pci.h b/drivers/net/virtio/virtio_pci.h
index 18caebdd7..330ee94be 100644
--- a/drivers/net/virtio/virtio_pci.h
+++ b/drivers/net/virtio/virtio_pci.h
@@ -260,7 +260,7 @@ struct virtio_hw {
 	uint8_t	    use_msix;
 	uint8_t     modern;
 	uint8_t     use_simple_rxtx;
-	uint8_t     port_id;
+	uint16_t    port_id;
 	uint8_t     mac_addr[ETHER_ADDR_LEN];
 	uint32_t    notify_off_multiplier;
 	uint8_t     *isr;
diff --git a/drivers/net/virtio/virtio_rxtx.h b/drivers/net/virtio/virtio_rxtx.h
index 28f82d6a8..198b2d8fb 100644
--- a/drivers/net/virtio/virtio_rxtx.h
+++ b/drivers/net/virtio/virtio_rxtx.h
@@ -54,7 +54,7 @@ struct virtnet_rx {
 	struct rte_mempool *mpool; /**< mempool for mbuf allocation */
 
 	uint16_t queue_id;   /**< DPDK queue index. */
-	uint8_t port_id;     /**< Device port identifier. */
+	uint16_t port_id;     /**< Device port identifier. */
 
 	/* Statistics */
 	struct virtnet_stats stats;
@@ -69,7 +69,7 @@ struct virtnet_tx {
 	phys_addr_t virtio_net_hdr_mem;  /**< hdr for each xmit packet */
 
 	uint16_t    queue_id;            /**< DPDK queue index. */
-	uint8_t     port_id;             /**< Device port identifier. */
+	uint16_t    port_id;             /**< Device port identifier. */
 
 	/* Statistics */
 	struct virtnet_stats stats;
@@ -82,7 +82,7 @@ struct virtnet_ctl {
 	/**< memzone to populate hdr. */
 	const struct rte_memzone *virtio_net_hdr_mz;
 	phys_addr_t virtio_net_hdr_mem; /**< hdr for each xmit packet */
-	uint8_t port_id;                /**< Device port identifier. */
+	uint16_t port_id;               /**< Device port identifier. */
 	const struct rte_memzone *mz;   /**< mem zone to populate RX ring. */
 };
 
diff --git a/drivers/net/vmxnet3/vmxnet3_ring.h b/drivers/net/vmxnet3/vmxnet3_ring.h
index d2e8323ba..a6fa93ac7 100644
--- a/drivers/net/vmxnet3/vmxnet3_ring.h
+++ b/drivers/net/vmxnet3/vmxnet3_ring.h
@@ -144,7 +144,7 @@ typedef struct vmxnet3_tx_queue {
 	const struct rte_memzone     *mz;
 	bool                         stopped;
 	uint16_t                     queue_id;      /**< Device TX queue index. */
-	uint8_t                      port_id;       /**< Device port identifier. */
+	uint16_t                     port_id;       /**< Device port identifier. */
 	uint16_t		     txdata_desc_size;
 } vmxnet3_tx_queue_t;
 
@@ -179,7 +179,7 @@ typedef struct vmxnet3_rx_queue {
 	const struct rte_memzone    *mz;
 	bool                        stopped;
 	uint16_t                    queue_id;      /**< Device RX queue index. */
-	uint8_t                     port_id;       /**< Device port identifier. */
+	uint16_t                    port_id;       /**< Device port identifier. */
 } vmxnet3_rx_queue_t;
 
 #endif /* _VMXNET3_RING_H_ */
diff --git a/lib/librte_bitratestats/Makefile b/lib/librte_bitratestats/Makefile
index 58a20ea09..a079cced7 100644
--- a/lib/librte_bitratestats/Makefile
+++ b/lib/librte_bitratestats/Makefile
@@ -38,7 +38,7 @@ CFLAGS += $(WERROR_FLAGS) -I$(SRCDIR) -O3
 
 EXPORT_MAP := rte_bitratestats_version.map
 
-LIBABIVER := 1
+LIBABIVER := 2
 
 # all source are stored in SRCS-y
 SRCS-$(CONFIG_RTE_LIBRTE_BITRATE) := rte_bitrate.c
diff --git a/lib/librte_bitratestats/rte_bitrate.c b/lib/librte_bitratestats/rte_bitrate.c
index 3ceb35166..f373697a7 100644
--- a/lib/librte_bitratestats/rte_bitrate.c
+++ b/lib/librte_bitratestats/rte_bitrate.c
@@ -84,7 +84,7 @@ rte_stats_bitrate_reg(struct rte_stats_bitrates *bitrate_data)
 
 int
 rte_stats_bitrate_calc(struct rte_stats_bitrates *bitrate_data,
-	uint8_t port_id)
+			uint16_t port_id)
 {
 	struct rte_stats_bitrate *port_data;
 	struct rte_eth_stats eth_stats;
diff --git a/lib/librte_bitratestats/rte_bitrate.h b/lib/librte_bitratestats/rte_bitrate.h
index 15fc270a3..16467221b 100644
--- a/lib/librte_bitratestats/rte_bitrate.h
+++ b/lib/librte_bitratestats/rte_bitrate.h
@@ -85,7 +85,7 @@ int rte_stats_bitrate_reg(struct rte_stats_bitrates *bitrate_data);
  *  - Negative value on error
  */
 int rte_stats_bitrate_calc(struct rte_stats_bitrates *bitrate_data,
-	uint8_t port_id);
+			   uint16_t port_id);
 
 #ifdef __cplusplus
 }
diff --git a/lib/librte_ether/Makefile b/lib/librte_ether/Makefile
index 27d9766a8..0bacc8b3f 100644
--- a/lib/librte_ether/Makefile
+++ b/lib/librte_ether/Makefile
@@ -41,7 +41,7 @@ CFLAGS += $(WERROR_FLAGS)
 
 EXPORT_MAP := rte_ethdev_version.map
 
-LIBABIVER := 6
+LIBABIVER := 7
 
 SRCS-y += rte_ethdev.c
 SRCS-y += rte_flow.c
diff --git a/lib/librte_ether/rte_ethdev.c b/lib/librte_ether/rte_ethdev.c
index a88916f2a..e756dbc46 100644
--- a/lib/librte_ether/rte_ethdev.c
+++ b/lib/librte_ether/rte_ethdev.c
@@ -138,8 +138,8 @@ enum {
 	STAT_QMAP_RX
 };
 
-uint8_t
-rte_eth_find_next(uint8_t port_id)
+uint16_t
+rte_eth_find_next(uint16_t port_id)
 {
 	while (port_id < RTE_MAX_ETHPORTS &&
 	       rte_eth_devices[port_id].state != RTE_ETH_DEV_ATTACHED)
@@ -187,7 +187,7 @@ rte_eth_dev_allocated(const char *name)
 	return NULL;
 }
 
-static uint8_t
+static uint16_t
 rte_eth_dev_find_free_port(void)
 {
 	unsigned i;
@@ -200,7 +200,7 @@ rte_eth_dev_find_free_port(void)
 }
 
 static struct rte_eth_dev *
-eth_dev_get(uint8_t port_id)
+eth_dev_get(uint16_t port_id)
 {
 	struct rte_eth_dev *eth_dev = &rte_eth_devices[port_id];
 
@@ -216,7 +216,7 @@ eth_dev_get(uint8_t port_id)
 struct rte_eth_dev *
 rte_eth_dev_allocate(const char *name)
 {
-	uint8_t port_id;
+	uint16_t port_id;
 	struct rte_eth_dev *eth_dev;
 
 	port_id = rte_eth_dev_find_free_port();
@@ -251,7 +251,7 @@ rte_eth_dev_allocate(const char *name)
 struct rte_eth_dev *
 rte_eth_dev_attach_secondary(const char *name)
 {
-	uint8_t i;
+	uint16_t i;
 	struct rte_eth_dev *eth_dev;
 
 	if (rte_eth_dev_data == NULL)
@@ -285,7 +285,7 @@ rte_eth_dev_release_port(struct rte_eth_dev *eth_dev)
 }
 
 int
-rte_eth_dev_is_valid_port(uint8_t port_id)
+rte_eth_dev_is_valid_port(uint16_t port_id)
 {
 	if (port_id >= RTE_MAX_ETHPORTS ||
 	    (rte_eth_devices[port_id].state != RTE_ETH_DEV_ATTACHED &&
@@ -296,17 +296,17 @@ rte_eth_dev_is_valid_port(uint8_t port_id)
 }
 
 int
-rte_eth_dev_socket_id(uint8_t port_id)
+rte_eth_dev_socket_id(uint16_t port_id)
 {
 	RTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -1);
 	return rte_eth_devices[port_id].data->numa_node;
 }
 
-uint8_t
+uint16_t
 rte_eth_dev_count(void)
 {
-	uint8_t p;
-	uint8_t count;
+	uint16_t p;
+	uint16_t count;
 
 	count = 0;
 
@@ -317,7 +317,7 @@ rte_eth_dev_count(void)
 }
 
 int
-rte_eth_dev_get_name_by_port(uint8_t port_id, char *name)
+rte_eth_dev_get_name_by_port(uint16_t port_id, char *name)
 {
 	const char *tmp;
 
@@ -336,7 +336,7 @@ rte_eth_dev_get_name_by_port(uint8_t port_id, char *name)
 }
 
 int
-rte_eth_dev_get_port_by_name(const char *name, uint8_t *port_id)
+rte_eth_dev_get_port_by_name(const char *name, uint16_t *port_id)
 {
 	int ret;
 	int i;
@@ -361,7 +361,7 @@ rte_eth_dev_get_port_by_name(const char *name, uint8_t *port_id)
 }
 
 static int
-rte_eth_dev_is_detachable(uint8_t port_id)
+rte_eth_dev_is_detachable(uint16_t port_id)
 {
 	uint32_t dev_flags;
 
@@ -377,7 +377,7 @@ rte_eth_dev_is_detachable(uint8_t port_id)
 
 /* attach the new device, then store port_id of the device */
 int
-rte_eth_dev_attach(const char *devargs, uint8_t *port_id)
+rte_eth_dev_attach(const char *devargs, uint16_t *port_id)
 {
 	int ret = -1;
 	int current = rte_eth_dev_count();
@@ -423,7 +423,7 @@ rte_eth_dev_attach(const char *devargs, uint8_t *port_id)
 
 /* detach the device, then store the name of the device */
 int
-rte_eth_dev_detach(uint8_t port_id, char *name)
+rte_eth_dev_detach(uint16_t port_id, char *name)
 {
 	int ret = -1;
 
@@ -501,7 +501,7 @@ rte_eth_dev_rx_queue_config(struct rte_eth_dev *dev, uint16_t nb_queues)
 }
 
 int
-rte_eth_dev_rx_queue_start(uint8_t port_id, uint16_t rx_queue_id)
+rte_eth_dev_rx_queue_start(uint16_t port_id, uint16_t rx_queue_id)
 {
 	struct rte_eth_dev *dev;
 
@@ -527,7 +527,7 @@ rte_eth_dev_rx_queue_start(uint8_t port_id, uint16_t rx_queue_id)
 }
 
 int
-rte_eth_dev_rx_queue_stop(uint8_t port_id, uint16_t rx_queue_id)
+rte_eth_dev_rx_queue_stop(uint16_t port_id, uint16_t rx_queue_id)
 {
 	struct rte_eth_dev *dev;
 
@@ -553,7 +553,7 @@ rte_eth_dev_rx_queue_stop(uint8_t port_id, uint16_t rx_queue_id)
 }
 
 int
-rte_eth_dev_tx_queue_start(uint8_t port_id, uint16_t tx_queue_id)
+rte_eth_dev_tx_queue_start(uint16_t port_id, uint16_t tx_queue_id)
 {
 	struct rte_eth_dev *dev;
 
@@ -579,7 +579,7 @@ rte_eth_dev_tx_queue_start(uint8_t port_id, uint16_t tx_queue_id)
 }
 
 int
-rte_eth_dev_tx_queue_stop(uint8_t port_id, uint16_t tx_queue_id)
+rte_eth_dev_tx_queue_stop(uint16_t port_id, uint16_t tx_queue_id)
 {
 	struct rte_eth_dev *dev;
 
@@ -688,7 +688,7 @@ rte_eth_speed_bitflag(uint32_t speed, int duplex)
 }
 
 int
-rte_eth_dev_configure(uint8_t port_id, uint16_t nb_rx_q, uint16_t nb_tx_q,
+rte_eth_dev_configure(uint16_t port_id, uint16_t nb_rx_q, uint16_t nb_tx_q,
 		      const struct rte_eth_conf *dev_conf)
 {
 	struct rte_eth_dev *dev;
@@ -839,7 +839,7 @@ _rte_eth_dev_reset(struct rte_eth_dev *dev)
 }
 
 static void
-rte_eth_dev_config_restore(uint8_t port_id)
+rte_eth_dev_config_restore(uint16_t port_id)
 {
 	struct rte_eth_dev *dev;
 	struct rte_eth_dev_info dev_info;
@@ -894,7 +894,7 @@ rte_eth_dev_config_restore(uint8_t port_id)
 }
 
 int
-rte_eth_dev_start(uint8_t port_id)
+rte_eth_dev_start(uint16_t port_id)
 {
 	struct rte_eth_dev *dev;
 	int diag;
@@ -906,7 +906,7 @@ rte_eth_dev_start(uint8_t port_id)
 	RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->dev_start, -ENOTSUP);
 
 	if (dev->data->dev_started != 0) {
-		RTE_PMD_DEBUG_TRACE("Device with port_id=%" PRIu8
+		RTE_PMD_DEBUG_TRACE("Device with port_id=%" PRIu16
 			" already started\n",
 			port_id);
 		return 0;
@@ -928,7 +928,7 @@ rte_eth_dev_start(uint8_t port_id)
 }
 
 void
-rte_eth_dev_stop(uint8_t port_id)
+rte_eth_dev_stop(uint16_t port_id)
 {
 	struct rte_eth_dev *dev;
 
@@ -938,7 +938,7 @@ rte_eth_dev_stop(uint8_t port_id)
 	RTE_FUNC_PTR_OR_RET(*dev->dev_ops->dev_stop);
 
 	if (dev->data->dev_started == 0) {
-		RTE_PMD_DEBUG_TRACE("Device with port_id=%" PRIu8
+		RTE_PMD_DEBUG_TRACE("Device with port_id=%" PRIu16
 			" already stopped\n",
 			port_id);
 		return;
@@ -949,7 +949,7 @@ rte_eth_dev_stop(uint8_t port_id)
 }
 
 int
-rte_eth_dev_set_link_up(uint8_t port_id)
+rte_eth_dev_set_link_up(uint16_t port_id)
 {
 	struct rte_eth_dev *dev;
 
@@ -962,7 +962,7 @@ rte_eth_dev_set_link_up(uint8_t port_id)
 }
 
 int
-rte_eth_dev_set_link_down(uint8_t port_id)
+rte_eth_dev_set_link_down(uint16_t port_id)
 {
 	struct rte_eth_dev *dev;
 
@@ -975,7 +975,7 @@ rte_eth_dev_set_link_down(uint8_t port_id)
 }
 
 void
-rte_eth_dev_close(uint8_t port_id)
+rte_eth_dev_close(uint16_t port_id)
 {
 	struct rte_eth_dev *dev;
 
@@ -995,7 +995,7 @@ rte_eth_dev_close(uint8_t port_id)
 }
 
 int
-rte_eth_dev_reset(uint8_t port_id)
+rte_eth_dev_reset(uint16_t port_id)
 {
 	struct rte_eth_dev *dev;
 	int ret;
@@ -1012,7 +1012,7 @@ rte_eth_dev_reset(uint8_t port_id)
 }
 
 int
-rte_eth_rx_queue_setup(uint8_t port_id, uint16_t rx_queue_id,
+rte_eth_rx_queue_setup(uint16_t port_id, uint16_t rx_queue_id,
 		       uint16_t nb_rx_desc, unsigned int socket_id,
 		       const struct rte_eth_rxconf *rx_conf,
 		       struct rte_mempool *mp)
@@ -1103,7 +1103,7 @@ rte_eth_rx_queue_setup(uint8_t port_id, uint16_t rx_queue_id,
 }
 
 int
-rte_eth_tx_queue_setup(uint8_t port_id, uint16_t tx_queue_id,
+rte_eth_tx_queue_setup(uint16_t port_id, uint16_t tx_queue_id,
 		       uint16_t nb_tx_desc, unsigned int socket_id,
 		       const struct rte_eth_txconf *tx_conf)
 {
@@ -1207,7 +1207,7 @@ rte_eth_tx_buffer_init(struct rte_eth_dev_tx_buffer *buffer, uint16_t size)
 }
 
 int
-rte_eth_tx_done_cleanup(uint8_t port_id, uint16_t queue_id, uint32_t free_cnt)
+rte_eth_tx_done_cleanup(uint16_t port_id, uint16_t queue_id, uint32_t free_cnt)
 {
 	struct rte_eth_dev *dev = &rte_eth_devices[port_id];
 
@@ -1221,7 +1221,7 @@ rte_eth_tx_done_cleanup(uint8_t port_id, uint16_t queue_id, uint32_t free_cnt)
 }
 
 void
-rte_eth_promiscuous_enable(uint8_t port_id)
+rte_eth_promiscuous_enable(uint16_t port_id)
 {
 	struct rte_eth_dev *dev;
 
@@ -1234,7 +1234,7 @@ rte_eth_promiscuous_enable(uint8_t port_id)
 }
 
 void
-rte_eth_promiscuous_disable(uint8_t port_id)
+rte_eth_promiscuous_disable(uint16_t port_id)
 {
 	struct rte_eth_dev *dev;
 
@@ -1247,7 +1247,7 @@ rte_eth_promiscuous_disable(uint8_t port_id)
 }
 
 int
-rte_eth_promiscuous_get(uint8_t port_id)
+rte_eth_promiscuous_get(uint16_t port_id)
 {
 	struct rte_eth_dev *dev;
 
@@ -1258,7 +1258,7 @@ rte_eth_promiscuous_get(uint8_t port_id)
 }
 
 void
-rte_eth_allmulticast_enable(uint8_t port_id)
+rte_eth_allmulticast_enable(uint16_t port_id)
 {
 	struct rte_eth_dev *dev;
 
@@ -1271,7 +1271,7 @@ rte_eth_allmulticast_enable(uint8_t port_id)
 }
 
 void
-rte_eth_allmulticast_disable(uint8_t port_id)
+rte_eth_allmulticast_disable(uint16_t port_id)
 {
 	struct rte_eth_dev *dev;
 
@@ -1284,7 +1284,7 @@ rte_eth_allmulticast_disable(uint8_t port_id)
 }
 
 int
-rte_eth_allmulticast_get(uint8_t port_id)
+rte_eth_allmulticast_get(uint16_t port_id)
 {
 	struct rte_eth_dev *dev;
 
@@ -1309,7 +1309,7 @@ rte_eth_dev_atomic_read_link_status(struct rte_eth_dev *dev,
 }
 
 void
-rte_eth_link_get(uint8_t port_id, struct rte_eth_link *eth_link)
+rte_eth_link_get(uint16_t port_id, struct rte_eth_link *eth_link)
 {
 	struct rte_eth_dev *dev;
 
@@ -1326,7 +1326,7 @@ rte_eth_link_get(uint8_t port_id, struct rte_eth_link *eth_link)
 }
 
 void
-rte_eth_link_get_nowait(uint8_t port_id, struct rte_eth_link *eth_link)
+rte_eth_link_get_nowait(uint16_t port_id, struct rte_eth_link *eth_link)
 {
 	struct rte_eth_dev *dev;
 
@@ -1343,7 +1343,7 @@ rte_eth_link_get_nowait(uint8_t port_id, struct rte_eth_link *eth_link)
 }
 
 int
-rte_eth_stats_get(uint8_t port_id, struct rte_eth_stats *stats)
+rte_eth_stats_get(uint16_t port_id, struct rte_eth_stats *stats)
 {
 	struct rte_eth_dev *dev;
 
@@ -1359,7 +1359,7 @@ rte_eth_stats_get(uint8_t port_id, struct rte_eth_stats *stats)
 }
 
 void
-rte_eth_stats_reset(uint8_t port_id)
+rte_eth_stats_reset(uint16_t port_id)
 {
 	struct rte_eth_dev *dev;
 
@@ -1372,7 +1372,7 @@ rte_eth_stats_reset(uint8_t port_id)
 }
 
 static int
-get_xstats_count(uint8_t port_id)
+get_xstats_count(uint16_t port_id)
 {
 	struct rte_eth_dev *dev;
 	int count;
@@ -1401,7 +1401,7 @@ get_xstats_count(uint8_t port_id)
 }
 
 int
-rte_eth_xstats_get_id_by_name(uint8_t port_id, const char *xstat_name,
+rte_eth_xstats_get_id_by_name(uint16_t port_id, const char *xstat_name,
 		uint64_t *id)
 {
 	int cnt_xstats, idx_xstat;
@@ -1445,7 +1445,7 @@ rte_eth_xstats_get_id_by_name(uint8_t port_id, const char *xstat_name,
 }
 
 int
-rte_eth_xstats_get_names_by_id(uint8_t port_id,
+rte_eth_xstats_get_names_by_id(uint16_t port_id,
 	struct rte_eth_xstat_name *xstats_names, unsigned int size,
 	uint64_t *ids)
 {
@@ -1562,7 +1562,7 @@ rte_eth_xstats_get_names_by_id(uint8_t port_id,
 }
 
 int
-rte_eth_xstats_get_names(uint8_t port_id,
+rte_eth_xstats_get_names(uint16_t port_id,
 	struct rte_eth_xstat_name *xstats_names,
 	unsigned int size)
 {
@@ -1628,8 +1628,8 @@ rte_eth_xstats_get_names(uint8_t port_id,
 
 /* retrieve ethdev extended statistics */
 int
-rte_eth_xstats_get_by_id(uint8_t port_id, const uint64_t *ids, uint64_t *values,
-	unsigned int n)
+rte_eth_xstats_get_by_id(uint16_t port_id, const uint64_t *ids,
+			 uint64_t *values, unsigned int n)
 {
 	/* If need all xstats */
 	if (!ids) {
@@ -1754,7 +1754,7 @@ rte_eth_xstats_get_by_id(uint8_t port_id, const uint64_t *ids, uint64_t *values,
 }
 
 int
-rte_eth_xstats_get(uint8_t port_id, struct rte_eth_xstat *xstats,
+rte_eth_xstats_get(uint16_t port_id, struct rte_eth_xstat *xstats,
 	unsigned int n)
 {
 	struct rte_eth_stats eth_stats;
@@ -1836,7 +1836,7 @@ rte_eth_xstats_get(uint8_t port_id, struct rte_eth_xstat *xstats,
 
 /* reset ethdev extended statistics */
 void
-rte_eth_xstats_reset(uint8_t port_id)
+rte_eth_xstats_reset(uint16_t port_id)
 {
 	struct rte_eth_dev *dev;
 
@@ -1854,7 +1854,7 @@ rte_eth_xstats_reset(uint8_t port_id)
 }
 
 static int
-set_queue_stats_mapping(uint8_t port_id, uint16_t queue_id, uint8_t stat_idx,
+set_queue_stats_mapping(uint16_t port_id, uint16_t queue_id, uint8_t stat_idx,
 		uint8_t is_rx)
 {
 	struct rte_eth_dev *dev;
@@ -1870,7 +1870,7 @@ set_queue_stats_mapping(uint8_t port_id, uint16_t queue_id, uint8_t stat_idx,
 
 
 int
-rte_eth_dev_set_tx_queue_stats_mapping(uint8_t port_id, uint16_t tx_queue_id,
+rte_eth_dev_set_tx_queue_stats_mapping(uint16_t port_id, uint16_t tx_queue_id,
 		uint8_t stat_idx)
 {
 	return set_queue_stats_mapping(port_id, tx_queue_id, stat_idx,
@@ -1879,7 +1879,7 @@ rte_eth_dev_set_tx_queue_stats_mapping(uint8_t port_id, uint16_t tx_queue_id,
 
 
 int
-rte_eth_dev_set_rx_queue_stats_mapping(uint8_t port_id, uint16_t rx_queue_id,
+rte_eth_dev_set_rx_queue_stats_mapping(uint16_t port_id, uint16_t rx_queue_id,
 		uint8_t stat_idx)
 {
 	return set_queue_stats_mapping(port_id, rx_queue_id, stat_idx,
@@ -1887,7 +1887,7 @@ rte_eth_dev_set_rx_queue_stats_mapping(uint8_t port_id, uint16_t rx_queue_id,
 }
 
 int
-rte_eth_dev_fw_version_get(uint8_t port_id, char *fw_version, size_t fw_size)
+rte_eth_dev_fw_version_get(uint16_t port_id, char *fw_version, size_t fw_size)
 {
 	struct rte_eth_dev *dev;
 
@@ -1899,7 +1899,7 @@ rte_eth_dev_fw_version_get(uint8_t port_id, char *fw_version, size_t fw_size)
 }
 
 void
-rte_eth_dev_info_get(uint8_t port_id, struct rte_eth_dev_info *dev_info)
+rte_eth_dev_info_get(uint16_t port_id, struct rte_eth_dev_info *dev_info)
 {
 	struct rte_eth_dev *dev;
 	const struct rte_eth_desc_lim lim = {
@@ -1923,7 +1923,7 @@ rte_eth_dev_info_get(uint8_t port_id, struct rte_eth_dev_info *dev_info)
 }
 
 int
-rte_eth_dev_get_supported_ptypes(uint8_t port_id, uint32_t ptype_mask,
+rte_eth_dev_get_supported_ptypes(uint16_t port_id, uint32_t ptype_mask,
 				 uint32_t *ptypes, int num)
 {
 	int i, j;
@@ -1949,7 +1949,7 @@ rte_eth_dev_get_supported_ptypes(uint8_t port_id, uint32_t ptype_mask,
 }
 
 void
-rte_eth_macaddr_get(uint8_t port_id, struct ether_addr *mac_addr)
+rte_eth_macaddr_get(uint16_t port_id, struct ether_addr *mac_addr)
 {
 	struct rte_eth_dev *dev;
 
@@ -1960,7 +1960,7 @@ rte_eth_macaddr_get(uint8_t port_id, struct ether_addr *mac_addr)
 
 
 int
-rte_eth_dev_get_mtu(uint8_t port_id, uint16_t *mtu)
+rte_eth_dev_get_mtu(uint16_t port_id, uint16_t *mtu)
 {
 	struct rte_eth_dev *dev;
 
@@ -1972,7 +1972,7 @@ rte_eth_dev_get_mtu(uint8_t port_id, uint16_t *mtu)
 }
 
 int
-rte_eth_dev_set_mtu(uint8_t port_id, uint16_t mtu)
+rte_eth_dev_set_mtu(uint16_t port_id, uint16_t mtu)
 {
 	int ret;
 	struct rte_eth_dev *dev;
@@ -1989,7 +1989,7 @@ rte_eth_dev_set_mtu(uint8_t port_id, uint16_t mtu)
 }
 
 int
-rte_eth_dev_vlan_filter(uint8_t port_id, uint16_t vlan_id, int on)
+rte_eth_dev_vlan_filter(uint16_t port_id, uint16_t vlan_id, int on)
 {
 	struct rte_eth_dev *dev;
 	int ret;
@@ -2028,7 +2028,8 @@ rte_eth_dev_vlan_filter(uint8_t port_id, uint16_t vlan_id, int on)
 }
 
 int
-rte_eth_dev_set_vlan_strip_on_queue(uint8_t port_id, uint16_t rx_queue_id, int on)
+rte_eth_dev_set_vlan_strip_on_queue(uint16_t port_id, uint16_t rx_queue_id,
+				    int on)
 {
 	struct rte_eth_dev *dev;
 
@@ -2046,7 +2047,7 @@ rte_eth_dev_set_vlan_strip_on_queue(uint8_t port_id, uint16_t rx_queue_id, int o
 }
 
 int
-rte_eth_dev_set_vlan_ether_type(uint8_t port_id,
+rte_eth_dev_set_vlan_ether_type(uint16_t port_id,
 				enum rte_vlan_type vlan_type,
 				uint16_t tpid)
 {
@@ -2060,7 +2061,7 @@ rte_eth_dev_set_vlan_ether_type(uint8_t port_id,
 }
 
 int
-rte_eth_dev_set_vlan_offload(uint8_t port_id, int offload_mask)
+rte_eth_dev_set_vlan_offload(uint16_t port_id, int offload_mask)
 {
 	struct rte_eth_dev *dev;
 	int ret = 0;
@@ -2103,7 +2104,7 @@ rte_eth_dev_set_vlan_offload(uint8_t port_id, int offload_mask)
 }
 
 int
-rte_eth_dev_get_vlan_offload(uint8_t port_id)
+rte_eth_dev_get_vlan_offload(uint16_t port_id)
 {
 	struct rte_eth_dev *dev;
 	int ret = 0;
@@ -2124,7 +2125,7 @@ rte_eth_dev_get_vlan_offload(uint8_t port_id)
 }
 
 int
-rte_eth_dev_set_vlan_pvid(uint8_t port_id, uint16_t pvid, int on)
+rte_eth_dev_set_vlan_pvid(uint16_t port_id, uint16_t pvid, int on)
 {
 	struct rte_eth_dev *dev;
 
@@ -2137,7 +2138,7 @@ rte_eth_dev_set_vlan_pvid(uint8_t port_id, uint16_t pvid, int on)
 }
 
 int
-rte_eth_dev_flow_ctrl_get(uint8_t port_id, struct rte_eth_fc_conf *fc_conf)
+rte_eth_dev_flow_ctrl_get(uint16_t port_id, struct rte_eth_fc_conf *fc_conf)
 {
 	struct rte_eth_dev *dev;
 
@@ -2149,7 +2150,7 @@ rte_eth_dev_flow_ctrl_get(uint8_t port_id, struct rte_eth_fc_conf *fc_conf)
 }
 
 int
-rte_eth_dev_flow_ctrl_set(uint8_t port_id, struct rte_eth_fc_conf *fc_conf)
+rte_eth_dev_flow_ctrl_set(uint16_t port_id, struct rte_eth_fc_conf *fc_conf)
 {
 	struct rte_eth_dev *dev;
 
@@ -2165,7 +2166,8 @@ rte_eth_dev_flow_ctrl_set(uint8_t port_id, struct rte_eth_fc_conf *fc_conf)
 }
 
 int
-rte_eth_dev_priority_flow_ctrl_set(uint8_t port_id, struct rte_eth_pfc_conf *pfc_conf)
+rte_eth_dev_priority_flow_ctrl_set(uint16_t port_id,
+				   struct rte_eth_pfc_conf *pfc_conf)
 {
 	struct rte_eth_dev *dev;
 
@@ -2231,7 +2233,7 @@ rte_eth_check_reta_entry(struct rte_eth_rss_reta_entry64 *reta_conf,
 }
 
 int
-rte_eth_dev_rss_reta_update(uint8_t port_id,
+rte_eth_dev_rss_reta_update(uint16_t port_id,
 			    struct rte_eth_rss_reta_entry64 *reta_conf,
 			    uint16_t reta_size)
 {
@@ -2257,7 +2259,7 @@ rte_eth_dev_rss_reta_update(uint8_t port_id,
 }
 
 int
-rte_eth_dev_rss_reta_query(uint8_t port_id,
+rte_eth_dev_rss_reta_query(uint16_t port_id,
 			   struct rte_eth_rss_reta_entry64 *reta_conf,
 			   uint16_t reta_size)
 {
@@ -2277,7 +2279,8 @@ rte_eth_dev_rss_reta_query(uint8_t port_id,
 }
 
 int
-rte_eth_dev_rss_hash_update(uint8_t port_id, struct rte_eth_rss_conf *rss_conf)
+rte_eth_dev_rss_hash_update(uint16_t port_id,
+			    struct rte_eth_rss_conf *rss_conf)
 {
 	struct rte_eth_dev *dev;
 	uint16_t rss_hash_protos;
@@ -2296,7 +2299,7 @@ rte_eth_dev_rss_hash_update(uint8_t port_id, struct rte_eth_rss_conf *rss_conf)
 }
 
 int
-rte_eth_dev_rss_hash_conf_get(uint8_t port_id,
+rte_eth_dev_rss_hash_conf_get(uint16_t port_id,
 			      struct rte_eth_rss_conf *rss_conf)
 {
 	struct rte_eth_dev *dev;
@@ -2308,7 +2311,7 @@ rte_eth_dev_rss_hash_conf_get(uint8_t port_id,
 }
 
 int
-rte_eth_dev_udp_tunnel_port_add(uint8_t port_id,
+rte_eth_dev_udp_tunnel_port_add(uint16_t port_id,
 				struct rte_eth_udp_tunnel *udp_tunnel)
 {
 	struct rte_eth_dev *dev;
@@ -2330,7 +2333,7 @@ rte_eth_dev_udp_tunnel_port_add(uint8_t port_id,
 }
 
 int
-rte_eth_dev_udp_tunnel_port_delete(uint8_t port_id,
+rte_eth_dev_udp_tunnel_port_delete(uint16_t port_id,
 				   struct rte_eth_udp_tunnel *udp_tunnel)
 {
 	struct rte_eth_dev *dev;
@@ -2353,7 +2356,7 @@ rte_eth_dev_udp_tunnel_port_delete(uint8_t port_id,
 }
 
 int
-rte_eth_led_on(uint8_t port_id)
+rte_eth_led_on(uint16_t port_id)
 {
 	struct rte_eth_dev *dev;
 
@@ -2364,7 +2367,7 @@ rte_eth_led_on(uint8_t port_id)
 }
 
 int
-rte_eth_led_off(uint8_t port_id)
+rte_eth_led_off(uint16_t port_id)
 {
 	struct rte_eth_dev *dev;
 
@@ -2379,7 +2382,7 @@ rte_eth_led_off(uint8_t port_id)
  * an empty spot.
  */
 static int
-get_mac_addr_index(uint8_t port_id, const struct ether_addr *addr)
+get_mac_addr_index(uint16_t port_id, const struct ether_addr *addr)
 {
 	struct rte_eth_dev_info dev_info;
 	struct rte_eth_dev *dev = &rte_eth_devices[port_id];
@@ -2398,7 +2401,7 @@ get_mac_addr_index(uint8_t port_id, const struct ether_addr *addr)
 static const struct ether_addr null_mac_addr;
 
 int
-rte_eth_dev_mac_addr_add(uint8_t port_id, struct ether_addr *addr,
+rte_eth_dev_mac_addr_add(uint16_t port_id, struct ether_addr *addr,
 			uint32_t pool)
 {
 	struct rte_eth_dev *dev;
@@ -2451,7 +2454,7 @@ rte_eth_dev_mac_addr_add(uint8_t port_id, struct ether_addr *addr,
 }
 
 int
-rte_eth_dev_mac_addr_remove(uint8_t port_id, struct ether_addr *addr)
+rte_eth_dev_mac_addr_remove(uint16_t port_id, struct ether_addr *addr)
 {
 	struct rte_eth_dev *dev;
 	int index;
@@ -2480,7 +2483,7 @@ rte_eth_dev_mac_addr_remove(uint8_t port_id, struct ether_addr *addr)
 }
 
 int
-rte_eth_dev_default_mac_addr_set(uint8_t port_id, struct ether_addr *addr)
+rte_eth_dev_default_mac_addr_set(uint16_t port_id, struct ether_addr *addr)
 {
 	struct rte_eth_dev *dev;
 
@@ -2506,7 +2509,7 @@ rte_eth_dev_default_mac_addr_set(uint8_t port_id, struct ether_addr *addr)
  * an empty spot.
  */
 static int
-get_hash_mac_addr_index(uint8_t port_id, const struct ether_addr *addr)
+get_hash_mac_addr_index(uint16_t port_id, const struct ether_addr *addr)
 {
 	struct rte_eth_dev_info dev_info;
 	struct rte_eth_dev *dev = &rte_eth_devices[port_id];
@@ -2525,7 +2528,7 @@ get_hash_mac_addr_index(uint8_t port_id, const struct ether_addr *addr)
 }
 
 int
-rte_eth_dev_uc_hash_table_set(uint8_t port_id, struct ether_addr *addr,
+rte_eth_dev_uc_hash_table_set(uint16_t port_id, struct ether_addr *addr,
 				uint8_t on)
 {
 	int index;
@@ -2577,7 +2580,7 @@ rte_eth_dev_uc_hash_table_set(uint8_t port_id, struct ether_addr *addr,
 }
 
 int
-rte_eth_dev_uc_all_hash_table_set(uint8_t port_id, uint8_t on)
+rte_eth_dev_uc_all_hash_table_set(uint16_t port_id, uint8_t on)
 {
 	struct rte_eth_dev *dev;
 
@@ -2589,7 +2592,7 @@ rte_eth_dev_uc_all_hash_table_set(uint8_t port_id, uint8_t on)
 	return (*dev->dev_ops->uc_all_hash_table_set)(dev, on);
 }
 
-int rte_eth_set_queue_rate_limit(uint8_t port_id, uint16_t queue_idx,
+int rte_eth_set_queue_rate_limit(uint16_t port_id, uint16_t queue_idx,
 					uint16_t tx_rate)
 {
 	struct rte_eth_dev *dev;
@@ -2620,7 +2623,7 @@ int rte_eth_set_queue_rate_limit(uint8_t port_id, uint16_t queue_idx,
 }
 
 int
-rte_eth_mirror_rule_set(uint8_t port_id,
+rte_eth_mirror_rule_set(uint16_t port_id,
 			struct rte_eth_mirror_conf *mirror_conf,
 			uint8_t rule_id, uint8_t on)
 {
@@ -2658,7 +2661,7 @@ rte_eth_mirror_rule_set(uint8_t port_id,
 }
 
 int
-rte_eth_mirror_rule_reset(uint8_t port_id, uint8_t rule_id)
+rte_eth_mirror_rule_reset(uint16_t port_id, uint8_t rule_id)
 {
 	struct rte_eth_dev *dev;
 
@@ -2671,7 +2674,7 @@ rte_eth_mirror_rule_reset(uint8_t port_id, uint8_t rule_id)
 }
 
 int
-rte_eth_dev_callback_register(uint8_t port_id,
+rte_eth_dev_callback_register(uint16_t port_id,
 			enum rte_eth_event_type event,
 			rte_eth_dev_cb_fn cb_fn, void *cb_arg)
 {
@@ -2711,7 +2714,7 @@ rte_eth_dev_callback_register(uint8_t port_id,
 }
 
 int
-rte_eth_dev_callback_unregister(uint8_t port_id,
+rte_eth_dev_callback_unregister(uint16_t port_id,
 			enum rte_eth_event_type event,
 			rte_eth_dev_cb_fn cb_fn, void *cb_arg)
 {
@@ -2783,7 +2786,7 @@ _rte_eth_dev_callback_process(struct rte_eth_dev *dev,
 }
 
 int
-rte_eth_dev_rx_intr_ctl(uint8_t port_id, int epfd, int op, void *data)
+rte_eth_dev_rx_intr_ctl(uint16_t port_id, int epfd, int op, void *data)
 {
 	uint32_t vec;
 	struct rte_eth_dev *dev;
@@ -2844,7 +2847,7 @@ rte_eth_dma_zone_reserve(const struct rte_eth_dev *dev, const char *ring_name,
 }
 
 int
-rte_eth_dev_rx_intr_ctl_q(uint8_t port_id, uint16_t queue_id,
+rte_eth_dev_rx_intr_ctl_q(uint16_t port_id, uint16_t queue_id,
 			  int epfd, int op, void *data)
 {
 	uint32_t vec;
@@ -2884,7 +2887,7 @@ rte_eth_dev_rx_intr_ctl_q(uint8_t port_id, uint16_t queue_id,
 }
 
 int
-rte_eth_dev_rx_intr_enable(uint8_t port_id,
+rte_eth_dev_rx_intr_enable(uint16_t port_id,
 			   uint16_t queue_id)
 {
 	struct rte_eth_dev *dev;
@@ -2898,7 +2901,7 @@ rte_eth_dev_rx_intr_enable(uint8_t port_id,
 }
 
 int
-rte_eth_dev_rx_intr_disable(uint8_t port_id,
+rte_eth_dev_rx_intr_disable(uint16_t port_id,
 			    uint16_t queue_id)
 {
 	struct rte_eth_dev *dev;
@@ -2913,7 +2916,8 @@ rte_eth_dev_rx_intr_disable(uint8_t port_id,
 
 
 int
-rte_eth_dev_filter_supported(uint8_t port_id, enum rte_filter_type filter_type)
+rte_eth_dev_filter_supported(uint16_t port_id,
+			     enum rte_filter_type filter_type)
 {
 	struct rte_eth_dev *dev;
 
@@ -2926,7 +2930,7 @@ rte_eth_dev_filter_supported(uint8_t port_id, enum rte_filter_type filter_type)
 }
 
 int
-rte_eth_dev_filter_ctrl(uint8_t port_id, enum rte_filter_type filter_type,
+rte_eth_dev_filter_ctrl(uint16_t port_id, enum rte_filter_type filter_type,
 		       enum rte_filter_op filter_op, void *arg)
 {
 	struct rte_eth_dev *dev;
@@ -2939,7 +2943,7 @@ rte_eth_dev_filter_ctrl(uint8_t port_id, enum rte_filter_type filter_type,
 }
 
 void *
-rte_eth_add_rx_callback(uint8_t port_id, uint16_t queue_id,
+rte_eth_add_rx_callback(uint16_t port_id, uint16_t queue_id,
 		rte_rx_callback_fn fn, void *user_param)
 {
 #ifndef RTE_ETHDEV_RXTX_CALLBACKS
@@ -2981,7 +2985,7 @@ rte_eth_add_rx_callback(uint8_t port_id, uint16_t queue_id,
 }
 
 void *
-rte_eth_add_first_rx_callback(uint8_t port_id, uint16_t queue_id,
+rte_eth_add_first_rx_callback(uint16_t port_id, uint16_t queue_id,
 		rte_rx_callback_fn fn, void *user_param)
 {
 #ifndef RTE_ETHDEV_RXTX_CALLBACKS
@@ -3016,7 +3020,7 @@ rte_eth_add_first_rx_callback(uint8_t port_id, uint16_t queue_id,
 }
 
 void *
-rte_eth_add_tx_callback(uint8_t port_id, uint16_t queue_id,
+rte_eth_add_tx_callback(uint16_t port_id, uint16_t queue_id,
 		rte_tx_callback_fn fn, void *user_param)
 {
 #ifndef RTE_ETHDEV_RXTX_CALLBACKS
@@ -3059,7 +3063,7 @@ rte_eth_add_tx_callback(uint8_t port_id, uint16_t queue_id,
 }
 
 int
-rte_eth_remove_rx_callback(uint8_t port_id, uint16_t queue_id,
+rte_eth_remove_rx_callback(uint16_t port_id, uint16_t queue_id,
 		struct rte_eth_rxtx_callback *user_cb)
 {
 #ifndef RTE_ETHDEV_RXTX_CALLBACKS
@@ -3093,7 +3097,7 @@ rte_eth_remove_rx_callback(uint8_t port_id, uint16_t queue_id,
 }
 
 int
-rte_eth_remove_tx_callback(uint8_t port_id, uint16_t queue_id,
+rte_eth_remove_tx_callback(uint16_t port_id, uint16_t queue_id,
 		struct rte_eth_rxtx_callback *user_cb)
 {
 #ifndef RTE_ETHDEV_RXTX_CALLBACKS
@@ -3127,7 +3131,7 @@ rte_eth_remove_tx_callback(uint8_t port_id, uint16_t queue_id,
 }
 
 int
-rte_eth_rx_queue_info_get(uint8_t port_id, uint16_t queue_id,
+rte_eth_rx_queue_info_get(uint16_t port_id, uint16_t queue_id,
 	struct rte_eth_rxq_info *qinfo)
 {
 	struct rte_eth_dev *dev;
@@ -3151,7 +3155,7 @@ rte_eth_rx_queue_info_get(uint8_t port_id, uint16_t queue_id,
 }
 
 int
-rte_eth_tx_queue_info_get(uint8_t port_id, uint16_t queue_id,
+rte_eth_tx_queue_info_get(uint16_t port_id, uint16_t queue_id,
 	struct rte_eth_txq_info *qinfo)
 {
 	struct rte_eth_dev *dev;
@@ -3175,7 +3179,7 @@ rte_eth_tx_queue_info_get(uint8_t port_id, uint16_t queue_id,
 }
 
 int
-rte_eth_dev_set_mc_addr_list(uint8_t port_id,
+rte_eth_dev_set_mc_addr_list(uint16_t port_id,
 			     struct ether_addr *mc_addr_set,
 			     uint32_t nb_mc_addr)
 {
@@ -3189,7 +3193,7 @@ rte_eth_dev_set_mc_addr_list(uint8_t port_id,
 }
 
 int
-rte_eth_timesync_enable(uint8_t port_id)
+rte_eth_timesync_enable(uint16_t port_id)
 {
 	struct rte_eth_dev *dev;
 
@@ -3201,7 +3205,7 @@ rte_eth_timesync_enable(uint8_t port_id)
 }
 
 int
-rte_eth_timesync_disable(uint8_t port_id)
+rte_eth_timesync_disable(uint16_t port_id)
 {
 	struct rte_eth_dev *dev;
 
@@ -3213,7 +3217,7 @@ rte_eth_timesync_disable(uint8_t port_id)
 }
 
 int
-rte_eth_timesync_read_rx_timestamp(uint8_t port_id, struct timespec *timestamp,
+rte_eth_timesync_read_rx_timestamp(uint16_t port_id, struct timespec *timestamp,
 				   uint32_t flags)
 {
 	struct rte_eth_dev *dev;
@@ -3226,7 +3230,8 @@ rte_eth_timesync_read_rx_timestamp(uint8_t port_id, struct timespec *timestamp,
 }
 
 int
-rte_eth_timesync_read_tx_timestamp(uint8_t port_id, struct timespec *timestamp)
+rte_eth_timesync_read_tx_timestamp(uint16_t port_id,
+				   struct timespec *timestamp)
 {
 	struct rte_eth_dev *dev;
 
@@ -3238,7 +3243,7 @@ rte_eth_timesync_read_tx_timestamp(uint8_t port_id, struct timespec *timestamp)
 }
 
 int
-rte_eth_timesync_adjust_time(uint8_t port_id, int64_t delta)
+rte_eth_timesync_adjust_time(uint16_t port_id, int64_t delta)
 {
 	struct rte_eth_dev *dev;
 
@@ -3250,7 +3255,7 @@ rte_eth_timesync_adjust_time(uint8_t port_id, int64_t delta)
 }
 
 int
-rte_eth_timesync_read_time(uint8_t port_id, struct timespec *timestamp)
+rte_eth_timesync_read_time(uint16_t port_id, struct timespec *timestamp)
 {
 	struct rte_eth_dev *dev;
 
@@ -3262,7 +3267,7 @@ rte_eth_timesync_read_time(uint8_t port_id, struct timespec *timestamp)
 }
 
 int
-rte_eth_timesync_write_time(uint8_t port_id, const struct timespec *timestamp)
+rte_eth_timesync_write_time(uint16_t port_id, const struct timespec *timestamp)
 {
 	struct rte_eth_dev *dev;
 
@@ -3274,7 +3279,7 @@ rte_eth_timesync_write_time(uint8_t port_id, const struct timespec *timestamp)
 }
 
 int
-rte_eth_dev_get_reg_info(uint8_t port_id, struct rte_dev_reg_info *info)
+rte_eth_dev_get_reg_info(uint16_t port_id, struct rte_dev_reg_info *info)
 {
 	struct rte_eth_dev *dev;
 
@@ -3286,7 +3291,7 @@ rte_eth_dev_get_reg_info(uint8_t port_id, struct rte_dev_reg_info *info)
 }
 
 int
-rte_eth_dev_get_eeprom_length(uint8_t port_id)
+rte_eth_dev_get_eeprom_length(uint16_t port_id)
 {
 	struct rte_eth_dev *dev;
 
@@ -3298,7 +3303,7 @@ rte_eth_dev_get_eeprom_length(uint8_t port_id)
 }
 
 int
-rte_eth_dev_get_eeprom(uint8_t port_id, struct rte_dev_eeprom_info *info)
+rte_eth_dev_get_eeprom(uint16_t port_id, struct rte_dev_eeprom_info *info)
 {
 	struct rte_eth_dev *dev;
 
@@ -3310,7 +3315,7 @@ rte_eth_dev_get_eeprom(uint8_t port_id, struct rte_dev_eeprom_info *info)
 }
 
 int
-rte_eth_dev_set_eeprom(uint8_t port_id, struct rte_dev_eeprom_info *info)
+rte_eth_dev_set_eeprom(uint16_t port_id, struct rte_dev_eeprom_info *info)
 {
 	struct rte_eth_dev *dev;
 
@@ -3322,7 +3327,7 @@ rte_eth_dev_set_eeprom(uint8_t port_id, struct rte_dev_eeprom_info *info)
 }
 
 int
-rte_eth_dev_get_dcb_info(uint8_t port_id,
+rte_eth_dev_get_dcb_info(uint16_t port_id,
 			     struct rte_eth_dcb_info *dcb_info)
 {
 	struct rte_eth_dev *dev;
@@ -3337,7 +3342,7 @@ rte_eth_dev_get_dcb_info(uint8_t port_id,
 }
 
 int
-rte_eth_dev_l2_tunnel_eth_type_conf(uint8_t port_id,
+rte_eth_dev_l2_tunnel_eth_type_conf(uint16_t port_id,
 				    struct rte_eth_l2_tunnel_conf *l2_tunnel)
 {
 	struct rte_eth_dev *dev;
@@ -3360,7 +3365,7 @@ rte_eth_dev_l2_tunnel_eth_type_conf(uint8_t port_id,
 }
 
 int
-rte_eth_dev_l2_tunnel_offload_set(uint8_t port_id,
+rte_eth_dev_l2_tunnel_offload_set(uint16_t port_id,
 				  struct rte_eth_l2_tunnel_conf *l2_tunnel,
 				  uint32_t mask,
 				  uint8_t en)
@@ -3404,7 +3409,7 @@ rte_eth_dev_adjust_nb_desc(uint16_t *nb_desc,
 }
 
 int
-rte_eth_dev_adjust_nb_rx_tx_desc(uint8_t port_id,
+rte_eth_dev_adjust_nb_rx_tx_desc(uint16_t port_id,
 				 uint16_t *nb_rx_desc,
 				 uint16_t *nb_tx_desc)
 {
diff --git a/lib/librte_ether/rte_ethdev.h b/lib/librte_ether/rte_ethdev.h
index 99cdd54d4..34f729ab8 100644
--- a/lib/librte_ether/rte_ethdev.h
+++ b/lib/librte_ether/rte_ethdev.h
@@ -1572,7 +1572,7 @@ struct eth_dev_ops {
  * @return
  *   The number of packets returned to the user.
  */
-typedef uint16_t (*rte_rx_callback_fn)(uint8_t port, uint16_t queue,
+typedef uint16_t (*rte_rx_callback_fn)(uint16_t port, uint16_t queue,
 	struct rte_mbuf *pkts[], uint16_t nb_pkts, uint16_t max_pkts,
 	void *user_param);
 
@@ -1596,7 +1596,7 @@ typedef uint16_t (*rte_rx_callback_fn)(uint8_t port, uint16_t queue,
  * @return
  *   The number of packets to be written to the NIC.
  */
-typedef uint16_t (*rte_tx_callback_fn)(uint8_t port, uint16_t queue,
+typedef uint16_t (*rte_tx_callback_fn)(uint16_t port, uint16_t queue,
 	struct rte_mbuf *pkts[], uint16_t nb_pkts, void *user_param);
 
 /**
@@ -1699,7 +1699,7 @@ struct rte_eth_dev_data {
 	/** bitmap array of associating Ethernet MAC addresses to pools */
 	struct ether_addr* hash_mac_addrs;
 	/** Device Ethernet MAC addresses of hash filtering. */
-	uint8_t port_id;           /**< Device [external] port identifier. */
+	uint16_t port_id;           /**< Device [external] port identifier. */
 	__extension__
 	uint8_t promiscuous   : 1, /**< RX promiscuous mode ON(1) / OFF(0). */
 		scattered_rx : 1,  /**< RX of scattered packets is ON(1) / OFF(0) */
@@ -1741,7 +1741,7 @@ extern struct rte_eth_dev rte_eth_devices[];
  * @return
  *   Next valid port id, RTE_MAX_ETHPORTS if there is none.
  */
-uint8_t rte_eth_find_next(uint8_t port_id);
+uint16_t rte_eth_find_next(uint16_t port_id);
 
 /**
  * Macro to iterate over all enabled ethdev ports.
@@ -1764,7 +1764,7 @@ uint8_t rte_eth_find_next(uint8_t port_id);
  * @return
  *   - The total number of usable Ethernet devices.
  */
-uint8_t rte_eth_dev_count(void);
+uint16_t rte_eth_dev_count(void);
 
 /**
  * @internal
@@ -1825,7 +1825,7 @@ int rte_eth_dev_release_port(struct rte_eth_dev *eth_dev);
  * @return
  *  0 on success and port_id is filled, negative on error
  */
-int rte_eth_dev_attach(const char *devargs, uint8_t *port_id);
+int rte_eth_dev_attach(const char *devargs, uint16_t *port_id);
 
 /**
  * Detach a Ethernet device specified by port identifier.
@@ -1840,7 +1840,7 @@ int rte_eth_dev_attach(const char *devargs, uint8_t *port_id);
  * @return
  *  0 on success and devname is filled, negative on error
  */
-int rte_eth_dev_detach(uint8_t port_id, char *devname);
+int rte_eth_dev_detach(uint16_t port_id, char *devname);
 
 /**
  * Convert a numerical speed in Mbps to a bitmap flag that can be used in
@@ -1884,7 +1884,7 @@ uint32_t rte_eth_speed_bitflag(uint32_t speed, int duplex);
  *   - 0: Success, device configured.
  *   - <0: Error code returned by the driver configuration function.
  */
-int rte_eth_dev_configure(uint8_t port_id, uint16_t nb_rx_queue,
+int rte_eth_dev_configure(uint16_t port_id, uint16_t nb_rx_queue,
 		uint16_t nb_tx_queue, const struct rte_eth_conf *eth_conf);
 
 /**
@@ -1939,7 +1939,7 @@ void _rte_eth_dev_reset(struct rte_eth_dev *dev);
  *      allocate network memory buffers from the memory pool when
  *      initializing receive descriptors.
  */
-int rte_eth_rx_queue_setup(uint8_t port_id, uint16_t rx_queue_id,
+int rte_eth_rx_queue_setup(uint16_t port_id, uint16_t rx_queue_id,
 		uint16_t nb_rx_desc, unsigned int socket_id,
 		const struct rte_eth_rxconf *rx_conf,
 		struct rte_mempool *mb_pool);
@@ -1987,7 +1987,7 @@ int rte_eth_rx_queue_setup(uint8_t port_id, uint16_t rx_queue_id,
  *   - 0: Success, the transmit queue is correctly set up.
  *   - -ENOMEM: Unable to allocate the transmit ring descriptors.
  */
-int rte_eth_tx_queue_setup(uint8_t port_id, uint16_t tx_queue_id,
+int rte_eth_tx_queue_setup(uint16_t port_id, uint16_t tx_queue_id,
 		uint16_t nb_tx_desc, unsigned int socket_id,
 		const struct rte_eth_txconf *tx_conf);
 
@@ -2001,7 +2001,7 @@ int rte_eth_tx_queue_setup(uint8_t port_id, uint16_t tx_queue_id,
  *   a default of zero if the socket could not be determined.
  *   -1 is returned is the port_id value is out of range.
  */
-int rte_eth_dev_socket_id(uint8_t port_id);
+int rte_eth_dev_socket_id(uint16_t port_id);
 
 /**
  * Check if port_id of device is attached
@@ -2012,7 +2012,7 @@ int rte_eth_dev_socket_id(uint8_t port_id);
  *   - 0 if port is out of range or not attached
  *   - 1 if device is attached
  */
-int rte_eth_dev_is_valid_port(uint8_t port_id);
+int rte_eth_dev_is_valid_port(uint16_t port_id);
 
 /**
  * Start specified RX queue of a port. It is used when rx_deferred_start
@@ -2029,7 +2029,7 @@ int rte_eth_dev_is_valid_port(uint8_t port_id);
  *   - -EINVAL: The port_id or the queue_id out of range.
  *   - -ENOTSUP: The function not supported in PMD driver.
  */
-int rte_eth_dev_rx_queue_start(uint8_t port_id, uint16_t rx_queue_id);
+int rte_eth_dev_rx_queue_start(uint16_t port_id, uint16_t rx_queue_id);
 
 /**
  * Stop specified RX queue of a port
@@ -2045,7 +2045,7 @@ int rte_eth_dev_rx_queue_start(uint8_t port_id, uint16_t rx_queue_id);
  *   - -EINVAL: The port_id or the queue_id out of range.
  *   - -ENOTSUP: The function not supported in PMD driver.
  */
-int rte_eth_dev_rx_queue_stop(uint8_t port_id, uint16_t rx_queue_id);
+int rte_eth_dev_rx_queue_stop(uint16_t port_id, uint16_t rx_queue_id);
 
 /**
  * Start TX for specified queue of a port. It is used when tx_deferred_start
@@ -2062,7 +2062,7 @@ int rte_eth_dev_rx_queue_stop(uint8_t port_id, uint16_t rx_queue_id);
  *   - -EINVAL: The port_id or the queue_id out of range.
  *   - -ENOTSUP: The function not supported in PMD driver.
  */
-int rte_eth_dev_tx_queue_start(uint8_t port_id, uint16_t tx_queue_id);
+int rte_eth_dev_tx_queue_start(uint16_t port_id, uint16_t tx_queue_id);
 
 /**
  * Stop specified TX queue of a port
@@ -2078,7 +2078,7 @@ int rte_eth_dev_tx_queue_start(uint8_t port_id, uint16_t tx_queue_id);
  *   - -EINVAL: The port_id or the queue_id out of range.
  *   - -ENOTSUP: The function not supported in PMD driver.
  */
-int rte_eth_dev_tx_queue_stop(uint8_t port_id, uint16_t tx_queue_id);
+int rte_eth_dev_tx_queue_stop(uint16_t port_id, uint16_t tx_queue_id);
 
 
 
@@ -2097,7 +2097,7 @@ int rte_eth_dev_tx_queue_stop(uint8_t port_id, uint16_t tx_queue_id);
  *   - 0: Success, Ethernet device started.
  *   - <0: Error code of the driver device start function.
  */
-int rte_eth_dev_start(uint8_t port_id);
+int rte_eth_dev_start(uint16_t port_id);
 
 /**
  * Stop an Ethernet device. The device can be restarted with a call to
@@ -2106,7 +2106,7 @@ int rte_eth_dev_start(uint8_t port_id);
  * @param port_id
  *   The port identifier of the Ethernet device.
  */
-void rte_eth_dev_stop(uint8_t port_id);
+void rte_eth_dev_stop(uint16_t port_id);
 
 
 /**
@@ -2121,7 +2121,7 @@ void rte_eth_dev_stop(uint8_t port_id);
  *   - 0: Success, Ethernet device linked up.
  *   - <0: Error code of the driver device link up function.
  */
-int rte_eth_dev_set_link_up(uint8_t port_id);
+int rte_eth_dev_set_link_up(uint16_t port_id);
 
 /**
  * Link down an Ethernet device.
@@ -2132,7 +2132,7 @@ int rte_eth_dev_set_link_up(uint8_t port_id);
  * @param port_id
  *   The port identifier of the Ethernet device.
  */
-int rte_eth_dev_set_link_down(uint8_t port_id);
+int rte_eth_dev_set_link_down(uint16_t port_id);
 
 /**
  * Close a stopped Ethernet device. The device cannot be restarted!
@@ -2142,7 +2142,7 @@ int rte_eth_dev_set_link_down(uint8_t port_id);
  * @param port_id
  *   The port identifier of the Ethernet device.
  */
-void rte_eth_dev_close(uint8_t port_id);
+void rte_eth_dev_close(uint16_t port_id);
 
 /**
  * Reset a Ethernet device and keep its port id.
@@ -2172,7 +2172,7 @@ void rte_eth_dev_close(uint8_t port_id);
  * @param port_id
  *   The port identifier of the Ethernet device.
  */
-int rte_eth_dev_reset(uint8_t port_id);
+int rte_eth_dev_reset(uint16_t port_id);
 
 /**
  * Enable receipt in promiscuous mode for an Ethernet device.
@@ -2180,7 +2180,7 @@ int rte_eth_dev_reset(uint8_t port_id);
  * @param port_id
  *   The port identifier of the Ethernet device.
  */
-void rte_eth_promiscuous_enable(uint8_t port_id);
+void rte_eth_promiscuous_enable(uint16_t port_id);
 
 /**
  * Disable receipt in promiscuous mode for an Ethernet device.
@@ -2188,7 +2188,7 @@ void rte_eth_promiscuous_enable(uint8_t port_id);
  * @param port_id
  *   The port identifier of the Ethernet device.
  */
-void rte_eth_promiscuous_disable(uint8_t port_id);
+void rte_eth_promiscuous_disable(uint16_t port_id);
 
 /**
  * Return the value of promiscuous mode for an Ethernet device.
@@ -2200,7 +2200,7 @@ void rte_eth_promiscuous_disable(uint8_t port_id);
  *   - (0) if promiscuous is disabled.
  *   - (-1) on error
  */
-int rte_eth_promiscuous_get(uint8_t port_id);
+int rte_eth_promiscuous_get(uint16_t port_id);
 
 /**
  * Enable the receipt of any multicast frame by an Ethernet device.
@@ -2208,7 +2208,7 @@ int rte_eth_promiscuous_get(uint8_t port_id);
  * @param port_id
  *   The port identifier of the Ethernet device.
  */
-void rte_eth_allmulticast_enable(uint8_t port_id);
+void rte_eth_allmulticast_enable(uint16_t port_id);
 
 /**
  * Disable the receipt of all multicast frames by an Ethernet device.
@@ -2216,7 +2216,7 @@ void rte_eth_allmulticast_enable(uint8_t port_id);
  * @param port_id
  *   The port identifier of the Ethernet device.
  */
-void rte_eth_allmulticast_disable(uint8_t port_id);
+void rte_eth_allmulticast_disable(uint16_t port_id);
 
 /**
  * Return the value of allmulticast mode for an Ethernet device.
@@ -2228,7 +2228,7 @@ void rte_eth_allmulticast_disable(uint8_t port_id);
  *   - (0) if allmulticast is disabled.
  *   - (-1) on error
  */
-int rte_eth_allmulticast_get(uint8_t port_id);
+int rte_eth_allmulticast_get(uint16_t port_id);
 
 /**
  * Retrieve the status (ON/OFF), the speed (in Mbps) and the mode (HALF-DUPLEX
@@ -2241,7 +2241,7 @@ int rte_eth_allmulticast_get(uint8_t port_id);
  *   A pointer to an *rte_eth_link* structure to be filled with
  *   the status, the speed and the mode of the Ethernet device link.
  */
-void rte_eth_link_get(uint8_t port_id, struct rte_eth_link *link);
+void rte_eth_link_get(uint16_t port_id, struct rte_eth_link *link);
 
 /**
  * Retrieve the status (ON/OFF), the speed (in Mbps) and the mode (HALF-DUPLEX
@@ -2254,7 +2254,7 @@ void rte_eth_link_get(uint8_t port_id, struct rte_eth_link *link);
  *   A pointer to an *rte_eth_link* structure to be filled with
  *   the status, the speed and the mode of the Ethernet device link.
  */
-void rte_eth_link_get_nowait(uint8_t port_id, struct rte_eth_link *link);
+void rte_eth_link_get_nowait(uint16_t port_id, struct rte_eth_link *link);
 
 /**
  * Retrieve the general I/O statistics of an Ethernet device.
@@ -2273,7 +2273,7 @@ void rte_eth_link_get_nowait(uint8_t port_id, struct rte_eth_link *link);
  * @return
  *   Zero if successful. Non-zero otherwise.
  */
-int rte_eth_stats_get(uint8_t port_id, struct rte_eth_stats *stats);
+int rte_eth_stats_get(uint16_t port_id, struct rte_eth_stats *stats);
 
 /**
  * Reset the general I/O statistics of an Ethernet device.
@@ -2281,7 +2281,7 @@ int rte_eth_stats_get(uint8_t port_id, struct rte_eth_stats *stats);
  * @param port_id
  *   The port identifier of the Ethernet device.
  */
-void rte_eth_stats_reset(uint8_t port_id);
+void rte_eth_stats_reset(uint16_t port_id);
 
 /**
  * Retrieve names of extended statistics of an Ethernet device.
@@ -2303,7 +2303,7 @@ void rte_eth_stats_reset(uint8_t port_id);
  *     shall not be used by the caller.
  *   - A negative value on error (invalid port id).
  */
-int rte_eth_xstats_get_names(uint8_t port_id,
+int rte_eth_xstats_get_names(uint16_t port_id,
 		struct rte_eth_xstat_name *xstats_names,
 		unsigned int size);
 
@@ -2329,7 +2329,7 @@ int rte_eth_xstats_get_names(uint8_t port_id,
  *     shall not be used by the caller.
  *   - A negative value on error (invalid port id).
  */
-int rte_eth_xstats_get(uint8_t port_id, struct rte_eth_xstat *xstats,
+int rte_eth_xstats_get(uint16_t port_id, struct rte_eth_xstat *xstats,
 		unsigned int n);
 
 /**
@@ -2355,7 +2355,7 @@ int rte_eth_xstats_get(uint8_t port_id, struct rte_eth_xstat *xstats,
  *   - A negative value on error (invalid port id).
  */
 int
-rte_eth_xstats_get_names_by_id(uint8_t port_id,
+rte_eth_xstats_get_names_by_id(uint16_t port_id,
 	struct rte_eth_xstat_name *xstats_names, unsigned int size,
 	uint64_t *ids);
 
@@ -2382,7 +2382,7 @@ rte_eth_xstats_get_names_by_id(uint8_t port_id,
  *     shall not be used by the caller.
  *   - A negative value on error (invalid port id).
  */
-int rte_eth_xstats_get_by_id(uint8_t port_id, const uint64_t *ids,
+int rte_eth_xstats_get_by_id(uint16_t port_id, const uint64_t *ids,
 			     uint64_t *values, unsigned int n);
 
 /**
@@ -2402,7 +2402,7 @@ int rte_eth_xstats_get_by_id(uint8_t port_id, const uint64_t *ids,
  *    -ENODEV for invalid port_id,
  *    -EINVAL if the xstat_name doesn't exist in port_id
  */
-int rte_eth_xstats_get_id_by_name(uint8_t port_id, const char *xstat_name,
+int rte_eth_xstats_get_id_by_name(uint16_t port_id, const char *xstat_name,
 		uint64_t *id);
 
 /**
@@ -2411,7 +2411,7 @@ int rte_eth_xstats_get_id_by_name(uint8_t port_id, const char *xstat_name,
  * @param port_id
  *   The port identifier of the Ethernet device.
  */
-void rte_eth_xstats_reset(uint8_t port_id);
+void rte_eth_xstats_reset(uint16_t port_id);
 
 /**
  *  Set a mapping for the specified transmit queue to the specified per-queue
@@ -2430,7 +2430,7 @@ void rte_eth_xstats_reset(uint8_t port_id);
  * @return
  *   Zero if successful. Non-zero otherwise.
  */
-int rte_eth_dev_set_tx_queue_stats_mapping(uint8_t port_id,
+int rte_eth_dev_set_tx_queue_stats_mapping(uint16_t port_id,
 		uint16_t tx_queue_id, uint8_t stat_idx);
 
 /**
@@ -2450,7 +2450,7 @@ int rte_eth_dev_set_tx_queue_stats_mapping(uint8_t port_id,
  * @return
  *   Zero if successful. Non-zero otherwise.
  */
-int rte_eth_dev_set_rx_queue_stats_mapping(uint8_t port_id,
+int rte_eth_dev_set_rx_queue_stats_mapping(uint16_t port_id,
 					   uint16_t rx_queue_id,
 					   uint8_t stat_idx);
 
@@ -2463,7 +2463,7 @@ int rte_eth_dev_set_rx_queue_stats_mapping(uint8_t port_id,
  *   A pointer to a structure of type *ether_addr* to be filled with
  *   the Ethernet address of the Ethernet device.
  */
-void rte_eth_macaddr_get(uint8_t port_id, struct ether_addr *mac_addr);
+void rte_eth_macaddr_get(uint16_t port_id, struct ether_addr *mac_addr);
 
 /**
  * Retrieve the contextual information of an Ethernet device.
@@ -2474,7 +2474,7 @@ void rte_eth_macaddr_get(uint8_t port_id, struct ether_addr *mac_addr);
  *   A pointer to a structure of type *rte_eth_dev_info* to be filled with
  *   the contextual information of the Ethernet device.
  */
-void rte_eth_dev_info_get(uint8_t port_id, struct rte_eth_dev_info *dev_info);
+void rte_eth_dev_info_get(uint16_t port_id, struct rte_eth_dev_info *dev_info);
 
 /**
  * Retrieve the firmware version of a device.
@@ -2494,7 +2494,7 @@ void rte_eth_dev_info_get(uint8_t port_id, struct rte_eth_dev_info *dev_info);
  *   - (>0) if *fw_size* is not enough to store firmware version, return
  *          the size of the non truncated string.
  */
-int rte_eth_dev_fw_version_get(uint8_t port_id,
+int rte_eth_dev_fw_version_get(uint16_t port_id,
 			       char *fw_version, size_t fw_size);
 
 /**
@@ -2535,7 +2535,7 @@ int rte_eth_dev_fw_version_get(uint8_t port_id,
  *           count of supported ptypes will be returned.
  *   - (-ENODEV) if *port_id* invalid.
  */
-int rte_eth_dev_get_supported_ptypes(uint8_t port_id, uint32_t ptype_mask,
+int rte_eth_dev_get_supported_ptypes(uint16_t port_id, uint32_t ptype_mask,
 				     uint32_t *ptypes, int num);
 
 /**
@@ -2549,7 +2549,7 @@ int rte_eth_dev_get_supported_ptypes(uint8_t port_id, uint32_t ptype_mask,
  *   - (0) if successful.
  *   - (-ENODEV) if *port_id* invalid.
  */
-int rte_eth_dev_get_mtu(uint8_t port_id, uint16_t *mtu);
+int rte_eth_dev_get_mtu(uint16_t port_id, uint16_t *mtu);
 
 /**
  * Change the MTU of an Ethernet device.
@@ -2565,7 +2565,7 @@ int rte_eth_dev_get_mtu(uint8_t port_id, uint16_t *mtu);
  *   - (-EINVAL) if *mtu* invalid.
  *   - (-EBUSY) if operation is not allowed when the port is running
  */
-int rte_eth_dev_set_mtu(uint8_t port_id, uint16_t mtu);
+int rte_eth_dev_set_mtu(uint16_t port_id, uint16_t mtu);
 
 /**
  * Enable/Disable hardware filtering by an Ethernet device of received
@@ -2585,7 +2585,7 @@ int rte_eth_dev_set_mtu(uint8_t port_id, uint16_t mtu);
  *   - (-ENOSYS) if VLAN filtering on *port_id* disabled.
  *   - (-EINVAL) if *vlan_id* > 4095.
  */
-int rte_eth_dev_vlan_filter(uint8_t port_id, uint16_t vlan_id, int on);
+int rte_eth_dev_vlan_filter(uint16_t port_id, uint16_t vlan_id, int on);
 
 /**
  * Enable/Disable hardware VLAN Strip by a rx queue of an Ethernet device.
@@ -2606,7 +2606,7 @@ int rte_eth_dev_vlan_filter(uint8_t port_id, uint16_t vlan_id, int on);
  *   - (-ENODEV) if *port_id* invalid.
  *   - (-EINVAL) if *rx_queue_id* invalid.
  */
-int rte_eth_dev_set_vlan_strip_on_queue(uint8_t port_id, uint16_t rx_queue_id,
+int rte_eth_dev_set_vlan_strip_on_queue(uint16_t port_id, uint16_t rx_queue_id,
 		int on);
 
 /**
@@ -2625,7 +2625,7 @@ int rte_eth_dev_set_vlan_strip_on_queue(uint8_t port_id, uint16_t rx_queue_id,
  *   - (-ENOSUP) if hardware-assisted VLAN TPID setup is not supported.
  *   - (-ENODEV) if *port_id* invalid.
  */
-int rte_eth_dev_set_vlan_ether_type(uint8_t port_id,
+int rte_eth_dev_set_vlan_ether_type(uint16_t port_id,
 				    enum rte_vlan_type vlan_type,
 				    uint16_t tag_type);
 
@@ -2649,7 +2649,7 @@ int rte_eth_dev_set_vlan_ether_type(uint8_t port_id,
  *   - (-ENOSUP) if hardware-assisted VLAN filtering not configured.
  *   - (-ENODEV) if *port_id* invalid.
  */
-int rte_eth_dev_set_vlan_offload(uint8_t port_id, int offload_mask);
+int rte_eth_dev_set_vlan_offload(uint16_t port_id, int offload_mask);
 
 /**
  * Read VLAN Offload configuration from an Ethernet device
@@ -2663,7 +2663,7 @@ int rte_eth_dev_set_vlan_offload(uint8_t port_id, int offload_mask);
  *       ETH_VLAN_EXTEND_OFFLOAD
  *   - (-ENODEV) if *port_id* invalid.
  */
-int rte_eth_dev_get_vlan_offload(uint8_t port_id);
+int rte_eth_dev_get_vlan_offload(uint16_t port_id);
 
 /**
  * Set port based TX VLAN insertion on or off.
@@ -2679,7 +2679,7 @@ int rte_eth_dev_get_vlan_offload(uint8_t port_id);
  *   - (0) if successful.
  *   - negative if failed.
  */
-int rte_eth_dev_set_vlan_pvid(uint8_t port_id, uint16_t pvid, int on);
+int rte_eth_dev_set_vlan_pvid(uint16_t port_id, uint16_t pvid, int on);
 
 /**
  *
@@ -2764,7 +2764,7 @@ int rte_eth_dev_set_vlan_pvid(uint8_t port_id, uint16_t pvid, int on);
  *   *rx_pkts* array.
  */
 static inline uint16_t
-rte_eth_rx_burst(uint8_t port_id, uint16_t queue_id,
+rte_eth_rx_burst(uint16_t port_id, uint16_t queue_id,
 		 struct rte_mbuf **rx_pkts, const uint16_t nb_pkts)
 {
 	struct rte_eth_dev *dev = &rte_eth_devices[port_id];
@@ -2809,7 +2809,7 @@ rte_eth_rx_burst(uint8_t port_id, uint16_t queue_id,
  *     (-ENOTSUP) if the device does not support this function
  */
 static inline int
-rte_eth_rx_queue_count(uint8_t port_id, uint16_t queue_id)
+rte_eth_rx_queue_count(uint16_t port_id, uint16_t queue_id)
 {
 	struct rte_eth_dev *dev;
 
@@ -2838,7 +2838,7 @@ rte_eth_rx_queue_count(uint8_t port_id, uint16_t queue_id)
  *  - (-ENOTSUP) if the device does not support this function
  */
 static inline int
-rte_eth_rx_descriptor_done(uint8_t port_id, uint16_t queue_id, uint16_t offset)
+rte_eth_rx_descriptor_done(uint16_t port_id, uint16_t queue_id, uint16_t offset)
 {
 	struct rte_eth_dev *dev = &rte_eth_devices[port_id];
 	RTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -ENODEV);
@@ -2885,7 +2885,7 @@ rte_eth_rx_descriptor_done(uint8_t port_id, uint16_t queue_id, uint16_t offset)
  *  - (-ENODEV) bad port or queue (only if compiled with debug).
  */
 static inline int
-rte_eth_rx_descriptor_status(uint8_t port_id, uint16_t queue_id,
+rte_eth_rx_descriptor_status(uint16_t port_id, uint16_t queue_id,
 	uint16_t offset)
 {
 	struct rte_eth_dev *dev;
@@ -2942,7 +2942,7 @@ rte_eth_rx_descriptor_status(uint8_t port_id, uint16_t queue_id,
  *  - (-ENOTSUP) if the device does not support this function.
  *  - (-ENODEV) bad port or queue (only if compiled with debug).
  */
-static inline int rte_eth_tx_descriptor_status(uint8_t port_id,
+static inline int rte_eth_tx_descriptor_status(uint16_t port_id,
 	uint16_t queue_id, uint16_t offset)
 {
 	struct rte_eth_dev *dev;
@@ -3026,7 +3026,7 @@ static inline int rte_eth_tx_descriptor_status(uint8_t port_id,
  *   *tx_pkts* parameter when the transmit ring is full or has been filled up.
  */
 static inline uint16_t
-rte_eth_tx_burst(uint8_t port_id, uint16_t queue_id,
+rte_eth_tx_burst(uint16_t port_id, uint16_t queue_id,
 		 struct rte_mbuf **tx_pkts, uint16_t nb_pkts)
 {
 	struct rte_eth_dev *dev = &rte_eth_devices[port_id];
@@ -3115,7 +3115,7 @@ rte_eth_tx_burst(uint8_t port_id, uint16_t queue_id,
 #ifndef RTE_ETHDEV_TX_PREPARE_NOOP
 
 static inline uint16_t
-rte_eth_tx_prepare(uint8_t port_id, uint16_t queue_id,
+rte_eth_tx_prepare(uint16_t port_id, uint16_t queue_id,
 		struct rte_mbuf **tx_pkts, uint16_t nb_pkts)
 {
 	struct rte_eth_dev *dev;
@@ -3157,7 +3157,8 @@ rte_eth_tx_prepare(uint8_t port_id, uint16_t queue_id,
  */
 
 static inline uint16_t
-rte_eth_tx_prepare(__rte_unused uint8_t port_id, __rte_unused uint16_t queue_id,
+rte_eth_tx_prepare(__rte_unused uint16_t port_id,
+		__rte_unused uint16_t queue_id,
 		__rte_unused struct rte_mbuf **tx_pkts, uint16_t nb_pkts)
 {
 	return nb_pkts;
@@ -3226,7 +3227,7 @@ rte_eth_tx_buffer_init(struct rte_eth_dev_tx_buffer *buffer, uint16_t size);
  *   callback is called for any packets which could not be sent.
  */
 static inline uint16_t
-rte_eth_tx_buffer_flush(uint8_t port_id, uint16_t queue_id,
+rte_eth_tx_buffer_flush(uint16_t port_id, uint16_t queue_id,
 		struct rte_eth_dev_tx_buffer *buffer)
 {
 	uint16_t sent;
@@ -3278,7 +3279,7 @@ rte_eth_tx_buffer_flush(uint8_t port_id, uint16_t queue_id,
  *     the rest.
  */
 static __rte_always_inline uint16_t
-rte_eth_tx_buffer(uint8_t port_id, uint16_t queue_id,
+rte_eth_tx_buffer(uint16_t port_id, uint16_t queue_id,
 		struct rte_eth_dev_tx_buffer *buffer, struct rte_mbuf *tx_pkt)
 {
 	buffer->pkts[buffer->length++] = tx_pkt;
@@ -3394,7 +3395,7 @@ rte_eth_tx_buffer_count_callback(struct rte_mbuf **pkts, uint16_t unsent,
  *     are in use.
  */
 int
-rte_eth_tx_done_cleanup(uint8_t port_id, uint16_t queue_id, uint32_t free_cnt);
+rte_eth_tx_done_cleanup(uint16_t port_id, uint16_t queue_id, uint32_t free_cnt);
 
 /**
  * The eth device event type for interrupt, and maybe others in the future.
@@ -3412,7 +3413,7 @@ enum rte_eth_event_type {
 	RTE_ETH_EVENT_MAX       /**< max value of this enum */
 };
 
-typedef int (*rte_eth_dev_cb_fn)(uint8_t port_id,
+typedef int (*rte_eth_dev_cb_fn)(uint16_t port_id,
 		enum rte_eth_event_type event, void *cb_arg, void *ret_param);
 /**< user application callback to be registered for interrupts */
 
@@ -3434,7 +3435,7 @@ typedef int (*rte_eth_dev_cb_fn)(uint8_t port_id,
  *  - On success, zero.
  *  - On failure, a negative value.
  */
-int rte_eth_dev_callback_register(uint8_t port_id,
+int rte_eth_dev_callback_register(uint16_t port_id,
 			enum rte_eth_event_type event,
 		rte_eth_dev_cb_fn cb_fn, void *cb_arg);
 
@@ -3455,7 +3456,7 @@ int rte_eth_dev_callback_register(uint8_t port_id,
  *  - On success, zero.
  *  - On failure, a negative value.
  */
-int rte_eth_dev_callback_unregister(uint8_t port_id,
+int rte_eth_dev_callback_unregister(uint16_t port_id,
 			enum rte_eth_event_type event,
 		rte_eth_dev_cb_fn cb_fn, void *cb_arg);
 
@@ -3501,7 +3502,7 @@ int _rte_eth_dev_callback_process(struct rte_eth_dev *dev,
  *     that operation.
  *   - (-ENODEV) if *port_id* invalid.
  */
-int rte_eth_dev_rx_intr_enable(uint8_t port_id, uint16_t queue_id);
+int rte_eth_dev_rx_intr_enable(uint16_t port_id, uint16_t queue_id);
 
 /**
  * When lcore wakes up from rx interrupt indicating packet coming, disable rx
@@ -3522,7 +3523,7 @@ int rte_eth_dev_rx_intr_enable(uint8_t port_id, uint16_t queue_id);
  *     that operation.
  *   - (-ENODEV) if *port_id* invalid.
  */
-int rte_eth_dev_rx_intr_disable(uint8_t port_id, uint16_t queue_id);
+int rte_eth_dev_rx_intr_disable(uint16_t port_id, uint16_t queue_id);
 
 /**
  * RX Interrupt control per port.
@@ -3541,7 +3542,7 @@ int rte_eth_dev_rx_intr_disable(uint8_t port_id, uint16_t queue_id);
  *   - On success, zero.
  *   - On failure, a negative value.
  */
-int rte_eth_dev_rx_intr_ctl(uint8_t port_id, int epfd, int op, void *data);
+int rte_eth_dev_rx_intr_ctl(uint16_t port_id, int epfd, int op, void *data);
 
 /**
  * RX Interrupt control per queue.
@@ -3564,7 +3565,7 @@ int rte_eth_dev_rx_intr_ctl(uint8_t port_id, int epfd, int op, void *data);
  *   - On success, zero.
  *   - On failure, a negative value.
  */
-int rte_eth_dev_rx_intr_ctl_q(uint8_t port_id, uint16_t queue_id,
+int rte_eth_dev_rx_intr_ctl_q(uint16_t port_id, uint16_t queue_id,
 			      int epfd, int op, void *data);
 
 /**
@@ -3579,7 +3580,7 @@ int rte_eth_dev_rx_intr_ctl_q(uint8_t port_id, uint16_t queue_id,
  *     that operation.
  *   - (-ENODEV) if *port_id* invalid.
  */
-int  rte_eth_led_on(uint8_t port_id);
+int  rte_eth_led_on(uint16_t port_id);
 
 /**
  * Turn off the LED on the Ethernet device.
@@ -3593,7 +3594,7 @@ int  rte_eth_led_on(uint8_t port_id);
  *     that operation.
  *   - (-ENODEV) if *port_id* invalid.
  */
-int  rte_eth_led_off(uint8_t port_id);
+int  rte_eth_led_off(uint16_t port_id);
 
 /**
  * Get current status of the Ethernet link flow control for Ethernet device
@@ -3607,7 +3608,7 @@ int  rte_eth_led_off(uint8_t port_id);
  *   - (-ENOTSUP) if hardware doesn't support flow control.
  *   - (-ENODEV)  if *port_id* invalid.
  */
-int rte_eth_dev_flow_ctrl_get(uint8_t port_id,
+int rte_eth_dev_flow_ctrl_get(uint16_t port_id,
 			      struct rte_eth_fc_conf *fc_conf);
 
 /**
@@ -3624,7 +3625,7 @@ int rte_eth_dev_flow_ctrl_get(uint8_t port_id,
  *   - (-EINVAL)  if bad parameter
  *   - (-EIO)     if flow control setup failure
  */
-int rte_eth_dev_flow_ctrl_set(uint8_t port_id,
+int rte_eth_dev_flow_ctrl_set(uint16_t port_id,
 			      struct rte_eth_fc_conf *fc_conf);
 
 /**
@@ -3642,7 +3643,7 @@ int rte_eth_dev_flow_ctrl_set(uint8_t port_id,
  *   - (-EINVAL)  if bad parameter
  *   - (-EIO)     if flow control setup failure
  */
-int rte_eth_dev_priority_flow_ctrl_set(uint8_t port_id,
+int rte_eth_dev_priority_flow_ctrl_set(uint16_t port_id,
 				struct rte_eth_pfc_conf *pfc_conf);
 
 /**
@@ -3663,7 +3664,7 @@ int rte_eth_dev_priority_flow_ctrl_set(uint8_t port_id,
  *   - (-ENOSPC) if no more MAC addresses can be added.
  *   - (-EINVAL) if MAC address is invalid.
  */
-int rte_eth_dev_mac_addr_add(uint8_t port, struct ether_addr *mac_addr,
+int rte_eth_dev_mac_addr_add(uint16_t port, struct ether_addr *mac_addr,
 				uint32_t pool);
 
 /**
@@ -3679,7 +3680,7 @@ int rte_eth_dev_mac_addr_add(uint8_t port, struct ether_addr *mac_addr,
  *   - (-ENODEV) if *port* invalid.
  *   - (-EADDRINUSE) if attempting to remove the default MAC address
  */
-int rte_eth_dev_mac_addr_remove(uint8_t port, struct ether_addr *mac_addr);
+int rte_eth_dev_mac_addr_remove(uint16_t port, struct ether_addr *mac_addr);
 
 /**
  * Set the default MAC address.
@@ -3694,8 +3695,8 @@ int rte_eth_dev_mac_addr_remove(uint8_t port, struct ether_addr *mac_addr);
  *   - (-ENODEV) if *port* invalid.
  *   - (-EINVAL) if MAC address is invalid.
  */
-int rte_eth_dev_default_mac_addr_set(uint8_t port, struct ether_addr *mac_addr);
-
+int rte_eth_dev_default_mac_addr_set(uint16_t port,
+		struct ether_addr *mac_addr);
 
 /**
  * Update Redirection Table(RETA) of Receive Side Scaling of Ethernet device.
@@ -3712,7 +3713,7 @@ int rte_eth_dev_default_mac_addr_set(uint8_t port, struct ether_addr *mac_addr);
  *   - (-ENOTSUP) if hardware doesn't support.
  *   - (-EINVAL) if bad parameter.
  */
-int rte_eth_dev_rss_reta_update(uint8_t port,
+int rte_eth_dev_rss_reta_update(uint16_t port,
 				struct rte_eth_rss_reta_entry64 *reta_conf,
 				uint16_t reta_size);
 
@@ -3731,7 +3732,7 @@ int rte_eth_dev_rss_reta_update(uint8_t port,
  *   - (-ENOTSUP) if hardware doesn't support.
  *   - (-EINVAL) if bad parameter.
  */
-int rte_eth_dev_rss_reta_query(uint8_t port,
+int rte_eth_dev_rss_reta_query(uint16_t port,
 			       struct rte_eth_rss_reta_entry64 *reta_conf,
 			       uint16_t reta_size);
 
@@ -3753,8 +3754,8 @@ int rte_eth_dev_rss_reta_query(uint8_t port,
   *  - (-ENODEV) if *port_id* invalid.
  *   - (-EINVAL) if bad parameter.
  */
-int rte_eth_dev_uc_hash_table_set(uint8_t port,struct ether_addr *addr,
-					uint8_t on);
+int rte_eth_dev_uc_hash_table_set(uint16_t port, struct ether_addr *addr,
+				  uint8_t on);
 
  /**
  * Updates all unicast hash bitmaps for receiving packet with any Unicast
@@ -3773,7 +3774,7 @@ int rte_eth_dev_uc_hash_table_set(uint8_t port,struct ether_addr *addr,
   *  - (-ENODEV) if *port_id* invalid.
  *   - (-EINVAL) if bad parameter.
  */
-int rte_eth_dev_uc_all_hash_table_set(uint8_t port,uint8_t on);
+int rte_eth_dev_uc_all_hash_table_set(uint16_t port, uint8_t on);
 
 /**
  * Set a traffic mirroring rule on an Ethernet device
@@ -3796,7 +3797,7 @@ int rte_eth_dev_uc_all_hash_table_set(uint8_t port,uint8_t on);
  *   - (-ENODEV) if *port_id* invalid.
  *   - (-EINVAL) if the mr_conf information is not correct.
  */
-int rte_eth_mirror_rule_set(uint8_t port_id,
+int rte_eth_mirror_rule_set(uint16_t port_id,
 			struct rte_eth_mirror_conf *mirror_conf,
 			uint8_t rule_id,
 			uint8_t on);
@@ -3814,7 +3815,7 @@ int rte_eth_mirror_rule_set(uint8_t port_id,
  *   - (-ENODEV) if *port_id* invalid.
  *   - (-EINVAL) if bad parameter.
  */
-int rte_eth_mirror_rule_reset(uint8_t port_id,
+int rte_eth_mirror_rule_reset(uint16_t port_id,
 					 uint8_t rule_id);
 
 /**
@@ -3832,7 +3833,7 @@ int rte_eth_mirror_rule_reset(uint8_t port_id,
  *   - (-ENODEV) if *port_id* invalid.
  *   - (-EINVAL) if bad parameter.
  */
-int rte_eth_set_queue_rate_limit(uint8_t port_id, uint16_t queue_idx,
+int rte_eth_set_queue_rate_limit(uint16_t port_id, uint16_t queue_idx,
 			uint16_t tx_rate);
 
  /**
@@ -3848,7 +3849,7 @@ int rte_eth_set_queue_rate_limit(uint8_t port_id, uint16_t queue_idx,
  *   - (-ENOTSUP) if hardware doesn't support.
  *   - (-EINVAL) if bad parameter.
  */
-int rte_eth_dev_rss_hash_update(uint8_t port_id,
+int rte_eth_dev_rss_hash_update(uint16_t port_id,
 				struct rte_eth_rss_conf *rss_conf);
 
  /**
@@ -3865,7 +3866,7 @@ int rte_eth_dev_rss_hash_update(uint8_t port_id,
  *   - (-ENOTSUP) if hardware doesn't support RSS.
  */
 int
-rte_eth_dev_rss_hash_conf_get(uint8_t port_id,
+rte_eth_dev_rss_hash_conf_get(uint16_t port_id,
 			      struct rte_eth_rss_conf *rss_conf);
 
  /**
@@ -3886,7 +3887,7 @@ rte_eth_dev_rss_hash_conf_get(uint8_t port_id,
  *   - (-ENOTSUP) if hardware doesn't support tunnel type.
  */
 int
-rte_eth_dev_udp_tunnel_port_add(uint8_t port_id,
+rte_eth_dev_udp_tunnel_port_add(uint16_t port_id,
 				struct rte_eth_udp_tunnel *tunnel_udp);
 
  /**
@@ -3908,7 +3909,7 @@ rte_eth_dev_udp_tunnel_port_add(uint8_t port_id,
  *   - (-ENOTSUP) if hardware doesn't support tunnel type.
  */
 int
-rte_eth_dev_udp_tunnel_port_delete(uint8_t port_id,
+rte_eth_dev_udp_tunnel_port_delete(uint16_t port_id,
 				   struct rte_eth_udp_tunnel *tunnel_udp);
 
 /**
@@ -3924,7 +3925,8 @@ rte_eth_dev_udp_tunnel_port_delete(uint8_t port_id,
  *   - (-ENOTSUP) if hardware doesn't support this filter type.
  *   - (-ENODEV) if *port_id* invalid.
  */
-int rte_eth_dev_filter_supported(uint8_t port_id, enum rte_filter_type filter_type);
+int rte_eth_dev_filter_supported(uint16_t port_id,
+		enum rte_filter_type filter_type);
 
 /**
  * Take operations to assigned filter type on an Ethernet device.
@@ -3944,7 +3946,7 @@ int rte_eth_dev_filter_supported(uint8_t port_id, enum rte_filter_type filter_ty
  *   - (-ENODEV) if *port_id* invalid.
  *   - others depends on the specific operations implementation.
  */
-int rte_eth_dev_filter_ctrl(uint8_t port_id, enum rte_filter_type filter_type,
+int rte_eth_dev_filter_ctrl(uint16_t port_id, enum rte_filter_type filter_type,
 			enum rte_filter_op filter_op, void *arg);
 
 /**
@@ -3959,7 +3961,7 @@ int rte_eth_dev_filter_ctrl(uint8_t port_id, enum rte_filter_type filter_type,
  *   - (-ENODEV) if port identifier is invalid.
  *   - (-ENOTSUP) if hardware doesn't support.
  */
-int rte_eth_dev_get_dcb_info(uint8_t port_id,
+int rte_eth_dev_get_dcb_info(uint16_t port_id,
 			     struct rte_eth_dcb_info *dcb_info);
 
 /**
@@ -3986,7 +3988,7 @@ int rte_eth_dev_get_dcb_info(uint8_t port_id,
  *   NULL on error.
  *   On success, a pointer value which can later be used to remove the callback.
  */
-void *rte_eth_add_rx_callback(uint8_t port_id, uint16_t queue_id,
+void *rte_eth_add_rx_callback(uint16_t port_id, uint16_t queue_id,
 		rte_rx_callback_fn fn, void *user_param);
 
 /**
@@ -4014,7 +4016,7 @@ void *rte_eth_add_rx_callback(uint8_t port_id, uint16_t queue_id,
  *   NULL on error.
  *   On success, a pointer value which can later be used to remove the callback.
  */
-void *rte_eth_add_first_rx_callback(uint8_t port_id, uint16_t queue_id,
+void *rte_eth_add_first_rx_callback(uint16_t port_id, uint16_t queue_id,
 		rte_rx_callback_fn fn, void *user_param);
 
 /**
@@ -4041,7 +4043,7 @@ void *rte_eth_add_first_rx_callback(uint8_t port_id, uint16_t queue_id,
  *   NULL on error.
  *   On success, a pointer value which can later be used to remove the callback.
  */
-void *rte_eth_add_tx_callback(uint8_t port_id, uint16_t queue_id,
+void *rte_eth_add_tx_callback(uint16_t port_id, uint16_t queue_id,
 		rte_tx_callback_fn fn, void *user_param);
 
 /**
@@ -4074,7 +4076,7 @@ void *rte_eth_add_tx_callback(uint8_t port_id, uint16_t queue_id,
  *   - -EINVAL:  The port_id or the queue_id is out of range, or the callback
  *               is NULL or not found for the port/queue.
  */
-int rte_eth_remove_rx_callback(uint8_t port_id, uint16_t queue_id,
+int rte_eth_remove_rx_callback(uint16_t port_id, uint16_t queue_id,
 		struct rte_eth_rxtx_callback *user_cb);
 
 /**
@@ -4107,7 +4109,7 @@ int rte_eth_remove_rx_callback(uint8_t port_id, uint16_t queue_id,
  *   - -EINVAL:  The port_id or the queue_id is out of range, or the callback
  *               is NULL or not found for the port/queue.
  */
-int rte_eth_remove_tx_callback(uint8_t port_id, uint16_t queue_id,
+int rte_eth_remove_tx_callback(uint16_t port_id, uint16_t queue_id,
 		struct rte_eth_rxtx_callback *user_cb);
 
 /**
@@ -4127,7 +4129,7 @@ int rte_eth_remove_tx_callback(uint8_t port_id, uint16_t queue_id,
  *   - -ENOTSUP: routine is not supported by the device PMD.
  *   - -EINVAL:  The port_id or the queue_id is out of range.
  */
-int rte_eth_rx_queue_info_get(uint8_t port_id, uint16_t queue_id,
+int rte_eth_rx_queue_info_get(uint16_t port_id, uint16_t queue_id,
 	struct rte_eth_rxq_info *qinfo);
 
 /**
@@ -4147,7 +4149,7 @@ int rte_eth_rx_queue_info_get(uint8_t port_id, uint16_t queue_id,
  *   - -ENOTSUP: routine is not supported by the device PMD.
  *   - -EINVAL:  The port_id or the queue_id is out of range.
  */
-int rte_eth_tx_queue_info_get(uint8_t port_id, uint16_t queue_id,
+int rte_eth_tx_queue_info_get(uint16_t port_id, uint16_t queue_id,
 	struct rte_eth_txq_info *qinfo);
 
 /**
@@ -4166,7 +4168,7 @@ int rte_eth_tx_queue_info_get(uint8_t port_id, uint16_t queue_id,
  *   - (-ENODEV) if *port_id* invalid.
  *   - others depends on the specific operations implementation.
  */
-int rte_eth_dev_get_reg_info(uint8_t port_id, struct rte_dev_reg_info *info);
+int rte_eth_dev_get_reg_info(uint16_t port_id, struct rte_dev_reg_info *info);
 
 /**
  * Retrieve size of device EEPROM
@@ -4179,7 +4181,7 @@ int rte_eth_dev_get_reg_info(uint8_t port_id, struct rte_dev_reg_info *info);
  *   - (-ENODEV) if *port_id* invalid.
  *   - others depends on the specific operations implementation.
  */
-int rte_eth_dev_get_eeprom_length(uint8_t port_id);
+int rte_eth_dev_get_eeprom_length(uint16_t port_id);
 
 /**
  * Retrieve EEPROM and EEPROM attribute
@@ -4195,7 +4197,7 @@ int rte_eth_dev_get_eeprom_length(uint8_t port_id);
  *   - (-ENODEV) if *port_id* invalid.
  *   - others depends on the specific operations implementation.
  */
-int rte_eth_dev_get_eeprom(uint8_t port_id, struct rte_dev_eeprom_info *info);
+int rte_eth_dev_get_eeprom(uint16_t port_id, struct rte_dev_eeprom_info *info);
 
 /**
  * Program EEPROM with provided data
@@ -4211,7 +4213,7 @@ int rte_eth_dev_get_eeprom(uint8_t port_id, struct rte_dev_eeprom_info *info);
  *   - (-ENODEV) if *port_id* invalid.
  *   - others depends on the specific operations implementation.
  */
-int rte_eth_dev_set_eeprom(uint8_t port_id, struct rte_dev_eeprom_info *info);
+int rte_eth_dev_set_eeprom(uint16_t port_id, struct rte_dev_eeprom_info *info);
 
 /**
  * Set the list of multicast addresses to filter on an Ethernet device.
@@ -4230,7 +4232,7 @@ int rte_eth_dev_set_eeprom(uint8_t port_id, struct rte_dev_eeprom_info *info);
  *   - (-ENOTSUP) if PMD of *port_id* doesn't support multicast filtering.
  *   - (-ENOSPC) if *port_id* has not enough multicast filtering resources.
  */
-int rte_eth_dev_set_mc_addr_list(uint8_t port_id,
+int rte_eth_dev_set_mc_addr_list(uint16_t port_id,
 				 struct ether_addr *mc_addr_set,
 				 uint32_t nb_mc_addr);
 
@@ -4245,7 +4247,7 @@ int rte_eth_dev_set_mc_addr_list(uint8_t port_id,
  *   - -ENODEV: The port ID is invalid.
  *   - -ENOTSUP: The function is not supported by the Ethernet driver.
  */
-int rte_eth_timesync_enable(uint8_t port_id);
+int rte_eth_timesync_enable(uint16_t port_id);
 
 /**
  * Disable IEEE1588/802.1AS timestamping for an Ethernet device.
@@ -4258,7 +4260,7 @@ int rte_eth_timesync_enable(uint8_t port_id);
  *   - -ENODEV: The port ID is invalid.
  *   - -ENOTSUP: The function is not supported by the Ethernet driver.
  */
-int rte_eth_timesync_disable(uint8_t port_id);
+int rte_eth_timesync_disable(uint16_t port_id);
 
 /**
  * Read an IEEE1588/802.1AS RX timestamp from an Ethernet device.
@@ -4277,7 +4279,7 @@ int rte_eth_timesync_disable(uint8_t port_id);
  *   - -ENODEV: The port ID is invalid.
  *   - -ENOTSUP: The function is not supported by the Ethernet driver.
  */
-int rte_eth_timesync_read_rx_timestamp(uint8_t port_id,
+int rte_eth_timesync_read_rx_timestamp(uint16_t port_id,
 		struct timespec *timestamp, uint32_t flags);
 
 /**
@@ -4294,7 +4296,7 @@ int rte_eth_timesync_read_rx_timestamp(uint8_t port_id,
  *   - -ENODEV: The port ID is invalid.
  *   - -ENOTSUP: The function is not supported by the Ethernet driver.
  */
-int rte_eth_timesync_read_tx_timestamp(uint8_t port_id,
+int rte_eth_timesync_read_tx_timestamp(uint16_t port_id,
 		struct timespec *timestamp);
 
 /**
@@ -4313,7 +4315,7 @@ int rte_eth_timesync_read_tx_timestamp(uint8_t port_id,
  *   - -ENODEV: The port ID is invalid.
  *   - -ENOTSUP: The function is not supported by the Ethernet driver.
  */
-int rte_eth_timesync_adjust_time(uint8_t port_id, int64_t delta);
+int rte_eth_timesync_adjust_time(uint16_t port_id, int64_t delta);
 
 /**
  * Read the time from the timesync clock on an Ethernet device.
@@ -4329,7 +4331,7 @@ int rte_eth_timesync_adjust_time(uint8_t port_id, int64_t delta);
  * @return
  *   - 0: Success.
  */
-int rte_eth_timesync_read_time(uint8_t port_id, struct timespec *time);
+int rte_eth_timesync_read_time(uint16_t port_id, struct timespec *time);
 
 /**
  * Set the time of the timesync clock on an Ethernet device.
@@ -4348,7 +4350,7 @@ int rte_eth_timesync_read_time(uint8_t port_id, struct timespec *time);
  *   - -ENODEV: The port ID is invalid.
  *   - -ENOTSUP: The function is not supported by the Ethernet driver.
  */
-int rte_eth_timesync_write_time(uint8_t port_id, const struct timespec *time);
+int rte_eth_timesync_write_time(uint16_t port_id, const struct timespec *time);
 
 /**
  * Create memzone for HW rings.
@@ -4389,7 +4391,7 @@ rte_eth_dma_zone_reserve(const struct rte_eth_dev *eth_dev, const char *name,
  *   - (-ENOTSUP) if hardware doesn't support tunnel type.
  */
 int
-rte_eth_dev_l2_tunnel_eth_type_conf(uint8_t port_id,
+rte_eth_dev_l2_tunnel_eth_type_conf(uint16_t port_id,
 				    struct rte_eth_l2_tunnel_conf *l2_tunnel);
 
 /**
@@ -4416,7 +4418,7 @@ rte_eth_dev_l2_tunnel_eth_type_conf(uint8_t port_id,
  *   - (-ENOTSUP) if hardware doesn't support tunnel type.
  */
 int
-rte_eth_dev_l2_tunnel_offload_set(uint8_t port_id,
+rte_eth_dev_l2_tunnel_offload_set(uint16_t port_id,
 				  struct rte_eth_l2_tunnel_conf *l2_tunnel,
 				  uint32_t mask,
 				  uint8_t en);
@@ -4434,7 +4436,7 @@ rte_eth_dev_l2_tunnel_offload_set(uint8_t port_id,
 *   - (-ENODEV or -EINVAL) on failure.
 */
 int
-rte_eth_dev_get_port_by_name(const char *name, uint8_t *port_id);
+rte_eth_dev_get_port_by_name(const char *name, uint16_t *port_id);
 
 /**
 * Get the device name from port id
@@ -4448,7 +4450,7 @@ rte_eth_dev_get_port_by_name(const char *name, uint8_t *port_id);
 *   - (-EINVAL) on failure.
 */
 int
-rte_eth_dev_get_name_by_port(uint8_t port_id, char *name);
+rte_eth_dev_get_name_by_port(uint16_t port_id, char *name);
 
 /**
  * Check that numbers of Rx and Tx descriptors satisfy descriptors limits from
@@ -4466,7 +4468,7 @@ rte_eth_dev_get_name_by_port(uint8_t port_id, char *name);
  *   - (0) if successful.
  *   - (-ENOTSUP, -ENODEV or -EINVAL) on failure.
  */
-int rte_eth_dev_adjust_nb_rx_tx_desc(uint8_t port_id,
+int rte_eth_dev_adjust_nb_rx_tx_desc(uint16_t port_id,
 				     uint16_t *nb_rx_desc,
 				     uint16_t *nb_tx_desc);
 
diff --git a/lib/librte_ether/rte_flow.c b/lib/librte_ether/rte_flow.c
index 2001fbbf4..95d9ee007 100644
--- a/lib/librte_ether/rte_flow.c
+++ b/lib/librte_ether/rte_flow.c
@@ -108,7 +108,7 @@ static const struct rte_flow_desc_data rte_flow_desc_action[] = {
 
 /* Get generic flow operations structure from a port. */
 const struct rte_flow_ops *
-rte_flow_ops_get(uint8_t port_id, struct rte_flow_error *error)
+rte_flow_ops_get(uint16_t port_id, struct rte_flow_error *error)
 {
 	struct rte_eth_dev *dev = &rte_eth_devices[port_id];
 	const struct rte_flow_ops *ops;
diff --git a/lib/librte_ether/rte_flow_driver.h b/lib/librte_ether/rte_flow_driver.h
index 4d95391d8..8573cefa3 100644
--- a/lib/librte_ether/rte_flow_driver.h
+++ b/lib/librte_ether/rte_flow_driver.h
@@ -178,7 +178,7 @@ rte_flow_error_set(struct rte_flow_error *error,
  *   additional details.
  */
 const struct rte_flow_ops *
-rte_flow_ops_get(uint8_t port_id, struct rte_flow_error *error);
+rte_flow_ops_get(uint16_t port_id, struct rte_flow_error *error);
 
 #ifdef __cplusplus
 }
diff --git a/lib/librte_ether/rte_tm.c b/lib/librte_ether/rte_tm.c
index 71679650e..ceac34115 100644
--- a/lib/librte_ether/rte_tm.c
+++ b/lib/librte_ether/rte_tm.c
@@ -40,7 +40,7 @@
 
 /* Get generic traffic manager operations structure from a port. */
 const struct rte_tm_ops *
-rte_tm_ops_get(uint8_t port_id, struct rte_tm_error *error)
+rte_tm_ops_get(uint16_t port_id, struct rte_tm_error *error)
 {
 	struct rte_eth_dev *dev = &rte_eth_devices[port_id];
 	const struct rte_tm_ops *ops;
@@ -87,7 +87,7 @@ rte_tm_ops_get(uint8_t port_id, struct rte_tm_error *error)
 
 /* Get number of leaf nodes */
 int
-rte_tm_get_number_of_leaf_nodes(uint8_t port_id,
+rte_tm_get_number_of_leaf_nodes(uint16_t port_id,
 	uint32_t *n_leaf_nodes,
 	struct rte_tm_error *error)
 {
@@ -113,7 +113,7 @@ rte_tm_get_number_of_leaf_nodes(uint8_t port_id,
 
 /* Check node type (leaf or non-leaf) */
 int
-rte_tm_node_type_get(uint8_t port_id,
+rte_tm_node_type_get(uint16_t port_id,
 	uint32_t node_id,
 	int *is_leaf,
 	struct rte_tm_error *error)
@@ -124,7 +124,7 @@ rte_tm_node_type_get(uint8_t port_id,
 }
 
 /* Get capabilities */
-int rte_tm_capabilities_get(uint8_t port_id,
+int rte_tm_capabilities_get(uint16_t port_id,
 	struct rte_tm_capabilities *cap,
 	struct rte_tm_error *error)
 {
@@ -134,7 +134,7 @@ int rte_tm_capabilities_get(uint8_t port_id,
 }
 
 /* Get level capabilities */
-int rte_tm_level_capabilities_get(uint8_t port_id,
+int rte_tm_level_capabilities_get(uint16_t port_id,
 	uint32_t level_id,
 	struct rte_tm_level_capabilities *cap,
 	struct rte_tm_error *error)
@@ -145,7 +145,7 @@ int rte_tm_level_capabilities_get(uint8_t port_id,
 }
 
 /* Get node capabilities */
-int rte_tm_node_capabilities_get(uint8_t port_id,
+int rte_tm_node_capabilities_get(uint16_t port_id,
 	uint32_t node_id,
 	struct rte_tm_node_capabilities *cap,
 	struct rte_tm_error *error)
@@ -156,7 +156,7 @@ int rte_tm_node_capabilities_get(uint8_t port_id,
 }
 
 /* Add WRED profile */
-int rte_tm_wred_profile_add(uint8_t port_id,
+int rte_tm_wred_profile_add(uint16_t port_id,
 	uint32_t wred_profile_id,
 	struct rte_tm_wred_params *profile,
 	struct rte_tm_error *error)
@@ -167,7 +167,7 @@ int rte_tm_wred_profile_add(uint8_t port_id,
 }
 
 /* Delete WRED profile */
-int rte_tm_wred_profile_delete(uint8_t port_id,
+int rte_tm_wred_profile_delete(uint16_t port_id,
 	uint32_t wred_profile_id,
 	struct rte_tm_error *error)
 {
@@ -177,7 +177,7 @@ int rte_tm_wred_profile_delete(uint8_t port_id,
 }
 
 /* Add/update shared WRED context */
-int rte_tm_shared_wred_context_add_update(uint8_t port_id,
+int rte_tm_shared_wred_context_add_update(uint16_t port_id,
 	uint32_t shared_wred_context_id,
 	uint32_t wred_profile_id,
 	struct rte_tm_error *error)
@@ -188,7 +188,7 @@ int rte_tm_shared_wred_context_add_update(uint8_t port_id,
 }
 
 /* Delete shared WRED context */
-int rte_tm_shared_wred_context_delete(uint8_t port_id,
+int rte_tm_shared_wred_context_delete(uint16_t port_id,
 	uint32_t shared_wred_context_id,
 	struct rte_tm_error *error)
 {
@@ -198,7 +198,7 @@ int rte_tm_shared_wred_context_delete(uint8_t port_id,
 }
 
 /* Add shaper profile */
-int rte_tm_shaper_profile_add(uint8_t port_id,
+int rte_tm_shaper_profile_add(uint16_t port_id,
 	uint32_t shaper_profile_id,
 	struct rte_tm_shaper_params *profile,
 	struct rte_tm_error *error)
@@ -209,7 +209,7 @@ int rte_tm_shaper_profile_add(uint8_t port_id,
 }
 
 /* Delete WRED profile */
-int rte_tm_shaper_profile_delete(uint8_t port_id,
+int rte_tm_shaper_profile_delete(uint16_t port_id,
 	uint32_t shaper_profile_id,
 	struct rte_tm_error *error)
 {
@@ -219,7 +219,7 @@ int rte_tm_shaper_profile_delete(uint8_t port_id,
 }
 
 /* Add shared shaper */
-int rte_tm_shared_shaper_add_update(uint8_t port_id,
+int rte_tm_shared_shaper_add_update(uint16_t port_id,
 	uint32_t shared_shaper_id,
 	uint32_t shaper_profile_id,
 	struct rte_tm_error *error)
@@ -230,7 +230,7 @@ int rte_tm_shared_shaper_add_update(uint8_t port_id,
 }
 
 /* Delete shared shaper */
-int rte_tm_shared_shaper_delete(uint8_t port_id,
+int rte_tm_shared_shaper_delete(uint16_t port_id,
 	uint32_t shared_shaper_id,
 	struct rte_tm_error *error)
 {
@@ -240,7 +240,7 @@ int rte_tm_shared_shaper_delete(uint8_t port_id,
 }
 
 /* Add node to port traffic manager hierarchy */
-int rte_tm_node_add(uint8_t port_id,
+int rte_tm_node_add(uint16_t port_id,
 	uint32_t node_id,
 	uint32_t parent_node_id,
 	uint32_t priority,
@@ -256,7 +256,7 @@ int rte_tm_node_add(uint8_t port_id,
 }
 
 /* Delete node from traffic manager hierarchy */
-int rte_tm_node_delete(uint8_t port_id,
+int rte_tm_node_delete(uint16_t port_id,
 	uint32_t node_id,
 	struct rte_tm_error *error)
 {
@@ -266,7 +266,7 @@ int rte_tm_node_delete(uint8_t port_id,
 }
 
 /* Suspend node */
-int rte_tm_node_suspend(uint8_t port_id,
+int rte_tm_node_suspend(uint16_t port_id,
 	uint32_t node_id,
 	struct rte_tm_error *error)
 {
@@ -276,7 +276,7 @@ int rte_tm_node_suspend(uint8_t port_id,
 }
 
 /* Resume node */
-int rte_tm_node_resume(uint8_t port_id,
+int rte_tm_node_resume(uint16_t port_id,
 	uint32_t node_id,
 	struct rte_tm_error *error)
 {
@@ -286,7 +286,7 @@ int rte_tm_node_resume(uint8_t port_id,
 }
 
 /* Commit the initial port traffic manager hierarchy */
-int rte_tm_hierarchy_commit(uint8_t port_id,
+int rte_tm_hierarchy_commit(uint16_t port_id,
 	int clear_on_fail,
 	struct rte_tm_error *error)
 {
@@ -296,7 +296,7 @@ int rte_tm_hierarchy_commit(uint8_t port_id,
 }
 
 /* Update node parent  */
-int rte_tm_node_parent_update(uint8_t port_id,
+int rte_tm_node_parent_update(uint16_t port_id,
 	uint32_t node_id,
 	uint32_t parent_node_id,
 	uint32_t priority,
@@ -309,7 +309,7 @@ int rte_tm_node_parent_update(uint8_t port_id,
 }
 
 /* Update node private shaper */
-int rte_tm_node_shaper_update(uint8_t port_id,
+int rte_tm_node_shaper_update(uint16_t port_id,
 	uint32_t node_id,
 	uint32_t shaper_profile_id,
 	struct rte_tm_error *error)
@@ -320,7 +320,7 @@ int rte_tm_node_shaper_update(uint8_t port_id,
 }
 
 /* Update node shared shapers */
-int rte_tm_node_shared_shaper_update(uint8_t port_id,
+int rte_tm_node_shared_shaper_update(uint16_t port_id,
 	uint32_t node_id,
 	uint32_t shared_shaper_id,
 	int add,
@@ -332,7 +332,7 @@ int rte_tm_node_shared_shaper_update(uint8_t port_id,
 }
 
 /* Update node stats */
-int rte_tm_node_stats_update(uint8_t port_id,
+int rte_tm_node_stats_update(uint16_t port_id,
 	uint32_t node_id,
 	uint64_t stats_mask,
 	struct rte_tm_error *error)
@@ -343,7 +343,7 @@ int rte_tm_node_stats_update(uint8_t port_id,
 }
 
 /* Update WFQ weight mode */
-int rte_tm_node_wfq_weight_mode_update(uint8_t port_id,
+int rte_tm_node_wfq_weight_mode_update(uint16_t port_id,
 	uint32_t node_id,
 	int *wfq_weight_mode,
 	uint32_t n_sp_priorities,
@@ -355,7 +355,7 @@ int rte_tm_node_wfq_weight_mode_update(uint8_t port_id,
 }
 
 /* Update node congestion management mode */
-int rte_tm_node_cman_update(uint8_t port_id,
+int rte_tm_node_cman_update(uint16_t port_id,
 	uint32_t node_id,
 	enum rte_tm_cman_mode cman,
 	struct rte_tm_error *error)
@@ -366,7 +366,7 @@ int rte_tm_node_cman_update(uint8_t port_id,
 }
 
 /* Update node private WRED context */
-int rte_tm_node_wred_context_update(uint8_t port_id,
+int rte_tm_node_wred_context_update(uint16_t port_id,
 	uint32_t node_id,
 	uint32_t wred_profile_id,
 	struct rte_tm_error *error)
@@ -377,7 +377,7 @@ int rte_tm_node_wred_context_update(uint8_t port_id,
 }
 
 /* Update node shared WRED context */
-int rte_tm_node_shared_wred_context_update(uint8_t port_id,
+int rte_tm_node_shared_wred_context_update(uint16_t port_id,
 	uint32_t node_id,
 	uint32_t shared_wred_context_id,
 	int add,
@@ -389,7 +389,7 @@ int rte_tm_node_shared_wred_context_update(uint8_t port_id,
 }
 
 /* Read and/or clear stats counters for specific node */
-int rte_tm_node_stats_read(uint8_t port_id,
+int rte_tm_node_stats_read(uint16_t port_id,
 	uint32_t node_id,
 	struct rte_tm_node_stats *stats,
 	uint64_t *stats_mask,
@@ -402,7 +402,7 @@ int rte_tm_node_stats_read(uint8_t port_id,
 }
 
 /* Packet marking - VLAN DEI */
-int rte_tm_mark_vlan_dei(uint8_t port_id,
+int rte_tm_mark_vlan_dei(uint16_t port_id,
 	int mark_green,
 	int mark_yellow,
 	int mark_red,
@@ -414,7 +414,7 @@ int rte_tm_mark_vlan_dei(uint8_t port_id,
 }
 
 /* Packet marking - IPv4/IPv6 ECN */
-int rte_tm_mark_ip_ecn(uint8_t port_id,
+int rte_tm_mark_ip_ecn(uint16_t port_id,
 	int mark_green,
 	int mark_yellow,
 	int mark_red,
@@ -426,7 +426,7 @@ int rte_tm_mark_ip_ecn(uint8_t port_id,
 }
 
 /* Packet marking - IPv4/IPv6 DSCP */
-int rte_tm_mark_ip_dscp(uint8_t port_id,
+int rte_tm_mark_ip_dscp(uint16_t port_id,
 	int mark_green,
 	int mark_yellow,
 	int mark_red,
diff --git a/lib/librte_ether/rte_tm.h b/lib/librte_ether/rte_tm.h
index ebbfa1eec..2b25a8715 100644
--- a/lib/librte_ether/rte_tm.h
+++ b/lib/librte_ether/rte_tm.h
@@ -1040,7 +1040,7 @@ struct rte_tm_error {
  *   0 on success, non-zero error code otherwise.
  */
 int
-rte_tm_get_number_of_leaf_nodes(uint8_t port_id,
+rte_tm_get_number_of_leaf_nodes(uint16_t port_id,
 	uint32_t *n_leaf_nodes,
 	struct rte_tm_error *error);
 
@@ -1064,7 +1064,7 @@ rte_tm_get_number_of_leaf_nodes(uint8_t port_id,
  *   0 on success, non-zero error code otherwise.
  */
 int
-rte_tm_node_type_get(uint8_t port_id,
+rte_tm_node_type_get(uint16_t port_id,
 	uint32_t node_id,
 	int *is_leaf,
 	struct rte_tm_error *error);
@@ -1082,7 +1082,7 @@ rte_tm_node_type_get(uint8_t port_id,
  *   0 on success, non-zero error code otherwise.
  */
 int
-rte_tm_capabilities_get(uint8_t port_id,
+rte_tm_capabilities_get(uint16_t port_id,
 	struct rte_tm_capabilities *cap,
 	struct rte_tm_error *error);
 
@@ -1102,7 +1102,7 @@ rte_tm_capabilities_get(uint8_t port_id,
  *   0 on success, non-zero error code otherwise.
  */
 int
-rte_tm_level_capabilities_get(uint8_t port_id,
+rte_tm_level_capabilities_get(uint16_t port_id,
 	uint32_t level_id,
 	struct rte_tm_level_capabilities *cap,
 	struct rte_tm_error *error);
@@ -1122,7 +1122,7 @@ rte_tm_level_capabilities_get(uint8_t port_id,
  *   0 on success, non-zero error code otherwise.
  */
 int
-rte_tm_node_capabilities_get(uint8_t port_id,
+rte_tm_node_capabilities_get(uint16_t port_id,
 	uint32_t node_id,
 	struct rte_tm_node_capabilities *cap,
 	struct rte_tm_error *error);
@@ -1147,7 +1147,7 @@ rte_tm_node_capabilities_get(uint8_t port_id,
  * @see struct rte_tm_capabilities::cman_wred_context_n_max
  */
 int
-rte_tm_wred_profile_add(uint8_t port_id,
+rte_tm_wred_profile_add(uint16_t port_id,
 	uint32_t wred_profile_id,
 	struct rte_tm_wred_params *profile,
 	struct rte_tm_error *error);
@@ -1170,7 +1170,7 @@ rte_tm_wred_profile_add(uint8_t port_id,
  * @see struct rte_tm_capabilities::cman_wred_context_n_max
  */
 int
-rte_tm_wred_profile_delete(uint8_t port_id,
+rte_tm_wred_profile_delete(uint16_t port_id,
 	uint32_t wred_profile_id,
 	struct rte_tm_error *error);
 
@@ -1201,7 +1201,7 @@ rte_tm_wred_profile_delete(uint8_t port_id,
  * @see struct rte_tm_capabilities::cman_wred_context_shared_n_max
  */
 int
-rte_tm_shared_wred_context_add_update(uint8_t port_id,
+rte_tm_shared_wred_context_add_update(uint16_t port_id,
 	uint32_t shared_wred_context_id,
 	uint32_t wred_profile_id,
 	struct rte_tm_error *error);
@@ -1225,7 +1225,7 @@ rte_tm_shared_wred_context_add_update(uint8_t port_id,
  * @see struct rte_tm_capabilities::cman_wred_context_shared_n_max
  */
 int
-rte_tm_shared_wred_context_delete(uint8_t port_id,
+rte_tm_shared_wred_context_delete(uint16_t port_id,
 	uint32_t shared_wred_context_id,
 	struct rte_tm_error *error);
 
@@ -1249,7 +1249,7 @@ rte_tm_shared_wred_context_delete(uint8_t port_id,
  * @see struct rte_tm_capabilities::shaper_n_max
  */
 int
-rte_tm_shaper_profile_add(uint8_t port_id,
+rte_tm_shaper_profile_add(uint16_t port_id,
 	uint32_t shaper_profile_id,
 	struct rte_tm_shaper_params *profile,
 	struct rte_tm_error *error);
@@ -1272,7 +1272,7 @@ rte_tm_shaper_profile_add(uint8_t port_id,
  * @see struct rte_tm_capabilities::shaper_n_max
  */
 int
-rte_tm_shaper_profile_delete(uint8_t port_id,
+rte_tm_shaper_profile_delete(uint16_t port_id,
 	uint32_t shaper_profile_id,
 	struct rte_tm_error *error);
 
@@ -1301,7 +1301,7 @@ rte_tm_shaper_profile_delete(uint8_t port_id,
  * @see struct rte_tm_capabilities::shaper_shared_n_max
  */
 int
-rte_tm_shared_shaper_add_update(uint8_t port_id,
+rte_tm_shared_shaper_add_update(uint16_t port_id,
 	uint32_t shared_shaper_id,
 	uint32_t shaper_profile_id,
 	struct rte_tm_error *error);
@@ -1324,7 +1324,7 @@ rte_tm_shared_shaper_add_update(uint8_t port_id,
  * @see struct rte_tm_capabilities::shaper_shared_n_max
  */
 int
-rte_tm_shared_shaper_delete(uint8_t port_id,
+rte_tm_shared_shaper_delete(uint16_t port_id,
 	uint32_t shared_shaper_id,
 	struct rte_tm_error *error);
 
@@ -1392,7 +1392,7 @@ rte_tm_shared_shaper_delete(uint8_t port_id,
  * @see struct rte_tm_capabilities
  */
 int
-rte_tm_node_add(uint8_t port_id,
+rte_tm_node_add(uint16_t port_id,
 	uint32_t node_id,
 	uint32_t parent_node_id,
 	uint32_t priority,
@@ -1425,7 +1425,7 @@ rte_tm_node_add(uint8_t port_id,
  * @see RTE_TM_UPDATE_NODE_ADD_DELETE
  */
 int
-rte_tm_node_delete(uint8_t port_id,
+rte_tm_node_delete(uint16_t port_id,
 	uint32_t node_id,
 	struct rte_tm_error *error);
 
@@ -1449,7 +1449,7 @@ rte_tm_node_delete(uint8_t port_id,
  * @see RTE_TM_UPDATE_NODE_SUSPEND_RESUME
  */
 int
-rte_tm_node_suspend(uint8_t port_id,
+rte_tm_node_suspend(uint16_t port_id,
 	uint32_t node_id,
 	struct rte_tm_error *error);
 
@@ -1472,7 +1472,7 @@ rte_tm_node_suspend(uint8_t port_id,
  * @see RTE_TM_UPDATE_NODE_SUSPEND_RESUME
  */
 int
-rte_tm_node_resume(uint8_t port_id,
+rte_tm_node_resume(uint16_t port_id,
 	uint32_t node_id,
 	struct rte_tm_error *error);
 
@@ -1513,7 +1513,7 @@ rte_tm_node_resume(uint8_t port_id,
  * @see rte_tm_node_delete()
  */
 int
-rte_tm_hierarchy_commit(uint8_t port_id,
+rte_tm_hierarchy_commit(uint16_t port_id,
 	int clear_on_fail,
 	struct rte_tm_error *error);
 
@@ -1549,7 +1549,7 @@ rte_tm_hierarchy_commit(uint8_t port_id,
  * @see RTE_TM_UPDATE_NODE_PARENT_CHANGE_LEVEL
  */
 int
-rte_tm_node_parent_update(uint8_t port_id,
+rte_tm_node_parent_update(uint16_t port_id,
 	uint32_t node_id,
 	uint32_t parent_node_id,
 	uint32_t priority,
@@ -1578,7 +1578,7 @@ rte_tm_node_parent_update(uint8_t port_id,
  * @see struct rte_tm_capabilities::shaper_private_n_max
  */
 int
-rte_tm_node_shaper_update(uint8_t port_id,
+rte_tm_node_shaper_update(uint16_t port_id,
 	uint32_t node_id,
 	uint32_t shaper_profile_id,
 	struct rte_tm_error *error);
@@ -1605,7 +1605,7 @@ rte_tm_node_shaper_update(uint8_t port_id,
  * @see struct rte_tm_capabilities::shaper_shared_n_max
  */
 int
-rte_tm_node_shared_shaper_update(uint8_t port_id,
+rte_tm_node_shared_shaper_update(uint16_t port_id,
 	uint32_t node_id,
 	uint32_t shared_shaper_id,
 	int add,
@@ -1632,7 +1632,7 @@ rte_tm_node_shared_shaper_update(uint8_t port_id,
  * @see RTE_TM_UPDATE_NODE_STATS
  */
 int
-rte_tm_node_stats_update(uint8_t port_id,
+rte_tm_node_stats_update(uint16_t port_id,
 	uint32_t node_id,
 	uint64_t stats_mask,
 	struct rte_tm_error *error);
@@ -1660,7 +1660,7 @@ rte_tm_node_stats_update(uint8_t port_id,
  * @see RTE_TM_UPDATE_NODE_N_SP_PRIORITIES
  */
 int
-rte_tm_node_wfq_weight_mode_update(uint8_t port_id,
+rte_tm_node_wfq_weight_mode_update(uint16_t port_id,
 	uint32_t node_id,
 	int *wfq_weight_mode,
 	uint32_t n_sp_priorities,
@@ -1683,7 +1683,7 @@ rte_tm_node_wfq_weight_mode_update(uint8_t port_id,
  * @see RTE_TM_UPDATE_NODE_CMAN
  */
 int
-rte_tm_node_cman_update(uint8_t port_id,
+rte_tm_node_cman_update(uint16_t port_id,
 	uint32_t node_id,
 	enum rte_tm_cman_mode cman,
 	struct rte_tm_error *error);
@@ -1707,7 +1707,7 @@ rte_tm_node_cman_update(uint8_t port_id,
  * @see struct rte_tm_capabilities::cman_wred_context_private_n_max
 */
 int
-rte_tm_node_wred_context_update(uint8_t port_id,
+rte_tm_node_wred_context_update(uint16_t port_id,
 	uint32_t node_id,
 	uint32_t wred_profile_id,
 	struct rte_tm_error *error);
@@ -1732,7 +1732,7 @@ rte_tm_node_wred_context_update(uint8_t port_id,
  * @see struct rte_tm_capabilities::cman_wred_context_shared_n_max
  */
 int
-rte_tm_node_shared_wred_context_update(uint8_t port_id,
+rte_tm_node_shared_wred_context_update(uint16_t port_id,
 	uint32_t node_id,
 	uint32_t shared_wred_context_id,
 	int add,
@@ -1764,7 +1764,7 @@ rte_tm_node_shared_wred_context_update(uint8_t port_id,
  * @see enum rte_tm_stats_type
  */
 int
-rte_tm_node_stats_read(uint8_t port_id,
+rte_tm_node_stats_read(uint16_t port_id,
 	uint32_t node_id,
 	struct rte_tm_node_stats *stats,
 	uint64_t *stats_mask,
@@ -1801,7 +1801,7 @@ rte_tm_node_stats_read(uint8_t port_id,
  * @see struct rte_tm_capabilities::mark_vlan_dei_supported
  */
 int
-rte_tm_mark_vlan_dei(uint8_t port_id,
+rte_tm_mark_vlan_dei(uint16_t port_id,
 	int mark_green,
 	int mark_yellow,
 	int mark_red,
@@ -1851,7 +1851,7 @@ rte_tm_mark_vlan_dei(uint8_t port_id,
  * @see struct rte_tm_capabilities::mark_ip_ecn_sctp_supported
  */
 int
-rte_tm_mark_ip_ecn(uint8_t port_id,
+rte_tm_mark_ip_ecn(uint16_t port_id,
 	int mark_green,
 	int mark_yellow,
 	int mark_red,
@@ -1899,7 +1899,7 @@ rte_tm_mark_ip_ecn(uint8_t port_id,
  * @see struct rte_tm_capabilities::mark_ip_dscp_supported
  */
 int
-rte_tm_mark_ip_dscp(uint8_t port_id,
+rte_tm_mark_ip_dscp(uint16_t port_id,
 	int mark_green,
 	int mark_yellow,
 	int mark_red,
diff --git a/lib/librte_ether/rte_tm_driver.h b/lib/librte_ether/rte_tm_driver.h
index a5b698fe0..b2e8ccf80 100644
--- a/lib/librte_ether/rte_tm_driver.h
+++ b/lib/librte_ether/rte_tm_driver.h
@@ -357,7 +357,7 @@ rte_tm_error_set(struct rte_tm_error *error,
  *   success, NULL otherwise.
  */
 const struct rte_tm_ops *
-rte_tm_ops_get(uint8_t port_id, struct rte_tm_error *error);
+rte_tm_ops_get(uint16_t port_id, struct rte_tm_error *error);
 
 #ifdef __cplusplus
 }
diff --git a/lib/librte_kni/Makefile b/lib/librte_kni/Makefile
index 70f1ca8f6..43c115ddd 100644
--- a/lib/librte_kni/Makefile
+++ b/lib/librte_kni/Makefile
@@ -38,7 +38,7 @@ CFLAGS += $(WERROR_FLAGS) -I$(SRCDIR) -O3 -fno-strict-aliasing
 
 EXPORT_MAP := rte_kni_version.map
 
-LIBABIVER := 2
+LIBABIVER := 3
 
 # all source are stored in SRCS-y
 SRCS-$(CONFIG_RTE_LIBRTE_KNI) := rte_kni.c
diff --git a/lib/librte_kni/rte_kni.h b/lib/librte_kni/rte_kni.h
index 37deb4727..87812cd55 100644
--- a/lib/librte_kni/rte_kni.h
+++ b/lib/librte_kni/rte_kni.h
@@ -63,13 +63,13 @@ struct rte_mbuf;
  * Structure which has the function pointers for KNI interface.
  */
 struct rte_kni_ops {
-	uint8_t port_id; /* Port ID */
+	uint16_t port_id; /* Port ID */
 
 	/* Pointer to function of changing MTU */
-	int (*change_mtu)(uint8_t port_id, unsigned new_mtu);
+	int (*change_mtu)(uint16_t port_id, unsigned int new_mtu);
 
 	/* Pointer to function of configuring network interface */
-	int (*config_network_if)(uint8_t port_id, uint8_t if_up);
+	int (*config_network_if)(uint16_t port_id, uint8_t if_up);
 };
 
 /**
diff --git a/lib/librte_latencystats/rte_latencystats.c b/lib/librte_latencystats/rte_latencystats.c
index ce029a12c..d6ad13c4e 100644
--- a/lib/librte_latencystats/rte_latencystats.c
+++ b/lib/librte_latencystats/rte_latencystats.c
@@ -135,7 +135,7 @@ rte_latencystats_fill_values(struct rte_metric_value *values)
 }
 
 static uint16_t
-add_time_stamps(uint8_t pid __rte_unused,
+add_time_stamps(uint16_t pid __rte_unused,
 		uint16_t qid __rte_unused,
 		struct rte_mbuf **pkts,
 		uint16_t nb_pkts,
@@ -165,7 +165,7 @@ add_time_stamps(uint8_t pid __rte_unused,
 }
 
 static uint16_t
-calc_latency(uint8_t pid __rte_unused,
+calc_latency(uint16_t pid __rte_unused,
 		uint16_t qid __rte_unused,
 		struct rte_mbuf **pkts,
 		uint16_t nb_pkts,
@@ -226,10 +226,10 @@ rte_latencystats_init(uint64_t app_samp_intvl,
 		rte_latency_stats_flow_type_fn user_cb)
 {
 	unsigned int i;
-	uint8_t pid;
+	uint16_t pid;
 	uint16_t qid;
 	struct rxtx_cbs *cbs = NULL;
-	const uint8_t nb_ports = rte_eth_dev_count();
+	const uint16_t nb_ports = rte_eth_dev_count();
 	const char *ptr_strings[NUM_LATENCY_STATS] = {0};
 	const struct rte_memzone *mz = NULL;
 	const unsigned int flags = 0;
@@ -290,11 +290,11 @@ rte_latencystats_init(uint64_t app_samp_intvl,
 int
 rte_latencystats_uninit(void)
 {
-	uint8_t pid;
+	uint16_t pid;
 	uint16_t qid;
 	int ret = 0;
 	struct rxtx_cbs *cbs = NULL;
-	const uint8_t nb_ports = rte_eth_dev_count();
+	const uint16_t nb_ports = rte_eth_dev_count();
 
 	/** De register Rx/Tx callbacks */
 	for (pid = 0; pid < nb_ports; pid++) {
diff --git a/lib/librte_pdump/Makefile b/lib/librte_pdump/Makefile
index 1c03bcbb7..6b21c62e5 100644
--- a/lib/librte_pdump/Makefile
+++ b/lib/librte_pdump/Makefile
@@ -40,7 +40,7 @@ LDLIBS += -lpthread
 
 EXPORT_MAP := rte_pdump_version.map
 
-LIBABIVER := 1
+LIBABIVER := 2
 
 # all source are stored in SRCS-y
 SRCS-$(CONFIG_RTE_LIBRTE_PDUMP) := rte_pdump.c
diff --git a/lib/librte_pdump/rte_pdump.c b/lib/librte_pdump/rte_pdump.c
index 729e79a36..e6182d35c 100644
--- a/lib/librte_pdump/rte_pdump.c
+++ b/lib/librte_pdump/rte_pdump.c
@@ -207,7 +207,7 @@ pdump_copy(struct rte_mbuf **pkts, uint16_t nb_pkts, void *user_params)
 }
 
 static uint16_t
-pdump_rx(uint8_t port __rte_unused, uint16_t qidx __rte_unused,
+pdump_rx(uint16_t port __rte_unused, uint16_t qidx __rte_unused,
 	struct rte_mbuf **pkts, uint16_t nb_pkts,
 	uint16_t max_pkts __rte_unused,
 	void *user_params)
@@ -217,7 +217,7 @@ pdump_rx(uint8_t port __rte_unused, uint16_t qidx __rte_unused,
 }
 
 static uint16_t
-pdump_tx(uint8_t port __rte_unused, uint16_t qidx __rte_unused,
+pdump_tx(uint16_t port __rte_unused, uint16_t qidx __rte_unused,
 		struct rte_mbuf **pkts, uint16_t nb_pkts, void *user_params)
 {
 	pdump_copy(pkts, nb_pkts, user_params);
@@ -225,7 +225,7 @@ pdump_tx(uint8_t port __rte_unused, uint16_t qidx __rte_unused,
 }
 
 static int
-pdump_regitser_rx_callbacks(uint16_t end_q, uint8_t port, uint16_t queue,
+pdump_regitser_rx_callbacks(uint16_t end_q, uint16_t port, uint16_t queue,
 				struct rte_ring *ring, struct rte_mempool *mp,
 				uint16_t operation)
 {
@@ -279,7 +279,7 @@ pdump_regitser_rx_callbacks(uint16_t end_q, uint8_t port, uint16_t queue,
 }
 
 static int
-pdump_regitser_tx_callbacks(uint16_t end_q, uint8_t port, uint16_t queue,
+pdump_regitser_tx_callbacks(uint16_t end_q, uint16_t port, uint16_t queue,
 				struct rte_ring *ring, struct rte_mempool *mp,
 				uint16_t operation)
 {
@@ -337,7 +337,7 @@ static int
 set_pdump_rxtx_cbs(struct pdump_request *p)
 {
 	uint16_t nb_rx_q = 0, nb_tx_q = 0, end_q, queue;
-	uint8_t port;
+	uint16_t port;
 	int ret = 0;
 	uint32_t flags;
 	uint16_t operation;
@@ -764,7 +764,7 @@ pdump_validate_flags(uint32_t flags)
 }
 
 static int
-pdump_validate_port(uint8_t port, char *name)
+pdump_validate_port(uint16_t port, char *name)
 {
 	int ret = 0;
 
@@ -828,7 +828,7 @@ pdump_prepare_client_request(char *device, uint16_t queue,
 }
 
 int
-rte_pdump_enable(uint8_t port, uint16_t queue, uint32_t flags,
+rte_pdump_enable(uint16_t port, uint16_t queue, uint32_t flags,
 			struct rte_ring *ring,
 			struct rte_mempool *mp,
 			void *filter)
@@ -876,7 +876,7 @@ rte_pdump_enable_by_deviceid(char *device_id, uint16_t queue,
 }
 
 int
-rte_pdump_disable(uint8_t port, uint16_t queue, uint32_t flags)
+rte_pdump_disable(uint16_t port, uint16_t queue, uint32_t flags)
 {
 	int ret = 0;
 	char name[DEVICE_ID_SIZE];
diff --git a/lib/librte_pdump/rte_pdump.h b/lib/librte_pdump/rte_pdump.h
index ba6e39b09..4ec0a106f 100644
--- a/lib/librte_pdump/rte_pdump.h
+++ b/lib/librte_pdump/rte_pdump.h
@@ -113,7 +113,7 @@ rte_pdump_uninit(void);
  */
 
 int
-rte_pdump_enable(uint8_t port, uint16_t queue, uint32_t flags,
+rte_pdump_enable(uint16_t port, uint16_t queue, uint32_t flags,
 		struct rte_ring *ring,
 		struct rte_mempool *mp,
 		void *filter);
@@ -136,7 +136,7 @@ rte_pdump_enable(uint8_t port, uint16_t queue, uint32_t flags,
  */
 
 int
-rte_pdump_disable(uint8_t port, uint16_t queue, uint32_t flags);
+rte_pdump_disable(uint16_t port, uint16_t queue, uint32_t flags);
 
 /**
  * Enables packet capturing on given device id and queue.
diff --git a/lib/librte_port/Makefile b/lib/librte_port/Makefile
index 76629a13a..c2b1b2ce4 100644
--- a/lib/librte_port/Makefile
+++ b/lib/librte_port/Makefile
@@ -44,7 +44,7 @@ CFLAGS += $(WERROR_FLAGS)
 
 EXPORT_MAP := rte_port_version.map
 
-LIBABIVER := 3
+LIBABIVER := 4
 
 #
 # all source are stored in SRCS-y
diff --git a/lib/librte_port/rte_port_ethdev.c b/lib/librte_port/rte_port_ethdev.c
index d5c5fba55..4ed10f276 100644
--- a/lib/librte_port/rte_port_ethdev.c
+++ b/lib/librte_port/rte_port_ethdev.c
@@ -60,7 +60,7 @@ struct rte_port_ethdev_reader {
 	struct rte_port_in_stats stats;
 
 	uint16_t queue_id;
-	uint8_t port_id;
+	uint16_t port_id;
 };
 
 static void *
@@ -156,7 +156,7 @@ struct rte_port_ethdev_writer {
 	uint16_t tx_buf_count;
 	uint64_t bsz_mask;
 	uint16_t queue_id;
-	uint8_t port_id;
+	uint16_t port_id;
 };
 
 static void *
@@ -337,7 +337,7 @@ struct rte_port_ethdev_writer_nodrop {
 	uint64_t bsz_mask;
 	uint64_t n_retries;
 	uint16_t queue_id;
-	uint8_t port_id;
+	uint16_t port_id;
 };
 
 static void *
diff --git a/lib/librte_port/rte_port_ethdev.h b/lib/librte_port/rte_port_ethdev.h
index 201a79e41..f5ed9ab2d 100644
--- a/lib/librte_port/rte_port_ethdev.h
+++ b/lib/librte_port/rte_port_ethdev.h
@@ -54,7 +54,7 @@ extern "C" {
 /** ethdev_reader port parameters */
 struct rte_port_ethdev_reader_params {
 	/** NIC RX port ID */
-	uint8_t port_id;
+	uint16_t port_id;
 
 	/** NIC RX queue ID */
 	uint16_t queue_id;
@@ -66,7 +66,7 @@ extern struct rte_port_in_ops rte_port_ethdev_reader_ops;
 /** ethdev_writer port parameters */
 struct rte_port_ethdev_writer_params {
 	/** NIC RX port ID */
-	uint8_t port_id;
+	uint16_t port_id;
 
 	/** NIC RX queue ID */
 	uint16_t queue_id;
@@ -82,7 +82,7 @@ extern struct rte_port_out_ops rte_port_ethdev_writer_ops;
 /** ethdev_writer_nodrop port parameters */
 struct rte_port_ethdev_writer_nodrop_params {
 	/** NIC RX port ID */
-	uint8_t port_id;
+	uint16_t port_id;
 
 	/** NIC RX queue ID */
 	uint16_t queue_id;
-- 
2.13.3

^ permalink raw reply	[relevance 1%]

* Re: [dpdk-dev] [PATCH v4 1/5] net/bonding: remove bonding APIs using ABI versioning
  2017-09-21  8:32  8%   ` [dpdk-dev] [PATCH v4 1/5] net/bonding: remove bonding APIs using ABI versioning Zhiyong Yang
@ 2017-09-21 10:36  4%     ` Ferruh Yigit
  2017-09-22  2:02  4%       ` Yang, Zhiyong
  0 siblings, 1 reply; 200+ results
From: Ferruh Yigit @ 2017-09-21 10:36 UTC (permalink / raw)
  To: Zhiyong Yang, dev; +Cc: thomas

On 9/21/2017 9:32 AM, Zhiyong Yang wrote:
> There are two bonding APIs using ABI versioning, and both have
> port_id as parameter. Since we are already breaking ABI, no need
> to keep older versions of APIs.
> 
> Signed-off-by: Zhiyong Yang <zhiyong.yang@intel.com>

<...>

> -int
> -rte_eth_bond_8023ad_conf_get_v1708(uint8_t port_id,
> +rte_eth_bond_8023ad_conf_get(uint8_t port_id,
>  		struct rte_eth_bond_8023ad_conf *conf)
>  {
>  	struct rte_eth_dev *bond_dev;
> @@ -1409,10 +1320,6 @@ rte_eth_bond_8023ad_conf_get_v1708(uint8_t port_id,
>  	bond_mode_8023ad_conf_get_v1708(bond_dev, conf);

I am aware this is not focus of the patchset, but it would be good to
rename this function too and remove _v1708 suffix.

It seems there is already a function named "bond_mode_8023ad_conf_get"
and after removed code, "bond_mode_8023ad_conf_get" only called by
"bond_mode_8023ad_conf_get_v1708":

bond_mode_8023ad_conf_get_v1708()
   bond_mode_8023ad_conf_get()

So it is possible to merge them into name "bond_mode_8023ad_conf_get()"

Thanks,
ferruh

^ permalink raw reply	[relevance 4%]

* Re: [dpdk-dev] [RFC] Wireless Base Band Device (bbdev)
  @ 2017-09-21 14:56  3% ` Thomas Monjalon
  2017-10-03 14:29  0%   ` Mokhtar, Amr
  0 siblings, 1 reply; 200+ results
From: Thomas Monjalon @ 2017-09-21 14:56 UTC (permalink / raw)
  To: Amr Mokhtar; +Cc: dev

25/08/2017 15:46, Amr Mokhtar:
> +/**
> + * Configure a device.
> + * This function must be called on a device before setting up the queues and
> + * starting the device. It can also be called when a device is in the stopped
> + * state. If any device queues have been configured their configuration will be
> + * cleared by a call to this function.
> + *
> + * @param dev_id
> + *   The identifier of the device.
> + * @param num_queues
> + *   Number of queues to configure on device.
> + * @param conf
> + *   The device configuration. If NULL, a default configuration will be used.
> + *
> + * @return
> + *   - 0 on success
> + *   - EINVAL if num_queues is invalid, 0 or greater than maximum
> + *   - EBUSY if the identified device has already started
> + *   - ENOMEM if unable to allocate memory
> + */
> +int
> +rte_bbdev_configure(uint8_t dev_id, uint16_t num_queues,
> +		const struct rte_bbdev_conf *conf);

I am not convinced by the "configure all" function in ethdev.
We break the ABI each time we add a new feature to configure.
And it does not really help to have all configurations in one struct.
Would you mind to split the struct rte_bbdev_conf and split
the function accordingly?

[...]
> +struct rte_bbdev_info {
> +	int socket_id;  /**< NUMA socket that device is on */
> +	const char *dev_name;  /**< Unique device name */
> +	const struct rte_pci_device *pci_dev;  /**< PCI information */
> +	unsigned int num_queues;  /**< Number of queues currently configured */
> +	struct rte_bbdev_conf conf;  /**< Current device configuration */
> +	bool started;  /**< Set if device is currently started */
> +	struct rte_bbdev_driver_info drv;  /**< Info from device driver */
> +};

As Stephen said, PCI must not appear in this API.
Please use the bus abstraction.

[...]
> +struct __rte_cache_aligned rte_bbdev {
> +	rte_bbdev_enqueue_ops_t enqueue_ops; /**< Enqueue function */
> +	rte_bbdev_dequeue_ops_t dequeue_ops;  /**< Dequeue function */
> +	const struct rte_bbdev_ops *dev_ops;  /**< Functions exported by PMD */
> +	struct rte_bbdev_data *data;  /**< Pointer to device data */
> +	bool attached;  /**< If device is currently attached or not */

What "attached" means?
I'm afraid you are trying to manage hotplug in the wrong layer.

> +	struct rte_device *device; /**< Backing device (HW only) */

SW port should have also a rte_device (vdev).

[...]
> +/** Data input and output buffer for Turbo operations */
> +struct rte_bbdev_op_data {

Why there is no "turbo" word in the name of this struct?

> +	struct rte_mbuf *data;
> +	/**< First mbuf segment with input/output data. */
> +	uint32_t offset;
> +	/**< The starting point for the Turbo input/output, in bytes, from the
> +	 * start of the data in the data buffer. It must be smaller than
> +	 * data_len of the mbuf's first segment!
> +	 */
> +	uint32_t length;
> +	/**< For input operations: the length, in bytes, of the source buffer
> +	 * on which the Turbo encode/decode will be computed.
> +	 * For output operations: the length, in bytes, of the output buffer
> +	 * of the Turbo operation.
> +	 */
> +};

[...]
> +/** Structure specifying a single operation */
> +struct rte_bbdev_op {
> +	enum rte_bbdev_op_type type;  /**< Type of this operation */
> +	int status;  /**< Status of operation that was performed */
> +	struct rte_mempool *mempool;  /**< Mempool which op instance is in */
> +	void *opaque_data;  /**< Opaque pointer for user data */
> +	/**
> +	 * Anonymous union of operation-type specific parameters. When allocated
> +	 * using rte_bbdev_op_pool_create(), space is allocated for the
> +	 * parameters at the end of each rte_bbdev_op structure, and the
> +	 * pointers here point to it.
> +	 */
> +	RTE_STD_C11
> +	union {
> +		void *generic;
> +		struct rte_bbdev_op_turbo_dec *turbo_dec;
> +		struct rte_bbdev_op_turbo_enc *turbo_enc;
> +	};
> +};

I am not sure it is a good idea to fit every operations in the
same struct and the same functions.

[...]
> +/**
> + * Helper macro for logging
> + *
> + * @param level
> + *   Log level: EMERG, ALERT, CRIT, ERR, WARNING, NOTICE, INFO, or DEBUG
> + * @param fmt
> + *   The format string, as in printf(3).
> + * @param ...
> + *   The variable arguments required by the format string.
> + *
> + * @return
> + *   - 0 on success
> + *   - Negative on error
> + */
> +#define rte_bbdev_log(level, fmt, ...) \
> +		RTE_LOG(level, BBDEV, fmt "\n", ##__VA_ARGS__)

This is the legacy log system.
Please use dynamic log type.

[...]
> +#ifdef RTE_LIBRTE_BBDEV_DEBUG
> +#define rte_bbdev_log_verbose(fmt, ...)  rte_bbdev_log_debug(fmt, ##__VA_ARGS__)
> +#else
> +#define rte_bbdev_log_verbose(fmt, ...)
> +#endif

With the new log functions, you do not need to disable debug log
at compilation time.

> +/**
> + *  Initialisation params structure that can be used by software based drivers
> + */
> +struct rte_bbdev_init_params {
> +	int socket_id;  /**< Base band null device socket */
> +	uint16_t queues_num;  /**< Base band null device queues number */
> +};
> +
> +/**
> + * Parse generic parameters that could be used for software based devices.
> + *
> + * @param params
> + *   Pointer to structure that will hold the parsed parameters.
> + * @param input_args
> + *   Pointer to arguments to be parsed.
> + *
> + * @return
> + *   - 0 on success
> + *   - EINVAL if invalid parameter pointer is provided
> + *   - EFAULT if unable to parse provided arguments
> + */
> +int
> +rte_bbdev_parse_params(struct rte_bbdev_init_params *params,
> +		const char *input_args);

I do not understand the intent of these parameters.
Are they common to every PMDs?
Or could they be moved in software PMDs?

End of this first review pass :)

^ permalink raw reply	[relevance 3%]

* Re: [dpdk-dev] [PATCH v4] devtools: rework abi checker script
  2017-09-20  9:12 27%   ` [dpdk-dev] [PATCH v4] " Olivier Matz
@ 2017-09-21 15:40  7%     ` Neil Horman
  2017-09-25  9:11  9%       ` Olivier MATZ
  2017-10-05  7:53 27%     ` [dpdk-dev] [PATCH v5] " Olivier Matz
  1 sibling, 1 reply; 200+ results
From: Neil Horman @ 2017-09-21 15:40 UTC (permalink / raw)
  To: Olivier Matz; +Cc: dev, bruce.richardson

On Wed, Sep 20, 2017 at 11:12:53AM +0200, Olivier Matz wrote:
> The initial version of the script had some limitations:
> - cannot work on a non-clean workspace
> - environment variables are not documented
> - no compilation log in case of failure
> - return success even it abi is incompatible
> 
> This patch addresses these issues and rework the code.
> 
> Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
> ---
> 
> v3->v4:
> - clarify logs on incompatible abi
> - log when an error returned an error
> - [really] fix the report path
> - log the output of make config in the proper file
> 
> v2->v3:
> - fix when not launched from dpdk root dir
> - use "-Og -Wno-error" instead of "-O0"
> - fix typo in commit log
> 
> v1->v2:
> - use /usr/bin/env to find bash (which is required)
> - fix displayed path to html reports
> - reword help for -f option
> 
> 
>  devtools/validate-abi.sh | 397 ++++++++++++++++++++++++-----------------------
>  1 file changed, 205 insertions(+), 192 deletions(-)
> 
This looks better, thank you for the iterations.  One last note: The abi dumper
utility errors out with error code of 12 if a given object has no exported
symbols, and I see a few of those.  You may want to consider catching that
error, logging an appropriate message and skipping the error emit.  That can be
handled later though, as its a corner case.  I'd go with this patch, and then
do a incremental improvement later

Acked-by: Neil Horman <nhorman@tuxdriver.com>

> diff --git a/devtools/validate-abi.sh b/devtools/validate-abi.sh
> index 0accc99b1..8caf43e83 100755
> --- a/devtools/validate-abi.sh
> +++ b/devtools/validate-abi.sh
> @@ -1,7 +1,8 @@
> -#!/bin/sh
> +#!/usr/bin/env bash
>  #   BSD LICENSE
>  #
>  #   Copyright(c) 2015 Neil Horman. All rights reserved.
> +#   Copyright(c) 2017 6WIND S.A.
>  #   All rights reserved.
>  #
>  #   Redistribution and use in source and binary forms, with or without
> @@ -27,236 +28,248 @@
>  #   (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
>  #   OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
>  
> -TAG1=$1
> -TAG2=$2
> -TARGET=$3
> -ABI_DIR=`mktemp -d -p /tmp ABI.XXXXXX`
> +set -e
>  
> -usage() {
> -	echo "$0 <REV1> <REV2> <TARGET>"
> -}
> +abicheck=abi-compliance-checker
> +abidump=abi-dumper
> +default_dst=abi-check
> +default_target=x86_64-native-linuxapp-gcc
>  
> -log() {
> -	local level=$1
> -	shift
> -	echo "$*"
> +# trap on error
> +err_report() {
> +    echo "$0: error at line $1"
>  }
> +trap 'err_report $LINENO' ERR
>  
> -validate_tags() {
> +print_usage () {
> +	cat <<- END_OF_HELP
> +	$(basename $0) [options] <rev1> <rev2>
>  
> -	if [ -z "$HASH1" ]
> -	then
> -		echo "invalid revision: $TAG1"
> -		return
> -	fi
> -	if [ -z "$HASH2" ]
> -	then
> -		echo "invalid revision: $TAG2"
> -		return
> -	fi
> +	This script compares the ABI of 2 git revisions of the current
> +	workspace. The output is a html report and a compilation log.
> +
> +	The objective is to make sure that applications built against
> +	DSOs from the first revision can still run when executed using
> +	the DSOs built from the second revision.
> +
> +	<rev1> and <rev2> are git commit id or tags.
> +
> +	Options:
> +	  -h		show this help
> +	  -j <num>	enable parallel compilation with <num> threads
> +	  -v		show compilation logs on the console
> +	  -d <dir>	change working directory (default is ${default_dst})
> +	  -t <target>	the dpdk target to use (default is ${default_target})
> +	  -f		overwrite existing files in destination directory
> +
> +	The script returns 0 on success, or the value of last failing
> +	call of ${abicheck} (incompatible abi or the tool has run with errors).
> +	The errors returned by ${abidump} are ignored.
> +
> +	END_OF_HELP
>  }
>  
> -validate_args() {
> -	if [ -z "$TAG1" ]
> -	then
> -		echo "Must Specify REV1"
> -		return
> -	fi
> -	if [ -z "$TAG2" ]
> -	then
> -		echo "Must Specify REV2"
> -		return
> -	fi
> -	if [ -z "$TARGET" ]
> -	then
> -		echo "Must Specify a build target"
> +# log in the file, and on stdout if verbose
> +# $1: level string
> +# $2: string to be logged
> +log() {
> +	echo "$1: $2"
> +	if [ "${verbose}" != "true" ]; then
> +		echo "$1: $2" >&3
>  	fi
>  }
>  
> +# launch a command and log it, taking care of surrounding spaces with quotes
> +cmd() {
> +	local i s whitespace ret
> +	s=""
> +	whitespace="[[:space:]]"
> +	for i in "$@"; do
> +		if [[ $i =~ $whitespace ]]; then
> +			i=\"$i\"
> +		fi
> +		if [ -z "$s" ]; then
> +			s="$i"
> +		else
> +			s="$s $i"
> +		fi
> +	done
> +
> +	ret=0
> +	log "CMD" "$s"
> +	"$@" || ret=$?
> +	if [ "$ret" != "0" ]; then
> +		log "CMD" "previous command returned $ret"
> +	fi
> +
> +	return $ret
> +}
>  
> -cleanup_and_exit() {
> -	rm -rf $ABI_DIR
> -	git checkout $CURRENT_BRANCH
> -	exit $1
> +# redirect or copy stderr/stdout to a file
> +# the syntax is unfamiliar, but it makes the rest of the
> +# code easier to read, avoiding the use of pipes
> +set_log_file() {
> +	# save original stdout and stderr in fd 3 and 4
> +	exec 3>&1
> +	exec 4>&2
> +	# create a new fd 5 that send to a file
> +	exec 5> >(cat > $1)
> +	# send stdout and stderr to fd 5
> +	if [ "${verbose}" = "true" ]; then
> +		exec 1> >(tee /dev/fd/5 >&3)
> +		exec 2> >(tee /dev/fd/5 >&4)
> +	else
> +		exec 1>&5
> +		exec 2>&5
> +	fi
>  }
>  
>  # Make sure we configure SHARED libraries
>  # Also turn off IGB and KNI as those require kernel headers to build
>  fixup_config() {
> -	sed -i -e"$ a\CONFIG_RTE_BUILD_SHARED_LIB=y" config/defconfig_$TARGET
> -	sed -i -e"$ a\CONFIG_RTE_NEXT_ABI=n" config/defconfig_$TARGET
> -	sed -i -e"$ a\CONFIG_RTE_EAL_IGB_UIO=n" config/defconfig_$TARGET
> -	sed -i -e"$ a\CONFIG_RTE_LIBRTE_KNI=n" config/defconfig_$TARGET
> -	sed -i -e"$ a\CONFIG_RTE_KNI_KMOD=n" config/defconfig_$TARGET
> +	local conf=config/defconfig_$target
> +	cmd sed -i -e"$ a\CONFIG_RTE_BUILD_SHARED_LIB=y" $conf
> +	cmd sed -i -e"$ a\CONFIG_RTE_NEXT_ABI=n" $conf
> +	cmd sed -i -e"$ a\CONFIG_RTE_EAL_IGB_UIO=n" $conf
> +	cmd sed -i -e"$ a\CONFIG_RTE_LIBRTE_KNI=n" $conf
> +	cmd sed -i -e"$ a\CONFIG_RTE_KNI_KMOD=n" $conf
>  }
>  
> -###########################################
> -#START
> -############################################
> +# build dpdk for the given tag and dump abi
> +# $1: hash of the revision
> +gen_abi() {
> +	local i
> +
> +	cmd git clone ${dpdkroot} ${dst}/${1}
> +	cmd cd ${dst}/${1}
> +
> +	log "INFO" "Checking out version ${1} of the dpdk"
> +	# Move to the old version of the tree
> +	cmd git checkout ${1}
> +
> +	fixup_config
> +
> +	# Now configure the build
> +	log "INFO" "Configuring DPDK ${1}"
> +	cmd make config T=$target O=$target
> +
> +	# Checking abi compliance relies on using the dwarf information in
> +	# the shared objects. Build with -g to include them.
> +	log "INFO" "Building DPDK ${1}. This might take a moment"
> +	cmd make -j$parallel O=$target V=1 EXTRA_CFLAGS="-g -Og -Wno-error" \
> +	    EXTRA_LDFLAGS="-g" || log "INFO" "The build failed"
> +
> +	# Move to the lib directory
> +	cmd cd ${PWD}/$target/lib
> +	log "INFO" "Collecting ABI information for ${1}"
> +	for i in *.so; do
> +		[ -e "$i" ] || break
> +		cmd $abidump ${i} -o $dst/${1}/${i}.dump -lver ${1} || true
> +		# hack to ignore empty SymbolsInfo section (no public ABI)
> +		if grep -q "'SymbolInfo' => {}," $dst/${1}/${i}.dump \
> +				2> /dev/null; then
> +			log "INFO" "${i} has no public ABI, remove dump file"
> +			cmd rm -f $dst/${1}/${i}.dump
> +		fi
> +	done
> +}
>  
> -#trap on ctrl-c to clean up
> -trap cleanup_and_exit SIGINT
> +verbose=false
> +parallel=1
> +dst=${default_dst}
> +target=${default_target}
> +force=0
> +while getopts j:vd:t:fh ARG ; do
> +	case $ARG in
> +		j ) parallel=$OPTARG ;;
> +		v ) verbose=true ;;
> +		d ) dst=$OPTARG ;;
> +		t ) target=$OPTARG ;;
> +		f ) force=1 ;;
> +		h ) print_usage ; exit 0 ;;
> +		? ) print_usage ; exit 1 ;;
> +	esac
> +done
> +shift $(($OPTIND - 1))
>  
> -if [ -z "$DPDK_MAKE_JOBS" ]
> -then
> -	# This counts the number of cpus on the system
> -	if [ -e /usr/bin/lscpu ]
> -	then
> -		DPDK_MAKE_JOBS=`lscpu -p=cpu | grep -v "#" | wc -l`
> -	else
> -		DPDK_MAKE_JOBS=1
> -	fi
> +if [ $# != 2 ]; then
> +	print_usage
> +	exit 1
>  fi
>  
> -#Save the current branch
> -CURRENT_BRANCH=`git branch | grep \* | cut -d' ' -f2`
> +tag1=$1
> +tag2=$2
>  
> -if [ -z "$CURRENT_BRANCH" ]
> -then
> -	CURRENT_BRANCH=`git log --pretty=format:%H HEAD~1..HEAD`
> -fi
> +# convert path to absolute
> +case "${dst}" in
> +	/*) ;;
> +	*) dst=${PWD}/${dst} ;;
> +esac
> +dpdkroot=$(readlink -e $(dirname $0)/..)
>  
> -if [ -n "$VERBOSE" ]
> -then
> -	export VERBOSE=/dev/stdout
> -else
> -	export VERBOSE=/dev/null
> +if [ -e "${dst}" -a "$force" = 0 ]; then
> +	echo "The ${dst} directory is not empty. Remove it, use another"
> +	echo "one (-d <dir>), or force overriding (-f)"
> +	exit 1
>  fi
>  
> -# Validate that we have all the arguments we need
> -res=$(validate_args)
> -if [ -n "$res" ]
> -then
> -	echo $res
> -	usage
> -	cleanup_and_exit 1
> -fi
> +rm -rf ${dst}
> +mkdir -p ${dst}
> +set_log_file ${dst}/abi-check.log
> +log "INFO" "Logs available in ${dst}/abi-check.log"
>  
> -HASH1=$(git show -s --format=%H "$TAG1" -- 2> /dev/null | tail -1)
> -HASH2=$(git show -s --format=%H "$TAG2" -- 2> /dev/null | tail -1)
> +command -v ${abicheck} || log "INFO" "Can't find ${abicheck} utility"
> +command -v ${abidump} || log "INFO" "Can't find ${abidump} utility"
>  
> -# Make sure our tags exist
> -res=$(validate_tags)
> -if [ -n "$res" ]
> -then
> -	echo $res
> -	cleanup_and_exit 1
> -fi
> +hash1=$(git show -s --format=%h "$tag1" -- 2> /dev/null | tail -1)
> +hash2=$(git show -s --format=%h "$tag2" -- 2> /dev/null | tail -1)
>  
>  # Make hashes available in output for non-local reference
> -TAG1="$TAG1 ($HASH1)"
> -TAG2="$TAG2 ($HASH2)"
> -
> -ABICHECK=`which abi-compliance-checker 2>/dev/null`
> -if [ $? -ne 0 ]
> -then
> -	log "INFO" "Can't find abi-compliance-checker utility"
> -	cleanup_and_exit 1
> -fi
> -
> -ABIDUMP=`which abi-dumper 2>/dev/null`
> -if [ $? -ne 0 ]
> -then
> -	log "INFO" "Can't find abi-dumper utility"
> -	cleanup_and_exit 1
> -fi
> +tag1="$tag1 ($hash1)"
> +tag2="$tag2 ($hash2)"
>  
> -log "INFO" "We're going to check and make sure that applications built"
> -log "INFO" "against DPDK DSOs from version $TAG1 will still run when executed"
> -log "INFO" "against DPDK DSOs built from version $TAG2."
> -log "INFO" ""
> -
> -# Check to make sure we have a clean tree
> -git status | grep -q clean
> -if [ $? -ne 0 ]
> -then
> -	log "WARN" "Working directory not clean, aborting"
> -	cleanup_and_exit 1
> +if [ "$hash1" = "$hash2" ]; then
> +	log "ERROR" "$tag1 and $tag2 are the same revisions"
> +	exit 1
>  fi
>  
> -# Move to the root of the git tree
> -cd $(dirname $0)/..
> +cmd mkdir -p ${dst}
>  
> -log "INFO" "Checking out version $TAG1 of the dpdk"
> -# Move to the old version of the tree
> -git checkout $HASH1
> +# dump abi for each revision
> +gen_abi ${hash1}
> +gen_abi ${hash2}
>  
> -fixup_config
> +# compare the abi dumps
> +cmd cd ${dst}
> +ret=0
> +list=""
> +for i in ${hash2}/*.dump; do
> +	name=`basename $i`
> +	libname=${name%.dump}
>  
> -# Checking abi compliance relies on using the dwarf information in
> -# The shared objects.  Thats only included in the DSO's if we build
> -# with -g
> -export EXTRA_CFLAGS="$EXTRA_CFLAGS -g -O0"
> -export EXTRA_LDFLAGS="$EXTRA_LDFLAGS -g"
> -
> -# Now configure the build
> -log "INFO" "Configuring DPDK $TAG1"
> -make config T=$TARGET O=$TARGET > $VERBOSE 2>&1
> -
> -log "INFO" "Building DPDK $TAG1. This might take a moment"
> -make -j$DPDK_MAKE_JOBS O=$TARGET > $VERBOSE 2>&1
> -
> -if [ $? -ne 0 ]
> -then
> -	log "INFO" "THE BUILD FAILED.  ABORTING"
> -	cleanup_and_exit 1
> -fi
> +	if [ ! -f ${hash1}/$name ]; then
> +		log "INFO" "$NAME does not exist in $tag1. skipping..."
> +		continue
> +	fi
>  
> -# Move to the lib directory
> -cd $TARGET/lib
> -log "INFO" "COLLECTING ABI INFORMATION FOR $TAG1"
> -for i in `ls *.so`
> -do
> -	$ABIDUMP $i -o $ABI_DIR/$i-ABI-0.dump -lver $HASH1
> +	local_ret=0
> +	cmd $abicheck -l $libname \
> +	    -old ${hash1}/$name -new ${hash2}/$name || local_ret=$?
> +	if [ $local_ret != 0 ]; then
> +		log "NOTICE" "$abicheck returned $local_ret"
> +		ret=$local_ret
> +		list="$list $libname"
> +	fi
>  done
> -cd ../..
> -
> -# Now clean the tree, checkout the second tag, and rebuild
> -git clean -f -d
> -git reset --hard
> -# Move to the new version of the tree
> -log "INFO" "Checking out version $TAG2 of the dpdk"
> -git checkout $HASH2
> -
> -fixup_config
> -
> -# Now configure the build
> -log "INFO" "Configuring DPDK $TAG2"
> -make config T=$TARGET O=$TARGET > $VERBOSE 2>&1
> -
> -log "INFO" "Building DPDK $TAG2. This might take a moment"
> -make -j$DPDK_MAKE_JOBS O=$TARGET > $VERBOSE 2>&1
>  
> -if [ $? -ne 0 ]
> -then
> -	log "INFO" "THE BUILD FAILED.  ABORTING"
> -	cleanup_and_exit 1
> +if [ $ret != 0 ]; then
> +	log "NOTICE" "ABI may be incompatible, check reports/logs for details."
> +	log "NOTICE" "Incompatible list: $list"
> +else
> +	log "NOTICE" "No error detected, ABI is compatible."
>  fi
>  
> -cd $TARGET/lib
> -log "INFO" "COLLECTING ABI INFORMATION FOR $TAG2"
> -for i in `ls *.so`
> -do
> -	$ABIDUMP $i -o $ABI_DIR/$i-ABI-1.dump -lver $HASH2
> -done
> -cd ../..
> -
> -# Start comparison of ABI dumps
> -for i in `ls $ABI_DIR/*-1.dump`
> -do
> -	NEWNAME=`basename $i`
> -	OLDNAME=`basename $i | sed -e"s/1.dump/0.dump/"`
> -	LIBNAME=`basename $i | sed -e"s/-ABI-1.dump//"`
> -
> -	if [ ! -f $ABI_DIR/$OLDNAME ]
> -	then
> -		log "INFO" "$OLDNAME DOES NOT EXIST IN $TAG1. SKIPPING..."
> -	fi
> -
> -	#compare the abi dumps
> -	$ABICHECK -l $LIBNAME -old $ABI_DIR/$OLDNAME -new $ABI_DIR/$NEWNAME
> -done
> +log "INFO" "Logs are in ${dst}/abi-check.log"
> +log "INFO" "HTML reports are in ${dst}/compat_reports directory"
>  
> -git reset --hard
> -log "INFO" "ABI CHECK COMPLETE.  REPORTS ARE IN compat_report directory"
> -cleanup_and_exit 0
> +exit $ret
> -- 
> 2.11.0
> 
> 

^ permalink raw reply	[relevance 7%]

* Re: [dpdk-dev] [PATCH v4 1/5] net/bonding: remove bonding APIs using ABI versioning
  2017-09-21 10:36  4%     ` Ferruh Yigit
@ 2017-09-22  2:02  4%       ` Yang, Zhiyong
  0 siblings, 0 replies; 200+ results
From: Yang, Zhiyong @ 2017-09-22  2:02 UTC (permalink / raw)
  To: Yigit, Ferruh, dev; +Cc: thomas

Ferruh,

> -----Original Message-----
> From: Yigit, Ferruh
> Sent: Thursday, September 21, 2017 6:37 PM
> To: Yang, Zhiyong <zhiyong.yang@intel.com>; dev@dpdk.org
> Cc: thomas@monjalon.net
> Subject: Re: [PATCH v4 1/5] net/bonding: remove bonding APIs using ABI
> versioning
> 
> On 9/21/2017 9:32 AM, Zhiyong Yang wrote:
> > There are two bonding APIs using ABI versioning, and both have port_id
> > as parameter. Since we are already breaking ABI, no need to keep older
> > versions of APIs.
> >
> > Signed-off-by: Zhiyong Yang <zhiyong.yang@intel.com>
> 
> <...>
> 
> > -int
> > -rte_eth_bond_8023ad_conf_get_v1708(uint8_t port_id,
> > +rte_eth_bond_8023ad_conf_get(uint8_t port_id,
> >  		struct rte_eth_bond_8023ad_conf *conf)  {
> >  	struct rte_eth_dev *bond_dev;
> > @@ -1409,10 +1320,6 @@ rte_eth_bond_8023ad_conf_get_v1708(uint8_t
> port_id,
> >  	bond_mode_8023ad_conf_get_v1708(bond_dev, conf);
> 
> I am aware this is not focus of the patchset, but it would be good to rename this
> function too and remove _v1708 suffix.
> 
> It seems there is already a function named "bond_mode_8023ad_conf_get"
> and after removed code, "bond_mode_8023ad_conf_get" only called by
> "bond_mode_8023ad_conf_get_v1708":
> 
> bond_mode_8023ad_conf_get_v1708()
>    bond_mode_8023ad_conf_get()
> 
> So it is possible to merge them into name "bond_mode_8023ad_conf_get()"
> 

Ok. I will merge them into one.

> Thanks,
> Ferruh




^ permalink raw reply	[relevance 4%]

* [dpdk-dev] [RFC PATCH v2 1/1] eventtimer: introduce event timer adapter
  @ 2017-09-22 15:17  1%   ` Erik Gabriel Carrillo
  0 siblings, 0 replies; 200+ results
From: Erik Gabriel Carrillo @ 2017-09-22 15:17 UTC (permalink / raw)
  To: jerin.jacob
  Cc: dev, bruce.richardson, harry.van.haaren, hemant.agrawal,
	gage.ads, nipun.gupta, narender.vangati, nikhil.rao,
	pbhagavatula, rsanford

Signed-off-by: Erik Gabriel Carrillo <erik.g.carrillo@intel.com>
---
v2
- Added ops structure and stubbed out plugin for SW impl
- Added unit test stubs
- Replaced occurrences of "wheel" in API with "adapter"
- Replaced occurrences of pointer to struct rte_event_timer_adapter with ids
- Removed rte_event_timer_adapter_lookup() function
- Replaced RTE_EVENT_TIMER_SUCCESS_{ARM,CANCEL} states with
  RTE_EVENT_TIMER_ARMED

 drivers/event/sw/Makefile                          |   1 +
 drivers/event/sw/sw_evdev.c                        |  11 +
 drivers/event/sw/sw_evdev_timer_adapter.c          | 124 +++++++
 lib/librte_eventdev/Makefile                       |   3 +
 lib/librte_eventdev/rte_event_timer_adapter.c      | 227 ++++++++++++
 lib/librte_eventdev/rte_event_timer_adapter.h      | 388 +++++++++++++++++++++
 .../rte_event_timer_adapter_driver.h               | 128 +++++++
 lib/librte_eventdev/rte_eventdev.h                 |   2 +-
 lib/librte_eventdev/rte_eventdev_pmd.h             |  15 +
 lib/librte_eventdev/rte_eventdev_version.map       |  14 +
 test/test/Makefile                                 |   1 +
 test/test/test_event_timer_adapter.c               | 183 ++++++++++
 12 files changed, 1096 insertions(+), 1 deletion(-)
 create mode 100644 drivers/event/sw/sw_evdev_timer_adapter.c
 create mode 100644 lib/librte_eventdev/rte_event_timer_adapter.c
 create mode 100644 lib/librte_eventdev/rte_event_timer_adapter.h
 create mode 100644 lib/librte_eventdev/rte_event_timer_adapter_driver.h
 create mode 100644 test/test/test_event_timer_adapter.c

diff --git a/drivers/event/sw/Makefile b/drivers/event/sw/Makefile
index 857a87c..f059915 100644
--- a/drivers/event/sw/Makefile
+++ b/drivers/event/sw/Makefile
@@ -55,6 +55,7 @@ SRCS-$(CONFIG_RTE_LIBRTE_PMD_SW_EVENTDEV) += sw_evdev.c
 SRCS-$(CONFIG_RTE_LIBRTE_PMD_SW_EVENTDEV) += sw_evdev_worker.c
 SRCS-$(CONFIG_RTE_LIBRTE_PMD_SW_EVENTDEV) += sw_evdev_scheduler.c
 SRCS-$(CONFIG_RTE_LIBRTE_PMD_SW_EVENTDEV) += sw_evdev_xstats.c
+SRCS-$(CONFIG_RTE_LIBRTE_PMD_SW_EVENTDEV) += sw_evdev_timer_adapter.c
 
 # export include files
 SYMLINK-y-include +=
diff --git a/drivers/event/sw/sw_evdev.c b/drivers/event/sw/sw_evdev.c
index 9c534b7..bbbf80a 100644
--- a/drivers/event/sw/sw_evdev.c
+++ b/drivers/event/sw/sw_evdev.c
@@ -49,6 +49,8 @@
 #define SCHED_QUANTA_ARG "sched_quanta"
 #define CREDIT_QUANTA_ARG "credit_quanta"
 
+extern const struct rte_event_timer_adapter_ops sw_event_adapter_timer_ops;
+
 static void
 sw_info_get(struct rte_eventdev *dev, struct rte_event_dev_info *info);
 
@@ -733,6 +735,13 @@ static int32_t sw_sched_service_func(void *args)
 }
 
 static int
+sw_event_timer_adapter_ctrl(void *arg)
+{
+	*(const void **)arg = &sw_event_adapter_timer_ops;
+	return 0;
+}
+
+static int
 sw_probe(struct rte_vdev_device *vdev)
 {
 	static const struct rte_eventdev_ops evdev_sw_ops = {
@@ -756,6 +765,8 @@ sw_probe(struct rte_vdev_device *vdev)
 			.xstats_get_names = sw_xstats_get_names,
 			.xstats_get_by_name = sw_xstats_get_by_name,
 			.xstats_reset = sw_xstats_reset,
+
+			.event_timer_adapter_ctrl = sw_event_timer_adapter_ctrl,
 	};
 
 	static const char *const args[] = {
diff --git a/drivers/event/sw/sw_evdev_timer_adapter.c b/drivers/event/sw/sw_evdev_timer_adapter.c
new file mode 100644
index 0000000..5edab0a
--- /dev/null
+++ b/drivers/event/sw/sw_evdev_timer_adapter.c
@@ -0,0 +1,124 @@
+/*-
+ *   BSD LICENSE
+ *
+ *   Copyright(c) 2016-2017 Intel Corporation. All rights reserved.
+ *
+ *   Redistribution and use in source and binary forms, with or without
+ *   modification, are permitted provided that the following conditions
+ *   are met:
+ *
+ *     * Redistributions of source code must retain the above copyright
+ *       notice, this list of conditions and the following disclaimer.
+ *     * Redistributions in binary form must reproduce the above copyright
+ *       notice, this list of conditions and the following disclaimer in
+ *       the documentation and/or other materials provided with the
+ *       distribution.
+ *     * Neither the name of Intel Corporation nor the names of its
+ *       contributors may be used to endorse or promote products derived
+ *       from this software without specific prior written permission.
+ *
+ *   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ *   "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ *   LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ *   A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ *   OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ *   LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ *   DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ *   THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ *   (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ *   OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include <string.h>
+#include <stdbool.h>
+
+#include <rte_event_timer_adapter.h>
+#include <rte_event_timer_adapter_driver.h>
+#include <rte_service_component.h>
+#include <rte_service.h>
+#include <rte_log.h>
+
+static int
+event_timer_adapter_service_func(void *args)
+{
+	RTE_SET_USED(args);
+
+	return 0;
+}
+
+static int
+start_event_timer_adapter_service(struct rte_event_timer_adapter *adapter,
+				  uint8_t id)
+{
+	RTE_SET_USED(adapter);
+	RTE_SET_USED(id);
+
+	RTE_SET_USED(event_timer_adapter_service_func);
+
+	return 0;
+}
+
+static int
+sw_event_timer_adapter_start(struct rte_event_timer_adapter *adapter)
+{
+	RTE_SET_USED(adapter);
+
+	RTE_SET_USED(start_event_timer_adapter_service);
+
+	return 0;
+}
+
+static int
+sw_event_timer_adapter_stop(struct rte_event_timer_adapter *adapter)
+{
+	RTE_SET_USED(adapter);
+
+	return 0;
+}
+
+static int
+sw_event_timer_arm_burst(struct rte_event_timer_adapter *adapter,
+			 struct rte_event_timer **tims,
+			 const uint16_t nb_tims)
+{
+	RTE_SET_USED(adapter);
+	RTE_SET_USED(tims);
+	RTE_SET_USED(nb_tims);
+
+	return 0;
+}
+
+static int
+sw_event_timer_arm_tmo_tick_burst(struct rte_event_timer_adapter *adapter,
+				  struct rte_event_timer **tims,
+				  const uint64_t timeout_tick,
+				  const uint16_t nb_tims)
+{
+	RTE_SET_USED(adapter);
+	RTE_SET_USED(tims);
+	RTE_SET_USED(timeout_tick);
+	RTE_SET_USED(nb_tims);
+
+	return 0;
+}
+
+static int
+sw_event_timer_cancel_burst(struct rte_event_timer_adapter *adapter,
+			    struct rte_event_timer **tims,
+			    const uint16_t nb_tims)
+{
+	RTE_SET_USED(adapter);
+	RTE_SET_USED(tims);
+	RTE_SET_USED(nb_tims);
+
+	return 0;
+}
+
+const struct rte_event_timer_adapter_ops sw_event_adapter_timer_ops = {
+	.adapter_start = sw_event_timer_adapter_start,
+	.adapter_stop = sw_event_timer_adapter_stop,
+	.event_timer_arm_burst = sw_event_timer_arm_burst,
+	.event_timer_arm_tmo_tick_burst = sw_event_timer_arm_tmo_tick_burst,
+	.event_timer_cancel_burst = sw_event_timer_cancel_burst,
+};
diff --git a/lib/librte_eventdev/Makefile b/lib/librte_eventdev/Makefile
index 410578a..b0904fe 100644
--- a/lib/librte_eventdev/Makefile
+++ b/lib/librte_eventdev/Makefile
@@ -43,6 +43,7 @@ CFLAGS += $(WERROR_FLAGS)
 # library source files
 SRCS-y += rte_eventdev.c
 SRCS-y += rte_event_ring.c
+SRCS-y += rte_event_timer_adapter.c
 
 # export include files
 SYMLINK-y-include += rte_eventdev.h
@@ -50,6 +51,8 @@ SYMLINK-y-include += rte_eventdev_pmd.h
 SYMLINK-y-include += rte_eventdev_pmd_pci.h
 SYMLINK-y-include += rte_eventdev_pmd_vdev.h
 SYMLINK-y-include += rte_event_ring.h
+SYMLINK-y-include += rte_event_timer_adapter.h
+SYMLINK-y-include += rte_event_timer_adapter_driver.h
 
 # versioning export map
 EXPORT_MAP := rte_eventdev_version.map
diff --git a/lib/librte_eventdev/rte_event_timer_adapter.c b/lib/librte_eventdev/rte_event_timer_adapter.c
new file mode 100644
index 0000000..d28c676
--- /dev/null
+++ b/lib/librte_eventdev/rte_event_timer_adapter.c
@@ -0,0 +1,227 @@
+/*
+ *   Copyright(c) 2017 Intel Corporation. All rights reserved.
+ *   All rights reserved.
+ *
+ *   Redistribution and use in source and binary forms, with or without
+ *   modification, are permitted provided that the following conditions
+ *   are met:
+ *
+ *     * Redistributions of source code must retain the above copyright
+ *       notice, this list of conditions and the following disclaimer.
+ *     * Redistributions in binary form must reproduce the above copyright
+ *       notice, this list of conditions and the following disclaimer in
+ *       the documentation and/or other materials provided with the
+ *       distribution.
+ *     * Neither the name of Intel Corporation nor the names of its
+ *       contributors may be used to endorse or promote products derived
+ *       from this software without specific prior written permission.
+ *
+ *   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ *   "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ *   LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ *   A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ *   OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ *   LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ *   DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ *   THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ *   (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ *   OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include <string.h>
+
+#include <rte_malloc.h>
+#include <rte_memzone.h>
+#include <rte_lcore.h>
+#include <rte_log.h>
+#include <rte_service_component.h>
+#include <rte_branch_prediction.h>
+
+#include "rte_eventdev_pmd.h"
+#include "rte_event_timer_adapter.h"
+#include "rte_event_timer_adapter_driver.h"
+
+#define RTE_EVENT_TIMER_ADAPTER_NUM_MAX 64
+
+static struct rte_event_timer_adapter *rte_event_timer_adapters;
+
+static inline int
+adapter_valid(uint16_t id)
+{
+	RTE_SET_USED(id);
+
+	return -1;
+}
+
+/* validate ID and retrieve adapter pointer, or return error value */
+#define ADAPTER_VALID_GET_OR_ERR_RET(id, adapter, retval) do {           \
+	if (id >= RTE_EVENT_TIMER_ADAPTER_NUM_MAX || !adapter_valid(id)) \
+		return retval;                                           \
+	adapter = &rte_event_timer_adapters[id];			 \
+} while (0)
+
+
+static int
+default_port_conf_cb(uint16_t id, uint8_t event_dev_id, uint8_t event_port_id,
+		void *conf_arg)
+{
+	RTE_SET_USED(id);
+	RTE_SET_USED(event_dev_id);
+	RTE_SET_USED(event_port_id);
+	RTE_SET_USED(conf_arg);
+
+	return 0;
+}
+
+int
+rte_event_timer_adapter_create(struct rte_event_timer_adapter_conf *conf)
+{
+	/* TODO: check default values */
+	struct rte_event_port_conf port_conf = {
+		.new_event_threshold = 128,
+		.dequeue_depth = 32,
+		.enqueue_depth = 32
+	};
+
+	return rte_event_timer_adapter_create_ext(conf, default_port_conf_cb,
+						  &port_conf);
+}
+
+int
+rte_event_timer_adapter_create_ext(struct rte_event_timer_adapter_conf *conf,
+		rte_event_timer_adapter_port_conf_cb_t conf_cb,
+		void *conf_arg)
+{
+	RTE_SET_USED(conf);
+	RTE_SET_USED(conf_cb);
+	RTE_SET_USED(conf_arg);
+
+	return 0;
+}
+
+int
+rte_event_timer_adapter_get_info(uint16_t id,
+		struct rte_event_timer_adapter_info *adapter_info)
+{
+
+	RTE_SET_USED(id);
+	RTE_SET_USED(adapter_info);
+
+	return 0;
+}
+
+int
+rte_event_timer_adapter_start(uint16_t id)
+{
+	const struct rte_event_timer_adapter_ops *ops = NULL;
+	struct rte_event_timer_adapter *adapter;
+
+	ADAPTER_VALID_GET_OR_ERR_RET(id, adapter, -EINVAL);
+
+	ops = rte_event_timer_adapter_ops_get(adapter);
+	if (unlikely(!ops))
+		return -1;
+	if (likely(!!ops->adapter_start))
+		return ops->adapter_start(adapter);
+
+	return -1;
+}
+
+int
+rte_event_timer_adapter_stop(uint16_t id)
+{
+	const struct rte_event_timer_adapter_ops *ops = NULL;
+	struct rte_event_timer_adapter *adapter;
+
+	ADAPTER_VALID_GET_OR_ERR_RET(id, adapter, -EINVAL);
+
+	ops = rte_event_timer_adapter_ops_get(adapter);
+	if (unlikely(!ops))
+		return -1;
+	if (likely(!!ops->adapter_stop))
+		return ops->adapter_stop(adapter);
+
+	return -1;
+}
+
+int
+rte_event_timer_adapter_free(uint16_t id)
+{
+	RTE_SET_USED(id);
+	return 0;
+}
+
+const struct rte_event_timer_adapter_ops *
+rte_event_timer_adapter_ops_get(struct rte_event_timer_adapter *adapter)
+{
+	struct rte_eventdev *evdev = &rte_eventdevs[adapter->event_dev_id];
+	struct rte_event_timer_adapter_ops *ops;
+	RTE_SET_USED(evdev);
+
+	if (unlikely(!evdev->dev_ops->event_timer_adapter_ctrl ||
+		     evdev->dev_ops->event_timer_adapter_ctrl(&ops) || !ops))
+		return NULL;
+
+	return ops;
+}
+
+int
+rte_event_timer_arm_burst(uint16_t id,
+			  struct rte_event_timer **tim,
+			  uint16_t nb_tims)
+{
+	const struct rte_event_timer_adapter_ops *ops = NULL;
+	struct rte_event_timer_adapter *adapter;
+
+	ADAPTER_VALID_GET_OR_ERR_RET(id, adapter, -EINVAL);
+
+	ops = rte_event_timer_adapter_ops_get(adapter);
+	if (unlikely(!ops))
+		return -1;
+	if (likely(!!ops->event_timer_arm_burst))
+		return ops->event_timer_arm_burst(adapter, tim, nb_tims);
+
+	return -1;
+}
+
+int
+rte_event_timer_arm_tmo_tick_burst(uint16_t id,
+				   struct rte_event_timer **tim,
+				   const uint64_t timeout_tick,
+				   uint16_t nb_tims)
+{
+	const struct rte_event_timer_adapter_ops *ops = NULL;
+	struct rte_event_timer_adapter *adapter;
+
+	ADAPTER_VALID_GET_OR_ERR_RET(id, adapter, -EINVAL);
+
+	ops = rte_event_timer_adapter_ops_get(adapter);
+	if (unlikely(!ops))
+		return -1;
+	if (likely(!!ops->event_timer_arm_tmo_tick_burst))
+		return ops->event_timer_arm_tmo_tick_burst(adapter,
+							   tim,
+							   timeout_tick,
+							   nb_tims);
+
+	return -1;
+}
+
+int rte_event_timer_cancel_burst(uint16_t id,
+				 struct rte_event_timer **tim,
+				 uint16_t nb_tims)
+{
+	const struct rte_event_timer_adapter_ops *ops = NULL;
+	struct rte_event_timer_adapter *adapter;
+
+	ADAPTER_VALID_GET_OR_ERR_RET(id, adapter, -EINVAL);
+
+	ops = rte_event_timer_adapter_ops_get(adapter);
+	if (unlikely(!ops))
+		return -1;
+	if (likely(!!ops->event_timer_cancel_burst))
+		return ops->event_timer_cancel_burst(adapter, tim, nb_tims);
+
+	return -1;
+}
diff --git a/lib/librte_eventdev/rte_event_timer_adapter.h b/lib/librte_eventdev/rte_event_timer_adapter.h
new file mode 100644
index 0000000..85ae7da
--- /dev/null
+++ b/lib/librte_eventdev/rte_event_timer_adapter.h
@@ -0,0 +1,388 @@
+/*
+ *   Copyright(c) 2017 Intel Corporation. All rights reserved.
+ *   All rights reserved.
+ *
+ *   Redistribution and use in source and binary forms, with or without
+ *   modification, are permitted provided that the following conditions
+ *   are met:
+ *
+ *     * Redistributions of source code must retain the above copyright
+ *       notice, this list of conditions and the following disclaimer.
+ *     * Redistributions in binary form must reproduce the above copyright
+ *       notice, this list of conditions and the following disclaimer in
+ *       the documentation and/or other materials provided with the
+ *       distribution.
+ *     * Neither the name of Intel Corporation nor the names of its
+ *       contributors may be used to endorse or promote products derived
+ *       from this software without specific prior written permission.
+ *
+ *   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ *   "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ *   LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ *   A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ *   OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ *   LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ *   DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ *   THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ *   (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ *   OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef _RTE_EVENT_TIMER_ADAPTER_H_
+#define _RTE_EVENT_TIMER_ADAPTER_H_
+
+/**
+ * @file
+ *
+ * RTE Event Timer Adapter
+ *
+ * TODO: Update description
+ */
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include "rte_eventdev.h"
+
+/*
+ * Timer adapter clock source
+ */
+enum rte_event_timer_adapter_clk_src {
+	RTE_EVENT_TIMER_ADAPTER_CPU_CLK,
+	/**< Use CPU clock as the clock source. */
+	RTE_EVENT_TIMER_ADAPTER_EXT_CLK0,
+	/**< Platform dependent external clock source 0. */
+	RTE_EVENT_TIMER_ADAPTER_EXT_CLK1,
+	/**< Platform dependent external clock source 1. */
+	RTE_EVENT_TIMER_ADAPTER_EXT_CLK2,
+	/**< Platform dependent external clock source 2. */
+	RTE_EVENT_TIMER_ADAPTER_EXT_CLK3,
+	/**< Platform dependent external clock source 3. */
+};
+
+#define RTE_EVENT_TIMER_ADAPTER_F_ADJUST_RES	(1ULL << 0)
+/**< The event timer adapter implementation may have constraints on the
+ * resolution (timer_tick_ns) and maximum timer expiry timeout(max_tmo_ns)
+ * based on the given timer adapter or system.  If this flag is set, the
+ * implementation adjusts the resolution and maximum timeout to the best
+ * possible configuration. On successful timer adapter creation, the
+ * application can get the configured resolution and max timeout with
+ * ``rte_event_timer_adapter_get_info()``.
+ */
+#define RTE_EVENT_TIMER_ADAPTER_F_SP_PUT	(1ULL << 1)
+/**< ``rte_event_timer_arm_burst()`` API to be used in single producer mode.
+ *
+ * @see struct rte_event_timer_adapter_conf::timer_wheel_flags
+ */
+
+
+/*
+ * Timer adapter configuration structure
+ */
+struct rte_event_timer_adapter_conf {
+	uint8_t event_dev_id;
+	/**< Event device identifier */
+	uint16_t timer_adapter_id;
+	/**< Event timer adapter identifier */
+	enum rte_event_timer_adapter_clk_src clk_src;
+	/**< Clock source for timer adapter */
+	uint64_t timer_tick_ns;
+	/**< Timer wheel resolution in ns */
+	uint64_t max_tmo_ns;
+	/**< Maximum timer timeout(expiry) in ns */
+	uint64_t nb_timers;
+	/**< Total number of timers per adapter */
+	uint32_t timer_adapter_flags;
+	/**< Timer adapter config flags (RTE_EVENT_TIMER_ADAPTER_F_*) */
+};
+
+struct rte_event_timer_adapter; /* opaque pointer */
+
+/*
+ * Callback function type for producer port creation.
+ */
+typedef int (*rte_event_timer_adapter_port_conf_cb_t)(uint16_t id,
+						      uint8_t event_dev_id,
+						      uint8_t event_port_id,
+						      void *conf_arg);
+
+/*
+ * Create an event timer adapter.
+ *
+ * This function must be invoked first before any other function in the API.
+ *
+ * @param conf
+ *   The event timer adapter configuration structure.
+ *
+ * @return
+ *   Possible rte_errno values include:
+ *    - ERANGE: timer_tick_ns is not in supported range.
+ */
+int rte_event_timer_adapter_create(struct rte_event_timer_adapter_conf *conf);
+
+/*
+ * Create a timer adapter with the supplied callback.
+ *
+ * This function can be used to have a more granular control over the timer
+ * adapter creation.  If a built-in port is absent, then the function uses the
+ * callback provided to create and get the port id to be used as a producer
+ * port.
+ *
+ * @param conf
+ *   The timer adapter configuration structure
+ * @param conf_cb
+ *   The port config callback function.
+ * @param conf_arg
+ *   Opaque pointer to the argument for the callback function
+ *
+ * @return
+ *   Pointer to the new allocated event timer adapter on success.
+ *   NULL on error with rte_errno set appropriately.
+ *   Possible rte_errno values include:
+ *    - ERANGE: timer_tick_ns is not in supported range.
+ */
+int rte_event_timer_adapter_create_ext(
+		struct rte_event_timer_adapter_conf *conf,
+		rte_event_timer_adapter_port_conf_cb_t conf_cb,
+		void *conf_arg);
+
+/*
+ * Timer adapter info structure.
+ */
+struct rte_event_timer_adapter_info {
+	uint64_t min_resolution_ns;
+	/**< Minimum timer adapter resolution in ns */
+	uint64_t max_tmo_ns;
+	/**< Maximum timer timeout(expire) in ns */
+	struct rte_event_timer_adapter_conf conf;
+	/**< Configured timer adapter attributes */
+	uint8_t event_dev_port_id;
+	/* TODO: document this */
+};
+
+/**
+ * Retrieve the contextual information of an event timer adapter.
+ *
+ * @param id
+ *   The identifier of an event timer adapter.
+ *
+ * @param[out] adapter_info
+ *   A pointer to a structure of type *rte_event_timer_adapter_info* to be
+ *   filled with the contextual information of the adapter.
+ *
+ * @return
+ *   - 0: Success, driver updates the contextual information of the
+ *   timer adapter
+ *   - <0: Error code returned by the driver info get function.
+ *   - -EINVAL if adapter identifier invalid
+ *
+ * @see RTE_EVENT_TIMER_ADAPTER_F_ADJUST_RES,
+ *   struct rte_event_timer_adapter_info
+ *
+ */
+int rte_event_timer_adapter_get_info(uint16_t id,
+		struct rte_event_timer_adapter_info *adapter_info);
+
+/**
+ * Start a timer adapter.
+ *
+ * The adapter start step is the last one and consists of setting the timer
+ * adapter to start accepting the timers and schedules to event queues.
+ *
+ * On success, all basic functions exported by the API (timer arm,
+ * timer cancel and so on) can be invoked.
+ *
+ * @param id
+ *   The identifier of an event timer adapter.
+ *
+ * @return
+ *   - 0: Success, adapter started.
+ *   - <0: Error code returned by the driver start function.
+ *   - -EINVAL if adapter identifier invalid
+ */
+int rte_event_timer_adapter_start(uint16_t id);
+
+/**
+ * Stop an event timer adapter.
+ *
+ * The adapter can be restarted with a call to
+ * ``rte_event_timer_adapter_start()``.
+ *
+ * @param id
+ *   The identifier of an event timer adapter.
+ *
+ * @return
+ *   - 0: Success, adapter stop.
+ *   - <0: Error code returned by the driver stop function.
+ *   - -EINVAL if adapter identifier invalid
+ */
+int rte_event_timer_adapter_stop(uint16_t id);
+
+/**
+ * Free an event timer adapter.
+ *
+ * Destroy an event timer adapter, freeing all resources.
+ *
+ * Before invoking this function, the application must wait for all the armed
+ * timers to expire or cancel the outstanding armed timers.
+ *
+ * @param id
+ *   The identifier of an event timer adapter.
+ *
+ * @return
+ *   - 0 on successfully freed the event timer adapter resources.
+ *   - <0 on failure to free an event timer adapter.
+ *   - -EAGAIN if adapter is busy
+ *   - -EINVAL if adapter identifier invalid
+ */
+int rte_event_timer_adapter_free(uint16_t id);
+
+/**
+ * Event timer state.
+ */
+enum rte_event_timer_state {
+	RTE_EVENT_TIMER_NOT_ARMED = 0,
+	/**< Event timer is in not armed state.*/
+	RTE_EVENT_TIMER_ARMED = 1,
+	/**< Event timer successfully armed.*/
+	RTE_EVENT_TIMER_ERROR = -1,
+	/**< Generic event timer error.*/
+	RTE_EVENT_TIMER_ERROR_TOOEARLY = -2,
+	/**< Event timer timeout tick is too little to add to the adapter. */
+	RTE_EVENT_TIMER_ERROR_TOOLATE = -3,
+	/**< Event timer timeout tick is greater than the maximum timeout.*/
+};
+
+/**
+ * The generic *rte_event_timer* structure to hold the event timer attributes
+ * for arm and cancel operations.
+ */
+RTE_STD_C11
+struct rte_event_timer {
+	struct rte_event ev;
+	/**<
+	 * Expiry event attributes.  On successful event timer timeout,
+	 * the following attributes will be used to inject the expiry event to
+	 * the eventdev:
+	 *  - event_queue_id: Targeted event queue id for expiry events.
+	 *  - event_priority: Event priority of the event expiry event in the
+	 *  event queue relative to other events.
+	 *  - sched_type: Scheduling type of the expiry event.
+	 *  - flow_id: Flow id of the expiry event.
+	 *  - op: RTE_EVENT_OP_NEW
+	 *  - event_type: RTE_EVENT_TYPE_TIMER
+	 */
+	enum rte_event_timer_state state;
+	/**< State of the event timer. */
+	uint64_t timeout_ticks;
+	/**< Expiry timer ticks expressed in number of *timer_ticks_ns* from
+	 * now.
+	 * @see struct rte_event_timer_adapter_info::adapter_conf::timer_tick_ns
+	 */
+	uint64_t impl_opaque[2];
+	/**< Implementation-specific opaque data.
+	 * An event timer adapter implementation use this field to hold
+	 * implementation specific values to share between the arm and cancel
+	 * operations.  The application should not modify this field.
+	 */
+	uint8_t user_meta[];
+	/**< Memory to store user specific metadata.
+	 * The event timer adapter implementation should not modify this area.
+	 */
+} __rte_cache_aligned;
+
+/**
+ * Arm a burst of event timers with separate expiration timeout tick for each
+ * event timer.
+ *
+ * Before calling this function, the application allocates
+ * ``struct rte_event_timer`` objects from mempool or huge page backed
+ * application buffers of desired size. On successful allocation,
+ * application updates the `struct rte_event_timer`` attributes such as
+ * expiry event attributes, timeout ticks from now.
+ * This function submits the event timer arm requests to the event timer adapter
+ * and on expiry, the events will be injected to designated event queue.
+ *
+ * @param id
+ *   The identifier of an event timer adapter.
+ * @param tim
+ *   Points to an array of objects of type *rte_event_timer* structure.
+ * @param nb_timers
+ *   Number of event timers in the supplied array.
+ *
+ * @return
+ *   The number of successfully armed event timers. The return value can be less
+ *   than the value of the *nb_timers* parameter. If the return value is less
+ *   than *nb_events*, the remaining event timers at the end of *tim*
+ *   are not consumed, and the caller has to take care of them, and rte_errno
+ *   is set accordingly. Possible errno values include:
+ *   - -EINVAL  Invalid timer adapter identifier, expiry event queue ID is
+ *   invalid, or an expiry event's sched type doesn't match the capabilities of
+ *   the destination event queue.
+ */
+int rte_event_timer_arm_burst(uint16_t id,
+			      struct rte_event_timer **tim,
+			      uint16_t nb_timers);
+
+/**
+ * Arm a burst of event timers with same expiration timeout tick.
+ *
+ * Provides the same functionality as ``rte_event_timer_arm_burst()``, except
+ * that application can use this API when all the event timers have the
+ * same timeout expiration tick. This specialized function can provide the
+ * additional hint to the adapter implementation and optimize if possible.
+ *
+ * @param id
+ *   The identifier of an event timer adapter.
+ * @param tim
+ *   Points to an array of objects of type *rte_event_timer* structure.
+ * @param nb_timers
+ *   Number of event timers in the supplied array.
+ *
+ * @return
+ *   The number of successfully armed event timers. The return value can be less
+ *   than the value of the *nb_timers* parameter. If the return value is less
+ *   than *nb_events*, the remaining event timers at the end of *tim*
+ *   are not consumed, and the caller has to take care of them, and rte_errno
+ *   is set accordingly. Possible errno values include:
+ *   - -EINVAL  Invalid timer adapter identifier, expiry event queue ID is
+ *   invalid, or an expiry event's sched type doesn't match the capabilities of
+ *   the destination event queue.
+ */
+int
+rte_event_timer_arm_tmo_tick_burst(
+		uint16_t id,
+		struct rte_event_timer **tim,
+		const uint64_t timeout_tick,
+		const uint16_t nb_timers);
+
+/**
+ * Cancel a burst of event timer from being scheduled to the event device.
+ *
+ * @param id
+ *   The identifier of an event timer adapter.
+ * @param tim
+ *   Points to an array of objects of type *rte_event_timer* structure
+ * @param nb_timers
+ *   Number of event timer instances in the supplied array.
+ *
+ * @return
+ *   The number of successfully canceled event timers. The return value can be
+ *   less than the value of the *nb_timers* parameter. If the return value is
+ *   less than *nb_events*, the remaining event timers at the end of *tim*
+ *   are not consumed, and the caller has to take care of them, and rte_errno
+ *   is set accordingly. Possible errno values include:
+ *   - -EINVAL  Invalid timer adapter identifier
+ */
+int rte_event_timer_cancel_burst(uint16_t id,
+				 struct rte_event_timer **tim,
+				 uint16_t nb_timers);
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _RTE_EVENT_TIMER_ADAPTER_H_ */
diff --git a/lib/librte_eventdev/rte_event_timer_adapter_driver.h b/lib/librte_eventdev/rte_event_timer_adapter_driver.h
new file mode 100644
index 0000000..d82fe38
--- /dev/null
+++ b/lib/librte_eventdev/rte_event_timer_adapter_driver.h
@@ -0,0 +1,128 @@
+/*
+ *   Copyright(c) 2017 Intel Corporation. All rights reserved.
+ *   All rights reserved.
+ *
+ *   Redistribution and use in source and binary forms, with or without
+ *   modification, are permitted provided that the following conditions
+ *   are met:
+ *
+ *     * Redistributions of source code must retain the above copyright
+ *       notice, this list of conditions and the following disclaimer.
+ *     * Redistributions in binary form must reproduce the above copyright
+ *       notice, this list of conditions and the following disclaimer in
+ *       the documentation and/or other materials provided with the
+ *       distribution.
+ *     * Neither the name of Intel Corporation nor the names of its
+ *       contributors may be used to endorse or promote products derived
+ *       from this software without specific prior written permission.
+ *
+ *   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ *   "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ *   LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ *   A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ *   OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ *   LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ *   DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ *   THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ *   (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ *   OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef RTE_EVENT_TIMER_ADAPTER_DRIVER_H_
+#define RTE_EVENT_TIMER_ADAPTER_DRIVER_H_
+
+/**
+ * @file
+ * RTE event timer adapter driver side API
+ *
+ * This file provides implementation helpers for internal use by plugins, they
+ * are not intended to be exposed to applications and are not subject to ABI
+ * versioning.
+ */
+#include <rte_timer.h>
+#include <rte_ring.h>
+
+#include "rte_event_timer_adapter.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * Event timer adapter structure.
+ */
+struct rte_event_timer_adapter {
+	uint8_t event_dev_id;
+	/**< Event device identifier */
+	uint8_t event_port_id;
+	/**< Event device port identifier */
+	uint16_t id;
+	/**< Event timer adapter identifier */
+	rte_event_timer_adapter_port_conf_cb_t conf_cb;
+	/**< Port configuration callback function for event timer adapter. */
+	void *conf_arg;
+	/**< Argument for port configuration callback function. */
+
+	/**
+	 * Fields for software implementation
+	 */
+	uint32_t service_id;
+	/**< Identifier of service executing timer management logic. */
+	int socket_id;
+	/**< Socket identifier of service. */
+	struct rte_ring event_timer_ring;
+	/**< Ring of messages submitted by application to arm/cancel event
+	 * timers.
+	 */
+	/* event buffer */
+	/**< Buffered timer events to be enqueued to an event device. */
+
+	/* stats */
+};
+
+/**
+ * These callback functions are not supposed to be used by applications
+ * directly, which must rely on the API defined in rte_event_timer_adapter.h.
+ *
+ * See also rte_event_timer_adapter_ops_get().
+ */
+struct rte_event_timer_adapter_ops {
+	int (*adapter_start)
+		(struct rte_event_timer_adapter *adapter);
+	int (*adapter_stop)
+		(struct rte_event_timer_adapter *adapter);
+	int (*event_timer_arm_burst)
+		(struct rte_event_timer_adapter *adapter,
+		 struct rte_event_timer **tims,
+		 const uint16_t nb_tims);
+	int (*event_timer_arm_tmo_tick_burst)
+		(struct rte_event_timer_adapter *adapter,
+		 struct rte_event_timer **tims,
+		 const uint64_t timeout_tick,
+		 const uint16_t nb_tims);
+	int (*event_timer_cancel_burst)
+		(struct rte_event_timer_adapter *adapter,
+		 struct rte_event_timer **tims,
+		 const uint16_t nb_tims);
+};
+
+/**
+ * Get event timer adapter operations structure from an event device.
+ *
+ * @param adapter
+ *   Pointer to adapter for which to obtain an operations struct.
+ *
+ * @return
+ *   The adapter operation structure associated with the event device, NULL in
+ *   case of error, in which case rte_errno is set and the error structure
+ *   contains additional details.
+ */
+const struct rte_event_timer_adapter_ops *
+rte_event_timer_adapter_ops_get(struct rte_event_timer_adapter *adapter);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* RTE_EVENT_TIMER_ADAPTER_DRIVER_H_ */
diff --git a/lib/librte_eventdev/rte_eventdev.h b/lib/librte_eventdev/rte_eventdev.h
index 128bc52..8357c5e 100644
--- a/lib/librte_eventdev/rte_eventdev.h
+++ b/lib/librte_eventdev/rte_eventdev.h
@@ -865,7 +865,7 @@ rte_event_dev_close(uint8_t dev_id);
 /**< The event generated from ethdev subsystem */
 #define RTE_EVENT_TYPE_CRYPTODEV        0x1
 /**< The event generated from crypodev subsystem */
-#define RTE_EVENT_TYPE_TIMERDEV         0x2
+#define RTE_EVENT_TYPE_TIMER		0x2
 /**< The event generated from timerdev subsystem */
 #define RTE_EVENT_TYPE_CPU              0x3
 /**< The event generated from cpu for pipelining.
diff --git a/lib/librte_eventdev/rte_eventdev_pmd.h b/lib/librte_eventdev/rte_eventdev_pmd.h
index 3d72acf..27bcc77 100644
--- a/lib/librte_eventdev/rte_eventdev_pmd.h
+++ b/lib/librte_eventdev/rte_eventdev_pmd.h
@@ -412,6 +412,18 @@ typedef int (*eventdev_xstats_get_names_t)(const struct rte_eventdev *dev,
 		unsigned int *ids, unsigned int size);
 
 /**
+ * Timer adapter control function for an event device.  Currently used to
+ * fill an ops structure with function pointers for an adapter plugin.
+ *
+ * @param arg
+ *   Pointer to an ops structure to fill
+ * @return
+ *   0: Success
+ *   <0: Failure
+ */
+typedef int (*event_timer_adapter_ctrl_t)(void *arg);
+
+/**
  * Get value of one stats and optionally return its id
  *
  * @param dev
@@ -468,6 +480,9 @@ struct rte_eventdev_ops {
 	/**< Get one value by name. */
 	eventdev_xstats_reset_t xstats_reset;
 	/**< Reset the statistics values in xstats. */
+
+	event_timer_adapter_ctrl_t event_timer_adapter_ctrl;
+	/**< Perform actions related to an event timer adapter.*/
 };
 
 /**
diff --git a/lib/librte_eventdev/rte_eventdev_version.map b/lib/librte_eventdev/rte_eventdev_version.map
index 4c48e5f..5655d92 100644
--- a/lib/librte_eventdev/rte_eventdev_version.map
+++ b/lib/librte_eventdev/rte_eventdev_version.map
@@ -51,3 +51,17 @@ DPDK_17.08 {
 	rte_event_ring_init;
 	rte_event_ring_lookup;
 } DPDK_17.05;
+
+DPDK_17.11 {
+	global:
+
+	rte_event_timer_adapter_create;
+	rte_event_timer_adapter_create_ext;
+	rte_event_timer_adapter_get_info;
+	rte_event_timer_adapter_start;
+	rte_event_timer_adapter_stop;
+	rte_event_timer_adapter_free;
+	rte_event_timer_arm_burst;
+	rte_event_timer_arm_tmo_tick_burst;
+	rte_event_timer_cancel_burst;
+} DPDK_17.08;
diff --git a/test/test/Makefile b/test/test/Makefile
index 42d9a49..f09dc73 100644
--- a/test/test/Makefile
+++ b/test/test/Makefile
@@ -204,6 +204,7 @@ SRCS-$(CONFIG_RTE_LIBRTE_CRYPTODEV) += test_cryptodev.c
 ifeq ($(CONFIG_RTE_LIBRTE_EVENTDEV),y)
 SRCS-y += test_eventdev.c
 SRCS-y += test_event_ring.c
+SRCS-y += test_event_timer_adapter.c
 SRCS-$(CONFIG_RTE_LIBRTE_PMD_SW_EVENTDEV) += test_eventdev_sw.c
 SRCS-$(CONFIG_RTE_LIBRTE_PMD_OCTEONTX_SSOVF) += test_eventdev_octeontx.c
 endif
diff --git a/test/test/test_event_timer_adapter.c b/test/test/test_event_timer_adapter.c
new file mode 100644
index 0000000..46ed098
--- /dev/null
+++ b/test/test/test_event_timer_adapter.c
@@ -0,0 +1,183 @@
+/*-
+ *   BSD LICENSE
+ *
+ *   Copyright(c) 2017 Intel Corporation. All rights reserved.
+ *
+ *   Redistribution and use in source and binary forms, with or without
+ *   modification, are permitted provided that the following conditions
+ *   are met:
+ *
+ *     * Redistributions of source code must retain the above copyright
+ *       notice, this list of conditions and the following disclaimer.
+ *     * Redistributions in binary form must reproduce the above copyright
+ *       notice, this list of conditions and the following disclaimer in
+ *       the documentation and/or other materials provided with the
+ *       distribution.
+ *     * Neither the name of Intel Corporation nor the names of its
+ *       contributors may be used to endorse or promote products derived
+ *       from this software without specific prior written permission.
+ *
+ *   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ *   "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ *   LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ *   A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ *   OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ *   LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ *   DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ *   THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ *   (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ *   OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include <string.h>
+
+#include <rte_eventdev.h>
+#include <rte_dev.h>
+#include <rte_event_timer_adapter.h>
+#include <rte_mempool.h>
+#include <rte_errno.h>
+
+#include "test.h"
+
+static int evdev;
+struct rte_event_timer_adapter *g_adapter;
+struct rte_event_timer *g_evtimer;
+struct rte_mempool *g_event_timer_pool;
+
+static inline void
+devconf_set_default_sane_values(struct rte_event_dev_config *dev_conf,
+			struct rte_event_dev_info *info)
+{
+	memset(dev_conf, 0, sizeof(struct rte_event_dev_config));
+	dev_conf->dequeue_timeout_ns = info->min_dequeue_timeout_ns;
+	dev_conf->nb_event_ports = info->max_event_ports;
+	dev_conf->nb_event_queues = info->max_event_queues;
+	dev_conf->nb_event_queue_flows = info->max_event_queue_flows;
+	dev_conf->nb_event_port_dequeue_depth =
+			info->max_event_port_dequeue_depth;
+	dev_conf->nb_event_port_enqueue_depth =
+			info->max_event_port_enqueue_depth;
+	dev_conf->nb_event_port_enqueue_depth =
+			info->max_event_port_enqueue_depth;
+	dev_conf->nb_events_limit =
+			info->max_num_events;
+}
+
+static int
+configure_event_dev(void)
+{
+	struct rte_event_dev_config devconf;
+	int ret;
+	const char *eventdev_name = "event_sw0";
+	struct rte_event_dev_info info;
+
+	evdev = rte_event_dev_get_dev_id(eventdev_name);
+	if (evdev < 0) {
+		if (rte_vdev_init(eventdev_name, NULL) < 0) {
+			printf("Error creating eventdev\n");
+			return TEST_FAILED;
+		}
+		evdev = rte_event_dev_get_dev_id(eventdev_name);
+		if (evdev < 0) {
+			printf("Error finding newly created eventdev\n");
+			return TEST_FAILED;
+		}
+	}
+
+	ret = rte_event_dev_info_get(evdev, &info);
+	TEST_ASSERT_SUCCESS(ret, "Failed to get event dev info");
+
+	devconf_set_default_sane_values(&devconf, &info);
+
+	ret = rte_event_dev_configure(evdev, &devconf);
+	TEST_ASSERT_SUCCESS(ret, "Failed to configure eventdev");
+
+	/* Start the event device */
+	ret = rte_event_dev_start(evdev);
+	TEST_ASSERT_SUCCESS(ret, "Failed to start device");
+
+	return TEST_SUCCESS;
+}
+
+static int
+testsuite_setup(void)
+{
+	int ret;
+
+	/* Setup and start event device. */
+	ret = configure_event_dev();
+	if (ret) {
+		printf("Failed to configure event dev\n");
+		return TEST_FAILED;
+	}
+
+	/* Create a mempool of event timers. */
+	g_event_timer_pool = rte_mempool_create("event_timer_mempool",
+						32,
+						sizeof(struct rte_event_timer),
+						0,
+						0,
+						NULL,
+						NULL,
+						NULL,
+						NULL,
+						rte_socket_id(),
+						0);
+	if (g_event_timer_pool == NULL) {
+		/* Failed to create event timer mempool. */
+		printf("Failed to configure event timer mempool: %s\n",
+		       rte_strerror(rte_errno));
+		return TEST_FAILED;
+	}
+
+	return TEST_SUCCESS;
+}
+
+static void
+testsuite_teardown(void)
+{
+	/* TODO: tear down adapter and evdev */
+
+	rte_mempool_free(g_event_timer_pool);
+}
+
+static int
+adapter_create_free(void)
+{
+	int ret;
+
+	struct rte_event_timer_adapter_conf conf = {
+		.event_dev_id = evdev,
+		.timer_adapter_id = 0,
+	};
+
+	ret = rte_event_timer_adapter_create(&conf);
+	if (ret)
+		return TEST_FAILED;
+
+	ret = rte_event_timer_adapter_free(conf.timer_adapter_id);
+	if (ret)
+		return TEST_FAILED;
+
+	return TEST_SUCCESS;
+}
+
+static struct unit_test_suite adapter_tests  = {
+	.suite_name = "event timer adapter test suite",
+	.setup = testsuite_setup,
+	.teardown = testsuite_teardown,
+	.unit_test_cases = {
+		TEST_CASE(adapter_create_free),
+		TEST_CASES_END() /**< NULL terminate unit test array */
+	}
+};
+
+static int
+test_event_timer_adapter_common(void)
+{
+	return unit_test_suite_runner(&adapter_tests);
+}
+
+REGISTER_TEST_COMMAND(event_timer_adapter_autotest,
+		      test_event_timer_adapter_common);
-- 
2.6.4

^ permalink raw reply	[relevance 1%]

* [dpdk-dev] [pull-request] next-net 17.11 PRE-RC1
@ 2017-09-22 18:09  1% Ferruh Yigit
  0 siblings, 0 replies; 200+ results
From: Ferruh Yigit @ 2017-09-22 18:09 UTC (permalink / raw)
  To: Thomas Monjalon; +Cc: dev, Ferruh Yigit

The following changes since commit 5dce9fcdb2308becb7de7470118af3eeccfe4fd7:

  ethdev: support vtune task tracing (2017-09-22 19:01:32 +0200)

are available in the git repository at:

  http://dpdk.org/git/next/dpdk-next-net 

for you to fetch changes up to 0d16c17ae7a4cd97e141e7b30f7d8647b85b01ed:

  net/af_packet: make qdisc bypass configurable (2017-09-22 18:58:44 +0100)

----------------------------------------------------------------
Adrien Mazarguil (54):
      net/mlx4: add consistency to copyright notices
      net/mlx4: remove limitation on number of instances
      net/mlx4: check max number of ports dynamically
      net/mlx4: remove useless compilation checks
      net/mlx4: remove secondary process support
      net/mlx4: remove useless code
      net/mlx4: remove soft counters compilation option
      net/mlx4: remove scatter mode compilation option
      net/mlx4: remove Tx inline compilation option
      net/mlx4: remove allmulti and promisc support
      net/mlx4: remove VLAN filter support
      net/mlx4: remove MAC address configuration support
      net/mlx4: drop MAC flows affecting all Rx queues
      net/mlx4: revert flow API RSS support
      net/mlx4: revert RSS parent queue refactoring
      net/mlx4: drop RSS support
      net/mlx4: drop checksum offloads support
      net/mlx4: drop packet type recognition support
      net/mlx4: drop scatter/gather support
      net/mlx4: drop inline receive support
      net/mlx4: use standard QP attributes
      net/mlx4: revert resource domain support
      net/mlx4: revert multicast echo prevention
      net/mlx4: revert fast Verbs interface for Tx
      net/mlx4: revert fast Verbs interface for Rx
      net/mlx4: simplify Rx buffer handling
      net/mlx4: simplify link update function
      net/mlx4: standardize on negative errno values
      net/mlx4: clean up coding style inconsistencies
      net/mlx4: remove control path locks
      net/mlx4: remove unnecessary wrapper functions
      net/mlx4: remove mbuf macro definitions
      net/mlx4: use standard macro to get array size
      net/mlx4: separate debugging macros
      net/mlx4: use a single interrupt handle
      net/mlx4: rename alarm field
      net/mlx4: refactor interrupt FD settings
      net/mlx4: clean up interrupt functions prototypes
      net/mlx4: compact interrupt functions
      net/mlx4: separate interrupt handling
      net/mlx4: separate Rx/Tx definitions
      net/mlx4: separate Rx/Tx functions
      net/mlx4: separate device control functions
      net/mlx4: separate Tx configuration functions
      net/mlx4: separate Rx configuration functions
      net/mlx4: group flow API handlers in common file
      net/mlx4: rename private functions in flow API
      net/mlx4: separate memory management functions
      net/mlx4: clean up includes and comments
      net/mlx4: remove isolated mode constraint
      net/mlx4: rely on ethdev for Tx/Rx queue arrays
      net/mlx4: fix unhandled event debug message
      net/mlx4: fix rescheduled link status check
      net/mlx4: merge interrupt collector function

Alejandro Lucero (28):
      net/nfp: write MAC address to configuration bar
      net/nfp: fix RSS
      net/nfp: fix Rx interrupt when multiqueue
      net/nfp: handle packets with length 0 as usual ones
      net/nfp: support new firmware medatada API
      net/nfp: add NSP user space interface
      net/nfp: add specific PF probe function
      net/nfp: add support for new PCI id
      net/nfp: add NSP support for commands
      net/nfp: add NSP FW upload command
      net/nfp: add NSP symbol resolution command
      net/nfp: add FW upload logic
      net/nfp: add support for vnic config bar mapping
      net/nfp: add support for vNIC Rx/Tx bar mappings
      net/nfp: support PF devices inside PMD initialization
      net/nfp: allocate ethernet device from PF probe function
      net/nfp: support PF multiport
      net/nfp: add NSP support for HW link configuration
      net/nfp: add support for HW port link configuration
      net/nfp: read PF port MAC addr using NSP
      doc: update NFP with PF support information
      doc: update release notes with NFP PF support
      doc: create different features files for NFP drivers
      net/nfp: add info about RSS capabilities
      net/nfp: remove firmware ABI check
      net/nfp: configure L2 broadcast and multicast
      net/nfp: configure capabilities by default
      net/nfp: write PF MAC to config BAR

Andrew Rybchenko (2):
      net/sfc/base: provide information about supported tunnels
      net/sfc: use RSS key size define from base driver

Beilei Xing (4):
      net/i40e: remove virtual channel command for VLAN pvid
      net/i40e: remove virtual channel command for VSI queue
      net/i40e: remove DPDK PF version specific code
      net/i40e: fix VF device stop issue

Bruce Richardson (1):
      net/bonding: rename map file to standard name

Chas Williams (1):
      net/af_packet: make qdisc bypass configurable

Congwen Zhang (1):
      net/cxgbe: fix memory leak

Daniel Mrzyglod (1):
      net/i40e: fix return code not checked

David Harton (4):
      net/vmxnet3: replenish ring buffers in Rx processing
      net/vmxnet3: fix MAC address set
      net/i40e: fix i40evf MAC filter table
      net/ixgbe: eliminate duplicate filterlist symbols

Ferruh Yigit (1):
      net/ark: remove empty header file

Gaetan Rivet (2):
      net/failsafe: safer subdev iterator
      net/failsafe: fix errno set on command execution

Ivan Malov (8):
      net/sfc: specify correct scale table size on Rx start
      net/sfc: add support for Rx descriptor status API
      net/sfc: add support for Tx descriptor status API
      net/sfc: fix unused variable warnings in RSS-agnostic build
      net/sfc/base: add RSS key size define
      net/sfc: add support for the flow API RSS action
      net/sfc: free mbufs in bulks on EF10 native Tx datapath reap
      net/sfc: free mbufs in bulks on simple EF10 Tx datapath reap

Jerin Jacob (1):
      net/thunderx: add device speed capability info

Jingjing Wu (5):
      net/i40e: fix interrupt throttling setting in PF
      net/i40e: remove unused and incorrect definition
      net/i40e: fix memory leak if VF init fails
      net/i40e/base: fix bool definition
      net/i40e: fix variable assignment

John Daley (1):
      net/enic: fix multi-process operation

Mark Spender (10):
      net/sfc/base: use proper MCDI command for encap filters
      net/sfc/base: support filters for encapsulated packets
      net/sfc/base: insert filters for encapsulated packets
      net/sfc/base: define a handle to denote default RSS context
      net/sfc/base: fix default RSS context check on Siena
      net/sfc/base: add the max number of RSS exclusive contexts
      net/sfc/base: rename API to check Rx scale and hash support
      net/sfc/base: add API to allocate and free RSS contexts
      net/sfc/base: update RSS API to take RSS context parameter
      net/sfc/base: add API to set an RSS context for a filter

Matan Azrad (8):
      net/failsafe: fix Tx sub device deactivating
      net/mlx5: fix locking in xstats functions
      net/failsafe: fix parameters parsing
      net/mlx5: fix probe failure report
      net/failsafe: fix adding MAC error report miss
      net/mlx5: link status update separation
      net/mlx5: support device removal event
      net/failsafe: stat support enhancement

Nélio Laranjeiro (10):
      net/mlx5: avoid reusing old queue's mbuf on reconfigure
      net/mlx5: prepare vector Rx ring at setup time
      net/mlx5: cleanup Rx ring in free functions
      net/mlx5: remove flow drop useless if branches
      net/mlx5: remove pedantic pragma
      net/mlx5: fix non working secondary process by removing it
      net/mlx5: remove multiple drop RSS queues
      net/mlx5: remove old MLNX OFED 3.3 verification
      net/mlx5: fix clang build
      net/mlx5: improve stack usage during link update

Ophir Munk (1):
      net/tap: fix flow and port commands

Qi Zhang (2):
      net/i40e: fix flow control watermark mismatch
      net/i40e: fix packet count for PF

Qiming Yang (1):
      doc: add i40e firmware upgrade guide

Rasesh Mody (53):
      net/qede/base: add NVM config options
      net/qede/base: update management FW supported features
      net/qede/base: use crc32 OSAL macro
      net/qede/base: allocate VF queues before PF
      net/qede/base: convert device type to enum
      net/qede/base: changes for VF queue zone
      net/qede/base: interchangeably use SB between PF and VF
      net/qede/base: add API to configure coalescing for VF queues
      net/qede/base: restrict cache line size register padding
      net/qede/base: fix to use a passed ptt handle
      net/qede/base: add a sanity check
      net/qede/base: add SmartAN support
      net/qede/base: alter driver's force load behavior
      net/qede/base: add mdump sub-commands
      net/qede/base: add EEE support
      net/qede/base: use passed ptt handler
      net/qede/base: prevent re-assertions of parity errors
      net/qede/base: avoid possible race condition
      net/qede/base: revise management FW mbox access scheme
      net/qede/base: remove helper functions/structures
      net/qede/base: initialize resc lock/unlock params
      net/qede/base: rename MFW get/set field defines
      net/qede/base: allow clients to override VF MSI-X table size
      net/qede/base: add API to send STAG config update to FW
      net/qede/base: add support for doorbell overflow recovery
      net/qede/base: block mbox command to unresponsive MFW
      net/qede/base: prevent stop vport assert by malicious VF
      net/qede/base: remove unused parameters
      net/qede/base: fix macros to check chip revision/metal
      net/qede/base: read per queue coalescing from HW
      net/qede/base: refactor device's number of ports logic
      net/qede/base: use proper units for rate limiting
      net/qede/base: use available macro
      net/qede/base: use function pointers for spq async callback
      net/qede/base: fix API return types
      net/qede/base: semantic changes
      net/qede/base: handle the error condition properly
      net/qede/base: add new macro for CMT mode
      net/qede/base: change verbosity
      net/qede/base: fix number of app table entries
      net/qede/base: update firmware to 8.30.12.0
      net/qede/base: add UFP support
      net/qede/base: add support for mapped doorbell Bars for VFs
      net/qede/base: add support for driver attribute repository
      net/qede/base: move define to header file
      net/qede/base: dcbx dscp related extensions
      net/qede/base: add feature support for per-PF virtual link
      net/qede/base: catch an init command write failure
      net/qede/base: retain dcbx config till actually applied
      net/qede/base: disable aRFS for NPAR and 100G
      net/qede/base: add support for WoL writes
      net/qede/base: remove unused input parameter
      net/qede/base: update PMD version to 2.6.0.1

Raslan Darawsheh (1):
      net/failsafe: fix failsafe bus uninit return value

RongQiang Xie (3):
      net/ixgbe: check memory allocation result
      net/enic: fix possible null pointer dereference
      net/qede: fix possible null pointer dereference

Sebastian Basierski (1):
      net/vmxnet3: fix unintentional integer overflow

Shachar Beiser (1):
      net/mlx5: replace network to host macros

Shahaf Shuler (8):
      net/mlx5: extend debug logs verbosity
      net/mlx5: replace memory barrier type
      net/mlx5: don't map doorbell register to write combining
      net/mlx5: fix num seg assumption on vPMD
      net/mlx5: fix Tx stats error counter definition
      net/mlx5: fix Tx stats error counter logic
      net/mlx5: enforce Tx num of segments limitation
      net/mlx5: fix TSO segment size verification

Shijith Thotton (2):
      net/liquidio: remove FLR request to PF driver
      net/liquidio: add API to set MTU

Stephen Hemminger (6):
      app/testpmd: remove unnecessary void casts
      net/bnx2x: remove unnecessary void casts
      net/sfc: remove unnecessary void casts
      net/igb: remove unnecessary void casts
      net/i40e: remove unnecessary void casts
      net/ixgbe: remove unnecessary void casts

Tomasz Kulasek (1):
      net/bonding: fix slaves capacity check

Vipin Varghese (1):
      net/tap: fix unregistering callback with invalid fd

Wei Dai (3):
      net/ixgbe: add VLAN info in queue info msg to VF
      net/ixgbe: fix mapping of user priority to TC
      net/ixgbe: fix adding a mirror rule

Wei Zhao (5):
      net/ixgbe: fix MAC VLAN filter fail problem
      net/i40e: fix clear xstats bug in VF
      app/testpmd: fix packet throughput after stats reset
      net/i40e: support reset stats in VF
      net/i40e: refactor some stats related functions

Wenfeng Liu (1):
      net/af_packet: support Tx scattered mbuf input

Wenzhuo Lu (2):
      net/i40e: new API to add VF MAC address from PF
      app/testpmd: fix wrong API of adding VF MAC

Xiaoyun Li (1):
      net/i40e: fix PF notify issue when VF is not up

Xueming Li (1):
      net/mlx5: fix tunnel offload detection

Yong Wang (3):
      doc/failsafe: fix typos
      net/liquidio: fix uninitialized variable
      net/igb: fix memcpy length

Yongseok Koh (1):
      net/mlx5: fix calculating TSO inline size

Zhiyong Yang (1):
      test: fix assignment operation

 app/test-pmd/cmdline.c                             |   33 +-
 app/test-pmd/config.c                              |   10 +-
 app/test-pmd/testpmd.c                             |    2 +-
 config/common_base                                 |    3 -
 doc/guides/nics/ark.rst                            |    3 -
 doc/guides/nics/fail_safe.rst                      |    4 +-
 doc/guides/nics/features/enic.ini                  |    1 +
 doc/guides/nics/features/liquidio.ini              |    1 +
 doc/guides/nics/features/mlx4.ini                  |   13 -
 doc/guides/nics/features/mlx5.ini                  |    2 +-
 doc/guides/nics/features/{nfp.ini => nfp_pf.ini}   |    1 -
 doc/guides/nics/features/nfp_vf.ini                |   28 +
 doc/guides/nics/features/sfc_efx.ini               |    2 +
 doc/guides/nics/features/thunderx.ini              |    1 +
 doc/guides/nics/i40e.rst                           |    2 +
 doc/guides/nics/mlx4.rst                           |   37 +-
 doc/guides/nics/mlx5.rst                           |    4 +
 doc/guides/nics/nfp.rst                            |   78 +-
 doc/guides/nics/sfc_efx.rst                        |    8 +-
 doc/guides/rel_notes/release_17_11.rst             |   10 +
 drivers/net/af_packet/rte_eth_af_packet.c          |   39 +-
 drivers/net/ark/ark_ethdev.c                       |    1 -
 drivers/net/ark/ark_ethdev.h                       |   37 -
 drivers/net/ark/ark_ethdev_rx.c                    |    1 -
 drivers/net/ark/ark_ethdev_tx.c                    |    1 -
 drivers/net/bnx2x/bnx2x.c                          |    6 +-
 drivers/net/bnx2x/bnx2x.h                          |    4 +-
 drivers/net/bnx2x/ecore_sp.h                       |    2 +-
 drivers/net/bonding/Makefile                       |    2 +-
 drivers/net/bonding/rte_eth_bond_pmd.c             |   25 +-
 ...h_bond_version.map => rte_pmd_bond_version.map} |    0
 drivers/net/cxgbe/base/t4_hw.c                     |    3 +
 drivers/net/e1000/igb_ethdev.c                     |    2 +-
 drivers/net/e1000/igb_flow.c                       |    8 +-
 drivers/net/enic/base/vnic_dev.c                   |   10 +-
 drivers/net/enic/enic_ethdev.c                     |   43 +
 drivers/net/enic/enic_main.c                       |    8 +
 drivers/net/failsafe/failsafe_args.c               |   32 +-
 drivers/net/failsafe/failsafe_eal.c                |   19 +-
 drivers/net/failsafe/failsafe_ether.c              |   36 +-
 drivers/net/failsafe/failsafe_ops.c                |   16 +-
 drivers/net/failsafe/failsafe_private.h            |   46 +-
 drivers/net/i40e/base/i40e_osdep.h                 |    3 +-
 drivers/net/i40e/i40e_ethdev.c                     |  110 +-
 drivers/net/i40e/i40e_ethdev.h                     |    4 +-
 drivers/net/i40e/i40e_ethdev_vf.c                  |  313 +-
 drivers/net/i40e/i40e_fdir.c                       |    2 +-
 drivers/net/i40e/i40e_pf.c                         |  129 +-
 drivers/net/i40e/i40e_pf.h                         |   60 -
 drivers/net/i40e/i40e_rxtx.c                       |   84 +-
 drivers/net/i40e/i40e_tm.c                         |    6 +-
 drivers/net/i40e/rte_pmd_i40e.c                    |   64 +-
 drivers/net/i40e/rte_pmd_i40e.h                    |   20 +
 drivers/net/i40e/rte_pmd_i40e_version.map          |    7 +
 drivers/net/ixgbe/ixgbe_ethdev.c                   |   16 +-
 drivers/net/ixgbe/ixgbe_ethdev.h                   |   44 +-
 drivers/net/ixgbe/ixgbe_fdir.c                     |    5 +-
 drivers/net/ixgbe/ixgbe_flow.c                     |   96 +-
 drivers/net/ixgbe/ixgbe_pf.c                       |   61 +-
 drivers/net/ixgbe/ixgbe_rxtx.c                     |   41 +-
 drivers/net/ixgbe/ixgbe_tm.c                       |    6 +-
 drivers/net/liquidio/base/lio_23xx_vf.c            |   19 -
 drivers/net/liquidio/base/lio_23xx_vf.h            |    2 -
 drivers/net/liquidio/base/lio_hw_defs.h            |    1 +
 drivers/net/liquidio/base/lio_mbox.h               |    1 -
 drivers/net/liquidio/lio_ethdev.c                  |   97 +-
 drivers/net/mlx4/Makefile                          |   41 +-
 drivers/net/mlx4/mlx4.c                            | 6354 +-------------------
 drivers/net/mlx4/mlx4.h                            |  333 +-
 drivers/net/mlx4/mlx4_ethdev.c                     |  788 +++
 drivers/net/mlx4/mlx4_flow.c                       |  491 +-
 drivers/net/mlx4/mlx4_flow.h                       |   51 +-
 drivers/net/mlx4/mlx4_intr.c                       |  367 ++
 drivers/net/mlx4/mlx4_mr.c                         |  183 +
 drivers/net/mlx4/mlx4_rxq.c                        |  579 ++
 drivers/net/mlx4/mlx4_rxtx.c                       |  524 ++
 drivers/net/mlx4/mlx4_rxtx.h                       |  154 +
 drivers/net/mlx4/mlx4_txq.c                        |  472 ++
 drivers/net/mlx4/mlx4_utils.c                      |   66 +
 drivers/net/mlx4/mlx4_utils.h                      |  111 +
 drivers/net/mlx5/Makefile                          |    5 -
 drivers/net/mlx5/mlx5.c                            |   54 +-
 drivers/net/mlx5/mlx5.h                            |   21 -
 drivers/net/mlx5/mlx5_defs.h                       |    3 +-
 drivers/net/mlx5/mlx5_ethdev.c                     |  301 +-
 drivers/net/mlx5/mlx5_fdir.c                       |    7 -
 drivers/net/mlx5/mlx5_flow.c                       |   59 +-
 drivers/net/mlx5/mlx5_mac.c                        |   15 +-
 drivers/net/mlx5/mlx5_mr.c                         |    9 +-
 drivers/net/mlx5/mlx5_prm.h                        |    6 +-
 drivers/net/mlx5/mlx5_rss.c                        |    7 -
 drivers/net/mlx5/mlx5_rxmode.c                     |   15 +-
 drivers/net/mlx5/mlx5_rxq.c                        |  175 +-
 drivers/net/mlx5/mlx5_rxtx.c                       |  192 +-
 drivers/net/mlx5/mlx5_rxtx.h                       |   47 +-
 drivers/net/mlx5/mlx5_rxtx_vec_sse.c               |   68 +-
 drivers/net/mlx5/mlx5_stats.c                      |   18 +-
 drivers/net/mlx5/mlx5_trigger.c                    |    7 -
 drivers/net/mlx5/mlx5_txq.c                        |   72 +-
 drivers/net/mlx5/mlx5_vlan.c                       |    7 -
 drivers/net/nfp/Makefile                           |    2 +
 drivers/net/nfp/nfp_net.c                          |  542 +-
 drivers/net/nfp/nfp_net_ctrl.h                     |   10 +
 drivers/net/nfp/nfp_net_eth.h                      |   82 +
 drivers/net/nfp/nfp_net_pmd.h                      |   13 +
 drivers/net/nfp/nfp_nfpu.c                         |  103 +
 drivers/net/nfp/nfp_nfpu.h                         |   55 +
 drivers/net/nfp/nfp_nspu.c                         |  623 ++
 drivers/net/nfp/nfp_nspu.h                         |   83 +
 drivers/net/qede/base/bcm_osal.c                   |   12 +
 drivers/net/qede/base/bcm_osal.h                   |   20 +-
 drivers/net/qede/base/common_hsi.h                 |  760 +--
 drivers/net/qede/base/ecore.h                      |  210 +-
 drivers/net/qede/base/ecore_cxt.c                  |  111 +-
 drivers/net/qede/base/ecore_cxt.h                  |    6 +-
 drivers/net/qede/base/ecore_dcbx.c                 |  328 +-
 drivers/net/qede/base/ecore_dcbx.h                 |    9 +-
 drivers/net/qede/base/ecore_dev.c                  | 1066 +++-
 drivers/net/qede/base/ecore_dev_api.h              |  113 +-
 drivers/net/qede/base/ecore_hsi_common.h           |  245 +-
 drivers/net/qede/base/ecore_hsi_debug_tools.h      |    6 +-
 drivers/net/qede/base/ecore_hsi_eth.h              |   65 +-
 drivers/net/qede/base/ecore_hw.c                   |   10 +-
 drivers/net/qede/base/ecore_hw.h                   |   15 +-
 drivers/net/qede/base/ecore_init_fw_funcs.c        |  511 +-
 drivers/net/qede/base/ecore_init_fw_funcs.h        |   98 +-
 drivers/net/qede/base/ecore_init_ops.c             |   73 +-
 drivers/net/qede/base/ecore_init_ops.h             |    3 +-
 drivers/net/qede/base/ecore_int.c                  | 1001 ++-
 drivers/net/qede/base/ecore_int.h                  |   73 +-
 drivers/net/qede/base/ecore_int_api.h              |   47 +-
 drivers/net/qede/base/ecore_iov_api.h              |   41 +-
 drivers/net/qede/base/ecore_iro.h                  |    8 +
 drivers/net/qede/base/ecore_iro_values.h           |   44 +-
 drivers/net/qede/base/ecore_l2.c                   |  293 +-
 drivers/net/qede/base/ecore_l2.h                   |   82 +-
 drivers/net/qede/base/ecore_l2_api.h               |   30 +-
 drivers/net/qede/base/ecore_mcp.c                  | 1612 +++--
 drivers/net/qede/base/ecore_mcp.h                  |  195 +-
 drivers/net/qede/base/ecore_mcp_api.h              |  190 +-
 drivers/net/qede/base/ecore_mng_tlv.c              |    9 +-
 drivers/net/qede/base/ecore_proto_if.h             |    5 +
 drivers/net/qede/base/ecore_rt_defs.h              |  858 +--
 drivers/net/qede/base/ecore_sp_api.h               |    2 +
 drivers/net/qede/base/ecore_sp_commands.c          |  152 +-
 drivers/net/qede/base/ecore_sp_commands.h          |   33 +-
 drivers/net/qede/base/ecore_spq.c                  |  109 +-
 drivers/net/qede/base/ecore_spq.h                  |   20 +
 drivers/net/qede/base/ecore_sriov.c                |  945 ++-
 drivers/net/qede/base/ecore_sriov.h                |   53 +-
 drivers/net/qede/base/ecore_vf.c                   |  414 +-
 drivers/net/qede/base/ecore_vf.h                   |   72 +-
 drivers/net/qede/base/ecore_vfpf_if.h              |   80 +-
 drivers/net/qede/base/mcp_public.h                 |  465 +-
 drivers/net/qede/base/nvm_cfg.h                    |   90 +-
 drivers/net/qede/base/reg_addr.h                   |   17 +
 drivers/net/qede/qede_ethdev.c                     |   33 +-
 drivers/net/qede/qede_ethdev.h                     |    4 +-
 drivers/net/qede/qede_fdir.c                       |    8 +-
 drivers/net/qede/qede_if.h                         |   15 +-
 drivers/net/qede/qede_main.c                       |   76 +-
 drivers/net/qede/qede_rxtx.c                       |   12 +-
 drivers/net/sfc/Makefile                           |    3 +
 drivers/net/sfc/base/ef10_filter.c                 |  288 +-
 drivers/net/sfc/base/ef10_impl.h                   |   25 +
 drivers/net/sfc/base/ef10_nic.c                    |   10 +
 drivers/net/sfc/base/ef10_rx.c                     |   96 +-
 drivers/net/sfc/base/efx.h                         |  105 +-
 drivers/net/sfc/base/efx_filter.c                  |  103 +-
 drivers/net/sfc/base/efx_impl.h                    |   20 +-
 drivers/net/sfc/base/efx_rx.c                      |  142 +-
 drivers/net/sfc/base/hunt_nic.c                    |    7 +
 drivers/net/sfc/base/medford_nic.c                 |    7 +
 drivers/net/sfc/base/siena_nic.c                   |    3 +
 drivers/net/sfc/sfc.c                              |   14 +-
 drivers/net/sfc/sfc.h                              |    6 +-
 drivers/net/sfc/sfc_dp_rx.h                        |    5 +
 drivers/net/sfc/sfc_dp_tx.h                        |    9 +
 drivers/net/sfc/sfc_ef10_rx.c                      |    9 +
 drivers/net/sfc/sfc_ef10_tx.c                      |   73 +-
 drivers/net/sfc/sfc_ethdev.c                       |   47 +-
 drivers/net/sfc/sfc_flow.c                         |  188 +-
 drivers/net/sfc/sfc_flow.h                         |   15 +
 drivers/net/sfc/sfc_rx.c                           |   72 +-
 drivers/net/sfc/sfc_tweak.h                        |    3 +
 drivers/net/sfc/sfc_tx.c                           |   56 +
 drivers/net/tap/rte_eth_tap.c                      |  146 +-
 drivers/net/tap/rte_eth_tap.h                      |    2 +-
 drivers/net/tap/tap_flow.c                         |    3 +-
 drivers/net/thunderx/nicvf_ethdev.c                |    7 +
 drivers/net/vmxnet3/vmxnet3_ethdev.c               |    6 +-
 drivers/net/vmxnet3/vmxnet3_rxtx.c                 |   22 +-
 test/test/test_link_bonding_mode4.c                |    2 +-
 193 files changed, 14781 insertions(+), 12352 deletions(-)
 rename doc/guides/nics/features/{nfp.ini => nfp_pf.ini} (96%)
 create mode 100644 doc/guides/nics/features/nfp_vf.ini
 delete mode 100644 drivers/net/ark/ark_ethdev.h
 rename drivers/net/bonding/{rte_eth_bond_version.map => rte_pmd_bond_version.map} (100%)
 create mode 100644 drivers/net/mlx4/mlx4_ethdev.c
 create mode 100644 drivers/net/mlx4/mlx4_intr.c
 create mode 100644 drivers/net/mlx4/mlx4_mr.c
 create mode 100644 drivers/net/mlx4/mlx4_rxq.c
 create mode 100644 drivers/net/mlx4/mlx4_rxtx.c
 create mode 100644 drivers/net/mlx4/mlx4_rxtx.h
 create mode 100644 drivers/net/mlx4/mlx4_txq.c
 create mode 100644 drivers/net/mlx4/mlx4_utils.c
 create mode 100644 drivers/net/mlx4/mlx4_utils.h
 create mode 100644 drivers/net/nfp/nfp_net_eth.h
 create mode 100644 drivers/net/nfp/nfp_nfpu.c
 create mode 100644 drivers/net/nfp/nfp_nfpu.h
 create mode 100644 drivers/net/nfp/nfp_nspu.c
 create mode 100644 drivers/net/nfp/nfp_nspu.h

^ permalink raw reply	[relevance 1%]

* [dpdk-dev] [PATCH v5 0/5] increase port_id range
  2017-09-21  8:32  4% ` [dpdk-dev] [PATCH v4 0/5] " Zhiyong Yang
  2017-09-21  8:32  8%   ` [dpdk-dev] [PATCH v4 1/5] net/bonding: remove bonding APIs using ABI versioning Zhiyong Yang
  2017-09-21  8:32  1%   ` [dpdk-dev] [PATCH v4 2/5] ethdev: increase port_id range Zhiyong Yang
@ 2017-09-25  3:22  4%   ` Zhiyong Yang
  2017-09-25  3:22  7%     ` [dpdk-dev] [PATCH v5 1/5] net/bonding: remove bonding APIs using ABI versioning Zhiyong Yang
                       ` (2 more replies)
  2 siblings, 3 replies; 200+ results
From: Zhiyong Yang @ 2017-09-25  3:22 UTC (permalink / raw)
  To: dev; +Cc: ferruh.yigit, thomas, adrien.mazarguil

port_id is currently defined as uint8_t, which is limited to the range
0 to 255. A larger range is required for vdev scalability.

It is necessary for a redefinition of port_id to extend it from
1 bytes to 2 bytes. All ethdev APIs and usages related to port_id will
be changed at the same time.

Discussion about port_id is the following thread.
http://www.dpdk.org/dev/patchwork/patch/23208/

Changes in V2:
1. cover more PMDs to increase port_id range.
2. cover more examples to increase port_id range.
3. add 17.11 release note.

Changes in V3:
1.  cover mlx4 and mlx5.
2.  add to increase port_id range in test code.
3.  The patch "librte_mbuf: modify port initialization value" is merged
    into the patchset.

Changes in V4:
1.  Add a patch to remove bonding APIs using ABI versioning according to
    Ferruh's comments.
2.  Unify to use typedef portid_t in testpmd code.
3.  update release note deprecation doc in 2/5
4.  fix some issues according to comments.

Changes in V5:
1.  For 1/5, bond_mode_8023ad_conf_get_v1708() and bond_mode_8023ad_conf_get()
    are merged into one function bond_mode_8023ad_conf_get.

Note: 3/5 and 4/5 patches' compilling depends on 2/5 patch since 2/5 patch
breaks lib/PMD API/ABI.

Zhiyong Yang (5):
  net/bonding: remove bonding APIs using ABI versioning
  ethdev: increase port_id range
  examples: increase port_id range
  test: increase port_id range
  librte_mbuf: modify port initialization value

 app/pdump/main.c                                   |   2 +-
 app/test-pmd/cmdline.c                             |   6 +-
 app/test-pmd/config.c                              |   4 +-
 app/test-pmd/ieee1588fwd.c                         |  26 +--
 app/test-pmd/parameters.c                          |   2 +-
 app/test-pmd/rxonly.c                              |   2 +-
 app/test-pmd/testpmd.c                             |  18 +-
 app/test-pmd/testpmd.h                             |   4 +-
 doc/guides/rel_notes/deprecation.rst               |   6 -
 doc/guides/rel_notes/release_17_11.rst             |  18 +-
 drivers/net/af_packet/Makefile                     |   2 +-
 drivers/net/af_packet/rte_eth_af_packet.c          |   2 +-
 drivers/net/ark/ark_ethdev.c                       |   2 +-
 drivers/net/avp/Makefile                           |   2 +-
 drivers/net/avp/avp_ethdev.c                       |   2 +-
 drivers/net/bnx2x/Makefile                         |   2 +-
 drivers/net/bnx2x/bnx2x_rxtx.h                     |   4 +-
 drivers/net/bnxt/Makefile                          |   2 +-
 drivers/net/bnxt/bnxt.h                            |   2 +-
 drivers/net/bnxt/bnxt_ethdev.c                     |   4 +-
 drivers/net/bnxt/bnxt_rxq.h                        |   2 +-
 drivers/net/bnxt/bnxt_txq.h                        |   2 +-
 drivers/net/bnxt/rte_pmd_bnxt.c                    |  32 +--
 drivers/net/bnxt/rte_pmd_bnxt.h                    |  32 +--
 drivers/net/bonding/Makefile                       |   2 +-
 drivers/net/bonding/rte_eth_bond.h                 |  41 ++--
 drivers/net/bonding/rte_eth_bond_8023ad.c          | 203 +++--------------
 drivers/net/bonding/rte_eth_bond_8023ad.h          |  48 ++--
 drivers/net/bonding/rte_eth_bond_8023ad_private.h  |  12 +-
 drivers/net/bonding/rte_eth_bond_alb.c             |   6 +-
 drivers/net/bonding/rte_eth_bond_alb.h             |   6 +-
 drivers/net/bonding/rte_eth_bond_api.c             |  64 +++---
 drivers/net/bonding/rte_eth_bond_args.c            |   2 +-
 drivers/net/bonding/rte_eth_bond_pmd.c             |  62 +++---
 drivers/net/bonding/rte_eth_bond_private.h         |  45 ++--
 drivers/net/bonding/rte_eth_bond_version.map       |   4 -
 drivers/net/e1000/Makefile                         |   2 +-
 drivers/net/e1000/em_ethdev.c                      |   2 +-
 drivers/net/e1000/em_rxtx.c                        |   4 +-
 drivers/net/e1000/igb_rxtx.c                       |   4 +-
 drivers/net/failsafe/Makefile                      |   2 +-
 drivers/net/failsafe/failsafe_ether.c              |   4 +-
 drivers/net/failsafe/failsafe_private.h            |   4 +-
 drivers/net/fm10k/Makefile                         |   2 +-
 drivers/net/fm10k/fm10k.h                          |   6 +-
 drivers/net/i40e/Makefile                          |   2 +-
 drivers/net/i40e/i40e_ethdev.c                     |   5 +-
 drivers/net/i40e/i40e_rxtx.h                       |   4 +-
 drivers/net/i40e/rte_pmd_i40e.c                    |  50 ++---
 drivers/net/i40e/rte_pmd_i40e.h                    |  48 ++--
 drivers/net/ixgbe/Makefile                         |   2 +-
 drivers/net/ixgbe/ixgbe_ethdev.c                   |   5 +-
 drivers/net/ixgbe/ixgbe_rxtx.h                     |   4 +-
 drivers/net/ixgbe/rte_pmd_ixgbe.c                  |  60 ++---
 drivers/net/ixgbe/rte_pmd_ixgbe.h                  |  64 +++---
 drivers/net/mlx5/mlx5_rxtx.h                       |   4 +-
 drivers/net/nfp/nfp_net.c                          |  16 +-
 drivers/net/nfp/nfp_net_pmd.h                      |   2 +-
 drivers/net/null/Makefile                          |   2 +-
 drivers/net/null/rte_eth_null.c                    |   2 +-
 drivers/net/pcap/Makefile                          |   2 +-
 drivers/net/pcap/rte_eth_pcap.c                    |   2 +-
 drivers/net/qede/qede_if.h                         |   2 +-
 drivers/net/ring/rte_eth_ring.c                    |   2 +-
 drivers/net/szedata2/rte_eth_szedata2.c            |   2 +-
 drivers/net/thunderx/nicvf_struct.h                |   2 +-
 drivers/net/vhost/Makefile                         |   2 +-
 drivers/net/vhost/rte_eth_vhost.c                  |   6 +-
 drivers/net/vhost/rte_eth_vhost.h                  |   4 +-
 drivers/net/virtio/Makefile                        |   2 +-
 drivers/net/virtio/virtio_pci.h                    |   2 +-
 drivers/net/virtio/virtio_rxtx.h                   |   6 +-
 drivers/net/vmxnet3/vmxnet3_ring.h                 |   4 +-
 examples/bond/main.c                               |  16 +-
 examples/distributor/main.c                        |  26 +--
 examples/exception_path/main.c                     |  35 ++-
 examples/ip_fragmentation/main.c                   |  33 +--
 examples/ip_pipeline/init.c                        |   4 +-
 examples/ip_reassembly/main.c                      |  34 +--
 examples/ipv4_multicast/main.c                     |  30 +--
 examples/kni/main.c                                |  30 +--
 examples/l2fwd-cat/l2fwd-cat.c                     |  12 +-
 examples/l2fwd-jobstats/main.c                     |  34 +--
 examples/l2fwd-keepalive/main.c                    |  50 ++---
 examples/l2fwd/main.c                              |  47 ++--
 examples/l3fwd-acl/main.c                          |   9 +-
 examples/l3fwd-power/main.c                        |  60 ++---
 examples/l3fwd-vf/main.c                           |  50 +++--
 examples/l3fwd/l3fwd.h                             |  10 +-
 examples/l3fwd/l3fwd_common.h                      |   2 +-
 examples/l3fwd/l3fwd_em.c                          |   2 +-
 examples/l3fwd/l3fwd_em.h                          |   6 +-
 examples/l3fwd/l3fwd_em_hlm.h                      |  14 +-
 examples/l3fwd/l3fwd_lpm.c                         |  15 +-
 examples/l3fwd/l3fwd_lpm.h                         |   4 +-
 examples/l3fwd/l3fwd_lpm_neon.h                    |   4 +-
 examples/l3fwd/l3fwd_lpm_sse.h                     |   4 +-
 examples/l3fwd/main.c                              |  30 +--
 examples/link_status_interrupt/main.c              |   9 +-
 examples/load_balancer/config.c                    |  14 +-
 examples/load_balancer/init.c                      |  34 ++-
 examples/load_balancer/main.h                      |  11 +-
 examples/load_balancer/runtime.c                   |  12 +-
 .../client_server_mp/mp_client/client.c            |  17 +-
 .../client_server_mp/mp_server/args.c              |   4 +-
 .../client_server_mp/mp_server/args.h              |   2 +-
 .../client_server_mp/mp_server/init.c              |  11 +-
 .../client_server_mp/mp_server/main.c              |   2 +-
 .../multi_process/client_server_mp/shared/common.h |   4 +-
 examples/multi_process/l2fwd_fork/main.c           |  23 +-
 examples/netmap_compat/lib/compat_netmap.c         |  52 +++--
 examples/netmap_compat/lib/compat_netmap.h         |   2 +-
 examples/packet_ordering/main.c                    |  19 +-
 examples/performance-thread/l3fwd-thread/main.c    | 143 ++++++------
 examples/ptpclient/ptpclient.c                     |   4 +-
 examples/qos_sched/args.c                          |  12 +-
 examples/qos_sched/init.c                          |  31 +--
 examples/qos_sched/main.c                          |  14 +-
 examples/qos_sched/main.h                          |  24 +-
 examples/qos_sched/stats.c                         |  16 +-
 examples/quota_watermark/qw/init.c                 |   4 +-
 examples/quota_watermark/qw/main.c                 |  10 +-
 examples/rxtx_callbacks/main.c                     |   8 +-
 examples/server_node_efd/server/main.c             |   2 +-
 examples/server_node_efd/shared/common.h           |   4 +-
 examples/skeleton/basicfwd.c                       |  12 +-
 examples/vhost/main.c                              |  10 +-
 lib/librte_bitratestats/Makefile                   |   2 +-
 lib/librte_bitratestats/rte_bitrate.c              |   2 +-
 lib/librte_bitratestats/rte_bitrate.h              |   2 +-
 lib/librte_ether/Makefile                          |   2 +-
 lib/librte_ether/rte_ethdev.c                      | 241 +++++++++++----------
 lib/librte_ether/rte_ethdev.h                      | 238 ++++++++++----------
 lib/librte_ether/rte_flow.c                        |   2 +-
 lib/librte_ether/rte_flow_driver.h                 |   2 +-
 lib/librte_ether/rte_tm.c                          |  62 +++---
 lib/librte_ether/rte_tm.h                          |  60 ++---
 lib/librte_ether/rte_tm_driver.h                   |   2 +-
 lib/librte_kni/Makefile                            |   2 +-
 lib/librte_kni/rte_kni.h                           |   6 +-
 lib/librte_latencystats/rte_latencystats.c         |  12 +-
 lib/librte_mbuf/rte_mbuf.c                         |   2 +-
 lib/librte_mbuf/rte_mbuf.h                         |   4 +-
 lib/librte_pdump/Makefile                          |   2 +-
 lib/librte_pdump/rte_pdump.c                       |  16 +-
 lib/librte_pdump/rte_pdump.h                       |   4 +-
 lib/librte_port/Makefile                           |   2 +-
 lib/librte_port/rte_port_ethdev.c                  |   6 +-
 lib/librte_port/rte_port_ethdev.h                  |   6 +-
 test/test/test_kni.c                               |  12 +-
 test/test/test_link_bonding.c                      |  40 ++--
 test/test/test_link_bonding_mode4.c                |  12 +-
 test/test/test_pmd_perf.c                          |  30 +--
 test/test/test_pmd_ring_perf.c                     |   2 +-
 test/test/virtual_pmd.c                            |  24 +-
 test/test/virtual_pmd.h                            |  28 +--
 156 files changed, 1402 insertions(+), 1507 deletions(-)

-- 
2.13.3

^ permalink raw reply	[relevance 4%]

* [dpdk-dev] [PATCH v5 1/5] net/bonding: remove bonding APIs using ABI versioning
  2017-09-25  3:22  4%   ` [dpdk-dev] [PATCH v5 0/5] " Zhiyong Yang
@ 2017-09-25  3:22  7%     ` Zhiyong Yang
  2017-09-25 11:34  4%       ` Ferruh Yigit
  2017-09-25  3:22  1%     ` [dpdk-dev] [PATCH v5 2/5] ethdev: increase port_id range Zhiyong Yang
  2017-09-29  7:17  4%     ` [dpdk-dev] [PATCH v6 0/5] " Zhiyong Yang
  2 siblings, 1 reply; 200+ results
From: Zhiyong Yang @ 2017-09-25  3:22 UTC (permalink / raw)
  To: dev; +Cc: ferruh.yigit, thomas, adrien.mazarguil, Zhiyong Yang

There are two bonding APIs using ABI versioning, and both have
port_id as parameter. Since we are already breaking ABI, no need
to keep older versions of APIs.

Signed-off-by: Zhiyong Yang <zhiyong.yang@intel.com>
---
 drivers/net/bonding/rte_eth_bond_8023ad.c    | 149 +--------------------------
 drivers/net/bonding/rte_eth_bond_8023ad.h    |  18 ----
 drivers/net/bonding/rte_eth_bond_version.map |   4 -
 3 files changed, 2 insertions(+), 169 deletions(-)

diff --git a/drivers/net/bonding/rte_eth_bond_8023ad.c b/drivers/net/bonding/rte_eth_bond_8023ad.c
index 20b5a8961..c2b9e053c 100644
--- a/drivers/net/bonding/rte_eth_bond_8023ad.c
+++ b/drivers/net/bonding/rte_eth_bond_8023ad.c
@@ -1111,27 +1111,6 @@ bond_mode_8023ad_conf_get(struct rte_eth_dev *dev,
 	conf->tx_period_ms = mode4->tx_period_timeout / ms_ticks;
 	conf->update_timeout_ms = mode4->update_timeout_us / 1000;
 	conf->rx_marker_period_ms = mode4->rx_marker_timeout / ms_ticks;
-}
-
-static void
-bond_mode_8023ad_conf_get_v1607(struct rte_eth_dev *dev,
-		struct rte_eth_bond_8023ad_conf *conf)
-{
-	struct bond_dev_private *internals = dev->data->dev_private;
-	struct mode8023ad_private *mode4 = &internals->mode4;
-
-	bond_mode_8023ad_conf_get(dev, conf);
-	conf->slowrx_cb = mode4->slowrx_cb;
-}
-
-static void
-bond_mode_8023ad_conf_get_v1708(struct rte_eth_dev *dev,
-		struct rte_eth_bond_8023ad_conf *conf)
-{
-	struct bond_dev_private *internals = dev->data->dev_private;
-	struct mode8023ad_private *mode4 = &internals->mode4;
-
-	bond_mode_8023ad_conf_get(dev, conf);
 	conf->slowrx_cb = mode4->slowrx_cb;
 	conf->agg_selection = mode4->agg_selection;
 }
@@ -1171,27 +1150,6 @@ bond_mode_8023ad_conf_assign(struct mode8023ad_private *mode4,
 	mode4->dedicated_queues.tx_qid = UINT16_MAX;
 }
 
-static void
-bond_mode_8023ad_setup_v20(struct rte_eth_dev *dev,
-		struct rte_eth_bond_8023ad_conf *conf)
-{
-	struct rte_eth_bond_8023ad_conf def_conf;
-	struct bond_dev_private *internals = dev->data->dev_private;
-	struct mode8023ad_private *mode4 = &internals->mode4;
-
-	if (conf == NULL) {
-		conf = &def_conf;
-		bond_mode_8023ad_conf_get_default(conf);
-	}
-
-	bond_mode_8023ad_stop(dev);
-	bond_mode_8023ad_conf_assign(mode4, conf);
-
-	if (dev->data->dev_started)
-		bond_mode_8023ad_start(dev);
-}
-
-
 void
 bond_mode_8023ad_setup(struct rte_eth_dev *dev,
 		struct rte_eth_bond_8023ad_conf *conf)
@@ -1207,27 +1165,6 @@ bond_mode_8023ad_setup(struct rte_eth_dev *dev,
 
 	bond_mode_8023ad_stop(dev);
 	bond_mode_8023ad_conf_assign(mode4, conf);
-
-
-	if (dev->data->dev_started)
-		bond_mode_8023ad_start(dev);
-}
-
-static void
-bond_mode_8023ad_setup_v1708(struct rte_eth_dev *dev,
-		struct rte_eth_bond_8023ad_conf *conf)
-{
-	struct rte_eth_bond_8023ad_conf def_conf;
-	struct bond_dev_private *internals = dev->data->dev_private;
-	struct mode8023ad_private *mode4 = &internals->mode4;
-
-	if (conf == NULL) {
-		conf = &def_conf;
-		bond_mode_8023ad_conf_get_default(conf);
-	}
-
-	bond_mode_8023ad_stop(dev);
-	bond_mode_8023ad_conf_assign(mode4, conf);
 	mode4->slowrx_cb = conf->slowrx_cb;
 	mode4->agg_selection = AGG_STABLE;
 
@@ -1358,7 +1295,7 @@ bond_mode_8023ad_handle_slow_pkt(struct bond_dev_private *internals,
 }
 
 int
-rte_eth_bond_8023ad_conf_get_v20(uint8_t port_id,
+rte_eth_bond_8023ad_conf_get(uint8_t port_id,
 		struct rte_eth_bond_8023ad_conf *conf)
 {
 	struct rte_eth_dev *bond_dev;
@@ -1373,46 +1310,6 @@ rte_eth_bond_8023ad_conf_get_v20(uint8_t port_id,
 	bond_mode_8023ad_conf_get(bond_dev, conf);
 	return 0;
 }
-VERSION_SYMBOL(rte_eth_bond_8023ad_conf_get, _v20, 2.0);
-
-int
-rte_eth_bond_8023ad_conf_get_v1607(uint8_t port_id,
-		struct rte_eth_bond_8023ad_conf *conf)
-{
-	struct rte_eth_dev *bond_dev;
-
-	if (valid_bonded_port_id(port_id) != 0)
-		return -EINVAL;
-
-	if (conf == NULL)
-		return -EINVAL;
-
-	bond_dev = &rte_eth_devices[port_id];
-	bond_mode_8023ad_conf_get_v1607(bond_dev, conf);
-	return 0;
-}
-VERSION_SYMBOL(rte_eth_bond_8023ad_conf_get, _v1607, 16.07);
-
-int
-rte_eth_bond_8023ad_conf_get_v1708(uint8_t port_id,
-		struct rte_eth_bond_8023ad_conf *conf)
-{
-	struct rte_eth_dev *bond_dev;
-
-	if (valid_bonded_port_id(port_id) != 0)
-		return -EINVAL;
-
-	if (conf == NULL)
-		return -EINVAL;
-
-	bond_dev = &rte_eth_devices[port_id];
-	bond_mode_8023ad_conf_get_v1708(bond_dev, conf);
-	return 0;
-}
-MAP_STATIC_SYMBOL(int rte_eth_bond_8023ad_conf_get(uint8_t port_id,
-		struct rte_eth_bond_8023ad_conf *conf),
-		rte_eth_bond_8023ad_conf_get_v1708);
-BIND_DEFAULT_SYMBOL(rte_eth_bond_8023ad_conf_get, _v1708, 17.08);
 
 int
 rte_eth_bond_8023ad_agg_selection_set(uint8_t port_id,
@@ -1483,25 +1380,7 @@ bond_8023ad_setup_validate(uint8_t port_id,
 }
 
 int
-rte_eth_bond_8023ad_setup_v20(uint8_t port_id,
-		struct rte_eth_bond_8023ad_conf *conf)
-{
-	struct rte_eth_dev *bond_dev;
-	int err;
-
-	err = bond_8023ad_setup_validate(port_id, conf);
-	if (err != 0)
-		return err;
-
-	bond_dev = &rte_eth_devices[port_id];
-	bond_mode_8023ad_setup_v20(bond_dev, conf);
-
-	return 0;
-}
-VERSION_SYMBOL(rte_eth_bond_8023ad_setup, _v20, 2.0);
-
-int
-rte_eth_bond_8023ad_setup_v1607(uint8_t port_id,
+rte_eth_bond_8023ad_setup(uint8_t port_id,
 		struct rte_eth_bond_8023ad_conf *conf)
 {
 	struct rte_eth_dev *bond_dev;
@@ -1516,30 +1395,6 @@ rte_eth_bond_8023ad_setup_v1607(uint8_t port_id,
 
 	return 0;
 }
-VERSION_SYMBOL(rte_eth_bond_8023ad_setup, _v1607, 16.07);
-
-
-int
-rte_eth_bond_8023ad_setup_v1708(uint8_t port_id,
-		struct rte_eth_bond_8023ad_conf *conf)
-{
-	struct rte_eth_dev *bond_dev;
-	int err;
-
-	err = bond_8023ad_setup_validate(port_id, conf);
-	if (err != 0)
-		return err;
-
-	bond_dev = &rte_eth_devices[port_id];
-	bond_mode_8023ad_setup_v1708(bond_dev, conf);
-
-	return 0;
-}
-BIND_DEFAULT_SYMBOL(rte_eth_bond_8023ad_setup, _v1708, 17.08);
-MAP_STATIC_SYMBOL(int rte_eth_bond_8023ad_setup(uint8_t port_id,
-		struct rte_eth_bond_8023ad_conf *conf),
-		rte_eth_bond_8023ad_setup_v1708);
-
 
 
 
diff --git a/drivers/net/bonding/rte_eth_bond_8023ad.h b/drivers/net/bonding/rte_eth_bond_8023ad.h
index 1d353c734..d609745e0 100644
--- a/drivers/net/bonding/rte_eth_bond_8023ad.h
+++ b/drivers/net/bonding/rte_eth_bond_8023ad.h
@@ -194,15 +194,6 @@ struct rte_eth_bond_8023ad_slave_info {
 int
 rte_eth_bond_8023ad_conf_get(uint8_t port_id,
 		struct rte_eth_bond_8023ad_conf *conf);
-int
-rte_eth_bond_8023ad_conf_get_v20(uint8_t port_id,
-		struct rte_eth_bond_8023ad_conf *conf);
-int
-rte_eth_bond_8023ad_conf_get_v1607(uint8_t port_id,
-		struct rte_eth_bond_8023ad_conf *conf);
-int
-rte_eth_bond_8023ad_conf_get_v1708(uint8_t port_id,
-		struct rte_eth_bond_8023ad_conf *conf);
 
 /**
  * @internal
@@ -218,15 +209,6 @@ rte_eth_bond_8023ad_conf_get_v1708(uint8_t port_id,
 int
 rte_eth_bond_8023ad_setup(uint8_t port_id,
 		struct rte_eth_bond_8023ad_conf *conf);
-int
-rte_eth_bond_8023ad_setup_v20(uint8_t port_id,
-		struct rte_eth_bond_8023ad_conf *conf);
-int
-rte_eth_bond_8023ad_setup_v1607(uint8_t port_id,
-		struct rte_eth_bond_8023ad_conf *conf);
-int
-rte_eth_bond_8023ad_setup_v1708(uint8_t port_id,
-		struct rte_eth_bond_8023ad_conf *conf);
 
 /**
  * @internal
diff --git a/drivers/net/bonding/rte_eth_bond_version.map b/drivers/net/bonding/rte_eth_bond_version.map
index 0f4e847da..ec3374b0f 100644
--- a/drivers/net/bonding/rte_eth_bond_version.map
+++ b/drivers/net/bonding/rte_eth_bond_version.map
@@ -1,8 +1,6 @@
 DPDK_2.0 {
 	global:
 
-	rte_eth_bond_8023ad_conf_get;
-	rte_eth_bond_8023ad_setup;
 	rte_eth_bond_active_slaves_get;
 	rte_eth_bond_create;
 	rte_eth_bond_link_monitoring_set;
@@ -39,8 +37,6 @@ DPDK_16.07 {
 	rte_eth_bond_8023ad_ext_distrib;
 	rte_eth_bond_8023ad_ext_distrib_get;
 	rte_eth_bond_8023ad_ext_slowtx;
-	rte_eth_bond_8023ad_conf_get;
-	rte_eth_bond_8023ad_setup;
 
 } DPDK_16.04;
 
-- 
2.13.3

^ permalink raw reply	[relevance 7%]

* [dpdk-dev] [PATCH v5 2/5] ethdev: increase port_id range
  2017-09-25  3:22  4%   ` [dpdk-dev] [PATCH v5 0/5] " Zhiyong Yang
  2017-09-25  3:22  7%     ` [dpdk-dev] [PATCH v5 1/5] net/bonding: remove bonding APIs using ABI versioning Zhiyong Yang
@ 2017-09-25  3:22  1%     ` Zhiyong Yang
  2017-09-29  7:17  4%     ` [dpdk-dev] [PATCH v6 0/5] " Zhiyong Yang
  2 siblings, 0 replies; 200+ results
From: Zhiyong Yang @ 2017-09-25  3:22 UTC (permalink / raw)
  To: dev; +Cc: ferruh.yigit, thomas, adrien.mazarguil, Zhiyong Yang

Extend port_id definition from uint8_t to uint16_t in lib and drivers
data structures, specifically rte_eth_dev_data. Modify the APIs,
drivers and app using port_id at the same time.

Fix some checkpatch issues from the original code and remove some
unnecessary cast operations.

release_17_11 and deprecation have been updated in this patch.

Signed-off-by: Zhiyong Yang <zhiyong.yang@intel.com>
Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
---
 app/pdump/main.c                                  |   2 +-
 app/test-pmd/cmdline.c                            |   6 +-
 app/test-pmd/config.c                             |   4 +-
 app/test-pmd/ieee1588fwd.c                        |  26 ++-
 app/test-pmd/parameters.c                         |   2 +-
 app/test-pmd/rxonly.c                             |   2 +-
 app/test-pmd/testpmd.c                            |  18 +-
 app/test-pmd/testpmd.h                            |   4 +-
 doc/guides/rel_notes/deprecation.rst              |   6 -
 doc/guides/rel_notes/release_17_11.rst            |  18 +-
 drivers/net/af_packet/Makefile                    |   2 +-
 drivers/net/af_packet/rte_eth_af_packet.c         |   2 +-
 drivers/net/ark/ark_ethdev.c                      |   2 +-
 drivers/net/avp/Makefile                          |   2 +-
 drivers/net/avp/avp_ethdev.c                      |   2 +-
 drivers/net/bnx2x/Makefile                        |   2 +-
 drivers/net/bnx2x/bnx2x_rxtx.h                    |   4 +-
 drivers/net/bnxt/Makefile                         |   2 +-
 drivers/net/bnxt/bnxt.h                           |   2 +-
 drivers/net/bnxt/bnxt_ethdev.c                    |   4 +-
 drivers/net/bnxt/bnxt_rxq.h                       |   2 +-
 drivers/net/bnxt/bnxt_txq.h                       |   2 +-
 drivers/net/bnxt/rte_pmd_bnxt.c                   |  32 +--
 drivers/net/bnxt/rte_pmd_bnxt.h                   |  32 +--
 drivers/net/bonding/Makefile                      |   2 +-
 drivers/net/bonding/rte_eth_bond.h                |  41 ++--
 drivers/net/bonding/rte_eth_bond_8023ad.c         |  60 +++---
 drivers/net/bonding/rte_eth_bond_8023ad.h         |  30 +--
 drivers/net/bonding/rte_eth_bond_8023ad_private.h |  12 +-
 drivers/net/bonding/rte_eth_bond_alb.c            |   6 +-
 drivers/net/bonding/rte_eth_bond_alb.h            |   6 +-
 drivers/net/bonding/rte_eth_bond_api.c            |  64 +++---
 drivers/net/bonding/rte_eth_bond_args.c           |   2 +-
 drivers/net/bonding/rte_eth_bond_pmd.c            |  62 +++---
 drivers/net/bonding/rte_eth_bond_private.h        |  45 ++--
 drivers/net/e1000/Makefile                        |   2 +-
 drivers/net/e1000/em_ethdev.c                     |   2 +-
 drivers/net/e1000/em_rxtx.c                       |   4 +-
 drivers/net/e1000/igb_rxtx.c                      |   4 +-
 drivers/net/failsafe/Makefile                     |   2 +-
 drivers/net/failsafe/failsafe_ether.c             |   4 +-
 drivers/net/failsafe/failsafe_private.h           |   4 +-
 drivers/net/fm10k/Makefile                        |   2 +-
 drivers/net/fm10k/fm10k.h                         |   6 +-
 drivers/net/i40e/Makefile                         |   2 +-
 drivers/net/i40e/i40e_ethdev.c                    |   5 +-
 drivers/net/i40e/i40e_rxtx.h                      |   4 +-
 drivers/net/i40e/rte_pmd_i40e.c                   |  50 ++---
 drivers/net/i40e/rte_pmd_i40e.h                   |  48 ++---
 drivers/net/ixgbe/Makefile                        |   2 +-
 drivers/net/ixgbe/ixgbe_ethdev.c                  |   5 +-
 drivers/net/ixgbe/ixgbe_rxtx.h                    |   4 +-
 drivers/net/ixgbe/rte_pmd_ixgbe.c                 |  60 +++---
 drivers/net/ixgbe/rte_pmd_ixgbe.h                 |  64 +++---
 drivers/net/mlx5/mlx5_rxtx.h                      |   4 +-
 drivers/net/nfp/nfp_net.c                         |  16 +-
 drivers/net/nfp/nfp_net_pmd.h                     |   2 +-
 drivers/net/null/Makefile                         |   2 +-
 drivers/net/null/rte_eth_null.c                   |   2 +-
 drivers/net/pcap/Makefile                         |   2 +-
 drivers/net/pcap/rte_eth_pcap.c                   |   2 +-
 drivers/net/qede/qede_if.h                        |   2 +-
 drivers/net/ring/rte_eth_ring.c                   |   2 +-
 drivers/net/szedata2/rte_eth_szedata2.c           |   2 +-
 drivers/net/thunderx/nicvf_struct.h               |   2 +-
 drivers/net/vhost/Makefile                        |   2 +-
 drivers/net/vhost/rte_eth_vhost.c                 |   6 +-
 drivers/net/vhost/rte_eth_vhost.h                 |   4 +-
 drivers/net/virtio/Makefile                       |   2 +-
 drivers/net/virtio/virtio_pci.h                   |   2 +-
 drivers/net/virtio/virtio_rxtx.h                  |   6 +-
 drivers/net/vmxnet3/vmxnet3_ring.h                |   4 +-
 lib/librte_bitratestats/Makefile                  |   2 +-
 lib/librte_bitratestats/rte_bitrate.c             |   2 +-
 lib/librte_bitratestats/rte_bitrate.h             |   2 +-
 lib/librte_ether/Makefile                         |   2 +-
 lib/librte_ether/rte_ethdev.c                     | 241 +++++++++++-----------
 lib/librte_ether/rte_ethdev.h                     | 238 ++++++++++-----------
 lib/librte_ether/rte_flow.c                       |   2 +-
 lib/librte_ether/rte_flow_driver.h                |   2 +-
 lib/librte_ether/rte_tm.c                         |  62 +++---
 lib/librte_ether/rte_tm.h                         |  60 +++---
 lib/librte_ether/rte_tm_driver.h                  |   2 +-
 lib/librte_kni/Makefile                           |   2 +-
 lib/librte_kni/rte_kni.h                          |   6 +-
 lib/librte_latencystats/rte_latencystats.c        |  12 +-
 lib/librte_pdump/Makefile                         |   2 +-
 lib/librte_pdump/rte_pdump.c                      |  16 +-
 lib/librte_pdump/rte_pdump.h                      |   4 +-
 lib/librte_port/Makefile                          |   2 +-
 lib/librte_port/rte_port_ethdev.c                 |   6 +-
 lib/librte_port/rte_port_ethdev.h                 |   6 +-
 92 files changed, 773 insertions(+), 746 deletions(-)

diff --git a/app/pdump/main.c b/app/pdump/main.c
index 3b13753d9..090a50cfc 100644
--- a/app/pdump/main.c
+++ b/app/pdump/main.c
@@ -623,7 +623,7 @@ static void
 create_mp_ring_vdev(void)
 {
 	int i;
-	uint8_t portid;
+	uint16_t portid;
 	struct pdump_tuples *pt = NULL;
 	struct rte_mempool *mbuf_pool = NULL;
 	char vdev_args[SIZE];
diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c
index ccdf239d6..d9d083888 100644
--- a/app/test-pmd/cmdline.c
+++ b/app/test-pmd/cmdline.c
@@ -4588,7 +4588,7 @@ struct cmd_show_bonding_config_result {
 	cmdline_fixed_string_t show;
 	cmdline_fixed_string_t bonding;
 	cmdline_fixed_string_t config;
-	uint8_t port_id;
+	portid_t port_id;
 };
 
 static void cmd_show_bonding_config_parsed(void *parsed_result,
@@ -4597,7 +4597,7 @@ static void cmd_show_bonding_config_parsed(void *parsed_result,
 {
 	struct cmd_show_bonding_config_result *res = parsed_result;
 	int bonding_mode, agg_mode;
-	uint8_t slaves[RTE_MAX_ETHPORTS];
+	portid_t slaves[RTE_MAX_ETHPORTS];
 	int num_slaves, num_active_slaves;
 	int primary_id;
 	int i;
@@ -11500,7 +11500,7 @@ struct cmd_vf_vlan_stripq_result {
 	cmdline_fixed_string_t vf;
 	cmdline_fixed_string_t vlan;
 	cmdline_fixed_string_t stripq;
-	uint8_t port_id;
+	portid_t port_id;
 	uint16_t vf_id;
 	cmdline_fixed_string_t on_off;
 };
diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c
index 3ae3e1cd8..155136dd5 100644
--- a/app/test-pmd/config.c
+++ b/app/test-pmd/config.c
@@ -358,7 +358,7 @@ rx_queue_infos_display(portid_t port_id, uint16_t queue_id)
 
 	rc = rte_eth_rx_queue_info_get(port_id, queue_id, &qinfo);
 	if (rc != 0) {
-		printf("Failed to retrieve information for port: %hhu, "
+		printf("Failed to retrieve information for port: %u, "
 			"RX queue: %hu\nerror desc: %s(%d)\n",
 			port_id, queue_id, strerror(-rc), rc);
 		return;
@@ -391,7 +391,7 @@ tx_queue_infos_display(portid_t port_id, uint16_t queue_id)
 
 	rc = rte_eth_tx_queue_info_get(port_id, queue_id, &qinfo);
 	if (rc != 0) {
-		printf("Failed to retrieve information for port: %hhu, "
+		printf("Failed to retrieve information for port: %u, "
 			"TX queue: %hu\nerror desc: %s(%d)\n",
 			port_id, queue_id, strerror(-rc), rc);
 		return;
diff --git a/app/test-pmd/ieee1588fwd.c b/app/test-pmd/ieee1588fwd.c
index 51170ee3e..91ee78646 100644
--- a/app/test-pmd/ieee1588fwd.c
+++ b/app/test-pmd/ieee1588fwd.c
@@ -86,12 +86,11 @@ port_ieee1588_rx_timestamp_check(portid_t pi, uint32_t index)
 	struct timespec timestamp = {0, 0};
 
 	if (rte_eth_timesync_read_rx_timestamp(pi, &timestamp, index) < 0) {
-		printf("Port %u RX timestamp registers not valid\n",
-		       (unsigned) pi);
+		printf("Port %u RX timestamp registers not valid\n", pi);
 		return;
 	}
 	printf("Port %u RX timestamp value %lu s %lu ns\n",
-	       (unsigned) pi, timestamp.tv_sec, timestamp.tv_nsec);
+		pi, timestamp.tv_sec, timestamp.tv_nsec);
 }
 
 #define MAX_TX_TMST_WAIT_MICROSECS 1000 /**< 1 milli-second */
@@ -110,12 +109,12 @@ port_ieee1588_tx_timestamp_check(portid_t pi)
 	if (wait_us >= MAX_TX_TMST_WAIT_MICROSECS) {
 		printf("Port %u TX timestamp registers not valid after "
 		       "%u micro-seconds\n",
-		       (unsigned) pi, (unsigned) MAX_TX_TMST_WAIT_MICROSECS);
+		       pi, MAX_TX_TMST_WAIT_MICROSECS);
 		return;
 	}
 	printf("Port %u TX timestamp value %lu s %lu ns validated after "
 	       "%u micro-second%s\n",
-	       (unsigned) pi, timestamp.tv_sec, timestamp.tv_nsec, wait_us,
+	       pi, timestamp.tv_sec, timestamp.tv_nsec, wait_us,
 	       (wait_us == 1) ? "" : "s");
 }
 
@@ -148,11 +147,11 @@ ieee1588_packet_fwd(struct fwd_stream *fs)
 		if (eth_type == ETHER_TYPE_1588) {
 			printf("Port %u Received PTP packet not filtered"
 			       " by hardware\n",
-			       (unsigned) fs->rx_port);
+			       fs->rx_port);
 		} else {
 			printf("Port %u Received non PTP packet type=0x%4x "
 			       "len=%u\n",
-			       (unsigned) fs->rx_port, eth_type,
+			       fs->rx_port, eth_type,
 			       (unsigned) mb->pkt_len);
 		}
 		rte_pktmbuf_free(mb);
@@ -161,7 +160,7 @@ ieee1588_packet_fwd(struct fwd_stream *fs)
 	if (eth_type != ETHER_TYPE_1588) {
 		printf("Port %u Received NON PTP packet incorrectly"
 		       " detected by hardware\n",
-		       (unsigned) fs->rx_port);
+		       fs->rx_port);
 		rte_pktmbuf_free(mb);
 		return;
 	}
@@ -175,19 +174,19 @@ ieee1588_packet_fwd(struct fwd_stream *fs)
 	if (ptp_hdr->version != 0x02) {
 		printf("Port %u Received PTP V2 Ethernet frame with wrong PTP"
 		       " protocol version 0x%x (should be 0x02)\n",
-		       (unsigned) fs->rx_port, ptp_hdr->version);
+		       fs->rx_port, ptp_hdr->version);
 		rte_pktmbuf_free(mb);
 		return;
 	}
 	if (ptp_hdr->msg_id != PTP_SYNC_MESSAGE) {
 		printf("Port %u Received PTP V2 Ethernet frame with unexpected"
 		       " message ID 0x%x (expected 0x0 - PTP_SYNC_MESSAGE)\n",
-		       (unsigned) fs->rx_port, ptp_hdr->msg_id);
+		       fs->rx_port, ptp_hdr->msg_id);
 		rte_pktmbuf_free(mb);
 		return;
 	}
 	printf("Port %u IEEE1588 PTP V2 SYNC Message filtered by hardware\n",
-	       (unsigned) fs->rx_port);
+	       fs->rx_port);
 
 	/*
 	 * Check that the received PTP packet has been timestamped by the
@@ -196,7 +195,7 @@ ieee1588_packet_fwd(struct fwd_stream *fs)
 	if (! (mb->ol_flags & PKT_RX_IEEE1588_TMST)) {
 		printf("Port %u Received PTP packet not timestamped"
 		       " by hardware\n",
-		       (unsigned) fs->rx_port);
+		       fs->rx_port);
 		rte_pktmbuf_free(mb);
 		return;
 	}
@@ -216,8 +215,7 @@ ieee1588_packet_fwd(struct fwd_stream *fs)
 	mb->ol_flags |= PKT_TX_IEEE1588_TMST;
 	fs->tx_packets += 1;
 	if (rte_eth_tx_burst(fs->rx_port, fs->tx_queue, &mb, 1) == 0) {
-		printf("Port %u sent PTP packet dropped\n",
-		       (unsigned) fs->rx_port);
+		printf("Port %u sent PTP packet dropped\n", fs->rx_port);
 		fs->fwd_dropped += 1;
 		rte_pktmbuf_free(mb);
 		return;
diff --git a/app/test-pmd/parameters.c b/app/test-pmd/parameters.c
index 2f7f70fd6..31287d71d 100644
--- a/app/test-pmd/parameters.c
+++ b/app/test-pmd/parameters.c
@@ -734,7 +734,7 @@ launch_args_parse(int argc, char** argv)
 			if (!strcmp(lgopts[opt_idx].name, "nb-ports")) {
 				n = atoi(optarg);
 				if (n > 0 && n <= nb_ports)
-					nb_fwd_ports = (uint8_t) n;
+					nb_fwd_ports = n;
 				else
 					rte_exit(EXIT_FAILURE,
 						 "Invalid port %d\n", n);
diff --git a/app/test-pmd/rxonly.c b/app/test-pmd/rxonly.c
index 5ef021905..57df01468 100644
--- a/app/test-pmd/rxonly.c
+++ b/app/test-pmd/rxonly.c
@@ -122,7 +122,7 @@ pkt_burst_receive(struct fwd_stream *fs)
 	 */
 	if (verbose_level > 0)
 		printf("port %u/queue %u: received %u packets\n",
-		       (unsigned) fs->rx_port,
+		       fs->rx_port,
 		       (unsigned) fs->rx_queue,
 		       (unsigned) nb_rx);
 	for (i = 0; i < nb_rx; i++) {
diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c
index e097ee04e..477e2e7ad 100644
--- a/app/test-pmd/testpmd.c
+++ b/app/test-pmd/testpmd.c
@@ -390,7 +390,7 @@ struct gro_status gro_ports[RTE_MAX_ETHPORTS];
 /* Forward function declarations */
 static void map_port_queue_stats_mapping_registers(uint8_t pi, struct rte_port *port);
 static void check_all_ports_link_status(uint32_t port_mask);
-static int eth_event_callback(uint8_t port_id,
+static int eth_event_callback(portid_t port_id,
 			      enum rte_eth_event_type type,
 			      void *param, void *ret_param);
 
@@ -1816,7 +1816,8 @@ check_all_ports_link_status(uint32_t port_mask)
 {
 #define CHECK_INTERVAL 100 /* 100ms */
 #define MAX_CHECK_TIME 90 /* 9s (90 * 100ms) in total */
-	uint8_t portid, count, all_ports_up, print_flag = 0;
+	portid_t portid;
+	uint8_t count, all_ports_up, print_flag = 0;
 	struct rte_eth_link link;
 
 	printf("Checking link statuses...\n");
@@ -1831,14 +1832,13 @@ check_all_ports_link_status(uint32_t port_mask)
 			/* print link status if flag set */
 			if (print_flag == 1) {
 				if (link.link_status)
-					printf("Port %d Link Up - speed %u "
-						"Mbps - %s\n", (uint8_t)portid,
-						(unsigned)link.link_speed,
+					printf(
+					"Port%d Link Up. speed %u Mbps- %s\n",
+					portid, link.link_speed,
 				(link.link_duplex == ETH_LINK_FULL_DUPLEX) ?
 					("full-duplex") : ("half-duplex\n"));
 				else
-					printf("Port %d Link Down\n",
-						(uint8_t)portid);
+					printf("Port %d Link Down\n", portid);
 				continue;
 			}
 			/* clear all_ports_up flag if any link down */
@@ -1885,7 +1885,7 @@ rmv_event_callback(void *arg)
 
 /* This function is used by the interrupt thread */
 static int
-eth_event_callback(uint8_t port_id, enum rte_eth_event_type type, void *param,
+eth_event_callback(portid_t port_id, enum rte_eth_event_type type, void *param,
 		  void *ret_param)
 {
 	static const char * const event_desc[] = {
@@ -2328,7 +2328,7 @@ int
 main(int argc, char** argv)
 {
 	int  diag;
-	uint8_t port_id;
+	portid_t port_id;
 
 	signal(SIGINT, signal_handler);
 	signal(SIGTERM, signal_handler);
diff --git a/app/test-pmd/testpmd.h b/app/test-pmd/testpmd.h
index 1d1ee7587..657c1235c 100644
--- a/app/test-pmd/testpmd.h
+++ b/app/test-pmd/testpmd.h
@@ -78,7 +78,7 @@
 #define UMA_NO_CONFIG  0xFF
 
 typedef uint8_t  lcoreid_t;
-typedef uint8_t  portid_t;
+typedef uint16_t portid_t;
 typedef uint16_t queueid_t;
 typedef uint16_t streamid_t;
 
@@ -283,7 +283,7 @@ enum dcb_mode_enable
 #define MAX_RX_QUEUE_STATS_MAPPINGS 4096 /* MAX_PORT of 32 @ 128 rx_queues/port */
 
 struct queue_stats_mappings {
-	uint8_t port_id;
+	portid_t port_id;
 	uint16_t queue_id;
 	uint8_t stats_counter_id;
 } __rte_cache_aligned;
diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst
index 3362f3350..45eb5c4a9 100644
--- a/doc/guides/rel_notes/deprecation.rst
+++ b/doc/guides/rel_notes/deprecation.rst
@@ -76,12 +76,6 @@ Deprecation Notices
   done by the EAL and not by the ``ethdev`` layer anymore. Users relying on this
   flag being present only have to remove their checks to follow the change.
 
-* ABI/API changes are planned for 17.11 in all structures which include port_id
-  definition such as "rte_eth_dev_data", "rte_port_ethdev_reader_params",
-  "rte_port_ethdev_writer_params", and so on. The definition of port_id will be
-  changed from 8 bits to 16 bits in order to support more than 256 ports in
-  DPDK. All APIs which have port_id parameter will be changed at the same time.
-
 * ethdev: An ABI change is planned for 17.11 for the structure rte_eth_dev_data.
   The size of the unique name will increase RTE_ETH_NAME_MAX_LEN from 32 to
   64 characters to allow using a globally unique identifier (GUID) in this field.
diff --git a/doc/guides/rel_notes/release_17_11.rst b/doc/guides/rel_notes/release_17_11.rst
index 8bf91bd40..39f75aced 100644
--- a/doc/guides/rel_notes/release_17_11.rst
+++ b/doc/guides/rel_notes/release_17_11.rst
@@ -41,6 +41,11 @@ New Features
      Also, make sure to start the actual text at the margin.
      =========================================================
 
+* **Extended port_id range from uint8_t to uint16_t.**
+
+  Increased port_id range from 8 bits to 16 bits in order to support more than
+  256 ports in dpdk. All ethdev APIs which have port_id as parameter are changed
+  in the meantime.
 
 Resolved Issues
 ---------------
@@ -144,7 +149,10 @@ ABI Changes
    Also, make sure to start the actual text at the margin.
    =========================================================
 
+* **Extended port_id range.**
 
+  The size of the field ``port_id`` in the ``rte_eth_dev_data`` structure
+  changed, as described in the `New Features` section.
 
 Shared Library Versions
 -----------------------
@@ -165,19 +173,19 @@ The libraries prepended with a plus sign were incremented in this version.
 .. code-block:: diff
 
      librte_acl.so.2
-     librte_bitratestats.so.1
+     librte_bitratestats.so.2
      librte_cfgfile.so.2
      librte_cmdline.so.2
      librte_cryptodev.so.3
      librte_distributor.so.1
      librte_eal.so.5
-     librte_ethdev.so.7
+     librte_ethdev.so.8
      librte_eventdev.so.2
      librte_gro.so.1
      librte_hash.so.2
      librte_ip_frag.so.1
      librte_jobstats.so.1
-     librte_kni.so.2
+     librte_kni.so.3
      librte_kvargs.so.1
      librte_latencystats.so.1
      librte_lpm.so.2
@@ -186,11 +194,11 @@ The libraries prepended with a plus sign were incremented in this version.
      librte_meter.so.1
      librte_metrics.so.1
      librte_net.so.1
-     librte_pdump.so.1
+     librte_pdump.so.2
      librte_pipeline.so.3
      librte_pmd_bond.so.1
      librte_pmd_ring.so.2
-     librte_port.so.3
+     librte_port.so.4
      librte_power.so.1
      librte_reorder.so.1
      librte_ring.so.1
diff --git a/drivers/net/af_packet/Makefile b/drivers/net/af_packet/Makefile
index 70d517c16..4d62b7dbd 100644
--- a/drivers/net/af_packet/Makefile
+++ b/drivers/net/af_packet/Makefile
@@ -40,7 +40,7 @@ LIB = librte_pmd_af_packet.a
 
 EXPORT_MAP := rte_pmd_af_packet_version.map
 
-LIBABIVER := 1
+LIBABIVER := 2
 
 CFLAGS += -O3
 CFLAGS += $(WERROR_FLAGS)
diff --git a/drivers/net/af_packet/rte_eth_af_packet.c b/drivers/net/af_packet/rte_eth_af_packet.c
index 9a47852ca..483b0c107 100644
--- a/drivers/net/af_packet/rte_eth_af_packet.c
+++ b/drivers/net/af_packet/rte_eth_af_packet.c
@@ -75,7 +75,7 @@ struct pkt_rx_queue {
 	unsigned int framenum;
 
 	struct rte_mempool *mb_pool;
-	uint8_t in_port;
+	uint16_t in_port;
 
 	volatile unsigned long rx_pkts;
 	volatile unsigned long err_pkts;
diff --git a/drivers/net/ark/ark_ethdev.c b/drivers/net/ark/ark_ethdev.c
index 6db362b04..893284733 100644
--- a/drivers/net/ark/ark_ethdev.c
+++ b/drivers/net/ark/ark_ethdev.c
@@ -641,7 +641,7 @@ eth_ark_dev_stop(struct rte_eth_dev *dev)
 	for (i = 0; i < dev->data->nb_tx_queues; i++) {
 		status = eth_ark_tx_queue_stop(dev, i);
 		if (status != 0) {
-			uint8_t port = dev->data->port_id;
+			uint16_t port = dev->data->port_id;
 			PMD_DRV_LOG(ERR,
 				    "tx_queue stop anomaly"
 				    " port %u, queue %u\n",
diff --git a/drivers/net/avp/Makefile b/drivers/net/avp/Makefile
index cd465aac9..7ffb4d172 100644
--- a/drivers/net/avp/Makefile
+++ b/drivers/net/avp/Makefile
@@ -42,7 +42,7 @@ CFLAGS += $(WERROR_FLAGS) -I$(SRCDIR)
 
 EXPORT_MAP := rte_pmd_avp_version.map
 
-LIBABIVER := 1
+LIBABIVER := 2
 
 # install public header files to enable compilation of the hypervisor level
 # dpdk application
diff --git a/drivers/net/avp/avp_ethdev.c b/drivers/net/avp/avp_ethdev.c
index c746a0e2c..b5cc955f2 100644
--- a/drivers/net/avp/avp_ethdev.c
+++ b/drivers/net/avp/avp_ethdev.c
@@ -190,7 +190,7 @@ struct avp_dev {
 	struct rte_eth_dev_data *dev_data;
 	/**< Back pointer to ethernet device data */
 	volatile uint32_t flags; /**< Device operational flags */
-	uint8_t port_id; /**< Ethernet port identifier */
+	uint16_t port_id; /**< Ethernet port identifier */
 	struct rte_mempool *pool; /**< pkt mbuf mempool */
 	unsigned int guest_mbuf_size; /**< local pool mbuf size */
 	unsigned int host_mbuf_size; /**< host mbuf size */
diff --git a/drivers/net/bnx2x/Makefile b/drivers/net/bnx2x/Makefile
index e12310691..7a1c77523 100644
--- a/drivers/net/bnx2x/Makefile
+++ b/drivers/net/bnx2x/Makefile
@@ -12,7 +12,7 @@ LDLIBS += -lz
 
 EXPORT_MAP := rte_pmd_bnx2x_version.map
 
-LIBABIVER := 1
+LIBABIVER := 2
 
 ifeq ($(CONFIG_RTE_TOOLCHAIN_ICC),y)
 CFLAGS += -wd188 #188: enumerated type mixed with another type
diff --git a/drivers/net/bnx2x/bnx2x_rxtx.h b/drivers/net/bnx2x/bnx2x_rxtx.h
index 2e38ec26a..9600e0f1c 100644
--- a/drivers/net/bnx2x/bnx2x_rxtx.h
+++ b/drivers/net/bnx2x/bnx2x_rxtx.h
@@ -41,7 +41,7 @@ struct bnx2x_rx_queue {
 	uint16_t                   rx_cq_head;           /**< Index of current rcq bd. */
 	uint16_t                   rx_cq_tail;           /**< Index of last rcq bd. */
 	uint16_t                   queue_id;             /**< RX queue index. */
-	uint8_t                    port_id;              /**< Device port identifier. */
+	uint16_t                   port_id;              /**< Device port identifier. */
 	struct bnx2x_softc           *sc;                  /**< Ptr to dev_private data. */
 };
 
@@ -62,7 +62,7 @@ struct bnx2x_tx_queue {
 	uint16_t                   nb_tx_avail;          /**< Number of TX descriptors available. */
 	uint16_t                   nb_tx_pages;          /**< number of TX pages */
 	uint16_t                   queue_id;             /**< TX queue index. */
-	uint8_t                    port_id;              /**< Device port identifier. */
+	uint16_t                   port_id;              /**< Device port identifier. */
 	struct bnx2x_softc           *sc;                  /**< Ptr to dev_private data */
 };
 
diff --git a/drivers/net/bnxt/Makefile b/drivers/net/bnxt/Makefile
index b03f65dc9..55b49b538 100644
--- a/drivers/net/bnxt/Makefile
+++ b/drivers/net/bnxt/Makefile
@@ -40,7 +40,7 @@ LIB = librte_pmd_bnxt.a
 
 EXPORT_MAP := rte_pmd_bnxt_version.map
 
-LIBABIVER := 1
+LIBABIVER := 2
 
 CFLAGS += -O3
 CFLAGS += $(WERROR_FLAGS)
diff --git a/drivers/net/bnxt/bnxt.h b/drivers/net/bnxt/bnxt.h
index 405d94deb..26a9018b5 100644
--- a/drivers/net/bnxt/bnxt.h
+++ b/drivers/net/bnxt/bnxt.h
@@ -126,7 +126,7 @@ struct bnxt_pf_info {
 #define BNXT_FIRST_VF_FID	128
 #define BNXT_PF_RINGS_USED(bp)	bnxt_get_num_queues(bp)
 #define BNXT_PF_RINGS_AVAIL(bp)	(bp->pf.max_cp_rings - BNXT_PF_RINGS_USED(bp))
-	uint8_t			port_id;
+	uint16_t		port_id;
 	uint16_t		first_vf_id;
 	uint16_t		active_vfs;
 	uint16_t		max_vfs;
diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
index c9d11228b..2e817535e 100644
--- a/drivers/net/bnxt/bnxt_ethdev.c
+++ b/drivers/net/bnxt/bnxt_ethdev.c
@@ -489,13 +489,13 @@ static void bnxt_print_link_info(struct rte_eth_dev *eth_dev)
 
 	if (link->link_status)
 		RTE_LOG(INFO, PMD, "Port %d Link Up - speed %u Mbps - %s\n",
-			(uint8_t)(eth_dev->data->port_id),
+			eth_dev->data->port_id,
 			(uint32_t)link->link_speed,
 			(link->link_duplex == ETH_LINK_FULL_DUPLEX) ?
 			("full-duplex") : ("half-duplex\n"));
 	else
 		RTE_LOG(INFO, PMD, "Port %d Link Down\n",
-			(uint8_t)(eth_dev->data->port_id));
+			eth_dev->data->port_id);
 }
 
 static int bnxt_dev_lsc_intr_setup(struct rte_eth_dev *eth_dev)
diff --git a/drivers/net/bnxt/bnxt_rxq.h b/drivers/net/bnxt/bnxt_rxq.h
index 01aaa007f..cea0785d1 100644
--- a/drivers/net/bnxt/bnxt_rxq.h
+++ b/drivers/net/bnxt/bnxt_rxq.h
@@ -48,7 +48,7 @@ struct bnxt_rx_queue {
 	uint16_t		rx_free_thresh; /* max free RX desc to hold */
 	uint16_t		queue_id; /* RX queue index */
 	uint16_t		reg_idx; /* RX queue register index */
-	uint8_t			port_id; /* Device port identifier */
+	uint16_t		port_id; /* Device port identifier */
 	uint8_t			crc_len; /* 0 if CRC stripped, 4 otherwise */
 
 	struct bnxt		*bp;
diff --git a/drivers/net/bnxt/bnxt_txq.h b/drivers/net/bnxt/bnxt_txq.h
index 16f3a0bdd..f753c10f2 100644
--- a/drivers/net/bnxt/bnxt_txq.h
+++ b/drivers/net/bnxt/bnxt_txq.h
@@ -46,7 +46,7 @@ struct bnxt_tx_queue {
 	uint16_t		tx_next_rs; /* next desc to set RS bit */
 	uint16_t		queue_id; /* TX queue index */
 	uint16_t		reg_idx; /* TX queue register index */
-	uint8_t			port_id; /* Device port identifier */
+	uint16_t		port_id; /* Device port identifier */
 	uint8_t			pthresh; /* Prefetch threshold register */
 	uint8_t			hthresh; /* Host threshold register */
 	uint8_t			wthresh; /* Write-back threshold reg */
diff --git a/drivers/net/bnxt/rte_pmd_bnxt.c b/drivers/net/bnxt/rte_pmd_bnxt.c
index c343d9033..63fc27911 100644
--- a/drivers/net/bnxt/rte_pmd_bnxt.c
+++ b/drivers/net/bnxt/rte_pmd_bnxt.c
@@ -67,7 +67,7 @@ int bnxt_rcv_msg_from_vf(struct bnxt *bp, uint16_t vf_id, void *msg)
 		true : false;
 }
 
-int rte_pmd_bnxt_set_tx_loopback(uint8_t port, uint8_t on)
+int rte_pmd_bnxt_set_tx_loopback(uint16_t port, uint8_t on)
 {
 	struct rte_eth_dev *eth_dev;
 	struct bnxt *bp;
@@ -108,7 +108,7 @@ rte_pmd_bnxt_set_all_queues_drop_en_cb(struct bnxt_vnic_info *vnic, void *onptr)
 	vnic->bd_stall = !(*on);
 }
 
-int rte_pmd_bnxt_set_all_queues_drop_en(uint8_t port, uint8_t on)
+int rte_pmd_bnxt_set_all_queues_drop_en(uint16_t port, uint8_t on)
 {
 	struct rte_eth_dev *eth_dev;
 	struct bnxt *bp;
@@ -159,7 +159,7 @@ int rte_pmd_bnxt_set_all_queues_drop_en(uint8_t port, uint8_t on)
 	return rc;
 }
 
-int rte_pmd_bnxt_set_vf_mac_addr(uint8_t port, uint16_t vf,
+int rte_pmd_bnxt_set_vf_mac_addr(uint16_t port, uint16_t vf,
 				struct ether_addr *mac_addr)
 {
 	struct rte_eth_dev *dev;
@@ -191,7 +191,7 @@ int rte_pmd_bnxt_set_vf_mac_addr(uint8_t port, uint16_t vf,
 	return rc;
 }
 
-int rte_pmd_bnxt_set_vf_rate_limit(uint8_t port, uint16_t vf,
+int rte_pmd_bnxt_set_vf_rate_limit(uint16_t port, uint16_t vf,
 				uint16_t tx_rate, uint64_t q_msk)
 {
 	struct rte_eth_dev *eth_dev;
@@ -241,7 +241,7 @@ int rte_pmd_bnxt_set_vf_rate_limit(uint8_t port, uint16_t vf,
 	return rc;
 }
 
-int rte_pmd_bnxt_set_vf_mac_anti_spoof(uint8_t port, uint16_t vf, uint8_t on)
+int rte_pmd_bnxt_set_vf_mac_anti_spoof(uint16_t port, uint16_t vf, uint8_t on)
 {
 	struct rte_eth_dev_info dev_info;
 	struct rte_eth_dev *dev;
@@ -294,7 +294,7 @@ int rte_pmd_bnxt_set_vf_mac_anti_spoof(uint8_t port, uint16_t vf, uint8_t on)
 	return rc;
 }
 
-int rte_pmd_bnxt_set_vf_vlan_anti_spoof(uint8_t port, uint16_t vf, uint8_t on)
+int rte_pmd_bnxt_set_vf_vlan_anti_spoof(uint16_t port, uint16_t vf, uint8_t on)
 {
 	struct rte_eth_dev_info dev_info;
 	struct rte_eth_dev *dev;
@@ -350,7 +350,7 @@ rte_pmd_bnxt_set_vf_vlan_stripq_cb(struct bnxt_vnic_info *vnic, void *onptr)
 }
 
 int
-rte_pmd_bnxt_set_vf_vlan_stripq(uint8_t port, uint16_t vf, uint8_t on)
+rte_pmd_bnxt_set_vf_vlan_stripq(uint16_t port, uint16_t vf, uint8_t on)
 {
 	struct rte_eth_dev *dev;
 	struct rte_eth_dev_info dev_info;
@@ -385,7 +385,7 @@ rte_pmd_bnxt_set_vf_vlan_stripq(uint8_t port, uint16_t vf, uint8_t on)
 	return rc;
 }
 
-int rte_pmd_bnxt_set_vf_rxmode(uint8_t port, uint16_t vf,
+int rte_pmd_bnxt_set_vf_rxmode(uint16_t port, uint16_t vf,
 				uint16_t rx_mask, uint8_t on)
 {
 	struct rte_eth_dev *dev;
@@ -477,7 +477,7 @@ static int bnxt_set_vf_table(struct bnxt *bp, uint16_t vf)
 	return rc;
 }
 
-int rte_pmd_bnxt_set_vf_vlan_filter(uint8_t port, uint16_t vlan,
+int rte_pmd_bnxt_set_vf_vlan_filter(uint16_t port, uint16_t vlan,
 				    uint64_t vf_mask, uint8_t vlan_on)
 {
 	struct bnxt_vlan_table_entry *ve;
@@ -570,7 +570,7 @@ int rte_pmd_bnxt_set_vf_vlan_filter(uint8_t port, uint16_t vlan,
 	return rc;
 }
 
-int rte_pmd_bnxt_get_vf_stats(uint8_t port,
+int rte_pmd_bnxt_get_vf_stats(uint16_t port,
 			      uint16_t vf_id,
 			      struct rte_eth_stats *stats)
 {
@@ -598,7 +598,7 @@ int rte_pmd_bnxt_get_vf_stats(uint8_t port,
 	return bnxt_hwrm_func_qstats(bp, bp->pf.first_vf_id + vf_id, stats);
 }
 
-int rte_pmd_bnxt_reset_vf_stats(uint8_t port,
+int rte_pmd_bnxt_reset_vf_stats(uint16_t port,
 				uint16_t vf_id)
 {
 	struct rte_eth_dev *dev;
@@ -625,7 +625,7 @@ int rte_pmd_bnxt_reset_vf_stats(uint8_t port,
 	return bnxt_hwrm_func_clr_stats(bp, bp->pf.first_vf_id + vf_id);
 }
 
-int rte_pmd_bnxt_get_vf_rx_status(uint8_t port, uint16_t vf_id)
+int rte_pmd_bnxt_get_vf_rx_status(uint16_t port, uint16_t vf_id)
 {
 	struct rte_eth_dev *dev;
 	struct rte_eth_dev_info dev_info;
@@ -651,7 +651,7 @@ int rte_pmd_bnxt_get_vf_rx_status(uint8_t port, uint16_t vf_id)
 	return bnxt_vf_vnic_count(bp, vf_id);
 }
 
-int rte_pmd_bnxt_get_vf_tx_drop_count(uint8_t port, uint16_t vf_id,
+int rte_pmd_bnxt_get_vf_tx_drop_count(uint16_t port, uint16_t vf_id,
 				      uint64_t *count)
 {
 	struct rte_eth_dev *dev;
@@ -679,7 +679,7 @@ int rte_pmd_bnxt_get_vf_tx_drop_count(uint8_t port, uint16_t vf_id,
 					     count);
 }
 
-int rte_pmd_bnxt_mac_addr_add(uint8_t port, struct ether_addr *addr,
+int rte_pmd_bnxt_mac_addr_add(uint16_t port, struct ether_addr *addr,
 				uint32_t vf_id)
 {
 	struct rte_eth_dev *dev;
@@ -756,7 +756,7 @@ int rte_pmd_bnxt_mac_addr_add(uint8_t port, struct ether_addr *addr,
 }
 
 int
-rte_pmd_bnxt_set_vf_vlan_insert(uint8_t port, uint16_t vf,
+rte_pmd_bnxt_set_vf_vlan_insert(uint16_t port, uint16_t vf,
 		uint16_t vlan_id)
 {
 	struct rte_eth_dev *dev;
@@ -793,7 +793,7 @@ rte_pmd_bnxt_set_vf_vlan_insert(uint8_t port, uint16_t vf,
 	return rc;
 }
 
-int rte_pmd_bnxt_set_vf_persist_stats(uint8_t port, uint16_t vf, uint8_t on)
+int rte_pmd_bnxt_set_vf_persist_stats(uint16_t port, uint16_t vf, uint8_t on)
 {
 	struct rte_eth_dev_info dev_info;
 	struct rte_eth_dev *dev;
diff --git a/drivers/net/bnxt/rte_pmd_bnxt.h b/drivers/net/bnxt/rte_pmd_bnxt.h
index c4c4770e3..f881d30d6 100644
--- a/drivers/net/bnxt/rte_pmd_bnxt.h
+++ b/drivers/net/bnxt/rte_pmd_bnxt.h
@@ -78,7 +78,7 @@ struct rte_pmd_bnxt_mb_event_param {
  *   - (-ENODEV) if *port* invalid.
  *   - (-EINVAL) if bad parameter.
  */
-int rte_pmd_bnxt_set_vf_mac_anti_spoof(uint8_t port, uint16_t vf, uint8_t on);
+int rte_pmd_bnxt_set_vf_mac_anti_spoof(uint16_t port, uint16_t vf, uint8_t on);
 
 /**
  * Set the VF MAC address.
@@ -94,7 +94,7 @@ int rte_pmd_bnxt_set_vf_mac_anti_spoof(uint8_t port, uint16_t vf, uint8_t on);
  *   - (-ENODEV) if *port* invalid.
  *   - (-EINVAL) if *vf* or *mac_addr* is invalid.
  */
-int rte_pmd_bnxt_set_vf_mac_addr(uint8_t port, uint16_t vf,
+int rte_pmd_bnxt_set_vf_mac_addr(uint16_t port, uint16_t vf,
 		struct ether_addr *mac_addr);
 
 /**
@@ -115,7 +115,7 @@ int rte_pmd_bnxt_set_vf_mac_addr(uint8_t port, uint16_t vf,
  *   - (-EINVAL) if bad parameter.
  */
 int
-rte_pmd_bnxt_set_vf_vlan_stripq(uint8_t port, uint16_t vf, uint8_t on);
+rte_pmd_bnxt_set_vf_vlan_stripq(uint16_t port, uint16_t vf, uint8_t on);
 
 /**
  * Enable/Disable vf vlan insert
@@ -134,7 +134,7 @@ rte_pmd_bnxt_set_vf_vlan_stripq(uint8_t port, uint16_t vf, uint8_t on);
  *   - (-EINVAL) if bad parameter.
  */
 int
-rte_pmd_bnxt_set_vf_vlan_insert(uint8_t port, uint16_t vf,
+rte_pmd_bnxt_set_vf_vlan_insert(uint16_t port, uint16_t vf,
 		uint16_t vlan_id);
 
 /**
@@ -156,7 +156,7 @@ rte_pmd_bnxt_set_vf_vlan_insert(uint8_t port, uint16_t vf,
  *   - (-ENODEV) if *port_id* invalid.
  *   - (-EINVAL) if bad parameter.
  */
-int rte_pmd_bnxt_set_vf_vlan_filter(uint8_t port, uint16_t vlan,
+int rte_pmd_bnxt_set_vf_vlan_filter(uint16_t port, uint16_t vlan,
 				    uint64_t vf_mask, uint8_t vlan_on);
 
 /**
@@ -173,7 +173,7 @@ int rte_pmd_bnxt_set_vf_vlan_filter(uint8_t port, uint16_t vlan,
  *   - (-ENODEV) if *port* invalid.
  *   - (-EINVAL) if bad parameter.
  */
-int rte_pmd_bnxt_set_tx_loopback(uint8_t port, uint8_t on);
+int rte_pmd_bnxt_set_tx_loopback(uint16_t port, uint8_t on);
 
 /**
  * set all queues drop enable bit
@@ -189,7 +189,7 @@ int rte_pmd_bnxt_set_tx_loopback(uint8_t port, uint8_t on);
  *   - (-ENODEV) if *port* invalid.
  *   - (-EINVAL) if bad parameter.
  */
-int rte_pmd_bnxt_set_all_queues_drop_en(uint8_t port, uint8_t on);
+int rte_pmd_bnxt_set_all_queues_drop_en(uint16_t port, uint8_t on);
 
 /**
  * Set the VF rate limit.
@@ -207,7 +207,7 @@ int rte_pmd_bnxt_set_all_queues_drop_en(uint8_t port, uint8_t on);
  *   - (-ENODEV) if *port* invalid.
  *   - (-EINVAL) if *vf* or *mac_addr* is invalid.
  */
-int rte_pmd_bnxt_set_vf_rate_limit(uint8_t port, uint16_t vf,
+int rte_pmd_bnxt_set_vf_rate_limit(uint16_t port, uint16_t vf,
 				uint16_t tx_rate, uint64_t q_msk);
 
 /**
@@ -226,7 +226,7 @@ int rte_pmd_bnxt_set_vf_rate_limit(uint8_t port, uint16_t vf,
  *   - (-EINVAL) if bad parameter.
  */
 
-int rte_pmd_bnxt_get_vf_stats(uint8_t port,
+int rte_pmd_bnxt_get_vf_stats(uint16_t port,
 			      uint16_t vf_id,
 			      struct rte_eth_stats *stats);
 
@@ -242,7 +242,7 @@ int rte_pmd_bnxt_get_vf_stats(uint8_t port,
  *   - (-ENODEV) if *port* invalid.
  *   - (-EINVAL) if bad parameter.
  */
-int rte_pmd_bnxt_reset_vf_stats(uint8_t port,
+int rte_pmd_bnxt_reset_vf_stats(uint16_t port,
 				uint16_t vf_id);
 
 /**
@@ -261,7 +261,7 @@ int rte_pmd_bnxt_reset_vf_stats(uint8_t port,
  *   - (-ENODEV) if *port* invalid.
  *   - (-EINVAL) if bad parameter.
  */
-int rte_pmd_bnxt_set_vf_vlan_anti_spoof(uint8_t port, uint16_t vf, uint8_t on);
+int rte_pmd_bnxt_set_vf_vlan_anti_spoof(uint16_t port, uint16_t vf, uint8_t on);
 
 /**
  * Set RX L2 Filtering mode of a VF of an Ethernet device.
@@ -280,7 +280,7 @@ int rte_pmd_bnxt_set_vf_vlan_anti_spoof(uint8_t port, uint16_t vf, uint8_t on);
  *   - (-ENODEV) if *port_id* invalid.
  *   - (-EINVAL) if bad parameter.
  */
-int rte_pmd_bnxt_set_vf_rxmode(uint8_t port, uint16_t vf,
+int rte_pmd_bnxt_set_vf_rxmode(uint16_t port, uint16_t vf,
 				uint16_t rx_mask, uint8_t on);
 
 /**
@@ -297,7 +297,7 @@ int rte_pmd_bnxt_set_vf_rxmode(uint8_t port, uint16_t vf,
  *   - (-ENOMEM) on an allocation failure
  *   - (-1) firmware interface error
  */
-int rte_pmd_bnxt_get_vf_rx_status(uint8_t port, uint16_t vf_id);
+int rte_pmd_bnxt_get_vf_rx_status(uint16_t port, uint16_t vf_id);
 
 /**
  * Queries the TX drop counter for the function
@@ -313,7 +313,7 @@ int rte_pmd_bnxt_get_vf_rx_status(uint8_t port, uint16_t vf_id);
  *   - (-EINVAL) invalid vf_id specified.
  *   - (-ENOTSUP) Ethernet device is not a PF
  */
-int rte_pmd_bnxt_get_vf_tx_drop_count(uint8_t port, uint16_t vf_id,
+int rte_pmd_bnxt_get_vf_tx_drop_count(uint16_t port, uint16_t vf_id,
 				      uint64_t *count);
 
 /**
@@ -331,7 +331,7 @@ int rte_pmd_bnxt_get_vf_tx_drop_count(uint8_t port, uint16_t vf_id,
  *   - (-ENOTSUP) Ethernet device is not a PF
  *   - (-ENOMEM) on an allocation failure
  */
-int rte_pmd_bnxt_mac_addr_add(uint8_t port, struct ether_addr *mac_addr,
+int rte_pmd_bnxt_mac_addr_add(uint16_t port, struct ether_addr *mac_addr,
 				uint32_t vf_id);
 
 /**
@@ -350,5 +350,5 @@ int rte_pmd_bnxt_mac_addr_add(uint8_t port, struct ether_addr *mac_addr,
  *   - (-ENODEV) if *port* invalid.
  *   - (-EINVAL) if bad parameter.
  */
-int rte_pmd_bnxt_set_vf_persist_stats(uint8_t port, uint16_t vf, uint8_t on);
+int rte_pmd_bnxt_set_vf_persist_stats(uint16_t port, uint16_t vf, uint8_t on);
 #endif /* _PMD_BNXT_H_ */
diff --git a/drivers/net/bonding/Makefile b/drivers/net/bonding/Makefile
index 910c932da..ffc0c3cf7 100644
--- a/drivers/net/bonding/Makefile
+++ b/drivers/net/bonding/Makefile
@@ -41,7 +41,7 @@ CFLAGS += $(WERROR_FLAGS)
 
 EXPORT_MAP := rte_eth_bond_version.map
 
-LIBABIVER := 1
+LIBABIVER := 2
 
 #
 # all source are stored in SRCS-y
diff --git a/drivers/net/bonding/rte_eth_bond.h b/drivers/net/bonding/rte_eth_bond.h
index 8efbf0713..87ff29173 100644
--- a/drivers/net/bonding/rte_eth_bond.h
+++ b/drivers/net/bonding/rte_eth_bond.h
@@ -151,7 +151,7 @@ rte_eth_bond_free(const char *name);
  *	0 on success, negative value otherwise
  */
 int
-rte_eth_bond_slave_add(uint8_t bonded_port_id, uint8_t slave_port_id);
+rte_eth_bond_slave_add(uint16_t bonded_port_id, uint16_t slave_port_id);
 
 /**
  * Remove a slave rte_eth_dev device from the bonded device
@@ -163,7 +163,7 @@ rte_eth_bond_slave_add(uint8_t bonded_port_id, uint8_t slave_port_id);
  *	0 on success, negative value otherwise
  */
 int
-rte_eth_bond_slave_remove(uint8_t bonded_port_id, uint8_t slave_port_id);
+rte_eth_bond_slave_remove(uint16_t bonded_port_id, uint16_t slave_port_id);
 
 /**
  * Set link bonding mode of bonded device
@@ -175,7 +175,7 @@ rte_eth_bond_slave_remove(uint8_t bonded_port_id, uint8_t slave_port_id);
  *	0 on success, negative value otherwise
  */
 int
-rte_eth_bond_mode_set(uint8_t bonded_port_id, uint8_t mode);
+rte_eth_bond_mode_set(uint16_t bonded_port_id, uint8_t mode);
 
 /**
  * Get link bonding mode of bonded device
@@ -186,7 +186,7 @@ rte_eth_bond_mode_set(uint8_t bonded_port_id, uint8_t mode);
  *	link bonding mode on success, negative value otherwise
  */
 int
-rte_eth_bond_mode_get(uint8_t bonded_port_id);
+rte_eth_bond_mode_get(uint16_t bonded_port_id);
 
 /**
  * Set slave rte_eth_dev as primary slave of bonded device
@@ -198,7 +198,7 @@ rte_eth_bond_mode_get(uint8_t bonded_port_id);
  *	0 on success, negative value otherwise
  */
 int
-rte_eth_bond_primary_set(uint8_t bonded_port_id, uint8_t slave_port_id);
+rte_eth_bond_primary_set(uint16_t bonded_port_id, uint16_t slave_port_id);
 
 /**
  * Get primary slave of bonded device
@@ -209,7 +209,7 @@ rte_eth_bond_primary_set(uint8_t bonded_port_id, uint8_t slave_port_id);
  *	Port Id of primary slave on success, -1 on failure
  */
 int
-rte_eth_bond_primary_get(uint8_t bonded_port_id);
+rte_eth_bond_primary_get(uint16_t bonded_port_id);
 
 /**
  * Populate an array with list of the slaves port id's of the bonded device
@@ -223,7 +223,8 @@ rte_eth_bond_primary_get(uint8_t bonded_port_id);
  *	negative value otherwise
  */
 int
-rte_eth_bond_slaves_get(uint8_t bonded_port_id, uint8_t slaves[], uint8_t len);
+rte_eth_bond_slaves_get(uint16_t bonded_port_id, uint16_t slaves[],
+			uint16_t len);
 
 /**
  * Populate an array with list of the active slaves port id's of the bonded
@@ -238,8 +239,8 @@ rte_eth_bond_slaves_get(uint8_t bonded_port_id, uint8_t slaves[], uint8_t len);
  *	negative value otherwise
  */
 int
-rte_eth_bond_active_slaves_get(uint8_t bonded_port_id, uint8_t slaves[],
-		uint8_t len);
+rte_eth_bond_active_slaves_get(uint16_t bonded_port_id, uint16_t slaves[],
+				uint16_t len);
 
 /**
  * Set explicit MAC address to use on bonded device and it's slaves.
@@ -252,7 +253,7 @@ rte_eth_bond_active_slaves_get(uint8_t bonded_port_id, uint8_t slaves[],
  *	0 on success, negative value otherwise
  */
 int
-rte_eth_bond_mac_address_set(uint8_t bonded_port_id,
+rte_eth_bond_mac_address_set(uint16_t bonded_port_id,
 		struct ether_addr *mac_addr);
 
 /**
@@ -265,7 +266,7 @@ rte_eth_bond_mac_address_set(uint8_t bonded_port_id,
  *	0 on success, negative value otherwise
  */
 int
-rte_eth_bond_mac_address_reset(uint8_t bonded_port_id);
+rte_eth_bond_mac_address_reset(uint16_t bonded_port_id);
 
 /**
  * Set the transmit policy for bonded device to use when it is operating in
@@ -279,7 +280,7 @@ rte_eth_bond_mac_address_reset(uint8_t bonded_port_id);
  *	0 on success, negative value otherwise.
  */
 int
-rte_eth_bond_xmit_policy_set(uint8_t bonded_port_id, uint8_t policy);
+rte_eth_bond_xmit_policy_set(uint16_t bonded_port_id, uint8_t policy);
 
 /**
  * Get the transmit policy set on bonded device for balance mode operation
@@ -290,7 +291,7 @@ rte_eth_bond_xmit_policy_set(uint8_t bonded_port_id, uint8_t policy);
  *	Balance transmit policy on success, negative value otherwise.
  */
 int
-rte_eth_bond_xmit_policy_get(uint8_t bonded_port_id);
+rte_eth_bond_xmit_policy_get(uint16_t bonded_port_id);
 
 /**
  * Set the link monitoring frequency (in ms) for monitoring the link status of
@@ -304,7 +305,7 @@ rte_eth_bond_xmit_policy_get(uint8_t bonded_port_id);
  */
 
 int
-rte_eth_bond_link_monitoring_set(uint8_t bonded_port_id, uint32_t internal_ms);
+rte_eth_bond_link_monitoring_set(uint16_t bonded_port_id, uint32_t internal_ms);
 
 /**
  * Get the current link monitoring frequency (in ms) for monitoring of the link
@@ -316,7 +317,7 @@ rte_eth_bond_link_monitoring_set(uint8_t bonded_port_id, uint32_t internal_ms);
  *	Monitoring interval on success, negative value otherwise.
  */
 int
-rte_eth_bond_link_monitoring_get(uint8_t bonded_port_id);
+rte_eth_bond_link_monitoring_get(uint16_t bonded_port_id);
 
 
 /**
@@ -330,7 +331,8 @@ rte_eth_bond_link_monitoring_get(uint8_t bonded_port_id);
  *  0 on success, negative value otherwise.
  */
 int
-rte_eth_bond_link_down_prop_delay_set(uint8_t bonded_port_id, uint32_t delay_ms);
+rte_eth_bond_link_down_prop_delay_set(uint16_t bonded_port_id,
+				       uint32_t delay_ms);
 
 /**
  * Get the period in milliseconds set for delaying the disabling of a bonded
@@ -342,7 +344,7 @@ rte_eth_bond_link_down_prop_delay_set(uint8_t bonded_port_id, uint32_t delay_ms)
  *  Delay period on success, negative value otherwise.
  */
 int
-rte_eth_bond_link_down_prop_delay_get(uint8_t bonded_port_id);
+rte_eth_bond_link_down_prop_delay_get(uint16_t bonded_port_id);
 
 /**
  * Set the period in milliseconds for delaying the enabling of a bonded link
@@ -355,7 +357,8 @@ rte_eth_bond_link_down_prop_delay_get(uint8_t bonded_port_id);
  *  0 on success, negative value otherwise.
  */
 int
-rte_eth_bond_link_up_prop_delay_set(uint8_t bonded_port_id, uint32_t delay_ms);
+rte_eth_bond_link_up_prop_delay_set(uint16_t bonded_port_id,
+				    uint32_t delay_ms);
 
 /**
  * Get the period in milliseconds set for delaying the enabling of a bonded
@@ -367,7 +370,7 @@ rte_eth_bond_link_up_prop_delay_set(uint8_t bonded_port_id, uint32_t delay_ms);
  *  Delay period on success, negative value otherwise.
  */
 int
-rte_eth_bond_link_up_prop_delay_get(uint8_t bonded_port_id);
+rte_eth_bond_link_up_prop_delay_get(uint16_t bonded_port_id);
 
 
 #ifdef __cplusplus
diff --git a/drivers/net/bonding/rte_eth_bond_8023ad.c b/drivers/net/bonding/rte_eth_bond_8023ad.c
index c2b9e053c..c1873aa13 100644
--- a/drivers/net/bonding/rte_eth_bond_8023ad.c
+++ b/drivers/net/bonding/rte_eth_bond_8023ad.c
@@ -209,7 +209,7 @@ set_warning_flags(struct port *port, uint16_t flags)
 }
 
 static void
-show_warnings(uint8_t slave_id)
+show_warnings(uint16_t slave_id)
 {
 	struct port *port = &mode_8023ad_ports[slave_id];
 	uint8_t warnings;
@@ -278,7 +278,7 @@ record_default(struct port *port)
  * @param port			Port on which LACPDU was received.
  */
 static void
-rx_machine(struct bond_dev_private *internals, uint8_t slave_id,
+rx_machine(struct bond_dev_private *internals, uint16_t slave_id,
 		struct lacpdu *lacp)
 {
 	struct port *agg, *port = &mode_8023ad_ports[slave_id];
@@ -399,7 +399,7 @@ rx_machine(struct bond_dev_private *internals, uint8_t slave_id,
  * @param port			Port to handle state machine.
  */
 static void
-periodic_machine(struct bond_dev_private *internals, uint8_t slave_id)
+periodic_machine(struct bond_dev_private *internals, uint16_t slave_id)
 {
 	struct port *port = &mode_8023ad_ports[slave_id];
 	/* Calculate if either site is LACP enabled */
@@ -461,7 +461,7 @@ periodic_machine(struct bond_dev_private *internals, uint8_t slave_id)
  * @param port			Port to handle state machine.
  */
 static void
-mux_machine(struct bond_dev_private *internals, uint8_t slave_id)
+mux_machine(struct bond_dev_private *internals, uint16_t slave_id)
 {
 	struct port *port = &mode_8023ad_ports[slave_id];
 
@@ -564,7 +564,7 @@ mux_machine(struct bond_dev_private *internals, uint8_t slave_id)
  * @param port
  */
 static void
-tx_machine(struct bond_dev_private *internals, uint8_t slave_id)
+tx_machine(struct bond_dev_private *internals, uint16_t slave_id)
 {
 	struct port *agg, *port = &mode_8023ad_ports[slave_id];
 
@@ -688,11 +688,11 @@ static void
 selection_logic(struct bond_dev_private *internals, uint8_t slave_id)
 {
 	struct port *agg, *port;
-	uint8_t slaves_count, new_agg_id, i, j = 0;
-	uint8_t *slaves;
+	uint16_t slaves_count, new_agg_id, i, j = 0;
+	uint16_t *slaves;
 	uint64_t agg_bandwidth[8] = {0};
 	uint64_t agg_count[8] = {0};
-	uint8_t default_slave = 0;
+	uint16_t default_slave = 0;
 	uint8_t mode_count_id, mode_band_id;
 	struct rte_eth_link link_info;
 
@@ -923,7 +923,8 @@ bond_mode_8023ad_periodic_cb(void *arg)
 }
 
 void
-bond_mode_8023ad_activate_slave(struct rte_eth_dev *bond_dev, uint8_t slave_id)
+bond_mode_8023ad_activate_slave(struct rte_eth_dev *bond_dev,
+				uint16_t slave_id)
 {
 	struct bond_dev_private *internals = bond_dev->data->dev_private;
 
@@ -951,7 +952,7 @@ bond_mode_8023ad_activate_slave(struct rte_eth_dev *bond_dev, uint8_t slave_id)
 	memcpy(&port->actor, &initial, sizeof(struct port_params));
 	/* Standard requires that port ID must be grater than 0.
 	 * Add 1 do get corresponding port_number */
-	port->actor.port_number = rte_cpu_to_be_16((uint16_t)slave_id + 1);
+	port->actor.port_number = rte_cpu_to_be_16(slave_id + 1);
 
 	memcpy(&port->partner, &initial, sizeof(struct port_params));
 
@@ -1022,12 +1023,12 @@ bond_mode_8023ad_activate_slave(struct rte_eth_dev *bond_dev, uint8_t slave_id)
 
 int
 bond_mode_8023ad_deactivate_slave(struct rte_eth_dev *bond_dev,
-		uint8_t slave_id)
+		uint16_t slave_id)
 {
 	struct bond_dev_private *internals = bond_dev->data->dev_private;
 	void *pkt = NULL;
 	struct port *port;
-	uint8_t i;
+	uint16_t i;
 
 	/* Given slave must be in active list */
 	RTE_ASSERT(find_slave_by_id(internals->active_slaves,
@@ -1066,7 +1067,7 @@ bond_mode_8023ad_mac_address_update(struct rte_eth_dev *bond_dev)
 	struct bond_dev_private *internals = bond_dev->data->dev_private;
 	struct ether_addr slave_addr;
 	struct port *slave, *agg_slave;
-	uint8_t slave_id, i, j;
+	uint16_t slave_id, i, j;
 
 	bond_mode_8023ad_stop(bond_dev);
 
@@ -1214,7 +1215,7 @@ bond_mode_8023ad_stop(struct rte_eth_dev *bond_dev)
 
 void
 bond_mode_8023ad_handle_slow_pkt(struct bond_dev_private *internals,
-	uint8_t slave_id, struct rte_mbuf *pkt)
+				  uint16_t slave_id, struct rte_mbuf *pkt)
 {
 	struct mode8023ad_private *mode4 = &internals->mode4;
 	struct port *port = &mode_8023ad_ports[slave_id];
@@ -1295,7 +1296,7 @@ bond_mode_8023ad_handle_slow_pkt(struct bond_dev_private *internals,
 }
 
 int
-rte_eth_bond_8023ad_conf_get(uint8_t port_id,
+rte_eth_bond_8023ad_conf_get(uint16_t port_id,
 		struct rte_eth_bond_8023ad_conf *conf)
 {
 	struct rte_eth_dev *bond_dev;
@@ -1312,7 +1313,7 @@ rte_eth_bond_8023ad_conf_get(uint8_t port_id,
 }
 
 int
-rte_eth_bond_8023ad_agg_selection_set(uint8_t port_id,
+rte_eth_bond_8023ad_agg_selection_set(uint16_t port_id,
 		enum rte_bond_8023ad_agg_selection agg_selection)
 {
 	struct rte_eth_dev *bond_dev;
@@ -1334,7 +1335,7 @@ rte_eth_bond_8023ad_agg_selection_set(uint8_t port_id,
 	return 0;
 }
 
-int rte_eth_bond_8023ad_agg_selection_get(uint8_t port_id)
+int rte_eth_bond_8023ad_agg_selection_get(uint16_t port_id)
 {
 	struct rte_eth_dev *bond_dev;
 	struct bond_dev_private *internals;
@@ -1355,7 +1356,7 @@ int rte_eth_bond_8023ad_agg_selection_get(uint8_t port_id)
 
 
 static int
-bond_8023ad_setup_validate(uint8_t port_id,
+bond_8023ad_setup_validate(uint16_t port_id,
 		struct rte_eth_bond_8023ad_conf *conf)
 {
 	if (valid_bonded_port_id(port_id) != 0)
@@ -1379,8 +1380,9 @@ bond_8023ad_setup_validate(uint8_t port_id,
 	return 0;
 }
 
+
 int
-rte_eth_bond_8023ad_setup(uint8_t port_id,
+rte_eth_bond_8023ad_setup(uint16_t port_id,
 		struct rte_eth_bond_8023ad_conf *conf)
 {
 	struct rte_eth_dev *bond_dev;
@@ -1401,7 +1403,7 @@ rte_eth_bond_8023ad_setup(uint8_t port_id,
 
 
 int
-rte_eth_bond_8023ad_slave_info(uint8_t port_id, uint8_t slave_id,
+rte_eth_bond_8023ad_slave_info(uint16_t port_id, uint16_t slave_id,
 		struct rte_eth_bond_8023ad_slave_info *info)
 {
 	struct rte_eth_dev *bond_dev;
@@ -1434,7 +1436,7 @@ rte_eth_bond_8023ad_slave_info(uint8_t port_id, uint8_t slave_id,
 }
 
 static int
-bond_8023ad_ext_validate(uint8_t port_id, uint8_t slave_id)
+bond_8023ad_ext_validate(uint16_t port_id, uint16_t slave_id)
 {
 	struct rte_eth_dev *bond_dev;
 	struct bond_dev_private *internals;
@@ -1462,7 +1464,8 @@ bond_8023ad_ext_validate(uint8_t port_id, uint8_t slave_id)
 }
 
 int
-rte_eth_bond_8023ad_ext_collect(uint8_t port_id, uint8_t slave_id, int enabled)
+rte_eth_bond_8023ad_ext_collect(uint16_t port_id, uint16_t slave_id,
+				int enabled)
 {
 	struct port *port;
 	int res;
@@ -1482,7 +1485,8 @@ rte_eth_bond_8023ad_ext_collect(uint8_t port_id, uint8_t slave_id, int enabled)
 }
 
 int
-rte_eth_bond_8023ad_ext_distrib(uint8_t port_id, uint8_t slave_id, int enabled)
+rte_eth_bond_8023ad_ext_distrib(uint16_t port_id, uint16_t slave_id,
+				int enabled)
 {
 	struct port *port;
 	int res;
@@ -1502,7 +1506,7 @@ rte_eth_bond_8023ad_ext_distrib(uint8_t port_id, uint8_t slave_id, int enabled)
 }
 
 int
-rte_eth_bond_8023ad_ext_distrib_get(uint8_t port_id, uint8_t slave_id)
+rte_eth_bond_8023ad_ext_distrib_get(uint16_t port_id, uint16_t slave_id)
 {
 	struct port *port;
 	int err;
@@ -1516,7 +1520,7 @@ rte_eth_bond_8023ad_ext_distrib_get(uint8_t port_id, uint8_t slave_id)
 }
 
 int
-rte_eth_bond_8023ad_ext_collect_get(uint8_t port_id, uint8_t slave_id)
+rte_eth_bond_8023ad_ext_collect_get(uint16_t port_id, uint16_t slave_id)
 {
 	struct port *port;
 	int err;
@@ -1530,7 +1534,7 @@ rte_eth_bond_8023ad_ext_collect_get(uint8_t port_id, uint8_t slave_id)
 }
 
 int
-rte_eth_bond_8023ad_ext_slowtx(uint8_t port_id, uint8_t slave_id,
+rte_eth_bond_8023ad_ext_slowtx(uint16_t port_id, uint16_t slave_id,
 		struct rte_mbuf *lacp_pkt)
 {
 	struct port *port;
@@ -1591,7 +1595,7 @@ bond_mode_8023ad_ext_periodic_cb(void *arg)
 }
 
 int
-rte_eth_bond_8023ad_dedicated_queues_enable(uint8_t port)
+rte_eth_bond_8023ad_dedicated_queues_enable(uint16_t port)
 {
 	int retval = 0;
 	struct rte_eth_dev *dev = &rte_eth_devices[port];
@@ -1615,7 +1619,7 @@ rte_eth_bond_8023ad_dedicated_queues_enable(uint8_t port)
 }
 
 int
-rte_eth_bond_8023ad_dedicated_queues_disable(uint8_t port)
+rte_eth_bond_8023ad_dedicated_queues_disable(uint16_t port)
 {
 	int retval = 0;
 	struct rte_eth_dev *dev = &rte_eth_devices[port];
diff --git a/drivers/net/bonding/rte_eth_bond_8023ad.h b/drivers/net/bonding/rte_eth_bond_8023ad.h
index d609745e0..2874336d3 100644
--- a/drivers/net/bonding/rte_eth_bond_8023ad.h
+++ b/drivers/net/bonding/rte_eth_bond_8023ad.h
@@ -64,7 +64,7 @@ extern "C" {
 #define MARKER_TLV_TYPE_INFO                0x01
 #define MARKER_TLV_TYPE_RESP                0x02
 
-typedef void (*rte_eth_bond_8023ad_ext_slowrx_fn)(uint8_t slave_id,
+typedef void (*rte_eth_bond_8023ad_ext_slowrx_fn)(uint16_t slave_id,
 						  struct rte_mbuf *lacp_pkt);
 
 enum rte_bond_8023ad_selection {
@@ -176,7 +176,7 @@ struct rte_eth_bond_8023ad_slave_info {
 	struct port_params actor;
 	uint8_t partner_state;
 	struct port_params partner;
-	uint8_t agg_port_id;
+	uint16_t agg_port_id;
 };
 
 /**
@@ -192,7 +192,7 @@ struct rte_eth_bond_8023ad_slave_info {
  *   -EINVAL if conf is NULL
  */
 int
-rte_eth_bond_8023ad_conf_get(uint8_t port_id,
+rte_eth_bond_8023ad_conf_get(uint16_t port_id,
 		struct rte_eth_bond_8023ad_conf *conf);
 
 /**
@@ -207,7 +207,7 @@ rte_eth_bond_8023ad_conf_get(uint8_t port_id,
  *   -EINVAL if configuration is invalid.
  */
 int
-rte_eth_bond_8023ad_setup(uint8_t port_id,
+rte_eth_bond_8023ad_setup(uint16_t port_id,
 		struct rte_eth_bond_8023ad_conf *conf);
 
 /**
@@ -223,7 +223,7 @@ rte_eth_bond_8023ad_setup(uint8_t port_id,
  *       bonded device or is not inactive).
  */
 int
-rte_eth_bond_8023ad_slave_info(uint8_t port_id, uint8_t slave_id,
+rte_eth_bond_8023ad_slave_info(uint16_t port_id, uint16_t slave_id,
 		struct rte_eth_bond_8023ad_slave_info *conf);
 
 #ifdef __cplusplus
@@ -241,7 +241,8 @@ rte_eth_bond_8023ad_slave_info(uint8_t port_id, uint8_t slave_id,
  *   -EINVAL if slave is not valid.
  */
 int
-rte_eth_bond_8023ad_ext_collect(uint8_t port_id, uint8_t slave_id, int enabled);
+rte_eth_bond_8023ad_ext_collect(uint16_t port_id, uint16_t slave_id,
+				int enabled);
 
 /**
  * Get COLLECTING flag from slave port actor state.
@@ -254,7 +255,7 @@ rte_eth_bond_8023ad_ext_collect(uint8_t port_id, uint8_t slave_id, int enabled);
  *   -EINVAL if slave is not valid.
  */
 int
-rte_eth_bond_8023ad_ext_collect_get(uint8_t port_id, uint8_t slave_id);
+rte_eth_bond_8023ad_ext_collect_get(uint16_t port_id, uint16_t slave_id);
 
 /**
  * Configure a slave port to start distributing.
@@ -267,7 +268,8 @@ rte_eth_bond_8023ad_ext_collect_get(uint8_t port_id, uint8_t slave_id);
  *   -EINVAL if slave is not valid.
  */
 int
-rte_eth_bond_8023ad_ext_distrib(uint8_t port_id, uint8_t slave_id, int enabled);
+rte_eth_bond_8023ad_ext_distrib(uint16_t port_id, uint16_t slave_id,
+				int enabled);
 
 /**
  * Get DISTRIBUTING flag from slave port actor state.
@@ -280,7 +282,7 @@ rte_eth_bond_8023ad_ext_distrib(uint8_t port_id, uint8_t slave_id, int enabled);
  *   -EINVAL if slave is not valid.
  */
 int
-rte_eth_bond_8023ad_ext_distrib_get(uint8_t port_id, uint8_t slave_id);
+rte_eth_bond_8023ad_ext_distrib_get(uint16_t port_id, uint16_t slave_id);
 
 /**
  * LACPDU transmit path for external 802.3ad state machine.  Caller retains
@@ -294,7 +296,7 @@ rte_eth_bond_8023ad_ext_distrib_get(uint8_t port_id, uint8_t slave_id);
  *   0 on success, negative value otherwise.
  */
 int
-rte_eth_bond_8023ad_ext_slowtx(uint8_t port_id, uint8_t slave_id,
+rte_eth_bond_8023ad_ext_slowtx(uint16_t port_id, uint16_t slave_id,
 		struct rte_mbuf *lacp_pkt);
 
 /**
@@ -320,7 +322,7 @@ rte_eth_bond_8023ad_ext_slowtx(uint8_t port_id, uint8_t slave_id,
  *   0 on success, negative value otherwise.
  */
 int
-rte_eth_bond_8023ad_dedicated_queues_enable(uint8_t port_id);
+rte_eth_bond_8023ad_dedicated_queues_enable(uint16_t port_id);
 
 /**
  * Disable slow queue on slaves
@@ -337,7 +339,7 @@ rte_eth_bond_8023ad_dedicated_queues_enable(uint8_t port_id);
  *
  */
 int
-rte_eth_bond_8023ad_dedicated_queues_disable(uint8_t port_id);
+rte_eth_bond_8023ad_dedicated_queues_disable(uint16_t port_id);
 
 /*
  * Get aggregator mode for 8023ad
@@ -347,7 +349,7 @@ rte_eth_bond_8023ad_dedicated_queues_disable(uint8_t port_id);
  *   agregator mode on success, negative value otherwise
  */
 int
-rte_eth_bond_8023ad_agg_selection_get(uint8_t port_id);
+rte_eth_bond_8023ad_agg_selection_get(uint16_t port_id);
 
 /**
  * Set aggregator mode for 8023ad
@@ -356,6 +358,6 @@ rte_eth_bond_8023ad_agg_selection_get(uint8_t port_id);
  *   0 on success, negative value otherwise
  */
 int
-rte_eth_bond_8023ad_agg_selection_set(uint8_t port_id,
+rte_eth_bond_8023ad_agg_selection_set(uint16_t port_id,
 		enum rte_bond_8023ad_agg_selection agg_selection);
 #endif /* RTE_ETH_BOND_8023AD_H_ */
diff --git a/drivers/net/bonding/rte_eth_bond_8023ad_private.h b/drivers/net/bonding/rte_eth_bond_8023ad_private.h
index d46e44a84..433c7000d 100644
--- a/drivers/net/bonding/rte_eth_bond_8023ad_private.h
+++ b/drivers/net/bonding/rte_eth_bond_8023ad_private.h
@@ -279,7 +279,7 @@ bond_mode_8023ad_stop(struct rte_eth_dev *dev);
  */
 void
 bond_mode_8023ad_handle_slow_pkt(struct bond_dev_private *internals,
-	uint8_t slave_id, struct rte_mbuf *pkt);
+				 uint16_t slave_id, struct rte_mbuf *pkt);
 
 /**
  * @internal
@@ -293,7 +293,7 @@ bond_mode_8023ad_handle_slow_pkt(struct bond_dev_private *internals,
  *  0 on success, negative value otherwise.
  */
 void
-bond_mode_8023ad_activate_slave(struct rte_eth_dev *dev, uint8_t port_id);
+bond_mode_8023ad_activate_slave(struct rte_eth_dev *dev, uint16_t port_id);
 
 /**
  * @internal
@@ -307,7 +307,7 @@ bond_mode_8023ad_activate_slave(struct rte_eth_dev *dev, uint8_t port_id);
  *  0 on success, negative value otherwise.
  */
 int
-bond_mode_8023ad_deactivate_slave(struct rte_eth_dev *dev, uint8_t slave_pos);
+bond_mode_8023ad_deactivate_slave(struct rte_eth_dev *dev, uint16_t slave_pos);
 
 /**
  * Updates state when MAC was changed on bonded device or one of its slaves.
@@ -318,12 +318,12 @@ bond_mode_8023ad_mac_address_update(struct rte_eth_dev *bond_dev);
 
 int
 bond_ethdev_8023ad_flow_verify(struct rte_eth_dev *bond_dev,
-		uint8_t slave_port);
+		uint16_t slave_port);
 
 int
-bond_ethdev_8023ad_flow_set(struct rte_eth_dev *bond_dev, uint8_t slave_port);
+bond_ethdev_8023ad_flow_set(struct rte_eth_dev *bond_dev, uint16_t slave_port);
 
 int
-bond_8023ad_slow_pkt_hw_filter_supported(uint8_t port_id);
+bond_8023ad_slow_pkt_hw_filter_supported(uint16_t port_id);
 
 #endif /* RTE_ETH_BOND_8023AD_H_ */
diff --git a/drivers/net/bonding/rte_eth_bond_alb.c b/drivers/net/bonding/rte_eth_bond_alb.c
index d9d37495d..f7efbb78e 100644
--- a/drivers/net/bonding/rte_eth_bond_alb.c
+++ b/drivers/net/bonding/rte_eth_bond_alb.c
@@ -148,7 +148,7 @@ void bond_mode_alb_arp_recv(struct ether_hdr *eth_h, uint16_t offset,
 	rte_spinlock_unlock(&internals->mode6.lock);
 }
 
-uint8_t
+uint16_t
 bond_mode_alb_arp_xmit(struct ether_hdr *eth_h, uint16_t offset,
 		struct bond_dev_private *internals)
 {
@@ -220,13 +220,13 @@ bond_mode_alb_arp_xmit(struct ether_hdr *eth_h, uint16_t offset,
 	return internals->current_primary_port;
 }
 
-uint8_t
+uint16_t
 bond_mode_alb_arp_upd(struct client_data *client_info,
 		struct rte_mbuf *pkt, struct bond_dev_private *internals)
 {
 	struct ether_hdr *eth_h;
 	struct arp_hdr *arp_h;
-	uint8_t slave_idx;
+	uint16_t slave_idx;
 
 	rte_spinlock_lock(&internals->mode6.lock);
 	eth_h = rte_pktmbuf_mtod(pkt, struct ether_hdr *);
diff --git a/drivers/net/bonding/rte_eth_bond_alb.h b/drivers/net/bonding/rte_eth_bond_alb.h
index fd7c3aeb4..9f17f7c85 100644
--- a/drivers/net/bonding/rte_eth_bond_alb.h
+++ b/drivers/net/bonding/rte_eth_bond_alb.h
@@ -51,7 +51,7 @@ struct client_data {
 	uint32_t cli_ip;
 	/**< Client IP address */
 
-	uint8_t slave_idx;
+	uint16_t slave_idx;
 	/**< Index of slave on which we connect with that client */
 	uint8_t in_use;
 	/**< Flag indicating if entry in client table is currently used */
@@ -113,7 +113,7 @@ bond_mode_alb_arp_recv(struct ether_hdr *eth_h, uint16_t offset,
  * @return
  * Index of slave on which packet should be sent.
  */
-uint8_t
+uint16_t
 bond_mode_alb_arp_xmit(struct ether_hdr *eth_h, uint16_t offset,
 		struct bond_dev_private *internals);
 
@@ -127,7 +127,7 @@ bond_mode_alb_arp_xmit(struct ether_hdr *eth_h, uint16_t offset,
  * @return
  * Index of slawe on which packet should be sent.
  */
-uint8_t
+uint16_t
 bond_mode_alb_arp_upd(struct client_data *client_info,
 		struct rte_mbuf *pkt, struct bond_dev_private *internals);
 
diff --git a/drivers/net/bonding/rte_eth_bond_api.c b/drivers/net/bonding/rte_eth_bond_api.c
index de1d9e0db..529aae34e 100644
--- a/drivers/net/bonding/rte_eth_bond_api.c
+++ b/drivers/net/bonding/rte_eth_bond_api.c
@@ -56,14 +56,14 @@ check_for_bonded_ethdev(const struct rte_eth_dev *eth_dev)
 }
 
 int
-valid_bonded_port_id(uint8_t port_id)
+valid_bonded_port_id(uint16_t port_id)
 {
 	RTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -1);
 	return check_for_bonded_ethdev(&rte_eth_devices[port_id]);
 }
 
 int
-valid_slave_port_id(uint8_t port_id, uint8_t mode)
+valid_slave_port_id(uint16_t port_id, uint8_t mode)
 {
 	RTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -1);
 
@@ -80,7 +80,7 @@ valid_slave_port_id(uint8_t port_id, uint8_t mode)
 }
 
 void
-activate_slave(struct rte_eth_dev *eth_dev, uint8_t port_id)
+activate_slave(struct rte_eth_dev *eth_dev, uint16_t port_id)
 {
 	struct bond_dev_private *internals = eth_dev->data->dev_private;
 	uint8_t active_count = internals->active_slave_count;
@@ -107,11 +107,11 @@ activate_slave(struct rte_eth_dev *eth_dev, uint8_t port_id)
 }
 
 void
-deactivate_slave(struct rte_eth_dev *eth_dev, uint8_t port_id)
+deactivate_slave(struct rte_eth_dev *eth_dev, uint16_t port_id)
 {
-	uint8_t slave_pos;
+	uint16_t slave_pos;
 	struct bond_dev_private *internals = eth_dev->data->dev_private;
-	uint8_t active_count = internals->active_slave_count;
+	uint16_t active_count = internals->active_slave_count;
 
 	if (internals->mode == BONDING_MODE_8023AD) {
 		bond_mode_8023ad_stop(eth_dev);
@@ -153,7 +153,7 @@ rte_eth_bond_create(const char *name, uint8_t mode, uint8_t socket_id)
 {
 	struct bond_dev_private *internals;
 	char devargs[52];
-	uint8_t port_id;
+	uint16_t port_id;
 	int ret;
 
 	if (name == NULL) {
@@ -193,7 +193,7 @@ rte_eth_bond_free(const char *name)
 }
 
 static int
-slave_vlan_filter_set(uint8_t bonded_port_id, uint8_t slave_port_id)
+slave_vlan_filter_set(uint16_t bonded_port_id, uint16_t slave_port_id)
 {
 	struct rte_eth_dev *bonded_eth_dev;
 	struct bond_dev_private *internals;
@@ -233,7 +233,7 @@ slave_vlan_filter_set(uint8_t bonded_port_id, uint8_t slave_port_id)
 }
 
 static int
-__eth_bond_slave_add_lock_free(uint8_t bonded_port_id, uint8_t slave_port_id)
+__eth_bond_slave_add_lock_free(uint16_t bonded_port_id, uint16_t slave_port_id)
 {
 	struct rte_eth_dev *bonded_eth_dev, *slave_eth_dev;
 	struct bond_dev_private *internals;
@@ -363,7 +363,7 @@ __eth_bond_slave_add_lock_free(uint8_t bonded_port_id, uint8_t slave_port_id)
 }
 
 int
-rte_eth_bond_slave_add(uint8_t bonded_port_id, uint8_t slave_port_id)
+rte_eth_bond_slave_add(uint16_t bonded_port_id, uint16_t slave_port_id)
 {
 	struct rte_eth_dev *bonded_eth_dev;
 	struct bond_dev_private *internals;
@@ -387,7 +387,8 @@ rte_eth_bond_slave_add(uint8_t bonded_port_id, uint8_t slave_port_id)
 }
 
 static int
-__eth_bond_slave_remove_lock_free(uint8_t bonded_port_id, uint8_t slave_port_id)
+__eth_bond_slave_remove_lock_free(uint16_t bonded_port_id,
+				   uint16_t slave_port_id)
 {
 	struct rte_eth_dev *bonded_eth_dev;
 	struct bond_dev_private *internals;
@@ -466,7 +467,7 @@ __eth_bond_slave_remove_lock_free(uint8_t bonded_port_id, uint8_t slave_port_id)
 }
 
 int
-rte_eth_bond_slave_remove(uint8_t bonded_port_id, uint8_t slave_port_id)
+rte_eth_bond_slave_remove(uint16_t bonded_port_id, uint16_t slave_port_id)
 {
 	struct rte_eth_dev *bonded_eth_dev;
 	struct bond_dev_private *internals;
@@ -488,7 +489,7 @@ rte_eth_bond_slave_remove(uint8_t bonded_port_id, uint8_t slave_port_id)
 }
 
 int
-rte_eth_bond_mode_set(uint8_t bonded_port_id, uint8_t mode)
+rte_eth_bond_mode_set(uint16_t bonded_port_id, uint8_t mode)
 {
 	if (valid_bonded_port_id(bonded_port_id) != 0)
 		return -1;
@@ -497,7 +498,7 @@ rte_eth_bond_mode_set(uint8_t bonded_port_id, uint8_t mode)
 }
 
 int
-rte_eth_bond_mode_get(uint8_t bonded_port_id)
+rte_eth_bond_mode_get(uint16_t bonded_port_id)
 {
 	struct bond_dev_private *internals;
 
@@ -510,7 +511,7 @@ rte_eth_bond_mode_get(uint8_t bonded_port_id)
 }
 
 int
-rte_eth_bond_primary_set(uint8_t bonded_port_id, uint8_t slave_port_id)
+rte_eth_bond_primary_set(uint16_t bonded_port_id, uint16_t slave_port_id)
 {
 	struct bond_dev_private *internals;
 
@@ -531,7 +532,7 @@ rte_eth_bond_primary_set(uint8_t bonded_port_id, uint8_t slave_port_id)
 }
 
 int
-rte_eth_bond_primary_get(uint8_t bonded_port_id)
+rte_eth_bond_primary_get(uint16_t bonded_port_id)
 {
 	struct bond_dev_private *internals;
 
@@ -547,7 +548,8 @@ rte_eth_bond_primary_get(uint8_t bonded_port_id)
 }
 
 int
-rte_eth_bond_slaves_get(uint8_t bonded_port_id, uint8_t slaves[], uint8_t len)
+rte_eth_bond_slaves_get(uint16_t bonded_port_id, uint16_t slaves[],
+			uint16_t len)
 {
 	struct bond_dev_private *internals;
 	uint8_t i;
@@ -570,8 +572,8 @@ rte_eth_bond_slaves_get(uint8_t bonded_port_id, uint8_t slaves[], uint8_t len)
 }
 
 int
-rte_eth_bond_active_slaves_get(uint8_t bonded_port_id, uint8_t slaves[],
-		uint8_t len)
+rte_eth_bond_active_slaves_get(uint16_t bonded_port_id, uint16_t slaves[],
+		uint16_t len)
 {
 	struct bond_dev_private *internals;
 
@@ -586,13 +588,14 @@ rte_eth_bond_active_slaves_get(uint8_t bonded_port_id, uint8_t slaves[],
 	if (internals->active_slave_count > len)
 		return -1;
 
-	memcpy(slaves, internals->active_slaves, internals->active_slave_count);
+	memcpy(slaves, internals->active_slaves,
+	internals->active_slave_count * sizeof(internals->active_slaves[0]));
 
 	return internals->active_slave_count;
 }
 
 int
-rte_eth_bond_mac_address_set(uint8_t bonded_port_id,
+rte_eth_bond_mac_address_set(uint16_t bonded_port_id,
 		struct ether_addr *mac_addr)
 {
 	struct rte_eth_dev *bonded_eth_dev;
@@ -618,7 +621,7 @@ rte_eth_bond_mac_address_set(uint8_t bonded_port_id,
 }
 
 int
-rte_eth_bond_mac_address_reset(uint8_t bonded_port_id)
+rte_eth_bond_mac_address_reset(uint16_t bonded_port_id)
 {
 	struct rte_eth_dev *bonded_eth_dev;
 	struct bond_dev_private *internals;
@@ -647,7 +650,7 @@ rte_eth_bond_mac_address_reset(uint8_t bonded_port_id)
 }
 
 int
-rte_eth_bond_xmit_policy_set(uint8_t bonded_port_id, uint8_t policy)
+rte_eth_bond_xmit_policy_set(uint16_t bonded_port_id, uint8_t policy)
 {
 	struct bond_dev_private *internals;
 
@@ -677,7 +680,7 @@ rte_eth_bond_xmit_policy_set(uint8_t bonded_port_id, uint8_t policy)
 }
 
 int
-rte_eth_bond_xmit_policy_get(uint8_t bonded_port_id)
+rte_eth_bond_xmit_policy_get(uint16_t bonded_port_id)
 {
 	struct bond_dev_private *internals;
 
@@ -690,7 +693,7 @@ rte_eth_bond_xmit_policy_get(uint8_t bonded_port_id)
 }
 
 int
-rte_eth_bond_link_monitoring_set(uint8_t bonded_port_id, uint32_t internal_ms)
+rte_eth_bond_link_monitoring_set(uint16_t bonded_port_id, uint32_t internal_ms)
 {
 	struct bond_dev_private *internals;
 
@@ -704,7 +707,7 @@ rte_eth_bond_link_monitoring_set(uint8_t bonded_port_id, uint32_t internal_ms)
 }
 
 int
-rte_eth_bond_link_monitoring_get(uint8_t bonded_port_id)
+rte_eth_bond_link_monitoring_get(uint16_t bonded_port_id)
 {
 	struct bond_dev_private *internals;
 
@@ -717,7 +720,8 @@ rte_eth_bond_link_monitoring_get(uint8_t bonded_port_id)
 }
 
 int
-rte_eth_bond_link_down_prop_delay_set(uint8_t bonded_port_id, uint32_t delay_ms)
+rte_eth_bond_link_down_prop_delay_set(uint16_t bonded_port_id,
+				       uint32_t delay_ms)
 
 {
 	struct bond_dev_private *internals;
@@ -732,7 +736,7 @@ rte_eth_bond_link_down_prop_delay_set(uint8_t bonded_port_id, uint32_t delay_ms)
 }
 
 int
-rte_eth_bond_link_down_prop_delay_get(uint8_t bonded_port_id)
+rte_eth_bond_link_down_prop_delay_get(uint16_t bonded_port_id)
 {
 	struct bond_dev_private *internals;
 
@@ -745,7 +749,7 @@ rte_eth_bond_link_down_prop_delay_get(uint8_t bonded_port_id)
 }
 
 int
-rte_eth_bond_link_up_prop_delay_set(uint8_t bonded_port_id, uint32_t delay_ms)
+rte_eth_bond_link_up_prop_delay_set(uint16_t bonded_port_id, uint32_t delay_ms)
 
 {
 	struct bond_dev_private *internals;
@@ -760,7 +764,7 @@ rte_eth_bond_link_up_prop_delay_set(uint8_t bonded_port_id, uint32_t delay_ms)
 }
 
 int
-rte_eth_bond_link_up_prop_delay_get(uint8_t bonded_port_id)
+rte_eth_bond_link_up_prop_delay_get(uint16_t bonded_port_id)
 {
 	struct bond_dev_private *internals;
 
diff --git a/drivers/net/bonding/rte_eth_bond_args.c b/drivers/net/bonding/rte_eth_bond_args.c
index bb634c62e..04d1f4e8f 100644
--- a/drivers/net/bonding/rte_eth_bond_args.c
+++ b/drivers/net/bonding/rte_eth_bond_args.c
@@ -153,7 +153,7 @@ bond_ethdev_parse_slave_port_kvarg(const char *key,
 			return -1;
 		} else
 			slave_ports->slaves[slave_ports->slave_count++] =
-					(uint8_t)port_id;
+					port_id;
 	}
 	return 0;
 }
diff --git a/drivers/net/bonding/rte_eth_bond_pmd.c b/drivers/net/bonding/rte_eth_bond_pmd.c
index 3ee70baa0..2d680e3fb 100644
--- a/drivers/net/bonding/rte_eth_bond_pmd.c
+++ b/drivers/net/bonding/rte_eth_bond_pmd.c
@@ -174,7 +174,7 @@ const struct rte_flow_attr flow_attr_8023ad = {
 
 int
 bond_ethdev_8023ad_flow_verify(struct rte_eth_dev *bond_dev,
-		uint8_t slave_port) {
+		uint16_t slave_port) {
 	struct rte_flow_error error;
 	struct bond_dev_private *internals = (struct bond_dev_private *)
 			(bond_dev->data->dev_private);
@@ -202,12 +202,12 @@ bond_ethdev_8023ad_flow_verify(struct rte_eth_dev *bond_dev,
 }
 
 int
-bond_8023ad_slow_pkt_hw_filter_supported(uint8_t port_id) {
+bond_8023ad_slow_pkt_hw_filter_supported(uint16_t port_id) {
 	struct rte_eth_dev *bond_dev = &rte_eth_devices[port_id];
 	struct bond_dev_private *internals = (struct bond_dev_private *)
 			(bond_dev->data->dev_private);
 	struct rte_eth_dev_info bond_info, slave_info;
-	uint8_t idx;
+	uint16_t idx;
 
 	/* Verify if all slaves in bonding supports flow director and */
 	if (internals->slave_count > 0) {
@@ -230,7 +230,7 @@ bond_8023ad_slow_pkt_hw_filter_supported(uint8_t port_id) {
 }
 
 int
-bond_ethdev_8023ad_flow_set(struct rte_eth_dev *bond_dev, uint8_t slave_port) {
+bond_ethdev_8023ad_flow_set(struct rte_eth_dev *bond_dev, uint16_t slave_port) {
 
 	struct rte_flow_error error;
 	struct bond_dev_private *internals = (struct bond_dev_private *)
@@ -270,10 +270,10 @@ bond_ethdev_rx_burst_8023ad_fast_queue(void *queue, struct rte_mbuf **bufs,
 	struct bond_rx_queue *bd_rx_q = (struct bond_rx_queue *)queue;
 	struct bond_dev_private *internals = bd_rx_q->dev_private;
 	uint16_t num_rx_total = 0;	/* Total number of received packets */
-	uint8_t slaves[RTE_MAX_ETHPORTS];
-	uint8_t slave_count;
+	uint16_t slaves[RTE_MAX_ETHPORTS];
+	uint16_t slave_count;
 
-	uint8_t i, idx;
+	uint16_t i, idx;
 
 	/* Copy slave list to protect against slave up/down changes during tx
 	 * bursting */
@@ -302,8 +302,8 @@ bond_ethdev_tx_burst_8023ad_fast_queue(void *queue, struct rte_mbuf **bufs,
 	struct bond_dev_private *internals;
 	struct bond_tx_queue *bd_tx_q;
 
-	uint8_t num_of_slaves;
-	uint8_t slaves[RTE_MAX_ETHPORTS];
+	uint16_t num_of_slaves;
+	uint16_t slaves[RTE_MAX_ETHPORTS];
 	 /* positions in slaves, not ID */
 	uint8_t distributing_offsets[RTE_MAX_ETHPORTS];
 	uint8_t distributing_count;
@@ -394,8 +394,8 @@ bond_ethdev_rx_burst_8023ad(void *queue, struct rte_mbuf **bufs,
 
 	const uint16_t ether_type_slow_be = rte_be_to_cpu_16(ETHER_TYPE_SLOW);
 	uint16_t num_rx_total = 0;	/* Total number of received packets */
-	uint8_t slaves[RTE_MAX_ETHPORTS];
-	uint8_t slave_count, idx;
+	uint16_t slaves[RTE_MAX_ETHPORTS];
+	uint16_t slave_count, idx;
 
 	uint8_t collecting;  /* current slave collecting status */
 	const uint8_t promisc = internals->promiscuous_en;
@@ -673,8 +673,8 @@ bond_ethdev_tx_burst_round_robin(void *queue, struct rte_mbuf **bufs,
 	struct rte_mbuf *slave_bufs[RTE_MAX_ETHPORTS][nb_pkts];
 	uint16_t slave_nb_pkts[RTE_MAX_ETHPORTS] = { 0 };
 
-	uint8_t num_of_slaves;
-	uint8_t slaves[RTE_MAX_ETHPORTS];
+	uint16_t num_of_slaves;
+	uint16_t slaves[RTE_MAX_ETHPORTS];
 
 	uint16_t num_tx_total = 0, num_tx_slave;
 
@@ -904,7 +904,7 @@ bandwidth_cmp(const void *a, const void *b)
 }
 
 static void
-bandwidth_left(uint8_t port_id, uint64_t load, uint8_t update_idx,
+bandwidth_left(uint16_t port_id, uint64_t load, uint8_t update_idx,
 		struct bwg_slave *bwg_slave)
 {
 	struct rte_eth_link link_status;
@@ -970,10 +970,10 @@ bond_ethdev_tx_burst_tlb(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)
 	struct rte_eth_dev *primary_port =
 			&rte_eth_devices[internals->primary_port];
 	uint16_t num_tx_total = 0;
-	uint8_t i, j;
+	uint16_t i, j;
 
-	uint8_t num_of_slaves = internals->active_slave_count;
-	uint8_t slaves[RTE_MAX_ETHPORTS];
+	uint16_t num_of_slaves = internals->active_slave_count;
+	uint16_t slaves[RTE_MAX_ETHPORTS];
 
 	struct ether_hdr *ether_hdr;
 	struct ether_addr primary_slave_addr;
@@ -1059,7 +1059,7 @@ bond_ethdev_tx_burst_alb(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)
 
 	uint16_t num_send, num_not_send = 0;
 	uint16_t num_tx_total = 0;
-	uint8_t slave_idx;
+	uint16_t slave_idx;
 
 	int i, j;
 
@@ -1178,8 +1178,8 @@ bond_ethdev_tx_burst_balance(void *queue, struct rte_mbuf **bufs,
 	struct bond_dev_private *internals;
 	struct bond_tx_queue *bd_tx_q;
 
-	uint8_t num_of_slaves;
-	uint8_t slaves[RTE_MAX_ETHPORTS];
+	uint16_t num_of_slaves;
+	uint16_t slaves[RTE_MAX_ETHPORTS];
 
 	uint16_t num_tx_total = 0, num_tx_slave = 0, tx_fail_total = 0;
 
@@ -1239,8 +1239,8 @@ bond_ethdev_tx_burst_8023ad(void *queue, struct rte_mbuf **bufs,
 	struct bond_dev_private *internals;
 	struct bond_tx_queue *bd_tx_q;
 
-	uint8_t num_of_slaves;
-	uint8_t slaves[RTE_MAX_ETHPORTS];
+	uint16_t num_of_slaves;
+	uint16_t slaves[RTE_MAX_ETHPORTS];
 	 /* positions in slaves, not ID */
 	uint8_t distributing_offsets[RTE_MAX_ETHPORTS];
 	uint8_t distributing_count;
@@ -1333,7 +1333,7 @@ bond_ethdev_tx_burst_broadcast(void *queue, struct rte_mbuf **bufs,
 	struct bond_tx_queue *bd_tx_q;
 
 	uint8_t tx_failed_flag = 0, num_of_slaves;
-	uint8_t slaves[RTE_MAX_ETHPORTS];
+	uint16_t slaves[RTE_MAX_ETHPORTS];
 
 	uint16_t max_nb_of_tx_pkts = 0;
 
@@ -1861,7 +1861,7 @@ slave_add(struct bond_dev_private *internals,
 
 void
 bond_ethdev_primary_set(struct bond_dev_private *internals,
-		uint8_t slave_port_id)
+		uint16_t slave_port_id)
 {
 	int i;
 
@@ -2125,7 +2125,7 @@ static int
 bond_ethdev_vlan_filter_set(struct rte_eth_dev *dev, uint16_t vlan_id, int on)
 {
 	int res;
-	uint8_t i;
+	uint16_t i;
 	struct bond_dev_private *internals = dev->data->dev_private;
 
 	/* don't do this while a slave is being added */
@@ -2137,7 +2137,7 @@ bond_ethdev_vlan_filter_set(struct rte_eth_dev *dev, uint16_t vlan_id, int on)
 		rte_bitmap_clear(internals->vlan_filter_bmp, vlan_id);
 
 	for (i = 0; i < internals->slave_count; i++) {
-		uint8_t port_id = internals->slaves[i].port_id;
+		uint16_t port_id = internals->slaves[i].port_id;
 
 		res = rte_eth_dev_vlan_filter(port_id, vlan_id, on);
 		if (res == ENOTSUP)
@@ -2277,7 +2277,7 @@ bond_ethdev_slave_link_status_change_monitor(void *cb_arg)
 static int
 bond_ethdev_link_update(struct rte_eth_dev *ethdev, int wait_to_complete)
 {
-	void (*link_update)(uint8_t port_id, struct rte_eth_link *eth_link);
+	void (*link_update)(uint16_t port_id, struct rte_eth_link *eth_link);
 
 	struct bond_dev_private *bond_ctx;
 	struct rte_eth_link slave_link;
@@ -2466,7 +2466,7 @@ bond_ethdev_delayed_lsc_propagation(void *arg)
 }
 
 int
-bond_ethdev_lsc_event_callback(uint8_t port_id, enum rte_eth_event_type type,
+bond_ethdev_lsc_event_callback(uint16_t port_id, enum rte_eth_event_type type,
 		void *param, void *ret_param __rte_unused)
 {
 	struct rte_eth_dev *bonded_eth_dev;
@@ -2951,7 +2951,7 @@ bond_ethdev_configure(struct rte_eth_dev *dev)
 	struct bond_dev_private *internals = dev->data->dev_private;
 	struct rte_kvargs *kvlist = internals->kvlist;
 	int arg_count;
-	uint8_t port_id = dev - rte_eth_devices;
+	uint16_t port_id = dev - rte_eth_devices;
 	uint8_t agg_mode;
 
 	static const uint8_t default_rss_key[40] = {
@@ -3086,7 +3086,7 @@ bond_ethdev_configure(struct rte_eth_dev *dev)
 	/* Parse/set primary slave port id*/
 	arg_count = rte_kvargs_count(kvlist, PMD_BOND_PRIMARY_SLAVE_KVARG);
 	if (arg_count == 1) {
-		uint8_t primary_slave_port_id;
+		uint16_t primary_slave_port_id;
 
 		if (rte_kvargs_process(kvlist,
 				PMD_BOND_PRIMARY_SLAVE_KVARG,
@@ -3099,7 +3099,7 @@ bond_ethdev_configure(struct rte_eth_dev *dev)
 		}
 
 		/* Set balance mode transmit policy*/
-		if (rte_eth_bond_primary_set(port_id, (uint8_t)primary_slave_port_id)
+		if (rte_eth_bond_primary_set(port_id, primary_slave_port_id)
 				!= 0) {
 			RTE_LOG(ERR, EAL,
 					"Failed to set primary slave port %d on bonded device %s\n",
diff --git a/drivers/net/bonding/rte_eth_bond_private.h b/drivers/net/bonding/rte_eth_bond_private.h
index 1fe6ff880..1392da98d 100644
--- a/drivers/net/bonding/rte_eth_bond_private.h
+++ b/drivers/net/bonding/rte_eth_bond_private.h
@@ -93,12 +93,12 @@ struct bond_tx_queue {
 
 /** Bonded slave devices structure */
 struct bond_ethdev_slave_ports {
-	uint8_t slaves[RTE_MAX_ETHPORTS];	/**< Slave port id array */
-	uint8_t slave_count;				/**< Number of slaves */
+	uint16_t slaves[RTE_MAX_ETHPORTS];	/**< Slave port id array */
+	uint16_t slave_count;				/**< Number of slaves */
 };
 
 struct bond_slave_details {
-	uint8_t port_id;
+	uint16_t port_id;
 
 	uint8_t link_status_poll_enabled;
 	uint8_t link_status_wait_to_complete;
@@ -114,14 +114,14 @@ typedef uint16_t (*xmit_hash_t)(const struct rte_mbuf *buf, uint8_t slave_count)
 
 /** Link Bonding PMD device private configuration Structure */
 struct bond_dev_private {
-	uint8_t port_id;					/**< Port Id of Bonded Port */
+	uint16_t port_id;			/**< Port Id of Bonded Port */
 	uint8_t mode;						/**< Link Bonding Mode */
 
 	rte_spinlock_t lock;
 
-	uint8_t primary_port;				/**< Primary Slave Port */
-	uint8_t current_primary_port;		/**< Primary Slave Port */
-	uint8_t user_defined_primary_port;
+	uint16_t primary_port;			/**< Primary Slave Port */
+	uint16_t current_primary_port;		/**< Primary Slave Port */
+	uint16_t user_defined_primary_port;
 	/**< Flag for whether primary port is user defined or not */
 
 	uint8_t balance_xmit_policy;
@@ -144,16 +144,17 @@ struct bond_dev_private {
 	uint16_t nb_rx_queues;			/**< Total number of rx queues */
 	uint16_t nb_tx_queues;			/**< Total number of tx queues*/
 
-	uint8_t active_slave;		/**< Next active_slave to poll */
-	uint8_t active_slave_count;		/**< Number of active slaves */
-	uint8_t active_slaves[RTE_MAX_ETHPORTS];	/**< Active slave list */
+	uint16_t active_slave;		/**< Next active_slave to poll */
+	uint16_t active_slave_count;		/**< Number of active slaves */
+	uint16_t active_slaves[RTE_MAX_ETHPORTS];    /**< Active slave list */
 
-	uint8_t slave_count;			/**< Number of bonded slaves */
+	uint16_t slave_count;			/**< Number of bonded slaves */
 	struct bond_slave_details slaves[RTE_MAX_ETHPORTS];
 	/**< Arary of bonded slaves details */
 
 	struct mode8023ad_private mode4;
-	uint8_t tlb_slaves_order[RTE_MAX_ETHPORTS]; /* TLB active slaves send order */
+	uint16_t tlb_slaves_order[RTE_MAX_ETHPORTS];
+	/**< TLB active slaves send order */
 	struct mode_alb_private mode6;
 
 	uint32_t rx_offload_capa;            /** Rx offload capability */
@@ -186,10 +187,10 @@ check_for_bonded_ethdev(const struct rte_eth_dev *eth_dev);
 
 /* Search given slave array to find position of given id.
  * Return slave pos or slaves_count if not found. */
-static inline uint8_t
-find_slave_by_id(uint8_t *slaves, uint8_t slaves_count, uint8_t slave_id) {
+static inline uint16_t
+find_slave_by_id(uint16_t *slaves, uint16_t slaves_count, uint16_t slave_id) {
 
-	uint8_t pos;
+	uint16_t pos;
 	for (pos = 0; pos < slaves_count; pos++) {
 		if (slave_id == slaves[pos])
 			break;
@@ -199,19 +200,19 @@ find_slave_by_id(uint8_t *slaves, uint8_t slaves_count, uint8_t slave_id) {
 }
 
 int
-valid_port_id(uint8_t port_id);
+valid_port_id(uint16_t port_id);
 
 int
-valid_bonded_port_id(uint8_t port_id);
+valid_bonded_port_id(uint16_t port_id);
 
 int
-valid_slave_port_id(uint8_t port_id, uint8_t mode);
+valid_slave_port_id(uint16_t port_id, uint8_t mode);
 
 void
-deactivate_slave(struct rte_eth_dev *eth_dev, uint8_t port_id);
+deactivate_slave(struct rte_eth_dev *eth_dev, uint16_t port_id);
 
 void
-activate_slave(struct rte_eth_dev *eth_dev, uint8_t port_id);
+activate_slave(struct rte_eth_dev *eth_dev, uint16_t port_id);
 
 void
 link_properties_set(struct rte_eth_dev *bonded_eth_dev,
@@ -255,10 +256,10 @@ xmit_l34_hash(const struct rte_mbuf *buf, uint8_t slave_count);
 
 void
 bond_ethdev_primary_set(struct bond_dev_private *internals,
-		uint8_t slave_port_id);
+		uint16_t slave_port_id);
 
 int
-bond_ethdev_lsc_event_callback(uint8_t port_id, enum rte_eth_event_type type,
+bond_ethdev_lsc_event_callback(uint16_t port_id, enum rte_eth_event_type type,
 		void *param, void *ret_param);
 
 int
diff --git a/drivers/net/e1000/Makefile b/drivers/net/e1000/Makefile
index ffdf36d37..a94ac7605 100644
--- a/drivers/net/e1000/Makefile
+++ b/drivers/net/e1000/Makefile
@@ -41,7 +41,7 @@ CFLAGS += $(WERROR_FLAGS)
 
 EXPORT_MAP := rte_pmd_e1000_version.map
 
-LIBABIVER := 1
+LIBABIVER := 2
 
 ifeq ($(CONFIG_RTE_TOOLCHAIN_ICC),y)
 #
diff --git a/drivers/net/e1000/em_ethdev.c b/drivers/net/e1000/em_ethdev.c
index 3d4ab9368..a59947d78 100644
--- a/drivers/net/e1000/em_ethdev.c
+++ b/drivers/net/e1000/em_ethdev.c
@@ -1624,7 +1624,7 @@ eth_em_interrupt_action(struct rte_eth_dev *dev,
 	rte_em_dev_atomic_read_link_status(dev, &link);
 	if (link.link_status) {
 		PMD_INIT_LOG(INFO, " Port %d: Link Up - speed %u Mbps - %s",
-			     dev->data->port_id, (unsigned)link.link_speed,
+			     dev->data->port_id, link.link_speed,
 			     link.link_duplex == ETH_LINK_FULL_DUPLEX ?
 			     "full-duplex" : "half-duplex");
 	} else {
diff --git a/drivers/net/e1000/em_rxtx.c b/drivers/net/e1000/em_rxtx.c
index 31819c5bd..06ba68e39 100644
--- a/drivers/net/e1000/em_rxtx.c
+++ b/drivers/net/e1000/em_rxtx.c
@@ -119,7 +119,7 @@ struct em_rx_queue {
 	uint16_t            nb_rx_hold; /**< number of held free RX desc. */
 	uint16_t            rx_free_thresh; /**< max free RX desc to hold. */
 	uint16_t            queue_id;   /**< RX queue index. */
-	uint8_t             port_id;    /**< Device port identifier. */
+	uint16_t            port_id;    /**< Device port identifier. */
 	uint8_t             pthresh;    /**< Prefetch threshold register. */
 	uint8_t             hthresh;    /**< Host threshold register. */
 	uint8_t             wthresh;    /**< Write-back threshold register. */
@@ -186,7 +186,7 @@ struct em_tx_queue {
 	/** Total number of TX descriptors ready to be allocated. */
 	uint16_t               nb_tx_free;
 	uint16_t               queue_id; /**< TX queue index. */
-	uint8_t                port_id;  /**< Device port identifier. */
+	uint16_t               port_id;  /**< Device port identifier. */
 	uint8_t                pthresh;  /**< Prefetch threshold register. */
 	uint8_t                hthresh;  /**< Host threshold register. */
 	uint8_t                wthresh;  /**< Write-back threshold register. */
diff --git a/drivers/net/e1000/igb_rxtx.c b/drivers/net/e1000/igb_rxtx.c
index 1c80a2a1b..a800d9c2b 100644
--- a/drivers/net/e1000/igb_rxtx.c
+++ b/drivers/net/e1000/igb_rxtx.c
@@ -122,7 +122,7 @@ struct igb_rx_queue {
 	uint16_t            rx_free_thresh; /**< max free RX desc to hold. */
 	uint16_t            queue_id;   /**< RX queue index. */
 	uint16_t            reg_idx;    /**< RX queue register index. */
-	uint8_t             port_id;    /**< Device port identifier. */
+	uint16_t            port_id;    /**< Device port identifier. */
 	uint8_t             pthresh;    /**< Prefetch threshold register. */
 	uint8_t             hthresh;    /**< Host threshold register. */
 	uint8_t             wthresh;    /**< Write-back threshold register. */
@@ -191,7 +191,7 @@ struct igb_tx_queue {
 	/**< Index of first used TX descriptor. */
 	uint16_t               queue_id; /**< TX queue index. */
 	uint16_t               reg_idx;  /**< TX queue register index. */
-	uint8_t                port_id;  /**< Device port identifier. */
+	uint16_t               port_id;  /**< Device port identifier. */
 	uint8_t                pthresh;  /**< Prefetch threshold register. */
 	uint8_t                hthresh;  /**< Host threshold register. */
 	uint8_t                wthresh;  /**< Write-back threshold register. */
diff --git a/drivers/net/failsafe/Makefile b/drivers/net/failsafe/Makefile
index d516d3621..e6bfad728 100644
--- a/drivers/net/failsafe/Makefile
+++ b/drivers/net/failsafe/Makefile
@@ -36,7 +36,7 @@ LIB = librte_pmd_failsafe.a
 
 EXPORT_MAP := rte_pmd_failsafe_version.map
 
-LIBABIVER := 1
+LIBABIVER := 2
 
 # Sources are stored in SRCS-y
 SRCS-$(CONFIG_RTE_LIBRTE_PMD_FAILSAFE) += failsafe.c
diff --git a/drivers/net/failsafe/failsafe_ether.c b/drivers/net/failsafe/failsafe_ether.c
index a3a8cce95..1c8a9337e 100644
--- a/drivers/net/failsafe/failsafe_ether.c
+++ b/drivers/net/failsafe/failsafe_ether.c
@@ -400,7 +400,7 @@ failsafe_eth_dev_state_sync(struct rte_eth_dev *dev)
 }
 
 int
-failsafe_eth_rmv_event_callback(uint8_t port_id __rte_unused,
+failsafe_eth_rmv_event_callback(uint16_t port_id __rte_unused,
 				enum rte_eth_event_type event __rte_unused,
 				void *cb_arg, void *out __rte_unused)
 {
@@ -419,7 +419,7 @@ failsafe_eth_rmv_event_callback(uint8_t port_id __rte_unused,
 }
 
 int
-failsafe_eth_lsc_event_callback(uint8_t port_id __rte_unused,
+failsafe_eth_lsc_event_callback(uint16_t port_id __rte_unused,
 				enum rte_eth_event_type event __rte_unused,
 				void *cb_arg, void *out __rte_unused)
 {
diff --git a/drivers/net/failsafe/failsafe_private.h b/drivers/net/failsafe/failsafe_private.h
index 0361cf434..4ae6e6c5f 100644
--- a/drivers/net/failsafe/failsafe_private.h
+++ b/drivers/net/failsafe/failsafe_private.h
@@ -180,10 +180,10 @@ int failsafe_eal_uninit(struct rte_eth_dev *dev);
 
 int failsafe_eth_dev_state_sync(struct rte_eth_dev *dev);
 void failsafe_dev_remove(struct rte_eth_dev *dev);
-int failsafe_eth_rmv_event_callback(uint8_t port_id,
+int failsafe_eth_rmv_event_callback(uint16_t port_id,
 				    enum rte_eth_event_type type,
 				    void *arg, void *out);
-int failsafe_eth_lsc_event_callback(uint8_t port_id,
+int failsafe_eth_lsc_event_callback(uint16_t port_id,
 				    enum rte_eth_event_type event,
 				    void *cb_arg, void *out);
 
diff --git a/drivers/net/fm10k/Makefile b/drivers/net/fm10k/Makefile
index e0024f052..5034064e4 100644
--- a/drivers/net/fm10k/Makefile
+++ b/drivers/net/fm10k/Makefile
@@ -41,7 +41,7 @@ CFLAGS += $(WERROR_FLAGS)
 
 EXPORT_MAP := rte_pmd_fm10k_version.map
 
-LIBABIVER := 1
+LIBABIVER := 2
 
 ifeq ($(CONFIG_RTE_TOOLCHAIN_ICC),y)
 #
diff --git a/drivers/net/fm10k/fm10k.h b/drivers/net/fm10k/fm10k.h
index 8e1a95062..060982b10 100644
--- a/drivers/net/fm10k/fm10k.h
+++ b/drivers/net/fm10k/fm10k.h
@@ -204,7 +204,7 @@ struct fm10k_rx_queue {
 	uint16_t rxrearm_nb;     /* number of remaining to be re-armed */
 	uint16_t rxrearm_start;  /* the idx we start the re-arming from */
 	uint16_t rx_using_sse; /* indicates that vector RX is in use */
-	uint8_t port_id;
+	uint16_t port_id;
 	uint8_t drop_en;
 	uint8_t rx_deferred_start; /* don't start this queue in dev start. */
 	uint16_t rx_ftag_en; /* indicates FTAG RX supported */
@@ -241,7 +241,7 @@ struct fm10k_tx_queue {
 	volatile uint32_t *tail_ptr;
 	uint32_t txq_flags; /* Holds flags for this TXq */
 	uint16_t nb_desc;
-	uint8_t port_id;
+	uint16_t port_id;
 	uint8_t tx_deferred_start; /** don't start this queue in dev start. */
 	uint16_t queue_id;
 	uint16_t tx_ftag_en; /* indicates FTAG TX supported */
@@ -289,7 +289,7 @@ static inline uint16_t fifo_remove(struct fifo *fifo)
 }
 
 static inline void
-fm10k_pktmbuf_reset(struct rte_mbuf *mb, uint8_t in_port)
+fm10k_pktmbuf_reset(struct rte_mbuf *mb, uint16_t in_port)
 {
 	rte_mbuf_refcnt_set(mb, 1);
 	mb->next = NULL;
diff --git a/drivers/net/i40e/Makefile b/drivers/net/i40e/Makefile
index 55c79a60a..1290d7f32 100644
--- a/drivers/net/i40e/Makefile
+++ b/drivers/net/i40e/Makefile
@@ -42,7 +42,7 @@ CFLAGS += -DX722_A0_SUPPORT
 
 EXPORT_MAP := rte_pmd_i40e_version.map
 
-LIBABIVER := 1
+LIBABIVER := 2
 
 #
 # Add extra flags for base driver files (also known as shared code)
diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c
index f12aefa5d..c4c6aec1d 100644
--- a/drivers/net/i40e/i40e_ethdev.c
+++ b/drivers/net/i40e/i40e_ethdev.c
@@ -1920,8 +1920,9 @@ i40e_dev_start(struct rte_eth_dev *dev)
 	hw->adapter_stopped = 0;
 
 	if (dev->data->dev_conf.link_speeds & ETH_LINK_SPEED_FIXED) {
-		PMD_INIT_LOG(ERR, "Invalid link_speeds for port %hhu; autonegotiation disabled",
-			     dev->data->port_id);
+		PMD_INIT_LOG(ERR,
+		"Invalid link_speeds for port %u, autonegotiation disabled",
+			      dev->data->port_id);
 		return -EINVAL;
 	}
 
diff --git a/drivers/net/i40e/i40e_rxtx.h b/drivers/net/i40e/i40e_rxtx.h
index 20084d649..ff2ab8575 100644
--- a/drivers/net/i40e/i40e_rxtx.h
+++ b/drivers/net/i40e/i40e_rxtx.h
@@ -121,7 +121,7 @@ struct i40e_rx_queue {
 	uint16_t rxrearm_start;	/**< the idx we start the re-arming from */
 	uint64_t mbuf_initializer; /**< value to init mbufs */
 
-	uint8_t port_id; /**< device port ID */
+	uint16_t port_id; /**< device port ID */
 	uint8_t crc_len; /**< 0 if CRC stripped, 4 otherwise */
 	uint16_t queue_id; /**< RX queue index */
 	uint16_t reg_idx; /**< RX queue register index */
@@ -167,7 +167,7 @@ struct i40e_tx_queue {
 	uint8_t pthresh; /**< Prefetch threshold register. */
 	uint8_t hthresh; /**< Host threshold register. */
 	uint8_t wthresh; /**< Write-back threshold reg. */
-	uint8_t port_id; /**< Device port identifier. */
+	uint16_t port_id; /**< Device port identifier. */
 	uint16_t queue_id; /**< TX queue index. */
 	uint16_t reg_idx;
 	uint32_t txq_flags;
diff --git a/drivers/net/i40e/rte_pmd_i40e.c b/drivers/net/i40e/rte_pmd_i40e.c
index f12b7f4a1..3728d39b9 100644
--- a/drivers/net/i40e/rte_pmd_i40e.c
+++ b/drivers/net/i40e/rte_pmd_i40e.c
@@ -41,7 +41,7 @@
 #include "rte_pmd_i40e.h"
 
 int
-rte_pmd_i40e_ping_vfs(uint8_t port, uint16_t vf)
+rte_pmd_i40e_ping_vfs(uint16_t port, uint16_t vf)
 {
 	struct rte_eth_dev *dev;
 	struct i40e_pf *pf;
@@ -66,7 +66,7 @@ rte_pmd_i40e_ping_vfs(uint8_t port, uint16_t vf)
 }
 
 int
-rte_pmd_i40e_set_vf_mac_anti_spoof(uint8_t port, uint16_t vf_id, uint8_t on)
+rte_pmd_i40e_set_vf_mac_anti_spoof(uint16_t port, uint16_t vf_id, uint8_t on)
 {
 	struct rte_eth_dev *dev;
 	struct i40e_pf *pf;
@@ -170,7 +170,7 @@ i40e_add_rm_all_vlan_filter(struct i40e_vsi *vsi, uint8_t add)
 }
 
 int
-rte_pmd_i40e_set_vf_vlan_anti_spoof(uint8_t port, uint16_t vf_id, uint8_t on)
+rte_pmd_i40e_set_vf_vlan_anti_spoof(uint16_t port, uint16_t vf_id, uint8_t on)
 {
 	struct rte_eth_dev *dev;
 	struct i40e_pf *pf;
@@ -430,7 +430,7 @@ i40e_vsi_set_tx_loopback(struct i40e_vsi *vsi, uint8_t on)
 }
 
 int
-rte_pmd_i40e_set_tx_loopback(uint8_t port, uint8_t on)
+rte_pmd_i40e_set_tx_loopback(uint16_t port, uint8_t on)
 {
 	struct rte_eth_dev *dev;
 	struct i40e_pf *pf;
@@ -473,7 +473,7 @@ rte_pmd_i40e_set_tx_loopback(uint8_t port, uint8_t on)
 }
 
 int
-rte_pmd_i40e_set_vf_unicast_promisc(uint8_t port, uint16_t vf_id, uint8_t on)
+rte_pmd_i40e_set_vf_unicast_promisc(uint16_t port, uint16_t vf_id, uint8_t on)
 {
 	struct rte_eth_dev *dev;
 	struct i40e_pf *pf;
@@ -514,7 +514,7 @@ rte_pmd_i40e_set_vf_unicast_promisc(uint8_t port, uint16_t vf_id, uint8_t on)
 }
 
 int
-rte_pmd_i40e_set_vf_multicast_promisc(uint8_t port, uint16_t vf_id, uint8_t on)
+rte_pmd_i40e_set_vf_multicast_promisc(uint16_t port, uint16_t vf_id, uint8_t on)
 {
 	struct rte_eth_dev *dev;
 	struct i40e_pf *pf;
@@ -555,7 +555,7 @@ rte_pmd_i40e_set_vf_multicast_promisc(uint8_t port, uint16_t vf_id, uint8_t on)
 }
 
 int
-rte_pmd_i40e_set_vf_mac_addr(uint8_t port, uint16_t vf_id,
+rte_pmd_i40e_set_vf_mac_addr(uint16_t port, uint16_t vf_id,
 			     struct ether_addr *mac_addr)
 {
 	struct i40e_mac_filter *f;
@@ -598,7 +598,7 @@ rte_pmd_i40e_set_vf_mac_addr(uint8_t port, uint16_t vf_id,
 
 /* Set vlan strip on/off for specific VF from host */
 int
-rte_pmd_i40e_set_vf_vlan_stripq(uint8_t port, uint16_t vf_id, uint8_t on)
+rte_pmd_i40e_set_vf_vlan_stripq(uint16_t port, uint16_t vf_id, uint8_t on)
 {
 	struct rte_eth_dev *dev;
 	struct i40e_pf *pf;
@@ -633,7 +633,7 @@ rte_pmd_i40e_set_vf_vlan_stripq(uint8_t port, uint16_t vf_id, uint8_t on)
 	return ret;
 }
 
-int rte_pmd_i40e_set_vf_vlan_insert(uint8_t port, uint16_t vf_id,
+int rte_pmd_i40e_set_vf_vlan_insert(uint16_t port, uint16_t vf_id,
 				    uint16_t vlan_id)
 {
 	struct rte_eth_dev *dev;
@@ -698,7 +698,7 @@ int rte_pmd_i40e_set_vf_vlan_insert(uint8_t port, uint16_t vf_id,
 	return ret;
 }
 
-int rte_pmd_i40e_set_vf_broadcast(uint8_t port, uint16_t vf_id,
+int rte_pmd_i40e_set_vf_broadcast(uint16_t port, uint16_t vf_id,
 				  uint8_t on)
 {
 	struct rte_eth_dev *dev;
@@ -764,7 +764,7 @@ int rte_pmd_i40e_set_vf_broadcast(uint8_t port, uint16_t vf_id,
 	return ret;
 }
 
-int rte_pmd_i40e_set_vf_vlan_tag(uint8_t port, uint16_t vf_id, uint8_t on)
+int rte_pmd_i40e_set_vf_vlan_tag(uint16_t port, uint16_t vf_id, uint8_t on)
 {
 	struct rte_eth_dev *dev;
 	struct i40e_pf *pf;
@@ -858,7 +858,7 @@ i40e_vlan_filter_count(struct i40e_vsi *vsi)
 	return count;
 }
 
-int rte_pmd_i40e_set_vf_vlan_filter(uint8_t port, uint16_t vlan_id,
+int rte_pmd_i40e_set_vf_vlan_filter(uint16_t port, uint16_t vlan_id,
 				    uint64_t vf_mask, uint8_t on)
 {
 	struct rte_eth_dev *dev;
@@ -941,7 +941,7 @@ int rte_pmd_i40e_set_vf_vlan_filter(uint8_t port, uint16_t vlan_id,
 }
 
 int
-rte_pmd_i40e_get_vf_stats(uint8_t port,
+rte_pmd_i40e_get_vf_stats(uint16_t port,
 			  uint16_t vf_id,
 			  struct rte_eth_stats *stats)
 {
@@ -986,7 +986,7 @@ rte_pmd_i40e_get_vf_stats(uint8_t port,
 }
 
 int
-rte_pmd_i40e_reset_vf_stats(uint8_t port,
+rte_pmd_i40e_reset_vf_stats(uint16_t port,
 			    uint16_t vf_id)
 {
 	struct rte_eth_dev *dev;
@@ -1020,7 +1020,7 @@ rte_pmd_i40e_reset_vf_stats(uint8_t port,
 }
 
 int
-rte_pmd_i40e_set_vf_max_bw(uint8_t port, uint16_t vf_id, uint32_t bw)
+rte_pmd_i40e_set_vf_max_bw(uint16_t port, uint16_t vf_id, uint32_t bw)
 {
 	struct rte_eth_dev *dev;
 	struct i40e_pf *pf;
@@ -1109,7 +1109,7 @@ rte_pmd_i40e_set_vf_max_bw(uint8_t port, uint16_t vf_id, uint32_t bw)
 }
 
 int
-rte_pmd_i40e_set_vf_tc_bw_alloc(uint8_t port, uint16_t vf_id,
+rte_pmd_i40e_set_vf_tc_bw_alloc(uint16_t port, uint16_t vf_id,
 				uint8_t tc_num, uint8_t *bw_weight)
 {
 	struct rte_eth_dev *dev;
@@ -1223,7 +1223,7 @@ rte_pmd_i40e_set_vf_tc_bw_alloc(uint8_t port, uint16_t vf_id,
 }
 
 int
-rte_pmd_i40e_set_vf_tc_max_bw(uint8_t port, uint16_t vf_id,
+rte_pmd_i40e_set_vf_tc_max_bw(uint16_t port, uint16_t vf_id,
 			      uint8_t tc_no, uint32_t bw)
 {
 	struct rte_eth_dev *dev;
@@ -1341,7 +1341,7 @@ rte_pmd_i40e_set_vf_tc_max_bw(uint8_t port, uint16_t vf_id,
 }
 
 int
-rte_pmd_i40e_set_tc_strict_prio(uint8_t port, uint8_t tc_map)
+rte_pmd_i40e_set_tc_strict_prio(uint16_t port, uint8_t tc_map)
 {
 	struct rte_eth_dev *dev;
 	struct i40e_pf *pf;
@@ -1513,7 +1513,7 @@ i40e_add_rm_profile_info(struct i40e_hw *hw, uint8_t *profile_info_sec)
 
 /* Check if the profile info exists */
 static int
-i40e_check_profile_info(uint8_t port, uint8_t *profile_info_sec)
+i40e_check_profile_info(uint16_t port, uint8_t *profile_info_sec)
 {
 	struct rte_eth_dev *dev = &rte_eth_devices[port];
 	struct i40e_hw *hw = I40E_DEV_PRIVATE_TO_HW(dev->data->dev_private);
@@ -1557,7 +1557,7 @@ i40e_check_profile_info(uint8_t port, uint8_t *profile_info_sec)
 }
 
 int
-rte_pmd_i40e_process_ddp_package(uint8_t port, uint8_t *buff,
+rte_pmd_i40e_process_ddp_package(uint16_t port, uint8_t *buff,
 				 uint32_t size,
 				 enum rte_pmd_i40e_package_op op)
 {
@@ -1863,7 +1863,7 @@ int rte_pmd_i40e_get_ddp_info(uint8_t *pkg_buff, uint32_t pkg_size,
 }
 
 int
-rte_pmd_i40e_get_ddp_list(uint8_t port, uint8_t *buff, uint32_t size)
+rte_pmd_i40e_get_ddp_list(uint16_t port, uint8_t *buff, uint32_t size)
 {
 	struct rte_eth_dev *dev;
 	struct i40e_hw *hw;
@@ -1991,7 +1991,7 @@ static int check_invalid_ptype_mapping(
 
 int
 rte_pmd_i40e_ptype_mapping_update(
-			uint8_t port,
+			uint16_t port,
 			struct rte_pmd_i40e_ptype_mapping *mapping_items,
 			uint16_t count,
 			uint8_t exclusive)
@@ -2027,7 +2027,7 @@ rte_pmd_i40e_ptype_mapping_update(
 	return 0;
 }
 
-int rte_pmd_i40e_ptype_mapping_reset(uint8_t port)
+int rte_pmd_i40e_ptype_mapping_reset(uint16_t port)
 {
 	struct rte_eth_dev *dev;
 
@@ -2044,7 +2044,7 @@ int rte_pmd_i40e_ptype_mapping_reset(uint8_t port)
 }
 
 int rte_pmd_i40e_ptype_mapping_get(
-			uint8_t port,
+			uint16_t port,
 			struct rte_pmd_i40e_ptype_mapping *mapping_items,
 			uint16_t size,
 			uint16_t *count,
@@ -2078,7 +2078,7 @@ int rte_pmd_i40e_ptype_mapping_get(
 	return 0;
 }
 
-int rte_pmd_i40e_ptype_mapping_replace(uint8_t port,
+int rte_pmd_i40e_ptype_mapping_replace(uint16_t port,
 				       uint32_t target,
 				       uint8_t mask,
 				       uint32_t pkt_type)
diff --git a/drivers/net/i40e/rte_pmd_i40e.h b/drivers/net/i40e/rte_pmd_i40e.h
index 356fa89d7..7f32a59b1 100644
--- a/drivers/net/i40e/rte_pmd_i40e.h
+++ b/drivers/net/i40e/rte_pmd_i40e.h
@@ -157,7 +157,7 @@ struct rte_pmd_i40e_ptype_mapping {
  *   - (-ENODEV) if *port* invalid.
  *   - (-EINVAL) if *vf* invalid.
  */
-int rte_pmd_i40e_ping_vfs(uint8_t port, uint16_t vf);
+int rte_pmd_i40e_ping_vfs(uint16_t port, uint16_t vf);
 
 /**
  * Enable/Disable VF MAC anti spoofing.
@@ -174,7 +174,7 @@ int rte_pmd_i40e_ping_vfs(uint8_t port, uint16_t vf);
  *   - (-ENODEV) if *port* invalid.
  *   - (-EINVAL) if bad parameter.
  */
-int rte_pmd_i40e_set_vf_mac_anti_spoof(uint8_t port,
+int rte_pmd_i40e_set_vf_mac_anti_spoof(uint16_t port,
 				       uint16_t vf_id,
 				       uint8_t on);
 
@@ -193,7 +193,7 @@ int rte_pmd_i40e_set_vf_mac_anti_spoof(uint8_t port,
  *   - (-ENODEV) if *port* invalid.
  *   - (-EINVAL) if bad parameter.
  */
-int rte_pmd_i40e_set_vf_vlan_anti_spoof(uint8_t port,
+int rte_pmd_i40e_set_vf_vlan_anti_spoof(uint16_t port,
 					uint16_t vf_id,
 					uint8_t on);
 
@@ -210,7 +210,7 @@ int rte_pmd_i40e_set_vf_vlan_anti_spoof(uint8_t port,
  *   - (-ENODEV) if *port* invalid.
  *   - (-EINVAL) if bad parameter.
  */
-int rte_pmd_i40e_set_tx_loopback(uint8_t port,
+int rte_pmd_i40e_set_tx_loopback(uint16_t port,
 				 uint8_t on);
 
 /**
@@ -228,7 +228,7 @@ int rte_pmd_i40e_set_tx_loopback(uint8_t port,
  *   - (-ENODEV) if *port* invalid.
  *   - (-EINVAL) if bad parameter.
  */
-int rte_pmd_i40e_set_vf_unicast_promisc(uint8_t port,
+int rte_pmd_i40e_set_vf_unicast_promisc(uint16_t port,
 					uint16_t vf_id,
 					uint8_t on);
 
@@ -247,7 +247,7 @@ int rte_pmd_i40e_set_vf_unicast_promisc(uint8_t port,
  *   - (-ENODEV) if *port* invalid.
  *   - (-EINVAL) if bad parameter.
  */
-int rte_pmd_i40e_set_vf_multicast_promisc(uint8_t port,
+int rte_pmd_i40e_set_vf_multicast_promisc(uint16_t port,
 					  uint16_t vf_id,
 					  uint8_t on);
 
@@ -271,7 +271,7 @@ int rte_pmd_i40e_set_vf_multicast_promisc(uint8_t port,
  *   - (-ENODEV) if *port* invalid.
  *   - (-EINVAL) if *vf* or *mac_addr* is invalid.
  */
-int rte_pmd_i40e_set_vf_mac_addr(uint8_t port, uint16_t vf_id,
+int rte_pmd_i40e_set_vf_mac_addr(uint16_t port, uint16_t vf_id,
 				 struct ether_addr *mac_addr);
 
 /**
@@ -291,7 +291,7 @@ int rte_pmd_i40e_set_vf_mac_addr(uint8_t port, uint16_t vf_id,
  *   - (-EINVAL) if bad parameter.
  */
 int
-rte_pmd_i40e_set_vf_vlan_stripq(uint8_t port, uint16_t vf, uint8_t on);
+rte_pmd_i40e_set_vf_vlan_stripq(uint16_t port, uint16_t vf, uint8_t on);
 
 /**
  * Enable/Disable vf vlan insert
@@ -309,7 +309,7 @@ rte_pmd_i40e_set_vf_vlan_stripq(uint8_t port, uint16_t vf, uint8_t on);
  *   - (-ENODEV) if *port* invalid.
  *   - (-EINVAL) if bad parameter.
  */
-int rte_pmd_i40e_set_vf_vlan_insert(uint8_t port, uint16_t vf_id,
+int rte_pmd_i40e_set_vf_vlan_insert(uint16_t port, uint16_t vf_id,
 				    uint16_t vlan_id);
 
 /**
@@ -328,7 +328,7 @@ int rte_pmd_i40e_set_vf_vlan_insert(uint8_t port, uint16_t vf_id,
  *   - (-ENODEV) if *port* invalid.
  *   - (-EINVAL) if bad parameter.
  */
-int rte_pmd_i40e_set_vf_broadcast(uint8_t port, uint16_t vf_id,
+int rte_pmd_i40e_set_vf_broadcast(uint16_t port, uint16_t vf_id,
 				  uint8_t on);
 
 /**
@@ -347,7 +347,7 @@ int rte_pmd_i40e_set_vf_broadcast(uint8_t port, uint16_t vf_id,
  *   - (-ENODEV) if *port* invalid.
  *   - (-EINVAL) if bad parameter.
  */
-int rte_pmd_i40e_set_vf_vlan_tag(uint8_t port, uint16_t vf_id, uint8_t on);
+int rte_pmd_i40e_set_vf_vlan_tag(uint16_t port, uint16_t vf_id, uint8_t on);
 
 /**
  * Enable/Disable VF VLAN filter
@@ -368,7 +368,7 @@ int rte_pmd_i40e_set_vf_vlan_tag(uint8_t port, uint16_t vf_id, uint8_t on);
  *   - (-EINVAL) if bad parameter.
  *   - (-ENOTSUP) not supported by firmware.
  */
-int rte_pmd_i40e_set_vf_vlan_filter(uint8_t port, uint16_t vlan_id,
+int rte_pmd_i40e_set_vf_vlan_filter(uint16_t port, uint16_t vlan_id,
 				    uint64_t vf_mask, uint8_t on);
 
 /**
@@ -393,7 +393,7 @@ int rte_pmd_i40e_set_vf_vlan_filter(uint8_t port, uint16_t vlan_id,
  *   - (-EINVAL) if bad parameter.
  */
 
-int rte_pmd_i40e_get_vf_stats(uint8_t port,
+int rte_pmd_i40e_get_vf_stats(uint16_t port,
 			      uint16_t vf_id,
 			      struct rte_eth_stats *stats);
 
@@ -409,7 +409,7 @@ int rte_pmd_i40e_get_vf_stats(uint8_t port,
  *   - (-ENODEV) if *port* invalid.
  *   - (-EINVAL) if bad parameter.
  */
-int rte_pmd_i40e_reset_vf_stats(uint8_t port,
+int rte_pmd_i40e_reset_vf_stats(uint16_t port,
 				uint16_t vf_id);
 
 /**
@@ -434,7 +434,7 @@ int rte_pmd_i40e_reset_vf_stats(uint8_t port,
  *   - (-EINVAL) if bad parameter.
  *   - (-ENOTSUP) not supported by firmware.
  */
-int rte_pmd_i40e_set_vf_max_bw(uint8_t port,
+int rte_pmd_i40e_set_vf_max_bw(uint16_t port,
 			       uint16_t vf_id,
 			       uint32_t bw);
 
@@ -459,7 +459,7 @@ int rte_pmd_i40e_set_vf_max_bw(uint8_t port,
  *   - (-EINVAL) if bad parameter.
  *   - (-ENOTSUP) not supported by firmware.
  */
-int rte_pmd_i40e_set_vf_tc_bw_alloc(uint8_t port,
+int rte_pmd_i40e_set_vf_tc_bw_alloc(uint16_t port,
 				    uint16_t vf_id,
 				    uint8_t tc_num,
 				    uint8_t *bw_weight);
@@ -484,7 +484,7 @@ int rte_pmd_i40e_set_vf_tc_bw_alloc(uint8_t port,
  *   - (-EINVAL) if bad parameter.
  *   - (-ENOTSUP) not supported by firmware.
  */
-int rte_pmd_i40e_set_vf_tc_max_bw(uint8_t port,
+int rte_pmd_i40e_set_vf_tc_max_bw(uint16_t port,
 				  uint16_t vf_id,
 				  uint8_t tc_no,
 				  uint32_t bw);
@@ -502,7 +502,7 @@ int rte_pmd_i40e_set_vf_tc_max_bw(uint8_t port,
  *   - (-EINVAL) if bad parameter.
  *   - (-ENOTSUP) not supported by firmware.
  */
-int rte_pmd_i40e_set_tc_strict_prio(uint8_t port, uint8_t tc_map);
+int rte_pmd_i40e_set_tc_strict_prio(uint16_t port, uint8_t tc_map);
 
 /**
  * Load/Unload a ddp package
@@ -523,7 +523,7 @@ int rte_pmd_i40e_set_tc_strict_prio(uint8_t port, uint8_t tc_map);
  *   - (-EACCES) if profile does not exist.
  *   - (-ENOTSUP) if operation not supported.
  */
-int rte_pmd_i40e_process_ddp_package(uint8_t port, uint8_t *buff,
+int rte_pmd_i40e_process_ddp_package(uint16_t port, uint8_t *buff,
 				     uint32_t size,
 				     enum rte_pmd_i40e_package_op op);
 
@@ -561,7 +561,7 @@ int rte_pmd_i40e_get_ddp_info(uint8_t *pkg, uint32_t pkg_size,
  *   - (-ENODEV) if *port* invalid.
  *   - (-EINVAL) if bad parameter.
  */
-int rte_pmd_i40e_get_ddp_list(uint8_t port, uint8_t *buff, uint32_t size);
+int rte_pmd_i40e_get_ddp_list(uint16_t port, uint8_t *buff, uint32_t size);
 
 /**
  * Update hardware defined ptype to software defined packet type
@@ -581,7 +581,7 @@ int rte_pmd_i40e_get_ddp_list(uint8_t port, uint8_t *buff, uint32_t size);
  *	set other PTYPEs maps to PTYPE_UNKNOWN.
  */
 int rte_pmd_i40e_ptype_mapping_update(
-			uint8_t port,
+			uint16_t port,
 			struct rte_pmd_i40e_ptype_mapping *mapping_items,
 			uint16_t count,
 			uint8_t exclusive);
@@ -593,7 +593,7 @@ int rte_pmd_i40e_ptype_mapping_update(
  * @param port
  *    pointer to port identifier of the device
  */
-int rte_pmd_i40e_ptype_mapping_reset(uint8_t port);
+int rte_pmd_i40e_ptype_mapping_reset(uint16_t port);
 
 /**
  * Get hardware defined ptype to software defined ptype
@@ -612,7 +612,7 @@ int rte_pmd_i40e_ptype_mapping_reset(uint8_t port);
  *    -(!0) only return mapping items which packet_type != RTE_PTYPE_UNKNOWN.
  */
 int rte_pmd_i40e_ptype_mapping_get(
-			uint8_t port,
+			uint16_t port,
 			struct rte_pmd_i40e_ptype_mapping *mapping_items,
 			uint16_t size,
 			uint16_t *count,
@@ -632,7 +632,7 @@ int rte_pmd_i40e_ptype_mapping_get(
  * @param pkt_type
  *    the new packet type to overwrite
  */
-int rte_pmd_i40e_ptype_mapping_replace(uint8_t port,
+int rte_pmd_i40e_ptype_mapping_replace(uint16_t port,
 				       uint32_t target,
 				       uint8_t mask,
 				       uint32_t pkt_type);
diff --git a/drivers/net/ixgbe/Makefile b/drivers/net/ixgbe/Makefile
index 5e57cb353..18ad4feca 100644
--- a/drivers/net/ixgbe/Makefile
+++ b/drivers/net/ixgbe/Makefile
@@ -41,7 +41,7 @@ CFLAGS += $(WERROR_FLAGS)
 
 EXPORT_MAP := rte_pmd_ixgbe_version.map
 
-LIBABIVER := 1
+LIBABIVER := 2
 
 ifeq ($(CONFIG_RTE_TOOLCHAIN_ICC),y)
 #
diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c
index 9ca5cbcd3..d873c409f 100644
--- a/drivers/net/ixgbe/ixgbe_ethdev.c
+++ b/drivers/net/ixgbe/ixgbe_ethdev.c
@@ -2508,8 +2508,9 @@ ixgbe_dev_start(struct rte_eth_dev *dev)
 	*    - fixed speed: TODO implement
 	*/
 	if (dev->data->dev_conf.link_speeds & ETH_LINK_SPEED_FIXED) {
-		PMD_INIT_LOG(ERR, "Invalid link_speeds for port %hhu; fix speed not supported",
-			     dev->data->port_id);
+		PMD_INIT_LOG(ERR,
+		"Invalid link_speeds for port %u, fix speed not supported",
+				dev->data->port_id);
 		return -EINVAL;
 	}
 
diff --git a/drivers/net/ixgbe/ixgbe_rxtx.h b/drivers/net/ixgbe/ixgbe_rxtx.h
index 85feb0bdc..81c527fad 100644
--- a/drivers/net/ixgbe/ixgbe_rxtx.h
+++ b/drivers/net/ixgbe/ixgbe_rxtx.h
@@ -148,7 +148,7 @@ struct ixgbe_rx_queue {
 	uint16_t            queue_id; /**< RX queue index. */
 	uint16_t            reg_idx;  /**< RX queue register index. */
 	uint16_t            pkt_type_mask;  /**< Packet type mask for different NICs. */
-	uint8_t             port_id;  /**< Device port identifier. */
+	uint16_t            port_id;  /**< Device port identifier. */
 	uint8_t             crc_len;  /**< 0 if CRC stripped, 4 otherwise. */
 	uint8_t             drop_en;  /**< If not 0, set SRRCTL.Drop_En. */
 	uint8_t             rx_deferred_start; /**< not in global dev start. */
@@ -237,7 +237,7 @@ struct ixgbe_tx_queue {
 	uint16_t tx_next_rs; /**< next desc to set RS bit */
 	uint16_t            queue_id;      /**< TX queue index. */
 	uint16_t            reg_idx;       /**< TX queue register index. */
-	uint8_t             port_id;       /**< Device port identifier. */
+	uint16_t            port_id;       /**< Device port identifier. */
 	uint8_t             pthresh;       /**< Prefetch threshold register. */
 	uint8_t             hthresh;       /**< Host threshold register. */
 	uint8_t             wthresh;       /**< Write-back threshold reg. */
diff --git a/drivers/net/ixgbe/rte_pmd_ixgbe.c b/drivers/net/ixgbe/rte_pmd_ixgbe.c
index 79897ff64..f12737857 100644
--- a/drivers/net/ixgbe/rte_pmd_ixgbe.c
+++ b/drivers/net/ixgbe/rte_pmd_ixgbe.c
@@ -38,7 +38,7 @@
 #include "rte_pmd_ixgbe.h"
 
 int
-rte_pmd_ixgbe_set_vf_mac_addr(uint8_t port, uint16_t vf,
+rte_pmd_ixgbe_set_vf_mac_addr(uint16_t port, uint16_t vf,
 			      struct ether_addr *mac_addr)
 {
 	struct ixgbe_hw *hw;
@@ -73,7 +73,7 @@ rte_pmd_ixgbe_set_vf_mac_addr(uint8_t port, uint16_t vf,
 }
 
 int
-rte_pmd_ixgbe_ping_vf(uint8_t port, uint16_t vf)
+rte_pmd_ixgbe_ping_vf(uint16_t port, uint16_t vf)
 {
 	struct ixgbe_hw *hw;
 	struct ixgbe_vf_info *vfinfo;
@@ -105,7 +105,7 @@ rte_pmd_ixgbe_ping_vf(uint8_t port, uint16_t vf)
 }
 
 int
-rte_pmd_ixgbe_set_vf_vlan_anti_spoof(uint8_t port, uint16_t vf, uint8_t on)
+rte_pmd_ixgbe_set_vf_vlan_anti_spoof(uint16_t port, uint16_t vf, uint8_t on)
 {
 	struct ixgbe_hw *hw;
 	struct ixgbe_mac_info *mac;
@@ -135,7 +135,7 @@ rte_pmd_ixgbe_set_vf_vlan_anti_spoof(uint8_t port, uint16_t vf, uint8_t on)
 }
 
 int
-rte_pmd_ixgbe_set_vf_mac_anti_spoof(uint8_t port, uint16_t vf, uint8_t on)
+rte_pmd_ixgbe_set_vf_mac_anti_spoof(uint16_t port, uint16_t vf, uint8_t on)
 {
 	struct ixgbe_hw *hw;
 	struct ixgbe_mac_info *mac;
@@ -164,7 +164,7 @@ rte_pmd_ixgbe_set_vf_mac_anti_spoof(uint8_t port, uint16_t vf, uint8_t on)
 }
 
 int
-rte_pmd_ixgbe_set_vf_vlan_insert(uint8_t port, uint16_t vf, uint16_t vlan_id)
+rte_pmd_ixgbe_set_vf_vlan_insert(uint16_t port, uint16_t vf, uint16_t vlan_id)
 {
 	struct ixgbe_hw *hw;
 	uint32_t ctrl;
@@ -200,7 +200,7 @@ rte_pmd_ixgbe_set_vf_vlan_insert(uint8_t port, uint16_t vf, uint16_t vlan_id)
 }
 
 int
-rte_pmd_ixgbe_set_tx_loopback(uint8_t port, uint8_t on)
+rte_pmd_ixgbe_set_tx_loopback(uint16_t port, uint8_t on)
 {
 	struct ixgbe_hw *hw;
 	uint32_t ctrl;
@@ -230,7 +230,7 @@ rte_pmd_ixgbe_set_tx_loopback(uint8_t port, uint8_t on)
 }
 
 int
-rte_pmd_ixgbe_set_all_queues_drop_en(uint8_t port, uint8_t on)
+rte_pmd_ixgbe_set_all_queues_drop_en(uint16_t port, uint8_t on)
 {
 	struct ixgbe_hw *hw;
 	uint32_t reg_value;
@@ -260,7 +260,7 @@ rte_pmd_ixgbe_set_all_queues_drop_en(uint8_t port, uint8_t on)
 }
 
 int
-rte_pmd_ixgbe_set_vf_split_drop_en(uint8_t port, uint16_t vf, uint8_t on)
+rte_pmd_ixgbe_set_vf_split_drop_en(uint16_t port, uint16_t vf, uint8_t on)
 {
 	struct ixgbe_hw *hw;
 	uint32_t reg_value;
@@ -295,7 +295,7 @@ rte_pmd_ixgbe_set_vf_split_drop_en(uint8_t port, uint16_t vf, uint8_t on)
 }
 
 int
-rte_pmd_ixgbe_set_vf_vlan_stripq(uint8_t port, uint16_t vf, uint8_t on)
+rte_pmd_ixgbe_set_vf_vlan_stripq(uint16_t port, uint16_t vf, uint8_t on)
 {
 	struct rte_eth_dev *dev;
 	struct rte_pci_device *pci_dev;
@@ -342,7 +342,7 @@ rte_pmd_ixgbe_set_vf_vlan_stripq(uint8_t port, uint16_t vf, uint8_t on)
 }
 
 int
-rte_pmd_ixgbe_set_vf_rxmode(uint8_t port, uint16_t vf,
+rte_pmd_ixgbe_set_vf_rxmode(uint16_t port, uint16_t vf,
 			    uint16_t rx_mask, uint8_t on)
 {
 	int val = 0;
@@ -389,7 +389,7 @@ rte_pmd_ixgbe_set_vf_rxmode(uint8_t port, uint16_t vf,
 }
 
 int
-rte_pmd_ixgbe_set_vf_rx(uint8_t port, uint16_t vf, uint8_t on)
+rte_pmd_ixgbe_set_vf_rx(uint16_t port, uint16_t vf, uint8_t on)
 {
 	struct rte_eth_dev *dev;
 	struct rte_pci_device *pci_dev;
@@ -439,7 +439,7 @@ rte_pmd_ixgbe_set_vf_rx(uint8_t port, uint16_t vf, uint8_t on)
 }
 
 int
-rte_pmd_ixgbe_set_vf_tx(uint8_t port, uint16_t vf, uint8_t on)
+rte_pmd_ixgbe_set_vf_tx(uint16_t port, uint16_t vf, uint8_t on)
 {
 	struct rte_eth_dev *dev;
 	struct rte_pci_device *pci_dev;
@@ -489,7 +489,7 @@ rte_pmd_ixgbe_set_vf_tx(uint8_t port, uint16_t vf, uint8_t on)
 }
 
 int
-rte_pmd_ixgbe_set_vf_vlan_filter(uint8_t port, uint16_t vlan,
+rte_pmd_ixgbe_set_vf_vlan_filter(uint16_t port, uint16_t vlan,
 				 uint64_t vf_mask, uint8_t vlan_on)
 {
 	struct rte_eth_dev *dev;
@@ -524,7 +524,7 @@ rte_pmd_ixgbe_set_vf_vlan_filter(uint8_t port, uint16_t vlan,
 }
 
 int
-rte_pmd_ixgbe_set_vf_rate_limit(uint8_t port, uint16_t vf,
+rte_pmd_ixgbe_set_vf_rate_limit(uint16_t port, uint16_t vf,
 				uint16_t tx_rate, uint64_t q_msk)
 {
 	struct rte_eth_dev *dev;
@@ -540,7 +540,7 @@ rte_pmd_ixgbe_set_vf_rate_limit(uint8_t port, uint16_t vf,
 }
 
 int
-rte_pmd_ixgbe_macsec_enable(uint8_t port, uint8_t en, uint8_t rp)
+rte_pmd_ixgbe_macsec_enable(uint16_t port, uint8_t en, uint8_t rp)
 {
 	struct ixgbe_hw *hw;
 	struct rte_eth_dev *dev;
@@ -623,7 +623,7 @@ rte_pmd_ixgbe_macsec_enable(uint8_t port, uint8_t en, uint8_t rp)
 }
 
 int
-rte_pmd_ixgbe_macsec_disable(uint8_t port)
+rte_pmd_ixgbe_macsec_disable(uint16_t port)
 {
 	struct ixgbe_hw *hw;
 	struct rte_eth_dev *dev;
@@ -687,7 +687,7 @@ rte_pmd_ixgbe_macsec_disable(uint8_t port)
 }
 
 int
-rte_pmd_ixgbe_macsec_config_txsc(uint8_t port, uint8_t *mac)
+rte_pmd_ixgbe_macsec_config_txsc(uint16_t port, uint8_t *mac)
 {
 	struct ixgbe_hw *hw;
 	struct rte_eth_dev *dev;
@@ -712,7 +712,7 @@ rte_pmd_ixgbe_macsec_config_txsc(uint8_t port, uint8_t *mac)
 }
 
 int
-rte_pmd_ixgbe_macsec_config_rxsc(uint8_t port, uint8_t *mac, uint16_t pi)
+rte_pmd_ixgbe_macsec_config_rxsc(uint16_t port, uint8_t *mac, uint16_t pi)
 {
 	struct ixgbe_hw *hw;
 	struct rte_eth_dev *dev;
@@ -738,7 +738,7 @@ rte_pmd_ixgbe_macsec_config_rxsc(uint8_t port, uint8_t *mac, uint16_t pi)
 }
 
 int
-rte_pmd_ixgbe_macsec_select_txsa(uint8_t port, uint8_t idx, uint8_t an,
+rte_pmd_ixgbe_macsec_select_txsa(uint16_t port, uint8_t idx, uint8_t an,
 				 uint32_t pn, uint8_t *key)
 {
 	struct ixgbe_hw *hw;
@@ -794,7 +794,7 @@ rte_pmd_ixgbe_macsec_select_txsa(uint8_t port, uint8_t idx, uint8_t an,
 }
 
 int
-rte_pmd_ixgbe_macsec_select_rxsa(uint8_t port, uint8_t idx, uint8_t an,
+rte_pmd_ixgbe_macsec_select_rxsa(uint16_t port, uint8_t idx, uint8_t an,
 				 uint32_t pn, uint8_t *key)
 {
 	struct ixgbe_hw *hw;
@@ -837,7 +837,7 @@ rte_pmd_ixgbe_macsec_select_rxsa(uint8_t port, uint8_t idx, uint8_t an,
 }
 
 int
-rte_pmd_ixgbe_set_tc_bw_alloc(uint8_t port,
+rte_pmd_ixgbe_set_tc_bw_alloc(uint16_t port,
 			      uint8_t tc_num,
 			      uint8_t *bw_weight)
 {
@@ -911,7 +911,7 @@ rte_pmd_ixgbe_set_tc_bw_alloc(uint8_t port,
 
 #ifdef RTE_LIBRTE_IXGBE_BYPASS
 int
-rte_pmd_ixgbe_bypass_init(uint8_t port_id)
+rte_pmd_ixgbe_bypass_init(uint16_t port_id)
 {
 	struct rte_eth_dev *dev;
 
@@ -926,7 +926,7 @@ rte_pmd_ixgbe_bypass_init(uint8_t port_id)
 }
 
 int
-rte_pmd_ixgbe_bypass_state_show(uint8_t port_id, uint32_t *state)
+rte_pmd_ixgbe_bypass_state_show(uint16_t port_id, uint32_t *state)
 {
 	struct rte_eth_dev *dev;
 
@@ -940,7 +940,7 @@ rte_pmd_ixgbe_bypass_state_show(uint8_t port_id, uint32_t *state)
 }
 
 int
-rte_pmd_ixgbe_bypass_state_set(uint8_t port_id, uint32_t *new_state)
+rte_pmd_ixgbe_bypass_state_set(uint16_t port_id, uint32_t *new_state)
 {
 	struct rte_eth_dev *dev;
 
@@ -954,7 +954,7 @@ rte_pmd_ixgbe_bypass_state_set(uint8_t port_id, uint32_t *new_state)
 }
 
 int
-rte_pmd_ixgbe_bypass_event_show(uint8_t port_id,
+rte_pmd_ixgbe_bypass_event_show(uint16_t port_id,
 				uint32_t event,
 				uint32_t *state)
 {
@@ -970,7 +970,7 @@ rte_pmd_ixgbe_bypass_event_show(uint8_t port_id,
 }
 
 int
-rte_pmd_ixgbe_bypass_event_store(uint8_t port_id,
+rte_pmd_ixgbe_bypass_event_store(uint16_t port_id,
 				 uint32_t event,
 				 uint32_t state)
 {
@@ -986,7 +986,7 @@ rte_pmd_ixgbe_bypass_event_store(uint8_t port_id,
 }
 
 int
-rte_pmd_ixgbe_bypass_wd_timeout_store(uint8_t port_id, uint32_t timeout)
+rte_pmd_ixgbe_bypass_wd_timeout_store(uint16_t port_id, uint32_t timeout)
 {
 	struct rte_eth_dev *dev;
 
@@ -1000,7 +1000,7 @@ rte_pmd_ixgbe_bypass_wd_timeout_store(uint8_t port_id, uint32_t timeout)
 }
 
 int
-rte_pmd_ixgbe_bypass_ver_show(uint8_t port_id, uint32_t *ver)
+rte_pmd_ixgbe_bypass_ver_show(uint16_t port_id, uint32_t *ver)
 {
 	struct rte_eth_dev *dev;
 
@@ -1014,7 +1014,7 @@ rte_pmd_ixgbe_bypass_ver_show(uint8_t port_id, uint32_t *ver)
 }
 
 int
-rte_pmd_ixgbe_bypass_wd_timeout_show(uint8_t port_id, uint32_t *wd_timeout)
+rte_pmd_ixgbe_bypass_wd_timeout_show(uint16_t port_id, uint32_t *wd_timeout)
 {
 	struct rte_eth_dev *dev;
 
@@ -1028,7 +1028,7 @@ rte_pmd_ixgbe_bypass_wd_timeout_show(uint8_t port_id, uint32_t *wd_timeout)
 }
 
 int
-rte_pmd_ixgbe_bypass_wd_reset(uint8_t port_id)
+rte_pmd_ixgbe_bypass_wd_reset(uint16_t port_id)
 {
 	struct rte_eth_dev *dev;
 
diff --git a/drivers/net/ixgbe/rte_pmd_ixgbe.h b/drivers/net/ixgbe/rte_pmd_ixgbe.h
index d33c285db..81b18f876 100644
--- a/drivers/net/ixgbe/rte_pmd_ixgbe.h
+++ b/drivers/net/ixgbe/rte_pmd_ixgbe.h
@@ -53,7 +53,7 @@
  *   - (-ENODEV) if *port* invalid.
  *   - (-EINVAL) if *vf* invalid.
  */
-int rte_pmd_ixgbe_ping_vf(uint8_t port, uint16_t vf);
+int rte_pmd_ixgbe_ping_vf(uint16_t port, uint16_t vf);
 
 /**
  * Set the VF MAC address.
@@ -69,7 +69,7 @@ int rte_pmd_ixgbe_ping_vf(uint8_t port, uint16_t vf);
  *   - (-ENODEV) if *port* invalid.
  *   - (-EINVAL) if *vf* or *mac_addr* is invalid.
  */
-int rte_pmd_ixgbe_set_vf_mac_addr(uint8_t port, uint16_t vf,
+int rte_pmd_ixgbe_set_vf_mac_addr(uint16_t port, uint16_t vf,
 		struct ether_addr *mac_addr);
 
 /**
@@ -87,7 +87,8 @@ int rte_pmd_ixgbe_set_vf_mac_addr(uint8_t port, uint16_t vf,
  *   - (-ENODEV) if *port* invalid.
  *   - (-EINVAL) if bad parameter.
  */
-int rte_pmd_ixgbe_set_vf_vlan_anti_spoof(uint8_t port, uint16_t vf, uint8_t on);
+int rte_pmd_ixgbe_set_vf_vlan_anti_spoof(uint16_t port, uint16_t vf,
+					 uint8_t on);
 
 /**
  * Enable/Disable VF MAC anti spoofing.
@@ -104,7 +105,7 @@ int rte_pmd_ixgbe_set_vf_vlan_anti_spoof(uint8_t port, uint16_t vf, uint8_t on);
  *   - (-ENODEV) if *port* invalid.
  *   - (-EINVAL) if bad parameter.
  */
-int rte_pmd_ixgbe_set_vf_mac_anti_spoof(uint8_t port, uint16_t vf, uint8_t on);
+int rte_pmd_ixgbe_set_vf_mac_anti_spoof(uint16_t port, uint16_t vf, uint8_t on);
 
 /**
  * Enable/Disable vf vlan insert
@@ -122,7 +123,7 @@ int rte_pmd_ixgbe_set_vf_mac_anti_spoof(uint8_t port, uint16_t vf, uint8_t on);
  *   - (-ENODEV) if *port* invalid.
  *   - (-EINVAL) if bad parameter.
  */
-int rte_pmd_ixgbe_set_vf_vlan_insert(uint8_t port, uint16_t vf,
+int rte_pmd_ixgbe_set_vf_vlan_insert(uint16_t port, uint16_t vf,
 		uint16_t vlan_id);
 
 /**
@@ -139,7 +140,7 @@ int rte_pmd_ixgbe_set_vf_vlan_insert(uint8_t port, uint16_t vf,
  *   - (-ENODEV) if *port* invalid.
  *   - (-EINVAL) if bad parameter.
  */
-int rte_pmd_ixgbe_set_tx_loopback(uint8_t port, uint8_t on);
+int rte_pmd_ixgbe_set_tx_loopback(uint16_t port, uint8_t on);
 
 /**
  * set all queues drop enable bit
@@ -155,7 +156,7 @@ int rte_pmd_ixgbe_set_tx_loopback(uint8_t port, uint8_t on);
  *   - (-ENODEV) if *port* invalid.
  *   - (-EINVAL) if bad parameter.
  */
-int rte_pmd_ixgbe_set_all_queues_drop_en(uint8_t port, uint8_t on);
+int rte_pmd_ixgbe_set_all_queues_drop_en(uint16_t port, uint8_t on);
 
 /**
  * set drop enable bit in the VF split rx control register
@@ -174,7 +175,7 @@ int rte_pmd_ixgbe_set_all_queues_drop_en(uint8_t port, uint8_t on);
  *   - (-EINVAL) if bad parameter.
  */
 
-int rte_pmd_ixgbe_set_vf_split_drop_en(uint8_t port, uint16_t vf, uint8_t on);
+int rte_pmd_ixgbe_set_vf_split_drop_en(uint16_t port, uint16_t vf, uint8_t on);
 
 /**
  * Enable/Disable vf vlan strip for all queues in a pool
@@ -194,7 +195,7 @@ int rte_pmd_ixgbe_set_vf_split_drop_en(uint8_t port, uint16_t vf, uint8_t on);
  *   - (-EINVAL) if bad parameter.
  */
 int
-rte_pmd_ixgbe_set_vf_vlan_stripq(uint8_t port, uint16_t vf, uint8_t on);
+rte_pmd_ixgbe_set_vf_vlan_stripq(uint16_t port, uint16_t vf, uint8_t on);
 
 /**
  * Enable MACsec offload.
@@ -212,7 +213,7 @@ rte_pmd_ixgbe_set_vf_vlan_stripq(uint8_t port, uint16_t vf, uint8_t on);
  *   - (-ENODEV) if *port* invalid.
  *   - (-ENOTSUP) if hardware doesn't support this feature.
  */
-int rte_pmd_ixgbe_macsec_enable(uint8_t port, uint8_t en, uint8_t rp);
+int rte_pmd_ixgbe_macsec_enable(uint16_t port, uint8_t en, uint8_t rp);
 
 /**
  * Disable MACsec offload.
@@ -224,7 +225,7 @@ int rte_pmd_ixgbe_macsec_enable(uint8_t port, uint8_t en, uint8_t rp);
  *   - (-ENODEV) if *port* invalid.
  *   - (-ENOTSUP) if hardware doesn't support this feature.
  */
-int rte_pmd_ixgbe_macsec_disable(uint8_t port);
+int rte_pmd_ixgbe_macsec_disable(uint16_t port);
 
 /**
  * Configure Tx SC (Secure Connection).
@@ -238,7 +239,7 @@ int rte_pmd_ixgbe_macsec_disable(uint8_t port);
  *   - (-ENODEV) if *port* invalid.
  *   - (-ENOTSUP) if hardware doesn't support this feature.
  */
-int rte_pmd_ixgbe_macsec_config_txsc(uint8_t port, uint8_t *mac);
+int rte_pmd_ixgbe_macsec_config_txsc(uint16_t port, uint8_t *mac);
 
 /**
  * Configure Rx SC (Secure Connection).
@@ -254,7 +255,7 @@ int rte_pmd_ixgbe_macsec_config_txsc(uint8_t port, uint8_t *mac);
  *   - (-ENODEV) if *port* invalid.
  *   - (-ENOTSUP) if hardware doesn't support this feature.
  */
-int rte_pmd_ixgbe_macsec_config_rxsc(uint8_t port, uint8_t *mac, uint16_t pi);
+int rte_pmd_ixgbe_macsec_config_rxsc(uint16_t port, uint8_t *mac, uint16_t pi);
 
 /**
  * Enable Tx SA (Secure Association).
@@ -275,7 +276,7 @@ int rte_pmd_ixgbe_macsec_config_rxsc(uint8_t port, uint8_t *mac, uint16_t pi);
  *   - (-ENOTSUP) if hardware doesn't support this feature.
  *   - (-EINVAL) if bad parameter.
  */
-int rte_pmd_ixgbe_macsec_select_txsa(uint8_t port, uint8_t idx, uint8_t an,
+int rte_pmd_ixgbe_macsec_select_txsa(uint16_t port, uint8_t idx, uint8_t an,
 		uint32_t pn, uint8_t *key);
 
 /**
@@ -297,7 +298,7 @@ int rte_pmd_ixgbe_macsec_select_txsa(uint8_t port, uint8_t idx, uint8_t an,
  *   - (-ENOTSUP) if hardware doesn't support this feature.
  *   - (-EINVAL) if bad parameter.
  */
-int rte_pmd_ixgbe_macsec_select_rxsa(uint8_t port, uint8_t idx, uint8_t an,
+int rte_pmd_ixgbe_macsec_select_rxsa(uint16_t port, uint8_t idx, uint8_t an,
 		uint32_t pn, uint8_t *key);
 
 /**
@@ -323,7 +324,8 @@ int rte_pmd_ixgbe_macsec_select_rxsa(uint8_t port, uint8_t idx, uint8_t an,
 *   - (-EINVAL) if bad parameter.
 */
 int
-rte_pmd_ixgbe_set_vf_rxmode(uint8_t port, uint16_t vf, uint16_t rx_mask, uint8_t on);
+rte_pmd_ixgbe_set_vf_rxmode(uint16_t port, uint16_t vf, uint16_t rx_mask,
+			     uint8_t on);
 
 /**
 * Enable or disable a VF traffic receive of an Ethernet device.
@@ -342,7 +344,7 @@ rte_pmd_ixgbe_set_vf_rxmode(uint8_t port, uint16_t vf, uint16_t rx_mask, uint8_t
 *   - (-EINVAL) if bad parameter.
 */
 int
-rte_pmd_ixgbe_set_vf_rx(uint8_t port, uint16_t vf, uint8_t on);
+rte_pmd_ixgbe_set_vf_rx(uint16_t port, uint16_t vf, uint8_t on);
 
 /**
 * Enable or disable a VF traffic transmit of the Ethernet device.
@@ -361,7 +363,7 @@ rte_pmd_ixgbe_set_vf_rx(uint8_t port, uint16_t vf, uint8_t on);
 *   - (-EINVAL) if bad parameter.
 */
 int
-rte_pmd_ixgbe_set_vf_tx(uint8_t port, uint16_t vf, uint8_t on);
+rte_pmd_ixgbe_set_vf_tx(uint16_t port, uint16_t vf, uint8_t on);
 
 /**
 * Enable/Disable hardware VF VLAN filtering by an Ethernet device of
@@ -383,7 +385,8 @@ rte_pmd_ixgbe_set_vf_tx(uint8_t port, uint16_t vf, uint8_t on);
 *   - (-EINVAL) if bad parameter.
 */
 int
-rte_pmd_ixgbe_set_vf_vlan_filter(uint8_t port, uint16_t vlan, uint64_t vf_mask, uint8_t vlan_on);
+rte_pmd_ixgbe_set_vf_vlan_filter(uint16_t port, uint16_t vlan,
+				 uint64_t vf_mask, uint8_t vlan_on);
 
 /**
  * Set the rate limitation for a vf on an Ethernet device.
@@ -402,7 +405,8 @@ rte_pmd_ixgbe_set_vf_vlan_filter(uint8_t port, uint16_t vlan, uint64_t vf_mask,
  *   - (-ENODEV) if *port_id* invalid.
  *   - (-EINVAL) if bad parameter.
  */
-int rte_pmd_ixgbe_set_vf_rate_limit(uint8_t port, uint16_t vf, uint16_t tx_rate, uint64_t q_msk);
+int rte_pmd_ixgbe_set_vf_rate_limit(uint16_t port, uint16_t vf,
+				     uint16_t tx_rate, uint64_t q_msk);
 
 /**
  * Set all the TCs' bandwidth weight.
@@ -423,7 +427,7 @@ int rte_pmd_ixgbe_set_vf_rate_limit(uint8_t port, uint16_t vf, uint16_t tx_rate,
  *   - (-EINVAL) if bad parameter.
  *   - (-ENOTSUP) not supported by firmware.
  */
-int rte_pmd_ixgbe_set_tc_bw_alloc(uint8_t port,
+int rte_pmd_ixgbe_set_tc_bw_alloc(uint16_t port,
 				  uint8_t tc_num,
 				  uint8_t *bw_weight);
 
@@ -439,7 +443,7 @@ int rte_pmd_ixgbe_set_tc_bw_alloc(uint8_t port,
  *   - (-ENOTSUP) if hardware doesn't support.
  *   - (-EINVAL) if bad parameter.
  */
-int rte_pmd_ixgbe_bypass_init(uint8_t port);
+int rte_pmd_ixgbe_bypass_init(uint16_t port);
 
 /**
  * Return bypass state.
@@ -456,7 +460,7 @@ int rte_pmd_ixgbe_bypass_init(uint8_t port);
  *   - (-ENOTSUP) if hardware doesn't support.
  *   - (-EINVAL) if bad parameter.
  */
-int rte_pmd_ixgbe_bypass_state_show(uint8_t port, uint32_t *state);
+int rte_pmd_ixgbe_bypass_state_show(uint16_t port, uint32_t *state);
 
 /**
  * Set bypass state
@@ -473,7 +477,7 @@ int rte_pmd_ixgbe_bypass_state_show(uint8_t port, uint32_t *state);
  *   - (-ENOTSUP) if hardware doesn't support.
  *   - (-EINVAL) if bad parameter.
  */
-int rte_pmd_ixgbe_bypass_state_set(uint8_t port, uint32_t *new_state);
+int rte_pmd_ixgbe_bypass_state_set(uint16_t port, uint32_t *new_state);
 
 /**
  * Return bypass state when given event occurs.
@@ -497,7 +501,7 @@ int rte_pmd_ixgbe_bypass_state_set(uint8_t port, uint32_t *new_state);
  *   - (-ENOTSUP) if hardware doesn't support.
  *   - (-EINVAL) if bad parameter.
  */
-int rte_pmd_ixgbe_bypass_event_show(uint8_t port,
+int rte_pmd_ixgbe_bypass_event_show(uint16_t port,
 				    uint32_t event,
 				    uint32_t *state);
 
@@ -523,7 +527,7 @@ int rte_pmd_ixgbe_bypass_event_show(uint8_t port,
  *   - (-ENOTSUP) if hardware doesn't support.
  *   - (-EINVAL) if bad parameter.
  */
-int rte_pmd_ixgbe_bypass_event_store(uint8_t port,
+int rte_pmd_ixgbe_bypass_event_store(uint16_t port,
 				     uint32_t event,
 				     uint32_t state);
 
@@ -547,7 +551,7 @@ int rte_pmd_ixgbe_bypass_event_store(uint8_t port,
  *   - (-ENOTSUP) if hardware doesn't support.
  *   - (-EINVAL) if bad parameter.
  */
-int rte_pmd_ixgbe_bypass_wd_timeout_store(uint8_t port, uint32_t timeout);
+int rte_pmd_ixgbe_bypass_wd_timeout_store(uint16_t port, uint32_t timeout);
 
 /**
  * Get bypass firmware version.
@@ -561,7 +565,7 @@ int rte_pmd_ixgbe_bypass_wd_timeout_store(uint8_t port, uint32_t timeout);
  *   - (-ENOTSUP) if hardware doesn't support.
  *   - (-EINVAL) if bad parameter.
  */
-int rte_pmd_ixgbe_bypass_ver_show(uint8_t port, uint32_t *ver);
+int rte_pmd_ixgbe_bypass_ver_show(uint16_t port, uint32_t *ver);
 
 /**
  * Return bypass watchdog timeout in seconds
@@ -583,7 +587,7 @@ int rte_pmd_ixgbe_bypass_ver_show(uint8_t port, uint32_t *ver);
  *   - (-ENOTSUP) if hardware doesn't support.
  *   - (-EINVAL) if bad parameter.
  */
-int rte_pmd_ixgbe_bypass_wd_timeout_show(uint8_t port, uint32_t *wd_timeout);
+int rte_pmd_ixgbe_bypass_wd_timeout_show(uint16_t port, uint32_t *wd_timeout);
 
 /**
  * Reset bypass watchdog timer
@@ -595,7 +599,7 @@ int rte_pmd_ixgbe_bypass_wd_timeout_show(uint8_t port, uint32_t *wd_timeout);
  *   - (-ENOTSUP) if hardware doesn't support.
  *   - (-EINVAL) if bad parameter.
  */
-int rte_pmd_ixgbe_bypass_wd_reset(uint8_t port);
+int rte_pmd_ixgbe_bypass_wd_reset(uint16_t port);
 
 
 /**
diff --git a/drivers/net/mlx5/mlx5_rxtx.h b/drivers/net/mlx5/mlx5_rxtx.h
index 7de1d1086..238a64f43 100644
--- a/drivers/net/mlx5/mlx5_rxtx.h
+++ b/drivers/net/mlx5/mlx5_rxtx.h
@@ -112,14 +112,14 @@ struct rxq {
 	unsigned int sges_n:2; /* Log 2 of SGEs (max buffers per packet). */
 	unsigned int cqe_n:4; /* Log 2 of CQ elements. */
 	unsigned int elts_n:4; /* Log 2 of Mbufs. */
-	unsigned int port_id:8;
 	unsigned int rss_hash:1; /* RSS hash result is enabled. */
 	unsigned int mark:1; /* Marked flow available on the queue. */
 	unsigned int pending_err:1; /* CQE error needs to be handled. */
 	unsigned int trim_elts:1; /* Whether elts needs clean-up. */
-	unsigned int :6; /* Remaining bits. */
+	unsigned int :14; /* Remaining bits. */
 	volatile uint32_t *rq_db;
 	volatile uint32_t *cq_db;
+	uint16_t port_id;
 	uint16_t rq_ci;
 	uint16_t rq_pi;
 	uint16_t cq_ci;
diff --git a/drivers/net/nfp/nfp_net.c b/drivers/net/nfp/nfp_net.c
index 92b03c4cb..f1b968fc2 100644
--- a/drivers/net/nfp/nfp_net.c
+++ b/drivers/net/nfp/nfp_net.c
@@ -1240,12 +1240,12 @@ nfp_net_dev_link_status_print(struct rte_eth_dev *dev)
 	nfp_net_dev_atomic_read_link_status(dev, &link);
 	if (link.link_status)
 		RTE_LOG(INFO, PMD, "Port %d: Link Up - speed %u Mbps - %s\n",
-			(int)(dev->data->port_id), (unsigned)link.link_speed,
+			dev->data->port_id, link.link_speed,
 			link.link_duplex == ETH_LINK_FULL_DUPLEX
 			? "full-duplex" : "half-duplex");
 	else
 		RTE_LOG(INFO, PMD, " Port %d: Link Down\n",
-			(int)(dev->data->port_id));
+			dev->data->port_id);
 
 	RTE_LOG(INFO, PMD, "PCI Address: %04d:%02d:%02d:%d\n",
 		pci_dev->addr.domain, pci_dev->addr.bus,
@@ -1549,7 +1549,7 @@ nfp_net_tx_queue_setup(struct rte_eth_dev *dev, uint16_t queue_idx,
 			"tx_free_thresh must be less than the number of TX "
 			"descriptors. (tx_free_thresh=%u port=%d "
 			"queue=%d)\n", (unsigned int)tx_free_thresh,
-			(int)dev->data->port_id, (int)queue_idx);
+			dev->data->port_id, (int)queue_idx);
 		return -(EINVAL);
 	}
 
@@ -1847,9 +1847,9 @@ nfp_net_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts, uint16_t nb_pkts)
 		 */
 		new_mb = rte_pktmbuf_alloc(rxq->mem_pool);
 		if (unlikely(new_mb == NULL)) {
-			RTE_LOG_DP(DEBUG, PMD, "RX mbuf alloc failed port_id=%u "
-				"queue_id=%u\n", (unsigned)rxq->port_id,
-				(unsigned)rxq->qidx);
+			RTE_LOG_DP(DEBUG, PMD,
+			"RX mbuf alloc failed port_id=%u queue_id=%u\n",
+				rxq->port_id, (unsigned int)rxq->qidx);
 			nfp_net_mbuf_alloc_failed(rxq);
 			break;
 		}
@@ -1933,7 +1933,7 @@ nfp_net_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts, uint16_t nb_pkts)
 		return nb_hold;
 
 	PMD_RX_LOG(DEBUG, "RX  port_id=%u queue_id=%u, %d packets received\n",
-		   (unsigned)rxq->port_id, (unsigned)rxq->qidx, nb_hold);
+		   rxq->port_id, (unsigned int)rxq->qidx, nb_hold);
 
 	nb_hold += rxq->nb_rx_hold;
 
@@ -1944,7 +1944,7 @@ nfp_net_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts, uint16_t nb_pkts)
 	rte_wmb();
 	if (nb_hold > rxq->rx_free_thresh) {
 		PMD_RX_LOG(DEBUG, "port=%u queue=%u nb_hold=%u avail=%u\n",
-			   (unsigned)rxq->port_id, (unsigned)rxq->qidx,
+			   rxq->port_id, (unsigned int)rxq->qidx,
 			   (unsigned)nb_hold, (unsigned)avail);
 		nfp_qcp_ptr_add(rxq->qcp_fl, NFP_QCP_WRITE_PTR, nb_hold);
 		nb_hold = 0;
diff --git a/drivers/net/nfp/nfp_net_pmd.h b/drivers/net/nfp/nfp_net_pmd.h
index eec56bc1c..828d0d35b 100644
--- a/drivers/net/nfp/nfp_net_pmd.h
+++ b/drivers/net/nfp/nfp_net_pmd.h
@@ -250,7 +250,7 @@ struct nfp_net_txq {
 	uint32_t tx_hthresh;   /* not used by now. Future? */
 	uint32_t tx_wthresh;   /* not used by now. Future? */
 	uint32_t txq_flags;    /* not used by now. Future? */
-	uint8_t  port_id;
+	uint16_t port_id;
 	int qidx;
 	int tx_qcidx;
 	__le64 dma;
diff --git a/drivers/net/null/Makefile b/drivers/net/null/Makefile
index 77810bced..fdd7c5813 100644
--- a/drivers/net/null/Makefile
+++ b/drivers/net/null/Makefile
@@ -41,7 +41,7 @@ CFLAGS += $(WERROR_FLAGS)
 
 EXPORT_MAP := rte_pmd_null_version.map
 
-LIBABIVER := 2
+LIBABIVER := 3
 
 #
 # all source are stored in SRCS-y
diff --git a/drivers/net/null/rte_eth_null.c b/drivers/net/null/rte_eth_null.c
index 5aef0591e..fa9313dec 100644
--- a/drivers/net/null/rte_eth_null.c
+++ b/drivers/net/null/rte_eth_null.c
@@ -68,7 +68,7 @@ struct null_queue {
 struct pmd_internals {
 	unsigned packet_size;
 	unsigned packet_copy;
-	uint8_t port_id;
+	uint16_t port_id;
 
 	struct null_queue rx_null_queues[RTE_MAX_QUEUES_PER_PORT];
 	struct null_queue tx_null_queues[RTE_MAX_QUEUES_PER_PORT];
diff --git a/drivers/net/pcap/Makefile b/drivers/net/pcap/Makefile
index 7ebd0bef2..f731b126e 100644
--- a/drivers/net/pcap/Makefile
+++ b/drivers/net/pcap/Makefile
@@ -43,7 +43,7 @@ LDLIBS += -lpcap
 
 EXPORT_MAP := rte_pmd_pcap_version.map
 
-LIBABIVER := 1
+LIBABIVER := 2
 
 #
 # all source are stored in SRCS-y
diff --git a/drivers/net/pcap/rte_eth_pcap.c b/drivers/net/pcap/rte_eth_pcap.c
index defb3b419..b51f16cbd 100644
--- a/drivers/net/pcap/rte_eth_pcap.c
+++ b/drivers/net/pcap/rte_eth_pcap.c
@@ -75,7 +75,7 @@ struct queue_stat {
 
 struct pcap_rx_queue {
 	pcap_t *pcap;
-	uint8_t in_port;
+	uint16_t in_port;
 	struct rte_mempool *mb_pool;
 	struct queue_stat rx_stat;
 	char name[PATH_MAX];
diff --git a/drivers/net/qede/qede_if.h b/drivers/net/qede/qede_if.h
index 9864bb448..96f0d351d 100644
--- a/drivers/net/qede/qede_if.h
+++ b/drivers/net/qede/qede_if.h
@@ -97,7 +97,7 @@ struct qed_link_output {
 	uint32_t speed;		/* In Mb/s */
 	uint32_t adv_speed;	/* Speed mask */
 	uint8_t duplex;		/* In DUPLEX defs */
-	uint8_t port;		/* In PORT defs */
+	uint16_t port;		/* In PORT defs */
 	bool autoneg;
 	uint32_t pause_config;
 };
diff --git a/drivers/net/ring/rte_eth_ring.c b/drivers/net/ring/rte_eth_ring.c
index 464d3d384..e3fa7b0e2 100644
--- a/drivers/net/ring/rte_eth_ring.c
+++ b/drivers/net/ring/rte_eth_ring.c
@@ -394,7 +394,7 @@ rte_eth_from_rings(const char *name, struct rte_ring *const rx_queues[],
 	};
 	char args_str[32] = { 0 };
 	char ring_name[32] = { 0 };
-	uint8_t port_id = RTE_MAX_ETHPORTS;
+	uint16_t port_id = RTE_MAX_ETHPORTS;
 	int ret;
 
 	/* do some parameter checking */
diff --git a/drivers/net/szedata2/rte_eth_szedata2.c b/drivers/net/szedata2/rte_eth_szedata2.c
index 9c0d57cc1..d141acf0e 100644
--- a/drivers/net/szedata2/rte_eth_szedata2.c
+++ b/drivers/net/szedata2/rte_eth_szedata2.c
@@ -71,7 +71,7 @@
 struct szedata2_rx_queue {
 	struct szedata *sze;
 	uint8_t rx_channel;
-	uint8_t in_port;
+	uint16_t in_port;
 	struct rte_mempool *mb_pool;
 	volatile uint64_t rx_pkts;
 	volatile uint64_t rx_bytes;
diff --git a/drivers/net/thunderx/nicvf_struct.h b/drivers/net/thunderx/nicvf_struct.h
index 4ee6c3bb0..e54a96f8e 100644
--- a/drivers/net/thunderx/nicvf_struct.h
+++ b/drivers/net/thunderx/nicvf_struct.h
@@ -100,7 +100,7 @@ struct nicvf_rxq {
 	uint16_t queue_id;
 	uint16_t precharge_cnt;
 	uint8_t rx_drop_en;
-	uint8_t  port_id;
+	uint16_t port_id;
 	uint8_t  rbptr_offset;
 } __rte_cache_aligned;
 
diff --git a/drivers/net/vhost/Makefile b/drivers/net/vhost/Makefile
index 3ba8ad64f..258a917c7 100644
--- a/drivers/net/vhost/Makefile
+++ b/drivers/net/vhost/Makefile
@@ -43,7 +43,7 @@ CFLAGS += $(WERROR_FLAGS)
 
 EXPORT_MAP := rte_pmd_vhost_version.map
 
-LIBABIVER := 1
+LIBABIVER := 2
 
 #
 # all source are stored in SRCS-y
diff --git a/drivers/net/vhost/rte_eth_vhost.c b/drivers/net/vhost/rte_eth_vhost.c
index 0dac5e60e..04179b4db 100644
--- a/drivers/net/vhost/rte_eth_vhost.c
+++ b/drivers/net/vhost/rte_eth_vhost.c
@@ -105,7 +105,7 @@ struct vhost_queue {
 	rte_atomic32_t while_queuing;
 	struct pmd_internal *internal;
 	struct rte_mempool *mb_pool;
-	uint8_t port;
+	uint16_t port;
 	uint16_t virtqueue_id;
 	struct vhost_stats stats;
 };
@@ -705,7 +705,7 @@ static struct vhost_device_ops vhost_ops = {
 };
 
 int
-rte_eth_vhost_get_queue_event(uint8_t port_id,
+rte_eth_vhost_get_queue_event(uint16_t port_id,
 		struct rte_eth_vhost_queue_event *event)
 {
 	struct rte_vhost_vring_state *state;
@@ -742,7 +742,7 @@ rte_eth_vhost_get_queue_event(uint8_t port_id,
 }
 
 int
-rte_eth_vhost_get_vid_from_port_id(uint8_t port_id)
+rte_eth_vhost_get_vid_from_port_id(uint16_t port_id)
 {
 	struct internal_list *list;
 	struct rte_eth_dev *eth_dev;
diff --git a/drivers/net/vhost/rte_eth_vhost.h b/drivers/net/vhost/rte_eth_vhost.h
index 39ca77197..948f3c810 100644
--- a/drivers/net/vhost/rte_eth_vhost.h
+++ b/drivers/net/vhost/rte_eth_vhost.h
@@ -69,7 +69,7 @@ struct rte_eth_vhost_queue_event {
  *  - On success, zero.
  *  - On failure, a negative value.
  */
-int rte_eth_vhost_get_queue_event(uint8_t port_id,
+int rte_eth_vhost_get_queue_event(uint16_t port_id,
 		struct rte_eth_vhost_queue_event *event);
 
 /**
@@ -79,7 +79,7 @@ int rte_eth_vhost_get_queue_event(uint8_t port_id,
  *  - On success, the 'vid' associated with 'port_id'.
  *  - On failure, a negative value.
  */
-int rte_eth_vhost_get_vid_from_port_id(uint8_t port_id);
+int rte_eth_vhost_get_vid_from_port_id(uint16_t port_id);
 
 #ifdef __cplusplus
 }
diff --git a/drivers/net/virtio/Makefile b/drivers/net/virtio/Makefile
index b21b87814..ad4b695a3 100644
--- a/drivers/net/virtio/Makefile
+++ b/drivers/net/virtio/Makefile
@@ -41,7 +41,7 @@ CFLAGS += $(WERROR_FLAGS)
 
 EXPORT_MAP := rte_pmd_virtio_version.map
 
-LIBABIVER := 1
+LIBABIVER := 2
 
 #
 # all source are stored in SRCS-y
diff --git a/drivers/net/virtio/virtio_pci.h b/drivers/net/virtio/virtio_pci.h
index 18caebdd7..330ee94be 100644
--- a/drivers/net/virtio/virtio_pci.h
+++ b/drivers/net/virtio/virtio_pci.h
@@ -260,7 +260,7 @@ struct virtio_hw {
 	uint8_t	    use_msix;
 	uint8_t     modern;
 	uint8_t     use_simple_rxtx;
-	uint8_t     port_id;
+	uint16_t    port_id;
 	uint8_t     mac_addr[ETHER_ADDR_LEN];
 	uint32_t    notify_off_multiplier;
 	uint8_t     *isr;
diff --git a/drivers/net/virtio/virtio_rxtx.h b/drivers/net/virtio/virtio_rxtx.h
index 28f82d6a8..198b2d8fb 100644
--- a/drivers/net/virtio/virtio_rxtx.h
+++ b/drivers/net/virtio/virtio_rxtx.h
@@ -54,7 +54,7 @@ struct virtnet_rx {
 	struct rte_mempool *mpool; /**< mempool for mbuf allocation */
 
 	uint16_t queue_id;   /**< DPDK queue index. */
-	uint8_t port_id;     /**< Device port identifier. */
+	uint16_t port_id;     /**< Device port identifier. */
 
 	/* Statistics */
 	struct virtnet_stats stats;
@@ -69,7 +69,7 @@ struct virtnet_tx {
 	phys_addr_t virtio_net_hdr_mem;  /**< hdr for each xmit packet */
 
 	uint16_t    queue_id;            /**< DPDK queue index. */
-	uint8_t     port_id;             /**< Device port identifier. */
+	uint16_t    port_id;             /**< Device port identifier. */
 
 	/* Statistics */
 	struct virtnet_stats stats;
@@ -82,7 +82,7 @@ struct virtnet_ctl {
 	/**< memzone to populate hdr. */
 	const struct rte_memzone *virtio_net_hdr_mz;
 	phys_addr_t virtio_net_hdr_mem; /**< hdr for each xmit packet */
-	uint8_t port_id;                /**< Device port identifier. */
+	uint16_t port_id;               /**< Device port identifier. */
 	const struct rte_memzone *mz;   /**< mem zone to populate RX ring. */
 };
 
diff --git a/drivers/net/vmxnet3/vmxnet3_ring.h b/drivers/net/vmxnet3/vmxnet3_ring.h
index d2e8323ba..a6fa93ac7 100644
--- a/drivers/net/vmxnet3/vmxnet3_ring.h
+++ b/drivers/net/vmxnet3/vmxnet3_ring.h
@@ -144,7 +144,7 @@ typedef struct vmxnet3_tx_queue {
 	const struct rte_memzone     *mz;
 	bool                         stopped;
 	uint16_t                     queue_id;      /**< Device TX queue index. */
-	uint8_t                      port_id;       /**< Device port identifier. */
+	uint16_t                     port_id;       /**< Device port identifier. */
 	uint16_t		     txdata_desc_size;
 } vmxnet3_tx_queue_t;
 
@@ -179,7 +179,7 @@ typedef struct vmxnet3_rx_queue {
 	const struct rte_memzone    *mz;
 	bool                        stopped;
 	uint16_t                    queue_id;      /**< Device RX queue index. */
-	uint8_t                     port_id;       /**< Device port identifier. */
+	uint16_t                    port_id;       /**< Device port identifier. */
 } vmxnet3_rx_queue_t;
 
 #endif /* _VMXNET3_RING_H_ */
diff --git a/lib/librte_bitratestats/Makefile b/lib/librte_bitratestats/Makefile
index 58a20ea09..a079cced7 100644
--- a/lib/librte_bitratestats/Makefile
+++ b/lib/librte_bitratestats/Makefile
@@ -38,7 +38,7 @@ CFLAGS += $(WERROR_FLAGS) -I$(SRCDIR) -O3
 
 EXPORT_MAP := rte_bitratestats_version.map
 
-LIBABIVER := 1
+LIBABIVER := 2
 
 # all source are stored in SRCS-y
 SRCS-$(CONFIG_RTE_LIBRTE_BITRATE) := rte_bitrate.c
diff --git a/lib/librte_bitratestats/rte_bitrate.c b/lib/librte_bitratestats/rte_bitrate.c
index 3ceb35166..f373697a7 100644
--- a/lib/librte_bitratestats/rte_bitrate.c
+++ b/lib/librte_bitratestats/rte_bitrate.c
@@ -84,7 +84,7 @@ rte_stats_bitrate_reg(struct rte_stats_bitrates *bitrate_data)
 
 int
 rte_stats_bitrate_calc(struct rte_stats_bitrates *bitrate_data,
-	uint8_t port_id)
+			uint16_t port_id)
 {
 	struct rte_stats_bitrate *port_data;
 	struct rte_eth_stats eth_stats;
diff --git a/lib/librte_bitratestats/rte_bitrate.h b/lib/librte_bitratestats/rte_bitrate.h
index 15fc270a3..16467221b 100644
--- a/lib/librte_bitratestats/rte_bitrate.h
+++ b/lib/librte_bitratestats/rte_bitrate.h
@@ -85,7 +85,7 @@ int rte_stats_bitrate_reg(struct rte_stats_bitrates *bitrate_data);
  *  - Negative value on error
  */
 int rte_stats_bitrate_calc(struct rte_stats_bitrates *bitrate_data,
-	uint8_t port_id);
+			   uint16_t port_id);
 
 #ifdef __cplusplus
 }
diff --git a/lib/librte_ether/Makefile b/lib/librte_ether/Makefile
index 27d9766a8..0bacc8b3f 100644
--- a/lib/librte_ether/Makefile
+++ b/lib/librte_ether/Makefile
@@ -41,7 +41,7 @@ CFLAGS += $(WERROR_FLAGS)
 
 EXPORT_MAP := rte_ethdev_version.map
 
-LIBABIVER := 6
+LIBABIVER := 7
 
 SRCS-y += rte_ethdev.c
 SRCS-y += rte_flow.c
diff --git a/lib/librte_ether/rte_ethdev.c b/lib/librte_ether/rte_ethdev.c
index a88916f2a..e756dbc46 100644
--- a/lib/librte_ether/rte_ethdev.c
+++ b/lib/librte_ether/rte_ethdev.c
@@ -138,8 +138,8 @@ enum {
 	STAT_QMAP_RX
 };
 
-uint8_t
-rte_eth_find_next(uint8_t port_id)
+uint16_t
+rte_eth_find_next(uint16_t port_id)
 {
 	while (port_id < RTE_MAX_ETHPORTS &&
 	       rte_eth_devices[port_id].state != RTE_ETH_DEV_ATTACHED)
@@ -187,7 +187,7 @@ rte_eth_dev_allocated(const char *name)
 	return NULL;
 }
 
-static uint8_t
+static uint16_t
 rte_eth_dev_find_free_port(void)
 {
 	unsigned i;
@@ -200,7 +200,7 @@ rte_eth_dev_find_free_port(void)
 }
 
 static struct rte_eth_dev *
-eth_dev_get(uint8_t port_id)
+eth_dev_get(uint16_t port_id)
 {
 	struct rte_eth_dev *eth_dev = &rte_eth_devices[port_id];
 
@@ -216,7 +216,7 @@ eth_dev_get(uint8_t port_id)
 struct rte_eth_dev *
 rte_eth_dev_allocate(const char *name)
 {
-	uint8_t port_id;
+	uint16_t port_id;
 	struct rte_eth_dev *eth_dev;
 
 	port_id = rte_eth_dev_find_free_port();
@@ -251,7 +251,7 @@ rte_eth_dev_allocate(const char *name)
 struct rte_eth_dev *
 rte_eth_dev_attach_secondary(const char *name)
 {
-	uint8_t i;
+	uint16_t i;
 	struct rte_eth_dev *eth_dev;
 
 	if (rte_eth_dev_data == NULL)
@@ -285,7 +285,7 @@ rte_eth_dev_release_port(struct rte_eth_dev *eth_dev)
 }
 
 int
-rte_eth_dev_is_valid_port(uint8_t port_id)
+rte_eth_dev_is_valid_port(uint16_t port_id)
 {
 	if (port_id >= RTE_MAX_ETHPORTS ||
 	    (rte_eth_devices[port_id].state != RTE_ETH_DEV_ATTACHED &&
@@ -296,17 +296,17 @@ rte_eth_dev_is_valid_port(uint8_t port_id)
 }
 
 int
-rte_eth_dev_socket_id(uint8_t port_id)
+rte_eth_dev_socket_id(uint16_t port_id)
 {
 	RTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -1);
 	return rte_eth_devices[port_id].data->numa_node;
 }
 
-uint8_t
+uint16_t
 rte_eth_dev_count(void)
 {
-	uint8_t p;
-	uint8_t count;
+	uint16_t p;
+	uint16_t count;
 
 	count = 0;
 
@@ -317,7 +317,7 @@ rte_eth_dev_count(void)
 }
 
 int
-rte_eth_dev_get_name_by_port(uint8_t port_id, char *name)
+rte_eth_dev_get_name_by_port(uint16_t port_id, char *name)
 {
 	const char *tmp;
 
@@ -336,7 +336,7 @@ rte_eth_dev_get_name_by_port(uint8_t port_id, char *name)
 }
 
 int
-rte_eth_dev_get_port_by_name(const char *name, uint8_t *port_id)
+rte_eth_dev_get_port_by_name(const char *name, uint16_t *port_id)
 {
 	int ret;
 	int i;
@@ -361,7 +361,7 @@ rte_eth_dev_get_port_by_name(const char *name, uint8_t *port_id)
 }
 
 static int
-rte_eth_dev_is_detachable(uint8_t port_id)
+rte_eth_dev_is_detachable(uint16_t port_id)
 {
 	uint32_t dev_flags;
 
@@ -377,7 +377,7 @@ rte_eth_dev_is_detachable(uint8_t port_id)
 
 /* attach the new device, then store port_id of the device */
 int
-rte_eth_dev_attach(const char *devargs, uint8_t *port_id)
+rte_eth_dev_attach(const char *devargs, uint16_t *port_id)
 {
 	int ret = -1;
 	int current = rte_eth_dev_count();
@@ -423,7 +423,7 @@ rte_eth_dev_attach(const char *devargs, uint8_t *port_id)
 
 /* detach the device, then store the name of the device */
 int
-rte_eth_dev_detach(uint8_t port_id, char *name)
+rte_eth_dev_detach(uint16_t port_id, char *name)
 {
 	int ret = -1;
 
@@ -501,7 +501,7 @@ rte_eth_dev_rx_queue_config(struct rte_eth_dev *dev, uint16_t nb_queues)
 }
 
 int
-rte_eth_dev_rx_queue_start(uint8_t port_id, uint16_t rx_queue_id)
+rte_eth_dev_rx_queue_start(uint16_t port_id, uint16_t rx_queue_id)
 {
 	struct rte_eth_dev *dev;
 
@@ -527,7 +527,7 @@ rte_eth_dev_rx_queue_start(uint8_t port_id, uint16_t rx_queue_id)
 }
 
 int
-rte_eth_dev_rx_queue_stop(uint8_t port_id, uint16_t rx_queue_id)
+rte_eth_dev_rx_queue_stop(uint16_t port_id, uint16_t rx_queue_id)
 {
 	struct rte_eth_dev *dev;
 
@@ -553,7 +553,7 @@ rte_eth_dev_rx_queue_stop(uint8_t port_id, uint16_t rx_queue_id)
 }
 
 int
-rte_eth_dev_tx_queue_start(uint8_t port_id, uint16_t tx_queue_id)
+rte_eth_dev_tx_queue_start(uint16_t port_id, uint16_t tx_queue_id)
 {
 	struct rte_eth_dev *dev;
 
@@ -579,7 +579,7 @@ rte_eth_dev_tx_queue_start(uint8_t port_id, uint16_t tx_queue_id)
 }
 
 int
-rte_eth_dev_tx_queue_stop(uint8_t port_id, uint16_t tx_queue_id)
+rte_eth_dev_tx_queue_stop(uint16_t port_id, uint16_t tx_queue_id)
 {
 	struct rte_eth_dev *dev;
 
@@ -688,7 +688,7 @@ rte_eth_speed_bitflag(uint32_t speed, int duplex)
 }
 
 int
-rte_eth_dev_configure(uint8_t port_id, uint16_t nb_rx_q, uint16_t nb_tx_q,
+rte_eth_dev_configure(uint16_t port_id, uint16_t nb_rx_q, uint16_t nb_tx_q,
 		      const struct rte_eth_conf *dev_conf)
 {
 	struct rte_eth_dev *dev;
@@ -839,7 +839,7 @@ _rte_eth_dev_reset(struct rte_eth_dev *dev)
 }
 
 static void
-rte_eth_dev_config_restore(uint8_t port_id)
+rte_eth_dev_config_restore(uint16_t port_id)
 {
 	struct rte_eth_dev *dev;
 	struct rte_eth_dev_info dev_info;
@@ -894,7 +894,7 @@ rte_eth_dev_config_restore(uint8_t port_id)
 }
 
 int
-rte_eth_dev_start(uint8_t port_id)
+rte_eth_dev_start(uint16_t port_id)
 {
 	struct rte_eth_dev *dev;
 	int diag;
@@ -906,7 +906,7 @@ rte_eth_dev_start(uint8_t port_id)
 	RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->dev_start, -ENOTSUP);
 
 	if (dev->data->dev_started != 0) {
-		RTE_PMD_DEBUG_TRACE("Device with port_id=%" PRIu8
+		RTE_PMD_DEBUG_TRACE("Device with port_id=%" PRIu16
 			" already started\n",
 			port_id);
 		return 0;
@@ -928,7 +928,7 @@ rte_eth_dev_start(uint8_t port_id)
 }
 
 void
-rte_eth_dev_stop(uint8_t port_id)
+rte_eth_dev_stop(uint16_t port_id)
 {
 	struct rte_eth_dev *dev;
 
@@ -938,7 +938,7 @@ rte_eth_dev_stop(uint8_t port_id)
 	RTE_FUNC_PTR_OR_RET(*dev->dev_ops->dev_stop);
 
 	if (dev->data->dev_started == 0) {
-		RTE_PMD_DEBUG_TRACE("Device with port_id=%" PRIu8
+		RTE_PMD_DEBUG_TRACE("Device with port_id=%" PRIu16
 			" already stopped\n",
 			port_id);
 		return;
@@ -949,7 +949,7 @@ rte_eth_dev_stop(uint8_t port_id)
 }
 
 int
-rte_eth_dev_set_link_up(uint8_t port_id)
+rte_eth_dev_set_link_up(uint16_t port_id)
 {
 	struct rte_eth_dev *dev;
 
@@ -962,7 +962,7 @@ rte_eth_dev_set_link_up(uint8_t port_id)
 }
 
 int
-rte_eth_dev_set_link_down(uint8_t port_id)
+rte_eth_dev_set_link_down(uint16_t port_id)
 {
 	struct rte_eth_dev *dev;
 
@@ -975,7 +975,7 @@ rte_eth_dev_set_link_down(uint8_t port_id)
 }
 
 void
-rte_eth_dev_close(uint8_t port_id)
+rte_eth_dev_close(uint16_t port_id)
 {
 	struct rte_eth_dev *dev;
 
@@ -995,7 +995,7 @@ rte_eth_dev_close(uint8_t port_id)
 }
 
 int
-rte_eth_dev_reset(uint8_t port_id)
+rte_eth_dev_reset(uint16_t port_id)
 {
 	struct rte_eth_dev *dev;
 	int ret;
@@ -1012,7 +1012,7 @@ rte_eth_dev_reset(uint8_t port_id)
 }
 
 int
-rte_eth_rx_queue_setup(uint8_t port_id, uint16_t rx_queue_id,
+rte_eth_rx_queue_setup(uint16_t port_id, uint16_t rx_queue_id,
 		       uint16_t nb_rx_desc, unsigned int socket_id,
 		       const struct rte_eth_rxconf *rx_conf,
 		       struct rte_mempool *mp)
@@ -1103,7 +1103,7 @@ rte_eth_rx_queue_setup(uint8_t port_id, uint16_t rx_queue_id,
 }
 
 int
-rte_eth_tx_queue_setup(uint8_t port_id, uint16_t tx_queue_id,
+rte_eth_tx_queue_setup(uint16_t port_id, uint16_t tx_queue_id,
 		       uint16_t nb_tx_desc, unsigned int socket_id,
 		       const struct rte_eth_txconf *tx_conf)
 {
@@ -1207,7 +1207,7 @@ rte_eth_tx_buffer_init(struct rte_eth_dev_tx_buffer *buffer, uint16_t size)
 }
 
 int
-rte_eth_tx_done_cleanup(uint8_t port_id, uint16_t queue_id, uint32_t free_cnt)
+rte_eth_tx_done_cleanup(uint16_t port_id, uint16_t queue_id, uint32_t free_cnt)
 {
 	struct rte_eth_dev *dev = &rte_eth_devices[port_id];
 
@@ -1221,7 +1221,7 @@ rte_eth_tx_done_cleanup(uint8_t port_id, uint16_t queue_id, uint32_t free_cnt)
 }
 
 void
-rte_eth_promiscuous_enable(uint8_t port_id)
+rte_eth_promiscuous_enable(uint16_t port_id)
 {
 	struct rte_eth_dev *dev;
 
@@ -1234,7 +1234,7 @@ rte_eth_promiscuous_enable(uint8_t port_id)
 }
 
 void
-rte_eth_promiscuous_disable(uint8_t port_id)
+rte_eth_promiscuous_disable(uint16_t port_id)
 {
 	struct rte_eth_dev *dev;
 
@@ -1247,7 +1247,7 @@ rte_eth_promiscuous_disable(uint8_t port_id)
 }
 
 int
-rte_eth_promiscuous_get(uint8_t port_id)
+rte_eth_promiscuous_get(uint16_t port_id)
 {
 	struct rte_eth_dev *dev;
 
@@ -1258,7 +1258,7 @@ rte_eth_promiscuous_get(uint8_t port_id)
 }
 
 void
-rte_eth_allmulticast_enable(uint8_t port_id)
+rte_eth_allmulticast_enable(uint16_t port_id)
 {
 	struct rte_eth_dev *dev;
 
@@ -1271,7 +1271,7 @@ rte_eth_allmulticast_enable(uint8_t port_id)
 }
 
 void
-rte_eth_allmulticast_disable(uint8_t port_id)
+rte_eth_allmulticast_disable(uint16_t port_id)
 {
 	struct rte_eth_dev *dev;
 
@@ -1284,7 +1284,7 @@ rte_eth_allmulticast_disable(uint8_t port_id)
 }
 
 int
-rte_eth_allmulticast_get(uint8_t port_id)
+rte_eth_allmulticast_get(uint16_t port_id)
 {
 	struct rte_eth_dev *dev;
 
@@ -1309,7 +1309,7 @@ rte_eth_dev_atomic_read_link_status(struct rte_eth_dev *dev,
 }
 
 void
-rte_eth_link_get(uint8_t port_id, struct rte_eth_link *eth_link)
+rte_eth_link_get(uint16_t port_id, struct rte_eth_link *eth_link)
 {
 	struct rte_eth_dev *dev;
 
@@ -1326,7 +1326,7 @@ rte_eth_link_get(uint8_t port_id, struct rte_eth_link *eth_link)
 }
 
 void
-rte_eth_link_get_nowait(uint8_t port_id, struct rte_eth_link *eth_link)
+rte_eth_link_get_nowait(uint16_t port_id, struct rte_eth_link *eth_link)
 {
 	struct rte_eth_dev *dev;
 
@@ -1343,7 +1343,7 @@ rte_eth_link_get_nowait(uint8_t port_id, struct rte_eth_link *eth_link)
 }
 
 int
-rte_eth_stats_get(uint8_t port_id, struct rte_eth_stats *stats)
+rte_eth_stats_get(uint16_t port_id, struct rte_eth_stats *stats)
 {
 	struct rte_eth_dev *dev;
 
@@ -1359,7 +1359,7 @@ rte_eth_stats_get(uint8_t port_id, struct rte_eth_stats *stats)
 }
 
 void
-rte_eth_stats_reset(uint8_t port_id)
+rte_eth_stats_reset(uint16_t port_id)
 {
 	struct rte_eth_dev *dev;
 
@@ -1372,7 +1372,7 @@ rte_eth_stats_reset(uint8_t port_id)
 }
 
 static int
-get_xstats_count(uint8_t port_id)
+get_xstats_count(uint16_t port_id)
 {
 	struct rte_eth_dev *dev;
 	int count;
@@ -1401,7 +1401,7 @@ get_xstats_count(uint8_t port_id)
 }
 
 int
-rte_eth_xstats_get_id_by_name(uint8_t port_id, const char *xstat_name,
+rte_eth_xstats_get_id_by_name(uint16_t port_id, const char *xstat_name,
 		uint64_t *id)
 {
 	int cnt_xstats, idx_xstat;
@@ -1445,7 +1445,7 @@ rte_eth_xstats_get_id_by_name(uint8_t port_id, const char *xstat_name,
 }
 
 int
-rte_eth_xstats_get_names_by_id(uint8_t port_id,
+rte_eth_xstats_get_names_by_id(uint16_t port_id,
 	struct rte_eth_xstat_name *xstats_names, unsigned int size,
 	uint64_t *ids)
 {
@@ -1562,7 +1562,7 @@ rte_eth_xstats_get_names_by_id(uint8_t port_id,
 }
 
 int
-rte_eth_xstats_get_names(uint8_t port_id,
+rte_eth_xstats_get_names(uint16_t port_id,
 	struct rte_eth_xstat_name *xstats_names,
 	unsigned int size)
 {
@@ -1628,8 +1628,8 @@ rte_eth_xstats_get_names(uint8_t port_id,
 
 /* retrieve ethdev extended statistics */
 int
-rte_eth_xstats_get_by_id(uint8_t port_id, const uint64_t *ids, uint64_t *values,
-	unsigned int n)
+rte_eth_xstats_get_by_id(uint16_t port_id, const uint64_t *ids,
+			 uint64_t *values, unsigned int n)
 {
 	/* If need all xstats */
 	if (!ids) {
@@ -1754,7 +1754,7 @@ rte_eth_xstats_get_by_id(uint8_t port_id, const uint64_t *ids, uint64_t *values,
 }
 
 int
-rte_eth_xstats_get(uint8_t port_id, struct rte_eth_xstat *xstats,
+rte_eth_xstats_get(uint16_t port_id, struct rte_eth_xstat *xstats,
 	unsigned int n)
 {
 	struct rte_eth_stats eth_stats;
@@ -1836,7 +1836,7 @@ rte_eth_xstats_get(uint8_t port_id, struct rte_eth_xstat *xstats,
 
 /* reset ethdev extended statistics */
 void
-rte_eth_xstats_reset(uint8_t port_id)
+rte_eth_xstats_reset(uint16_t port_id)
 {
 	struct rte_eth_dev *dev;
 
@@ -1854,7 +1854,7 @@ rte_eth_xstats_reset(uint8_t port_id)
 }
 
 static int
-set_queue_stats_mapping(uint8_t port_id, uint16_t queue_id, uint8_t stat_idx,
+set_queue_stats_mapping(uint16_t port_id, uint16_t queue_id, uint8_t stat_idx,
 		uint8_t is_rx)
 {
 	struct rte_eth_dev *dev;
@@ -1870,7 +1870,7 @@ set_queue_stats_mapping(uint8_t port_id, uint16_t queue_id, uint8_t stat_idx,
 
 
 int
-rte_eth_dev_set_tx_queue_stats_mapping(uint8_t port_id, uint16_t tx_queue_id,
+rte_eth_dev_set_tx_queue_stats_mapping(uint16_t port_id, uint16_t tx_queue_id,
 		uint8_t stat_idx)
 {
 	return set_queue_stats_mapping(port_id, tx_queue_id, stat_idx,
@@ -1879,7 +1879,7 @@ rte_eth_dev_set_tx_queue_stats_mapping(uint8_t port_id, uint16_t tx_queue_id,
 
 
 int
-rte_eth_dev_set_rx_queue_stats_mapping(uint8_t port_id, uint16_t rx_queue_id,
+rte_eth_dev_set_rx_queue_stats_mapping(uint16_t port_id, uint16_t rx_queue_id,
 		uint8_t stat_idx)
 {
 	return set_queue_stats_mapping(port_id, rx_queue_id, stat_idx,
@@ -1887,7 +1887,7 @@ rte_eth_dev_set_rx_queue_stats_mapping(uint8_t port_id, uint16_t rx_queue_id,
 }
 
 int
-rte_eth_dev_fw_version_get(uint8_t port_id, char *fw_version, size_t fw_size)
+rte_eth_dev_fw_version_get(uint16_t port_id, char *fw_version, size_t fw_size)
 {
 	struct rte_eth_dev *dev;
 
@@ -1899,7 +1899,7 @@ rte_eth_dev_fw_version_get(uint8_t port_id, char *fw_version, size_t fw_size)
 }
 
 void
-rte_eth_dev_info_get(uint8_t port_id, struct rte_eth_dev_info *dev_info)
+rte_eth_dev_info_get(uint16_t port_id, struct rte_eth_dev_info *dev_info)
 {
 	struct rte_eth_dev *dev;
 	const struct rte_eth_desc_lim lim = {
@@ -1923,7 +1923,7 @@ rte_eth_dev_info_get(uint8_t port_id, struct rte_eth_dev_info *dev_info)
 }
 
 int
-rte_eth_dev_get_supported_ptypes(uint8_t port_id, uint32_t ptype_mask,
+rte_eth_dev_get_supported_ptypes(uint16_t port_id, uint32_t ptype_mask,
 				 uint32_t *ptypes, int num)
 {
 	int i, j;
@@ -1949,7 +1949,7 @@ rte_eth_dev_get_supported_ptypes(uint8_t port_id, uint32_t ptype_mask,
 }
 
 void
-rte_eth_macaddr_get(uint8_t port_id, struct ether_addr *mac_addr)
+rte_eth_macaddr_get(uint16_t port_id, struct ether_addr *mac_addr)
 {
 	struct rte_eth_dev *dev;
 
@@ -1960,7 +1960,7 @@ rte_eth_macaddr_get(uint8_t port_id, struct ether_addr *mac_addr)
 
 
 int
-rte_eth_dev_get_mtu(uint8_t port_id, uint16_t *mtu)
+rte_eth_dev_get_mtu(uint16_t port_id, uint16_t *mtu)
 {
 	struct rte_eth_dev *dev;
 
@@ -1972,7 +1972,7 @@ rte_eth_dev_get_mtu(uint8_t port_id, uint16_t *mtu)
 }
 
 int
-rte_eth_dev_set_mtu(uint8_t port_id, uint16_t mtu)
+rte_eth_dev_set_mtu(uint16_t port_id, uint16_t mtu)
 {
 	int ret;
 	struct rte_eth_dev *dev;
@@ -1989,7 +1989,7 @@ rte_eth_dev_set_mtu(uint8_t port_id, uint16_t mtu)
 }
 
 int
-rte_eth_dev_vlan_filter(uint8_t port_id, uint16_t vlan_id, int on)
+rte_eth_dev_vlan_filter(uint16_t port_id, uint16_t vlan_id, int on)
 {
 	struct rte_eth_dev *dev;
 	int ret;
@@ -2028,7 +2028,8 @@ rte_eth_dev_vlan_filter(uint8_t port_id, uint16_t vlan_id, int on)
 }
 
 int
-rte_eth_dev_set_vlan_strip_on_queue(uint8_t port_id, uint16_t rx_queue_id, int on)
+rte_eth_dev_set_vlan_strip_on_queue(uint16_t port_id, uint16_t rx_queue_id,
+				    int on)
 {
 	struct rte_eth_dev *dev;
 
@@ -2046,7 +2047,7 @@ rte_eth_dev_set_vlan_strip_on_queue(uint8_t port_id, uint16_t rx_queue_id, int o
 }
 
 int
-rte_eth_dev_set_vlan_ether_type(uint8_t port_id,
+rte_eth_dev_set_vlan_ether_type(uint16_t port_id,
 				enum rte_vlan_type vlan_type,
 				uint16_t tpid)
 {
@@ -2060,7 +2061,7 @@ rte_eth_dev_set_vlan_ether_type(uint8_t port_id,
 }
 
 int
-rte_eth_dev_set_vlan_offload(uint8_t port_id, int offload_mask)
+rte_eth_dev_set_vlan_offload(uint16_t port_id, int offload_mask)
 {
 	struct rte_eth_dev *dev;
 	int ret = 0;
@@ -2103,7 +2104,7 @@ rte_eth_dev_set_vlan_offload(uint8_t port_id, int offload_mask)
 }
 
 int
-rte_eth_dev_get_vlan_offload(uint8_t port_id)
+rte_eth_dev_get_vlan_offload(uint16_t port_id)
 {
 	struct rte_eth_dev *dev;
 	int ret = 0;
@@ -2124,7 +2125,7 @@ rte_eth_dev_get_vlan_offload(uint8_t port_id)
 }
 
 int
-rte_eth_dev_set_vlan_pvid(uint8_t port_id, uint16_t pvid, int on)
+rte_eth_dev_set_vlan_pvid(uint16_t port_id, uint16_t pvid, int on)
 {
 	struct rte_eth_dev *dev;
 
@@ -2137,7 +2138,7 @@ rte_eth_dev_set_vlan_pvid(uint8_t port_id, uint16_t pvid, int on)
 }
 
 int
-rte_eth_dev_flow_ctrl_get(uint8_t port_id, struct rte_eth_fc_conf *fc_conf)
+rte_eth_dev_flow_ctrl_get(uint16_t port_id, struct rte_eth_fc_conf *fc_conf)
 {
 	struct rte_eth_dev *dev;
 
@@ -2149,7 +2150,7 @@ rte_eth_dev_flow_ctrl_get(uint8_t port_id, struct rte_eth_fc_conf *fc_conf)
 }
 
 int
-rte_eth_dev_flow_ctrl_set(uint8_t port_id, struct rte_eth_fc_conf *fc_conf)
+rte_eth_dev_flow_ctrl_set(uint16_t port_id, struct rte_eth_fc_conf *fc_conf)
 {
 	struct rte_eth_dev *dev;
 
@@ -2165,7 +2166,8 @@ rte_eth_dev_flow_ctrl_set(uint8_t port_id, struct rte_eth_fc_conf *fc_conf)
 }
 
 int
-rte_eth_dev_priority_flow_ctrl_set(uint8_t port_id, struct rte_eth_pfc_conf *pfc_conf)
+rte_eth_dev_priority_flow_ctrl_set(uint16_t port_id,
+				   struct rte_eth_pfc_conf *pfc_conf)
 {
 	struct rte_eth_dev *dev;
 
@@ -2231,7 +2233,7 @@ rte_eth_check_reta_entry(struct rte_eth_rss_reta_entry64 *reta_conf,
 }
 
 int
-rte_eth_dev_rss_reta_update(uint8_t port_id,
+rte_eth_dev_rss_reta_update(uint16_t port_id,
 			    struct rte_eth_rss_reta_entry64 *reta_conf,
 			    uint16_t reta_size)
 {
@@ -2257,7 +2259,7 @@ rte_eth_dev_rss_reta_update(uint8_t port_id,
 }
 
 int
-rte_eth_dev_rss_reta_query(uint8_t port_id,
+rte_eth_dev_rss_reta_query(uint16_t port_id,
 			   struct rte_eth_rss_reta_entry64 *reta_conf,
 			   uint16_t reta_size)
 {
@@ -2277,7 +2279,8 @@ rte_eth_dev_rss_reta_query(uint8_t port_id,
 }
 
 int
-rte_eth_dev_rss_hash_update(uint8_t port_id, struct rte_eth_rss_conf *rss_conf)
+rte_eth_dev_rss_hash_update(uint16_t port_id,
+			    struct rte_eth_rss_conf *rss_conf)
 {
 	struct rte_eth_dev *dev;
 	uint16_t rss_hash_protos;
@@ -2296,7 +2299,7 @@ rte_eth_dev_rss_hash_update(uint8_t port_id, struct rte_eth_rss_conf *rss_conf)
 }
 
 int
-rte_eth_dev_rss_hash_conf_get(uint8_t port_id,
+rte_eth_dev_rss_hash_conf_get(uint16_t port_id,
 			      struct rte_eth_rss_conf *rss_conf)
 {
 	struct rte_eth_dev *dev;
@@ -2308,7 +2311,7 @@ rte_eth_dev_rss_hash_conf_get(uint8_t port_id,
 }
 
 int
-rte_eth_dev_udp_tunnel_port_add(uint8_t port_id,
+rte_eth_dev_udp_tunnel_port_add(uint16_t port_id,
 				struct rte_eth_udp_tunnel *udp_tunnel)
 {
 	struct rte_eth_dev *dev;
@@ -2330,7 +2333,7 @@ rte_eth_dev_udp_tunnel_port_add(uint8_t port_id,
 }
 
 int
-rte_eth_dev_udp_tunnel_port_delete(uint8_t port_id,
+rte_eth_dev_udp_tunnel_port_delete(uint16_t port_id,
 				   struct rte_eth_udp_tunnel *udp_tunnel)
 {
 	struct rte_eth_dev *dev;
@@ -2353,7 +2356,7 @@ rte_eth_dev_udp_tunnel_port_delete(uint8_t port_id,
 }
 
 int
-rte_eth_led_on(uint8_t port_id)
+rte_eth_led_on(uint16_t port_id)
 {
 	struct rte_eth_dev *dev;
 
@@ -2364,7 +2367,7 @@ rte_eth_led_on(uint8_t port_id)
 }
 
 int
-rte_eth_led_off(uint8_t port_id)
+rte_eth_led_off(uint16_t port_id)
 {
 	struct rte_eth_dev *dev;
 
@@ -2379,7 +2382,7 @@ rte_eth_led_off(uint8_t port_id)
  * an empty spot.
  */
 static int
-get_mac_addr_index(uint8_t port_id, const struct ether_addr *addr)
+get_mac_addr_index(uint16_t port_id, const struct ether_addr *addr)
 {
 	struct rte_eth_dev_info dev_info;
 	struct rte_eth_dev *dev = &rte_eth_devices[port_id];
@@ -2398,7 +2401,7 @@ get_mac_addr_index(uint8_t port_id, const struct ether_addr *addr)
 static const struct ether_addr null_mac_addr;
 
 int
-rte_eth_dev_mac_addr_add(uint8_t port_id, struct ether_addr *addr,
+rte_eth_dev_mac_addr_add(uint16_t port_id, struct ether_addr *addr,
 			uint32_t pool)
 {
 	struct rte_eth_dev *dev;
@@ -2451,7 +2454,7 @@ rte_eth_dev_mac_addr_add(uint8_t port_id, struct ether_addr *addr,
 }
 
 int
-rte_eth_dev_mac_addr_remove(uint8_t port_id, struct ether_addr *addr)
+rte_eth_dev_mac_addr_remove(uint16_t port_id, struct ether_addr *addr)
 {
 	struct rte_eth_dev *dev;
 	int index;
@@ -2480,7 +2483,7 @@ rte_eth_dev_mac_addr_remove(uint8_t port_id, struct ether_addr *addr)
 }
 
 int
-rte_eth_dev_default_mac_addr_set(uint8_t port_id, struct ether_addr *addr)
+rte_eth_dev_default_mac_addr_set(uint16_t port_id, struct ether_addr *addr)
 {
 	struct rte_eth_dev *dev;
 
@@ -2506,7 +2509,7 @@ rte_eth_dev_default_mac_addr_set(uint8_t port_id, struct ether_addr *addr)
  * an empty spot.
  */
 static int
-get_hash_mac_addr_index(uint8_t port_id, const struct ether_addr *addr)
+get_hash_mac_addr_index(uint16_t port_id, const struct ether_addr *addr)
 {
 	struct rte_eth_dev_info dev_info;
 	struct rte_eth_dev *dev = &rte_eth_devices[port_id];
@@ -2525,7 +2528,7 @@ get_hash_mac_addr_index(uint8_t port_id, const struct ether_addr *addr)
 }
 
 int
-rte_eth_dev_uc_hash_table_set(uint8_t port_id, struct ether_addr *addr,
+rte_eth_dev_uc_hash_table_set(uint16_t port_id, struct ether_addr *addr,
 				uint8_t on)
 {
 	int index;
@@ -2577,7 +2580,7 @@ rte_eth_dev_uc_hash_table_set(uint8_t port_id, struct ether_addr *addr,
 }
 
 int
-rte_eth_dev_uc_all_hash_table_set(uint8_t port_id, uint8_t on)
+rte_eth_dev_uc_all_hash_table_set(uint16_t port_id, uint8_t on)
 {
 	struct rte_eth_dev *dev;
 
@@ -2589,7 +2592,7 @@ rte_eth_dev_uc_all_hash_table_set(uint8_t port_id, uint8_t on)
 	return (*dev->dev_ops->uc_all_hash_table_set)(dev, on);
 }
 
-int rte_eth_set_queue_rate_limit(uint8_t port_id, uint16_t queue_idx,
+int rte_eth_set_queue_rate_limit(uint16_t port_id, uint16_t queue_idx,
 					uint16_t tx_rate)
 {
 	struct rte_eth_dev *dev;
@@ -2620,7 +2623,7 @@ int rte_eth_set_queue_rate_limit(uint8_t port_id, uint16_t queue_idx,
 }
 
 int
-rte_eth_mirror_rule_set(uint8_t port_id,
+rte_eth_mirror_rule_set(uint16_t port_id,
 			struct rte_eth_mirror_conf *mirror_conf,
 			uint8_t rule_id, uint8_t on)
 {
@@ -2658,7 +2661,7 @@ rte_eth_mirror_rule_set(uint8_t port_id,
 }
 
 int
-rte_eth_mirror_rule_reset(uint8_t port_id, uint8_t rule_id)
+rte_eth_mirror_rule_reset(uint16_t port_id, uint8_t rule_id)
 {
 	struct rte_eth_dev *dev;
 
@@ -2671,7 +2674,7 @@ rte_eth_mirror_rule_reset(uint8_t port_id, uint8_t rule_id)
 }
 
 int
-rte_eth_dev_callback_register(uint8_t port_id,
+rte_eth_dev_callback_register(uint16_t port_id,
 			enum rte_eth_event_type event,
 			rte_eth_dev_cb_fn cb_fn, void *cb_arg)
 {
@@ -2711,7 +2714,7 @@ rte_eth_dev_callback_register(uint8_t port_id,
 }
 
 int
-rte_eth_dev_callback_unregister(uint8_t port_id,
+rte_eth_dev_callback_unregister(uint16_t port_id,
 			enum rte_eth_event_type event,
 			rte_eth_dev_cb_fn cb_fn, void *cb_arg)
 {
@@ -2783,7 +2786,7 @@ _rte_eth_dev_callback_process(struct rte_eth_dev *dev,
 }
 
 int
-rte_eth_dev_rx_intr_ctl(uint8_t port_id, int epfd, int op, void *data)
+rte_eth_dev_rx_intr_ctl(uint16_t port_id, int epfd, int op, void *data)
 {
 	uint32_t vec;
 	struct rte_eth_dev *dev;
@@ -2844,7 +2847,7 @@ rte_eth_dma_zone_reserve(const struct rte_eth_dev *dev, const char *ring_name,
 }
 
 int
-rte_eth_dev_rx_intr_ctl_q(uint8_t port_id, uint16_t queue_id,
+rte_eth_dev_rx_intr_ctl_q(uint16_t port_id, uint16_t queue_id,
 			  int epfd, int op, void *data)
 {
 	uint32_t vec;
@@ -2884,7 +2887,7 @@ rte_eth_dev_rx_intr_ctl_q(uint8_t port_id, uint16_t queue_id,
 }
 
 int
-rte_eth_dev_rx_intr_enable(uint8_t port_id,
+rte_eth_dev_rx_intr_enable(uint16_t port_id,
 			   uint16_t queue_id)
 {
 	struct rte_eth_dev *dev;
@@ -2898,7 +2901,7 @@ rte_eth_dev_rx_intr_enable(uint8_t port_id,
 }
 
 int
-rte_eth_dev_rx_intr_disable(uint8_t port_id,
+rte_eth_dev_rx_intr_disable(uint16_t port_id,
 			    uint16_t queue_id)
 {
 	struct rte_eth_dev *dev;
@@ -2913,7 +2916,8 @@ rte_eth_dev_rx_intr_disable(uint8_t port_id,
 
 
 int
-rte_eth_dev_filter_supported(uint8_t port_id, enum rte_filter_type filter_type)
+rte_eth_dev_filter_supported(uint16_t port_id,
+			     enum rte_filter_type filter_type)
 {
 	struct rte_eth_dev *dev;
 
@@ -2926,7 +2930,7 @@ rte_eth_dev_filter_supported(uint8_t port_id, enum rte_filter_type filter_type)
 }
 
 int
-rte_eth_dev_filter_ctrl(uint8_t port_id, enum rte_filter_type filter_type,
+rte_eth_dev_filter_ctrl(uint16_t port_id, enum rte_filter_type filter_type,
 		       enum rte_filter_op filter_op, void *arg)
 {
 	struct rte_eth_dev *dev;
@@ -2939,7 +2943,7 @@ rte_eth_dev_filter_ctrl(uint8_t port_id, enum rte_filter_type filter_type,
 }
 
 void *
-rte_eth_add_rx_callback(uint8_t port_id, uint16_t queue_id,
+rte_eth_add_rx_callback(uint16_t port_id, uint16_t queue_id,
 		rte_rx_callback_fn fn, void *user_param)
 {
 #ifndef RTE_ETHDEV_RXTX_CALLBACKS
@@ -2981,7 +2985,7 @@ rte_eth_add_rx_callback(uint8_t port_id, uint16_t queue_id,
 }
 
 void *
-rte_eth_add_first_rx_callback(uint8_t port_id, uint16_t queue_id,
+rte_eth_add_first_rx_callback(uint16_t port_id, uint16_t queue_id,
 		rte_rx_callback_fn fn, void *user_param)
 {
 #ifndef RTE_ETHDEV_RXTX_CALLBACKS
@@ -3016,7 +3020,7 @@ rte_eth_add_first_rx_callback(uint8_t port_id, uint16_t queue_id,
 }
 
 void *
-rte_eth_add_tx_callback(uint8_t port_id, uint16_t queue_id,
+rte_eth_add_tx_callback(uint16_t port_id, uint16_t queue_id,
 		rte_tx_callback_fn fn, void *user_param)
 {
 #ifndef RTE_ETHDEV_RXTX_CALLBACKS
@@ -3059,7 +3063,7 @@ rte_eth_add_tx_callback(uint8_t port_id, uint16_t queue_id,
 }
 
 int
-rte_eth_remove_rx_callback(uint8_t port_id, uint16_t queue_id,
+rte_eth_remove_rx_callback(uint16_t port_id, uint16_t queue_id,
 		struct rte_eth_rxtx_callback *user_cb)
 {
 #ifndef RTE_ETHDEV_RXTX_CALLBACKS
@@ -3093,7 +3097,7 @@ rte_eth_remove_rx_callback(uint8_t port_id, uint16_t queue_id,
 }
 
 int
-rte_eth_remove_tx_callback(uint8_t port_id, uint16_t queue_id,
+rte_eth_remove_tx_callback(uint16_t port_id, uint16_t queue_id,
 		struct rte_eth_rxtx_callback *user_cb)
 {
 #ifndef RTE_ETHDEV_RXTX_CALLBACKS
@@ -3127,7 +3131,7 @@ rte_eth_remove_tx_callback(uint8_t port_id, uint16_t queue_id,
 }
 
 int
-rte_eth_rx_queue_info_get(uint8_t port_id, uint16_t queue_id,
+rte_eth_rx_queue_info_get(uint16_t port_id, uint16_t queue_id,
 	struct rte_eth_rxq_info *qinfo)
 {
 	struct rte_eth_dev *dev;
@@ -3151,7 +3155,7 @@ rte_eth_rx_queue_info_get(uint8_t port_id, uint16_t queue_id,
 }
 
 int
-rte_eth_tx_queue_info_get(uint8_t port_id, uint16_t queue_id,
+rte_eth_tx_queue_info_get(uint16_t port_id, uint16_t queue_id,
 	struct rte_eth_txq_info *qinfo)
 {
 	struct rte_eth_dev *dev;
@@ -3175,7 +3179,7 @@ rte_eth_tx_queue_info_get(uint8_t port_id, uint16_t queue_id,
 }
 
 int
-rte_eth_dev_set_mc_addr_list(uint8_t port_id,
+rte_eth_dev_set_mc_addr_list(uint16_t port_id,
 			     struct ether_addr *mc_addr_set,
 			     uint32_t nb_mc_addr)
 {
@@ -3189,7 +3193,7 @@ rte_eth_dev_set_mc_addr_list(uint8_t port_id,
 }
 
 int
-rte_eth_timesync_enable(uint8_t port_id)
+rte_eth_timesync_enable(uint16_t port_id)
 {
 	struct rte_eth_dev *dev;
 
@@ -3201,7 +3205,7 @@ rte_eth_timesync_enable(uint8_t port_id)
 }
 
 int
-rte_eth_timesync_disable(uint8_t port_id)
+rte_eth_timesync_disable(uint16_t port_id)
 {
 	struct rte_eth_dev *dev;
 
@@ -3213,7 +3217,7 @@ rte_eth_timesync_disable(uint8_t port_id)
 }
 
 int
-rte_eth_timesync_read_rx_timestamp(uint8_t port_id, struct timespec *timestamp,
+rte_eth_timesync_read_rx_timestamp(uint16_t port_id, struct timespec *timestamp,
 				   uint32_t flags)
 {
 	struct rte_eth_dev *dev;
@@ -3226,7 +3230,8 @@ rte_eth_timesync_read_rx_timestamp(uint8_t port_id, struct timespec *timestamp,
 }
 
 int
-rte_eth_timesync_read_tx_timestamp(uint8_t port_id, struct timespec *timestamp)
+rte_eth_timesync_read_tx_timestamp(uint16_t port_id,
+				   struct timespec *timestamp)
 {
 	struct rte_eth_dev *dev;
 
@@ -3238,7 +3243,7 @@ rte_eth_timesync_read_tx_timestamp(uint8_t port_id, struct timespec *timestamp)
 }
 
 int
-rte_eth_timesync_adjust_time(uint8_t port_id, int64_t delta)
+rte_eth_timesync_adjust_time(uint16_t port_id, int64_t delta)
 {
 	struct rte_eth_dev *dev;
 
@@ -3250,7 +3255,7 @@ rte_eth_timesync_adjust_time(uint8_t port_id, int64_t delta)
 }
 
 int
-rte_eth_timesync_read_time(uint8_t port_id, struct timespec *timestamp)
+rte_eth_timesync_read_time(uint16_t port_id, struct timespec *timestamp)
 {
 	struct rte_eth_dev *dev;
 
@@ -3262,7 +3267,7 @@ rte_eth_timesync_read_time(uint8_t port_id, struct timespec *timestamp)
 }
 
 int
-rte_eth_timesync_write_time(uint8_t port_id, const struct timespec *timestamp)
+rte_eth_timesync_write_time(uint16_t port_id, const struct timespec *timestamp)
 {
 	struct rte_eth_dev *dev;
 
@@ -3274,7 +3279,7 @@ rte_eth_timesync_write_time(uint8_t port_id, const struct timespec *timestamp)
 }
 
 int
-rte_eth_dev_get_reg_info(uint8_t port_id, struct rte_dev_reg_info *info)
+rte_eth_dev_get_reg_info(uint16_t port_id, struct rte_dev_reg_info *info)
 {
 	struct rte_eth_dev *dev;
 
@@ -3286,7 +3291,7 @@ rte_eth_dev_get_reg_info(uint8_t port_id, struct rte_dev_reg_info *info)
 }
 
 int
-rte_eth_dev_get_eeprom_length(uint8_t port_id)
+rte_eth_dev_get_eeprom_length(uint16_t port_id)
 {
 	struct rte_eth_dev *dev;
 
@@ -3298,7 +3303,7 @@ rte_eth_dev_get_eeprom_length(uint8_t port_id)
 }
 
 int
-rte_eth_dev_get_eeprom(uint8_t port_id, struct rte_dev_eeprom_info *info)
+rte_eth_dev_get_eeprom(uint16_t port_id, struct rte_dev_eeprom_info *info)
 {
 	struct rte_eth_dev *dev;
 
@@ -3310,7 +3315,7 @@ rte_eth_dev_get_eeprom(uint8_t port_id, struct rte_dev_eeprom_info *info)
 }
 
 int
-rte_eth_dev_set_eeprom(uint8_t port_id, struct rte_dev_eeprom_info *info)
+rte_eth_dev_set_eeprom(uint16_t port_id, struct rte_dev_eeprom_info *info)
 {
 	struct rte_eth_dev *dev;
 
@@ -3322,7 +3327,7 @@ rte_eth_dev_set_eeprom(uint8_t port_id, struct rte_dev_eeprom_info *info)
 }
 
 int
-rte_eth_dev_get_dcb_info(uint8_t port_id,
+rte_eth_dev_get_dcb_info(uint16_t port_id,
 			     struct rte_eth_dcb_info *dcb_info)
 {
 	struct rte_eth_dev *dev;
@@ -3337,7 +3342,7 @@ rte_eth_dev_get_dcb_info(uint8_t port_id,
 }
 
 int
-rte_eth_dev_l2_tunnel_eth_type_conf(uint8_t port_id,
+rte_eth_dev_l2_tunnel_eth_type_conf(uint16_t port_id,
 				    struct rte_eth_l2_tunnel_conf *l2_tunnel)
 {
 	struct rte_eth_dev *dev;
@@ -3360,7 +3365,7 @@ rte_eth_dev_l2_tunnel_eth_type_conf(uint8_t port_id,
 }
 
 int
-rte_eth_dev_l2_tunnel_offload_set(uint8_t port_id,
+rte_eth_dev_l2_tunnel_offload_set(uint16_t port_id,
 				  struct rte_eth_l2_tunnel_conf *l2_tunnel,
 				  uint32_t mask,
 				  uint8_t en)
@@ -3404,7 +3409,7 @@ rte_eth_dev_adjust_nb_desc(uint16_t *nb_desc,
 }
 
 int
-rte_eth_dev_adjust_nb_rx_tx_desc(uint8_t port_id,
+rte_eth_dev_adjust_nb_rx_tx_desc(uint16_t port_id,
 				 uint16_t *nb_rx_desc,
 				 uint16_t *nb_tx_desc)
 {
diff --git a/lib/librte_ether/rte_ethdev.h b/lib/librte_ether/rte_ethdev.h
index 99cdd54d4..34f729ab8 100644
--- a/lib/librte_ether/rte_ethdev.h
+++ b/lib/librte_ether/rte_ethdev.h
@@ -1572,7 +1572,7 @@ struct eth_dev_ops {
  * @return
  *   The number of packets returned to the user.
  */
-typedef uint16_t (*rte_rx_callback_fn)(uint8_t port, uint16_t queue,
+typedef uint16_t (*rte_rx_callback_fn)(uint16_t port, uint16_t queue,
 	struct rte_mbuf *pkts[], uint16_t nb_pkts, uint16_t max_pkts,
 	void *user_param);
 
@@ -1596,7 +1596,7 @@ typedef uint16_t (*rte_rx_callback_fn)(uint8_t port, uint16_t queue,
  * @return
  *   The number of packets to be written to the NIC.
  */
-typedef uint16_t (*rte_tx_callback_fn)(uint8_t port, uint16_t queue,
+typedef uint16_t (*rte_tx_callback_fn)(uint16_t port, uint16_t queue,
 	struct rte_mbuf *pkts[], uint16_t nb_pkts, void *user_param);
 
 /**
@@ -1699,7 +1699,7 @@ struct rte_eth_dev_data {
 	/** bitmap array of associating Ethernet MAC addresses to pools */
 	struct ether_addr* hash_mac_addrs;
 	/** Device Ethernet MAC addresses of hash filtering. */
-	uint8_t port_id;           /**< Device [external] port identifier. */
+	uint16_t port_id;           /**< Device [external] port identifier. */
 	__extension__
 	uint8_t promiscuous   : 1, /**< RX promiscuous mode ON(1) / OFF(0). */
 		scattered_rx : 1,  /**< RX of scattered packets is ON(1) / OFF(0) */
@@ -1741,7 +1741,7 @@ extern struct rte_eth_dev rte_eth_devices[];
  * @return
  *   Next valid port id, RTE_MAX_ETHPORTS if there is none.
  */
-uint8_t rte_eth_find_next(uint8_t port_id);
+uint16_t rte_eth_find_next(uint16_t port_id);
 
 /**
  * Macro to iterate over all enabled ethdev ports.
@@ -1764,7 +1764,7 @@ uint8_t rte_eth_find_next(uint8_t port_id);
  * @return
  *   - The total number of usable Ethernet devices.
  */
-uint8_t rte_eth_dev_count(void);
+uint16_t rte_eth_dev_count(void);
 
 /**
  * @internal
@@ -1825,7 +1825,7 @@ int rte_eth_dev_release_port(struct rte_eth_dev *eth_dev);
  * @return
  *  0 on success and port_id is filled, negative on error
  */
-int rte_eth_dev_attach(const char *devargs, uint8_t *port_id);
+int rte_eth_dev_attach(const char *devargs, uint16_t *port_id);
 
 /**
  * Detach a Ethernet device specified by port identifier.
@@ -1840,7 +1840,7 @@ int rte_eth_dev_attach(const char *devargs, uint8_t *port_id);
  * @return
  *  0 on success and devname is filled, negative on error
  */
-int rte_eth_dev_detach(uint8_t port_id, char *devname);
+int rte_eth_dev_detach(uint16_t port_id, char *devname);
 
 /**
  * Convert a numerical speed in Mbps to a bitmap flag that can be used in
@@ -1884,7 +1884,7 @@ uint32_t rte_eth_speed_bitflag(uint32_t speed, int duplex);
  *   - 0: Success, device configured.
  *   - <0: Error code returned by the driver configuration function.
  */
-int rte_eth_dev_configure(uint8_t port_id, uint16_t nb_rx_queue,
+int rte_eth_dev_configure(uint16_t port_id, uint16_t nb_rx_queue,
 		uint16_t nb_tx_queue, const struct rte_eth_conf *eth_conf);
 
 /**
@@ -1939,7 +1939,7 @@ void _rte_eth_dev_reset(struct rte_eth_dev *dev);
  *      allocate network memory buffers from the memory pool when
  *      initializing receive descriptors.
  */
-int rte_eth_rx_queue_setup(uint8_t port_id, uint16_t rx_queue_id,
+int rte_eth_rx_queue_setup(uint16_t port_id, uint16_t rx_queue_id,
 		uint16_t nb_rx_desc, unsigned int socket_id,
 		const struct rte_eth_rxconf *rx_conf,
 		struct rte_mempool *mb_pool);
@@ -1987,7 +1987,7 @@ int rte_eth_rx_queue_setup(uint8_t port_id, uint16_t rx_queue_id,
  *   - 0: Success, the transmit queue is correctly set up.
  *   - -ENOMEM: Unable to allocate the transmit ring descriptors.
  */
-int rte_eth_tx_queue_setup(uint8_t port_id, uint16_t tx_queue_id,
+int rte_eth_tx_queue_setup(uint16_t port_id, uint16_t tx_queue_id,
 		uint16_t nb_tx_desc, unsigned int socket_id,
 		const struct rte_eth_txconf *tx_conf);
 
@@ -2001,7 +2001,7 @@ int rte_eth_tx_queue_setup(uint8_t port_id, uint16_t tx_queue_id,
  *   a default of zero if the socket could not be determined.
  *   -1 is returned is the port_id value is out of range.
  */
-int rte_eth_dev_socket_id(uint8_t port_id);
+int rte_eth_dev_socket_id(uint16_t port_id);
 
 /**
  * Check if port_id of device is attached
@@ -2012,7 +2012,7 @@ int rte_eth_dev_socket_id(uint8_t port_id);
  *   - 0 if port is out of range or not attached
  *   - 1 if device is attached
  */
-int rte_eth_dev_is_valid_port(uint8_t port_id);
+int rte_eth_dev_is_valid_port(uint16_t port_id);
 
 /**
  * Start specified RX queue of a port. It is used when rx_deferred_start
@@ -2029,7 +2029,7 @@ int rte_eth_dev_is_valid_port(uint8_t port_id);
  *   - -EINVAL: The port_id or the queue_id out of range.
  *   - -ENOTSUP: The function not supported in PMD driver.
  */
-int rte_eth_dev_rx_queue_start(uint8_t port_id, uint16_t rx_queue_id);
+int rte_eth_dev_rx_queue_start(uint16_t port_id, uint16_t rx_queue_id);
 
 /**
  * Stop specified RX queue of a port
@@ -2045,7 +2045,7 @@ int rte_eth_dev_rx_queue_start(uint8_t port_id, uint16_t rx_queue_id);
  *   - -EINVAL: The port_id or the queue_id out of range.
  *   - -ENOTSUP: The function not supported in PMD driver.
  */
-int rte_eth_dev_rx_queue_stop(uint8_t port_id, uint16_t rx_queue_id);
+int rte_eth_dev_rx_queue_stop(uint16_t port_id, uint16_t rx_queue_id);
 
 /**
  * Start TX for specified queue of a port. It is used when tx_deferred_start
@@ -2062,7 +2062,7 @@ int rte_eth_dev_rx_queue_stop(uint8_t port_id, uint16_t rx_queue_id);
  *   - -EINVAL: The port_id or the queue_id out of range.
  *   - -ENOTSUP: The function not supported in PMD driver.
  */
-int rte_eth_dev_tx_queue_start(uint8_t port_id, uint16_t tx_queue_id);
+int rte_eth_dev_tx_queue_start(uint16_t port_id, uint16_t tx_queue_id);
 
 /**
  * Stop specified TX queue of a port
@@ -2078,7 +2078,7 @@ int rte_eth_dev_tx_queue_start(uint8_t port_id, uint16_t tx_queue_id);
  *   - -EINVAL: The port_id or the queue_id out of range.
  *   - -ENOTSUP: The function not supported in PMD driver.
  */
-int rte_eth_dev_tx_queue_stop(uint8_t port_id, uint16_t tx_queue_id);
+int rte_eth_dev_tx_queue_stop(uint16_t port_id, uint16_t tx_queue_id);
 
 
 
@@ -2097,7 +2097,7 @@ int rte_eth_dev_tx_queue_stop(uint8_t port_id, uint16_t tx_queue_id);
  *   - 0: Success, Ethernet device started.
  *   - <0: Error code of the driver device start function.
  */
-int rte_eth_dev_start(uint8_t port_id);
+int rte_eth_dev_start(uint16_t port_id);
 
 /**
  * Stop an Ethernet device. The device can be restarted with a call to
@@ -2106,7 +2106,7 @@ int rte_eth_dev_start(uint8_t port_id);
  * @param port_id
  *   The port identifier of the Ethernet device.
  */
-void rte_eth_dev_stop(uint8_t port_id);
+void rte_eth_dev_stop(uint16_t port_id);
 
 
 /**
@@ -2121,7 +2121,7 @@ void rte_eth_dev_stop(uint8_t port_id);
  *   - 0: Success, Ethernet device linked up.
  *   - <0: Error code of the driver device link up function.
  */
-int rte_eth_dev_set_link_up(uint8_t port_id);
+int rte_eth_dev_set_link_up(uint16_t port_id);
 
 /**
  * Link down an Ethernet device.
@@ -2132,7 +2132,7 @@ int rte_eth_dev_set_link_up(uint8_t port_id);
  * @param port_id
  *   The port identifier of the Ethernet device.
  */
-int rte_eth_dev_set_link_down(uint8_t port_id);
+int rte_eth_dev_set_link_down(uint16_t port_id);
 
 /**
  * Close a stopped Ethernet device. The device cannot be restarted!
@@ -2142,7 +2142,7 @@ int rte_eth_dev_set_link_down(uint8_t port_id);
  * @param port_id
  *   The port identifier of the Ethernet device.
  */
-void rte_eth_dev_close(uint8_t port_id);
+void rte_eth_dev_close(uint16_t port_id);
 
 /**
  * Reset a Ethernet device and keep its port id.
@@ -2172,7 +2172,7 @@ void rte_eth_dev_close(uint8_t port_id);
  * @param port_id
  *   The port identifier of the Ethernet device.
  */
-int rte_eth_dev_reset(uint8_t port_id);
+int rte_eth_dev_reset(uint16_t port_id);
 
 /**
  * Enable receipt in promiscuous mode for an Ethernet device.
@@ -2180,7 +2180,7 @@ int rte_eth_dev_reset(uint8_t port_id);
  * @param port_id
  *   The port identifier of the Ethernet device.
  */
-void rte_eth_promiscuous_enable(uint8_t port_id);
+void rte_eth_promiscuous_enable(uint16_t port_id);
 
 /**
  * Disable receipt in promiscuous mode for an Ethernet device.
@@ -2188,7 +2188,7 @@ void rte_eth_promiscuous_enable(uint8_t port_id);
  * @param port_id
  *   The port identifier of the Ethernet device.
  */
-void rte_eth_promiscuous_disable(uint8_t port_id);
+void rte_eth_promiscuous_disable(uint16_t port_id);
 
 /**
  * Return the value of promiscuous mode for an Ethernet device.
@@ -2200,7 +2200,7 @@ void rte_eth_promiscuous_disable(uint8_t port_id);
  *   - (0) if promiscuous is disabled.
  *   - (-1) on error
  */
-int rte_eth_promiscuous_get(uint8_t port_id);
+int rte_eth_promiscuous_get(uint16_t port_id);
 
 /**
  * Enable the receipt of any multicast frame by an Ethernet device.
@@ -2208,7 +2208,7 @@ int rte_eth_promiscuous_get(uint8_t port_id);
  * @param port_id
  *   The port identifier of the Ethernet device.
  */
-void rte_eth_allmulticast_enable(uint8_t port_id);
+void rte_eth_allmulticast_enable(uint16_t port_id);
 
 /**
  * Disable the receipt of all multicast frames by an Ethernet device.
@@ -2216,7 +2216,7 @@ void rte_eth_allmulticast_enable(uint8_t port_id);
  * @param port_id
  *   The port identifier of the Ethernet device.
  */
-void rte_eth_allmulticast_disable(uint8_t port_id);
+void rte_eth_allmulticast_disable(uint16_t port_id);
 
 /**
  * Return the value of allmulticast mode for an Ethernet device.
@@ -2228,7 +2228,7 @@ void rte_eth_allmulticast_disable(uint8_t port_id);
  *   - (0) if allmulticast is disabled.
  *   - (-1) on error
  */
-int rte_eth_allmulticast_get(uint8_t port_id);
+int rte_eth_allmulticast_get(uint16_t port_id);
 
 /**
  * Retrieve the status (ON/OFF), the speed (in Mbps) and the mode (HALF-DUPLEX
@@ -2241,7 +2241,7 @@ int rte_eth_allmulticast_get(uint8_t port_id);
  *   A pointer to an *rte_eth_link* structure to be filled with
  *   the status, the speed and the mode of the Ethernet device link.
  */
-void rte_eth_link_get(uint8_t port_id, struct rte_eth_link *link);
+void rte_eth_link_get(uint16_t port_id, struct rte_eth_link *link);
 
 /**
  * Retrieve the status (ON/OFF), the speed (in Mbps) and the mode (HALF-DUPLEX
@@ -2254,7 +2254,7 @@ void rte_eth_link_get(uint8_t port_id, struct rte_eth_link *link);
  *   A pointer to an *rte_eth_link* structure to be filled with
  *   the status, the speed and the mode of the Ethernet device link.
  */
-void rte_eth_link_get_nowait(uint8_t port_id, struct rte_eth_link *link);
+void rte_eth_link_get_nowait(uint16_t port_id, struct rte_eth_link *link);
 
 /**
  * Retrieve the general I/O statistics of an Ethernet device.
@@ -2273,7 +2273,7 @@ void rte_eth_link_get_nowait(uint8_t port_id, struct rte_eth_link *link);
  * @return
  *   Zero if successful. Non-zero otherwise.
  */
-int rte_eth_stats_get(uint8_t port_id, struct rte_eth_stats *stats);
+int rte_eth_stats_get(uint16_t port_id, struct rte_eth_stats *stats);
 
 /**
  * Reset the general I/O statistics of an Ethernet device.
@@ -2281,7 +2281,7 @@ int rte_eth_stats_get(uint8_t port_id, struct rte_eth_stats *stats);
  * @param port_id
  *   The port identifier of the Ethernet device.
  */
-void rte_eth_stats_reset(uint8_t port_id);
+void rte_eth_stats_reset(uint16_t port_id);
 
 /**
  * Retrieve names of extended statistics of an Ethernet device.
@@ -2303,7 +2303,7 @@ void rte_eth_stats_reset(uint8_t port_id);
  *     shall not be used by the caller.
  *   - A negative value on error (invalid port id).
  */
-int rte_eth_xstats_get_names(uint8_t port_id,
+int rte_eth_xstats_get_names(uint16_t port_id,
 		struct rte_eth_xstat_name *xstats_names,
 		unsigned int size);
 
@@ -2329,7 +2329,7 @@ int rte_eth_xstats_get_names(uint8_t port_id,
  *     shall not be used by the caller.
  *   - A negative value on error (invalid port id).
  */
-int rte_eth_xstats_get(uint8_t port_id, struct rte_eth_xstat *xstats,
+int rte_eth_xstats_get(uint16_t port_id, struct rte_eth_xstat *xstats,
 		unsigned int n);
 
 /**
@@ -2355,7 +2355,7 @@ int rte_eth_xstats_get(uint8_t port_id, struct rte_eth_xstat *xstats,
  *   - A negative value on error (invalid port id).
  */
 int
-rte_eth_xstats_get_names_by_id(uint8_t port_id,
+rte_eth_xstats_get_names_by_id(uint16_t port_id,
 	struct rte_eth_xstat_name *xstats_names, unsigned int size,
 	uint64_t *ids);
 
@@ -2382,7 +2382,7 @@ rte_eth_xstats_get_names_by_id(uint8_t port_id,
  *     shall not be used by the caller.
  *   - A negative value on error (invalid port id).
  */
-int rte_eth_xstats_get_by_id(uint8_t port_id, const uint64_t *ids,
+int rte_eth_xstats_get_by_id(uint16_t port_id, const uint64_t *ids,
 			     uint64_t *values, unsigned int n);
 
 /**
@@ -2402,7 +2402,7 @@ int rte_eth_xstats_get_by_id(uint8_t port_id, const uint64_t *ids,
  *    -ENODEV for invalid port_id,
  *    -EINVAL if the xstat_name doesn't exist in port_id
  */
-int rte_eth_xstats_get_id_by_name(uint8_t port_id, const char *xstat_name,
+int rte_eth_xstats_get_id_by_name(uint16_t port_id, const char *xstat_name,
 		uint64_t *id);
 
 /**
@@ -2411,7 +2411,7 @@ int rte_eth_xstats_get_id_by_name(uint8_t port_id, const char *xstat_name,
  * @param port_id
  *   The port identifier of the Ethernet device.
  */
-void rte_eth_xstats_reset(uint8_t port_id);
+void rte_eth_xstats_reset(uint16_t port_id);
 
 /**
  *  Set a mapping for the specified transmit queue to the specified per-queue
@@ -2430,7 +2430,7 @@ void rte_eth_xstats_reset(uint8_t port_id);
  * @return
  *   Zero if successful. Non-zero otherwise.
  */
-int rte_eth_dev_set_tx_queue_stats_mapping(uint8_t port_id,
+int rte_eth_dev_set_tx_queue_stats_mapping(uint16_t port_id,
 		uint16_t tx_queue_id, uint8_t stat_idx);
 
 /**
@@ -2450,7 +2450,7 @@ int rte_eth_dev_set_tx_queue_stats_mapping(uint8_t port_id,
  * @return
  *   Zero if successful. Non-zero otherwise.
  */
-int rte_eth_dev_set_rx_queue_stats_mapping(uint8_t port_id,
+int rte_eth_dev_set_rx_queue_stats_mapping(uint16_t port_id,
 					   uint16_t rx_queue_id,
 					   uint8_t stat_idx);
 
@@ -2463,7 +2463,7 @@ int rte_eth_dev_set_rx_queue_stats_mapping(uint8_t port_id,
  *   A pointer to a structure of type *ether_addr* to be filled with
  *   the Ethernet address of the Ethernet device.
  */
-void rte_eth_macaddr_get(uint8_t port_id, struct ether_addr *mac_addr);
+void rte_eth_macaddr_get(uint16_t port_id, struct ether_addr *mac_addr);
 
 /**
  * Retrieve the contextual information of an Ethernet device.
@@ -2474,7 +2474,7 @@ void rte_eth_macaddr_get(uint8_t port_id, struct ether_addr *mac_addr);
  *   A pointer to a structure of type *rte_eth_dev_info* to be filled with
  *   the contextual information of the Ethernet device.
  */
-void rte_eth_dev_info_get(uint8_t port_id, struct rte_eth_dev_info *dev_info);
+void rte_eth_dev_info_get(uint16_t port_id, struct rte_eth_dev_info *dev_info);
 
 /**
  * Retrieve the firmware version of a device.
@@ -2494,7 +2494,7 @@ void rte_eth_dev_info_get(uint8_t port_id, struct rte_eth_dev_info *dev_info);
  *   - (>0) if *fw_size* is not enough to store firmware version, return
  *          the size of the non truncated string.
  */
-int rte_eth_dev_fw_version_get(uint8_t port_id,
+int rte_eth_dev_fw_version_get(uint16_t port_id,
 			       char *fw_version, size_t fw_size);
 
 /**
@@ -2535,7 +2535,7 @@ int rte_eth_dev_fw_version_get(uint8_t port_id,
  *           count of supported ptypes will be returned.
  *   - (-ENODEV) if *port_id* invalid.
  */
-int rte_eth_dev_get_supported_ptypes(uint8_t port_id, uint32_t ptype_mask,
+int rte_eth_dev_get_supported_ptypes(uint16_t port_id, uint32_t ptype_mask,
 				     uint32_t *ptypes, int num);
 
 /**
@@ -2549,7 +2549,7 @@ int rte_eth_dev_get_supported_ptypes(uint8_t port_id, uint32_t ptype_mask,
  *   - (0) if successful.
  *   - (-ENODEV) if *port_id* invalid.
  */
-int rte_eth_dev_get_mtu(uint8_t port_id, uint16_t *mtu);
+int rte_eth_dev_get_mtu(uint16_t port_id, uint16_t *mtu);
 
 /**
  * Change the MTU of an Ethernet device.
@@ -2565,7 +2565,7 @@ int rte_eth_dev_get_mtu(uint8_t port_id, uint16_t *mtu);
  *   - (-EINVAL) if *mtu* invalid.
  *   - (-EBUSY) if operation is not allowed when the port is running
  */
-int rte_eth_dev_set_mtu(uint8_t port_id, uint16_t mtu);
+int rte_eth_dev_set_mtu(uint16_t port_id, uint16_t mtu);
 
 /**
  * Enable/Disable hardware filtering by an Ethernet device of received
@@ -2585,7 +2585,7 @@ int rte_eth_dev_set_mtu(uint8_t port_id, uint16_t mtu);
  *   - (-ENOSYS) if VLAN filtering on *port_id* disabled.
  *   - (-EINVAL) if *vlan_id* > 4095.
  */
-int rte_eth_dev_vlan_filter(uint8_t port_id, uint16_t vlan_id, int on);
+int rte_eth_dev_vlan_filter(uint16_t port_id, uint16_t vlan_id, int on);
 
 /**
  * Enable/Disable hardware VLAN Strip by a rx queue of an Ethernet device.
@@ -2606,7 +2606,7 @@ int rte_eth_dev_vlan_filter(uint8_t port_id, uint16_t vlan_id, int on);
  *   - (-ENODEV) if *port_id* invalid.
  *   - (-EINVAL) if *rx_queue_id* invalid.
  */
-int rte_eth_dev_set_vlan_strip_on_queue(uint8_t port_id, uint16_t rx_queue_id,
+int rte_eth_dev_set_vlan_strip_on_queue(uint16_t port_id, uint16_t rx_queue_id,
 		int on);
 
 /**
@@ -2625,7 +2625,7 @@ int rte_eth_dev_set_vlan_strip_on_queue(uint8_t port_id, uint16_t rx_queue_id,
  *   - (-ENOSUP) if hardware-assisted VLAN TPID setup is not supported.
  *   - (-ENODEV) if *port_id* invalid.
  */
-int rte_eth_dev_set_vlan_ether_type(uint8_t port_id,
+int rte_eth_dev_set_vlan_ether_type(uint16_t port_id,
 				    enum rte_vlan_type vlan_type,
 				    uint16_t tag_type);
 
@@ -2649,7 +2649,7 @@ int rte_eth_dev_set_vlan_ether_type(uint8_t port_id,
  *   - (-ENOSUP) if hardware-assisted VLAN filtering not configured.
  *   - (-ENODEV) if *port_id* invalid.
  */
-int rte_eth_dev_set_vlan_offload(uint8_t port_id, int offload_mask);
+int rte_eth_dev_set_vlan_offload(uint16_t port_id, int offload_mask);
 
 /**
  * Read VLAN Offload configuration from an Ethernet device
@@ -2663,7 +2663,7 @@ int rte_eth_dev_set_vlan_offload(uint8_t port_id, int offload_mask);
  *       ETH_VLAN_EXTEND_OFFLOAD
  *   - (-ENODEV) if *port_id* invalid.
  */
-int rte_eth_dev_get_vlan_offload(uint8_t port_id);
+int rte_eth_dev_get_vlan_offload(uint16_t port_id);
 
 /**
  * Set port based TX VLAN insertion on or off.
@@ -2679,7 +2679,7 @@ int rte_eth_dev_get_vlan_offload(uint8_t port_id);
  *   - (0) if successful.
  *   - negative if failed.
  */
-int rte_eth_dev_set_vlan_pvid(uint8_t port_id, uint16_t pvid, int on);
+int rte_eth_dev_set_vlan_pvid(uint16_t port_id, uint16_t pvid, int on);
 
 /**
  *
@@ -2764,7 +2764,7 @@ int rte_eth_dev_set_vlan_pvid(uint8_t port_id, uint16_t pvid, int on);
  *   *rx_pkts* array.
  */
 static inline uint16_t
-rte_eth_rx_burst(uint8_t port_id, uint16_t queue_id,
+rte_eth_rx_burst(uint16_t port_id, uint16_t queue_id,
 		 struct rte_mbuf **rx_pkts, const uint16_t nb_pkts)
 {
 	struct rte_eth_dev *dev = &rte_eth_devices[port_id];
@@ -2809,7 +2809,7 @@ rte_eth_rx_burst(uint8_t port_id, uint16_t queue_id,
  *     (-ENOTSUP) if the device does not support this function
  */
 static inline int
-rte_eth_rx_queue_count(uint8_t port_id, uint16_t queue_id)
+rte_eth_rx_queue_count(uint16_t port_id, uint16_t queue_id)
 {
 	struct rte_eth_dev *dev;
 
@@ -2838,7 +2838,7 @@ rte_eth_rx_queue_count(uint8_t port_id, uint16_t queue_id)
  *  - (-ENOTSUP) if the device does not support this function
  */
 static inline int
-rte_eth_rx_descriptor_done(uint8_t port_id, uint16_t queue_id, uint16_t offset)
+rte_eth_rx_descriptor_done(uint16_t port_id, uint16_t queue_id, uint16_t offset)
 {
 	struct rte_eth_dev *dev = &rte_eth_devices[port_id];
 	RTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -ENODEV);
@@ -2885,7 +2885,7 @@ rte_eth_rx_descriptor_done(uint8_t port_id, uint16_t queue_id, uint16_t offset)
  *  - (-ENODEV) bad port or queue (only if compiled with debug).
  */
 static inline int
-rte_eth_rx_descriptor_status(uint8_t port_id, uint16_t queue_id,
+rte_eth_rx_descriptor_status(uint16_t port_id, uint16_t queue_id,
 	uint16_t offset)
 {
 	struct rte_eth_dev *dev;
@@ -2942,7 +2942,7 @@ rte_eth_rx_descriptor_status(uint8_t port_id, uint16_t queue_id,
  *  - (-ENOTSUP) if the device does not support this function.
  *  - (-ENODEV) bad port or queue (only if compiled with debug).
  */
-static inline int rte_eth_tx_descriptor_status(uint8_t port_id,
+static inline int rte_eth_tx_descriptor_status(uint16_t port_id,
 	uint16_t queue_id, uint16_t offset)
 {
 	struct rte_eth_dev *dev;
@@ -3026,7 +3026,7 @@ static inline int rte_eth_tx_descriptor_status(uint8_t port_id,
  *   *tx_pkts* parameter when the transmit ring is full or has been filled up.
  */
 static inline uint16_t
-rte_eth_tx_burst(uint8_t port_id, uint16_t queue_id,
+rte_eth_tx_burst(uint16_t port_id, uint16_t queue_id,
 		 struct rte_mbuf **tx_pkts, uint16_t nb_pkts)
 {
 	struct rte_eth_dev *dev = &rte_eth_devices[port_id];
@@ -3115,7 +3115,7 @@ rte_eth_tx_burst(uint8_t port_id, uint16_t queue_id,
 #ifndef RTE_ETHDEV_TX_PREPARE_NOOP
 
 static inline uint16_t
-rte_eth_tx_prepare(uint8_t port_id, uint16_t queue_id,
+rte_eth_tx_prepare(uint16_t port_id, uint16_t queue_id,
 		struct rte_mbuf **tx_pkts, uint16_t nb_pkts)
 {
 	struct rte_eth_dev *dev;
@@ -3157,7 +3157,8 @@ rte_eth_tx_prepare(uint8_t port_id, uint16_t queue_id,
  */
 
 static inline uint16_t
-rte_eth_tx_prepare(__rte_unused uint8_t port_id, __rte_unused uint16_t queue_id,
+rte_eth_tx_prepare(__rte_unused uint16_t port_id,
+		__rte_unused uint16_t queue_id,
 		__rte_unused struct rte_mbuf **tx_pkts, uint16_t nb_pkts)
 {
 	return nb_pkts;
@@ -3226,7 +3227,7 @@ rte_eth_tx_buffer_init(struct rte_eth_dev_tx_buffer *buffer, uint16_t size);
  *   callback is called for any packets which could not be sent.
  */
 static inline uint16_t
-rte_eth_tx_buffer_flush(uint8_t port_id, uint16_t queue_id,
+rte_eth_tx_buffer_flush(uint16_t port_id, uint16_t queue_id,
 		struct rte_eth_dev_tx_buffer *buffer)
 {
 	uint16_t sent;
@@ -3278,7 +3279,7 @@ rte_eth_tx_buffer_flush(uint8_t port_id, uint16_t queue_id,
  *     the rest.
  */
 static __rte_always_inline uint16_t
-rte_eth_tx_buffer(uint8_t port_id, uint16_t queue_id,
+rte_eth_tx_buffer(uint16_t port_id, uint16_t queue_id,
 		struct rte_eth_dev_tx_buffer *buffer, struct rte_mbuf *tx_pkt)
 {
 	buffer->pkts[buffer->length++] = tx_pkt;
@@ -3394,7 +3395,7 @@ rte_eth_tx_buffer_count_callback(struct rte_mbuf **pkts, uint16_t unsent,
  *     are in use.
  */
 int
-rte_eth_tx_done_cleanup(uint8_t port_id, uint16_t queue_id, uint32_t free_cnt);
+rte_eth_tx_done_cleanup(uint16_t port_id, uint16_t queue_id, uint32_t free_cnt);
 
 /**
  * The eth device event type for interrupt, and maybe others in the future.
@@ -3412,7 +3413,7 @@ enum rte_eth_event_type {
 	RTE_ETH_EVENT_MAX       /**< max value of this enum */
 };
 
-typedef int (*rte_eth_dev_cb_fn)(uint8_t port_id,
+typedef int (*rte_eth_dev_cb_fn)(uint16_t port_id,
 		enum rte_eth_event_type event, void *cb_arg, void *ret_param);
 /**< user application callback to be registered for interrupts */
 
@@ -3434,7 +3435,7 @@ typedef int (*rte_eth_dev_cb_fn)(uint8_t port_id,
  *  - On success, zero.
  *  - On failure, a negative value.
  */
-int rte_eth_dev_callback_register(uint8_t port_id,
+int rte_eth_dev_callback_register(uint16_t port_id,
 			enum rte_eth_event_type event,
 		rte_eth_dev_cb_fn cb_fn, void *cb_arg);
 
@@ -3455,7 +3456,7 @@ int rte_eth_dev_callback_register(uint8_t port_id,
  *  - On success, zero.
  *  - On failure, a negative value.
  */
-int rte_eth_dev_callback_unregister(uint8_t port_id,
+int rte_eth_dev_callback_unregister(uint16_t port_id,
 			enum rte_eth_event_type event,
 		rte_eth_dev_cb_fn cb_fn, void *cb_arg);
 
@@ -3501,7 +3502,7 @@ int _rte_eth_dev_callback_process(struct rte_eth_dev *dev,
  *     that operation.
  *   - (-ENODEV) if *port_id* invalid.
  */
-int rte_eth_dev_rx_intr_enable(uint8_t port_id, uint16_t queue_id);
+int rte_eth_dev_rx_intr_enable(uint16_t port_id, uint16_t queue_id);
 
 /**
  * When lcore wakes up from rx interrupt indicating packet coming, disable rx
@@ -3522,7 +3523,7 @@ int rte_eth_dev_rx_intr_enable(uint8_t port_id, uint16_t queue_id);
  *     that operation.
  *   - (-ENODEV) if *port_id* invalid.
  */
-int rte_eth_dev_rx_intr_disable(uint8_t port_id, uint16_t queue_id);
+int rte_eth_dev_rx_intr_disable(uint16_t port_id, uint16_t queue_id);
 
 /**
  * RX Interrupt control per port.
@@ -3541,7 +3542,7 @@ int rte_eth_dev_rx_intr_disable(uint8_t port_id, uint16_t queue_id);
  *   - On success, zero.
  *   - On failure, a negative value.
  */
-int rte_eth_dev_rx_intr_ctl(uint8_t port_id, int epfd, int op, void *data);
+int rte_eth_dev_rx_intr_ctl(uint16_t port_id, int epfd, int op, void *data);
 
 /**
  * RX Interrupt control per queue.
@@ -3564,7 +3565,7 @@ int rte_eth_dev_rx_intr_ctl(uint8_t port_id, int epfd, int op, void *data);
  *   - On success, zero.
  *   - On failure, a negative value.
  */
-int rte_eth_dev_rx_intr_ctl_q(uint8_t port_id, uint16_t queue_id,
+int rte_eth_dev_rx_intr_ctl_q(uint16_t port_id, uint16_t queue_id,
 			      int epfd, int op, void *data);
 
 /**
@@ -3579,7 +3580,7 @@ int rte_eth_dev_rx_intr_ctl_q(uint8_t port_id, uint16_t queue_id,
  *     that operation.
  *   - (-ENODEV) if *port_id* invalid.
  */
-int  rte_eth_led_on(uint8_t port_id);
+int  rte_eth_led_on(uint16_t port_id);
 
 /**
  * Turn off the LED on the Ethernet device.
@@ -3593,7 +3594,7 @@ int  rte_eth_led_on(uint8_t port_id);
  *     that operation.
  *   - (-ENODEV) if *port_id* invalid.
  */
-int  rte_eth_led_off(uint8_t port_id);
+int  rte_eth_led_off(uint16_t port_id);
 
 /**
  * Get current status of the Ethernet link flow control for Ethernet device
@@ -3607,7 +3608,7 @@ int  rte_eth_led_off(uint8_t port_id);
  *   - (-ENOTSUP) if hardware doesn't support flow control.
  *   - (-ENODEV)  if *port_id* invalid.
  */
-int rte_eth_dev_flow_ctrl_get(uint8_t port_id,
+int rte_eth_dev_flow_ctrl_get(uint16_t port_id,
 			      struct rte_eth_fc_conf *fc_conf);
 
 /**
@@ -3624,7 +3625,7 @@ int rte_eth_dev_flow_ctrl_get(uint8_t port_id,
  *   - (-EINVAL)  if bad parameter
  *   - (-EIO)     if flow control setup failure
  */
-int rte_eth_dev_flow_ctrl_set(uint8_t port_id,
+int rte_eth_dev_flow_ctrl_set(uint16_t port_id,
 			      struct rte_eth_fc_conf *fc_conf);
 
 /**
@@ -3642,7 +3643,7 @@ int rte_eth_dev_flow_ctrl_set(uint8_t port_id,
  *   - (-EINVAL)  if bad parameter
  *   - (-EIO)     if flow control setup failure
  */
-int rte_eth_dev_priority_flow_ctrl_set(uint8_t port_id,
+int rte_eth_dev_priority_flow_ctrl_set(uint16_t port_id,
 				struct rte_eth_pfc_conf *pfc_conf);
 
 /**
@@ -3663,7 +3664,7 @@ int rte_eth_dev_priority_flow_ctrl_set(uint8_t port_id,
  *   - (-ENOSPC) if no more MAC addresses can be added.
  *   - (-EINVAL) if MAC address is invalid.
  */
-int rte_eth_dev_mac_addr_add(uint8_t port, struct ether_addr *mac_addr,
+int rte_eth_dev_mac_addr_add(uint16_t port, struct ether_addr *mac_addr,
 				uint32_t pool);
 
 /**
@@ -3679,7 +3680,7 @@ int rte_eth_dev_mac_addr_add(uint8_t port, struct ether_addr *mac_addr,
  *   - (-ENODEV) if *port* invalid.
  *   - (-EADDRINUSE) if attempting to remove the default MAC address
  */
-int rte_eth_dev_mac_addr_remove(uint8_t port, struct ether_addr *mac_addr);
+int rte_eth_dev_mac_addr_remove(uint16_t port, struct ether_addr *mac_addr);
 
 /**
  * Set the default MAC address.
@@ -3694,8 +3695,8 @@ int rte_eth_dev_mac_addr_remove(uint8_t port, struct ether_addr *mac_addr);
  *   - (-ENODEV) if *port* invalid.
  *   - (-EINVAL) if MAC address is invalid.
  */
-int rte_eth_dev_default_mac_addr_set(uint8_t port, struct ether_addr *mac_addr);
-
+int rte_eth_dev_default_mac_addr_set(uint16_t port,
+		struct ether_addr *mac_addr);
 
 /**
  * Update Redirection Table(RETA) of Receive Side Scaling of Ethernet device.
@@ -3712,7 +3713,7 @@ int rte_eth_dev_default_mac_addr_set(uint8_t port, struct ether_addr *mac_addr);
  *   - (-ENOTSUP) if hardware doesn't support.
  *   - (-EINVAL) if bad parameter.
  */
-int rte_eth_dev_rss_reta_update(uint8_t port,
+int rte_eth_dev_rss_reta_update(uint16_t port,
 				struct rte_eth_rss_reta_entry64 *reta_conf,
 				uint16_t reta_size);
 
@@ -3731,7 +3732,7 @@ int rte_eth_dev_rss_reta_update(uint8_t port,
  *   - (-ENOTSUP) if hardware doesn't support.
  *   - (-EINVAL) if bad parameter.
  */
-int rte_eth_dev_rss_reta_query(uint8_t port,
+int rte_eth_dev_rss_reta_query(uint16_t port,
 			       struct rte_eth_rss_reta_entry64 *reta_conf,
 			       uint16_t reta_size);
 
@@ -3753,8 +3754,8 @@ int rte_eth_dev_rss_reta_query(uint8_t port,
   *  - (-ENODEV) if *port_id* invalid.
  *   - (-EINVAL) if bad parameter.
  */
-int rte_eth_dev_uc_hash_table_set(uint8_t port,struct ether_addr *addr,
-					uint8_t on);
+int rte_eth_dev_uc_hash_table_set(uint16_t port, struct ether_addr *addr,
+				  uint8_t on);
 
  /**
  * Updates all unicast hash bitmaps for receiving packet with any Unicast
@@ -3773,7 +3774,7 @@ int rte_eth_dev_uc_hash_table_set(uint8_t port,struct ether_addr *addr,
   *  - (-ENODEV) if *port_id* invalid.
  *   - (-EINVAL) if bad parameter.
  */
-int rte_eth_dev_uc_all_hash_table_set(uint8_t port,uint8_t on);
+int rte_eth_dev_uc_all_hash_table_set(uint16_t port, uint8_t on);
 
 /**
  * Set a traffic mirroring rule on an Ethernet device
@@ -3796,7 +3797,7 @@ int rte_eth_dev_uc_all_hash_table_set(uint8_t port,uint8_t on);
  *   - (-ENODEV) if *port_id* invalid.
  *   - (-EINVAL) if the mr_conf information is not correct.
  */
-int rte_eth_mirror_rule_set(uint8_t port_id,
+int rte_eth_mirror_rule_set(uint16_t port_id,
 			struct rte_eth_mirror_conf *mirror_conf,
 			uint8_t rule_id,
 			uint8_t on);
@@ -3814,7 +3815,7 @@ int rte_eth_mirror_rule_set(uint8_t port_id,
  *   - (-ENODEV) if *port_id* invalid.
  *   - (-EINVAL) if bad parameter.
  */
-int rte_eth_mirror_rule_reset(uint8_t port_id,
+int rte_eth_mirror_rule_reset(uint16_t port_id,
 					 uint8_t rule_id);
 
 /**
@@ -3832,7 +3833,7 @@ int rte_eth_mirror_rule_reset(uint8_t port_id,
  *   - (-ENODEV) if *port_id* invalid.
  *   - (-EINVAL) if bad parameter.
  */
-int rte_eth_set_queue_rate_limit(uint8_t port_id, uint16_t queue_idx,
+int rte_eth_set_queue_rate_limit(uint16_t port_id, uint16_t queue_idx,
 			uint16_t tx_rate);
 
  /**
@@ -3848,7 +3849,7 @@ int rte_eth_set_queue_rate_limit(uint8_t port_id, uint16_t queue_idx,
  *   - (-ENOTSUP) if hardware doesn't support.
  *   - (-EINVAL) if bad parameter.
  */
-int rte_eth_dev_rss_hash_update(uint8_t port_id,
+int rte_eth_dev_rss_hash_update(uint16_t port_id,
 				struct rte_eth_rss_conf *rss_conf);
 
  /**
@@ -3865,7 +3866,7 @@ int rte_eth_dev_rss_hash_update(uint8_t port_id,
  *   - (-ENOTSUP) if hardware doesn't support RSS.
  */
 int
-rte_eth_dev_rss_hash_conf_get(uint8_t port_id,
+rte_eth_dev_rss_hash_conf_get(uint16_t port_id,
 			      struct rte_eth_rss_conf *rss_conf);
 
  /**
@@ -3886,7 +3887,7 @@ rte_eth_dev_rss_hash_conf_get(uint8_t port_id,
  *   - (-ENOTSUP) if hardware doesn't support tunnel type.
  */
 int
-rte_eth_dev_udp_tunnel_port_add(uint8_t port_id,
+rte_eth_dev_udp_tunnel_port_add(uint16_t port_id,
 				struct rte_eth_udp_tunnel *tunnel_udp);
 
  /**
@@ -3908,7 +3909,7 @@ rte_eth_dev_udp_tunnel_port_add(uint8_t port_id,
  *   - (-ENOTSUP) if hardware doesn't support tunnel type.
  */
 int
-rte_eth_dev_udp_tunnel_port_delete(uint8_t port_id,
+rte_eth_dev_udp_tunnel_port_delete(uint16_t port_id,
 				   struct rte_eth_udp_tunnel *tunnel_udp);
 
 /**
@@ -3924,7 +3925,8 @@ rte_eth_dev_udp_tunnel_port_delete(uint8_t port_id,
  *   - (-ENOTSUP) if hardware doesn't support this filter type.
  *   - (-ENODEV) if *port_id* invalid.
  */
-int rte_eth_dev_filter_supported(uint8_t port_id, enum rte_filter_type filter_type);
+int rte_eth_dev_filter_supported(uint16_t port_id,
+		enum rte_filter_type filter_type);
 
 /**
  * Take operations to assigned filter type on an Ethernet device.
@@ -3944,7 +3946,7 @@ int rte_eth_dev_filter_supported(uint8_t port_id, enum rte_filter_type filter_ty
  *   - (-ENODEV) if *port_id* invalid.
  *   - others depends on the specific operations implementation.
  */
-int rte_eth_dev_filter_ctrl(uint8_t port_id, enum rte_filter_type filter_type,
+int rte_eth_dev_filter_ctrl(uint16_t port_id, enum rte_filter_type filter_type,
 			enum rte_filter_op filter_op, void *arg);
 
 /**
@@ -3959,7 +3961,7 @@ int rte_eth_dev_filter_ctrl(uint8_t port_id, enum rte_filter_type filter_type,
  *   - (-ENODEV) if port identifier is invalid.
  *   - (-ENOTSUP) if hardware doesn't support.
  */
-int rte_eth_dev_get_dcb_info(uint8_t port_id,
+int rte_eth_dev_get_dcb_info(uint16_t port_id,
 			     struct rte_eth_dcb_info *dcb_info);
 
 /**
@@ -3986,7 +3988,7 @@ int rte_eth_dev_get_dcb_info(uint8_t port_id,
  *   NULL on error.
  *   On success, a pointer value which can later be used to remove the callback.
  */
-void *rte_eth_add_rx_callback(uint8_t port_id, uint16_t queue_id,
+void *rte_eth_add_rx_callback(uint16_t port_id, uint16_t queue_id,
 		rte_rx_callback_fn fn, void *user_param);
 
 /**
@@ -4014,7 +4016,7 @@ void *rte_eth_add_rx_callback(uint8_t port_id, uint16_t queue_id,
  *   NULL on error.
  *   On success, a pointer value which can later be used to remove the callback.
  */
-void *rte_eth_add_first_rx_callback(uint8_t port_id, uint16_t queue_id,
+void *rte_eth_add_first_rx_callback(uint16_t port_id, uint16_t queue_id,
 		rte_rx_callback_fn fn, void *user_param);
 
 /**
@@ -4041,7 +4043,7 @@ void *rte_eth_add_first_rx_callback(uint8_t port_id, uint16_t queue_id,
  *   NULL on error.
  *   On success, a pointer value which can later be used to remove the callback.
  */
-void *rte_eth_add_tx_callback(uint8_t port_id, uint16_t queue_id,
+void *rte_eth_add_tx_callback(uint16_t port_id, uint16_t queue_id,
 		rte_tx_callback_fn fn, void *user_param);
 
 /**
@@ -4074,7 +4076,7 @@ void *rte_eth_add_tx_callback(uint8_t port_id, uint16_t queue_id,
  *   - -EINVAL:  The port_id or the queue_id is out of range, or the callback
  *               is NULL or not found for the port/queue.
  */
-int rte_eth_remove_rx_callback(uint8_t port_id, uint16_t queue_id,
+int rte_eth_remove_rx_callback(uint16_t port_id, uint16_t queue_id,
 		struct rte_eth_rxtx_callback *user_cb);
 
 /**
@@ -4107,7 +4109,7 @@ int rte_eth_remove_rx_callback(uint8_t port_id, uint16_t queue_id,
  *   - -EINVAL:  The port_id or the queue_id is out of range, or the callback
  *               is NULL or not found for the port/queue.
  */
-int rte_eth_remove_tx_callback(uint8_t port_id, uint16_t queue_id,
+int rte_eth_remove_tx_callback(uint16_t port_id, uint16_t queue_id,
 		struct rte_eth_rxtx_callback *user_cb);
 
 /**
@@ -4127,7 +4129,7 @@ int rte_eth_remove_tx_callback(uint8_t port_id, uint16_t queue_id,
  *   - -ENOTSUP: routine is not supported by the device PMD.
  *   - -EINVAL:  The port_id or the queue_id is out of range.
  */
-int rte_eth_rx_queue_info_get(uint8_t port_id, uint16_t queue_id,
+int rte_eth_rx_queue_info_get(uint16_t port_id, uint16_t queue_id,
 	struct rte_eth_rxq_info *qinfo);
 
 /**
@@ -4147,7 +4149,7 @@ int rte_eth_rx_queue_info_get(uint8_t port_id, uint16_t queue_id,
  *   - -ENOTSUP: routine is not supported by the device PMD.
  *   - -EINVAL:  The port_id or the queue_id is out of range.
  */
-int rte_eth_tx_queue_info_get(uint8_t port_id, uint16_t queue_id,
+int rte_eth_tx_queue_info_get(uint16_t port_id, uint16_t queue_id,
 	struct rte_eth_txq_info *qinfo);
 
 /**
@@ -4166,7 +4168,7 @@ int rte_eth_tx_queue_info_get(uint8_t port_id, uint16_t queue_id,
  *   - (-ENODEV) if *port_id* invalid.
  *   - others depends on the specific operations implementation.
  */
-int rte_eth_dev_get_reg_info(uint8_t port_id, struct rte_dev_reg_info *info);
+int rte_eth_dev_get_reg_info(uint16_t port_id, struct rte_dev_reg_info *info);
 
 /**
  * Retrieve size of device EEPROM
@@ -4179,7 +4181,7 @@ int rte_eth_dev_get_reg_info(uint8_t port_id, struct rte_dev_reg_info *info);
  *   - (-ENODEV) if *port_id* invalid.
  *   - others depends on the specific operations implementation.
  */
-int rte_eth_dev_get_eeprom_length(uint8_t port_id);
+int rte_eth_dev_get_eeprom_length(uint16_t port_id);
 
 /**
  * Retrieve EEPROM and EEPROM attribute
@@ -4195,7 +4197,7 @@ int rte_eth_dev_get_eeprom_length(uint8_t port_id);
  *   - (-ENODEV) if *port_id* invalid.
  *   - others depends on the specific operations implementation.
  */
-int rte_eth_dev_get_eeprom(uint8_t port_id, struct rte_dev_eeprom_info *info);
+int rte_eth_dev_get_eeprom(uint16_t port_id, struct rte_dev_eeprom_info *info);
 
 /**
  * Program EEPROM with provided data
@@ -4211,7 +4213,7 @@ int rte_eth_dev_get_eeprom(uint8_t port_id, struct rte_dev_eeprom_info *info);
  *   - (-ENODEV) if *port_id* invalid.
  *   - others depends on the specific operations implementation.
  */
-int rte_eth_dev_set_eeprom(uint8_t port_id, struct rte_dev_eeprom_info *info);
+int rte_eth_dev_set_eeprom(uint16_t port_id, struct rte_dev_eeprom_info *info);
 
 /**
  * Set the list of multicast addresses to filter on an Ethernet device.
@@ -4230,7 +4232,7 @@ int rte_eth_dev_set_eeprom(uint8_t port_id, struct rte_dev_eeprom_info *info);
  *   - (-ENOTSUP) if PMD of *port_id* doesn't support multicast filtering.
  *   - (-ENOSPC) if *port_id* has not enough multicast filtering resources.
  */
-int rte_eth_dev_set_mc_addr_list(uint8_t port_id,
+int rte_eth_dev_set_mc_addr_list(uint16_t port_id,
 				 struct ether_addr *mc_addr_set,
 				 uint32_t nb_mc_addr);
 
@@ -4245,7 +4247,7 @@ int rte_eth_dev_set_mc_addr_list(uint8_t port_id,
  *   - -ENODEV: The port ID is invalid.
  *   - -ENOTSUP: The function is not supported by the Ethernet driver.
  */
-int rte_eth_timesync_enable(uint8_t port_id);
+int rte_eth_timesync_enable(uint16_t port_id);
 
 /**
  * Disable IEEE1588/802.1AS timestamping for an Ethernet device.
@@ -4258,7 +4260,7 @@ int rte_eth_timesync_enable(uint8_t port_id);
  *   - -ENODEV: The port ID is invalid.
  *   - -ENOTSUP: The function is not supported by the Ethernet driver.
  */
-int rte_eth_timesync_disable(uint8_t port_id);
+int rte_eth_timesync_disable(uint16_t port_id);
 
 /**
  * Read an IEEE1588/802.1AS RX timestamp from an Ethernet device.
@@ -4277,7 +4279,7 @@ int rte_eth_timesync_disable(uint8_t port_id);
  *   - -ENODEV: The port ID is invalid.
  *   - -ENOTSUP: The function is not supported by the Ethernet driver.
  */
-int rte_eth_timesync_read_rx_timestamp(uint8_t port_id,
+int rte_eth_timesync_read_rx_timestamp(uint16_t port_id,
 		struct timespec *timestamp, uint32_t flags);
 
 /**
@@ -4294,7 +4296,7 @@ int rte_eth_timesync_read_rx_timestamp(uint8_t port_id,
  *   - -ENODEV: The port ID is invalid.
  *   - -ENOTSUP: The function is not supported by the Ethernet driver.
  */
-int rte_eth_timesync_read_tx_timestamp(uint8_t port_id,
+int rte_eth_timesync_read_tx_timestamp(uint16_t port_id,
 		struct timespec *timestamp);
 
 /**
@@ -4313,7 +4315,7 @@ int rte_eth_timesync_read_tx_timestamp(uint8_t port_id,
  *   - -ENODEV: The port ID is invalid.
  *   - -ENOTSUP: The function is not supported by the Ethernet driver.
  */
-int rte_eth_timesync_adjust_time(uint8_t port_id, int64_t delta);
+int rte_eth_timesync_adjust_time(uint16_t port_id, int64_t delta);
 
 /**
  * Read the time from the timesync clock on an Ethernet device.
@@ -4329,7 +4331,7 @@ int rte_eth_timesync_adjust_time(uint8_t port_id, int64_t delta);
  * @return
  *   - 0: Success.
  */
-int rte_eth_timesync_read_time(uint8_t port_id, struct timespec *time);
+int rte_eth_timesync_read_time(uint16_t port_id, struct timespec *time);
 
 /**
  * Set the time of the timesync clock on an Ethernet device.
@@ -4348,7 +4350,7 @@ int rte_eth_timesync_read_time(uint8_t port_id, struct timespec *time);
  *   - -ENODEV: The port ID is invalid.
  *   - -ENOTSUP: The function is not supported by the Ethernet driver.
  */
-int rte_eth_timesync_write_time(uint8_t port_id, const struct timespec *time);
+int rte_eth_timesync_write_time(uint16_t port_id, const struct timespec *time);
 
 /**
  * Create memzone for HW rings.
@@ -4389,7 +4391,7 @@ rte_eth_dma_zone_reserve(const struct rte_eth_dev *eth_dev, const char *name,
  *   - (-ENOTSUP) if hardware doesn't support tunnel type.
  */
 int
-rte_eth_dev_l2_tunnel_eth_type_conf(uint8_t port_id,
+rte_eth_dev_l2_tunnel_eth_type_conf(uint16_t port_id,
 				    struct rte_eth_l2_tunnel_conf *l2_tunnel);
 
 /**
@@ -4416,7 +4418,7 @@ rte_eth_dev_l2_tunnel_eth_type_conf(uint8_t port_id,
  *   - (-ENOTSUP) if hardware doesn't support tunnel type.
  */
 int
-rte_eth_dev_l2_tunnel_offload_set(uint8_t port_id,
+rte_eth_dev_l2_tunnel_offload_set(uint16_t port_id,
 				  struct rte_eth_l2_tunnel_conf *l2_tunnel,
 				  uint32_t mask,
 				  uint8_t en);
@@ -4434,7 +4436,7 @@ rte_eth_dev_l2_tunnel_offload_set(uint8_t port_id,
 *   - (-ENODEV or -EINVAL) on failure.
 */
 int
-rte_eth_dev_get_port_by_name(const char *name, uint8_t *port_id);
+rte_eth_dev_get_port_by_name(const char *name, uint16_t *port_id);
 
 /**
 * Get the device name from port id
@@ -4448,7 +4450,7 @@ rte_eth_dev_get_port_by_name(const char *name, uint8_t *port_id);
 *   - (-EINVAL) on failure.
 */
 int
-rte_eth_dev_get_name_by_port(uint8_t port_id, char *name);
+rte_eth_dev_get_name_by_port(uint16_t port_id, char *name);
 
 /**
  * Check that numbers of Rx and Tx descriptors satisfy descriptors limits from
@@ -4466,7 +4468,7 @@ rte_eth_dev_get_name_by_port(uint8_t port_id, char *name);
  *   - (0) if successful.
  *   - (-ENOTSUP, -ENODEV or -EINVAL) on failure.
  */
-int rte_eth_dev_adjust_nb_rx_tx_desc(uint8_t port_id,
+int rte_eth_dev_adjust_nb_rx_tx_desc(uint16_t port_id,
 				     uint16_t *nb_rx_desc,
 				     uint16_t *nb_tx_desc);
 
diff --git a/lib/librte_ether/rte_flow.c b/lib/librte_ether/rte_flow.c
index 2001fbbf4..95d9ee007 100644
--- a/lib/librte_ether/rte_flow.c
+++ b/lib/librte_ether/rte_flow.c
@@ -108,7 +108,7 @@ static const struct rte_flow_desc_data rte_flow_desc_action[] = {
 
 /* Get generic flow operations structure from a port. */
 const struct rte_flow_ops *
-rte_flow_ops_get(uint8_t port_id, struct rte_flow_error *error)
+rte_flow_ops_get(uint16_t port_id, struct rte_flow_error *error)
 {
 	struct rte_eth_dev *dev = &rte_eth_devices[port_id];
 	const struct rte_flow_ops *ops;
diff --git a/lib/librte_ether/rte_flow_driver.h b/lib/librte_ether/rte_flow_driver.h
index 4d95391d8..8573cefa3 100644
--- a/lib/librte_ether/rte_flow_driver.h
+++ b/lib/librte_ether/rte_flow_driver.h
@@ -178,7 +178,7 @@ rte_flow_error_set(struct rte_flow_error *error,
  *   additional details.
  */
 const struct rte_flow_ops *
-rte_flow_ops_get(uint8_t port_id, struct rte_flow_error *error);
+rte_flow_ops_get(uint16_t port_id, struct rte_flow_error *error);
 
 #ifdef __cplusplus
 }
diff --git a/lib/librte_ether/rte_tm.c b/lib/librte_ether/rte_tm.c
index 71679650e..ceac34115 100644
--- a/lib/librte_ether/rte_tm.c
+++ b/lib/librte_ether/rte_tm.c
@@ -40,7 +40,7 @@
 
 /* Get generic traffic manager operations structure from a port. */
 const struct rte_tm_ops *
-rte_tm_ops_get(uint8_t port_id, struct rte_tm_error *error)
+rte_tm_ops_get(uint16_t port_id, struct rte_tm_error *error)
 {
 	struct rte_eth_dev *dev = &rte_eth_devices[port_id];
 	const struct rte_tm_ops *ops;
@@ -87,7 +87,7 @@ rte_tm_ops_get(uint8_t port_id, struct rte_tm_error *error)
 
 /* Get number of leaf nodes */
 int
-rte_tm_get_number_of_leaf_nodes(uint8_t port_id,
+rte_tm_get_number_of_leaf_nodes(uint16_t port_id,
 	uint32_t *n_leaf_nodes,
 	struct rte_tm_error *error)
 {
@@ -113,7 +113,7 @@ rte_tm_get_number_of_leaf_nodes(uint8_t port_id,
 
 /* Check node type (leaf or non-leaf) */
 int
-rte_tm_node_type_get(uint8_t port_id,
+rte_tm_node_type_get(uint16_t port_id,
 	uint32_t node_id,
 	int *is_leaf,
 	struct rte_tm_error *error)
@@ -124,7 +124,7 @@ rte_tm_node_type_get(uint8_t port_id,
 }
 
 /* Get capabilities */
-int rte_tm_capabilities_get(uint8_t port_id,
+int rte_tm_capabilities_get(uint16_t port_id,
 	struct rte_tm_capabilities *cap,
 	struct rte_tm_error *error)
 {
@@ -134,7 +134,7 @@ int rte_tm_capabilities_get(uint8_t port_id,
 }
 
 /* Get level capabilities */
-int rte_tm_level_capabilities_get(uint8_t port_id,
+int rte_tm_level_capabilities_get(uint16_t port_id,
 	uint32_t level_id,
 	struct rte_tm_level_capabilities *cap,
 	struct rte_tm_error *error)
@@ -145,7 +145,7 @@ int rte_tm_level_capabilities_get(uint8_t port_id,
 }
 
 /* Get node capabilities */
-int rte_tm_node_capabilities_get(uint8_t port_id,
+int rte_tm_node_capabilities_get(uint16_t port_id,
 	uint32_t node_id,
 	struct rte_tm_node_capabilities *cap,
 	struct rte_tm_error *error)
@@ -156,7 +156,7 @@ int rte_tm_node_capabilities_get(uint8_t port_id,
 }
 
 /* Add WRED profile */
-int rte_tm_wred_profile_add(uint8_t port_id,
+int rte_tm_wred_profile_add(uint16_t port_id,
 	uint32_t wred_profile_id,
 	struct rte_tm_wred_params *profile,
 	struct rte_tm_error *error)
@@ -167,7 +167,7 @@ int rte_tm_wred_profile_add(uint8_t port_id,
 }
 
 /* Delete WRED profile */
-int rte_tm_wred_profile_delete(uint8_t port_id,
+int rte_tm_wred_profile_delete(uint16_t port_id,
 	uint32_t wred_profile_id,
 	struct rte_tm_error *error)
 {
@@ -177,7 +177,7 @@ int rte_tm_wred_profile_delete(uint8_t port_id,
 }
 
 /* Add/update shared WRED context */
-int rte_tm_shared_wred_context_add_update(uint8_t port_id,
+int rte_tm_shared_wred_context_add_update(uint16_t port_id,
 	uint32_t shared_wred_context_id,
 	uint32_t wred_profile_id,
 	struct rte_tm_error *error)
@@ -188,7 +188,7 @@ int rte_tm_shared_wred_context_add_update(uint8_t port_id,
 }
 
 /* Delete shared WRED context */
-int rte_tm_shared_wred_context_delete(uint8_t port_id,
+int rte_tm_shared_wred_context_delete(uint16_t port_id,
 	uint32_t shared_wred_context_id,
 	struct rte_tm_error *error)
 {
@@ -198,7 +198,7 @@ int rte_tm_shared_wred_context_delete(uint8_t port_id,
 }
 
 /* Add shaper profile */
-int rte_tm_shaper_profile_add(uint8_t port_id,
+int rte_tm_shaper_profile_add(uint16_t port_id,
 	uint32_t shaper_profile_id,
 	struct rte_tm_shaper_params *profile,
 	struct rte_tm_error *error)
@@ -209,7 +209,7 @@ int rte_tm_shaper_profile_add(uint8_t port_id,
 }
 
 /* Delete WRED profile */
-int rte_tm_shaper_profile_delete(uint8_t port_id,
+int rte_tm_shaper_profile_delete(uint16_t port_id,
 	uint32_t shaper_profile_id,
 	struct rte_tm_error *error)
 {
@@ -219,7 +219,7 @@ int rte_tm_shaper_profile_delete(uint8_t port_id,
 }
 
 /* Add shared shaper */
-int rte_tm_shared_shaper_add_update(uint8_t port_id,
+int rte_tm_shared_shaper_add_update(uint16_t port_id,
 	uint32_t shared_shaper_id,
 	uint32_t shaper_profile_id,
 	struct rte_tm_error *error)
@@ -230,7 +230,7 @@ int rte_tm_shared_shaper_add_update(uint8_t port_id,
 }
 
 /* Delete shared shaper */
-int rte_tm_shared_shaper_delete(uint8_t port_id,
+int rte_tm_shared_shaper_delete(uint16_t port_id,
 	uint32_t shared_shaper_id,
 	struct rte_tm_error *error)
 {
@@ -240,7 +240,7 @@ int rte_tm_shared_shaper_delete(uint8_t port_id,
 }
 
 /* Add node to port traffic manager hierarchy */
-int rte_tm_node_add(uint8_t port_id,
+int rte_tm_node_add(uint16_t port_id,
 	uint32_t node_id,
 	uint32_t parent_node_id,
 	uint32_t priority,
@@ -256,7 +256,7 @@ int rte_tm_node_add(uint8_t port_id,
 }
 
 /* Delete node from traffic manager hierarchy */
-int rte_tm_node_delete(uint8_t port_id,
+int rte_tm_node_delete(uint16_t port_id,
 	uint32_t node_id,
 	struct rte_tm_error *error)
 {
@@ -266,7 +266,7 @@ int rte_tm_node_delete(uint8_t port_id,
 }
 
 /* Suspend node */
-int rte_tm_node_suspend(uint8_t port_id,
+int rte_tm_node_suspend(uint16_t port_id,
 	uint32_t node_id,
 	struct rte_tm_error *error)
 {
@@ -276,7 +276,7 @@ int rte_tm_node_suspend(uint8_t port_id,
 }
 
 /* Resume node */
-int rte_tm_node_resume(uint8_t port_id,
+int rte_tm_node_resume(uint16_t port_id,
 	uint32_t node_id,
 	struct rte_tm_error *error)
 {
@@ -286,7 +286,7 @@ int rte_tm_node_resume(uint8_t port_id,
 }
 
 /* Commit the initial port traffic manager hierarchy */
-int rte_tm_hierarchy_commit(uint8_t port_id,
+int rte_tm_hierarchy_commit(uint16_t port_id,
 	int clear_on_fail,
 	struct rte_tm_error *error)
 {
@@ -296,7 +296,7 @@ int rte_tm_hierarchy_commit(uint8_t port_id,
 }
 
 /* Update node parent  */
-int rte_tm_node_parent_update(uint8_t port_id,
+int rte_tm_node_parent_update(uint16_t port_id,
 	uint32_t node_id,
 	uint32_t parent_node_id,
 	uint32_t priority,
@@ -309,7 +309,7 @@ int rte_tm_node_parent_update(uint8_t port_id,
 }
 
 /* Update node private shaper */
-int rte_tm_node_shaper_update(uint8_t port_id,
+int rte_tm_node_shaper_update(uint16_t port_id,
 	uint32_t node_id,
 	uint32_t shaper_profile_id,
 	struct rte_tm_error *error)
@@ -320,7 +320,7 @@ int rte_tm_node_shaper_update(uint8_t port_id,
 }
 
 /* Update node shared shapers */
-int rte_tm_node_shared_shaper_update(uint8_t port_id,
+int rte_tm_node_shared_shaper_update(uint16_t port_id,
 	uint32_t node_id,
 	uint32_t shared_shaper_id,
 	int add,
@@ -332,7 +332,7 @@ int rte_tm_node_shared_shaper_update(uint8_t port_id,
 }
 
 /* Update node stats */
-int rte_tm_node_stats_update(uint8_t port_id,
+int rte_tm_node_stats_update(uint16_t port_id,
 	uint32_t node_id,
 	uint64_t stats_mask,
 	struct rte_tm_error *error)
@@ -343,7 +343,7 @@ int rte_tm_node_stats_update(uint8_t port_id,
 }
 
 /* Update WFQ weight mode */
-int rte_tm_node_wfq_weight_mode_update(uint8_t port_id,
+int rte_tm_node_wfq_weight_mode_update(uint16_t port_id,
 	uint32_t node_id,
 	int *wfq_weight_mode,
 	uint32_t n_sp_priorities,
@@ -355,7 +355,7 @@ int rte_tm_node_wfq_weight_mode_update(uint8_t port_id,
 }
 
 /* Update node congestion management mode */
-int rte_tm_node_cman_update(uint8_t port_id,
+int rte_tm_node_cman_update(uint16_t port_id,
 	uint32_t node_id,
 	enum rte_tm_cman_mode cman,
 	struct rte_tm_error *error)
@@ -366,7 +366,7 @@ int rte_tm_node_cman_update(uint8_t port_id,
 }
 
 /* Update node private WRED context */
-int rte_tm_node_wred_context_update(uint8_t port_id,
+int rte_tm_node_wred_context_update(uint16_t port_id,
 	uint32_t node_id,
 	uint32_t wred_profile_id,
 	struct rte_tm_error *error)
@@ -377,7 +377,7 @@ int rte_tm_node_wred_context_update(uint8_t port_id,
 }
 
 /* Update node shared WRED context */
-int rte_tm_node_shared_wred_context_update(uint8_t port_id,
+int rte_tm_node_shared_wred_context_update(uint16_t port_id,
 	uint32_t node_id,
 	uint32_t shared_wred_context_id,
 	int add,
@@ -389,7 +389,7 @@ int rte_tm_node_shared_wred_context_update(uint8_t port_id,
 }
 
 /* Read and/or clear stats counters for specific node */
-int rte_tm_node_stats_read(uint8_t port_id,
+int rte_tm_node_stats_read(uint16_t port_id,
 	uint32_t node_id,
 	struct rte_tm_node_stats *stats,
 	uint64_t *stats_mask,
@@ -402,7 +402,7 @@ int rte_tm_node_stats_read(uint8_t port_id,
 }
 
 /* Packet marking - VLAN DEI */
-int rte_tm_mark_vlan_dei(uint8_t port_id,
+int rte_tm_mark_vlan_dei(uint16_t port_id,
 	int mark_green,
 	int mark_yellow,
 	int mark_red,
@@ -414,7 +414,7 @@ int rte_tm_mark_vlan_dei(uint8_t port_id,
 }
 
 /* Packet marking - IPv4/IPv6 ECN */
-int rte_tm_mark_ip_ecn(uint8_t port_id,
+int rte_tm_mark_ip_ecn(uint16_t port_id,
 	int mark_green,
 	int mark_yellow,
 	int mark_red,
@@ -426,7 +426,7 @@ int rte_tm_mark_ip_ecn(uint8_t port_id,
 }
 
 /* Packet marking - IPv4/IPv6 DSCP */
-int rte_tm_mark_ip_dscp(uint8_t port_id,
+int rte_tm_mark_ip_dscp(uint16_t port_id,
 	int mark_green,
 	int mark_yellow,
 	int mark_red,
diff --git a/lib/librte_ether/rte_tm.h b/lib/librte_ether/rte_tm.h
index ebbfa1eec..2b25a8715 100644
--- a/lib/librte_ether/rte_tm.h
+++ b/lib/librte_ether/rte_tm.h
@@ -1040,7 +1040,7 @@ struct rte_tm_error {
  *   0 on success, non-zero error code otherwise.
  */
 int
-rte_tm_get_number_of_leaf_nodes(uint8_t port_id,
+rte_tm_get_number_of_leaf_nodes(uint16_t port_id,
 	uint32_t *n_leaf_nodes,
 	struct rte_tm_error *error);
 
@@ -1064,7 +1064,7 @@ rte_tm_get_number_of_leaf_nodes(uint8_t port_id,
  *   0 on success, non-zero error code otherwise.
  */
 int
-rte_tm_node_type_get(uint8_t port_id,
+rte_tm_node_type_get(uint16_t port_id,
 	uint32_t node_id,
 	int *is_leaf,
 	struct rte_tm_error *error);
@@ -1082,7 +1082,7 @@ rte_tm_node_type_get(uint8_t port_id,
  *   0 on success, non-zero error code otherwise.
  */
 int
-rte_tm_capabilities_get(uint8_t port_id,
+rte_tm_capabilities_get(uint16_t port_id,
 	struct rte_tm_capabilities *cap,
 	struct rte_tm_error *error);
 
@@ -1102,7 +1102,7 @@ rte_tm_capabilities_get(uint8_t port_id,
  *   0 on success, non-zero error code otherwise.
  */
 int
-rte_tm_level_capabilities_get(uint8_t port_id,
+rte_tm_level_capabilities_get(uint16_t port_id,
 	uint32_t level_id,
 	struct rte_tm_level_capabilities *cap,
 	struct rte_tm_error *error);
@@ -1122,7 +1122,7 @@ rte_tm_level_capabilities_get(uint8_t port_id,
  *   0 on success, non-zero error code otherwise.
  */
 int
-rte_tm_node_capabilities_get(uint8_t port_id,
+rte_tm_node_capabilities_get(uint16_t port_id,
 	uint32_t node_id,
 	struct rte_tm_node_capabilities *cap,
 	struct rte_tm_error *error);
@@ -1147,7 +1147,7 @@ rte_tm_node_capabilities_get(uint8_t port_id,
  * @see struct rte_tm_capabilities::cman_wred_context_n_max
  */
 int
-rte_tm_wred_profile_add(uint8_t port_id,
+rte_tm_wred_profile_add(uint16_t port_id,
 	uint32_t wred_profile_id,
 	struct rte_tm_wred_params *profile,
 	struct rte_tm_error *error);
@@ -1170,7 +1170,7 @@ rte_tm_wred_profile_add(uint8_t port_id,
  * @see struct rte_tm_capabilities::cman_wred_context_n_max
  */
 int
-rte_tm_wred_profile_delete(uint8_t port_id,
+rte_tm_wred_profile_delete(uint16_t port_id,
 	uint32_t wred_profile_id,
 	struct rte_tm_error *error);
 
@@ -1201,7 +1201,7 @@ rte_tm_wred_profile_delete(uint8_t port_id,
  * @see struct rte_tm_capabilities::cman_wred_context_shared_n_max
  */
 int
-rte_tm_shared_wred_context_add_update(uint8_t port_id,
+rte_tm_shared_wred_context_add_update(uint16_t port_id,
 	uint32_t shared_wred_context_id,
 	uint32_t wred_profile_id,
 	struct rte_tm_error *error);
@@ -1225,7 +1225,7 @@ rte_tm_shared_wred_context_add_update(uint8_t port_id,
  * @see struct rte_tm_capabilities::cman_wred_context_shared_n_max
  */
 int
-rte_tm_shared_wred_context_delete(uint8_t port_id,
+rte_tm_shared_wred_context_delete(uint16_t port_id,
 	uint32_t shared_wred_context_id,
 	struct rte_tm_error *error);
 
@@ -1249,7 +1249,7 @@ rte_tm_shared_wred_context_delete(uint8_t port_id,
  * @see struct rte_tm_capabilities::shaper_n_max
  */
 int
-rte_tm_shaper_profile_add(uint8_t port_id,
+rte_tm_shaper_profile_add(uint16_t port_id,
 	uint32_t shaper_profile_id,
 	struct rte_tm_shaper_params *profile,
 	struct rte_tm_error *error);
@@ -1272,7 +1272,7 @@ rte_tm_shaper_profile_add(uint8_t port_id,
  * @see struct rte_tm_capabilities::shaper_n_max
  */
 int
-rte_tm_shaper_profile_delete(uint8_t port_id,
+rte_tm_shaper_profile_delete(uint16_t port_id,
 	uint32_t shaper_profile_id,
 	struct rte_tm_error *error);
 
@@ -1301,7 +1301,7 @@ rte_tm_shaper_profile_delete(uint8_t port_id,
  * @see struct rte_tm_capabilities::shaper_shared_n_max
  */
 int
-rte_tm_shared_shaper_add_update(uint8_t port_id,
+rte_tm_shared_shaper_add_update(uint16_t port_id,
 	uint32_t shared_shaper_id,
 	uint32_t shaper_profile_id,
 	struct rte_tm_error *error);
@@ -1324,7 +1324,7 @@ rte_tm_shared_shaper_add_update(uint8_t port_id,
  * @see struct rte_tm_capabilities::shaper_shared_n_max
  */
 int
-rte_tm_shared_shaper_delete(uint8_t port_id,
+rte_tm_shared_shaper_delete(uint16_t port_id,
 	uint32_t shared_shaper_id,
 	struct rte_tm_error *error);
 
@@ -1392,7 +1392,7 @@ rte_tm_shared_shaper_delete(uint8_t port_id,
  * @see struct rte_tm_capabilities
  */
 int
-rte_tm_node_add(uint8_t port_id,
+rte_tm_node_add(uint16_t port_id,
 	uint32_t node_id,
 	uint32_t parent_node_id,
 	uint32_t priority,
@@ -1425,7 +1425,7 @@ rte_tm_node_add(uint8_t port_id,
  * @see RTE_TM_UPDATE_NODE_ADD_DELETE
  */
 int
-rte_tm_node_delete(uint8_t port_id,
+rte_tm_node_delete(uint16_t port_id,
 	uint32_t node_id,
 	struct rte_tm_error *error);
 
@@ -1449,7 +1449,7 @@ rte_tm_node_delete(uint8_t port_id,
  * @see RTE_TM_UPDATE_NODE_SUSPEND_RESUME
  */
 int
-rte_tm_node_suspend(uint8_t port_id,
+rte_tm_node_suspend(uint16_t port_id,
 	uint32_t node_id,
 	struct rte_tm_error *error);
 
@@ -1472,7 +1472,7 @@ rte_tm_node_suspend(uint8_t port_id,
  * @see RTE_TM_UPDATE_NODE_SUSPEND_RESUME
  */
 int
-rte_tm_node_resume(uint8_t port_id,
+rte_tm_node_resume(uint16_t port_id,
 	uint32_t node_id,
 	struct rte_tm_error *error);
 
@@ -1513,7 +1513,7 @@ rte_tm_node_resume(uint8_t port_id,
  * @see rte_tm_node_delete()
  */
 int
-rte_tm_hierarchy_commit(uint8_t port_id,
+rte_tm_hierarchy_commit(uint16_t port_id,
 	int clear_on_fail,
 	struct rte_tm_error *error);
 
@@ -1549,7 +1549,7 @@ rte_tm_hierarchy_commit(uint8_t port_id,
  * @see RTE_TM_UPDATE_NODE_PARENT_CHANGE_LEVEL
  */
 int
-rte_tm_node_parent_update(uint8_t port_id,
+rte_tm_node_parent_update(uint16_t port_id,
 	uint32_t node_id,
 	uint32_t parent_node_id,
 	uint32_t priority,
@@ -1578,7 +1578,7 @@ rte_tm_node_parent_update(uint8_t port_id,
  * @see struct rte_tm_capabilities::shaper_private_n_max
  */
 int
-rte_tm_node_shaper_update(uint8_t port_id,
+rte_tm_node_shaper_update(uint16_t port_id,
 	uint32_t node_id,
 	uint32_t shaper_profile_id,
 	struct rte_tm_error *error);
@@ -1605,7 +1605,7 @@ rte_tm_node_shaper_update(uint8_t port_id,
  * @see struct rte_tm_capabilities::shaper_shared_n_max
  */
 int
-rte_tm_node_shared_shaper_update(uint8_t port_id,
+rte_tm_node_shared_shaper_update(uint16_t port_id,
 	uint32_t node_id,
 	uint32_t shared_shaper_id,
 	int add,
@@ -1632,7 +1632,7 @@ rte_tm_node_shared_shaper_update(uint8_t port_id,
  * @see RTE_TM_UPDATE_NODE_STATS
  */
 int
-rte_tm_node_stats_update(uint8_t port_id,
+rte_tm_node_stats_update(uint16_t port_id,
 	uint32_t node_id,
 	uint64_t stats_mask,
 	struct rte_tm_error *error);
@@ -1660,7 +1660,7 @@ rte_tm_node_stats_update(uint8_t port_id,
  * @see RTE_TM_UPDATE_NODE_N_SP_PRIORITIES
  */
 int
-rte_tm_node_wfq_weight_mode_update(uint8_t port_id,
+rte_tm_node_wfq_weight_mode_update(uint16_t port_id,
 	uint32_t node_id,
 	int *wfq_weight_mode,
 	uint32_t n_sp_priorities,
@@ -1683,7 +1683,7 @@ rte_tm_node_wfq_weight_mode_update(uint8_t port_id,
  * @see RTE_TM_UPDATE_NODE_CMAN
  */
 int
-rte_tm_node_cman_update(uint8_t port_id,
+rte_tm_node_cman_update(uint16_t port_id,
 	uint32_t node_id,
 	enum rte_tm_cman_mode cman,
 	struct rte_tm_error *error);
@@ -1707,7 +1707,7 @@ rte_tm_node_cman_update(uint8_t port_id,
  * @see struct rte_tm_capabilities::cman_wred_context_private_n_max
 */
 int
-rte_tm_node_wred_context_update(uint8_t port_id,
+rte_tm_node_wred_context_update(uint16_t port_id,
 	uint32_t node_id,
 	uint32_t wred_profile_id,
 	struct rte_tm_error *error);
@@ -1732,7 +1732,7 @@ rte_tm_node_wred_context_update(uint8_t port_id,
  * @see struct rte_tm_capabilities::cman_wred_context_shared_n_max
  */
 int
-rte_tm_node_shared_wred_context_update(uint8_t port_id,
+rte_tm_node_shared_wred_context_update(uint16_t port_id,
 	uint32_t node_id,
 	uint32_t shared_wred_context_id,
 	int add,
@@ -1764,7 +1764,7 @@ rte_tm_node_shared_wred_context_update(uint8_t port_id,
  * @see enum rte_tm_stats_type
  */
 int
-rte_tm_node_stats_read(uint8_t port_id,
+rte_tm_node_stats_read(uint16_t port_id,
 	uint32_t node_id,
 	struct rte_tm_node_stats *stats,
 	uint64_t *stats_mask,
@@ -1801,7 +1801,7 @@ rte_tm_node_stats_read(uint8_t port_id,
  * @see struct rte_tm_capabilities::mark_vlan_dei_supported
  */
 int
-rte_tm_mark_vlan_dei(uint8_t port_id,
+rte_tm_mark_vlan_dei(uint16_t port_id,
 	int mark_green,
 	int mark_yellow,
 	int mark_red,
@@ -1851,7 +1851,7 @@ rte_tm_mark_vlan_dei(uint8_t port_id,
  * @see struct rte_tm_capabilities::mark_ip_ecn_sctp_supported
  */
 int
-rte_tm_mark_ip_ecn(uint8_t port_id,
+rte_tm_mark_ip_ecn(uint16_t port_id,
 	int mark_green,
 	int mark_yellow,
 	int mark_red,
@@ -1899,7 +1899,7 @@ rte_tm_mark_ip_ecn(uint8_t port_id,
  * @see struct rte_tm_capabilities::mark_ip_dscp_supported
  */
 int
-rte_tm_mark_ip_dscp(uint8_t port_id,
+rte_tm_mark_ip_dscp(uint16_t port_id,
 	int mark_green,
 	int mark_yellow,
 	int mark_red,
diff --git a/lib/librte_ether/rte_tm_driver.h b/lib/librte_ether/rte_tm_driver.h
index a5b698fe0..b2e8ccf80 100644
--- a/lib/librte_ether/rte_tm_driver.h
+++ b/lib/librte_ether/rte_tm_driver.h
@@ -357,7 +357,7 @@ rte_tm_error_set(struct rte_tm_error *error,
  *   success, NULL otherwise.
  */
 const struct rte_tm_ops *
-rte_tm_ops_get(uint8_t port_id, struct rte_tm_error *error);
+rte_tm_ops_get(uint16_t port_id, struct rte_tm_error *error);
 
 #ifdef __cplusplus
 }
diff --git a/lib/librte_kni/Makefile b/lib/librte_kni/Makefile
index 70f1ca8f6..43c115ddd 100644
--- a/lib/librte_kni/Makefile
+++ b/lib/librte_kni/Makefile
@@ -38,7 +38,7 @@ CFLAGS += $(WERROR_FLAGS) -I$(SRCDIR) -O3 -fno-strict-aliasing
 
 EXPORT_MAP := rte_kni_version.map
 
-LIBABIVER := 2
+LIBABIVER := 3
 
 # all source are stored in SRCS-y
 SRCS-$(CONFIG_RTE_LIBRTE_KNI) := rte_kni.c
diff --git a/lib/librte_kni/rte_kni.h b/lib/librte_kni/rte_kni.h
index 37deb4727..87812cd55 100644
--- a/lib/librte_kni/rte_kni.h
+++ b/lib/librte_kni/rte_kni.h
@@ -63,13 +63,13 @@ struct rte_mbuf;
  * Structure which has the function pointers for KNI interface.
  */
 struct rte_kni_ops {
-	uint8_t port_id; /* Port ID */
+	uint16_t port_id; /* Port ID */
 
 	/* Pointer to function of changing MTU */
-	int (*change_mtu)(uint8_t port_id, unsigned new_mtu);
+	int (*change_mtu)(uint16_t port_id, unsigned int new_mtu);
 
 	/* Pointer to function of configuring network interface */
-	int (*config_network_if)(uint8_t port_id, uint8_t if_up);
+	int (*config_network_if)(uint16_t port_id, uint8_t if_up);
 };
 
 /**
diff --git a/lib/librte_latencystats/rte_latencystats.c b/lib/librte_latencystats/rte_latencystats.c
index ce029a12c..d6ad13c4e 100644
--- a/lib/librte_latencystats/rte_latencystats.c
+++ b/lib/librte_latencystats/rte_latencystats.c
@@ -135,7 +135,7 @@ rte_latencystats_fill_values(struct rte_metric_value *values)
 }
 
 static uint16_t
-add_time_stamps(uint8_t pid __rte_unused,
+add_time_stamps(uint16_t pid __rte_unused,
 		uint16_t qid __rte_unused,
 		struct rte_mbuf **pkts,
 		uint16_t nb_pkts,
@@ -165,7 +165,7 @@ add_time_stamps(uint8_t pid __rte_unused,
 }
 
 static uint16_t
-calc_latency(uint8_t pid __rte_unused,
+calc_latency(uint16_t pid __rte_unused,
 		uint16_t qid __rte_unused,
 		struct rte_mbuf **pkts,
 		uint16_t nb_pkts,
@@ -226,10 +226,10 @@ rte_latencystats_init(uint64_t app_samp_intvl,
 		rte_latency_stats_flow_type_fn user_cb)
 {
 	unsigned int i;
-	uint8_t pid;
+	uint16_t pid;
 	uint16_t qid;
 	struct rxtx_cbs *cbs = NULL;
-	const uint8_t nb_ports = rte_eth_dev_count();
+	const uint16_t nb_ports = rte_eth_dev_count();
 	const char *ptr_strings[NUM_LATENCY_STATS] = {0};
 	const struct rte_memzone *mz = NULL;
 	const unsigned int flags = 0;
@@ -290,11 +290,11 @@ rte_latencystats_init(uint64_t app_samp_intvl,
 int
 rte_latencystats_uninit(void)
 {
-	uint8_t pid;
+	uint16_t pid;
 	uint16_t qid;
 	int ret = 0;
 	struct rxtx_cbs *cbs = NULL;
-	const uint8_t nb_ports = rte_eth_dev_count();
+	const uint16_t nb_ports = rte_eth_dev_count();
 
 	/** De register Rx/Tx callbacks */
 	for (pid = 0; pid < nb_ports; pid++) {
diff --git a/lib/librte_pdump/Makefile b/lib/librte_pdump/Makefile
index 1c03bcbb7..6b21c62e5 100644
--- a/lib/librte_pdump/Makefile
+++ b/lib/librte_pdump/Makefile
@@ -40,7 +40,7 @@ LDLIBS += -lpthread
 
 EXPORT_MAP := rte_pdump_version.map
 
-LIBABIVER := 1
+LIBABIVER := 2
 
 # all source are stored in SRCS-y
 SRCS-$(CONFIG_RTE_LIBRTE_PDUMP) := rte_pdump.c
diff --git a/lib/librte_pdump/rte_pdump.c b/lib/librte_pdump/rte_pdump.c
index 729e79a36..e6182d35c 100644
--- a/lib/librte_pdump/rte_pdump.c
+++ b/lib/librte_pdump/rte_pdump.c
@@ -207,7 +207,7 @@ pdump_copy(struct rte_mbuf **pkts, uint16_t nb_pkts, void *user_params)
 }
 
 static uint16_t
-pdump_rx(uint8_t port __rte_unused, uint16_t qidx __rte_unused,
+pdump_rx(uint16_t port __rte_unused, uint16_t qidx __rte_unused,
 	struct rte_mbuf **pkts, uint16_t nb_pkts,
 	uint16_t max_pkts __rte_unused,
 	void *user_params)
@@ -217,7 +217,7 @@ pdump_rx(uint8_t port __rte_unused, uint16_t qidx __rte_unused,
 }
 
 static uint16_t
-pdump_tx(uint8_t port __rte_unused, uint16_t qidx __rte_unused,
+pdump_tx(uint16_t port __rte_unused, uint16_t qidx __rte_unused,
 		struct rte_mbuf **pkts, uint16_t nb_pkts, void *user_params)
 {
 	pdump_copy(pkts, nb_pkts, user_params);
@@ -225,7 +225,7 @@ pdump_tx(uint8_t port __rte_unused, uint16_t qidx __rte_unused,
 }
 
 static int
-pdump_regitser_rx_callbacks(uint16_t end_q, uint8_t port, uint16_t queue,
+pdump_regitser_rx_callbacks(uint16_t end_q, uint16_t port, uint16_t queue,
 				struct rte_ring *ring, struct rte_mempool *mp,
 				uint16_t operation)
 {
@@ -279,7 +279,7 @@ pdump_regitser_rx_callbacks(uint16_t end_q, uint8_t port, uint16_t queue,
 }
 
 static int
-pdump_regitser_tx_callbacks(uint16_t end_q, uint8_t port, uint16_t queue,
+pdump_regitser_tx_callbacks(uint16_t end_q, uint16_t port, uint16_t queue,
 				struct rte_ring *ring, struct rte_mempool *mp,
 				uint16_t operation)
 {
@@ -337,7 +337,7 @@ static int
 set_pdump_rxtx_cbs(struct pdump_request *p)
 {
 	uint16_t nb_rx_q = 0, nb_tx_q = 0, end_q, queue;
-	uint8_t port;
+	uint16_t port;
 	int ret = 0;
 	uint32_t flags;
 	uint16_t operation;
@@ -764,7 +764,7 @@ pdump_validate_flags(uint32_t flags)
 }
 
 static int
-pdump_validate_port(uint8_t port, char *name)
+pdump_validate_port(uint16_t port, char *name)
 {
 	int ret = 0;
 
@@ -828,7 +828,7 @@ pdump_prepare_client_request(char *device, uint16_t queue,
 }
 
 int
-rte_pdump_enable(uint8_t port, uint16_t queue, uint32_t flags,
+rte_pdump_enable(uint16_t port, uint16_t queue, uint32_t flags,
 			struct rte_ring *ring,
 			struct rte_mempool *mp,
 			void *filter)
@@ -876,7 +876,7 @@ rte_pdump_enable_by_deviceid(char *device_id, uint16_t queue,
 }
 
 int
-rte_pdump_disable(uint8_t port, uint16_t queue, uint32_t flags)
+rte_pdump_disable(uint16_t port, uint16_t queue, uint32_t flags)
 {
 	int ret = 0;
 	char name[DEVICE_ID_SIZE];
diff --git a/lib/librte_pdump/rte_pdump.h b/lib/librte_pdump/rte_pdump.h
index ba6e39b09..4ec0a106f 100644
--- a/lib/librte_pdump/rte_pdump.h
+++ b/lib/librte_pdump/rte_pdump.h
@@ -113,7 +113,7 @@ rte_pdump_uninit(void);
  */
 
 int
-rte_pdump_enable(uint8_t port, uint16_t queue, uint32_t flags,
+rte_pdump_enable(uint16_t port, uint16_t queue, uint32_t flags,
 		struct rte_ring *ring,
 		struct rte_mempool *mp,
 		void *filter);
@@ -136,7 +136,7 @@ rte_pdump_enable(uint8_t port, uint16_t queue, uint32_t flags,
  */
 
 int
-rte_pdump_disable(uint8_t port, uint16_t queue, uint32_t flags);
+rte_pdump_disable(uint16_t port, uint16_t queue, uint32_t flags);
 
 /**
  * Enables packet capturing on given device id and queue.
diff --git a/lib/librte_port/Makefile b/lib/librte_port/Makefile
index 76629a13a..c2b1b2ce4 100644
--- a/lib/librte_port/Makefile
+++ b/lib/librte_port/Makefile
@@ -44,7 +44,7 @@ CFLAGS += $(WERROR_FLAGS)
 
 EXPORT_MAP := rte_port_version.map
 
-LIBABIVER := 3
+LIBABIVER := 4
 
 #
 # all source are stored in SRCS-y
diff --git a/lib/librte_port/rte_port_ethdev.c b/lib/librte_port/rte_port_ethdev.c
index d5c5fba55..4ed10f276 100644
--- a/lib/librte_port/rte_port_ethdev.c
+++ b/lib/librte_port/rte_port_ethdev.c
@@ -60,7 +60,7 @@ struct rte_port_ethdev_reader {
 	struct rte_port_in_stats stats;
 
 	uint16_t queue_id;
-	uint8_t port_id;
+	uint16_t port_id;
 };
 
 static void *
@@ -156,7 +156,7 @@ struct rte_port_ethdev_writer {
 	uint16_t tx_buf_count;
 	uint64_t bsz_mask;
 	uint16_t queue_id;
-	uint8_t port_id;
+	uint16_t port_id;
 };
 
 static void *
@@ -337,7 +337,7 @@ struct rte_port_ethdev_writer_nodrop {
 	uint64_t bsz_mask;
 	uint64_t n_retries;
 	uint16_t queue_id;
-	uint8_t port_id;
+	uint16_t port_id;
 };
 
 static void *
diff --git a/lib/librte_port/rte_port_ethdev.h b/lib/librte_port/rte_port_ethdev.h
index 201a79e41..f5ed9ab2d 100644
--- a/lib/librte_port/rte_port_ethdev.h
+++ b/lib/librte_port/rte_port_ethdev.h
@@ -54,7 +54,7 @@ extern "C" {
 /** ethdev_reader port parameters */
 struct rte_port_ethdev_reader_params {
 	/** NIC RX port ID */
-	uint8_t port_id;
+	uint16_t port_id;
 
 	/** NIC RX queue ID */
 	uint16_t queue_id;
@@ -66,7 +66,7 @@ extern struct rte_port_in_ops rte_port_ethdev_reader_ops;
 /** ethdev_writer port parameters */
 struct rte_port_ethdev_writer_params {
 	/** NIC RX port ID */
-	uint8_t port_id;
+	uint16_t port_id;
 
 	/** NIC RX queue ID */
 	uint16_t queue_id;
@@ -82,7 +82,7 @@ extern struct rte_port_out_ops rte_port_ethdev_writer_ops;
 /** ethdev_writer_nodrop port parameters */
 struct rte_port_ethdev_writer_nodrop_params {
 	/** NIC RX port ID */
-	uint8_t port_id;
+	uint16_t port_id;
 
 	/** NIC RX queue ID */
 	uint16_t queue_id;
-- 
2.13.3

^ permalink raw reply	[relevance 1%]

* Re: [dpdk-dev] [PATCH v4] devtools: rework abi checker script
  2017-09-21 15:40  7%     ` Neil Horman
@ 2017-09-25  9:11  9%       ` Olivier MATZ
  2017-09-25 11:21  4%         ` Neil Horman
  0 siblings, 1 reply; 200+ results
From: Olivier MATZ @ 2017-09-25  9:11 UTC (permalink / raw)
  To: Neil Horman; +Cc: dev, bruce.richardson

On Thu, Sep 21, 2017 at 11:40:35AM -0400, Neil Horman wrote:
> On Wed, Sep 20, 2017 at 11:12:53AM +0200, Olivier Matz wrote:
> > The initial version of the script had some limitations:
> > - cannot work on a non-clean workspace
> > - environment variables are not documented
> > - no compilation log in case of failure
> > - return success even it abi is incompatible
> >
> > This patch addresses these issues and rework the code.
> >
> > Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
> > ---
> >
> > v3->v4:
> > - clarify logs on incompatible abi
> > - log when an error returned an error
> > - [really] fix the report path
> > - log the output of make config in the proper file
> >
> > v2->v3:
> > - fix when not launched from dpdk root dir
> > - use "-Og -Wno-error" instead of "-O0"
> > - fix typo in commit log
> >
> > v1->v2:
> > - use /usr/bin/env to find bash (which is required)
> > - fix displayed path to html reports
> > - reword help for -f option
> >
> >
> >  devtools/validate-abi.sh | 397 ++++++++++++++++++++++++-----------------------
> >  1 file changed, 205 insertions(+), 192 deletions(-)
> >
> This looks better, thank you for the iterations.  One last note: The abi dumper
> utility errors out with error code of 12 if a given object has no exported
> symbols, and I see a few of those.  You may want to consider catching that
> error, logging an appropriate message and skipping the error emit.  That can be
> handled later though, as its a corner case.  I'd go with this patch, and then
> do a incremental improvement later

Unfortunately the error code 12 does not exist on my version of abi-dumper
(debian stable, v0.99.16). I'm currently doing this as a workaround:

    cmd $abidump ${i} -o $dst/${1}/${i}.dump -lver ${1} || true
    # hack to ignore empty SymbolsInfo section (no public ABI)
    if grep -q "'SymbolInfo' => {}," $dst/${1}/${i}.dump 2> /dev/null; then
        log "INFO" "${i} has no public ABI, remove dump file"
        cmd rm -f $dst/${1}/${i}.dump
    fi

I tested with the latest abi-dumper version, and I indeed see
these errors in the logs. It seems we don't go inside the 'if'
above with a recent abi-dumper, and the .dump file is not generated.

I can add a check to display the same additional log
"INFO" "${i} has no public ABI, remove dump file" if abi-dumper
returns 12. Something like this:

    ret=0
    cmd $abidump ${i} -o $dst/${1}/${i}.dump -lver ${1} || ret=$?
    # hack to ignore empty SymbolsInfo section (no public ABI)
    if [ ${ret} = 12 ]; then
            log "INFO" "${i} has no public ABI"
    fi
    if grep -q "'SymbolInfo' => {}," $dst/${1}/${i}.dump 2> /dev/null; then
        log "INFO" "${i} has no public ABI, remove dump file"
        cmd rm -f $dst/${1}/${i}.dump
    fi


Olivier

^ permalink raw reply	[relevance 9%]

* Re: [dpdk-dev] [PATCH v3 3/6] net/i40e: implement dynamic mapping of sw flow types to hw pctypes
  2017-09-20 14:33  4%   ` [dpdk-dev] [PATCH v3 3/6] net/i40e: implement dynamic mapping of sw flow types to hw pctypes Kirill Rybalchenko
@ 2017-09-25  9:44  0%     ` Xing, Beilei
  0 siblings, 0 replies; 200+ results
From: Xing, Beilei @ 2017-09-25  9:44 UTC (permalink / raw)
  To: Rybalchenko, Kirill, dev; +Cc: Chilikin, Andrey, Wu, Jingjing

> -----Original Message-----
> From: Rybalchenko, Kirill
> Sent: Wednesday, September 20, 2017 10:33 PM
> To: dev@dpdk.org
> Cc: Rybalchenko, Kirill <kirill.rybalchenko@intel.com>; Chilikin, Andrey
> <andrey.chilikin@intel.com>; Xing, Beilei <beilei.xing@intel.com>; Wu,
> Jingjing <jingjing.wu@intel.com>
> Subject: [PATCH v3 3/6] net/i40e: implement dynamic mapping of sw flow
> types to hw pctypes
> 
> Implement dynamic mapping of software flow types to hardware pctypes.
> This allows to add new flow types and pctypes for DDP without changing API
> of the driver. The mapping table is located in private data area for particular
> network adapter and can be individually modified with set of appropriate
> functions.
> 
> v2:
> Re-arrange patchset to avoid compillation errors.
> Remove usage of statically defined flow types and pctypes.
> 
> v3:
> Changed prototypes of some static functions.
> Fixed bugs in i40e_pctype_to_flowtype and i40e_flowtype_to_pctype
> functions.
> Various small modifications after reviewing.
> 
> Signed-off-by: Kirill Rybalchenko <kirill.rybalchenko@intel.com>
> ---
>  drivers/net/i40e/i40e_ethdev.c    | 343 ++++++++++++--------------------------
>  drivers/net/i40e/i40e_ethdev.h    |  17 +-
>  drivers/net/i40e/i40e_ethdev_vf.c |  16 +-
>  drivers/net/i40e/i40e_fdir.c      |  54 +++---
>  drivers/net/i40e/i40e_flow.c      |   5 +-
>  drivers/net/i40e/i40e_rxtx.c      |  57 +++++++
>  drivers/net/i40e/i40e_rxtx.h      |   1 +
>  7 files changed, 208 insertions(+), 285 deletions(-)
> 
> diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c
> index 18eac07..e396f73 100644
> --- a/drivers/net/i40e/i40e_ethdev.c
> +++ b/drivers/net/i40e/i40e_ethdev.c

<snip>

> 
>  static int
> -i40e_hash_global_config_check(struct rte_eth_hash_global_conf *g_cfg)
> +i40e_hash_global_config_check(struct rte_eth_hash_global_conf *g_cfg,
> +			      struct i40e_adapter *adapter)

how about chaning the parameter order?
i40e_hash_global_config_check(struct i40e_adapter *adapter, struct rte_eth_hash_global_conf *g_cfg)?

>  {
>  	uint32_t i;
> -	uint32_t mask0, i40e_mask = I40E_FLOW_TYPES;
> +	uint32_t mask0, i40e_mask = adapter->flow_types_mask;
> 
>  	if (g_cfg->hash_func != RTE_ETH_HASH_FUNCTION_TOEPLITZ &&
>  		g_cfg->hash_func !=
> RTE_ETH_HASH_FUNCTION_SIMPLE_XOR && @@ -7899,64 +7839,32 @@
> static int  i40e_set_hash_filter_global_config(struct i40e_hw *hw,
>  				   struct rte_eth_hash_global_conf *g_cfg)  {
> +	struct i40e_adapter *adapter = (struct i40e_adapter *)hw->back;
>  	int ret;
> -	uint16_t i;
> +	uint16_t i, j;
>  	uint32_t reg;
> -	uint32_t mask0 = g_cfg->valid_bit_mask[0];
> -	enum i40e_filter_pctype pctype;
> +	/*
> +	 * We work only with lowest 32 bits which is not correct, but to work
> +	 * properly the valid_bit_mask size should be increased up to 64 bits
> +	 * and this will brake ABI. This modification will be done in next
> release
> +	 */
> +	uint32_t mask0 = g_cfg->valid_bit_mask[0] &
> +(uint32_t)adapter->flow_types_mask;
> 
>  	/* Check the input parameters */
> -	ret = i40e_hash_global_config_check(g_cfg);
> +	ret = i40e_hash_global_config_check(g_cfg, adapter);
>  	if (ret < 0)
>  		return ret;
> 
> -	for (i = 0; mask0 && i < UINT32_BIT; i++) {
> -		if (!(mask0 & (1UL << i)))
> -			continue;
> -		mask0 &= ~(1UL << i);
> -		/* if flowtype is invalid, continue */
> -		if (!I40E_VALID_FLOW(i))
> -			continue;
> -		pctype = i40e_flowtype_to_pctype(i);
> -		reg = (g_cfg->sym_hash_enable_mask[0] & (1UL << i)) ?
> -				I40E_GLQF_HSYM_SYMH_ENA_MASK : 0;
> -		if (hw->mac.type == I40E_MAC_X722) {
> -			if (pctype == I40E_FILTER_PCTYPE_NONF_IPV4_UDP)
> {

<snip>

> -				  reg);
> -			} else {
> -				i40e_write_rx_ctl(hw,
> I40E_GLQF_HSYM(pctype),
> -				  reg);
> +	for (i = RTE_ETH_FLOW_UNKNOWN + 1; i < UINT32_BIT; i++) {

Should it be like following?
for (i = RTE_ETH_FLOW_UNKNOWN + 1; mask0 && i < UINT32_BIT; i++) {

> +		if (mask0 & (1UL << i)) {
> +			reg = (g_cfg->sym_hash_enable_mask[0] & (1UL <<
> i)) ?
> +
> 	I40E_GLQF_HSYM_SYMH_ENA_MASK : 0;
> +
> +			for (j = I40E_FILTER_PCTYPE_INVALID + 1;
> +			     j < I40E_FILTER_PCTYPE_MAX; j++) {
> +				if (adapter->pctypes_tbl[i] & (1ULL << j))
> +					i40e_write_rx_ctl(hw,
> I40E_GLQF_HSYM(j), reg);
>  			}
> -		} else {
> -			i40e_write_rx_ctl(hw, I40E_GLQF_HSYM(pctype),
> reg);
>  		}
>  	}
> 
> @@ -8581,13 +8489,10 @@ i40e_filter_input_set_init(struct i40e_pf *pf)
> 
>  	for (pctype = I40E_FILTER_PCTYPE_NONF_IPV4_UDP;
>  	     pctype <= I40E_FILTER_PCTYPE_L2_PAYLOAD; pctype++) {
> -		if (hw->mac.type == I40E_MAC_X722) {
> -			if (!I40E_VALID_PCTYPE_X722(pctype))
> -				continue;
> -		} else {
> -			if (!I40E_VALID_PCTYPE(pctype))
> -				continue;
> -		}
> +		uint16_t flow_type = i40e_pctype_to_flowtype(pf->adapter,
> pctype);

Move the variable to the beginning of the function according to the code style.

> +
> +		if (flow_type == RTE_ETH_FLOW_UNKNOWN)
> +			continue;
> 
>  		input_set = i40e_get_default_input_set(pctype);
> 
> @@ -8650,7 +8555,8 @@ i40e_hash_filter_inset_select(struct i40e_hw *hw,
>  		return -EINVAL;
>  	}
> 
> -	if (!I40E_VALID_FLOW(conf->flow_type)) {
> +	pctype = i40e_flowtype_to_pctype(pf->adapter, conf->flow_type);
> +	if (pctype == I40E_FILTER_PCTYPE_INVALID) {
>  		PMD_DRV_LOG(ERR, "invalid flow_type input.");
>  		return -EINVAL;
>  	}

<snip>

> diff --git a/drivers/net/i40e/i40e_fdir.c b/drivers/net/i40e/i40e_fdir.c index
> 84c0a1f..810d384 100644
> --- a/drivers/net/i40e/i40e_fdir.c
> +++ b/drivers/net/i40e/i40e_fdir.c
> @@ -344,15 +344,10 @@ i40e_init_flx_pld(struct i40e_pf *pf)
>  	/* initialize the masks */
>  	for (pctype = I40E_FILTER_PCTYPE_NONF_IPV4_UDP;
>  	     pctype <= I40E_FILTER_PCTYPE_L2_PAYLOAD; pctype++) {
> -		if (hw->mac.type == I40E_MAC_X722) {
> -			if (!I40E_VALID_PCTYPE_X722(
> -				 (enum i40e_filter_pctype)pctype))
> -				continue;
> -		} else {
> -			if (!I40E_VALID_PCTYPE(
> -				 (enum i40e_filter_pctype)pctype))
> -				continue;
> -		}
> +		uint16_t flow_type = i40e_pctype_to_flowtype(pf->adapter,
> pctype);

Same comments here, move 'uint16_t flow_type' to the beginning of the function.

> +
> +		if (flow_type == RTE_ETH_FLOW_UNKNOWN)
> +			continue;
>  		pf->fdir.flex_mask[pctype].word_mask = 0;
>  		i40e_write_rx_ctl(hw, I40E_PRTQF_FD_FLXINSET(pctype), 0);
>  		for (i = 0; i < I40E_FDIR_BITMASK_NUM_WORD; i++) { @@ -
> 449,7 +444,8 @@ i40e_check_fdir_flex_payload(const struct
> rte_eth_flex_payload_cfg *flex_cfg)
>   * arguments are valid
>   */
>  static int
> -i40e_check_fdir_flex_conf(const struct rte_eth_fdir_flex_conf *conf)
> +i40e_check_fdir_flex_conf(const struct rte_eth_fdir_flex_conf *conf,
> +			  const struct i40e_adapter *adapter)

How about i40e_check_fdir_flex_conf(const struct i40e_adapter *adapter , const struct rte_eth_fdir_flex_conf *conf)?

>  {
>  	const struct rte_eth_flex_payload_cfg *flex_cfg;
>  	const struct rte_eth_fdir_flex_mask *flex_mask; @@ -486,8 +482,11
> @@ i40e_check_fdir_flex_conf(const struct rte_eth_fdir_flex_conf *conf)
>  		return -EINVAL;
>  	}
>  	for (i = 0; i < conf->nb_flexmasks; i++) {
> +		enum i40e_filter_pctype pctype;

Move the variable to the beginning of the function.

> +
>  		flex_mask = &conf->flex_mask[i];
> -		if (!I40E_VALID_FLOW(flex_mask->flow_type)) {
> +		pctype = i40e_flowtype_to_pctype(adapter, flex_mask-
> >flow_type);
> +		if (pctype == I40E_FILTER_PCTYPE_INVALID) {
>  			PMD_DRV_LOG(WARNING, "invalid flow type.");
>  			return -EINVAL;
>  		}

<snip>

^ permalink raw reply	[relevance 0%]

* Re: [dpdk-dev] [PATCH v4] devtools: rework abi checker script
  2017-09-25  9:11  9%       ` Olivier MATZ
@ 2017-09-25 11:21  4%         ` Neil Horman
  0 siblings, 0 replies; 200+ results
From: Neil Horman @ 2017-09-25 11:21 UTC (permalink / raw)
  To: Olivier MATZ; +Cc: dev, bruce.richardson

On Mon, Sep 25, 2017 at 11:11:20AM +0200, Olivier MATZ wrote:
> On Thu, Sep 21, 2017 at 11:40:35AM -0400, Neil Horman wrote:
> > On Wed, Sep 20, 2017 at 11:12:53AM +0200, Olivier Matz wrote:
> > > The initial version of the script had some limitations:
> > > - cannot work on a non-clean workspace
> > > - environment variables are not documented
> > > - no compilation log in case of failure
> > > - return success even it abi is incompatible
> > >
> > > This patch addresses these issues and rework the code.
> > >
> > > Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
> > > ---
> > >
> > > v3->v4:
> > > - clarify logs on incompatible abi
> > > - log when an error returned an error
> > > - [really] fix the report path
> > > - log the output of make config in the proper file
> > >
> > > v2->v3:
> > > - fix when not launched from dpdk root dir
> > > - use "-Og -Wno-error" instead of "-O0"
> > > - fix typo in commit log
> > >
> > > v1->v2:
> > > - use /usr/bin/env to find bash (which is required)
> > > - fix displayed path to html reports
> > > - reword help for -f option
> > >
> > >
> > >  devtools/validate-abi.sh | 397 ++++++++++++++++++++++++-----------------------
> > >  1 file changed, 205 insertions(+), 192 deletions(-)
> > >
> > This looks better, thank you for the iterations.  One last note: The abi dumper
> > utility errors out with error code of 12 if a given object has no exported
> > symbols, and I see a few of those.  You may want to consider catching that
> > error, logging an appropriate message and skipping the error emit.  That can be
> > handled later though, as its a corner case.  I'd go with this patch, and then
> > do a incremental improvement later
> 
> Unfortunately the error code 12 does not exist on my version of abi-dumper
> (debian stable, v0.99.16). I'm currently doing this as a workaround:
> 
>     cmd $abidump ${i} -o $dst/${1}/${i}.dump -lver ${1} || true
>     # hack to ignore empty SymbolsInfo section (no public ABI)
>     if grep -q "'SymbolInfo' => {}," $dst/${1}/${i}.dump 2> /dev/null; then
>         log "INFO" "${i} has no public ABI, remove dump file"
>         cmd rm -f $dst/${1}/${i}.dump
>     fi
> 
> I tested with the latest abi-dumper version, and I indeed see
> these errors in the logs. It seems we don't go inside the 'if'
> above with a recent abi-dumper, and the .dump file is not generated.
> 
> I can add a check to display the same additional log
> "INFO" "${i} has no public ABI, remove dump file" if abi-dumper
> returns 12. Something like this:
> 
>     ret=0
>     cmd $abidump ${i} -o $dst/${1}/${i}.dump -lver ${1} || ret=$?
>     # hack to ignore empty SymbolsInfo section (no public ABI)
>     if [ ${ret} = 12 ]; then
>             log "INFO" "${i} has no public ABI"
>     fi
>     if grep -q "'SymbolInfo' => {}," $dst/${1}/${i}.dump 2> /dev/null; then
>         log "INFO" "${i} has no public ABI, remove dump file"
>         cmd rm -f $dst/${1}/${i}.dump
>     fi
> 
Agreed, that makes sense.
Thanks.
Neil

> 
> Olivier
> 

^ permalink raw reply	[relevance 4%]

* Re: [dpdk-dev] [PATCH v5 1/5] net/bonding: remove bonding APIs using ABI versioning
  2017-09-25  3:22  7%     ` [dpdk-dev] [PATCH v5 1/5] net/bonding: remove bonding APIs using ABI versioning Zhiyong Yang
@ 2017-09-25 11:34  4%       ` Ferruh Yigit
  0 siblings, 0 replies; 200+ results
From: Ferruh Yigit @ 2017-09-25 11:34 UTC (permalink / raw)
  To: Zhiyong Yang, dev; +Cc: thomas, adrien.mazarguil

On 9/25/2017 4:22 AM, Zhiyong Yang wrote:
> There are two bonding APIs using ABI versioning, and both have
> port_id as parameter. Since we are already breaking ABI, no need
> to keep older versions of APIs.
> 
> Signed-off-by: Zhiyong Yang <zhiyong.yang@intel.com>

Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>

^ permalink raw reply	[relevance 4%]

* [dpdk-dev] [PATCH v3 13/13] doc: add notes on EAL PCI API update
  @ 2017-09-25 15:24  4%   ` Gaetan Rivet
    1 sibling, 0 replies; 200+ results
From: Gaetan Rivet @ 2017-09-25 15:24 UTC (permalink / raw)
  To: dev; +Cc: Gaetan Rivet

Add a section related to EAL API changes to 17.11 release notes.

Signed-off-by: Gaetan Rivet <gaetan.rivet@6wind.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
---
 doc/guides/rel_notes/release_17_11.rst | 28 ++++++++++++++++++++++++++++
 1 file changed, 28 insertions(+)

diff --git a/doc/guides/rel_notes/release_17_11.rst b/doc/guides/rel_notes/release_17_11.rst
index 8bf91bd..d5546ba 100644
--- a/doc/guides/rel_notes/release_17_11.rst
+++ b/doc/guides/rel_notes/release_17_11.rst
@@ -130,6 +130,34 @@ API Changes
   * Rework start and stop APIs into ``rte_service_runstate_set``
   * Added API to set runstate of service implementation to indicate readyness
 
+* **PCI bus API moved outside of the EAL**
+
+  The PCI bus previously implemented within the EAL has been moved.
+  A first part has been added as an RTE library providing PCI helpers to
+  parse device locations or other such utilities.
+  A second part consisting in the actual bus driver has been moved to its
+  proper subdirectory, without changing its functionalities.
+
+  As such, several PCI-related functions are not proposed by the EAL anymore:
+
+  * rte_pci_detach
+  * rte_pci_dump
+  * rte_pci_ioport_map
+  * rte_pci_ioport_read
+  * rte_pci_ioport_unmap
+  * rte_pci_ioport_write
+  * rte_pci_map_device
+  * rte_pci_probe
+  * rte_pci_probe_one
+  * rte_pci_read_config
+  * rte_pci_register
+  * rte_pci_scan
+  * rte_pci_unmap_device
+  * rte_pci_unregister
+  * rte_pci_write_config
+
+  These functions are made available either as part of ``librte_pci`` or
+  ``librte_bus_pci``.
 
 ABI Changes
 -----------
-- 
2.1.4

^ permalink raw reply	[relevance 4%]

* [dpdk-dev] [PATCH v2 00/12] support to run vdev in the secondary process
    @ 2017-09-28 13:55  2% ` Jianfeng Tan
  2017-09-28 13:55  2%   ` [dpdk-dev] [PATCH v2 03/12] cryptodev: avoid dependency on rte_vdev.h Jianfeng Tan
  1 sibling, 1 reply; 200+ results
From: Jianfeng Tan @ 2017-09-28 13:55 UTC (permalink / raw)
  To: dev
  Cc: bruce.richardson, konstantin.ananyev, pablo.de.lara.guarch,
	thomas, yliu, maxime.coquelin, mtetsuyah, ferruh.yigit,
	Jianfeng Tan

v2:
  - Address Gaetan's comment in patch 2.
  - Add RTE_LOGTYPE_BUS suggested by Gaetan.
  - Don't moving crypto vdev into drivers/bus/vdev, instead we use a
    new way (details in patch 3) which may break the ABI (the
    validate_abi.sh report a low warning of "Problems with Symbols").
  - Rename CONFIG_RTE_LIBRTE_VDEV to CONFIG_RTE_LIBRTE_VDEV_BUS.
  - Return error if there's an existing action for an action name.
  - Redefine rte_eal_primary_secondary_t as func pointer, and change
    the first parameter type to avoid explicit type casting.
  - Handle the case for vhost "primary - VM - secondary" sequence.
  - Fix a bug in recv multiple messages as one message.
  - Fix a bug of get vid of -1 in secondary process.
  - Remove the modification on helloworld example, instead we use
    symmetric_mp as the test case.
  - Address yuanhan's comment on code refactor on mp channel.

Patch 1~6: move vdev bus into drivers/bus.
Patch 7: add unix socket channel for primary/secondary communication.
Patch 8~9: make use of the channel to discover and probe virtual devices
         the primary process.
Patch 10~12: support to run vhost-pmd in the secondary process.

How to test:

Step 1: run symmetric_mp as the primary process.
  $ ./symmetric_mp -c 2 --proc-type=auto ... \
          --vdev 'net_vhost0,iface=/tmp/sock1,queues=2' \
	  --vdev 'net_vhost1,iface=/tmp/sock2,queues=2' \
	  -- -p 3 --num-procs=2 --proc-id=0

Step 2: run testpmd as the secondary process.
  $ ./symmetric_mp -c 4 --proc-type=auto -- -p 3 --num-procs=2 --proc-id=1

Step 3: start VM1.
  $ ./qemu-system-x86_64 ... -chardev socket,id=chr1,path=/tmp/sock1 \
          -netdev type=vhost-user,id=net1,chardev=chr1,vhostforce,queues=2 \
          -device virtio-net-pci,netdev=net1,mq=on,vectors=6 ...

Step 4: start VM2.
  $ ./qemu-system-x86_64 ... -chardev socket,id=chr1,path=/tmp/sock2 \
          -netdev type=vhost-user,id=net1,chardev=chr1,vhostforce,queues=2 \
          -device virtio-net-pci,netdev=net1,mq=on,vectors=6 ...

Step 5: enable multi queue in VM1 and VM2.
  $ ethtool -L ethX combined 2

Note in this test case, only queue 1, i.e., secondary process can process
packets. To use queue 1, basically, we can run command like:
  $ taskset -c 1 <commands>


Jianfeng Tan (12):
  cryptodev: remove crypto vdev init API
  eal: avoid calling rte_vdev_init()
  cryptodev: avoid dependency on rte_vdev.h
  bus/fslmc: introduce RTE_LOGTYPE_BUS for bus drivers
  bus/vdev: move to vdev bus to drivers/bus
  bus/vdev: normalize log type
  eal: add channel for primary/secondary communication
  bus/vdev: scan and probe vdev in secondary processes
  ethdev: support attach vdev in secondary process
  vhost: allocate virtio_net in memzone
  vhost: support to kick in secondary process
  net/vhost: support to run in the secondary process

 config/common_base                              |   5 +
 doc/guides/rel_notes/deprecation.rst            |   5 -
 drivers/bus/Makefile                            |   2 +
 drivers/bus/fslmc/fslmc_bus.c                   |   5 +-
 drivers/bus/fslmc/fslmc_logs.h                  |  42 +-
 drivers/bus/fslmc/fslmc_vfio.c                  |   4 +-
 drivers/bus/vdev/Makefile                       |  55 +++
 drivers/bus/vdev/rte_bus_vdev_version.map       |  10 +
 drivers/bus/vdev/rte_vdev.h                     | 153 ++++++++
 drivers/bus/vdev/vdev.c                         | 440 +++++++++++++++++++++
 drivers/bus/vdev/vdev_logs.h                    |  40 ++
 drivers/net/vhost/rte_eth_vhost.c               | 200 +++++++++-
 lib/librte_cryptodev/rte_cryptodev.c            |   6 -
 lib/librte_cryptodev/rte_cryptodev.h            |  18 -
 lib/librte_cryptodev/rte_cryptodev_pmd.c        |   9 +-
 lib/librte_cryptodev/rte_cryptodev_vdev.c       | 161 ++++++++
 lib/librte_cryptodev/rte_cryptodev_vdev.h       |   3 +-
 lib/librte_cryptodev/rte_cryptodev_version.map  |   1 -
 lib/librte_eal/bsdapp/eal/Makefile              |   1 -
 lib/librte_eal/bsdapp/eal/rte_eal_version.map   |   8 +
 lib/librte_eal/common/Makefile                  |   2 +-
 lib/librte_eal/common/eal_common_dev.c          |  21 +-
 lib/librte_eal/common/eal_common_log.c          |   1 +
 lib/librte_eal/common/eal_common_proc.c         | 498 ++++++++++++++++++++++++
 lib/librte_eal/common/eal_common_vdev.c         | 342 ----------------
 lib/librte_eal/common/eal_filesystem.h          |  18 +
 lib/librte_eal/common/eal_private.h             |  10 +
 lib/librte_eal/common/include/rte_dev.h         |  24 +-
 lib/librte_eal/common/include/rte_eal.h         |  68 ++++
 lib/librte_eal/common/include/rte_log.h         |   1 +
 lib/librte_eal/common/include/rte_vdev.h        | 131 -------
 lib/librte_eal/linuxapp/eal/Makefile            |   1 -
 lib/librte_eal/linuxapp/eal/eal.c               |   6 +
 lib/librte_eal/linuxapp/eal/rte_eal_version.map |   8 +
 lib/librte_ether/rte_ethdev_vdev.h              |  26 +-
 lib/librte_vhost/rte_vhost.h                    |   3 +
 lib/librte_vhost/rte_vhost_version.map          |   7 +
 lib/librte_vhost/socket.c                       |   2 +
 lib/librte_vhost/vhost.c                        |  71 +++-
 lib/librte_vhost/vhost.h                        |   7 +-
 lib/librte_vhost/vhost_user.c                   |  17 +-
 mk/rte.app.mk                                   |   1 +
 42 files changed, 1799 insertions(+), 634 deletions(-)
 create mode 100644 drivers/bus/vdev/Makefile
 create mode 100644 drivers/bus/vdev/rte_bus_vdev_version.map
 create mode 100644 drivers/bus/vdev/rte_vdev.h
 create mode 100644 drivers/bus/vdev/vdev.c
 create mode 100644 drivers/bus/vdev/vdev_logs.h
 create mode 100644 lib/librte_cryptodev/rte_cryptodev_vdev.c
 delete mode 100644 lib/librte_eal/common/eal_common_vdev.c
 delete mode 100644 lib/librte_eal/common/include/rte_vdev.h

-- 
2.7.4

^ permalink raw reply	[relevance 2%]

* [dpdk-dev] [PATCH v2 03/12] cryptodev: avoid dependency on rte_vdev.h
  2017-09-28 13:55  2% ` [dpdk-dev] [PATCH v2 00/12] support to run vdev in the secondary process Jianfeng Tan
@ 2017-09-28 13:55  2%   ` Jianfeng Tan
  2017-10-05 13:13  0%     ` Jan Blunck
  0 siblings, 1 reply; 200+ results
From: Jianfeng Tan @ 2017-09-28 13:55 UTC (permalink / raw)
  To: dev
  Cc: bruce.richardson, konstantin.ananyev, pablo.de.lara.guarch,
	thomas, yliu, maxime.coquelin, mtetsuyah, ferruh.yigit,
	Jianfeng Tan

The helper API, rte_cryptodev_vdev_pmd_init(), has a parameter of
struct rte_vdev_device *, which needs to include rte_vdev.h.

We will move vdev into drivers/bus, so we need to avoid such
dependency. And also, we cannot break the ABI.

This patch changes that pointer to void *, and defines an internal
structure same with struct rte_vdev_device.

Signed-off-by: Jianfeng Tan <jianfeng.tan@intel.com>
---
 lib/librte_cryptodev/rte_cryptodev_pmd.c  |   9 +-
 lib/librte_cryptodev/rte_cryptodev_vdev.c | 161 ++++++++++++++++++++++++++++++
 lib/librte_cryptodev/rte_cryptodev_vdev.h |   3 +-
 3 files changed, 169 insertions(+), 4 deletions(-)
 create mode 100644 lib/librte_cryptodev/rte_cryptodev_vdev.c

diff --git a/lib/librte_cryptodev/rte_cryptodev_pmd.c b/lib/librte_cryptodev/rte_cryptodev_pmd.c
index a57faad..60b3980 100644
--- a/lib/librte_cryptodev/rte_cryptodev_pmd.c
+++ b/lib/librte_cryptodev/rte_cryptodev_pmd.c
@@ -75,9 +75,14 @@ rte_cryptodev_vdev_parse_integer_arg(const char *key __rte_unused,
 	return 0;
 }
 
+struct vdev_device {
+	TAILQ_ENTRY(rte_vdev_device) next;
+	struct rte_device device;
+};
+
 struct rte_cryptodev *
 rte_cryptodev_vdev_pmd_init(const char *name, size_t dev_private_size,
-		int socket_id, struct rte_vdev_device *vdev)
+		int socket_id, void *vdev)
 {
 	struct rte_cryptodev *cryptodev;
 
@@ -99,7 +104,7 @@ rte_cryptodev_vdev_pmd_init(const char *name, size_t dev_private_size,
 					" data");
 	}
 
-	cryptodev->device = &vdev->device;
+	cryptodev->device = &((struct vdev_device *)vdev)->device;
 
 	/* initialise user call-back tail queue */
 	TAILQ_INIT(&(cryptodev->link_intr_cbs));
diff --git a/lib/librte_cryptodev/rte_cryptodev_vdev.c b/lib/librte_cryptodev/rte_cryptodev_vdev.c
new file mode 100644
index 0000000..4af8d51
--- /dev/null
+++ b/lib/librte_cryptodev/rte_cryptodev_vdev.c
@@ -0,0 +1,161 @@
+/*-
+ *   BSD LICENSE
+ *
+ *   Copyright(c) 2017 Intel Corporation. All rights reserved.
+ *
+ *   Redistribution and use in source and binary forms, with or without
+ *   modification, are permitted provided that the following conditions
+ *   are met:
+ *
+ *     * Redistributions of source code must retain the above copyright
+ *       notice, this list of conditions and the following disclaimer.
+ *     * Redistributions in binary form must reproduce the above copyright
+ *       notice, this list of conditions and the following disclaimer in
+ *       the documentation and/or other materials provided with the
+ *       distribution.
+ *     * Neither the name of the copyright holder nor the names of its
+ *       contributors may be used to endorse or promote products derived
+ *       from this software without specific prior written permission.
+ *
+ *   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ *   "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ *   LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ *   A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ *   OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ *   LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ *   DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ *   THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ *   (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ *   OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include <sys/queue.h>
+
+#include "rte_cryptodev_vdev.h"
+#include "rte_cryptodev_pci.h"
+#include "rte_cryptodev_pmd.h"
+
+/**
+ * Parse name from argument
+ */
+static int
+rte_cryptodev_vdev_parse_name_arg(const char *key __rte_unused,
+		const char *value, void *extra_args)
+{
+	struct rte_crypto_vdev_init_params *params = extra_args;
+
+	if (strlen(value) >= RTE_CRYPTODEV_NAME_MAX_LEN - 1) {
+		CDEV_LOG_ERR("Invalid name %s, should be less than "
+				"%u bytes", value,
+				RTE_CRYPTODEV_NAME_MAX_LEN - 1);
+		return -1;
+	}
+
+	strncpy(params->name, value, RTE_CRYPTODEV_NAME_MAX_LEN);
+
+	return 0;
+}
+
+/**
+ * Parse integer from argument
+ */
+static int
+rte_cryptodev_vdev_parse_integer_arg(const char *key __rte_unused,
+		const char *value, void *extra_args)
+{
+	int *i = extra_args;
+
+	*i = atoi(value);
+	if (*i < 0) {
+		CDEV_LOG_ERR("Argument has to be positive.");
+		return -1;
+	}
+
+	return 0;
+}
+
+struct vdev_device {
+	TAILQ_ENTRY(rte_vdev_device) next;
+	struct rte_device device;
+};
+
+struct rte_cryptodev *
+rte_cryptodev_vdev_pmd_init(const char *name, size_t dev_private_size,
+		int socket_id, void *vdev)
+{
+	struct rte_cryptodev *cryptodev;
+
+	/* allocate device structure */
+	cryptodev = rte_cryptodev_pmd_allocate(name, socket_id);
+	if (cryptodev == NULL)
+		return NULL;
+
+	/* allocate private device structure */
+	if (rte_eal_process_type() == RTE_PROC_PRIMARY) {
+		cryptodev->data->dev_private =
+				rte_zmalloc_socket("cryptodev device private",
+						dev_private_size,
+						RTE_CACHE_LINE_SIZE,
+						socket_id);
+
+		if (cryptodev->data->dev_private == NULL)
+			rte_panic("Cannot allocate memzone for private device"
+					" data");
+	}
+
+	cryptodev->device = &((struct vdev_device *)vdev)->device;
+
+	/* initialise user call-back tail queue */
+	TAILQ_INIT(&(cryptodev->link_intr_cbs));
+
+	return cryptodev;
+}
+
+int
+rte_cryptodev_vdev_parse_init_params(struct rte_crypto_vdev_init_params *params,
+		const char *input_args)
+{
+	struct rte_kvargs *kvlist = NULL;
+	int ret = 0;
+
+	if (params == NULL)
+		return -EINVAL;
+
+	if (input_args) {
+		kvlist = rte_kvargs_parse(input_args,
+				cryptodev_vdev_valid_params);
+		if (kvlist == NULL)
+			return -1;
+
+		ret = rte_kvargs_process(kvlist,
+					RTE_CRYPTODEV_VDEV_MAX_NB_QP_ARG,
+					&rte_cryptodev_vdev_parse_integer_arg,
+					&params->max_nb_queue_pairs);
+		if (ret < 0)
+			goto free_kvlist;
+
+		ret = rte_kvargs_process(kvlist,
+					RTE_CRYPTODEV_VDEV_MAX_NB_SESS_ARG,
+					&rte_cryptodev_vdev_parse_integer_arg,
+					&params->max_nb_sessions);
+		if (ret < 0)
+			goto free_kvlist;
+
+		ret = rte_kvargs_process(kvlist, RTE_CRYPTODEV_VDEV_SOCKET_ID,
+					&rte_cryptodev_vdev_parse_integer_arg,
+					&params->socket_id);
+		if (ret < 0)
+			goto free_kvlist;
+
+		ret = rte_kvargs_process(kvlist, RTE_CRYPTODEV_VDEV_NAME,
+					&rte_cryptodev_vdev_parse_name_arg,
+					params);
+		if (ret < 0)
+			goto free_kvlist;
+	}
+
+free_kvlist:
+	rte_kvargs_free(kvlist);
+	return ret;
+}
diff --git a/lib/librte_cryptodev/rte_cryptodev_vdev.h b/lib/librte_cryptodev/rte_cryptodev_vdev.h
index 94ab9d3..1142d1d 100644
--- a/lib/librte_cryptodev/rte_cryptodev_vdev.h
+++ b/lib/librte_cryptodev/rte_cryptodev_vdev.h
@@ -33,7 +33,6 @@
 #ifndef _RTE_CRYPTODEV_VDEV_H_
 #define _RTE_CRYPTODEV_VDEV_H_
 
-#include <rte_vdev.h>
 #include <inttypes.h>
 
 #include "rte_cryptodev.h"
@@ -80,7 +79,7 @@ struct rte_crypto_vdev_init_params {
  */
 struct rte_cryptodev *
 rte_cryptodev_vdev_pmd_init(const char *name, size_t dev_private_size,
-		int socket_id, struct rte_vdev_device *vdev);
+		int socket_id, void *vdev);
 
 /**
  * @internal
-- 
2.7.4

^ permalink raw reply	[relevance 2%]

* Re: [dpdk-dev] DPDK Community Survey 2017
  @ 2017-09-28 13:58  3% ` Kevin Traynor
  0 siblings, 0 replies; 200+ results
From: Kevin Traynor @ 2017-09-28 13:58 UTC (permalink / raw)
  To: Jain, Deepak K, dev, users; +Cc: Thomas Monjalon

On 09/22/2017 11:47 AM, Jain, Deepak K wrote:
> Hi All,
> 
> As part of our ongoing efforts to improve DPDK, we'd like to hear your feedback!
> 
> We have created a number of DPDK-related questions here.
> 
> https://www.surveymonkey.com/r/DPDK_Community_Survey_2017
> 
> and want to hear your views!!
> 
> The survey will close at midnight GMT on Sunday October 1st, 2017.
> 
> Thanks in advance for your feedback - the more responses we get the more data we have to drive further features, improvements, etc.
> 
> So please respond!!!
> 
> Regards
> Deepak
> 
> 
> 

Hi Deepak,

Thanks for the survey, I hope people will take the time to fill it out -
it was a recurring theme of the conference over the last few days that
more user input is needed. I'm not suggesting a survey on the survey ;-)
but a few comments below. Just my $0.02.

The deadline is really short - I'm not sure why the rush.

Some questions are for users and some for devs. Probably should note
that in the intro, so devs hang in there until the relevant questions.

Q5, I don't think it's a good idea to use radio buttons here, as a user
may have multiple applications. It would also be good to ask the stage
of applications. i.e. poc, development, product

Q10/Q12. I'm not sure if users of OVS will know under the hood if
OVS uses vhost pmd and vhost lib (it only uses vhost lib). You could
probably extrapolate from a combination of other answers, but anyway
both answers indicate vhost lib is being used and maybe that's good
enough info.

Q13. There should be an additional question on hardware generation. We
see hardware deprecation sometimes for older hardware, so need to ask
users which hardware generations they are using.

Q14. Probably this Q should allow multiple selections also.

Q15. It would be interesting to combine the kernels from the choices in
this question with the usage of KNI, igb_uio etc.

Q16. Does "usability of API", include release to release stability, or
just how easy it is to program against? I think maybe another option is
needed.

Q17. Typical trade offs between good and optimal performance should be
listed. Otherwise, why would anyone not say optimal. For example, things
like older hardware support, API/ABI stability etc. I'm sure there's others.

thanks,
Kevin.

^ permalink raw reply	[relevance 3%]

* [dpdk-dev] [PATCH v5 0/3] ethdev new offloads API
  @ 2017-09-28 18:54  4% ` Shahaf Shuler
  2017-10-04  8:17  4%   ` [dpdk-dev] [PATCH v6 0/4] " Shahaf Shuler
  0 siblings, 1 reply; 200+ results
From: Shahaf Shuler @ 2017-09-28 18:54 UTC (permalink / raw)
  To: ferruh.yigit, thomas; +Cc: arybchenko, konstantin.ananyev, jerin.jacob, dev

Tx offloads configuration is per queue. Tx offloads are enabled by default, 
and can be disabled using ETH_TXQ_FLAGS_NO* flags. 
This behaviour is not consistent with the Rx side where the Rx offloads
configuration is per port. Rx offloads are disabled by default and enabled 
according to bit field in rte_eth_rxmode structure.

Moreover, considering more Tx and Rx offloads will be added 
over time, the cost of managing them all inside the PMD will be tremendous,
as the PMD will need to check the matching for the entire offload set 
for each mbuf it handles.
In addition, on the current approach each Rx offload added breaks the
ABI compatibility as it requires to add entries to existing bit-fields.
 
The series address above issues by defining a new offloads API.
In the new API, offloads are divided into per-port and per-queue offloads,
with a corresponding capability for each.
The offloads are disabled by default. Each offload can be enabled or
disabled using the existing DEV_TX_OFFLOADS_* or DEV_RX_OFFLOADS_* flags.
Such API will enable to easily add or remove offloads, without breaking the
ABI compatibility.

In order to provide a smooth transition between the APIs the following actions
were taken:
*  The old offloads API is kept for the meanwhile.
*  Helper function which copy from old to new API were added to ethdev,
   enabling the PMD to support only one of the APIs.
*  Helper function which copy from new to old API were also added,
   to enable application to use the new API with PMD which still supports
   the old one.

Per discussion made on the RFC of this series [1], the integration plan which was
decided is to do the transition in two phases:
* ethdev API will move on 17.11.
* Apps and examples will move on 18.02.

This to enable PMD maintainers sufficient time to adopt the new API.

[1]
http://dpdk.org/ml/archives/dev/2017-August/072643.html

on v5:
 - fix documentation.
 - fix comments on port offloads configuration.

on v4:
 - Added another patch for documentation.
 - Fixed ETH_TXQ_FLAGS_IGNORE flag override.
 - clarify the description of DEV_TX_OFFLOAD_MBUF_FAST_FREE offload.

on v3:
 - Introduce the DEV_TX_OFFLOAD_MBUF_FAST_FREE to act as an equivalent
   for the no refcnt and single mempool flags.
 - Fix features documentation.
 - Fix comment style.

on v2:
 - Taking new approach of dividing offloads into per-queue and per-port one.
 - Postpone the Tx/Rx public struct renaming to 18.02
 - squash the helper functions into the Rx/Tx offloads intro patches.

Shahaf Shuler (3):
  ethdev: introduce Rx queue offloads API
  ethdev: introduce Tx queue offloads API
  doc: add details on ethdev offloads API

 doc/guides/nics/features.rst            |  66 +++++---
 doc/guides/prog_guide/poll_mode_drv.rst |  20 +++
 lib/librte_ether/rte_ethdev.c           | 223 +++++++++++++++++++++++++--
 lib/librte_ether/rte_ethdev.h           |  89 ++++++++++-
 4 files changed, 358 insertions(+), 40 deletions(-)

Series-reviewed-by: Andrew Rybchenko <arybchenko@solarflare.com>
-- 
2.12.0

^ permalink raw reply	[relevance 4%]

* [dpdk-dev] [PATCH v6 0/5] increase port_id range
  2017-09-25  3:22  4%   ` [dpdk-dev] [PATCH v5 0/5] " Zhiyong Yang
  2017-09-25  3:22  7%     ` [dpdk-dev] [PATCH v5 1/5] net/bonding: remove bonding APIs using ABI versioning Zhiyong Yang
  2017-09-25  3:22  1%     ` [dpdk-dev] [PATCH v5 2/5] ethdev: increase port_id range Zhiyong Yang
@ 2017-09-29  7:17  4%     ` Zhiyong Yang
  2017-09-29  7:17  7%       ` [dpdk-dev] [PATCH v6 1/5] net/bonding: remove bonding APIs using ABI versioning Zhiyong Yang
                         ` (2 more replies)
  2 siblings, 3 replies; 200+ results
From: Zhiyong Yang @ 2017-09-29  7:17 UTC (permalink / raw)
  To: dev; +Cc: ferruh.yigit, thomas

port_id is currently defined as uint8_t, which is limited to the range
0 to 255. A larger range is required for vdev scalability.

It is necessary for a redefinition of port_id to extend it from
1 bytes to 2 bytes. All ethdev APIs and usages related to port_id will
be changed at the same time.

Discussion about port_id is the following thread.
http://www.dpdk.org/dev/patchwork/patch/23208/

Changes in V2:
1. cover more PMDs to increase port_id range.
2. cover more examples to increase port_id range.
3. add 17.11 release note.

Changes in V3:
1.  cover mlx4 and mlx5.
2.  add to increase port_id range in test code.
3.  The patch "librte_mbuf: modify port initialization value" is merged
    into the patchset.

Changes in V4:
1.  Add a patch to remove bonding APIs using ABI versioning according to
    Ferruh's comments.
2.  Unify to use typedef portid_t in testpmd code.
3.  update release note deprecation doc in 2/5
4.  fix some issues according to comments.

Changes in V5:
1.  For 1/5, bond_mode_8023ad_conf_get_v1708() and bond_mode_8023ad_conf
    _get() are merged into one function bond_mode_8023ad_conf_get.

Changes in V6:
1.  For 2/5, remove the unnecessary LIBABIVER in Makefile and update
    the release notes "Shared Library Versions".
    Note: The patchset have dependency on the following patch.
    http://www.dpdk.org/dev/patchwork/patch/28738/
    http://www.dpdk.org/dev/patchwork/patch/29219/

Note: 3/5 and 4/5 patches' building depends on 2/5 patch since 2/5 patch
breaks lib/PMD API/ABI.

Zhiyong Yang (5):
  net/bonding: remove bonding APIs using ABI versioning
  ethdev: increase port_id range
  examples: increase port_id range
  test: increase port_id range
  librte_mbuf: modify port initialization value

 app/pdump/main.c                                   |   2 +-
 app/test-pmd/cmdline.c                             |   6 +-
 app/test-pmd/config.c                              |   4 +-
 app/test-pmd/ieee1588fwd.c                         |  26 +--
 app/test-pmd/parameters.c                          |   2 +-
 app/test-pmd/rxonly.c                              |   2 +-
 app/test-pmd/testpmd.c                             |  18 +-
 app/test-pmd/testpmd.h                             |   4 +-
 doc/guides/rel_notes/deprecation.rst               |   6 -
 doc/guides/rel_notes/release_17_11.rst             |  24 +-
 drivers/net/af_packet/rte_eth_af_packet.c          |   2 +-
 drivers/net/ark/ark_ethdev.c                       |   2 +-
 drivers/net/avp/avp_ethdev.c                       |   2 +-
 drivers/net/bnx2x/bnx2x_rxtx.h                     |   4 +-
 drivers/net/bnxt/Makefile                          |   2 +-
 drivers/net/bnxt/bnxt.h                            |   2 +-
 drivers/net/bnxt/bnxt_ethdev.c                     |   4 +-
 drivers/net/bnxt/bnxt_rxq.h                        |   2 +-
 drivers/net/bnxt/bnxt_txq.h                        |   2 +-
 drivers/net/bnxt/rte_pmd_bnxt.c                    |  32 +--
 drivers/net/bnxt/rte_pmd_bnxt.h                    |  32 +--
 drivers/net/bonding/Makefile                       |   2 +-
 drivers/net/bonding/rte_eth_bond.h                 |  41 ++--
 drivers/net/bonding/rte_eth_bond_8023ad.c          | 203 +++--------------
 drivers/net/bonding/rte_eth_bond_8023ad.h          |  48 ++--
 drivers/net/bonding/rte_eth_bond_8023ad_private.h  |  12 +-
 drivers/net/bonding/rte_eth_bond_alb.c             |   6 +-
 drivers/net/bonding/rte_eth_bond_alb.h             |   6 +-
 drivers/net/bonding/rte_eth_bond_api.c             |  64 +++---
 drivers/net/bonding/rte_eth_bond_args.c            |   2 +-
 drivers/net/bonding/rte_eth_bond_pmd.c             |  62 +++---
 drivers/net/bonding/rte_eth_bond_private.h         |  45 ++--
 drivers/net/bonding/rte_eth_bond_version.map       |   4 -
 drivers/net/e1000/em_ethdev.c                      |   2 +-
 drivers/net/e1000/em_rxtx.c                        |   4 +-
 drivers/net/e1000/igb_rxtx.c                       |   4 +-
 drivers/net/failsafe/failsafe_ether.c              |   4 +-
 drivers/net/failsafe/failsafe_private.h            |   4 +-
 drivers/net/fm10k/fm10k.h                          |   6 +-
 drivers/net/i40e/Makefile                          |   2 +-
 drivers/net/i40e/i40e_ethdev.c                     |   5 +-
 drivers/net/i40e/i40e_rxtx.h                       |   4 +-
 drivers/net/i40e/rte_pmd_i40e.c                    |  50 ++---
 drivers/net/i40e/rte_pmd_i40e.h                    |  48 ++--
 drivers/net/ixgbe/Makefile                         |   2 +-
 drivers/net/ixgbe/ixgbe_ethdev.c                   |   5 +-
 drivers/net/ixgbe/ixgbe_rxtx.h                     |   4 +-
 drivers/net/ixgbe/rte_pmd_ixgbe.c                  |  60 ++---
 drivers/net/ixgbe/rte_pmd_ixgbe.h                  |  64 +++---
 drivers/net/mlx5/mlx5_rxtx.h                       |   4 +-
 drivers/net/nfp/nfp_net.c                          |  16 +-
 drivers/net/nfp/nfp_net_pmd.h                      |   2 +-
 drivers/net/null/rte_eth_null.c                    |   2 +-
 drivers/net/pcap/rte_eth_pcap.c                    |   2 +-
 drivers/net/qede/qede_if.h                         |   2 +-
 drivers/net/ring/rte_eth_ring.c                    |   2 +-
 drivers/net/szedata2/rte_eth_szedata2.c            |   2 +-
 drivers/net/thunderx/nicvf_struct.h                |   2 +-
 drivers/net/vhost/Makefile                         |   2 +-
 drivers/net/vhost/rte_eth_vhost.c                  |   6 +-
 drivers/net/vhost/rte_eth_vhost.h                  |   4 +-
 drivers/net/virtio/virtio_pci.h                    |   2 +-
 drivers/net/virtio/virtio_rxtx.h                   |   6 +-
 drivers/net/vmxnet3/vmxnet3_ring.h                 |   4 +-
 examples/bond/main.c                               |  16 +-
 examples/distributor/main.c                        |  26 +--
 examples/exception_path/main.c                     |  35 ++-
 examples/ip_fragmentation/main.c                   |  33 +--
 examples/ip_pipeline/init.c                        |   4 +-
 examples/ip_reassembly/main.c                      |  34 +--
 examples/ipv4_multicast/main.c                     |  30 +--
 examples/kni/main.c                                |  30 +--
 examples/l2fwd-cat/l2fwd-cat.c                     |  12 +-
 examples/l2fwd-jobstats/main.c                     |  34 +--
 examples/l2fwd-keepalive/main.c                    |  50 ++---
 examples/l2fwd/main.c                              |  47 ++--
 examples/l3fwd-acl/main.c                          |   9 +-
 examples/l3fwd-power/main.c                        |  60 ++---
 examples/l3fwd-vf/main.c                           |  50 +++--
 examples/l3fwd/l3fwd.h                             |  10 +-
 examples/l3fwd/l3fwd_common.h                      |   2 +-
 examples/l3fwd/l3fwd_em.c                          |   2 +-
 examples/l3fwd/l3fwd_em.h                          |   6 +-
 examples/l3fwd/l3fwd_em_hlm.h                      |  14 +-
 examples/l3fwd/l3fwd_lpm.c                         |  15 +-
 examples/l3fwd/l3fwd_lpm.h                         |   4 +-
 examples/l3fwd/l3fwd_lpm_neon.h                    |   4 +-
 examples/l3fwd/l3fwd_lpm_sse.h                     |   4 +-
 examples/l3fwd/main.c                              |  30 +--
 examples/link_status_interrupt/main.c              |   9 +-
 examples/load_balancer/config.c                    |  14 +-
 examples/load_balancer/init.c                      |  34 ++-
 examples/load_balancer/main.h                      |  11 +-
 examples/load_balancer/runtime.c                   |  12 +-
 .../client_server_mp/mp_client/client.c            |  17 +-
 .../client_server_mp/mp_server/args.c              |   4 +-
 .../client_server_mp/mp_server/args.h              |   2 +-
 .../client_server_mp/mp_server/init.c              |  11 +-
 .../client_server_mp/mp_server/main.c              |   2 +-
 .../multi_process/client_server_mp/shared/common.h |   4 +-
 examples/multi_process/l2fwd_fork/main.c           |  23 +-
 examples/netmap_compat/lib/compat_netmap.c         |  52 +++--
 examples/netmap_compat/lib/compat_netmap.h         |   2 +-
 examples/packet_ordering/main.c                    |  19 +-
 examples/performance-thread/l3fwd-thread/main.c    | 143 ++++++------
 examples/ptpclient/ptpclient.c                     |   4 +-
 examples/qos_sched/args.c                          |  12 +-
 examples/qos_sched/init.c                          |  31 +--
 examples/qos_sched/main.c                          |  14 +-
 examples/qos_sched/main.h                          |  24 +-
 examples/qos_sched/stats.c                         |  16 +-
 examples/quota_watermark/qw/init.c                 |   4 +-
 examples/quota_watermark/qw/main.c                 |  10 +-
 examples/rxtx_callbacks/main.c                     |   8 +-
 examples/server_node_efd/server/main.c             |   2 +-
 examples/server_node_efd/shared/common.h           |   4 +-
 examples/skeleton/basicfwd.c                       |  12 +-
 examples/vhost/main.c                              |  10 +-
 lib/librte_bitratestats/Makefile                   |   2 +-
 lib/librte_bitratestats/rte_bitrate.c              |   2 +-
 lib/librte_bitratestats/rte_bitrate.h              |   2 +-
 lib/librte_ether/Makefile                          |   2 +-
 lib/librte_ether/rte_ethdev.c                      | 241 +++++++++++----------
 lib/librte_ether/rte_ethdev.h                      | 238 ++++++++++----------
 lib/librte_ether/rte_flow.c                        |   2 +-
 lib/librte_ether/rte_flow_driver.h                 |   2 +-
 lib/librte_ether/rte_tm.c                          |  62 +++---
 lib/librte_ether/rte_tm.h                          |  60 ++---
 lib/librte_ether/rte_tm_driver.h                   |   2 +-
 lib/librte_kni/rte_kni.h                           |   6 +-
 lib/librte_latencystats/rte_latencystats.c         |  12 +-
 lib/librte_mbuf/rte_mbuf.c                         |   2 +-
 lib/librte_mbuf/rte_mbuf.h                         |   4 +-
 lib/librte_pdump/Makefile                          |   2 +-
 lib/librte_pdump/rte_pdump.c                       |  16 +-
 lib/librte_pdump/rte_pdump.h                       |   4 +-
 lib/librte_port/rte_port_ethdev.c                  |   6 +-
 lib/librte_port/rte_port_ethdev.h                  |   6 +-
 test/test/test_kni.c                               |  12 +-
 test/test/test_link_bonding.c                      |  40 ++--
 test/test/test_link_bonding_mode4.c                |  12 +-
 test/test/test_pmd_perf.c                          |  30 +--
 test/test/test_pmd_ring_perf.c                     |   2 +-
 test/test/virtual_pmd.c                            |  24 +-
 test/test/virtual_pmd.h                            |  28 +--
 145 files changed, 1394 insertions(+), 1499 deletions(-)

-- 
2.13.3

^ permalink raw reply	[relevance 4%]

* [dpdk-dev] [PATCH v6 1/5] net/bonding: remove bonding APIs using ABI versioning
  2017-09-29  7:17  4%     ` [dpdk-dev] [PATCH v6 0/5] " Zhiyong Yang
@ 2017-09-29  7:17  7%       ` Zhiyong Yang
  2017-09-29  7:17  1%       ` [dpdk-dev] [PATCH v6 2/5] ethdev: increase port_id range Zhiyong Yang
  2017-10-06  2:15  0%       ` [dpdk-dev] [PATCH v6 0/5] " Ferruh Yigit
  2 siblings, 0 replies; 200+ results
From: Zhiyong Yang @ 2017-09-29  7:17 UTC (permalink / raw)
  To: dev; +Cc: ferruh.yigit, thomas, Zhiyong Yang

There are two bonding APIs using ABI versioning, and both have
port_id as parameter. Since we are already breaking ABI, no need
to keep older versions of APIs.

Signed-off-by: Zhiyong Yang <zhiyong.yang@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
 drivers/net/bonding/rte_eth_bond_8023ad.c    | 149 +--------------------------
 drivers/net/bonding/rte_eth_bond_8023ad.h    |  18 ----
 drivers/net/bonding/rte_eth_bond_version.map |   4 -
 3 files changed, 2 insertions(+), 169 deletions(-)

diff --git a/drivers/net/bonding/rte_eth_bond_8023ad.c b/drivers/net/bonding/rte_eth_bond_8023ad.c
index 20b5a8961..c2b9e053c 100644
--- a/drivers/net/bonding/rte_eth_bond_8023ad.c
+++ b/drivers/net/bonding/rte_eth_bond_8023ad.c
@@ -1111,27 +1111,6 @@ bond_mode_8023ad_conf_get(struct rte_eth_dev *dev,
 	conf->tx_period_ms = mode4->tx_period_timeout / ms_ticks;
 	conf->update_timeout_ms = mode4->update_timeout_us / 1000;
 	conf->rx_marker_period_ms = mode4->rx_marker_timeout / ms_ticks;
-}
-
-static void
-bond_mode_8023ad_conf_get_v1607(struct rte_eth_dev *dev,
-		struct rte_eth_bond_8023ad_conf *conf)
-{
-	struct bond_dev_private *internals = dev->data->dev_private;
-	struct mode8023ad_private *mode4 = &internals->mode4;
-
-	bond_mode_8023ad_conf_get(dev, conf);
-	conf->slowrx_cb = mode4->slowrx_cb;
-}
-
-static void
-bond_mode_8023ad_conf_get_v1708(struct rte_eth_dev *dev,
-		struct rte_eth_bond_8023ad_conf *conf)
-{
-	struct bond_dev_private *internals = dev->data->dev_private;
-	struct mode8023ad_private *mode4 = &internals->mode4;
-
-	bond_mode_8023ad_conf_get(dev, conf);
 	conf->slowrx_cb = mode4->slowrx_cb;
 	conf->agg_selection = mode4->agg_selection;
 }
@@ -1171,27 +1150,6 @@ bond_mode_8023ad_conf_assign(struct mode8023ad_private *mode4,
 	mode4->dedicated_queues.tx_qid = UINT16_MAX;
 }
 
-static void
-bond_mode_8023ad_setup_v20(struct rte_eth_dev *dev,
-		struct rte_eth_bond_8023ad_conf *conf)
-{
-	struct rte_eth_bond_8023ad_conf def_conf;
-	struct bond_dev_private *internals = dev->data->dev_private;
-	struct mode8023ad_private *mode4 = &internals->mode4;
-
-	if (conf == NULL) {
-		conf = &def_conf;
-		bond_mode_8023ad_conf_get_default(conf);
-	}
-
-	bond_mode_8023ad_stop(dev);
-	bond_mode_8023ad_conf_assign(mode4, conf);
-
-	if (dev->data->dev_started)
-		bond_mode_8023ad_start(dev);
-}
-
-
 void
 bond_mode_8023ad_setup(struct rte_eth_dev *dev,
 		struct rte_eth_bond_8023ad_conf *conf)
@@ -1207,27 +1165,6 @@ bond_mode_8023ad_setup(struct rte_eth_dev *dev,
 
 	bond_mode_8023ad_stop(dev);
 	bond_mode_8023ad_conf_assign(mode4, conf);
-
-
-	if (dev->data->dev_started)
-		bond_mode_8023ad_start(dev);
-}
-
-static void
-bond_mode_8023ad_setup_v1708(struct rte_eth_dev *dev,
-		struct rte_eth_bond_8023ad_conf *conf)
-{
-	struct rte_eth_bond_8023ad_conf def_conf;
-	struct bond_dev_private *internals = dev->data->dev_private;
-	struct mode8023ad_private *mode4 = &internals->mode4;
-
-	if (conf == NULL) {
-		conf = &def_conf;
-		bond_mode_8023ad_conf_get_default(conf);
-	}
-
-	bond_mode_8023ad_stop(dev);
-	bond_mode_8023ad_conf_assign(mode4, conf);
 	mode4->slowrx_cb = conf->slowrx_cb;
 	mode4->agg_selection = AGG_STABLE;
 
@@ -1358,7 +1295,7 @@ bond_mode_8023ad_handle_slow_pkt(struct bond_dev_private *internals,
 }
 
 int
-rte_eth_bond_8023ad_conf_get_v20(uint8_t port_id,
+rte_eth_bond_8023ad_conf_get(uint8_t port_id,
 		struct rte_eth_bond_8023ad_conf *conf)
 {
 	struct rte_eth_dev *bond_dev;
@@ -1373,46 +1310,6 @@ rte_eth_bond_8023ad_conf_get_v20(uint8_t port_id,
 	bond_mode_8023ad_conf_get(bond_dev, conf);
 	return 0;
 }
-VERSION_SYMBOL(rte_eth_bond_8023ad_conf_get, _v20, 2.0);
-
-int
-rte_eth_bond_8023ad_conf_get_v1607(uint8_t port_id,
-		struct rte_eth_bond_8023ad_conf *conf)
-{
-	struct rte_eth_dev *bond_dev;
-
-	if (valid_bonded_port_id(port_id) != 0)
-		return -EINVAL;
-
-	if (conf == NULL)
-		return -EINVAL;
-
-	bond_dev = &rte_eth_devices[port_id];
-	bond_mode_8023ad_conf_get_v1607(bond_dev, conf);
-	return 0;
-}
-VERSION_SYMBOL(rte_eth_bond_8023ad_conf_get, _v1607, 16.07);
-
-int
-rte_eth_bond_8023ad_conf_get_v1708(uint8_t port_id,
-		struct rte_eth_bond_8023ad_conf *conf)
-{
-	struct rte_eth_dev *bond_dev;
-
-	if (valid_bonded_port_id(port_id) != 0)
-		return -EINVAL;
-
-	if (conf == NULL)
-		return -EINVAL;
-
-	bond_dev = &rte_eth_devices[port_id];
-	bond_mode_8023ad_conf_get_v1708(bond_dev, conf);
-	return 0;
-}
-MAP_STATIC_SYMBOL(int rte_eth_bond_8023ad_conf_get(uint8_t port_id,
-		struct rte_eth_bond_8023ad_conf *conf),
-		rte_eth_bond_8023ad_conf_get_v1708);
-BIND_DEFAULT_SYMBOL(rte_eth_bond_8023ad_conf_get, _v1708, 17.08);
 
 int
 rte_eth_bond_8023ad_agg_selection_set(uint8_t port_id,
@@ -1483,25 +1380,7 @@ bond_8023ad_setup_validate(uint8_t port_id,
 }
 
 int
-rte_eth_bond_8023ad_setup_v20(uint8_t port_id,
-		struct rte_eth_bond_8023ad_conf *conf)
-{
-	struct rte_eth_dev *bond_dev;
-	int err;
-
-	err = bond_8023ad_setup_validate(port_id, conf);
-	if (err != 0)
-		return err;
-
-	bond_dev = &rte_eth_devices[port_id];
-	bond_mode_8023ad_setup_v20(bond_dev, conf);
-
-	return 0;
-}
-VERSION_SYMBOL(rte_eth_bond_8023ad_setup, _v20, 2.0);
-
-int
-rte_eth_bond_8023ad_setup_v1607(uint8_t port_id,
+rte_eth_bond_8023ad_setup(uint8_t port_id,
 		struct rte_eth_bond_8023ad_conf *conf)
 {
 	struct rte_eth_dev *bond_dev;
@@ -1516,30 +1395,6 @@ rte_eth_bond_8023ad_setup_v1607(uint8_t port_id,
 
 	return 0;
 }
-VERSION_SYMBOL(rte_eth_bond_8023ad_setup, _v1607, 16.07);
-
-
-int
-rte_eth_bond_8023ad_setup_v1708(uint8_t port_id,
-		struct rte_eth_bond_8023ad_conf *conf)
-{
-	struct rte_eth_dev *bond_dev;
-	int err;
-
-	err = bond_8023ad_setup_validate(port_id, conf);
-	if (err != 0)
-		return err;
-
-	bond_dev = &rte_eth_devices[port_id];
-	bond_mode_8023ad_setup_v1708(bond_dev, conf);
-
-	return 0;
-}
-BIND_DEFAULT_SYMBOL(rte_eth_bond_8023ad_setup, _v1708, 17.08);
-MAP_STATIC_SYMBOL(int rte_eth_bond_8023ad_setup(uint8_t port_id,
-		struct rte_eth_bond_8023ad_conf *conf),
-		rte_eth_bond_8023ad_setup_v1708);
-
 
 
 
diff --git a/drivers/net/bonding/rte_eth_bond_8023ad.h b/drivers/net/bonding/rte_eth_bond_8023ad.h
index 1d353c734..d609745e0 100644
--- a/drivers/net/bonding/rte_eth_bond_8023ad.h
+++ b/drivers/net/bonding/rte_eth_bond_8023ad.h
@@ -194,15 +194,6 @@ struct rte_eth_bond_8023ad_slave_info {
 int
 rte_eth_bond_8023ad_conf_get(uint8_t port_id,
 		struct rte_eth_bond_8023ad_conf *conf);
-int
-rte_eth_bond_8023ad_conf_get_v20(uint8_t port_id,
-		struct rte_eth_bond_8023ad_conf *conf);
-int
-rte_eth_bond_8023ad_conf_get_v1607(uint8_t port_id,
-		struct rte_eth_bond_8023ad_conf *conf);
-int
-rte_eth_bond_8023ad_conf_get_v1708(uint8_t port_id,
-		struct rte_eth_bond_8023ad_conf *conf);
 
 /**
  * @internal
@@ -218,15 +209,6 @@ rte_eth_bond_8023ad_conf_get_v1708(uint8_t port_id,
 int
 rte_eth_bond_8023ad_setup(uint8_t port_id,
 		struct rte_eth_bond_8023ad_conf *conf);
-int
-rte_eth_bond_8023ad_setup_v20(uint8_t port_id,
-		struct rte_eth_bond_8023ad_conf *conf);
-int
-rte_eth_bond_8023ad_setup_v1607(uint8_t port_id,
-		struct rte_eth_bond_8023ad_conf *conf);
-int
-rte_eth_bond_8023ad_setup_v1708(uint8_t port_id,
-		struct rte_eth_bond_8023ad_conf *conf);
 
 /**
  * @internal
diff --git a/drivers/net/bonding/rte_eth_bond_version.map b/drivers/net/bonding/rte_eth_bond_version.map
index 0f4e847da..ec3374b0f 100644
--- a/drivers/net/bonding/rte_eth_bond_version.map
+++ b/drivers/net/bonding/rte_eth_bond_version.map
@@ -1,8 +1,6 @@
 DPDK_2.0 {
 	global:
 
-	rte_eth_bond_8023ad_conf_get;
-	rte_eth_bond_8023ad_setup;
 	rte_eth_bond_active_slaves_get;
 	rte_eth_bond_create;
 	rte_eth_bond_link_monitoring_set;
@@ -39,8 +37,6 @@ DPDK_16.07 {
 	rte_eth_bond_8023ad_ext_distrib;
 	rte_eth_bond_8023ad_ext_distrib_get;
 	rte_eth_bond_8023ad_ext_slowtx;
-	rte_eth_bond_8023ad_conf_get;
-	rte_eth_bond_8023ad_setup;
 
 } DPDK_16.04;
 
-- 
2.13.3

^ permalink raw reply	[relevance 7%]

* [dpdk-dev] [PATCH v6 2/5] ethdev: increase port_id range
  2017-09-29  7:17  4%     ` [dpdk-dev] [PATCH v6 0/5] " Zhiyong Yang
  2017-09-29  7:17  7%       ` [dpdk-dev] [PATCH v6 1/5] net/bonding: remove bonding APIs using ABI versioning Zhiyong Yang
@ 2017-09-29  7:17  1%       ` Zhiyong Yang
  2017-10-06  2:15  0%       ` [dpdk-dev] [PATCH v6 0/5] " Ferruh Yigit
  2 siblings, 0 replies; 200+ results
From: Zhiyong Yang @ 2017-09-29  7:17 UTC (permalink / raw)
  To: dev; +Cc: ferruh.yigit, thomas, Zhiyong Yang

Extend port_id definition from uint8_t to uint16_t in lib and drivers
data structures, specifically rte_eth_dev_data. Modify the APIs,
drivers and app using port_id at the same time.

Fix some checkpatch issues from the original code and remove some
unnecessary cast operations.

release_17_11 and deprecation docs have been updated in this patch.

Signed-off-by: Zhiyong Yang <zhiyong.yang@intel.com>
Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
 app/pdump/main.c                                  |   2 +-
 app/test-pmd/cmdline.c                            |   6 +-
 app/test-pmd/config.c                             |   4 +-
 app/test-pmd/ieee1588fwd.c                        |  26 ++-
 app/test-pmd/parameters.c                         |   2 +-
 app/test-pmd/rxonly.c                             |   2 +-
 app/test-pmd/testpmd.c                            |  18 +-
 app/test-pmd/testpmd.h                            |   4 +-
 doc/guides/rel_notes/deprecation.rst              |   6 -
 doc/guides/rel_notes/release_17_11.rst            |  24 ++-
 drivers/net/af_packet/rte_eth_af_packet.c         |   2 +-
 drivers/net/ark/ark_ethdev.c                      |   2 +-
 drivers/net/avp/avp_ethdev.c                      |   2 +-
 drivers/net/bnx2x/bnx2x_rxtx.h                    |   4 +-
 drivers/net/bnxt/Makefile                         |   2 +-
 drivers/net/bnxt/bnxt.h                           |   2 +-
 drivers/net/bnxt/bnxt_ethdev.c                    |   4 +-
 drivers/net/bnxt/bnxt_rxq.h                       |   2 +-
 drivers/net/bnxt/bnxt_txq.h                       |   2 +-
 drivers/net/bnxt/rte_pmd_bnxt.c                   |  32 +--
 drivers/net/bnxt/rte_pmd_bnxt.h                   |  32 +--
 drivers/net/bonding/Makefile                      |   2 +-
 drivers/net/bonding/rte_eth_bond.h                |  41 ++--
 drivers/net/bonding/rte_eth_bond_8023ad.c         |  60 +++---
 drivers/net/bonding/rte_eth_bond_8023ad.h         |  30 +--
 drivers/net/bonding/rte_eth_bond_8023ad_private.h |  12 +-
 drivers/net/bonding/rte_eth_bond_alb.c            |   6 +-
 drivers/net/bonding/rte_eth_bond_alb.h            |   6 +-
 drivers/net/bonding/rte_eth_bond_api.c            |  64 +++---
 drivers/net/bonding/rte_eth_bond_args.c           |   2 +-
 drivers/net/bonding/rte_eth_bond_pmd.c            |  62 +++---
 drivers/net/bonding/rte_eth_bond_private.h        |  45 ++--
 drivers/net/e1000/em_ethdev.c                     |   2 +-
 drivers/net/e1000/em_rxtx.c                       |   4 +-
 drivers/net/e1000/igb_rxtx.c                      |   4 +-
 drivers/net/failsafe/failsafe_ether.c             |   4 +-
 drivers/net/failsafe/failsafe_private.h           |   4 +-
 drivers/net/fm10k/fm10k.h                         |   6 +-
 drivers/net/i40e/Makefile                         |   2 +-
 drivers/net/i40e/i40e_ethdev.c                    |   5 +-
 drivers/net/i40e/i40e_rxtx.h                      |   4 +-
 drivers/net/i40e/rte_pmd_i40e.c                   |  50 ++---
 drivers/net/i40e/rte_pmd_i40e.h                   |  48 ++---
 drivers/net/ixgbe/Makefile                        |   2 +-
 drivers/net/ixgbe/ixgbe_ethdev.c                  |   5 +-
 drivers/net/ixgbe/ixgbe_rxtx.h                    |   4 +-
 drivers/net/ixgbe/rte_pmd_ixgbe.c                 |  60 +++---
 drivers/net/ixgbe/rte_pmd_ixgbe.h                 |  64 +++---
 drivers/net/mlx5/mlx5_rxtx.h                      |   4 +-
 drivers/net/nfp/nfp_net.c                         |  16 +-
 drivers/net/nfp/nfp_net_pmd.h                     |   2 +-
 drivers/net/null/rte_eth_null.c                   |   2 +-
 drivers/net/pcap/rte_eth_pcap.c                   |   2 +-
 drivers/net/qede/qede_if.h                        |   2 +-
 drivers/net/ring/rte_eth_ring.c                   |   2 +-
 drivers/net/szedata2/rte_eth_szedata2.c           |   2 +-
 drivers/net/thunderx/nicvf_struct.h               |   2 +-
 drivers/net/vhost/Makefile                        |   2 +-
 drivers/net/vhost/rte_eth_vhost.c                 |   6 +-
 drivers/net/vhost/rte_eth_vhost.h                 |   4 +-
 drivers/net/virtio/virtio_pci.h                   |   2 +-
 drivers/net/virtio/virtio_rxtx.h                  |   6 +-
 drivers/net/vmxnet3/vmxnet3_ring.h                |   4 +-
 lib/librte_bitratestats/Makefile                  |   2 +-
 lib/librte_bitratestats/rte_bitrate.c             |   2 +-
 lib/librte_bitratestats/rte_bitrate.h             |   2 +-
 lib/librte_ether/Makefile                         |   2 +-
 lib/librte_ether/rte_ethdev.c                     | 241 +++++++++++-----------
 lib/librte_ether/rte_ethdev.h                     | 238 ++++++++++-----------
 lib/librte_ether/rte_flow.c                       |   2 +-
 lib/librte_ether/rte_flow_driver.h                |   2 +-
 lib/librte_ether/rte_tm.c                         |  62 +++---
 lib/librte_ether/rte_tm.h                         |  60 +++---
 lib/librte_ether/rte_tm_driver.h                  |   2 +-
 lib/librte_kni/rte_kni.h                          |   6 +-
 lib/librte_latencystats/rte_latencystats.c        |  12 +-
 lib/librte_pdump/Makefile                         |   2 +-
 lib/librte_pdump/rte_pdump.c                      |  16 +-
 lib/librte_pdump/rte_pdump.h                      |   4 +-
 lib/librte_port/rte_port_ethdev.c                 |   6 +-
 lib/librte_port/rte_port_ethdev.h                 |   6 +-
 81 files changed, 765 insertions(+), 738 deletions(-)

diff --git a/app/pdump/main.c b/app/pdump/main.c
index 3b13753d9..090a50cfc 100644
--- a/app/pdump/main.c
+++ b/app/pdump/main.c
@@ -623,7 +623,7 @@ static void
 create_mp_ring_vdev(void)
 {
 	int i;
-	uint8_t portid;
+	uint16_t portid;
 	struct pdump_tuples *pt = NULL;
 	struct rte_mempool *mbuf_pool = NULL;
 	char vdev_args[SIZE];
diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c
index ccdf239d6..d9d083888 100644
--- a/app/test-pmd/cmdline.c
+++ b/app/test-pmd/cmdline.c
@@ -4588,7 +4588,7 @@ struct cmd_show_bonding_config_result {
 	cmdline_fixed_string_t show;
 	cmdline_fixed_string_t bonding;
 	cmdline_fixed_string_t config;
-	uint8_t port_id;
+	portid_t port_id;
 };
 
 static void cmd_show_bonding_config_parsed(void *parsed_result,
@@ -4597,7 +4597,7 @@ static void cmd_show_bonding_config_parsed(void *parsed_result,
 {
 	struct cmd_show_bonding_config_result *res = parsed_result;
 	int bonding_mode, agg_mode;
-	uint8_t slaves[RTE_MAX_ETHPORTS];
+	portid_t slaves[RTE_MAX_ETHPORTS];
 	int num_slaves, num_active_slaves;
 	int primary_id;
 	int i;
@@ -11500,7 +11500,7 @@ struct cmd_vf_vlan_stripq_result {
 	cmdline_fixed_string_t vf;
 	cmdline_fixed_string_t vlan;
 	cmdline_fixed_string_t stripq;
-	uint8_t port_id;
+	portid_t port_id;
 	uint16_t vf_id;
 	cmdline_fixed_string_t on_off;
 };
diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c
index 3ae3e1cd8..155136dd5 100644
--- a/app/test-pmd/config.c
+++ b/app/test-pmd/config.c
@@ -358,7 +358,7 @@ rx_queue_infos_display(portid_t port_id, uint16_t queue_id)
 
 	rc = rte_eth_rx_queue_info_get(port_id, queue_id, &qinfo);
 	if (rc != 0) {
-		printf("Failed to retrieve information for port: %hhu, "
+		printf("Failed to retrieve information for port: %u, "
 			"RX queue: %hu\nerror desc: %s(%d)\n",
 			port_id, queue_id, strerror(-rc), rc);
 		return;
@@ -391,7 +391,7 @@ tx_queue_infos_display(portid_t port_id, uint16_t queue_id)
 
 	rc = rte_eth_tx_queue_info_get(port_id, queue_id, &qinfo);
 	if (rc != 0) {
-		printf("Failed to retrieve information for port: %hhu, "
+		printf("Failed to retrieve information for port: %u, "
 			"TX queue: %hu\nerror desc: %s(%d)\n",
 			port_id, queue_id, strerror(-rc), rc);
 		return;
diff --git a/app/test-pmd/ieee1588fwd.c b/app/test-pmd/ieee1588fwd.c
index 51170ee3e..91ee78646 100644
--- a/app/test-pmd/ieee1588fwd.c
+++ b/app/test-pmd/ieee1588fwd.c
@@ -86,12 +86,11 @@ port_ieee1588_rx_timestamp_check(portid_t pi, uint32_t index)
 	struct timespec timestamp = {0, 0};
 
 	if (rte_eth_timesync_read_rx_timestamp(pi, &timestamp, index) < 0) {
-		printf("Port %u RX timestamp registers not valid\n",
-		       (unsigned) pi);
+		printf("Port %u RX timestamp registers not valid\n", pi);
 		return;
 	}
 	printf("Port %u RX timestamp value %lu s %lu ns\n",
-	       (unsigned) pi, timestamp.tv_sec, timestamp.tv_nsec);
+		pi, timestamp.tv_sec, timestamp.tv_nsec);
 }
 
 #define MAX_TX_TMST_WAIT_MICROSECS 1000 /**< 1 milli-second */
@@ -110,12 +109,12 @@ port_ieee1588_tx_timestamp_check(portid_t pi)
 	if (wait_us >= MAX_TX_TMST_WAIT_MICROSECS) {
 		printf("Port %u TX timestamp registers not valid after "
 		       "%u micro-seconds\n",
-		       (unsigned) pi, (unsigned) MAX_TX_TMST_WAIT_MICROSECS);
+		       pi, MAX_TX_TMST_WAIT_MICROSECS);
 		return;
 	}
 	printf("Port %u TX timestamp value %lu s %lu ns validated after "
 	       "%u micro-second%s\n",
-	       (unsigned) pi, timestamp.tv_sec, timestamp.tv_nsec, wait_us,
+	       pi, timestamp.tv_sec, timestamp.tv_nsec, wait_us,
 	       (wait_us == 1) ? "" : "s");
 }
 
@@ -148,11 +147,11 @@ ieee1588_packet_fwd(struct fwd_stream *fs)
 		if (eth_type == ETHER_TYPE_1588) {
 			printf("Port %u Received PTP packet not filtered"
 			       " by hardware\n",
-			       (unsigned) fs->rx_port);
+			       fs->rx_port);
 		} else {
 			printf("Port %u Received non PTP packet type=0x%4x "
 			       "len=%u\n",
-			       (unsigned) fs->rx_port, eth_type,
+			       fs->rx_port, eth_type,
 			       (unsigned) mb->pkt_len);
 		}
 		rte_pktmbuf_free(mb);
@@ -161,7 +160,7 @@ ieee1588_packet_fwd(struct fwd_stream *fs)
 	if (eth_type != ETHER_TYPE_1588) {
 		printf("Port %u Received NON PTP packet incorrectly"
 		       " detected by hardware\n",
-		       (unsigned) fs->rx_port);
+		       fs->rx_port);
 		rte_pktmbuf_free(mb);
 		return;
 	}
@@ -175,19 +174,19 @@ ieee1588_packet_fwd(struct fwd_stream *fs)
 	if (ptp_hdr->version != 0x02) {
 		printf("Port %u Received PTP V2 Ethernet frame with wrong PTP"
 		       " protocol version 0x%x (should be 0x02)\n",
-		       (unsigned) fs->rx_port, ptp_hdr->version);
+		       fs->rx_port, ptp_hdr->version);
 		rte_pktmbuf_free(mb);
 		return;
 	}
 	if (ptp_hdr->msg_id != PTP_SYNC_MESSAGE) {
 		printf("Port %u Received PTP V2 Ethernet frame with unexpected"
 		       " message ID 0x%x (expected 0x0 - PTP_SYNC_MESSAGE)\n",
-		       (unsigned) fs->rx_port, ptp_hdr->msg_id);
+		       fs->rx_port, ptp_hdr->msg_id);
 		rte_pktmbuf_free(mb);
 		return;
 	}
 	printf("Port %u IEEE1588 PTP V2 SYNC Message filtered by hardware\n",
-	       (unsigned) fs->rx_port);
+	       fs->rx_port);
 
 	/*
 	 * Check that the received PTP packet has been timestamped by the
@@ -196,7 +195,7 @@ ieee1588_packet_fwd(struct fwd_stream *fs)
 	if (! (mb->ol_flags & PKT_RX_IEEE1588_TMST)) {
 		printf("Port %u Received PTP packet not timestamped"
 		       " by hardware\n",
-		       (unsigned) fs->rx_port);
+		       fs->rx_port);
 		rte_pktmbuf_free(mb);
 		return;
 	}
@@ -216,8 +215,7 @@ ieee1588_packet_fwd(struct fwd_stream *fs)
 	mb->ol_flags |= PKT_TX_IEEE1588_TMST;
 	fs->tx_packets += 1;
 	if (rte_eth_tx_burst(fs->rx_port, fs->tx_queue, &mb, 1) == 0) {
-		printf("Port %u sent PTP packet dropped\n",
-		       (unsigned) fs->rx_port);
+		printf("Port %u sent PTP packet dropped\n", fs->rx_port);
 		fs->fwd_dropped += 1;
 		rte_pktmbuf_free(mb);
 		return;
diff --git a/app/test-pmd/parameters.c b/app/test-pmd/parameters.c
index 2f7f70fd6..31287d71d 100644
--- a/app/test-pmd/parameters.c
+++ b/app/test-pmd/parameters.c
@@ -734,7 +734,7 @@ launch_args_parse(int argc, char** argv)
 			if (!strcmp(lgopts[opt_idx].name, "nb-ports")) {
 				n = atoi(optarg);
 				if (n > 0 && n <= nb_ports)
-					nb_fwd_ports = (uint8_t) n;
+					nb_fwd_ports = n;
 				else
 					rte_exit(EXIT_FAILURE,
 						 "Invalid port %d\n", n);
diff --git a/app/test-pmd/rxonly.c b/app/test-pmd/rxonly.c
index 5ef021905..57df01468 100644
--- a/app/test-pmd/rxonly.c
+++ b/app/test-pmd/rxonly.c
@@ -122,7 +122,7 @@ pkt_burst_receive(struct fwd_stream *fs)
 	 */
 	if (verbose_level > 0)
 		printf("port %u/queue %u: received %u packets\n",
-		       (unsigned) fs->rx_port,
+		       fs->rx_port,
 		       (unsigned) fs->rx_queue,
 		       (unsigned) nb_rx);
 	for (i = 0; i < nb_rx; i++) {
diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c
index e097ee04e..477e2e7ad 100644
--- a/app/test-pmd/testpmd.c
+++ b/app/test-pmd/testpmd.c
@@ -390,7 +390,7 @@ struct gro_status gro_ports[RTE_MAX_ETHPORTS];
 /* Forward function declarations */
 static void map_port_queue_stats_mapping_registers(uint8_t pi, struct rte_port *port);
 static void check_all_ports_link_status(uint32_t port_mask);
-static int eth_event_callback(uint8_t port_id,
+static int eth_event_callback(portid_t port_id,
 			      enum rte_eth_event_type type,
 			      void *param, void *ret_param);
 
@@ -1816,7 +1816,8 @@ check_all_ports_link_status(uint32_t port_mask)
 {
 #define CHECK_INTERVAL 100 /* 100ms */
 #define MAX_CHECK_TIME 90 /* 9s (90 * 100ms) in total */
-	uint8_t portid, count, all_ports_up, print_flag = 0;
+	portid_t portid;
+	uint8_t count, all_ports_up, print_flag = 0;
 	struct rte_eth_link link;
 
 	printf("Checking link statuses...\n");
@@ -1831,14 +1832,13 @@ check_all_ports_link_status(uint32_t port_mask)
 			/* print link status if flag set */
 			if (print_flag == 1) {
 				if (link.link_status)
-					printf("Port %d Link Up - speed %u "
-						"Mbps - %s\n", (uint8_t)portid,
-						(unsigned)link.link_speed,
+					printf(
+					"Port%d Link Up. speed %u Mbps- %s\n",
+					portid, link.link_speed,
 				(link.link_duplex == ETH_LINK_FULL_DUPLEX) ?
 					("full-duplex") : ("half-duplex\n"));
 				else
-					printf("Port %d Link Down\n",
-						(uint8_t)portid);
+					printf("Port %d Link Down\n", portid);
 				continue;
 			}
 			/* clear all_ports_up flag if any link down */
@@ -1885,7 +1885,7 @@ rmv_event_callback(void *arg)
 
 /* This function is used by the interrupt thread */
 static int
-eth_event_callback(uint8_t port_id, enum rte_eth_event_type type, void *param,
+eth_event_callback(portid_t port_id, enum rte_eth_event_type type, void *param,
 		  void *ret_param)
 {
 	static const char * const event_desc[] = {
@@ -2328,7 +2328,7 @@ int
 main(int argc, char** argv)
 {
 	int  diag;
-	uint8_t port_id;
+	portid_t port_id;
 
 	signal(SIGINT, signal_handler);
 	signal(SIGTERM, signal_handler);
diff --git a/app/test-pmd/testpmd.h b/app/test-pmd/testpmd.h
index 1d1ee7587..657c1235c 100644
--- a/app/test-pmd/testpmd.h
+++ b/app/test-pmd/testpmd.h
@@ -78,7 +78,7 @@
 #define UMA_NO_CONFIG  0xFF
 
 typedef uint8_t  lcoreid_t;
-typedef uint8_t  portid_t;
+typedef uint16_t portid_t;
 typedef uint16_t queueid_t;
 typedef uint16_t streamid_t;
 
@@ -283,7 +283,7 @@ enum dcb_mode_enable
 #define MAX_RX_QUEUE_STATS_MAPPINGS 4096 /* MAX_PORT of 32 @ 128 rx_queues/port */
 
 struct queue_stats_mappings {
-	uint8_t port_id;
+	portid_t port_id;
 	uint16_t queue_id;
 	uint8_t stats_counter_id;
 } __rte_cache_aligned;
diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst
index 3362f3350..45eb5c4a9 100644
--- a/doc/guides/rel_notes/deprecation.rst
+++ b/doc/guides/rel_notes/deprecation.rst
@@ -76,12 +76,6 @@ Deprecation Notices
   done by the EAL and not by the ``ethdev`` layer anymore. Users relying on this
   flag being present only have to remove their checks to follow the change.
 
-* ABI/API changes are planned for 17.11 in all structures which include port_id
-  definition such as "rte_eth_dev_data", "rte_port_ethdev_reader_params",
-  "rte_port_ethdev_writer_params", and so on. The definition of port_id will be
-  changed from 8 bits to 16 bits in order to support more than 256 ports in
-  DPDK. All APIs which have port_id parameter will be changed at the same time.
-
 * ethdev: An ABI change is planned for 17.11 for the structure rte_eth_dev_data.
   The size of the unique name will increase RTE_ETH_NAME_MAX_LEN from 32 to
   64 characters to allow using a globally unique identifier (GUID) in this field.
diff --git a/doc/guides/rel_notes/release_17_11.rst b/doc/guides/rel_notes/release_17_11.rst
index f6f916928..4d2c9669d 100644
--- a/doc/guides/rel_notes/release_17_11.rst
+++ b/doc/guides/rel_notes/release_17_11.rst
@@ -41,6 +41,11 @@ New Features
      Also, make sure to start the actual text at the margin.
      =========================================================
 
+* **Extended port_id range from uint8_t to uint16_t.**
+
+  Increased port_id range from 8 bits to 16 bits in order to support more than
+  256 ports in dpdk. All ethdev APIs which have port_id as parameter are changed
+  in the meantime.
 
 Resolved Issues
 ---------------
@@ -144,7 +149,10 @@ ABI Changes
    Also, make sure to start the actual text at the margin.
    =========================================================
 
+* **Extended port_id range.**
 
+  The size of the field ``port_id`` in the ``rte_eth_dev_data`` structure
+  changed, as described in the `New Features` section.
 
 Shared Library Versions
 -----------------------
@@ -165,13 +173,13 @@ The libraries prepended with a plus sign were incremented in this version.
 .. code-block:: diff
 
      librte_acl.so.2
-     librte_bitratestats.so.1
+     librte_bitratestats.so.2
      librte_cfgfile.so.2
      librte_cmdline.so.2
      librte_cryptodev.so.3
      librte_distributor.so.1
      librte_eal.so.5
-     librte_ethdev.so.7
+     librte_ethdev.so.8
      librte_eventdev.so.2
      librte_gro.so.1
      librte_hash.so.2
@@ -186,14 +194,14 @@ The libraries prepended with a plus sign were incremented in this version.
      librte_meter.so.1
      librte_metrics.so.1
      librte_net.so.1
-     librte_pdump.so.1
+     librte_pdump.so.2
      librte_pipeline.so.3
-     librte_pmd_bnxt.so.1
-     librte_pmd_bond.so.1
-     librte_pmd_i40e.so.1
-     librte_pmd_ixgbe.so.1
+     librte_pmd_bnxt.so.2
+     librte_pmd_bond.so.2
+     librte_pmd_i40e.so.2
+     librte_pmd_ixgbe.so.2
      librte_pmd_ring.so.2
-     librte_pmd_vhost.so.1
+     librte_pmd_vhost.so.2
      librte_port.so.3
      librte_power.so.1
      librte_reorder.so.1
diff --git a/drivers/net/af_packet/rte_eth_af_packet.c b/drivers/net/af_packet/rte_eth_af_packet.c
index 9a47852ca..483b0c107 100644
--- a/drivers/net/af_packet/rte_eth_af_packet.c
+++ b/drivers/net/af_packet/rte_eth_af_packet.c
@@ -75,7 +75,7 @@ struct pkt_rx_queue {
 	unsigned int framenum;
 
 	struct rte_mempool *mb_pool;
-	uint8_t in_port;
+	uint16_t in_port;
 
 	volatile unsigned long rx_pkts;
 	volatile unsigned long err_pkts;
diff --git a/drivers/net/ark/ark_ethdev.c b/drivers/net/ark/ark_ethdev.c
index 6db362b04..893284733 100644
--- a/drivers/net/ark/ark_ethdev.c
+++ b/drivers/net/ark/ark_ethdev.c
@@ -641,7 +641,7 @@ eth_ark_dev_stop(struct rte_eth_dev *dev)
 	for (i = 0; i < dev->data->nb_tx_queues; i++) {
 		status = eth_ark_tx_queue_stop(dev, i);
 		if (status != 0) {
-			uint8_t port = dev->data->port_id;
+			uint16_t port = dev->data->port_id;
 			PMD_DRV_LOG(ERR,
 				    "tx_queue stop anomaly"
 				    " port %u, queue %u\n",
diff --git a/drivers/net/avp/avp_ethdev.c b/drivers/net/avp/avp_ethdev.c
index c746a0e2c..b5cc955f2 100644
--- a/drivers/net/avp/avp_ethdev.c
+++ b/drivers/net/avp/avp_ethdev.c
@@ -190,7 +190,7 @@ struct avp_dev {
 	struct rte_eth_dev_data *dev_data;
 	/**< Back pointer to ethernet device data */
 	volatile uint32_t flags; /**< Device operational flags */
-	uint8_t port_id; /**< Ethernet port identifier */
+	uint16_t port_id; /**< Ethernet port identifier */
 	struct rte_mempool *pool; /**< pkt mbuf mempool */
 	unsigned int guest_mbuf_size; /**< local pool mbuf size */
 	unsigned int host_mbuf_size; /**< host mbuf size */
diff --git a/drivers/net/bnx2x/bnx2x_rxtx.h b/drivers/net/bnx2x/bnx2x_rxtx.h
index 2e38ec26a..9600e0f1c 100644
--- a/drivers/net/bnx2x/bnx2x_rxtx.h
+++ b/drivers/net/bnx2x/bnx2x_rxtx.h
@@ -41,7 +41,7 @@ struct bnx2x_rx_queue {
 	uint16_t                   rx_cq_head;           /**< Index of current rcq bd. */
 	uint16_t                   rx_cq_tail;           /**< Index of last rcq bd. */
 	uint16_t                   queue_id;             /**< RX queue index. */
-	uint8_t                    port_id;              /**< Device port identifier. */
+	uint16_t                   port_id;              /**< Device port identifier. */
 	struct bnx2x_softc           *sc;                  /**< Ptr to dev_private data. */
 };
 
@@ -62,7 +62,7 @@ struct bnx2x_tx_queue {
 	uint16_t                   nb_tx_avail;          /**< Number of TX descriptors available. */
 	uint16_t                   nb_tx_pages;          /**< number of TX pages */
 	uint16_t                   queue_id;             /**< TX queue index. */
-	uint8_t                    port_id;              /**< Device port identifier. */
+	uint16_t                   port_id;              /**< Device port identifier. */
 	struct bnx2x_softc           *sc;                  /**< Ptr to dev_private data */
 };
 
diff --git a/drivers/net/bnxt/Makefile b/drivers/net/bnxt/Makefile
index b03f65dc9..55b49b538 100644
--- a/drivers/net/bnxt/Makefile
+++ b/drivers/net/bnxt/Makefile
@@ -40,7 +40,7 @@ LIB = librte_pmd_bnxt.a
 
 EXPORT_MAP := rte_pmd_bnxt_version.map
 
-LIBABIVER := 1
+LIBABIVER := 2
 
 CFLAGS += -O3
 CFLAGS += $(WERROR_FLAGS)
diff --git a/drivers/net/bnxt/bnxt.h b/drivers/net/bnxt/bnxt.h
index 405d94deb..26a9018b5 100644
--- a/drivers/net/bnxt/bnxt.h
+++ b/drivers/net/bnxt/bnxt.h
@@ -126,7 +126,7 @@ struct bnxt_pf_info {
 #define BNXT_FIRST_VF_FID	128
 #define BNXT_PF_RINGS_USED(bp)	bnxt_get_num_queues(bp)
 #define BNXT_PF_RINGS_AVAIL(bp)	(bp->pf.max_cp_rings - BNXT_PF_RINGS_USED(bp))
-	uint8_t			port_id;
+	uint16_t		port_id;
 	uint16_t		first_vf_id;
 	uint16_t		active_vfs;
 	uint16_t		max_vfs;
diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
index c9d11228b..2e817535e 100644
--- a/drivers/net/bnxt/bnxt_ethdev.c
+++ b/drivers/net/bnxt/bnxt_ethdev.c
@@ -489,13 +489,13 @@ static void bnxt_print_link_info(struct rte_eth_dev *eth_dev)
 
 	if (link->link_status)
 		RTE_LOG(INFO, PMD, "Port %d Link Up - speed %u Mbps - %s\n",
-			(uint8_t)(eth_dev->data->port_id),
+			eth_dev->data->port_id,
 			(uint32_t)link->link_speed,
 			(link->link_duplex == ETH_LINK_FULL_DUPLEX) ?
 			("full-duplex") : ("half-duplex\n"));
 	else
 		RTE_LOG(INFO, PMD, "Port %d Link Down\n",
-			(uint8_t)(eth_dev->data->port_id));
+			eth_dev->data->port_id);
 }
 
 static int bnxt_dev_lsc_intr_setup(struct rte_eth_dev *eth_dev)
diff --git a/drivers/net/bnxt/bnxt_rxq.h b/drivers/net/bnxt/bnxt_rxq.h
index 01aaa007f..cea0785d1 100644
--- a/drivers/net/bnxt/bnxt_rxq.h
+++ b/drivers/net/bnxt/bnxt_rxq.h
@@ -48,7 +48,7 @@ struct bnxt_rx_queue {
 	uint16_t		rx_free_thresh; /* max free RX desc to hold */
 	uint16_t		queue_id; /* RX queue index */
 	uint16_t		reg_idx; /* RX queue register index */
-	uint8_t			port_id; /* Device port identifier */
+	uint16_t		port_id; /* Device port identifier */
 	uint8_t			crc_len; /* 0 if CRC stripped, 4 otherwise */
 
 	struct bnxt		*bp;
diff --git a/drivers/net/bnxt/bnxt_txq.h b/drivers/net/bnxt/bnxt_txq.h
index 16f3a0bdd..f753c10f2 100644
--- a/drivers/net/bnxt/bnxt_txq.h
+++ b/drivers/net/bnxt/bnxt_txq.h
@@ -46,7 +46,7 @@ struct bnxt_tx_queue {
 	uint16_t		tx_next_rs; /* next desc to set RS bit */
 	uint16_t		queue_id; /* TX queue index */
 	uint16_t		reg_idx; /* TX queue register index */
-	uint8_t			port_id; /* Device port identifier */
+	uint16_t		port_id; /* Device port identifier */
 	uint8_t			pthresh; /* Prefetch threshold register */
 	uint8_t			hthresh; /* Host threshold register */
 	uint8_t			wthresh; /* Write-back threshold reg */
diff --git a/drivers/net/bnxt/rte_pmd_bnxt.c b/drivers/net/bnxt/rte_pmd_bnxt.c
index c343d9033..63fc27911 100644
--- a/drivers/net/bnxt/rte_pmd_bnxt.c
+++ b/drivers/net/bnxt/rte_pmd_bnxt.c
@@ -67,7 +67,7 @@ int bnxt_rcv_msg_from_vf(struct bnxt *bp, uint16_t vf_id, void *msg)
 		true : false;
 }
 
-int rte_pmd_bnxt_set_tx_loopback(uint8_t port, uint8_t on)
+int rte_pmd_bnxt_set_tx_loopback(uint16_t port, uint8_t on)
 {
 	struct rte_eth_dev *eth_dev;
 	struct bnxt *bp;
@@ -108,7 +108,7 @@ rte_pmd_bnxt_set_all_queues_drop_en_cb(struct bnxt_vnic_info *vnic, void *onptr)
 	vnic->bd_stall = !(*on);
 }
 
-int rte_pmd_bnxt_set_all_queues_drop_en(uint8_t port, uint8_t on)
+int rte_pmd_bnxt_set_all_queues_drop_en(uint16_t port, uint8_t on)
 {
 	struct rte_eth_dev *eth_dev;
 	struct bnxt *bp;
@@ -159,7 +159,7 @@ int rte_pmd_bnxt_set_all_queues_drop_en(uint8_t port, uint8_t on)
 	return rc;
 }
 
-int rte_pmd_bnxt_set_vf_mac_addr(uint8_t port, uint16_t vf,
+int rte_pmd_bnxt_set_vf_mac_addr(uint16_t port, uint16_t vf,
 				struct ether_addr *mac_addr)
 {
 	struct rte_eth_dev *dev;
@@ -191,7 +191,7 @@ int rte_pmd_bnxt_set_vf_mac_addr(uint8_t port, uint16_t vf,
 	return rc;
 }
 
-int rte_pmd_bnxt_set_vf_rate_limit(uint8_t port, uint16_t vf,
+int rte_pmd_bnxt_set_vf_rate_limit(uint16_t port, uint16_t vf,
 				uint16_t tx_rate, uint64_t q_msk)
 {
 	struct rte_eth_dev *eth_dev;
@@ -241,7 +241,7 @@ int rte_pmd_bnxt_set_vf_rate_limit(uint8_t port, uint16_t vf,
 	return rc;
 }
 
-int rte_pmd_bnxt_set_vf_mac_anti_spoof(uint8_t port, uint16_t vf, uint8_t on)
+int rte_pmd_bnxt_set_vf_mac_anti_spoof(uint16_t port, uint16_t vf, uint8_t on)
 {
 	struct rte_eth_dev_info dev_info;
 	struct rte_eth_dev *dev;
@@ -294,7 +294,7 @@ int rte_pmd_bnxt_set_vf_mac_anti_spoof(uint8_t port, uint16_t vf, uint8_t on)
 	return rc;
 }
 
-int rte_pmd_bnxt_set_vf_vlan_anti_spoof(uint8_t port, uint16_t vf, uint8_t on)
+int rte_pmd_bnxt_set_vf_vlan_anti_spoof(uint16_t port, uint16_t vf, uint8_t on)
 {
 	struct rte_eth_dev_info dev_info;
 	struct rte_eth_dev *dev;
@@ -350,7 +350,7 @@ rte_pmd_bnxt_set_vf_vlan_stripq_cb(struct bnxt_vnic_info *vnic, void *onptr)
 }
 
 int
-rte_pmd_bnxt_set_vf_vlan_stripq(uint8_t port, uint16_t vf, uint8_t on)
+rte_pmd_bnxt_set_vf_vlan_stripq(uint16_t port, uint16_t vf, uint8_t on)
 {
 	struct rte_eth_dev *dev;
 	struct rte_eth_dev_info dev_info;
@@ -385,7 +385,7 @@ rte_pmd_bnxt_set_vf_vlan_stripq(uint8_t port, uint16_t vf, uint8_t on)
 	return rc;
 }
 
-int rte_pmd_bnxt_set_vf_rxmode(uint8_t port, uint16_t vf,
+int rte_pmd_bnxt_set_vf_rxmode(uint16_t port, uint16_t vf,
 				uint16_t rx_mask, uint8_t on)
 {
 	struct rte_eth_dev *dev;
@@ -477,7 +477,7 @@ static int bnxt_set_vf_table(struct bnxt *bp, uint16_t vf)
 	return rc;
 }
 
-int rte_pmd_bnxt_set_vf_vlan_filter(uint8_t port, uint16_t vlan,
+int rte_pmd_bnxt_set_vf_vlan_filter(uint16_t port, uint16_t vlan,
 				    uint64_t vf_mask, uint8_t vlan_on)
 {
 	struct bnxt_vlan_table_entry *ve;
@@ -570,7 +570,7 @@ int rte_pmd_bnxt_set_vf_vlan_filter(uint8_t port, uint16_t vlan,
 	return rc;
 }
 
-int rte_pmd_bnxt_get_vf_stats(uint8_t port,
+int rte_pmd_bnxt_get_vf_stats(uint16_t port,
 			      uint16_t vf_id,
 			      struct rte_eth_stats *stats)
 {
@@ -598,7 +598,7 @@ int rte_pmd_bnxt_get_vf_stats(uint8_t port,
 	return bnxt_hwrm_func_qstats(bp, bp->pf.first_vf_id + vf_id, stats);
 }
 
-int rte_pmd_bnxt_reset_vf_stats(uint8_t port,
+int rte_pmd_bnxt_reset_vf_stats(uint16_t port,
 				uint16_t vf_id)
 {
 	struct rte_eth_dev *dev;
@@ -625,7 +625,7 @@ int rte_pmd_bnxt_reset_vf_stats(uint8_t port,
 	return bnxt_hwrm_func_clr_stats(bp, bp->pf.first_vf_id + vf_id);
 }
 
-int rte_pmd_bnxt_get_vf_rx_status(uint8_t port, uint16_t vf_id)
+int rte_pmd_bnxt_get_vf_rx_status(uint16_t port, uint16_t vf_id)
 {
 	struct rte_eth_dev *dev;
 	struct rte_eth_dev_info dev_info;
@@ -651,7 +651,7 @@ int rte_pmd_bnxt_get_vf_rx_status(uint8_t port, uint16_t vf_id)
 	return bnxt_vf_vnic_count(bp, vf_id);
 }
 
-int rte_pmd_bnxt_get_vf_tx_drop_count(uint8_t port, uint16_t vf_id,
+int rte_pmd_bnxt_get_vf_tx_drop_count(uint16_t port, uint16_t vf_id,
 				      uint64_t *count)
 {
 	struct rte_eth_dev *dev;
@@ -679,7 +679,7 @@ int rte_pmd_bnxt_get_vf_tx_drop_count(uint8_t port, uint16_t vf_id,
 					     count);
 }
 
-int rte_pmd_bnxt_mac_addr_add(uint8_t port, struct ether_addr *addr,
+int rte_pmd_bnxt_mac_addr_add(uint16_t port, struct ether_addr *addr,
 				uint32_t vf_id)
 {
 	struct rte_eth_dev *dev;
@@ -756,7 +756,7 @@ int rte_pmd_bnxt_mac_addr_add(uint8_t port, struct ether_addr *addr,
 }
 
 int
-rte_pmd_bnxt_set_vf_vlan_insert(uint8_t port, uint16_t vf,
+rte_pmd_bnxt_set_vf_vlan_insert(uint16_t port, uint16_t vf,
 		uint16_t vlan_id)
 {
 	struct rte_eth_dev *dev;
@@ -793,7 +793,7 @@ rte_pmd_bnxt_set_vf_vlan_insert(uint8_t port, uint16_t vf,
 	return rc;
 }
 
-int rte_pmd_bnxt_set_vf_persist_stats(uint8_t port, uint16_t vf, uint8_t on)
+int rte_pmd_bnxt_set_vf_persist_stats(uint16_t port, uint16_t vf, uint8_t on)
 {
 	struct rte_eth_dev_info dev_info;
 	struct rte_eth_dev *dev;
diff --git a/drivers/net/bnxt/rte_pmd_bnxt.h b/drivers/net/bnxt/rte_pmd_bnxt.h
index c4c4770e3..f881d30d6 100644
--- a/drivers/net/bnxt/rte_pmd_bnxt.h
+++ b/drivers/net/bnxt/rte_pmd_bnxt.h
@@ -78,7 +78,7 @@ struct rte_pmd_bnxt_mb_event_param {
  *   - (-ENODEV) if *port* invalid.
  *   - (-EINVAL) if bad parameter.
  */
-int rte_pmd_bnxt_set_vf_mac_anti_spoof(uint8_t port, uint16_t vf, uint8_t on);
+int rte_pmd_bnxt_set_vf_mac_anti_spoof(uint16_t port, uint16_t vf, uint8_t on);
 
 /**
  * Set the VF MAC address.
@@ -94,7 +94,7 @@ int rte_pmd_bnxt_set_vf_mac_anti_spoof(uint8_t port, uint16_t vf, uint8_t on);
  *   - (-ENODEV) if *port* invalid.
  *   - (-EINVAL) if *vf* or *mac_addr* is invalid.
  */
-int rte_pmd_bnxt_set_vf_mac_addr(uint8_t port, uint16_t vf,
+int rte_pmd_bnxt_set_vf_mac_addr(uint16_t port, uint16_t vf,
 		struct ether_addr *mac_addr);
 
 /**
@@ -115,7 +115,7 @@ int rte_pmd_bnxt_set_vf_mac_addr(uint8_t port, uint16_t vf,
  *   - (-EINVAL) if bad parameter.
  */
 int
-rte_pmd_bnxt_set_vf_vlan_stripq(uint8_t port, uint16_t vf, uint8_t on);
+rte_pmd_bnxt_set_vf_vlan_stripq(uint16_t port, uint16_t vf, uint8_t on);
 
 /**
  * Enable/Disable vf vlan insert
@@ -134,7 +134,7 @@ rte_pmd_bnxt_set_vf_vlan_stripq(uint8_t port, uint16_t vf, uint8_t on);
  *   - (-EINVAL) if bad parameter.
  */
 int
-rte_pmd_bnxt_set_vf_vlan_insert(uint8_t port, uint16_t vf,
+rte_pmd_bnxt_set_vf_vlan_insert(uint16_t port, uint16_t vf,
 		uint16_t vlan_id);
 
 /**
@@ -156,7 +156,7 @@ rte_pmd_bnxt_set_vf_vlan_insert(uint8_t port, uint16_t vf,
  *   - (-ENODEV) if *port_id* invalid.
  *   - (-EINVAL) if bad parameter.
  */
-int rte_pmd_bnxt_set_vf_vlan_filter(uint8_t port, uint16_t vlan,
+int rte_pmd_bnxt_set_vf_vlan_filter(uint16_t port, uint16_t vlan,
 				    uint64_t vf_mask, uint8_t vlan_on);
 
 /**
@@ -173,7 +173,7 @@ int rte_pmd_bnxt_set_vf_vlan_filter(uint8_t port, uint16_t vlan,
  *   - (-ENODEV) if *port* invalid.
  *   - (-EINVAL) if bad parameter.
  */
-int rte_pmd_bnxt_set_tx_loopback(uint8_t port, uint8_t on);
+int rte_pmd_bnxt_set_tx_loopback(uint16_t port, uint8_t on);
 
 /**
  * set all queues drop enable bit
@@ -189,7 +189,7 @@ int rte_pmd_bnxt_set_tx_loopback(uint8_t port, uint8_t on);
  *   - (-ENODEV) if *port* invalid.
  *   - (-EINVAL) if bad parameter.
  */
-int rte_pmd_bnxt_set_all_queues_drop_en(uint8_t port, uint8_t on);
+int rte_pmd_bnxt_set_all_queues_drop_en(uint16_t port, uint8_t on);
 
 /**
  * Set the VF rate limit.
@@ -207,7 +207,7 @@ int rte_pmd_bnxt_set_all_queues_drop_en(uint8_t port, uint8_t on);
  *   - (-ENODEV) if *port* invalid.
  *   - (-EINVAL) if *vf* or *mac_addr* is invalid.
  */
-int rte_pmd_bnxt_set_vf_rate_limit(uint8_t port, uint16_t vf,
+int rte_pmd_bnxt_set_vf_rate_limit(uint16_t port, uint16_t vf,
 				uint16_t tx_rate, uint64_t q_msk);
 
 /**
@@ -226,7 +226,7 @@ int rte_pmd_bnxt_set_vf_rate_limit(uint8_t port, uint16_t vf,
  *   - (-EINVAL) if bad parameter.
  */
 
-int rte_pmd_bnxt_get_vf_stats(uint8_t port,
+int rte_pmd_bnxt_get_vf_stats(uint16_t port,
 			      uint16_t vf_id,
 			      struct rte_eth_stats *stats);
 
@@ -242,7 +242,7 @@ int rte_pmd_bnxt_get_vf_stats(uint8_t port,
  *   - (-ENODEV) if *port* invalid.
  *   - (-EINVAL) if bad parameter.
  */
-int rte_pmd_bnxt_reset_vf_stats(uint8_t port,
+int rte_pmd_bnxt_reset_vf_stats(uint16_t port,
 				uint16_t vf_id);
 
 /**
@@ -261,7 +261,7 @@ int rte_pmd_bnxt_reset_vf_stats(uint8_t port,
  *   - (-ENODEV) if *port* invalid.
  *   - (-EINVAL) if bad parameter.
  */
-int rte_pmd_bnxt_set_vf_vlan_anti_spoof(uint8_t port, uint16_t vf, uint8_t on);
+int rte_pmd_bnxt_set_vf_vlan_anti_spoof(uint16_t port, uint16_t vf, uint8_t on);
 
 /**
  * Set RX L2 Filtering mode of a VF of an Ethernet device.
@@ -280,7 +280,7 @@ int rte_pmd_bnxt_set_vf_vlan_anti_spoof(uint8_t port, uint16_t vf, uint8_t on);
  *   - (-ENODEV) if *port_id* invalid.
  *   - (-EINVAL) if bad parameter.
  */
-int rte_pmd_bnxt_set_vf_rxmode(uint8_t port, uint16_t vf,
+int rte_pmd_bnxt_set_vf_rxmode(uint16_t port, uint16_t vf,
 				uint16_t rx_mask, uint8_t on);
 
 /**
@@ -297,7 +297,7 @@ int rte_pmd_bnxt_set_vf_rxmode(uint8_t port, uint16_t vf,
  *   - (-ENOMEM) on an allocation failure
  *   - (-1) firmware interface error
  */
-int rte_pmd_bnxt_get_vf_rx_status(uint8_t port, uint16_t vf_id);
+int rte_pmd_bnxt_get_vf_rx_status(uint16_t port, uint16_t vf_id);
 
 /**
  * Queries the TX drop counter for the function
@@ -313,7 +313,7 @@ int rte_pmd_bnxt_get_vf_rx_status(uint8_t port, uint16_t vf_id);
  *   - (-EINVAL) invalid vf_id specified.
  *   - (-ENOTSUP) Ethernet device is not a PF
  */
-int rte_pmd_bnxt_get_vf_tx_drop_count(uint8_t port, uint16_t vf_id,
+int rte_pmd_bnxt_get_vf_tx_drop_count(uint16_t port, uint16_t vf_id,
 				      uint64_t *count);
 
 /**
@@ -331,7 +331,7 @@ int rte_pmd_bnxt_get_vf_tx_drop_count(uint8_t port, uint16_t vf_id,
  *   - (-ENOTSUP) Ethernet device is not a PF
  *   - (-ENOMEM) on an allocation failure
  */
-int rte_pmd_bnxt_mac_addr_add(uint8_t port, struct ether_addr *mac_addr,
+int rte_pmd_bnxt_mac_addr_add(uint16_t port, struct ether_addr *mac_addr,
 				uint32_t vf_id);
 
 /**
@@ -350,5 +350,5 @@ int rte_pmd_bnxt_mac_addr_add(uint8_t port, struct ether_addr *mac_addr,
  *   - (-ENODEV) if *port* invalid.
  *   - (-EINVAL) if bad parameter.
  */
-int rte_pmd_bnxt_set_vf_persist_stats(uint8_t port, uint16_t vf, uint8_t on);
+int rte_pmd_bnxt_set_vf_persist_stats(uint16_t port, uint16_t vf, uint8_t on);
 #endif /* _PMD_BNXT_H_ */
diff --git a/drivers/net/bonding/Makefile b/drivers/net/bonding/Makefile
index 910c932da..ffc0c3cf7 100644
--- a/drivers/net/bonding/Makefile
+++ b/drivers/net/bonding/Makefile
@@ -41,7 +41,7 @@ CFLAGS += $(WERROR_FLAGS)
 
 EXPORT_MAP := rte_eth_bond_version.map
 
-LIBABIVER := 1
+LIBABIVER := 2
 
 #
 # all source are stored in SRCS-y
diff --git a/drivers/net/bonding/rte_eth_bond.h b/drivers/net/bonding/rte_eth_bond.h
index 8efbf0713..87ff29173 100644
--- a/drivers/net/bonding/rte_eth_bond.h
+++ b/drivers/net/bonding/rte_eth_bond.h
@@ -151,7 +151,7 @@ rte_eth_bond_free(const char *name);
  *	0 on success, negative value otherwise
  */
 int
-rte_eth_bond_slave_add(uint8_t bonded_port_id, uint8_t slave_port_id);
+rte_eth_bond_slave_add(uint16_t bonded_port_id, uint16_t slave_port_id);
 
 /**
  * Remove a slave rte_eth_dev device from the bonded device
@@ -163,7 +163,7 @@ rte_eth_bond_slave_add(uint8_t bonded_port_id, uint8_t slave_port_id);
  *	0 on success, negative value otherwise
  */
 int
-rte_eth_bond_slave_remove(uint8_t bonded_port_id, uint8_t slave_port_id);
+rte_eth_bond_slave_remove(uint16_t bonded_port_id, uint16_t slave_port_id);
 
 /**
  * Set link bonding mode of bonded device
@@ -175,7 +175,7 @@ rte_eth_bond_slave_remove(uint8_t bonded_port_id, uint8_t slave_port_id);
  *	0 on success, negative value otherwise
  */
 int
-rte_eth_bond_mode_set(uint8_t bonded_port_id, uint8_t mode);
+rte_eth_bond_mode_set(uint16_t bonded_port_id, uint8_t mode);
 
 /**
  * Get link bonding mode of bonded device
@@ -186,7 +186,7 @@ rte_eth_bond_mode_set(uint8_t bonded_port_id, uint8_t mode);
  *	link bonding mode on success, negative value otherwise
  */
 int
-rte_eth_bond_mode_get(uint8_t bonded_port_id);
+rte_eth_bond_mode_get(uint16_t bonded_port_id);
 
 /**
  * Set slave rte_eth_dev as primary slave of bonded device
@@ -198,7 +198,7 @@ rte_eth_bond_mode_get(uint8_t bonded_port_id);
  *	0 on success, negative value otherwise
  */
 int
-rte_eth_bond_primary_set(uint8_t bonded_port_id, uint8_t slave_port_id);
+rte_eth_bond_primary_set(uint16_t bonded_port_id, uint16_t slave_port_id);
 
 /**
  * Get primary slave of bonded device
@@ -209,7 +209,7 @@ rte_eth_bond_primary_set(uint8_t bonded_port_id, uint8_t slave_port_id);
  *	Port Id of primary slave on success, -1 on failure
  */
 int
-rte_eth_bond_primary_get(uint8_t bonded_port_id);
+rte_eth_bond_primary_get(uint16_t bonded_port_id);
 
 /**
  * Populate an array with list of the slaves port id's of the bonded device
@@ -223,7 +223,8 @@ rte_eth_bond_primary_get(uint8_t bonded_port_id);
  *	negative value otherwise
  */
 int
-rte_eth_bond_slaves_get(uint8_t bonded_port_id, uint8_t slaves[], uint8_t len);
+rte_eth_bond_slaves_get(uint16_t bonded_port_id, uint16_t slaves[],
+			uint16_t len);
 
 /**
  * Populate an array with list of the active slaves port id's of the bonded
@@ -238,8 +239,8 @@ rte_eth_bond_slaves_get(uint8_t bonded_port_id, uint8_t slaves[], uint8_t len);
  *	negative value otherwise
  */
 int
-rte_eth_bond_active_slaves_get(uint8_t bonded_port_id, uint8_t slaves[],
-		uint8_t len);
+rte_eth_bond_active_slaves_get(uint16_t bonded_port_id, uint16_t slaves[],
+				uint16_t len);
 
 /**
  * Set explicit MAC address to use on bonded device and it's slaves.
@@ -252,7 +253,7 @@ rte_eth_bond_active_slaves_get(uint8_t bonded_port_id, uint8_t slaves[],
  *	0 on success, negative value otherwise
  */
 int
-rte_eth_bond_mac_address_set(uint8_t bonded_port_id,
+rte_eth_bond_mac_address_set(uint16_t bonded_port_id,
 		struct ether_addr *mac_addr);
 
 /**
@@ -265,7 +266,7 @@ rte_eth_bond_mac_address_set(uint8_t bonded_port_id,
  *	0 on success, negative value otherwise
  */
 int
-rte_eth_bond_mac_address_reset(uint8_t bonded_port_id);
+rte_eth_bond_mac_address_reset(uint16_t bonded_port_id);
 
 /**
  * Set the transmit policy for bonded device to use when it is operating in
@@ -279,7 +280,7 @@ rte_eth_bond_mac_address_reset(uint8_t bonded_port_id);
  *	0 on success, negative value otherwise.
  */
 int
-rte_eth_bond_xmit_policy_set(uint8_t bonded_port_id, uint8_t policy);
+rte_eth_bond_xmit_policy_set(uint16_t bonded_port_id, uint8_t policy);
 
 /**
  * Get the transmit policy set on bonded device for balance mode operation
@@ -290,7 +291,7 @@ rte_eth_bond_xmit_policy_set(uint8_t bonded_port_id, uint8_t policy);
  *	Balance transmit policy on success, negative value otherwise.
  */
 int
-rte_eth_bond_xmit_policy_get(uint8_t bonded_port_id);
+rte_eth_bond_xmit_policy_get(uint16_t bonded_port_id);
 
 /**
  * Set the link monitoring frequency (in ms) for monitoring the link status of
@@ -304,7 +305,7 @@ rte_eth_bond_xmit_policy_get(uint8_t bonded_port_id);
  */
 
 int
-rte_eth_bond_link_monitoring_set(uint8_t bonded_port_id, uint32_t internal_ms);
+rte_eth_bond_link_monitoring_set(uint16_t bonded_port_id, uint32_t internal_ms);
 
 /**
  * Get the current link monitoring frequency (in ms) for monitoring of the link
@@ -316,7 +317,7 @@ rte_eth_bond_link_monitoring_set(uint8_t bonded_port_id, uint32_t internal_ms);
  *	Monitoring interval on success, negative value otherwise.
  */
 int
-rte_eth_bond_link_monitoring_get(uint8_t bonded_port_id);
+rte_eth_bond_link_monitoring_get(uint16_t bonded_port_id);
 
 
 /**
@@ -330,7 +331,8 @@ rte_eth_bond_link_monitoring_get(uint8_t bonded_port_id);
  *  0 on success, negative value otherwise.
  */
 int
-rte_eth_bond_link_down_prop_delay_set(uint8_t bonded_port_id, uint32_t delay_ms);
+rte_eth_bond_link_down_prop_delay_set(uint16_t bonded_port_id,
+				       uint32_t delay_ms);
 
 /**
  * Get the period in milliseconds set for delaying the disabling of a bonded
@@ -342,7 +344,7 @@ rte_eth_bond_link_down_prop_delay_set(uint8_t bonded_port_id, uint32_t delay_ms)
  *  Delay period on success, negative value otherwise.
  */
 int
-rte_eth_bond_link_down_prop_delay_get(uint8_t bonded_port_id);
+rte_eth_bond_link_down_prop_delay_get(uint16_t bonded_port_id);
 
 /**
  * Set the period in milliseconds for delaying the enabling of a bonded link
@@ -355,7 +357,8 @@ rte_eth_bond_link_down_prop_delay_get(uint8_t bonded_port_id);
  *  0 on success, negative value otherwise.
  */
 int
-rte_eth_bond_link_up_prop_delay_set(uint8_t bonded_port_id, uint32_t delay_ms);
+rte_eth_bond_link_up_prop_delay_set(uint16_t bonded_port_id,
+				    uint32_t delay_ms);
 
 /**
  * Get the period in milliseconds set for delaying the enabling of a bonded
@@ -367,7 +370,7 @@ rte_eth_bond_link_up_prop_delay_set(uint8_t bonded_port_id, uint32_t delay_ms);
  *  Delay period on success, negative value otherwise.
  */
 int
-rte_eth_bond_link_up_prop_delay_get(uint8_t bonded_port_id);
+rte_eth_bond_link_up_prop_delay_get(uint16_t bonded_port_id);
 
 
 #ifdef __cplusplus
diff --git a/drivers/net/bonding/rte_eth_bond_8023ad.c b/drivers/net/bonding/rte_eth_bond_8023ad.c
index c2b9e053c..c1873aa13 100644
--- a/drivers/net/bonding/rte_eth_bond_8023ad.c
+++ b/drivers/net/bonding/rte_eth_bond_8023ad.c
@@ -209,7 +209,7 @@ set_warning_flags(struct port *port, uint16_t flags)
 }
 
 static void
-show_warnings(uint8_t slave_id)
+show_warnings(uint16_t slave_id)
 {
 	struct port *port = &mode_8023ad_ports[slave_id];
 	uint8_t warnings;
@@ -278,7 +278,7 @@ record_default(struct port *port)
  * @param port			Port on which LACPDU was received.
  */
 static void
-rx_machine(struct bond_dev_private *internals, uint8_t slave_id,
+rx_machine(struct bond_dev_private *internals, uint16_t slave_id,
 		struct lacpdu *lacp)
 {
 	struct port *agg, *port = &mode_8023ad_ports[slave_id];
@@ -399,7 +399,7 @@ rx_machine(struct bond_dev_private *internals, uint8_t slave_id,
  * @param port			Port to handle state machine.
  */
 static void
-periodic_machine(struct bond_dev_private *internals, uint8_t slave_id)
+periodic_machine(struct bond_dev_private *internals, uint16_t slave_id)
 {
 	struct port *port = &mode_8023ad_ports[slave_id];
 	/* Calculate if either site is LACP enabled */
@@ -461,7 +461,7 @@ periodic_machine(struct bond_dev_private *internals, uint8_t slave_id)
  * @param port			Port to handle state machine.
  */
 static void
-mux_machine(struct bond_dev_private *internals, uint8_t slave_id)
+mux_machine(struct bond_dev_private *internals, uint16_t slave_id)
 {
 	struct port *port = &mode_8023ad_ports[slave_id];
 
@@ -564,7 +564,7 @@ mux_machine(struct bond_dev_private *internals, uint8_t slave_id)
  * @param port
  */
 static void
-tx_machine(struct bond_dev_private *internals, uint8_t slave_id)
+tx_machine(struct bond_dev_private *internals, uint16_t slave_id)
 {
 	struct port *agg, *port = &mode_8023ad_ports[slave_id];
 
@@ -688,11 +688,11 @@ static void
 selection_logic(struct bond_dev_private *internals, uint8_t slave_id)
 {
 	struct port *agg, *port;
-	uint8_t slaves_count, new_agg_id, i, j = 0;
-	uint8_t *slaves;
+	uint16_t slaves_count, new_agg_id, i, j = 0;
+	uint16_t *slaves;
 	uint64_t agg_bandwidth[8] = {0};
 	uint64_t agg_count[8] = {0};
-	uint8_t default_slave = 0;
+	uint16_t default_slave = 0;
 	uint8_t mode_count_id, mode_band_id;
 	struct rte_eth_link link_info;
 
@@ -923,7 +923,8 @@ bond_mode_8023ad_periodic_cb(void *arg)
 }
 
 void
-bond_mode_8023ad_activate_slave(struct rte_eth_dev *bond_dev, uint8_t slave_id)
+bond_mode_8023ad_activate_slave(struct rte_eth_dev *bond_dev,
+				uint16_t slave_id)
 {
 	struct bond_dev_private *internals = bond_dev->data->dev_private;
 
@@ -951,7 +952,7 @@ bond_mode_8023ad_activate_slave(struct rte_eth_dev *bond_dev, uint8_t slave_id)
 	memcpy(&port->actor, &initial, sizeof(struct port_params));
 	/* Standard requires that port ID must be grater than 0.
 	 * Add 1 do get corresponding port_number */
-	port->actor.port_number = rte_cpu_to_be_16((uint16_t)slave_id + 1);
+	port->actor.port_number = rte_cpu_to_be_16(slave_id + 1);
 
 	memcpy(&port->partner, &initial, sizeof(struct port_params));
 
@@ -1022,12 +1023,12 @@ bond_mode_8023ad_activate_slave(struct rte_eth_dev *bond_dev, uint8_t slave_id)
 
 int
 bond_mode_8023ad_deactivate_slave(struct rte_eth_dev *bond_dev,
-		uint8_t slave_id)
+		uint16_t slave_id)
 {
 	struct bond_dev_private *internals = bond_dev->data->dev_private;
 	void *pkt = NULL;
 	struct port *port;
-	uint8_t i;
+	uint16_t i;
 
 	/* Given slave must be in active list */
 	RTE_ASSERT(find_slave_by_id(internals->active_slaves,
@@ -1066,7 +1067,7 @@ bond_mode_8023ad_mac_address_update(struct rte_eth_dev *bond_dev)
 	struct bond_dev_private *internals = bond_dev->data->dev_private;
 	struct ether_addr slave_addr;
 	struct port *slave, *agg_slave;
-	uint8_t slave_id, i, j;
+	uint16_t slave_id, i, j;
 
 	bond_mode_8023ad_stop(bond_dev);
 
@@ -1214,7 +1215,7 @@ bond_mode_8023ad_stop(struct rte_eth_dev *bond_dev)
 
 void
 bond_mode_8023ad_handle_slow_pkt(struct bond_dev_private *internals,
-	uint8_t slave_id, struct rte_mbuf *pkt)
+				  uint16_t slave_id, struct rte_mbuf *pkt)
 {
 	struct mode8023ad_private *mode4 = &internals->mode4;
 	struct port *port = &mode_8023ad_ports[slave_id];
@@ -1295,7 +1296,7 @@ bond_mode_8023ad_handle_slow_pkt(struct bond_dev_private *internals,
 }
 
 int
-rte_eth_bond_8023ad_conf_get(uint8_t port_id,
+rte_eth_bond_8023ad_conf_get(uint16_t port_id,
 		struct rte_eth_bond_8023ad_conf *conf)
 {
 	struct rte_eth_dev *bond_dev;
@@ -1312,7 +1313,7 @@ rte_eth_bond_8023ad_conf_get(uint8_t port_id,
 }
 
 int
-rte_eth_bond_8023ad_agg_selection_set(uint8_t port_id,
+rte_eth_bond_8023ad_agg_selection_set(uint16_t port_id,
 		enum rte_bond_8023ad_agg_selection agg_selection)
 {
 	struct rte_eth_dev *bond_dev;
@@ -1334,7 +1335,7 @@ rte_eth_bond_8023ad_agg_selection_set(uint8_t port_id,
 	return 0;
 }
 
-int rte_eth_bond_8023ad_agg_selection_get(uint8_t port_id)
+int rte_eth_bond_8023ad_agg_selection_get(uint16_t port_id)
 {
 	struct rte_eth_dev *bond_dev;
 	struct bond_dev_private *internals;
@@ -1355,7 +1356,7 @@ int rte_eth_bond_8023ad_agg_selection_get(uint8_t port_id)
 
 
 static int
-bond_8023ad_setup_validate(uint8_t port_id,
+bond_8023ad_setup_validate(uint16_t port_id,
 		struct rte_eth_bond_8023ad_conf *conf)
 {
 	if (valid_bonded_port_id(port_id) != 0)
@@ -1379,8 +1380,9 @@ bond_8023ad_setup_validate(uint8_t port_id,
 	return 0;
 }
 
+
 int
-rte_eth_bond_8023ad_setup(uint8_t port_id,
+rte_eth_bond_8023ad_setup(uint16_t port_id,
 		struct rte_eth_bond_8023ad_conf *conf)
 {
 	struct rte_eth_dev *bond_dev;
@@ -1401,7 +1403,7 @@ rte_eth_bond_8023ad_setup(uint8_t port_id,
 
 
 int
-rte_eth_bond_8023ad_slave_info(uint8_t port_id, uint8_t slave_id,
+rte_eth_bond_8023ad_slave_info(uint16_t port_id, uint16_t slave_id,
 		struct rte_eth_bond_8023ad_slave_info *info)
 {
 	struct rte_eth_dev *bond_dev;
@@ -1434,7 +1436,7 @@ rte_eth_bond_8023ad_slave_info(uint8_t port_id, uint8_t slave_id,
 }
 
 static int
-bond_8023ad_ext_validate(uint8_t port_id, uint8_t slave_id)
+bond_8023ad_ext_validate(uint16_t port_id, uint16_t slave_id)
 {
 	struct rte_eth_dev *bond_dev;
 	struct bond_dev_private *internals;
@@ -1462,7 +1464,8 @@ bond_8023ad_ext_validate(uint8_t port_id, uint8_t slave_id)
 }
 
 int
-rte_eth_bond_8023ad_ext_collect(uint8_t port_id, uint8_t slave_id, int enabled)
+rte_eth_bond_8023ad_ext_collect(uint16_t port_id, uint16_t slave_id,
+				int enabled)
 {
 	struct port *port;
 	int res;
@@ -1482,7 +1485,8 @@ rte_eth_bond_8023ad_ext_collect(uint8_t port_id, uint8_t slave_id, int enabled)
 }
 
 int
-rte_eth_bond_8023ad_ext_distrib(uint8_t port_id, uint8_t slave_id, int enabled)
+rte_eth_bond_8023ad_ext_distrib(uint16_t port_id, uint16_t slave_id,
+				int enabled)
 {
 	struct port *port;
 	int res;
@@ -1502,7 +1506,7 @@ rte_eth_bond_8023ad_ext_distrib(uint8_t port_id, uint8_t slave_id, int enabled)
 }
 
 int
-rte_eth_bond_8023ad_ext_distrib_get(uint8_t port_id, uint8_t slave_id)
+rte_eth_bond_8023ad_ext_distrib_get(uint16_t port_id, uint16_t slave_id)
 {
 	struct port *port;
 	int err;
@@ -1516,7 +1520,7 @@ rte_eth_bond_8023ad_ext_distrib_get(uint8_t port_id, uint8_t slave_id)
 }
 
 int
-rte_eth_bond_8023ad_ext_collect_get(uint8_t port_id, uint8_t slave_id)
+rte_eth_bond_8023ad_ext_collect_get(uint16_t port_id, uint16_t slave_id)
 {
 	struct port *port;
 	int err;
@@ -1530,7 +1534,7 @@ rte_eth_bond_8023ad_ext_collect_get(uint8_t port_id, uint8_t slave_id)
 }
 
 int
-rte_eth_bond_8023ad_ext_slowtx(uint8_t port_id, uint8_t slave_id,
+rte_eth_bond_8023ad_ext_slowtx(uint16_t port_id, uint16_t slave_id,
 		struct rte_mbuf *lacp_pkt)
 {
 	struct port *port;
@@ -1591,7 +1595,7 @@ bond_mode_8023ad_ext_periodic_cb(void *arg)
 }
 
 int
-rte_eth_bond_8023ad_dedicated_queues_enable(uint8_t port)
+rte_eth_bond_8023ad_dedicated_queues_enable(uint16_t port)
 {
 	int retval = 0;
 	struct rte_eth_dev *dev = &rte_eth_devices[port];
@@ -1615,7 +1619,7 @@ rte_eth_bond_8023ad_dedicated_queues_enable(uint8_t port)
 }
 
 int
-rte_eth_bond_8023ad_dedicated_queues_disable(uint8_t port)
+rte_eth_bond_8023ad_dedicated_queues_disable(uint16_t port)
 {
 	int retval = 0;
 	struct rte_eth_dev *dev = &rte_eth_devices[port];
diff --git a/drivers/net/bonding/rte_eth_bond_8023ad.h b/drivers/net/bonding/rte_eth_bond_8023ad.h
index d609745e0..2874336d3 100644
--- a/drivers/net/bonding/rte_eth_bond_8023ad.h
+++ b/drivers/net/bonding/rte_eth_bond_8023ad.h
@@ -64,7 +64,7 @@ extern "C" {
 #define MARKER_TLV_TYPE_INFO                0x01
 #define MARKER_TLV_TYPE_RESP                0x02
 
-typedef void (*rte_eth_bond_8023ad_ext_slowrx_fn)(uint8_t slave_id,
+typedef void (*rte_eth_bond_8023ad_ext_slowrx_fn)(uint16_t slave_id,
 						  struct rte_mbuf *lacp_pkt);
 
 enum rte_bond_8023ad_selection {
@@ -176,7 +176,7 @@ struct rte_eth_bond_8023ad_slave_info {
 	struct port_params actor;
 	uint8_t partner_state;
 	struct port_params partner;
-	uint8_t agg_port_id;
+	uint16_t agg_port_id;
 };
 
 /**
@@ -192,7 +192,7 @@ struct rte_eth_bond_8023ad_slave_info {
  *   -EINVAL if conf is NULL
  */
 int
-rte_eth_bond_8023ad_conf_get(uint8_t port_id,
+rte_eth_bond_8023ad_conf_get(uint16_t port_id,
 		struct rte_eth_bond_8023ad_conf *conf);
 
 /**
@@ -207,7 +207,7 @@ rte_eth_bond_8023ad_conf_get(uint8_t port_id,
  *   -EINVAL if configuration is invalid.
  */
 int
-rte_eth_bond_8023ad_setup(uint8_t port_id,
+rte_eth_bond_8023ad_setup(uint16_t port_id,
 		struct rte_eth_bond_8023ad_conf *conf);
 
 /**
@@ -223,7 +223,7 @@ rte_eth_bond_8023ad_setup(uint8_t port_id,
  *       bonded device or is not inactive).
  */
 int
-rte_eth_bond_8023ad_slave_info(uint8_t port_id, uint8_t slave_id,
+rte_eth_bond_8023ad_slave_info(uint16_t port_id, uint16_t slave_id,
 		struct rte_eth_bond_8023ad_slave_info *conf);
 
 #ifdef __cplusplus
@@ -241,7 +241,8 @@ rte_eth_bond_8023ad_slave_info(uint8_t port_id, uint8_t slave_id,
  *   -EINVAL if slave is not valid.
  */
 int
-rte_eth_bond_8023ad_ext_collect(uint8_t port_id, uint8_t slave_id, int enabled);
+rte_eth_bond_8023ad_ext_collect(uint16_t port_id, uint16_t slave_id,
+				int enabled);
 
 /**
  * Get COLLECTING flag from slave port actor state.
@@ -254,7 +255,7 @@ rte_eth_bond_8023ad_ext_collect(uint8_t port_id, uint8_t slave_id, int enabled);
  *   -EINVAL if slave is not valid.
  */
 int
-rte_eth_bond_8023ad_ext_collect_get(uint8_t port_id, uint8_t slave_id);
+rte_eth_bond_8023ad_ext_collect_get(uint16_t port_id, uint16_t slave_id);
 
 /**
  * Configure a slave port to start distributing.
@@ -267,7 +268,8 @@ rte_eth_bond_8023ad_ext_collect_get(uint8_t port_id, uint8_t slave_id);
  *   -EINVAL if slave is not valid.
  */
 int
-rte_eth_bond_8023ad_ext_distrib(uint8_t port_id, uint8_t slave_id, int enabled);
+rte_eth_bond_8023ad_ext_distrib(uint16_t port_id, uint16_t slave_id,
+				int enabled);
 
 /**
  * Get DISTRIBUTING flag from slave port actor state.
@@ -280,7 +282,7 @@ rte_eth_bond_8023ad_ext_distrib(uint8_t port_id, uint8_t slave_id, int enabled);
  *   -EINVAL if slave is not valid.
  */
 int
-rte_eth_bond_8023ad_ext_distrib_get(uint8_t port_id, uint8_t slave_id);
+rte_eth_bond_8023ad_ext_distrib_get(uint16_t port_id, uint16_t slave_id);
 
 /**
  * LACPDU transmit path for external 802.3ad state machine.  Caller retains
@@ -294,7 +296,7 @@ rte_eth_bond_8023ad_ext_distrib_get(uint8_t port_id, uint8_t slave_id);
  *   0 on success, negative value otherwise.
  */
 int
-rte_eth_bond_8023ad_ext_slowtx(uint8_t port_id, uint8_t slave_id,
+rte_eth_bond_8023ad_ext_slowtx(uint16_t port_id, uint16_t slave_id,
 		struct rte_mbuf *lacp_pkt);
 
 /**
@@ -320,7 +322,7 @@ rte_eth_bond_8023ad_ext_slowtx(uint8_t port_id, uint8_t slave_id,
  *   0 on success, negative value otherwise.
  */
 int
-rte_eth_bond_8023ad_dedicated_queues_enable(uint8_t port_id);
+rte_eth_bond_8023ad_dedicated_queues_enable(uint16_t port_id);
 
 /**
  * Disable slow queue on slaves
@@ -337,7 +339,7 @@ rte_eth_bond_8023ad_dedicated_queues_enable(uint8_t port_id);
  *
  */
 int
-rte_eth_bond_8023ad_dedicated_queues_disable(uint8_t port_id);
+rte_eth_bond_8023ad_dedicated_queues_disable(uint16_t port_id);
 
 /*
  * Get aggregator mode for 8023ad
@@ -347,7 +349,7 @@ rte_eth_bond_8023ad_dedicated_queues_disable(uint8_t port_id);
  *   agregator mode on success, negative value otherwise
  */
 int
-rte_eth_bond_8023ad_agg_selection_get(uint8_t port_id);
+rte_eth_bond_8023ad_agg_selection_get(uint16_t port_id);
 
 /**
  * Set aggregator mode for 8023ad
@@ -356,6 +358,6 @@ rte_eth_bond_8023ad_agg_selection_get(uint8_t port_id);
  *   0 on success, negative value otherwise
  */
 int
-rte_eth_bond_8023ad_agg_selection_set(uint8_t port_id,
+rte_eth_bond_8023ad_agg_selection_set(uint16_t port_id,
 		enum rte_bond_8023ad_agg_selection agg_selection);
 #endif /* RTE_ETH_BOND_8023AD_H_ */
diff --git a/drivers/net/bonding/rte_eth_bond_8023ad_private.h b/drivers/net/bonding/rte_eth_bond_8023ad_private.h
index d46e44a84..433c7000d 100644
--- a/drivers/net/bonding/rte_eth_bond_8023ad_private.h
+++ b/drivers/net/bonding/rte_eth_bond_8023ad_private.h
@@ -279,7 +279,7 @@ bond_mode_8023ad_stop(struct rte_eth_dev *dev);
  */
 void
 bond_mode_8023ad_handle_slow_pkt(struct bond_dev_private *internals,
-	uint8_t slave_id, struct rte_mbuf *pkt);
+				 uint16_t slave_id, struct rte_mbuf *pkt);
 
 /**
  * @internal
@@ -293,7 +293,7 @@ bond_mode_8023ad_handle_slow_pkt(struct bond_dev_private *internals,
  *  0 on success, negative value otherwise.
  */
 void
-bond_mode_8023ad_activate_slave(struct rte_eth_dev *dev, uint8_t port_id);
+bond_mode_8023ad_activate_slave(struct rte_eth_dev *dev, uint16_t port_id);
 
 /**
  * @internal
@@ -307,7 +307,7 @@ bond_mode_8023ad_activate_slave(struct rte_eth_dev *dev, uint8_t port_id);
  *  0 on success, negative value otherwise.
  */
 int
-bond_mode_8023ad_deactivate_slave(struct rte_eth_dev *dev, uint8_t slave_pos);
+bond_mode_8023ad_deactivate_slave(struct rte_eth_dev *dev, uint16_t slave_pos);
 
 /**
  * Updates state when MAC was changed on bonded device or one of its slaves.
@@ -318,12 +318,12 @@ bond_mode_8023ad_mac_address_update(struct rte_eth_dev *bond_dev);
 
 int
 bond_ethdev_8023ad_flow_verify(struct rte_eth_dev *bond_dev,
-		uint8_t slave_port);
+		uint16_t slave_port);
 
 int
-bond_ethdev_8023ad_flow_set(struct rte_eth_dev *bond_dev, uint8_t slave_port);
+bond_ethdev_8023ad_flow_set(struct rte_eth_dev *bond_dev, uint16_t slave_port);
 
 int
-bond_8023ad_slow_pkt_hw_filter_supported(uint8_t port_id);
+bond_8023ad_slow_pkt_hw_filter_supported(uint16_t port_id);
 
 #endif /* RTE_ETH_BOND_8023AD_H_ */
diff --git a/drivers/net/bonding/rte_eth_bond_alb.c b/drivers/net/bonding/rte_eth_bond_alb.c
index d9d37495d..f7efbb78e 100644
--- a/drivers/net/bonding/rte_eth_bond_alb.c
+++ b/drivers/net/bonding/rte_eth_bond_alb.c
@@ -148,7 +148,7 @@ void bond_mode_alb_arp_recv(struct ether_hdr *eth_h, uint16_t offset,
 	rte_spinlock_unlock(&internals->mode6.lock);
 }
 
-uint8_t
+uint16_t
 bond_mode_alb_arp_xmit(struct ether_hdr *eth_h, uint16_t offset,
 		struct bond_dev_private *internals)
 {
@@ -220,13 +220,13 @@ bond_mode_alb_arp_xmit(struct ether_hdr *eth_h, uint16_t offset,
 	return internals->current_primary_port;
 }
 
-uint8_t
+uint16_t
 bond_mode_alb_arp_upd(struct client_data *client_info,
 		struct rte_mbuf *pkt, struct bond_dev_private *internals)
 {
 	struct ether_hdr *eth_h;
 	struct arp_hdr *arp_h;
-	uint8_t slave_idx;
+	uint16_t slave_idx;
 
 	rte_spinlock_lock(&internals->mode6.lock);
 	eth_h = rte_pktmbuf_mtod(pkt, struct ether_hdr *);
diff --git a/drivers/net/bonding/rte_eth_bond_alb.h b/drivers/net/bonding/rte_eth_bond_alb.h
index fd7c3aeb4..9f17f7c85 100644
--- a/drivers/net/bonding/rte_eth_bond_alb.h
+++ b/drivers/net/bonding/rte_eth_bond_alb.h
@@ -51,7 +51,7 @@ struct client_data {
 	uint32_t cli_ip;
 	/**< Client IP address */
 
-	uint8_t slave_idx;
+	uint16_t slave_idx;
 	/**< Index of slave on which we connect with that client */
 	uint8_t in_use;
 	/**< Flag indicating if entry in client table is currently used */
@@ -113,7 +113,7 @@ bond_mode_alb_arp_recv(struct ether_hdr *eth_h, uint16_t offset,
  * @return
  * Index of slave on which packet should be sent.
  */
-uint8_t
+uint16_t
 bond_mode_alb_arp_xmit(struct ether_hdr *eth_h, uint16_t offset,
 		struct bond_dev_private *internals);
 
@@ -127,7 +127,7 @@ bond_mode_alb_arp_xmit(struct ether_hdr *eth_h, uint16_t offset,
  * @return
  * Index of slawe on which packet should be sent.
  */
-uint8_t
+uint16_t
 bond_mode_alb_arp_upd(struct client_data *client_info,
 		struct rte_mbuf *pkt, struct bond_dev_private *internals);
 
diff --git a/drivers/net/bonding/rte_eth_bond_api.c b/drivers/net/bonding/rte_eth_bond_api.c
index de1d9e0db..529aae34e 100644
--- a/drivers/net/bonding/rte_eth_bond_api.c
+++ b/drivers/net/bonding/rte_eth_bond_api.c
@@ -56,14 +56,14 @@ check_for_bonded_ethdev(const struct rte_eth_dev *eth_dev)
 }
 
 int
-valid_bonded_port_id(uint8_t port_id)
+valid_bonded_port_id(uint16_t port_id)
 {
 	RTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -1);
 	return check_for_bonded_ethdev(&rte_eth_devices[port_id]);
 }
 
 int
-valid_slave_port_id(uint8_t port_id, uint8_t mode)
+valid_slave_port_id(uint16_t port_id, uint8_t mode)
 {
 	RTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -1);
 
@@ -80,7 +80,7 @@ valid_slave_port_id(uint8_t port_id, uint8_t mode)
 }
 
 void
-activate_slave(struct rte_eth_dev *eth_dev, uint8_t port_id)
+activate_slave(struct rte_eth_dev *eth_dev, uint16_t port_id)
 {
 	struct bond_dev_private *internals = eth_dev->data->dev_private;
 	uint8_t active_count = internals->active_slave_count;
@@ -107,11 +107,11 @@ activate_slave(struct rte_eth_dev *eth_dev, uint8_t port_id)
 }
 
 void
-deactivate_slave(struct rte_eth_dev *eth_dev, uint8_t port_id)
+deactivate_slave(struct rte_eth_dev *eth_dev, uint16_t port_id)
 {
-	uint8_t slave_pos;
+	uint16_t slave_pos;
 	struct bond_dev_private *internals = eth_dev->data->dev_private;
-	uint8_t active_count = internals->active_slave_count;
+	uint16_t active_count = internals->active_slave_count;
 
 	if (internals->mode == BONDING_MODE_8023AD) {
 		bond_mode_8023ad_stop(eth_dev);
@@ -153,7 +153,7 @@ rte_eth_bond_create(const char *name, uint8_t mode, uint8_t socket_id)
 {
 	struct bond_dev_private *internals;
 	char devargs[52];
-	uint8_t port_id;
+	uint16_t port_id;
 	int ret;
 
 	if (name == NULL) {
@@ -193,7 +193,7 @@ rte_eth_bond_free(const char *name)
 }
 
 static int
-slave_vlan_filter_set(uint8_t bonded_port_id, uint8_t slave_port_id)
+slave_vlan_filter_set(uint16_t bonded_port_id, uint16_t slave_port_id)
 {
 	struct rte_eth_dev *bonded_eth_dev;
 	struct bond_dev_private *internals;
@@ -233,7 +233,7 @@ slave_vlan_filter_set(uint8_t bonded_port_id, uint8_t slave_port_id)
 }
 
 static int
-__eth_bond_slave_add_lock_free(uint8_t bonded_port_id, uint8_t slave_port_id)
+__eth_bond_slave_add_lock_free(uint16_t bonded_port_id, uint16_t slave_port_id)
 {
 	struct rte_eth_dev *bonded_eth_dev, *slave_eth_dev;
 	struct bond_dev_private *internals;
@@ -363,7 +363,7 @@ __eth_bond_slave_add_lock_free(uint8_t bonded_port_id, uint8_t slave_port_id)
 }
 
 int
-rte_eth_bond_slave_add(uint8_t bonded_port_id, uint8_t slave_port_id)
+rte_eth_bond_slave_add(uint16_t bonded_port_id, uint16_t slave_port_id)
 {
 	struct rte_eth_dev *bonded_eth_dev;
 	struct bond_dev_private *internals;
@@ -387,7 +387,8 @@ rte_eth_bond_slave_add(uint8_t bonded_port_id, uint8_t slave_port_id)
 }
 
 static int
-__eth_bond_slave_remove_lock_free(uint8_t bonded_port_id, uint8_t slave_port_id)
+__eth_bond_slave_remove_lock_free(uint16_t bonded_port_id,
+				   uint16_t slave_port_id)
 {
 	struct rte_eth_dev *bonded_eth_dev;
 	struct bond_dev_private *internals;
@@ -466,7 +467,7 @@ __eth_bond_slave_remove_lock_free(uint8_t bonded_port_id, uint8_t slave_port_id)
 }
 
 int
-rte_eth_bond_slave_remove(uint8_t bonded_port_id, uint8_t slave_port_id)
+rte_eth_bond_slave_remove(uint16_t bonded_port_id, uint16_t slave_port_id)
 {
 	struct rte_eth_dev *bonded_eth_dev;
 	struct bond_dev_private *internals;
@@ -488,7 +489,7 @@ rte_eth_bond_slave_remove(uint8_t bonded_port_id, uint8_t slave_port_id)
 }
 
 int
-rte_eth_bond_mode_set(uint8_t bonded_port_id, uint8_t mode)
+rte_eth_bond_mode_set(uint16_t bonded_port_id, uint8_t mode)
 {
 	if (valid_bonded_port_id(bonded_port_id) != 0)
 		return -1;
@@ -497,7 +498,7 @@ rte_eth_bond_mode_set(uint8_t bonded_port_id, uint8_t mode)
 }
 
 int
-rte_eth_bond_mode_get(uint8_t bonded_port_id)
+rte_eth_bond_mode_get(uint16_t bonded_port_id)
 {
 	struct bond_dev_private *internals;
 
@@ -510,7 +511,7 @@ rte_eth_bond_mode_get(uint8_t bonded_port_id)
 }
 
 int
-rte_eth_bond_primary_set(uint8_t bonded_port_id, uint8_t slave_port_id)
+rte_eth_bond_primary_set(uint16_t bonded_port_id, uint16_t slave_port_id)
 {
 	struct bond_dev_private *internals;
 
@@ -531,7 +532,7 @@ rte_eth_bond_primary_set(uint8_t bonded_port_id, uint8_t slave_port_id)
 }
 
 int
-rte_eth_bond_primary_get(uint8_t bonded_port_id)
+rte_eth_bond_primary_get(uint16_t bonded_port_id)
 {
 	struct bond_dev_private *internals;
 
@@ -547,7 +548,8 @@ rte_eth_bond_primary_get(uint8_t bonded_port_id)
 }
 
 int
-rte_eth_bond_slaves_get(uint8_t bonded_port_id, uint8_t slaves[], uint8_t len)
+rte_eth_bond_slaves_get(uint16_t bonded_port_id, uint16_t slaves[],
+			uint16_t len)
 {
 	struct bond_dev_private *internals;
 	uint8_t i;
@@ -570,8 +572,8 @@ rte_eth_bond_slaves_get(uint8_t bonded_port_id, uint8_t slaves[], uint8_t len)
 }
 
 int
-rte_eth_bond_active_slaves_get(uint8_t bonded_port_id, uint8_t slaves[],
-		uint8_t len)
+rte_eth_bond_active_slaves_get(uint16_t bonded_port_id, uint16_t slaves[],
+		uint16_t len)
 {
 	struct bond_dev_private *internals;
 
@@ -586,13 +588,14 @@ rte_eth_bond_active_slaves_get(uint8_t bonded_port_id, uint8_t slaves[],
 	if (internals->active_slave_count > len)
 		return -1;
 
-	memcpy(slaves, internals->active_slaves, internals->active_slave_count);
+	memcpy(slaves, internals->active_slaves,
+	internals->active_slave_count * sizeof(internals->active_slaves[0]));
 
 	return internals->active_slave_count;
 }
 
 int
-rte_eth_bond_mac_address_set(uint8_t bonded_port_id,
+rte_eth_bond_mac_address_set(uint16_t bonded_port_id,
 		struct ether_addr *mac_addr)
 {
 	struct rte_eth_dev *bonded_eth_dev;
@@ -618,7 +621,7 @@ rte_eth_bond_mac_address_set(uint8_t bonded_port_id,
 }
 
 int
-rte_eth_bond_mac_address_reset(uint8_t bonded_port_id)
+rte_eth_bond_mac_address_reset(uint16_t bonded_port_id)
 {
 	struct rte_eth_dev *bonded_eth_dev;
 	struct bond_dev_private *internals;
@@ -647,7 +650,7 @@ rte_eth_bond_mac_address_reset(uint8_t bonded_port_id)
 }
 
 int
-rte_eth_bond_xmit_policy_set(uint8_t bonded_port_id, uint8_t policy)
+rte_eth_bond_xmit_policy_set(uint16_t bonded_port_id, uint8_t policy)
 {
 	struct bond_dev_private *internals;
 
@@ -677,7 +680,7 @@ rte_eth_bond_xmit_policy_set(uint8_t bonded_port_id, uint8_t policy)
 }
 
 int
-rte_eth_bond_xmit_policy_get(uint8_t bonded_port_id)
+rte_eth_bond_xmit_policy_get(uint16_t bonded_port_id)
 {
 	struct bond_dev_private *internals;
 
@@ -690,7 +693,7 @@ rte_eth_bond_xmit_policy_get(uint8_t bonded_port_id)
 }
 
 int
-rte_eth_bond_link_monitoring_set(uint8_t bonded_port_id, uint32_t internal_ms)
+rte_eth_bond_link_monitoring_set(uint16_t bonded_port_id, uint32_t internal_ms)
 {
 	struct bond_dev_private *internals;
 
@@ -704,7 +707,7 @@ rte_eth_bond_link_monitoring_set(uint8_t bonded_port_id, uint32_t internal_ms)
 }
 
 int
-rte_eth_bond_link_monitoring_get(uint8_t bonded_port_id)
+rte_eth_bond_link_monitoring_get(uint16_t bonded_port_id)
 {
 	struct bond_dev_private *internals;
 
@@ -717,7 +720,8 @@ rte_eth_bond_link_monitoring_get(uint8_t bonded_port_id)
 }
 
 int
-rte_eth_bond_link_down_prop_delay_set(uint8_t bonded_port_id, uint32_t delay_ms)
+rte_eth_bond_link_down_prop_delay_set(uint16_t bonded_port_id,
+				       uint32_t delay_ms)
 
 {
 	struct bond_dev_private *internals;
@@ -732,7 +736,7 @@ rte_eth_bond_link_down_prop_delay_set(uint8_t bonded_port_id, uint32_t delay_ms)
 }
 
 int
-rte_eth_bond_link_down_prop_delay_get(uint8_t bonded_port_id)
+rte_eth_bond_link_down_prop_delay_get(uint16_t bonded_port_id)
 {
 	struct bond_dev_private *internals;
 
@@ -745,7 +749,7 @@ rte_eth_bond_link_down_prop_delay_get(uint8_t bonded_port_id)
 }
 
 int
-rte_eth_bond_link_up_prop_delay_set(uint8_t bonded_port_id, uint32_t delay_ms)
+rte_eth_bond_link_up_prop_delay_set(uint16_t bonded_port_id, uint32_t delay_ms)
 
 {
 	struct bond_dev_private *internals;
@@ -760,7 +764,7 @@ rte_eth_bond_link_up_prop_delay_set(uint8_t bonded_port_id, uint32_t delay_ms)
 }
 
 int
-rte_eth_bond_link_up_prop_delay_get(uint8_t bonded_port_id)
+rte_eth_bond_link_up_prop_delay_get(uint16_t bonded_port_id)
 {
 	struct bond_dev_private *internals;
 
diff --git a/drivers/net/bonding/rte_eth_bond_args.c b/drivers/net/bonding/rte_eth_bond_args.c
index bb634c62e..04d1f4e8f 100644
--- a/drivers/net/bonding/rte_eth_bond_args.c
+++ b/drivers/net/bonding/rte_eth_bond_args.c
@@ -153,7 +153,7 @@ bond_ethdev_parse_slave_port_kvarg(const char *key,
 			return -1;
 		} else
 			slave_ports->slaves[slave_ports->slave_count++] =
-					(uint8_t)port_id;
+					port_id;
 	}
 	return 0;
 }
diff --git a/drivers/net/bonding/rte_eth_bond_pmd.c b/drivers/net/bonding/rte_eth_bond_pmd.c
index 3ee70baa0..2d680e3fb 100644
--- a/drivers/net/bonding/rte_eth_bond_pmd.c
+++ b/drivers/net/bonding/rte_eth_bond_pmd.c
@@ -174,7 +174,7 @@ const struct rte_flow_attr flow_attr_8023ad = {
 
 int
 bond_ethdev_8023ad_flow_verify(struct rte_eth_dev *bond_dev,
-		uint8_t slave_port) {
+		uint16_t slave_port) {
 	struct rte_flow_error error;
 	struct bond_dev_private *internals = (struct bond_dev_private *)
 			(bond_dev->data->dev_private);
@@ -202,12 +202,12 @@ bond_ethdev_8023ad_flow_verify(struct rte_eth_dev *bond_dev,
 }
 
 int
-bond_8023ad_slow_pkt_hw_filter_supported(uint8_t port_id) {
+bond_8023ad_slow_pkt_hw_filter_supported(uint16_t port_id) {
 	struct rte_eth_dev *bond_dev = &rte_eth_devices[port_id];
 	struct bond_dev_private *internals = (struct bond_dev_private *)
 			(bond_dev->data->dev_private);
 	struct rte_eth_dev_info bond_info, slave_info;
-	uint8_t idx;
+	uint16_t idx;
 
 	/* Verify if all slaves in bonding supports flow director and */
 	if (internals->slave_count > 0) {
@@ -230,7 +230,7 @@ bond_8023ad_slow_pkt_hw_filter_supported(uint8_t port_id) {
 }
 
 int
-bond_ethdev_8023ad_flow_set(struct rte_eth_dev *bond_dev, uint8_t slave_port) {
+bond_ethdev_8023ad_flow_set(struct rte_eth_dev *bond_dev, uint16_t slave_port) {
 
 	struct rte_flow_error error;
 	struct bond_dev_private *internals = (struct bond_dev_private *)
@@ -270,10 +270,10 @@ bond_ethdev_rx_burst_8023ad_fast_queue(void *queue, struct rte_mbuf **bufs,
 	struct bond_rx_queue *bd_rx_q = (struct bond_rx_queue *)queue;
 	struct bond_dev_private *internals = bd_rx_q->dev_private;
 	uint16_t num_rx_total = 0;	/* Total number of received packets */
-	uint8_t slaves[RTE_MAX_ETHPORTS];
-	uint8_t slave_count;
+	uint16_t slaves[RTE_MAX_ETHPORTS];
+	uint16_t slave_count;
 
-	uint8_t i, idx;
+	uint16_t i, idx;
 
 	/* Copy slave list to protect against slave up/down changes during tx
 	 * bursting */
@@ -302,8 +302,8 @@ bond_ethdev_tx_burst_8023ad_fast_queue(void *queue, struct rte_mbuf **bufs,
 	struct bond_dev_private *internals;
 	struct bond_tx_queue *bd_tx_q;
 
-	uint8_t num_of_slaves;
-	uint8_t slaves[RTE_MAX_ETHPORTS];
+	uint16_t num_of_slaves;
+	uint16_t slaves[RTE_MAX_ETHPORTS];
 	 /* positions in slaves, not ID */
 	uint8_t distributing_offsets[RTE_MAX_ETHPORTS];
 	uint8_t distributing_count;
@@ -394,8 +394,8 @@ bond_ethdev_rx_burst_8023ad(void *queue, struct rte_mbuf **bufs,
 
 	const uint16_t ether_type_slow_be = rte_be_to_cpu_16(ETHER_TYPE_SLOW);
 	uint16_t num_rx_total = 0;	/* Total number of received packets */
-	uint8_t slaves[RTE_MAX_ETHPORTS];
-	uint8_t slave_count, idx;
+	uint16_t slaves[RTE_MAX_ETHPORTS];
+	uint16_t slave_count, idx;
 
 	uint8_t collecting;  /* current slave collecting status */
 	const uint8_t promisc = internals->promiscuous_en;
@@ -673,8 +673,8 @@ bond_ethdev_tx_burst_round_robin(void *queue, struct rte_mbuf **bufs,
 	struct rte_mbuf *slave_bufs[RTE_MAX_ETHPORTS][nb_pkts];
 	uint16_t slave_nb_pkts[RTE_MAX_ETHPORTS] = { 0 };
 
-	uint8_t num_of_slaves;
-	uint8_t slaves[RTE_MAX_ETHPORTS];
+	uint16_t num_of_slaves;
+	uint16_t slaves[RTE_MAX_ETHPORTS];
 
 	uint16_t num_tx_total = 0, num_tx_slave;
 
@@ -904,7 +904,7 @@ bandwidth_cmp(const void *a, const void *b)
 }
 
 static void
-bandwidth_left(uint8_t port_id, uint64_t load, uint8_t update_idx,
+bandwidth_left(uint16_t port_id, uint64_t load, uint8_t update_idx,
 		struct bwg_slave *bwg_slave)
 {
 	struct rte_eth_link link_status;
@@ -970,10 +970,10 @@ bond_ethdev_tx_burst_tlb(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)
 	struct rte_eth_dev *primary_port =
 			&rte_eth_devices[internals->primary_port];
 	uint16_t num_tx_total = 0;
-	uint8_t i, j;
+	uint16_t i, j;
 
-	uint8_t num_of_slaves = internals->active_slave_count;
-	uint8_t slaves[RTE_MAX_ETHPORTS];
+	uint16_t num_of_slaves = internals->active_slave_count;
+	uint16_t slaves[RTE_MAX_ETHPORTS];
 
 	struct ether_hdr *ether_hdr;
 	struct ether_addr primary_slave_addr;
@@ -1059,7 +1059,7 @@ bond_ethdev_tx_burst_alb(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)
 
 	uint16_t num_send, num_not_send = 0;
 	uint16_t num_tx_total = 0;
-	uint8_t slave_idx;
+	uint16_t slave_idx;
 
 	int i, j;
 
@@ -1178,8 +1178,8 @@ bond_ethdev_tx_burst_balance(void *queue, struct rte_mbuf **bufs,
 	struct bond_dev_private *internals;
 	struct bond_tx_queue *bd_tx_q;
 
-	uint8_t num_of_slaves;
-	uint8_t slaves[RTE_MAX_ETHPORTS];
+	uint16_t num_of_slaves;
+	uint16_t slaves[RTE_MAX_ETHPORTS];
 
 	uint16_t num_tx_total = 0, num_tx_slave = 0, tx_fail_total = 0;
 
@@ -1239,8 +1239,8 @@ bond_ethdev_tx_burst_8023ad(void *queue, struct rte_mbuf **bufs,
 	struct bond_dev_private *internals;
 	struct bond_tx_queue *bd_tx_q;
 
-	uint8_t num_of_slaves;
-	uint8_t slaves[RTE_MAX_ETHPORTS];
+	uint16_t num_of_slaves;
+	uint16_t slaves[RTE_MAX_ETHPORTS];
 	 /* positions in slaves, not ID */
 	uint8_t distributing_offsets[RTE_MAX_ETHPORTS];
 	uint8_t distributing_count;
@@ -1333,7 +1333,7 @@ bond_ethdev_tx_burst_broadcast(void *queue, struct rte_mbuf **bufs,
 	struct bond_tx_queue *bd_tx_q;
 
 	uint8_t tx_failed_flag = 0, num_of_slaves;
-	uint8_t slaves[RTE_MAX_ETHPORTS];
+	uint16_t slaves[RTE_MAX_ETHPORTS];
 
 	uint16_t max_nb_of_tx_pkts = 0;
 
@@ -1861,7 +1861,7 @@ slave_add(struct bond_dev_private *internals,
 
 void
 bond_ethdev_primary_set(struct bond_dev_private *internals,
-		uint8_t slave_port_id)
+		uint16_t slave_port_id)
 {
 	int i;
 
@@ -2125,7 +2125,7 @@ static int
 bond_ethdev_vlan_filter_set(struct rte_eth_dev *dev, uint16_t vlan_id, int on)
 {
 	int res;
-	uint8_t i;
+	uint16_t i;
 	struct bond_dev_private *internals = dev->data->dev_private;
 
 	/* don't do this while a slave is being added */
@@ -2137,7 +2137,7 @@ bond_ethdev_vlan_filter_set(struct rte_eth_dev *dev, uint16_t vlan_id, int on)
 		rte_bitmap_clear(internals->vlan_filter_bmp, vlan_id);
 
 	for (i = 0; i < internals->slave_count; i++) {
-		uint8_t port_id = internals->slaves[i].port_id;
+		uint16_t port_id = internals->slaves[i].port_id;
 
 		res = rte_eth_dev_vlan_filter(port_id, vlan_id, on);
 		if (res == ENOTSUP)
@@ -2277,7 +2277,7 @@ bond_ethdev_slave_link_status_change_monitor(void *cb_arg)
 static int
 bond_ethdev_link_update(struct rte_eth_dev *ethdev, int wait_to_complete)
 {
-	void (*link_update)(uint8_t port_id, struct rte_eth_link *eth_link);
+	void (*link_update)(uint16_t port_id, struct rte_eth_link *eth_link);
 
 	struct bond_dev_private *bond_ctx;
 	struct rte_eth_link slave_link;
@@ -2466,7 +2466,7 @@ bond_ethdev_delayed_lsc_propagation(void *arg)
 }
 
 int
-bond_ethdev_lsc_event_callback(uint8_t port_id, enum rte_eth_event_type type,
+bond_ethdev_lsc_event_callback(uint16_t port_id, enum rte_eth_event_type type,
 		void *param, void *ret_param __rte_unused)
 {
 	struct rte_eth_dev *bonded_eth_dev;
@@ -2951,7 +2951,7 @@ bond_ethdev_configure(struct rte_eth_dev *dev)
 	struct bond_dev_private *internals = dev->data->dev_private;
 	struct rte_kvargs *kvlist = internals->kvlist;
 	int arg_count;
-	uint8_t port_id = dev - rte_eth_devices;
+	uint16_t port_id = dev - rte_eth_devices;
 	uint8_t agg_mode;
 
 	static const uint8_t default_rss_key[40] = {
@@ -3086,7 +3086,7 @@ bond_ethdev_configure(struct rte_eth_dev *dev)
 	/* Parse/set primary slave port id*/
 	arg_count = rte_kvargs_count(kvlist, PMD_BOND_PRIMARY_SLAVE_KVARG);
 	if (arg_count == 1) {
-		uint8_t primary_slave_port_id;
+		uint16_t primary_slave_port_id;
 
 		if (rte_kvargs_process(kvlist,
 				PMD_BOND_PRIMARY_SLAVE_KVARG,
@@ -3099,7 +3099,7 @@ bond_ethdev_configure(struct rte_eth_dev *dev)
 		}
 
 		/* Set balance mode transmit policy*/
-		if (rte_eth_bond_primary_set(port_id, (uint8_t)primary_slave_port_id)
+		if (rte_eth_bond_primary_set(port_id, primary_slave_port_id)
 				!= 0) {
 			RTE_LOG(ERR, EAL,
 					"Failed to set primary slave port %d on bonded device %s\n",
diff --git a/drivers/net/bonding/rte_eth_bond_private.h b/drivers/net/bonding/rte_eth_bond_private.h
index 1fe6ff880..1392da98d 100644
--- a/drivers/net/bonding/rte_eth_bond_private.h
+++ b/drivers/net/bonding/rte_eth_bond_private.h
@@ -93,12 +93,12 @@ struct bond_tx_queue {
 
 /** Bonded slave devices structure */
 struct bond_ethdev_slave_ports {
-	uint8_t slaves[RTE_MAX_ETHPORTS];	/**< Slave port id array */
-	uint8_t slave_count;				/**< Number of slaves */
+	uint16_t slaves[RTE_MAX_ETHPORTS];	/**< Slave port id array */
+	uint16_t slave_count;				/**< Number of slaves */
 };
 
 struct bond_slave_details {
-	uint8_t port_id;
+	uint16_t port_id;
 
 	uint8_t link_status_poll_enabled;
 	uint8_t link_status_wait_to_complete;
@@ -114,14 +114,14 @@ typedef uint16_t (*xmit_hash_t)(const struct rte_mbuf *buf, uint8_t slave_count)
 
 /** Link Bonding PMD device private configuration Structure */
 struct bond_dev_private {
-	uint8_t port_id;					/**< Port Id of Bonded Port */
+	uint16_t port_id;			/**< Port Id of Bonded Port */
 	uint8_t mode;						/**< Link Bonding Mode */
 
 	rte_spinlock_t lock;
 
-	uint8_t primary_port;				/**< Primary Slave Port */
-	uint8_t current_primary_port;		/**< Primary Slave Port */
-	uint8_t user_defined_primary_port;
+	uint16_t primary_port;			/**< Primary Slave Port */
+	uint16_t current_primary_port;		/**< Primary Slave Port */
+	uint16_t user_defined_primary_port;
 	/**< Flag for whether primary port is user defined or not */
 
 	uint8_t balance_xmit_policy;
@@ -144,16 +144,17 @@ struct bond_dev_private {
 	uint16_t nb_rx_queues;			/**< Total number of rx queues */
 	uint16_t nb_tx_queues;			/**< Total number of tx queues*/
 
-	uint8_t active_slave;		/**< Next active_slave to poll */
-	uint8_t active_slave_count;		/**< Number of active slaves */
-	uint8_t active_slaves[RTE_MAX_ETHPORTS];	/**< Active slave list */
+	uint16_t active_slave;		/**< Next active_slave to poll */
+	uint16_t active_slave_count;		/**< Number of active slaves */
+	uint16_t active_slaves[RTE_MAX_ETHPORTS];    /**< Active slave list */
 
-	uint8_t slave_count;			/**< Number of bonded slaves */
+	uint16_t slave_count;			/**< Number of bonded slaves */
 	struct bond_slave_details slaves[RTE_MAX_ETHPORTS];
 	/**< Arary of bonded slaves details */
 
 	struct mode8023ad_private mode4;
-	uint8_t tlb_slaves_order[RTE_MAX_ETHPORTS]; /* TLB active slaves send order */
+	uint16_t tlb_slaves_order[RTE_MAX_ETHPORTS];
+	/**< TLB active slaves send order */
 	struct mode_alb_private mode6;
 
 	uint32_t rx_offload_capa;            /** Rx offload capability */
@@ -186,10 +187,10 @@ check_for_bonded_ethdev(const struct rte_eth_dev *eth_dev);
 
 /* Search given slave array to find position of given id.
  * Return slave pos or slaves_count if not found. */
-static inline uint8_t
-find_slave_by_id(uint8_t *slaves, uint8_t slaves_count, uint8_t slave_id) {
+static inline uint16_t
+find_slave_by_id(uint16_t *slaves, uint16_t slaves_count, uint16_t slave_id) {
 
-	uint8_t pos;
+	uint16_t pos;
 	for (pos = 0; pos < slaves_count; pos++) {
 		if (slave_id == slaves[pos])
 			break;
@@ -199,19 +200,19 @@ find_slave_by_id(uint8_t *slaves, uint8_t slaves_count, uint8_t slave_id) {
 }
 
 int
-valid_port_id(uint8_t port_id);
+valid_port_id(uint16_t port_id);
 
 int
-valid_bonded_port_id(uint8_t port_id);
+valid_bonded_port_id(uint16_t port_id);
 
 int
-valid_slave_port_id(uint8_t port_id, uint8_t mode);
+valid_slave_port_id(uint16_t port_id, uint8_t mode);
 
 void
-deactivate_slave(struct rte_eth_dev *eth_dev, uint8_t port_id);
+deactivate_slave(struct rte_eth_dev *eth_dev, uint16_t port_id);
 
 void
-activate_slave(struct rte_eth_dev *eth_dev, uint8_t port_id);
+activate_slave(struct rte_eth_dev *eth_dev, uint16_t port_id);
 
 void
 link_properties_set(struct rte_eth_dev *bonded_eth_dev,
@@ -255,10 +256,10 @@ xmit_l34_hash(const struct rte_mbuf *buf, uint8_t slave_count);
 
 void
 bond_ethdev_primary_set(struct bond_dev_private *internals,
-		uint8_t slave_port_id);
+		uint16_t slave_port_id);
 
 int
-bond_ethdev_lsc_event_callback(uint8_t port_id, enum rte_eth_event_type type,
+bond_ethdev_lsc_event_callback(uint16_t port_id, enum rte_eth_event_type type,
 		void *param, void *ret_param);
 
 int
diff --git a/drivers/net/e1000/em_ethdev.c b/drivers/net/e1000/em_ethdev.c
index 3d4ab9368..a59947d78 100644
--- a/drivers/net/e1000/em_ethdev.c
+++ b/drivers/net/e1000/em_ethdev.c
@@ -1624,7 +1624,7 @@ eth_em_interrupt_action(struct rte_eth_dev *dev,
 	rte_em_dev_atomic_read_link_status(dev, &link);
 	if (link.link_status) {
 		PMD_INIT_LOG(INFO, " Port %d: Link Up - speed %u Mbps - %s",
-			     dev->data->port_id, (unsigned)link.link_speed,
+			     dev->data->port_id, link.link_speed,
 			     link.link_duplex == ETH_LINK_FULL_DUPLEX ?
 			     "full-duplex" : "half-duplex");
 	} else {
diff --git a/drivers/net/e1000/em_rxtx.c b/drivers/net/e1000/em_rxtx.c
index 31819c5bd..06ba68e39 100644
--- a/drivers/net/e1000/em_rxtx.c
+++ b/drivers/net/e1000/em_rxtx.c
@@ -119,7 +119,7 @@ struct em_rx_queue {
 	uint16_t            nb_rx_hold; /**< number of held free RX desc. */
 	uint16_t            rx_free_thresh; /**< max free RX desc to hold. */
 	uint16_t            queue_id;   /**< RX queue index. */
-	uint8_t             port_id;    /**< Device port identifier. */
+	uint16_t            port_id;    /**< Device port identifier. */
 	uint8_t             pthresh;    /**< Prefetch threshold register. */
 	uint8_t             hthresh;    /**< Host threshold register. */
 	uint8_t             wthresh;    /**< Write-back threshold register. */
@@ -186,7 +186,7 @@ struct em_tx_queue {
 	/** Total number of TX descriptors ready to be allocated. */
 	uint16_t               nb_tx_free;
 	uint16_t               queue_id; /**< TX queue index. */
-	uint8_t                port_id;  /**< Device port identifier. */
+	uint16_t               port_id;  /**< Device port identifier. */
 	uint8_t                pthresh;  /**< Prefetch threshold register. */
 	uint8_t                hthresh;  /**< Host threshold register. */
 	uint8_t                wthresh;  /**< Write-back threshold register. */
diff --git a/drivers/net/e1000/igb_rxtx.c b/drivers/net/e1000/igb_rxtx.c
index 1c80a2a1b..a800d9c2b 100644
--- a/drivers/net/e1000/igb_rxtx.c
+++ b/drivers/net/e1000/igb_rxtx.c
@@ -122,7 +122,7 @@ struct igb_rx_queue {
 	uint16_t            rx_free_thresh; /**< max free RX desc to hold. */
 	uint16_t            queue_id;   /**< RX queue index. */
 	uint16_t            reg_idx;    /**< RX queue register index. */
-	uint8_t             port_id;    /**< Device port identifier. */
+	uint16_t            port_id;    /**< Device port identifier. */
 	uint8_t             pthresh;    /**< Prefetch threshold register. */
 	uint8_t             hthresh;    /**< Host threshold register. */
 	uint8_t             wthresh;    /**< Write-back threshold register. */
@@ -191,7 +191,7 @@ struct igb_tx_queue {
 	/**< Index of first used TX descriptor. */
 	uint16_t               queue_id; /**< TX queue index. */
 	uint16_t               reg_idx;  /**< TX queue register index. */
-	uint8_t                port_id;  /**< Device port identifier. */
+	uint16_t               port_id;  /**< Device port identifier. */
 	uint8_t                pthresh;  /**< Prefetch threshold register. */
 	uint8_t                hthresh;  /**< Host threshold register. */
 	uint8_t                wthresh;  /**< Write-back threshold register. */
diff --git a/drivers/net/failsafe/failsafe_ether.c b/drivers/net/failsafe/failsafe_ether.c
index a3a8cce95..1c8a9337e 100644
--- a/drivers/net/failsafe/failsafe_ether.c
+++ b/drivers/net/failsafe/failsafe_ether.c
@@ -400,7 +400,7 @@ failsafe_eth_dev_state_sync(struct rte_eth_dev *dev)
 }
 
 int
-failsafe_eth_rmv_event_callback(uint8_t port_id __rte_unused,
+failsafe_eth_rmv_event_callback(uint16_t port_id __rte_unused,
 				enum rte_eth_event_type event __rte_unused,
 				void *cb_arg, void *out __rte_unused)
 {
@@ -419,7 +419,7 @@ failsafe_eth_rmv_event_callback(uint8_t port_id __rte_unused,
 }
 
 int
-failsafe_eth_lsc_event_callback(uint8_t port_id __rte_unused,
+failsafe_eth_lsc_event_callback(uint16_t port_id __rte_unused,
 				enum rte_eth_event_type event __rte_unused,
 				void *cb_arg, void *out __rte_unused)
 {
diff --git a/drivers/net/failsafe/failsafe_private.h b/drivers/net/failsafe/failsafe_private.h
index 0361cf434..4ae6e6c5f 100644
--- a/drivers/net/failsafe/failsafe_private.h
+++ b/drivers/net/failsafe/failsafe_private.h
@@ -180,10 +180,10 @@ int failsafe_eal_uninit(struct rte_eth_dev *dev);
 
 int failsafe_eth_dev_state_sync(struct rte_eth_dev *dev);
 void failsafe_dev_remove(struct rte_eth_dev *dev);
-int failsafe_eth_rmv_event_callback(uint8_t port_id,
+int failsafe_eth_rmv_event_callback(uint16_t port_id,
 				    enum rte_eth_event_type type,
 				    void *arg, void *out);
-int failsafe_eth_lsc_event_callback(uint8_t port_id,
+int failsafe_eth_lsc_event_callback(uint16_t port_id,
 				    enum rte_eth_event_type event,
 				    void *cb_arg, void *out);
 
diff --git a/drivers/net/fm10k/fm10k.h b/drivers/net/fm10k/fm10k.h
index 8e1a95062..060982b10 100644
--- a/drivers/net/fm10k/fm10k.h
+++ b/drivers/net/fm10k/fm10k.h
@@ -204,7 +204,7 @@ struct fm10k_rx_queue {
 	uint16_t rxrearm_nb;     /* number of remaining to be re-armed */
 	uint16_t rxrearm_start;  /* the idx we start the re-arming from */
 	uint16_t rx_using_sse; /* indicates that vector RX is in use */
-	uint8_t port_id;
+	uint16_t port_id;
 	uint8_t drop_en;
 	uint8_t rx_deferred_start; /* don't start this queue in dev start. */
 	uint16_t rx_ftag_en; /* indicates FTAG RX supported */
@@ -241,7 +241,7 @@ struct fm10k_tx_queue {
 	volatile uint32_t *tail_ptr;
 	uint32_t txq_flags; /* Holds flags for this TXq */
 	uint16_t nb_desc;
-	uint8_t port_id;
+	uint16_t port_id;
 	uint8_t tx_deferred_start; /** don't start this queue in dev start. */
 	uint16_t queue_id;
 	uint16_t tx_ftag_en; /* indicates FTAG TX supported */
@@ -289,7 +289,7 @@ static inline uint16_t fifo_remove(struct fifo *fifo)
 }
 
 static inline void
-fm10k_pktmbuf_reset(struct rte_mbuf *mb, uint8_t in_port)
+fm10k_pktmbuf_reset(struct rte_mbuf *mb, uint16_t in_port)
 {
 	rte_mbuf_refcnt_set(mb, 1);
 	mb->next = NULL;
diff --git a/drivers/net/i40e/Makefile b/drivers/net/i40e/Makefile
index 55c79a60a..1290d7f32 100644
--- a/drivers/net/i40e/Makefile
+++ b/drivers/net/i40e/Makefile
@@ -42,7 +42,7 @@ CFLAGS += -DX722_A0_SUPPORT
 
 EXPORT_MAP := rte_pmd_i40e_version.map
 
-LIBABIVER := 1
+LIBABIVER := 2
 
 #
 # Add extra flags for base driver files (also known as shared code)
diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c
index f12aefa5d..c4c6aec1d 100644
--- a/drivers/net/i40e/i40e_ethdev.c
+++ b/drivers/net/i40e/i40e_ethdev.c
@@ -1920,8 +1920,9 @@ i40e_dev_start(struct rte_eth_dev *dev)
 	hw->adapter_stopped = 0;
 
 	if (dev->data->dev_conf.link_speeds & ETH_LINK_SPEED_FIXED) {
-		PMD_INIT_LOG(ERR, "Invalid link_speeds for port %hhu; autonegotiation disabled",
-			     dev->data->port_id);
+		PMD_INIT_LOG(ERR,
+		"Invalid link_speeds for port %u, autonegotiation disabled",
+			      dev->data->port_id);
 		return -EINVAL;
 	}
 
diff --git a/drivers/net/i40e/i40e_rxtx.h b/drivers/net/i40e/i40e_rxtx.h
index 20084d649..ff2ab8575 100644
--- a/drivers/net/i40e/i40e_rxtx.h
+++ b/drivers/net/i40e/i40e_rxtx.h
@@ -121,7 +121,7 @@ struct i40e_rx_queue {
 	uint16_t rxrearm_start;	/**< the idx we start the re-arming from */
 	uint64_t mbuf_initializer; /**< value to init mbufs */
 
-	uint8_t port_id; /**< device port ID */
+	uint16_t port_id; /**< device port ID */
 	uint8_t crc_len; /**< 0 if CRC stripped, 4 otherwise */
 	uint16_t queue_id; /**< RX queue index */
 	uint16_t reg_idx; /**< RX queue register index */
@@ -167,7 +167,7 @@ struct i40e_tx_queue {
 	uint8_t pthresh; /**< Prefetch threshold register. */
 	uint8_t hthresh; /**< Host threshold register. */
 	uint8_t wthresh; /**< Write-back threshold reg. */
-	uint8_t port_id; /**< Device port identifier. */
+	uint16_t port_id; /**< Device port identifier. */
 	uint16_t queue_id; /**< TX queue index. */
 	uint16_t reg_idx;
 	uint32_t txq_flags;
diff --git a/drivers/net/i40e/rte_pmd_i40e.c b/drivers/net/i40e/rte_pmd_i40e.c
index f12b7f4a1..3728d39b9 100644
--- a/drivers/net/i40e/rte_pmd_i40e.c
+++ b/drivers/net/i40e/rte_pmd_i40e.c
@@ -41,7 +41,7 @@
 #include "rte_pmd_i40e.h"
 
 int
-rte_pmd_i40e_ping_vfs(uint8_t port, uint16_t vf)
+rte_pmd_i40e_ping_vfs(uint16_t port, uint16_t vf)
 {
 	struct rte_eth_dev *dev;
 	struct i40e_pf *pf;
@@ -66,7 +66,7 @@ rte_pmd_i40e_ping_vfs(uint8_t port, uint16_t vf)
 }
 
 int
-rte_pmd_i40e_set_vf_mac_anti_spoof(uint8_t port, uint16_t vf_id, uint8_t on)
+rte_pmd_i40e_set_vf_mac_anti_spoof(uint16_t port, uint16_t vf_id, uint8_t on)
 {
 	struct rte_eth_dev *dev;
 	struct i40e_pf *pf;
@@ -170,7 +170,7 @@ i40e_add_rm_all_vlan_filter(struct i40e_vsi *vsi, uint8_t add)
 }
 
 int
-rte_pmd_i40e_set_vf_vlan_anti_spoof(uint8_t port, uint16_t vf_id, uint8_t on)
+rte_pmd_i40e_set_vf_vlan_anti_spoof(uint16_t port, uint16_t vf_id, uint8_t on)
 {
 	struct rte_eth_dev *dev;
 	struct i40e_pf *pf;
@@ -430,7 +430,7 @@ i40e_vsi_set_tx_loopback(struct i40e_vsi *vsi, uint8_t on)
 }
 
 int
-rte_pmd_i40e_set_tx_loopback(uint8_t port, uint8_t on)
+rte_pmd_i40e_set_tx_loopback(uint16_t port, uint8_t on)
 {
 	struct rte_eth_dev *dev;
 	struct i40e_pf *pf;
@@ -473,7 +473,7 @@ rte_pmd_i40e_set_tx_loopback(uint8_t port, uint8_t on)
 }
 
 int
-rte_pmd_i40e_set_vf_unicast_promisc(uint8_t port, uint16_t vf_id, uint8_t on)
+rte_pmd_i40e_set_vf_unicast_promisc(uint16_t port, uint16_t vf_id, uint8_t on)
 {
 	struct rte_eth_dev *dev;
 	struct i40e_pf *pf;
@@ -514,7 +514,7 @@ rte_pmd_i40e_set_vf_unicast_promisc(uint8_t port, uint16_t vf_id, uint8_t on)
 }
 
 int
-rte_pmd_i40e_set_vf_multicast_promisc(uint8_t port, uint16_t vf_id, uint8_t on)
+rte_pmd_i40e_set_vf_multicast_promisc(uint16_t port, uint16_t vf_id, uint8_t on)
 {
 	struct rte_eth_dev *dev;
 	struct i40e_pf *pf;
@@ -555,7 +555,7 @@ rte_pmd_i40e_set_vf_multicast_promisc(uint8_t port, uint16_t vf_id, uint8_t on)
 }
 
 int
-rte_pmd_i40e_set_vf_mac_addr(uint8_t port, uint16_t vf_id,
+rte_pmd_i40e_set_vf_mac_addr(uint16_t port, uint16_t vf_id,
 			     struct ether_addr *mac_addr)
 {
 	struct i40e_mac_filter *f;
@@ -598,7 +598,7 @@ rte_pmd_i40e_set_vf_mac_addr(uint8_t port, uint16_t vf_id,
 
 /* Set vlan strip on/off for specific VF from host */
 int
-rte_pmd_i40e_set_vf_vlan_stripq(uint8_t port, uint16_t vf_id, uint8_t on)
+rte_pmd_i40e_set_vf_vlan_stripq(uint16_t port, uint16_t vf_id, uint8_t on)
 {
 	struct rte_eth_dev *dev;
 	struct i40e_pf *pf;
@@ -633,7 +633,7 @@ rte_pmd_i40e_set_vf_vlan_stripq(uint8_t port, uint16_t vf_id, uint8_t on)
 	return ret;
 }
 
-int rte_pmd_i40e_set_vf_vlan_insert(uint8_t port, uint16_t vf_id,
+int rte_pmd_i40e_set_vf_vlan_insert(uint16_t port, uint16_t vf_id,
 				    uint16_t vlan_id)
 {
 	struct rte_eth_dev *dev;
@@ -698,7 +698,7 @@ int rte_pmd_i40e_set_vf_vlan_insert(uint8_t port, uint16_t vf_id,
 	return ret;
 }
 
-int rte_pmd_i40e_set_vf_broadcast(uint8_t port, uint16_t vf_id,
+int rte_pmd_i40e_set_vf_broadcast(uint16_t port, uint16_t vf_id,
 				  uint8_t on)
 {
 	struct rte_eth_dev *dev;
@@ -764,7 +764,7 @@ int rte_pmd_i40e_set_vf_broadcast(uint8_t port, uint16_t vf_id,
 	return ret;
 }
 
-int rte_pmd_i40e_set_vf_vlan_tag(uint8_t port, uint16_t vf_id, uint8_t on)
+int rte_pmd_i40e_set_vf_vlan_tag(uint16_t port, uint16_t vf_id, uint8_t on)
 {
 	struct rte_eth_dev *dev;
 	struct i40e_pf *pf;
@@ -858,7 +858,7 @@ i40e_vlan_filter_count(struct i40e_vsi *vsi)
 	return count;
 }
 
-int rte_pmd_i40e_set_vf_vlan_filter(uint8_t port, uint16_t vlan_id,
+int rte_pmd_i40e_set_vf_vlan_filter(uint16_t port, uint16_t vlan_id,
 				    uint64_t vf_mask, uint8_t on)
 {
 	struct rte_eth_dev *dev;
@@ -941,7 +941,7 @@ int rte_pmd_i40e_set_vf_vlan_filter(uint8_t port, uint16_t vlan_id,
 }
 
 int
-rte_pmd_i40e_get_vf_stats(uint8_t port,
+rte_pmd_i40e_get_vf_stats(uint16_t port,
 			  uint16_t vf_id,
 			  struct rte_eth_stats *stats)
 {
@@ -986,7 +986,7 @@ rte_pmd_i40e_get_vf_stats(uint8_t port,
 }
 
 int
-rte_pmd_i40e_reset_vf_stats(uint8_t port,
+rte_pmd_i40e_reset_vf_stats(uint16_t port,
 			    uint16_t vf_id)
 {
 	struct rte_eth_dev *dev;
@@ -1020,7 +1020,7 @@ rte_pmd_i40e_reset_vf_stats(uint8_t port,
 }
 
 int
-rte_pmd_i40e_set_vf_max_bw(uint8_t port, uint16_t vf_id, uint32_t bw)
+rte_pmd_i40e_set_vf_max_bw(uint16_t port, uint16_t vf_id, uint32_t bw)
 {
 	struct rte_eth_dev *dev;
 	struct i40e_pf *pf;
@@ -1109,7 +1109,7 @@ rte_pmd_i40e_set_vf_max_bw(uint8_t port, uint16_t vf_id, uint32_t bw)
 }
 
 int
-rte_pmd_i40e_set_vf_tc_bw_alloc(uint8_t port, uint16_t vf_id,
+rte_pmd_i40e_set_vf_tc_bw_alloc(uint16_t port, uint16_t vf_id,
 				uint8_t tc_num, uint8_t *bw_weight)
 {
 	struct rte_eth_dev *dev;
@@ -1223,7 +1223,7 @@ rte_pmd_i40e_set_vf_tc_bw_alloc(uint8_t port, uint16_t vf_id,
 }
 
 int
-rte_pmd_i40e_set_vf_tc_max_bw(uint8_t port, uint16_t vf_id,
+rte_pmd_i40e_set_vf_tc_max_bw(uint16_t port, uint16_t vf_id,
 			      uint8_t tc_no, uint32_t bw)
 {
 	struct rte_eth_dev *dev;
@@ -1341,7 +1341,7 @@ rte_pmd_i40e_set_vf_tc_max_bw(uint8_t port, uint16_t vf_id,
 }
 
 int
-rte_pmd_i40e_set_tc_strict_prio(uint8_t port, uint8_t tc_map)
+rte_pmd_i40e_set_tc_strict_prio(uint16_t port, uint8_t tc_map)
 {
 	struct rte_eth_dev *dev;
 	struct i40e_pf *pf;
@@ -1513,7 +1513,7 @@ i40e_add_rm_profile_info(struct i40e_hw *hw, uint8_t *profile_info_sec)
 
 /* Check if the profile info exists */
 static int
-i40e_check_profile_info(uint8_t port, uint8_t *profile_info_sec)
+i40e_check_profile_info(uint16_t port, uint8_t *profile_info_sec)
 {
 	struct rte_eth_dev *dev = &rte_eth_devices[port];
 	struct i40e_hw *hw = I40E_DEV_PRIVATE_TO_HW(dev->data->dev_private);
@@ -1557,7 +1557,7 @@ i40e_check_profile_info(uint8_t port, uint8_t *profile_info_sec)
 }
 
 int
-rte_pmd_i40e_process_ddp_package(uint8_t port, uint8_t *buff,
+rte_pmd_i40e_process_ddp_package(uint16_t port, uint8_t *buff,
 				 uint32_t size,
 				 enum rte_pmd_i40e_package_op op)
 {
@@ -1863,7 +1863,7 @@ int rte_pmd_i40e_get_ddp_info(uint8_t *pkg_buff, uint32_t pkg_size,
 }
 
 int
-rte_pmd_i40e_get_ddp_list(uint8_t port, uint8_t *buff, uint32_t size)
+rte_pmd_i40e_get_ddp_list(uint16_t port, uint8_t *buff, uint32_t size)
 {
 	struct rte_eth_dev *dev;
 	struct i40e_hw *hw;
@@ -1991,7 +1991,7 @@ static int check_invalid_ptype_mapping(
 
 int
 rte_pmd_i40e_ptype_mapping_update(
-			uint8_t port,
+			uint16_t port,
 			struct rte_pmd_i40e_ptype_mapping *mapping_items,
 			uint16_t count,
 			uint8_t exclusive)
@@ -2027,7 +2027,7 @@ rte_pmd_i40e_ptype_mapping_update(
 	return 0;
 }
 
-int rte_pmd_i40e_ptype_mapping_reset(uint8_t port)
+int rte_pmd_i40e_ptype_mapping_reset(uint16_t port)
 {
 	struct rte_eth_dev *dev;
 
@@ -2044,7 +2044,7 @@ int rte_pmd_i40e_ptype_mapping_reset(uint8_t port)
 }
 
 int rte_pmd_i40e_ptype_mapping_get(
-			uint8_t port,
+			uint16_t port,
 			struct rte_pmd_i40e_ptype_mapping *mapping_items,
 			uint16_t size,
 			uint16_t *count,
@@ -2078,7 +2078,7 @@ int rte_pmd_i40e_ptype_mapping_get(
 	return 0;
 }
 
-int rte_pmd_i40e_ptype_mapping_replace(uint8_t port,
+int rte_pmd_i40e_ptype_mapping_replace(uint16_t port,
 				       uint32_t target,
 				       uint8_t mask,
 				       uint32_t pkt_type)
diff --git a/drivers/net/i40e/rte_pmd_i40e.h b/drivers/net/i40e/rte_pmd_i40e.h
index 356fa89d7..7f32a59b1 100644
--- a/drivers/net/i40e/rte_pmd_i40e.h
+++ b/drivers/net/i40e/rte_pmd_i40e.h
@@ -157,7 +157,7 @@ struct rte_pmd_i40e_ptype_mapping {
  *   - (-ENODEV) if *port* invalid.
  *   - (-EINVAL) if *vf* invalid.
  */
-int rte_pmd_i40e_ping_vfs(uint8_t port, uint16_t vf);
+int rte_pmd_i40e_ping_vfs(uint16_t port, uint16_t vf);
 
 /**
  * Enable/Disable VF MAC anti spoofing.
@@ -174,7 +174,7 @@ int rte_pmd_i40e_ping_vfs(uint8_t port, uint16_t vf);
  *   - (-ENODEV) if *port* invalid.
  *   - (-EINVAL) if bad parameter.
  */
-int rte_pmd_i40e_set_vf_mac_anti_spoof(uint8_t port,
+int rte_pmd_i40e_set_vf_mac_anti_spoof(uint16_t port,
 				       uint16_t vf_id,
 				       uint8_t on);
 
@@ -193,7 +193,7 @@ int rte_pmd_i40e_set_vf_mac_anti_spoof(uint8_t port,
  *   - (-ENODEV) if *port* invalid.
  *   - (-EINVAL) if bad parameter.
  */
-int rte_pmd_i40e_set_vf_vlan_anti_spoof(uint8_t port,
+int rte_pmd_i40e_set_vf_vlan_anti_spoof(uint16_t port,
 					uint16_t vf_id,
 					uint8_t on);
 
@@ -210,7 +210,7 @@ int rte_pmd_i40e_set_vf_vlan_anti_spoof(uint8_t port,
  *   - (-ENODEV) if *port* invalid.
  *   - (-EINVAL) if bad parameter.
  */
-int rte_pmd_i40e_set_tx_loopback(uint8_t port,
+int rte_pmd_i40e_set_tx_loopback(uint16_t port,
 				 uint8_t on);
 
 /**
@@ -228,7 +228,7 @@ int rte_pmd_i40e_set_tx_loopback(uint8_t port,
  *   - (-ENODEV) if *port* invalid.
  *   - (-EINVAL) if bad parameter.
  */
-int rte_pmd_i40e_set_vf_unicast_promisc(uint8_t port,
+int rte_pmd_i40e_set_vf_unicast_promisc(uint16_t port,
 					uint16_t vf_id,
 					uint8_t on);
 
@@ -247,7 +247,7 @@ int rte_pmd_i40e_set_vf_unicast_promisc(uint8_t port,
  *   - (-ENODEV) if *port* invalid.
  *   - (-EINVAL) if bad parameter.
  */
-int rte_pmd_i40e_set_vf_multicast_promisc(uint8_t port,
+int rte_pmd_i40e_set_vf_multicast_promisc(uint16_t port,
 					  uint16_t vf_id,
 					  uint8_t on);
 
@@ -271,7 +271,7 @@ int rte_pmd_i40e_set_vf_multicast_promisc(uint8_t port,
  *   - (-ENODEV) if *port* invalid.
  *   - (-EINVAL) if *vf* or *mac_addr* is invalid.
  */
-int rte_pmd_i40e_set_vf_mac_addr(uint8_t port, uint16_t vf_id,
+int rte_pmd_i40e_set_vf_mac_addr(uint16_t port, uint16_t vf_id,
 				 struct ether_addr *mac_addr);
 
 /**
@@ -291,7 +291,7 @@ int rte_pmd_i40e_set_vf_mac_addr(uint8_t port, uint16_t vf_id,
  *   - (-EINVAL) if bad parameter.
  */
 int
-rte_pmd_i40e_set_vf_vlan_stripq(uint8_t port, uint16_t vf, uint8_t on);
+rte_pmd_i40e_set_vf_vlan_stripq(uint16_t port, uint16_t vf, uint8_t on);
 
 /**
  * Enable/Disable vf vlan insert
@@ -309,7 +309,7 @@ rte_pmd_i40e_set_vf_vlan_stripq(uint8_t port, uint16_t vf, uint8_t on);
  *   - (-ENODEV) if *port* invalid.
  *   - (-EINVAL) if bad parameter.
  */
-int rte_pmd_i40e_set_vf_vlan_insert(uint8_t port, uint16_t vf_id,
+int rte_pmd_i40e_set_vf_vlan_insert(uint16_t port, uint16_t vf_id,
 				    uint16_t vlan_id);
 
 /**
@@ -328,7 +328,7 @@ int rte_pmd_i40e_set_vf_vlan_insert(uint8_t port, uint16_t vf_id,
  *   - (-ENODEV) if *port* invalid.
  *   - (-EINVAL) if bad parameter.
  */
-int rte_pmd_i40e_set_vf_broadcast(uint8_t port, uint16_t vf_id,
+int rte_pmd_i40e_set_vf_broadcast(uint16_t port, uint16_t vf_id,
 				  uint8_t on);
 
 /**
@@ -347,7 +347,7 @@ int rte_pmd_i40e_set_vf_broadcast(uint8_t port, uint16_t vf_id,
  *   - (-ENODEV) if *port* invalid.
  *   - (-EINVAL) if bad parameter.
  */
-int rte_pmd_i40e_set_vf_vlan_tag(uint8_t port, uint16_t vf_id, uint8_t on);
+int rte_pmd_i40e_set_vf_vlan_tag(uint16_t port, uint16_t vf_id, uint8_t on);
 
 /**
  * Enable/Disable VF VLAN filter
@@ -368,7 +368,7 @@ int rte_pmd_i40e_set_vf_vlan_tag(uint8_t port, uint16_t vf_id, uint8_t on);
  *   - (-EINVAL) if bad parameter.
  *   - (-ENOTSUP) not supported by firmware.
  */
-int rte_pmd_i40e_set_vf_vlan_filter(uint8_t port, uint16_t vlan_id,
+int rte_pmd_i40e_set_vf_vlan_filter(uint16_t port, uint16_t vlan_id,
 				    uint64_t vf_mask, uint8_t on);
 
 /**
@@ -393,7 +393,7 @@ int rte_pmd_i40e_set_vf_vlan_filter(uint8_t port, uint16_t vlan_id,
  *   - (-EINVAL) if bad parameter.
  */
 
-int rte_pmd_i40e_get_vf_stats(uint8_t port,
+int rte_pmd_i40e_get_vf_stats(uint16_t port,
 			      uint16_t vf_id,
 			      struct rte_eth_stats *stats);
 
@@ -409,7 +409,7 @@ int rte_pmd_i40e_get_vf_stats(uint8_t port,
  *   - (-ENODEV) if *port* invalid.
  *   - (-EINVAL) if bad parameter.
  */
-int rte_pmd_i40e_reset_vf_stats(uint8_t port,
+int rte_pmd_i40e_reset_vf_stats(uint16_t port,
 				uint16_t vf_id);
 
 /**
@@ -434,7 +434,7 @@ int rte_pmd_i40e_reset_vf_stats(uint8_t port,
  *   - (-EINVAL) if bad parameter.
  *   - (-ENOTSUP) not supported by firmware.
  */
-int rte_pmd_i40e_set_vf_max_bw(uint8_t port,
+int rte_pmd_i40e_set_vf_max_bw(uint16_t port,
 			       uint16_t vf_id,
 			       uint32_t bw);
 
@@ -459,7 +459,7 @@ int rte_pmd_i40e_set_vf_max_bw(uint8_t port,
  *   - (-EINVAL) if bad parameter.
  *   - (-ENOTSUP) not supported by firmware.
  */
-int rte_pmd_i40e_set_vf_tc_bw_alloc(uint8_t port,
+int rte_pmd_i40e_set_vf_tc_bw_alloc(uint16_t port,
 				    uint16_t vf_id,
 				    uint8_t tc_num,
 				    uint8_t *bw_weight);
@@ -484,7 +484,7 @@ int rte_pmd_i40e_set_vf_tc_bw_alloc(uint8_t port,
  *   - (-EINVAL) if bad parameter.
  *   - (-ENOTSUP) not supported by firmware.
  */
-int rte_pmd_i40e_set_vf_tc_max_bw(uint8_t port,
+int rte_pmd_i40e_set_vf_tc_max_bw(uint16_t port,
 				  uint16_t vf_id,
 				  uint8_t tc_no,
 				  uint32_t bw);
@@ -502,7 +502,7 @@ int rte_pmd_i40e_set_vf_tc_max_bw(uint8_t port,
  *   - (-EINVAL) if bad parameter.
  *   - (-ENOTSUP) not supported by firmware.
  */
-int rte_pmd_i40e_set_tc_strict_prio(uint8_t port, uint8_t tc_map);
+int rte_pmd_i40e_set_tc_strict_prio(uint16_t port, uint8_t tc_map);
 
 /**
  * Load/Unload a ddp package
@@ -523,7 +523,7 @@ int rte_pmd_i40e_set_tc_strict_prio(uint8_t port, uint8_t tc_map);
  *   - (-EACCES) if profile does not exist.
  *   - (-ENOTSUP) if operation not supported.
  */
-int rte_pmd_i40e_process_ddp_package(uint8_t port, uint8_t *buff,
+int rte_pmd_i40e_process_ddp_package(uint16_t port, uint8_t *buff,
 				     uint32_t size,
 				     enum rte_pmd_i40e_package_op op);
 
@@ -561,7 +561,7 @@ int rte_pmd_i40e_get_ddp_info(uint8_t *pkg, uint32_t pkg_size,
  *   - (-ENODEV) if *port* invalid.
  *   - (-EINVAL) if bad parameter.
  */
-int rte_pmd_i40e_get_ddp_list(uint8_t port, uint8_t *buff, uint32_t size);
+int rte_pmd_i40e_get_ddp_list(uint16_t port, uint8_t *buff, uint32_t size);
 
 /**
  * Update hardware defined ptype to software defined packet type
@@ -581,7 +581,7 @@ int rte_pmd_i40e_get_ddp_list(uint8_t port, uint8_t *buff, uint32_t size);
  *	set other PTYPEs maps to PTYPE_UNKNOWN.
  */
 int rte_pmd_i40e_ptype_mapping_update(
-			uint8_t port,
+			uint16_t port,
 			struct rte_pmd_i40e_ptype_mapping *mapping_items,
 			uint16_t count,
 			uint8_t exclusive);
@@ -593,7 +593,7 @@ int rte_pmd_i40e_ptype_mapping_update(
  * @param port
  *    pointer to port identifier of the device
  */
-int rte_pmd_i40e_ptype_mapping_reset(uint8_t port);
+int rte_pmd_i40e_ptype_mapping_reset(uint16_t port);
 
 /**
  * Get hardware defined ptype to software defined ptype
@@ -612,7 +612,7 @@ int rte_pmd_i40e_ptype_mapping_reset(uint8_t port);
  *    -(!0) only return mapping items which packet_type != RTE_PTYPE_UNKNOWN.
  */
 int rte_pmd_i40e_ptype_mapping_get(
-			uint8_t port,
+			uint16_t port,
 			struct rte_pmd_i40e_ptype_mapping *mapping_items,
 			uint16_t size,
 			uint16_t *count,
@@ -632,7 +632,7 @@ int rte_pmd_i40e_ptype_mapping_get(
  * @param pkt_type
  *    the new packet type to overwrite
  */
-int rte_pmd_i40e_ptype_mapping_replace(uint8_t port,
+int rte_pmd_i40e_ptype_mapping_replace(uint16_t port,
 				       uint32_t target,
 				       uint8_t mask,
 				       uint32_t pkt_type);
diff --git a/drivers/net/ixgbe/Makefile b/drivers/net/ixgbe/Makefile
index 5e57cb353..18ad4feca 100644
--- a/drivers/net/ixgbe/Makefile
+++ b/drivers/net/ixgbe/Makefile
@@ -41,7 +41,7 @@ CFLAGS += $(WERROR_FLAGS)
 
 EXPORT_MAP := rte_pmd_ixgbe_version.map
 
-LIBABIVER := 1
+LIBABIVER := 2
 
 ifeq ($(CONFIG_RTE_TOOLCHAIN_ICC),y)
 #
diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c
index 9ca5cbcd3..d873c409f 100644
--- a/drivers/net/ixgbe/ixgbe_ethdev.c
+++ b/drivers/net/ixgbe/ixgbe_ethdev.c
@@ -2508,8 +2508,9 @@ ixgbe_dev_start(struct rte_eth_dev *dev)
 	*    - fixed speed: TODO implement
 	*/
 	if (dev->data->dev_conf.link_speeds & ETH_LINK_SPEED_FIXED) {
-		PMD_INIT_LOG(ERR, "Invalid link_speeds for port %hhu; fix speed not supported",
-			     dev->data->port_id);
+		PMD_INIT_LOG(ERR,
+		"Invalid link_speeds for port %u, fix speed not supported",
+				dev->data->port_id);
 		return -EINVAL;
 	}
 
diff --git a/drivers/net/ixgbe/ixgbe_rxtx.h b/drivers/net/ixgbe/ixgbe_rxtx.h
index 85feb0bdc..81c527fad 100644
--- a/drivers/net/ixgbe/ixgbe_rxtx.h
+++ b/drivers/net/ixgbe/ixgbe_rxtx.h
@@ -148,7 +148,7 @@ struct ixgbe_rx_queue {
 	uint16_t            queue_id; /**< RX queue index. */
 	uint16_t            reg_idx;  /**< RX queue register index. */
 	uint16_t            pkt_type_mask;  /**< Packet type mask for different NICs. */
-	uint8_t             port_id;  /**< Device port identifier. */
+	uint16_t            port_id;  /**< Device port identifier. */
 	uint8_t             crc_len;  /**< 0 if CRC stripped, 4 otherwise. */
 	uint8_t             drop_en;  /**< If not 0, set SRRCTL.Drop_En. */
 	uint8_t             rx_deferred_start; /**< not in global dev start. */
@@ -237,7 +237,7 @@ struct ixgbe_tx_queue {
 	uint16_t tx_next_rs; /**< next desc to set RS bit */
 	uint16_t            queue_id;      /**< TX queue index. */
 	uint16_t            reg_idx;       /**< TX queue register index. */
-	uint8_t             port_id;       /**< Device port identifier. */
+	uint16_t            port_id;       /**< Device port identifier. */
 	uint8_t             pthresh;       /**< Prefetch threshold register. */
 	uint8_t             hthresh;       /**< Host threshold register. */
 	uint8_t             wthresh;       /**< Write-back threshold reg. */
diff --git a/drivers/net/ixgbe/rte_pmd_ixgbe.c b/drivers/net/ixgbe/rte_pmd_ixgbe.c
index 79897ff64..f12737857 100644
--- a/drivers/net/ixgbe/rte_pmd_ixgbe.c
+++ b/drivers/net/ixgbe/rte_pmd_ixgbe.c
@@ -38,7 +38,7 @@
 #include "rte_pmd_ixgbe.h"
 
 int
-rte_pmd_ixgbe_set_vf_mac_addr(uint8_t port, uint16_t vf,
+rte_pmd_ixgbe_set_vf_mac_addr(uint16_t port, uint16_t vf,
 			      struct ether_addr *mac_addr)
 {
 	struct ixgbe_hw *hw;
@@ -73,7 +73,7 @@ rte_pmd_ixgbe_set_vf_mac_addr(uint8_t port, uint16_t vf,
 }
 
 int
-rte_pmd_ixgbe_ping_vf(uint8_t port, uint16_t vf)
+rte_pmd_ixgbe_ping_vf(uint16_t port, uint16_t vf)
 {
 	struct ixgbe_hw *hw;
 	struct ixgbe_vf_info *vfinfo;
@@ -105,7 +105,7 @@ rte_pmd_ixgbe_ping_vf(uint8_t port, uint16_t vf)
 }
 
 int
-rte_pmd_ixgbe_set_vf_vlan_anti_spoof(uint8_t port, uint16_t vf, uint8_t on)
+rte_pmd_ixgbe_set_vf_vlan_anti_spoof(uint16_t port, uint16_t vf, uint8_t on)
 {
 	struct ixgbe_hw *hw;
 	struct ixgbe_mac_info *mac;
@@ -135,7 +135,7 @@ rte_pmd_ixgbe_set_vf_vlan_anti_spoof(uint8_t port, uint16_t vf, uint8_t on)
 }
 
 int
-rte_pmd_ixgbe_set_vf_mac_anti_spoof(uint8_t port, uint16_t vf, uint8_t on)
+rte_pmd_ixgbe_set_vf_mac_anti_spoof(uint16_t port, uint16_t vf, uint8_t on)
 {
 	struct ixgbe_hw *hw;
 	struct ixgbe_mac_info *mac;
@@ -164,7 +164,7 @@ rte_pmd_ixgbe_set_vf_mac_anti_spoof(uint8_t port, uint16_t vf, uint8_t on)
 }
 
 int
-rte_pmd_ixgbe_set_vf_vlan_insert(uint8_t port, uint16_t vf, uint16_t vlan_id)
+rte_pmd_ixgbe_set_vf_vlan_insert(uint16_t port, uint16_t vf, uint16_t vlan_id)
 {
 	struct ixgbe_hw *hw;
 	uint32_t ctrl;
@@ -200,7 +200,7 @@ rte_pmd_ixgbe_set_vf_vlan_insert(uint8_t port, uint16_t vf, uint16_t vlan_id)
 }
 
 int
-rte_pmd_ixgbe_set_tx_loopback(uint8_t port, uint8_t on)
+rte_pmd_ixgbe_set_tx_loopback(uint16_t port, uint8_t on)
 {
 	struct ixgbe_hw *hw;
 	uint32_t ctrl;
@@ -230,7 +230,7 @@ rte_pmd_ixgbe_set_tx_loopback(uint8_t port, uint8_t on)
 }
 
 int
-rte_pmd_ixgbe_set_all_queues_drop_en(uint8_t port, uint8_t on)
+rte_pmd_ixgbe_set_all_queues_drop_en(uint16_t port, uint8_t on)
 {
 	struct ixgbe_hw *hw;
 	uint32_t reg_value;
@@ -260,7 +260,7 @@ rte_pmd_ixgbe_set_all_queues_drop_en(uint8_t port, uint8_t on)
 }
 
 int
-rte_pmd_ixgbe_set_vf_split_drop_en(uint8_t port, uint16_t vf, uint8_t on)
+rte_pmd_ixgbe_set_vf_split_drop_en(uint16_t port, uint16_t vf, uint8_t on)
 {
 	struct ixgbe_hw *hw;
 	uint32_t reg_value;
@@ -295,7 +295,7 @@ rte_pmd_ixgbe_set_vf_split_drop_en(uint8_t port, uint16_t vf, uint8_t on)
 }
 
 int
-rte_pmd_ixgbe_set_vf_vlan_stripq(uint8_t port, uint16_t vf, uint8_t on)
+rte_pmd_ixgbe_set_vf_vlan_stripq(uint16_t port, uint16_t vf, uint8_t on)
 {
 	struct rte_eth_dev *dev;
 	struct rte_pci_device *pci_dev;
@@ -342,7 +342,7 @@ rte_pmd_ixgbe_set_vf_vlan_stripq(uint8_t port, uint16_t vf, uint8_t on)
 }
 
 int
-rte_pmd_ixgbe_set_vf_rxmode(uint8_t port, uint16_t vf,
+rte_pmd_ixgbe_set_vf_rxmode(uint16_t port, uint16_t vf,
 			    uint16_t rx_mask, uint8_t on)
 {
 	int val = 0;
@@ -389,7 +389,7 @@ rte_pmd_ixgbe_set_vf_rxmode(uint8_t port, uint16_t vf,
 }
 
 int
-rte_pmd_ixgbe_set_vf_rx(uint8_t port, uint16_t vf, uint8_t on)
+rte_pmd_ixgbe_set_vf_rx(uint16_t port, uint16_t vf, uint8_t on)
 {
 	struct rte_eth_dev *dev;
 	struct rte_pci_device *pci_dev;
@@ -439,7 +439,7 @@ rte_pmd_ixgbe_set_vf_rx(uint8_t port, uint16_t vf, uint8_t on)
 }
 
 int
-rte_pmd_ixgbe_set_vf_tx(uint8_t port, uint16_t vf, uint8_t on)
+rte_pmd_ixgbe_set_vf_tx(uint16_t port, uint16_t vf, uint8_t on)
 {
 	struct rte_eth_dev *dev;
 	struct rte_pci_device *pci_dev;
@@ -489,7 +489,7 @@ rte_pmd_ixgbe_set_vf_tx(uint8_t port, uint16_t vf, uint8_t on)
 }
 
 int
-rte_pmd_ixgbe_set_vf_vlan_filter(uint8_t port, uint16_t vlan,
+rte_pmd_ixgbe_set_vf_vlan_filter(uint16_t port, uint16_t vlan,
 				 uint64_t vf_mask, uint8_t vlan_on)
 {
 	struct rte_eth_dev *dev;
@@ -524,7 +524,7 @@ rte_pmd_ixgbe_set_vf_vlan_filter(uint8_t port, uint16_t vlan,
 }
 
 int
-rte_pmd_ixgbe_set_vf_rate_limit(uint8_t port, uint16_t vf,
+rte_pmd_ixgbe_set_vf_rate_limit(uint16_t port, uint16_t vf,
 				uint16_t tx_rate, uint64_t q_msk)
 {
 	struct rte_eth_dev *dev;
@@ -540,7 +540,7 @@ rte_pmd_ixgbe_set_vf_rate_limit(uint8_t port, uint16_t vf,
 }
 
 int
-rte_pmd_ixgbe_macsec_enable(uint8_t port, uint8_t en, uint8_t rp)
+rte_pmd_ixgbe_macsec_enable(uint16_t port, uint8_t en, uint8_t rp)
 {
 	struct ixgbe_hw *hw;
 	struct rte_eth_dev *dev;
@@ -623,7 +623,7 @@ rte_pmd_ixgbe_macsec_enable(uint8_t port, uint8_t en, uint8_t rp)
 }
 
 int
-rte_pmd_ixgbe_macsec_disable(uint8_t port)
+rte_pmd_ixgbe_macsec_disable(uint16_t port)
 {
 	struct ixgbe_hw *hw;
 	struct rte_eth_dev *dev;
@@ -687,7 +687,7 @@ rte_pmd_ixgbe_macsec_disable(uint8_t port)
 }
 
 int
-rte_pmd_ixgbe_macsec_config_txsc(uint8_t port, uint8_t *mac)
+rte_pmd_ixgbe_macsec_config_txsc(uint16_t port, uint8_t *mac)
 {
 	struct ixgbe_hw *hw;
 	struct rte_eth_dev *dev;
@@ -712,7 +712,7 @@ rte_pmd_ixgbe_macsec_config_txsc(uint8_t port, uint8_t *mac)
 }
 
 int
-rte_pmd_ixgbe_macsec_config_rxsc(uint8_t port, uint8_t *mac, uint16_t pi)
+rte_pmd_ixgbe_macsec_config_rxsc(uint16_t port, uint8_t *mac, uint16_t pi)
 {
 	struct ixgbe_hw *hw;
 	struct rte_eth_dev *dev;
@@ -738,7 +738,7 @@ rte_pmd_ixgbe_macsec_config_rxsc(uint8_t port, uint8_t *mac, uint16_t pi)
 }
 
 int
-rte_pmd_ixgbe_macsec_select_txsa(uint8_t port, uint8_t idx, uint8_t an,
+rte_pmd_ixgbe_macsec_select_txsa(uint16_t port, uint8_t idx, uint8_t an,
 				 uint32_t pn, uint8_t *key)
 {
 	struct ixgbe_hw *hw;
@@ -794,7 +794,7 @@ rte_pmd_ixgbe_macsec_select_txsa(uint8_t port, uint8_t idx, uint8_t an,
 }
 
 int
-rte_pmd_ixgbe_macsec_select_rxsa(uint8_t port, uint8_t idx, uint8_t an,
+rte_pmd_ixgbe_macsec_select_rxsa(uint16_t port, uint8_t idx, uint8_t an,
 				 uint32_t pn, uint8_t *key)
 {
 	struct ixgbe_hw *hw;
@@ -837,7 +837,7 @@ rte_pmd_ixgbe_macsec_select_rxsa(uint8_t port, uint8_t idx, uint8_t an,
 }
 
 int
-rte_pmd_ixgbe_set_tc_bw_alloc(uint8_t port,
+rte_pmd_ixgbe_set_tc_bw_alloc(uint16_t port,
 			      uint8_t tc_num,
 			      uint8_t *bw_weight)
 {
@@ -911,7 +911,7 @@ rte_pmd_ixgbe_set_tc_bw_alloc(uint8_t port,
 
 #ifdef RTE_LIBRTE_IXGBE_BYPASS
 int
-rte_pmd_ixgbe_bypass_init(uint8_t port_id)
+rte_pmd_ixgbe_bypass_init(uint16_t port_id)
 {
 	struct rte_eth_dev *dev;
 
@@ -926,7 +926,7 @@ rte_pmd_ixgbe_bypass_init(uint8_t port_id)
 }
 
 int
-rte_pmd_ixgbe_bypass_state_show(uint8_t port_id, uint32_t *state)
+rte_pmd_ixgbe_bypass_state_show(uint16_t port_id, uint32_t *state)
 {
 	struct rte_eth_dev *dev;
 
@@ -940,7 +940,7 @@ rte_pmd_ixgbe_bypass_state_show(uint8_t port_id, uint32_t *state)
 }
 
 int
-rte_pmd_ixgbe_bypass_state_set(uint8_t port_id, uint32_t *new_state)
+rte_pmd_ixgbe_bypass_state_set(uint16_t port_id, uint32_t *new_state)
 {
 	struct rte_eth_dev *dev;
 
@@ -954,7 +954,7 @@ rte_pmd_ixgbe_bypass_state_set(uint8_t port_id, uint32_t *new_state)
 }
 
 int
-rte_pmd_ixgbe_bypass_event_show(uint8_t port_id,
+rte_pmd_ixgbe_bypass_event_show(uint16_t port_id,
 				uint32_t event,
 				uint32_t *state)
 {
@@ -970,7 +970,7 @@ rte_pmd_ixgbe_bypass_event_show(uint8_t port_id,
 }
 
 int
-rte_pmd_ixgbe_bypass_event_store(uint8_t port_id,
+rte_pmd_ixgbe_bypass_event_store(uint16_t port_id,
 				 uint32_t event,
 				 uint32_t state)
 {
@@ -986,7 +986,7 @@ rte_pmd_ixgbe_bypass_event_store(uint8_t port_id,
 }
 
 int
-rte_pmd_ixgbe_bypass_wd_timeout_store(uint8_t port_id, uint32_t timeout)
+rte_pmd_ixgbe_bypass_wd_timeout_store(uint16_t port_id, uint32_t timeout)
 {
 	struct rte_eth_dev *dev;
 
@@ -1000,7 +1000,7 @@ rte_pmd_ixgbe_bypass_wd_timeout_store(uint8_t port_id, uint32_t timeout)
 }
 
 int
-rte_pmd_ixgbe_bypass_ver_show(uint8_t port_id, uint32_t *ver)
+rte_pmd_ixgbe_bypass_ver_show(uint16_t port_id, uint32_t *ver)
 {
 	struct rte_eth_dev *dev;
 
@@ -1014,7 +1014,7 @@ rte_pmd_ixgbe_bypass_ver_show(uint8_t port_id, uint32_t *ver)
 }
 
 int
-rte_pmd_ixgbe_bypass_wd_timeout_show(uint8_t port_id, uint32_t *wd_timeout)
+rte_pmd_ixgbe_bypass_wd_timeout_show(uint16_t port_id, uint32_t *wd_timeout)
 {
 	struct rte_eth_dev *dev;
 
@@ -1028,7 +1028,7 @@ rte_pmd_ixgbe_bypass_wd_timeout_show(uint8_t port_id, uint32_t *wd_timeout)
 }
 
 int
-rte_pmd_ixgbe_bypass_wd_reset(uint8_t port_id)
+rte_pmd_ixgbe_bypass_wd_reset(uint16_t port_id)
 {
 	struct rte_eth_dev *dev;
 
diff --git a/drivers/net/ixgbe/rte_pmd_ixgbe.h b/drivers/net/ixgbe/rte_pmd_ixgbe.h
index d33c285db..81b18f876 100644
--- a/drivers/net/ixgbe/rte_pmd_ixgbe.h
+++ b/drivers/net/ixgbe/rte_pmd_ixgbe.h
@@ -53,7 +53,7 @@
  *   - (-ENODEV) if *port* invalid.
  *   - (-EINVAL) if *vf* invalid.
  */
-int rte_pmd_ixgbe_ping_vf(uint8_t port, uint16_t vf);
+int rte_pmd_ixgbe_ping_vf(uint16_t port, uint16_t vf);
 
 /**
  * Set the VF MAC address.
@@ -69,7 +69,7 @@ int rte_pmd_ixgbe_ping_vf(uint8_t port, uint16_t vf);
  *   - (-ENODEV) if *port* invalid.
  *   - (-EINVAL) if *vf* or *mac_addr* is invalid.
  */
-int rte_pmd_ixgbe_set_vf_mac_addr(uint8_t port, uint16_t vf,
+int rte_pmd_ixgbe_set_vf_mac_addr(uint16_t port, uint16_t vf,
 		struct ether_addr *mac_addr);
 
 /**
@@ -87,7 +87,8 @@ int rte_pmd_ixgbe_set_vf_mac_addr(uint8_t port, uint16_t vf,
  *   - (-ENODEV) if *port* invalid.
  *   - (-EINVAL) if bad parameter.
  */
-int rte_pmd_ixgbe_set_vf_vlan_anti_spoof(uint8_t port, uint16_t vf, uint8_t on);
+int rte_pmd_ixgbe_set_vf_vlan_anti_spoof(uint16_t port, uint16_t vf,
+					 uint8_t on);
 
 /**
  * Enable/Disable VF MAC anti spoofing.
@@ -104,7 +105,7 @@ int rte_pmd_ixgbe_set_vf_vlan_anti_spoof(uint8_t port, uint16_t vf, uint8_t on);
  *   - (-ENODEV) if *port* invalid.
  *   - (-EINVAL) if bad parameter.
  */
-int rte_pmd_ixgbe_set_vf_mac_anti_spoof(uint8_t port, uint16_t vf, uint8_t on);
+int rte_pmd_ixgbe_set_vf_mac_anti_spoof(uint16_t port, uint16_t vf, uint8_t on);
 
 /**
  * Enable/Disable vf vlan insert
@@ -122,7 +123,7 @@ int rte_pmd_ixgbe_set_vf_mac_anti_spoof(uint8_t port, uint16_t vf, uint8_t on);
  *   - (-ENODEV) if *port* invalid.
  *   - (-EINVAL) if bad parameter.
  */
-int rte_pmd_ixgbe_set_vf_vlan_insert(uint8_t port, uint16_t vf,
+int rte_pmd_ixgbe_set_vf_vlan_insert(uint16_t port, uint16_t vf,
 		uint16_t vlan_id);
 
 /**
@@ -139,7 +140,7 @@ int rte_pmd_ixgbe_set_vf_vlan_insert(uint8_t port, uint16_t vf,
  *   - (-ENODEV) if *port* invalid.
  *   - (-EINVAL) if bad parameter.
  */
-int rte_pmd_ixgbe_set_tx_loopback(uint8_t port, uint8_t on);
+int rte_pmd_ixgbe_set_tx_loopback(uint16_t port, uint8_t on);
 
 /**
  * set all queues drop enable bit
@@ -155,7 +156,7 @@ int rte_pmd_ixgbe_set_tx_loopback(uint8_t port, uint8_t on);
  *   - (-ENODEV) if *port* invalid.
  *   - (-EINVAL) if bad parameter.
  */
-int rte_pmd_ixgbe_set_all_queues_drop_en(uint8_t port, uint8_t on);
+int rte_pmd_ixgbe_set_all_queues_drop_en(uint16_t port, uint8_t on);
 
 /**
  * set drop enable bit in the VF split rx control register
@@ -174,7 +175,7 @@ int rte_pmd_ixgbe_set_all_queues_drop_en(uint8_t port, uint8_t on);
  *   - (-EINVAL) if bad parameter.
  */
 
-int rte_pmd_ixgbe_set_vf_split_drop_en(uint8_t port, uint16_t vf, uint8_t on);
+int rte_pmd_ixgbe_set_vf_split_drop_en(uint16_t port, uint16_t vf, uint8_t on);
 
 /**
  * Enable/Disable vf vlan strip for all queues in a pool
@@ -194,7 +195,7 @@ int rte_pmd_ixgbe_set_vf_split_drop_en(uint8_t port, uint16_t vf, uint8_t on);
  *   - (-EINVAL) if bad parameter.
  */
 int
-rte_pmd_ixgbe_set_vf_vlan_stripq(uint8_t port, uint16_t vf, uint8_t on);
+rte_pmd_ixgbe_set_vf_vlan_stripq(uint16_t port, uint16_t vf, uint8_t on);
 
 /**
  * Enable MACsec offload.
@@ -212,7 +213,7 @@ rte_pmd_ixgbe_set_vf_vlan_stripq(uint8_t port, uint16_t vf, uint8_t on);
  *   - (-ENODEV) if *port* invalid.
  *   - (-ENOTSUP) if hardware doesn't support this feature.
  */
-int rte_pmd_ixgbe_macsec_enable(uint8_t port, uint8_t en, uint8_t rp);
+int rte_pmd_ixgbe_macsec_enable(uint16_t port, uint8_t en, uint8_t rp);
 
 /**
  * Disable MACsec offload.
@@ -224,7 +225,7 @@ int rte_pmd_ixgbe_macsec_enable(uint8_t port, uint8_t en, uint8_t rp);
  *   - (-ENODEV) if *port* invalid.
  *   - (-ENOTSUP) if hardware doesn't support this feature.
  */
-int rte_pmd_ixgbe_macsec_disable(uint8_t port);
+int rte_pmd_ixgbe_macsec_disable(uint16_t port);
 
 /**
  * Configure Tx SC (Secure Connection).
@@ -238,7 +239,7 @@ int rte_pmd_ixgbe_macsec_disable(uint8_t port);
  *   - (-ENODEV) if *port* invalid.
  *   - (-ENOTSUP) if hardware doesn't support this feature.
  */
-int rte_pmd_ixgbe_macsec_config_txsc(uint8_t port, uint8_t *mac);
+int rte_pmd_ixgbe_macsec_config_txsc(uint16_t port, uint8_t *mac);
 
 /**
  * Configure Rx SC (Secure Connection).
@@ -254,7 +255,7 @@ int rte_pmd_ixgbe_macsec_config_txsc(uint8_t port, uint8_t *mac);
  *   - (-ENODEV) if *port* invalid.
  *   - (-ENOTSUP) if hardware doesn't support this feature.
  */
-int rte_pmd_ixgbe_macsec_config_rxsc(uint8_t port, uint8_t *mac, uint16_t pi);
+int rte_pmd_ixgbe_macsec_config_rxsc(uint16_t port, uint8_t *mac, uint16_t pi);
 
 /**
  * Enable Tx SA (Secure Association).
@@ -275,7 +276,7 @@ int rte_pmd_ixgbe_macsec_config_rxsc(uint8_t port, uint8_t *mac, uint16_t pi);
  *   - (-ENOTSUP) if hardware doesn't support this feature.
  *   - (-EINVAL) if bad parameter.
  */
-int rte_pmd_ixgbe_macsec_select_txsa(uint8_t port, uint8_t idx, uint8_t an,
+int rte_pmd_ixgbe_macsec_select_txsa(uint16_t port, uint8_t idx, uint8_t an,
 		uint32_t pn, uint8_t *key);
 
 /**
@@ -297,7 +298,7 @@ int rte_pmd_ixgbe_macsec_select_txsa(uint8_t port, uint8_t idx, uint8_t an,
  *   - (-ENOTSUP) if hardware doesn't support this feature.
  *   - (-EINVAL) if bad parameter.
  */
-int rte_pmd_ixgbe_macsec_select_rxsa(uint8_t port, uint8_t idx, uint8_t an,
+int rte_pmd_ixgbe_macsec_select_rxsa(uint16_t port, uint8_t idx, uint8_t an,
 		uint32_t pn, uint8_t *key);
 
 /**
@@ -323,7 +324,8 @@ int rte_pmd_ixgbe_macsec_select_rxsa(uint8_t port, uint8_t idx, uint8_t an,
 *   - (-EINVAL) if bad parameter.
 */
 int
-rte_pmd_ixgbe_set_vf_rxmode(uint8_t port, uint16_t vf, uint16_t rx_mask, uint8_t on);
+rte_pmd_ixgbe_set_vf_rxmode(uint16_t port, uint16_t vf, uint16_t rx_mask,
+			     uint8_t on);
 
 /**
 * Enable or disable a VF traffic receive of an Ethernet device.
@@ -342,7 +344,7 @@ rte_pmd_ixgbe_set_vf_rxmode(uint8_t port, uint16_t vf, uint16_t rx_mask, uint8_t
 *   - (-EINVAL) if bad parameter.
 */
 int
-rte_pmd_ixgbe_set_vf_rx(uint8_t port, uint16_t vf, uint8_t on);
+rte_pmd_ixgbe_set_vf_rx(uint16_t port, uint16_t vf, uint8_t on);
 
 /**
 * Enable or disable a VF traffic transmit of the Ethernet device.
@@ -361,7 +363,7 @@ rte_pmd_ixgbe_set_vf_rx(uint8_t port, uint16_t vf, uint8_t on);
 *   - (-EINVAL) if bad parameter.
 */
 int
-rte_pmd_ixgbe_set_vf_tx(uint8_t port, uint16_t vf, uint8_t on);
+rte_pmd_ixgbe_set_vf_tx(uint16_t port, uint16_t vf, uint8_t on);
 
 /**
 * Enable/Disable hardware VF VLAN filtering by an Ethernet device of
@@ -383,7 +385,8 @@ rte_pmd_ixgbe_set_vf_tx(uint8_t port, uint16_t vf, uint8_t on);
 *   - (-EINVAL) if bad parameter.
 */
 int
-rte_pmd_ixgbe_set_vf_vlan_filter(uint8_t port, uint16_t vlan, uint64_t vf_mask, uint8_t vlan_on);
+rte_pmd_ixgbe_set_vf_vlan_filter(uint16_t port, uint16_t vlan,
+				 uint64_t vf_mask, uint8_t vlan_on);
 
 /**
  * Set the rate limitation for a vf on an Ethernet device.
@@ -402,7 +405,8 @@ rte_pmd_ixgbe_set_vf_vlan_filter(uint8_t port, uint16_t vlan, uint64_t vf_mask,
  *   - (-ENODEV) if *port_id* invalid.
  *   - (-EINVAL) if bad parameter.
  */
-int rte_pmd_ixgbe_set_vf_rate_limit(uint8_t port, uint16_t vf, uint16_t tx_rate, uint64_t q_msk);
+int rte_pmd_ixgbe_set_vf_rate_limit(uint16_t port, uint16_t vf,
+				     uint16_t tx_rate, uint64_t q_msk);
 
 /**
  * Set all the TCs' bandwidth weight.
@@ -423,7 +427,7 @@ int rte_pmd_ixgbe_set_vf_rate_limit(uint8_t port, uint16_t vf, uint16_t tx_rate,
  *   - (-EINVAL) if bad parameter.
  *   - (-ENOTSUP) not supported by firmware.
  */
-int rte_pmd_ixgbe_set_tc_bw_alloc(uint8_t port,
+int rte_pmd_ixgbe_set_tc_bw_alloc(uint16_t port,
 				  uint8_t tc_num,
 				  uint8_t *bw_weight);
 
@@ -439,7 +443,7 @@ int rte_pmd_ixgbe_set_tc_bw_alloc(uint8_t port,
  *   - (-ENOTSUP) if hardware doesn't support.
  *   - (-EINVAL) if bad parameter.
  */
-int rte_pmd_ixgbe_bypass_init(uint8_t port);
+int rte_pmd_ixgbe_bypass_init(uint16_t port);
 
 /**
  * Return bypass state.
@@ -456,7 +460,7 @@ int rte_pmd_ixgbe_bypass_init(uint8_t port);
  *   - (-ENOTSUP) if hardware doesn't support.
  *   - (-EINVAL) if bad parameter.
  */
-int rte_pmd_ixgbe_bypass_state_show(uint8_t port, uint32_t *state);
+int rte_pmd_ixgbe_bypass_state_show(uint16_t port, uint32_t *state);
 
 /**
  * Set bypass state
@@ -473,7 +477,7 @@ int rte_pmd_ixgbe_bypass_state_show(uint8_t port, uint32_t *state);
  *   - (-ENOTSUP) if hardware doesn't support.
  *   - (-EINVAL) if bad parameter.
  */
-int rte_pmd_ixgbe_bypass_state_set(uint8_t port, uint32_t *new_state);
+int rte_pmd_ixgbe_bypass_state_set(uint16_t port, uint32_t *new_state);
 
 /**
  * Return bypass state when given event occurs.
@@ -497,7 +501,7 @@ int rte_pmd_ixgbe_bypass_state_set(uint8_t port, uint32_t *new_state);
  *   - (-ENOTSUP) if hardware doesn't support.
  *   - (-EINVAL) if bad parameter.
  */
-int rte_pmd_ixgbe_bypass_event_show(uint8_t port,
+int rte_pmd_ixgbe_bypass_event_show(uint16_t port,
 				    uint32_t event,
 				    uint32_t *state);
 
@@ -523,7 +527,7 @@ int rte_pmd_ixgbe_bypass_event_show(uint8_t port,
  *   - (-ENOTSUP) if hardware doesn't support.
  *   - (-EINVAL) if bad parameter.
  */
-int rte_pmd_ixgbe_bypass_event_store(uint8_t port,
+int rte_pmd_ixgbe_bypass_event_store(uint16_t port,
 				     uint32_t event,
 				     uint32_t state);
 
@@ -547,7 +551,7 @@ int rte_pmd_ixgbe_bypass_event_store(uint8_t port,
  *   - (-ENOTSUP) if hardware doesn't support.
  *   - (-EINVAL) if bad parameter.
  */
-int rte_pmd_ixgbe_bypass_wd_timeout_store(uint8_t port, uint32_t timeout);
+int rte_pmd_ixgbe_bypass_wd_timeout_store(uint16_t port, uint32_t timeout);
 
 /**
  * Get bypass firmware version.
@@ -561,7 +565,7 @@ int rte_pmd_ixgbe_bypass_wd_timeout_store(uint8_t port, uint32_t timeout);
  *   - (-ENOTSUP) if hardware doesn't support.
  *   - (-EINVAL) if bad parameter.
  */
-int rte_pmd_ixgbe_bypass_ver_show(uint8_t port, uint32_t *ver);
+int rte_pmd_ixgbe_bypass_ver_show(uint16_t port, uint32_t *ver);
 
 /**
  * Return bypass watchdog timeout in seconds
@@ -583,7 +587,7 @@ int rte_pmd_ixgbe_bypass_ver_show(uint8_t port, uint32_t *ver);
  *   - (-ENOTSUP) if hardware doesn't support.
  *   - (-EINVAL) if bad parameter.
  */
-int rte_pmd_ixgbe_bypass_wd_timeout_show(uint8_t port, uint32_t *wd_timeout);
+int rte_pmd_ixgbe_bypass_wd_timeout_show(uint16_t port, uint32_t *wd_timeout);
 
 /**
  * Reset bypass watchdog timer
@@ -595,7 +599,7 @@ int rte_pmd_ixgbe_bypass_wd_timeout_show(uint8_t port, uint32_t *wd_timeout);
  *   - (-ENOTSUP) if hardware doesn't support.
  *   - (-EINVAL) if bad parameter.
  */
-int rte_pmd_ixgbe_bypass_wd_reset(uint8_t port);
+int rte_pmd_ixgbe_bypass_wd_reset(uint16_t port);
 
 
 /**
diff --git a/drivers/net/mlx5/mlx5_rxtx.h b/drivers/net/mlx5/mlx5_rxtx.h
index 7de1d1086..238a64f43 100644
--- a/drivers/net/mlx5/mlx5_rxtx.h
+++ b/drivers/net/mlx5/mlx5_rxtx.h
@@ -112,14 +112,14 @@ struct rxq {
 	unsigned int sges_n:2; /* Log 2 of SGEs (max buffers per packet). */
 	unsigned int cqe_n:4; /* Log 2 of CQ elements. */
 	unsigned int elts_n:4; /* Log 2 of Mbufs. */
-	unsigned int port_id:8;
 	unsigned int rss_hash:1; /* RSS hash result is enabled. */
 	unsigned int mark:1; /* Marked flow available on the queue. */
 	unsigned int pending_err:1; /* CQE error needs to be handled. */
 	unsigned int trim_elts:1; /* Whether elts needs clean-up. */
-	unsigned int :6; /* Remaining bits. */
+	unsigned int :14; /* Remaining bits. */
 	volatile uint32_t *rq_db;
 	volatile uint32_t *cq_db;
+	uint16_t port_id;
 	uint16_t rq_ci;
 	uint16_t rq_pi;
 	uint16_t cq_ci;
diff --git a/drivers/net/nfp/nfp_net.c b/drivers/net/nfp/nfp_net.c
index 92b03c4cb..f1b968fc2 100644
--- a/drivers/net/nfp/nfp_net.c
+++ b/drivers/net/nfp/nfp_net.c
@@ -1240,12 +1240,12 @@ nfp_net_dev_link_status_print(struct rte_eth_dev *dev)
 	nfp_net_dev_atomic_read_link_status(dev, &link);
 	if (link.link_status)
 		RTE_LOG(INFO, PMD, "Port %d: Link Up - speed %u Mbps - %s\n",
-			(int)(dev->data->port_id), (unsigned)link.link_speed,
+			dev->data->port_id, link.link_speed,
 			link.link_duplex == ETH_LINK_FULL_DUPLEX
 			? "full-duplex" : "half-duplex");
 	else
 		RTE_LOG(INFO, PMD, " Port %d: Link Down\n",
-			(int)(dev->data->port_id));
+			dev->data->port_id);
 
 	RTE_LOG(INFO, PMD, "PCI Address: %04d:%02d:%02d:%d\n",
 		pci_dev->addr.domain, pci_dev->addr.bus,
@@ -1549,7 +1549,7 @@ nfp_net_tx_queue_setup(struct rte_eth_dev *dev, uint16_t queue_idx,
 			"tx_free_thresh must be less than the number of TX "
 			"descriptors. (tx_free_thresh=%u port=%d "
 			"queue=%d)\n", (unsigned int)tx_free_thresh,
-			(int)dev->data->port_id, (int)queue_idx);
+			dev->data->port_id, (int)queue_idx);
 		return -(EINVAL);
 	}
 
@@ -1847,9 +1847,9 @@ nfp_net_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts, uint16_t nb_pkts)
 		 */
 		new_mb = rte_pktmbuf_alloc(rxq->mem_pool);
 		if (unlikely(new_mb == NULL)) {
-			RTE_LOG_DP(DEBUG, PMD, "RX mbuf alloc failed port_id=%u "
-				"queue_id=%u\n", (unsigned)rxq->port_id,
-				(unsigned)rxq->qidx);
+			RTE_LOG_DP(DEBUG, PMD,
+			"RX mbuf alloc failed port_id=%u queue_id=%u\n",
+				rxq->port_id, (unsigned int)rxq->qidx);
 			nfp_net_mbuf_alloc_failed(rxq);
 			break;
 		}
@@ -1933,7 +1933,7 @@ nfp_net_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts, uint16_t nb_pkts)
 		return nb_hold;
 
 	PMD_RX_LOG(DEBUG, "RX  port_id=%u queue_id=%u, %d packets received\n",
-		   (unsigned)rxq->port_id, (unsigned)rxq->qidx, nb_hold);
+		   rxq->port_id, (unsigned int)rxq->qidx, nb_hold);
 
 	nb_hold += rxq->nb_rx_hold;
 
@@ -1944,7 +1944,7 @@ nfp_net_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts, uint16_t nb_pkts)
 	rte_wmb();
 	if (nb_hold > rxq->rx_free_thresh) {
 		PMD_RX_LOG(DEBUG, "port=%u queue=%u nb_hold=%u avail=%u\n",
-			   (unsigned)rxq->port_id, (unsigned)rxq->qidx,
+			   rxq->port_id, (unsigned int)rxq->qidx,
 			   (unsigned)nb_hold, (unsigned)avail);
 		nfp_qcp_ptr_add(rxq->qcp_fl, NFP_QCP_WRITE_PTR, nb_hold);
 		nb_hold = 0;
diff --git a/drivers/net/nfp/nfp_net_pmd.h b/drivers/net/nfp/nfp_net_pmd.h
index eec56bc1c..828d0d35b 100644
--- a/drivers/net/nfp/nfp_net_pmd.h
+++ b/drivers/net/nfp/nfp_net_pmd.h
@@ -250,7 +250,7 @@ struct nfp_net_txq {
 	uint32_t tx_hthresh;   /* not used by now. Future? */
 	uint32_t tx_wthresh;   /* not used by now. Future? */
 	uint32_t txq_flags;    /* not used by now. Future? */
-	uint8_t  port_id;
+	uint16_t port_id;
 	int qidx;
 	int tx_qcidx;
 	__le64 dma;
diff --git a/drivers/net/null/rte_eth_null.c b/drivers/net/null/rte_eth_null.c
index 5aef0591e..fa9313dec 100644
--- a/drivers/net/null/rte_eth_null.c
+++ b/drivers/net/null/rte_eth_null.c
@@ -68,7 +68,7 @@ struct null_queue {
 struct pmd_internals {
 	unsigned packet_size;
 	unsigned packet_copy;
-	uint8_t port_id;
+	uint16_t port_id;
 
 	struct null_queue rx_null_queues[RTE_MAX_QUEUES_PER_PORT];
 	struct null_queue tx_null_queues[RTE_MAX_QUEUES_PER_PORT];
diff --git a/drivers/net/pcap/rte_eth_pcap.c b/drivers/net/pcap/rte_eth_pcap.c
index defb3b419..b51f16cbd 100644
--- a/drivers/net/pcap/rte_eth_pcap.c
+++ b/drivers/net/pcap/rte_eth_pcap.c
@@ -75,7 +75,7 @@ struct queue_stat {
 
 struct pcap_rx_queue {
 	pcap_t *pcap;
-	uint8_t in_port;
+	uint16_t in_port;
 	struct rte_mempool *mb_pool;
 	struct queue_stat rx_stat;
 	char name[PATH_MAX];
diff --git a/drivers/net/qede/qede_if.h b/drivers/net/qede/qede_if.h
index 9864bb448..96f0d351d 100644
--- a/drivers/net/qede/qede_if.h
+++ b/drivers/net/qede/qede_if.h
@@ -97,7 +97,7 @@ struct qed_link_output {
 	uint32_t speed;		/* In Mb/s */
 	uint32_t adv_speed;	/* Speed mask */
 	uint8_t duplex;		/* In DUPLEX defs */
-	uint8_t port;		/* In PORT defs */
+	uint16_t port;		/* In PORT defs */
 	bool autoneg;
 	uint32_t pause_config;
 };
diff --git a/drivers/net/ring/rte_eth_ring.c b/drivers/net/ring/rte_eth_ring.c
index 464d3d384..e3fa7b0e2 100644
--- a/drivers/net/ring/rte_eth_ring.c
+++ b/drivers/net/ring/rte_eth_ring.c
@@ -394,7 +394,7 @@ rte_eth_from_rings(const char *name, struct rte_ring *const rx_queues[],
 	};
 	char args_str[32] = { 0 };
 	char ring_name[32] = { 0 };
-	uint8_t port_id = RTE_MAX_ETHPORTS;
+	uint16_t port_id = RTE_MAX_ETHPORTS;
 	int ret;
 
 	/* do some parameter checking */
diff --git a/drivers/net/szedata2/rte_eth_szedata2.c b/drivers/net/szedata2/rte_eth_szedata2.c
index 9c0d57cc1..d141acf0e 100644
--- a/drivers/net/szedata2/rte_eth_szedata2.c
+++ b/drivers/net/szedata2/rte_eth_szedata2.c
@@ -71,7 +71,7 @@
 struct szedata2_rx_queue {
 	struct szedata *sze;
 	uint8_t rx_channel;
-	uint8_t in_port;
+	uint16_t in_port;
 	struct rte_mempool *mb_pool;
 	volatile uint64_t rx_pkts;
 	volatile uint64_t rx_bytes;
diff --git a/drivers/net/thunderx/nicvf_struct.h b/drivers/net/thunderx/nicvf_struct.h
index 4ee6c3bb0..e54a96f8e 100644
--- a/drivers/net/thunderx/nicvf_struct.h
+++ b/drivers/net/thunderx/nicvf_struct.h
@@ -100,7 +100,7 @@ struct nicvf_rxq {
 	uint16_t queue_id;
 	uint16_t precharge_cnt;
 	uint8_t rx_drop_en;
-	uint8_t  port_id;
+	uint16_t port_id;
 	uint8_t  rbptr_offset;
 } __rte_cache_aligned;
 
diff --git a/drivers/net/vhost/Makefile b/drivers/net/vhost/Makefile
index 3ba8ad64f..258a917c7 100644
--- a/drivers/net/vhost/Makefile
+++ b/drivers/net/vhost/Makefile
@@ -43,7 +43,7 @@ CFLAGS += $(WERROR_FLAGS)
 
 EXPORT_MAP := rte_pmd_vhost_version.map
 
-LIBABIVER := 1
+LIBABIVER := 2
 
 #
 # all source are stored in SRCS-y
diff --git a/drivers/net/vhost/rte_eth_vhost.c b/drivers/net/vhost/rte_eth_vhost.c
index 0dac5e60e..04179b4db 100644
--- a/drivers/net/vhost/rte_eth_vhost.c
+++ b/drivers/net/vhost/rte_eth_vhost.c
@@ -105,7 +105,7 @@ struct vhost_queue {
 	rte_atomic32_t while_queuing;
 	struct pmd_internal *internal;
 	struct rte_mempool *mb_pool;
-	uint8_t port;
+	uint16_t port;
 	uint16_t virtqueue_id;
 	struct vhost_stats stats;
 };
@@ -705,7 +705,7 @@ static struct vhost_device_ops vhost_ops = {
 };
 
 int
-rte_eth_vhost_get_queue_event(uint8_t port_id,
+rte_eth_vhost_get_queue_event(uint16_t port_id,
 		struct rte_eth_vhost_queue_event *event)
 {
 	struct rte_vhost_vring_state *state;
@@ -742,7 +742,7 @@ rte_eth_vhost_get_queue_event(uint8_t port_id,
 }
 
 int
-rte_eth_vhost_get_vid_from_port_id(uint8_t port_id)
+rte_eth_vhost_get_vid_from_port_id(uint16_t port_id)
 {
 	struct internal_list *list;
 	struct rte_eth_dev *eth_dev;
diff --git a/drivers/net/vhost/rte_eth_vhost.h b/drivers/net/vhost/rte_eth_vhost.h
index 39ca77197..948f3c810 100644
--- a/drivers/net/vhost/rte_eth_vhost.h
+++ b/drivers/net/vhost/rte_eth_vhost.h
@@ -69,7 +69,7 @@ struct rte_eth_vhost_queue_event {
  *  - On success, zero.
  *  - On failure, a negative value.
  */
-int rte_eth_vhost_get_queue_event(uint8_t port_id,
+int rte_eth_vhost_get_queue_event(uint16_t port_id,
 		struct rte_eth_vhost_queue_event *event);
 
 /**
@@ -79,7 +79,7 @@ int rte_eth_vhost_get_queue_event(uint8_t port_id,
  *  - On success, the 'vid' associated with 'port_id'.
  *  - On failure, a negative value.
  */
-int rte_eth_vhost_get_vid_from_port_id(uint8_t port_id);
+int rte_eth_vhost_get_vid_from_port_id(uint16_t port_id);
 
 #ifdef __cplusplus
 }
diff --git a/drivers/net/virtio/virtio_pci.h b/drivers/net/virtio/virtio_pci.h
index 18caebdd7..330ee94be 100644
--- a/drivers/net/virtio/virtio_pci.h
+++ b/drivers/net/virtio/virtio_pci.h
@@ -260,7 +260,7 @@ struct virtio_hw {
 	uint8_t	    use_msix;
 	uint8_t     modern;
 	uint8_t     use_simple_rxtx;
-	uint8_t     port_id;
+	uint16_t    port_id;
 	uint8_t     mac_addr[ETHER_ADDR_LEN];
 	uint32_t    notify_off_multiplier;
 	uint8_t     *isr;
diff --git a/drivers/net/virtio/virtio_rxtx.h b/drivers/net/virtio/virtio_rxtx.h
index 28f82d6a8..198b2d8fb 100644
--- a/drivers/net/virtio/virtio_rxtx.h
+++ b/drivers/net/virtio/virtio_rxtx.h
@@ -54,7 +54,7 @@ struct virtnet_rx {
 	struct rte_mempool *mpool; /**< mempool for mbuf allocation */
 
 	uint16_t queue_id;   /**< DPDK queue index. */
-	uint8_t port_id;     /**< Device port identifier. */
+	uint16_t port_id;     /**< Device port identifier. */
 
 	/* Statistics */
 	struct virtnet_stats stats;
@@ -69,7 +69,7 @@ struct virtnet_tx {
 	phys_addr_t virtio_net_hdr_mem;  /**< hdr for each xmit packet */
 
 	uint16_t    queue_id;            /**< DPDK queue index. */
-	uint8_t     port_id;             /**< Device port identifier. */
+	uint16_t    port_id;             /**< Device port identifier. */
 
 	/* Statistics */
 	struct virtnet_stats stats;
@@ -82,7 +82,7 @@ struct virtnet_ctl {
 	/**< memzone to populate hdr. */
 	const struct rte_memzone *virtio_net_hdr_mz;
 	phys_addr_t virtio_net_hdr_mem; /**< hdr for each xmit packet */
-	uint8_t port_id;                /**< Device port identifier. */
+	uint16_t port_id;               /**< Device port identifier. */
 	const struct rte_memzone *mz;   /**< mem zone to populate RX ring. */
 };
 
diff --git a/drivers/net/vmxnet3/vmxnet3_ring.h b/drivers/net/vmxnet3/vmxnet3_ring.h
index d2e8323ba..a6fa93ac7 100644
--- a/drivers/net/vmxnet3/vmxnet3_ring.h
+++ b/drivers/net/vmxnet3/vmxnet3_ring.h
@@ -144,7 +144,7 @@ typedef struct vmxnet3_tx_queue {
 	const struct rte_memzone     *mz;
 	bool                         stopped;
 	uint16_t                     queue_id;      /**< Device TX queue index. */
-	uint8_t                      port_id;       /**< Device port identifier. */
+	uint16_t                     port_id;       /**< Device port identifier. */
 	uint16_t		     txdata_desc_size;
 } vmxnet3_tx_queue_t;
 
@@ -179,7 +179,7 @@ typedef struct vmxnet3_rx_queue {
 	const struct rte_memzone    *mz;
 	bool                        stopped;
 	uint16_t                    queue_id;      /**< Device RX queue index. */
-	uint8_t                     port_id;       /**< Device port identifier. */
+	uint16_t                    port_id;       /**< Device port identifier. */
 } vmxnet3_rx_queue_t;
 
 #endif /* _VMXNET3_RING_H_ */
diff --git a/lib/librte_bitratestats/Makefile b/lib/librte_bitratestats/Makefile
index 58a20ea09..a079cced7 100644
--- a/lib/librte_bitratestats/Makefile
+++ b/lib/librte_bitratestats/Makefile
@@ -38,7 +38,7 @@ CFLAGS += $(WERROR_FLAGS) -I$(SRCDIR) -O3
 
 EXPORT_MAP := rte_bitratestats_version.map
 
-LIBABIVER := 1
+LIBABIVER := 2
 
 # all source are stored in SRCS-y
 SRCS-$(CONFIG_RTE_LIBRTE_BITRATE) := rte_bitrate.c
diff --git a/lib/librte_bitratestats/rte_bitrate.c b/lib/librte_bitratestats/rte_bitrate.c
index 3ceb35166..f373697a7 100644
--- a/lib/librte_bitratestats/rte_bitrate.c
+++ b/lib/librte_bitratestats/rte_bitrate.c
@@ -84,7 +84,7 @@ rte_stats_bitrate_reg(struct rte_stats_bitrates *bitrate_data)
 
 int
 rte_stats_bitrate_calc(struct rte_stats_bitrates *bitrate_data,
-	uint8_t port_id)
+			uint16_t port_id)
 {
 	struct rte_stats_bitrate *port_data;
 	struct rte_eth_stats eth_stats;
diff --git a/lib/librte_bitratestats/rte_bitrate.h b/lib/librte_bitratestats/rte_bitrate.h
index 15fc270a3..16467221b 100644
--- a/lib/librte_bitratestats/rte_bitrate.h
+++ b/lib/librte_bitratestats/rte_bitrate.h
@@ -85,7 +85,7 @@ int rte_stats_bitrate_reg(struct rte_stats_bitrates *bitrate_data);
  *  - Negative value on error
  */
 int rte_stats_bitrate_calc(struct rte_stats_bitrates *bitrate_data,
-	uint8_t port_id);
+			   uint16_t port_id);
 
 #ifdef __cplusplus
 }
diff --git a/lib/librte_ether/Makefile b/lib/librte_ether/Makefile
index 201cb96fc..edcddf70d 100644
--- a/lib/librte_ether/Makefile
+++ b/lib/librte_ether/Makefile
@@ -41,7 +41,7 @@ CFLAGS += $(WERROR_FLAGS)
 
 EXPORT_MAP := rte_ethdev_version.map
 
-LIBABIVER := 7
+LIBABIVER := 8
 
 SRCS-y += rte_ethdev.c
 SRCS-y += rte_flow.c
diff --git a/lib/librte_ether/rte_ethdev.c b/lib/librte_ether/rte_ethdev.c
index 1849a3bdd..0779c0d08 100644
--- a/lib/librte_ether/rte_ethdev.c
+++ b/lib/librte_ether/rte_ethdev.c
@@ -139,8 +139,8 @@ enum {
 	STAT_QMAP_RX
 };
 
-uint8_t
-rte_eth_find_next(uint8_t port_id)
+uint16_t
+rte_eth_find_next(uint16_t port_id)
 {
 	while (port_id < RTE_MAX_ETHPORTS &&
 	       rte_eth_devices[port_id].state != RTE_ETH_DEV_ATTACHED)
@@ -188,7 +188,7 @@ rte_eth_dev_allocated(const char *name)
 	return NULL;
 }
 
-static uint8_t
+static uint16_t
 rte_eth_dev_find_free_port(void)
 {
 	unsigned i;
@@ -201,7 +201,7 @@ rte_eth_dev_find_free_port(void)
 }
 
 static struct rte_eth_dev *
-eth_dev_get(uint8_t port_id)
+eth_dev_get(uint16_t port_id)
 {
 	struct rte_eth_dev *eth_dev = &rte_eth_devices[port_id];
 
@@ -217,7 +217,7 @@ eth_dev_get(uint8_t port_id)
 struct rte_eth_dev *
 rte_eth_dev_allocate(const char *name)
 {
-	uint8_t port_id;
+	uint16_t port_id;
 	struct rte_eth_dev *eth_dev;
 
 	port_id = rte_eth_dev_find_free_port();
@@ -252,7 +252,7 @@ rte_eth_dev_allocate(const char *name)
 struct rte_eth_dev *
 rte_eth_dev_attach_secondary(const char *name)
 {
-	uint8_t i;
+	uint16_t i;
 	struct rte_eth_dev *eth_dev;
 
 	if (rte_eth_dev_data == NULL)
@@ -286,7 +286,7 @@ rte_eth_dev_release_port(struct rte_eth_dev *eth_dev)
 }
 
 int
-rte_eth_dev_is_valid_port(uint8_t port_id)
+rte_eth_dev_is_valid_port(uint16_t port_id)
 {
 	if (port_id >= RTE_MAX_ETHPORTS ||
 	    (rte_eth_devices[port_id].state != RTE_ETH_DEV_ATTACHED &&
@@ -297,17 +297,17 @@ rte_eth_dev_is_valid_port(uint8_t port_id)
 }
 
 int
-rte_eth_dev_socket_id(uint8_t port_id)
+rte_eth_dev_socket_id(uint16_t port_id)
 {
 	RTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -1);
 	return rte_eth_devices[port_id].data->numa_node;
 }
 
-uint8_t
+uint16_t
 rte_eth_dev_count(void)
 {
-	uint8_t p;
-	uint8_t count;
+	uint16_t p;
+	uint16_t count;
 
 	count = 0;
 
@@ -318,7 +318,7 @@ rte_eth_dev_count(void)
 }
 
 int
-rte_eth_dev_get_name_by_port(uint8_t port_id, char *name)
+rte_eth_dev_get_name_by_port(uint16_t port_id, char *name)
 {
 	const char *tmp;
 
@@ -337,7 +337,7 @@ rte_eth_dev_get_name_by_port(uint8_t port_id, char *name)
 }
 
 int
-rte_eth_dev_get_port_by_name(const char *name, uint8_t *port_id)
+rte_eth_dev_get_port_by_name(const char *name, uint16_t *port_id)
 {
 	int ret;
 	int i;
@@ -362,7 +362,7 @@ rte_eth_dev_get_port_by_name(const char *name, uint8_t *port_id)
 }
 
 static int
-rte_eth_dev_is_detachable(uint8_t port_id)
+rte_eth_dev_is_detachable(uint16_t port_id)
 {
 	uint32_t dev_flags;
 
@@ -378,7 +378,7 @@ rte_eth_dev_is_detachable(uint8_t port_id)
 
 /* attach the new device, then store port_id of the device */
 int
-rte_eth_dev_attach(const char *devargs, uint8_t *port_id)
+rte_eth_dev_attach(const char *devargs, uint16_t *port_id)
 {
 	int ret = -1;
 	int current = rte_eth_dev_count();
@@ -424,7 +424,7 @@ rte_eth_dev_attach(const char *devargs, uint8_t *port_id)
 
 /* detach the device, then store the name of the device */
 int
-rte_eth_dev_detach(uint8_t port_id, char *name)
+rte_eth_dev_detach(uint16_t port_id, char *name)
 {
 	int ret = -1;
 
@@ -502,7 +502,7 @@ rte_eth_dev_rx_queue_config(struct rte_eth_dev *dev, uint16_t nb_queues)
 }
 
 int
-rte_eth_dev_rx_queue_start(uint8_t port_id, uint16_t rx_queue_id)
+rte_eth_dev_rx_queue_start(uint16_t port_id, uint16_t rx_queue_id)
 {
 	struct rte_eth_dev *dev;
 
@@ -528,7 +528,7 @@ rte_eth_dev_rx_queue_start(uint8_t port_id, uint16_t rx_queue_id)
 }
 
 int
-rte_eth_dev_rx_queue_stop(uint8_t port_id, uint16_t rx_queue_id)
+rte_eth_dev_rx_queue_stop(uint16_t port_id, uint16_t rx_queue_id)
 {
 	struct rte_eth_dev *dev;
 
@@ -554,7 +554,7 @@ rte_eth_dev_rx_queue_stop(uint8_t port_id, uint16_t rx_queue_id)
 }
 
 int
-rte_eth_dev_tx_queue_start(uint8_t port_id, uint16_t tx_queue_id)
+rte_eth_dev_tx_queue_start(uint16_t port_id, uint16_t tx_queue_id)
 {
 	struct rte_eth_dev *dev;
 
@@ -580,7 +580,7 @@ rte_eth_dev_tx_queue_start(uint8_t port_id, uint16_t tx_queue_id)
 }
 
 int
-rte_eth_dev_tx_queue_stop(uint8_t port_id, uint16_t tx_queue_id)
+rte_eth_dev_tx_queue_stop(uint16_t port_id, uint16_t tx_queue_id)
 {
 	struct rte_eth_dev *dev;
 
@@ -689,7 +689,7 @@ rte_eth_speed_bitflag(uint32_t speed, int duplex)
 }
 
 int
-rte_eth_dev_configure(uint8_t port_id, uint16_t nb_rx_q, uint16_t nb_tx_q,
+rte_eth_dev_configure(uint16_t port_id, uint16_t nb_rx_q, uint16_t nb_tx_q,
 		      const struct rte_eth_conf *dev_conf)
 {
 	struct rte_eth_dev *dev;
@@ -850,7 +850,7 @@ _rte_eth_dev_reset(struct rte_eth_dev *dev)
 }
 
 static void
-rte_eth_dev_config_restore(uint8_t port_id)
+rte_eth_dev_config_restore(uint16_t port_id)
 {
 	struct rte_eth_dev *dev;
 	struct rte_eth_dev_info dev_info;
@@ -905,7 +905,7 @@ rte_eth_dev_config_restore(uint8_t port_id)
 }
 
 int
-rte_eth_dev_start(uint8_t port_id)
+rte_eth_dev_start(uint16_t port_id)
 {
 	struct rte_eth_dev *dev;
 	int diag;
@@ -917,7 +917,7 @@ rte_eth_dev_start(uint8_t port_id)
 	RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->dev_start, -ENOTSUP);
 
 	if (dev->data->dev_started != 0) {
-		RTE_PMD_DEBUG_TRACE("Device with port_id=%" PRIu8
+		RTE_PMD_DEBUG_TRACE("Device with port_id=%" PRIu16
 			" already started\n",
 			port_id);
 		return 0;
@@ -939,7 +939,7 @@ rte_eth_dev_start(uint8_t port_id)
 }
 
 void
-rte_eth_dev_stop(uint8_t port_id)
+rte_eth_dev_stop(uint16_t port_id)
 {
 	struct rte_eth_dev *dev;
 
@@ -949,7 +949,7 @@ rte_eth_dev_stop(uint8_t port_id)
 	RTE_FUNC_PTR_OR_RET(*dev->dev_ops->dev_stop);
 
 	if (dev->data->dev_started == 0) {
-		RTE_PMD_DEBUG_TRACE("Device with port_id=%" PRIu8
+		RTE_PMD_DEBUG_TRACE("Device with port_id=%" PRIu16
 			" already stopped\n",
 			port_id);
 		return;
@@ -960,7 +960,7 @@ rte_eth_dev_stop(uint8_t port_id)
 }
 
 int
-rte_eth_dev_set_link_up(uint8_t port_id)
+rte_eth_dev_set_link_up(uint16_t port_id)
 {
 	struct rte_eth_dev *dev;
 
@@ -973,7 +973,7 @@ rte_eth_dev_set_link_up(uint8_t port_id)
 }
 
 int
-rte_eth_dev_set_link_down(uint8_t port_id)
+rte_eth_dev_set_link_down(uint16_t port_id)
 {
 	struct rte_eth_dev *dev;
 
@@ -986,7 +986,7 @@ rte_eth_dev_set_link_down(uint8_t port_id)
 }
 
 void
-rte_eth_dev_close(uint8_t port_id)
+rte_eth_dev_close(uint16_t port_id)
 {
 	struct rte_eth_dev *dev;
 
@@ -1006,7 +1006,7 @@ rte_eth_dev_close(uint8_t port_id)
 }
 
 int
-rte_eth_dev_reset(uint8_t port_id)
+rte_eth_dev_reset(uint16_t port_id)
 {
 	struct rte_eth_dev *dev;
 	int ret;
@@ -1023,7 +1023,7 @@ rte_eth_dev_reset(uint8_t port_id)
 }
 
 int
-rte_eth_rx_queue_setup(uint8_t port_id, uint16_t rx_queue_id,
+rte_eth_rx_queue_setup(uint16_t port_id, uint16_t rx_queue_id,
 		       uint16_t nb_rx_desc, unsigned int socket_id,
 		       const struct rte_eth_rxconf *rx_conf,
 		       struct rte_mempool *mp)
@@ -1114,7 +1114,7 @@ rte_eth_rx_queue_setup(uint8_t port_id, uint16_t rx_queue_id,
 }
 
 int
-rte_eth_tx_queue_setup(uint8_t port_id, uint16_t tx_queue_id,
+rte_eth_tx_queue_setup(uint16_t port_id, uint16_t tx_queue_id,
 		       uint16_t nb_tx_desc, unsigned int socket_id,
 		       const struct rte_eth_txconf *tx_conf)
 {
@@ -1218,7 +1218,7 @@ rte_eth_tx_buffer_init(struct rte_eth_dev_tx_buffer *buffer, uint16_t size)
 }
 
 int
-rte_eth_tx_done_cleanup(uint8_t port_id, uint16_t queue_id, uint32_t free_cnt)
+rte_eth_tx_done_cleanup(uint16_t port_id, uint16_t queue_id, uint32_t free_cnt)
 {
 	struct rte_eth_dev *dev = &rte_eth_devices[port_id];
 
@@ -1232,7 +1232,7 @@ rte_eth_tx_done_cleanup(uint8_t port_id, uint16_t queue_id, uint32_t free_cnt)
 }
 
 void
-rte_eth_promiscuous_enable(uint8_t port_id)
+rte_eth_promiscuous_enable(uint16_t port_id)
 {
 	struct rte_eth_dev *dev;
 
@@ -1245,7 +1245,7 @@ rte_eth_promiscuous_enable(uint8_t port_id)
 }
 
 void
-rte_eth_promiscuous_disable(uint8_t port_id)
+rte_eth_promiscuous_disable(uint16_t port_id)
 {
 	struct rte_eth_dev *dev;
 
@@ -1258,7 +1258,7 @@ rte_eth_promiscuous_disable(uint8_t port_id)
 }
 
 int
-rte_eth_promiscuous_get(uint8_t port_id)
+rte_eth_promiscuous_get(uint16_t port_id)
 {
 	struct rte_eth_dev *dev;
 
@@ -1269,7 +1269,7 @@ rte_eth_promiscuous_get(uint8_t port_id)
 }
 
 void
-rte_eth_allmulticast_enable(uint8_t port_id)
+rte_eth_allmulticast_enable(uint16_t port_id)
 {
 	struct rte_eth_dev *dev;
 
@@ -1282,7 +1282,7 @@ rte_eth_allmulticast_enable(uint8_t port_id)
 }
 
 void
-rte_eth_allmulticast_disable(uint8_t port_id)
+rte_eth_allmulticast_disable(uint16_t port_id)
 {
 	struct rte_eth_dev *dev;
 
@@ -1295,7 +1295,7 @@ rte_eth_allmulticast_disable(uint8_t port_id)
 }
 
 int
-rte_eth_allmulticast_get(uint8_t port_id)
+rte_eth_allmulticast_get(uint16_t port_id)
 {
 	struct rte_eth_dev *dev;
 
@@ -1320,7 +1320,7 @@ rte_eth_dev_atomic_read_link_status(struct rte_eth_dev *dev,
 }
 
 void
-rte_eth_link_get(uint8_t port_id, struct rte_eth_link *eth_link)
+rte_eth_link_get(uint16_t port_id, struct rte_eth_link *eth_link)
 {
 	struct rte_eth_dev *dev;
 
@@ -1337,7 +1337,7 @@ rte_eth_link_get(uint8_t port_id, struct rte_eth_link *eth_link)
 }
 
 void
-rte_eth_link_get_nowait(uint8_t port_id, struct rte_eth_link *eth_link)
+rte_eth_link_get_nowait(uint16_t port_id, struct rte_eth_link *eth_link)
 {
 	struct rte_eth_dev *dev;
 
@@ -1354,7 +1354,7 @@ rte_eth_link_get_nowait(uint8_t port_id, struct rte_eth_link *eth_link)
 }
 
 int
-rte_eth_stats_get(uint8_t port_id, struct rte_eth_stats *stats)
+rte_eth_stats_get(uint16_t port_id, struct rte_eth_stats *stats)
 {
 	struct rte_eth_dev *dev;
 
@@ -1370,7 +1370,7 @@ rte_eth_stats_get(uint8_t port_id, struct rte_eth_stats *stats)
 }
 
 void
-rte_eth_stats_reset(uint8_t port_id)
+rte_eth_stats_reset(uint16_t port_id)
 {
 	struct rte_eth_dev *dev;
 
@@ -1383,7 +1383,7 @@ rte_eth_stats_reset(uint8_t port_id)
 }
 
 static int
-get_xstats_count(uint8_t port_id)
+get_xstats_count(uint16_t port_id)
 {
 	struct rte_eth_dev *dev;
 	int count;
@@ -1412,7 +1412,7 @@ get_xstats_count(uint8_t port_id)
 }
 
 int
-rte_eth_xstats_get_id_by_name(uint8_t port_id, const char *xstat_name,
+rte_eth_xstats_get_id_by_name(uint16_t port_id, const char *xstat_name,
 		uint64_t *id)
 {
 	int cnt_xstats, idx_xstat;
@@ -1456,7 +1456,7 @@ rte_eth_xstats_get_id_by_name(uint8_t port_id, const char *xstat_name,
 }
 
 int
-rte_eth_xstats_get_names_by_id(uint8_t port_id,
+rte_eth_xstats_get_names_by_id(uint16_t port_id,
 	struct rte_eth_xstat_name *xstats_names, unsigned int size,
 	uint64_t *ids)
 {
@@ -1573,7 +1573,7 @@ rte_eth_xstats_get_names_by_id(uint8_t port_id,
 }
 
 int
-rte_eth_xstats_get_names(uint8_t port_id,
+rte_eth_xstats_get_names(uint16_t port_id,
 	struct rte_eth_xstat_name *xstats_names,
 	unsigned int size)
 {
@@ -1639,8 +1639,8 @@ rte_eth_xstats_get_names(uint8_t port_id,
 
 /* retrieve ethdev extended statistics */
 int
-rte_eth_xstats_get_by_id(uint8_t port_id, const uint64_t *ids, uint64_t *values,
-	unsigned int n)
+rte_eth_xstats_get_by_id(uint16_t port_id, const uint64_t *ids,
+			 uint64_t *values, unsigned int n)
 {
 	/* If need all xstats */
 	if (!ids) {
@@ -1765,7 +1765,7 @@ rte_eth_xstats_get_by_id(uint8_t port_id, const uint64_t *ids, uint64_t *values,
 }
 
 int
-rte_eth_xstats_get(uint8_t port_id, struct rte_eth_xstat *xstats,
+rte_eth_xstats_get(uint16_t port_id, struct rte_eth_xstat *xstats,
 	unsigned int n)
 {
 	struct rte_eth_stats eth_stats;
@@ -1847,7 +1847,7 @@ rte_eth_xstats_get(uint8_t port_id, struct rte_eth_xstat *xstats,
 
 /* reset ethdev extended statistics */
 void
-rte_eth_xstats_reset(uint8_t port_id)
+rte_eth_xstats_reset(uint16_t port_id)
 {
 	struct rte_eth_dev *dev;
 
@@ -1865,7 +1865,7 @@ rte_eth_xstats_reset(uint8_t port_id)
 }
 
 static int
-set_queue_stats_mapping(uint8_t port_id, uint16_t queue_id, uint8_t stat_idx,
+set_queue_stats_mapping(uint16_t port_id, uint16_t queue_id, uint8_t stat_idx,
 		uint8_t is_rx)
 {
 	struct rte_eth_dev *dev;
@@ -1881,7 +1881,7 @@ set_queue_stats_mapping(uint8_t port_id, uint16_t queue_id, uint8_t stat_idx,
 
 
 int
-rte_eth_dev_set_tx_queue_stats_mapping(uint8_t port_id, uint16_t tx_queue_id,
+rte_eth_dev_set_tx_queue_stats_mapping(uint16_t port_id, uint16_t tx_queue_id,
 		uint8_t stat_idx)
 {
 	return set_queue_stats_mapping(port_id, tx_queue_id, stat_idx,
@@ -1890,7 +1890,7 @@ rte_eth_dev_set_tx_queue_stats_mapping(uint8_t port_id, uint16_t tx_queue_id,
 
 
 int
-rte_eth_dev_set_rx_queue_stats_mapping(uint8_t port_id, uint16_t rx_queue_id,
+rte_eth_dev_set_rx_queue_stats_mapping(uint16_t port_id, uint16_t rx_queue_id,
 		uint8_t stat_idx)
 {
 	return set_queue_stats_mapping(port_id, rx_queue_id, stat_idx,
@@ -1898,7 +1898,7 @@ rte_eth_dev_set_rx_queue_stats_mapping(uint8_t port_id, uint16_t rx_queue_id,
 }
 
 int
-rte_eth_dev_fw_version_get(uint8_t port_id, char *fw_version, size_t fw_size)
+rte_eth_dev_fw_version_get(uint16_t port_id, char *fw_version, size_t fw_size)
 {
 	struct rte_eth_dev *dev;
 
@@ -1910,7 +1910,7 @@ rte_eth_dev_fw_version_get(uint8_t port_id, char *fw_version, size_t fw_size)
 }
 
 void
-rte_eth_dev_info_get(uint8_t port_id, struct rte_eth_dev_info *dev_info)
+rte_eth_dev_info_get(uint16_t port_id, struct rte_eth_dev_info *dev_info)
 {
 	struct rte_eth_dev *dev;
 	const struct rte_eth_desc_lim lim = {
@@ -1934,7 +1934,7 @@ rte_eth_dev_info_get(uint8_t port_id, struct rte_eth_dev_info *dev_info)
 }
 
 int
-rte_eth_dev_get_supported_ptypes(uint8_t port_id, uint32_t ptype_mask,
+rte_eth_dev_get_supported_ptypes(uint16_t port_id, uint32_t ptype_mask,
 				 uint32_t *ptypes, int num)
 {
 	int i, j;
@@ -1960,7 +1960,7 @@ rte_eth_dev_get_supported_ptypes(uint8_t port_id, uint32_t ptype_mask,
 }
 
 void
-rte_eth_macaddr_get(uint8_t port_id, struct ether_addr *mac_addr)
+rte_eth_macaddr_get(uint16_t port_id, struct ether_addr *mac_addr)
 {
 	struct rte_eth_dev *dev;
 
@@ -1971,7 +1971,7 @@ rte_eth_macaddr_get(uint8_t port_id, struct ether_addr *mac_addr)
 
 
 int
-rte_eth_dev_get_mtu(uint8_t port_id, uint16_t *mtu)
+rte_eth_dev_get_mtu(uint16_t port_id, uint16_t *mtu)
 {
 	struct rte_eth_dev *dev;
 
@@ -1983,7 +1983,7 @@ rte_eth_dev_get_mtu(uint8_t port_id, uint16_t *mtu)
 }
 
 int
-rte_eth_dev_set_mtu(uint8_t port_id, uint16_t mtu)
+rte_eth_dev_set_mtu(uint16_t port_id, uint16_t mtu)
 {
 	int ret;
 	struct rte_eth_dev *dev;
@@ -2000,7 +2000,7 @@ rte_eth_dev_set_mtu(uint8_t port_id, uint16_t mtu)
 }
 
 int
-rte_eth_dev_vlan_filter(uint8_t port_id, uint16_t vlan_id, int on)
+rte_eth_dev_vlan_filter(uint16_t port_id, uint16_t vlan_id, int on)
 {
 	struct rte_eth_dev *dev;
 	int ret;
@@ -2039,7 +2039,8 @@ rte_eth_dev_vlan_filter(uint8_t port_id, uint16_t vlan_id, int on)
 }
 
 int
-rte_eth_dev_set_vlan_strip_on_queue(uint8_t port_id, uint16_t rx_queue_id, int on)
+rte_eth_dev_set_vlan_strip_on_queue(uint16_t port_id, uint16_t rx_queue_id,
+				    int on)
 {
 	struct rte_eth_dev *dev;
 
@@ -2057,7 +2058,7 @@ rte_eth_dev_set_vlan_strip_on_queue(uint8_t port_id, uint16_t rx_queue_id, int o
 }
 
 int
-rte_eth_dev_set_vlan_ether_type(uint8_t port_id,
+rte_eth_dev_set_vlan_ether_type(uint16_t port_id,
 				enum rte_vlan_type vlan_type,
 				uint16_t tpid)
 {
@@ -2071,7 +2072,7 @@ rte_eth_dev_set_vlan_ether_type(uint8_t port_id,
 }
 
 int
-rte_eth_dev_set_vlan_offload(uint8_t port_id, int offload_mask)
+rte_eth_dev_set_vlan_offload(uint16_t port_id, int offload_mask)
 {
 	struct rte_eth_dev *dev;
 	int ret = 0;
@@ -2114,7 +2115,7 @@ rte_eth_dev_set_vlan_offload(uint8_t port_id, int offload_mask)
 }
 
 int
-rte_eth_dev_get_vlan_offload(uint8_t port_id)
+rte_eth_dev_get_vlan_offload(uint16_t port_id)
 {
 	struct rte_eth_dev *dev;
 	int ret = 0;
@@ -2135,7 +2136,7 @@ rte_eth_dev_get_vlan_offload(uint8_t port_id)
 }
 
 int
-rte_eth_dev_set_vlan_pvid(uint8_t port_id, uint16_t pvid, int on)
+rte_eth_dev_set_vlan_pvid(uint16_t port_id, uint16_t pvid, int on)
 {
 	struct rte_eth_dev *dev;
 
@@ -2148,7 +2149,7 @@ rte_eth_dev_set_vlan_pvid(uint8_t port_id, uint16_t pvid, int on)
 }
 
 int
-rte_eth_dev_flow_ctrl_get(uint8_t port_id, struct rte_eth_fc_conf *fc_conf)
+rte_eth_dev_flow_ctrl_get(uint16_t port_id, struct rte_eth_fc_conf *fc_conf)
 {
 	struct rte_eth_dev *dev;
 
@@ -2160,7 +2161,7 @@ rte_eth_dev_flow_ctrl_get(uint8_t port_id, struct rte_eth_fc_conf *fc_conf)
 }
 
 int
-rte_eth_dev_flow_ctrl_set(uint8_t port_id, struct rte_eth_fc_conf *fc_conf)
+rte_eth_dev_flow_ctrl_set(uint16_t port_id, struct rte_eth_fc_conf *fc_conf)
 {
 	struct rte_eth_dev *dev;
 
@@ -2176,7 +2177,8 @@ rte_eth_dev_flow_ctrl_set(uint8_t port_id, struct rte_eth_fc_conf *fc_conf)
 }
 
 int
-rte_eth_dev_priority_flow_ctrl_set(uint8_t port_id, struct rte_eth_pfc_conf *pfc_conf)
+rte_eth_dev_priority_flow_ctrl_set(uint16_t port_id,
+				   struct rte_eth_pfc_conf *pfc_conf)
 {
 	struct rte_eth_dev *dev;
 
@@ -2242,7 +2244,7 @@ rte_eth_check_reta_entry(struct rte_eth_rss_reta_entry64 *reta_conf,
 }
 
 int
-rte_eth_dev_rss_reta_update(uint8_t port_id,
+rte_eth_dev_rss_reta_update(uint16_t port_id,
 			    struct rte_eth_rss_reta_entry64 *reta_conf,
 			    uint16_t reta_size)
 {
@@ -2268,7 +2270,7 @@ rte_eth_dev_rss_reta_update(uint8_t port_id,
 }
 
 int
-rte_eth_dev_rss_reta_query(uint8_t port_id,
+rte_eth_dev_rss_reta_query(uint16_t port_id,
 			   struct rte_eth_rss_reta_entry64 *reta_conf,
 			   uint16_t reta_size)
 {
@@ -2288,7 +2290,8 @@ rte_eth_dev_rss_reta_query(uint8_t port_id,
 }
 
 int
-rte_eth_dev_rss_hash_update(uint8_t port_id, struct rte_eth_rss_conf *rss_conf)
+rte_eth_dev_rss_hash_update(uint16_t port_id,
+			    struct rte_eth_rss_conf *rss_conf)
 {
 	struct rte_eth_dev *dev;
 	uint16_t rss_hash_protos;
@@ -2307,7 +2310,7 @@ rte_eth_dev_rss_hash_update(uint8_t port_id, struct rte_eth_rss_conf *rss_conf)
 }
 
 int
-rte_eth_dev_rss_hash_conf_get(uint8_t port_id,
+rte_eth_dev_rss_hash_conf_get(uint16_t port_id,
 			      struct rte_eth_rss_conf *rss_conf)
 {
 	struct rte_eth_dev *dev;
@@ -2319,7 +2322,7 @@ rte_eth_dev_rss_hash_conf_get(uint8_t port_id,
 }
 
 int
-rte_eth_dev_udp_tunnel_port_add(uint8_t port_id,
+rte_eth_dev_udp_tunnel_port_add(uint16_t port_id,
 				struct rte_eth_udp_tunnel *udp_tunnel)
 {
 	struct rte_eth_dev *dev;
@@ -2341,7 +2344,7 @@ rte_eth_dev_udp_tunnel_port_add(uint8_t port_id,
 }
 
 int
-rte_eth_dev_udp_tunnel_port_delete(uint8_t port_id,
+rte_eth_dev_udp_tunnel_port_delete(uint16_t port_id,
 				   struct rte_eth_udp_tunnel *udp_tunnel)
 {
 	struct rte_eth_dev *dev;
@@ -2364,7 +2367,7 @@ rte_eth_dev_udp_tunnel_port_delete(uint8_t port_id,
 }
 
 int
-rte_eth_led_on(uint8_t port_id)
+rte_eth_led_on(uint16_t port_id)
 {
 	struct rte_eth_dev *dev;
 
@@ -2375,7 +2378,7 @@ rte_eth_led_on(uint8_t port_id)
 }
 
 int
-rte_eth_led_off(uint8_t port_id)
+rte_eth_led_off(uint16_t port_id)
 {
 	struct rte_eth_dev *dev;
 
@@ -2390,7 +2393,7 @@ rte_eth_led_off(uint8_t port_id)
  * an empty spot.
  */
 static int
-get_mac_addr_index(uint8_t port_id, const struct ether_addr *addr)
+get_mac_addr_index(uint16_t port_id, const struct ether_addr *addr)
 {
 	struct rte_eth_dev_info dev_info;
 	struct rte_eth_dev *dev = &rte_eth_devices[port_id];
@@ -2409,7 +2412,7 @@ get_mac_addr_index(uint8_t port_id, const struct ether_addr *addr)
 static const struct ether_addr null_mac_addr;
 
 int
-rte_eth_dev_mac_addr_add(uint8_t port_id, struct ether_addr *addr,
+rte_eth_dev_mac_addr_add(uint16_t port_id, struct ether_addr *addr,
 			uint32_t pool)
 {
 	struct rte_eth_dev *dev;
@@ -2462,7 +2465,7 @@ rte_eth_dev_mac_addr_add(uint8_t port_id, struct ether_addr *addr,
 }
 
 int
-rte_eth_dev_mac_addr_remove(uint8_t port_id, struct ether_addr *addr)
+rte_eth_dev_mac_addr_remove(uint16_t port_id, struct ether_addr *addr)
 {
 	struct rte_eth_dev *dev;
 	int index;
@@ -2491,7 +2494,7 @@ rte_eth_dev_mac_addr_remove(uint8_t port_id, struct ether_addr *addr)
 }
 
 int
-rte_eth_dev_default_mac_addr_set(uint8_t port_id, struct ether_addr *addr)
+rte_eth_dev_default_mac_addr_set(uint16_t port_id, struct ether_addr *addr)
 {
 	struct rte_eth_dev *dev;
 
@@ -2517,7 +2520,7 @@ rte_eth_dev_default_mac_addr_set(uint8_t port_id, struct ether_addr *addr)
  * an empty spot.
  */
 static int
-get_hash_mac_addr_index(uint8_t port_id, const struct ether_addr *addr)
+get_hash_mac_addr_index(uint16_t port_id, const struct ether_addr *addr)
 {
 	struct rte_eth_dev_info dev_info;
 	struct rte_eth_dev *dev = &rte_eth_devices[port_id];
@@ -2536,7 +2539,7 @@ get_hash_mac_addr_index(uint8_t port_id, const struct ether_addr *addr)
 }
 
 int
-rte_eth_dev_uc_hash_table_set(uint8_t port_id, struct ether_addr *addr,
+rte_eth_dev_uc_hash_table_set(uint16_t port_id, struct ether_addr *addr,
 				uint8_t on)
 {
 	int index;
@@ -2588,7 +2591,7 @@ rte_eth_dev_uc_hash_table_set(uint8_t port_id, struct ether_addr *addr,
 }
 
 int
-rte_eth_dev_uc_all_hash_table_set(uint8_t port_id, uint8_t on)
+rte_eth_dev_uc_all_hash_table_set(uint16_t port_id, uint8_t on)
 {
 	struct rte_eth_dev *dev;
 
@@ -2600,7 +2603,7 @@ rte_eth_dev_uc_all_hash_table_set(uint8_t port_id, uint8_t on)
 	return (*dev->dev_ops->uc_all_hash_table_set)(dev, on);
 }
 
-int rte_eth_set_queue_rate_limit(uint8_t port_id, uint16_t queue_idx,
+int rte_eth_set_queue_rate_limit(uint16_t port_id, uint16_t queue_idx,
 					uint16_t tx_rate)
 {
 	struct rte_eth_dev *dev;
@@ -2631,7 +2634,7 @@ int rte_eth_set_queue_rate_limit(uint8_t port_id, uint16_t queue_idx,
 }
 
 int
-rte_eth_mirror_rule_set(uint8_t port_id,
+rte_eth_mirror_rule_set(uint16_t port_id,
 			struct rte_eth_mirror_conf *mirror_conf,
 			uint8_t rule_id, uint8_t on)
 {
@@ -2669,7 +2672,7 @@ rte_eth_mirror_rule_set(uint8_t port_id,
 }
 
 int
-rte_eth_mirror_rule_reset(uint8_t port_id, uint8_t rule_id)
+rte_eth_mirror_rule_reset(uint16_t port_id, uint8_t rule_id)
 {
 	struct rte_eth_dev *dev;
 
@@ -2682,7 +2685,7 @@ rte_eth_mirror_rule_reset(uint8_t port_id, uint8_t rule_id)
 }
 
 int
-rte_eth_dev_callback_register(uint8_t port_id,
+rte_eth_dev_callback_register(uint16_t port_id,
 			enum rte_eth_event_type event,
 			rte_eth_dev_cb_fn cb_fn, void *cb_arg)
 {
@@ -2722,7 +2725,7 @@ rte_eth_dev_callback_register(uint8_t port_id,
 }
 
 int
-rte_eth_dev_callback_unregister(uint8_t port_id,
+rte_eth_dev_callback_unregister(uint16_t port_id,
 			enum rte_eth_event_type event,
 			rte_eth_dev_cb_fn cb_fn, void *cb_arg)
 {
@@ -2794,7 +2797,7 @@ _rte_eth_dev_callback_process(struct rte_eth_dev *dev,
 }
 
 int
-rte_eth_dev_rx_intr_ctl(uint8_t port_id, int epfd, int op, void *data)
+rte_eth_dev_rx_intr_ctl(uint16_t port_id, int epfd, int op, void *data)
 {
 	uint32_t vec;
 	struct rte_eth_dev *dev;
@@ -2855,7 +2858,7 @@ rte_eth_dma_zone_reserve(const struct rte_eth_dev *dev, const char *ring_name,
 }
 
 int
-rte_eth_dev_rx_intr_ctl_q(uint8_t port_id, uint16_t queue_id,
+rte_eth_dev_rx_intr_ctl_q(uint16_t port_id, uint16_t queue_id,
 			  int epfd, int op, void *data)
 {
 	uint32_t vec;
@@ -2895,7 +2898,7 @@ rte_eth_dev_rx_intr_ctl_q(uint8_t port_id, uint16_t queue_id,
 }
 
 int
-rte_eth_dev_rx_intr_enable(uint8_t port_id,
+rte_eth_dev_rx_intr_enable(uint16_t port_id,
 			   uint16_t queue_id)
 {
 	struct rte_eth_dev *dev;
@@ -2909,7 +2912,7 @@ rte_eth_dev_rx_intr_enable(uint8_t port_id,
 }
 
 int
-rte_eth_dev_rx_intr_disable(uint8_t port_id,
+rte_eth_dev_rx_intr_disable(uint16_t port_id,
 			    uint16_t queue_id)
 {
 	struct rte_eth_dev *dev;
@@ -2924,7 +2927,8 @@ rte_eth_dev_rx_intr_disable(uint8_t port_id,
 
 
 int
-rte_eth_dev_filter_supported(uint8_t port_id, enum rte_filter_type filter_type)
+rte_eth_dev_filter_supported(uint16_t port_id,
+			     enum rte_filter_type filter_type)
 {
 	struct rte_eth_dev *dev;
 
@@ -2937,7 +2941,7 @@ rte_eth_dev_filter_supported(uint8_t port_id, enum rte_filter_type filter_type)
 }
 
 int
-rte_eth_dev_filter_ctrl(uint8_t port_id, enum rte_filter_type filter_type,
+rte_eth_dev_filter_ctrl(uint16_t port_id, enum rte_filter_type filter_type,
 		       enum rte_filter_op filter_op, void *arg)
 {
 	struct rte_eth_dev *dev;
@@ -2950,7 +2954,7 @@ rte_eth_dev_filter_ctrl(uint8_t port_id, enum rte_filter_type filter_type,
 }
 
 void *
-rte_eth_add_rx_callback(uint8_t port_id, uint16_t queue_id,
+rte_eth_add_rx_callback(uint16_t port_id, uint16_t queue_id,
 		rte_rx_callback_fn fn, void *user_param)
 {
 #ifndef RTE_ETHDEV_RXTX_CALLBACKS
@@ -2992,7 +2996,7 @@ rte_eth_add_rx_callback(uint8_t port_id, uint16_t queue_id,
 }
 
 void *
-rte_eth_add_first_rx_callback(uint8_t port_id, uint16_t queue_id,
+rte_eth_add_first_rx_callback(uint16_t port_id, uint16_t queue_id,
 		rte_rx_callback_fn fn, void *user_param)
 {
 #ifndef RTE_ETHDEV_RXTX_CALLBACKS
@@ -3027,7 +3031,7 @@ rte_eth_add_first_rx_callback(uint8_t port_id, uint16_t queue_id,
 }
 
 void *
-rte_eth_add_tx_callback(uint8_t port_id, uint16_t queue_id,
+rte_eth_add_tx_callback(uint16_t port_id, uint16_t queue_id,
 		rte_tx_callback_fn fn, void *user_param)
 {
 #ifndef RTE_ETHDEV_RXTX_CALLBACKS
@@ -3070,7 +3074,7 @@ rte_eth_add_tx_callback(uint8_t port_id, uint16_t queue_id,
 }
 
 int
-rte_eth_remove_rx_callback(uint8_t port_id, uint16_t queue_id,
+rte_eth_remove_rx_callback(uint16_t port_id, uint16_t queue_id,
 		struct rte_eth_rxtx_callback *user_cb)
 {
 #ifndef RTE_ETHDEV_RXTX_CALLBACKS
@@ -3104,7 +3108,7 @@ rte_eth_remove_rx_callback(uint8_t port_id, uint16_t queue_id,
 }
 
 int
-rte_eth_remove_tx_callback(uint8_t port_id, uint16_t queue_id,
+rte_eth_remove_tx_callback(uint16_t port_id, uint16_t queue_id,
 		struct rte_eth_rxtx_callback *user_cb)
 {
 #ifndef RTE_ETHDEV_RXTX_CALLBACKS
@@ -3138,7 +3142,7 @@ rte_eth_remove_tx_callback(uint8_t port_id, uint16_t queue_id,
 }
 
 int
-rte_eth_rx_queue_info_get(uint8_t port_id, uint16_t queue_id,
+rte_eth_rx_queue_info_get(uint16_t port_id, uint16_t queue_id,
 	struct rte_eth_rxq_info *qinfo)
 {
 	struct rte_eth_dev *dev;
@@ -3162,7 +3166,7 @@ rte_eth_rx_queue_info_get(uint8_t port_id, uint16_t queue_id,
 }
 
 int
-rte_eth_tx_queue_info_get(uint8_t port_id, uint16_t queue_id,
+rte_eth_tx_queue_info_get(uint16_t port_id, uint16_t queue_id,
 	struct rte_eth_txq_info *qinfo)
 {
 	struct rte_eth_dev *dev;
@@ -3186,7 +3190,7 @@ rte_eth_tx_queue_info_get(uint8_t port_id, uint16_t queue_id,
 }
 
 int
-rte_eth_dev_set_mc_addr_list(uint8_t port_id,
+rte_eth_dev_set_mc_addr_list(uint16_t port_id,
 			     struct ether_addr *mc_addr_set,
 			     uint32_t nb_mc_addr)
 {
@@ -3200,7 +3204,7 @@ rte_eth_dev_set_mc_addr_list(uint8_t port_id,
 }
 
 int
-rte_eth_timesync_enable(uint8_t port_id)
+rte_eth_timesync_enable(uint16_t port_id)
 {
 	struct rte_eth_dev *dev;
 
@@ -3212,7 +3216,7 @@ rte_eth_timesync_enable(uint8_t port_id)
 }
 
 int
-rte_eth_timesync_disable(uint8_t port_id)
+rte_eth_timesync_disable(uint16_t port_id)
 {
 	struct rte_eth_dev *dev;
 
@@ -3224,7 +3228,7 @@ rte_eth_timesync_disable(uint8_t port_id)
 }
 
 int
-rte_eth_timesync_read_rx_timestamp(uint8_t port_id, struct timespec *timestamp,
+rte_eth_timesync_read_rx_timestamp(uint16_t port_id, struct timespec *timestamp,
 				   uint32_t flags)
 {
 	struct rte_eth_dev *dev;
@@ -3237,7 +3241,8 @@ rte_eth_timesync_read_rx_timestamp(uint8_t port_id, struct timespec *timestamp,
 }
 
 int
-rte_eth_timesync_read_tx_timestamp(uint8_t port_id, struct timespec *timestamp)
+rte_eth_timesync_read_tx_timestamp(uint16_t port_id,
+				   struct timespec *timestamp)
 {
 	struct rte_eth_dev *dev;
 
@@ -3249,7 +3254,7 @@ rte_eth_timesync_read_tx_timestamp(uint8_t port_id, struct timespec *timestamp)
 }
 
 int
-rte_eth_timesync_adjust_time(uint8_t port_id, int64_t delta)
+rte_eth_timesync_adjust_time(uint16_t port_id, int64_t delta)
 {
 	struct rte_eth_dev *dev;
 
@@ -3261,7 +3266,7 @@ rte_eth_timesync_adjust_time(uint8_t port_id, int64_t delta)
 }
 
 int
-rte_eth_timesync_read_time(uint8_t port_id, struct timespec *timestamp)
+rte_eth_timesync_read_time(uint16_t port_id, struct timespec *timestamp)
 {
 	struct rte_eth_dev *dev;
 
@@ -3273,7 +3278,7 @@ rte_eth_timesync_read_time(uint8_t port_id, struct timespec *timestamp)
 }
 
 int
-rte_eth_timesync_write_time(uint8_t port_id, const struct timespec *timestamp)
+rte_eth_timesync_write_time(uint16_t port_id, const struct timespec *timestamp)
 {
 	struct rte_eth_dev *dev;
 
@@ -3285,7 +3290,7 @@ rte_eth_timesync_write_time(uint8_t port_id, const struct timespec *timestamp)
 }
 
 int
-rte_eth_dev_get_reg_info(uint8_t port_id, struct rte_dev_reg_info *info)
+rte_eth_dev_get_reg_info(uint16_t port_id, struct rte_dev_reg_info *info)
 {
 	struct rte_eth_dev *dev;
 
@@ -3297,7 +3302,7 @@ rte_eth_dev_get_reg_info(uint8_t port_id, struct rte_dev_reg_info *info)
 }
 
 int
-rte_eth_dev_get_eeprom_length(uint8_t port_id)
+rte_eth_dev_get_eeprom_length(uint16_t port_id)
 {
 	struct rte_eth_dev *dev;
 
@@ -3309,7 +3314,7 @@ rte_eth_dev_get_eeprom_length(uint8_t port_id)
 }
 
 int
-rte_eth_dev_get_eeprom(uint8_t port_id, struct rte_dev_eeprom_info *info)
+rte_eth_dev_get_eeprom(uint16_t port_id, struct rte_dev_eeprom_info *info)
 {
 	struct rte_eth_dev *dev;
 
@@ -3321,7 +3326,7 @@ rte_eth_dev_get_eeprom(uint8_t port_id, struct rte_dev_eeprom_info *info)
 }
 
 int
-rte_eth_dev_set_eeprom(uint8_t port_id, struct rte_dev_eeprom_info *info)
+rte_eth_dev_set_eeprom(uint16_t port_id, struct rte_dev_eeprom_info *info)
 {
 	struct rte_eth_dev *dev;
 
@@ -3333,7 +3338,7 @@ rte_eth_dev_set_eeprom(uint8_t port_id, struct rte_dev_eeprom_info *info)
 }
 
 int
-rte_eth_dev_get_dcb_info(uint8_t port_id,
+rte_eth_dev_get_dcb_info(uint16_t port_id,
 			     struct rte_eth_dcb_info *dcb_info)
 {
 	struct rte_eth_dev *dev;
@@ -3348,7 +3353,7 @@ rte_eth_dev_get_dcb_info(uint8_t port_id,
 }
 
 int
-rte_eth_dev_l2_tunnel_eth_type_conf(uint8_t port_id,
+rte_eth_dev_l2_tunnel_eth_type_conf(uint16_t port_id,
 				    struct rte_eth_l2_tunnel_conf *l2_tunnel)
 {
 	struct rte_eth_dev *dev;
@@ -3371,7 +3376,7 @@ rte_eth_dev_l2_tunnel_eth_type_conf(uint8_t port_id,
 }
 
 int
-rte_eth_dev_l2_tunnel_offload_set(uint8_t port_id,
+rte_eth_dev_l2_tunnel_offload_set(uint16_t port_id,
 				  struct rte_eth_l2_tunnel_conf *l2_tunnel,
 				  uint32_t mask,
 				  uint8_t en)
@@ -3415,7 +3420,7 @@ rte_eth_dev_adjust_nb_desc(uint16_t *nb_desc,
 }
 
 int
-rte_eth_dev_adjust_nb_rx_tx_desc(uint8_t port_id,
+rte_eth_dev_adjust_nb_rx_tx_desc(uint16_t port_id,
 				 uint16_t *nb_rx_desc,
 				 uint16_t *nb_tx_desc)
 {
diff --git a/lib/librte_ether/rte_ethdev.h b/lib/librte_ether/rte_ethdev.h
index 99cdd54d4..34f729ab8 100644
--- a/lib/librte_ether/rte_ethdev.h
+++ b/lib/librte_ether/rte_ethdev.h
@@ -1572,7 +1572,7 @@ struct eth_dev_ops {
  * @return
  *   The number of packets returned to the user.
  */
-typedef uint16_t (*rte_rx_callback_fn)(uint8_t port, uint16_t queue,
+typedef uint16_t (*rte_rx_callback_fn)(uint16_t port, uint16_t queue,
 	struct rte_mbuf *pkts[], uint16_t nb_pkts, uint16_t max_pkts,
 	void *user_param);
 
@@ -1596,7 +1596,7 @@ typedef uint16_t (*rte_rx_callback_fn)(uint8_t port, uint16_t queue,
  * @return
  *   The number of packets to be written to the NIC.
  */
-typedef uint16_t (*rte_tx_callback_fn)(uint8_t port, uint16_t queue,
+typedef uint16_t (*rte_tx_callback_fn)(uint16_t port, uint16_t queue,
 	struct rte_mbuf *pkts[], uint16_t nb_pkts, void *user_param);
 
 /**
@@ -1699,7 +1699,7 @@ struct rte_eth_dev_data {
 	/** bitmap array of associating Ethernet MAC addresses to pools */
 	struct ether_addr* hash_mac_addrs;
 	/** Device Ethernet MAC addresses of hash filtering. */
-	uint8_t port_id;           /**< Device [external] port identifier. */
+	uint16_t port_id;           /**< Device [external] port identifier. */
 	__extension__
 	uint8_t promiscuous   : 1, /**< RX promiscuous mode ON(1) / OFF(0). */
 		scattered_rx : 1,  /**< RX of scattered packets is ON(1) / OFF(0) */
@@ -1741,7 +1741,7 @@ extern struct rte_eth_dev rte_eth_devices[];
  * @return
  *   Next valid port id, RTE_MAX_ETHPORTS if there is none.
  */
-uint8_t rte_eth_find_next(uint8_t port_id);
+uint16_t rte_eth_find_next(uint16_t port_id);
 
 /**
  * Macro to iterate over all enabled ethdev ports.
@@ -1764,7 +1764,7 @@ uint8_t rte_eth_find_next(uint8_t port_id);
  * @return
  *   - The total number of usable Ethernet devices.
  */
-uint8_t rte_eth_dev_count(void);
+uint16_t rte_eth_dev_count(void);
 
 /**
  * @internal
@@ -1825,7 +1825,7 @@ int rte_eth_dev_release_port(struct rte_eth_dev *eth_dev);
  * @return
  *  0 on success and port_id is filled, negative on error
  */
-int rte_eth_dev_attach(const char *devargs, uint8_t *port_id);
+int rte_eth_dev_attach(const char *devargs, uint16_t *port_id);
 
 /**
  * Detach a Ethernet device specified by port identifier.
@@ -1840,7 +1840,7 @@ int rte_eth_dev_attach(const char *devargs, uint8_t *port_id);
  * @return
  *  0 on success and devname is filled, negative on error
  */
-int rte_eth_dev_detach(uint8_t port_id, char *devname);
+int rte_eth_dev_detach(uint16_t port_id, char *devname);
 
 /**
  * Convert a numerical speed in Mbps to a bitmap flag that can be used in
@@ -1884,7 +1884,7 @@ uint32_t rte_eth_speed_bitflag(uint32_t speed, int duplex);
  *   - 0: Success, device configured.
  *   - <0: Error code returned by the driver configuration function.
  */
-int rte_eth_dev_configure(uint8_t port_id, uint16_t nb_rx_queue,
+int rte_eth_dev_configure(uint16_t port_id, uint16_t nb_rx_queue,
 		uint16_t nb_tx_queue, const struct rte_eth_conf *eth_conf);
 
 /**
@@ -1939,7 +1939,7 @@ void _rte_eth_dev_reset(struct rte_eth_dev *dev);
  *      allocate network memory buffers from the memory pool when
  *      initializing receive descriptors.
  */
-int rte_eth_rx_queue_setup(uint8_t port_id, uint16_t rx_queue_id,
+int rte_eth_rx_queue_setup(uint16_t port_id, uint16_t rx_queue_id,
 		uint16_t nb_rx_desc, unsigned int socket_id,
 		const struct rte_eth_rxconf *rx_conf,
 		struct rte_mempool *mb_pool);
@@ -1987,7 +1987,7 @@ int rte_eth_rx_queue_setup(uint8_t port_id, uint16_t rx_queue_id,
  *   - 0: Success, the transmit queue is correctly set up.
  *   - -ENOMEM: Unable to allocate the transmit ring descriptors.
  */
-int rte_eth_tx_queue_setup(uint8_t port_id, uint16_t tx_queue_id,
+int rte_eth_tx_queue_setup(uint16_t port_id, uint16_t tx_queue_id,
 		uint16_t nb_tx_desc, unsigned int socket_id,
 		const struct rte_eth_txconf *tx_conf);
 
@@ -2001,7 +2001,7 @@ int rte_eth_tx_queue_setup(uint8_t port_id, uint16_t tx_queue_id,
  *   a default of zero if the socket could not be determined.
  *   -1 is returned is the port_id value is out of range.
  */
-int rte_eth_dev_socket_id(uint8_t port_id);
+int rte_eth_dev_socket_id(uint16_t port_id);
 
 /**
  * Check if port_id of device is attached
@@ -2012,7 +2012,7 @@ int rte_eth_dev_socket_id(uint8_t port_id);
  *   - 0 if port is out of range or not attached
  *   - 1 if device is attached
  */
-int rte_eth_dev_is_valid_port(uint8_t port_id);
+int rte_eth_dev_is_valid_port(uint16_t port_id);
 
 /**
  * Start specified RX queue of a port. It is used when rx_deferred_start
@@ -2029,7 +2029,7 @@ int rte_eth_dev_is_valid_port(uint8_t port_id);
  *   - -EINVAL: The port_id or the queue_id out of range.
  *   - -ENOTSUP: The function not supported in PMD driver.
  */
-int rte_eth_dev_rx_queue_start(uint8_t port_id, uint16_t rx_queue_id);
+int rte_eth_dev_rx_queue_start(uint16_t port_id, uint16_t rx_queue_id);
 
 /**
  * Stop specified RX queue of a port
@@ -2045,7 +2045,7 @@ int rte_eth_dev_rx_queue_start(uint8_t port_id, uint16_t rx_queue_id);
  *   - -EINVAL: The port_id or the queue_id out of range.
  *   - -ENOTSUP: The function not supported in PMD driver.
  */
-int rte_eth_dev_rx_queue_stop(uint8_t port_id, uint16_t rx_queue_id);
+int rte_eth_dev_rx_queue_stop(uint16_t port_id, uint16_t rx_queue_id);
 
 /**
  * Start TX for specified queue of a port. It is used when tx_deferred_start
@@ -2062,7 +2062,7 @@ int rte_eth_dev_rx_queue_stop(uint8_t port_id, uint16_t rx_queue_id);
  *   - -EINVAL: The port_id or the queue_id out of range.
  *   - -ENOTSUP: The function not supported in PMD driver.
  */
-int rte_eth_dev_tx_queue_start(uint8_t port_id, uint16_t tx_queue_id);
+int rte_eth_dev_tx_queue_start(uint16_t port_id, uint16_t tx_queue_id);
 
 /**
  * Stop specified TX queue of a port
@@ -2078,7 +2078,7 @@ int rte_eth_dev_tx_queue_start(uint8_t port_id, uint16_t tx_queue_id);
  *   - -EINVAL: The port_id or the queue_id out of range.
  *   - -ENOTSUP: The function not supported in PMD driver.
  */
-int rte_eth_dev_tx_queue_stop(uint8_t port_id, uint16_t tx_queue_id);
+int rte_eth_dev_tx_queue_stop(uint16_t port_id, uint16_t tx_queue_id);
 
 
 
@@ -2097,7 +2097,7 @@ int rte_eth_dev_tx_queue_stop(uint8_t port_id, uint16_t tx_queue_id);
  *   - 0: Success, Ethernet device started.
  *   - <0: Error code of the driver device start function.
  */
-int rte_eth_dev_start(uint8_t port_id);
+int rte_eth_dev_start(uint16_t port_id);
 
 /**
  * Stop an Ethernet device. The device can be restarted with a call to
@@ -2106,7 +2106,7 @@ int rte_eth_dev_start(uint8_t port_id);
  * @param port_id
  *   The port identifier of the Ethernet device.
  */
-void rte_eth_dev_stop(uint8_t port_id);
+void rte_eth_dev_stop(uint16_t port_id);
 
 
 /**
@@ -2121,7 +2121,7 @@ void rte_eth_dev_stop(uint8_t port_id);
  *   - 0: Success, Ethernet device linked up.
  *   - <0: Error code of the driver device link up function.
  */
-int rte_eth_dev_set_link_up(uint8_t port_id);
+int rte_eth_dev_set_link_up(uint16_t port_id);
 
 /**
  * Link down an Ethernet device.
@@ -2132,7 +2132,7 @@ int rte_eth_dev_set_link_up(uint8_t port_id);
  * @param port_id
  *   The port identifier of the Ethernet device.
  */
-int rte_eth_dev_set_link_down(uint8_t port_id);
+int rte_eth_dev_set_link_down(uint16_t port_id);
 
 /**
  * Close a stopped Ethernet device. The device cannot be restarted!
@@ -2142,7 +2142,7 @@ int rte_eth_dev_set_link_down(uint8_t port_id);
  * @param port_id
  *   The port identifier of the Ethernet device.
  */
-void rte_eth_dev_close(uint8_t port_id);
+void rte_eth_dev_close(uint16_t port_id);
 
 /**
  * Reset a Ethernet device and keep its port id.
@@ -2172,7 +2172,7 @@ void rte_eth_dev_close(uint8_t port_id);
  * @param port_id
  *   The port identifier of the Ethernet device.
  */
-int rte_eth_dev_reset(uint8_t port_id);
+int rte_eth_dev_reset(uint16_t port_id);
 
 /**
  * Enable receipt in promiscuous mode for an Ethernet device.
@@ -2180,7 +2180,7 @@ int rte_eth_dev_reset(uint8_t port_id);
  * @param port_id
  *   The port identifier of the Ethernet device.
  */
-void rte_eth_promiscuous_enable(uint8_t port_id);
+void rte_eth_promiscuous_enable(uint16_t port_id);
 
 /**
  * Disable receipt in promiscuous mode for an Ethernet device.
@@ -2188,7 +2188,7 @@ void rte_eth_promiscuous_enable(uint8_t port_id);
  * @param port_id
  *   The port identifier of the Ethernet device.
  */
-void rte_eth_promiscuous_disable(uint8_t port_id);
+void rte_eth_promiscuous_disable(uint16_t port_id);
 
 /**
  * Return the value of promiscuous mode for an Ethernet device.
@@ -2200,7 +2200,7 @@ void rte_eth_promiscuous_disable(uint8_t port_id);
  *   - (0) if promiscuous is disabled.
  *   - (-1) on error
  */
-int rte_eth_promiscuous_get(uint8_t port_id);
+int rte_eth_promiscuous_get(uint16_t port_id);
 
 /**
  * Enable the receipt of any multicast frame by an Ethernet device.
@@ -2208,7 +2208,7 @@ int rte_eth_promiscuous_get(uint8_t port_id);
  * @param port_id
  *   The port identifier of the Ethernet device.
  */
-void rte_eth_allmulticast_enable(uint8_t port_id);
+void rte_eth_allmulticast_enable(uint16_t port_id);
 
 /**
  * Disable the receipt of all multicast frames by an Ethernet device.
@@ -2216,7 +2216,7 @@ void rte_eth_allmulticast_enable(uint8_t port_id);
  * @param port_id
  *   The port identifier of the Ethernet device.
  */
-void rte_eth_allmulticast_disable(uint8_t port_id);
+void rte_eth_allmulticast_disable(uint16_t port_id);
 
 /**
  * Return the value of allmulticast mode for an Ethernet device.
@@ -2228,7 +2228,7 @@ void rte_eth_allmulticast_disable(uint8_t port_id);
  *   - (0) if allmulticast is disabled.
  *   - (-1) on error
  */
-int rte_eth_allmulticast_get(uint8_t port_id);
+int rte_eth_allmulticast_get(uint16_t port_id);
 
 /**
  * Retrieve the status (ON/OFF), the speed (in Mbps) and the mode (HALF-DUPLEX
@@ -2241,7 +2241,7 @@ int rte_eth_allmulticast_get(uint8_t port_id);
  *   A pointer to an *rte_eth_link* structure to be filled with
  *   the status, the speed and the mode of the Ethernet device link.
  */
-void rte_eth_link_get(uint8_t port_id, struct rte_eth_link *link);
+void rte_eth_link_get(uint16_t port_id, struct rte_eth_link *link);
 
 /**
  * Retrieve the status (ON/OFF), the speed (in Mbps) and the mode (HALF-DUPLEX
@@ -2254,7 +2254,7 @@ void rte_eth_link_get(uint8_t port_id, struct rte_eth_link *link);
  *   A pointer to an *rte_eth_link* structure to be filled with
  *   the status, the speed and the mode of the Ethernet device link.
  */
-void rte_eth_link_get_nowait(uint8_t port_id, struct rte_eth_link *link);
+void rte_eth_link_get_nowait(uint16_t port_id, struct rte_eth_link *link);
 
 /**
  * Retrieve the general I/O statistics of an Ethernet device.
@@ -2273,7 +2273,7 @@ void rte_eth_link_get_nowait(uint8_t port_id, struct rte_eth_link *link);
  * @return
  *   Zero if successful. Non-zero otherwise.
  */
-int rte_eth_stats_get(uint8_t port_id, struct rte_eth_stats *stats);
+int rte_eth_stats_get(uint16_t port_id, struct rte_eth_stats *stats);
 
 /**
  * Reset the general I/O statistics of an Ethernet device.
@@ -2281,7 +2281,7 @@ int rte_eth_stats_get(uint8_t port_id, struct rte_eth_stats *stats);
  * @param port_id
  *   The port identifier of the Ethernet device.
  */
-void rte_eth_stats_reset(uint8_t port_id);
+void rte_eth_stats_reset(uint16_t port_id);
 
 /**
  * Retrieve names of extended statistics of an Ethernet device.
@@ -2303,7 +2303,7 @@ void rte_eth_stats_reset(uint8_t port_id);
  *     shall not be used by the caller.
  *   - A negative value on error (invalid port id).
  */
-int rte_eth_xstats_get_names(uint8_t port_id,
+int rte_eth_xstats_get_names(uint16_t port_id,
 		struct rte_eth_xstat_name *xstats_names,
 		unsigned int size);
 
@@ -2329,7 +2329,7 @@ int rte_eth_xstats_get_names(uint8_t port_id,
  *     shall not be used by the caller.
  *   - A negative value on error (invalid port id).
  */
-int rte_eth_xstats_get(uint8_t port_id, struct rte_eth_xstat *xstats,
+int rte_eth_xstats_get(uint16_t port_id, struct rte_eth_xstat *xstats,
 		unsigned int n);
 
 /**
@@ -2355,7 +2355,7 @@ int rte_eth_xstats_get(uint8_t port_id, struct rte_eth_xstat *xstats,
  *   - A negative value on error (invalid port id).
  */
 int
-rte_eth_xstats_get_names_by_id(uint8_t port_id,
+rte_eth_xstats_get_names_by_id(uint16_t port_id,
 	struct rte_eth_xstat_name *xstats_names, unsigned int size,
 	uint64_t *ids);
 
@@ -2382,7 +2382,7 @@ rte_eth_xstats_get_names_by_id(uint8_t port_id,
  *     shall not be used by the caller.
  *   - A negative value on error (invalid port id).
  */
-int rte_eth_xstats_get_by_id(uint8_t port_id, const uint64_t *ids,
+int rte_eth_xstats_get_by_id(uint16_t port_id, const uint64_t *ids,
 			     uint64_t *values, unsigned int n);
 
 /**
@@ -2402,7 +2402,7 @@ int rte_eth_xstats_get_by_id(uint8_t port_id, const uint64_t *ids,
  *    -ENODEV for invalid port_id,
  *    -EINVAL if the xstat_name doesn't exist in port_id
  */
-int rte_eth_xstats_get_id_by_name(uint8_t port_id, const char *xstat_name,
+int rte_eth_xstats_get_id_by_name(uint16_t port_id, const char *xstat_name,
 		uint64_t *id);
 
 /**
@@ -2411,7 +2411,7 @@ int rte_eth_xstats_get_id_by_name(uint8_t port_id, const char *xstat_name,
  * @param port_id
  *   The port identifier of the Ethernet device.
  */
-void rte_eth_xstats_reset(uint8_t port_id);
+void rte_eth_xstats_reset(uint16_t port_id);
 
 /**
  *  Set a mapping for the specified transmit queue to the specified per-queue
@@ -2430,7 +2430,7 @@ void rte_eth_xstats_reset(uint8_t port_id);
  * @return
  *   Zero if successful. Non-zero otherwise.
  */
-int rte_eth_dev_set_tx_queue_stats_mapping(uint8_t port_id,
+int rte_eth_dev_set_tx_queue_stats_mapping(uint16_t port_id,
 		uint16_t tx_queue_id, uint8_t stat_idx);
 
 /**
@@ -2450,7 +2450,7 @@ int rte_eth_dev_set_tx_queue_stats_mapping(uint8_t port_id,
  * @return
  *   Zero if successful. Non-zero otherwise.
  */
-int rte_eth_dev_set_rx_queue_stats_mapping(uint8_t port_id,
+int rte_eth_dev_set_rx_queue_stats_mapping(uint16_t port_id,
 					   uint16_t rx_queue_id,
 					   uint8_t stat_idx);
 
@@ -2463,7 +2463,7 @@ int rte_eth_dev_set_rx_queue_stats_mapping(uint8_t port_id,
  *   A pointer to a structure of type *ether_addr* to be filled with
  *   the Ethernet address of the Ethernet device.
  */
-void rte_eth_macaddr_get(uint8_t port_id, struct ether_addr *mac_addr);
+void rte_eth_macaddr_get(uint16_t port_id, struct ether_addr *mac_addr);
 
 /**
  * Retrieve the contextual information of an Ethernet device.
@@ -2474,7 +2474,7 @@ void rte_eth_macaddr_get(uint8_t port_id, struct ether_addr *mac_addr);
  *   A pointer to a structure of type *rte_eth_dev_info* to be filled with
  *   the contextual information of the Ethernet device.
  */
-void rte_eth_dev_info_get(uint8_t port_id, struct rte_eth_dev_info *dev_info);
+void rte_eth_dev_info_get(uint16_t port_id, struct rte_eth_dev_info *dev_info);
 
 /**
  * Retrieve the firmware version of a device.
@@ -2494,7 +2494,7 @@ void rte_eth_dev_info_get(uint8_t port_id, struct rte_eth_dev_info *dev_info);
  *   - (>0) if *fw_size* is not enough to store firmware version, return
  *          the size of the non truncated string.
  */
-int rte_eth_dev_fw_version_get(uint8_t port_id,
+int rte_eth_dev_fw_version_get(uint16_t port_id,
 			       char *fw_version, size_t fw_size);
 
 /**
@@ -2535,7 +2535,7 @@ int rte_eth_dev_fw_version_get(uint8_t port_id,
  *           count of supported ptypes will be returned.
  *   - (-ENODEV) if *port_id* invalid.
  */
-int rte_eth_dev_get_supported_ptypes(uint8_t port_id, uint32_t ptype_mask,
+int rte_eth_dev_get_supported_ptypes(uint16_t port_id, uint32_t ptype_mask,
 				     uint32_t *ptypes, int num);
 
 /**
@@ -2549,7 +2549,7 @@ int rte_eth_dev_get_supported_ptypes(uint8_t port_id, uint32_t ptype_mask,
  *   - (0) if successful.
  *   - (-ENODEV) if *port_id* invalid.
  */
-int rte_eth_dev_get_mtu(uint8_t port_id, uint16_t *mtu);
+int rte_eth_dev_get_mtu(uint16_t port_id, uint16_t *mtu);
 
 /**
  * Change the MTU of an Ethernet device.
@@ -2565,7 +2565,7 @@ int rte_eth_dev_get_mtu(uint8_t port_id, uint16_t *mtu);
  *   - (-EINVAL) if *mtu* invalid.
  *   - (-EBUSY) if operation is not allowed when the port is running
  */
-int rte_eth_dev_set_mtu(uint8_t port_id, uint16_t mtu);
+int rte_eth_dev_set_mtu(uint16_t port_id, uint16_t mtu);
 
 /**
  * Enable/Disable hardware filtering by an Ethernet device of received
@@ -2585,7 +2585,7 @@ int rte_eth_dev_set_mtu(uint8_t port_id, uint16_t mtu);
  *   - (-ENOSYS) if VLAN filtering on *port_id* disabled.
  *   - (-EINVAL) if *vlan_id* > 4095.
  */
-int rte_eth_dev_vlan_filter(uint8_t port_id, uint16_t vlan_id, int on);
+int rte_eth_dev_vlan_filter(uint16_t port_id, uint16_t vlan_id, int on);
 
 /**
  * Enable/Disable hardware VLAN Strip by a rx queue of an Ethernet device.
@@ -2606,7 +2606,7 @@ int rte_eth_dev_vlan_filter(uint8_t port_id, uint16_t vlan_id, int on);
  *   - (-ENODEV) if *port_id* invalid.
  *   - (-EINVAL) if *rx_queue_id* invalid.
  */
-int rte_eth_dev_set_vlan_strip_on_queue(uint8_t port_id, uint16_t rx_queue_id,
+int rte_eth_dev_set_vlan_strip_on_queue(uint16_t port_id, uint16_t rx_queue_id,
 		int on);
 
 /**
@@ -2625,7 +2625,7 @@ int rte_eth_dev_set_vlan_strip_on_queue(uint8_t port_id, uint16_t rx_queue_id,
  *   - (-ENOSUP) if hardware-assisted VLAN TPID setup is not supported.
  *   - (-ENODEV) if *port_id* invalid.
  */
-int rte_eth_dev_set_vlan_ether_type(uint8_t port_id,
+int rte_eth_dev_set_vlan_ether_type(uint16_t port_id,
 				    enum rte_vlan_type vlan_type,
 				    uint16_t tag_type);
 
@@ -2649,7 +2649,7 @@ int rte_eth_dev_set_vlan_ether_type(uint8_t port_id,
  *   - (-ENOSUP) if hardware-assisted VLAN filtering not configured.
  *   - (-ENODEV) if *port_id* invalid.
  */
-int rte_eth_dev_set_vlan_offload(uint8_t port_id, int offload_mask);
+int rte_eth_dev_set_vlan_offload(uint16_t port_id, int offload_mask);
 
 /**
  * Read VLAN Offload configuration from an Ethernet device
@@ -2663,7 +2663,7 @@ int rte_eth_dev_set_vlan_offload(uint8_t port_id, int offload_mask);
  *       ETH_VLAN_EXTEND_OFFLOAD
  *   - (-ENODEV) if *port_id* invalid.
  */
-int rte_eth_dev_get_vlan_offload(uint8_t port_id);
+int rte_eth_dev_get_vlan_offload(uint16_t port_id);
 
 /**
  * Set port based TX VLAN insertion on or off.
@@ -2679,7 +2679,7 @@ int rte_eth_dev_get_vlan_offload(uint8_t port_id);
  *   - (0) if successful.
  *   - negative if failed.
  */
-int rte_eth_dev_set_vlan_pvid(uint8_t port_id, uint16_t pvid, int on);
+int rte_eth_dev_set_vlan_pvid(uint16_t port_id, uint16_t pvid, int on);
 
 /**
  *
@@ -2764,7 +2764,7 @@ int rte_eth_dev_set_vlan_pvid(uint8_t port_id, uint16_t pvid, int on);
  *   *rx_pkts* array.
  */
 static inline uint16_t
-rte_eth_rx_burst(uint8_t port_id, uint16_t queue_id,
+rte_eth_rx_burst(uint16_t port_id, uint16_t queue_id,
 		 struct rte_mbuf **rx_pkts, const uint16_t nb_pkts)
 {
 	struct rte_eth_dev *dev = &rte_eth_devices[port_id];
@@ -2809,7 +2809,7 @@ rte_eth_rx_burst(uint8_t port_id, uint16_t queue_id,
  *     (-ENOTSUP) if the device does not support this function
  */
 static inline int
-rte_eth_rx_queue_count(uint8_t port_id, uint16_t queue_id)
+rte_eth_rx_queue_count(uint16_t port_id, uint16_t queue_id)
 {
 	struct rte_eth_dev *dev;
 
@@ -2838,7 +2838,7 @@ rte_eth_rx_queue_count(uint8_t port_id, uint16_t queue_id)
  *  - (-ENOTSUP) if the device does not support this function
  */
 static inline int
-rte_eth_rx_descriptor_done(uint8_t port_id, uint16_t queue_id, uint16_t offset)
+rte_eth_rx_descriptor_done(uint16_t port_id, uint16_t queue_id, uint16_t offset)
 {
 	struct rte_eth_dev *dev = &rte_eth_devices[port_id];
 	RTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -ENODEV);
@@ -2885,7 +2885,7 @@ rte_eth_rx_descriptor_done(uint8_t port_id, uint16_t queue_id, uint16_t offset)
  *  - (-ENODEV) bad port or queue (only if compiled with debug).
  */
 static inline int
-rte_eth_rx_descriptor_status(uint8_t port_id, uint16_t queue_id,
+rte_eth_rx_descriptor_status(uint16_t port_id, uint16_t queue_id,
 	uint16_t offset)
 {
 	struct rte_eth_dev *dev;
@@ -2942,7 +2942,7 @@ rte_eth_rx_descriptor_status(uint8_t port_id, uint16_t queue_id,
  *  - (-ENOTSUP) if the device does not support this function.
  *  - (-ENODEV) bad port or queue (only if compiled with debug).
  */
-static inline int rte_eth_tx_descriptor_status(uint8_t port_id,
+static inline int rte_eth_tx_descriptor_status(uint16_t port_id,
 	uint16_t queue_id, uint16_t offset)
 {
 	struct rte_eth_dev *dev;
@@ -3026,7 +3026,7 @@ static inline int rte_eth_tx_descriptor_status(uint8_t port_id,
  *   *tx_pkts* parameter when the transmit ring is full or has been filled up.
  */
 static inline uint16_t
-rte_eth_tx_burst(uint8_t port_id, uint16_t queue_id,
+rte_eth_tx_burst(uint16_t port_id, uint16_t queue_id,
 		 struct rte_mbuf **tx_pkts, uint16_t nb_pkts)
 {
 	struct rte_eth_dev *dev = &rte_eth_devices[port_id];
@@ -3115,7 +3115,7 @@ rte_eth_tx_burst(uint8_t port_id, uint16_t queue_id,
 #ifndef RTE_ETHDEV_TX_PREPARE_NOOP
 
 static inline uint16_t
-rte_eth_tx_prepare(uint8_t port_id, uint16_t queue_id,
+rte_eth_tx_prepare(uint16_t port_id, uint16_t queue_id,
 		struct rte_mbuf **tx_pkts, uint16_t nb_pkts)
 {
 	struct rte_eth_dev *dev;
@@ -3157,7 +3157,8 @@ rte_eth_tx_prepare(uint8_t port_id, uint16_t queue_id,
  */
 
 static inline uint16_t
-rte_eth_tx_prepare(__rte_unused uint8_t port_id, __rte_unused uint16_t queue_id,
+rte_eth_tx_prepare(__rte_unused uint16_t port_id,
+		__rte_unused uint16_t queue_id,
 		__rte_unused struct rte_mbuf **tx_pkts, uint16_t nb_pkts)
 {
 	return nb_pkts;
@@ -3226,7 +3227,7 @@ rte_eth_tx_buffer_init(struct rte_eth_dev_tx_buffer *buffer, uint16_t size);
  *   callback is called for any packets which could not be sent.
  */
 static inline uint16_t
-rte_eth_tx_buffer_flush(uint8_t port_id, uint16_t queue_id,
+rte_eth_tx_buffer_flush(uint16_t port_id, uint16_t queue_id,
 		struct rte_eth_dev_tx_buffer *buffer)
 {
 	uint16_t sent;
@@ -3278,7 +3279,7 @@ rte_eth_tx_buffer_flush(uint8_t port_id, uint16_t queue_id,
  *     the rest.
  */
 static __rte_always_inline uint16_t
-rte_eth_tx_buffer(uint8_t port_id, uint16_t queue_id,
+rte_eth_tx_buffer(uint16_t port_id, uint16_t queue_id,
 		struct rte_eth_dev_tx_buffer *buffer, struct rte_mbuf *tx_pkt)
 {
 	buffer->pkts[buffer->length++] = tx_pkt;
@@ -3394,7 +3395,7 @@ rte_eth_tx_buffer_count_callback(struct rte_mbuf **pkts, uint16_t unsent,
  *     are in use.
  */
 int
-rte_eth_tx_done_cleanup(uint8_t port_id, uint16_t queue_id, uint32_t free_cnt);
+rte_eth_tx_done_cleanup(uint16_t port_id, uint16_t queue_id, uint32_t free_cnt);
 
 /**
  * The eth device event type for interrupt, and maybe others in the future.
@@ -3412,7 +3413,7 @@ enum rte_eth_event_type {
 	RTE_ETH_EVENT_MAX       /**< max value of this enum */
 };
 
-typedef int (*rte_eth_dev_cb_fn)(uint8_t port_id,
+typedef int (*rte_eth_dev_cb_fn)(uint16_t port_id,
 		enum rte_eth_event_type event, void *cb_arg, void *ret_param);
 /**< user application callback to be registered for interrupts */
 
@@ -3434,7 +3435,7 @@ typedef int (*rte_eth_dev_cb_fn)(uint8_t port_id,
  *  - On success, zero.
  *  - On failure, a negative value.
  */
-int rte_eth_dev_callback_register(uint8_t port_id,
+int rte_eth_dev_callback_register(uint16_t port_id,
 			enum rte_eth_event_type event,
 		rte_eth_dev_cb_fn cb_fn, void *cb_arg);
 
@@ -3455,7 +3456,7 @@ int rte_eth_dev_callback_register(uint8_t port_id,
  *  - On success, zero.
  *  - On failure, a negative value.
  */
-int rte_eth_dev_callback_unregister(uint8_t port_id,
+int rte_eth_dev_callback_unregister(uint16_t port_id,
 			enum rte_eth_event_type event,
 		rte_eth_dev_cb_fn cb_fn, void *cb_arg);
 
@@ -3501,7 +3502,7 @@ int _rte_eth_dev_callback_process(struct rte_eth_dev *dev,
  *     that operation.
  *   - (-ENODEV) if *port_id* invalid.
  */
-int rte_eth_dev_rx_intr_enable(uint8_t port_id, uint16_t queue_id);
+int rte_eth_dev_rx_intr_enable(uint16_t port_id, uint16_t queue_id);
 
 /**
  * When lcore wakes up from rx interrupt indicating packet coming, disable rx
@@ -3522,7 +3523,7 @@ int rte_eth_dev_rx_intr_enable(uint8_t port_id, uint16_t queue_id);
  *     that operation.
  *   - (-ENODEV) if *port_id* invalid.
  */
-int rte_eth_dev_rx_intr_disable(uint8_t port_id, uint16_t queue_id);
+int rte_eth_dev_rx_intr_disable(uint16_t port_id, uint16_t queue_id);
 
 /**
  * RX Interrupt control per port.
@@ -3541,7 +3542,7 @@ int rte_eth_dev_rx_intr_disable(uint8_t port_id, uint16_t queue_id);
  *   - On success, zero.
  *   - On failure, a negative value.
  */
-int rte_eth_dev_rx_intr_ctl(uint8_t port_id, int epfd, int op, void *data);
+int rte_eth_dev_rx_intr_ctl(uint16_t port_id, int epfd, int op, void *data);
 
 /**
  * RX Interrupt control per queue.
@@ -3564,7 +3565,7 @@ int rte_eth_dev_rx_intr_ctl(uint8_t port_id, int epfd, int op, void *data);
  *   - On success, zero.
  *   - On failure, a negative value.
  */
-int rte_eth_dev_rx_intr_ctl_q(uint8_t port_id, uint16_t queue_id,
+int rte_eth_dev_rx_intr_ctl_q(uint16_t port_id, uint16_t queue_id,
 			      int epfd, int op, void *data);
 
 /**
@@ -3579,7 +3580,7 @@ int rte_eth_dev_rx_intr_ctl_q(uint8_t port_id, uint16_t queue_id,
  *     that operation.
  *   - (-ENODEV) if *port_id* invalid.
  */
-int  rte_eth_led_on(uint8_t port_id);
+int  rte_eth_led_on(uint16_t port_id);
 
 /**
  * Turn off the LED on the Ethernet device.
@@ -3593,7 +3594,7 @@ int  rte_eth_led_on(uint8_t port_id);
  *     that operation.
  *   - (-ENODEV) if *port_id* invalid.
  */
-int  rte_eth_led_off(uint8_t port_id);
+int  rte_eth_led_off(uint16_t port_id);
 
 /**
  * Get current status of the Ethernet link flow control for Ethernet device
@@ -3607,7 +3608,7 @@ int  rte_eth_led_off(uint8_t port_id);
  *   - (-ENOTSUP) if hardware doesn't support flow control.
  *   - (-ENODEV)  if *port_id* invalid.
  */
-int rte_eth_dev_flow_ctrl_get(uint8_t port_id,
+int rte_eth_dev_flow_ctrl_get(uint16_t port_id,
 			      struct rte_eth_fc_conf *fc_conf);
 
 /**
@@ -3624,7 +3625,7 @@ int rte_eth_dev_flow_ctrl_get(uint8_t port_id,
  *   - (-EINVAL)  if bad parameter
  *   - (-EIO)     if flow control setup failure
  */
-int rte_eth_dev_flow_ctrl_set(uint8_t port_id,
+int rte_eth_dev_flow_ctrl_set(uint16_t port_id,
 			      struct rte_eth_fc_conf *fc_conf);
 
 /**
@@ -3642,7 +3643,7 @@ int rte_eth_dev_flow_ctrl_set(uint8_t port_id,
  *   - (-EINVAL)  if bad parameter
  *   - (-EIO)     if flow control setup failure
  */
-int rte_eth_dev_priority_flow_ctrl_set(uint8_t port_id,
+int rte_eth_dev_priority_flow_ctrl_set(uint16_t port_id,
 				struct rte_eth_pfc_conf *pfc_conf);
 
 /**
@@ -3663,7 +3664,7 @@ int rte_eth_dev_priority_flow_ctrl_set(uint8_t port_id,
  *   - (-ENOSPC) if no more MAC addresses can be added.
  *   - (-EINVAL) if MAC address is invalid.
  */
-int rte_eth_dev_mac_addr_add(uint8_t port, struct ether_addr *mac_addr,
+int rte_eth_dev_mac_addr_add(uint16_t port, struct ether_addr *mac_addr,
 				uint32_t pool);
 
 /**
@@ -3679,7 +3680,7 @@ int rte_eth_dev_mac_addr_add(uint8_t port, struct ether_addr *mac_addr,
  *   - (-ENODEV) if *port* invalid.
  *   - (-EADDRINUSE) if attempting to remove the default MAC address
  */
-int rte_eth_dev_mac_addr_remove(uint8_t port, struct ether_addr *mac_addr);
+int rte_eth_dev_mac_addr_remove(uint16_t port, struct ether_addr *mac_addr);
 
 /**
  * Set the default MAC address.
@@ -3694,8 +3695,8 @@ int rte_eth_dev_mac_addr_remove(uint8_t port, struct ether_addr *mac_addr);
  *   - (-ENODEV) if *port* invalid.
  *   - (-EINVAL) if MAC address is invalid.
  */
-int rte_eth_dev_default_mac_addr_set(uint8_t port, struct ether_addr *mac_addr);
-
+int rte_eth_dev_default_mac_addr_set(uint16_t port,
+		struct ether_addr *mac_addr);
 
 /**
  * Update Redirection Table(RETA) of Receive Side Scaling of Ethernet device.
@@ -3712,7 +3713,7 @@ int rte_eth_dev_default_mac_addr_set(uint8_t port, struct ether_addr *mac_addr);
  *   - (-ENOTSUP) if hardware doesn't support.
  *   - (-EINVAL) if bad parameter.
  */
-int rte_eth_dev_rss_reta_update(uint8_t port,
+int rte_eth_dev_rss_reta_update(uint16_t port,
 				struct rte_eth_rss_reta_entry64 *reta_conf,
 				uint16_t reta_size);
 
@@ -3731,7 +3732,7 @@ int rte_eth_dev_rss_reta_update(uint8_t port,
  *   - (-ENOTSUP) if hardware doesn't support.
  *   - (-EINVAL) if bad parameter.
  */
-int rte_eth_dev_rss_reta_query(uint8_t port,
+int rte_eth_dev_rss_reta_query(uint16_t port,
 			       struct rte_eth_rss_reta_entry64 *reta_conf,
 			       uint16_t reta_size);
 
@@ -3753,8 +3754,8 @@ int rte_eth_dev_rss_reta_query(uint8_t port,
   *  - (-ENODEV) if *port_id* invalid.
  *   - (-EINVAL) if bad parameter.
  */
-int rte_eth_dev_uc_hash_table_set(uint8_t port,struct ether_addr *addr,
-					uint8_t on);
+int rte_eth_dev_uc_hash_table_set(uint16_t port, struct ether_addr *addr,
+				  uint8_t on);
 
  /**
  * Updates all unicast hash bitmaps for receiving packet with any Unicast
@@ -3773,7 +3774,7 @@ int rte_eth_dev_uc_hash_table_set(uint8_t port,struct ether_addr *addr,
   *  - (-ENODEV) if *port_id* invalid.
  *   - (-EINVAL) if bad parameter.
  */
-int rte_eth_dev_uc_all_hash_table_set(uint8_t port,uint8_t on);
+int rte_eth_dev_uc_all_hash_table_set(uint16_t port, uint8_t on);
 
 /**
  * Set a traffic mirroring rule on an Ethernet device
@@ -3796,7 +3797,7 @@ int rte_eth_dev_uc_all_hash_table_set(uint8_t port,uint8_t on);
  *   - (-ENODEV) if *port_id* invalid.
  *   - (-EINVAL) if the mr_conf information is not correct.
  */
-int rte_eth_mirror_rule_set(uint8_t port_id,
+int rte_eth_mirror_rule_set(uint16_t port_id,
 			struct rte_eth_mirror_conf *mirror_conf,
 			uint8_t rule_id,
 			uint8_t on);
@@ -3814,7 +3815,7 @@ int rte_eth_mirror_rule_set(uint8_t port_id,
  *   - (-ENODEV) if *port_id* invalid.
  *   - (-EINVAL) if bad parameter.
  */
-int rte_eth_mirror_rule_reset(uint8_t port_id,
+int rte_eth_mirror_rule_reset(uint16_t port_id,
 					 uint8_t rule_id);
 
 /**
@@ -3832,7 +3833,7 @@ int rte_eth_mirror_rule_reset(uint8_t port_id,
  *   - (-ENODEV) if *port_id* invalid.
  *   - (-EINVAL) if bad parameter.
  */
-int rte_eth_set_queue_rate_limit(uint8_t port_id, uint16_t queue_idx,
+int rte_eth_set_queue_rate_limit(uint16_t port_id, uint16_t queue_idx,
 			uint16_t tx_rate);
 
  /**
@@ -3848,7 +3849,7 @@ int rte_eth_set_queue_rate_limit(uint8_t port_id, uint16_t queue_idx,
  *   - (-ENOTSUP) if hardware doesn't support.
  *   - (-EINVAL) if bad parameter.
  */
-int rte_eth_dev_rss_hash_update(uint8_t port_id,
+int rte_eth_dev_rss_hash_update(uint16_t port_id,
 				struct rte_eth_rss_conf *rss_conf);
 
  /**
@@ -3865,7 +3866,7 @@ int rte_eth_dev_rss_hash_update(uint8_t port_id,
  *   - (-ENOTSUP) if hardware doesn't support RSS.
  */
 int
-rte_eth_dev_rss_hash_conf_get(uint8_t port_id,
+rte_eth_dev_rss_hash_conf_get(uint16_t port_id,
 			      struct rte_eth_rss_conf *rss_conf);
 
  /**
@@ -3886,7 +3887,7 @@ rte_eth_dev_rss_hash_conf_get(uint8_t port_id,
  *   - (-ENOTSUP) if hardware doesn't support tunnel type.
  */
 int
-rte_eth_dev_udp_tunnel_port_add(uint8_t port_id,
+rte_eth_dev_udp_tunnel_port_add(uint16_t port_id,
 				struct rte_eth_udp_tunnel *tunnel_udp);
 
  /**
@@ -3908,7 +3909,7 @@ rte_eth_dev_udp_tunnel_port_add(uint8_t port_id,
  *   - (-ENOTSUP) if hardware doesn't support tunnel type.
  */
 int
-rte_eth_dev_udp_tunnel_port_delete(uint8_t port_id,
+rte_eth_dev_udp_tunnel_port_delete(uint16_t port_id,
 				   struct rte_eth_udp_tunnel *tunnel_udp);
 
 /**
@@ -3924,7 +3925,8 @@ rte_eth_dev_udp_tunnel_port_delete(uint8_t port_id,
  *   - (-ENOTSUP) if hardware doesn't support this filter type.
  *   - (-ENODEV) if *port_id* invalid.
  */
-int rte_eth_dev_filter_supported(uint8_t port_id, enum rte_filter_type filter_type);
+int rte_eth_dev_filter_supported(uint16_t port_id,
+		enum rte_filter_type filter_type);
 
 /**
  * Take operations to assigned filter type on an Ethernet device.
@@ -3944,7 +3946,7 @@ int rte_eth_dev_filter_supported(uint8_t port_id, enum rte_filter_type filter_ty
  *   - (-ENODEV) if *port_id* invalid.
  *   - others depends on the specific operations implementation.
  */
-int rte_eth_dev_filter_ctrl(uint8_t port_id, enum rte_filter_type filter_type,
+int rte_eth_dev_filter_ctrl(uint16_t port_id, enum rte_filter_type filter_type,
 			enum rte_filter_op filter_op, void *arg);
 
 /**
@@ -3959,7 +3961,7 @@ int rte_eth_dev_filter_ctrl(uint8_t port_id, enum rte_filter_type filter_type,
  *   - (-ENODEV) if port identifier is invalid.
  *   - (-ENOTSUP) if hardware doesn't support.
  */
-int rte_eth_dev_get_dcb_info(uint8_t port_id,
+int rte_eth_dev_get_dcb_info(uint16_t port_id,
 			     struct rte_eth_dcb_info *dcb_info);
 
 /**
@@ -3986,7 +3988,7 @@ int rte_eth_dev_get_dcb_info(uint8_t port_id,
  *   NULL on error.
  *   On success, a pointer value which can later be used to remove the callback.
  */
-void *rte_eth_add_rx_callback(uint8_t port_id, uint16_t queue_id,
+void *rte_eth_add_rx_callback(uint16_t port_id, uint16_t queue_id,
 		rte_rx_callback_fn fn, void *user_param);
 
 /**
@@ -4014,7 +4016,7 @@ void *rte_eth_add_rx_callback(uint8_t port_id, uint16_t queue_id,
  *   NULL on error.
  *   On success, a pointer value which can later be used to remove the callback.
  */
-void *rte_eth_add_first_rx_callback(uint8_t port_id, uint16_t queue_id,
+void *rte_eth_add_first_rx_callback(uint16_t port_id, uint16_t queue_id,
 		rte_rx_callback_fn fn, void *user_param);
 
 /**
@@ -4041,7 +4043,7 @@ void *rte_eth_add_first_rx_callback(uint8_t port_id, uint16_t queue_id,
  *   NULL on error.
  *   On success, a pointer value which can later be used to remove the callback.
  */
-void *rte_eth_add_tx_callback(uint8_t port_id, uint16_t queue_id,
+void *rte_eth_add_tx_callback(uint16_t port_id, uint16_t queue_id,
 		rte_tx_callback_fn fn, void *user_param);
 
 /**
@@ -4074,7 +4076,7 @@ void *rte_eth_add_tx_callback(uint8_t port_id, uint16_t queue_id,
  *   - -EINVAL:  The port_id or the queue_id is out of range, or the callback
  *               is NULL or not found for the port/queue.
  */
-int rte_eth_remove_rx_callback(uint8_t port_id, uint16_t queue_id,
+int rte_eth_remove_rx_callback(uint16_t port_id, uint16_t queue_id,
 		struct rte_eth_rxtx_callback *user_cb);
 
 /**
@@ -4107,7 +4109,7 @@ int rte_eth_remove_rx_callback(uint8_t port_id, uint16_t queue_id,
  *   - -EINVAL:  The port_id or the queue_id is out of range, or the callback
  *               is NULL or not found for the port/queue.
  */
-int rte_eth_remove_tx_callback(uint8_t port_id, uint16_t queue_id,
+int rte_eth_remove_tx_callback(uint16_t port_id, uint16_t queue_id,
 		struct rte_eth_rxtx_callback *user_cb);
 
 /**
@@ -4127,7 +4129,7 @@ int rte_eth_remove_tx_callback(uint8_t port_id, uint16_t queue_id,
  *   - -ENOTSUP: routine is not supported by the device PMD.
  *   - -EINVAL:  The port_id or the queue_id is out of range.
  */
-int rte_eth_rx_queue_info_get(uint8_t port_id, uint16_t queue_id,
+int rte_eth_rx_queue_info_get(uint16_t port_id, uint16_t queue_id,
 	struct rte_eth_rxq_info *qinfo);
 
 /**
@@ -4147,7 +4149,7 @@ int rte_eth_rx_queue_info_get(uint8_t port_id, uint16_t queue_id,
  *   - -ENOTSUP: routine is not supported by the device PMD.
  *   - -EINVAL:  The port_id or the queue_id is out of range.
  */
-int rte_eth_tx_queue_info_get(uint8_t port_id, uint16_t queue_id,
+int rte_eth_tx_queue_info_get(uint16_t port_id, uint16_t queue_id,
 	struct rte_eth_txq_info *qinfo);
 
 /**
@@ -4166,7 +4168,7 @@ int rte_eth_tx_queue_info_get(uint8_t port_id, uint16_t queue_id,
  *   - (-ENODEV) if *port_id* invalid.
  *   - others depends on the specific operations implementation.
  */
-int rte_eth_dev_get_reg_info(uint8_t port_id, struct rte_dev_reg_info *info);
+int rte_eth_dev_get_reg_info(uint16_t port_id, struct rte_dev_reg_info *info);
 
 /**
  * Retrieve size of device EEPROM
@@ -4179,7 +4181,7 @@ int rte_eth_dev_get_reg_info(uint8_t port_id, struct rte_dev_reg_info *info);
  *   - (-ENODEV) if *port_id* invalid.
  *   - others depends on the specific operations implementation.
  */
-int rte_eth_dev_get_eeprom_length(uint8_t port_id);
+int rte_eth_dev_get_eeprom_length(uint16_t port_id);
 
 /**
  * Retrieve EEPROM and EEPROM attribute
@@ -4195,7 +4197,7 @@ int rte_eth_dev_get_eeprom_length(uint8_t port_id);
  *   - (-ENODEV) if *port_id* invalid.
  *   - others depends on the specific operations implementation.
  */
-int rte_eth_dev_get_eeprom(uint8_t port_id, struct rte_dev_eeprom_info *info);
+int rte_eth_dev_get_eeprom(uint16_t port_id, struct rte_dev_eeprom_info *info);
 
 /**
  * Program EEPROM with provided data
@@ -4211,7 +4213,7 @@ int rte_eth_dev_get_eeprom(uint8_t port_id, struct rte_dev_eeprom_info *info);
  *   - (-ENODEV) if *port_id* invalid.
  *   - others depends on the specific operations implementation.
  */
-int rte_eth_dev_set_eeprom(uint8_t port_id, struct rte_dev_eeprom_info *info);
+int rte_eth_dev_set_eeprom(uint16_t port_id, struct rte_dev_eeprom_info *info);
 
 /**
  * Set the list of multicast addresses to filter on an Ethernet device.
@@ -4230,7 +4232,7 @@ int rte_eth_dev_set_eeprom(uint8_t port_id, struct rte_dev_eeprom_info *info);
  *   - (-ENOTSUP) if PMD of *port_id* doesn't support multicast filtering.
  *   - (-ENOSPC) if *port_id* has not enough multicast filtering resources.
  */
-int rte_eth_dev_set_mc_addr_list(uint8_t port_id,
+int rte_eth_dev_set_mc_addr_list(uint16_t port_id,
 				 struct ether_addr *mc_addr_set,
 				 uint32_t nb_mc_addr);
 
@@ -4245,7 +4247,7 @@ int rte_eth_dev_set_mc_addr_list(uint8_t port_id,
  *   - -ENODEV: The port ID is invalid.
  *   - -ENOTSUP: The function is not supported by the Ethernet driver.
  */
-int rte_eth_timesync_enable(uint8_t port_id);
+int rte_eth_timesync_enable(uint16_t port_id);
 
 /**
  * Disable IEEE1588/802.1AS timestamping for an Ethernet device.
@@ -4258,7 +4260,7 @@ int rte_eth_timesync_enable(uint8_t port_id);
  *   - -ENODEV: The port ID is invalid.
  *   - -ENOTSUP: The function is not supported by the Ethernet driver.
  */
-int rte_eth_timesync_disable(uint8_t port_id);
+int rte_eth_timesync_disable(uint16_t port_id);
 
 /**
  * Read an IEEE1588/802.1AS RX timestamp from an Ethernet device.
@@ -4277,7 +4279,7 @@ int rte_eth_timesync_disable(uint8_t port_id);
  *   - -ENODEV: The port ID is invalid.
  *   - -ENOTSUP: The function is not supported by the Ethernet driver.
  */
-int rte_eth_timesync_read_rx_timestamp(uint8_t port_id,
+int rte_eth_timesync_read_rx_timestamp(uint16_t port_id,
 		struct timespec *timestamp, uint32_t flags);
 
 /**
@@ -4294,7 +4296,7 @@ int rte_eth_timesync_read_rx_timestamp(uint8_t port_id,
  *   - -ENODEV: The port ID is invalid.
  *   - -ENOTSUP: The function is not supported by the Ethernet driver.
  */
-int rte_eth_timesync_read_tx_timestamp(uint8_t port_id,
+int rte_eth_timesync_read_tx_timestamp(uint16_t port_id,
 		struct timespec *timestamp);
 
 /**
@@ -4313,7 +4315,7 @@ int rte_eth_timesync_read_tx_timestamp(uint8_t port_id,
  *   - -ENODEV: The port ID is invalid.
  *   - -ENOTSUP: The function is not supported by the Ethernet driver.
  */
-int rte_eth_timesync_adjust_time(uint8_t port_id, int64_t delta);
+int rte_eth_timesync_adjust_time(uint16_t port_id, int64_t delta);
 
 /**
  * Read the time from the timesync clock on an Ethernet device.
@@ -4329,7 +4331,7 @@ int rte_eth_timesync_adjust_time(uint8_t port_id, int64_t delta);
  * @return
  *   - 0: Success.
  */
-int rte_eth_timesync_read_time(uint8_t port_id, struct timespec *time);
+int rte_eth_timesync_read_time(uint16_t port_id, struct timespec *time);
 
 /**
  * Set the time of the timesync clock on an Ethernet device.
@@ -4348,7 +4350,7 @@ int rte_eth_timesync_read_time(uint8_t port_id, struct timespec *time);
  *   - -ENODEV: The port ID is invalid.
  *   - -ENOTSUP: The function is not supported by the Ethernet driver.
  */
-int rte_eth_timesync_write_time(uint8_t port_id, const struct timespec *time);
+int rte_eth_timesync_write_time(uint16_t port_id, const struct timespec *time);
 
 /**
  * Create memzone for HW rings.
@@ -4389,7 +4391,7 @@ rte_eth_dma_zone_reserve(const struct rte_eth_dev *eth_dev, const char *name,
  *   - (-ENOTSUP) if hardware doesn't support tunnel type.
  */
 int
-rte_eth_dev_l2_tunnel_eth_type_conf(uint8_t port_id,
+rte_eth_dev_l2_tunnel_eth_type_conf(uint16_t port_id,
 				    struct rte_eth_l2_tunnel_conf *l2_tunnel);
 
 /**
@@ -4416,7 +4418,7 @@ rte_eth_dev_l2_tunnel_eth_type_conf(uint8_t port_id,
  *   - (-ENOTSUP) if hardware doesn't support tunnel type.
  */
 int
-rte_eth_dev_l2_tunnel_offload_set(uint8_t port_id,
+rte_eth_dev_l2_tunnel_offload_set(uint16_t port_id,
 				  struct rte_eth_l2_tunnel_conf *l2_tunnel,
 				  uint32_t mask,
 				  uint8_t en);
@@ -4434,7 +4436,7 @@ rte_eth_dev_l2_tunnel_offload_set(uint8_t port_id,
 *   - (-ENODEV or -EINVAL) on failure.
 */
 int
-rte_eth_dev_get_port_by_name(const char *name, uint8_t *port_id);
+rte_eth_dev_get_port_by_name(const char *name, uint16_t *port_id);
 
 /**
 * Get the device name from port id
@@ -4448,7 +4450,7 @@ rte_eth_dev_get_port_by_name(const char *name, uint8_t *port_id);
 *   - (-EINVAL) on failure.
 */
 int
-rte_eth_dev_get_name_by_port(uint8_t port_id, char *name);
+rte_eth_dev_get_name_by_port(uint16_t port_id, char *name);
 
 /**
  * Check that numbers of Rx and Tx descriptors satisfy descriptors limits from
@@ -4466,7 +4468,7 @@ rte_eth_dev_get_name_by_port(uint8_t port_id, char *name);
  *   - (0) if successful.
  *   - (-ENOTSUP, -ENODEV or -EINVAL) on failure.
  */
-int rte_eth_dev_adjust_nb_rx_tx_desc(uint8_t port_id,
+int rte_eth_dev_adjust_nb_rx_tx_desc(uint16_t port_id,
 				     uint16_t *nb_rx_desc,
 				     uint16_t *nb_tx_desc);
 
diff --git a/lib/librte_ether/rte_flow.c b/lib/librte_ether/rte_flow.c
index 2001fbbf4..95d9ee007 100644
--- a/lib/librte_ether/rte_flow.c
+++ b/lib/librte_ether/rte_flow.c
@@ -108,7 +108,7 @@ static const struct rte_flow_desc_data rte_flow_desc_action[] = {
 
 /* Get generic flow operations structure from a port. */
 const struct rte_flow_ops *
-rte_flow_ops_get(uint8_t port_id, struct rte_flow_error *error)
+rte_flow_ops_get(uint16_t port_id, struct rte_flow_error *error)
 {
 	struct rte_eth_dev *dev = &rte_eth_devices[port_id];
 	const struct rte_flow_ops *ops;
diff --git a/lib/librte_ether/rte_flow_driver.h b/lib/librte_ether/rte_flow_driver.h
index 4d95391d8..8573cefa3 100644
--- a/lib/librte_ether/rte_flow_driver.h
+++ b/lib/librte_ether/rte_flow_driver.h
@@ -178,7 +178,7 @@ rte_flow_error_set(struct rte_flow_error *error,
  *   additional details.
  */
 const struct rte_flow_ops *
-rte_flow_ops_get(uint8_t port_id, struct rte_flow_error *error);
+rte_flow_ops_get(uint16_t port_id, struct rte_flow_error *error);
 
 #ifdef __cplusplus
 }
diff --git a/lib/librte_ether/rte_tm.c b/lib/librte_ether/rte_tm.c
index 71679650e..ceac34115 100644
--- a/lib/librte_ether/rte_tm.c
+++ b/lib/librte_ether/rte_tm.c
@@ -40,7 +40,7 @@
 
 /* Get generic traffic manager operations structure from a port. */
 const struct rte_tm_ops *
-rte_tm_ops_get(uint8_t port_id, struct rte_tm_error *error)
+rte_tm_ops_get(uint16_t port_id, struct rte_tm_error *error)
 {
 	struct rte_eth_dev *dev = &rte_eth_devices[port_id];
 	const struct rte_tm_ops *ops;
@@ -87,7 +87,7 @@ rte_tm_ops_get(uint8_t port_id, struct rte_tm_error *error)
 
 /* Get number of leaf nodes */
 int
-rte_tm_get_number_of_leaf_nodes(uint8_t port_id,
+rte_tm_get_number_of_leaf_nodes(uint16_t port_id,
 	uint32_t *n_leaf_nodes,
 	struct rte_tm_error *error)
 {
@@ -113,7 +113,7 @@ rte_tm_get_number_of_leaf_nodes(uint8_t port_id,
 
 /* Check node type (leaf or non-leaf) */
 int
-rte_tm_node_type_get(uint8_t port_id,
+rte_tm_node_type_get(uint16_t port_id,
 	uint32_t node_id,
 	int *is_leaf,
 	struct rte_tm_error *error)
@@ -124,7 +124,7 @@ rte_tm_node_type_get(uint8_t port_id,
 }
 
 /* Get capabilities */
-int rte_tm_capabilities_get(uint8_t port_id,
+int rte_tm_capabilities_get(uint16_t port_id,
 	struct rte_tm_capabilities *cap,
 	struct rte_tm_error *error)
 {
@@ -134,7 +134,7 @@ int rte_tm_capabilities_get(uint8_t port_id,
 }
 
 /* Get level capabilities */
-int rte_tm_level_capabilities_get(uint8_t port_id,
+int rte_tm_level_capabilities_get(uint16_t port_id,
 	uint32_t level_id,
 	struct rte_tm_level_capabilities *cap,
 	struct rte_tm_error *error)
@@ -145,7 +145,7 @@ int rte_tm_level_capabilities_get(uint8_t port_id,
 }
 
 /* Get node capabilities */
-int rte_tm_node_capabilities_get(uint8_t port_id,
+int rte_tm_node_capabilities_get(uint16_t port_id,
 	uint32_t node_id,
 	struct rte_tm_node_capabilities *cap,
 	struct rte_tm_error *error)
@@ -156,7 +156,7 @@ int rte_tm_node_capabilities_get(uint8_t port_id,
 }
 
 /* Add WRED profile */
-int rte_tm_wred_profile_add(uint8_t port_id,
+int rte_tm_wred_profile_add(uint16_t port_id,
 	uint32_t wred_profile_id,
 	struct rte_tm_wred_params *profile,
 	struct rte_tm_error *error)
@@ -167,7 +167,7 @@ int rte_tm_wred_profile_add(uint8_t port_id,
 }
 
 /* Delete WRED profile */
-int rte_tm_wred_profile_delete(uint8_t port_id,
+int rte_tm_wred_profile_delete(uint16_t port_id,
 	uint32_t wred_profile_id,
 	struct rte_tm_error *error)
 {
@@ -177,7 +177,7 @@ int rte_tm_wred_profile_delete(uint8_t port_id,
 }
 
 /* Add/update shared WRED context */
-int rte_tm_shared_wred_context_add_update(uint8_t port_id,
+int rte_tm_shared_wred_context_add_update(uint16_t port_id,
 	uint32_t shared_wred_context_id,
 	uint32_t wred_profile_id,
 	struct rte_tm_error *error)
@@ -188,7 +188,7 @@ int rte_tm_shared_wred_context_add_update(uint8_t port_id,
 }
 
 /* Delete shared WRED context */
-int rte_tm_shared_wred_context_delete(uint8_t port_id,
+int rte_tm_shared_wred_context_delete(uint16_t port_id,
 	uint32_t shared_wred_context_id,
 	struct rte_tm_error *error)
 {
@@ -198,7 +198,7 @@ int rte_tm_shared_wred_context_delete(uint8_t port_id,
 }
 
 /* Add shaper profile */
-int rte_tm_shaper_profile_add(uint8_t port_id,
+int rte_tm_shaper_profile_add(uint16_t port_id,
 	uint32_t shaper_profile_id,
 	struct rte_tm_shaper_params *profile,
 	struct rte_tm_error *error)
@@ -209,7 +209,7 @@ int rte_tm_shaper_profile_add(uint8_t port_id,
 }
 
 /* Delete WRED profile */
-int rte_tm_shaper_profile_delete(uint8_t port_id,
+int rte_tm_shaper_profile_delete(uint16_t port_id,
 	uint32_t shaper_profile_id,
 	struct rte_tm_error *error)
 {
@@ -219,7 +219,7 @@ int rte_tm_shaper_profile_delete(uint8_t port_id,
 }
 
 /* Add shared shaper */
-int rte_tm_shared_shaper_add_update(uint8_t port_id,
+int rte_tm_shared_shaper_add_update(uint16_t port_id,
 	uint32_t shared_shaper_id,
 	uint32_t shaper_profile_id,
 	struct rte_tm_error *error)
@@ -230,7 +230,7 @@ int rte_tm_shared_shaper_add_update(uint8_t port_id,
 }
 
 /* Delete shared shaper */
-int rte_tm_shared_shaper_delete(uint8_t port_id,
+int rte_tm_shared_shaper_delete(uint16_t port_id,
 	uint32_t shared_shaper_id,
 	struct rte_tm_error *error)
 {
@@ -240,7 +240,7 @@ int rte_tm_shared_shaper_delete(uint8_t port_id,
 }
 
 /* Add node to port traffic manager hierarchy */
-int rte_tm_node_add(uint8_t port_id,
+int rte_tm_node_add(uint16_t port_id,
 	uint32_t node_id,
 	uint32_t parent_node_id,
 	uint32_t priority,
@@ -256,7 +256,7 @@ int rte_tm_node_add(uint8_t port_id,
 }
 
 /* Delete node from traffic manager hierarchy */
-int rte_tm_node_delete(uint8_t port_id,
+int rte_tm_node_delete(uint16_t port_id,
 	uint32_t node_id,
 	struct rte_tm_error *error)
 {
@@ -266,7 +266,7 @@ int rte_tm_node_delete(uint8_t port_id,
 }
 
 /* Suspend node */
-int rte_tm_node_suspend(uint8_t port_id,
+int rte_tm_node_suspend(uint16_t port_id,
 	uint32_t node_id,
 	struct rte_tm_error *error)
 {
@@ -276,7 +276,7 @@ int rte_tm_node_suspend(uint8_t port_id,
 }
 
 /* Resume node */
-int rte_tm_node_resume(uint8_t port_id,
+int rte_tm_node_resume(uint16_t port_id,
 	uint32_t node_id,
 	struct rte_tm_error *error)
 {
@@ -286,7 +286,7 @@ int rte_tm_node_resume(uint8_t port_id,
 }
 
 /* Commit the initial port traffic manager hierarchy */
-int rte_tm_hierarchy_commit(uint8_t port_id,
+int rte_tm_hierarchy_commit(uint16_t port_id,
 	int clear_on_fail,
 	struct rte_tm_error *error)
 {
@@ -296,7 +296,7 @@ int rte_tm_hierarchy_commit(uint8_t port_id,
 }
 
 /* Update node parent  */
-int rte_tm_node_parent_update(uint8_t port_id,
+int rte_tm_node_parent_update(uint16_t port_id,
 	uint32_t node_id,
 	uint32_t parent_node_id,
 	uint32_t priority,
@@ -309,7 +309,7 @@ int rte_tm_node_parent_update(uint8_t port_id,
 }
 
 /* Update node private shaper */
-int rte_tm_node_shaper_update(uint8_t port_id,
+int rte_tm_node_shaper_update(uint16_t port_id,
 	uint32_t node_id,
 	uint32_t shaper_profile_id,
 	struct rte_tm_error *error)
@@ -320,7 +320,7 @@ int rte_tm_node_shaper_update(uint8_t port_id,
 }
 
 /* Update node shared shapers */
-int rte_tm_node_shared_shaper_update(uint8_t port_id,
+int rte_tm_node_shared_shaper_update(uint16_t port_id,
 	uint32_t node_id,
 	uint32_t shared_shaper_id,
 	int add,
@@ -332,7 +332,7 @@ int rte_tm_node_shared_shaper_update(uint8_t port_id,
 }
 
 /* Update node stats */
-int rte_tm_node_stats_update(uint8_t port_id,
+int rte_tm_node_stats_update(uint16_t port_id,
 	uint32_t node_id,
 	uint64_t stats_mask,
 	struct rte_tm_error *error)
@@ -343,7 +343,7 @@ int rte_tm_node_stats_update(uint8_t port_id,
 }
 
 /* Update WFQ weight mode */
-int rte_tm_node_wfq_weight_mode_update(uint8_t port_id,
+int rte_tm_node_wfq_weight_mode_update(uint16_t port_id,
 	uint32_t node_id,
 	int *wfq_weight_mode,
 	uint32_t n_sp_priorities,
@@ -355,7 +355,7 @@ int rte_tm_node_wfq_weight_mode_update(uint8_t port_id,
 }
 
 /* Update node congestion management mode */
-int rte_tm_node_cman_update(uint8_t port_id,
+int rte_tm_node_cman_update(uint16_t port_id,
 	uint32_t node_id,
 	enum rte_tm_cman_mode cman,
 	struct rte_tm_error *error)
@@ -366,7 +366,7 @@ int rte_tm_node_cman_update(uint8_t port_id,
 }
 
 /* Update node private WRED context */
-int rte_tm_node_wred_context_update(uint8_t port_id,
+int rte_tm_node_wred_context_update(uint16_t port_id,
 	uint32_t node_id,
 	uint32_t wred_profile_id,
 	struct rte_tm_error *error)
@@ -377,7 +377,7 @@ int rte_tm_node_wred_context_update(uint8_t port_id,
 }
 
 /* Update node shared WRED context */
-int rte_tm_node_shared_wred_context_update(uint8_t port_id,
+int rte_tm_node_shared_wred_context_update(uint16_t port_id,
 	uint32_t node_id,
 	uint32_t shared_wred_context_id,
 	int add,
@@ -389,7 +389,7 @@ int rte_tm_node_shared_wred_context_update(uint8_t port_id,
 }
 
 /* Read and/or clear stats counters for specific node */
-int rte_tm_node_stats_read(uint8_t port_id,
+int rte_tm_node_stats_read(uint16_t port_id,
 	uint32_t node_id,
 	struct rte_tm_node_stats *stats,
 	uint64_t *stats_mask,
@@ -402,7 +402,7 @@ int rte_tm_node_stats_read(uint8_t port_id,
 }
 
 /* Packet marking - VLAN DEI */
-int rte_tm_mark_vlan_dei(uint8_t port_id,
+int rte_tm_mark_vlan_dei(uint16_t port_id,
 	int mark_green,
 	int mark_yellow,
 	int mark_red,
@@ -414,7 +414,7 @@ int rte_tm_mark_vlan_dei(uint8_t port_id,
 }
 
 /* Packet marking - IPv4/IPv6 ECN */
-int rte_tm_mark_ip_ecn(uint8_t port_id,
+int rte_tm_mark_ip_ecn(uint16_t port_id,
 	int mark_green,
 	int mark_yellow,
 	int mark_red,
@@ -426,7 +426,7 @@ int rte_tm_mark_ip_ecn(uint8_t port_id,
 }
 
 /* Packet marking - IPv4/IPv6 DSCP */
-int rte_tm_mark_ip_dscp(uint8_t port_id,
+int rte_tm_mark_ip_dscp(uint16_t port_id,
 	int mark_green,
 	int mark_yellow,
 	int mark_red,
diff --git a/lib/librte_ether/rte_tm.h b/lib/librte_ether/rte_tm.h
index ebbfa1eec..2b25a8715 100644
--- a/lib/librte_ether/rte_tm.h
+++ b/lib/librte_ether/rte_tm.h
@@ -1040,7 +1040,7 @@ struct rte_tm_error {
  *   0 on success, non-zero error code otherwise.
  */
 int
-rte_tm_get_number_of_leaf_nodes(uint8_t port_id,
+rte_tm_get_number_of_leaf_nodes(uint16_t port_id,
 	uint32_t *n_leaf_nodes,
 	struct rte_tm_error *error);
 
@@ -1064,7 +1064,7 @@ rte_tm_get_number_of_leaf_nodes(uint8_t port_id,
  *   0 on success, non-zero error code otherwise.
  */
 int
-rte_tm_node_type_get(uint8_t port_id,
+rte_tm_node_type_get(uint16_t port_id,
 	uint32_t node_id,
 	int *is_leaf,
 	struct rte_tm_error *error);
@@ -1082,7 +1082,7 @@ rte_tm_node_type_get(uint8_t port_id,
  *   0 on success, non-zero error code otherwise.
  */
 int
-rte_tm_capabilities_get(uint8_t port_id,
+rte_tm_capabilities_get(uint16_t port_id,
 	struct rte_tm_capabilities *cap,
 	struct rte_tm_error *error);
 
@@ -1102,7 +1102,7 @@ rte_tm_capabilities_get(uint8_t port_id,
  *   0 on success, non-zero error code otherwise.
  */
 int
-rte_tm_level_capabilities_get(uint8_t port_id,
+rte_tm_level_capabilities_get(uint16_t port_id,
 	uint32_t level_id,
 	struct rte_tm_level_capabilities *cap,
 	struct rte_tm_error *error);
@@ -1122,7 +1122,7 @@ rte_tm_level_capabilities_get(uint8_t port_id,
  *   0 on success, non-zero error code otherwise.
  */
 int
-rte_tm_node_capabilities_get(uint8_t port_id,
+rte_tm_node_capabilities_get(uint16_t port_id,
 	uint32_t node_id,
 	struct rte_tm_node_capabilities *cap,
 	struct rte_tm_error *error);
@@ -1147,7 +1147,7 @@ rte_tm_node_capabilities_get(uint8_t port_id,
  * @see struct rte_tm_capabilities::cman_wred_context_n_max
  */
 int
-rte_tm_wred_profile_add(uint8_t port_id,
+rte_tm_wred_profile_add(uint16_t port_id,
 	uint32_t wred_profile_id,
 	struct rte_tm_wred_params *profile,
 	struct rte_tm_error *error);
@@ -1170,7 +1170,7 @@ rte_tm_wred_profile_add(uint8_t port_id,
  * @see struct rte_tm_capabilities::cman_wred_context_n_max
  */
 int
-rte_tm_wred_profile_delete(uint8_t port_id,
+rte_tm_wred_profile_delete(uint16_t port_id,
 	uint32_t wred_profile_id,
 	struct rte_tm_error *error);
 
@@ -1201,7 +1201,7 @@ rte_tm_wred_profile_delete(uint8_t port_id,
  * @see struct rte_tm_capabilities::cman_wred_context_shared_n_max
  */
 int
-rte_tm_shared_wred_context_add_update(uint8_t port_id,
+rte_tm_shared_wred_context_add_update(uint16_t port_id,
 	uint32_t shared_wred_context_id,
 	uint32_t wred_profile_id,
 	struct rte_tm_error *error);
@@ -1225,7 +1225,7 @@ rte_tm_shared_wred_context_add_update(uint8_t port_id,
  * @see struct rte_tm_capabilities::cman_wred_context_shared_n_max
  */
 int
-rte_tm_shared_wred_context_delete(uint8_t port_id,
+rte_tm_shared_wred_context_delete(uint16_t port_id,
 	uint32_t shared_wred_context_id,
 	struct rte_tm_error *error);
 
@@ -1249,7 +1249,7 @@ rte_tm_shared_wred_context_delete(uint8_t port_id,
  * @see struct rte_tm_capabilities::shaper_n_max
  */
 int
-rte_tm_shaper_profile_add(uint8_t port_id,
+rte_tm_shaper_profile_add(uint16_t port_id,
 	uint32_t shaper_profile_id,
 	struct rte_tm_shaper_params *profile,
 	struct rte_tm_error *error);
@@ -1272,7 +1272,7 @@ rte_tm_shaper_profile_add(uint8_t port_id,
  * @see struct rte_tm_capabilities::shaper_n_max
  */
 int
-rte_tm_shaper_profile_delete(uint8_t port_id,
+rte_tm_shaper_profile_delete(uint16_t port_id,
 	uint32_t shaper_profile_id,
 	struct rte_tm_error *error);
 
@@ -1301,7 +1301,7 @@ rte_tm_shaper_profile_delete(uint8_t port_id,
  * @see struct rte_tm_capabilities::shaper_shared_n_max
  */
 int
-rte_tm_shared_shaper_add_update(uint8_t port_id,
+rte_tm_shared_shaper_add_update(uint16_t port_id,
 	uint32_t shared_shaper_id,
 	uint32_t shaper_profile_id,
 	struct rte_tm_error *error);
@@ -1324,7 +1324,7 @@ rte_tm_shared_shaper_add_update(uint8_t port_id,
  * @see struct rte_tm_capabilities::shaper_shared_n_max
  */
 int
-rte_tm_shared_shaper_delete(uint8_t port_id,
+rte_tm_shared_shaper_delete(uint16_t port_id,
 	uint32_t shared_shaper_id,
 	struct rte_tm_error *error);
 
@@ -1392,7 +1392,7 @@ rte_tm_shared_shaper_delete(uint8_t port_id,
  * @see struct rte_tm_capabilities
  */
 int
-rte_tm_node_add(uint8_t port_id,
+rte_tm_node_add(uint16_t port_id,
 	uint32_t node_id,
 	uint32_t parent_node_id,
 	uint32_t priority,
@@ -1425,7 +1425,7 @@ rte_tm_node_add(uint8_t port_id,
  * @see RTE_TM_UPDATE_NODE_ADD_DELETE
  */
 int
-rte_tm_node_delete(uint8_t port_id,
+rte_tm_node_delete(uint16_t port_id,
 	uint32_t node_id,
 	struct rte_tm_error *error);
 
@@ -1449,7 +1449,7 @@ rte_tm_node_delete(uint8_t port_id,
  * @see RTE_TM_UPDATE_NODE_SUSPEND_RESUME
  */
 int
-rte_tm_node_suspend(uint8_t port_id,
+rte_tm_node_suspend(uint16_t port_id,
 	uint32_t node_id,
 	struct rte_tm_error *error);
 
@@ -1472,7 +1472,7 @@ rte_tm_node_suspend(uint8_t port_id,
  * @see RTE_TM_UPDATE_NODE_SUSPEND_RESUME
  */
 int
-rte_tm_node_resume(uint8_t port_id,
+rte_tm_node_resume(uint16_t port_id,
 	uint32_t node_id,
 	struct rte_tm_error *error);
 
@@ -1513,7 +1513,7 @@ rte_tm_node_resume(uint8_t port_id,
  * @see rte_tm_node_delete()
  */
 int
-rte_tm_hierarchy_commit(uint8_t port_id,
+rte_tm_hierarchy_commit(uint16_t port_id,
 	int clear_on_fail,
 	struct rte_tm_error *error);
 
@@ -1549,7 +1549,7 @@ rte_tm_hierarchy_commit(uint8_t port_id,
  * @see RTE_TM_UPDATE_NODE_PARENT_CHANGE_LEVEL
  */
 int
-rte_tm_node_parent_update(uint8_t port_id,
+rte_tm_node_parent_update(uint16_t port_id,
 	uint32_t node_id,
 	uint32_t parent_node_id,
 	uint32_t priority,
@@ -1578,7 +1578,7 @@ rte_tm_node_parent_update(uint8_t port_id,
  * @see struct rte_tm_capabilities::shaper_private_n_max
  */
 int
-rte_tm_node_shaper_update(uint8_t port_id,
+rte_tm_node_shaper_update(uint16_t port_id,
 	uint32_t node_id,
 	uint32_t shaper_profile_id,
 	struct rte_tm_error *error);
@@ -1605,7 +1605,7 @@ rte_tm_node_shaper_update(uint8_t port_id,
  * @see struct rte_tm_capabilities::shaper_shared_n_max
  */
 int
-rte_tm_node_shared_shaper_update(uint8_t port_id,
+rte_tm_node_shared_shaper_update(uint16_t port_id,
 	uint32_t node_id,
 	uint32_t shared_shaper_id,
 	int add,
@@ -1632,7 +1632,7 @@ rte_tm_node_shared_shaper_update(uint8_t port_id,
  * @see RTE_TM_UPDATE_NODE_STATS
  */
 int
-rte_tm_node_stats_update(uint8_t port_id,
+rte_tm_node_stats_update(uint16_t port_id,
 	uint32_t node_id,
 	uint64_t stats_mask,
 	struct rte_tm_error *error);
@@ -1660,7 +1660,7 @@ rte_tm_node_stats_update(uint8_t port_id,
  * @see RTE_TM_UPDATE_NODE_N_SP_PRIORITIES
  */
 int
-rte_tm_node_wfq_weight_mode_update(uint8_t port_id,
+rte_tm_node_wfq_weight_mode_update(uint16_t port_id,
 	uint32_t node_id,
 	int *wfq_weight_mode,
 	uint32_t n_sp_priorities,
@@ -1683,7 +1683,7 @@ rte_tm_node_wfq_weight_mode_update(uint8_t port_id,
  * @see RTE_TM_UPDATE_NODE_CMAN
  */
 int
-rte_tm_node_cman_update(uint8_t port_id,
+rte_tm_node_cman_update(uint16_t port_id,
 	uint32_t node_id,
 	enum rte_tm_cman_mode cman,
 	struct rte_tm_error *error);
@@ -1707,7 +1707,7 @@ rte_tm_node_cman_update(uint8_t port_id,
  * @see struct rte_tm_capabilities::cman_wred_context_private_n_max
 */
 int
-rte_tm_node_wred_context_update(uint8_t port_id,
+rte_tm_node_wred_context_update(uint16_t port_id,
 	uint32_t node_id,
 	uint32_t wred_profile_id,
 	struct rte_tm_error *error);
@@ -1732,7 +1732,7 @@ rte_tm_node_wred_context_update(uint8_t port_id,
  * @see struct rte_tm_capabilities::cman_wred_context_shared_n_max
  */
 int
-rte_tm_node_shared_wred_context_update(uint8_t port_id,
+rte_tm_node_shared_wred_context_update(uint16_t port_id,
 	uint32_t node_id,
 	uint32_t shared_wred_context_id,
 	int add,
@@ -1764,7 +1764,7 @@ rte_tm_node_shared_wred_context_update(uint8_t port_id,
  * @see enum rte_tm_stats_type
  */
 int
-rte_tm_node_stats_read(uint8_t port_id,
+rte_tm_node_stats_read(uint16_t port_id,
 	uint32_t node_id,
 	struct rte_tm_node_stats *stats,
 	uint64_t *stats_mask,
@@ -1801,7 +1801,7 @@ rte_tm_node_stats_read(uint8_t port_id,
  * @see struct rte_tm_capabilities::mark_vlan_dei_supported
  */
 int
-rte_tm_mark_vlan_dei(uint8_t port_id,
+rte_tm_mark_vlan_dei(uint16_t port_id,
 	int mark_green,
 	int mark_yellow,
 	int mark_red,
@@ -1851,7 +1851,7 @@ rte_tm_mark_vlan_dei(uint8_t port_id,
  * @see struct rte_tm_capabilities::mark_ip_ecn_sctp_supported
  */
 int
-rte_tm_mark_ip_ecn(uint8_t port_id,
+rte_tm_mark_ip_ecn(uint16_t port_id,
 	int mark_green,
 	int mark_yellow,
 	int mark_red,
@@ -1899,7 +1899,7 @@ rte_tm_mark_ip_ecn(uint8_t port_id,
  * @see struct rte_tm_capabilities::mark_ip_dscp_supported
  */
 int
-rte_tm_mark_ip_dscp(uint8_t port_id,
+rte_tm_mark_ip_dscp(uint16_t port_id,
 	int mark_green,
 	int mark_yellow,
 	int mark_red,
diff --git a/lib/librte_ether/rte_tm_driver.h b/lib/librte_ether/rte_tm_driver.h
index a5b698fe0..b2e8ccf80 100644
--- a/lib/librte_ether/rte_tm_driver.h
+++ b/lib/librte_ether/rte_tm_driver.h
@@ -357,7 +357,7 @@ rte_tm_error_set(struct rte_tm_error *error,
  *   success, NULL otherwise.
  */
 const struct rte_tm_ops *
-rte_tm_ops_get(uint8_t port_id, struct rte_tm_error *error);
+rte_tm_ops_get(uint16_t port_id, struct rte_tm_error *error);
 
 #ifdef __cplusplus
 }
diff --git a/lib/librte_kni/rte_kni.h b/lib/librte_kni/rte_kni.h
index 37deb4727..87812cd55 100644
--- a/lib/librte_kni/rte_kni.h
+++ b/lib/librte_kni/rte_kni.h
@@ -63,13 +63,13 @@ struct rte_mbuf;
  * Structure which has the function pointers for KNI interface.
  */
 struct rte_kni_ops {
-	uint8_t port_id; /* Port ID */
+	uint16_t port_id; /* Port ID */
 
 	/* Pointer to function of changing MTU */
-	int (*change_mtu)(uint8_t port_id, unsigned new_mtu);
+	int (*change_mtu)(uint16_t port_id, unsigned int new_mtu);
 
 	/* Pointer to function of configuring network interface */
-	int (*config_network_if)(uint8_t port_id, uint8_t if_up);
+	int (*config_network_if)(uint16_t port_id, uint8_t if_up);
 };
 
 /**
diff --git a/lib/librte_latencystats/rte_latencystats.c b/lib/librte_latencystats/rte_latencystats.c
index ce029a12c..d6ad13c4e 100644
--- a/lib/librte_latencystats/rte_latencystats.c
+++ b/lib/librte_latencystats/rte_latencystats.c
@@ -135,7 +135,7 @@ rte_latencystats_fill_values(struct rte_metric_value *values)
 }
 
 static uint16_t
-add_time_stamps(uint8_t pid __rte_unused,
+add_time_stamps(uint16_t pid __rte_unused,
 		uint16_t qid __rte_unused,
 		struct rte_mbuf **pkts,
 		uint16_t nb_pkts,
@@ -165,7 +165,7 @@ add_time_stamps(uint8_t pid __rte_unused,
 }
 
 static uint16_t
-calc_latency(uint8_t pid __rte_unused,
+calc_latency(uint16_t pid __rte_unused,
 		uint16_t qid __rte_unused,
 		struct rte_mbuf **pkts,
 		uint16_t nb_pkts,
@@ -226,10 +226,10 @@ rte_latencystats_init(uint64_t app_samp_intvl,
 		rte_latency_stats_flow_type_fn user_cb)
 {
 	unsigned int i;
-	uint8_t pid;
+	uint16_t pid;
 	uint16_t qid;
 	struct rxtx_cbs *cbs = NULL;
-	const uint8_t nb_ports = rte_eth_dev_count();
+	const uint16_t nb_ports = rte_eth_dev_count();
 	const char *ptr_strings[NUM_LATENCY_STATS] = {0};
 	const struct rte_memzone *mz = NULL;
 	const unsigned int flags = 0;
@@ -290,11 +290,11 @@ rte_latencystats_init(uint64_t app_samp_intvl,
 int
 rte_latencystats_uninit(void)
 {
-	uint8_t pid;
+	uint16_t pid;
 	uint16_t qid;
 	int ret = 0;
 	struct rxtx_cbs *cbs = NULL;
-	const uint8_t nb_ports = rte_eth_dev_count();
+	const uint16_t nb_ports = rte_eth_dev_count();
 
 	/** De register Rx/Tx callbacks */
 	for (pid = 0; pid < nb_ports; pid++) {
diff --git a/lib/librte_pdump/Makefile b/lib/librte_pdump/Makefile
index 1c03bcbb7..6b21c62e5 100644
--- a/lib/librte_pdump/Makefile
+++ b/lib/librte_pdump/Makefile
@@ -40,7 +40,7 @@ LDLIBS += -lpthread
 
 EXPORT_MAP := rte_pdump_version.map
 
-LIBABIVER := 1
+LIBABIVER := 2
 
 # all source are stored in SRCS-y
 SRCS-$(CONFIG_RTE_LIBRTE_PDUMP) := rte_pdump.c
diff --git a/lib/librte_pdump/rte_pdump.c b/lib/librte_pdump/rte_pdump.c
index 729e79a36..e6182d35c 100644
--- a/lib/librte_pdump/rte_pdump.c
+++ b/lib/librte_pdump/rte_pdump.c
@@ -207,7 +207,7 @@ pdump_copy(struct rte_mbuf **pkts, uint16_t nb_pkts, void *user_params)
 }
 
 static uint16_t
-pdump_rx(uint8_t port __rte_unused, uint16_t qidx __rte_unused,
+pdump_rx(uint16_t port __rte_unused, uint16_t qidx __rte_unused,
 	struct rte_mbuf **pkts, uint16_t nb_pkts,
 	uint16_t max_pkts __rte_unused,
 	void *user_params)
@@ -217,7 +217,7 @@ pdump_rx(uint8_t port __rte_unused, uint16_t qidx __rte_unused,
 }
 
 static uint16_t
-pdump_tx(uint8_t port __rte_unused, uint16_t qidx __rte_unused,
+pdump_tx(uint16_t port __rte_unused, uint16_t qidx __rte_unused,
 		struct rte_mbuf **pkts, uint16_t nb_pkts, void *user_params)
 {
 	pdump_copy(pkts, nb_pkts, user_params);
@@ -225,7 +225,7 @@ pdump_tx(uint8_t port __rte_unused, uint16_t qidx __rte_unused,
 }
 
 static int
-pdump_regitser_rx_callbacks(uint16_t end_q, uint8_t port, uint16_t queue,
+pdump_regitser_rx_callbacks(uint16_t end_q, uint16_t port, uint16_t queue,
 				struct rte_ring *ring, struct rte_mempool *mp,
 				uint16_t operation)
 {
@@ -279,7 +279,7 @@ pdump_regitser_rx_callbacks(uint16_t end_q, uint8_t port, uint16_t queue,
 }
 
 static int
-pdump_regitser_tx_callbacks(uint16_t end_q, uint8_t port, uint16_t queue,
+pdump_regitser_tx_callbacks(uint16_t end_q, uint16_t port, uint16_t queue,
 				struct rte_ring *ring, struct rte_mempool *mp,
 				uint16_t operation)
 {
@@ -337,7 +337,7 @@ static int
 set_pdump_rxtx_cbs(struct pdump_request *p)
 {
 	uint16_t nb_rx_q = 0, nb_tx_q = 0, end_q, queue;
-	uint8_t port;
+	uint16_t port;
 	int ret = 0;
 	uint32_t flags;
 	uint16_t operation;
@@ -764,7 +764,7 @@ pdump_validate_flags(uint32_t flags)
 }
 
 static int
-pdump_validate_port(uint8_t port, char *name)
+pdump_validate_port(uint16_t port, char *name)
 {
 	int ret = 0;
 
@@ -828,7 +828,7 @@ pdump_prepare_client_request(char *device, uint16_t queue,
 }
 
 int
-rte_pdump_enable(uint8_t port, uint16_t queue, uint32_t flags,
+rte_pdump_enable(uint16_t port, uint16_t queue, uint32_t flags,
 			struct rte_ring *ring,
 			struct rte_mempool *mp,
 			void *filter)
@@ -876,7 +876,7 @@ rte_pdump_enable_by_deviceid(char *device_id, uint16_t queue,
 }
 
 int
-rte_pdump_disable(uint8_t port, uint16_t queue, uint32_t flags)
+rte_pdump_disable(uint16_t port, uint16_t queue, uint32_t flags)
 {
 	int ret = 0;
 	char name[DEVICE_ID_SIZE];
diff --git a/lib/librte_pdump/rte_pdump.h b/lib/librte_pdump/rte_pdump.h
index ba6e39b09..4ec0a106f 100644
--- a/lib/librte_pdump/rte_pdump.h
+++ b/lib/librte_pdump/rte_pdump.h
@@ -113,7 +113,7 @@ rte_pdump_uninit(void);
  */
 
 int
-rte_pdump_enable(uint8_t port, uint16_t queue, uint32_t flags,
+rte_pdump_enable(uint16_t port, uint16_t queue, uint32_t flags,
 		struct rte_ring *ring,
 		struct rte_mempool *mp,
 		void *filter);
@@ -136,7 +136,7 @@ rte_pdump_enable(uint8_t port, uint16_t queue, uint32_t flags,
  */
 
 int
-rte_pdump_disable(uint8_t port, uint16_t queue, uint32_t flags);
+rte_pdump_disable(uint16_t port, uint16_t queue, uint32_t flags);
 
 /**
  * Enables packet capturing on given device id and queue.
diff --git a/lib/librte_port/rte_port_ethdev.c b/lib/librte_port/rte_port_ethdev.c
index d5c5fba55..4ed10f276 100644
--- a/lib/librte_port/rte_port_ethdev.c
+++ b/lib/librte_port/rte_port_ethdev.c
@@ -60,7 +60,7 @@ struct rte_port_ethdev_reader {
 	struct rte_port_in_stats stats;
 
 	uint16_t queue_id;
-	uint8_t port_id;
+	uint16_t port_id;
 };
 
 static void *
@@ -156,7 +156,7 @@ struct rte_port_ethdev_writer {
 	uint16_t tx_buf_count;
 	uint64_t bsz_mask;
 	uint16_t queue_id;
-	uint8_t port_id;
+	uint16_t port_id;
 };
 
 static void *
@@ -337,7 +337,7 @@ struct rte_port_ethdev_writer_nodrop {
 	uint64_t bsz_mask;
 	uint64_t n_retries;
 	uint16_t queue_id;
-	uint8_t port_id;
+	uint16_t port_id;
 };
 
 static void *
diff --git a/lib/librte_port/rte_port_ethdev.h b/lib/librte_port/rte_port_ethdev.h
index 201a79e41..f5ed9ab2d 100644
--- a/lib/librte_port/rte_port_ethdev.h
+++ b/lib/librte_port/rte_port_ethdev.h
@@ -54,7 +54,7 @@ extern "C" {
 /** ethdev_reader port parameters */
 struct rte_port_ethdev_reader_params {
 	/** NIC RX port ID */
-	uint8_t port_id;
+	uint16_t port_id;
 
 	/** NIC RX queue ID */
 	uint16_t queue_id;
@@ -66,7 +66,7 @@ extern struct rte_port_in_ops rte_port_ethdev_reader_ops;
 /** ethdev_writer port parameters */
 struct rte_port_ethdev_writer_params {
 	/** NIC RX port ID */
-	uint8_t port_id;
+	uint16_t port_id;
 
 	/** NIC RX queue ID */
 	uint16_t queue_id;
@@ -82,7 +82,7 @@ extern struct rte_port_out_ops rte_port_ethdev_writer_ops;
 /** ethdev_writer_nodrop port parameters */
 struct rte_port_ethdev_writer_nodrop_params {
 	/** NIC RX port ID */
-	uint8_t port_id;
+	uint16_t port_id;
 
 	/** NIC RX queue ID */
 	uint16_t queue_id;
-- 
2.13.3

^ permalink raw reply	[relevance 1%]

* [dpdk-dev] [PATCH v4 2/5] net/i40e: implement dynamic mapping of sw flow types to hw pctypes
  @ 2017-10-02 15:08  3%     ` Kirill Rybalchenko
    1 sibling, 0 replies; 200+ results
From: Kirill Rybalchenko @ 2017-10-02 15:08 UTC (permalink / raw)
  To: dev; +Cc: kirill.rybalchenko, andrey.chilikin, beilei.xing, jingjing.wu

Implement dynamic mapping of software flow types to hardware pctypes.
This allows to add new flow types and pctypes for DDP without changing
API of the driver. The mapping table is located in private
data area for particular network adapter and can be individually
modified with set of appropriate functions.

v2:
Re-arrange patchset to avoid compillation errors.
Remove usage of statically defined flow types and pctypes.

v3:
Change prototypes of some static functions.
Fixe bugs in i40e_pctype_to_flowtype and i40e_flowtype_to_pctype
functions.
Various small modifications after reviewing.

v4:
Change prototypes of some static functions.
Move declaration of automatic variables to beginning of function.
Move declaration of I40E_FILTER_PCTYPE_INVALID to i40e_ethdev.h

Signed-off-by: Kirill Rybalchenko <kirill.rybalchenko@intel.com>
---
 drivers/net/i40e/i40e_ethdev.c    | 344 ++++++++++++--------------------------
 drivers/net/i40e/i40e_ethdev.h    |  22 ++-
 drivers/net/i40e/i40e_ethdev_vf.c |  16 +-
 drivers/net/i40e/i40e_fdir.c      |  54 +++---
 drivers/net/i40e/i40e_flow.c      |   5 +-
 drivers/net/i40e/i40e_rxtx.c      |  57 +++++++
 drivers/net/i40e/i40e_rxtx.h      |   1 +
 7 files changed, 212 insertions(+), 287 deletions(-)

diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c
index 41c4033..6443702 100644
--- a/drivers/net/i40e/i40e_ethdev.c
+++ b/drivers/net/i40e/i40e_ethdev.c
@@ -1070,6 +1070,7 @@ eth_i40e_dev_init(struct rte_eth_dev *dev)
 		return 0;
 	}
 	i40e_set_default_ptype_table(dev);
+	i40e_set_default_pctype_table(dev);
 	pci_dev = RTE_ETH_DEV_TO_PCI(dev);
 	intr_handle = &pci_dev->intr_handle;
 
@@ -3020,7 +3021,7 @@ i40e_dev_info_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info)
 	dev_info->hash_key_size = (I40E_PFQF_HKEY_MAX_INDEX + 1) *
 						sizeof(uint32_t);
 	dev_info->reta_size = pf->hash_lut_size;
-	dev_info->flow_type_rss_offloads = I40E_RSS_OFFLOAD_ALL;
+	dev_info->flow_type_rss_offloads = pf->adapter->flow_types_mask;
 
 	dev_info->default_rxconf = (struct rte_eth_rxconf) {
 		.rx_thresh = {
@@ -6611,104 +6612,36 @@ i40e_vsi_delete_mac(struct i40e_vsi *vsi, struct ether_addr *addr)
 
 /* Configure hash enable flags for RSS */
 uint64_t
-i40e_config_hena(uint64_t flags, enum i40e_mac_type type)
+i40e_config_hena(const struct i40e_adapter *adapter, uint64_t flags)
 {
 	uint64_t hena = 0;
+	int i;
 
 	if (!flags)
 		return hena;
 
-	if (flags & ETH_RSS_FRAG_IPV4)
-		hena |= 1ULL << I40E_FILTER_PCTYPE_FRAG_IPV4;
-	if (flags & ETH_RSS_NONFRAG_IPV4_TCP) {
-		if (type == I40E_MAC_X722) {
-			hena |= (1ULL << I40E_FILTER_PCTYPE_NONF_IPV4_TCP) |
-			 (1ULL << I40E_FILTER_PCTYPE_NONF_IPV4_TCP_SYN_NO_ACK);
-		} else
-			hena |= 1ULL << I40E_FILTER_PCTYPE_NONF_IPV4_TCP;
-	}
-	if (flags & ETH_RSS_NONFRAG_IPV4_UDP) {
-		if (type == I40E_MAC_X722) {
-			hena |= (1ULL << I40E_FILTER_PCTYPE_NONF_IPV4_UDP) |
-			 (1ULL << I40E_FILTER_PCTYPE_NONF_UNICAST_IPV4_UDP) |
-			 (1ULL << I40E_FILTER_PCTYPE_NONF_MULTICAST_IPV4_UDP);
-		} else
-			hena |= 1ULL << I40E_FILTER_PCTYPE_NONF_IPV4_UDP;
-	}
-	if (flags & ETH_RSS_NONFRAG_IPV4_SCTP)
-		hena |= 1ULL << I40E_FILTER_PCTYPE_NONF_IPV4_SCTP;
-	if (flags & ETH_RSS_NONFRAG_IPV4_OTHER)
-		hena |= 1ULL << I40E_FILTER_PCTYPE_NONF_IPV4_OTHER;
-	if (flags & ETH_RSS_FRAG_IPV6)
-		hena |= 1ULL << I40E_FILTER_PCTYPE_FRAG_IPV6;
-	if (flags & ETH_RSS_NONFRAG_IPV6_TCP) {
-		if (type == I40E_MAC_X722) {
-			hena |= (1ULL << I40E_FILTER_PCTYPE_NONF_IPV6_TCP) |
-			 (1ULL << I40E_FILTER_PCTYPE_NONF_IPV6_TCP_SYN_NO_ACK);
-		} else
-			hena |= 1ULL << I40E_FILTER_PCTYPE_NONF_IPV6_TCP;
+	for (i = RTE_ETH_FLOW_UNKNOWN + 1; i < I40E_FLOW_TYPE_MAX; i++) {
+		if (flags & (1ULL << i))
+			hena |= adapter->pctypes_tbl[i];
 	}
-	if (flags & ETH_RSS_NONFRAG_IPV6_UDP) {
-		if (type == I40E_MAC_X722) {
-			hena |= (1ULL << I40E_FILTER_PCTYPE_NONF_IPV6_UDP) |
-			 (1ULL << I40E_FILTER_PCTYPE_NONF_UNICAST_IPV6_UDP) |
-			 (1ULL << I40E_FILTER_PCTYPE_NONF_MULTICAST_IPV6_UDP);
-		} else
-			hena |= 1ULL << I40E_FILTER_PCTYPE_NONF_IPV6_UDP;
-	}
-	if (flags & ETH_RSS_NONFRAG_IPV6_SCTP)
-		hena |= 1ULL << I40E_FILTER_PCTYPE_NONF_IPV6_SCTP;
-	if (flags & ETH_RSS_NONFRAG_IPV6_OTHER)
-		hena |= 1ULL << I40E_FILTER_PCTYPE_NONF_IPV6_OTHER;
-	if (flags & ETH_RSS_L2_PAYLOAD)
-		hena |= 1ULL << I40E_FILTER_PCTYPE_L2_PAYLOAD;
 
 	return hena;
 }
 
 /* Parse the hash enable flags */
 uint64_t
-i40e_parse_hena(uint64_t flags)
+i40e_parse_hena(const struct i40e_adapter *adapter, uint64_t flags)
 {
 	uint64_t rss_hf = 0;
 
 	if (!flags)
 		return rss_hf;
-	if (flags & (1ULL << I40E_FILTER_PCTYPE_FRAG_IPV4))
-		rss_hf |= ETH_RSS_FRAG_IPV4;
-	if (flags & (1ULL << I40E_FILTER_PCTYPE_NONF_IPV4_TCP))
-		rss_hf |= ETH_RSS_NONFRAG_IPV4_TCP;
-	if (flags & (1ULL << I40E_FILTER_PCTYPE_NONF_IPV4_TCP_SYN_NO_ACK))
-		rss_hf |= ETH_RSS_NONFRAG_IPV4_TCP;
-	if (flags & (1ULL << I40E_FILTER_PCTYPE_NONF_IPV4_UDP))
-		rss_hf |= ETH_RSS_NONFRAG_IPV4_UDP;
-	if (flags & (1ULL << I40E_FILTER_PCTYPE_NONF_UNICAST_IPV4_UDP))
-		rss_hf |= ETH_RSS_NONFRAG_IPV4_UDP;
-	if (flags & (1ULL << I40E_FILTER_PCTYPE_NONF_MULTICAST_IPV4_UDP))
-		rss_hf |= ETH_RSS_NONFRAG_IPV4_UDP;
-	if (flags & (1ULL << I40E_FILTER_PCTYPE_NONF_IPV4_SCTP))
-		rss_hf |= ETH_RSS_NONFRAG_IPV4_SCTP;
-	if (flags & (1ULL << I40E_FILTER_PCTYPE_NONF_IPV4_OTHER))
-		rss_hf |= ETH_RSS_NONFRAG_IPV4_OTHER;
-	if (flags & (1ULL << I40E_FILTER_PCTYPE_FRAG_IPV6))
-		rss_hf |= ETH_RSS_FRAG_IPV6;
-	if (flags & (1ULL << I40E_FILTER_PCTYPE_NONF_IPV6_TCP))
-		rss_hf |= ETH_RSS_NONFRAG_IPV6_TCP;
-	if (flags & (1ULL << I40E_FILTER_PCTYPE_NONF_IPV6_TCP_SYN_NO_ACK))
-		rss_hf |= ETH_RSS_NONFRAG_IPV6_TCP;
-	if (flags & (1ULL << I40E_FILTER_PCTYPE_NONF_IPV6_UDP))
-		rss_hf |= ETH_RSS_NONFRAG_IPV6_UDP;
-	if (flags & (1ULL << I40E_FILTER_PCTYPE_NONF_UNICAST_IPV6_UDP))
-		rss_hf |= ETH_RSS_NONFRAG_IPV6_UDP;
-	if (flags & (1ULL << I40E_FILTER_PCTYPE_NONF_MULTICAST_IPV6_UDP))
-		rss_hf |= ETH_RSS_NONFRAG_IPV6_UDP;
-	if (flags & (1ULL << I40E_FILTER_PCTYPE_NONF_IPV6_SCTP))
-		rss_hf |= ETH_RSS_NONFRAG_IPV6_SCTP;
-	if (flags & (1ULL << I40E_FILTER_PCTYPE_NONF_IPV6_OTHER))
-		rss_hf |= ETH_RSS_NONFRAG_IPV6_OTHER;
-	if (flags & (1ULL << I40E_FILTER_PCTYPE_L2_PAYLOAD))
-		rss_hf |= ETH_RSS_L2_PAYLOAD;
+	int i;
 
+	for (i = RTE_ETH_FLOW_UNKNOWN + 1; i < I40E_FLOW_TYPE_MAX; i++) {
+		if (flags & adapter->pctypes_tbl[i])
+			rss_hf |= (1ULL << i);
+	}
 	return rss_hf;
 }
 
@@ -6799,7 +6732,7 @@ i40e_hw_rss_hash_set(struct i40e_pf *pf, struct rte_eth_rss_conf *rss_conf)
 	if (ret)
 		return ret;
 
-	hena = i40e_config_hena(rss_conf->rss_hf, hw->mac.type);
+	hena = i40e_config_hena(pf->adapter, rss_conf->rss_hf);
 	i40e_write_rx_ctl(hw, I40E_PFQF_HENA(0), (uint32_t)hena);
 	i40e_write_rx_ctl(hw, I40E_PFQF_HENA(1), (uint32_t)(hena >> 32));
 	I40E_WRITE_FLUSH(hw);
@@ -6813,14 +6746,13 @@ i40e_dev_rss_hash_update(struct rte_eth_dev *dev,
 {
 	struct i40e_pf *pf = I40E_DEV_PRIVATE_TO_PF(dev->data->dev_private);
 	struct i40e_hw *hw = I40E_DEV_PRIVATE_TO_HW(dev->data->dev_private);
-	uint64_t rss_hf = rss_conf->rss_hf & I40E_RSS_OFFLOAD_ALL;
+	uint64_t rss_hf = rss_conf->rss_hf & pf->adapter->flow_types_mask;
 	uint64_t hena;
 
 	hena = (uint64_t)i40e_read_rx_ctl(hw, I40E_PFQF_HENA(0));
 	hena |= ((uint64_t)i40e_read_rx_ctl(hw, I40E_PFQF_HENA(1))) << 32;
-	if (!(hena & ((hw->mac.type == I40E_MAC_X722)
-		 ? I40E_RSS_HENA_ALL_X722
-		 : I40E_RSS_HENA_ALL))) { /* RSS disabled */
+
+	if (!(hena & pf->adapter->pctypes_mask)) { /* RSS disabled */
 		if (rss_hf != 0) /* Enable RSS */
 			return -EINVAL;
 		return 0; /* Nothing to do */
@@ -6845,7 +6777,7 @@ i40e_dev_rss_hash_conf_get(struct rte_eth_dev *dev,
 
 	hena = (uint64_t)i40e_read_rx_ctl(hw, I40E_PFQF_HENA(0));
 	hena |= ((uint64_t)i40e_read_rx_ctl(hw, I40E_PFQF_HENA(1))) << 32;
-	rss_conf->rss_hf = i40e_parse_hena(hena);
+	rss_conf->rss_hf = i40e_parse_hena(pf->adapter, hena);
 
 	return 0;
 }
@@ -7620,7 +7552,7 @@ i40e_pf_config_rss(struct i40e_pf *pf)
 	}
 
 	rss_conf = pf->dev_data->dev_conf.rx_adv_conf.rss_conf;
-	if ((rss_conf.rss_hf & I40E_RSS_OFFLOAD_ALL) == 0) {
+	if ((rss_conf.rss_hf & pf->adapter->flow_types_mask) == 0) {
 		i40e_pf_disable_rss(pf);
 		return 0;
 	}
@@ -7841,9 +7773,9 @@ static int
 i40e_get_hash_filter_global_config(struct i40e_hw *hw,
 				   struct rte_eth_hash_global_conf *g_cfg)
 {
-	uint32_t reg, mask = I40E_FLOW_TYPES;
-	uint16_t i;
-	enum i40e_filter_pctype pctype;
+	struct i40e_adapter *adapter = (struct i40e_adapter *)hw->back;
+	uint32_t reg;
+	uint16_t i, j;
 
 	memset(g_cfg, 0, sizeof(*g_cfg));
 	reg = i40e_read_rx_ctl(hw, I40E_GLQF_CTL);
@@ -7854,29 +7786,37 @@ i40e_get_hash_filter_global_config(struct i40e_hw *hw,
 	PMD_DRV_LOG(DEBUG, "Hash function is %s",
 		(reg & I40E_GLQF_CTL_HTOEP_MASK) ? "Toeplitz" : "Simple XOR");
 
-	for (i = 0; mask && i < RTE_ETH_FLOW_MAX; i++) {
-		if (!(mask & (1UL << i)))
-			continue;
-		mask &= ~(1UL << i);
-		/* Bit set indicats the coresponding flow type is supported */
-		g_cfg->valid_bit_mask[0] |= (1UL << i);
-		/* if flowtype is invalid, continue */
-		if (!I40E_VALID_FLOW(i))
-			continue;
-		pctype = i40e_flowtype_to_pctype(i);
-		reg = i40e_read_rx_ctl(hw, I40E_GLQF_HSYM(pctype));
-		if (reg & I40E_GLQF_HSYM_SYMH_ENA_MASK)
-			g_cfg->sym_hash_enable_mask[0] |= (1UL << i);
+	/*
+	 * We work only with lowest 32 bits which is not correct, but to work
+	 * properly the valid_bit_mask size should be increased up to 64 bits
+	 * and this will brake ABI. This modification will be done in next release
+	 */
+	g_cfg->valid_bit_mask[0] = (uint32_t)adapter->flow_types_mask;
+
+	for (i = RTE_ETH_FLOW_UNKNOWN + 1; i < UINT32_BIT; i++) {
+		if (adapter->pctypes_tbl[i]) {
+			for (j = I40E_FILTER_PCTYPE_INVALID + 1;
+			     j < I40E_FILTER_PCTYPE_MAX; j++) {
+				if (adapter->pctypes_tbl[i] & (1ULL << j)) {
+					reg = i40e_read_rx_ctl(hw, I40E_GLQF_HSYM(j));
+					if (reg & I40E_GLQF_HSYM_SYMH_ENA_MASK) {
+						g_cfg->sym_hash_enable_mask[0] |=
+									(1UL << i);
+					}
+				}
+			}
+		}
 	}
 
 	return 0;
 }
 
 static int
-i40e_hash_global_config_check(struct rte_eth_hash_global_conf *g_cfg)
+i40e_hash_global_config_check(const struct i40e_adapter *adapter,
+			      const struct rte_eth_hash_global_conf *g_cfg)
 {
 	uint32_t i;
-	uint32_t mask0, i40e_mask = I40E_FLOW_TYPES;
+	uint32_t mask0, i40e_mask = adapter->flow_types_mask;
 
 	if (g_cfg->hash_func != RTE_ETH_HASH_FUNCTION_TOEPLITZ &&
 		g_cfg->hash_func != RTE_ETH_HASH_FUNCTION_SIMPLE_XOR &&
@@ -7919,64 +7859,32 @@ static int
 i40e_set_hash_filter_global_config(struct i40e_hw *hw,
 				   struct rte_eth_hash_global_conf *g_cfg)
 {
+	struct i40e_adapter *adapter = (struct i40e_adapter *)hw->back;
 	int ret;
-	uint16_t i;
+	uint16_t i, j;
 	uint32_t reg;
-	uint32_t mask0 = g_cfg->valid_bit_mask[0];
-	enum i40e_filter_pctype pctype;
+	/*
+	 * We work only with lowest 32 bits which is not correct, but to work
+	 * properly the valid_bit_mask size should be increased up to 64 bits
+	 * and this will brake ABI. This modification will be done in next release
+	 */
+	uint32_t mask0 = g_cfg->valid_bit_mask[0] & (uint32_t)adapter->flow_types_mask;
 
 	/* Check the input parameters */
-	ret = i40e_hash_global_config_check(g_cfg);
+	ret = i40e_hash_global_config_check(adapter, g_cfg);
 	if (ret < 0)
 		return ret;
 
-	for (i = 0; mask0 && i < UINT32_BIT; i++) {
-		if (!(mask0 & (1UL << i)))
-			continue;
-		mask0 &= ~(1UL << i);
-		/* if flowtype is invalid, continue */
-		if (!I40E_VALID_FLOW(i))
-			continue;
-		pctype = i40e_flowtype_to_pctype(i);
-		reg = (g_cfg->sym_hash_enable_mask[0] & (1UL << i)) ?
-				I40E_GLQF_HSYM_SYMH_ENA_MASK : 0;
-		if (hw->mac.type == I40E_MAC_X722) {
-			if (pctype == I40E_FILTER_PCTYPE_NONF_IPV4_UDP) {
-				i40e_write_rx_ctl(hw, I40E_GLQF_HSYM(
-				  I40E_FILTER_PCTYPE_NONF_IPV4_UDP), reg);
-				i40e_write_rx_ctl(hw, I40E_GLQF_HSYM(
-				  I40E_FILTER_PCTYPE_NONF_UNICAST_IPV4_UDP),
-				  reg);
-				i40e_write_rx_ctl(hw, I40E_GLQF_HSYM(
-				  I40E_FILTER_PCTYPE_NONF_MULTICAST_IPV4_UDP),
-				  reg);
-			} else if (pctype == I40E_FILTER_PCTYPE_NONF_IPV4_TCP) {
-				i40e_write_rx_ctl(hw, I40E_GLQF_HSYM(
-				  I40E_FILTER_PCTYPE_NONF_IPV4_TCP), reg);
-				i40e_write_rx_ctl(hw, I40E_GLQF_HSYM(
-				  I40E_FILTER_PCTYPE_NONF_IPV4_TCP_SYN_NO_ACK),
-				  reg);
-			} else if (pctype == I40E_FILTER_PCTYPE_NONF_IPV6_UDP) {
-				i40e_write_rx_ctl(hw, I40E_GLQF_HSYM(
-				  I40E_FILTER_PCTYPE_NONF_IPV6_UDP), reg);
-				i40e_write_rx_ctl(hw, I40E_GLQF_HSYM(
-				  I40E_FILTER_PCTYPE_NONF_UNICAST_IPV6_UDP),
-				  reg);
-				i40e_write_rx_ctl(hw, I40E_GLQF_HSYM(
-				  I40E_FILTER_PCTYPE_NONF_MULTICAST_IPV6_UDP),
-				  reg);
-			} else if (pctype == I40E_FILTER_PCTYPE_NONF_IPV6_TCP) {
-				i40e_write_rx_ctl(hw, I40E_GLQF_HSYM(
-				  I40E_FILTER_PCTYPE_NONF_IPV6_TCP), reg);
-				i40e_write_rx_ctl(hw, I40E_GLQF_HSYM(
-				  I40E_FILTER_PCTYPE_NONF_IPV6_TCP_SYN_NO_ACK),
-				  reg);
-			} else {
-				i40e_write_rx_ctl(hw, I40E_GLQF_HSYM(pctype),
-				  reg);
+	for (i = RTE_ETH_FLOW_UNKNOWN + 1; mask0 && i < UINT32_BIT; i++) {
+		if (mask0 & (1UL << i)) {
+			reg = (g_cfg->sym_hash_enable_mask[0] & (1UL << i)) ?
+					I40E_GLQF_HSYM_SYMH_ENA_MASK : 0;
+
+			for (j = I40E_FILTER_PCTYPE_INVALID + 1;
+			     j < I40E_FILTER_PCTYPE_MAX; j++) {
+				if (adapter->pctypes_tbl[i] & (1ULL << j))
+					i40e_write_rx_ctl(hw, I40E_GLQF_HSYM(j), reg);
 			}
-		} else {
-			i40e_write_rx_ctl(hw, I40E_GLQF_HSYM(pctype), reg);
 		}
 	}
 
@@ -8598,16 +8506,14 @@ i40e_filter_input_set_init(struct i40e_pf *pf)
 	uint64_t input_set, inset_reg;
 	uint32_t mask_reg[I40E_INSET_MASK_NUM_REG] = {0};
 	int num, i;
+	uint16_t flow_type;
 
 	for (pctype = I40E_FILTER_PCTYPE_NONF_IPV4_UDP;
 	     pctype <= I40E_FILTER_PCTYPE_L2_PAYLOAD; pctype++) {
-		if (hw->mac.type == I40E_MAC_X722) {
-			if (!I40E_VALID_PCTYPE_X722(pctype))
-				continue;
-		} else {
-			if (!I40E_VALID_PCTYPE(pctype))
-				continue;
-		}
+		flow_type = i40e_pctype_to_flowtype(pf->adapter, pctype);
+
+		if (flow_type == RTE_ETH_FLOW_UNKNOWN)
+			continue;
 
 		input_set = i40e_get_default_input_set(pctype);
 
@@ -8670,7 +8576,8 @@ i40e_hash_filter_inset_select(struct i40e_hw *hw,
 		return -EINVAL;
 	}
 
-	if (!I40E_VALID_FLOW(conf->flow_type)) {
+	pctype = i40e_flowtype_to_pctype(pf->adapter, conf->flow_type);
+	if (pctype == I40E_FILTER_PCTYPE_INVALID) {
 		PMD_DRV_LOG(ERR, "invalid flow_type input.");
 		return -EINVAL;
 	}
@@ -8678,10 +8585,8 @@ i40e_hash_filter_inset_select(struct i40e_hw *hw,
 	if (hw->mac.type == I40E_MAC_X722) {
 		/* get translated pctype value in fd pctype register */
 		pctype = (enum i40e_filter_pctype)i40e_read_rx_ctl(hw,
-			I40E_GLQF_FD_PCTYPES((int)i40e_flowtype_to_pctype(
-			conf->flow_type)));
-	} else
-		pctype = i40e_flowtype_to_pctype(conf->flow_type);
+			I40E_GLQF_FD_PCTYPES((int)pctype));
+	}
 
 	ret = i40e_parse_input_set(&input_set, pctype, conf->field,
 				   conf->inset_size);
@@ -8689,11 +8594,7 @@ i40e_hash_filter_inset_select(struct i40e_hw *hw,
 		PMD_DRV_LOG(ERR, "Failed to parse input set");
 		return -EINVAL;
 	}
-	if (i40e_validate_input_set(pctype, RTE_ETH_FILTER_HASH,
-				    input_set) != 0) {
-		PMD_DRV_LOG(ERR, "Invalid input set");
-		return -EINVAL;
-	}
+
 	if (conf->op == RTE_ETH_INPUT_SET_ADD) {
 		/* get inset value in register */
 		inset_reg = i40e_read_rx_ctl(hw, I40E_GLQF_HASH_INSET(1, pctype));
@@ -8747,24 +8648,19 @@ i40e_fdir_filter_inset_select(struct i40e_pf *pf,
 		return -EINVAL;
 	}
 
-	if (!I40E_VALID_FLOW(conf->flow_type)) {
+	pctype = i40e_flowtype_to_pctype(pf->adapter, conf->flow_type);
+
+	if (pctype == I40E_FILTER_PCTYPE_INVALID) {
 		PMD_DRV_LOG(ERR, "invalid flow_type input.");
 		return -EINVAL;
 	}
 
-	pctype = i40e_flowtype_to_pctype(conf->flow_type);
-
 	ret = i40e_parse_input_set(&input_set, pctype, conf->field,
 				   conf->inset_size);
 	if (ret) {
 		PMD_DRV_LOG(ERR, "Failed to parse input set");
 		return -EINVAL;
 	}
-	if (i40e_validate_input_set(pctype, RTE_ETH_FILTER_FDIR,
-				    input_set) != 0) {
-		PMD_DRV_LOG(ERR, "Invalid input set");
-		return -EINVAL;
-	}
 
 	/* get inset value in register */
 	inset_reg = i40e_read_rx_ctl(hw, I40E_PRTQF_FD_INSET(pctype, 1));
@@ -9203,72 +9099,42 @@ i40e_hw_init(struct rte_eth_dev *dev)
 	i40e_set_symmetric_hash_enable_per_port(hw, 0);
 }
 
+/*
+ * For X722 it is possible to have multiple pctypes mapped to the same flowtype
+ * however this function will return only one highest pctype index,
+ * which is not quite correct. This is known problem of i40e driver
+ * and needs to be fixed later.
+ */
 enum i40e_filter_pctype
-i40e_flowtype_to_pctype(uint16_t flow_type)
-{
-	static const enum i40e_filter_pctype pctype_table[] = {
-		[RTE_ETH_FLOW_FRAG_IPV4] = I40E_FILTER_PCTYPE_FRAG_IPV4,
-		[RTE_ETH_FLOW_NONFRAG_IPV4_UDP] =
-			I40E_FILTER_PCTYPE_NONF_IPV4_UDP,
-		[RTE_ETH_FLOW_NONFRAG_IPV4_TCP] =
-			I40E_FILTER_PCTYPE_NONF_IPV4_TCP,
-		[RTE_ETH_FLOW_NONFRAG_IPV4_SCTP] =
-			I40E_FILTER_PCTYPE_NONF_IPV4_SCTP,
-		[RTE_ETH_FLOW_NONFRAG_IPV4_OTHER] =
-			I40E_FILTER_PCTYPE_NONF_IPV4_OTHER,
-		[RTE_ETH_FLOW_FRAG_IPV6] = I40E_FILTER_PCTYPE_FRAG_IPV6,
-		[RTE_ETH_FLOW_NONFRAG_IPV6_UDP] =
-			I40E_FILTER_PCTYPE_NONF_IPV6_UDP,
-		[RTE_ETH_FLOW_NONFRAG_IPV6_TCP] =
-			I40E_FILTER_PCTYPE_NONF_IPV6_TCP,
-		[RTE_ETH_FLOW_NONFRAG_IPV6_SCTP] =
-			I40E_FILTER_PCTYPE_NONF_IPV6_SCTP,
-		[RTE_ETH_FLOW_NONFRAG_IPV6_OTHER] =
-			I40E_FILTER_PCTYPE_NONF_IPV6_OTHER,
-		[RTE_ETH_FLOW_L2_PAYLOAD] = I40E_FILTER_PCTYPE_L2_PAYLOAD,
-	};
+i40e_flowtype_to_pctype(const struct i40e_adapter *adapter, uint16_t flow_type)
+{
+	int i;
+	uint64_t pctype_mask;
 
-	return pctype_table[flow_type];
+	if (flow_type < I40E_FLOW_TYPE_MAX) {
+		pctype_mask = adapter->pctypes_tbl[flow_type];
+		for (i = I40E_FILTER_PCTYPE_MAX - 1; i > 0; i--) {
+			if (pctype_mask & (1ULL << i))
+				return (enum i40e_filter_pctype)i;
+		}
+	}
+	return I40E_FILTER_PCTYPE_INVALID;
 }
 
 uint16_t
-i40e_pctype_to_flowtype(enum i40e_filter_pctype pctype)
+i40e_pctype_to_flowtype(const struct i40e_adapter *adapter,
+			enum i40e_filter_pctype pctype)
 {
-	static const uint16_t flowtype_table[] = {
-		[I40E_FILTER_PCTYPE_FRAG_IPV4] = RTE_ETH_FLOW_FRAG_IPV4,
-		[I40E_FILTER_PCTYPE_NONF_IPV4_UDP] =
-			RTE_ETH_FLOW_NONFRAG_IPV4_UDP,
-		[I40E_FILTER_PCTYPE_NONF_UNICAST_IPV4_UDP] =
-			RTE_ETH_FLOW_NONFRAG_IPV4_UDP,
-		[I40E_FILTER_PCTYPE_NONF_MULTICAST_IPV4_UDP] =
-			RTE_ETH_FLOW_NONFRAG_IPV4_UDP,
-		[I40E_FILTER_PCTYPE_NONF_IPV4_TCP] =
-			RTE_ETH_FLOW_NONFRAG_IPV4_TCP,
-		[I40E_FILTER_PCTYPE_NONF_IPV4_TCP_SYN_NO_ACK] =
-			RTE_ETH_FLOW_NONFRAG_IPV4_TCP,
-		[I40E_FILTER_PCTYPE_NONF_IPV4_SCTP] =
-			RTE_ETH_FLOW_NONFRAG_IPV4_SCTP,
-		[I40E_FILTER_PCTYPE_NONF_IPV4_OTHER] =
-			RTE_ETH_FLOW_NONFRAG_IPV4_OTHER,
-		[I40E_FILTER_PCTYPE_FRAG_IPV6] = RTE_ETH_FLOW_FRAG_IPV6,
-		[I40E_FILTER_PCTYPE_NONF_IPV6_UDP] =
-			RTE_ETH_FLOW_NONFRAG_IPV6_UDP,
-		[I40E_FILTER_PCTYPE_NONF_UNICAST_IPV6_UDP] =
-			RTE_ETH_FLOW_NONFRAG_IPV6_UDP,
-		[I40E_FILTER_PCTYPE_NONF_MULTICAST_IPV6_UDP] =
-			RTE_ETH_FLOW_NONFRAG_IPV6_UDP,
-		[I40E_FILTER_PCTYPE_NONF_IPV6_TCP] =
-			RTE_ETH_FLOW_NONFRAG_IPV6_TCP,
-		[I40E_FILTER_PCTYPE_NONF_IPV6_TCP_SYN_NO_ACK] =
-			RTE_ETH_FLOW_NONFRAG_IPV6_TCP,
-		[I40E_FILTER_PCTYPE_NONF_IPV6_SCTP] =
-			RTE_ETH_FLOW_NONFRAG_IPV6_SCTP,
-		[I40E_FILTER_PCTYPE_NONF_IPV6_OTHER] =
-			RTE_ETH_FLOW_NONFRAG_IPV6_OTHER,
-		[I40E_FILTER_PCTYPE_L2_PAYLOAD] = RTE_ETH_FLOW_L2_PAYLOAD,
-	};
+	uint16_t flowtype;
+	uint64_t pctype_mask = 1ULL << pctype;
+
+	for (flowtype = RTE_ETH_FLOW_UNKNOWN + 1; flowtype < I40E_FLOW_TYPE_MAX;
+	     flowtype++) {
+		if (adapter->pctypes_tbl[flowtype] & pctype_mask)
+			return flowtype;
+	}
 
-	return flowtype_table[pctype];
+	return RTE_ETH_FLOW_UNKNOWN;
 }
 
 /*
diff --git a/drivers/net/i40e/i40e_ethdev.h b/drivers/net/i40e/i40e_ethdev.h
index ad80f0f..66cc053 100644
--- a/drivers/net/i40e/i40e_ethdev.h
+++ b/drivers/net/i40e/i40e_ethdev.h
@@ -478,8 +478,9 @@ struct i40e_fdir_flex_mask {
 	} bitmask[I40E_FDIR_BITMASK_NUM_WORD];
 };
 
-#define I40E_FILTER_PCTYPE_MAX 64
-#define I40E_MAX_FDIR_FILTER_NUM (1024 * 8)
+#define I40E_FILTER_PCTYPE_INVALID 0
+#define I40E_FILTER_PCTYPE_MAX     64
+#define I40E_MAX_FDIR_FILTER_NUM   (1024 * 8)
 
 struct i40e_fdir_filter {
 	TAILQ_ENTRY(i40e_fdir_filter) rules;
@@ -852,7 +853,8 @@ struct i40e_vf {
 	uint64_t flags;
 };
 
-#define I40E_MAX_PKT_TYPE 256
+#define I40E_MAX_PKT_TYPE  256
+#define I40E_FLOW_TYPE_MAX 64
 
 /*
  * Structure to store private data for each PF/VF instance.
@@ -881,6 +883,10 @@ struct i40e_adapter {
 
 	/* ptype mapping table */
 	uint32_t ptype_tbl[I40E_MAX_PKT_TYPE] __rte_cache_min_aligned;
+	/* flow type to pctype mapping table */
+	uint64_t pctypes_tbl[I40E_FLOW_TYPE_MAX] __rte_cache_min_aligned;
+	uint64_t flow_types_mask;
+	uint64_t pctypes_mask;
 };
 
 extern const struct rte_flow_ops i40e_flow_ops;
@@ -925,8 +931,8 @@ int i40e_vsi_vlan_pvid_set(struct i40e_vsi *vsi,
 			   struct i40e_vsi_vlan_pvid_info *info);
 int i40e_vsi_config_vlan_stripping(struct i40e_vsi *vsi, bool on);
 int i40e_vsi_config_vlan_filter(struct i40e_vsi *vsi, bool on);
-uint64_t i40e_config_hena(uint64_t flags, enum i40e_mac_type type);
-uint64_t i40e_parse_hena(uint64_t flags);
+uint64_t i40e_config_hena(const struct i40e_adapter *adapter, uint64_t flags);
+uint64_t i40e_parse_hena(const struct i40e_adapter *adapter, uint64_t flags);
 enum i40e_status_code i40e_fdir_setup_tx_resources(struct i40e_pf *pf);
 enum i40e_status_code i40e_fdir_setup_rx_resources(struct i40e_pf *pf);
 int i40e_fdir_setup(struct i40e_pf *pf);
@@ -935,8 +941,10 @@ const struct rte_memzone *i40e_memzone_reserve(const char *name,
 					int socket_id);
 int i40e_fdir_configure(struct rte_eth_dev *dev);
 void i40e_fdir_teardown(struct i40e_pf *pf);
-enum i40e_filter_pctype i40e_flowtype_to_pctype(uint16_t flow_type);
-uint16_t i40e_pctype_to_flowtype(enum i40e_filter_pctype pctype);
+enum i40e_filter_pctype  i40e_flowtype_to_pctype(const struct i40e_adapter *adapter,
+						 uint16_t flow_type);
+uint16_t i40e_pctype_to_flowtype(const struct i40e_adapter *adapter,
+				 enum i40e_filter_pctype pctype);
 int i40e_fdir_ctrl_func(struct rte_eth_dev *dev,
 			  enum rte_filter_op filter_op,
 			  void *arg);
diff --git a/drivers/net/i40e/i40e_ethdev_vf.c b/drivers/net/i40e/i40e_ethdev_vf.c
index a903deb..111ac39 100644
--- a/drivers/net/i40e/i40e_ethdev_vf.c
+++ b/drivers/net/i40e/i40e_ethdev_vf.c
@@ -1443,6 +1443,7 @@ i40evf_dev_init(struct rte_eth_dev *eth_dev)
 		return 0;
 	}
 	i40e_set_default_ptype_table(eth_dev);
+	i40e_set_default_pctype_table(eth_dev);
 	rte_eth_copy_pci_info(eth_dev, pci_dev);
 	eth_dev->data->dev_flags |= RTE_ETH_DEV_DETACHABLE;
 
@@ -2178,7 +2179,7 @@ i40evf_dev_info_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info)
 	dev_info->max_rx_pktlen = I40E_FRAME_SIZE_MAX;
 	dev_info->hash_key_size = (I40E_VFQF_HKEY_MAX_INDEX + 1) * sizeof(uint32_t);
 	dev_info->reta_size = ETH_RSS_RETA_SIZE_64;
-	dev_info->flow_type_rss_offloads = I40E_RSS_OFFLOAD_ALL;
+	dev_info->flow_type_rss_offloads = vf->adapter->flow_types_mask;
 	dev_info->max_mac_addrs = I40E_NUM_MACADDR_MAX;
 	dev_info->rx_offload_capa =
 		DEV_RX_OFFLOAD_VLAN_STRIP |
@@ -2506,7 +2507,7 @@ i40evf_hw_rss_hash_set(struct i40e_vf *vf, struct rte_eth_rss_conf *rss_conf)
 	if (ret)
 		return ret;
 
-	hena = i40e_config_hena(rss_conf->rss_hf, hw->mac.type);
+	hena = i40e_config_hena(vf->adapter, rss_conf->rss_hf);
 	i40e_write_rx_ctl(hw, I40E_VFQF_HENA(0), (uint32_t)hena);
 	i40e_write_rx_ctl(hw, I40E_VFQF_HENA(1), (uint32_t)(hena >> 32));
 	I40EVF_WRITE_FLUSH(hw);
@@ -2549,7 +2550,7 @@ i40evf_config_rss(struct i40e_vf *vf)
 	}
 
 	rss_conf = vf->dev_data->dev_conf.rx_adv_conf.rss_conf;
-	if ((rss_conf.rss_hf & I40E_RSS_OFFLOAD_ALL) == 0) {
+	if ((rss_conf.rss_hf & vf->adapter->flow_types_mask) == 0) {
 		i40evf_disable_rss(vf);
 		PMD_DRV_LOG(DEBUG, "No hash flag is set");
 		return 0;
@@ -2574,14 +2575,13 @@ i40evf_dev_rss_hash_update(struct rte_eth_dev *dev,
 {
 	struct i40e_vf *vf = I40EVF_DEV_PRIVATE_TO_VF(dev->data->dev_private);
 	struct i40e_hw *hw = I40E_DEV_PRIVATE_TO_HW(dev->data->dev_private);
-	uint64_t rss_hf = rss_conf->rss_hf & I40E_RSS_OFFLOAD_ALL;
+	uint64_t rss_hf = rss_conf->rss_hf & vf->adapter->flow_types_mask;
 	uint64_t hena;
 
 	hena = (uint64_t)i40e_read_rx_ctl(hw, I40E_VFQF_HENA(0));
 	hena |= ((uint64_t)i40e_read_rx_ctl(hw, I40E_VFQF_HENA(1))) << 32;
-	if (!(hena & ((hw->mac.type == I40E_MAC_X722)
-		 ? I40E_RSS_HENA_ALL_X722
-		 : I40E_RSS_HENA_ALL))) { /* RSS disabled */
+
+	if (!(hena & vf->adapter->pctypes_mask)) { /* RSS disabled */
 		if (rss_hf != 0) /* Enable RSS */
 			return -EINVAL;
 		return 0;
@@ -2607,7 +2607,7 @@ i40evf_dev_rss_hash_conf_get(struct rte_eth_dev *dev,
 
 	hena = (uint64_t)i40e_read_rx_ctl(hw, I40E_VFQF_HENA(0));
 	hena |= ((uint64_t)i40e_read_rx_ctl(hw, I40E_VFQF_HENA(1))) << 32;
-	rss_conf->rss_hf = i40e_parse_hena(hena);
+	rss_conf->rss_hf = i40e_parse_hena(vf->adapter, hena);
 
 	return 0;
 }
diff --git a/drivers/net/i40e/i40e_fdir.c b/drivers/net/i40e/i40e_fdir.c
index 84c0a1f..def2e4c 100644
--- a/drivers/net/i40e/i40e_fdir.c
+++ b/drivers/net/i40e/i40e_fdir.c
@@ -323,6 +323,7 @@ i40e_init_flx_pld(struct i40e_pf *pf)
 	struct i40e_hw *hw = I40E_PF_TO_HW(pf);
 	uint8_t pctype;
 	int i, index;
+	uint16_t flow_type;
 
 	/*
 	 * Define the bytes stream extracted as flexible payload in
@@ -344,15 +345,10 @@ i40e_init_flx_pld(struct i40e_pf *pf)
 	/* initialize the masks */
 	for (pctype = I40E_FILTER_PCTYPE_NONF_IPV4_UDP;
 	     pctype <= I40E_FILTER_PCTYPE_L2_PAYLOAD; pctype++) {
-		if (hw->mac.type == I40E_MAC_X722) {
-			if (!I40E_VALID_PCTYPE_X722(
-				 (enum i40e_filter_pctype)pctype))
-				continue;
-		} else {
-			if (!I40E_VALID_PCTYPE(
-				 (enum i40e_filter_pctype)pctype))
-				continue;
-		}
+		flow_type = i40e_pctype_to_flowtype(pf->adapter, pctype);
+
+		if (flow_type == RTE_ETH_FLOW_UNKNOWN)
+			continue;
 		pf->fdir.flex_mask[pctype].word_mask = 0;
 		i40e_write_rx_ctl(hw, I40E_PRTQF_FD_FLXINSET(pctype), 0);
 		for (i = 0; i < I40E_FDIR_BITMASK_NUM_WORD; i++) {
@@ -449,7 +445,8 @@ i40e_check_fdir_flex_payload(const struct rte_eth_flex_payload_cfg *flex_cfg)
  * arguments are valid
  */
 static int
-i40e_check_fdir_flex_conf(const struct rte_eth_fdir_flex_conf *conf)
+i40e_check_fdir_flex_conf(const struct i40e_adapter *adapter,
+			  const struct rte_eth_fdir_flex_conf *conf)
 {
 	const struct rte_eth_flex_payload_cfg *flex_cfg;
 	const struct rte_eth_fdir_flex_mask *flex_mask;
@@ -457,6 +454,7 @@ i40e_check_fdir_flex_conf(const struct rte_eth_fdir_flex_conf *conf)
 	uint8_t nb_bitmask;
 	uint16_t i, j;
 	int ret = 0;
+	enum i40e_filter_pctype pctype;
 
 	if (conf == NULL) {
 		PMD_DRV_LOG(INFO, "NULL pointer.");
@@ -487,7 +485,8 @@ i40e_check_fdir_flex_conf(const struct rte_eth_fdir_flex_conf *conf)
 	}
 	for (i = 0; i < conf->nb_flexmasks; i++) {
 		flex_mask = &conf->flex_mask[i];
-		if (!I40E_VALID_FLOW(flex_mask->flow_type)) {
+		pctype = i40e_flowtype_to_pctype(adapter, flex_mask->flow_type);
+		if (pctype == I40E_FILTER_PCTYPE_INVALID) {
 			PMD_DRV_LOG(WARNING, "invalid flow type.");
 			return -EINVAL;
 		}
@@ -650,7 +649,7 @@ i40e_fdir_configure(struct rte_eth_dev *dev)
 	i40e_init_flx_pld(pf); /* set flex config to default value */
 
 	conf = &dev->data->dev_conf.fdir_conf.flex_conf;
-	ret = i40e_check_fdir_flex_conf(conf);
+	ret = i40e_check_fdir_flex_conf(pf->adapter, conf);
 	if (ret < 0) {
 		PMD_DRV_LOG(ERR, " invalid configuration arguments.");
 		return -EINVAL;
@@ -664,11 +663,11 @@ i40e_fdir_configure(struct rte_eth_dev *dev)
 			/* get translated pctype value in fd pctype register */
 			pctype = (enum i40e_filter_pctype)i40e_read_rx_ctl(
 				hw, I40E_GLQF_FD_PCTYPES(
-				(int)i40e_flowtype_to_pctype(
+				(int)i40e_flowtype_to_pctype(pf->adapter,
 				conf->flex_mask[i].flow_type)));
 		} else
-			pctype = i40e_flowtype_to_pctype(
-				conf->flex_mask[i].flow_type);
+			pctype = i40e_flowtype_to_pctype(pf->adapter,
+							 conf->flex_mask[i].flow_type);
 
 		i40e_set_flex_mask_on_pctype(pf, pctype, &conf->flex_mask[i]);
 	}
@@ -1100,7 +1099,8 @@ i40e_add_del_fdir_filter(struct rte_eth_dev *dev,
 		return -ENOTSUP;
 	}
 
-	if (!I40E_VALID_FLOW(filter->input.flow_type)) {
+	pctype = i40e_flowtype_to_pctype(pf->adapter, filter->input.flow_type);
+	if (pctype == I40E_FILTER_PCTYPE_INVALID) {
 		PMD_DRV_LOG(ERR, "invalid flow_type input.");
 		return -EINVAL;
 	}
@@ -1141,12 +1141,8 @@ i40e_add_del_fdir_filter(struct rte_eth_dev *dev,
 	if (hw->mac.type == I40E_MAC_X722) {
 		/* get translated pctype value in fd pctype register */
 		pctype = (enum i40e_filter_pctype)i40e_read_rx_ctl(
-			hw, I40E_GLQF_FD_PCTYPES(
-			(int)i40e_flowtype_to_pctype(
-			filter->input.flow_type)));
-	} else
-		pctype = i40e_flowtype_to_pctype(filter->input.flow_type);
-
+			hw, I40E_GLQF_FD_PCTYPES((int)pctype));
+	}
 	ret = i40e_fdir_filter_programming(pf, pctype, filter, add);
 	if (ret < 0) {
 		PMD_DRV_LOG(ERR, "fdir programming fails for PCTYPE(%u).",
@@ -1384,7 +1380,6 @@ i40e_fdir_info_get_flex_mask(struct i40e_pf *pf,
 {
 	struct i40e_fdir_flex_mask *mask;
 	struct rte_eth_fdir_flex_mask *ptr = flex_mask;
-	struct i40e_hw *hw = I40E_PF_TO_HW(pf);
 	uint16_t flow_type;
 	uint8_t i, j;
 	uint16_t off_bytes, mask_tmp;
@@ -1393,14 +1388,11 @@ i40e_fdir_info_get_flex_mask(struct i40e_pf *pf,
 	     i <= I40E_FILTER_PCTYPE_L2_PAYLOAD;
 	     i++) {
 		mask =  &pf->fdir.flex_mask[i];
-		if (hw->mac.type == I40E_MAC_X722) {
-			if (!I40E_VALID_PCTYPE_X722((enum i40e_filter_pctype)i))
-				continue;
-		} else {
-			if (!I40E_VALID_PCTYPE((enum i40e_filter_pctype)i))
-				continue;
-		}
-		flow_type = i40e_pctype_to_flowtype((enum i40e_filter_pctype)i);
+		flow_type = i40e_pctype_to_flowtype(pf->adapter,
+						    (enum i40e_filter_pctype)i);
+		if (flow_type == RTE_ETH_FLOW_UNKNOWN)
+			continue;
+
 		for (j = 0; j < I40E_FDIR_MAX_FLEXWORD_NUM; j++) {
 			if (mask->word_mask & I40E_FLEX_WORD_MASK(j)) {
 				ptr->mask[j * sizeof(uint16_t)] = UINT8_MAX;
diff --git a/drivers/net/i40e/i40e_flow.c b/drivers/net/i40e/i40e_flow.c
index b92719a..5d8afc6 100644
--- a/drivers/net/i40e/i40e_flow.c
+++ b/drivers/net/i40e/i40e_flow.c
@@ -2776,8 +2776,9 @@ i40e_flow_parse_fdir_pattern(struct rte_eth_dev *dev,
 		}
 	}
 
-	pctype = i40e_flowtype_to_pctype(flow_type);
-	if (pctype == 0 || pctype > I40E_FILTER_PCTYPE_L2_PAYLOAD) {
+	pctype = i40e_flowtype_to_pctype(pf->adapter, flow_type);
+	if (pctype == I40E_FILTER_PCTYPE_INVALID ||
+	    pctype > I40E_FILTER_PCTYPE_L2_PAYLOAD) {
 		rte_flow_error_set(error, EINVAL,
 				   RTE_FLOW_ERROR_TYPE_ITEM, item,
 				   "Unsupported flow type");
diff --git a/drivers/net/i40e/i40e_rxtx.c b/drivers/net/i40e/i40e_rxtx.c
index 3a7b68e..0c8ad00 100644
--- a/drivers/net/i40e/i40e_rxtx.c
+++ b/drivers/net/i40e/i40e_rxtx.c
@@ -2943,6 +2943,63 @@ i40e_set_default_ptype_table(struct rte_eth_dev *dev)
 		ad->ptype_tbl[i] = i40e_get_default_pkt_type(i);
 }
 
+void __attribute__((cold))
+i40e_set_default_pctype_table(struct rte_eth_dev *dev)
+{
+	struct i40e_adapter *ad = I40E_DEV_PRIVATE_TO_ADAPTER(dev->data->dev_private);
+	struct i40e_hw *hw = I40E_DEV_PRIVATE_TO_HW(dev->data->dev_private);
+	int i;
+
+	for (i = 0; i < I40E_FLOW_TYPE_MAX; i++)
+		ad->pctypes_tbl[i] = 0ULL;
+	ad->flow_types_mask = 0ULL;
+	ad->pctypes_mask = 0ULL;
+
+	ad->pctypes_tbl[RTE_ETH_FLOW_FRAG_IPV4] =
+				(1ULL << I40E_FILTER_PCTYPE_FRAG_IPV4);
+	ad->pctypes_tbl[RTE_ETH_FLOW_NONFRAG_IPV4_UDP] =
+				(1ULL << I40E_FILTER_PCTYPE_NONF_IPV4_UDP);
+	ad->pctypes_tbl[RTE_ETH_FLOW_NONFRAG_IPV4_TCP] =
+				(1ULL << I40E_FILTER_PCTYPE_NONF_IPV4_TCP);
+	ad->pctypes_tbl[RTE_ETH_FLOW_NONFRAG_IPV4_SCTP] =
+				(1ULL << I40E_FILTER_PCTYPE_NONF_IPV4_SCTP);
+	ad->pctypes_tbl[RTE_ETH_FLOW_NONFRAG_IPV4_OTHER] =
+				(1ULL << I40E_FILTER_PCTYPE_NONF_IPV4_OTHER);
+	ad->pctypes_tbl[RTE_ETH_FLOW_FRAG_IPV6] =
+				(1ULL << I40E_FILTER_PCTYPE_FRAG_IPV6);
+	ad->pctypes_tbl[RTE_ETH_FLOW_NONFRAG_IPV6_UDP] =
+				(1ULL << I40E_FILTER_PCTYPE_NONF_IPV6_UDP);
+	ad->pctypes_tbl[RTE_ETH_FLOW_NONFRAG_IPV6_TCP] =
+				(1ULL << I40E_FILTER_PCTYPE_NONF_IPV6_TCP);
+	ad->pctypes_tbl[RTE_ETH_FLOW_NONFRAG_IPV6_SCTP] =
+				(1ULL << I40E_FILTER_PCTYPE_NONF_IPV6_SCTP);
+	ad->pctypes_tbl[RTE_ETH_FLOW_NONFRAG_IPV6_OTHER] =
+				(1ULL << I40E_FILTER_PCTYPE_NONF_IPV6_OTHER);
+	ad->pctypes_tbl[RTE_ETH_FLOW_L2_PAYLOAD] =
+				(1ULL << I40E_FILTER_PCTYPE_L2_PAYLOAD);
+
+	if (hw->mac.type == I40E_MAC_X722) {
+		ad->pctypes_tbl[RTE_ETH_FLOW_NONFRAG_IPV4_UDP] |=
+				(1ULL << I40E_FILTER_PCTYPE_NONF_UNICAST_IPV4_UDP);
+		ad->pctypes_tbl[RTE_ETH_FLOW_NONFRAG_IPV4_UDP] |=
+				(1ULL << I40E_FILTER_PCTYPE_NONF_MULTICAST_IPV4_UDP);
+		ad->pctypes_tbl[RTE_ETH_FLOW_NONFRAG_IPV4_TCP] |=
+				(1ULL << I40E_FILTER_PCTYPE_NONF_IPV4_TCP_SYN_NO_ACK);
+		ad->pctypes_tbl[RTE_ETH_FLOW_NONFRAG_IPV6_UDP] |=
+				(1ULL << I40E_FILTER_PCTYPE_NONF_UNICAST_IPV6_UDP);
+		ad->pctypes_tbl[RTE_ETH_FLOW_NONFRAG_IPV6_UDP] |=
+				(1ULL << I40E_FILTER_PCTYPE_NONF_MULTICAST_IPV6_UDP);
+		ad->pctypes_tbl[RTE_ETH_FLOW_NONFRAG_IPV6_TCP] |=
+				(1ULL << I40E_FILTER_PCTYPE_NONF_IPV6_TCP_SYN_NO_ACK);
+	}
+
+	for (i = 0; i < I40E_FLOW_TYPE_MAX; i++) {
+		if (ad->pctypes_tbl[i])
+			ad->flow_types_mask |= (1ULL << i);
+		ad->pctypes_mask |= ad->pctypes_tbl[i];
+	}
+}
+
 /* Stubs needed for linkage when CONFIG_RTE_I40E_INC_VECTOR is set to 'n' */
 int __attribute__((weak))
 i40e_rx_vec_dev_conf_condition_check(struct rte_eth_dev __rte_unused *dev)
diff --git a/drivers/net/i40e/i40e_rxtx.h b/drivers/net/i40e/i40e_rxtx.h
index 20084d6..2a58ced 100644
--- a/drivers/net/i40e/i40e_rxtx.h
+++ b/drivers/net/i40e/i40e_rxtx.h
@@ -255,6 +255,7 @@ void i40e_set_tx_function_flag(struct rte_eth_dev *dev,
 			       struct i40e_tx_queue *txq);
 void i40e_set_tx_function(struct rte_eth_dev *dev);
 void i40e_set_default_ptype_table(struct rte_eth_dev *dev);
+void i40e_set_default_pctype_table(struct rte_eth_dev *dev);
 
 /* For each value it means, datasheet of hardware can tell more details
  *
-- 
2.5.5

^ permalink raw reply	[relevance 3%]

* Re: [dpdk-dev] [PATCH] lib/power: add turbo functions to version.map
  @ 2017-10-02 16:25  3%       ` Hunt, David
  2017-10-02 16:52  0%         ` Thomas Monjalon
  0 siblings, 1 reply; 200+ results
From: Hunt, David @ 2017-10-02 16:25 UTC (permalink / raw)
  To: Thomas Monjalon; +Cc: dev

Hi Thomas,


On 2/10/2017 4:39 PM, Thomas Monjalon wrote:
> 02/10/2017 17:06, Hunt, David:
>> On 2/10/2017 3:55 PM, Thomas Monjalon wrote:
>>> +DPDK_17.11 {
>>>> +	global:
>>>> +
>>>> +	rte_power_acpi_turbo_status;
>>> Is it really the function you want to expose?
>>> rte_power_turbo_status seems more generic.
>> Not really, it was in there for completeness, but users should be able
>> to keep track of the turbo'd cores, so not really needed.
>>
>>> More comments about what is part of the API:
>>> If you do not want to expose ACPI and VM implementations,
>>> it should not be part of the rte_* include files.
>> I'll address the above comments in the next version.
> You did not address the comment about what is rte_*.h.
> If you do not want to expose everything, you should move it to
> another .h file.
>
> Files starting with rte_ are included in doxygen API doc.
> Only rte_power.h is installed.
> The installed include, the doxygen doc and the map file
> should all expose the same API consistently.
>
> I think a cleanup is needed.

While I agree a cleanup is needed, this small patch is only intended to 
fix the priority issue of the shared library builds, which are broken at 
the moment.
The initial patch should have had rte_power_turbo_status, not 
rte_power_acpi_turbo_status.
Rather than moving code around at this stage, I propose having the three 
exposed functions in the map file (with the correct names).
Then, later on, I can do an ABI breakage notification for the next 
release to rename all the other rte*.h files, as some consumers of DPDK 
may be using those directly, at which stage we will be down to just 
exporting the functions in rte_power.h.
Does that sound OK with you?
Regards,
Dave.

^ permalink raw reply	[relevance 3%]

* Re: [dpdk-dev] [PATCH] lib/power: add turbo functions to version.map
  2017-10-02 16:25  3%       ` Hunt, David
@ 2017-10-02 16:52  0%         ` Thomas Monjalon
  0 siblings, 0 replies; 200+ results
From: Thomas Monjalon @ 2017-10-02 16:52 UTC (permalink / raw)
  To: Hunt, David; +Cc: dev

02/10/2017 18:25, Hunt, David:
> Hi Thomas,
> 
> 
> On 2/10/2017 4:39 PM, Thomas Monjalon wrote:
> > 02/10/2017 17:06, Hunt, David:
> >> On 2/10/2017 3:55 PM, Thomas Monjalon wrote:
> >>> +DPDK_17.11 {
> >>>> +	global:
> >>>> +
> >>>> +	rte_power_acpi_turbo_status;
> >>> Is it really the function you want to expose?
> >>> rte_power_turbo_status seems more generic.
> >> Not really, it was in there for completeness, but users should be able
> >> to keep track of the turbo'd cores, so not really needed.
> >>
> >>> More comments about what is part of the API:
> >>> If you do not want to expose ACPI and VM implementations,
> >>> it should not be part of the rte_* include files.
> >> I'll address the above comments in the next version.
> > 
> > You did not address the comment about what is rte_*.h.
> > If you do not want to expose everything, you should move it to
> > another .h file.
> >
> > Files starting with rte_ are included in doxygen API doc.
> > Only rte_power.h is installed.
> > The installed include, the doxygen doc and the map file
> > should all expose the same API consistently.
> >
> > I think a cleanup is needed.
> 
> While I agree a cleanup is needed, this small patch is only intended to 
> fix the priority issue of the shared library builds, which are broken at 
> the moment.
> The initial patch should have had rte_power_turbo_status, not 
> rte_power_acpi_turbo_status.
> Rather than moving code around at this stage, I propose having the three 
> exposed functions in the map file (with the correct names).

OK, so we need a v3 (v2 has only 2 functions).

> Then, later on, I can do an ABI breakage notification for the next 
> release to rename all the other rte*.h files, as some consumers of DPDK 
> may be using those directly, at which stage we will be down to just 
> exporting the functions in rte_power.h.
> Does that sound OK with you?

OK, thanks

^ permalink raw reply	[relevance 0%]

* Re: [dpdk-dev] [RFC] Wireless Base Band Device (bbdev)
  2017-09-21 14:56  3% ` Thomas Monjalon
@ 2017-10-03 14:29  0%   ` Mokhtar, Amr
  2017-10-03 15:17  4%     ` Thomas Monjalon
  0 siblings, 1 reply; 200+ results
From: Mokhtar, Amr @ 2017-10-03 14:29 UTC (permalink / raw)
  To: thomas; +Cc: dev

Hi Thomas,
Thanks for reviewing.. Kindly find my reply in-line below..

> -----Original Message-----
> From: Thomas Monjalon [mailto:thomas@monjalon.net]
> Sent: Thursday 21 September 2017 15:56
> To: Mokhtar, Amr <amr.mokhtar@intel.com>
> Cc: dev@dpdk.org
> Subject: Re: [dpdk-dev] [RFC] Wireless Base Band Device (bbdev)
> 
> 25/08/2017 15:46, Amr Mokhtar:
> > +/**
> > + * Configure a device.
> > + * This function must be called on a device before setting up the
> > +queues and
> > + * starting the device. It can also be called when a device is in the
> > +stopped
> > + * state. If any device queues have been configured their
> > +configuration will be
> > + * cleared by a call to this function.
> > + *
> > + * @param dev_id
> > + *   The identifier of the device.
> > + * @param num_queues
> > + *   Number of queues to configure on device.
> > + * @param conf
> > + *   The device configuration. If NULL, a default configuration will be used.
> > + *
> > + * @return
> > + *   - 0 on success
> > + *   - EINVAL if num_queues is invalid, 0 or greater than maximum
> > + *   - EBUSY if the identified device has already started
> > + *   - ENOMEM if unable to allocate memory
> > + */
> > +int
> > +rte_bbdev_configure(uint8_t dev_id, uint16_t num_queues,
> > +		const struct rte_bbdev_conf *conf);
> 
> I am not convinced by the "configure all" function in ethdev.
> We break the ABI each time we add a new feature to configure.
> And it does not really help to have all configurations in one struct.
> Would you mind to split the struct rte_bbdev_conf and split the function
> accordingly?

There is nothing to split tbh. The only parameter it has is the socket_id.
And in fact, it's optional, can be null. The only config we need is num_queues.
I don't see in the near future that we may need to add more config params.
As a side, in the time of the implementation we were trying to avoid any
diversions from the current design ideology of ethdev and cryptodev.
Can we leave it for consideration with future releases?

> 
> [...]
> > +struct rte_bbdev_info {
> > +	int socket_id;  /**< NUMA socket that device is on */
> > +	const char *dev_name;  /**< Unique device name */
> > +	const struct rte_pci_device *pci_dev;  /**< PCI information */
> > +	unsigned int num_queues;  /**< Number of queues currently configured
> */
> > +	struct rte_bbdev_conf conf;  /**< Current device configuration */
> > +	bool started;  /**< Set if device is currently started */
> > +	struct rte_bbdev_driver_info drv;  /**< Info from device driver */
> > +};
> 
> As Stephen said, PCI must not appear in this API.
> Please use the bus abstraction.

Done.

> 
> [...]
> > +struct __rte_cache_aligned rte_bbdev {
> > +	rte_bbdev_enqueue_ops_t enqueue_ops; /**< Enqueue function */
> > +	rte_bbdev_dequeue_ops_t dequeue_ops;  /**< Dequeue function */
> > +	const struct rte_bbdev_ops *dev_ops;  /**< Functions exported by PMD
> */
> > +	struct rte_bbdev_data *data;  /**< Pointer to device data */
> > +	bool attached;  /**< If device is currently attached or not */
> 
> What "attached" means?
> I'm afraid you are trying to manage hotplug in the wrong layer.

Hotplug is not supported in the current release.

> 
> > +	struct rte_device *device; /**< Backing device (HW only) */
> 
> SW port should have also a rte_device (vdev).

Right. Fixed the comment.

> 
> [...]
> > +/** Data input and output buffer for Turbo operations */ struct
> > +rte_bbdev_op_data {
> 
> Why there is no "turbo" word in the name of this struct?

To keep it a generic input/output data descriptor,
that suits any type of baseband operation not only for turbo.

> 
> > +	struct rte_mbuf *data;
> > +	/**< First mbuf segment with input/output data. */
> > +	uint32_t offset;
> > +	/**< The starting point for the Turbo input/output, in bytes, from the
> > +	 * start of the data in the data buffer. It must be smaller than
> > +	 * data_len of the mbuf's first segment!
> > +	 */
> > +	uint32_t length;
> > +	/**< For input operations: the length, in bytes, of the source buffer
> > +	 * on which the Turbo encode/decode will be computed.
> > +	 * For output operations: the length, in bytes, of the output buffer
> > +	 * of the Turbo operation.
> > +	 */
> > +};
> 
> [...]
> > +/** Structure specifying a single operation */ struct rte_bbdev_op {
> > +	enum rte_bbdev_op_type type;  /**< Type of this operation */
> > +	int status;  /**< Status of operation that was performed */
> > +	struct rte_mempool *mempool;  /**< Mempool which op instance is in
> */
> > +	void *opaque_data;  /**< Opaque pointer for user data */
> > +	/**
> > +	 * Anonymous union of operation-type specific parameters. When
> allocated
> > +	 * using rte_bbdev_op_pool_create(), space is allocated for the
> > +	 * parameters at the end of each rte_bbdev_op structure, and the
> > +	 * pointers here point to it.
> > +	 */
> > +	RTE_STD_C11
> > +	union {
> > +		void *generic;
> > +		struct rte_bbdev_op_turbo_dec *turbo_dec;
> > +		struct rte_bbdev_op_turbo_enc *turbo_enc;
> > +	};
> > +};
> 
> I am not sure it is a good idea to fit every operations in the same struct and the
> same functions.

Due to the fact that our design adopts this idea that a device can support both
the encode and decode operations.
Then, at the time of PMD registration, the enqueue functions is allocated.
This enqueue() function is common for both operations.
This fitted operation structure is essential for the driver to decide on the operation.

> 
> [...]
> > +/**
> > + * Helper macro for logging
> > + *
> > + * @param level
> > + *   Log level: EMERG, ALERT, CRIT, ERR, WARNING, NOTICE, INFO, or
> DEBUG
> > + * @param fmt
> > + *   The format string, as in printf(3).
> > + * @param ...
> > + *   The variable arguments required by the format string.
> > + *
> > + * @return
> > + *   - 0 on success
> > + *   - Negative on error
> > + */
> > +#define rte_bbdev_log(level, fmt, ...) \
> > +		RTE_LOG(level, BBDEV, fmt "\n", ##__VA_ARGS__)
> 
> This is the legacy log system.
> Please use dynamic log type.

Done.

> 
> [...]
> > +#ifdef RTE_LIBRTE_BBDEV_DEBUG
> > +#define rte_bbdev_log_verbose(fmt, ...)  rte_bbdev_log_debug(fmt,
> > +##__VA_ARGS__) #else #define rte_bbdev_log_verbose(fmt, ...) #endif
> 
> With the new log functions, you do not need to disable debug log at compilation
> time.

Right.

> 
> > +/**
> > + *  Initialisation params structure that can be used by software
> > +based drivers  */ struct rte_bbdev_init_params {
> > +	int socket_id;  /**< Base band null device socket */
> > +	uint16_t queues_num;  /**< Base band null device queues number */ };
> > +
> > +/**
> > + * Parse generic parameters that could be used for software based devices.
> > + *
> > + * @param params
> > + *   Pointer to structure that will hold the parsed parameters.
> > + * @param input_args
> > + *   Pointer to arguments to be parsed.
> > + *
> > + * @return
> > + *   - 0 on success
> > + *   - EINVAL if invalid parameter pointer is provided
> > + *   - EFAULT if unable to parse provided arguments
> > + */
> > +int
> > +rte_bbdev_parse_params(struct rte_bbdev_init_params *params,
> > +		const char *input_args);
> 
> I do not understand the intent of these parameters.
> Are they common to every PMDs?
> Or could they be moved in software PMDs?

That was an old design approach, but this now moved and became the
responsibility of the soft PMD.

> 
> End of this first review pass :)

Thanks!!

^ permalink raw reply	[relevance 0%]

* [dpdk-dev] [PATCH v3 0/9] Policy Based Power Control for Guest
  @ 2017-10-03 14:08  3% ` David Hunt
  2017-10-11 16:18  2% ` [dpdk-dev] [PATCH v9 " David Hunt
  1 sibling, 0 replies; 200+ results
From: David Hunt @ 2017-10-03 14:08 UTC (permalink / raw)
  To: dev; +Cc: konstantin.ananyev, jingjing.wu

Policy Based Power Control for Guest

This patchset adds the facility for a guest VM to send a policy down to the
host that will allow the host to scale up/down cpu frequencies
depending on the policy criteria independently of the DPDK app running in
the guest.  This differs from the previous vm_power implementation where
individual scale up/down requests were send from the guest to the host via
virtio-serial.

V3 patchset changes:
  * Changed to using is_same_ether_addr() instead of looping through
    the mac address bytes to compare them.
  * Tweaked some comments and working in the i40e patch after review.
  * Added a patch to the set to add new i40e function to map file, so
    as to allow shared library builds. The power library API needs a cleanup
    in next release, so will add API/ABI warning for this cleanup in a
    separate patch.

V2 patchset changes:
  * Removed API's in ethdev layer.
  * Now just a single new API in the i40e driver for mapping VF MAC to
    VF index.
  * Moved new function from rte_rxtx.c to rte_pmd_i40e.c
  * Removed function for reading i40e register, moved to using the
    standard stats API.
  * Renamed i40e function to rte_pmd_i40e_query_vfid_by_mac
  * Cleaned up policy generation code.

It's a modification of the vm_power_manager app that runs in the host, and
the guest_vm_power_app example app that runs in the guest. This allows the
guest to send down a policy to the host via virtio-serial, which then allows
the host to scale up/down based on the criteria in the policy, resulting in
quicker scale up/down than individual requests coming from the guest.
It also means that the DPDK application running in the guest does not need
to be modified in any way, it is unaware that it's cores are being scaled
up/down, reducing the effort in implementing a power-aware infrastructure.

The usage model is as follows:
1. Set up the VF's and assign to the guest in the usual way.
2. run vm_power_manager on the host, creating a channel to the guest.
3. Start the guest_vm_power_mgr app on the guest, which establishes
   a virtio-serial channel to the host.
4. Send down the profile for the guest using the "send_profile now" command.
   There is an example profile hard-coded into guest_vm_power_mgr.
5. Stop the guest_vm_power_mgr and run your normal power-unaware application.
6. Send traffic into the VFs at varying traffic rates.
   Observe the frequency change on the host (turbostat -i 1)

The sequence of code changes are as follows:

A new function has been aded to the i40e driver to allow mapping of
a VF MAC to VF index.

Next we make an addition to librte_power that adds an extra command to allow
the passing of a policy structure from the guest to the host. This struct
contains information like busy/quiet hour, packet throughput thresholds, etc.

The next addition adds functionality to convert the virtual CPU (vcpu) IDs to
physical CPU (pcpu) IDs so that the host can scale up/down the cores used
in the guest.

The remaining patches are functionality to process the policy, and take action
when the relevant trigger occurs to cause a frequency change.

[1/9] net/i40e: add API to convert VF MAC to VF id
[2/9] lib/librte_power: add extra msg type for policies
[3/9] examples/vm_power_mgr: add vcpu to pcpu mapping
[4/9] examples/vm_power_mgr: add scale to medium freq fn
[5/9] examples/vm_power_mgr: add policy to channels
[6/9] examples/vm_power_mgr: add port initialisation
[7/9] power: add send channel msg function to map file
[8/9] examples/guest_cli: add send policy to host
[9/9] examples/vm_power_mgr: set MAC address of VF

^ permalink raw reply	[relevance 3%]

* Re: [dpdk-dev] [RFC] Wireless Base Band Device (bbdev)
  2017-10-03 14:29  0%   ` Mokhtar, Amr
@ 2017-10-03 15:17  4%     ` Thomas Monjalon
  2017-10-04 17:11  0%       ` Flavio Leitner
  2017-10-05 21:55  0%       ` Mokhtar, Amr
  0 siblings, 2 replies; 200+ results
From: Thomas Monjalon @ 2017-10-03 15:17 UTC (permalink / raw)
  To: Mokhtar, Amr; +Cc: dev, fbl, aconole, bluca

03/10/2017 16:29, Mokhtar, Amr:
> From: Thomas Monjalon [mailto:thomas@monjalon.net]
> > 25/08/2017 15:46, Amr Mokhtar:
> > > +int
> > > +rte_bbdev_configure(uint8_t dev_id, uint16_t num_queues,
> > > +		const struct rte_bbdev_conf *conf);
> > 
> > I am not convinced by the "configure all" function in ethdev.
> > We break the ABI each time we add a new feature to configure.
> > And it does not really help to have all configurations in one struct.
> > Would you mind to split the struct rte_bbdev_conf and split the function
> > accordingly?
> 
> There is nothing to split tbh. The only parameter it has is the socket_id.
> And in fact, it's optional, can be null. The only config we need is num_queues.

Indeed, there is nothing in this struct.
If you need only to allocate queues, you just have to rename this function.

> I don't see in the near future that we may need to add more config params.
> As a side, in the time of the implementation we were trying to avoid any
> diversions from the current design ideology of ethdev and cryptodev.

There is no ideology in ethdev, just some mistakes ;)

> Can we leave it for consideration with future releases?

No it should be addressed from the beginning.

When you will need to add something more to configure port-wise,
you should add a new function instead of breaking the ABI
of the global conf struct.
That's why the configure option should be more specialized.

Distro people were complaining about ABI breakage last week.
This is exactly an example of how to avoid it from the beginning.


> > [...]
> > > +struct __rte_cache_aligned rte_bbdev {
> > > +	rte_bbdev_enqueue_ops_t enqueue_ops; /**< Enqueue function */
> > > +	rte_bbdev_dequeue_ops_t dequeue_ops;  /**< Dequeue function */
> > > +	const struct rte_bbdev_ops *dev_ops;  /**< Functions exported by PMD
> > */
> > > +	struct rte_bbdev_data *data;  /**< Pointer to device data */
> > > +	bool attached;  /**< If device is currently attached or not */
> > 
> > What "attached" means?
> > I'm afraid you are trying to manage hotplug in the wrong layer.
> 
> Hotplug is not supported in the current release.

It is not answering the question.
What is an "attached" device?


> > [...]
> > > +/** Structure specifying a single operation */ struct rte_bbdev_op {
> > > +	enum rte_bbdev_op_type type;  /**< Type of this operation */
> > > +	int status;  /**< Status of operation that was performed */
> > > +	struct rte_mempool *mempool;  /**< Mempool which op instance is in
> > */
> > > +	void *opaque_data;  /**< Opaque pointer for user data */
> > > +	/**
> > > +	 * Anonymous union of operation-type specific parameters. When
> > allocated
> > > +	 * using rte_bbdev_op_pool_create(), space is allocated for the
> > > +	 * parameters at the end of each rte_bbdev_op structure, and the
> > > +	 * pointers here point to it.
> > > +	 */
> > > +	RTE_STD_C11
> > > +	union {
> > > +		void *generic;
> > > +		struct rte_bbdev_op_turbo_dec *turbo_dec;
> > > +		struct rte_bbdev_op_turbo_enc *turbo_enc;
> > > +	};
> > > +};
> > 
> > I am not sure it is a good idea to fit every operations
> > in the same struct and the same functions.
> 
> Due to the fact that our design adopts this idea that a device can support both
> the encode and decode operations.
> Then, at the time of PMD registration, the enqueue functions is allocated.
> This enqueue() function is common for both operations.
> This fitted operation structure is essential for the driver to decide on the operation.

Sorry I do not understand why you must have a "generic operation".
Please, could you try again to explain this design to someone
not fully understanding how turbo enc/dec works?

^ permalink raw reply	[relevance 4%]

* [dpdk-dev] [PATCH v6 0/4] ethdev new offloads API
  2017-09-28 18:54  4% ` [dpdk-dev] [PATCH v5 " Shahaf Shuler
@ 2017-10-04  8:17  4%   ` Shahaf Shuler
  2017-10-04 16:12  0%     ` Ananyev, Konstantin
  0 siblings, 1 reply; 200+ results
From: Shahaf Shuler @ 2017-10-04  8:17 UTC (permalink / raw)
  To: konstantin.ananyev, thomas, arybchenko, jerin.jacob, ferruh.yigit; +Cc: dev

Tx offloads configuration is per queue. Tx offloads are enabled by default, 
and can be disabled using ETH_TXQ_FLAGS_NO* flags. 
This behaviour is not consistent with the Rx side where the Rx offloads
configuration is per port. Rx offloads are disabled by default and enabled 
according to bit field in rte_eth_rxmode structure.

Moreover, considering more Tx and Rx offloads will be added 
over time, the cost of managing them all inside the PMD will be tremendous,
as the PMD will need to check the matching for the entire offload set 
for each mbuf it handles.
In addition, on the current approach each Rx offload added breaks the
ABI compatibility as it requires to add entries to existing bit-fields.
 
The series address above issues by defining a new offloads API.
In the new API, offloads are divided into per-port and per-queue offloads,
with a corresponding capability for each.
The offloads are disabled by default. Each offload can be enabled or
disabled using the existing DEV_TX_OFFLOADS_* or DEV_RX_OFFLOADS_* flags.
Such API will enable to easily add or remove offloads, without breaking the
ABI compatibility.

In order to provide a smooth transition between the APIs the following actions
were taken:
*  The old offloads API is kept for the meanwhile.
*  Helper function which copy from old to new API were added to ethdev,
   enabling the PMD to support only one of the APIs.
*  Helper function which copy from new to old API were also added,
   to enable application to use the new API with PMD which still supports
   the old one.

Per discussion made on the RFC of this series [1], the integration plan which was
decided is to do the transition in two phases:
* ethdev API will move on 17.11.
* Apps and examples will move on 18.02.

This to enable PMD maintainers sufficient time to adopt the new API.

[1]
http://dpdk.org/ml/archives/dev/2017-August/072643.html

on v6:
 - Move mbuf fast free Tx offload to a seperate patch.

on v5:
 - Fix documentation.
 - Fix comments on port offloads configuration.

on v4:
 - Added another patch for documentation.
 - Fixed ETH_TXQ_FLAGS_IGNORE flag override.
 - Clarify the description of DEV_TX_OFFLOAD_MBUF_FAST_FREE offload.

on v3:
 - Introduce the DEV_TX_OFFLOAD_MBUF_FAST_FREE to act as an equivalent
   for the no refcnt and single mempool flags.
 - Fix features documentation.
 - Fix comment style.

on v2:
 - Taking new approach of dividing offloads into per-queue and per-port one.
 - Postpone the Tx/Rx public struct renaming to 18.02
 - Squash the helper functions into the Rx/Tx offloads intro patches.

Shahaf Shuler (4):
  ethdev: introduce Rx queue offloads API
  ethdev: introduce Tx queue offloads API
  ethdev: add mbuf fast free Tx offload
  doc: add details on ethdev offloads API

 doc/guides/nics/features.rst            |  66 +++++---
 doc/guides/nics/features/default.ini    |   1 +
 doc/guides/prog_guide/poll_mode_drv.rst |  20 +++
 lib/librte_ether/rte_ethdev.c           | 223 +++++++++++++++++++++++++--
 lib/librte_ether/rte_ethdev.h           |  89 ++++++++++-
 5 files changed, 359 insertions(+), 40 deletions(-)

Series-reviewed-by: Andrew Rybchenko <arybchenko@solarflare.com>

-- 
2.12.0

^ permalink raw reply	[relevance 4%]

* [dpdk-dev] [PATCH v4] Policy Based Power Control for Guest
  @ 2017-10-04  9:15  2% ` David Hunt
  2017-10-04 15:25  2%   ` [dpdk-dev] [PATCH v5 0/9] " David Hunt
  0 siblings, 1 reply; 200+ results
From: David Hunt @ 2017-10-04  9:15 UTC (permalink / raw)
  To: dev; +Cc: konstantin.ananyev, jingjing.wu

This patchset adds the facility for a guest VM to send a policy down to the
host that will allow the host to scale up/down cpu frequencies
depending on the policy criteria independently of the DPDK app running in
the guest.  This differs from the previous vm_power implementation where
individual scale up/down requests were send from the guest to the host via
virtio-serial.

V4 patchset changes:
  * None, replying into correct email thread. V3 was a reply to the
    turbo patch set, should have been inband policy power patchset.

V3 patchset changes:
  * Changed to using is_same_ether_addr() instead of looping through
    the mac address bytes to compare them.
  * Tweaked some comments and working in the i40e patch after review.
  * Added a patch to the set to add new i40e function to map file, so
    as to allow shared library builds. The power library API needs a cleanup
    in next release, so will add API/ABI warning for this cleanup in a
    separate patch.

V2 patchset changes:
  * Removed API's in ethdev layer.
  * Now just a single new API in the i40e driver for mapping VF MAC to
    VF index.
  * Moved new function from rte_rxtx.c to rte_pmd_i40e.c
  * Removed function for reading i40e register, moved to using the
    standard stats API.
  * Renamed i40e function to rte_pmd_i40e_query_vfid_by_mac
  * Cleaned up policy generation code.

It's a modification of the vm_power_manager app that runs in the host, and
the guest_vm_power_app example app that runs in the guest. This allows the
guest to send down a policy to the host via virtio-serial, which then allows
the host to scale up/down based on the criteria in the policy, resulting in
quicker scale up/down than individual requests coming from the guest.
It also means that the DPDK application running in the guest does not need
to be modified in any way, it is unaware that it's cores are being scaled
up/down, reducing the effort in implementing a power-aware infrastructure.

The usage model is as follows:
1. Set up the VF's and assign to the guest in the usual way.
2. run vm_power_manager on the host, creating a channel to the guest.
3. Start the guest_vm_power_mgr app on the guest, which establishes
   a virtio-serial channel to the host.
4. Send down the profile for the guest using the "send_profile now" command.
   There is an example profile hard-coded into guest_vm_power_mgr.
5. Stop the guest_vm_power_mgr and run your normal power-unaware application.
6. Send traffic into the VFs at varying traffic rates.
   Observe the frequency change on the host (turbostat -i 1)

The sequence of code changes are as follows:

A new function has been aded to the i40e driver to allow mapping of
a VF MAC to VF index.

Next we make an addition to librte_power that adds an extra command to allow
the passing of a policy structure from the guest to the host. This struct
contains information like busy/quiet hour, packet throughput thresholds, etc.

The next addition adds functionality to convert the virtual CPU (vcpU0 IDs to
physical CPU (pcpu) IDs so that the host can scale up/down the cores used
in the guest.

The remaining patches are functionality to process the policy, and take action
when the relevant trigger occurs to cause a frequency change.

[1/9] net/i40e: add API to convert VF MAC to VF id
[2/9] lib/librte_power: add extra msg type for policies
[3/9] examples/vm_power_mgr: add vcpu to pcpu mapping
[4/9] examples/vm_power_mgr: add scale to medium freq fn
[5/9] examples/vm_power_mgr: add policy to channels
[6/9] examples/vm_power_mgr: add port initialisation
[7/9] power: add send channel msg function to map file
[8/9] examples/guest_cli: add send policy to host
[9/9] examples/vm_power_mgr: set MAC address of VF

^ permalink raw reply	[relevance 2%]

* [dpdk-dev] [PATCH v5 2/5] net/i40e: implement dynamic mapping of sw flow types to hw pctypes
  @ 2017-10-04 12:52  3%       ` Kirill Rybalchenko
  0 siblings, 0 replies; 200+ results
From: Kirill Rybalchenko @ 2017-10-04 12:52 UTC (permalink / raw)
  To: dev; +Cc: kirill.rybalchenko, andrey.chilikin, beilei.xing, jingjing.wu

Implement dynamic mapping of software flow types to hardware pctypes.
This allows to add new flow types and pctypes for DDP without changing
API of the driver. The mapping table is located in private
data area for particular network adapter and can be individually
modified with set of appropriate functions.

v2:
Re-arrange patchset to avoid compillation errors.
Remove usage of statically defined flow types and pctypes.

v3:
Change prototypes of some static functions.
Fixe bugs in i40e_pctype_to_flowtype and i40e_flowtype_to_pctype
functions.
Various small modifications after reviewing.

v4:
Change prototypes of some static functions.
Move declaration of automatic variables to beginning of function.
Move declaration of I40E_FILTER_PCTYPE_INVALID to i40e_ethdev.h

v5:
Fix code style warnings.

Signed-off-by: Kirill Rybalchenko <kirill.rybalchenko@intel.com>
---
 drivers/net/i40e/i40e_ethdev.c    | 347 ++++++++++++--------------------------
 drivers/net/i40e/i40e_ethdev.h    |  23 ++-
 drivers/net/i40e/i40e_ethdev_vf.c |  16 +-
 drivers/net/i40e/i40e_fdir.c      |  54 +++---
 drivers/net/i40e/i40e_flow.c      |   5 +-
 drivers/net/i40e/i40e_rxtx.c      |  58 +++++++
 drivers/net/i40e/i40e_rxtx.h      |   1 +
 7 files changed, 218 insertions(+), 286 deletions(-)

diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c
index 41c4033..0b151a0 100644
--- a/drivers/net/i40e/i40e_ethdev.c
+++ b/drivers/net/i40e/i40e_ethdev.c
@@ -1070,6 +1070,7 @@ eth_i40e_dev_init(struct rte_eth_dev *dev)
 		return 0;
 	}
 	i40e_set_default_ptype_table(dev);
+	i40e_set_default_pctype_table(dev);
 	pci_dev = RTE_ETH_DEV_TO_PCI(dev);
 	intr_handle = &pci_dev->intr_handle;
 
@@ -3020,7 +3021,7 @@ i40e_dev_info_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info)
 	dev_info->hash_key_size = (I40E_PFQF_HKEY_MAX_INDEX + 1) *
 						sizeof(uint32_t);
 	dev_info->reta_size = pf->hash_lut_size;
-	dev_info->flow_type_rss_offloads = I40E_RSS_OFFLOAD_ALL;
+	dev_info->flow_type_rss_offloads = pf->adapter->flow_types_mask;
 
 	dev_info->default_rxconf = (struct rte_eth_rxconf) {
 		.rx_thresh = {
@@ -6611,104 +6612,36 @@ i40e_vsi_delete_mac(struct i40e_vsi *vsi, struct ether_addr *addr)
 
 /* Configure hash enable flags for RSS */
 uint64_t
-i40e_config_hena(uint64_t flags, enum i40e_mac_type type)
+i40e_config_hena(const struct i40e_adapter *adapter, uint64_t flags)
 {
 	uint64_t hena = 0;
+	int i;
 
 	if (!flags)
 		return hena;
 
-	if (flags & ETH_RSS_FRAG_IPV4)
-		hena |= 1ULL << I40E_FILTER_PCTYPE_FRAG_IPV4;
-	if (flags & ETH_RSS_NONFRAG_IPV4_TCP) {
-		if (type == I40E_MAC_X722) {
-			hena |= (1ULL << I40E_FILTER_PCTYPE_NONF_IPV4_TCP) |
-			 (1ULL << I40E_FILTER_PCTYPE_NONF_IPV4_TCP_SYN_NO_ACK);
-		} else
-			hena |= 1ULL << I40E_FILTER_PCTYPE_NONF_IPV4_TCP;
-	}
-	if (flags & ETH_RSS_NONFRAG_IPV4_UDP) {
-		if (type == I40E_MAC_X722) {
-			hena |= (1ULL << I40E_FILTER_PCTYPE_NONF_IPV4_UDP) |
-			 (1ULL << I40E_FILTER_PCTYPE_NONF_UNICAST_IPV4_UDP) |
-			 (1ULL << I40E_FILTER_PCTYPE_NONF_MULTICAST_IPV4_UDP);
-		} else
-			hena |= 1ULL << I40E_FILTER_PCTYPE_NONF_IPV4_UDP;
-	}
-	if (flags & ETH_RSS_NONFRAG_IPV4_SCTP)
-		hena |= 1ULL << I40E_FILTER_PCTYPE_NONF_IPV4_SCTP;
-	if (flags & ETH_RSS_NONFRAG_IPV4_OTHER)
-		hena |= 1ULL << I40E_FILTER_PCTYPE_NONF_IPV4_OTHER;
-	if (flags & ETH_RSS_FRAG_IPV6)
-		hena |= 1ULL << I40E_FILTER_PCTYPE_FRAG_IPV6;
-	if (flags & ETH_RSS_NONFRAG_IPV6_TCP) {
-		if (type == I40E_MAC_X722) {
-			hena |= (1ULL << I40E_FILTER_PCTYPE_NONF_IPV6_TCP) |
-			 (1ULL << I40E_FILTER_PCTYPE_NONF_IPV6_TCP_SYN_NO_ACK);
-		} else
-			hena |= 1ULL << I40E_FILTER_PCTYPE_NONF_IPV6_TCP;
+	for (i = RTE_ETH_FLOW_UNKNOWN + 1; i < I40E_FLOW_TYPE_MAX; i++) {
+		if (flags & (1ULL << i))
+			hena |= adapter->pctypes_tbl[i];
 	}
-	if (flags & ETH_RSS_NONFRAG_IPV6_UDP) {
-		if (type == I40E_MAC_X722) {
-			hena |= (1ULL << I40E_FILTER_PCTYPE_NONF_IPV6_UDP) |
-			 (1ULL << I40E_FILTER_PCTYPE_NONF_UNICAST_IPV6_UDP) |
-			 (1ULL << I40E_FILTER_PCTYPE_NONF_MULTICAST_IPV6_UDP);
-		} else
-			hena |= 1ULL << I40E_FILTER_PCTYPE_NONF_IPV6_UDP;
-	}
-	if (flags & ETH_RSS_NONFRAG_IPV6_SCTP)
-		hena |= 1ULL << I40E_FILTER_PCTYPE_NONF_IPV6_SCTP;
-	if (flags & ETH_RSS_NONFRAG_IPV6_OTHER)
-		hena |= 1ULL << I40E_FILTER_PCTYPE_NONF_IPV6_OTHER;
-	if (flags & ETH_RSS_L2_PAYLOAD)
-		hena |= 1ULL << I40E_FILTER_PCTYPE_L2_PAYLOAD;
 
 	return hena;
 }
 
 /* Parse the hash enable flags */
 uint64_t
-i40e_parse_hena(uint64_t flags)
+i40e_parse_hena(const struct i40e_adapter *adapter, uint64_t flags)
 {
 	uint64_t rss_hf = 0;
 
 	if (!flags)
 		return rss_hf;
-	if (flags & (1ULL << I40E_FILTER_PCTYPE_FRAG_IPV4))
-		rss_hf |= ETH_RSS_FRAG_IPV4;
-	if (flags & (1ULL << I40E_FILTER_PCTYPE_NONF_IPV4_TCP))
-		rss_hf |= ETH_RSS_NONFRAG_IPV4_TCP;
-	if (flags & (1ULL << I40E_FILTER_PCTYPE_NONF_IPV4_TCP_SYN_NO_ACK))
-		rss_hf |= ETH_RSS_NONFRAG_IPV4_TCP;
-	if (flags & (1ULL << I40E_FILTER_PCTYPE_NONF_IPV4_UDP))
-		rss_hf |= ETH_RSS_NONFRAG_IPV4_UDP;
-	if (flags & (1ULL << I40E_FILTER_PCTYPE_NONF_UNICAST_IPV4_UDP))
-		rss_hf |= ETH_RSS_NONFRAG_IPV4_UDP;
-	if (flags & (1ULL << I40E_FILTER_PCTYPE_NONF_MULTICAST_IPV4_UDP))
-		rss_hf |= ETH_RSS_NONFRAG_IPV4_UDP;
-	if (flags & (1ULL << I40E_FILTER_PCTYPE_NONF_IPV4_SCTP))
-		rss_hf |= ETH_RSS_NONFRAG_IPV4_SCTP;
-	if (flags & (1ULL << I40E_FILTER_PCTYPE_NONF_IPV4_OTHER))
-		rss_hf |= ETH_RSS_NONFRAG_IPV4_OTHER;
-	if (flags & (1ULL << I40E_FILTER_PCTYPE_FRAG_IPV6))
-		rss_hf |= ETH_RSS_FRAG_IPV6;
-	if (flags & (1ULL << I40E_FILTER_PCTYPE_NONF_IPV6_TCP))
-		rss_hf |= ETH_RSS_NONFRAG_IPV6_TCP;
-	if (flags & (1ULL << I40E_FILTER_PCTYPE_NONF_IPV6_TCP_SYN_NO_ACK))
-		rss_hf |= ETH_RSS_NONFRAG_IPV6_TCP;
-	if (flags & (1ULL << I40E_FILTER_PCTYPE_NONF_IPV6_UDP))
-		rss_hf |= ETH_RSS_NONFRAG_IPV6_UDP;
-	if (flags & (1ULL << I40E_FILTER_PCTYPE_NONF_UNICAST_IPV6_UDP))
-		rss_hf |= ETH_RSS_NONFRAG_IPV6_UDP;
-	if (flags & (1ULL << I40E_FILTER_PCTYPE_NONF_MULTICAST_IPV6_UDP))
-		rss_hf |= ETH_RSS_NONFRAG_IPV6_UDP;
-	if (flags & (1ULL << I40E_FILTER_PCTYPE_NONF_IPV6_SCTP))
-		rss_hf |= ETH_RSS_NONFRAG_IPV6_SCTP;
-	if (flags & (1ULL << I40E_FILTER_PCTYPE_NONF_IPV6_OTHER))
-		rss_hf |= ETH_RSS_NONFRAG_IPV6_OTHER;
-	if (flags & (1ULL << I40E_FILTER_PCTYPE_L2_PAYLOAD))
-		rss_hf |= ETH_RSS_L2_PAYLOAD;
+	int i;
 
+	for (i = RTE_ETH_FLOW_UNKNOWN + 1; i < I40E_FLOW_TYPE_MAX; i++) {
+		if (flags & adapter->pctypes_tbl[i])
+			rss_hf |= (1ULL << i);
+	}
 	return rss_hf;
 }
 
@@ -6799,7 +6732,7 @@ i40e_hw_rss_hash_set(struct i40e_pf *pf, struct rte_eth_rss_conf *rss_conf)
 	if (ret)
 		return ret;
 
-	hena = i40e_config_hena(rss_conf->rss_hf, hw->mac.type);
+	hena = i40e_config_hena(pf->adapter, rss_conf->rss_hf);
 	i40e_write_rx_ctl(hw, I40E_PFQF_HENA(0), (uint32_t)hena);
 	i40e_write_rx_ctl(hw, I40E_PFQF_HENA(1), (uint32_t)(hena >> 32));
 	I40E_WRITE_FLUSH(hw);
@@ -6813,14 +6746,13 @@ i40e_dev_rss_hash_update(struct rte_eth_dev *dev,
 {
 	struct i40e_pf *pf = I40E_DEV_PRIVATE_TO_PF(dev->data->dev_private);
 	struct i40e_hw *hw = I40E_DEV_PRIVATE_TO_HW(dev->data->dev_private);
-	uint64_t rss_hf = rss_conf->rss_hf & I40E_RSS_OFFLOAD_ALL;
+	uint64_t rss_hf = rss_conf->rss_hf & pf->adapter->flow_types_mask;
 	uint64_t hena;
 
 	hena = (uint64_t)i40e_read_rx_ctl(hw, I40E_PFQF_HENA(0));
 	hena |= ((uint64_t)i40e_read_rx_ctl(hw, I40E_PFQF_HENA(1))) << 32;
-	if (!(hena & ((hw->mac.type == I40E_MAC_X722)
-		 ? I40E_RSS_HENA_ALL_X722
-		 : I40E_RSS_HENA_ALL))) { /* RSS disabled */
+
+	if (!(hena & pf->adapter->pctypes_mask)) { /* RSS disabled */
 		if (rss_hf != 0) /* Enable RSS */
 			return -EINVAL;
 		return 0; /* Nothing to do */
@@ -6845,7 +6777,7 @@ i40e_dev_rss_hash_conf_get(struct rte_eth_dev *dev,
 
 	hena = (uint64_t)i40e_read_rx_ctl(hw, I40E_PFQF_HENA(0));
 	hena |= ((uint64_t)i40e_read_rx_ctl(hw, I40E_PFQF_HENA(1))) << 32;
-	rss_conf->rss_hf = i40e_parse_hena(hena);
+	rss_conf->rss_hf = i40e_parse_hena(pf->adapter, hena);
 
 	return 0;
 }
@@ -7620,7 +7552,7 @@ i40e_pf_config_rss(struct i40e_pf *pf)
 	}
 
 	rss_conf = pf->dev_data->dev_conf.rx_adv_conf.rss_conf;
-	if ((rss_conf.rss_hf & I40E_RSS_OFFLOAD_ALL) == 0) {
+	if ((rss_conf.rss_hf & pf->adapter->flow_types_mask) == 0) {
 		i40e_pf_disable_rss(pf);
 		return 0;
 	}
@@ -7841,9 +7773,9 @@ static int
 i40e_get_hash_filter_global_config(struct i40e_hw *hw,
 				   struct rte_eth_hash_global_conf *g_cfg)
 {
-	uint32_t reg, mask = I40E_FLOW_TYPES;
-	uint16_t i;
-	enum i40e_filter_pctype pctype;
+	struct i40e_adapter *adapter = (struct i40e_adapter *)hw->back;
+	uint32_t reg;
+	uint16_t i, j;
 
 	memset(g_cfg, 0, sizeof(*g_cfg));
 	reg = i40e_read_rx_ctl(hw, I40E_GLQF_CTL);
@@ -7854,29 +7786,38 @@ i40e_get_hash_filter_global_config(struct i40e_hw *hw,
 	PMD_DRV_LOG(DEBUG, "Hash function is %s",
 		(reg & I40E_GLQF_CTL_HTOEP_MASK) ? "Toeplitz" : "Simple XOR");
 
-	for (i = 0; mask && i < RTE_ETH_FLOW_MAX; i++) {
-		if (!(mask & (1UL << i)))
-			continue;
-		mask &= ~(1UL << i);
-		/* Bit set indicats the coresponding flow type is supported */
-		g_cfg->valid_bit_mask[0] |= (1UL << i);
-		/* if flowtype is invalid, continue */
-		if (!I40E_VALID_FLOW(i))
+	/*
+	 * We work only with lowest 32 bits which is not correct, but to work
+	 * properly the valid_bit_mask size should be increased up to 64 bits
+	 * and this will brake ABI. This modification will be done in next
+	 * release
+	 */
+	g_cfg->valid_bit_mask[0] = (uint32_t)adapter->flow_types_mask;
+
+	for (i = RTE_ETH_FLOW_UNKNOWN + 1; i < UINT32_BIT; i++) {
+		if (!adapter->pctypes_tbl[i])
 			continue;
-		pctype = i40e_flowtype_to_pctype(i);
-		reg = i40e_read_rx_ctl(hw, I40E_GLQF_HSYM(pctype));
-		if (reg & I40E_GLQF_HSYM_SYMH_ENA_MASK)
-			g_cfg->sym_hash_enable_mask[0] |= (1UL << i);
+		for (j = I40E_FILTER_PCTYPE_INVALID + 1;
+		     j < I40E_FILTER_PCTYPE_MAX; j++) {
+			if (adapter->pctypes_tbl[i] & (1ULL << j)) {
+				reg = i40e_read_rx_ctl(hw, I40E_GLQF_HSYM(j));
+				if (reg & I40E_GLQF_HSYM_SYMH_ENA_MASK) {
+					g_cfg->sym_hash_enable_mask[0] |=
+								(1UL << i);
+				}
+			}
+		}
 	}
 
 	return 0;
 }
 
 static int
-i40e_hash_global_config_check(struct rte_eth_hash_global_conf *g_cfg)
+i40e_hash_global_config_check(const struct i40e_adapter *adapter,
+			      const struct rte_eth_hash_global_conf *g_cfg)
 {
 	uint32_t i;
-	uint32_t mask0, i40e_mask = I40E_FLOW_TYPES;
+	uint32_t mask0, i40e_mask = adapter->flow_types_mask;
 
 	if (g_cfg->hash_func != RTE_ETH_HASH_FUNCTION_TOEPLITZ &&
 		g_cfg->hash_func != RTE_ETH_HASH_FUNCTION_SIMPLE_XOR &&
@@ -7919,64 +7860,36 @@ static int
 i40e_set_hash_filter_global_config(struct i40e_hw *hw,
 				   struct rte_eth_hash_global_conf *g_cfg)
 {
+	struct i40e_adapter *adapter = (struct i40e_adapter *)hw->back;
 	int ret;
-	uint16_t i;
+	uint16_t i, j;
 	uint32_t reg;
-	uint32_t mask0 = g_cfg->valid_bit_mask[0];
-	enum i40e_filter_pctype pctype;
+	/*
+	 * We work only with lowest 32 bits which is not correct, but to work
+	 * properly the valid_bit_mask size should be increased up to 64 bits
+	 * and this will brake ABI. This modification will be done in next
+	 * release
+	 */
+	uint32_t mask0 = g_cfg->valid_bit_mask[0] &
+					(uint32_t)adapter->flow_types_mask;
 
 	/* Check the input parameters */
-	ret = i40e_hash_global_config_check(g_cfg);
+	ret = i40e_hash_global_config_check(adapter, g_cfg);
 	if (ret < 0)
 		return ret;
 
-	for (i = 0; mask0 && i < UINT32_BIT; i++) {
-		if (!(mask0 & (1UL << i)))
-			continue;
-		mask0 &= ~(1UL << i);
-		/* if flowtype is invalid, continue */
-		if (!I40E_VALID_FLOW(i))
-			continue;
-		pctype = i40e_flowtype_to_pctype(i);
-		reg = (g_cfg->sym_hash_enable_mask[0] & (1UL << i)) ?
-				I40E_GLQF_HSYM_SYMH_ENA_MASK : 0;
-		if (hw->mac.type == I40E_MAC_X722) {
-			if (pctype == I40E_FILTER_PCTYPE_NONF_IPV4_UDP) {
-				i40e_write_rx_ctl(hw, I40E_GLQF_HSYM(
-				  I40E_FILTER_PCTYPE_NONF_IPV4_UDP), reg);
-				i40e_write_rx_ctl(hw, I40E_GLQF_HSYM(
-				  I40E_FILTER_PCTYPE_NONF_UNICAST_IPV4_UDP),
-				  reg);
-				i40e_write_rx_ctl(hw, I40E_GLQF_HSYM(
-				  I40E_FILTER_PCTYPE_NONF_MULTICAST_IPV4_UDP),
-				  reg);
-			} else if (pctype == I40E_FILTER_PCTYPE_NONF_IPV4_TCP) {
-				i40e_write_rx_ctl(hw, I40E_GLQF_HSYM(
-				  I40E_FILTER_PCTYPE_NONF_IPV4_TCP), reg);
-				i40e_write_rx_ctl(hw, I40E_GLQF_HSYM(
-				  I40E_FILTER_PCTYPE_NONF_IPV4_TCP_SYN_NO_ACK),
-				  reg);
-			} else if (pctype == I40E_FILTER_PCTYPE_NONF_IPV6_UDP) {
-				i40e_write_rx_ctl(hw, I40E_GLQF_HSYM(
-				  I40E_FILTER_PCTYPE_NONF_IPV6_UDP), reg);
-				i40e_write_rx_ctl(hw, I40E_GLQF_HSYM(
-				  I40E_FILTER_PCTYPE_NONF_UNICAST_IPV6_UDP),
-				  reg);
-				i40e_write_rx_ctl(hw, I40E_GLQF_HSYM(
-				  I40E_FILTER_PCTYPE_NONF_MULTICAST_IPV6_UDP),
-				  reg);
-			} else if (pctype == I40E_FILTER_PCTYPE_NONF_IPV6_TCP) {
-				i40e_write_rx_ctl(hw, I40E_GLQF_HSYM(
-				  I40E_FILTER_PCTYPE_NONF_IPV6_TCP), reg);
-				i40e_write_rx_ctl(hw, I40E_GLQF_HSYM(
-				  I40E_FILTER_PCTYPE_NONF_IPV6_TCP_SYN_NO_ACK),
-				  reg);
-			} else {
-				i40e_write_rx_ctl(hw, I40E_GLQF_HSYM(pctype),
-				  reg);
+	for (i = RTE_ETH_FLOW_UNKNOWN + 1; mask0 && i < UINT32_BIT; i++) {
+		if (mask0 & (1UL << i)) {
+			reg = (g_cfg->sym_hash_enable_mask[0] & (1UL << i)) ?
+					I40E_GLQF_HSYM_SYMH_ENA_MASK : 0;
+
+			for (j = I40E_FILTER_PCTYPE_INVALID + 1;
+			     j < I40E_FILTER_PCTYPE_MAX; j++) {
+				if (adapter->pctypes_tbl[i] & (1ULL << j))
+					i40e_write_rx_ctl(hw,
+							  I40E_GLQF_HSYM(j),
+							  reg);
 			}
-		} else {
-			i40e_write_rx_ctl(hw, I40E_GLQF_HSYM(pctype), reg);
 		}
 	}
 
@@ -8598,16 +8511,14 @@ i40e_filter_input_set_init(struct i40e_pf *pf)
 	uint64_t input_set, inset_reg;
 	uint32_t mask_reg[I40E_INSET_MASK_NUM_REG] = {0};
 	int num, i;
+	uint16_t flow_type;
 
 	for (pctype = I40E_FILTER_PCTYPE_NONF_IPV4_UDP;
 	     pctype <= I40E_FILTER_PCTYPE_L2_PAYLOAD; pctype++) {
-		if (hw->mac.type == I40E_MAC_X722) {
-			if (!I40E_VALID_PCTYPE_X722(pctype))
-				continue;
-		} else {
-			if (!I40E_VALID_PCTYPE(pctype))
-				continue;
-		}
+		flow_type = i40e_pctype_to_flowtype(pf->adapter, pctype);
+
+		if (flow_type == RTE_ETH_FLOW_UNKNOWN)
+			continue;
 
 		input_set = i40e_get_default_input_set(pctype);
 
@@ -8670,7 +8581,8 @@ i40e_hash_filter_inset_select(struct i40e_hw *hw,
 		return -EINVAL;
 	}
 
-	if (!I40E_VALID_FLOW(conf->flow_type)) {
+	pctype = i40e_flowtype_to_pctype(pf->adapter, conf->flow_type);
+	if (pctype == I40E_FILTER_PCTYPE_INVALID) {
 		PMD_DRV_LOG(ERR, "invalid flow_type input.");
 		return -EINVAL;
 	}
@@ -8678,10 +8590,8 @@ i40e_hash_filter_inset_select(struct i40e_hw *hw,
 	if (hw->mac.type == I40E_MAC_X722) {
 		/* get translated pctype value in fd pctype register */
 		pctype = (enum i40e_filter_pctype)i40e_read_rx_ctl(hw,
-			I40E_GLQF_FD_PCTYPES((int)i40e_flowtype_to_pctype(
-			conf->flow_type)));
-	} else
-		pctype = i40e_flowtype_to_pctype(conf->flow_type);
+			I40E_GLQF_FD_PCTYPES((int)pctype));
+	}
 
 	ret = i40e_parse_input_set(&input_set, pctype, conf->field,
 				   conf->inset_size);
@@ -8689,11 +8599,7 @@ i40e_hash_filter_inset_select(struct i40e_hw *hw,
 		PMD_DRV_LOG(ERR, "Failed to parse input set");
 		return -EINVAL;
 	}
-	if (i40e_validate_input_set(pctype, RTE_ETH_FILTER_HASH,
-				    input_set) != 0) {
-		PMD_DRV_LOG(ERR, "Invalid input set");
-		return -EINVAL;
-	}
+
 	if (conf->op == RTE_ETH_INPUT_SET_ADD) {
 		/* get inset value in register */
 		inset_reg = i40e_read_rx_ctl(hw, I40E_GLQF_HASH_INSET(1, pctype));
@@ -8747,24 +8653,19 @@ i40e_fdir_filter_inset_select(struct i40e_pf *pf,
 		return -EINVAL;
 	}
 
-	if (!I40E_VALID_FLOW(conf->flow_type)) {
+	pctype = i40e_flowtype_to_pctype(pf->adapter, conf->flow_type);
+
+	if (pctype == I40E_FILTER_PCTYPE_INVALID) {
 		PMD_DRV_LOG(ERR, "invalid flow_type input.");
 		return -EINVAL;
 	}
 
-	pctype = i40e_flowtype_to_pctype(conf->flow_type);
-
 	ret = i40e_parse_input_set(&input_set, pctype, conf->field,
 				   conf->inset_size);
 	if (ret) {
 		PMD_DRV_LOG(ERR, "Failed to parse input set");
 		return -EINVAL;
 	}
-	if (i40e_validate_input_set(pctype, RTE_ETH_FILTER_FDIR,
-				    input_set) != 0) {
-		PMD_DRV_LOG(ERR, "Invalid input set");
-		return -EINVAL;
-	}
 
 	/* get inset value in register */
 	inset_reg = i40e_read_rx_ctl(hw, I40E_PRTQF_FD_INSET(pctype, 1));
@@ -9203,72 +9104,42 @@ i40e_hw_init(struct rte_eth_dev *dev)
 	i40e_set_symmetric_hash_enable_per_port(hw, 0);
 }
 
+/*
+ * For X722 it is possible to have multiple pctypes mapped to the same flowtype
+ * however this function will return only one highest pctype index,
+ * which is not quite correct. This is known problem of i40e driver
+ * and needs to be fixed later.
+ */
 enum i40e_filter_pctype
-i40e_flowtype_to_pctype(uint16_t flow_type)
-{
-	static const enum i40e_filter_pctype pctype_table[] = {
-		[RTE_ETH_FLOW_FRAG_IPV4] = I40E_FILTER_PCTYPE_FRAG_IPV4,
-		[RTE_ETH_FLOW_NONFRAG_IPV4_UDP] =
-			I40E_FILTER_PCTYPE_NONF_IPV4_UDP,
-		[RTE_ETH_FLOW_NONFRAG_IPV4_TCP] =
-			I40E_FILTER_PCTYPE_NONF_IPV4_TCP,
-		[RTE_ETH_FLOW_NONFRAG_IPV4_SCTP] =
-			I40E_FILTER_PCTYPE_NONF_IPV4_SCTP,
-		[RTE_ETH_FLOW_NONFRAG_IPV4_OTHER] =
-			I40E_FILTER_PCTYPE_NONF_IPV4_OTHER,
-		[RTE_ETH_FLOW_FRAG_IPV6] = I40E_FILTER_PCTYPE_FRAG_IPV6,
-		[RTE_ETH_FLOW_NONFRAG_IPV6_UDP] =
-			I40E_FILTER_PCTYPE_NONF_IPV6_UDP,
-		[RTE_ETH_FLOW_NONFRAG_IPV6_TCP] =
-			I40E_FILTER_PCTYPE_NONF_IPV6_TCP,
-		[RTE_ETH_FLOW_NONFRAG_IPV6_SCTP] =
-			I40E_FILTER_PCTYPE_NONF_IPV6_SCTP,
-		[RTE_ETH_FLOW_NONFRAG_IPV6_OTHER] =
-			I40E_FILTER_PCTYPE_NONF_IPV6_OTHER,
-		[RTE_ETH_FLOW_L2_PAYLOAD] = I40E_FILTER_PCTYPE_L2_PAYLOAD,
-	};
+i40e_flowtype_to_pctype(const struct i40e_adapter *adapter, uint16_t flow_type)
+{
+	int i;
+	uint64_t pctype_mask;
 
-	return pctype_table[flow_type];
+	if (flow_type < I40E_FLOW_TYPE_MAX) {
+		pctype_mask = adapter->pctypes_tbl[flow_type];
+		for (i = I40E_FILTER_PCTYPE_MAX - 1; i > 0; i--) {
+			if (pctype_mask & (1ULL << i))
+				return (enum i40e_filter_pctype)i;
+		}
+	}
+	return I40E_FILTER_PCTYPE_INVALID;
 }
 
 uint16_t
-i40e_pctype_to_flowtype(enum i40e_filter_pctype pctype)
+i40e_pctype_to_flowtype(const struct i40e_adapter *adapter,
+			enum i40e_filter_pctype pctype)
 {
-	static const uint16_t flowtype_table[] = {
-		[I40E_FILTER_PCTYPE_FRAG_IPV4] = RTE_ETH_FLOW_FRAG_IPV4,
-		[I40E_FILTER_PCTYPE_NONF_IPV4_UDP] =
-			RTE_ETH_FLOW_NONFRAG_IPV4_UDP,
-		[I40E_FILTER_PCTYPE_NONF_UNICAST_IPV4_UDP] =
-			RTE_ETH_FLOW_NONFRAG_IPV4_UDP,
-		[I40E_FILTER_PCTYPE_NONF_MULTICAST_IPV4_UDP] =
-			RTE_ETH_FLOW_NONFRAG_IPV4_UDP,
-		[I40E_FILTER_PCTYPE_NONF_IPV4_TCP] =
-			RTE_ETH_FLOW_NONFRAG_IPV4_TCP,
-		[I40E_FILTER_PCTYPE_NONF_IPV4_TCP_SYN_NO_ACK] =
-			RTE_ETH_FLOW_NONFRAG_IPV4_TCP,
-		[I40E_FILTER_PCTYPE_NONF_IPV4_SCTP] =
-			RTE_ETH_FLOW_NONFRAG_IPV4_SCTP,
-		[I40E_FILTER_PCTYPE_NONF_IPV4_OTHER] =
-			RTE_ETH_FLOW_NONFRAG_IPV4_OTHER,
-		[I40E_FILTER_PCTYPE_FRAG_IPV6] = RTE_ETH_FLOW_FRAG_IPV6,
-		[I40E_FILTER_PCTYPE_NONF_IPV6_UDP] =
-			RTE_ETH_FLOW_NONFRAG_IPV6_UDP,
-		[I40E_FILTER_PCTYPE_NONF_UNICAST_IPV6_UDP] =
-			RTE_ETH_FLOW_NONFRAG_IPV6_UDP,
-		[I40E_FILTER_PCTYPE_NONF_MULTICAST_IPV6_UDP] =
-			RTE_ETH_FLOW_NONFRAG_IPV6_UDP,
-		[I40E_FILTER_PCTYPE_NONF_IPV6_TCP] =
-			RTE_ETH_FLOW_NONFRAG_IPV6_TCP,
-		[I40E_FILTER_PCTYPE_NONF_IPV6_TCP_SYN_NO_ACK] =
-			RTE_ETH_FLOW_NONFRAG_IPV6_TCP,
-		[I40E_FILTER_PCTYPE_NONF_IPV6_SCTP] =
-			RTE_ETH_FLOW_NONFRAG_IPV6_SCTP,
-		[I40E_FILTER_PCTYPE_NONF_IPV6_OTHER] =
-			RTE_ETH_FLOW_NONFRAG_IPV6_OTHER,
-		[I40E_FILTER_PCTYPE_L2_PAYLOAD] = RTE_ETH_FLOW_L2_PAYLOAD,
-	};
+	uint16_t flowtype;
+	uint64_t pctype_mask = 1ULL << pctype;
+
+	for (flowtype = RTE_ETH_FLOW_UNKNOWN + 1; flowtype < I40E_FLOW_TYPE_MAX;
+	     flowtype++) {
+		if (adapter->pctypes_tbl[flowtype] & pctype_mask)
+			return flowtype;
+	}
 
-	return flowtype_table[pctype];
+	return RTE_ETH_FLOW_UNKNOWN;
 }
 
 /*
diff --git a/drivers/net/i40e/i40e_ethdev.h b/drivers/net/i40e/i40e_ethdev.h
index ad80f0f..5b84da2 100644
--- a/drivers/net/i40e/i40e_ethdev.h
+++ b/drivers/net/i40e/i40e_ethdev.h
@@ -478,8 +478,9 @@ struct i40e_fdir_flex_mask {
 	} bitmask[I40E_FDIR_BITMASK_NUM_WORD];
 };
 
-#define I40E_FILTER_PCTYPE_MAX 64
-#define I40E_MAX_FDIR_FILTER_NUM (1024 * 8)
+#define I40E_FILTER_PCTYPE_INVALID 0
+#define I40E_FILTER_PCTYPE_MAX     64
+#define I40E_MAX_FDIR_FILTER_NUM   (1024 * 8)
 
 struct i40e_fdir_filter {
 	TAILQ_ENTRY(i40e_fdir_filter) rules;
@@ -852,7 +853,8 @@ struct i40e_vf {
 	uint64_t flags;
 };
 
-#define I40E_MAX_PKT_TYPE 256
+#define I40E_MAX_PKT_TYPE  256
+#define I40E_FLOW_TYPE_MAX 64
 
 /*
  * Structure to store private data for each PF/VF instance.
@@ -881,6 +883,10 @@ struct i40e_adapter {
 
 	/* ptype mapping table */
 	uint32_t ptype_tbl[I40E_MAX_PKT_TYPE] __rte_cache_min_aligned;
+	/* flow type to pctype mapping table */
+	uint64_t pctypes_tbl[I40E_FLOW_TYPE_MAX] __rte_cache_min_aligned;
+	uint64_t flow_types_mask;
+	uint64_t pctypes_mask;
 };
 
 extern const struct rte_flow_ops i40e_flow_ops;
@@ -925,8 +931,8 @@ int i40e_vsi_vlan_pvid_set(struct i40e_vsi *vsi,
 			   struct i40e_vsi_vlan_pvid_info *info);
 int i40e_vsi_config_vlan_stripping(struct i40e_vsi *vsi, bool on);
 int i40e_vsi_config_vlan_filter(struct i40e_vsi *vsi, bool on);
-uint64_t i40e_config_hena(uint64_t flags, enum i40e_mac_type type);
-uint64_t i40e_parse_hena(uint64_t flags);
+uint64_t i40e_config_hena(const struct i40e_adapter *adapter, uint64_t flags);
+uint64_t i40e_parse_hena(const struct i40e_adapter *adapter, uint64_t flags);
 enum i40e_status_code i40e_fdir_setup_tx_resources(struct i40e_pf *pf);
 enum i40e_status_code i40e_fdir_setup_rx_resources(struct i40e_pf *pf);
 int i40e_fdir_setup(struct i40e_pf *pf);
@@ -935,8 +941,11 @@ const struct rte_memzone *i40e_memzone_reserve(const char *name,
 					int socket_id);
 int i40e_fdir_configure(struct rte_eth_dev *dev);
 void i40e_fdir_teardown(struct i40e_pf *pf);
-enum i40e_filter_pctype i40e_flowtype_to_pctype(uint16_t flow_type);
-uint16_t i40e_pctype_to_flowtype(enum i40e_filter_pctype pctype);
+enum i40e_filter_pctype
+	i40e_flowtype_to_pctype(const struct i40e_adapter *adapter,
+				uint16_t flow_type);
+uint16_t i40e_pctype_to_flowtype(const struct i40e_adapter *adapter,
+				 enum i40e_filter_pctype pctype);
 int i40e_fdir_ctrl_func(struct rte_eth_dev *dev,
 			  enum rte_filter_op filter_op,
 			  void *arg);
diff --git a/drivers/net/i40e/i40e_ethdev_vf.c b/drivers/net/i40e/i40e_ethdev_vf.c
index a903deb..111ac39 100644
--- a/drivers/net/i40e/i40e_ethdev_vf.c
+++ b/drivers/net/i40e/i40e_ethdev_vf.c
@@ -1443,6 +1443,7 @@ i40evf_dev_init(struct rte_eth_dev *eth_dev)
 		return 0;
 	}
 	i40e_set_default_ptype_table(eth_dev);
+	i40e_set_default_pctype_table(eth_dev);
 	rte_eth_copy_pci_info(eth_dev, pci_dev);
 	eth_dev->data->dev_flags |= RTE_ETH_DEV_DETACHABLE;
 
@@ -2178,7 +2179,7 @@ i40evf_dev_info_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info)
 	dev_info->max_rx_pktlen = I40E_FRAME_SIZE_MAX;
 	dev_info->hash_key_size = (I40E_VFQF_HKEY_MAX_INDEX + 1) * sizeof(uint32_t);
 	dev_info->reta_size = ETH_RSS_RETA_SIZE_64;
-	dev_info->flow_type_rss_offloads = I40E_RSS_OFFLOAD_ALL;
+	dev_info->flow_type_rss_offloads = vf->adapter->flow_types_mask;
 	dev_info->max_mac_addrs = I40E_NUM_MACADDR_MAX;
 	dev_info->rx_offload_capa =
 		DEV_RX_OFFLOAD_VLAN_STRIP |
@@ -2506,7 +2507,7 @@ i40evf_hw_rss_hash_set(struct i40e_vf *vf, struct rte_eth_rss_conf *rss_conf)
 	if (ret)
 		return ret;
 
-	hena = i40e_config_hena(rss_conf->rss_hf, hw->mac.type);
+	hena = i40e_config_hena(vf->adapter, rss_conf->rss_hf);
 	i40e_write_rx_ctl(hw, I40E_VFQF_HENA(0), (uint32_t)hena);
 	i40e_write_rx_ctl(hw, I40E_VFQF_HENA(1), (uint32_t)(hena >> 32));
 	I40EVF_WRITE_FLUSH(hw);
@@ -2549,7 +2550,7 @@ i40evf_config_rss(struct i40e_vf *vf)
 	}
 
 	rss_conf = vf->dev_data->dev_conf.rx_adv_conf.rss_conf;
-	if ((rss_conf.rss_hf & I40E_RSS_OFFLOAD_ALL) == 0) {
+	if ((rss_conf.rss_hf & vf->adapter->flow_types_mask) == 0) {
 		i40evf_disable_rss(vf);
 		PMD_DRV_LOG(DEBUG, "No hash flag is set");
 		return 0;
@@ -2574,14 +2575,13 @@ i40evf_dev_rss_hash_update(struct rte_eth_dev *dev,
 {
 	struct i40e_vf *vf = I40EVF_DEV_PRIVATE_TO_VF(dev->data->dev_private);
 	struct i40e_hw *hw = I40E_DEV_PRIVATE_TO_HW(dev->data->dev_private);
-	uint64_t rss_hf = rss_conf->rss_hf & I40E_RSS_OFFLOAD_ALL;
+	uint64_t rss_hf = rss_conf->rss_hf & vf->adapter->flow_types_mask;
 	uint64_t hena;
 
 	hena = (uint64_t)i40e_read_rx_ctl(hw, I40E_VFQF_HENA(0));
 	hena |= ((uint64_t)i40e_read_rx_ctl(hw, I40E_VFQF_HENA(1))) << 32;
-	if (!(hena & ((hw->mac.type == I40E_MAC_X722)
-		 ? I40E_RSS_HENA_ALL_X722
-		 : I40E_RSS_HENA_ALL))) { /* RSS disabled */
+
+	if (!(hena & vf->adapter->pctypes_mask)) { /* RSS disabled */
 		if (rss_hf != 0) /* Enable RSS */
 			return -EINVAL;
 		return 0;
@@ -2607,7 +2607,7 @@ i40evf_dev_rss_hash_conf_get(struct rte_eth_dev *dev,
 
 	hena = (uint64_t)i40e_read_rx_ctl(hw, I40E_VFQF_HENA(0));
 	hena |= ((uint64_t)i40e_read_rx_ctl(hw, I40E_VFQF_HENA(1))) << 32;
-	rss_conf->rss_hf = i40e_parse_hena(hena);
+	rss_conf->rss_hf = i40e_parse_hena(vf->adapter, hena);
 
 	return 0;
 }
diff --git a/drivers/net/i40e/i40e_fdir.c b/drivers/net/i40e/i40e_fdir.c
index 84c0a1f..268ada0 100644
--- a/drivers/net/i40e/i40e_fdir.c
+++ b/drivers/net/i40e/i40e_fdir.c
@@ -323,6 +323,7 @@ i40e_init_flx_pld(struct i40e_pf *pf)
 	struct i40e_hw *hw = I40E_PF_TO_HW(pf);
 	uint8_t pctype;
 	int i, index;
+	uint16_t flow_type;
 
 	/*
 	 * Define the bytes stream extracted as flexible payload in
@@ -344,15 +345,10 @@ i40e_init_flx_pld(struct i40e_pf *pf)
 	/* initialize the masks */
 	for (pctype = I40E_FILTER_PCTYPE_NONF_IPV4_UDP;
 	     pctype <= I40E_FILTER_PCTYPE_L2_PAYLOAD; pctype++) {
-		if (hw->mac.type == I40E_MAC_X722) {
-			if (!I40E_VALID_PCTYPE_X722(
-				 (enum i40e_filter_pctype)pctype))
-				continue;
-		} else {
-			if (!I40E_VALID_PCTYPE(
-				 (enum i40e_filter_pctype)pctype))
-				continue;
-		}
+		flow_type = i40e_pctype_to_flowtype(pf->adapter, pctype);
+
+		if (flow_type == RTE_ETH_FLOW_UNKNOWN)
+			continue;
 		pf->fdir.flex_mask[pctype].word_mask = 0;
 		i40e_write_rx_ctl(hw, I40E_PRTQF_FD_FLXINSET(pctype), 0);
 		for (i = 0; i < I40E_FDIR_BITMASK_NUM_WORD; i++) {
@@ -449,7 +445,8 @@ i40e_check_fdir_flex_payload(const struct rte_eth_flex_payload_cfg *flex_cfg)
  * arguments are valid
  */
 static int
-i40e_check_fdir_flex_conf(const struct rte_eth_fdir_flex_conf *conf)
+i40e_check_fdir_flex_conf(const struct i40e_adapter *adapter,
+			  const struct rte_eth_fdir_flex_conf *conf)
 {
 	const struct rte_eth_flex_payload_cfg *flex_cfg;
 	const struct rte_eth_fdir_flex_mask *flex_mask;
@@ -457,6 +454,7 @@ i40e_check_fdir_flex_conf(const struct rte_eth_fdir_flex_conf *conf)
 	uint8_t nb_bitmask;
 	uint16_t i, j;
 	int ret = 0;
+	enum i40e_filter_pctype pctype;
 
 	if (conf == NULL) {
 		PMD_DRV_LOG(INFO, "NULL pointer.");
@@ -487,7 +485,8 @@ i40e_check_fdir_flex_conf(const struct rte_eth_fdir_flex_conf *conf)
 	}
 	for (i = 0; i < conf->nb_flexmasks; i++) {
 		flex_mask = &conf->flex_mask[i];
-		if (!I40E_VALID_FLOW(flex_mask->flow_type)) {
+		pctype = i40e_flowtype_to_pctype(adapter, flex_mask->flow_type);
+		if (pctype == I40E_FILTER_PCTYPE_INVALID) {
 			PMD_DRV_LOG(WARNING, "invalid flow type.");
 			return -EINVAL;
 		}
@@ -650,7 +649,7 @@ i40e_fdir_configure(struct rte_eth_dev *dev)
 	i40e_init_flx_pld(pf); /* set flex config to default value */
 
 	conf = &dev->data->dev_conf.fdir_conf.flex_conf;
-	ret = i40e_check_fdir_flex_conf(conf);
+	ret = i40e_check_fdir_flex_conf(pf->adapter, conf);
 	if (ret < 0) {
 		PMD_DRV_LOG(ERR, " invalid configuration arguments.");
 		return -EINVAL;
@@ -664,11 +663,11 @@ i40e_fdir_configure(struct rte_eth_dev *dev)
 			/* get translated pctype value in fd pctype register */
 			pctype = (enum i40e_filter_pctype)i40e_read_rx_ctl(
 				hw, I40E_GLQF_FD_PCTYPES(
-				(int)i40e_flowtype_to_pctype(
+				(int)i40e_flowtype_to_pctype(pf->adapter,
 				conf->flex_mask[i].flow_type)));
 		} else
-			pctype = i40e_flowtype_to_pctype(
-				conf->flex_mask[i].flow_type);
+			pctype = i40e_flowtype_to_pctype(pf->adapter,
+						conf->flex_mask[i].flow_type);
 
 		i40e_set_flex_mask_on_pctype(pf, pctype, &conf->flex_mask[i]);
 	}
@@ -1100,7 +1099,8 @@ i40e_add_del_fdir_filter(struct rte_eth_dev *dev,
 		return -ENOTSUP;
 	}
 
-	if (!I40E_VALID_FLOW(filter->input.flow_type)) {
+	pctype = i40e_flowtype_to_pctype(pf->adapter, filter->input.flow_type);
+	if (pctype == I40E_FILTER_PCTYPE_INVALID) {
 		PMD_DRV_LOG(ERR, "invalid flow_type input.");
 		return -EINVAL;
 	}
@@ -1141,12 +1141,8 @@ i40e_add_del_fdir_filter(struct rte_eth_dev *dev,
 	if (hw->mac.type == I40E_MAC_X722) {
 		/* get translated pctype value in fd pctype register */
 		pctype = (enum i40e_filter_pctype)i40e_read_rx_ctl(
-			hw, I40E_GLQF_FD_PCTYPES(
-			(int)i40e_flowtype_to_pctype(
-			filter->input.flow_type)));
-	} else
-		pctype = i40e_flowtype_to_pctype(filter->input.flow_type);
-
+			hw, I40E_GLQF_FD_PCTYPES((int)pctype));
+	}
 	ret = i40e_fdir_filter_programming(pf, pctype, filter, add);
 	if (ret < 0) {
 		PMD_DRV_LOG(ERR, "fdir programming fails for PCTYPE(%u).",
@@ -1384,7 +1380,6 @@ i40e_fdir_info_get_flex_mask(struct i40e_pf *pf,
 {
 	struct i40e_fdir_flex_mask *mask;
 	struct rte_eth_fdir_flex_mask *ptr = flex_mask;
-	struct i40e_hw *hw = I40E_PF_TO_HW(pf);
 	uint16_t flow_type;
 	uint8_t i, j;
 	uint16_t off_bytes, mask_tmp;
@@ -1393,14 +1388,11 @@ i40e_fdir_info_get_flex_mask(struct i40e_pf *pf,
 	     i <= I40E_FILTER_PCTYPE_L2_PAYLOAD;
 	     i++) {
 		mask =  &pf->fdir.flex_mask[i];
-		if (hw->mac.type == I40E_MAC_X722) {
-			if (!I40E_VALID_PCTYPE_X722((enum i40e_filter_pctype)i))
-				continue;
-		} else {
-			if (!I40E_VALID_PCTYPE((enum i40e_filter_pctype)i))
-				continue;
-		}
-		flow_type = i40e_pctype_to_flowtype((enum i40e_filter_pctype)i);
+		flow_type = i40e_pctype_to_flowtype(pf->adapter,
+						    (enum i40e_filter_pctype)i);
+		if (flow_type == RTE_ETH_FLOW_UNKNOWN)
+			continue;
+
 		for (j = 0; j < I40E_FDIR_MAX_FLEXWORD_NUM; j++) {
 			if (mask->word_mask & I40E_FLEX_WORD_MASK(j)) {
 				ptr->mask[j * sizeof(uint16_t)] = UINT8_MAX;
diff --git a/drivers/net/i40e/i40e_flow.c b/drivers/net/i40e/i40e_flow.c
index b92719a..5d8afc6 100644
--- a/drivers/net/i40e/i40e_flow.c
+++ b/drivers/net/i40e/i40e_flow.c
@@ -2776,8 +2776,9 @@ i40e_flow_parse_fdir_pattern(struct rte_eth_dev *dev,
 		}
 	}
 
-	pctype = i40e_flowtype_to_pctype(flow_type);
-	if (pctype == 0 || pctype > I40E_FILTER_PCTYPE_L2_PAYLOAD) {
+	pctype = i40e_flowtype_to_pctype(pf->adapter, flow_type);
+	if (pctype == I40E_FILTER_PCTYPE_INVALID ||
+	    pctype > I40E_FILTER_PCTYPE_L2_PAYLOAD) {
 		rte_flow_error_set(error, EINVAL,
 				   RTE_FLOW_ERROR_TYPE_ITEM, item,
 				   "Unsupported flow type");
diff --git a/drivers/net/i40e/i40e_rxtx.c b/drivers/net/i40e/i40e_rxtx.c
index 3a7b68e..f69050f 100644
--- a/drivers/net/i40e/i40e_rxtx.c
+++ b/drivers/net/i40e/i40e_rxtx.c
@@ -2943,6 +2943,64 @@ i40e_set_default_ptype_table(struct rte_eth_dev *dev)
 		ad->ptype_tbl[i] = i40e_get_default_pkt_type(i);
 }
 
+void __attribute__((cold))
+i40e_set_default_pctype_table(struct rte_eth_dev *dev)
+{
+	struct i40e_adapter *ad =
+			I40E_DEV_PRIVATE_TO_ADAPTER(dev->data->dev_private);
+	struct i40e_hw *hw = I40E_DEV_PRIVATE_TO_HW(dev->data->dev_private);
+	int i;
+
+	for (i = 0; i < I40E_FLOW_TYPE_MAX; i++)
+		ad->pctypes_tbl[i] = 0ULL;
+	ad->flow_types_mask = 0ULL;
+	ad->pctypes_mask = 0ULL;
+
+	ad->pctypes_tbl[RTE_ETH_FLOW_FRAG_IPV4] =
+				(1ULL << I40E_FILTER_PCTYPE_FRAG_IPV4);
+	ad->pctypes_tbl[RTE_ETH_FLOW_NONFRAG_IPV4_UDP] =
+				(1ULL << I40E_FILTER_PCTYPE_NONF_IPV4_UDP);
+	ad->pctypes_tbl[RTE_ETH_FLOW_NONFRAG_IPV4_TCP] =
+				(1ULL << I40E_FILTER_PCTYPE_NONF_IPV4_TCP);
+	ad->pctypes_tbl[RTE_ETH_FLOW_NONFRAG_IPV4_SCTP] =
+				(1ULL << I40E_FILTER_PCTYPE_NONF_IPV4_SCTP);
+	ad->pctypes_tbl[RTE_ETH_FLOW_NONFRAG_IPV4_OTHER] =
+				(1ULL << I40E_FILTER_PCTYPE_NONF_IPV4_OTHER);
+	ad->pctypes_tbl[RTE_ETH_FLOW_FRAG_IPV6] =
+				(1ULL << I40E_FILTER_PCTYPE_FRAG_IPV6);
+	ad->pctypes_tbl[RTE_ETH_FLOW_NONFRAG_IPV6_UDP] =
+				(1ULL << I40E_FILTER_PCTYPE_NONF_IPV6_UDP);
+	ad->pctypes_tbl[RTE_ETH_FLOW_NONFRAG_IPV6_TCP] =
+				(1ULL << I40E_FILTER_PCTYPE_NONF_IPV6_TCP);
+	ad->pctypes_tbl[RTE_ETH_FLOW_NONFRAG_IPV6_SCTP] =
+				(1ULL << I40E_FILTER_PCTYPE_NONF_IPV6_SCTP);
+	ad->pctypes_tbl[RTE_ETH_FLOW_NONFRAG_IPV6_OTHER] =
+				(1ULL << I40E_FILTER_PCTYPE_NONF_IPV6_OTHER);
+	ad->pctypes_tbl[RTE_ETH_FLOW_L2_PAYLOAD] =
+				(1ULL << I40E_FILTER_PCTYPE_L2_PAYLOAD);
+
+	if (hw->mac.type == I40E_MAC_X722) {
+		ad->pctypes_tbl[RTE_ETH_FLOW_NONFRAG_IPV4_UDP] |=
+			(1ULL << I40E_FILTER_PCTYPE_NONF_UNICAST_IPV4_UDP);
+		ad->pctypes_tbl[RTE_ETH_FLOW_NONFRAG_IPV4_UDP] |=
+			(1ULL << I40E_FILTER_PCTYPE_NONF_MULTICAST_IPV4_UDP);
+		ad->pctypes_tbl[RTE_ETH_FLOW_NONFRAG_IPV4_TCP] |=
+			(1ULL << I40E_FILTER_PCTYPE_NONF_IPV4_TCP_SYN_NO_ACK);
+		ad->pctypes_tbl[RTE_ETH_FLOW_NONFRAG_IPV6_UDP] |=
+			(1ULL << I40E_FILTER_PCTYPE_NONF_UNICAST_IPV6_UDP);
+		ad->pctypes_tbl[RTE_ETH_FLOW_NONFRAG_IPV6_UDP] |=
+			(1ULL << I40E_FILTER_PCTYPE_NONF_MULTICAST_IPV6_UDP);
+		ad->pctypes_tbl[RTE_ETH_FLOW_NONFRAG_IPV6_TCP] |=
+			(1ULL << I40E_FILTER_PCTYPE_NONF_IPV6_TCP_SYN_NO_ACK);
+	}
+
+	for (i = 0; i < I40E_FLOW_TYPE_MAX; i++) {
+		if (ad->pctypes_tbl[i])
+			ad->flow_types_mask |= (1ULL << i);
+		ad->pctypes_mask |= ad->pctypes_tbl[i];
+	}
+}
+
 /* Stubs needed for linkage when CONFIG_RTE_I40E_INC_VECTOR is set to 'n' */
 int __attribute__((weak))
 i40e_rx_vec_dev_conf_condition_check(struct rte_eth_dev __rte_unused *dev)
diff --git a/drivers/net/i40e/i40e_rxtx.h b/drivers/net/i40e/i40e_rxtx.h
index 20084d6..2a58ced 100644
--- a/drivers/net/i40e/i40e_rxtx.h
+++ b/drivers/net/i40e/i40e_rxtx.h
@@ -255,6 +255,7 @@ void i40e_set_tx_function_flag(struct rte_eth_dev *dev,
 			       struct i40e_tx_queue *txq);
 void i40e_set_tx_function(struct rte_eth_dev *dev);
 void i40e_set_default_ptype_table(struct rte_eth_dev *dev);
+void i40e_set_default_pctype_table(struct rte_eth_dev *dev);
 
 /* For each value it means, datasheet of hardware can tell more details
  *
-- 
2.5.5

^ permalink raw reply	[relevance 3%]

* [dpdk-dev] [PATCH v2] test/crypto: remove crypto perf tests
  @ 2017-10-04  6:48  1% ` Pablo de Lara
  0 siblings, 0 replies; 200+ results
From: Pablo de Lara @ 2017-10-04  6:48 UTC (permalink / raw)
  To: declan.doherty, hemant.agrawal, akhil.goyal, jerin.jacob,
	fiona.trahe, deepak.k.jain, john.griffin
  Cc: dev, Pablo de Lara

Since the crypto perf application is flexible enough
to cover all the crypto performance tests, these are not needed
anymore, so they will be removed to avoid duplications.
Besides, the crypto perf application gives the user more options
to get performance, for every single supported algorithm,
such as varying the buffer size as the user wants.

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
---

Changes in v2:
- Rebased against latest code
- Added note in release notes

 doc/guides/rel_notes/release_17_11.rst |   15 +
 test/test/Makefile                     |    1 -
 test/test/test_cryptodev_perf.c        | 4932 --------------------------------
 3 files changed, 15 insertions(+), 4933 deletions(-)
 delete mode 100644 test/test/test_cryptodev_perf.c

diff --git a/doc/guides/rel_notes/release_17_11.rst b/doc/guides/rel_notes/release_17_11.rst
index ebb5021..58e614b 100644
--- a/doc/guides/rel_notes/release_17_11.rst
+++ b/doc/guides/rel_notes/release_17_11.rst
@@ -164,6 +164,21 @@ ABI Changes
    =========================================================
 
 
+Removed Items
+-------------
+
+.. This section should contain removed items in this release. Sample format:
+
+   * Add a short 1-2 sentence description of the removed item in the past
+     tense.
+
+   This section is a comment. do not overwrite or remove it.
+   Also, make sure to start the actual text at the margin.
+   =========================================================
+
+* The crypto performance unit tests have been removed, substituted
+  by the dpdk-test-crypto-perf application.
+
 
 Shared Library Versions
 -----------------------
diff --git a/test/test/Makefile b/test/test/Makefile
index 42d9a49..de360e3 100644
--- a/test/test/Makefile
+++ b/test/test/Makefile
@@ -198,7 +198,6 @@ SRCS-$(CONFIG_RTE_LIBRTE_PMD_RING) += test_pmd_ring.c
 SRCS-$(CONFIG_RTE_LIBRTE_PMD_RING) += test_pmd_ring_perf.c
 
 SRCS-$(CONFIG_RTE_LIBRTE_CRYPTODEV) += test_cryptodev_blockcipher.c
-SRCS-$(CONFIG_RTE_LIBRTE_CRYPTODEV) += test_cryptodev_perf.c
 SRCS-$(CONFIG_RTE_LIBRTE_CRYPTODEV) += test_cryptodev.c
 
 ifeq ($(CONFIG_RTE_LIBRTE_EVENTDEV),y)
diff --git a/test/test/test_cryptodev_perf.c b/test/test/test_cryptodev_perf.c
deleted file mode 100644
index 3b57e6d..0000000
--- a/test/test/test_cryptodev_perf.c
+++ /dev/null
@@ -1,4932 +0,0 @@
-/*-
- *   BSD LICENSE
- *
- *   Copyright(c) 2015-2017 Intel Corporation. All rights reserved.
- *
- *   Redistribution and use in source and binary forms, with or without
- *   modification, are permitted provided that the following conditions
- *   are met:
- *
- *	 * Redistributions of source code must retain the above copyright
- *	   notice, this list of conditions and the following disclaimer.
- *	 * Redistributions in binary form must reproduce the above copyright
- *	   notice, this list of conditions and the following disclaimer in
- *	   the documentation and/or other materials provided with the
- *	   distribution.
- *	 * Neither the name of Intel Corporation nor the names of its
- *	   contributors may be used to endorse or promote products derived
- *	   from this software without specific prior written permission.
- *
- *   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- *   "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- *   LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- *   A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- *   OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- *   LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- *   DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- *   THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- *   (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- *   OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include <rte_common.h>
-#include <rte_mbuf.h>
-#include <rte_malloc.h>
-#include <rte_memcpy.h>
-
-#include <rte_crypto.h>
-#include <rte_cryptodev.h>
-#include <rte_cycles.h>
-
-#include "test.h"
-#include "test_cryptodev.h"
-#include "test_cryptodev_gcm_test_vectors.h"
-
-#define AES_CIPHER_IV_LENGTH 16
-#define TRIPLE_DES_CIPHER_IV_LENGTH 8
-#define AES_GCM_AAD_LENGTH 16
-
-#define PERF_NUM_OPS_INFLIGHT		(128)
-#define DEFAULT_NUM_REQS_TO_SUBMIT	(10000000)
-
-struct crypto_testsuite_params {
-	struct rte_mempool *mbuf_mp;
-	struct rte_mempool *op_mpool;
-	struct rte_mempool *sess_mp;
-
-	uint16_t nb_queue_pairs;
-
-	struct rte_cryptodev_config conf;
-	struct rte_cryptodev_qp_conf qp_conf;
-	uint8_t dev_id;
-};
-
-enum chain_mode {
-	CIPHER_HASH,
-	HASH_CIPHER,
-	CIPHER_ONLY,
-	HASH_ONLY,
-	AEAD
-};
-
-
-struct symmetric_op {
-	const uint8_t *aad_data;
-
-	const uint8_t *p_data;
-	uint32_t p_len;
-
-	const uint8_t *c_data;
-	uint32_t c_len;
-
-	const uint8_t *t_data;
-	uint32_t t_len;
-
-};
-
-struct symmetric_session_attrs {
-	enum rte_crypto_cipher_operation cipher;
-	enum rte_crypto_auth_operation auth;
-	enum rte_crypto_aead_operation aead;
-
-	enum rte_crypto_cipher_algorithm cipher_algorithm;
-	const uint8_t *key_cipher_data;
-	uint32_t key_cipher_len;
-
-	enum rte_crypto_auth_algorithm auth_algorithm;
-	const uint8_t *key_auth_data;
-	uint32_t key_auth_len;
-
-	enum rte_crypto_aead_algorithm aead_algorithm;
-	const uint8_t *key_aead_data;
-	uint32_t key_aead_len;
-
-	const uint8_t *iv_data;
-	uint16_t iv_len;
-	uint16_t aad_len;
-	uint32_t digest_len;
-};
-
-static struct rte_cryptodev_sym_session *test_crypto_session;
-
-#define ALIGN_POW2_ROUNDUP(num, align) \
-	(((num) + (align) - 1) & ~((align) - 1))
-
-/*
- * This struct is needed to avoid unnecessary allocation or checking
- * of allocation of crypto params with current alloc on the fly
- * implementation.
- */
-
-struct crypto_params {
-	uint8_t *aad;
-	uint8_t *digest;
-};
-
-struct perf_test_params {
-
-	unsigned total_operations;
-	unsigned burst_size;
-	unsigned buf_size;
-
-	enum chain_mode chain;
-
-	enum rte_crypto_cipher_algorithm cipher_algo;
-	unsigned int key_length;
-	enum rte_crypto_auth_algorithm auth_algo;
-	enum rte_crypto_aead_algorithm aead_algo;
-
-	struct symmetric_session_attrs *session_attrs;
-
-	struct symmetric_op *symmetric_op;
-};
-
-#define MAX_NUM_OF_OPS_PER_UT	(128)
-
-struct crypto_unittest_params {
-	struct rte_crypto_sym_xform cipher_xform;
-	struct rte_crypto_sym_xform auth_xform;
-
-	struct rte_cryptodev_sym_session *sess;
-
-	struct rte_crypto_op *op;
-
-	struct rte_mbuf *obuf[MAX_NUM_OF_OPS_PER_UT];
-	struct rte_mbuf *ibuf[MAX_NUM_OF_OPS_PER_UT];
-
-	uint8_t *digest;
-};
-
-static int
-test_perf_create_snow3g_session(uint8_t dev_id, enum chain_mode chain,
-		enum rte_crypto_cipher_algorithm cipher_algo,
-		unsigned int cipher_key_len,
-		enum rte_crypto_auth_algorithm auth_algo);
-static int
-test_perf_create_openssl_session(uint8_t dev_id, enum chain_mode chain,
-		enum rte_crypto_cipher_algorithm cipher_algo,
-		unsigned int cipher_key_len,
-		enum rte_crypto_auth_algorithm auth_algo,
-		enum rte_crypto_aead_algorithm aead_algo);
-static int
-test_perf_create_armv8_session(uint8_t dev_id, enum chain_mode chain,
-		enum rte_crypto_cipher_algorithm cipher_algo,
-		unsigned int cipher_key_len,
-		enum rte_crypto_auth_algorithm auth_algo);
-
-static struct rte_mbuf *
-test_perf_create_pktmbuf(struct rte_mempool *mpool, unsigned buf_sz);
-static inline struct rte_crypto_op *
-test_perf_set_crypto_op_snow3g(struct rte_crypto_op *op, struct rte_mbuf *m,
-		struct rte_cryptodev_sym_session *sess, unsigned int data_len);
-static inline struct rte_crypto_op *
-test_perf_set_crypto_op_aes(struct rte_crypto_op *op, struct rte_mbuf *m,
-		struct rte_cryptodev_sym_session *sess, unsigned int data_len,
-		enum chain_mode chain);
-static inline struct rte_crypto_op *
-test_perf_set_crypto_op_aes_gcm(struct rte_crypto_op *op, struct rte_mbuf *m,
-		struct rte_cryptodev_sym_session *sess, unsigned int data_len,
-		enum chain_mode chain __rte_unused);
-static inline struct rte_crypto_op *
-test_perf_set_crypto_op_3des(struct rte_crypto_op *op, struct rte_mbuf *m,
-		struct rte_cryptodev_sym_session *sess, unsigned int data_len,
-		enum chain_mode chain __rte_unused);
-static uint32_t get_auth_digest_length(enum rte_crypto_auth_algorithm algo);
-
-
-static const char *chain_mode_name(enum chain_mode mode)
-{
-	switch (mode) {
-	case CIPHER_HASH: return "cipher_hash"; break;
-	case HASH_CIPHER: return "hash_cipher"; break;
-	case CIPHER_ONLY: return "cipher_only"; break;
-	case HASH_ONLY: return "hash_only"; break;
-	case AEAD: return "aead"; break;
-	default: return ""; break;
-	}
-}
-
-static const char *pmd_name(uint8_t driver_id)
-{
-	uint8_t null_pmd = rte_cryptodev_driver_id_get(
-			RTE_STR(CRYPTODEV_NAME_NULL_PMD));
-	uint8_t dpaa2_pmd = rte_cryptodev_driver_id_get(
-			RTE_STR(CRYPTODEV_NAME_DPAA2_SEC_PMD));
-	uint8_t snow3g_pmd = rte_cryptodev_driver_id_get(
-			RTE_STR(CRYPTODEV_NAME_SNOW3G_PMD));
-	uint8_t aesni_gcm_pmd = rte_cryptodev_driver_id_get(
-			RTE_STR(CRYPTODEV_NAME_AESNI_GCM_PMD));
-	uint8_t aesni_mb_pmd = rte_cryptodev_driver_id_get(
-			RTE_STR(CRYPTODEV_NAME_AESNI_MB_PMD));
-	uint8_t qat_pmd = rte_cryptodev_driver_id_get(
-			RTE_STR(CRYPTODEV_NAME_QAT_SYM_PMD));
-
-	if (driver_id == null_pmd)
-		return RTE_STR(CRYPTODEV_NAME_NULL_PMD);
-	else if (driver_id == aesni_gcm_pmd)
-		return RTE_STR(CRYPTODEV_NAME_AESNI_GCM_PMD);
-	else if (driver_id == aesni_mb_pmd)
-		return RTE_STR(CRYPTODEV_NAME_AESNI_MB_PMD);
-	else if (driver_id == qat_pmd)
-		return RTE_STR(CRYPTODEV_NAME_QAT_SYM_PMD);
-	else if (driver_id == snow3g_pmd)
-		return RTE_STR(CRYPTODEV_NAME_SNOW3G_PMD);
-	else if (driver_id == dpaa2_pmd)
-		return RTE_STR(CRYPTODEV_NAME_DPAA2_SEC_PMD);
-	else
-		return "";
-}
-
-static struct rte_mbuf *
-setup_test_string(struct rte_mempool *mpool,
-		const uint8_t *data, size_t len, uint8_t blocksize)
-{
-	struct rte_mbuf *m = rte_pktmbuf_alloc(mpool);
-	size_t t_len = len - (blocksize ? (len % blocksize) : 0);
-
-	if (m) {
-		char *dst = rte_pktmbuf_append(m, t_len);
-
-		if (!dst) {
-			rte_pktmbuf_free(m);
-			return NULL;
-		}
-
-		rte_memcpy(dst, (const void *)data, t_len);
-	}
-	return m;
-}
-
-static struct crypto_testsuite_params testsuite_params = { NULL };
-static struct crypto_unittest_params unittest_params;
-static int gbl_driver_id;
-
-static int
-testsuite_setup(void)
-{
-	struct crypto_testsuite_params *ts_params = &testsuite_params;
-	struct rte_cryptodev_info info;
-	unsigned i, nb_devs, valid_dev_id = 0;
-	int ret;
-	uint16_t qp_id;
-
-	ts_params->mbuf_mp = rte_mempool_lookup("CRYPTO_PERF_MBUFPOOL");
-	if (ts_params->mbuf_mp == NULL) {
-		/* Not already created so create */
-		ts_params->mbuf_mp = rte_pktmbuf_pool_create(
-				"CRYPTO_PERF_MBUFPOOL",
-				NUM_MBUFS, MBUF_CACHE_SIZE, 0, MBUF_SIZE,
-				rte_socket_id());
-		if (ts_params->mbuf_mp == NULL) {
-			RTE_LOG(ERR, USER1, "Can't create CRYPTO_PERF_MBUFPOOL\n");
-			return TEST_FAILED;
-		}
-	}
-
-
-	ts_params->op_mpool = rte_crypto_op_pool_create("CRYPTO_OP_POOL",
-			RTE_CRYPTO_OP_TYPE_SYMMETRIC,
-			NUM_MBUFS, MBUF_CACHE_SIZE,
-			DEFAULT_NUM_XFORMS *
-			sizeof(struct rte_crypto_sym_xform) +
-			MAXIMUM_IV_LENGTH,
-			rte_socket_id());
-		if (ts_params->op_mpool == NULL) {
-			RTE_LOG(ERR, USER1, "Can't create CRYPTO_OP_POOL\n");
-			return TEST_FAILED;
-		}
-
-	/* Create an AESNI MB device if required */
-	if (gbl_driver_id == rte_cryptodev_driver_id_get(
-			RTE_STR(CRYPTODEV_NAME_AESNI_MB_PMD))) {
-		nb_devs = rte_cryptodev_device_count_by_driver(
-				rte_cryptodev_driver_id_get(
-				RTE_STR(CRYPTODEV_NAME_AESNI_MB_PMD)));
-		if (nb_devs < 1) {
-			ret = rte_vdev_init(
-				RTE_STR(CRYPTODEV_NAME_AESNI_MB_PMD), NULL);
-
-			TEST_ASSERT(ret == 0,
-				"Failed to create instance of pmd : %s",
-				RTE_STR(CRYPTODEV_NAME_AESNI_MB_PMD));
-		}
-	}
-
-	/* Create an AESNI GCM device if required */
-	if (gbl_driver_id == rte_cryptodev_driver_id_get(
-			RTE_STR(CRYPTODEV_NAME_AESNI_GCM_PMD))) {
-		nb_devs = rte_cryptodev_device_count_by_driver(
-				rte_cryptodev_driver_id_get(
-				RTE_STR(CRYPTODEV_NAME_AESNI_GCM_PMD)));
-		if (nb_devs < 1) {
-			ret = rte_vdev_init(
-				RTE_STR(CRYPTODEV_NAME_AESNI_GCM_PMD), NULL);
-
-			TEST_ASSERT(ret == 0,
-				"Failed to create instance of pmd : %s",
-				RTE_STR(CRYPTODEV_NAME_AESNI_GCM_PMD));
-		}
-	}
-
-	/* Create a SNOW3G device if required */
-	if (gbl_driver_id == rte_cryptodev_driver_id_get(
-			RTE_STR(CRYPTODEV_NAME_SNOW3G_PMD))) {
-		nb_devs = rte_cryptodev_device_count_by_driver(
-				rte_cryptodev_driver_id_get(
-				RTE_STR(CRYPTODEV_NAME_SNOW3G_PMD)));
-		if (nb_devs < 1) {
-			ret = rte_vdev_init(
-				RTE_STR(CRYPTODEV_NAME_SNOW3G_PMD), NULL);
-
-			TEST_ASSERT(ret == 0,
-				"Failed to create instance of pmd : %s",
-				RTE_STR(CRYPTODEV_NAME_SNOW3G_PMD));
-		}
-	}
-
-	/* Create an OPENSSL device if required */
-	if (gbl_driver_id == rte_cryptodev_driver_id_get(
-			RTE_STR(CRYPTODEV_NAME_OPENSSL_PMD))) {
-		nb_devs = rte_cryptodev_device_count_by_driver(
-				rte_cryptodev_driver_id_get(
-				RTE_STR(CRYPTODEV_NAME_OPENSSL_PMD)));
-		if (nb_devs < 1) {
-			ret = rte_vdev_init(
-				RTE_STR(CRYPTODEV_NAME_OPENSSL_PMD),
-				NULL);
-
-			TEST_ASSERT(ret == 0, "Failed to create "
-				"instance of pmd : %s",
-				RTE_STR(CRYPTODEV_NAME_OPENSSL_PMD));
-		}
-	}
-
-	/* Create an ARMv8 device if required */
-	if (gbl_driver_id == rte_cryptodev_driver_id_get(
-			RTE_STR(CRYPTODEV_NAME_ARMV8_PMD))) {
-		nb_devs = rte_cryptodev_device_count_by_driver(
-				rte_cryptodev_driver_id_get(
-				RTE_STR(CRYPTODEV_NAME_ARMV8_PMD)));
-		if (nb_devs < 1) {
-			ret = rte_vdev_init(
-				RTE_STR(CRYPTODEV_NAME_ARMV8_PMD),
-				NULL);
-
-			TEST_ASSERT(ret == 0, "Failed to create "
-				"instance of pmd : %s",
-				RTE_STR(CRYPTODEV_NAME_ARMV8_PMD));
-		}
-	}
-
-	nb_devs = rte_cryptodev_count();
-	if (nb_devs < 1) {
-		RTE_LOG(ERR, USER1, "No crypto devices found?\n");
-		return TEST_FAILED;
-	}
-
-	/* Search for the first valid */
-	for (i = 0; i < nb_devs; i++) {
-		rte_cryptodev_info_get(i, &info);
-		if (info.driver_id == (uint8_t) gbl_driver_id) {
-			ts_params->dev_id = i;
-			valid_dev_id = 1;
-			break;
-		}
-	}
-
-	if (!valid_dev_id)
-		return TEST_FAILED;
-
-	/*
-	 * Using Crypto Device Id 0 by default.
-	 * Set up all the qps on this device
-	 */
-
-	rte_cryptodev_info_get(ts_params->dev_id, &info);
-
-	ts_params->conf.nb_queue_pairs = info.max_nb_queue_pairs;
-	ts_params->conf.socket_id = SOCKET_ID_ANY;
-
-	unsigned int session_size = sizeof(struct rte_cryptodev_sym_session) +
-		rte_cryptodev_get_private_session_size(ts_params->dev_id);
-
-	ts_params->sess_mp = rte_mempool_create(
-				"test_sess_mp_perf",
-				info.sym.max_nb_sessions,
-				session_size,
-				0, 0, NULL, NULL, NULL,
-				NULL, SOCKET_ID_ANY,
-				0);
-
-	TEST_ASSERT_NOT_NULL(ts_params->sess_mp,
-			"session mempool allocation failed");
-
-	TEST_ASSERT_SUCCESS(rte_cryptodev_configure(ts_params->dev_id,
-			&ts_params->conf),
-			"Failed to configure cryptodev %u",
-			ts_params->dev_id);
-
-	ts_params->qp_conf.nb_descriptors = PERF_NUM_OPS_INFLIGHT;
-	for (qp_id = 0; qp_id < ts_params->conf.nb_queue_pairs ; qp_id++) {
-
-		TEST_ASSERT_SUCCESS(rte_cryptodev_queue_pair_setup(
-			ts_params->dev_id, qp_id,
-				&ts_params->qp_conf,
-				rte_cryptodev_socket_id(ts_params->dev_id),
-				ts_params->sess_mp),
-				"Failed to setup queue pair %u on cryptodev %u",
-				qp_id, ts_params->dev_id);
-	}
-
-	return TEST_SUCCESS;
-}
-static void
-testsuite_teardown(void)
-{
-	struct crypto_testsuite_params *ts_params =
-			&testsuite_params;
-
-	if (ts_params->mbuf_mp != NULL)
-		RTE_LOG(DEBUG, USER1, "CRYPTO_PERF_MBUFPOOL count %u\n",
-		rte_mempool_avail_count(ts_params->mbuf_mp));
-	if (ts_params->op_mpool != NULL)
-		RTE_LOG(DEBUG, USER1, "CRYPTO_PERF_OP POOL count %u\n",
-		rte_mempool_avail_count(ts_params->op_mpool));
-	/* Free session mempool */
-	if (ts_params->sess_mp != NULL) {
-		rte_mempool_free(ts_params->sess_mp);
-		ts_params->sess_mp = NULL;
-	}
-
-}
-
-static int
-ut_setup(void)
-{
-	struct crypto_testsuite_params *ts_params = &testsuite_params;
-	struct crypto_unittest_params *ut_params = &unittest_params;
-
-	/* Clear unit test parameters before running test */
-	memset(ut_params, 0, sizeof(*ut_params));
-
-	rte_cryptodev_stats_reset(ts_params->dev_id);
-
-	/* Start the device */
-	TEST_ASSERT_SUCCESS(rte_cryptodev_start(ts_params->dev_id),
-			"Failed to start cryptodev %u",
-			ts_params->dev_id);
-
-	return TEST_SUCCESS;
-}
-
-static void
-ut_teardown(void)
-{
-	struct crypto_testsuite_params *ts_params = &testsuite_params;
-	struct crypto_unittest_params *ut_params = &unittest_params;
-	struct rte_cryptodev_stats stats;
-
-	unsigned i;
-
-	/* free crypto session structure */
-	if (ut_params->sess) {
-		rte_cryptodev_sym_session_clear(ts_params->dev_id,
-				ut_params->sess);
-		rte_cryptodev_sym_session_free(ut_params->sess);
-	}
-
-	/* free crypto operation structure */
-	if (ut_params->op)
-		rte_crypto_op_free(ut_params->op);
-
-	for (i = 0; i < MAX_NUM_OF_OPS_PER_UT; i++) {
-		if (ut_params->obuf[i])
-			rte_pktmbuf_free(ut_params->obuf[i]);
-		else if (ut_params->ibuf[i])
-			rte_pktmbuf_free(ut_params->ibuf[i]);
-	}
-
-	if (ts_params->mbuf_mp != NULL)
-		RTE_LOG(DEBUG, USER1, "CRYPTO_PERF_MBUFPOOL count %u\n",
-			rte_mempool_avail_count(ts_params->mbuf_mp));
-
-	rte_cryptodev_stats_get(ts_params->dev_id, &stats);
-
-	/* Stop the device */
-	rte_cryptodev_stop(ts_params->dev_id);
-}
-
-const char plaintext_quote[] =
-		"THE COUNT OF MONTE CRISTO by Alexandre Dumas, Pere Chapter 1. "
-		"Marseilles--The Arrival. On the 24th of February, 1815, the "
-		"look-out at Notre-Dame de la Garde signalled the three-master,"
-		" the Pharaon from Smyrna, Trieste, and Naples. As usual, a "
-		"pilot put off immediately, and rounding the Chateau d'If, got "
-		"on board the vessel between Cape Morgion and Rion island. "
-		"Immediately, and according to custom, the ramparts of Fort "
-		"Saint-Jean were covered with spectators; it is always an event "
-		"at Marseilles for a ship to come into port, especially when "
-		"this ship, like the Pharaon, has been built, rigged, and laden"
-		" at the old Phocee docks, and belongs to an owner of the city."
-		" The ship drew on and had safely passed the strait, which some"
-		" volcanic shock has made between the Calasareigne and Jaros "
-		"islands; had doubled Pomegue, and approached the harbor under"
-		" topsails, jib, and spanker, but so slowly and sedately that"
-		" the idlers, with that instinct which is the forerunner of "
-		"evil, asked one another what misfortune could have happened "
-		"on board. However, those experienced in navigation saw plainly"
-		" that if any accident had occurred, it was not to the vessel "
-		"herself, for she bore down with all the evidence of being "
-		"skilfully handled, the anchor a-cockbill, the jib-boom guys "
-		"already eased off, and standing by the side of the pilot, who"
-		" was steering the Pharaon towards the narrow entrance of the"
-		" inner port, was a young man, who, with activity and vigilant"
-		" eye, watched every motion of the ship, and repeated each "
-		"direction of the pilot. The vague disquietude which prevailed "
-		"among the spectators had so much affected one of the crowd "
-		"that he did not await the arrival of the vessel in harbor, but"
-		" jumping into a small skiff, desired to be pulled alongside "
-		"the Pharaon, which he reached as she rounded into La Reserve "
-		"basin. When the young man on board saw this person approach, "
-		"he left his station by the pilot, and, hat in hand, leaned "
-		"over the ship's bulwarks. He was a fine, tall, slim young "
-		"fellow of eighteen or twenty, with black eyes, and hair as "
-		"dark as a raven's wing; and his whole appearance bespoke that "
-		"calmness and resolution peculiar to men accustomed from their "
-		"cradle to contend with danger. \"Ah, is it you, Dantes?\" "
-		"cried the man in the skiff. \"What's the matter? and why have "
-		"you such an air of sadness aboard?\" \"A great misfortune, M. "
-		"Morrel,\" replied the young man,--\"a great misfortune, for me"
-		" especially! Off Civita Vecchia we lost our brave Captain "
-		"Leclere.\" \"And the cargo?\" inquired the owner, eagerly. "
-		"\"Is all safe, M. Morrel; and I think you will be satisfied on"
-		" that head. But poor Captain Leclere--\" \"What happened to "
-		"him?\" asked the owner, with an air of considerable "
-		"resignation. \"What happened to the worthy captain?\" \"He "
-		"died.\" \"Fell into the sea?\" \"No, sir, he died of "
-		"brain-fever in dreadful agony.\" Then turning to the crew, "
-		"he said, \"Bear a hand there, to take in sail!\" All hands "
-		"obeyed, and at once the eight or ten seamen who composed the "
-		"crew, sprang to their respective stations at the spanker "
-		"brails and outhaul, topsail sheets and halyards, the jib "
-		"downhaul, and the topsail clewlines and buntlines. The young "
-		"sailor gave a look to see that his orders were promptly and "
-		"accurately obeyed, and then turned again to the owner. \"And "
-		"how did this misfortune occur?\" inquired the latter, resuming"
-		" the interrupted conversation. \"Alas, sir, in the most "
-		"unexpected manner. After a long talk with the harbor-master, "
-		"Captain Leclere left Naples greatly disturbed in mind. In "
-		"twenty-four hours he was attacked by a fever, and died three "
-		"days afterwards. We performed the usual burial service, and he"
-		" is at his rest, sewn up in his hammock with a thirty-six "
-		"pound shot at his head and his heels, off El Giglio island. "
-		"We bring to his widow his sword and cross of honor. It was "
-		"worth while, truly,\" added the young man with a melancholy "
-		"smile, \"to make war against the English for ten years, and "
-		"to die in his bed at last, like everybody else.";
-
-#define QUOTE_LEN_64B		(64)
-#define QUOTE_LEN_128B		(128)
-#define QUOTE_LEN_256B		(256)
-#define QUOTE_LEN_512B		(512)
-#define QUOTE_LEN_768B		(768)
-#define QUOTE_LEN_1024B		(1024)
-#define QUOTE_LEN_1280B		(1280)
-#define QUOTE_LEN_1536B		(1536)
-#define QUOTE_LEN_1792B		(1792)
-#define QUOTE_LEN_2048B		(2048)
-
-
-/* ***** AES-CBC / HMAC-SHA256 Performance Tests ***** */
-
-#define HMAC_KEY_LENGTH_SHA256	(DIGEST_BYTE_LENGTH_SHA256)
-
-#define CIPHER_KEY_LENGTH_AES_CBC	(16)
-#define CIPHER_IV_LENGTH_AES_CBC	(CIPHER_KEY_LENGTH_AES_CBC)
-
-static uint8_t aes_cbc_128_key[] = {
-		0xE4, 0x23, 0x33, 0x8A, 0x35, 0x64, 0x61, 0xE2,
-		0xF1, 0x35, 0x5C, 0x3B, 0xDD, 0x9A, 0x65, 0xBA };
-
-static uint8_t aes_cbc_128_iv[] = {
-		0xf5, 0xd3, 0x89, 0x0f, 0x47, 0x00, 0xcb, 0x52,
-		0x42, 0x1a, 0x7d, 0x3d, 0xf5, 0x82, 0x80, 0xf1 };
-
-static uint8_t hmac_sha256_key[] = {
-		0xff, 0xcb, 0x37, 0x30, 0x1d, 0x4a, 0xc2, 0x41,
-		0x49, 0x03, 0xDD, 0xC6, 0xB8, 0xCA, 0x55, 0x7A,
-		0x58, 0x34, 0x85, 0x61, 0x1C, 0x42, 0x10, 0x76,
-		0x9a, 0x4f, 0x88, 0x1b, 0xb6, 0x8f, 0xd8, 0x60 };
-
-
-/* Cipher text output */
-
-static const uint8_t AES_CBC_ciphertext_64B[] = {
-		0x05, 0x15, 0x77, 0x32, 0xc9, 0x66, 0x91, 0x50,
-		0x93, 0x9f, 0xbb, 0x4e, 0x2e, 0x5a, 0x02, 0xd0,
-		0x2d, 0x9d, 0x31, 0x5d, 0xc8, 0x9e, 0x86, 0x36,
-		0x54, 0x5c, 0x50, 0xe8, 0x75, 0x54, 0x74, 0x5e,
-		0xd5, 0xa2, 0x84, 0x21, 0x2d, 0xc5, 0xf8, 0x1c,
-		0x55, 0x1a, 0xba, 0x91, 0xce, 0xb5, 0xa3, 0x1e,
-		0x31, 0xbf, 0xe9, 0xa1, 0x97, 0x5c, 0x2b, 0xd6,
-		0x57, 0xa5, 0x9f, 0xab, 0xbd, 0xb0, 0x9b, 0x9c
-};
-
-static const uint8_t AES_CBC_ciphertext_128B[] = {
-		0x79, 0x92, 0x65, 0xc8, 0xfb, 0x0a, 0xc7, 0xc4,
-		0x9b, 0x3b, 0xbe, 0x69, 0x7f, 0x7c, 0xf4, 0x4e,
-		0xa5, 0x0d, 0xf6, 0x33, 0xc4, 0xdf, 0xf3, 0x0d,
-		0xdb, 0xb9, 0x68, 0x34, 0xb0, 0x0d, 0xbd, 0xb9,
-		0xa7, 0xf3, 0x86, 0x50, 0x2a, 0xbe, 0x50, 0x5d,
-		0xb3, 0xbe, 0x72, 0xf9, 0x02, 0xb1, 0x69, 0x0b,
-		0x8c, 0x96, 0x4c, 0x3c, 0x0c, 0x1e, 0x76, 0xe5,
-		0x7e, 0x75, 0xdd, 0xd0, 0xa9, 0x75, 0x00, 0x13,
-		0x6b, 0x1e, 0xc0, 0xad, 0xfc, 0x03, 0xb5, 0x99,
-		0xdc, 0x37, 0x35, 0xfc, 0x16, 0x34, 0xfd, 0xb4,
-		0xea, 0x1e, 0xb6, 0x51, 0xdf, 0xab, 0x87, 0xd6,
-		0x87, 0x41, 0xfa, 0x1c, 0xc6, 0x78, 0xa6, 0x3c,
-		0x1d, 0x76, 0xfe, 0xff, 0x65, 0xfc, 0x63, 0x1e,
-		0x1f, 0xe2, 0x7c, 0x9b, 0xa2, 0x72, 0xc3, 0x34,
-		0x23, 0xdf, 0x01, 0xf0, 0xfd, 0x02, 0x8b, 0x97,
-		0x00, 0x2b, 0x97, 0x4e, 0xab, 0x98, 0x21, 0x3c
-};
-
-static const uint8_t AES_CBC_ciphertext_256B[] = {
-		0xc7, 0x71, 0x2b, 0xed, 0x2c, 0x97, 0x59, 0xfa,
-		0xcf, 0x5a, 0xb9, 0x31, 0x92, 0xe0, 0xc9, 0x92,
-		0xc0, 0x2d, 0xd5, 0x9c, 0x84, 0xbf, 0x70, 0x36,
-		0x13, 0x48, 0xe0, 0xb1, 0xbf, 0x6c, 0xcd, 0x91,
-		0xa0, 0xc3, 0x57, 0x6c, 0x3f, 0x0e, 0x34, 0x41,
-		0xe7, 0x9c, 0xc0, 0xec, 0x18, 0x0c, 0x05, 0x52,
-		0x78, 0xe2, 0x3c, 0x6e, 0xdf, 0xa5, 0x49, 0xc7,
-		0xf2, 0x55, 0x00, 0x8f, 0x65, 0x6d, 0x4b, 0xd0,
-		0xcb, 0xd4, 0xd2, 0x0b, 0xea, 0xf4, 0xb0, 0x85,
-		0x61, 0x9e, 0x36, 0xc0, 0x71, 0xb7, 0x80, 0xad,
-		0x40, 0x78, 0xb4, 0x70, 0x2b, 0xe8, 0x80, 0xc5,
-		0x19, 0x35, 0x96, 0x55, 0x3b, 0x40, 0x03, 0xbb,
-		0x9f, 0xa6, 0xc2, 0x82, 0x92, 0x04, 0xc3, 0xa6,
-		0x96, 0xc4, 0x7f, 0x4c, 0x3e, 0x3c, 0x79, 0x82,
-		0x88, 0x8b, 0x3f, 0x8b, 0xc5, 0x9f, 0x44, 0xbe,
-		0x71, 0xe7, 0x09, 0xa2, 0x40, 0xa2, 0x23, 0x4e,
-		0x9f, 0x31, 0xab, 0x6f, 0xdf, 0x59, 0x40, 0xe1,
-		0x12, 0x15, 0x55, 0x4b, 0xea, 0x3f, 0xa1, 0x41,
-		0x4f, 0xaf, 0xcd, 0x27, 0x2a, 0x61, 0xa1, 0x9e,
-		0x82, 0x30, 0x05, 0x05, 0x55, 0xce, 0x99, 0xd3,
-		0x8f, 0x3f, 0x86, 0x79, 0xdc, 0x9f, 0x33, 0x07,
-		0x75, 0x26, 0xc8, 0x72, 0x81, 0x0f, 0x9b, 0xf7,
-		0xb1, 0xfb, 0xd3, 0x91, 0x36, 0x08, 0xab, 0x26,
-		0x70, 0x53, 0x0c, 0x99, 0xfd, 0xa9, 0x07, 0xb4,
-		0xe9, 0xce, 0xc1, 0xd6, 0xd2, 0x2c, 0x71, 0x80,
-		0xec, 0x59, 0x61, 0x0b, 0x24, 0xf0, 0x6d, 0x33,
-		0x73, 0x45, 0x6e, 0x80, 0x03, 0x45, 0xf2, 0x76,
-		0xa5, 0x8a, 0xc9, 0xcf, 0xaf, 0x4a, 0xed, 0x35,
-		0xc0, 0x97, 0x52, 0xc5, 0x00, 0xdf, 0xef, 0xc7,
-		0x9f, 0xf2, 0xe8, 0x15, 0x3e, 0xb3, 0x30, 0xe7,
-		0x00, 0xd0, 0x4e, 0xeb, 0x79, 0xf6, 0xf6, 0xcf,
-		0xf0, 0xe7, 0x61, 0xd5, 0x3d, 0x6a, 0x73, 0x9d
-};
-
-static const uint8_t AES_CBC_ciphertext_512B[] = {
-		0xb4, 0xc6, 0xc6, 0x5f, 0x7e, 0xca, 0x05, 0x70,
-		0x21, 0x7b, 0x92, 0x9e, 0x23, 0xe7, 0x92, 0xb8,
-		0x27, 0x3d, 0x20, 0x29, 0x57, 0xfa, 0x1f, 0x26,
-		0x0a, 0x04, 0x34, 0xa6, 0xf2, 0xdc, 0x44, 0xb6,
-		0x43, 0x40, 0x62, 0xde, 0x0c, 0xde, 0x1c, 0x30,
-		0x43, 0x85, 0x0b, 0xe8, 0x93, 0x1f, 0xa1, 0x2a,
-		0x8a, 0x27, 0x35, 0x39, 0x14, 0x9f, 0x37, 0x64,
-		0x59, 0xb5, 0x0e, 0x96, 0x82, 0x5d, 0x63, 0x45,
-		0xd6, 0x93, 0x89, 0x46, 0xe4, 0x71, 0x31, 0xeb,
-		0x0e, 0xd1, 0x7b, 0xda, 0x90, 0xb5, 0x81, 0xac,
-		0x76, 0x54, 0x54, 0x85, 0x0b, 0xa9, 0x46, 0x9c,
-		0xf0, 0xfd, 0xde, 0x5d, 0xa8, 0xe3, 0xee, 0xe9,
-		0xf4, 0x9d, 0x34, 0x76, 0x39, 0xe7, 0xc3, 0x4a,
-		0x84, 0x38, 0x92, 0x61, 0xf1, 0x12, 0x9f, 0x05,
-		0xda, 0xdb, 0xc1, 0xd4, 0xb0, 0xa0, 0x27, 0x19,
-		0xa0, 0x56, 0x5d, 0x9b, 0xcc, 0x47, 0x7c, 0x15,
-		0x1d, 0x52, 0x66, 0xd5, 0xff, 0xef, 0x12, 0x23,
-		0x86, 0xe2, 0xee, 0x81, 0x2c, 0x3d, 0x7d, 0x28,
-		0xd5, 0x42, 0xdf, 0xdb, 0x75, 0x1c, 0xeb, 0xdf,
-		0x13, 0x23, 0xd5, 0x17, 0x89, 0xea, 0xd7, 0x01,
-		0xff, 0x57, 0x6a, 0x44, 0x61, 0xf4, 0xea, 0xbe,
-		0x97, 0x9b, 0xc2, 0xb1, 0x9c, 0x5d, 0xff, 0x4f,
-		0x73, 0x2d, 0x3f, 0x57, 0x28, 0x38, 0xbf, 0x3d,
-		0x9f, 0xda, 0x49, 0x55, 0x8f, 0xb2, 0x77, 0xec,
-		0x0f, 0xbc, 0xce, 0xb8, 0xc6, 0xe1, 0x03, 0xed,
-		0x35, 0x9c, 0xf2, 0x4d, 0xa4, 0x29, 0x6c, 0xd6,
-		0x6e, 0x05, 0x53, 0x46, 0xc1, 0x41, 0x09, 0x36,
-		0x0b, 0x7d, 0xf4, 0x9e, 0x0f, 0xba, 0x86, 0x33,
-		0xdd, 0xf1, 0xa7, 0xf7, 0xd5, 0x29, 0xa8, 0xa7,
-		0x4d, 0xce, 0x0c, 0xf5, 0xb4, 0x6c, 0xd8, 0x27,
-		0xb0, 0x87, 0x2a, 0x6f, 0x7f, 0x3f, 0x8f, 0xc3,
-		0xe2, 0x3e, 0x94, 0xcf, 0x61, 0x4a, 0x09, 0x3d,
-		0xf9, 0x55, 0x19, 0x31, 0xf2, 0xd2, 0x4a, 0x3e,
-		0xc1, 0xf5, 0xed, 0x7c, 0x45, 0xb0, 0x0c, 0x7b,
-		0xdd, 0xa6, 0x0a, 0x26, 0x66, 0xec, 0x85, 0x49,
-		0x00, 0x38, 0x05, 0x7c, 0x9c, 0x1c, 0x92, 0xf5,
-		0xf7, 0xdb, 0x5d, 0xbd, 0x61, 0x0c, 0xc9, 0xaf,
-		0xfd, 0x57, 0x3f, 0xee, 0x2b, 0xad, 0x73, 0xef,
-		0xa3, 0xc1, 0x66, 0x26, 0x44, 0x5e, 0xf9, 0x12,
-		0x86, 0x66, 0xa9, 0x61, 0x75, 0xa1, 0xbc, 0x40,
-		0x7f, 0xa8, 0x08, 0x02, 0xc0, 0x76, 0x0e, 0x76,
-		0xb3, 0x26, 0x3d, 0x1c, 0x40, 0x65, 0xe4, 0x18,
-		0x0f, 0x62, 0x17, 0x8f, 0x1e, 0x61, 0xb8, 0x08,
-		0x83, 0x54, 0x42, 0x11, 0x03, 0x30, 0x8e, 0xb7,
-		0xc1, 0x9c, 0xec, 0x69, 0x52, 0x95, 0xfb, 0x7b,
-		0x1a, 0x0c, 0x20, 0x24, 0xf7, 0xb8, 0x38, 0x0c,
-		0xb8, 0x7b, 0xb6, 0x69, 0x70, 0xd0, 0x61, 0xb9,
-		0x70, 0x06, 0xc2, 0x5b, 0x20, 0x47, 0xf7, 0xd9,
-		0x32, 0xc2, 0xf2, 0x90, 0xb6, 0x4d, 0xcd, 0x3c,
-		0x6d, 0x74, 0xea, 0x82, 0x35, 0x1b, 0x08, 0x44,
-		0xba, 0xb7, 0x33, 0x82, 0x33, 0x27, 0x54, 0x77,
-		0x6e, 0x58, 0xfe, 0x46, 0x5a, 0xb4, 0x88, 0x53,
-		0x8d, 0x9b, 0xb1, 0xab, 0xdf, 0x04, 0xe1, 0xfb,
-		0xd7, 0x1e, 0xd7, 0x38, 0x64, 0x54, 0xba, 0xb0,
-		0x6c, 0x84, 0x7a, 0x0f, 0xa7, 0x80, 0x6b, 0x86,
-		0xd9, 0xc9, 0xc6, 0x31, 0x95, 0xfa, 0x8a, 0x2c,
-		0x14, 0xe1, 0x85, 0x66, 0x27, 0xfd, 0x63, 0x3e,
-		0xf0, 0xfa, 0x81, 0xc9, 0x89, 0x4f, 0xe2, 0x6a,
-		0x8c, 0x17, 0xb5, 0xc7, 0x9f, 0x5d, 0x3f, 0x6b,
-		0x3f, 0xcd, 0x13, 0x7a, 0x3c, 0xe6, 0x4e, 0xfa,
-		0x7a, 0x10, 0xb8, 0x7c, 0x40, 0xec, 0x93, 0x11,
-		0x1f, 0xd0, 0x9e, 0xc3, 0x56, 0xb9, 0xf5, 0x21,
-		0x18, 0x41, 0x31, 0xea, 0x01, 0x8d, 0xea, 0x1c,
-		0x95, 0x5e, 0x56, 0x33, 0xbc, 0x7a, 0x3f, 0x6f
-};
-
-static const uint8_t AES_CBC_ciphertext_768B[] = {
-		0x3e, 0x7f, 0x9e, 0x4c, 0x88, 0x15, 0x68, 0x69,
-		0x10, 0x09, 0xe1, 0xa7, 0x0f, 0x27, 0x88, 0x2d,
-		0x90, 0x73, 0x4f, 0x67, 0xd3, 0x8b, 0xaf, 0xa1,
-		0x2c, 0x37, 0xa5, 0x6c, 0x7c, 0xbd, 0x95, 0x4c,
-		0x82, 0xcf, 0x05, 0x49, 0x16, 0x5c, 0xe7, 0x06,
-		0xd4, 0xcb, 0x55, 0x65, 0x9a, 0xd0, 0xe1, 0x46,
-		0x3a, 0x37, 0x71, 0xad, 0xb0, 0xb4, 0x99, 0x1e,
-		0x23, 0x57, 0x48, 0x96, 0x9c, 0xc5, 0xc4, 0xdb,
-		0x64, 0x3e, 0xc9, 0x7f, 0x90, 0x5a, 0xa0, 0x08,
-		0x75, 0x4c, 0x09, 0x06, 0x31, 0x6e, 0x59, 0x29,
-		0xfc, 0x2f, 0x72, 0xde, 0xf2, 0x40, 0x5a, 0xfe,
-		0xd3, 0x66, 0x64, 0xb8, 0x9c, 0xc9, 0xa6, 0x1f,
-		0xc3, 0x52, 0xcd, 0xb5, 0xd1, 0x4f, 0x43, 0x3f,
-		0xf4, 0x59, 0x25, 0xc4, 0xdd, 0x3e, 0x58, 0x7c,
-		0x21, 0xd6, 0x21, 0xce, 0xa4, 0xbe, 0x08, 0x23,
-		0x46, 0x68, 0xc0, 0x00, 0x91, 0x47, 0xca, 0x9b,
-		0xe0, 0xb4, 0xe3, 0xab, 0xbf, 0xcf, 0x68, 0x26,
-		0x97, 0x23, 0x09, 0x93, 0x64, 0x8f, 0x57, 0x59,
-		0xe2, 0x41, 0x7c, 0xa2, 0x48, 0x7e, 0xd5, 0x2c,
-		0x54, 0x09, 0x1b, 0x07, 0x94, 0xca, 0x39, 0x83,
-		0xdd, 0xf4, 0x7a, 0x1d, 0x2d, 0xdd, 0x67, 0xf7,
-		0x3c, 0x30, 0x89, 0x3e, 0xc1, 0xdc, 0x1d, 0x8f,
-		0xfc, 0xb1, 0xe9, 0x13, 0x31, 0xb0, 0x16, 0xdb,
-		0x88, 0xf2, 0x32, 0x7e, 0x73, 0xa3, 0xdf, 0x08,
-		0x6b, 0x53, 0x92, 0x08, 0xc9, 0x9d, 0x98, 0xb2,
-		0xf4, 0x8c, 0xb1, 0x95, 0xdc, 0xb6, 0xfc, 0xec,
-		0xf1, 0xc9, 0x0d, 0x6d, 0x42, 0x2c, 0xf5, 0x38,
-		0x29, 0xf4, 0xd8, 0x98, 0x0f, 0xb0, 0x81, 0xa5,
-		0xaa, 0xe6, 0x1f, 0x6e, 0x87, 0x32, 0x1b, 0x02,
-		0x07, 0x57, 0x38, 0x83, 0xf3, 0xe4, 0x54, 0x7c,
-		0xa8, 0x43, 0xdf, 0x3f, 0x42, 0xfd, 0x67, 0x28,
-		0x06, 0x4d, 0xea, 0xce, 0x1f, 0x84, 0x4a, 0xcd,
-		0x8c, 0x61, 0x5e, 0x8f, 0x61, 0xed, 0x84, 0x03,
-		0x53, 0x6a, 0x9e, 0xbf, 0x68, 0x83, 0xa7, 0x42,
-		0x56, 0x57, 0xcd, 0x45, 0x29, 0xfc, 0x7b, 0x07,
-		0xfc, 0xe9, 0xb9, 0x42, 0xfd, 0x29, 0xd5, 0xfd,
-		0x98, 0x11, 0xd1, 0x8d, 0x67, 0x29, 0x47, 0x61,
-		0xd8, 0x27, 0x37, 0x79, 0x29, 0xd1, 0x94, 0x6f,
-		0x8d, 0xf3, 0x1b, 0x3d, 0x6a, 0xb1, 0x59, 0xef,
-		0x1b, 0xd4, 0x70, 0x0e, 0xac, 0xab, 0xa0, 0x2b,
-		0x1f, 0x5e, 0x04, 0xf0, 0x0e, 0x35, 0x72, 0x90,
-		0xfc, 0xcf, 0x86, 0x43, 0xea, 0x45, 0x6d, 0x22,
-		0x63, 0x06, 0x1a, 0x58, 0xd7, 0x2d, 0xc5, 0xb0,
-		0x60, 0x69, 0xe8, 0x53, 0xc2, 0xa2, 0x57, 0x83,
-		0xc4, 0x31, 0xb4, 0xc6, 0xb3, 0xa1, 0x77, 0xb3,
-		0x1c, 0xca, 0x89, 0x3f, 0xf5, 0x10, 0x3b, 0x36,
-		0x31, 0x7d, 0x00, 0x46, 0x00, 0x92, 0xa0, 0xa0,
-		0x34, 0xd8, 0x5e, 0x62, 0xa9, 0xe0, 0x23, 0x37,
-		0x50, 0x85, 0xc7, 0x3a, 0x20, 0xa3, 0x98, 0xc0,
-		0xac, 0x20, 0x06, 0x0f, 0x17, 0x3c, 0xfc, 0x43,
-		0x8c, 0x9d, 0xec, 0xf5, 0x9a, 0x35, 0x96, 0xf7,
-		0xb7, 0x4c, 0xf9, 0x69, 0xf8, 0xd4, 0x1e, 0x9e,
-		0xf9, 0x7c, 0xc4, 0xd2, 0x11, 0x14, 0x41, 0xb9,
-		0x89, 0xd6, 0x07, 0xd2, 0x37, 0x07, 0x5e, 0x5e,
-		0xae, 0x60, 0xdc, 0xe4, 0xeb, 0x38, 0x48, 0x6d,
-		0x95, 0x8d, 0x71, 0xf2, 0xba, 0xda, 0x5f, 0x08,
-		0x9d, 0x4a, 0x0f, 0x56, 0x90, 0x64, 0xab, 0xb6,
-		0x88, 0x22, 0xa8, 0x90, 0x1f, 0x76, 0x2c, 0x83,
-		0x43, 0xce, 0x32, 0x55, 0x45, 0x84, 0x57, 0x43,
-		0xf9, 0xa8, 0xd1, 0x4f, 0xe3, 0xc1, 0x72, 0x9c,
-		0xeb, 0x64, 0xf7, 0xe4, 0x61, 0x2b, 0x93, 0xd1,
-		0x1f, 0xbb, 0x5c, 0xff, 0xa1, 0x59, 0x69, 0xcf,
-		0xf7, 0xaf, 0x58, 0x45, 0xd5, 0x3e, 0x98, 0x7d,
-		0x26, 0x39, 0x5c, 0x75, 0x3c, 0x4a, 0xbf, 0x5e,
-		0x12, 0x10, 0xb0, 0x93, 0x0f, 0x86, 0x82, 0xcf,
-		0xb2, 0xec, 0x70, 0x5c, 0x0b, 0xad, 0x5d, 0x63,
-		0x65, 0x32, 0xa6, 0x04, 0x58, 0x03, 0x91, 0x2b,
-		0xdb, 0x8f, 0xd3, 0xa3, 0x2b, 0x3a, 0xf5, 0xa1,
-		0x62, 0x6c, 0xb6, 0xf0, 0x13, 0x3b, 0x8c, 0x07,
-		0x10, 0x82, 0xc9, 0x56, 0x24, 0x87, 0xfc, 0x56,
-		0xe8, 0xef, 0x90, 0x8b, 0xd6, 0x48, 0xda, 0x53,
-		0x04, 0x49, 0x41, 0xa4, 0x67, 0xe0, 0x33, 0x24,
-		0x6b, 0x9c, 0x07, 0x55, 0x4c, 0x5d, 0xe9, 0x35,
-		0xfa, 0xbd, 0xea, 0xa8, 0x3f, 0xe9, 0xf5, 0x20,
-		0x5c, 0x60, 0x0f, 0x0d, 0x24, 0xcb, 0x1a, 0xd6,
-		0xe8, 0x5c, 0xa8, 0x42, 0xae, 0xd0, 0xd2, 0xf2,
-		0xa8, 0xbe, 0xea, 0x0f, 0x8d, 0xfb, 0x81, 0xa3,
-		0xa4, 0xef, 0xb7, 0x3e, 0x91, 0xbd, 0x26, 0x0f,
-		0x8e, 0xf1, 0xb2, 0xa5, 0x47, 0x06, 0xfa, 0x40,
-		0x8b, 0x31, 0x7a, 0x5a, 0x74, 0x2a, 0x0a, 0x7c,
-		0x62, 0x5d, 0x39, 0xa4, 0xae, 0x14, 0x85, 0x08,
-		0x5b, 0x20, 0x85, 0xf1, 0x57, 0x6e, 0x71, 0x13,
-		0x4e, 0x2b, 0x49, 0x87, 0x01, 0xdf, 0x37, 0xed,
-		0x28, 0xee, 0x4d, 0xa1, 0xf4, 0xb3, 0x3b, 0xba,
-		0x2d, 0xb3, 0x46, 0x17, 0x84, 0x80, 0x9d, 0xd7,
-		0x93, 0x1f, 0x28, 0x7c, 0xf5, 0xf9, 0xd6, 0x85,
-		0x8c, 0xa5, 0x44, 0xe9, 0x2c, 0x65, 0x51, 0x5f,
-		0x53, 0x7a, 0x09, 0xd9, 0x30, 0x16, 0x95, 0x89,
-		0x9c, 0x0b, 0xef, 0x90, 0x6d, 0x23, 0xd3, 0x48,
-		0x57, 0x3b, 0x55, 0x69, 0x96, 0xfc, 0xf7, 0x52,
-		0x92, 0x38, 0x36, 0xbf, 0xa9, 0x0a, 0xbb, 0x68,
-		0x45, 0x08, 0x25, 0xee, 0x59, 0xfe, 0xee, 0xf2,
-		0x2c, 0xd4, 0x5f, 0x78, 0x59, 0x0d, 0x90, 0xf1,
-		0xd7, 0xe4, 0x39, 0x0e, 0x46, 0x36, 0xf5, 0x75,
-		0x03, 0x3c, 0x28, 0xfb, 0xfa, 0x8f, 0xef, 0xc9,
-		0x61, 0x00, 0x94, 0xc3, 0xd2, 0x0f, 0xd9, 0xda
-};
-
-static const uint8_t AES_CBC_ciphertext_1024B[] = {
-		0x7d, 0x01, 0x7e, 0x2f, 0x92, 0xb3, 0xea, 0x72,
-		0x4a, 0x3f, 0x10, 0xf9, 0x2b, 0xb0, 0xd5, 0xb9,
-		0x19, 0x68, 0x94, 0xe9, 0x93, 0xe9, 0xd5, 0x26,
-		0x20, 0x44, 0xe2, 0x47, 0x15, 0x8d, 0x75, 0x48,
-		0x8e, 0xe4, 0x40, 0x81, 0xb5, 0x06, 0xa8, 0xb8,
-		0x0e, 0x0f, 0x3b, 0xbc, 0x5b, 0xbe, 0x3b, 0xa2,
-		0x2a, 0x0c, 0x48, 0x98, 0x19, 0xdf, 0xe9, 0x25,
-		0x75, 0xab, 0x93, 0x44, 0xb1, 0x72, 0x70, 0xbb,
-		0x20, 0xcf, 0x78, 0xe9, 0x4d, 0xc6, 0xa9, 0xa9,
-		0x84, 0x78, 0xc5, 0xc0, 0xc4, 0xc9, 0x79, 0x1a,
-		0xbc, 0x61, 0x25, 0x5f, 0xac, 0x01, 0x03, 0xb7,
-		0xef, 0x07, 0xf2, 0x62, 0x98, 0xee, 0xe3, 0xad,
-		0x94, 0x75, 0x30, 0x67, 0xb9, 0x15, 0x00, 0xe7,
-		0x11, 0x32, 0x2e, 0x6b, 0x55, 0x9f, 0xac, 0x68,
-		0xde, 0x61, 0x05, 0x80, 0x01, 0xf3, 0xad, 0xab,
-		0xaf, 0x45, 0xe0, 0xf4, 0x68, 0x5c, 0xc0, 0x52,
-		0x92, 0xc8, 0x21, 0xb6, 0xf5, 0x8a, 0x1d, 0xbb,
-		0xfc, 0x4a, 0x11, 0x62, 0xa2, 0xc4, 0xf1, 0x2d,
-		0x0e, 0xb2, 0xc7, 0x17, 0x34, 0xb4, 0x2a, 0x54,
-		0x81, 0xc2, 0x1e, 0xcf, 0x51, 0x0a, 0x76, 0x54,
-		0xf1, 0x48, 0x0d, 0x5c, 0xcd, 0x38, 0x3e, 0x38,
-		0x3e, 0xf8, 0x46, 0x1d, 0x00, 0xf5, 0x62, 0xe1,
-		0x5c, 0xb7, 0x8d, 0xce, 0xd0, 0x3f, 0xbb, 0x22,
-		0xf1, 0xe5, 0xb1, 0xa0, 0x58, 0x5e, 0x3c, 0x0f,
-		0x15, 0xd1, 0xac, 0x3e, 0xc7, 0x72, 0xc4, 0xde,
-		0x8b, 0x95, 0x3e, 0x91, 0xf7, 0x1d, 0x04, 0x9a,
-		0xc8, 0xe4, 0xbf, 0xd3, 0x22, 0xca, 0x4a, 0xdc,
-		0xb6, 0x16, 0x79, 0x81, 0x75, 0x2f, 0x6b, 0xa7,
-		0x04, 0x98, 0xa7, 0x4e, 0xc1, 0x19, 0x90, 0x33,
-		0x33, 0x3c, 0x7f, 0xdd, 0xac, 0x09, 0x0c, 0xc3,
-		0x91, 0x34, 0x74, 0xab, 0xa5, 0x35, 0x0a, 0x13,
-		0xc3, 0x56, 0x67, 0x6d, 0x1a, 0x3e, 0xbf, 0x56,
-		0x06, 0x67, 0x15, 0x5f, 0xfc, 0x8b, 0xa2, 0x3c,
-		0x5e, 0xaf, 0x56, 0x1f, 0xe3, 0x2e, 0x9d, 0x0a,
-		0xf9, 0x9b, 0xc7, 0xb5, 0x03, 0x1c, 0x68, 0x99,
-		0xfa, 0x3c, 0x37, 0x59, 0xc1, 0xf7, 0x6a, 0x83,
-		0x22, 0xee, 0xca, 0x7f, 0x7d, 0x49, 0xe6, 0x48,
-		0x84, 0x54, 0x7a, 0xff, 0xb3, 0x72, 0x21, 0xd8,
-		0x7a, 0x5d, 0xb1, 0x4b, 0xcc, 0x01, 0x6f, 0x90,
-		0xc6, 0x68, 0x1c, 0x2c, 0xa1, 0xe2, 0x74, 0x40,
-		0x26, 0x9b, 0x57, 0x53, 0xa3, 0x7c, 0x0b, 0x0d,
-		0xcf, 0x05, 0x5d, 0x62, 0x4f, 0x75, 0x06, 0x62,
-		0x1f, 0x26, 0x32, 0xaa, 0x25, 0xcc, 0x26, 0x8d,
-		0xae, 0x01, 0x47, 0xa3, 0x00, 0x42, 0xe2, 0x4c,
-		0xee, 0x29, 0xa2, 0x81, 0xa0, 0xfd, 0xeb, 0xff,
-		0x9a, 0x66, 0x6e, 0x47, 0x5b, 0xab, 0x93, 0x5a,
-		0x02, 0x6d, 0x6f, 0xf2, 0x6e, 0x02, 0x9d, 0xb1,
-		0xab, 0x56, 0xdc, 0x8b, 0x9b, 0x17, 0xa8, 0xfb,
-		0x87, 0x42, 0x7c, 0x91, 0x1e, 0x14, 0xc6, 0x6f,
-		0xdc, 0xf0, 0x27, 0x30, 0xfa, 0x3f, 0xc4, 0xad,
-		0x57, 0x85, 0xd2, 0xc9, 0x32, 0x2c, 0x13, 0xa6,
-		0x04, 0x04, 0x50, 0x05, 0x2f, 0x72, 0xd9, 0x44,
-		0x55, 0x6e, 0x93, 0x40, 0xed, 0x7e, 0xd4, 0x40,
-		0x3e, 0x88, 0x3b, 0x8b, 0xb6, 0xeb, 0xc6, 0x5d,
-		0x9c, 0x99, 0xa1, 0xcf, 0x30, 0xb2, 0xdc, 0x48,
-		0x8a, 0x01, 0xa7, 0x61, 0x77, 0x50, 0x14, 0xf3,
-		0x0c, 0x49, 0x53, 0xb3, 0xb4, 0xb4, 0x28, 0x41,
-		0x4a, 0x2d, 0xd2, 0x4d, 0x2a, 0x30, 0x31, 0x83,
-		0x03, 0x5e, 0xaa, 0xd3, 0xa3, 0xd1, 0xa1, 0xca,
-		0x62, 0xf0, 0xe1, 0xf2, 0xff, 0xf0, 0x19, 0xa6,
-		0xde, 0x22, 0x47, 0xb5, 0x28, 0x7d, 0xf7, 0x07,
-		0x16, 0x0d, 0xb1, 0x55, 0x81, 0x95, 0xe5, 0x1d,
-		0x4d, 0x78, 0xa9, 0x3e, 0xce, 0xe3, 0x1c, 0xf9,
-		0x47, 0xc8, 0xec, 0xc5, 0xc5, 0x93, 0x4c, 0x34,
-		0x20, 0x6b, 0xee, 0x9a, 0xe6, 0x86, 0x57, 0x58,
-		0xd5, 0x58, 0xf1, 0x33, 0x10, 0x29, 0x9e, 0x93,
-		0x2f, 0xf5, 0x90, 0x00, 0x17, 0x67, 0x4f, 0x39,
-		0x18, 0xe1, 0xcf, 0x55, 0x78, 0xbb, 0xe6, 0x29,
-		0x3e, 0x77, 0xd5, 0x48, 0xb7, 0x42, 0x72, 0x53,
-		0x27, 0xfa, 0x5b, 0xe0, 0x36, 0x14, 0x97, 0xb8,
-		0x9b, 0x3c, 0x09, 0x77, 0xc1, 0x0a, 0xe4, 0xa2,
-		0x63, 0xfc, 0xbe, 0x5c, 0x17, 0xcf, 0x01, 0xf5,
-		0x03, 0x0f, 0x17, 0xbc, 0x93, 0xdd, 0x5f, 0xe2,
-		0xf3, 0x08, 0xa8, 0xb1, 0x85, 0xb6, 0x34, 0x3f,
-		0x87, 0x42, 0xa5, 0x42, 0x3b, 0x0e, 0xd6, 0x83,
-		0x6a, 0xfd, 0x5d, 0xc9, 0x67, 0xd5, 0x51, 0xc9,
-		0x2a, 0x4e, 0x91, 0xb0, 0x59, 0xb2, 0x0f, 0xa2,
-		0xe6, 0x47, 0x73, 0xc2, 0xa2, 0xae, 0xbb, 0xc8,
-		0x42, 0xa3, 0x2a, 0x27, 0x29, 0x48, 0x8c, 0x54,
-		0x6c, 0xec, 0x00, 0x2a, 0x42, 0xa3, 0x7a, 0x0f,
-		0x12, 0x66, 0x6b, 0x96, 0xf6, 0xd0, 0x56, 0x4f,
-		0x49, 0x5c, 0x47, 0xec, 0x05, 0x62, 0x54, 0xb2,
-		0x64, 0x5a, 0x69, 0x1f, 0x19, 0xb4, 0x84, 0x5c,
-		0xbe, 0x48, 0x8e, 0xfc, 0x58, 0x21, 0xce, 0xfa,
-		0xaa, 0x84, 0xd2, 0xc1, 0x08, 0xb3, 0x87, 0x0f,
-		0x4f, 0xa3, 0x3a, 0xb6, 0x44, 0xbe, 0x2e, 0x9a,
-		0xdd, 0xb5, 0x44, 0x80, 0xca, 0xf4, 0xc3, 0x6e,
-		0xba, 0x93, 0x77, 0xe0, 0x53, 0xfb, 0x37, 0xfb,
-		0x88, 0xc3, 0x1f, 0x25, 0xde, 0x3e, 0x11, 0xf4,
-		0x89, 0xe7, 0xd1, 0x3b, 0xb4, 0x23, 0xcb, 0x70,
-		0xba, 0x35, 0x97, 0x7c, 0xbe, 0x84, 0x13, 0xcf,
-		0xe0, 0x4d, 0x33, 0x91, 0x71, 0x85, 0xbb, 0x4b,
-		0x97, 0x32, 0x5d, 0xa0, 0xb9, 0x8f, 0xdc, 0x27,
-		0x5a, 0xeb, 0x71, 0xf1, 0xd5, 0x0d, 0x65, 0xb4,
-		0x22, 0x81, 0xde, 0xa7, 0x58, 0x20, 0x0b, 0x18,
-		0x11, 0x76, 0x5c, 0xe6, 0x6a, 0x2c, 0x99, 0x69,
-		0xdc, 0xed, 0x67, 0x08, 0x5d, 0x5e, 0xe9, 0x1e,
-		0x55, 0x70, 0xc1, 0x5a, 0x76, 0x1b, 0x8d, 0x2e,
-		0x0d, 0xf9, 0xcc, 0x30, 0x8c, 0x44, 0x0f, 0x63,
-		0x8c, 0x42, 0x8a, 0x9f, 0x4c, 0xd1, 0x48, 0x28,
-		0x8a, 0xf5, 0x56, 0x2e, 0x23, 0x12, 0xfe, 0x67,
-		0x9a, 0x13, 0x65, 0x75, 0x83, 0xf1, 0x3c, 0x98,
-		0x07, 0x6b, 0xb7, 0x27, 0x5b, 0xf0, 0x70, 0xda,
-		0x30, 0xf8, 0x74, 0x4e, 0x7a, 0x32, 0x84, 0xcc,
-		0x0e, 0xcd, 0x80, 0x8b, 0x82, 0x31, 0x9a, 0x48,
-		0xcf, 0x75, 0x00, 0x1f, 0x4f, 0xe0, 0x8e, 0xa3,
-		0x6a, 0x2c, 0xd4, 0x73, 0x4c, 0x63, 0x7c, 0xa6,
-		0x4d, 0x5e, 0xfd, 0x43, 0x3b, 0x27, 0xe1, 0x5e,
-		0xa3, 0xa9, 0x5c, 0x3b, 0x60, 0xdd, 0xc6, 0x8d,
-		0x5a, 0xf1, 0x3e, 0x89, 0x4b, 0x24, 0xcf, 0x01,
-		0x3a, 0x2d, 0x44, 0xe7, 0xda, 0xe7, 0xa1, 0xac,
-		0x11, 0x05, 0x0c, 0xa9, 0x7a, 0x82, 0x8c, 0x5c,
-		0x29, 0x68, 0x9c, 0x73, 0x13, 0xcc, 0x67, 0x32,
-		0x11, 0x5e, 0xe5, 0xcc, 0x8c, 0xf5, 0xa7, 0x52,
-		0x83, 0x9a, 0x70, 0xef, 0xde, 0x55, 0x9c, 0xc7,
-		0x8a, 0xed, 0xad, 0x28, 0x4a, 0xc5, 0x92, 0x6d,
-		0x8e, 0x47, 0xca, 0xe3, 0xf8, 0x77, 0xb5, 0x26,
-		0x64, 0x84, 0xc2, 0xf1, 0xd7, 0xae, 0x0c, 0xb9,
-		0x39, 0x0f, 0x43, 0x6b, 0xe9, 0xe0, 0x09, 0x4b,
-		0xe5, 0xe3, 0x17, 0xa6, 0x68, 0x69, 0x46, 0xf4,
-		0xf0, 0x68, 0x7f, 0x2f, 0x1c, 0x7e, 0x4c, 0xd2,
-		0xb5, 0xc6, 0x16, 0x85, 0xcf, 0x02, 0x4c, 0x89,
-		0x0b, 0x25, 0xb0, 0xeb, 0xf3, 0x77, 0x08, 0x6a,
-		0x46, 0x5c, 0xf6, 0x2f, 0xf1, 0x24, 0xc3, 0x4d,
-		0x80, 0x60, 0x4d, 0x69, 0x98, 0xde, 0xc7, 0xa1,
-		0xf6, 0x4e, 0x18, 0x0c, 0x2a, 0xb0, 0xb2, 0xe0,
-		0x46, 0xe7, 0x49, 0x37, 0xc8, 0x5a, 0x23, 0x24,
-		0xe3, 0x0f, 0xcc, 0x92, 0xb4, 0x8d, 0xdc, 0x9e
-};
-
-static const uint8_t AES_CBC_ciphertext_1280B[] = {
-		0x91, 0x99, 0x5e, 0x9e, 0x84, 0xff, 0x59, 0x45,
-		0xc1, 0xf4, 0xbc, 0x9c, 0xb9, 0x30, 0x6c, 0x51,
-		0x73, 0x52, 0xb4, 0x44, 0x09, 0x79, 0xe2, 0x89,
-		0x75, 0xeb, 0x54, 0x26, 0xce, 0xd8, 0x24, 0x98,
-		0xaa, 0xf8, 0x13, 0x16, 0x68, 0x58, 0xc4, 0x82,
-		0x0e, 0x31, 0xd3, 0x6a, 0x13, 0x58, 0x31, 0xe9,
-		0x3a, 0xc1, 0x8b, 0xc5, 0x3f, 0x50, 0x42, 0xd1,
-		0x93, 0xe4, 0x9b, 0x65, 0x2b, 0xf4, 0x1d, 0x9e,
-		0x2d, 0xdb, 0x48, 0xef, 0x9a, 0x01, 0x68, 0xb6,
-		0xea, 0x7a, 0x2b, 0xad, 0xfe, 0x77, 0x44, 0x7e,
-		0x5a, 0xc5, 0x64, 0xb4, 0xfe, 0x5c, 0x80, 0xf3,
-		0x20, 0x7e, 0xaf, 0x5b, 0xf8, 0xd1, 0x38, 0xa0,
-		0x8d, 0x09, 0x77, 0x06, 0xfe, 0xf5, 0xf4, 0xe4,
-		0xee, 0xb8, 0x95, 0x27, 0xed, 0x07, 0xb8, 0xaa,
-		0x25, 0xb4, 0xe1, 0x4c, 0xeb, 0x3f, 0xdb, 0x39,
-		0x66, 0x28, 0x1b, 0x60, 0x42, 0x8b, 0x99, 0xd9,
-		0x49, 0xd6, 0x8c, 0xa4, 0x9d, 0xd8, 0x93, 0x58,
-		0x8f, 0xfa, 0xd3, 0xf7, 0x37, 0x9c, 0x88, 0xab,
-		0x16, 0x50, 0xfe, 0x01, 0x1f, 0x88, 0x48, 0xbe,
-		0x21, 0xa9, 0x90, 0x9e, 0x73, 0xe9, 0x82, 0xf7,
-		0xbf, 0x4b, 0x43, 0xf4, 0xbf, 0x22, 0x3c, 0x45,
-		0x47, 0x95, 0x5b, 0x49, 0x71, 0x07, 0x1c, 0x8b,
-		0x49, 0xa4, 0xa3, 0x49, 0xc4, 0x5f, 0xb1, 0xf5,
-		0xe3, 0x6b, 0xf1, 0xdc, 0xea, 0x92, 0x7b, 0x29,
-		0x40, 0xc9, 0x39, 0x5f, 0xdb, 0xbd, 0xf3, 0x6a,
-		0x09, 0x9b, 0x2a, 0x5e, 0xc7, 0x0b, 0x25, 0x94,
-		0x55, 0x71, 0x9c, 0x7e, 0x0e, 0xb4, 0x08, 0x12,
-		0x8c, 0x6e, 0x77, 0xb8, 0x29, 0xf1, 0xc6, 0x71,
-		0x04, 0x40, 0x77, 0x18, 0x3f, 0x01, 0x09, 0x9c,
-		0x23, 0x2b, 0x5d, 0x2a, 0x88, 0x20, 0x23, 0x59,
-		0x74, 0x2a, 0x67, 0x8f, 0xb7, 0xba, 0x38, 0x9f,
-		0x0f, 0xcf, 0x94, 0xdf, 0xe1, 0x8f, 0x35, 0x5e,
-		0x34, 0x0c, 0x32, 0x92, 0x2b, 0x23, 0x81, 0xf4,
-		0x73, 0xa0, 0x5a, 0x2a, 0xbd, 0xa6, 0x6b, 0xae,
-		0x43, 0xe2, 0xdc, 0x01, 0xc1, 0xc6, 0xc3, 0x04,
-		0x06, 0xbb, 0xb0, 0x89, 0xb3, 0x4e, 0xbd, 0x81,
-		0x1b, 0x03, 0x63, 0x93, 0xed, 0x4e, 0xf6, 0xe5,
-		0x94, 0x6f, 0xd6, 0xf3, 0x20, 0xf3, 0xbc, 0x30,
-		0xc5, 0xd6, 0xbe, 0x1c, 0x05, 0x34, 0x26, 0x4d,
-		0x46, 0x5e, 0x56, 0x63, 0xfb, 0xdb, 0xcd, 0xed,
-		0xb0, 0x7f, 0x83, 0x94, 0x55, 0x54, 0x2f, 0xab,
-		0xc9, 0xb7, 0x16, 0x4f, 0x9e, 0x93, 0x25, 0xd7,
-		0x9f, 0x39, 0x2b, 0x63, 0xcf, 0x1e, 0xa3, 0x0e,
-		0x28, 0x47, 0x8a, 0x5f, 0x40, 0x02, 0x89, 0x1f,
-		0x83, 0xe7, 0x87, 0xd1, 0x90, 0x17, 0xb8, 0x27,
-		0x64, 0xe1, 0xe1, 0x48, 0x5a, 0x55, 0x74, 0x99,
-		0x27, 0x9d, 0x05, 0x67, 0xda, 0x70, 0x12, 0x8f,
-		0x94, 0x96, 0xfd, 0x36, 0xa4, 0x1d, 0x22, 0xe5,
-		0x0b, 0xe5, 0x2f, 0x38, 0x55, 0xa3, 0x5d, 0x0b,
-		0xcf, 0xd4, 0xa9, 0xb8, 0xd6, 0x9a, 0x16, 0x2e,
-		0x6c, 0x4a, 0x25, 0x51, 0x7a, 0x09, 0x48, 0xdd,
-		0xf0, 0xa3, 0x5b, 0x08, 0x1e, 0x2f, 0x03, 0x91,
-		0x80, 0xe8, 0x0f, 0xe9, 0x5a, 0x2f, 0x90, 0xd3,
-		0x64, 0xed, 0xd7, 0x51, 0x17, 0x66, 0x53, 0x40,
-		0x43, 0x74, 0xef, 0x0a, 0x0d, 0x49, 0x41, 0xf2,
-		0x67, 0x6e, 0xea, 0x14, 0xc8, 0x74, 0xd6, 0xa9,
-		0xb9, 0x6a, 0xe3, 0xec, 0x7d, 0xe8, 0x6a, 0x21,
-		0x3a, 0x52, 0x42, 0xfe, 0x9a, 0x15, 0x6d, 0x60,
-		0x64, 0x88, 0xc5, 0xb2, 0x8b, 0x15, 0x2c, 0xff,
-		0xe2, 0x35, 0xc3, 0xee, 0x9f, 0xcd, 0x82, 0xd9,
-		0x14, 0x35, 0x2a, 0xb7, 0xf5, 0x2f, 0x7b, 0xbc,
-		0x01, 0xfd, 0xa8, 0xe0, 0x21, 0x4e, 0x73, 0xf9,
-		0xf2, 0xb0, 0x79, 0xc9, 0x10, 0x52, 0x8f, 0xa8,
-		0x3e, 0x3b, 0xbe, 0xc5, 0xde, 0xf6, 0x53, 0xe3,
-		0x1c, 0x25, 0x3a, 0x1f, 0x13, 0xbf, 0x13, 0xbb,
-		0x94, 0xc2, 0x97, 0x43, 0x64, 0x47, 0x8f, 0x76,
-		0xd7, 0xaa, 0xeb, 0xa4, 0x03, 0x50, 0x0c, 0x10,
-		0x50, 0xd8, 0xf7, 0x75, 0x52, 0x42, 0xe2, 0x94,
-		0x67, 0xf4, 0x60, 0xfb, 0x21, 0x9b, 0x7a, 0x05,
-		0x50, 0x7c, 0x1b, 0x4a, 0x8b, 0x29, 0xe1, 0xac,
-		0xd7, 0x99, 0xfd, 0x0d, 0x65, 0x92, 0xcd, 0x23,
-		0xa7, 0x35, 0x8e, 0x13, 0xf2, 0xe4, 0x10, 0x74,
-		0xc6, 0x4f, 0x19, 0xf7, 0x01, 0x0b, 0x46, 0xab,
-		0xef, 0x8d, 0x4a, 0x4a, 0xfa, 0xda, 0xf3, 0xfb,
-		0x40, 0x28, 0x88, 0xa2, 0x65, 0x98, 0x4d, 0x88,
-		0xc7, 0xbf, 0x00, 0xc8, 0xd0, 0x91, 0xcb, 0x89,
-		0x2f, 0xb0, 0x85, 0xfc, 0xa1, 0xc1, 0x9e, 0x83,
-		0x88, 0xad, 0x95, 0xc0, 0x31, 0xa0, 0xad, 0xa2,
-		0x42, 0xb5, 0xe7, 0x55, 0xd4, 0x93, 0x5a, 0x74,
-		0x4e, 0x41, 0xc3, 0xcf, 0x96, 0x83, 0x46, 0xa1,
-		0xb7, 0x5b, 0xb1, 0x34, 0x67, 0x4e, 0xb1, 0xd7,
-		0x40, 0x20, 0x72, 0xe9, 0xc8, 0x74, 0xb7, 0xde,
-		0x72, 0x29, 0x77, 0x4c, 0x74, 0x7e, 0xcc, 0x18,
-		0xa5, 0x8d, 0x79, 0x8c, 0xd6, 0x6e, 0xcb, 0xd9,
-		0xe1, 0x61, 0xe7, 0x36, 0xbc, 0x37, 0xea, 0xee,
-		0xd8, 0x3c, 0x5e, 0x7c, 0x47, 0x50, 0xd5, 0xec,
-		0x37, 0xc5, 0x63, 0xc3, 0xc9, 0x99, 0x23, 0x9f,
-		0x64, 0x39, 0xdf, 0x13, 0x96, 0x6d, 0xea, 0x08,
-		0x0c, 0x27, 0x2d, 0xfe, 0x0f, 0xc2, 0xa3, 0x97,
-		0x04, 0x12, 0x66, 0x0d, 0x94, 0xbf, 0xbe, 0x3e,
-		0xb9, 0xcf, 0x8e, 0xc1, 0x9d, 0xb1, 0x64, 0x17,
-		0x54, 0x92, 0x3f, 0x0a, 0x51, 0xc8, 0xf5, 0x82,
-		0x98, 0x73, 0x03, 0xc0, 0x5a, 0x51, 0x01, 0x67,
-		0xb4, 0x01, 0x04, 0x06, 0xbc, 0x37, 0xde, 0x96,
-		0x23, 0x3c, 0xce, 0x98, 0x3f, 0xd6, 0x51, 0x1b,
-		0x01, 0x83, 0x0a, 0x1c, 0xf9, 0xeb, 0x7e, 0x72,
-		0xa9, 0x51, 0x23, 0xc8, 0xd7, 0x2f, 0x12, 0xbc,
-		0x08, 0xac, 0x07, 0xe7, 0xa7, 0xe6, 0x46, 0xae,
-		0x54, 0xa3, 0xc2, 0xf2, 0x05, 0x2d, 0x06, 0x5e,
-		0xfc, 0xe2, 0xa2, 0x23, 0xac, 0x86, 0xf2, 0x54,
-		0x83, 0x4a, 0xb6, 0x48, 0x93, 0xa1, 0x78, 0xc2,
-		0x07, 0xec, 0x82, 0xf0, 0x74, 0xa9, 0x18, 0xe9,
-		0x53, 0x44, 0x49, 0xc2, 0x94, 0xf8, 0x94, 0x92,
-		0x08, 0x3f, 0xbf, 0xa6, 0xe5, 0xc6, 0x03, 0x8a,
-		0xc6, 0x90, 0x48, 0x6c, 0xee, 0xbd, 0x44, 0x92,
-		0x1f, 0x2a, 0xce, 0x1d, 0xb8, 0x31, 0xa2, 0x9d,
-		0x24, 0x93, 0xa8, 0x9f, 0x36, 0x00, 0x04, 0x7b,
-		0xcb, 0x93, 0x59, 0xa1, 0x53, 0xdb, 0x13, 0x7a,
-		0x54, 0xb1, 0x04, 0xdb, 0xce, 0x48, 0x4f, 0xe5,
-		0x2f, 0xcb, 0xdf, 0x8f, 0x50, 0x7c, 0xfc, 0x76,
-		0x80, 0xb4, 0xdc, 0x3b, 0xc8, 0x98, 0x95, 0xf5,
-		0x50, 0xba, 0x70, 0x5a, 0x97, 0xd5, 0xfc, 0x98,
-		0x4d, 0xf3, 0x61, 0x0f, 0xcf, 0xac, 0x49, 0x0a,
-		0xdb, 0xc1, 0x42, 0x8f, 0xb6, 0x29, 0xd5, 0x65,
-		0xef, 0x83, 0xf1, 0x30, 0x4b, 0x84, 0xd0, 0x69,
-		0xde, 0xd2, 0x99, 0xe5, 0xec, 0xd3, 0x90, 0x86,
-		0x39, 0x2a, 0x6e, 0xd5, 0x32, 0xe3, 0x0d, 0x2d,
-		0x01, 0x8b, 0x17, 0x55, 0x1d, 0x65, 0x57, 0xbf,
-		0xd8, 0x75, 0xa4, 0x85, 0xb6, 0x4e, 0x35, 0x14,
-		0x58, 0xe4, 0x89, 0xb8, 0x7a, 0x58, 0x86, 0x0c,
-		0xbd, 0x8b, 0x05, 0x7b, 0x63, 0xc0, 0x86, 0x80,
-		0x33, 0x46, 0xd4, 0x9b, 0xb6, 0x0a, 0xeb, 0x6c,
-		0xae, 0xd6, 0x57, 0x7a, 0xc7, 0x59, 0x33, 0xa0,
-		0xda, 0xa4, 0x12, 0xbf, 0x52, 0x22, 0x05, 0x8d,
-		0xeb, 0xee, 0xd5, 0xec, 0xea, 0x29, 0x9b, 0x76,
-		0x95, 0x50, 0x6d, 0x99, 0xe1, 0x45, 0x63, 0x09,
-		0x16, 0x5f, 0xb0, 0xf2, 0x5b, 0x08, 0x33, 0xdd,
-		0x8f, 0xb7, 0x60, 0x7a, 0x8e, 0xc6, 0xfc, 0xac,
-		0xa9, 0x56, 0x2c, 0xa9, 0x8b, 0x74, 0x33, 0xad,
-		0x2a, 0x7e, 0x96, 0xb6, 0xba, 0x22, 0x28, 0xcf,
-		0x4d, 0x96, 0xb7, 0xd1, 0xfa, 0x99, 0x4a, 0x61,
-		0xe6, 0x84, 0xd1, 0x94, 0xca, 0xf5, 0x86, 0xb0,
-		0xba, 0x34, 0x7a, 0x04, 0xcc, 0xd4, 0x81, 0xcd,
-		0xd9, 0x86, 0xb6, 0xe0, 0x5a, 0x6f, 0x9b, 0x99,
-		0xf0, 0xdf, 0x49, 0xae, 0x6d, 0xc2, 0x54, 0x67,
-		0xe0, 0xb4, 0x34, 0x2d, 0x1c, 0x46, 0xdf, 0x73,
-		0x3b, 0x45, 0x43, 0xe7, 0x1f, 0xa3, 0x36, 0x35,
-		0x25, 0x33, 0xd9, 0xc0, 0x54, 0x38, 0x6e, 0x6b,
-		0x80, 0xcf, 0x50, 0xa4, 0xb6, 0x21, 0x17, 0xfd,
-		0x9b, 0x5c, 0x36, 0xca, 0xcc, 0x73, 0x73, 0xad,
-		0xe0, 0x57, 0x77, 0x90, 0x0e, 0x7f, 0x0f, 0x87,
-		0x7f, 0xdb, 0x73, 0xbf, 0xda, 0xc2, 0xb3, 0x05,
-		0x22, 0x06, 0xf5, 0xa3, 0xfc, 0x1e, 0x8f, 0xda,
-		0xcf, 0x49, 0xd6, 0xb3, 0x66, 0x2c, 0xb5, 0x00,
-		0xaf, 0x85, 0x6e, 0xb8, 0x5b, 0x8c, 0xa1, 0xa4,
-		0x21, 0xce, 0x40, 0xf3, 0x98, 0xac, 0xec, 0x88,
-		0x62, 0x43, 0x2a, 0xac, 0xca, 0xcf, 0xb9, 0x30,
-		0xeb, 0xfc, 0xef, 0xf0, 0x6e, 0x64, 0x6d, 0xe7,
-		0x54, 0x88, 0x6b, 0x22, 0x29, 0xbe, 0xa5, 0x8c,
-		0x31, 0x23, 0x3b, 0x4a, 0x80, 0x37, 0xe6, 0xd0,
-		0x05, 0xfc, 0x10, 0x0e, 0xdd, 0xbb, 0x00, 0xc5,
-		0x07, 0x20, 0x59, 0xd3, 0x41, 0x17, 0x86, 0x46,
-		0xab, 0x68, 0xf6, 0x48, 0x3c, 0xea, 0x5a, 0x06,
-		0x30, 0x21, 0x19, 0xed, 0x74, 0xbe, 0x0b, 0x97,
-		0xee, 0x91, 0x35, 0x94, 0x1f, 0xcb, 0x68, 0x7f,
-		0xe4, 0x48, 0xb0, 0x16, 0xfb, 0xf0, 0x74, 0xdb,
-		0x06, 0x59, 0x2e, 0x5a, 0x9c, 0xce, 0x8f, 0x7d,
-		0xba, 0x48, 0xd5, 0x3f, 0x5c, 0xb0, 0xc2, 0x33,
-		0x48, 0x60, 0x17, 0x08, 0x85, 0xba, 0xff, 0xb9,
-		0x34, 0x0a, 0x3d, 0x8f, 0x21, 0x13, 0x12, 0x1b
-};
-
-static const uint8_t AES_CBC_ciphertext_1536B[] = {
-		0x89, 0x93, 0x05, 0x99, 0xa9, 0xed, 0xea, 0x62,
-		0xc9, 0xda, 0x51, 0x15, 0xce, 0x42, 0x91, 0xc3,
-		0x80, 0xc8, 0x03, 0x88, 0xc2, 0x63, 0xda, 0x53,
-		0x1a, 0xf3, 0xeb, 0xd5, 0xba, 0x6f, 0x23, 0xb2,
-		0xed, 0x8f, 0x89, 0xb1, 0xb3, 0xca, 0x90, 0x7a,
-		0xdd, 0x3f, 0xf6, 0xca, 0x86, 0x58, 0x54, 0xbc,
-		0xab, 0x0f, 0xf4, 0xab, 0x6d, 0x5d, 0x42, 0xd0,
-		0x17, 0x49, 0x17, 0xd1, 0x93, 0xea, 0xe8, 0x22,
-		0xc1, 0x34, 0x9f, 0x3a, 0x3b, 0xaa, 0xe9, 0x1b,
-		0x93, 0xff, 0x6b, 0x68, 0xba, 0xe6, 0xd2, 0x39,
-		0x3d, 0x55, 0x34, 0x8f, 0x98, 0x86, 0xb4, 0xd8,
-		0x7c, 0x0d, 0x3e, 0x01, 0x63, 0x04, 0x01, 0xff,
-		0x16, 0x0f, 0x51, 0x5f, 0x73, 0x53, 0xf0, 0x3a,
-		0x38, 0xb4, 0x4d, 0x8d, 0xaf, 0xa3, 0xca, 0x2f,
-		0x6f, 0xdf, 0xc0, 0x41, 0x6c, 0x48, 0x60, 0x1a,
-		0xe4, 0xe7, 0x8a, 0x65, 0x6f, 0x8d, 0xd7, 0xe1,
-		0x10, 0xab, 0x78, 0x5b, 0xb9, 0x69, 0x1f, 0xe0,
-		0x5c, 0xf1, 0x19, 0x12, 0x21, 0xc7, 0x51, 0xbc,
-		0x61, 0x5f, 0xc0, 0x36, 0x17, 0xc0, 0x28, 0xd9,
-		0x51, 0xcb, 0x43, 0xd9, 0xfa, 0xd1, 0xad, 0x79,
-		0x69, 0x86, 0x49, 0xc5, 0xe5, 0x69, 0x27, 0xce,
-		0x22, 0xd0, 0xe1, 0x6a, 0xf9, 0x02, 0xca, 0x6c,
-		0x34, 0xc7, 0xb8, 0x02, 0xc1, 0x38, 0x7f, 0xd5,
-		0x15, 0xf5, 0xd6, 0xeb, 0xf9, 0x30, 0x40, 0x43,
-		0xea, 0x87, 0xde, 0x35, 0xf6, 0x83, 0x59, 0x09,
-		0x68, 0x62, 0x00, 0x87, 0xb8, 0xe7, 0xca, 0x05,
-		0x0f, 0xac, 0x42, 0x58, 0x45, 0xaa, 0xc9, 0x9b,
-		0xfd, 0x2a, 0xda, 0x65, 0x33, 0x93, 0x9d, 0xc6,
-		0x93, 0x8d, 0xe2, 0xc5, 0x71, 0xc1, 0x5c, 0x13,
-		0xde, 0x7b, 0xd4, 0xb9, 0x4c, 0x35, 0x61, 0x85,
-		0x90, 0x78, 0xf7, 0x81, 0x98, 0x45, 0x99, 0x24,
-		0x58, 0x73, 0x28, 0xf8, 0x31, 0xab, 0x54, 0x2e,
-		0xc0, 0x38, 0x77, 0x25, 0x5c, 0x06, 0x9c, 0xc3,
-		0x69, 0x21, 0x92, 0x76, 0xe1, 0x16, 0xdc, 0xa9,
-		0xee, 0xb6, 0x80, 0x66, 0x43, 0x11, 0x24, 0xb3,
-		0x07, 0x17, 0x89, 0x0f, 0xcb, 0xe0, 0x60, 0xa8,
-		0x9d, 0x06, 0x4b, 0x6e, 0x72, 0xb7, 0xbc, 0x4f,
-		0xb8, 0xc0, 0x80, 0xa2, 0xfb, 0x46, 0x5b, 0x8f,
-		0x11, 0x01, 0x92, 0x9d, 0x37, 0x09, 0x98, 0xc8,
-		0x0a, 0x46, 0xae, 0x12, 0xac, 0x61, 0x3f, 0xe7,
-		0x41, 0x1a, 0xaa, 0x2e, 0xdc, 0xd7, 0x2a, 0x47,
-		0xee, 0xdf, 0x08, 0xd1, 0xff, 0xea, 0x13, 0xc6,
-		0x05, 0xdb, 0x29, 0xcc, 0x03, 0xba, 0x7b, 0x6d,
-		0x40, 0xc1, 0xc9, 0x76, 0x75, 0x03, 0x7a, 0x71,
-		0xc9, 0x5f, 0xd9, 0xe0, 0x61, 0x69, 0x36, 0x8f,
-		0xb2, 0xbc, 0x28, 0xf3, 0x90, 0x71, 0xda, 0x5f,
-		0x08, 0xd5, 0x0d, 0xc1, 0xe6, 0xbd, 0x2b, 0xc6,
-		0x6c, 0x42, 0xfd, 0xbf, 0x10, 0xe8, 0x5f, 0x87,
-		0x3d, 0x21, 0x42, 0x85, 0x01, 0x0a, 0xbf, 0x8e,
-		0x49, 0xd3, 0x9c, 0x89, 0x3b, 0xea, 0xe1, 0xbf,
-		0xe9, 0x9b, 0x5e, 0x0e, 0xb8, 0xeb, 0xcd, 0x3a,
-		0xf6, 0x29, 0x41, 0x35, 0xdd, 0x9b, 0x13, 0x24,
-		0xe0, 0x1d, 0x8a, 0xcb, 0x20, 0xf8, 0x41, 0x51,
-		0x3e, 0x23, 0x8c, 0x67, 0x98, 0x39, 0x53, 0x77,
-		0x2a, 0x68, 0xf4, 0x3c, 0x7e, 0xd6, 0xc4, 0x6e,
-		0xf1, 0x53, 0xe9, 0xd8, 0x5c, 0xc1, 0xa9, 0x38,
-		0x6f, 0x5e, 0xe4, 0xd4, 0x29, 0x1c, 0x6c, 0xee,
-		0x2f, 0xea, 0xde, 0x61, 0x71, 0x5a, 0xea, 0xce,
-		0x23, 0x6e, 0x1b, 0x16, 0x43, 0xb7, 0xc0, 0xe3,
-		0x87, 0xa1, 0x95, 0x1e, 0x97, 0x4d, 0xea, 0xa6,
-		0xf7, 0x25, 0xac, 0x82, 0x2a, 0xd3, 0xa6, 0x99,
-		0x75, 0xdd, 0xc1, 0x55, 0x32, 0x6b, 0xea, 0x33,
-		0x88, 0xce, 0x06, 0xac, 0x15, 0x39, 0x19, 0xa3,
-		0x59, 0xaf, 0x7a, 0x1f, 0xd9, 0x72, 0x5e, 0xf7,
-		0x4c, 0xf3, 0x5d, 0x6b, 0xf2, 0x16, 0x92, 0xa8,
-		0x9e, 0x3d, 0xd4, 0x4c, 0x72, 0x55, 0x4e, 0x4a,
-		0xf7, 0x8b, 0x2f, 0x67, 0x5a, 0x90, 0xb7, 0xcf,
-		0x16, 0xd3, 0x7b, 0x5a, 0x9a, 0xc8, 0x9f, 0xbf,
-		0x01, 0x76, 0x3b, 0x86, 0x2c, 0x2a, 0x78, 0x10,
-		0x70, 0x05, 0x38, 0xf9, 0xdd, 0x2a, 0x1d, 0x00,
-		0x25, 0xb7, 0x10, 0xac, 0x3b, 0x3c, 0x4d, 0x3c,
-		0x01, 0x68, 0x3c, 0x5a, 0x29, 0xc2, 0xa0, 0x1b,
-		0x95, 0x67, 0xf9, 0x0a, 0x60, 0xb7, 0x11, 0x9c,
-		0x40, 0x45, 0xd7, 0xb0, 0xda, 0x49, 0x87, 0xcd,
-		0xb0, 0x9b, 0x61, 0x8c, 0xf4, 0x0d, 0x94, 0x1d,
-		0x79, 0x66, 0x13, 0x0b, 0xc6, 0x6b, 0x19, 0xee,
-		0xa0, 0x6b, 0x64, 0x7d, 0xc4, 0xff, 0x98, 0x72,
-		0x60, 0xab, 0x7f, 0x0f, 0x4d, 0x5d, 0x6b, 0xc3,
-		0xba, 0x5e, 0x0d, 0x04, 0xd9, 0x59, 0x17, 0xd0,
-		0x64, 0xbe, 0xfb, 0x58, 0xfc, 0xed, 0x18, 0xf6,
-		0xac, 0x19, 0xa4, 0xfd, 0x16, 0x59, 0x80, 0x58,
-		0xb8, 0x0f, 0x79, 0x24, 0x60, 0x18, 0x62, 0xa9,
-		0xa3, 0xa0, 0xe8, 0x81, 0xd6, 0xec, 0x5b, 0xfe,
-		0x5b, 0xb8, 0xa4, 0x00, 0xa9, 0xd0, 0x90, 0x17,
-		0xe5, 0x50, 0x3d, 0x2b, 0x12, 0x6e, 0x2a, 0x13,
-		0x65, 0x7c, 0xdf, 0xdf, 0xa7, 0xdd, 0x9f, 0x78,
-		0x5f, 0x8f, 0x4e, 0x90, 0xa6, 0x10, 0xe4, 0x7b,
-		0x68, 0x6b, 0xfd, 0xa9, 0x6d, 0x47, 0xfa, 0xec,
-		0x42, 0x35, 0x07, 0x12, 0x3e, 0x78, 0x23, 0x15,
-		0xff, 0xe2, 0x65, 0xc7, 0x47, 0x89, 0x2f, 0x97,
-		0x7c, 0xd7, 0x6b, 0x69, 0x35, 0x79, 0x6f, 0x85,
-		0xb4, 0xa9, 0x75, 0x04, 0x32, 0x9a, 0xfe, 0xf0,
-		0xce, 0xe3, 0xf1, 0xab, 0x15, 0x47, 0xe4, 0x9c,
-		0xc1, 0x48, 0x32, 0x3c, 0xbe, 0x44, 0x72, 0xc9,
-		0xaa, 0x50, 0x37, 0xa6, 0xbe, 0x41, 0xcf, 0xe8,
-		0x17, 0x4e, 0x37, 0xbe, 0xf1, 0x34, 0x2c, 0xd9,
-		0x60, 0x48, 0x09, 0xa5, 0x26, 0x00, 0x31, 0x77,
-		0x4e, 0xac, 0x7c, 0x89, 0x75, 0xe3, 0xde, 0x26,
-		0x4c, 0x32, 0x54, 0x27, 0x8e, 0x92, 0x26, 0x42,
-		0x85, 0x76, 0x01, 0x76, 0x62, 0x4c, 0x29, 0xe9,
-		0x38, 0x05, 0x51, 0x54, 0x97, 0xa3, 0x03, 0x59,
-		0x5e, 0xec, 0x0c, 0xe4, 0x96, 0xb7, 0x15, 0xa8,
-		0x41, 0x06, 0x2b, 0x78, 0x95, 0x24, 0xf6, 0x32,
-		0xc5, 0xec, 0xd7, 0x89, 0x28, 0x1e, 0xec, 0xb1,
-		0xc7, 0x21, 0x0c, 0xd3, 0x80, 0x7c, 0x5a, 0xe6,
-		0xb1, 0x3a, 0x52, 0x33, 0x84, 0x4e, 0x32, 0x6e,
-		0x7a, 0xf6, 0x43, 0x15, 0x5b, 0xa6, 0xba, 0xeb,
-		0xa8, 0xe4, 0xff, 0x4f, 0xbd, 0xbd, 0xa8, 0x5e,
-		0xbe, 0x27, 0xaf, 0xc5, 0xf7, 0x9e, 0xdf, 0x48,
-		0x22, 0xca, 0x6a, 0x0b, 0x3c, 0xd7, 0xe0, 0xdc,
-		0xf3, 0x71, 0x08, 0xdc, 0x28, 0x13, 0x08, 0xf2,
-		0x08, 0x1d, 0x9d, 0x7b, 0xd9, 0xde, 0x6f, 0xe6,
-		0xe8, 0x88, 0x18, 0xc2, 0xcd, 0x93, 0xc5, 0x38,
-		0x21, 0x68, 0x4c, 0x9a, 0xfb, 0xb6, 0x18, 0x16,
-		0x73, 0x2c, 0x1d, 0x6f, 0x95, 0xfb, 0x65, 0x4f,
-		0x7c, 0xec, 0x8d, 0x6c, 0xa8, 0xc0, 0x55, 0x28,
-		0xc6, 0xc3, 0xea, 0xeb, 0x05, 0xf5, 0x65, 0xeb,
-		0x53, 0xe1, 0x54, 0xef, 0xb8, 0x64, 0x98, 0x2d,
-		0x98, 0x9e, 0xc8, 0xfe, 0xa2, 0x07, 0x30, 0xf7,
-		0xf7, 0xae, 0xdb, 0x32, 0xf8, 0x71, 0x9d, 0x06,
-		0xdf, 0x9b, 0xda, 0x61, 0x7d, 0xdb, 0xae, 0x06,
-		0x24, 0x63, 0x74, 0xb6, 0xf3, 0x1b, 0x66, 0x09,
-		0x60, 0xff, 0x2b, 0x29, 0xf5, 0xa9, 0x9d, 0x61,
-		0x5d, 0x55, 0x10, 0x82, 0x21, 0xbb, 0x64, 0x0d,
-		0xef, 0x5c, 0xe3, 0x30, 0x1b, 0x60, 0x1e, 0x5b,
-		0xfe, 0x6c, 0xf5, 0x15, 0xa3, 0x86, 0x27, 0x58,
-		0x46, 0x00, 0x20, 0xcb, 0x86, 0x9a, 0x52, 0x29,
-		0x20, 0x68, 0x4d, 0x67, 0x88, 0x70, 0xc2, 0x31,
-		0xd8, 0xbb, 0xa5, 0xa7, 0x88, 0x7f, 0x66, 0xbc,
-		0xaa, 0x0f, 0xe1, 0x78, 0x7b, 0x97, 0x3c, 0xb7,
-		0xd7, 0xd8, 0x04, 0xe0, 0x09, 0x60, 0xc8, 0xd0,
-		0x9e, 0xe5, 0x6b, 0x31, 0x7f, 0x88, 0xfe, 0xc3,
-		0xfd, 0x89, 0xec, 0x76, 0x4b, 0xb3, 0xa7, 0x37,
-		0x03, 0xb7, 0xc6, 0x10, 0x7c, 0x9d, 0x0c, 0x75,
-		0xd3, 0x08, 0x14, 0x94, 0x03, 0x42, 0x25, 0x26,
-		0x85, 0xf7, 0xf0, 0x90, 0x06, 0x3e, 0x6f, 0x60,
-		0x52, 0x55, 0xd5, 0x0f, 0x79, 0x64, 0x69, 0x69,
-		0x46, 0xf9, 0x7f, 0x7f, 0x03, 0xf1, 0x1f, 0xdb,
-		0x39, 0x05, 0xba, 0x4a, 0x8f, 0x17, 0xe7, 0xba,
-		0xe2, 0x07, 0x7c, 0x1d, 0x9e, 0xbc, 0x94, 0xc0,
-		0x61, 0x59, 0x8e, 0x72, 0xaf, 0xfc, 0x99, 0xe4,
-		0xd5, 0xa8, 0xee, 0x0a, 0x48, 0x2d, 0x82, 0x8b,
-		0x34, 0x54, 0x8a, 0xce, 0xc7, 0xfa, 0xdd, 0xba,
-		0x54, 0xdf, 0xb3, 0x30, 0x33, 0x73, 0x2e, 0xd5,
-		0x52, 0xab, 0x49, 0x91, 0x4e, 0x0a, 0xd6, 0x2f,
-		0x67, 0xe4, 0xdd, 0x64, 0x48, 0x16, 0xd9, 0x85,
-		0xaa, 0x52, 0xa5, 0x0b, 0xd3, 0xb4, 0x2d, 0x77,
-		0x5e, 0x52, 0x77, 0x17, 0xcf, 0xbe, 0x88, 0x04,
-		0x01, 0x52, 0xe2, 0xf1, 0x46, 0xe2, 0x91, 0x30,
-		0x65, 0xcf, 0xc0, 0x65, 0x45, 0xc3, 0x7e, 0xf4,
-		0x2e, 0xb5, 0xaf, 0x6f, 0xab, 0x1a, 0xfa, 0x70,
-		0x35, 0xb8, 0x4f, 0x2d, 0x78, 0x90, 0x33, 0xb5,
-		0x9a, 0x67, 0xdb, 0x2f, 0x28, 0x32, 0xb6, 0x54,
-		0xab, 0x4c, 0x6b, 0x85, 0xed, 0x6c, 0x3e, 0x05,
-		0x2a, 0xc7, 0x32, 0xe8, 0xf5, 0xa3, 0x7b, 0x4e,
-		0x7b, 0x58, 0x24, 0x73, 0xf7, 0xfd, 0xc7, 0xc8,
-		0x6c, 0x71, 0x68, 0xb1, 0xf6, 0xc5, 0x9e, 0x1e,
-		0xe3, 0x5c, 0x25, 0xc0, 0x5b, 0x3e, 0x59, 0xa1,
-		0x18, 0x5a, 0xe8, 0xb5, 0xd1, 0x44, 0x13, 0xa3,
-		0xe6, 0x05, 0x76, 0xd2, 0x8d, 0x6e, 0x54, 0x68,
-		0x0c, 0xa4, 0x7b, 0x8b, 0xd3, 0x8c, 0x42, 0x13,
-		0x87, 0xda, 0xdf, 0x8f, 0xa5, 0x83, 0x7a, 0x42,
-		0x99, 0xb7, 0xeb, 0xe2, 0x79, 0xe0, 0xdb, 0xda,
-		0x33, 0xa8, 0x50, 0x3a, 0xd7, 0xe7, 0xd3, 0x61,
-		0x18, 0xb8, 0xaa, 0x2d, 0xc8, 0xd8, 0x2c, 0x28,
-		0xe5, 0x97, 0x0a, 0x7c, 0x6c, 0x7f, 0x09, 0xd7,
-		0x88, 0x80, 0xac, 0x12, 0xed, 0xf8, 0xc6, 0xb5,
-		0x2d, 0xd6, 0x63, 0x9b, 0x98, 0x35, 0x26, 0xde,
-		0xf6, 0x31, 0xee, 0x7e, 0xa0, 0xfb, 0x16, 0x98,
-		0xb1, 0x96, 0x1d, 0xee, 0xe3, 0x2f, 0xfb, 0x41,
-		0xdd, 0xea, 0x10, 0x1e, 0x03, 0x89, 0x18, 0xd2,
-		0x47, 0x0c, 0xa0, 0x57, 0xda, 0x76, 0x3a, 0x37,
-		0x2c, 0xe4, 0xf9, 0x77, 0xc8, 0x43, 0x5f, 0xcb,
-		0xd6, 0x85, 0xf7, 0x22, 0xe4, 0x32, 0x25, 0xa8,
-		0xdc, 0x21, 0xc0, 0xf5, 0x95, 0xb2, 0xf8, 0x83,
-		0xf0, 0x65, 0x61, 0x15, 0x48, 0x94, 0xb7, 0x03,
-		0x7f, 0x66, 0xa1, 0x39, 0x1f, 0xdd, 0xce, 0x96,
-		0xfe, 0x58, 0x81, 0x3d, 0x41, 0x11, 0x87, 0x13,
-		0x26, 0x1b, 0x6d, 0xf3, 0xca, 0x2e, 0x2c, 0x76,
-		0xd3, 0x2f, 0x6d, 0x49, 0x70, 0x53, 0x05, 0x96,
-		0xcc, 0x30, 0x2b, 0x83, 0xf2, 0xc6, 0xb2, 0x4b,
-		0x22, 0x13, 0x95, 0x42, 0xeb, 0x56, 0x4d, 0x22,
-		0xe6, 0x43, 0x6f, 0xba, 0xe7, 0x3b, 0xe5, 0x59,
-		0xce, 0x57, 0x88, 0x85, 0xb6, 0xbf, 0x15, 0x37,
-		0xb3, 0x7a, 0x7e, 0xc4, 0xbc, 0x99, 0xfc, 0xe4,
-		0x89, 0x00, 0x68, 0x39, 0xbc, 0x5a, 0xba, 0xab,
-		0x52, 0xab, 0xe6, 0x81, 0xfd, 0x93, 0x62, 0xe9,
-		0xb7, 0x12, 0xd1, 0x18, 0x1a, 0xb9, 0x55, 0x4a,
-		0x0f, 0xae, 0x35, 0x11, 0x04, 0x27, 0xf3, 0x42,
-		0x4e, 0xca, 0xdf, 0x9f, 0x12, 0x62, 0xea, 0x03,
-		0xc0, 0xa9, 0x22, 0x7b, 0x6c, 0x6c, 0xe3, 0xdf,
-		0x16, 0xad, 0x03, 0xc9, 0xfe, 0xa4, 0xdd, 0x4f
-};
-
-static const uint8_t AES_CBC_ciphertext_1792B[] = {
-		0x59, 0xcc, 0xfe, 0x8f, 0xb4, 0x9d, 0x0e, 0xd1,
-		0x85, 0xfc, 0x9b, 0x43, 0xc1, 0xb7, 0x54, 0x67,
-		0x01, 0xef, 0xb8, 0x71, 0x36, 0xdb, 0x50, 0x48,
-		0x7a, 0xea, 0xcf, 0xce, 0xba, 0x30, 0x10, 0x2e,
-		0x96, 0x2b, 0xfd, 0xcf, 0x00, 0xe3, 0x1f, 0xac,
-		0x66, 0x14, 0x30, 0x86, 0x49, 0xdb, 0x01, 0x8b,
-		0x07, 0xdd, 0x00, 0x9d, 0x0d, 0x5c, 0x19, 0x11,
-		0xe8, 0x44, 0x2b, 0x25, 0x70, 0xed, 0x7c, 0x33,
-		0x0d, 0xe3, 0x34, 0x93, 0x63, 0xad, 0x26, 0xb1,
-		0x11, 0x91, 0x34, 0x2e, 0x1d, 0x50, 0xaa, 0xd4,
-		0xef, 0x3a, 0x6d, 0xd7, 0x33, 0x20, 0x0d, 0x3f,
-		0x9b, 0xdd, 0xc3, 0xa5, 0xc5, 0xf1, 0x99, 0xdc,
-		0xea, 0x52, 0xda, 0x55, 0xea, 0xa2, 0x7a, 0xc5,
-		0x78, 0x44, 0x4a, 0x02, 0x33, 0x19, 0x62, 0x37,
-		0xf8, 0x8b, 0xd1, 0x0c, 0x21, 0xdf, 0x40, 0x19,
-		0x81, 0xea, 0xfb, 0x1c, 0xa7, 0xcc, 0x60, 0xfe,
-		0x63, 0x25, 0x8f, 0xf3, 0x73, 0x0f, 0x45, 0xe6,
-		0x6a, 0x18, 0xbf, 0xbe, 0xad, 0x92, 0x2a, 0x1e,
-		0x15, 0x65, 0x6f, 0xef, 0x92, 0xcd, 0x0e, 0x19,
-		0x3d, 0x42, 0xa8, 0xfc, 0x0d, 0x32, 0x58, 0xe0,
-		0x56, 0x9f, 0xd6, 0x9b, 0x8b, 0xec, 0xe0, 0x45,
-		0x4d, 0x7e, 0x73, 0x87, 0xff, 0x74, 0x92, 0x59,
-		0x60, 0x13, 0x93, 0xda, 0xec, 0xbf, 0xfa, 0x20,
-		0xb6, 0xe7, 0xdf, 0xc7, 0x10, 0xf5, 0x79, 0xb4,
-		0xd7, 0xac, 0xaf, 0x2b, 0x37, 0x52, 0x30, 0x1d,
-		0xbe, 0x0f, 0x60, 0x77, 0x3d, 0x03, 0x63, 0xa9,
-		0xae, 0xb1, 0xf3, 0xca, 0xca, 0xb4, 0x21, 0xd7,
-		0x6f, 0x2e, 0x5e, 0x9b, 0x68, 0x53, 0x80, 0xab,
-		0x30, 0x23, 0x0a, 0x72, 0x6b, 0xb1, 0xd8, 0x25,
-		0x5d, 0x3a, 0x62, 0x9b, 0x4f, 0x59, 0x3b, 0x79,
-		0xa8, 0x9e, 0x08, 0x6d, 0x37, 0xb0, 0xfc, 0x42,
-		0x51, 0x25, 0x86, 0xbd, 0x54, 0x5a, 0x95, 0x20,
-		0x6c, 0xac, 0xb9, 0x30, 0x1c, 0x03, 0xc9, 0x49,
-		0x38, 0x55, 0x31, 0x49, 0xed, 0xa9, 0x0e, 0xc3,
-		0x65, 0xb4, 0x68, 0x6b, 0x07, 0x4c, 0x0a, 0xf9,
-		0x21, 0x69, 0x7c, 0x9f, 0x28, 0x80, 0xe9, 0x49,
-		0x22, 0x7c, 0xec, 0x97, 0xf7, 0x70, 0xb4, 0xb8,
-		0x25, 0xe7, 0x80, 0x2c, 0x43, 0x24, 0x8a, 0x2e,
-		0xac, 0xa2, 0x84, 0x20, 0xe7, 0xf4, 0x6b, 0x86,
-		0x37, 0x05, 0xc7, 0x59, 0x04, 0x49, 0x2a, 0x99,
-		0x80, 0x46, 0x32, 0x19, 0xe6, 0x30, 0xce, 0xc0,
-		0xef, 0x6e, 0xec, 0xe5, 0x2f, 0x24, 0xc1, 0x78,
-		0x45, 0x02, 0xd3, 0x64, 0x99, 0xf5, 0xc7, 0xbc,
-		0x8f, 0x8c, 0x75, 0xb1, 0x0a, 0xc8, 0xc3, 0xbd,
-		0x5e, 0x7e, 0xbd, 0x0e, 0xdf, 0x4b, 0x96, 0x6a,
-		0xfd, 0x03, 0xdb, 0xd1, 0x31, 0x1e, 0x27, 0xf9,
-		0xe5, 0x83, 0x9a, 0xfc, 0x13, 0x4c, 0xd3, 0x04,
-		0xdb, 0xdb, 0x3f, 0x35, 0x93, 0x4e, 0x14, 0x6b,
-		0x00, 0x5c, 0xb6, 0x11, 0x50, 0xee, 0x61, 0x5c,
-		0x10, 0x5c, 0xd0, 0x90, 0x02, 0x2e, 0x12, 0xe0,
-		0x50, 0x44, 0xad, 0x75, 0xcd, 0x94, 0xcf, 0x92,
-		0xcb, 0xe3, 0xe8, 0x77, 0x4b, 0xd7, 0x1a, 0x7c,
-		0xdd, 0x6b, 0x49, 0x21, 0x7c, 0xe8, 0x2c, 0x25,
-		0x49, 0x86, 0x1e, 0x54, 0xae, 0xfc, 0x0e, 0x80,
-		0xb1, 0xd5, 0xa5, 0x23, 0xcf, 0xcc, 0x0e, 0x11,
-		0xe2, 0x7c, 0x3c, 0x25, 0x78, 0x64, 0x03, 0xa1,
-		0xdd, 0x9f, 0x74, 0x12, 0x7b, 0x21, 0xb5, 0x73,
-		0x15, 0x3c, 0xed, 0xad, 0x07, 0x62, 0x21, 0x79,
-		0xd4, 0x2f, 0x0d, 0x72, 0xe9, 0x7c, 0x6b, 0x96,
-		0x6e, 0xe5, 0x36, 0x4a, 0xd2, 0x38, 0xe1, 0xff,
-		0x6e, 0x26, 0xa4, 0xac, 0x83, 0x07, 0xe6, 0x67,
-		0x74, 0x6c, 0xec, 0x8b, 0x4b, 0x79, 0x33, 0x50,
-		0x2f, 0x8f, 0xa0, 0x8f, 0xfa, 0x38, 0x6a, 0xa2,
-		0x3a, 0x42, 0x85, 0x15, 0x90, 0xd0, 0xb3, 0x0d,
-		0x8a, 0xe4, 0x60, 0x03, 0xef, 0xf9, 0x65, 0x8a,
-		0x4e, 0x50, 0x8c, 0x65, 0xba, 0x61, 0x16, 0xc3,
-		0x93, 0xb7, 0x75, 0x21, 0x98, 0x25, 0x60, 0x6e,
-		0x3d, 0x68, 0xba, 0x7c, 0xe4, 0xf3, 0xd9, 0x9b,
-		0xfb, 0x7a, 0xed, 0x1f, 0xb3, 0x4b, 0x88, 0x74,
-		0x2c, 0xb8, 0x8c, 0x22, 0x95, 0xce, 0x90, 0xf1,
-		0xdb, 0x80, 0xa6, 0x39, 0xae, 0x82, 0xa1, 0xef,
-		0x75, 0xec, 0xfe, 0xf1, 0xe8, 0x04, 0xfd, 0x99,
-		0x1b, 0x5f, 0x45, 0x87, 0x4f, 0xfa, 0xa2, 0x3e,
-		0x3e, 0xb5, 0x01, 0x4b, 0x46, 0xeb, 0x13, 0x9a,
-		0xe4, 0x7d, 0x03, 0x87, 0xb1, 0x59, 0x91, 0x8e,
-		0x37, 0xd3, 0x16, 0xce, 0xef, 0x4b, 0xe9, 0x46,
-		0x8d, 0x2a, 0x50, 0x2f, 0x41, 0xd3, 0x7b, 0xcf,
-		0xf0, 0xb7, 0x8b, 0x65, 0x0f, 0xa3, 0x27, 0x10,
-		0xe9, 0xa9, 0xe9, 0x2c, 0xbe, 0xbb, 0x82, 0xe3,
-		0x7b, 0x0b, 0x81, 0x3e, 0xa4, 0x6a, 0x4f, 0x3b,
-		0xd5, 0x61, 0xf8, 0x47, 0x04, 0x99, 0x5b, 0xff,
-		0xf3, 0x14, 0x6e, 0x57, 0x5b, 0xbf, 0x1b, 0xb4,
-		0x3f, 0xf9, 0x31, 0xf6, 0x95, 0xd5, 0x10, 0xa9,
-		0x72, 0x28, 0x23, 0xa9, 0x6a, 0xa2, 0xcf, 0x7d,
-		0xe3, 0x18, 0x95, 0xda, 0xbc, 0x6f, 0xe9, 0xd8,
-		0xef, 0x49, 0x3f, 0xd3, 0xef, 0x1f, 0xe1, 0x50,
-		0xe8, 0x8a, 0xc0, 0xce, 0xcc, 0xb7, 0x5e, 0x0e,
-		0x8b, 0x95, 0x80, 0xfd, 0x58, 0x2a, 0x9b, 0xc8,
-		0xb4, 0x17, 0x04, 0x46, 0x74, 0xd4, 0x68, 0x91,
-		0x33, 0xc8, 0x31, 0x15, 0x84, 0x16, 0x35, 0x03,
-		0x64, 0x6d, 0xa9, 0x4e, 0x20, 0xeb, 0xa9, 0x3f,
-		0x21, 0x5e, 0x9b, 0x09, 0xc3, 0x45, 0xf8, 0x7c,
-		0x59, 0x62, 0x29, 0x9a, 0x5c, 0xcf, 0xb4, 0x27,
-		0x5e, 0x13, 0xea, 0xb3, 0xef, 0xd9, 0x01, 0x2a,
-		0x65, 0x5f, 0x14, 0xf4, 0xbf, 0x28, 0x89, 0x3d,
-		0xdd, 0x9d, 0x52, 0xbd, 0x9e, 0x5b, 0x3b, 0xd2,
-		0xc2, 0x81, 0x35, 0xb6, 0xac, 0xdd, 0x27, 0xc3,
-		0x7b, 0x01, 0x5a, 0x6d, 0x4c, 0x5e, 0x2c, 0x30,
-		0xcb, 0x3a, 0xfa, 0xc1, 0xd7, 0x31, 0x67, 0x3e,
-		0x08, 0x6a, 0xe8, 0x8c, 0x75, 0xac, 0x1a, 0x6a,
-		0x52, 0xf7, 0x51, 0xcd, 0x85, 0x3f, 0x3c, 0xa7,
-		0xea, 0xbc, 0xd7, 0x18, 0x9e, 0x27, 0x73, 0xe6,
-		0x2b, 0x58, 0xb6, 0xd2, 0x29, 0x68, 0xd5, 0x8f,
-		0x00, 0x4d, 0x55, 0xf6, 0x61, 0x5a, 0xcc, 0x51,
-		0xa6, 0x5e, 0x85, 0xcb, 0x0b, 0xfd, 0x06, 0xca,
-		0xf5, 0xbf, 0x0d, 0x13, 0x74, 0x78, 0x6d, 0x9e,
-		0x20, 0x11, 0x84, 0x3e, 0x78, 0x17, 0x04, 0x4f,
-		0x64, 0x2c, 0x3b, 0x3e, 0x93, 0x7b, 0x58, 0x33,
-		0x07, 0x52, 0xf7, 0x60, 0x6a, 0xa8, 0x3b, 0x19,
-		0x27, 0x7a, 0x93, 0xc5, 0x53, 0xad, 0xec, 0xf6,
-		0xc8, 0x94, 0xee, 0x92, 0xea, 0xee, 0x7e, 0xea,
-		0xb9, 0x5f, 0xac, 0x59, 0x5d, 0x2e, 0x78, 0x53,
-		0x72, 0x81, 0x92, 0xdd, 0x1c, 0x63, 0xbe, 0x02,
-		0xeb, 0xa8, 0x1b, 0x2a, 0x6e, 0x72, 0xe3, 0x2d,
-		0x84, 0x0d, 0x8a, 0x22, 0xf6, 0xba, 0xab, 0x04,
-		0x8e, 0x04, 0x24, 0xdb, 0xcc, 0xe2, 0x69, 0xeb,
-		0x4e, 0xfa, 0x6b, 0x5b, 0xc8, 0xc0, 0xd9, 0x25,
-		0xcb, 0x40, 0x8d, 0x4b, 0x8e, 0xa0, 0xd4, 0x72,
-		0x98, 0x36, 0x46, 0x3b, 0x4f, 0x5f, 0x96, 0x84,
-		0x03, 0x28, 0x86, 0x4d, 0xa1, 0x8a, 0xd7, 0xb2,
-		0x5b, 0x27, 0x01, 0x80, 0x62, 0x49, 0x56, 0xb9,
-		0xa0, 0xa1, 0xe3, 0x6e, 0x22, 0x2a, 0x5d, 0x03,
-		0x86, 0x40, 0x36, 0x22, 0x5e, 0xd2, 0xe5, 0xc0,
-		0x6b, 0xfa, 0xac, 0x80, 0x4e, 0x09, 0x99, 0xbc,
-		0x2f, 0x9b, 0xcc, 0xf3, 0x4e, 0xf7, 0x99, 0x98,
-		0x11, 0x6e, 0x6f, 0x62, 0x22, 0x6b, 0x92, 0x95,
-		0x3b, 0xc3, 0xd2, 0x8e, 0x0f, 0x07, 0xc2, 0x51,
-		0x5c, 0x4d, 0xb2, 0x6e, 0xc0, 0x27, 0x73, 0xcd,
-		0x57, 0xb7, 0xf0, 0xe9, 0x2e, 0xc8, 0xe2, 0x0c,
-		0xd1, 0xb5, 0x0f, 0xff, 0xf9, 0xec, 0x38, 0xba,
-		0x97, 0xd6, 0x94, 0x9b, 0xd1, 0x79, 0xb6, 0x6a,
-		0x01, 0x17, 0xe4, 0x7e, 0xa6, 0xd5, 0x86, 0x19,
-		0xae, 0xf3, 0xf0, 0x62, 0x73, 0xc0, 0xf0, 0x0a,
-		0x7a, 0x96, 0x93, 0x72, 0x89, 0x7e, 0x25, 0x57,
-		0xf8, 0xf7, 0xd5, 0x1e, 0xe5, 0xac, 0xd6, 0x38,
-		0x4f, 0xe8, 0x81, 0xd1, 0x53, 0x41, 0x07, 0x2d,
-		0x58, 0x34, 0x1c, 0xef, 0x74, 0x2e, 0x61, 0xca,
-		0xd3, 0xeb, 0xd6, 0x93, 0x0a, 0xf2, 0xf2, 0x86,
-		0x9c, 0xe3, 0x7a, 0x52, 0xf5, 0x42, 0xf1, 0x8b,
-		0x10, 0xf2, 0x25, 0x68, 0x7e, 0x61, 0xb1, 0x19,
-		0xcf, 0x8f, 0x5a, 0x53, 0xb7, 0x68, 0x4f, 0x1a,
-		0x71, 0xe9, 0x83, 0x91, 0x3a, 0x78, 0x0f, 0xf7,
-		0xd4, 0x74, 0xf5, 0x06, 0xd2, 0x88, 0xb0, 0x06,
-		0xe5, 0xc0, 0xfb, 0xb3, 0x91, 0xad, 0xc0, 0x84,
-		0x31, 0xf2, 0x3a, 0xcf, 0x63, 0xe6, 0x4a, 0xd3,
-		0x78, 0xbe, 0xde, 0x73, 0x3e, 0x02, 0x8e, 0xb8,
-		0x3a, 0xf6, 0x55, 0xa7, 0xf8, 0x5a, 0xb5, 0x0e,
-		0x0c, 0xc5, 0xe5, 0x66, 0xd5, 0xd2, 0x18, 0xf3,
-		0xef, 0xa5, 0xc9, 0x68, 0x69, 0xe0, 0xcd, 0x00,
-		0x33, 0x99, 0x6e, 0xea, 0xcb, 0x06, 0x7a, 0xe1,
-		0xe1, 0x19, 0x0b, 0xe7, 0x08, 0xcd, 0x09, 0x1b,
-		0x85, 0xec, 0xc4, 0xd4, 0x75, 0xf0, 0xd6, 0xfb,
-		0x84, 0x95, 0x07, 0x44, 0xca, 0xa5, 0x2a, 0x6c,
-		0xc2, 0x00, 0x58, 0x08, 0x87, 0x9e, 0x0a, 0xd4,
-		0x06, 0xe2, 0x91, 0x5f, 0xb7, 0x1b, 0x11, 0xfa,
-		0x85, 0xfc, 0x7c, 0xf2, 0x0f, 0x6e, 0x3c, 0x8a,
-		0xe1, 0x0f, 0xa0, 0x33, 0x84, 0xce, 0x81, 0x4d,
-		0x32, 0x4d, 0xeb, 0x41, 0xcf, 0x5a, 0x05, 0x60,
-		0x47, 0x6c, 0x2a, 0xc4, 0x17, 0xd5, 0x16, 0x3a,
-		0xe4, 0xe7, 0xab, 0x84, 0x94, 0x22, 0xff, 0x56,
-		0xb0, 0x0c, 0x92, 0x6c, 0x19, 0x11, 0x4c, 0xb3,
-		0xed, 0x58, 0x48, 0x84, 0x2a, 0xe2, 0x19, 0x2a,
-		0xe1, 0xc0, 0x56, 0x82, 0x3c, 0x83, 0xb4, 0x58,
-		0x2d, 0xf0, 0xb5, 0x1e, 0x76, 0x85, 0x51, 0xc2,
-		0xe4, 0x95, 0x27, 0x96, 0xd1, 0x90, 0xc3, 0x17,
-		0x75, 0xa1, 0xbb, 0x46, 0x5f, 0xa6, 0xf2, 0xef,
-		0x71, 0x56, 0x92, 0xc5, 0x8a, 0x85, 0x52, 0xe4,
-		0x63, 0x21, 0x6f, 0x55, 0x85, 0x2b, 0x6b, 0x0d,
-		0xc9, 0x92, 0x77, 0x67, 0xe3, 0xff, 0x2a, 0x2b,
-		0x90, 0x01, 0x3d, 0x74, 0x63, 0x04, 0x61, 0x3c,
-		0x8e, 0xf8, 0xfc, 0x04, 0xdd, 0x21, 0x85, 0x92,
-		0x1e, 0x4d, 0x51, 0x8d, 0xb5, 0x6b, 0xf1, 0xda,
-		0x96, 0xf5, 0x8e, 0x3c, 0x38, 0x5a, 0xac, 0x9b,
-		0xba, 0x0c, 0x84, 0x5d, 0x50, 0x12, 0xc7, 0xc5,
-		0x7a, 0xcb, 0xb1, 0xfa, 0x16, 0x93, 0xdf, 0x98,
-		0xda, 0x3f, 0x49, 0xa3, 0x94, 0x78, 0x70, 0xc7,
-		0x0b, 0xb6, 0x91, 0xa6, 0x16, 0x2e, 0xcf, 0xfd,
-		0x51, 0x6a, 0x5b, 0xad, 0x7a, 0xdd, 0xa9, 0x48,
-		0x48, 0xac, 0xd6, 0x45, 0xbc, 0x23, 0x31, 0x1d,
-		0x86, 0x54, 0x8a, 0x7f, 0x04, 0x97, 0x71, 0x9e,
-		0xbc, 0x2e, 0x6b, 0xd9, 0x33, 0xc8, 0x20, 0xc9,
-		0xe0, 0x25, 0x86, 0x59, 0x15, 0xcf, 0x63, 0xe5,
-		0x99, 0xf1, 0x24, 0xf1, 0xba, 0xc4, 0x15, 0x02,
-		0xe2, 0xdb, 0xfe, 0x4a, 0xf8, 0x3b, 0x91, 0x13,
-		0x8d, 0x03, 0x81, 0x9f, 0xb3, 0x3f, 0x04, 0x03,
-		0x58, 0xc0, 0xef, 0x27, 0x82, 0x14, 0xd2, 0x7f,
-		0x93, 0x70, 0xb7, 0xb2, 0x02, 0x21, 0xb3, 0x07,
-		0x7f, 0x1c, 0xef, 0x88, 0xee, 0x29, 0x7a, 0x0b,
-		0x3d, 0x75, 0x5a, 0x93, 0xfe, 0x7f, 0x14, 0xf7,
-		0x4e, 0x4b, 0x7f, 0x21, 0x02, 0xad, 0xf9, 0x43,
-		0x29, 0x1a, 0xe8, 0x1b, 0xf5, 0x32, 0xb2, 0x96,
-		0xe6, 0xe8, 0x96, 0x20, 0x9b, 0x96, 0x8e, 0x7b,
-		0xfe, 0xd8, 0xc9, 0x9c, 0x65, 0x16, 0xd6, 0x68,
-		0x95, 0xf8, 0x22, 0xe2, 0xae, 0x84, 0x03, 0xfd,
-		0x87, 0xa2, 0x72, 0x79, 0x74, 0x95, 0xfa, 0xe1,
-		0xfe, 0xd0, 0x4e, 0x3d, 0x39, 0x2e, 0x67, 0x55,
-		0x71, 0x6c, 0x89, 0x33, 0x49, 0x0c, 0x1b, 0x46,
-		0x92, 0x31, 0x6f, 0xa6, 0xf0, 0x09, 0xbd, 0x2d,
-		0xe2, 0xca, 0xda, 0x18, 0x33, 0xce, 0x67, 0x37,
-		0xfd, 0x6f, 0xcb, 0x9d, 0xbd, 0x42, 0xbc, 0xb2,
-		0x9c, 0x28, 0xcd, 0x65, 0x3c, 0x61, 0xbc, 0xde,
-		0x9d, 0xe1, 0x2a, 0x3e, 0xbf, 0xee, 0x3c, 0xcb,
-		0xb1, 0x50, 0xa9, 0x2c, 0xbe, 0xb5, 0x43, 0xd0,
-		0xec, 0x29, 0xf9, 0x16, 0x6f, 0x31, 0xd9, 0x9b,
-		0x92, 0xb1, 0x32, 0xae, 0x0f, 0xb6, 0x9d, 0x0e,
-		0x25, 0x7f, 0x89, 0x1f, 0x1d, 0x01, 0x68, 0xab,
-		0x3d, 0xd1, 0x74, 0x5b, 0x4c, 0x38, 0x7f, 0x3d,
-		0x33, 0xa5, 0xa2, 0x9f, 0xda, 0x84, 0xa5, 0x82,
-		0x2d, 0x16, 0x66, 0x46, 0x08, 0x30, 0x14, 0x48,
-		0x5e, 0xca, 0xe3, 0xf4, 0x8c, 0xcb, 0x32, 0xc6,
-		0xf1, 0x43, 0x62, 0xc6, 0xef, 0x16, 0xfa, 0x43,
-		0xae, 0x9c, 0x53, 0xe3, 0x49, 0x45, 0x80, 0xfd,
-		0x1d, 0x8c, 0xa9, 0x6d, 0x77, 0x76, 0xaa, 0x40,
-		0xc4, 0x4e, 0x7b, 0x78, 0x6b, 0xe0, 0x1d, 0xce,
-		0x56, 0x3d, 0xf0, 0x11, 0xfe, 0x4f, 0x6a, 0x6d,
-		0x0f, 0x4f, 0x90, 0x38, 0x92, 0x17, 0xfa, 0x56,
-		0x12, 0xa6, 0xa1, 0x0a, 0xea, 0x2f, 0x50, 0xf9,
-		0x60, 0x66, 0x6c, 0x7d, 0x5a, 0x08, 0x8e, 0x3c,
-		0xf3, 0xf0, 0x33, 0x02, 0x11, 0x02, 0xfe, 0x4c,
-		0x56, 0x2b, 0x9f, 0x0c, 0xbd, 0x65, 0x8a, 0x83,
-		0xde, 0x7c, 0x05, 0x26, 0x93, 0x19, 0xcc, 0xf3,
-		0x71, 0x0e, 0xad, 0x2f, 0xb3, 0xc9, 0x38, 0x50,
-		0x64, 0xd5, 0x4c, 0x60, 0x5f, 0x02, 0x13, 0x34,
-		0xc9, 0x75, 0xc4, 0x60, 0xab, 0x2e, 0x17, 0x7d
-};
-
-static const uint8_t AES_CBC_ciphertext_2048B[] = {
-		0x8b, 0x55, 0xbd, 0xfd, 0x2b, 0x35, 0x76, 0x5c,
-		0xd1, 0x90, 0xd7, 0x6a, 0x63, 0x1e, 0x39, 0x71,
-		0x0d, 0x5c, 0xd8, 0x03, 0x00, 0x75, 0xf1, 0x07,
-		0x03, 0x8d, 0x76, 0xeb, 0x3b, 0x00, 0x1e, 0x33,
-		0x88, 0xfc, 0x8f, 0x08, 0x4d, 0x33, 0xf1, 0x3c,
-		0xee, 0xd0, 0x5d, 0x19, 0x8b, 0x3c, 0x50, 0x86,
-		0xfd, 0x8d, 0x58, 0x21, 0xb4, 0xae, 0x0f, 0x81,
-		0xe9, 0x9f, 0xc9, 0xc0, 0x90, 0xf7, 0x04, 0x6f,
-		0x39, 0x1d, 0x8a, 0x3f, 0x8d, 0x32, 0x23, 0xb5,
-		0x1f, 0xcc, 0x8a, 0x12, 0x2d, 0x46, 0x82, 0x5e,
-		0x6a, 0x34, 0x8c, 0xb1, 0x93, 0x70, 0x3b, 0xde,
-		0x55, 0xaf, 0x16, 0x35, 0x99, 0x84, 0xd5, 0x88,
-		0xc9, 0x54, 0xb1, 0xb2, 0xd3, 0xeb, 0x9e, 0x55,
-		0x9a, 0xa9, 0xa7, 0xf5, 0xda, 0x29, 0xcf, 0xe1,
-		0x98, 0x64, 0x45, 0x77, 0xf2, 0x12, 0x69, 0x8f,
-		0x78, 0xd8, 0x82, 0x41, 0xb2, 0x9f, 0xe2, 0x1c,
-		0x63, 0x9b, 0x24, 0x81, 0x67, 0x95, 0xa2, 0xff,
-		0x26, 0x9d, 0x65, 0x48, 0x61, 0x30, 0x66, 0x41,
-		0x68, 0x84, 0xbb, 0x59, 0x14, 0x8e, 0x9a, 0x62,
-		0xb6, 0xca, 0xda, 0xbe, 0x7c, 0x41, 0x52, 0x6e,
-		0x1b, 0x86, 0xbf, 0x08, 0xeb, 0x37, 0x84, 0x60,
-		0xe4, 0xc4, 0x1e, 0xa8, 0x4c, 0x84, 0x60, 0x2f,
-		0x70, 0x90, 0xf2, 0x26, 0xe7, 0x65, 0x0c, 0xc4,
-		0x58, 0x36, 0x8e, 0x4d, 0xdf, 0xff, 0x9a, 0x39,
-		0x93, 0x01, 0xcf, 0x6f, 0x6d, 0xde, 0xef, 0x79,
-		0xb0, 0xce, 0xe2, 0x98, 0xdb, 0x85, 0x8d, 0x62,
-		0x9d, 0xb9, 0x63, 0xfd, 0xf0, 0x35, 0xb5, 0xa9,
-		0x1b, 0xf9, 0xe5, 0xd4, 0x2e, 0x22, 0x2d, 0xcc,
-		0x42, 0xbf, 0x0e, 0x51, 0xf7, 0x15, 0x07, 0x32,
-		0x75, 0x5b, 0x74, 0xbb, 0x00, 0xef, 0xd4, 0x66,
-		0x8b, 0xad, 0x71, 0x53, 0x94, 0xd7, 0x7d, 0x2c,
-		0x40, 0x3e, 0x69, 0xa0, 0x4c, 0x86, 0x5e, 0x06,
-		0xed, 0xdf, 0x22, 0xe2, 0x24, 0x25, 0x4e, 0x9b,
-		0x5f, 0x49, 0x74, 0xba, 0xed, 0xb1, 0xa6, 0xeb,
-		0xae, 0x3f, 0xc6, 0x9e, 0x0b, 0x29, 0x28, 0x9a,
-		0xb6, 0xb2, 0x74, 0x58, 0xec, 0xa6, 0x4a, 0xed,
-		0xe5, 0x10, 0x00, 0x85, 0xe1, 0x63, 0x41, 0x61,
-		0x30, 0x7c, 0x97, 0xcf, 0x75, 0xcf, 0xb6, 0xf3,
-		0xf7, 0xda, 0x35, 0x3f, 0x85, 0x8c, 0x64, 0xca,
-		0xb7, 0xea, 0x7f, 0xe4, 0xa3, 0x4d, 0x30, 0x84,
-		0x8c, 0x9c, 0x80, 0x5a, 0x50, 0xa5, 0x64, 0xae,
-		0x26, 0xd3, 0xb5, 0x01, 0x73, 0x36, 0x8a, 0x92,
-		0x49, 0xc4, 0x1a, 0x94, 0x81, 0x9d, 0xf5, 0x6c,
-		0x50, 0xe1, 0x58, 0x0b, 0x75, 0xdd, 0x6b, 0x6a,
-		0xca, 0x69, 0xea, 0xc3, 0x33, 0x90, 0x9f, 0x3b,
-		0x65, 0x5d, 0x5e, 0xee, 0x31, 0xb7, 0x32, 0xfd,
-		0x56, 0x83, 0xb6, 0xfb, 0xa8, 0x04, 0xfc, 0x1e,
-		0x11, 0xfb, 0x02, 0x23, 0x53, 0x49, 0x45, 0xb1,
-		0x07, 0xfc, 0xba, 0xe7, 0x5f, 0x5d, 0x2d, 0x7f,
-		0x9e, 0x46, 0xba, 0xe9, 0xb0, 0xdb, 0x32, 0x04,
-		0xa4, 0xa7, 0x98, 0xab, 0x91, 0xcd, 0x02, 0x05,
-		0xf5, 0x74, 0x31, 0x98, 0x83, 0x3d, 0x33, 0x11,
-		0x0e, 0xe3, 0x8d, 0xa8, 0xc9, 0x0e, 0xf3, 0xb9,
-		0x47, 0x67, 0xe9, 0x79, 0x2b, 0x34, 0xcd, 0x9b,
-		0x45, 0x75, 0x29, 0xf0, 0xbf, 0xcc, 0xda, 0x3a,
-		0x91, 0xb2, 0x15, 0x27, 0x7a, 0xe5, 0xf5, 0x6a,
-		0x5e, 0xbe, 0x2c, 0x98, 0xe8, 0x40, 0x96, 0x4f,
-		0x8a, 0x09, 0xfd, 0xf6, 0xb2, 0xe7, 0x45, 0xb6,
-		0x08, 0xc1, 0x69, 0xe1, 0xb3, 0xc4, 0x24, 0x34,
-		0x07, 0x85, 0xd5, 0xa9, 0x78, 0xca, 0xfa, 0x4b,
-		0x01, 0x19, 0x4d, 0x95, 0xdc, 0xa5, 0xc1, 0x9c,
-		0xec, 0x27, 0x5b, 0xa6, 0x54, 0x25, 0xbd, 0xc8,
-		0x0a, 0xb7, 0x11, 0xfb, 0x4e, 0xeb, 0x65, 0x2e,
-		0xe1, 0x08, 0x9c, 0x3a, 0x45, 0x44, 0x33, 0xef,
-		0x0d, 0xb9, 0xff, 0x3e, 0x68, 0x9c, 0x61, 0x2b,
-		0x11, 0xb8, 0x5c, 0x47, 0x0f, 0x94, 0xf2, 0xf8,
-		0x0b, 0xbb, 0x99, 0x18, 0x85, 0xa3, 0xba, 0x44,
-		0xf3, 0x79, 0xb3, 0x63, 0x2c, 0x1f, 0x2a, 0x35,
-		0x3b, 0x23, 0x98, 0xab, 0xf4, 0x16, 0x36, 0xf8,
-		0xde, 0x86, 0xa4, 0xd4, 0x75, 0xff, 0x51, 0xf9,
-		0xeb, 0x42, 0x5f, 0x55, 0xe2, 0xbe, 0xd1, 0x5b,
-		0xb5, 0x38, 0xeb, 0xb4, 0x4d, 0xec, 0xec, 0x99,
-		0xe1, 0x39, 0x43, 0xaa, 0x64, 0xf7, 0xc9, 0xd8,
-		0xf2, 0x9a, 0x71, 0x43, 0x39, 0x17, 0xe8, 0xa8,
-		0xa2, 0xe2, 0xa4, 0x2c, 0x18, 0x11, 0x49, 0xdf,
-		0x18, 0xdd, 0x85, 0x6e, 0x65, 0x96, 0xe2, 0xba,
-		0xa1, 0x0a, 0x2c, 0xca, 0xdc, 0x5f, 0xe4, 0xf4,
-		0x35, 0x03, 0xb2, 0xa9, 0xda, 0xcf, 0xb7, 0x6d,
-		0x65, 0x82, 0x82, 0x67, 0x9d, 0x0e, 0xf3, 0xe8,
-		0x85, 0x6c, 0x69, 0xb8, 0x4c, 0xa6, 0xc6, 0x2e,
-		0x40, 0xb5, 0x54, 0x28, 0x95, 0xe4, 0x57, 0xe0,
-		0x5b, 0xf8, 0xde, 0x59, 0xe0, 0xfd, 0x89, 0x48,
-		0xac, 0x56, 0x13, 0x54, 0xb9, 0x1b, 0xf5, 0x59,
-		0x97, 0xb6, 0xb3, 0xe8, 0xac, 0x2d, 0xfc, 0xd2,
-		0xea, 0x57, 0x96, 0x57, 0xa8, 0x26, 0x97, 0x2c,
-		0x01, 0x89, 0x56, 0xea, 0xec, 0x8c, 0x53, 0xd5,
-		0xd7, 0x9e, 0xc9, 0x98, 0x0b, 0xad, 0x03, 0x75,
-		0xa0, 0x6e, 0x98, 0x8b, 0x97, 0x8d, 0x8d, 0x85,
-		0x7d, 0x74, 0xa7, 0x2d, 0xde, 0x67, 0x0c, 0xcd,
-		0x54, 0xb8, 0x15, 0x7b, 0xeb, 0xf5, 0x84, 0xb9,
-		0x78, 0xab, 0xd8, 0x68, 0x91, 0x1f, 0x6a, 0xa6,
-		0x28, 0x22, 0xf7, 0x00, 0x49, 0x00, 0xbe, 0x41,
-		0x71, 0x0a, 0xf5, 0xe7, 0x9f, 0xb4, 0x11, 0x41,
-		0x3f, 0xcd, 0xa9, 0xa9, 0x01, 0x8b, 0x6a, 0xeb,
-		0x54, 0x4c, 0x58, 0x92, 0x68, 0x02, 0x0e, 0xe9,
-		0xed, 0x65, 0x4c, 0xfb, 0x95, 0x48, 0x58, 0xa2,
-		0xaa, 0x57, 0x69, 0x13, 0x82, 0x0c, 0x2c, 0x4b,
-		0x5d, 0x4e, 0x18, 0x30, 0xef, 0x1c, 0xb1, 0x9d,
-		0x05, 0x05, 0x02, 0x1c, 0x97, 0xc9, 0x48, 0xfe,
-		0x5e, 0x7b, 0x77, 0xa3, 0x1f, 0x2a, 0x81, 0x42,
-		0xf0, 0x4b, 0x85, 0x12, 0x9c, 0x1f, 0x44, 0xb1,
-		0x14, 0x91, 0x92, 0x65, 0x77, 0xb1, 0x87, 0xa2,
-		0xfc, 0xa4, 0xe7, 0xd2, 0x9b, 0xf2, 0x17, 0xf0,
-		0x30, 0x1c, 0x8d, 0x33, 0xbc, 0x25, 0x28, 0x48,
-		0xfd, 0x30, 0x79, 0x0a, 0x99, 0x3e, 0xb4, 0x0f,
-		0x1e, 0xa6, 0x68, 0x76, 0x19, 0x76, 0x29, 0xac,
-		0x5d, 0xb8, 0x1e, 0x42, 0xd6, 0x85, 0x04, 0xbf,
-		0x64, 0x1c, 0x2d, 0x53, 0xe9, 0x92, 0x78, 0xf8,
-		0xc3, 0xda, 0x96, 0x92, 0x10, 0x6f, 0x45, 0x85,
-		0xaf, 0x5e, 0xcc, 0xa8, 0xc0, 0xc6, 0x2e, 0x73,
-		0x51, 0x3f, 0x5e, 0xd7, 0x52, 0x33, 0x71, 0x12,
-		0x6d, 0x85, 0xee, 0xea, 0x85, 0xa8, 0x48, 0x2b,
-		0x40, 0x64, 0x6d, 0x28, 0x73, 0x16, 0xd7, 0x82,
-		0xd9, 0x90, 0xed, 0x1f, 0xa7, 0x5c, 0xb1, 0x5c,
-		0x27, 0xb9, 0x67, 0x8b, 0xb4, 0x17, 0x13, 0x83,
-		0x5f, 0x09, 0x72, 0x0a, 0xd7, 0xa0, 0xec, 0x81,
-		0x59, 0x19, 0xb9, 0xa6, 0x5a, 0x37, 0x34, 0x14,
-		0x47, 0xf6, 0xe7, 0x6c, 0xd2, 0x09, 0x10, 0xe7,
-		0xdd, 0xbb, 0x02, 0xd1, 0x28, 0xfa, 0x01, 0x2c,
-		0x93, 0x64, 0x2e, 0x1b, 0x4c, 0x02, 0x52, 0xcb,
-		0x07, 0xa1, 0xb6, 0x46, 0x02, 0x80, 0xd9, 0x8f,
-		0x5c, 0x62, 0xbe, 0x78, 0x9e, 0x75, 0xc4, 0x97,
-		0x91, 0x39, 0x12, 0x65, 0xb9, 0x3b, 0xc2, 0xd1,
-		0xaf, 0xf2, 0x1f, 0x4e, 0x4d, 0xd1, 0xf0, 0x9f,
-		0xb7, 0x12, 0xfd, 0xe8, 0x75, 0x18, 0xc0, 0x9d,
-		0x8c, 0x70, 0xff, 0x77, 0x05, 0xb6, 0x1a, 0x1f,
-		0x96, 0x48, 0xf6, 0xfe, 0xd5, 0x5d, 0x98, 0xa5,
-		0x72, 0x1c, 0x84, 0x76, 0x3e, 0xb8, 0x87, 0x37,
-		0xdd, 0xd4, 0x3a, 0x45, 0xdd, 0x09, 0xd8, 0xe7,
-		0x09, 0x2f, 0x3e, 0x33, 0x9e, 0x7b, 0x8c, 0xe4,
-		0x85, 0x12, 0x4e, 0xf8, 0x06, 0xb7, 0xb1, 0x85,
-		0x24, 0x96, 0xd8, 0xfe, 0x87, 0x92, 0x81, 0xb1,
-		0xa3, 0x38, 0xb9, 0x56, 0xe1, 0xf6, 0x36, 0x41,
-		0xbb, 0xd6, 0x56, 0x69, 0x94, 0x57, 0xb3, 0xa4,
-		0xca, 0xa4, 0xe1, 0x02, 0x3b, 0x96, 0x71, 0xe0,
-		0xb2, 0x2f, 0x85, 0x48, 0x1b, 0x4a, 0x41, 0x80,
-		0x4b, 0x9c, 0xe0, 0xc9, 0x39, 0xb8, 0xb1, 0xca,
-		0x64, 0x77, 0x46, 0x58, 0xe6, 0x84, 0xd5, 0x2b,
-		0x65, 0xce, 0xe9, 0x09, 0xa3, 0xaa, 0xfb, 0x83,
-		0xa9, 0x28, 0x68, 0xfd, 0xcd, 0xfd, 0x76, 0x83,
-		0xe1, 0x20, 0x22, 0x77, 0x3a, 0xa3, 0xb2, 0x93,
-		0x14, 0x91, 0xfc, 0xe2, 0x17, 0x63, 0x2b, 0xa6,
-		0x29, 0x38, 0x7b, 0x9b, 0x8b, 0x15, 0x77, 0xd6,
-		0xaa, 0x92, 0x51, 0x53, 0x50, 0xff, 0xa0, 0x35,
-		0xa0, 0x59, 0x7d, 0xf0, 0x11, 0x23, 0x49, 0xdf,
-		0x5a, 0x21, 0xc2, 0xfe, 0x35, 0xa0, 0x1d, 0xe2,
-		0xae, 0xa2, 0x8a, 0x61, 0x5b, 0xf7, 0xf1, 0x1c,
-		0x1c, 0xec, 0xc4, 0xf6, 0xdc, 0xaa, 0xc8, 0xc2,
-		0xe5, 0xa1, 0x2e, 0x14, 0xe5, 0xc6, 0xc9, 0x73,
-		0x03, 0x78, 0xeb, 0xed, 0xe0, 0x3e, 0xc5, 0xf4,
-		0xf1, 0x50, 0xb2, 0x01, 0x91, 0x96, 0xf5, 0xbb,
-		0xe1, 0x32, 0xcd, 0xa8, 0x66, 0xbf, 0x73, 0x85,
-		0x94, 0xd6, 0x7e, 0x68, 0xc5, 0xe4, 0xed, 0xd5,
-		0xe3, 0x67, 0x4c, 0xa5, 0xb3, 0x1f, 0xdf, 0xf8,
-		0xb3, 0x73, 0x5a, 0xac, 0xeb, 0x46, 0x16, 0x24,
-		0xab, 0xca, 0xa4, 0xdd, 0x87, 0x0e, 0x24, 0x83,
-		0x32, 0x04, 0x4c, 0xd8, 0xda, 0x7d, 0xdc, 0xe3,
-		0x01, 0x93, 0xf3, 0xc1, 0x5b, 0xbd, 0xc3, 0x1d,
-		0x40, 0x62, 0xde, 0x94, 0x03, 0x85, 0x91, 0x2a,
-		0xa0, 0x25, 0x10, 0xd3, 0x32, 0x9f, 0x93, 0x00,
-		0xa7, 0x8a, 0xfa, 0x77, 0x7c, 0xaf, 0x4d, 0xc8,
-		0x7a, 0xf3, 0x16, 0x2b, 0xba, 0xeb, 0x74, 0x51,
-		0xb8, 0xdd, 0x32, 0xad, 0x68, 0x7d, 0xdd, 0xca,
-		0x60, 0x98, 0xc9, 0x9b, 0xb6, 0x5d, 0x4d, 0x3a,
-		0x66, 0x8a, 0xbe, 0x05, 0xf9, 0x0c, 0xc5, 0xba,
-		0x52, 0x82, 0x09, 0x1f, 0x5a, 0x66, 0x89, 0x69,
-		0xa3, 0x5d, 0x93, 0x50, 0x7d, 0x44, 0xc3, 0x2a,
-		0xb8, 0xab, 0xec, 0xa6, 0x5a, 0xae, 0x4a, 0x6a,
-		0xcd, 0xfd, 0xb6, 0xff, 0x3d, 0x98, 0x05, 0xd9,
-		0x5b, 0x29, 0xc4, 0x6f, 0xe0, 0x76, 0xe2, 0x3f,
-		0xec, 0xd7, 0xa4, 0x91, 0x63, 0xf5, 0x4e, 0x4b,
-		0xab, 0x20, 0x8c, 0x3a, 0x41, 0xed, 0x8b, 0x4b,
-		0xb9, 0x01, 0x21, 0xc0, 0x6d, 0xfd, 0x70, 0x5b,
-		0x20, 0x92, 0x41, 0x89, 0x74, 0xb7, 0xe9, 0x8b,
-		0xfc, 0x6d, 0x17, 0x3f, 0x7f, 0x89, 0x3d, 0x6b,
-		0x8f, 0xbc, 0xd2, 0x57, 0xe9, 0xc9, 0x6e, 0xa7,
-		0x19, 0x26, 0x18, 0xad, 0xef, 0xb5, 0x87, 0xbf,
-		0xb8, 0xa8, 0xd6, 0x7d, 0xdd, 0x5f, 0x94, 0x54,
-		0x09, 0x92, 0x2b, 0xf5, 0x04, 0xf7, 0x36, 0x69,
-		0x8e, 0xf4, 0xdc, 0x1d, 0x6e, 0x55, 0xbb, 0xe9,
-		0x13, 0x05, 0x83, 0x35, 0x9c, 0xed, 0xcf, 0x8c,
-		0x26, 0x8c, 0x7b, 0xc7, 0x0b, 0xba, 0xfd, 0xe2,
-		0x84, 0x5c, 0x2a, 0x79, 0x43, 0x99, 0xb2, 0xc3,
-		0x82, 0x87, 0xc8, 0xcd, 0x37, 0x6d, 0xa1, 0x2b,
-		0x39, 0xb2, 0x38, 0x99, 0xd9, 0xfc, 0x02, 0x15,
-		0x55, 0x21, 0x62, 0x59, 0xeb, 0x00, 0x86, 0x08,
-		0x20, 0xbe, 0x1a, 0x62, 0x4d, 0x7e, 0xdf, 0x68,
-		0x73, 0x5b, 0x5f, 0xaf, 0x84, 0x96, 0x2e, 0x1f,
-		0x6b, 0x03, 0xc9, 0xa6, 0x75, 0x18, 0xe9, 0xd4,
-		0xbd, 0xc8, 0xec, 0x9a, 0x5a, 0xb3, 0x99, 0xab,
-		0x5f, 0x7c, 0x08, 0x7f, 0x69, 0x4d, 0x52, 0xa2,
-		0x30, 0x17, 0x3b, 0x16, 0x15, 0x1b, 0x11, 0x62,
-		0x3e, 0x80, 0x4b, 0x85, 0x7c, 0x9c, 0xd1, 0x3a,
-		0x13, 0x01, 0x5e, 0x45, 0xf1, 0xc8, 0x5f, 0xcd,
-		0x0e, 0x21, 0xf5, 0x82, 0xd4, 0x7b, 0x5c, 0x45,
-		0x27, 0x6b, 0xef, 0xfe, 0xb8, 0xc0, 0x6f, 0xdc,
-		0x60, 0x7b, 0xe4, 0xd5, 0x75, 0x71, 0xe6, 0xe8,
-		0x7d, 0x6b, 0x6d, 0x80, 0xaf, 0x76, 0x41, 0x58,
-		0xb7, 0xac, 0xb7, 0x13, 0x2f, 0x81, 0xcc, 0xf9,
-		0x19, 0x97, 0xe8, 0xee, 0x40, 0x91, 0xfc, 0x89,
-		0x13, 0x1e, 0x67, 0x9a, 0xdb, 0x8f, 0x8f, 0xc7,
-		0x4a, 0xc9, 0xaf, 0x2f, 0x67, 0x01, 0x3c, 0xb8,
-		0xa8, 0x3e, 0x78, 0x93, 0x1b, 0xdf, 0xbb, 0x34,
-		0x0b, 0x1a, 0xfa, 0xc2, 0x2d, 0xc5, 0x1c, 0xec,
-		0x97, 0x4f, 0x48, 0x41, 0x15, 0x0e, 0x75, 0xed,
-		0x66, 0x8c, 0x17, 0x7f, 0xb1, 0x48, 0x13, 0xc1,
-		0xfb, 0x60, 0x06, 0xf9, 0x72, 0x41, 0x3e, 0xcf,
-		0x6e, 0xb6, 0xc8, 0xeb, 0x4b, 0x5a, 0xd2, 0x0c,
-		0x28, 0xda, 0x02, 0x7a, 0x46, 0x21, 0x42, 0xb5,
-		0x34, 0xda, 0xcb, 0x5e, 0xbd, 0x66, 0x5c, 0xca,
-		0xff, 0x52, 0x43, 0x89, 0xf9, 0x10, 0x9a, 0x9e,
-		0x9b, 0xe3, 0xb0, 0x51, 0xe9, 0xf3, 0x0a, 0x35,
-		0x77, 0x54, 0xcc, 0xac, 0xa6, 0xf1, 0x2e, 0x36,
-		0x89, 0xac, 0xc5, 0xc6, 0x62, 0x5a, 0xc0, 0x6d,
-		0xc4, 0xe1, 0xf7, 0x64, 0x30, 0xff, 0x11, 0x40,
-		0x13, 0x89, 0xd8, 0xd7, 0x73, 0x3f, 0x93, 0x08,
-		0x68, 0xab, 0x66, 0x09, 0x1a, 0xea, 0x78, 0xc9,
-		0x52, 0xf2, 0xfd, 0x93, 0x1b, 0x94, 0xbe, 0x5c,
-		0xe5, 0x00, 0x6e, 0x00, 0xb9, 0xea, 0x27, 0xaa,
-		0xb3, 0xee, 0xe3, 0xc8, 0x6a, 0xb0, 0xc1, 0x8e,
-		0x9b, 0x54, 0x40, 0x10, 0x96, 0x06, 0xe8, 0xb3,
-		0xf5, 0x55, 0x77, 0xd7, 0x5c, 0x94, 0xc1, 0x74,
-		0xf3, 0x07, 0x64, 0xac, 0x1c, 0xde, 0xc7, 0x22,
-		0xb0, 0xbf, 0x2a, 0x5a, 0xc0, 0x8f, 0x8a, 0x83,
-		0x50, 0xc2, 0x5e, 0x97, 0xa0, 0xbe, 0x49, 0x7e,
-		0x47, 0xaf, 0xa7, 0x20, 0x02, 0x35, 0xa4, 0x57,
-		0xd9, 0x26, 0x63, 0xdb, 0xf1, 0x34, 0x42, 0x89,
-		0x36, 0xd1, 0x77, 0x6f, 0xb1, 0xea, 0x79, 0x7e,
-		0x95, 0x10, 0x5a, 0xee, 0xa3, 0xae, 0x6f, 0xba,
-		0xa9, 0xef, 0x5a, 0x7e, 0x34, 0x03, 0x04, 0x07,
-		0x92, 0xd6, 0x07, 0x79, 0xaa, 0x14, 0x90, 0x97,
-		0x05, 0x4d, 0xa6, 0x27, 0x10, 0x5c, 0x25, 0x24,
-		0xcb, 0xcc, 0xf6, 0x77, 0x9e, 0x43, 0x23, 0xd4,
-		0x98, 0xef, 0x22, 0xa8, 0xad, 0xf2, 0x26, 0x08,
-		0x59, 0x69, 0xa4, 0xc3, 0x97, 0xe0, 0x5c, 0x6f,
-		0xeb, 0x3d, 0xd4, 0x62, 0x6e, 0x80, 0x61, 0x02,
-		0xf4, 0xfc, 0x94, 0x79, 0xbb, 0x4e, 0x6d, 0xd7,
-		0x30, 0x5b, 0x10, 0x11, 0x5a, 0x3d, 0xa7, 0x50,
-		0x1d, 0x9a, 0x13, 0x5f, 0x4f, 0xa8, 0xa7, 0xb6,
-		0x39, 0xc7, 0xea, 0xe6, 0x19, 0x61, 0x69, 0xc7,
-		0x9a, 0x3a, 0xeb, 0x9d, 0xdc, 0xf7, 0x06, 0x37,
-		0xbd, 0xac, 0xe3, 0x18, 0xff, 0xfe, 0x11, 0xdb,
-		0x67, 0x42, 0xb4, 0xea, 0xa8, 0xbd, 0xb0, 0x76,
-		0xd2, 0x74, 0x32, 0xc2, 0xa4, 0x9c, 0xe7, 0x60,
-		0xc5, 0x30, 0x9a, 0x57, 0x66, 0xcd, 0x0f, 0x02,
-		0x4c, 0xea, 0xe9, 0xd3, 0x2a, 0x5c, 0x09, 0xc2,
-		0xff, 0x6a, 0xde, 0x5d, 0xb7, 0xe9, 0x75, 0x6b,
-		0x29, 0x94, 0xd6, 0xf7, 0xc3, 0xdf, 0xfb, 0x70,
-		0xec, 0xb5, 0x8c, 0xb0, 0x78, 0x7a, 0xee, 0x52,
-		0x5f, 0x8c, 0xae, 0x85, 0xe5, 0x98, 0xa2, 0xb7,
-		0x7c, 0x02, 0x2a, 0xcc, 0x9e, 0xde, 0x99, 0x5f,
-		0x84, 0x20, 0xbb, 0xdc, 0xf2, 0xd2, 0x13, 0x46,
-		0x3c, 0xd6, 0x4d, 0xe7, 0x50, 0xef, 0x55, 0xc3,
-		0x96, 0x9f, 0xec, 0x6c, 0xd8, 0xe2, 0xea, 0xed,
-		0xc7, 0x33, 0xc9, 0xb3, 0x1c, 0x4f, 0x1d, 0x83,
-		0x1d, 0xe4, 0xdd, 0xb2, 0x24, 0x8f, 0xf9, 0xf5
-};
-
-
-static const uint8_t HMAC_SHA256_ciphertext_64B_digest[] = {
-		0xc5, 0x6d, 0x4f, 0x29, 0xf4, 0xd2, 0xcc, 0x87,
-		0x3c, 0x81, 0x02, 0x6d, 0x38, 0x7a, 0x67, 0x3e,
-		0x95, 0x9c, 0x5c, 0x8f, 0xda, 0x5c, 0x06, 0xe0,
-		0x65, 0xf1, 0x6c, 0x51, 0x52, 0x49, 0x3e, 0x5f
-};
-
-static const uint8_t HMAC_SHA256_ciphertext_128B_digest[] = {
-		0x76, 0x64, 0x2d, 0x69, 0x71, 0x5d, 0x6a, 0xd8,
-		0x9f, 0x74, 0x11, 0x2f, 0x58, 0xe0, 0x4a, 0x2f,
-		0x6c, 0x88, 0x5e, 0x4d, 0x9c, 0x79, 0x83, 0x1c,
-		0x8a, 0x14, 0xd0, 0x07, 0xfb, 0xbf, 0x6c, 0x8f
-};
-
-static const uint8_t HMAC_SHA256_ciphertext_256B_digest[] = {
-		0x05, 0xa7, 0x44, 0xcd, 0x91, 0x8c, 0x95, 0xcf,
-		0x7b, 0x8f, 0xd3, 0x90, 0x86, 0x7e, 0x7b, 0xb9,
-		0x05, 0xd6, 0x6e, 0x7a, 0xc1, 0x7b, 0x26, 0xff,
-		0xd3, 0x4b, 0xe0, 0x22, 0x8b, 0xa8, 0x47, 0x52
-};
-
-static const uint8_t HMAC_SHA256_ciphertext_512B_digest[] = {
-		0x08, 0xb7, 0x29, 0x54, 0x18, 0x7e, 0x97, 0x49,
-		0xc6, 0x7c, 0x9f, 0x94, 0xa5, 0x4f, 0xa2, 0x25,
-		0xd0, 0xe2, 0x30, 0x7b, 0xad, 0x93, 0xc9, 0x12,
-		0x0f, 0xf0, 0xf0, 0x71, 0xc2, 0xf6, 0x53, 0x8f
-};
-
-static const uint8_t HMAC_SHA256_ciphertext_768B_digest[] = {
-		0xe4, 0x3e, 0x73, 0x93, 0x03, 0xaf, 0x6f, 0x9c,
-		0xca, 0x57, 0x3b, 0x4a, 0x6e, 0x83, 0x58, 0xf5,
-		0x66, 0xc2, 0xb4, 0xa7, 0xe0, 0xee, 0x63, 0x6b,
-		0x48, 0xb7, 0x50, 0x45, 0x69, 0xdf, 0x5c, 0x5b
-};
-
-static const uint8_t HMAC_SHA256_ciphertext_1024B_digest[] = {
-		0x03, 0xb9, 0x96, 0x26, 0xdc, 0x1c, 0xab, 0xe2,
-		0xf5, 0x70, 0x55, 0x15, 0x67, 0x6e, 0x48, 0x11,
-		0xe7, 0x67, 0xea, 0xfa, 0x5c, 0x6b, 0x28, 0x22,
-		0xc9, 0x0e, 0x67, 0x04, 0xb3, 0x71, 0x7f, 0x88
-};
-
-static const uint8_t HMAC_SHA256_ciphertext_1280B_digest[] = {
-		0x01, 0x91, 0xb8, 0x78, 0xd3, 0x21, 0x74, 0xa5,
-		0x1c, 0x8b, 0xd4, 0xd2, 0xc0, 0x49, 0xd7, 0xd2,
-		0x16, 0x46, 0x66, 0x85, 0x50, 0x6d, 0x08, 0xcc,
-		0xc7, 0x0a, 0xa3, 0x71, 0xcc, 0xde, 0xee, 0xdc
-};
-
-static const uint8_t HMAC_SHA256_ciphertext_1536B_digest[] = {
-		0xf2, 0xe5, 0xe9, 0x57, 0x53, 0xd7, 0x69, 0x28,
-		0x7b, 0x69, 0xb5, 0x49, 0xa3, 0x31, 0x56, 0x5f,
-		0xa4, 0xe9, 0x87, 0x26, 0x2f, 0xe0, 0x2d, 0xd6,
-		0x08, 0x44, 0x01, 0x71, 0x0c, 0x93, 0x85, 0x84
-};
-
-static const uint8_t HMAC_SHA256_ciphertext_1792B_digest[] = {
-		0xf6, 0x57, 0x62, 0x01, 0xbf, 0x2d, 0xea, 0x4a,
-		0xef, 0x43, 0x85, 0x60, 0x18, 0xdf, 0x8b, 0xb4,
-		0x60, 0xc0, 0xfd, 0x2f, 0x90, 0x15, 0xe6, 0x91,
-		0x56, 0x61, 0x68, 0x7f, 0x5e, 0x92, 0xa8, 0xdd
-};
-
-static const uint8_t HMAC_SHA256_ciphertext_2048B_digest[] = {
-		0x81, 0x1a, 0x29, 0xbc, 0x6b, 0x9f, 0xbb, 0xb8,
-		0xef, 0x71, 0x7b, 0x1f, 0x6f, 0xd4, 0x7e, 0x68,
-		0x3a, 0x9c, 0xb9, 0x98, 0x22, 0x81, 0xfa, 0x95,
-		0xee, 0xbc, 0x7f, 0x23, 0x29, 0x88, 0x76, 0xb8
-};
-
-struct crypto_data_params {
-	const char *name;
-	uint16_t length;
-	const char *plaintext;
-	struct crypto_expected_output {
-		const uint8_t *ciphertext;
-		const uint8_t *digest;
-	} expected;
-};
-
-#define MAX_PACKET_SIZE_INDEX	10
-
-struct crypto_data_params aes_cbc_hmac_sha256_output[MAX_PACKET_SIZE_INDEX] = {
-	{ "64B", 64, &plaintext_quote[sizeof(plaintext_quote) - 1 - 64],
-		{ AES_CBC_ciphertext_64B, HMAC_SHA256_ciphertext_64B_digest } },
-	{ "128B", 128, &plaintext_quote[sizeof(plaintext_quote) - 1 - 128],
-		{ AES_CBC_ciphertext_128B, HMAC_SHA256_ciphertext_128B_digest } },
-	{ "256B", 256, &plaintext_quote[sizeof(plaintext_quote) - 1 - 256],
-		{ AES_CBC_ciphertext_256B, HMAC_SHA256_ciphertext_256B_digest } },
-	{ "512B", 512, &plaintext_quote[sizeof(plaintext_quote) - 1 - 512],
-		{ AES_CBC_ciphertext_512B, HMAC_SHA256_ciphertext_512B_digest } },
-	{ "768B", 768, &plaintext_quote[sizeof(plaintext_quote) - 1 - 768],
-		{ AES_CBC_ciphertext_768B, HMAC_SHA256_ciphertext_768B_digest } },
-	{ "1024B", 1024, &plaintext_quote[sizeof(plaintext_quote) - 1 - 1024],
-		{ AES_CBC_ciphertext_1024B, HMAC_SHA256_ciphertext_1024B_digest } },
-	{ "1280B", 1280, &plaintext_quote[sizeof(plaintext_quote) - 1 - 1280],
-		{ AES_CBC_ciphertext_1280B, HMAC_SHA256_ciphertext_1280B_digest } },
-	{ "1536B", 1536, &plaintext_quote[sizeof(plaintext_quote) - 1 - 1536],
-		{ AES_CBC_ciphertext_1536B, HMAC_SHA256_ciphertext_1536B_digest } },
-	{ "1792B", 1792, &plaintext_quote[sizeof(plaintext_quote) - 1 - 1792],
-		{ AES_CBC_ciphertext_1792B, HMAC_SHA256_ciphertext_1792B_digest } },
-	{ "2048B", 2048, &plaintext_quote[sizeof(plaintext_quote) - 1 - 2048],
-		{ AES_CBC_ciphertext_2048B, HMAC_SHA256_ciphertext_2048B_digest } }
-};
-
-static int
-test_perf_crypto_qp_vary_burst_size(uint16_t dev_num)
-{
-	uint32_t num_to_submit = 4096;
-	struct rte_crypto_op *c_ops[num_to_submit];
-	struct rte_crypto_op *proc_ops[num_to_submit];
-	uint64_t failed_polls, retries, start_cycles, end_cycles, total_cycles = 0;
-	uint32_t burst_sent, burst_received;
-	uint32_t i, burst_size, num_sent, num_received;
-	struct crypto_testsuite_params *ts_params = &testsuite_params;
-	struct crypto_unittest_params *ut_params = &unittest_params;
-	struct crypto_data_params *data_params = aes_cbc_hmac_sha256_output;
-
-	if (rte_cryptodev_count() == 0) {
-		printf("\nNo crypto devices available. Is kernel driver loaded?\n");
-		return TEST_FAILED;
-	}
-
-	/* Setup Cipher Parameters */
-	ut_params->cipher_xform.type = RTE_CRYPTO_SYM_XFORM_CIPHER;
-	ut_params->cipher_xform.next = &ut_params->auth_xform;
-
-	ut_params->cipher_xform.cipher.algo = RTE_CRYPTO_CIPHER_AES_CBC;
-	ut_params->cipher_xform.cipher.op = RTE_CRYPTO_CIPHER_OP_DECRYPT;
-	ut_params->cipher_xform.cipher.key.data = aes_cbc_128_key;
-	ut_params->cipher_xform.cipher.key.length = CIPHER_IV_LENGTH_AES_CBC;
-	ut_params->cipher_xform.cipher.iv.offset = IV_OFFSET;
-	ut_params->cipher_xform.cipher.iv.length = CIPHER_IV_LENGTH_AES_CBC;
-
-	/* Setup HMAC Parameters */
-	ut_params->auth_xform.type = RTE_CRYPTO_SYM_XFORM_AUTH;
-	ut_params->auth_xform.next = NULL;
-
-	ut_params->auth_xform.auth.op = RTE_CRYPTO_AUTH_OP_VERIFY;
-	ut_params->auth_xform.auth.algo = RTE_CRYPTO_AUTH_SHA256_HMAC;
-	ut_params->auth_xform.auth.key.data = hmac_sha256_key;
-	ut_params->auth_xform.auth.key.length = HMAC_KEY_LENGTH_SHA256;
-	ut_params->auth_xform.auth.digest_length = DIGEST_BYTE_LENGTH_SHA256;
-
-	/* Create Crypto session*/
-
-	test_crypto_session = rte_cryptodev_sym_session_create(ts_params->sess_mp);
-
-	rte_cryptodev_sym_session_init(ts_params->dev_id, test_crypto_session,
-			&ut_params->cipher_xform, ts_params->sess_mp);
-
-	TEST_ASSERT_NOT_NULL(test_crypto_session, "Session creation failed");
-
-	/* Generate Crypto op data structure(s) */
-	for (i = 0; i < num_to_submit ; i++) {
-		struct rte_mbuf *m = setup_test_string(ts_params->mbuf_mp,
-				data_params[0].expected.ciphertext,
-				data_params[0].length, 0);
-		TEST_ASSERT_NOT_NULL(m, "Failed to allocate tx_buf");
-
-		ut_params->digest = (uint8_t *)rte_pktmbuf_append(m,
-				DIGEST_BYTE_LENGTH_SHA256);
-		TEST_ASSERT_NOT_NULL(ut_params->digest,
-				"no room to append digest");
-
-		rte_memcpy(ut_params->digest, data_params[0].expected.digest,
-			DIGEST_BYTE_LENGTH_SHA256);
-
-
-		struct rte_crypto_op *op =
-				rte_crypto_op_alloc(ts_params->op_mpool,
-						RTE_CRYPTO_OP_TYPE_SYMMETRIC);
-
-		rte_crypto_op_attach_sym_session(op, test_crypto_session);
-
-		op->sym->auth.digest.data = ut_params->digest;
-		op->sym->auth.digest.phys_addr = rte_pktmbuf_mtophys_offset(m,
-				data_params[0].length);
-
-		op->sym->auth.data.offset = 0;
-		op->sym->auth.data.length = data_params[0].length;
-
-		rte_memcpy(rte_crypto_op_ctod_offset(op, uint8_t *, IV_OFFSET),
-				aes_cbc_128_iv, CIPHER_IV_LENGTH_AES_CBC);
-
-		op->sym->cipher.data.offset = 0;
-		op->sym->cipher.data.length = data_params[0].length;
-
-		op->sym->m_src = m;
-
-		c_ops[i] = op;
-	}
-
-	printf("\nTest to measure the IA cycle cost using AES128_CBC_SHA256_HMAC "
-			"algorithm with a constant request size of %u.",
-			data_params[0].length);
-	printf("\nThis test will keep retries at 0 and only measure IA cycle "
-			"cost for each request.");
-	printf("\nDev No\tQP No\tNum Sent\tNum Received\tTx/Rx burst");
-	printf("\tRetries (Device Busy)\tAverage IA cycle cost "
-			"(assuming 0 retries)");
-	for (i = 2; i <= 128 ; i *= 2) {
-		num_sent = 0;
-		num_received = 0;
-		retries = 0;
-		failed_polls = 0;
-		burst_size = i;
-		total_cycles = 0;
-		while (num_sent < num_to_submit) {
-			start_cycles = rte_rdtsc_precise();
-			burst_sent = rte_cryptodev_enqueue_burst(dev_num,
-					0, &c_ops[num_sent],
-					((num_to_submit-num_sent) < burst_size) ?
-					num_to_submit-num_sent : burst_size);
-			if (burst_sent == 0)
-				retries++;
-			else
-				num_sent += burst_sent;
-			end_cycles = rte_rdtsc_precise();
-			total_cycles += (end_cycles - start_cycles);
-			/*
-			 * Wait until requests have been sent.
-			 */
-			rte_delay_ms(1);
-
-			start_cycles = rte_rdtsc_precise();
-			burst_received = rte_cryptodev_dequeue_burst(
-					dev_num, 0, proc_ops, burst_size);
-			if (burst_received == 0)
-				failed_polls++;
-			else
-				num_received += burst_received;
-			end_cycles = rte_rdtsc_precise();
-			total_cycles += end_cycles - start_cycles;
-		}
-
-		while (num_received != num_to_submit) {
-			if (gbl_driver_id ==
-					rte_cryptodev_driver_id_get(
-					RTE_STR(CRYPTODEV_NAME_AESNI_MB_PMD)))
-				rte_cryptodev_enqueue_burst(dev_num, 0,
-						NULL, 0);
-
-			burst_received = rte_cryptodev_dequeue_burst(
-					dev_num, 0, proc_ops, burst_size);
-			if (burst_received == 0)
-				failed_polls++;
-			else
-				num_received += burst_received;
-		}
-
-		printf("\n%u\t%u\t%u\t\t%u\t\t%u", dev_num, 0,
-					num_sent, num_received, burst_size);
-		printf("\t\t%"PRIu64, retries);
-		printf("\t\t\t%"PRIu64, total_cycles/num_received);
-	}
-	printf("\n");
-
-	for (i = 0; i < num_to_submit ; i++) {
-		rte_pktmbuf_free(c_ops[i]->sym->m_src);
-		rte_crypto_op_free(c_ops[i]);
-	}
-	return TEST_SUCCESS;
-}
-
-static int
-test_perf_snow3G_optimise_cyclecount(struct perf_test_params *pparams)
-{
-	uint32_t num_to_submit = pparams->total_operations;
-	struct rte_crypto_op *c_ops[num_to_submit];
-	struct rte_crypto_op *proc_ops[num_to_submit];
-	uint64_t failed_polls, retries, start_cycles, end_cycles, total_cycles = 0;
-	uint32_t burst_sent = 0, burst_received = 0;
-	uint32_t i, burst_size, num_sent, num_ops_received;
-	struct crypto_testsuite_params *ts_params = &testsuite_params;
-	static struct rte_cryptodev_sym_session *sess;
-
-	if (rte_cryptodev_count() == 0) {
-		printf("\nNo crypto devices found. Is PMD build configured?\n");
-		printf("\nAnd is kernel driver loaded for HW PMDs?\n");
-		return TEST_FAILED;
-	}
-
-	/* Create Crypto session*/
-	if (test_perf_create_snow3g_session(ts_params->dev_id,
-			pparams->chain, pparams->cipher_algo,
-			pparams->key_length, pparams->auth_algo) == 0)
-		sess = test_crypto_session;
-	else
-		sess = NULL;
-	TEST_ASSERT_NOT_NULL(sess, "Session creation failed");
-
-	/* Generate Crypto op data structure(s)*/
-	for (i = 0; i < num_to_submit ; i++) {
-		struct rte_mbuf *m = test_perf_create_pktmbuf(
-						ts_params->mbuf_mp,
-						pparams->buf_size);
-		TEST_ASSERT_NOT_NULL(m, "Failed to allocate tx_buf");
-
-		struct rte_crypto_op *op =
-				rte_crypto_op_alloc(ts_params->op_mpool,
-						RTE_CRYPTO_OP_TYPE_SYMMETRIC);
-		TEST_ASSERT_NOT_NULL(op, "Failed to allocate op");
-
-		op = test_perf_set_crypto_op_snow3g(op, m, sess, pparams->buf_size);
-		TEST_ASSERT_NOT_NULL(op, "Failed to attach op to session");
-
-		c_ops[i] = op;
-	}
-
-	if (pparams->chain == AEAD)
-		printf("\nOn %s dev%u qp%u, %s, aead algo:%s, "
-			"Packet Size %u bytes",
-			pmd_name(gbl_driver_id),
-			ts_params->dev_id, 0,
-			chain_mode_name(pparams->chain),
-			rte_crypto_aead_algorithm_strings[pparams->aead_algo],
-			pparams->buf_size);
-	else
-		printf("\nOn %s dev%u qp%u, %s, cipher algo:%s, auth_algo:%s, "
-			"Packet Size %u bytes",
-			pmd_name(gbl_driver_id),
-			ts_params->dev_id, 0,
-			chain_mode_name(pparams->chain),
-			rte_crypto_cipher_algorithm_strings[pparams->cipher_algo],
-			rte_crypto_auth_algorithm_strings[pparams->auth_algo],
-			pparams->buf_size);
-	printf("\nOps Tx\tOps Rx\tOps/burst  ");
-	printf("Retries  EmptyPolls\tIACycles/CyOp\tIACycles/Burst\tIACycles/Byte");
-
-	for (i = 2; i <= 128 ; i *= 2) {
-		num_sent = 0;
-		num_ops_received = 0;
-		retries = 0;
-		failed_polls = 0;
-		burst_size = i;
-		total_cycles = 0;
-		while (num_sent < num_to_submit) {
-			start_cycles = rte_rdtsc_precise();
-			burst_sent = rte_cryptodev_enqueue_burst(ts_params->dev_id,
-					0, &c_ops[num_sent],
-					((num_to_submit-num_sent) < burst_size) ?
-					num_to_submit-num_sent : burst_size);
-			end_cycles = rte_rdtsc_precise();
-			if (burst_sent == 0)
-				retries++;
-			num_sent += burst_sent;
-			total_cycles += (end_cycles - start_cycles);
-
-			/* Wait until requests have been sent. */
-
-			rte_delay_ms(1);
-
-			start_cycles = rte_rdtsc_precise();
-			burst_received = rte_cryptodev_dequeue_burst(
-					ts_params->dev_id, 0, proc_ops, burst_size);
-			end_cycles = rte_rdtsc_precise();
-			if (burst_received < burst_sent)
-				failed_polls++;
-			num_ops_received += burst_received;
-
-			total_cycles += end_cycles - start_cycles;
-		}
-
-		while (num_ops_received != num_to_submit) {
-			if (gbl_driver_id ==
-					rte_cryptodev_driver_id_get(
-					RTE_STR(CRYPTODEV_NAME_AESNI_MB_PMD)))
-				rte_cryptodev_enqueue_burst(ts_params->dev_id, 0,
-						NULL, 0);
-			start_cycles = rte_rdtsc_precise();
-			burst_received = rte_cryptodev_dequeue_burst(
-					ts_params->dev_id, 0, proc_ops, burst_size);
-			end_cycles = rte_rdtsc_precise();
-			total_cycles += end_cycles - start_cycles;
-			if (burst_received == 0)
-				failed_polls++;
-			num_ops_received += burst_received;
-		}
-
-		printf("\n%u\t%u\t%u", num_sent, num_ops_received, burst_size);
-		printf("\t\t%"PRIu64, retries);
-		printf("\t%"PRIu64, failed_polls);
-		printf("\t\t%"PRIu64, total_cycles/num_ops_received);
-		printf("\t\t%"PRIu64, (total_cycles/num_ops_received)*burst_size);
-		printf("\t\t%"PRIu64, total_cycles/(num_ops_received*pparams->buf_size));
-	}
-	printf("\n");
-
-	for (i = 0; i < num_to_submit ; i++) {
-		rte_pktmbuf_free(c_ops[i]->sym->m_src);
-		rte_crypto_op_free(c_ops[i]);
-	}
-
-	rte_cryptodev_sym_session_clear(ts_params->dev_id,
-				sess);
-	rte_cryptodev_sym_session_free(sess);
-
-	return TEST_SUCCESS;
-}
-
-static int
-test_perf_snow3G_vary_burst_size(void)
-{
-	unsigned total_operations = 4096;
-	/*no need to vary pkt size for QAT, should have no effect on IA cycles */
-	uint16_t buf_lengths[] = {40};
-	uint8_t i, j;
-
-	struct perf_test_params params_set[] = {
-			{
-					.chain = CIPHER_ONLY,
-					.cipher_algo  = RTE_CRYPTO_CIPHER_SNOW3G_UEA2,
-					.key_length = 16,
-					.auth_algo  = RTE_CRYPTO_AUTH_NULL,
-			},
-			{
-					.chain = HASH_ONLY,
-					.cipher_algo = RTE_CRYPTO_CIPHER_NULL,
-					.auth_algo  = RTE_CRYPTO_AUTH_SNOW3G_UIA2,
-					.key_length = 16
-			},
-	};
-
-	printf("\n\nStart %s.", __func__);
-	printf("\nThis Test measures the average IA cycle cost using a "
-			"constant request(packet) size. ");
-	printf("Cycle cost is only valid when indicators show device is not busy,"
-			" i.e. Retries and EmptyPolls = 0");
-
-	for (i = 0; i < RTE_DIM(params_set); i++) {
-		printf("\n");
-		params_set[i].total_operations = total_operations;
-
-		for (j = 0;
-			j < RTE_DIM(buf_lengths);
-			j++) {
-
-			params_set[i].buf_size = buf_lengths[j];
-
-			test_perf_snow3G_optimise_cyclecount(&params_set[i]);
-		}
-
-	}
-
-	return 0;
-}
-
-static int
-test_perf_openssl_optimise_cyclecount(struct perf_test_params *pparams)
-{
-	uint32_t num_to_submit = pparams->total_operations;
-	struct rte_crypto_op *c_ops[num_to_submit];
-	struct rte_crypto_op *proc_ops[num_to_submit];
-	uint64_t failed_polls, retries, start_cycles,
-		end_cycles, total_cycles = 0;
-	uint32_t burst_sent = 0, burst_received = 0;
-	uint32_t i, burst_size, num_sent, num_ops_received;
-
-	struct crypto_testsuite_params *ts_params = &testsuite_params;
-
-	static struct rte_cryptodev_sym_session *sess;
-
-	static struct rte_crypto_op *(*test_perf_set_crypto_op)
-			(struct rte_crypto_op *, struct rte_mbuf *,
-					struct rte_cryptodev_sym_session *,
-					unsigned int,
-					enum chain_mode);
-
-	if (rte_cryptodev_count() == 0) {
-		printf("\nNo crypto devices found. Is PMD build configured?\n");
-		return TEST_FAILED;
-	}
-
-	/* Create Crypto session*/
-	if (test_perf_create_openssl_session(ts_params->dev_id,
-			pparams->chain, pparams->cipher_algo,
-			pparams->key_length, pparams->auth_algo,
-			pparams->aead_algo) == 0)
-		sess = test_crypto_session;
-	else
-		sess = NULL;
-	TEST_ASSERT_NOT_NULL(sess, "Session creation failed");
-
-	/* Generate Crypto op data structure(s)*/
-	for (i = 0; i < num_to_submit ; i++) {
-		struct rte_mbuf *m = test_perf_create_pktmbuf(
-						ts_params->mbuf_mp,
-						pparams->buf_size);
-		TEST_ASSERT_NOT_NULL(m, "Failed to allocate tx_buf");
-
-		struct rte_crypto_op *op =
-				rte_crypto_op_alloc(ts_params->op_mpool,
-						RTE_CRYPTO_OP_TYPE_SYMMETRIC);
-		TEST_ASSERT_NOT_NULL(op, "Failed to allocate op");
-
-		if (pparams->chain == AEAD)
-			test_perf_set_crypto_op =
-						test_perf_set_crypto_op_aes_gcm;
-		else {
-			switch (pparams->cipher_algo) {
-			case RTE_CRYPTO_CIPHER_3DES_CBC:
-			case RTE_CRYPTO_CIPHER_3DES_CTR:
-				test_perf_set_crypto_op = test_perf_set_crypto_op_3des;
-				break;
-			case RTE_CRYPTO_CIPHER_AES_CBC:
-			case RTE_CRYPTO_CIPHER_AES_CTR:
-				test_perf_set_crypto_op = test_perf_set_crypto_op_aes;
-				break;
-			default:
-				return TEST_FAILED;
-			}
-		}
-
-		op = test_perf_set_crypto_op(op, m, sess, pparams->buf_size,
-				pparams->chain);
-		TEST_ASSERT_NOT_NULL(op, "Failed to attach op to session");
-
-		c_ops[i] = op;
-	}
-
-	if (pparams->chain == AEAD)
-		printf("\nOn %s dev%u qp%u, %s, aead_algo:%s, "
-			"key length:%u, Packet Size %u bytes",
-			pmd_name(gbl_driver_id),
-			ts_params->dev_id, 0,
-			chain_mode_name(pparams->chain),
-			rte_crypto_aead_algorithm_strings[pparams->aead_algo],
-			pparams->key_length,
-			pparams->buf_size);
-	else
-		printf("\nOn %s dev%u qp%u, %s, cipher algo:%s, auth_algo:%s, "
-			"key length:%u, Packet Size %u bytes",
-			pmd_name(gbl_driver_id),
-			ts_params->dev_id, 0,
-			chain_mode_name(pparams->chain),
-			rte_crypto_cipher_algorithm_strings[pparams->cipher_algo],
-			rte_crypto_auth_algorithm_strings[pparams->auth_algo],
-			pparams->key_length,
-			pparams->buf_size);
-	printf("\nOps Tx\tOps Rx\tOps/burst  ");
-	printf("Retries  EmptyPolls\tIACycles/CyOp\tIACycles/Burst\t"
-			"IACycles/Byte");
-
-	for (i = 2; i <= 128 ; i *= 2) {
-		num_sent = 0;
-		num_ops_received = 0;
-		retries = 0;
-		failed_polls = 0;
-		burst_size = i;
-		total_cycles = 0;
-		while (num_sent < num_to_submit) {
-			start_cycles = rte_rdtsc_precise();
-			burst_sent = rte_cryptodev_enqueue_burst(
-					ts_params->dev_id,
-					0, &c_ops[num_sent],
-					((num_to_submit - num_sent) <
-						burst_size) ?
-					num_to_submit - num_sent : burst_size);
-			end_cycles = rte_rdtsc_precise();
-			if (burst_sent == 0)
-				retries++;
-			num_sent += burst_sent;
-			total_cycles += (end_cycles - start_cycles);
-
-			/* Wait until requests have been sent. */
-			rte_delay_ms(1);
-
-			start_cycles = rte_rdtsc_precise();
-			burst_received = rte_cryptodev_dequeue_burst(
-					ts_params->dev_id, 0, proc_ops,
-					burst_size);
-			end_cycles = rte_rdtsc_precise();
-			if (burst_received < burst_sent)
-				failed_polls++;
-			num_ops_received += burst_received;
-
-			total_cycles += end_cycles - start_cycles;
-		}
-
-		while (num_ops_received != num_to_submit) {
-			/* Sending 0 length burst to flush sw crypto device */
-			rte_cryptodev_enqueue_burst(ts_params->dev_id, 0,
-					NULL, 0);
-
-			start_cycles = rte_rdtsc_precise();
-			burst_received = rte_cryptodev_dequeue_burst(
-					ts_params->dev_id, 0, proc_ops,
-					burst_size);
-			end_cycles = rte_rdtsc_precise();
-
-			total_cycles += end_cycles - start_cycles;
-			if (burst_received == 0)
-				failed_polls++;
-			num_ops_received += burst_received;
-		}
-
-		printf("\n%u\t%u\t%u", num_sent, num_ops_received, burst_size);
-		printf("\t\t%"PRIu64, retries);
-		printf("\t%"PRIu64, failed_polls);
-		printf("\t\t%"PRIu64, total_cycles/num_ops_received);
-		printf("\t\t%"PRIu64, (total_cycles/num_ops_received) *
-				burst_size);
-		printf("\t\t%"PRIu64,
-				total_cycles /
-				(num_ops_received * pparams->buf_size));
-	}
-	printf("\n");
-
-	for (i = 0; i < num_to_submit ; i++) {
-		rte_pktmbuf_free(c_ops[i]->sym->m_src);
-		rte_crypto_op_free(c_ops[i]);
-	}
-
-	rte_cryptodev_sym_session_clear(ts_params->dev_id, sess);
-	rte_cryptodev_sym_session_free(sess);
-
-	return TEST_SUCCESS;
-}
-
-static int
-test_perf_armv8_optimise_cyclecount(struct perf_test_params *pparams)
-{
-	uint32_t num_to_submit = pparams->total_operations;
-	struct rte_crypto_op *c_ops[num_to_submit];
-	struct rte_crypto_op *proc_ops[num_to_submit];
-	uint64_t failed_polls, retries, start_cycles, end_cycles,
-		 total_cycles = 0;
-	uint32_t burst_sent = 0, burst_received = 0;
-	uint32_t i, burst_size, num_sent, num_ops_received;
-	uint32_t nb_ops;
-
-	struct crypto_testsuite_params *ts_params = &testsuite_params;
-
-	static struct rte_cryptodev_sym_session *sess;
-
-	if (rte_cryptodev_count() == 0) {
-		printf("\nNo crypto devices found. Is PMD build configured?\n");
-		return TEST_FAILED;
-	}
-
-	/* Create Crypto session*/
-	if (test_perf_create_armv8_session(ts_params->dev_id,
-			pparams->chain, pparams->cipher_algo,
-			pparams->key_length, pparams->auth_algo) == 0)
-		sess = test_crypto_session;
-	else
-		sess = NULL;
-
-	/* Generate Crypto op data structure(s)*/
-	for (i = 0; i < num_to_submit ; i++) {
-		struct rte_mbuf *m = test_perf_create_pktmbuf(
-						ts_params->mbuf_mp,
-						pparams->buf_size);
-		TEST_ASSERT_NOT_NULL(m, "Failed to allocate tx_buf");
-
-		struct rte_crypto_op *op =
-				rte_crypto_op_alloc(ts_params->op_mpool,
-						RTE_CRYPTO_OP_TYPE_SYMMETRIC);
-		TEST_ASSERT_NOT_NULL(op, "Failed to allocate op");
-
-		op = test_perf_set_crypto_op_aes(op, m, sess, pparams->buf_size,
-				pparams->chain);
-		TEST_ASSERT_NOT_NULL(op, "Failed to attach op to session");
-
-		c_ops[i] = op;
-	}
-
-	printf("\nOn %s dev%u qp%u, %s, cipher algo:%s, cipher key length:%u, "
-			"auth_algo:%s, Packet Size %u bytes",
-			pmd_name(gbl_driver_id),
-			ts_params->dev_id, 0,
-			chain_mode_name(pparams->chain),
-			rte_crypto_cipher_algorithm_strings[pparams->cipher_algo],
-			pparams->key_length,
-			rte_crypto_auth_algorithm_strings[pparams->auth_algo],
-			pparams->buf_size);
-	printf("\nOps Tx\tOps Rx\tOps/burst  ");
-	printf("Retries  "
-		"EmptyPolls\tIACycles/CyOp\tIACycles/Burst\tIACycles/Byte");
-
-	for (i = 2; i <= 128 ; i *= 2) {
-		num_sent = 0;
-		num_ops_received = 0;
-		retries = 0;
-		failed_polls = 0;
-		burst_size = i;
-		total_cycles = 0;
-		while (num_sent < num_to_submit) {
-			if ((num_to_submit - num_sent) < burst_size)
-				nb_ops = num_to_submit - num_sent;
-			else
-				nb_ops = burst_size;
-
-			start_cycles = rte_rdtsc();
-			burst_sent = rte_cryptodev_enqueue_burst(
-				ts_params->dev_id,
-				0, &c_ops[num_sent],
-				nb_ops);
-			end_cycles = rte_rdtsc();
-
-			if (burst_sent == 0)
-				retries++;
-			num_sent += burst_sent;
-			total_cycles += (end_cycles - start_cycles);
-
-			start_cycles = rte_rdtsc();
-			burst_received = rte_cryptodev_dequeue_burst(
-					ts_params->dev_id, 0, proc_ops,
-					burst_size);
-			end_cycles = rte_rdtsc();
-			if (burst_received < burst_sent)
-				failed_polls++;
-			num_ops_received += burst_received;
-
-			total_cycles += end_cycles - start_cycles;
-		}
-
-		while (num_ops_received != num_to_submit) {
-			/* Sending 0 length burst to flush sw crypto device */
-			rte_cryptodev_enqueue_burst(
-						ts_params->dev_id, 0, NULL, 0);
-
-			start_cycles = rte_rdtsc();
-			burst_received = rte_cryptodev_dequeue_burst(
-				ts_params->dev_id, 0, proc_ops, burst_size);
-			end_cycles = rte_rdtsc();
-
-			total_cycles += end_cycles - start_cycles;
-			if (burst_received == 0)
-				failed_polls++;
-			num_ops_received += burst_received;
-		}
-
-		printf("\n%u\t%u\t%u", num_sent, num_ops_received, burst_size);
-		printf("\t\t%"PRIu64, retries);
-		printf("\t%"PRIu64, failed_polls);
-		printf("\t\t%"PRIu64, total_cycles/num_ops_received);
-		printf("\t\t%"PRIu64,
-			(total_cycles/num_ops_received)*burst_size);
-		printf("\t\t%"PRIu64,
-			total_cycles/(num_ops_received*pparams->buf_size));
-	}
-	printf("\n");
-
-	for (i = 0; i < num_to_submit ; i++) {
-		rte_pktmbuf_free(c_ops[i]->sym->m_src);
-		rte_crypto_op_free(c_ops[i]);
-	}
-
-	return TEST_SUCCESS;
-}
-
-static uint32_t get_auth_key_max_length(enum rte_crypto_auth_algorithm algo)
-{
-	switch (algo) {
-	case RTE_CRYPTO_AUTH_SNOW3G_UIA2:
-		return 16;
-	case RTE_CRYPTO_AUTH_SHA1_HMAC:
-		return 64;
-	case RTE_CRYPTO_AUTH_SHA224_HMAC:
-		return 64;
-	case RTE_CRYPTO_AUTH_SHA256_HMAC:
-		return 64;
-	case RTE_CRYPTO_AUTH_SHA384_HMAC:
-		return 128;
-	case RTE_CRYPTO_AUTH_SHA512_HMAC:
-		return 128;
-	default:
-		return 0;
-	}
-}
-
-static uint32_t get_auth_digest_length(enum rte_crypto_auth_algorithm algo)
-{
-	switch (algo) {
-	case RTE_CRYPTO_AUTH_SNOW3G_UIA2:
-		return 4;
-	case RTE_CRYPTO_AUTH_SHA1_HMAC:
-		return TRUNCATED_DIGEST_BYTE_LENGTH_SHA1;
-	case RTE_CRYPTO_AUTH_SHA224_HMAC:
-		return TRUNCATED_DIGEST_BYTE_LENGTH_SHA224;
-	case RTE_CRYPTO_AUTH_SHA256_HMAC:
-		return TRUNCATED_DIGEST_BYTE_LENGTH_SHA256;
-	case RTE_CRYPTO_AUTH_SHA384_HMAC:
-		return TRUNCATED_DIGEST_BYTE_LENGTH_SHA384;
-	case RTE_CRYPTO_AUTH_SHA512_HMAC:
-		return TRUNCATED_DIGEST_BYTE_LENGTH_SHA512;
-	default:
-		return 0;
-	}
-}
-
-static uint32_t get_aead_digest_length(enum rte_crypto_aead_algorithm algo)
-{
-	switch (algo) {
-	case RTE_CRYPTO_AEAD_AES_GCM:
-		return DIGEST_BYTE_LENGTH_AES_GCM;
-	default:
-		return 0;
-	}
-}
-
-static uint8_t aes_key[] = {
-		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
-};
-
-static uint8_t aes_iv[] = {
-		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
-};
-
-static uint8_t aes_gcm_aad[] = {
-		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
-};
-
-static uint8_t triple_des_key[] = {
-		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-};
-
-static uint8_t triple_des_iv[] = {
-		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-};
-
-static uint8_t hmac_sha_key[] = {
-		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
-};
-
-static uint8_t snow3g_cipher_key[] = {
-		0x2B, 0xD6, 0x45, 0x9F, 0x82, 0xC5, 0xB3, 0x00,
-		0x95, 0x2C, 0x49, 0x10, 0x48, 0x81, 0xFF, 0x48
-};
-
-static uint8_t snow3g_iv[] = {
-		0x72, 0xA4, 0xF2, 0x0F, 0x64, 0x00, 0x00, 0x00,
-		0x72, 0xA4, 0xF2, 0x0F, 0x64, 0x00, 0x00, 0x00
-};
-
-static uint8_t snow3g_hash_key[] = {
-		0xC7, 0x36, 0xC6, 0xAA, 0xB2, 0x2B, 0xFF, 0xF9,
-		0x1E, 0x26, 0x98, 0xD2, 0xE2, 0x2A, 0xD5, 0x7E
-};
-
-static int
-test_perf_create_aes_sha_session(uint8_t dev_id, enum chain_mode chain,
-		enum rte_crypto_cipher_algorithm cipher_algo,
-		unsigned cipher_key_len,
-		enum rte_crypto_auth_algorithm auth_algo)
-{
-	struct crypto_testsuite_params *ts_params = &testsuite_params;
-	struct rte_crypto_sym_xform cipher_xform = { 0 };
-	struct rte_crypto_sym_xform auth_xform = { 0 };
-
-
-	/* Setup Cipher Parameters */
-	cipher_xform.type = RTE_CRYPTO_SYM_XFORM_CIPHER;
-	cipher_xform.cipher.algo = cipher_algo;
-	cipher_xform.cipher.op = RTE_CRYPTO_CIPHER_OP_ENCRYPT;
-
-	cipher_xform.cipher.key.data = aes_key;
-	cipher_xform.cipher.key.length = cipher_key_len;
-	cipher_xform.cipher.iv.offset = IV_OFFSET;
-	cipher_xform.cipher.iv.length = AES_CIPHER_IV_LENGTH;
-	if (chain != CIPHER_ONLY) {
-		/* Setup HMAC Parameters */
-		auth_xform.type = RTE_CRYPTO_SYM_XFORM_AUTH;
-		auth_xform.auth.op = RTE_CRYPTO_AUTH_OP_GENERATE;
-		auth_xform.auth.algo = auth_algo;
-		auth_xform.auth.key.data = hmac_sha_key;
-		auth_xform.auth.key.length = get_auth_key_max_length(auth_algo);
-		auth_xform.auth.digest_length =
-					get_auth_digest_length(auth_algo);
-	}
-
-	test_crypto_session = rte_cryptodev_sym_session_create(ts_params->sess_mp);
-	switch (chain) {
-	case CIPHER_HASH:
-		cipher_xform.next = &auth_xform;
-		auth_xform.next = NULL;
-		/* Create Crypto session*/
-		return rte_cryptodev_sym_session_init(dev_id,
-				test_crypto_session, &cipher_xform,
-				ts_params->sess_mp);
-	case HASH_CIPHER:
-		auth_xform.next = &cipher_xform;
-		cipher_xform.next = NULL;
-		/* Create Crypto session*/
-		return rte_cryptodev_sym_session_init(dev_id,
-				test_crypto_session, &auth_xform,
-				ts_params->sess_mp);
-	case CIPHER_ONLY:
-		cipher_xform.next = NULL;
-		/* Create Crypto session*/
-		return rte_cryptodev_sym_session_init(dev_id,
-				test_crypto_session, &cipher_xform,
-				ts_params->sess_mp);
-	default:
-		return -1;
-	}
-}
-
-#define SNOW3G_CIPHER_IV_LENGTH 16
-
-static int
-test_perf_create_snow3g_session(uint8_t dev_id, enum chain_mode chain,
-		enum rte_crypto_cipher_algorithm cipher_algo, unsigned cipher_key_len,
-		enum rte_crypto_auth_algorithm auth_algo)
-{
-	struct crypto_testsuite_params *ts_params = &testsuite_params;
-	struct rte_crypto_sym_xform cipher_xform = {0};
-	struct rte_crypto_sym_xform auth_xform = {0};
-
-
-	/* Setup Cipher Parameters */
-	cipher_xform.type = RTE_CRYPTO_SYM_XFORM_CIPHER;
-	cipher_xform.cipher.algo = cipher_algo;
-	cipher_xform.cipher.op = RTE_CRYPTO_CIPHER_OP_ENCRYPT;
-
-	cipher_xform.cipher.key.data = snow3g_cipher_key;
-	cipher_xform.cipher.key.length = cipher_key_len;
-	cipher_xform.cipher.iv.offset = IV_OFFSET;
-	cipher_xform.cipher.iv.length = SNOW3G_CIPHER_IV_LENGTH;
-
-
-	/* Setup HMAC Parameters */
-	auth_xform.type = RTE_CRYPTO_SYM_XFORM_AUTH;
-	auth_xform.auth.op = RTE_CRYPTO_AUTH_OP_GENERATE;
-	auth_xform.auth.algo = auth_algo;
-
-	auth_xform.auth.key.data = snow3g_hash_key;
-	auth_xform.auth.key.length =  get_auth_key_max_length(auth_algo);
-	auth_xform.auth.digest_length = get_auth_digest_length(auth_algo);
-	/* Auth IV will be after cipher IV */
-	auth_xform.auth.iv.offset = IV_OFFSET + SNOW3G_CIPHER_IV_LENGTH;
-	auth_xform.auth.iv.length = SNOW3G_CIPHER_IV_LENGTH;
-
-	test_crypto_session = rte_cryptodev_sym_session_create(ts_params->sess_mp);
-	switch (chain) {
-	case CIPHER_HASH:
-		cipher_xform.next = &auth_xform;
-		auth_xform.next = NULL;
-		/* Create Crypto session*/
-		return rte_cryptodev_sym_session_init(dev_id,
-				test_crypto_session, &cipher_xform,
-				ts_params->sess_mp);
-	case HASH_CIPHER:
-		auth_xform.next = &cipher_xform;
-		cipher_xform.next = NULL;
-		/* Create Crypto session*/
-		return rte_cryptodev_sym_session_init(dev_id,
-				test_crypto_session, &auth_xform,
-				ts_params->sess_mp);
-	case CIPHER_ONLY:
-		cipher_xform.next = NULL;
-		/* Create Crypto session*/
-		return rte_cryptodev_sym_session_init(dev_id,
-				test_crypto_session, &cipher_xform,
-				ts_params->sess_mp);
-	case HASH_ONLY:
-		auth_xform.next = NULL;
-		/* Create Crypto session */
-		return rte_cryptodev_sym_session_init(dev_id,
-				test_crypto_session, &auth_xform,
-				ts_params->sess_mp);
-	default:
-		return -1;
-	}
-}
-
-static int
-test_perf_create_openssl_session(uint8_t dev_id, enum chain_mode chain,
-		enum rte_crypto_cipher_algorithm cipher_algo,
-		unsigned int key_len,
-		enum rte_crypto_auth_algorithm auth_algo,
-		enum rte_crypto_aead_algorithm aead_algo)
-{
-	struct crypto_testsuite_params *ts_params = &testsuite_params;
-	struct rte_crypto_sym_xform cipher_xform = { 0 };
-	struct rte_crypto_sym_xform auth_xform = { 0 };
-	struct rte_crypto_sym_xform aead_xform = { 0 };
-
-	if (chain == CIPHER_HASH || chain == HASH_CIPHER) {
-		/* Setup Cipher Parameters */
-		cipher_xform.type = RTE_CRYPTO_SYM_XFORM_CIPHER;
-		cipher_xform.cipher.algo = cipher_algo;
-		cipher_xform.cipher.iv.offset = IV_OFFSET;
-		cipher_xform.cipher.op = RTE_CRYPTO_CIPHER_OP_ENCRYPT;
-
-		switch (cipher_algo) {
-		case RTE_CRYPTO_CIPHER_3DES_CBC:
-		case RTE_CRYPTO_CIPHER_3DES_CTR:
-			cipher_xform.cipher.key.data = triple_des_key;
-			cipher_xform.cipher.iv.length = TRIPLE_DES_CIPHER_IV_LENGTH;
-			break;
-		case RTE_CRYPTO_CIPHER_AES_CBC:
-		case RTE_CRYPTO_CIPHER_AES_CTR:
-			cipher_xform.cipher.key.data = aes_key;
-			cipher_xform.cipher.iv.length = AES_CIPHER_IV_LENGTH;
-			break;
-		default:
-			return -1;
-		}
-
-		cipher_xform.cipher.key.length = key_len;
-
-		/* Setup Auth Parameters */
-		auth_xform.type = RTE_CRYPTO_SYM_XFORM_AUTH;
-		auth_xform.auth.op = RTE_CRYPTO_AUTH_OP_GENERATE;
-		auth_xform.auth.algo = auth_algo;
-
-		switch (auth_algo) {
-		case RTE_CRYPTO_AUTH_SHA1_HMAC:
-			auth_xform.auth.key.data = hmac_sha_key;
-			break;
-		default:
-			return -1;
-		}
-
-		auth_xform.auth.key.length =  get_auth_key_max_length(auth_algo);
-		auth_xform.auth.digest_length = get_auth_digest_length(auth_algo);
-	} else if (chain == AEAD) {
-		/* Setup AEAD Parameters */
-		aead_xform.type = RTE_CRYPTO_SYM_XFORM_AEAD;
-		aead_xform.aead.op = RTE_CRYPTO_AEAD_OP_ENCRYPT;
-		aead_xform.aead.algo = aead_algo;
-		aead_xform.aead.iv.offset = IV_OFFSET;
-
-		switch (aead_algo) {
-		case RTE_CRYPTO_AEAD_AES_GCM:
-			aead_xform.aead.key.data = aes_key;
-			aead_xform.aead.iv.length = AES_CIPHER_IV_LENGTH;
-			aead_xform.aead.aad_length = AES_GCM_AAD_LENGTH;
-			aead_xform.aead.digest_length = get_aead_digest_length(aead_algo);
-			break;
-		default:
-			return -1;
-		}
-
-		aead_xform.aead.key.length = key_len;
-	}
-
-	test_crypto_session = rte_cryptodev_sym_session_create(ts_params->sess_mp);
-	switch (chain) {
-	case CIPHER_HASH:
-		cipher_xform.next = &auth_xform;
-		auth_xform.next = NULL;
-		/* Create Crypto session*/
-		return rte_cryptodev_sym_session_init(dev_id,
-				test_crypto_session, &cipher_xform,
-				ts_params->sess_mp);
-	case HASH_CIPHER:
-		auth_xform.next = &cipher_xform;
-		cipher_xform.next = NULL;
-		/* Create Crypto session*/
-		return rte_cryptodev_sym_session_init(dev_id,
-				test_crypto_session, &auth_xform,
-				ts_params->sess_mp);
-	case AEAD:
-		/* Create Crypto session*/
-		return rte_cryptodev_sym_session_init(dev_id,
-				test_crypto_session, &aead_xform,
-				ts_params->sess_mp);
-	default:
-		return -1;
-	}
-}
-
-static int
-test_perf_create_armv8_session(uint8_t dev_id, enum chain_mode chain,
-		enum rte_crypto_cipher_algorithm cipher_algo,
-		unsigned int cipher_key_len,
-		enum rte_crypto_auth_algorithm auth_algo)
-{
-	struct crypto_testsuite_params *ts_params = &testsuite_params;
-	struct rte_crypto_sym_xform cipher_xform = { 0 };
-	struct rte_crypto_sym_xform auth_xform = { 0 };
-
-	/* Setup Cipher Parameters */
-	cipher_xform.type = RTE_CRYPTO_SYM_XFORM_CIPHER;
-	cipher_xform.cipher.algo = cipher_algo;
-
-	switch (cipher_algo) {
-	case RTE_CRYPTO_CIPHER_AES_CBC:
-		cipher_xform.cipher.key.data = aes_cbc_128_key;
-		break;
-	default:
-		return -1;
-	}
-
-	cipher_xform.cipher.key.length = cipher_key_len;
-	cipher_xform.cipher.iv.offset = IV_OFFSET;
-	cipher_xform.cipher.iv.length = AES_CIPHER_IV_LENGTH;
-
-	/* Setup Auth Parameters */
-	auth_xform.type = RTE_CRYPTO_SYM_XFORM_AUTH;
-	auth_xform.auth.op = RTE_CRYPTO_AUTH_OP_GENERATE;
-	auth_xform.auth.algo = auth_algo;
-
-	auth_xform.auth.digest_length = get_auth_digest_length(auth_algo);
-
-	test_crypto_session = rte_cryptodev_sym_session_create(ts_params->sess_mp);
-
-	switch (chain) {
-	case CIPHER_HASH:
-		cipher_xform.next = &auth_xform;
-		auth_xform.next = NULL;
-		/* Encrypt and hash the result */
-		cipher_xform.cipher.op = RTE_CRYPTO_CIPHER_OP_ENCRYPT;
-		/* Create Crypto session*/
-		return rte_cryptodev_sym_session_init(dev_id,
-				test_crypto_session, &cipher_xform,
-				ts_params->sess_mp);
-	case HASH_CIPHER:
-		auth_xform.next = &cipher_xform;
-		cipher_xform.next = NULL;
-		/* Hash encrypted message and decrypt */
-		cipher_xform.cipher.op = RTE_CRYPTO_CIPHER_OP_DECRYPT;
-		/* Create Crypto session*/
-		return rte_cryptodev_sym_session_init(dev_id,
-				test_crypto_session, &auth_xform,
-				ts_params->sess_mp);
-	default:
-		return -1;
-	}
-}
-
-static struct rte_mbuf *
-test_perf_create_pktmbuf(struct rte_mempool *mpool, unsigned buf_sz)
-{
-	struct rte_mbuf *m = rte_pktmbuf_alloc(mpool);
-
-	if (rte_pktmbuf_append(m, buf_sz) == NULL) {
-		rte_pktmbuf_free(m);
-		return NULL;
-	}
-
-	memset(rte_pktmbuf_mtod(m, uint8_t *), 0, buf_sz);
-
-	return m;
-}
-
-static inline struct rte_crypto_op *
-test_perf_set_crypto_op_aes(struct rte_crypto_op *op, struct rte_mbuf *m,
-		struct rte_cryptodev_sym_session *sess, unsigned int data_len,
-		enum chain_mode chain)
-{
-	if (rte_crypto_op_attach_sym_session(op, sess) != 0) {
-		rte_crypto_op_free(op);
-		return NULL;
-	}
-
-	/* Authentication Parameters */
-	if (chain == CIPHER_ONLY) {
-		op->sym->auth.digest.data = NULL;
-		op->sym->auth.digest.phys_addr = 0;
-		op->sym->auth.data.offset = 0;
-		op->sym->auth.data.length = 0;
-	} else {
-		op->sym->auth.digest.data = rte_pktmbuf_mtod_offset(m,
-				 uint8_t *, data_len);
-		op->sym->auth.digest.phys_addr = rte_pktmbuf_mtophys_offset(m,
-				data_len);
-		op->sym->auth.data.offset = 0;
-		op->sym->auth.data.length = data_len;
-	}
-
-
-	/* Copy the IV at the end of the crypto operation */
-	rte_memcpy(rte_crypto_op_ctod_offset(op, uint8_t *, IV_OFFSET),
-			aes_iv, AES_CIPHER_IV_LENGTH);
-
-	/* Cipher Parameters */
-	op->sym->cipher.data.offset = 0;
-	op->sym->cipher.data.length = data_len;
-
-	op->sym->m_src = m;
-
-	return op;
-}
-
-static inline struct rte_crypto_op *
-test_perf_set_crypto_op_aes_gcm(struct rte_crypto_op *op, struct rte_mbuf *m,
-		struct rte_cryptodev_sym_session *sess, unsigned int data_len,
-		enum chain_mode chain __rte_unused)
-{
-	if (rte_crypto_op_attach_sym_session(op, sess) != 0) {
-		rte_crypto_op_free(op);
-		return NULL;
-	}
-
-	/* Authentication Parameters */
-	op->sym->aead.digest.data = (uint8_t *)m->buf_addr +
-					(m->data_off + data_len);
-	op->sym->aead.digest.phys_addr =
-				rte_pktmbuf_mtophys_offset(m, data_len);
-	op->sym->aead.aad.data = aes_gcm_aad;
-
-	/* Copy IV at the end of the crypto operation */
-	rte_memcpy(rte_crypto_op_ctod_offset(op, uint8_t *, IV_OFFSET),
-			aes_iv, AES_CIPHER_IV_LENGTH);
-
-	/* Data lengths/offsets Parameters */
-	op->sym->aead.data.offset = 0;
-	op->sym->aead.data.length = data_len;
-
-	op->sym->m_src = m;
-
-	return op;
-}
-
-static inline struct rte_crypto_op *
-test_perf_set_crypto_op_snow3g(struct rte_crypto_op *op, struct rte_mbuf *m,
-		struct rte_cryptodev_sym_session *sess, unsigned int data_len)
-{
-	uint8_t *iv_ptr = rte_crypto_op_ctod_offset(op,
-			uint8_t *, IV_OFFSET);
-
-	if (rte_crypto_op_attach_sym_session(op, sess) != 0) {
-		rte_crypto_op_free(op);
-		return NULL;
-	}
-
-	rte_memcpy(iv_ptr, snow3g_iv, SNOW3G_CIPHER_IV_LENGTH);
-
-	/* Authentication Parameters */
-	op->sym->auth.digest.data = (uint8_t *)m->buf_addr +
-						(m->data_off + data_len);
-	op->sym->auth.digest.phys_addr =
-				rte_pktmbuf_mtophys_offset(m, data_len);
-
-	/* Data lengths/offsets Parameters */
-	op->sym->auth.data.offset = 0;
-	op->sym->auth.data.length = data_len << 3;
-
-	op->sym->cipher.data.offset = 0;
-	op->sym->cipher.data.length = data_len << 3;
-
-	op->sym->m_src = m;
-
-	return op;
-}
-
-static inline struct rte_crypto_op *
-test_perf_set_crypto_op_snow3g_cipher(struct rte_crypto_op *op,
-		struct rte_mbuf *m,
-		struct rte_cryptodev_sym_session *sess,
-		unsigned data_len)
-{
-	if (rte_crypto_op_attach_sym_session(op, sess) != 0) {
-		rte_crypto_op_free(op);
-		return NULL;
-	}
-
-	/* Copy IV at the end of the crypto operation */
-	rte_memcpy(rte_crypto_op_ctod_offset(op, uint8_t *, IV_OFFSET),
-			snow3g_iv, SNOW3G_CIPHER_IV_LENGTH);
-
-	/* Cipher Parameters */
-	op->sym->cipher.data.offset = 0;
-	op->sym->cipher.data.length = data_len << 3;
-
-	rte_memcpy(rte_crypto_op_ctod_offset(op, uint8_t *, IV_OFFSET),
-			snow3g_iv,
-			SNOW3G_CIPHER_IV_LENGTH);
-
-	op->sym->m_src = m;
-
-	return op;
-}
-
-
-static inline struct rte_crypto_op *
-test_perf_set_crypto_op_snow3g_hash(struct rte_crypto_op *op,
-		struct rte_mbuf *m,
-		struct rte_cryptodev_sym_session *sess,
-		unsigned int data_len)
-{
-	uint8_t *iv_ptr = rte_crypto_op_ctod_offset(op,
-			uint8_t *, IV_OFFSET);
-
-	if (rte_crypto_op_attach_sym_session(op, sess) != 0) {
-		rte_crypto_op_free(op);
-		return NULL;
-	}
-
-	rte_memcpy(iv_ptr, snow3g_iv, SNOW3G_CIPHER_IV_LENGTH);
-
-	/* Authentication Parameters */
-
-	op->sym->auth.digest.data =
-			(uint8_t *)rte_pktmbuf_mtod_offset(m, uint8_t *,
-			data_len);
-	op->sym->auth.digest.phys_addr =
-				rte_pktmbuf_mtophys_offset(m, data_len +
-					SNOW3G_CIPHER_IV_LENGTH);
-
-	/* Data lengths/offsets Parameters */
-	op->sym->auth.data.offset = 0;
-	op->sym->auth.data.length = data_len << 3;
-
-	op->sym->m_src = m;
-
-	return op;
-}
-
-
-static inline struct rte_crypto_op *
-test_perf_set_crypto_op_3des(struct rte_crypto_op *op, struct rte_mbuf *m,
-		struct rte_cryptodev_sym_session *sess, unsigned int data_len,
-		enum chain_mode chain __rte_unused)
-{
-	if (rte_crypto_op_attach_sym_session(op, sess) != 0) {
-		rte_crypto_op_free(op);
-		return NULL;
-	}
-
-	/* Authentication Parameters */
-	op->sym->auth.digest.data = (uint8_t *)m->buf_addr +
-					(m->data_off + data_len);
-	op->sym->auth.digest.phys_addr =
-				rte_pktmbuf_mtophys_offset(m, data_len);
-
-	/* Copy IV at the end of the crypto operation */
-	rte_memcpy(rte_crypto_op_ctod_offset(op, uint8_t *, IV_OFFSET),
-			triple_des_iv, TRIPLE_DES_CIPHER_IV_LENGTH);
-
-	/* Data lengths/offsets Parameters */
-	op->sym->auth.data.offset = 0;
-	op->sym->auth.data.length = data_len;
-
-	op->sym->cipher.data.offset = 0;
-	op->sym->cipher.data.length = data_len;
-
-	op->sym->m_src = m;
-
-	return op;
-}
-
-/* An mbuf set is used in each burst. An mbuf can be used by multiple bursts at
- * same time, i.e. as they're not dereferenced there's no need to wait until
- * finished with to re-use */
-#define NUM_MBUF_SETS 8
-
-static int
-test_perf_aes_sha(uint8_t dev_id, uint16_t queue_id,
-		struct perf_test_params *pparams)
-{
-	uint16_t i, k, l, m;
-	uint16_t j = 0;
-	uint16_t ops_unused = 0;
-
-	uint64_t burst_enqueued = 0, total_enqueued = 0, burst_dequeued = 0;
-	uint64_t processed = 0, failed_polls = 0, retries = 0;
-	uint64_t tsc_start = 0, tsc_end = 0;
-
-	uint16_t digest_length = get_auth_digest_length(pparams->auth_algo);
-
-	struct rte_crypto_op *ops[pparams->burst_size];
-	struct rte_crypto_op *proc_ops[pparams->burst_size];
-
-	struct rte_mbuf *mbufs[pparams->burst_size * 8];
-
-	struct crypto_testsuite_params *ts_params = &testsuite_params;
-
-	static struct rte_cryptodev_sym_session *sess;
-
-	if (rte_cryptodev_count() == 0) {
-		printf("\nNo crypto devices available. Is kernel driver loaded?\n");
-		return TEST_FAILED;
-	}
-
-	/* Create Crypto session*/
-	if (test_perf_create_aes_sha_session(ts_params->dev_id,
-			pparams->chain, pparams->cipher_algo,
-			pparams->key_length, pparams->auth_algo) == 0)
-		sess = test_crypto_session;
-	else
-		sess = NULL;
-	TEST_ASSERT_NOT_NULL(sess, "Session creation failed");
-
-	/* Generate a burst of crypto operations */
-	for (i = 0; i < (pparams->burst_size * NUM_MBUF_SETS); i++) {
-		mbufs[i] = test_perf_create_pktmbuf(
-				ts_params->mbuf_mp,
-				pparams->buf_size);
-
-		if (mbufs[i] == NULL) {
-			printf("\nFailed to get mbuf - freeing the rest.\n");
-			for (k = 0; k < i; k++)
-				rte_pktmbuf_free(mbufs[k]);
-			return -1;
-		}
-
-		/* Make room for Digest in mbuf */
-		if (pparams->chain != CIPHER_ONLY)
-			rte_pktmbuf_append(mbufs[i], digest_length);
-	}
-
-
-	tsc_start = rte_rdtsc_precise();
-
-	while (total_enqueued < pparams->total_operations) {
-		uint16_t burst_size =
-		total_enqueued+pparams->burst_size <= pparams->total_operations ?
-		pparams->burst_size : pparams->total_operations-total_enqueued;
-		uint16_t ops_needed = burst_size-ops_unused;
-
-		if (ops_needed != rte_crypto_op_bulk_alloc(ts_params->op_mpool,
-				RTE_CRYPTO_OP_TYPE_SYMMETRIC, ops, ops_needed)){
-			printf("\nFailed to alloc enough ops, finish dequeuing "
-				"and free ops below.");
-		} else {
-			for (i = 0; i < ops_needed; i++)
-				ops[i] = test_perf_set_crypto_op_aes(ops[i],
-					mbufs[i + (pparams->burst_size *
-						(j % NUM_MBUF_SETS))],
-					sess, pparams->buf_size,
-					pparams->chain);
-
-			/* enqueue burst */
-			burst_enqueued = rte_cryptodev_enqueue_burst(dev_id,
-					queue_id, ops, burst_size);
-
-			if (burst_enqueued < burst_size)
-				retries++;
-
-			ops_unused = burst_size-burst_enqueued;
-			total_enqueued += burst_enqueued;
-		}
-
-		/* dequeue burst */
-		burst_dequeued = rte_cryptodev_dequeue_burst(dev_id, queue_id,
-				proc_ops, pparams->burst_size);
-		if (burst_dequeued == 0)
-			failed_polls++;
-		else {
-			processed += burst_dequeued;
-
-			for (l = 0; l < burst_dequeued; l++)
-				rte_crypto_op_free(proc_ops[l]);
-		}
-		j++;
-	}
-
-	/* Dequeue any operations still in the crypto device */
-	while (processed < pparams->total_operations) {
-		/* Sending 0 length burst to flush sw crypto device */
-		rte_cryptodev_enqueue_burst(dev_id, queue_id, NULL, 0);
-
-		/* dequeue burst */
-		burst_dequeued = rte_cryptodev_dequeue_burst(dev_id, queue_id,
-				proc_ops, pparams->burst_size);
-		if (burst_dequeued == 0)
-			failed_polls++;
-		else {
-			processed += burst_dequeued;
-
-			for (m = 0; m < burst_dequeued; m++)
-				rte_crypto_op_free(proc_ops[m]);
-		}
-	}
-
-	tsc_end = rte_rdtsc_precise();
-
-	double ops_s = ((double)processed / (tsc_end - tsc_start)) * rte_get_tsc_hz();
-	double throughput = (ops_s * pparams->buf_size * 8) / 1000000000;
-
-	printf("\t%u\t%6.2f\t%10.2f\t%8"PRIu64"\t%8"PRIu64, pparams->buf_size, ops_s/1000000,
-			throughput, retries, failed_polls);
-
-	for (i = 0; i < pparams->burst_size * NUM_MBUF_SETS; i++)
-		rte_pktmbuf_free(mbufs[i]);
-
-	rte_cryptodev_sym_session_clear(ts_params->dev_id, sess);
-	rte_cryptodev_sym_session_free(sess);
-
-	printf("\n");
-	return TEST_SUCCESS;
-}
-
-
-static int
-test_perf_snow3g(uint8_t dev_id, uint16_t queue_id,
-		struct perf_test_params *pparams)
-{
-	uint16_t i, k, l, m;
-	uint16_t j = 0;
-	uint16_t ops_unused = 0;
-	uint64_t burst_enqueued = 0, total_enqueued = 0, burst_dequeued = 0;
-	uint64_t processed = 0, failed_polls = 0, retries = 0;
-	uint64_t tsc_start = 0, tsc_end = 0;
-
-	uint16_t digest_length = get_auth_digest_length(pparams->auth_algo);
-
-	struct rte_crypto_op *ops[pparams->burst_size];
-	struct rte_crypto_op *proc_ops[pparams->burst_size];
-
-	struct rte_mbuf *mbufs[pparams->burst_size * NUM_MBUF_SETS];
-
-	struct crypto_testsuite_params *ts_params = &testsuite_params;
-
-	static struct rte_cryptodev_sym_session *sess;
-
-	if (rte_cryptodev_count() == 0) {
-		printf("\nNo crypto devices found. Is PMD build configured?\n");
-		printf("\nAnd is kernel driver loaded for HW PMDs?\n");
-		return TEST_FAILED;
-	}
-
-	/* Create Crypto session*/
-	if (test_perf_create_snow3g_session(ts_params->dev_id,
-			pparams->chain, pparams->cipher_algo,
-			pparams->key_length, pparams->auth_algo) == 0)
-		sess = test_crypto_session;
-	else
-		sess = NULL;
-	TEST_ASSERT_NOT_NULL(sess, "Session creation failed");
-
-	/* Generate a burst of crypto operations */
-	for (i = 0; i < (pparams->burst_size * NUM_MBUF_SETS); i++) {
-		/*
-		 * Buffer size is allocated, for perf tests they
-		 * are equal + digest len.
-		 */
-		mbufs[i] = test_perf_create_pktmbuf(
-				ts_params->mbuf_mp,
-				pparams->buf_size  +
-				digest_length);
-
-		if (mbufs[i] == NULL) {
-			printf("\nFailed to get mbuf - freeing the rest.\n");
-			for (k = 0; k < i; k++)
-				rte_pktmbuf_free(mbufs[k]);
-			return -1;
-		}
-
-	}
-
-	tsc_start = rte_rdtsc_precise();
-
-	while (total_enqueued < pparams->total_operations) {
-		uint16_t burst_size =
-				(total_enqueued+pparams->burst_size)
-						<= pparams->total_operations ?
-		pparams->burst_size : pparams->total_operations-total_enqueued;
-		uint16_t ops_needed = burst_size-ops_unused;
-		/* Handle the last burst correctly */
-		uint16_t op_offset = pparams->burst_size - burst_size;
-
-		if (ops_needed !=
-			rte_crypto_op_bulk_alloc(ts_params->op_mpool,
-						RTE_CRYPTO_OP_TYPE_SYMMETRIC,
-						ops+op_offset, ops_needed)) {
-			printf("\nFailed to alloc enough ops.");
-			/*Don't exit, dequeue, more ops should become available*/
-		} else {
-			for (i = 0; i < ops_needed; i++) {
-				if (pparams->chain == HASH_ONLY)
-					ops[i+op_offset] =
-					test_perf_set_crypto_op_snow3g_hash(ops[i+op_offset],
-					mbufs[i +
-					  (pparams->burst_size * (j % NUM_MBUF_SETS))],
-					sess,
-					pparams->buf_size);
-				else if (pparams->chain == CIPHER_ONLY)
-					ops[i+op_offset] =
-					test_perf_set_crypto_op_snow3g_cipher(ops[i+op_offset],
-					mbufs[i +
-					  (pparams->burst_size * (j % NUM_MBUF_SETS))],
-					sess,
-					pparams->buf_size);
-				else
-					return 1;
-			}
-
-			/* enqueue burst */
-			burst_enqueued =
-				rte_cryptodev_enqueue_burst(dev_id, queue_id,
-						ops+op_offset, burst_size);
-
-			if (burst_enqueued < burst_size)
-				retries++;
-
-			ops_unused = burst_size-burst_enqueued;
-			total_enqueued += burst_enqueued;
-		}
-
-		/* dequeue burst */
-		burst_dequeued = rte_cryptodev_dequeue_burst(dev_id, queue_id,
-					proc_ops, pparams->burst_size);
-		if (burst_dequeued == 0) {
-			failed_polls++;
-		} else {
-			processed += burst_dequeued;
-			for (l = 0; l < burst_dequeued; l++)
-				rte_crypto_op_free(proc_ops[l]);
-		}
-		j++;
-	}
-
-	/* Dequeue any operations still in the crypto device */
-	while (processed < pparams->total_operations) {
-		/* Sending 0 length burst to flush sw crypto device */
-		rte_cryptodev_enqueue_burst(dev_id, queue_id, NULL, 0);
-
-		/* dequeue burst */
-		burst_dequeued = rte_cryptodev_dequeue_burst(dev_id, queue_id,
-				proc_ops, pparams->burst_size);
-		if (burst_dequeued == 0)
-			failed_polls++;
-		else {
-			processed += burst_dequeued;
-			for (m = 0; m < burst_dequeued; m++)
-				rte_crypto_op_free(proc_ops[m]);
-		}
-	}
-
-	tsc_end = rte_rdtsc_precise();
-
-	double ops_s = ((double)processed / (tsc_end - tsc_start)) * rte_get_tsc_hz();
-	double cycles_burst = (double) (tsc_end - tsc_start) /
-					(double) processed * pparams->burst_size;
-	double cycles_buff = (double) (tsc_end - tsc_start) / (double) processed;
-	double cycles_B = cycles_buff / pparams->buf_size;
-	double throughput = (ops_s * pparams->buf_size * 8) / 1000000;
-
-	if (gbl_driver_id == rte_cryptodev_driver_id_get(
-			RTE_STR(CRYPTODEV_NAME_QAT_SYM_PMD))) {
-		/* Cycle count misleading on HW devices for this test, so don't print */
-		printf("%4u\t%6.2f\t%10.2f\t n/a \t\t n/a "
-			"\t\t n/a \t\t%8"PRIu64"\t%8"PRIu64,
-			pparams->buf_size, ops_s/1000000,
-			throughput, retries, failed_polls);
-	} else {
-		printf("%4u\t%6.2f\t%10.2f\t%10.2f\t%8.2f"
-			"\t%8.2f\t%8"PRIu64"\t%8"PRIu64,
-			pparams->buf_size, ops_s/1000000, throughput, cycles_burst,
-			cycles_buff, cycles_B, retries, failed_polls);
-	}
-
-	for (i = 0; i < pparams->burst_size * NUM_MBUF_SETS; i++)
-		rte_pktmbuf_free(mbufs[i]);
-
-	rte_cryptodev_sym_session_clear(ts_params->dev_id, sess);
-	rte_cryptodev_sym_session_free(sess);
-
-	printf("\n");
-	return TEST_SUCCESS;
-}
-
-static int
-test_perf_openssl(uint8_t dev_id, uint16_t queue_id,
-		struct perf_test_params *pparams)
-{
-	uint16_t i, k, l, m;
-	uint16_t j = 0;
-	uint16_t ops_unused = 0;
-
-	uint64_t burst_enqueued = 0, total_enqueued = 0, burst_dequeued = 0;
-	uint64_t processed = 0, failed_polls = 0, retries = 0;
-	uint64_t tsc_start = 0, tsc_end = 0;
-
-	struct rte_crypto_op *ops[pparams->burst_size];
-	struct rte_crypto_op *proc_ops[pparams->burst_size];
-
-	struct rte_mbuf *mbufs[pparams->burst_size * NUM_MBUF_SETS];
-
-	struct crypto_testsuite_params *ts_params = &testsuite_params;
-
-	static struct rte_cryptodev_sym_session *sess;
-
-	static struct rte_crypto_op *(*test_perf_set_crypto_op)
-			(struct rte_crypto_op *, struct rte_mbuf *,
-					struct rte_cryptodev_sym_session *,
-					unsigned int,
-					enum chain_mode);
-
-	if (pparams->chain == AEAD)
-		test_perf_set_crypto_op =
-					test_perf_set_crypto_op_aes_gcm;
-	else {
-		switch (pparams->cipher_algo) {
-		case RTE_CRYPTO_CIPHER_3DES_CBC:
-		case RTE_CRYPTO_CIPHER_3DES_CTR:
-			test_perf_set_crypto_op = test_perf_set_crypto_op_3des;
-			break;
-		case RTE_CRYPTO_CIPHER_AES_CBC:
-		case RTE_CRYPTO_CIPHER_AES_CTR:
-			test_perf_set_crypto_op = test_perf_set_crypto_op_aes;
-			break;
-		default:
-			return TEST_FAILED;
-		}
-	}
-
-	if (rte_cryptodev_count() == 0) {
-		printf("\nNo crypto devices found. Is PMD build configured?\n");
-		return TEST_FAILED;
-	}
-
-	/* Create Crypto session*/
-	if (test_perf_create_openssl_session(ts_params->dev_id,
-			pparams->chain, pparams->cipher_algo,
-			pparams->key_length, pparams->auth_algo,
-			pparams->aead_algo) == 0)
-		sess = test_crypto_session;
-	else
-		sess = NULL;
-	TEST_ASSERT_NOT_NULL(sess, "Session creation failed");
-
-	/* Generate a burst of crypto operations */
-	for (i = 0; i < (pparams->burst_size * NUM_MBUF_SETS); i++) {
-		mbufs[i] = test_perf_create_pktmbuf(
-				ts_params->mbuf_mp,
-				pparams->buf_size);
-
-		if (mbufs[i] == NULL) {
-			printf("\nFailed to get mbuf - freeing the rest.\n");
-			for (k = 0; k < i; k++)
-				rte_pktmbuf_free(mbufs[k]);
-			return -1;
-		}
-	}
-
-	tsc_start = rte_rdtsc_precise();
-
-	while (total_enqueued < pparams->total_operations) {
-		uint16_t burst_size =
-		total_enqueued + pparams->burst_size <=
-		pparams->total_operations ? pparams->burst_size :
-				pparams->total_operations - total_enqueued;
-		uint16_t ops_needed = burst_size - ops_unused;
-
-		if (ops_needed != rte_crypto_op_bulk_alloc(ts_params->op_mpool,
-				RTE_CRYPTO_OP_TYPE_SYMMETRIC, ops, ops_needed)){
-			printf("\nFailed to alloc enough ops, finish dequeuing "
-				"and free ops below.");
-		} else {
-			for (i = 0; i < ops_needed; i++)
-				ops[i] = test_perf_set_crypto_op(ops[i],
-					mbufs[i + (pparams->burst_size *
-						(j % NUM_MBUF_SETS))],
-					sess, pparams->buf_size,
-					pparams->chain);
-
-			/* enqueue burst */
-			burst_enqueued = rte_cryptodev_enqueue_burst(dev_id,
-					queue_id, ops, burst_size);
-
-			if (burst_enqueued < burst_size)
-				retries++;
-
-			ops_unused = burst_size - burst_enqueued;
-			total_enqueued += burst_enqueued;
-		}
-
-		/* dequeue burst */
-		burst_dequeued = rte_cryptodev_dequeue_burst(dev_id, queue_id,
-				proc_ops, pparams->burst_size);
-		if (burst_dequeued == 0)
-			failed_polls++;
-		else {
-			processed += burst_dequeued;
-
-			for (l = 0; l < burst_dequeued; l++)
-				rte_crypto_op_free(proc_ops[l]);
-		}
-		j++;
-	}
-
-	/* Dequeue any operations still in the crypto device */
-	while (processed < pparams->total_operations) {
-		/* Sending 0 length burst to flush sw crypto device */
-		rte_cryptodev_enqueue_burst(dev_id, queue_id, NULL, 0);
-
-		/* dequeue burst */
-		burst_dequeued = rte_cryptodev_dequeue_burst(dev_id, queue_id,
-				proc_ops, pparams->burst_size);
-		if (burst_dequeued == 0)
-			failed_polls++;
-		else {
-			processed += burst_dequeued;
-
-			for (m = 0; m < burst_dequeued; m++)
-				rte_crypto_op_free(proc_ops[m]);
-		}
-	}
-
-	tsc_end = rte_rdtsc_precise();
-
-	double ops_s = ((double)processed / (tsc_end - tsc_start))
-					* rte_get_tsc_hz();
-	double throughput = (ops_s * pparams->buf_size * NUM_MBUF_SETS)
-					/ 1000000000;
-
-	printf("\t%u\t%6.2f\t%10.2f\t%8"PRIu64"\t%8"PRIu64, pparams->buf_size,
-			ops_s / 1000000, throughput, retries, failed_polls);
-
-	for (i = 0; i < pparams->burst_size * NUM_MBUF_SETS; i++)
-		rte_pktmbuf_free(mbufs[i]);
-
-	rte_cryptodev_sym_session_clear(ts_params->dev_id, sess);
-	rte_cryptodev_sym_session_free(sess);
-
-	printf("\n");
-	return TEST_SUCCESS;
-}
-
-static int
-test_perf_armv8(uint8_t dev_id, uint16_t queue_id,
-		struct perf_test_params *pparams)
-{
-	uint16_t i, k, l, m;
-	uint16_t j = 0;
-	uint16_t ops_unused = 0;
-	uint16_t burst_size;
-	uint16_t ops_needed;
-
-	uint64_t burst_enqueued = 0, total_enqueued = 0, burst_dequeued = 0;
-	uint64_t processed = 0, failed_polls = 0, retries = 0;
-	uint64_t tsc_start = 0, tsc_end = 0;
-
-	struct rte_crypto_op *ops[pparams->burst_size];
-	struct rte_crypto_op *proc_ops[pparams->burst_size];
-
-	struct rte_mbuf *mbufs[pparams->burst_size * NUM_MBUF_SETS];
-
-	struct crypto_testsuite_params *ts_params = &testsuite_params;
-
-	static struct rte_cryptodev_sym_session *sess;
-
-	if (rte_cryptodev_count() == 0) {
-		printf("\nNo crypto devices found. Is PMD build configured?\n");
-		return TEST_FAILED;
-	}
-
-	/* Create Crypto session*/
-	if (test_perf_create_armv8_session(ts_params->dev_id,
-			pparams->chain, pparams->cipher_algo,
-			pparams->key_length, pparams->auth_algo) == 0)
-		sess = test_crypto_session;
-	else
-		sess = NULL;
-	TEST_ASSERT_NOT_NULL(sess, "Session creation failed");
-
-	/* Generate a burst of crypto operations */
-	for (i = 0; i < (pparams->burst_size * NUM_MBUF_SETS); i++) {
-		mbufs[i] = test_perf_create_pktmbuf(
-				ts_params->mbuf_mp,
-				pparams->buf_size);
-
-		if (mbufs[i] == NULL) {
-			printf("\nFailed to get mbuf - freeing the rest.\n");
-			for (k = 0; k < i; k++)
-				rte_pktmbuf_free(mbufs[k]);
-			return -1;
-		}
-	}
-
-	tsc_start = rte_rdtsc();
-
-	while (total_enqueued < pparams->total_operations) {
-		if ((total_enqueued + pparams->burst_size) <=
-					pparams->total_operations)
-			burst_size = pparams->burst_size;
-		else
-			burst_size = pparams->total_operations - total_enqueued;
-
-		ops_needed = burst_size - ops_unused;
-
-		if (ops_needed != rte_crypto_op_bulk_alloc(ts_params->op_mpool,
-				RTE_CRYPTO_OP_TYPE_SYMMETRIC, ops, ops_needed)){
-			printf("\nFailed to alloc enough ops, finish dequeuing "
-				"and free ops below.");
-		} else {
-			for (i = 0; i < ops_needed; i++)
-				ops[i] = test_perf_set_crypto_op_aes(ops[i],
-					mbufs[i + (pparams->burst_size *
-						(j % NUM_MBUF_SETS))], sess,
-					pparams->buf_size,
-					pparams->chain);
-
-			/* enqueue burst */
-			burst_enqueued = rte_cryptodev_enqueue_burst(dev_id,
-					queue_id, ops, burst_size);
-
-			if (burst_enqueued < burst_size)
-				retries++;
-
-			ops_unused = burst_size - burst_enqueued;
-			total_enqueued += burst_enqueued;
-		}
-
-		/* dequeue burst */
-		burst_dequeued = rte_cryptodev_dequeue_burst(dev_id, queue_id,
-				proc_ops, pparams->burst_size);
-		if (burst_dequeued == 0)
-			failed_polls++;
-		else {
-			processed += burst_dequeued;
-
-			for (l = 0; l < burst_dequeued; l++)
-				rte_crypto_op_free(proc_ops[l]);
-		}
-		j++;
-	}
-
-	/* Dequeue any operations still in the crypto device */
-	while (processed < pparams->total_operations) {
-		/* Sending 0 length burst to flush sw crypto device */
-		rte_cryptodev_enqueue_burst(dev_id, queue_id, NULL, 0);
-
-		/* dequeue burst */
-		burst_dequeued = rte_cryptodev_dequeue_burst(dev_id, queue_id,
-				proc_ops, pparams->burst_size);
-		if (burst_dequeued == 0)
-			failed_polls++;
-		else {
-			processed += burst_dequeued;
-
-			for (m = 0; m < burst_dequeued; m++)
-				rte_crypto_op_free(proc_ops[m]);
-		}
-	}
-
-	tsc_end = rte_rdtsc();
-
-	double ops_s = ((double)processed / (tsc_end - tsc_start))
-					* rte_get_tsc_hz();
-	double throughput = (ops_s * pparams->buf_size * NUM_MBUF_SETS)
-					/ 1000000000;
-
-	printf("\t%u\t%6.2f\t%10.2f\t%8"PRIu64"\t%8"PRIu64, pparams->buf_size,
-			ops_s / 1000000, throughput, retries, failed_polls);
-
-	for (i = 0; i < pparams->burst_size * NUM_MBUF_SETS; i++)
-		rte_pktmbuf_free(mbufs[i]);
-
-	printf("\n");
-	return TEST_SUCCESS;
-}
-
-/*
-
-    perf_test_aes_sha("avx2", HASH_CIPHER, 16, CBC, SHA1);
-    perf_test_aes_sha("avx2", HASH_CIPHER, 16, CBC, SHA_256);
-    perf_test_aes_sha("avx2", HASH_CIPHER, 16, CBC, SHA_512);
-
-    perf_test_aes_sha("avx2", CIPHER_HASH, 32, CBC, SHA1);
-    perf_test_aes_sha("avx2", CIPHER_HASH, 32, CBC, SHA_256);
-    perf_test_aes_sha("avx2", CIPHER_HASH, 32, CBC, SHA_512);
-
-    perf_test_aes_sha("avx2", HASH_CIPHER, 32, CBC, SHA1);
-    perf_test_aes_sha("avx2", HASH_CIPHER, 32, CBC, SHA_256);
-    perf_test_aes_sha("avx2", HASH_CIPHER, 32, CBC, SHA_512);
- */
-static int
-test_perf_aes_cbc_encrypt_digest_vary_pkt_size(void)
-{
-	unsigned total_operations = 1000000;
-	unsigned burst_size = 32;
-	unsigned buf_lengths[] = { 64, 128, 256, 512, 768, 1024, 1280, 1536, 1792, 2048 };
-	uint8_t i, j;
-
-	struct perf_test_params params_set[] = {
-		{
-			.chain = CIPHER_ONLY,
-			.cipher_algo  = RTE_CRYPTO_CIPHER_AES_CBC,
-			.key_length = 16,
-			.auth_algo = RTE_CRYPTO_AUTH_NULL
-		},
-		{
-			.chain = CIPHER_HASH,
-			.cipher_algo  = RTE_CRYPTO_CIPHER_AES_CBC,
-			.key_length = 16,
-			.auth_algo = RTE_CRYPTO_AUTH_SHA1_HMAC
-		},
-		{
-			.chain = CIPHER_HASH,
-
-			.cipher_algo  = RTE_CRYPTO_CIPHER_AES_CBC,
-			.key_length = 16,
-			.auth_algo = RTE_CRYPTO_AUTH_SHA256_HMAC
-		},
-		{
-			.chain = CIPHER_HASH,
-
-			.cipher_algo  = RTE_CRYPTO_CIPHER_AES_CBC,
-			.key_length = 16,
-			.auth_algo = RTE_CRYPTO_AUTH_SHA512_HMAC
-		},
-		{
-			.chain = CIPHER_HASH,
-
-			.cipher_algo  = RTE_CRYPTO_CIPHER_AES_CBC,
-			.key_length = 32,
-			.auth_algo = RTE_CRYPTO_AUTH_SHA1_HMAC
-		},
-		{
-			.chain = CIPHER_HASH,
-
-			.cipher_algo  = RTE_CRYPTO_CIPHER_AES_CBC,
-			.key_length = 32,
-			.auth_algo = RTE_CRYPTO_AUTH_SHA256_HMAC
-		},
-		{
-			.chain = CIPHER_HASH,
-
-			.cipher_algo  = RTE_CRYPTO_CIPHER_AES_CBC,
-			.key_length = 32,
-			.auth_algo = RTE_CRYPTO_AUTH_SHA512_HMAC
-		},
-	};
-
-	for (i = 0; i < RTE_DIM(params_set); i++) {
-
-		params_set[i].total_operations = total_operations;
-		params_set[i].burst_size = burst_size;
-		printf("\n%s. cipher algo: %s auth algo: %s cipher key size=%u."
-			" burst_size: %d ops\n",
-			chain_mode_name(params_set[i].chain),
-			rte_crypto_cipher_algorithm_strings[params_set[i].cipher_algo],
-			rte_crypto_auth_algorithm_strings[params_set[i].auth_algo],
-			params_set[i].key_length,
-			burst_size);
-		printf("\nBuffer Size(B)\tOPS(M)\tThroughput(Gbps)\t"
-			"Retries\tEmptyPolls\n");
-		for (j = 0; j < RTE_DIM(buf_lengths); j++) {
-			params_set[i].buf_size = buf_lengths[j];
-			test_perf_aes_sha(testsuite_params.dev_id, 0,
-					&params_set[i]);
-		}
-	}
-	return 0;
-}
-
-static int
-test_perf_snow3G_vary_pkt_size(void)
-{
-	unsigned total_operations = 1000000;
-	uint8_t i, j;
-	unsigned k;
-	uint16_t burst_sizes[] = { 64 };
-	uint16_t buf_lengths[] = { 40, 64, 80, 120, 240, 256, 400, 512, 600, 1024, 2048 };
-
-	struct perf_test_params params_set[] = {
-		{
-			.chain = CIPHER_ONLY,
-			.cipher_algo  = RTE_CRYPTO_CIPHER_SNOW3G_UEA2,
-			.key_length = 16,
-			.auth_algo  = RTE_CRYPTO_AUTH_NULL,
-		},
-		{
-			.chain = HASH_ONLY,
-			.cipher_algo = RTE_CRYPTO_CIPHER_NULL,
-			.auth_algo  = RTE_CRYPTO_AUTH_SNOW3G_UIA2,
-			.key_length = 16
-		},
-	};
-
-	printf("\n\nStart %s.", __func__);
-	printf("\nTest to measure max throughput at various pkt sizes.");
-	printf("\nOn HW devices t'put maximised when high Retries and EmptyPolls"
-			" so cycle cost not relevant (n/a displayed).");
-
-	for (i = 0; i < RTE_DIM(params_set); i++) {
-		printf("\n\n");
-		params_set[i].total_operations = total_operations;
-		for (k = 0; k < RTE_DIM(burst_sizes); k++) {
-			enum rte_crypto_cipher_algorithm cipher_algo =
-				params_set[i].cipher_algo;
-			enum rte_crypto_auth_algorithm auth_algo =
-				params_set[i].auth_algo;
-			printf("\nOn %s dev%u qp%u, %s, "
-				"cipher algo:%s, auth algo:%s, burst_size: %d ops",
-				pmd_name(gbl_driver_id),
-				testsuite_params.dev_id, 0,
-				chain_mode_name(params_set[i].chain),
-				rte_crypto_cipher_algorithm_strings[cipher_algo],
-				rte_crypto_auth_algorithm_strings[auth_algo],
-				burst_sizes[k]);
-
-			params_set[i].burst_size = burst_sizes[k];
-			printf("\nPktSzB\tOp/s(M)\tThruput(Mbps)\tCycles/Burst\t"
-				"Cycles/buf\tCycles/B\tRetries\t\tEmptyPolls\n");
-			for (j = 0; j < RTE_DIM(buf_lengths); j++) {
-
-				params_set[i].buf_size = buf_lengths[j];
-
-				test_perf_snow3g(testsuite_params.dev_id, 0, &params_set[i]);
-			}
-		}
-	}
-
-	return 0;
-}
-
-static int
-test_perf_openssl_vary_pkt_size(void)
-{
-	unsigned int total_operations = 10000;
-	unsigned int burst_size = { 64 };
-	unsigned int buf_lengths[] = { 64, 128, 256, 512, 768, 1024, 1280, 1536,
-			1792, 2048 };
-	uint8_t i, j;
-
-	struct perf_test_params params_set[] = {
-		{
-			.chain = CIPHER_HASH,
-
-			.cipher_algo  = RTE_CRYPTO_CIPHER_3DES_CBC,
-			.key_length = 16,
-			.auth_algo = RTE_CRYPTO_AUTH_SHA1_HMAC
-		},
-		{
-			.chain = CIPHER_HASH,
-
-			.cipher_algo  = RTE_CRYPTO_CIPHER_3DES_CBC,
-			.key_length = 24,
-			.auth_algo = RTE_CRYPTO_AUTH_SHA1_HMAC
-		},
-		{
-			.chain = CIPHER_HASH,
-
-			.cipher_algo  = RTE_CRYPTO_CIPHER_AES_CTR,
-			.key_length = 16,
-			.auth_algo = RTE_CRYPTO_AUTH_SHA1_HMAC
-		},
-		{
-			.chain = CIPHER_HASH,
-
-			.cipher_algo  = RTE_CRYPTO_CIPHER_AES_CTR,
-			.key_length = 32,
-			.auth_algo = RTE_CRYPTO_AUTH_SHA1_HMAC
-		},
-		{
-			.chain = CIPHER_HASH,
-
-			.cipher_algo  = RTE_CRYPTO_CIPHER_3DES_CTR,
-			.key_length = 16,
-			.auth_algo = RTE_CRYPTO_AUTH_SHA1_HMAC
-		},
-		{
-			.chain = CIPHER_HASH,
-
-			.cipher_algo  = RTE_CRYPTO_CIPHER_3DES_CTR,
-			.key_length = 24,
-			.auth_algo = RTE_CRYPTO_AUTH_SHA1_HMAC
-		},
-		{
-			.chain = AEAD,
-
-			.aead_algo  = RTE_CRYPTO_AEAD_AES_GCM,
-			.key_length = 16,
-		},
-	};
-
-	for (i = 0; i < RTE_DIM(params_set); i++) {
-		params_set[i].total_operations = total_operations;
-		params_set[i].burst_size = burst_size;
-		if (params_set[i].chain == AEAD) {
-			enum rte_crypto_aead_algorithm aead_algo =
-				params_set[i].aead_algo;
-			printf("\n%s. aead algo: %s  key size=%u."
-				" burst_size: %d ops\n",
-				chain_mode_name(params_set[i].chain),
-				rte_crypto_aead_algorithm_strings[aead_algo],
-				params_set[i].key_length,
-				burst_size);
-		} else {
-			enum rte_crypto_cipher_algorithm cipher_algo =
-				params_set[i].cipher_algo;
-			enum rte_crypto_auth_algorithm auth_algo =
-				params_set[i].auth_algo;
-			printf("\n%s. cipher algo: %s auth algo: %s key size=%u."
-				" burst_size: %d ops\n",
-				chain_mode_name(params_set[i].chain),
-				rte_crypto_cipher_algorithm_strings[cipher_algo],
-				rte_crypto_auth_algorithm_strings[auth_algo],
-				params_set[i].key_length,
-				burst_size);
-		}
-		printf("\nBuffer Size(B)\tOPS(M)\tThroughput(Gbps)\tRetries\t"
-				"EmptyPolls\n");
-		for (j = 0; j < RTE_DIM(buf_lengths); j++) {
-			params_set[i].buf_size = buf_lengths[j];
-			test_perf_openssl(testsuite_params.dev_id, 0,
-					&params_set[i]);
-		}
-	}
-
-	return 0;
-}
-
-static int
-test_perf_openssl_vary_burst_size(void)
-{
-	unsigned int total_operations = 4096;
-	uint16_t buf_lengths[] = { 40 };
-	uint8_t i, j;
-
-	struct perf_test_params params_set[] = {
-		{
-			.chain = CIPHER_HASH,
-
-			.cipher_algo  = RTE_CRYPTO_CIPHER_3DES_CBC,
-			.key_length = 16,
-			.auth_algo = RTE_CRYPTO_AUTH_SHA1_HMAC
-		},
-		{
-			.chain = CIPHER_HASH,
-
-			.cipher_algo  = RTE_CRYPTO_CIPHER_3DES_CBC,
-			.key_length = 24,
-			.auth_algo = RTE_CRYPTO_AUTH_SHA1_HMAC
-		},
-		{
-			.chain = CIPHER_HASH,
-
-			.cipher_algo  = RTE_CRYPTO_CIPHER_AES_CTR,
-			.key_length = 16,
-			.auth_algo = RTE_CRYPTO_AUTH_SHA1_HMAC
-		},
-		{
-			.chain = CIPHER_HASH,
-
-			.cipher_algo  = RTE_CRYPTO_CIPHER_AES_CTR,
-			.key_length = 32,
-			.auth_algo = RTE_CRYPTO_AUTH_SHA1_HMAC
-		},
-		{
-			.chain = CIPHER_HASH,
-
-			.cipher_algo  = RTE_CRYPTO_CIPHER_3DES_CTR,
-			.key_length = 16,
-			.auth_algo = RTE_CRYPTO_AUTH_SHA1_HMAC
-		},
-		{
-			.chain = CIPHER_HASH,
-
-			.cipher_algo  = RTE_CRYPTO_CIPHER_3DES_CTR,
-			.key_length = 24,
-			.auth_algo = RTE_CRYPTO_AUTH_SHA1_HMAC
-		},
-		{
-			.chain = AEAD,
-
-			.aead_algo  = RTE_CRYPTO_AEAD_AES_GCM,
-			.key_length = 16,
-		},
-	};
-
-	printf("\n\nStart %s.", __func__);
-	printf("\nThis Test measures the average IA cycle cost using a "
-			"constant request(packet) size. ");
-	printf("Cycle cost is only valid when indicators show device is not"
-			" busy, i.e. Retries and EmptyPolls = 0");
-
-	for (i = 0; i < RTE_DIM(params_set); i++) {
-		printf("\n");
-		params_set[i].total_operations = total_operations;
-
-	for (j = 0; j < RTE_DIM(buf_lengths); j++) {
-		params_set[i].buf_size = buf_lengths[j];
-		test_perf_openssl_optimise_cyclecount(&params_set[i]);
-		}
-	}
-
-	return 0;
-}
-
-static int
-test_perf_armv8_vary_pkt_size(void)
-{
-	unsigned int total_operations = 100000;
-	unsigned int burst_size = { 64 };
-	unsigned int buf_lengths[] = { 64, 128, 256, 512, 768, 1024, 1280, 1536,
-			1792, 2048 };
-	uint8_t i, j;
-
-	struct perf_test_params params_set[] = {
-		{
-			.chain = CIPHER_HASH,
-
-			.cipher_algo  = RTE_CRYPTO_CIPHER_AES_CBC,
-			.key_length = 16,
-			.auth_algo = RTE_CRYPTO_AUTH_SHA1_HMAC
-		},
-		{
-			.chain = HASH_CIPHER,
-
-			.cipher_algo  = RTE_CRYPTO_CIPHER_AES_CBC,
-			.key_length = 16,
-			.auth_algo = RTE_CRYPTO_AUTH_SHA1_HMAC
-		},
-		{
-			.chain = CIPHER_HASH,
-
-			.cipher_algo  = RTE_CRYPTO_CIPHER_AES_CBC,
-			.key_length = 16,
-			.auth_algo = RTE_CRYPTO_AUTH_SHA256_HMAC
-		},
-		{
-			.chain = HASH_CIPHER,
-
-			.cipher_algo  = RTE_CRYPTO_CIPHER_AES_CBC,
-			.key_length = 16,
-			.auth_algo = RTE_CRYPTO_AUTH_SHA256_HMAC
-		},
-	};
-
-	for (i = 0; i < RTE_DIM(params_set); i++) {
-		params_set[i].total_operations = total_operations;
-		params_set[i].burst_size = burst_size;
-		printf("\n%s. cipher algo: %s auth algo: %s cipher key size=%u."
-			" burst_size: %d ops\n",
-			chain_mode_name(params_set[i].chain),
-			rte_crypto_cipher_algorithm_strings[params_set[i].cipher_algo],
-			rte_crypto_auth_algorithm_strings[params_set[i].auth_algo],
-			params_set[i].key_length,
-			burst_size);
-		printf("\nBuffer Size(B)\tOPS(M)\tThroughput(Gbps)\tRetries\t"
-				"EmptyPolls\n");
-		for (j = 0; j < RTE_DIM(buf_lengths); j++) {
-			params_set[i].buf_size = buf_lengths[j];
-			test_perf_armv8(testsuite_params.dev_id, 0,
-							&params_set[i]);
-		}
-	}
-
-	return 0;
-}
-
-static int
-test_perf_armv8_vary_burst_size(void)
-{
-	unsigned int total_operations = 4096;
-	uint16_t buf_lengths[] = { 64 };
-	uint8_t i, j;
-
-	struct perf_test_params params_set[] = {
-		{
-			.chain = CIPHER_HASH,
-
-			.cipher_algo  = RTE_CRYPTO_CIPHER_AES_CBC,
-			.key_length = 16,
-			.auth_algo = RTE_CRYPTO_AUTH_SHA1_HMAC
-		},
-		{
-			.chain = HASH_CIPHER,
-
-			.cipher_algo  = RTE_CRYPTO_CIPHER_AES_CBC,
-			.key_length = 16,
-			.auth_algo = RTE_CRYPTO_AUTH_SHA1_HMAC
-		},
-		{
-			.chain = CIPHER_HASH,
-
-			.cipher_algo  = RTE_CRYPTO_CIPHER_AES_CBC,
-			.key_length = 16,
-			.auth_algo = RTE_CRYPTO_AUTH_SHA256_HMAC
-		},
-		{
-			.chain = HASH_CIPHER,
-
-			.cipher_algo  = RTE_CRYPTO_CIPHER_AES_CBC,
-			.key_length = 16,
-			.auth_algo = RTE_CRYPTO_AUTH_SHA256_HMAC
-		},
-	};
-
-	printf("\n\nStart %s.", __func__);
-	printf("\nThis Test measures the average IA cycle cost using a "
-			"constant request(packet) size. ");
-	printf("Cycle cost is only valid when indicators show device is "
-			"not busy, i.e. Retries and EmptyPolls = 0");
-
-	for (i = 0; i < RTE_DIM(params_set); i++) {
-		printf("\n");
-		params_set[i].total_operations = total_operations;
-
-		for (j = 0; j < RTE_DIM(buf_lengths); j++) {
-			params_set[i].buf_size = buf_lengths[j];
-			test_perf_armv8_optimise_cyclecount(&params_set[i]);
-		}
-	}
-
-	return 0;
-}
-
-static int
-test_perf_aes_cbc_vary_burst_size(void)
-{
-	return test_perf_crypto_qp_vary_burst_size(testsuite_params.dev_id);
-}
-
-
-static struct rte_cryptodev_sym_session *
-test_perf_create_session(uint8_t dev_id, struct perf_test_params *pparams)
-{
-	struct crypto_testsuite_params *ts_params = &testsuite_params;
-	struct rte_crypto_sym_xform aead_xform = { 0 };
-
-	uint8_t aead_key[pparams->session_attrs->key_aead_len];
-
-	memcpy(aead_key, pparams->session_attrs->key_aead_data,
-		 pparams->session_attrs->key_aead_len);
-
-	aead_xform.type = RTE_CRYPTO_SYM_XFORM_AEAD;
-	aead_xform.next = NULL;
-
-	aead_xform.aead.algo = pparams->session_attrs->aead_algorithm;
-	aead_xform.aead.op = pparams->session_attrs->aead;
-	aead_xform.aead.key.data = aead_key;
-	aead_xform.aead.key.length = pparams->session_attrs->key_aead_len;
-	aead_xform.aead.iv.length = pparams->session_attrs->iv_len;
-	aead_xform.aead.iv.offset = IV_OFFSET;
-	aead_xform.aead.aad_length = pparams->session_attrs->aad_len;
-	aead_xform.aead.digest_length = pparams->session_attrs->digest_len;
-
-	test_crypto_session = rte_cryptodev_sym_session_create(ts_params->sess_mp);
-
-	rte_cryptodev_sym_session_init(dev_id, test_crypto_session,
-				&aead_xform, ts_params->sess_mp);
-
-	return test_crypto_session;
-}
-
-static inline struct rte_crypto_op *
-perf_gcm_set_crypto_op(struct rte_crypto_op *op, struct rte_mbuf *m,
-		struct rte_cryptodev_sym_session *sess,
-		struct crypto_params *m_hlp,
-		struct perf_test_params *params)
-{
-	uint8_t *iv_ptr = rte_crypto_op_ctod_offset(op,
-			uint8_t *, IV_OFFSET);
-
-	if (rte_crypto_op_attach_sym_session(op, sess) != 0) {
-		rte_crypto_op_free(op);
-		return NULL;
-	}
-
-	op->sym->aead.digest.data = m_hlp->digest;
-	op->sym->aead.digest.phys_addr = rte_pktmbuf_mtophys_offset(
-					  m,
-					  params->session_attrs->aad_len +
-					  params->symmetric_op->p_len);
-
-
-	op->sym->aead.aad.data = m_hlp->aad;
-	op->sym->aead.aad.phys_addr = rte_pktmbuf_mtophys(m);
-
-	rte_memcpy(op->sym->aead.aad.data, params->symmetric_op->aad_data,
-		       params->session_attrs->aad_len);
-
-	rte_memcpy(iv_ptr, params->session_attrs->iv_data,
-		       params->session_attrs->iv_len);
-	if (params->session_attrs->iv_len == 12)
-		iv_ptr[15] = 1;
-
-	op->sym->aead.data.offset =
-			params->session_attrs->aad_len;
-	op->sym->aead.data.length = params->symmetric_op->p_len;
-
-	op->sym->m_src = m;
-
-	return op;
-}
-
-static struct rte_mbuf *
-test_perf_create_pktmbuf_fill(struct rte_mempool *mpool,
-		struct perf_test_params *params,
-		unsigned buf_sz, struct crypto_params *m_hlp)
-{
-	struct rte_mbuf *m = rte_pktmbuf_alloc(mpool);
-	uint16_t aad_len = params->session_attrs->aad_len;
-	uint16_t digest_size = params->symmetric_op->t_len;
-	char *p;
-
-	p = rte_pktmbuf_append(m, aad_len);
-	if (p == NULL) {
-		rte_pktmbuf_free(m);
-		return NULL;
-	}
-	m_hlp->aad = (uint8_t *)p;
-
-	p = rte_pktmbuf_append(m, buf_sz);
-	if (p == NULL) {
-		rte_pktmbuf_free(m);
-		return NULL;
-	}
-	rte_memcpy(p, params->symmetric_op->p_data, buf_sz);
-
-	p = rte_pktmbuf_append(m, digest_size);
-	if (p == NULL) {
-		rte_pktmbuf_free(m);
-		return NULL;
-	}
-	m_hlp->digest = (uint8_t *)p;
-
-	return m;
-}
-
-static int
-perf_AES_GCM(uint8_t dev_id, uint16_t queue_id,
-	     struct perf_test_params *pparams, uint32_t test_ops)
-{
-	int j = 0;
-	struct crypto_testsuite_params *ts_params = &testsuite_params;
-	struct rte_cryptodev_sym_session *sess;
-	struct rte_crypto_op *ops[pparams->burst_size];
-	struct rte_crypto_op *proc_ops[pparams->burst_size];
-	uint32_t total_operations = pparams->total_operations;
-
-	uint64_t burst_enqueued = 0, total_enqueued = 0, burst_dequeued = 0;
-	uint64_t processed = 0, failed_polls = 0, retries = 0;
-	uint64_t tsc_start = 0, tsc_end = 0;
-
-	uint16_t i = 0, l = 0, m = 0;
-	uint16_t burst = pparams->burst_size * NUM_MBUF_SETS;
-	uint16_t ops_unused = 0;
-
-	struct rte_mbuf *mbufs[burst];
-	struct crypto_params m_hlp[burst];
-
-	if (rte_cryptodev_count() == 0) {
-		printf("\nNo crypto devices available. "
-				"Is kernel driver loaded?\n");
-		return TEST_FAILED;
-	}
-
-	sess = test_perf_create_session(dev_id, pparams);
-	TEST_ASSERT_NOT_NULL(sess, "Session creation failed");
-
-	for (i = 0; i < burst; i++) {
-		mbufs[i] = test_perf_create_pktmbuf_fill(
-				ts_params->mbuf_mp,
-				pparams, pparams->symmetric_op->p_len,
-				&m_hlp[i]);
-	}
-
-	if (test_ops)
-		total_operations = test_ops;
-
-	tsc_start = rte_rdtsc_precise();
-	while (total_enqueued < total_operations) {
-		uint16_t burst_size =
-		total_enqueued+pparams->burst_size <= total_operations ?
-		pparams->burst_size : total_operations-total_enqueued;
-		uint16_t ops_needed = burst_size-ops_unused;
-
-		if (ops_needed != rte_crypto_op_bulk_alloc(ts_params->op_mpool,
-				RTE_CRYPTO_OP_TYPE_SYMMETRIC, ops, ops_needed)){
-			printf("\nFailed to alloc enough ops, "
-					"finish dequeuing");
-		} else {
-			for (i = 0; i < ops_needed; i++)
-				ops[i] = perf_gcm_set_crypto_op(ops[i],
-					mbufs[i + (pparams->burst_size *
-						(j % NUM_MBUF_SETS))],
-					sess, &m_hlp[i + (pparams->burst_size *
-						(j % NUM_MBUF_SETS))], pparams);
-
-			/* enqueue burst */
-			burst_enqueued = rte_cryptodev_enqueue_burst(dev_id,
-					queue_id, ops, burst_size);
-
-			if (burst_enqueued < burst_size)
-				retries++;
-
-			ops_unused = burst_size-burst_enqueued;
-			total_enqueued += burst_enqueued;
-		}
-
-		/* dequeue burst */
-		burst_dequeued = rte_cryptodev_dequeue_burst(dev_id, queue_id,
-				proc_ops, pparams->burst_size);
-		if (burst_dequeued == 0)
-			failed_polls++;
-		else {
-			processed += burst_dequeued;
-
-			for (l = 0; l < burst_dequeued; l++)
-				rte_crypto_op_free(proc_ops[l]);
-		}
-
-		j++;
-	}
-
-	/* Dequeue any operations still in the crypto device */
-	while (processed < total_operations) {
-		/* Sending 0 length burst to flush sw crypto device */
-		rte_cryptodev_enqueue_burst(dev_id, queue_id, NULL, 0);
-
-		/* dequeue burst */
-		burst_dequeued = rte_cryptodev_dequeue_burst(dev_id, queue_id,
-				proc_ops, pparams->burst_size);
-		if (burst_dequeued == 0)
-			failed_polls++;
-		else {
-			processed += burst_dequeued;
-
-		for (m = 0; m < burst_dequeued; m++) {
-			if (test_ops) {
-				uint8_t *pkt = rte_pktmbuf_mtod(
-					proc_ops[m]->sym->m_src,
-					uint8_t *);
-
-				TEST_ASSERT_BUFFERS_ARE_EQUAL(
-					pparams->symmetric_op->c_data,
-					pkt +
-					pparams->session_attrs->aad_len,
-					pparams->symmetric_op->c_len,
-					"GCM Ciphertext data not as expected");
-
-				TEST_ASSERT_BUFFERS_ARE_EQUAL(
-					pparams->symmetric_op->t_data,
-					pkt +
-					pparams->session_attrs->aad_len +
-					pparams->symmetric_op->c_len,
-					pparams->symmetric_op->t_len,
-					"GCM MAC data not as expected");
-
-				}
-				rte_crypto_op_free(proc_ops[m]);
-			}
-		}
-	}
-
-	tsc_end = rte_rdtsc_precise();
-
-	double ops_s = ((double)processed / (tsc_end - tsc_start))
-			* rte_get_tsc_hz();
-	double throughput = (ops_s * pparams->symmetric_op->p_len * 8)
-			/ 1000000000;
-
-	if (!test_ops) {
-		printf("\n%u\t\t%6.2f\t%16.2f\t%8"PRIu64"\t%10"PRIu64,
-		pparams->symmetric_op->p_len,
-		ops_s/1000000, throughput, retries, failed_polls);
-	}
-
-	for (i = 0; i < burst; i++)
-		rte_pktmbuf_free(mbufs[i]);
-
-	rte_cryptodev_sym_session_clear(ts_params->dev_id, sess);
-	rte_cryptodev_sym_session_free(sess);
-
-	return 0;
-}
-
-static int
-test_perf_AES_GCM(int continual_buf_len, int continual_size)
-{
-	uint16_t i, j, k, loops = 1;
-
-	uint16_t buf_lengths[] = { 64, 128, 256, 512, 1024, 1536, 2048 };
-
-	static const struct cryptodev_perf_test_data *gcm_tests[] = {
-			&AES_GCM_128_12IV_0AAD
-	};
-
-	if (continual_buf_len)
-		loops = continual_size;
-
-	int TEST_CASES_GCM = RTE_DIM(gcm_tests);
-
-	const unsigned burst_size = 32;
-
-	struct symmetric_op ops_set[TEST_CASES_GCM];
-	struct perf_test_params params_set[TEST_CASES_GCM];
-	struct symmetric_session_attrs session_attrs[TEST_CASES_GCM];
-	static const struct cryptodev_perf_test_data *gcm_test;
-
-	for (i = 0; i < TEST_CASES_GCM; ++i) {
-
-		gcm_test = gcm_tests[i];
-
-		session_attrs[i].aead =
-				RTE_CRYPTO_AEAD_OP_ENCRYPT;
-		session_attrs[i].aead_algorithm =
-				RTE_CRYPTO_AEAD_AES_GCM;
-		session_attrs[i].key_aead_data =
-				gcm_test->key.data;
-		session_attrs[i].key_aead_len =
-				gcm_test->key.len;
-		session_attrs[i].aad_len = gcm_test->aad.len;
-		session_attrs[i].digest_len =
-				gcm_test->auth_tag.len;
-		session_attrs[i].iv_len = gcm_test->iv.len;
-		session_attrs[i].iv_data = gcm_test->iv.data;
-
-		ops_set[i].aad_data = gcm_test->aad.data;
-		ops_set[i].p_data = gcm_test->plaintext.data;
-		ops_set[i].p_len = buf_lengths[i];
-		ops_set[i].c_data = gcm_test->ciphertext.data;
-		ops_set[i].c_len = buf_lengths[i];
-		ops_set[i].t_data = gcm_test->auth_tags[i].data;
-		ops_set[i].t_len = gcm_test->auth_tags[i].len;
-
-		params_set[i].chain = AEAD;
-		params_set[i].session_attrs = &session_attrs[i];
-		params_set[i].symmetric_op = &ops_set[i];
-		if (continual_buf_len)
-			params_set[i].total_operations = 0xFFFFFF;
-		else
-			params_set[i].total_operations = 1000000;
-
-		params_set[i].burst_size = burst_size;
-
-	}
-
-	if (continual_buf_len)
-		printf("\nCipher algo: %s Cipher hash: %s cipher key size: %ub"
-			" burst size: %u", "AES_GCM", "AES_GCM",
-			gcm_test->key.len << 3,	burst_size);
-
-	for (i = 0; i < RTE_DIM(gcm_tests); i++) {
-
-		if (!continual_buf_len) {
-			printf("\nCipher algo: %s Cipher hash: %s cipher key size: %ub"
-				" burst size: %u", "AES_GCM", "AES_GCM",
-				gcm_test->key.len << 3,	burst_size);
-			printf("\nBuffer Size(B)\tOPS(M)\tThroughput(Gbps)\t"
-				" Retries\tEmptyPolls");
-		}
-
-		uint16_t len = RTE_DIM(buf_lengths);
-		uint16_t p = 0;
-
-		if (continual_buf_len) {
-			for (k = 0; k < RTE_DIM(buf_lengths); k++)
-				if (buf_lengths[k] == continual_buf_len) {
-					len = k + 1;
-					p = k;
-					break;
-				}
-		}
-		for (j = p; j < len; ++j) {
-
-			params_set[i].symmetric_op->c_len = buf_lengths[j];
-			params_set[i].symmetric_op->p_len = buf_lengths[j];
-
-			ops_set[i].t_data = gcm_tests[i]->auth_tags[j].data;
-			ops_set[i].t_len = gcm_tests[i]->auth_tags[j].len;
-
-			/* Run is twice, one for encryption/hash checks,
-			 * one for perf
-			 */
-			if (perf_AES_GCM(testsuite_params.dev_id, 0,
-					&params_set[i], 1))
-				return TEST_FAILED;
-
-			for (k = 0; k < loops; k++) {
-				if (continual_buf_len)
-					printf("\n\nBuffer Size(B)\tOPS(M)\t"
-						"Throughput(Gbps)\t"
-						"Retries\tEmptyPolls");
-				if (perf_AES_GCM(testsuite_params.dev_id, 0,
-						&params_set[i], 0))
-					return TEST_FAILED;
-				if (continual_buf_len)
-					printf("\n\nCompleted loop %i of %i ...",
-						k+1, loops);
-			}
-		}
-
-	}
-	printf("\n");
-	return 0;
-}
-
-static int test_cryptodev_perf_AES_GCM(void)
-{
-	return test_perf_AES_GCM(0, 0);
-}
-/*
- * This function calls AES GCM performance tests providing
- * size of packet as an argument. If size of packet is not
- * in the buf_lengths array, all sizes will be used
- */
-static int test_continual_perf_AES_GCM(void)
-{
-	return test_perf_AES_GCM(1024, 10);
-}
-
-static int
-test_perf_continual_performance_test(void)
-{
-	unsigned int total_operations = 0xFFFFFF;
-	unsigned int total_loops = 10;
-	unsigned int burst_size = 32;
-	uint8_t i;
-
-	struct perf_test_params params_set = {
-		.total_operations = total_operations,
-		.burst_size = burst_size,
-		.buf_size = 1024,
-
-		.chain = CIPHER_HASH,
-
-		.cipher_algo  = RTE_CRYPTO_CIPHER_AES_CBC,
-		.key_length = 16,
-		.auth_algo = RTE_CRYPTO_AUTH_SHA1_HMAC
-	};
-
-	for (i = 1; i <= total_loops; ++i) {
-		printf("\n%s. cipher algo: %s auth algo: %s cipher key size=%u."
-			" burst_size: %d ops\n",
-			chain_mode_name(params_set.chain),
-			rte_crypto_cipher_algorithm_strings[params_set.cipher_algo],
-			rte_crypto_auth_algorithm_strings[params_set.auth_algo],
-			params_set.key_length,
-			burst_size);
-		printf("\nBuffer Size(B)\tOPS(M)\tThroughput(Gbps)\t"
-				"Retries\tEmptyPolls\n");
-				test_perf_aes_sha(testsuite_params.dev_id, 0,
-					&params_set);
-		printf("\nCompleted loop %i of %i ...", i, total_loops);
-	}
-	return 0;
-}
-
-static struct unit_test_suite cryptodev_qat_continual_testsuite  = {
-	.suite_name = "Crypto Device Continual Performance Test",
-	.setup = testsuite_setup,
-	.teardown = testsuite_teardown,
-	.unit_test_cases = {
-		TEST_CASE_ST(ut_setup, ut_teardown,
-				test_perf_continual_performance_test),
-		TEST_CASE_ST(ut_setup, ut_teardown,
-				test_continual_perf_AES_GCM),
-		TEST_CASES_END() /**< NULL terminate unit test array */
-	}
-};
-
-static struct unit_test_suite cryptodev_testsuite  = {
-	.suite_name = "Crypto Device Unit Test Suite",
-	.setup = testsuite_setup,
-	.teardown = testsuite_teardown,
-	.unit_test_cases = {
-		TEST_CASE_ST(ut_setup, ut_teardown,
-				test_perf_aes_cbc_encrypt_digest_vary_pkt_size),
-		TEST_CASE_ST(ut_setup, ut_teardown,
-				test_cryptodev_perf_AES_GCM),
-		TEST_CASE_ST(ut_setup, ut_teardown,
-				test_perf_aes_cbc_vary_burst_size),
-		TEST_CASES_END() /**< NULL terminate unit test array */
-	}
-};
-
-static struct unit_test_suite cryptodev_dpaa2_sec_testsuite  = {
-	.suite_name = "Crypto Device DPAA2_SEC Unit Test Suite",
-	.setup = testsuite_setup,
-	.teardown = testsuite_teardown,
-	.unit_test_cases = {
-		TEST_CASE_ST(ut_setup, ut_teardown,
-			     test_perf_aes_cbc_encrypt_digest_vary_pkt_size),
-		TEST_CASES_END() /**< NULL terminate unit test array */
-	}
-};
-
-static struct unit_test_suite cryptodev_gcm_testsuite  = {
-	.suite_name = "Crypto Device AESNI GCM Unit Test Suite",
-	.setup = testsuite_setup,
-	.teardown = testsuite_teardown,
-	.unit_test_cases = {
-		TEST_CASE_ST(ut_setup, ut_teardown,
-				test_cryptodev_perf_AES_GCM),
-		TEST_CASES_END() /**< NULL terminate unit test array */
-	}
-};
-
-static struct unit_test_suite cryptodev_aes_testsuite  = {
-	.suite_name = "Crypto Device AESNI MB Unit Test Suite",
-	.setup = testsuite_setup,
-	.teardown = testsuite_teardown,
-	.unit_test_cases = {
-		TEST_CASE_ST(ut_setup, ut_teardown,
-				test_perf_aes_cbc_encrypt_digest_vary_pkt_size),
-		TEST_CASES_END() /**< NULL terminate unit test array */
-	}
-};
-
-static struct unit_test_suite cryptodev_snow3g_testsuite  = {
-	.suite_name = "Crypto Device SNOW3G Unit Test Suite",
-	.setup = testsuite_setup,
-	.teardown = testsuite_teardown,
-	.unit_test_cases = {
-		TEST_CASE_ST(ut_setup, ut_teardown,
-				test_perf_snow3G_vary_pkt_size),
-		TEST_CASE_ST(ut_setup, ut_teardown,
-				test_perf_snow3G_vary_burst_size),
-		TEST_CASES_END() /**< NULL terminate unit test array */
-	}
-};
-
-static struct unit_test_suite cryptodev_openssl_testsuite  = {
-	.suite_name = "Crypto Device OPENSSL Unit Test Suite",
-	.setup = testsuite_setup,
-	.teardown = testsuite_teardown,
-	.unit_test_cases = {
-		TEST_CASE_ST(ut_setup, ut_teardown,
-				test_perf_openssl_vary_pkt_size),
-		TEST_CASE_ST(ut_setup, ut_teardown,
-				test_perf_openssl_vary_burst_size),
-		TEST_CASES_END() /**< NULL terminate unit test array */
-	}
-};
-
-static struct unit_test_suite cryptodev_armv8_testsuite  = {
-	.suite_name = "Crypto Device ARMv8 Unit Test Suite",
-	.setup = testsuite_setup,
-	.teardown = testsuite_teardown,
-	.unit_test_cases = {
-		TEST_CASE_ST(ut_setup, ut_teardown,
-				test_perf_armv8_vary_pkt_size),
-		TEST_CASE_ST(ut_setup, ut_teardown,
-				test_perf_armv8_vary_burst_size),
-		TEST_CASES_END() /**< NULL terminate unit test array */
-	}
-};
-
-static int
-perftest_aesni_gcm_cryptodev(void)
-{
-	gbl_driver_id = rte_cryptodev_driver_id_get(
-			RTE_STR(CRYPTODEV_NAME_AESNI_GCM_PMD));
-
-	if (gbl_driver_id == -1) {
-		RTE_LOG(ERR, USER1, "AESNI GCM PMD must be loaded. Check if "
-				"CONFIG_RTE_LIBRTE_PMD_AESNI_GCM is enabled "
-				"in config file to run this testsuite.\n");
-		return TEST_FAILED;
-	}
-
-	return unit_test_suite_runner(&cryptodev_gcm_testsuite);
-}
-
-static int
-perftest_aesni_mb_cryptodev(void /*argv __rte_unused, int argc __rte_unused*/)
-{
-	gbl_driver_id = rte_cryptodev_driver_id_get(
-			RTE_STR(CRYPTODEV_NAME_AESNI_MB_PMD));
-
-	if (gbl_driver_id == -1) {
-		RTE_LOG(ERR, USER1, "AESNI MB PMD must be loaded. Check if "
-				"CONFIG_RTE_LIBRTE_PMD_AESNI_MB is enabled "
-				"in config file to run this testsuite.\n");
-		return TEST_FAILED;
-	}
-
-	return unit_test_suite_runner(&cryptodev_aes_testsuite);
-}
-
-static int
-perftest_qat_cryptodev(void /*argv __rte_unused, int argc __rte_unused*/)
-{
-	gbl_driver_id = rte_cryptodev_driver_id_get(
-			RTE_STR(CRYPTODEV_NAME_QAT_SYM_PMD));
-
-	if (gbl_driver_id == -1) {
-		RTE_LOG(ERR, USER1, "QAT PMD must be loaded. Check if "
-				"CONFIG_RTE_LIBRTE_PMD_QAT is enabled "
-				"in config file to run this testsuite.\n");
-		return TEST_FAILED;
-	}
-
-	return unit_test_suite_runner(&cryptodev_testsuite);
-}
-
-static int
-perftest_sw_snow3g_cryptodev(void /*argv __rte_unused, int argc __rte_unused*/)
-{
-	gbl_driver_id = rte_cryptodev_driver_id_get(
-			RTE_STR(CRYPTODEV_NAME_SNOW3G_PMD));
-
-	if (gbl_driver_id == -1) {
-		RTE_LOG(ERR, USER1, "SNOW3G PMD must be loaded. Check if "
-				"CONFIG_RTE_LIBRTE_PMD_SNOW3G is enabled "
-				"in config file to run this testsuite.\n");
-		return TEST_FAILED;
-	}
-
-	return unit_test_suite_runner(&cryptodev_snow3g_testsuite);
-}
-
-static int
-perftest_qat_snow3g_cryptodev(void /*argv __rte_unused, int argc __rte_unused*/)
-{
-	gbl_driver_id = rte_cryptodev_driver_id_get(
-			RTE_STR(CRYPTODEV_NAME_QAT_SYM_PMD));
-
-	if (gbl_driver_id == -1) {
-		RTE_LOG(ERR, USER1, "QAT PMD must be loaded. Check if "
-				"CONFIG_RTE_LIBRTE_PMD_QAT is enabled "
-				"in config file to run this testsuite.\n");
-		return TEST_FAILED;
-	}
-
-	return unit_test_suite_runner(&cryptodev_snow3g_testsuite);
-}
-
-static int
-perftest_openssl_cryptodev(void /*argv __rte_unused, int argc __rte_unused*/)
-{
-	gbl_driver_id = rte_cryptodev_driver_id_get(
-			RTE_STR(CRYPTODEV_NAME_OPENSSL_PMD));
-
-	if (gbl_driver_id == -1) {
-		RTE_LOG(ERR, USER1, "OpenSSL PMD must be loaded. Check if "
-				"CONFIG_RTE_LIBRTE_PMD_OPENSSL is enabled "
-				"in config file to run this testsuite.\n");
-		return TEST_FAILED;
-	}
-
-	return unit_test_suite_runner(&cryptodev_openssl_testsuite);
-}
-
-static int
-perftest_qat_continual_cryptodev(void)
-{
-	gbl_driver_id = rte_cryptodev_driver_id_get(
-			RTE_STR(CRYPTODEV_NAME_QAT_SYM_PMD));
-
-	if (gbl_driver_id == -1) {
-		RTE_LOG(ERR, USER1, "QAT PMD must be loaded. Check if "
-				"CONFIG_RTE_LIBRTE_PMD_QAT is enabled "
-				"in config file to run this testsuite.\n");
-		return TEST_FAILED;
-	}
-
-	return unit_test_suite_runner(&cryptodev_qat_continual_testsuite);
-}
-
-static int
-perftest_sw_armv8_cryptodev(void /*argv __rte_unused, int argc __rte_unused*/)
-{
-	gbl_driver_id = rte_cryptodev_driver_id_get(
-			RTE_STR(CRYPTODEV_NAME_ARMV8_PMD));
-
-	if (gbl_driver_id == -1) {
-		RTE_LOG(ERR, USER1, "ARMV8 PMD must be loaded. Check if "
-				"CONFIG_RTE_LIBRTE_PMD_ARMV8 is enabled "
-				"in config file to run this testsuite.\n");
-		return TEST_FAILED;
-	}
-
-	return unit_test_suite_runner(&cryptodev_armv8_testsuite);
-}
-
-static int
-perftest_dpaa2_sec_cryptodev(void)
-{
-	gbl_driver_id = rte_cryptodev_driver_id_get(
-			RTE_STR(CRYPTODEV_NAME_DPAA2_SEC_PMD));
-
-	if (gbl_driver_id == -1) {
-		RTE_LOG(ERR, USER1, "DPAA2 SEC PMD must be loaded. Check if "
-				"CONFIG_RTE_LIBRTE_PMD_DPAA2_SEC is enabled "
-				"in config file to run this testsuite.\n");
-		return TEST_FAILED;
-	}
-
-	return unit_test_suite_runner(&cryptodev_dpaa2_sec_testsuite);
-}
-
-REGISTER_TEST_COMMAND(cryptodev_aesni_mb_perftest, perftest_aesni_mb_cryptodev);
-REGISTER_TEST_COMMAND(cryptodev_qat_perftest, perftest_qat_cryptodev);
-REGISTER_TEST_COMMAND(cryptodev_sw_snow3g_perftest, perftest_sw_snow3g_cryptodev);
-REGISTER_TEST_COMMAND(cryptodev_qat_snow3g_perftest, perftest_qat_snow3g_cryptodev);
-REGISTER_TEST_COMMAND(cryptodev_aesni_gcm_perftest, perftest_aesni_gcm_cryptodev);
-REGISTER_TEST_COMMAND(cryptodev_openssl_perftest,
-		perftest_openssl_cryptodev);
-REGISTER_TEST_COMMAND(cryptodev_qat_continual_perftest,
-		perftest_qat_continual_cryptodev);
-REGISTER_TEST_COMMAND(cryptodev_sw_armv8_perftest,
-		perftest_sw_armv8_cryptodev);
-REGISTER_TEST_COMMAND(cryptodev_dpaa2_sec_perftest,
-		      perftest_dpaa2_sec_cryptodev);
-- 
2.9.4

^ permalink raw reply	[relevance 1%]

* [dpdk-dev] [PATCH v5 0/9] Policy Based Power Control for Guest
  2017-10-04  9:15  2% ` [dpdk-dev] [PATCH v4] " David Hunt
@ 2017-10-04 15:25  2%   ` David Hunt
  2017-10-05 12:25  2%     ` [dpdk-dev] [PATCH v6 " David Hunt
  0 siblings, 1 reply; 200+ results
From: David Hunt @ 2017-10-04 15:25 UTC (permalink / raw)
  To: dev; +Cc: konstantin.ananyev, jingjing.wu

Policy Based Power Control for Guest

This patchset adds the facility for a guest VM to send a policy down to the
host that will allow the host to scale up/down cpu frequencies
depending on the policy criteria independently of the DPDK app running in
the guest.  This differs from the previous vm_power implementation where
individual scale up/down requests were send from the guest to the host via
virtio-serial.

V5 patchset changes:
  * Removed most of the #ifdef I40_PMD from the example code as it will
    be applicable to other PMDs in the future.
  * Changed the parameter of rte_pmd_i40e_query_vfid_by_mac from a uint64
    to a const struct ether_addr *, rather than casting it later in the
    function.

V4 patchset changes:
  * None, re-post to mailing list under the correct email thread.

V3 patchset changes:
  * Changed to using is_same_ether_addr() instead of looping through
    the mac address bytes to compare them.
  * Tweaked some comments and working in the i40e patch after review.
  * Added a patch to the set to add new i40e function to map file, so
    as to allow shared library builds. The power library API needs a cleanup
    in next release, so will add API/ABI warning for this cleanup in a
    separate patch.

V2 patchset changes:
  * Removed API's in ethdev layer.
  * Now just a single new API in the i40e driver for mapping VF MAC to
    VF index.
  * Moved new function from rte_rxtx.c to rte_pmd_i40e.c
  * Removed function for reading i40e register, moved to using the
    standard stats API.
  * Renamed i40e function to rte_pmd_i40e_query_vfid_by_mac
  * Cleaned up policy generation code.

It's a modification of the vm_power_manager app that runs in the host, and
the guest_vm_power_app example app that runs in the guest. This allows the
guest to send down a policy to the host via virtio-serial, which then allows
the host to scale up/down based on the criteria in the policy, resulting in
quicker scale up/down than individual requests coming from the guest.
It also means that the DPDK application running in the guest does not need
to be modified in any way, it is unaware that it's cores are being scaled
up/down, reducing the effort in implementing a power-aware infrastructure.

The usage model is as follows:
1. Set up the VF's and assign to the guest in the usual way.
2. run vm_power_manager on the host, creating a channel to the guest.
3. Start the guest_vm_power_mgr app on the guest, which establishes
   a virtio-serial channel to the host.
4. Send down the profile for the guest using the "send_profile now" command.
   There is an example profile hard-coded into guest_vm_power_mgr.
5. Stop the guest_vm_power_mgr and run your normal power-unaware application.
6. Send traffic into the VFs at varying traffic rates.
   Observe the frequency change on the host (turbostat -i 1)

The sequence of code changes are as follows:

A new function has been aded to the i40e driver to allow mapping of
a VF MAC to VF index.

Next we make an addition to librte_power that adds an extra command to allow
the passing of a policy structure from the guest to the host. This struct
contains information like busy/quiet hour, packet throughput thresholds, etc.

The next addition adds functionality to convert the virtual CPU (vcpU0 IDs to
physical CPU (pcpu) IDs so that the host can scale up/down the cores used
in the guest.

The remaining patches are functionality to process the policy, and take action
when the relevant trigger occurs to cause a frequency change.

[1/9] net/i40e: add API to convert VF MAC to VF id
[2/9] lib/librte_power: add extra msg type for policies
[3/9] examples/vm_power_mgr: add vcpu to pcpu mapping
[4/9] examples/vm_power_mgr: add scale to medium freq fn
[5/9] examples/vm_power_mgr: add policy to channels
[6/9] examples/vm_power_mgr: add port initialisation
[7/9] power: add send channel msg function to map file
[8/9] examples/guest_cli: add send policy to host
[9/9] examples/vm_power_mgr: set MAC address of VF

^ permalink raw reply	[relevance 2%]

* Re: [dpdk-dev] [PATCH v6 0/4] ethdev new offloads API
  2017-10-04  8:17  4%   ` [dpdk-dev] [PATCH v6 0/4] " Shahaf Shuler
@ 2017-10-04 16:12  0%     ` Ananyev, Konstantin
  2017-10-05  0:55  0%       ` Ferruh Yigit
  0 siblings, 1 reply; 200+ results
From: Ananyev, Konstantin @ 2017-10-04 16:12 UTC (permalink / raw)
  To: Shahaf Shuler, thomas, arybchenko, jerin.jacob, Yigit, Ferruh; +Cc: dev



> -----Original Message-----
> From: Shahaf Shuler [mailto:shahafs@mellanox.com]
> Sent: Wednesday, October 4, 2017 9:18 AM
> To: Ananyev, Konstantin <konstantin.ananyev@intel.com>; thomas@monjalon.net; arybchenko@solarflare.com;
> jerin.jacob@caviumnetworks.com; Yigit, Ferruh <ferruh.yigit@intel.com>
> Cc: dev@dpdk.org
> Subject: [PATCH v6 0/4] ethdev new offloads API
> 
> Tx offloads configuration is per queue. Tx offloads are enabled by default,
> and can be disabled using ETH_TXQ_FLAGS_NO* flags.
> This behaviour is not consistent with the Rx side where the Rx offloads
> configuration is per port. Rx offloads are disabled by default and enabled
> according to bit field in rte_eth_rxmode structure.
> 
> Moreover, considering more Tx and Rx offloads will be added
> over time, the cost of managing them all inside the PMD will be tremendous,
> as the PMD will need to check the matching for the entire offload set
> for each mbuf it handles.
> In addition, on the current approach each Rx offload added breaks the
> ABI compatibility as it requires to add entries to existing bit-fields.
> 
> The series address above issues by defining a new offloads API.
> In the new API, offloads are divided into per-port and per-queue offloads,
> with a corresponding capability for each.
> The offloads are disabled by default. Each offload can be enabled or
> disabled using the existing DEV_TX_OFFLOADS_* or DEV_RX_OFFLOADS_* flags.
> Such API will enable to easily add or remove offloads, without breaking the
> ABI compatibility.
> 
> In order to provide a smooth transition between the APIs the following actions
> were taken:
> *  The old offloads API is kept for the meanwhile.
> *  Helper function which copy from old to new API were added to ethdev,
>    enabling the PMD to support only one of the APIs.
> *  Helper function which copy from new to old API were also added,
>    to enable application to use the new API with PMD which still supports
>    the old one.
> 
> Per discussion made on the RFC of this series [1], the integration plan which was
> decided is to do the transition in two phases:
> * ethdev API will move on 17.11.
> * Apps and examples will move on 18.02.
> 
> This to enable PMD maintainers sufficient time to adopt the new API.
> 
> [1]
> http://dpdk.org/ml/archives/dev/2017-August/072643.html
> 
> on v6:
>  - Move mbuf fast free Tx offload to a seperate patch.
> 
> on v5:
>  - Fix documentation.
>  - Fix comments on port offloads configuration.
> 
> on v4:
>  - Added another patch for documentation.
>  - Fixed ETH_TXQ_FLAGS_IGNORE flag override.
>  - Clarify the description of DEV_TX_OFFLOAD_MBUF_FAST_FREE offload.
> 
> on v3:
>  - Introduce the DEV_TX_OFFLOAD_MBUF_FAST_FREE to act as an equivalent
>    for the no refcnt and single mempool flags.
>  - Fix features documentation.
>  - Fix comment style.
> 
> on v2:
>  - Taking new approach of dividing offloads into per-queue and per-port one.
>  - Postpone the Tx/Rx public struct renaming to 18.02
>  - Squash the helper functions into the Rx/Tx offloads intro patches.
> 
> Shahaf Shuler (4):
>   ethdev: introduce Rx queue offloads API
>   ethdev: introduce Tx queue offloads API
>   ethdev: add mbuf fast free Tx offload
>   doc: add details on ethdev offloads API
> 
>  doc/guides/nics/features.rst            |  66 +++++---
>  doc/guides/nics/features/default.ini    |   1 +
>  doc/guides/prog_guide/poll_mode_drv.rst |  20 +++
>  lib/librte_ether/rte_ethdev.c           | 223 +++++++++++++++++++++++++--
>  lib/librte_ether/rte_ethdev.h           |  89 ++++++++++-
>  5 files changed, 359 insertions(+), 40 deletions(-)
> 
> Series-reviewed-by: Andrew Rybchenko <arybchenko@solarflare.com>
> 
> --
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>

> 2.12.0

^ permalink raw reply	[relevance 0%]

* Re: [dpdk-dev] [RFC] Wireless Base Band Device (bbdev)
  2017-10-03 15:17  4%     ` Thomas Monjalon
@ 2017-10-04 17:11  0%       ` Flavio Leitner
  2017-10-05 21:55  0%       ` Mokhtar, Amr
  1 sibling, 0 replies; 200+ results
From: Flavio Leitner @ 2017-10-04 17:11 UTC (permalink / raw)
  To: Thomas Monjalon; +Cc: Mokhtar, Amr, dev, aconole, bluca

On Tue, 03 Oct 2017 17:17:53 +0200
Thomas Monjalon <thomas@monjalon.net> wrote:

> 03/10/2017 16:29, Mokhtar, Amr:
> > From: Thomas Monjalon [mailto:thomas@monjalon.net]  
> > > 25/08/2017 15:46, Amr Mokhtar:  
> > > > +int
> > > > +rte_bbdev_configure(uint8_t dev_id, uint16_t num_queues,
> > > > +		const struct rte_bbdev_conf *conf);  
> > > 
> > > I am not convinced by the "configure all" function in ethdev.
> > > We break the ABI each time we add a new feature to configure.
> > > And it does not really help to have all configurations in one struct.
> > > Would you mind to split the struct rte_bbdev_conf and split the function
> > > accordingly?  
> > 
> > There is nothing to split tbh. The only parameter it has is the socket_id.
> > And in fact, it's optional, can be null. The only config we need is num_queues.  
> 
> Indeed, there is nothing in this struct.
> If you need only to allocate queues, you just have to rename this function.
> 
> > I don't see in the near future that we may need to add more config params.
> > As a side, in the time of the implementation we were trying to avoid any
> > diversions from the current design ideology of ethdev and cryptodev.  
> 
> There is no ideology in ethdev, just some mistakes ;)
> 
> > Can we leave it for consideration with future releases?  
> 
> No it should be addressed from the beginning.
> 
> When you will need to add something more to configure port-wise,
> you should add a new function instead of breaking the ABI
> of the global conf struct.
> That's why the configure option should be more specialized.
> 
> Distro people were complaining about ABI breakage last week.
> This is exactly an example of how to avoid it from the beginning.

Exactly, and fixing in future is unlikely to happen or could be
more difficult and even if it happens, it will cause another breakage.

-- 
Flavio

^ permalink raw reply	[relevance 0%]

* Re: [dpdk-dev] [PATCH] ethdev: fix LIBABIVER
  @ 2017-10-04 21:54  3%   ` Thomas Monjalon
  0 siblings, 0 replies; 200+ results
From: Thomas Monjalon @ 2017-10-04 21:54 UTC (permalink / raw)
  To: Yigit, Ferruh; +Cc: dev, Yang, Zhiyong, stable

Added this comment:
The ethdev ABI has been broken in release 17.08 without being bumped.

> > Fixes: c33ade1227a5 ("doc: notify ethdev callback process API change")
> > Cc: stable@dpdk.org
> > 
> > Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
> 
> Reviewed-by: Zhiyong Yang <zhiyong.yang@intel.com>

Applied, thanks

^ permalink raw reply	[relevance 3%]

* Re: [dpdk-dev] [PATCH v6 0/4] ethdev new offloads API
  2017-10-04 16:12  0%     ` Ananyev, Konstantin
@ 2017-10-05  0:55  0%       ` Ferruh Yigit
  0 siblings, 0 replies; 200+ results
From: Ferruh Yigit @ 2017-10-05  0:55 UTC (permalink / raw)
  To: Ananyev, Konstantin, Shahaf Shuler, thomas, arybchenko, jerin.jacob; +Cc: dev

On 10/4/2017 5:12 PM, Ananyev, Konstantin wrote:
> 
> 
>> -----Original Message-----
>> From: Shahaf Shuler [mailto:shahafs@mellanox.com]
>> Sent: Wednesday, October 4, 2017 9:18 AM
>> To: Ananyev, Konstantin <konstantin.ananyev@intel.com>; thomas@monjalon.net; arybchenko@solarflare.com;
>> jerin.jacob@caviumnetworks.com; Yigit, Ferruh <ferruh.yigit@intel.com>
>> Cc: dev@dpdk.org
>> Subject: [PATCH v6 0/4] ethdev new offloads API
>>
>> Tx offloads configuration is per queue. Tx offloads are enabled by default,
>> and can be disabled using ETH_TXQ_FLAGS_NO* flags.
>> This behaviour is not consistent with the Rx side where the Rx offloads
>> configuration is per port. Rx offloads are disabled by default and enabled
>> according to bit field in rte_eth_rxmode structure.
>>
>> Moreover, considering more Tx and Rx offloads will be added
>> over time, the cost of managing them all inside the PMD will be tremendous,
>> as the PMD will need to check the matching for the entire offload set
>> for each mbuf it handles.
>> In addition, on the current approach each Rx offload added breaks the
>> ABI compatibility as it requires to add entries to existing bit-fields.
>>
>> The series address above issues by defining a new offloads API.
>> In the new API, offloads are divided into per-port and per-queue offloads,
>> with a corresponding capability for each.
>> The offloads are disabled by default. Each offload can be enabled or
>> disabled using the existing DEV_TX_OFFLOADS_* or DEV_RX_OFFLOADS_* flags.
>> Such API will enable to easily add or remove offloads, without breaking the
>> ABI compatibility.
>>
>> In order to provide a smooth transition between the APIs the following actions
>> were taken:
>> *  The old offloads API is kept for the meanwhile.
>> *  Helper function which copy from old to new API were added to ethdev,
>>    enabling the PMD to support only one of the APIs.
>> *  Helper function which copy from new to old API were also added,
>>    to enable application to use the new API with PMD which still supports
>>    the old one.
>>
>> Per discussion made on the RFC of this series [1], the integration plan which was
>> decided is to do the transition in two phases:
>> * ethdev API will move on 17.11.
>> * Apps and examples will move on 18.02.
>>
>> This to enable PMD maintainers sufficient time to adopt the new API.
>>
>> [1]
>> http://dpdk.org/ml/archives/dev/2017-August/072643.html
>>
>> on v6:
>>  - Move mbuf fast free Tx offload to a seperate patch.
>>
>> on v5:
>>  - Fix documentation.
>>  - Fix comments on port offloads configuration.
>>
>> on v4:
>>  - Added another patch for documentation.
>>  - Fixed ETH_TXQ_FLAGS_IGNORE flag override.
>>  - Clarify the description of DEV_TX_OFFLOAD_MBUF_FAST_FREE offload.
>>
>> on v3:
>>  - Introduce the DEV_TX_OFFLOAD_MBUF_FAST_FREE to act as an equivalent
>>    for the no refcnt and single mempool flags.
>>  - Fix features documentation.
>>  - Fix comment style.
>>
>> on v2:
>>  - Taking new approach of dividing offloads into per-queue and per-port one.
>>  - Postpone the Tx/Rx public struct renaming to 18.02
>>  - Squash the helper functions into the Rx/Tx offloads intro patches.
>>
>> Shahaf Shuler (4):
>>   ethdev: introduce Rx queue offloads API
>>   ethdev: introduce Tx queue offloads API
>>   ethdev: add mbuf fast free Tx offload
>>   doc: add details on ethdev offloads API
>>
>>  doc/guides/nics/features.rst            |  66 +++++---
>>  doc/guides/nics/features/default.ini    |   1 +
>>  doc/guides/prog_guide/poll_mode_drv.rst |  20 +++
>>  lib/librte_ether/rte_ethdev.c           | 223 +++++++++++++++++++++++++--
>>  lib/librte_ether/rte_ethdev.h           |  89 ++++++++++-
>>  5 files changed, 359 insertions(+), 40 deletions(-)
>>
>> Series-reviewed-by: Andrew Rybchenko <arybchenko@solarflare.com>

> Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>

Series applied to dpdk-next-net/master, thanks.

^ permalink raw reply	[relevance 0%]

* [dpdk-dev] [PATCH v5] devtools: rework abi checker script
  2017-09-20  9:12 27%   ` [dpdk-dev] [PATCH v4] " Olivier Matz
  2017-09-21 15:40  7%     ` Neil Horman
@ 2017-10-05  7:53 27%     ` Olivier Matz
  2017-10-05 13:15  4%       ` Neil Horman
  2017-11-07 23:24  4%       ` Thomas Monjalon
  1 sibling, 2 replies; 200+ results
From: Olivier Matz @ 2017-10-05  7:53 UTC (permalink / raw)
  To: dev, nhorman, bruce.richardson

The initial version of the script had some limitations:
- cannot work on a non-clean workspace
- environment variables are not documented
- no compilation log in case of failure
- return success even it abi is incompatible

This patch addresses these issues and rework the code.

Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
---

v4->v5:
- Add a log when shared lib has no public ABI

v3->v4:
- clarify logs on incompatible abi
- log when an error returned an error
- [really] fix the report path
- log the output of make config in the proper file

v2->v3:
- fix when not launched from dpdk root dir
- use "-Og -Wno-error" instead of "-O0"
- fix typo in commit log

v1->v2:
- use /usr/bin/env to find bash (which is required)
- fix displayed path to html reports
- reword help for -f option

 devtools/validate-abi.sh | 397 ++++++++++++++++++++++++-----------------------
 1 file changed, 205 insertions(+), 192 deletions(-)

diff --git a/devtools/validate-abi.sh b/devtools/validate-abi.sh
index 0accc99b1..8caf43e83 100755
--- a/devtools/validate-abi.sh
+++ b/devtools/validate-abi.sh
@@ -1,7 +1,8 @@
-#!/bin/sh
+#!/usr/bin/env bash
 #   BSD LICENSE
 #
 #   Copyright(c) 2015 Neil Horman. All rights reserved.
+#   Copyright(c) 2017 6WIND S.A.
 #   All rights reserved.
 #
 #   Redistribution and use in source and binary forms, with or without
@@ -27,236 +28,248 @@
 #   (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
 #   OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
-TAG1=$1
-TAG2=$2
-TARGET=$3
-ABI_DIR=`mktemp -d -p /tmp ABI.XXXXXX`
+set -e
 
-usage() {
-	echo "$0 <REV1> <REV2> <TARGET>"
-}
+abicheck=abi-compliance-checker
+abidump=abi-dumper
+default_dst=abi-check
+default_target=x86_64-native-linuxapp-gcc
 
-log() {
-	local level=$1
-	shift
-	echo "$*"
+# trap on error
+err_report() {
+    echo "$0: error at line $1"
 }
+trap 'err_report $LINENO' ERR
 
-validate_tags() {
+print_usage () {
+	cat <<- END_OF_HELP
+	$(basename $0) [options] <rev1> <rev2>
 
-	if [ -z "$HASH1" ]
-	then
-		echo "invalid revision: $TAG1"
-		return
-	fi
-	if [ -z "$HASH2" ]
-	then
-		echo "invalid revision: $TAG2"
-		return
-	fi
+	This script compares the ABI of 2 git revisions of the current
+	workspace. The output is a html report and a compilation log.
+
+	The objective is to make sure that applications built against
+	DSOs from the first revision can still run when executed using
+	the DSOs built from the second revision.
+
+	<rev1> and <rev2> are git commit id or tags.
+
+	Options:
+	  -h		show this help
+	  -j <num>	enable parallel compilation with <num> threads
+	  -v		show compilation logs on the console
+	  -d <dir>	change working directory (default is ${default_dst})
+	  -t <target>	the dpdk target to use (default is ${default_target})
+	  -f		overwrite existing files in destination directory
+
+	The script returns 0 on success, or the value of last failing
+	call of ${abicheck} (incompatible abi or the tool has run with errors).
+	The errors returned by ${abidump} are ignored.
+
+	END_OF_HELP
 }
 
-validate_args() {
-	if [ -z "$TAG1" ]
-	then
-		echo "Must Specify REV1"
-		return
-	fi
-	if [ -z "$TAG2" ]
-	then
-		echo "Must Specify REV2"
-		return
-	fi
-	if [ -z "$TARGET" ]
-	then
-		echo "Must Specify a build target"
+# log in the file, and on stdout if verbose
+# $1: level string
+# $2: string to be logged
+log() {
+	echo "$1: $2"
+	if [ "${verbose}" != "true" ]; then
+		echo "$1: $2" >&3
 	fi
 }
 
+# launch a command and log it, taking care of surrounding spaces with quotes
+cmd() {
+	local i s whitespace ret
+	s=""
+	whitespace="[[:space:]]"
+	for i in "$@"; do
+		if [[ $i =~ $whitespace ]]; then
+			i=\"$i\"
+		fi
+		if [ -z "$s" ]; then
+			s="$i"
+		else
+			s="$s $i"
+		fi
+	done
+
+	ret=0
+	log "CMD" "$s"
+	"$@" || ret=$?
+	if [ "$ret" != "0" ]; then
+		log "CMD" "previous command returned $ret"
+	fi
+
+	return $ret
+}
 
-cleanup_and_exit() {
-	rm -rf $ABI_DIR
-	git checkout $CURRENT_BRANCH
-	exit $1
+# redirect or copy stderr/stdout to a file
+# the syntax is unfamiliar, but it makes the rest of the
+# code easier to read, avoiding the use of pipes
+set_log_file() {
+	# save original stdout and stderr in fd 3 and 4
+	exec 3>&1
+	exec 4>&2
+	# create a new fd 5 that send to a file
+	exec 5> >(cat > $1)
+	# send stdout and stderr to fd 5
+	if [ "${verbose}" = "true" ]; then
+		exec 1> >(tee /dev/fd/5 >&3)
+		exec 2> >(tee /dev/fd/5 >&4)
+	else
+		exec 1>&5
+		exec 2>&5
+	fi
 }
 
 # Make sure we configure SHARED libraries
 # Also turn off IGB and KNI as those require kernel headers to build
 fixup_config() {
-	sed -i -e"$ a\CONFIG_RTE_BUILD_SHARED_LIB=y" config/defconfig_$TARGET
-	sed -i -e"$ a\CONFIG_RTE_NEXT_ABI=n" config/defconfig_$TARGET
-	sed -i -e"$ a\CONFIG_RTE_EAL_IGB_UIO=n" config/defconfig_$TARGET
-	sed -i -e"$ a\CONFIG_RTE_LIBRTE_KNI=n" config/defconfig_$TARGET
-	sed -i -e"$ a\CONFIG_RTE_KNI_KMOD=n" config/defconfig_$TARGET
+	local conf=config/defconfig_$target
+	cmd sed -i -e"$ a\CONFIG_RTE_BUILD_SHARED_LIB=y" $conf
+	cmd sed -i -e"$ a\CONFIG_RTE_NEXT_ABI=n" $conf
+	cmd sed -i -e"$ a\CONFIG_RTE_EAL_IGB_UIO=n" $conf
+	cmd sed -i -e"$ a\CONFIG_RTE_LIBRTE_KNI=n" $conf
+	cmd sed -i -e"$ a\CONFIG_RTE_KNI_KMOD=n" $conf
 }
 
-###########################################
-#START
-############################################
+# build dpdk for the given tag and dump abi
+# $1: hash of the revision
+gen_abi() {
+	local i
+
+	cmd git clone ${dpdkroot} ${dst}/${1}
+	cmd cd ${dst}/${1}
+
+	log "INFO" "Checking out version ${1} of the dpdk"
+	# Move to the old version of the tree
+	cmd git checkout ${1}
+
+	fixup_config
+
+	# Now configure the build
+	log "INFO" "Configuring DPDK ${1}"
+	cmd make config T=$target O=$target
+
+	# Checking abi compliance relies on using the dwarf information in
+	# the shared objects. Build with -g to include them.
+	log "INFO" "Building DPDK ${1}. This might take a moment"
+	cmd make -j$parallel O=$target V=1 EXTRA_CFLAGS="-g -Og -Wno-error" \
+	    EXTRA_LDFLAGS="-g" || log "INFO" "The build failed"
+
+	# Move to the lib directory
+	cmd cd ${PWD}/$target/lib
+	log "INFO" "Collecting ABI information for ${1}"
+	for i in *.so; do
+		[ -e "$i" ] || break
+		cmd $abidump ${i} -o $dst/${1}/${i}.dump -lver ${1} || true
+		# hack to ignore empty SymbolsInfo section (no public ABI)
+		if grep -q "'SymbolInfo' => {}," $dst/${1}/${i}.dump \
+				2> /dev/null; then
+			log "INFO" "${i} has no public ABI, remove dump file"
+			cmd rm -f $dst/${1}/${i}.dump
+		fi
+	done
+}
 
-#trap on ctrl-c to clean up
-trap cleanup_and_exit SIGINT
+verbose=false
+parallel=1
+dst=${default_dst}
+target=${default_target}
+force=0
+while getopts j:vd:t:fh ARG ; do
+	case $ARG in
+		j ) parallel=$OPTARG ;;
+		v ) verbose=true ;;
+		d ) dst=$OPTARG ;;
+		t ) target=$OPTARG ;;
+		f ) force=1 ;;
+		h ) print_usage ; exit 0 ;;
+		? ) print_usage ; exit 1 ;;
+	esac
+done
+shift $(($OPTIND - 1))
 
-if [ -z "$DPDK_MAKE_JOBS" ]
-then
-	# This counts the number of cpus on the system
-	if [ -e /usr/bin/lscpu ]
-	then
-		DPDK_MAKE_JOBS=`lscpu -p=cpu | grep -v "#" | wc -l`
-	else
-		DPDK_MAKE_JOBS=1
-	fi
+if [ $# != 2 ]; then
+	print_usage
+	exit 1
 fi
 
-#Save the current branch
-CURRENT_BRANCH=`git branch | grep \* | cut -d' ' -f2`
+tag1=$1
+tag2=$2
 
-if [ -z "$CURRENT_BRANCH" ]
-then
-	CURRENT_BRANCH=`git log --pretty=format:%H HEAD~1..HEAD`
-fi
+# convert path to absolute
+case "${dst}" in
+	/*) ;;
+	*) dst=${PWD}/${dst} ;;
+esac
+dpdkroot=$(readlink -e $(dirname $0)/..)
 
-if [ -n "$VERBOSE" ]
-then
-	export VERBOSE=/dev/stdout
-else
-	export VERBOSE=/dev/null
+if [ -e "${dst}" -a "$force" = 0 ]; then
+	echo "The ${dst} directory is not empty. Remove it, use another"
+	echo "one (-d <dir>), or force overriding (-f)"
+	exit 1
 fi
 
-# Validate that we have all the arguments we need
-res=$(validate_args)
-if [ -n "$res" ]
-then
-	echo $res
-	usage
-	cleanup_and_exit 1
-fi
+rm -rf ${dst}
+mkdir -p ${dst}
+set_log_file ${dst}/abi-check.log
+log "INFO" "Logs available in ${dst}/abi-check.log"
 
-HASH1=$(git show -s --format=%H "$TAG1" -- 2> /dev/null | tail -1)
-HASH2=$(git show -s --format=%H "$TAG2" -- 2> /dev/null | tail -1)
+command -v ${abicheck} || log "INFO" "Can't find ${abicheck} utility"
+command -v ${abidump} || log "INFO" "Can't find ${abidump} utility"
 
-# Make sure our tags exist
-res=$(validate_tags)
-if [ -n "$res" ]
-then
-	echo $res
-	cleanup_and_exit 1
-fi
+hash1=$(git show -s --format=%h "$tag1" -- 2> /dev/null | tail -1)
+hash2=$(git show -s --format=%h "$tag2" -- 2> /dev/null | tail -1)
 
 # Make hashes available in output for non-local reference
-TAG1="$TAG1 ($HASH1)"
-TAG2="$TAG2 ($HASH2)"
-
-ABICHECK=`which abi-compliance-checker 2>/dev/null`
-if [ $? -ne 0 ]
-then
-	log "INFO" "Can't find abi-compliance-checker utility"
-	cleanup_and_exit 1
-fi
-
-ABIDUMP=`which abi-dumper 2>/dev/null`
-if [ $? -ne 0 ]
-then
-	log "INFO" "Can't find abi-dumper utility"
-	cleanup_and_exit 1
-fi
+tag1="$tag1 ($hash1)"
+tag2="$tag2 ($hash2)"
 
-log "INFO" "We're going to check and make sure that applications built"
-log "INFO" "against DPDK DSOs from version $TAG1 will still run when executed"
-log "INFO" "against DPDK DSOs built from version $TAG2."
-log "INFO" ""
-
-# Check to make sure we have a clean tree
-git status | grep -q clean
-if [ $? -ne 0 ]
-then
-	log "WARN" "Working directory not clean, aborting"
-	cleanup_and_exit 1
+if [ "$hash1" = "$hash2" ]; then
+	log "ERROR" "$tag1 and $tag2 are the same revisions"
+	exit 1
 fi
 
-# Move to the root of the git tree
-cd $(dirname $0)/..
+cmd mkdir -p ${dst}
 
-log "INFO" "Checking out version $TAG1 of the dpdk"
-# Move to the old version of the tree
-git checkout $HASH1
+# dump abi for each revision
+gen_abi ${hash1}
+gen_abi ${hash2}
 
-fixup_config
+# compare the abi dumps
+cmd cd ${dst}
+ret=0
+list=""
+for i in ${hash2}/*.dump; do
+	name=`basename $i`
+	libname=${name%.dump}
 
-# Checking abi compliance relies on using the dwarf information in
-# The shared objects.  Thats only included in the DSO's if we build
-# with -g
-export EXTRA_CFLAGS="$EXTRA_CFLAGS -g -O0"
-export EXTRA_LDFLAGS="$EXTRA_LDFLAGS -g"
-
-# Now configure the build
-log "INFO" "Configuring DPDK $TAG1"
-make config T=$TARGET O=$TARGET > $VERBOSE 2>&1
-
-log "INFO" "Building DPDK $TAG1. This might take a moment"
-make -j$DPDK_MAKE_JOBS O=$TARGET > $VERBOSE 2>&1
-
-if [ $? -ne 0 ]
-then
-	log "INFO" "THE BUILD FAILED.  ABORTING"
-	cleanup_and_exit 1
-fi
+	if [ ! -f ${hash1}/$name ]; then
+		log "INFO" "$NAME does not exist in $tag1. skipping..."
+		continue
+	fi
 
-# Move to the lib directory
-cd $TARGET/lib
-log "INFO" "COLLECTING ABI INFORMATION FOR $TAG1"
-for i in `ls *.so`
-do
-	$ABIDUMP $i -o $ABI_DIR/$i-ABI-0.dump -lver $HASH1
+	local_ret=0
+	cmd $abicheck -l $libname \
+	    -old ${hash1}/$name -new ${hash2}/$name || local_ret=$?
+	if [ $local_ret != 0 ]; then
+		log "NOTICE" "$abicheck returned $local_ret"
+		ret=$local_ret
+		list="$list $libname"
+	fi
 done
-cd ../..
-
-# Now clean the tree, checkout the second tag, and rebuild
-git clean -f -d
-git reset --hard
-# Move to the new version of the tree
-log "INFO" "Checking out version $TAG2 of the dpdk"
-git checkout $HASH2
-
-fixup_config
-
-# Now configure the build
-log "INFO" "Configuring DPDK $TAG2"
-make config T=$TARGET O=$TARGET > $VERBOSE 2>&1
-
-log "INFO" "Building DPDK $TAG2. This might take a moment"
-make -j$DPDK_MAKE_JOBS O=$TARGET > $VERBOSE 2>&1
 
-if [ $? -ne 0 ]
-then
-	log "INFO" "THE BUILD FAILED.  ABORTING"
-	cleanup_and_exit 1
+if [ $ret != 0 ]; then
+	log "NOTICE" "ABI may be incompatible, check reports/logs for details."
+	log "NOTICE" "Incompatible list: $list"
+else
+	log "NOTICE" "No error detected, ABI is compatible."
 fi
 
-cd $TARGET/lib
-log "INFO" "COLLECTING ABI INFORMATION FOR $TAG2"
-for i in `ls *.so`
-do
-	$ABIDUMP $i -o $ABI_DIR/$i-ABI-1.dump -lver $HASH2
-done
-cd ../..
-
-# Start comparison of ABI dumps
-for i in `ls $ABI_DIR/*-1.dump`
-do
-	NEWNAME=`basename $i`
-	OLDNAME=`basename $i | sed -e"s/1.dump/0.dump/"`
-	LIBNAME=`basename $i | sed -e"s/-ABI-1.dump//"`
-
-	if [ ! -f $ABI_DIR/$OLDNAME ]
-	then
-		log "INFO" "$OLDNAME DOES NOT EXIST IN $TAG1. SKIPPING..."
-	fi
-
-	#compare the abi dumps
-	$ABICHECK -l $LIBNAME -old $ABI_DIR/$OLDNAME -new $ABI_DIR/$NEWNAME
-done
+log "INFO" "Logs are in ${dst}/abi-check.log"
+log "INFO" "HTML reports are in ${dst}/compat_reports directory"
 
-git reset --hard
-log "INFO" "ABI CHECK COMPLETE.  REPORTS ARE IN compat_report directory"
-cleanup_and_exit 0
+exit $ret
-- 
2.11.0

^ permalink raw reply	[relevance 27%]

* Re: [dpdk-dev] [PATCH v6 4/8] ethdev: add GTP items to support flow API
  @ 2017-10-05  8:30  3%                 ` Adrien Mazarguil
  2017-10-05  8:39  0%                   ` Wu, Jingjing
  0 siblings, 1 reply; 200+ results
From: Adrien Mazarguil @ 2017-10-05  8:30 UTC (permalink / raw)
  To: Wu, Jingjing; +Cc: Sean Harte, Xing, Beilei, Chilikin, Andrey, dev

On Thu, Oct 05, 2017 at 08:06:38AM +0000, Wu, Jingjing wrote:
> 
> 
> > -----Original Message-----
> > From: Sean Harte [mailto:seanbh@gmail.com]
> > Sent: Tuesday, October 3, 2017 4:57 PM
> > To: Adrien Mazarguil <adrien.mazarguil@6wind.com>
> > Cc: Xing, Beilei <beilei.xing@intel.com>; Wu, Jingjing <jingjing.wu@intel.com>; Chilikin,
> > Andrey <andrey.chilikin@intel.com>; dev@dpdk.org
> > Subject: Re: [dpdk-dev] [PATCH v6 4/8] ethdev: add GTP items to support flow API
> > 
> > On 2 October 2017 at 13:27, Adrien Mazarguil <adrien.mazarguil@6wind.com> wrote:
> > > On Fri, Sep 29, 2017 at 10:29:55AM +0100, Sean Harte wrote:
> > >> On 29 September 2017 at 09:54, Xing, Beilei <beilei.xing@intel.com> wrote:
> > > <snip>
> > >> >> >  /**
> > >> >> > + * RTE_FLOW_ITEM_TYPE_GTP.
> > >> >> > + *
> > >> >> > + * Matches a GTPv1 header.
> > >> >> > + */
> > >> >> > +struct rte_flow_item_gtp {
> > >> >> > +       /**
> > >> >> > +        * Version (3b), protocol type (1b), reserved (1b),
> > >> >> > +        * Extension header flag (1b),
> > >> >> > +        * Sequence number flag (1b),
> > >> >> > +        * N-PDU number flag (1b).
> > >> >> > +        */
> > >> >> > +       uint8_t v_pt_rsv_flags;
> > >> >> > +       uint8_t msg_type; /**< Message type. */
> > >> >> > +       rte_be16_t msg_len; /**< Message length. */
> > >> >> > +       rte_be32_t teid; /**< Tunnel endpoint identifier. */ };
> > >> >>
> > >> >> In future, you might add support for GTPv2 (which is used since LTE).
> > >> >> Maybe this structure should have v1 in its name to avoid confusion?
> > >> >
> > >> > I considered it before. But I think we can modify it when we support GTPv2 in future,
> > and keep concise 'GTP' currently:)  since I have described it matches v1 header.
> > >> >
> > >>
> > >> You could rename v_pt_rsv_flags to version_flags to avoid some future
> > >> code changes to support GTPv2. There's still the issue that not all
> > >> GTPv2 messages have a TEID though.
> > >
> > > Although they have the same size, the header of these two protocols
> > > obviously differs. My suggestion would be to go with a separate GTPv2
> > > pattern item using its own dedicated structure instead.
> > >
> > > --
> > > Adrien Mazarguil
> > > 6WIND
> > 
> > The 1st four bytes are the same (flags in first byte have different
> > meanings, but the bits indicating the version are in the same
> > location). After that, different fields in each version are optional,
> > and the headers have variable size. A single structure could be used
> > if the first field is renamed to something like "version_flags", and
> > then check that the teid field in item->mask is not set if
> > ((version_flags >> 5 == 2) && ((version_flags >> 4) & 1) == 1). If
> > there's going to be two structures, it would be good to put v1 and v2
> > in the names, in my opinion.
> 
> I think the name GTP is OK for now. Due to v1 and v2 are different, why not rename them
> when the v2 supporting are introduced?

In any case I'd rather avoid renaming and modifying existing items and
structure contents once part of the API to avoid API/ABI breakage that
require deprecation notices, user applications updates and so on; rte_flow
has been created as a kind of append-only API for this reason (of course
there are exceptions, such as a bad design choice for the VLAN item I intend
to fix at some point).

I'm fine with the name "GTP" as defined now and documented as matching
GTPv1. We can add "GTPv2"-themed definitions later when some implementation
provides the ability to match this version. If you want to append the "v1"
suffix right now to be more explicit, I'm also fine with that. Your call.

-- 
Adrien Mazarguil
6WIND

^ permalink raw reply	[relevance 3%]

* Re: [dpdk-dev] [PATCH v6 4/8] ethdev: add GTP items to support flow API
  2017-10-05  8:30  3%                 ` Adrien Mazarguil
@ 2017-10-05  8:39  0%                   ` Wu, Jingjing
  0 siblings, 0 replies; 200+ results
From: Wu, Jingjing @ 2017-10-05  8:39 UTC (permalink / raw)
  To: Adrien Mazarguil; +Cc: Sean Harte, Xing, Beilei, Chilikin, Andrey, dev



> -----Original Message-----
> From: Adrien Mazarguil [mailto:adrien.mazarguil@6wind.com]
> Sent: Thursday, October 5, 2017 4:30 PM
> To: Wu, Jingjing <jingjing.wu@intel.com>
> Cc: Sean Harte <seanbh@gmail.com>; Xing, Beilei <beilei.xing@intel.com>; Chilikin,
> Andrey <andrey.chilikin@intel.com>; dev@dpdk.org
> Subject: Re: [dpdk-dev] [PATCH v6 4/8] ethdev: add GTP items to support flow API
> 
> On Thu, Oct 05, 2017 at 08:06:38AM +0000, Wu, Jingjing wrote:
> >
> >
> > > -----Original Message-----
> > > From: Sean Harte [mailto:seanbh@gmail.com]
> > > Sent: Tuesday, October 3, 2017 4:57 PM
> > > To: Adrien Mazarguil <adrien.mazarguil@6wind.com>
> > > Cc: Xing, Beilei <beilei.xing@intel.com>; Wu, Jingjing <jingjing.wu@intel.com>;
> Chilikin,
> > > Andrey <andrey.chilikin@intel.com>; dev@dpdk.org
> > > Subject: Re: [dpdk-dev] [PATCH v6 4/8] ethdev: add GTP items to support flow API
> > >
> > > On 2 October 2017 at 13:27, Adrien Mazarguil <adrien.mazarguil@6wind.com>
> wrote:
> > > > On Fri, Sep 29, 2017 at 10:29:55AM +0100, Sean Harte wrote:
> > > >> On 29 September 2017 at 09:54, Xing, Beilei <beilei.xing@intel.com> wrote:
> > > > <snip>
> > > >> >> >  /**
> > > >> >> > + * RTE_FLOW_ITEM_TYPE_GTP.
> > > >> >> > + *
> > > >> >> > + * Matches a GTPv1 header.
> > > >> >> > + */
> > > >> >> > +struct rte_flow_item_gtp {
> > > >> >> > +       /**
> > > >> >> > +        * Version (3b), protocol type (1b), reserved (1b),
> > > >> >> > +        * Extension header flag (1b),
> > > >> >> > +        * Sequence number flag (1b),
> > > >> >> > +        * N-PDU number flag (1b).
> > > >> >> > +        */
> > > >> >> > +       uint8_t v_pt_rsv_flags;
> > > >> >> > +       uint8_t msg_type; /**< Message type. */
> > > >> >> > +       rte_be16_t msg_len; /**< Message length. */
> > > >> >> > +       rte_be32_t teid; /**< Tunnel endpoint identifier. */ };
> > > >> >>
> > > >> >> In future, you might add support for GTPv2 (which is used since LTE).
> > > >> >> Maybe this structure should have v1 in its name to avoid confusion?
> > > >> >
> > > >> > I considered it before. But I think we can modify it when we support GTPv2 in
> future,
> > > and keep concise 'GTP' currently:)  since I have described it matches v1 header.
> > > >> >
> > > >>
> > > >> You could rename v_pt_rsv_flags to version_flags to avoid some future
> > > >> code changes to support GTPv2. There's still the issue that not all
> > > >> GTPv2 messages have a TEID though.
> > > >
> > > > Although they have the same size, the header of these two protocols
> > > > obviously differs. My suggestion would be to go with a separate GTPv2
> > > > pattern item using its own dedicated structure instead.
> > > >
> > > > --
> > > > Adrien Mazarguil
> > > > 6WIND
> > >
> > > The 1st four bytes are the same (flags in first byte have different
> > > meanings, but the bits indicating the version are in the same
> > > location). After that, different fields in each version are optional,
> > > and the headers have variable size. A single structure could be used
> > > if the first field is renamed to something like "version_flags", and
> > > then check that the teid field in item->mask is not set if
> > > ((version_flags >> 5 == 2) && ((version_flags >> 4) & 1) == 1). If
> > > there's going to be two structures, it would be good to put v1 and v2
> > > in the names, in my opinion.
> >
> > I think the name GTP is OK for now. Due to v1 and v2 are different, why not rename
> them
> > when the v2 supporting are introduced?
> 
> In any case I'd rather avoid renaming and modifying existing items and
> structure contents once part of the API to avoid API/ABI breakage that
> require deprecation notices, user applications updates and so on; rte_flow
> has been created as a kind of append-only API for this reason (of course
> there are exceptions, such as a bad design choice for the VLAN item I intend
> to fix at some point).
> 
> I'm fine with the name "GTP" as defined now and documented as matching
> GTPv1. We can add "GTPv2"-themed definitions later when some implementation
> provides the ability to match this version. If you want to append the "v1"
> suffix right now to be more explicit, I'm also fine with that. Your call.
> 
Got your point, I'm also fine with the name now for GTPv1, and add "GTPv2" when
It is supported.

Thanks
Jingjing

^ permalink raw reply	[relevance 0%]

* Re: [dpdk-dev] [PATCH v6 1/3] eal/x86: run-time dispatch over memcpy
  @ 2017-10-05 11:26  3%         ` Richardson, Bruce
  0 siblings, 0 replies; 200+ results
From: Richardson, Bruce @ 2017-10-05 11:26 UTC (permalink / raw)
  To: Li, Xiaoyun, Ananyev, Konstantin
  Cc: Lu, Wenzhuo, Zhang, Helin, dev,
	Thomas Monjalon (thomas.monjalon@6wind.com)



> -----Original Message-----
> From: Li, Xiaoyun
> Sent: Thursday, October 5, 2017 12:19 PM
> To: Ananyev, Konstantin <konstantin.ananyev@intel.com>; Richardson, Bruce
> <bruce.richardson@intel.com>
> Cc: Lu, Wenzhuo <wenzhuo.lu@intel.com>; Zhang, Helin
> <helin.zhang@intel.com>; dev@dpdk.org; Thomas Monjalon
> (thomas.monjalon@6wind.com) <thomas.monjalon@6wind.com>
> Subject: RE: [PATCH v6 1/3] eal/x86: run-time dispatch over memcpy
> 
> 
> 
> > -----Original Message-----
> > From: Ananyev, Konstantin
> > Sent: Thursday, October 5, 2017 17:37
> > To: Li, Xiaoyun <xiaoyun.li@intel.com>; Richardson, Bruce
> > <bruce.richardson@intel.com>
> > Cc: Lu, Wenzhuo <wenzhuo.lu@intel.com>; Zhang, Helin
> > <helin.zhang@intel.com>; dev@dpdk.org; Thomas Monjalon
> > (thomas.monjalon@6wind.com) <thomas.monjalon@6wind.com>
> > Subject: RE: [PATCH v6 1/3] eal/x86: run-time dispatch over memcpy
> >
> > > diff --git a/lib/librte_eal/linuxapp/eal/rte_eal_version.map
> > > b/lib/librte_eal/linuxapp/eal/rte_eal_version.map
> > > index 8c08b8d..15a2fe9 100644
> > > --- a/lib/librte_eal/linuxapp/eal/rte_eal_version.map
> > > +++ b/lib/librte_eal/linuxapp/eal/rte_eal_version.map
> > > @@ -241,5 +241,6 @@ EXPERIMENTAL {
> > >  	rte_service_runstate_set;
> > >  	rte_service_set_stats_enable;
> > >  	rte_service_start_with_defaults;
> > > +	rte_memcpy_ptr;
> > >
> > >  } DPDK_17.08;
> >
> > I am not an expert in DPDK versioning system, But shouldn't we create
> > a
> > 17.11 section here?
> Should we create a 17.11 section? I am not sure who to ask for.
> 
Any new functions that are public and are added in the 17.11 release need to
be added to the map file in a new 17.11 section. They are not part of the
ABI for the 17.08 release as they were not present there.

^ permalink raw reply	[relevance 3%]

* [dpdk-dev] [PATCH v6 0/9] Policy Based Power Control for Guest
  2017-10-04 15:25  2%   ` [dpdk-dev] [PATCH v5 0/9] " David Hunt
@ 2017-10-05 12:25  2%     ` David Hunt
  2017-10-05 13:28  2%       ` [dpdk-dev] [PATCH v7 " David Hunt
  0 siblings, 1 reply; 200+ results
From: David Hunt @ 2017-10-05 12:25 UTC (permalink / raw)
  To: dev; +Cc: konstantin.ananyev, jingjing.wu, santosh.shukla

Policy Based Power Control for Guest

This patchset adds the facility for a guest VM to send a policy down to the
host that will allow the host to scale up/down cpu frequencies
depending on the policy criteria independently of the DPDK app running in
the guest.  This differs from the previous vm_power implementation where
individual scale up/down requests were send from the guest to the host via
virtio-serial.

V6 patchset changes:
  * Fixed comments in header for rte_pmd_i40e_query_vfid_by_mac.
  * changed rte_pmd_i40e_query_vfid_by_mac return code from uint to int
    as it can return negative error codes.
  * Removed bool enum from channel_commands.h, including stdbool.h instead.
  * Added #define VM_MAX_NAME_SZ 32 to channel_commands.h
  * Renamed a few variables to be more readable.
  * Added returns in a few places if failed to get info on domain.
  * Fixed power_manager_init to keep track of num_freqs for each core.
  * In power_manager_scale_core_med(), changed a hardcoded '5' to instead
    be calculated from the centre of the frequency list
    (global_core_freq_info[core_num].num_freqs / 2)

V5 patchset changes:
  * Removed most of the #ifdef I40_PMD as it will be applicable to
    other PMDs in the future.
  * Changed the parameter of rte_pmd_i40e_query_vfid_by_mac from a uint64
    to a const struct ether_addr *, rather than casting it later in the
    function.

V4 patchset changes:
  * None, re-post to mailing list under the correct email thread.

V3 patchset changes:
  * Changed to using is_same_ether_addr() instead of looping through
    the mac address bytes to compare them.
  * Tweaked some comments and working in the i40e patch after review.
  * Added a patch to the set to add new i40e function to map file, so
    as to allow shared library builds. The power library API needs a cleanup
    in next release, so will add API/ABI warning for this cleanup in a
    separate patch.

V2 patchset changes:
  * Removed API's in ethdev layer.
  * Now just a single new API in the i40e driver for mapping VF MAC to
    VF index.
  * Moved new function from rte_rxtx.c to rte_pmd_i40e.c
  * Removed function for reading i40e register, moved to using the
    standard stats API.
  * Renamed i40e function to rte_pmd_i40e_query_vfid_by_mac
  * Cleaned up policy generation code.

It's a modification of the vm_power_manager app that runs in the host, and
the guest_vm_power_app example app that runs in the guest. This allows the
guest to send down a policy to the host via virtio-serial, which then allows
the host to scale up/down based on the criteria in the policy, resulting in
quicker scale up/down than individual requests coming from the guest.
It also means that the DPDK application running in the guest does not need
to be modified in any way, it is unaware that it's cores are being scaled
up/down, reducing the effort in implementing a power-aware infrastructure.

The usage model is as follows:
1. Set up the VF's and assign to the guest in the usual way.
2. run vm_power_manager on the host, creating a channel to the guest.
3. Start the guest_vm_power_mgr app on the guest, which establishes
   a virtio-serial channel to the host.
4. Send down the profile for the guest using the "send_profile now" command.
   There is an example profile hard-coded into guest_vm_power_mgr.
5. Stop the guest_vm_power_mgr and run your normal power-unaware application.
6. Send traffic into the VFs at varying traffic rates.
   Observe the frequency change on the host (turbostat -i 1)

The sequence of code changes are as follows:

A new function has been aded to the i40e driver to allow mapping of
a VF MAC to VF index.

Next we make an addition to librte_power that adds an extra command to allow
the passing of a policy structure from the guest to the host. This struct
contains information like busy/quiet hour, packet throughput thresholds, etc.

The next addition adds functionality to convert the virtual CPU (vcpU0 IDs to
physical CPU (pcpu) IDs so that the host can scale up/down the cores used
in the guest.

The remaining patches are functionality to process the policy, and take action
when the relevant trigger occurs to cause a frequency change.

[1/9] net/i40e: add API to convert VF MAC to VF id
[2/9] lib/librte_power: add extra msg type for policies
[3/9] examples/vm_power_mgr: add vcpu to pcpu mapping
[4/9] examples/vm_power_mgr: add scale to medium freq fn
[5/9] examples/vm_power_mgr: add policy to channels
[6/9] examples/vm_power_mgr: add port initialisation
[7/9] power: add send channel msg function to map file
[8/9] examples/guest_cli: add send policy to host
[9/9] examples/vm_power_mgr: set MAC address of VF

^ permalink raw reply	[relevance 2%]

* [dpdk-dev] [PATCH V2 3/5] ethdev: add new api for traffic metering and policing
  @ 2017-10-05 13:09  1%   ` Cristian Dumitrescu
  0 siblings, 0 replies; 200+ results
From: Cristian Dumitrescu @ 2017-10-05 13:09 UTC (permalink / raw)
  To: dev
  Cc: thomas, adrien.mazarguil, jingjing.wu, hemant.agrawal,
	jerin.jacob, jasvinder.singh

This patch introduces new ethdev generic API for Traffic Metering and
Policing (MTR), which is yet another standard RX offload for Ethernet
devices.

Similar to rte_flow and rte_tm APIs, the configuration of MTR objects is
done in their own namespace (rte_mtr) within the librte_ether library.

Main features:
1. Traffic metering: determine the color for the current packet (green,
   yellow, red) based on history maintained by the MTR object. Supported
   algorithms: srTCM (RFC 2697), trTCM (RFC 2698 and RFC 4115).
2. Policing (per meter output color actions): re-color the packet (keep
   or change the meter output color) or drop the packet.
3. Statistics
4. Capability API

Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
---
Changes in v2:
- Implemented input from Hemant:
     - Added support for RFC 4115 trTCM algorithm
     - Added support for meter pass-through mode: see API functions
       rte_mtr_meter_enable() and rte_mtr_meter_disable()
- Implemented input from Jerin:
     - Added capability API
- Implemented input from Thomas:
     - Added new API functions under the EXPERIMENTAL section in map file
- Improved the mechanism for MTR object chaining: each MTR object can be
  configured whther to read input color from a previous MTR object in the
  same flow (if any) of from DSCP traslation table
- Improved run-time update functions
- Doxygen: added more descriptions, small fixes

Changes in v1 (from RFC [1]):
- Implemented input from Thomas:
     - Added EXPERIMENTAL tag in rte_mtr.h and MANTAINERS for this new API
- Implemented input from Adrien:
     - Added more Doxygen comments to re-inforce relationship between MTR and
       flow
- Doxygen: added hook in doxy-api-index.md

[1] RFC: http://www.dpdk.org/ml/archives/dev/2017-May/066888.html

 MAINTAINERS                             |   4 +
 doc/api/doxy-api-index.md               |   1 +
 lib/librte_ether/Makefile               |   3 +
 lib/librte_ether/rte_ethdev_version.map |  18 +
 lib/librte_ether/rte_mtr.c              | 229 ++++++++++
 lib/librte_ether/rte_mtr.h              | 723 ++++++++++++++++++++++++++++++++
 lib/librte_ether/rte_mtr_driver.h       | 221 ++++++++++
 7 files changed, 1199 insertions(+)
 create mode 100644 lib/librte_ether/rte_mtr.c
 create mode 100644 lib/librte_ether/rte_mtr.h
 create mode 100644 lib/librte_ether/rte_mtr_driver.h

diff --git a/MAINTAINERS b/MAINTAINERS
index 8df2a7f..f9aa787 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -260,6 +260,10 @@ M: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
 T: git://dpdk.org/next/dpdk-next-tm
 F: lib/librte_ether/rte_tm*
 
+Traffic Metering and Policing API - EXPERIMENTAL
+M: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
+F: lib/librte_ether/rte_mtr*
+
 Crypto API
 M: Declan Doherty <declan.doherty@intel.com>
 F: lib/librte_cryptodev/
diff --git a/doc/api/doxy-api-index.md b/doc/api/doxy-api-index.md
index 19e0d4f..b2342a9 100644
--- a/doc/api/doxy-api-index.md
+++ b/doc/api/doxy-api-index.md
@@ -41,6 +41,7 @@ The public API headers are grouped by topics:
   [ethctrl]            (@ref rte_eth_ctrl.h),
   [rte_flow]           (@ref rte_flow.h),
   [rte_tm]             (@ref rte_tm.h),
+  [rte_mtr]            (@ref rte_mtr.h),
   [cryptodev]          (@ref rte_cryptodev.h),
   [eventdev]           (@ref rte_eventdev.h),
   [metrics]            (@ref rte_metrics.h),
diff --git a/lib/librte_ether/Makefile b/lib/librte_ether/Makefile
index 201cb96..35ba5d9 100644
--- a/lib/librte_ether/Makefile
+++ b/lib/librte_ether/Makefile
@@ -46,6 +46,7 @@ LIBABIVER := 7
 SRCS-y += rte_ethdev.c
 SRCS-y += rte_flow.c
 SRCS-y += rte_tm.c
+SRCS-y += rte_mtr.c
 SRCS-y += ethdev_profile.c
 
 #
@@ -60,5 +61,7 @@ SYMLINK-y-include += rte_flow.h
 SYMLINK-y-include += rte_flow_driver.h
 SYMLINK-y-include += rte_tm.h
 SYMLINK-y-include += rte_tm_driver.h
+SYMLINK-y-include += rte_mtr.h
+SYMLINK-y-include += rte_mtr_driver.h
 
 include $(RTE_SDK)/mk/rte.lib.mk
diff --git a/lib/librte_ether/rte_ethdev_version.map b/lib/librte_ether/rte_ethdev_version.map
index 07f9e17..c8f59a0 100644
--- a/lib/librte_ether/rte_ethdev_version.map
+++ b/lib/librte_ether/rte_ethdev_version.map
@@ -194,3 +194,21 @@ DPDK_17.11 {
 	rte_eth_dev_reset;
 
 } DPDK_17.08;
+
+EXPERIMENTAL {
+	global:
+
+	rte_mtr_capabilities_get;
+	rte_mtr_meter_profile_add;
+	rte_mtr_meter_profile_delete;
+	rte_mtr_create;
+	rte_mtr_destroy;
+	rte_mtr_meter_enable;
+	rte_mtr_meter_disable;
+	rte_mtr_meter_profile_update;
+	rte_mtr_meter_dscp_table_update;
+	rte_mtr_policer_actions_update;
+	rte_mtr_stats_update;
+	rte_mtr_stats_read;
+
+} DPDK_17.11;
diff --git a/lib/librte_ether/rte_mtr.c b/lib/librte_ether/rte_mtr.c
new file mode 100644
index 0000000..6526a97
--- /dev/null
+++ b/lib/librte_ether/rte_mtr.c
@@ -0,0 +1,229 @@
+/*-
+ *   BSD LICENSE
+ *
+ *   Copyright(c) 2017 Intel Corporation. All rights reserved.
+ *   All rights reserved.
+ *
+ *   Redistribution and use in source and binary forms, with or without
+ *   modification, are permitted provided that the following conditions
+ *   are met:
+ *
+ *     * Redistributions of source code must retain the above copyright
+ *       notice, this list of conditions and the following disclaimer.
+ *     * Redistributions in binary form must reproduce the above copyright
+ *       notice, this list of conditions and the following disclaimer in
+ *       the documentation and/or other materials provided with the
+ *       distribution.
+ *     * Neither the name of Intel Corporation nor the names of its
+ *       contributors may be used to endorse or promote products derived
+ *       from this software without specific prior written permission.
+ *
+ *   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ *   "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ *   LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ *   A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ *   OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ *   LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ *   DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ *   THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ *   (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ *   OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include <stdint.h>
+
+#include <rte_errno.h>
+#include "rte_ethdev.h"
+#include "rte_mtr_driver.h"
+#include "rte_mtr.h"
+
+/* Get generic traffic metering & policing operations structure from a port. */
+const struct rte_mtr_ops *
+rte_mtr_ops_get(uint8_t port_id, struct rte_mtr_error *error)
+{
+	struct rte_eth_dev *dev = &rte_eth_devices[port_id];
+	const struct rte_mtr_ops *ops;
+
+	if (!rte_eth_dev_is_valid_port(port_id)) {
+		rte_mtr_error_set(error,
+			ENODEV,
+			RTE_MTR_ERROR_TYPE_UNSPECIFIED,
+			NULL,
+			rte_strerror(ENODEV));
+		return NULL;
+	}
+
+	if ((dev->dev_ops->mtr_ops_get == NULL) ||
+		(dev->dev_ops->mtr_ops_get(dev, &ops) != 0) ||
+		(ops == NULL)) {
+		rte_mtr_error_set(error,
+			ENOSYS,
+			RTE_MTR_ERROR_TYPE_UNSPECIFIED,
+			NULL,
+			rte_strerror(ENOSYS));
+		return NULL;
+	}
+
+	return ops;
+}
+
+#define RTE_MTR_FUNC(port_id, func)			\
+({							\
+	const struct rte_mtr_ops *ops =			\
+		rte_mtr_ops_get(port_id, error);		\
+	if (ops == NULL)					\
+		return -rte_errno;			\
+							\
+	if (ops->func == NULL)				\
+		return -rte_mtr_error_set(error,		\
+			ENOSYS,				\
+			RTE_MTR_ERROR_TYPE_UNSPECIFIED,	\
+			NULL,				\
+			rte_strerror(ENOSYS));		\
+							\
+	ops->func;					\
+})
+
+/* MTR capabilities get */
+int
+rte_mtr_capabilities_get(uint8_t port_id,
+	struct rte_mtr_capabilities *cap,
+	struct rte_mtr_error *error)
+{
+	struct rte_eth_dev *dev = &rte_eth_devices[port_id];
+	return RTE_MTR_FUNC(port_id, capabilities_get)(dev,
+		cap, error);
+}
+
+/* MTR meter profile add */
+int
+rte_mtr_meter_profile_add(uint8_t port_id,
+	uint32_t meter_profile_id,
+	struct rte_mtr_meter_profile *profile,
+	struct rte_mtr_error *error)
+{
+	struct rte_eth_dev *dev = &rte_eth_devices[port_id];
+	return RTE_MTR_FUNC(port_id, meter_profile_add)(dev,
+		meter_profile_id, profile, error);
+}
+
+/** MTR meter profile delete */
+int
+rte_mtr_meter_profile_delete(uint8_t port_id,
+	uint32_t meter_profile_id,
+	struct rte_mtr_error *error)
+{
+	struct rte_eth_dev *dev = &rte_eth_devices[port_id];
+	return RTE_MTR_FUNC(port_id, meter_profile_delete)(dev,
+		meter_profile_id, error);
+}
+
+/** MTR object create */
+int
+rte_mtr_create(uint8_t port_id,
+	uint32_t mtr_id,
+	struct rte_mtr_params *params,
+	int shared,
+	struct rte_mtr_error *error)
+{
+	struct rte_eth_dev *dev = &rte_eth_devices[port_id];
+	return RTE_MTR_FUNC(port_id, create)(dev,
+		mtr_id, params, shared, error);
+}
+
+/** MTR object destroy */
+int
+rte_mtr_destroy(uint8_t port_id,
+	uint32_t mtr_id,
+	struct rte_mtr_error *error)
+{
+	struct rte_eth_dev *dev = &rte_eth_devices[port_id];
+	return RTE_MTR_FUNC(port_id, destroy)(dev,
+		mtr_id, error);
+}
+
+/** MTR object meter enable */
+int
+rte_mtr_meter_enable(uint8_t port_id,
+	uint32_t mtr_id,
+	struct rte_mtr_error *error)
+{
+	struct rte_eth_dev *dev = &rte_eth_devices[port_id];
+	return RTE_MTR_FUNC(port_id, meter_enable)(dev,
+		mtr_id, error);
+}
+
+/** MTR object meter disable */
+int
+rte_mtr_meter_disable(uint8_t port_id,
+	uint32_t mtr_id,
+	struct rte_mtr_error *error)
+{
+	struct rte_eth_dev *dev = &rte_eth_devices[port_id];
+	return RTE_MTR_FUNC(port_id, meter_disable)(dev,
+		mtr_id, error);
+}
+
+/** MTR object meter profile update */
+int
+rte_mtr_meter_profile_update(uint8_t port_id,
+	uint32_t mtr_id,
+	uint32_t meter_profile_id,
+	struct rte_mtr_error *error)
+{
+	struct rte_eth_dev *dev = &rte_eth_devices[port_id];
+	return RTE_MTR_FUNC(port_id, meter_profile_update)(dev,
+		mtr_id, meter_profile_id, error);
+}
+
+/** MTR object meter DSCP table update */
+int
+rte_mtr_meter_dscp_table_update(uint8_t port_id,
+	uint32_t mtr_id,
+	enum rte_mtr_color *dscp_table,
+	struct rte_mtr_error *error)
+{
+	struct rte_eth_dev *dev = &rte_eth_devices[port_id];
+	return RTE_MTR_FUNC(port_id, meter_dscp_table_update)(dev,
+		mtr_id, dscp_table, error);
+}
+
+/** MTR object policer action update */
+int
+rte_mtr_policer_actions_update(uint8_t port_id,
+	uint32_t mtr_id,
+	uint32_t action_mask,
+	enum rte_mtr_policer_action *actions,
+	struct rte_mtr_error *error)
+{
+	struct rte_eth_dev *dev = &rte_eth_devices[port_id];
+	return RTE_MTR_FUNC(port_id, policer_actions_update)(dev,
+		mtr_id, action_mask, actions, error);
+}
+
+/** MTR object enabled stats update */
+int
+rte_mtr_stats_update(uint8_t port_id,
+	uint32_t mtr_id,
+	uint64_t stats_mask,
+	struct rte_mtr_error *error)
+{
+	struct rte_eth_dev *dev = &rte_eth_devices[port_id];
+	return RTE_MTR_FUNC(port_id, stats_update)(dev,
+		mtr_id, stats_mask, error);
+}
+
+/** MTR object stats read */
+int
+rte_mtr_stats_read(uint8_t port_id,
+	uint32_t mtr_id,
+	struct rte_mtr_stats *stats,
+	uint64_t *stats_mask,
+	int clear,
+	struct rte_mtr_error *error)
+{
+	struct rte_eth_dev *dev = &rte_eth_devices[port_id];
+	return RTE_MTR_FUNC(port_id, stats_read)(dev,
+		mtr_id, stats, stats_mask, clear, error);
+}
diff --git a/lib/librte_ether/rte_mtr.h b/lib/librte_ether/rte_mtr.h
new file mode 100644
index 0000000..f0f897f
--- /dev/null
+++ b/lib/librte_ether/rte_mtr.h
@@ -0,0 +1,723 @@
+/*-
+ *   BSD LICENSE
+ *
+ *   Copyright(c) 2017 Intel Corporation.
+ *   Copyright(c) 2017 NXP.
+ *   Copyright(c) 2017 Cavium.
+ *   All rights reserved.
+ *
+ *   Redistribution and use in source and binary forms, with or without
+ *   modification, are permitted provided that the following conditions
+ *   are met:
+ *
+ *     * Redistributions of source code must retain the above copyright
+ *       notice, this list of conditions and the following disclaimer.
+ *     * Redistributions in binary form must reproduce the above copyright
+ *       notice, this list of conditions and the following disclaimer in
+ *       the documentation and/or other materials provided with the
+ *       distribution.
+ *     * Neither the name of Intel Corporation nor the names of its
+ *       contributors may be used to endorse or promote products derived
+ *       from this software without specific prior written permission.
+ *
+ *   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ *   "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ *   LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ *   A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ *   OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ *   LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ *   DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ *   THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ *   (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ *   OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef __INCLUDE_RTE_MTR_H__
+#define __INCLUDE_RTE_MTR_H__
+
+/**
+ * @file
+ * RTE Generic Traffic Metering and Policing API
+ *
+ * This interface provides the ability to configure the traffic metering and
+ * policing (MTR) in a generic way.
+ *
+ * The processing done for each input packet hitting a MTR object is:
+ *    A) Traffic metering: The packet is assigned a color (the meter output
+ *       color), based on the previous history of the flow reflected in the
+ *       current state of the MTR object, according to the specific traffic
+ *       metering algorithm. The traffic metering algorithm can typically work
+ *       in color aware mode, in which case the input packet already has an
+ *       initial color (the input color), or in color blind mode, which is
+ *       equivalent to considering all input packets initially colored as green.
+ *    B) Policing: There is a separate policer action configured for each meter
+ *       output color, which can:
+ *          a) Drop the packet.
+ *          b) Keep the same packet color: the policer output color matches the
+ *             meter output color (essentially a no-op action).
+ *          c) Recolor the packet: the policer output color is different than
+ *             the meter output color.
+ *       The policer output color is the output color of the packet, which is
+ *       set in the packet meta-data (i.e. struct rte_mbuf::sched::color).
+ *    C) Statistics: The set of counters maintained for each MTR object is
+ *       configurable and subject to the implementation support. This set
+ *       includes the number of packets and bytes dropped or passed for each
+ *       output color.
+ *
+ * Once successfully created, an MTR object is linked to one or several flows
+ * through the meter action of the flow API.
+ *    A) Whether an MTR object is private to a flow or potentially shared by
+ *       several flows has to be specified at creation time.
+ *    B) Several meter actions can be potentially registered for the same flow.
+ *
+ * @warning
+ * @b EXPERIMENTAL: this API may change without prior notice
+ */
+#include <stdint.h>
+
+#include <rte_common.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * Color
+ */
+enum rte_mtr_color {
+	RTE_MTR_GREEN = 0, /**< Green */
+	RTE_MTR_YELLOW, /**< Yellow */
+	RTE_MTR_RED, /**< Red */
+	RTE_MTR_COLORS /**< Number of colors. */
+};
+
+/**
+ * Statistics counter type
+ */
+enum rte_mtr_stats_type {
+	/** Number of packets passed as green by the policer. */
+	RTE_MTR_STATS_N_PKTS_GREEN = 1 << 0,
+
+	/** Number of bytes passed as green by the policer. */
+	RTE_MTR_STATS_N_BYTES_GREEN = 1 << 1,
+
+	/** Number of packets passed as yellow by the policer. */
+	RTE_MTR_STATS_N_PKTS_YELLOW = 1 << 2,
+
+	/** Number of bytes passed as yellow by the policer. */
+	RTE_MTR_STATS_N_BYTES_YELLOW = 1 << 3,
+
+	/** Number of packets passed as red by the policer. */
+	RTE_MTR_STATS_N_PKTS_RED = 1 << 4,
+
+	/** Number of bytes passed as red by the policer. */
+	RTE_MTR_STATS_N_BYTES_RED = 1 << 5,
+
+	/** Number of packets dropped by the policer. */
+	RTE_MTR_STATS_N_PKTS_DROPPED = 1 << 6,
+
+	/** Number of bytes dropped by the policer. */
+	RTE_MTR_STATS_N_BYTES_DROPPED = 1 << 7,
+};
+
+/**
+ * Statistics counters
+ */
+struct rte_mtr_stats {
+	/** Number of packets passed by the policer (per color). */
+	uint64_t n_pkts[RTE_MTR_COLORS];
+
+	/** Number of bytes passed by the policer (per color). */
+	uint64_t n_bytes[RTE_MTR_COLORS];
+
+	/** Number of packets dropped by the policer. */
+	uint64_t n_pkts_dropped;
+
+	/** Number of bytes passed by the policer. */
+	uint64_t n_bytes_dropped;
+};
+
+/**
+ * Traffic metering algorithms
+ */
+enum rte_mtr_algorithm {
+	/** Single Rate Three Color Marker (srTCM) - IETF RFC 2697. */
+	RTE_MTR_SRTCM_RFC2697,
+
+	/** Two Rate Three Color Marker (trTCM) - IETF RFC 2698. */
+	RTE_MTR_TRTCM_RFC2698,
+
+	/** Two Rate Three Color Marker (trTCM) - IETF RFC 4115. */
+	RTE_MTR_TRTCM_RFC4115,
+};
+
+/**
+ * Meter profile
+ */
+struct rte_mtr_meter_profile {
+	/** Traffic metering algorithm. */
+	enum rte_mtr_algorithm alg;
+
+	RTE_STD_C11
+	union {
+		/** Items only valid when *alg* is set to srTCM - RFC 2697. */
+		struct {
+			/** Committed Information Rate (CIR) (bytes/second). */
+			uint64_t cir;
+
+			/** Committed Burst Size (CBS) (bytes). */
+			uint64_t cbs;
+
+			/** Excess Burst Size (EBS) (bytes). */
+			uint64_t ebs;
+		} srtcm_rfc2697;
+
+		/** Items only valid when *alg* is set to trTCM - RFC 2698. */
+		struct {
+			/** Committed Information Rate (CIR) (bytes/second). */
+			uint64_t cir;
+
+			/** Peak Information Rate (PIR) (bytes/second). */
+			uint64_t pir;
+
+			/** Committed Burst Size (CBS) (byes). */
+			uint64_t cbs;
+
+			/** Peak Burst Size (PBS) (bytes). */
+			uint64_t pbs;
+		} trtcm_rfc2698;
+
+		/** Items only valid when *alg* is set to trTCM - RFC 4115. */
+		struct {
+			/** Committed Information Rate (CIR) (bytes/second). */
+			uint64_t cir;
+
+			/** Excess Information Rate (EIR) (bytes/second). */
+			uint64_t eir;
+
+			/** Committed Burst Size (CBS) (byes). */
+			uint64_t cbs;
+
+			/** Excess Burst Size (EBS) (bytes). */
+			uint64_t ebs;
+		} trtcm_rfc4115;
+	};
+};
+
+/**
+ * Policer actions
+ */
+enum rte_mtr_policer_action {
+	/** Recolor the packet as green. */
+	MTR_POLICER_ACTION_COLOR_GREEN = 0,
+
+	/** Recolor the packet as yellow. */
+	MTR_POLICER_ACTION_COLOR_YELLOW,
+
+	/** Recolor the packet as red. */
+	MTR_POLICER_ACTION_COLOR_RED,
+
+	/** Drop the packet. */
+	MTR_POLICER_ACTION_DROP,
+};
+
+/**
+ * Parameters for each traffic metering & policing object
+ *
+ * @see enum rte_mtr_stats_type
+ */
+struct rte_mtr_params {
+	/** Meter profile ID. */
+	uint32_t meter_profile_id;
+
+	/** Meter input color in case of MTR object chaining. When non-zero: if
+	 * a previous MTR object is enabled in the same flow, then the color
+	 * determined by the latest MTR object in the same flow is used as the
+	 * input color by the current MTR object, otherwise the current MTR
+	 * object uses the *dscp_table* to determine the input color. When zero:
+	 * the color determined by any previous MTR object in same flow is
+	 * ignored by the current MTR object, which uses the *dscp_table* to
+	 * determine the input color.
+	 */
+	int use_prev_mtr_color;
+
+	/** Meter input color. When non-NULL: it points to a pre-allocated and
+	 * pre-populated table with exactly 64 elements providing the input
+	 * color for each value of the IPv4/IPv6 Differentiated Services Code
+	 * Point (DSCP) input packet field. When NULL: it is equivalent to
+	 * setting this parameter to an all-green populated table (i.e. table
+	 * with all the 64 elements set to green color). The color blind mode
+	 * is configured by setting *use_prev_mtr_color* to 0 and *dscp_table*
+	 * to either NULL or to an all-green populated table. When
+	 * *use_prev_mtr_color* is non-zero value or when *dscp_table* contains
+	 * at least one yellow or red color element, then the color aware mode
+	 * is configured.
+	 */
+	enum rte_mtr_color *dscp_table;
+
+	/** Non-zero to enable the meter, zero to disable the meter at the time
+	 * of MTR object creation.
+	 * @see rte_mtr_meter_disable()
+	 */
+	int meter_enable;
+
+	/** Policer actions (per meter output color). */
+	enum rte_mtr_policer_action action[RTE_MTR_COLORS];
+
+	/** Set of stats counters to be enabled.
+	 * @see enum rte_mtr_stats_type
+	 */
+	uint64_t stats_mask;
+};
+
+/**
+ * MTR capabilities
+ */
+struct rte_mtr_capabilities {
+	/** Maximum number of MTR objects. */
+	uint32_t n_max;
+
+	/** Maximum number of MTR objects that can be shared by multiple flows.
+	 * The value of zero indicates that shared MTR objects are not
+	 * supported. The maximum value is *n_max*.
+	 */
+	uint32_t n_shared_max;
+
+	/** When non-zero, this flag indicates that all the MTR objects that
+	 * cannot be shared by multiple flows have identical capability set.
+	 */
+	int identical;
+
+	/** When non-zero, this flag indicates that all the MTR objects that
+	 * can be shared by multiple flows have identical capability set.
+	 */
+	int shared_identical;
+
+	/** Maximum number of flows that can share the same MTR object. The
+	 * value of zero is invalid. The value of 1 means that shared MTR
+	 * objects not supported.
+	 */
+	uint32_t shared_n_flows_per_mtr_max;
+
+	/** Maximum number of MTR objects that can be part of the same flow. The
+	 * value of zero is invalid. The value of 1 indicates that MTR object
+	 * chaining is not supported. The maximum value is *n_max*.
+	 */
+	uint32_t chaining_n_mtrs_per_flow_max;
+
+	/**
+	 * When non-zero, it indicates that the packet color identified by one
+	 * MTR object can be used as the packet input color by any subsequent
+	 * MTR object from the same flow. When zero, it indicates that the color
+	 * determined by one MTR object is always ignored by any subsequent MTR
+	 * object from the same flow. Only valid when MTR chaining is supported,
+	 * i.e. *chaining_n_mtrs_per_flow_max* is greater than 1. When non-zero,
+	 * it also means that the color aware mode is supported by at least one
+	 * metering algorithm.
+	 */
+	int chaining_use_prev_mtr_color_supported;
+
+	/**
+	 * When non-zero, it indicates that the packet color identified by one
+	 * MTR object is always used as the packet input color by any subsequent
+	 * MTR object that is part of the same flow. When zero, it indicates
+	 * that whether the color determined by one MTR object is either ignored
+	 * or used as the packet input color by any subsequent MTR object from
+	 * the same flow is individually configurable for each MTR object. Only
+	 * valid when *chaining_use_prev_mtr_color_supported* is non-zero.
+	 */
+	int chaining_use_prev_mtr_color_enforced;
+
+	/** Maximum number of MTR objects that can have their meter configured
+	 * to run the srTCM RFC 2697 algorithm. The value of 0 indicates this
+	 * metering algorithm is not supported. The maximum value is *n_max*.
+	 */
+	uint32_t meter_srtcm_rfc2697_n_max;
+
+	/** Maximum number of MTR objects that can have their meter configured
+	 * to run the trTCM RFC 2698 algorithm. The value of 0 indicates this
+	 * metering algorithm is not supported. The maximum value is *n_max*.
+	 */
+	uint32_t meter_trtcm_rfc2698_n_max;
+
+	/** Maximum number of MTR objects that can have their meter configured
+	 * to run the trTCM RFC 4115 algorithm. The value of 0 indicates this
+	 * metering algorithm is not supported. The maximum value is *n_max*.
+	 */
+	uint32_t meter_trtcm_rfc4115_n_max;
+
+	/** Maximum traffic rate that can be metered by a single MTR object. For
+	 * srTCM RFC 2697, this is the maximum CIR rate. For trTCM RFC 2698,
+	 * this is the maximum PIR rate. For trTCM RFC 4115, this is the maximum
+	 * value for the sum of PIR and EIR rates.
+	 */
+	uint64_t meter_rate_max;
+
+	/**
+	 * When non-zero, it indicates that color aware mode is supported for
+	 * the srTCM RFC 2697 metering algorithm.
+	 */
+	int color_aware_srtcm_rfc2697_supported;
+
+	/**
+	 * When non-zero, it indicates that color aware mode is supported for
+	 * the trTCM RFC 2698 metering algorithm.
+	 */
+	int color_aware_trtcm_rfc2698_supported;
+
+	/**
+	 * When non-zero, it indicates that color aware mode is supported for
+	 * the trTCM RFC 4115 metering algorithm.
+	 */
+	int color_aware_trtcm_rfc4115_supported;
+
+	/** When non-zero, it indicates that the policer packet recolor actions
+	 * are supported.
+	 * @see enum rte_mtr_policer_action
+	 */
+	int policer_action_recolor_supported;
+
+	/** When non-zero, it indicates that the policer packet drop action is
+	 * supported.
+	 * @see enum rte_mtr_policer_action
+	 */
+	int policer_action_drop_supported;
+
+	/** Set of supported statistics counter types.
+	 * @see enum rte_mtr_stats_type
+	 */
+	uint64_t stats_mask;
+};
+
+/**
+ * Verbose error types.
+ *
+ * Most of them provide the type of the object referenced by struct
+ * rte_mtr_error::cause.
+ */
+enum rte_mtr_error_type {
+	RTE_MTR_ERROR_TYPE_NONE, /**< No error. */
+	RTE_MTR_ERROR_TYPE_UNSPECIFIED, /**< Cause unspecified. */
+	RTE_MTR_ERROR_TYPE_METER_PROFILE_ID,
+	RTE_MTR_ERROR_TYPE_METER_PROFILE,
+	RTE_MTR_ERROR_TYPE_MTR_ID,
+	RTE_MTR_ERROR_TYPE_MTR_PARAMS,
+	RTE_MTR_ERROR_TYPE_POLICER_ACTION_GREEN,
+	RTE_MTR_ERROR_TYPE_POLICER_ACTION_YELLOW,
+	RTE_MTR_ERROR_TYPE_POLICER_ACTION_RED,
+	RTE_MTR_ERROR_TYPE_STATS_MASK,
+	RTE_MTR_ERROR_TYPE_STATS,
+	RTE_MTR_ERROR_TYPE_SHARED,
+};
+
+/**
+ * Verbose error structure definition.
+ *
+ * This object is normally allocated by applications and set by PMDs, the
+ * message points to a constant string which does not need to be freed by
+ * the application, however its pointer can be considered valid only as long
+ * as its associated DPDK port remains configured. Closing the underlying
+ * device or unloading the PMD invalidates it.
+ *
+ * Both cause and message may be NULL regardless of the error type.
+ */
+struct rte_mtr_error {
+	enum rte_mtr_error_type type; /**< Cause field and error type. */
+	const void *cause; /**< Object responsible for the error. */
+	const char *message; /**< Human-readable error message. */
+};
+
+/**
+ * MTR capabilities get
+ *
+ * @param[in] port_id
+ *   The port identifier of the Ethernet device.
+ * @param[out] cap
+ *   MTR capabilities. Needs to be pre-allocated and valid.
+ * @param[out] error
+ *   Error details. Filled in only on error, when not NULL.
+ * @return
+ *   0 on success, non-zero error code otherwise.
+ */
+int
+rte_mtr_capabilities_get(uint8_t port_id,
+	struct rte_mtr_capabilities *cap,
+	struct rte_mtr_error *error);
+
+/**
+ * Meter profile add
+ *
+ * Create a new meter profile with ID set to *meter_profile_id*. The new profile
+ * is used to create one or several MTR objects.
+ *
+ * @param[in] port_id
+ *   The port identifier of the Ethernet device.
+ * @param[in] meter_profile_id
+ *   ID for the new meter profile. Needs to be unused by any of the existing
+ *   meter profiles added for the current port.
+ * @param[in] profile
+ *   Meter profile parameters. Needs to be pre-allocated and valid.
+ * @param[out] error
+ *   Error details. Filled in only on error, when not NULL.
+ * @return
+ *   0 on success, non-zero error code otherwise.
+ */
+int
+rte_mtr_meter_profile_add(uint8_t port_id,
+	uint32_t meter_profile_id,
+	struct rte_mtr_meter_profile *profile,
+	struct rte_mtr_error *error);
+
+/**
+ * Meter profile delete
+ *
+ * Delete an existing meter profile. This operation fails when there is
+ * currently at least one user (i.e. MTR object) of this profile.
+ *
+ * @param[in] port_id
+ *   The port identifier of the Ethernet device.
+ * @param[in] meter_profile_id
+ *   Meter profile ID. Needs to be the valid.
+ * @param[out] error
+ *   Error details. Filled in only on error, when not NULL.
+ * @return
+ *   0 on success, non-zero error code otherwise.
+ */
+int
+rte_mtr_meter_profile_delete(uint8_t port_id,
+	uint32_t meter_profile_id,
+	struct rte_mtr_error *error);
+
+/**
+ * MTR object create
+ *
+ * Create a new MTR object for the current port. This object is run as part of
+ * associated flow action for traffic metering and policing.
+ *
+ * @param[in] port_id
+ *   The port identifier of the Ethernet device.
+ * @param[in] mtr_id
+ *   MTR object ID. Needs to be unused by any of the existing MTR objects.
+ *   created for the current port.
+ * @param[in] params
+ *   MTR object params. Needs to be pre-allocated and valid.
+ * @param[in] shared
+ *   Non-zero when this MTR object can be shared by multiple flows, zero when
+ *   this MTR object can be used by a single flow.
+ * @param[out] error
+ *   Error details. Filled in only on error, when not NULL.
+ * @return
+ *   0 on success, non-zero error code otherwise.
+ *
+ * @see enum rte_flow_action_type::RTE_FLOW_ACTION_TYPE_METER
+ */
+int
+rte_mtr_create(uint8_t port_id,
+	uint32_t mtr_id,
+	struct rte_mtr_params *params,
+	int shared,
+	struct rte_mtr_error *error);
+
+/**
+ * MTR object destroy
+ *
+ * Delete an existing MTR object. This operation fails when there is currently
+ * at least one user (i.e. flow) of this MTR object.
+ *
+ * @param[in] port_id
+ *   The port identifier of the Ethernet device.
+ * @param[in] mtr_id
+ *   MTR object ID. Needs to be valid.
+ *   created for the current port.
+ * @param[out] error
+ *   Error details. Filled in only on error, when not NULL.
+ * @return
+ *   0 on success, non-zero error code otherwise.
+ */
+int
+rte_mtr_destroy(uint8_t port_id,
+	uint32_t mtr_id,
+	struct rte_mtr_error *error);
+
+/**
+ * MTR object meter disable
+ *
+ * Disable the meter of an existing MTR object. In disabled state, the meter of
+ * the current MTR object works in pass-through mode, meaning that for each
+ * input packet the meter output color is always the same as the input color. In
+ * particular, when the meter of the current MTR object is configured in color
+ * blind mode, the input color is always green, so the meter output color is
+ * also always green. Note that the policer and the statistics of the current
+ * MTR object are working as usual while the meter is disabled. No action is
+ * taken and this function returns successfully when the meter of the current
+ * MTR object is already disabled.
+ *
+ * @param[in] port_id
+ *   The port identifier of the Ethernet device.
+ * @param[in] mtr_id
+ *   MTR object ID.
+ * @param[out] error
+ *   Error details. Filled in only on error, when not NULL.
+ * @return
+ *   0 on success, non-zero error code otherwise.
+ */
+int
+rte_mtr_meter_disable(uint8_t port_id,
+	uint32_t mtr_id,
+	struct rte_mtr_error *error);
+
+/**
+ * MTR object meter enable
+ *
+ * Enable the meter of an existing MTR object. If the MTR object has its meter
+ * already enabled, then no action is taken and this function returns
+ * successfully.
+ *
+ * @param[in] port_id
+ *   The port identifier of the Ethernet device.
+ * @param[in] mtr_id
+ *   MTR object ID.
+ * @param[out] error
+ *   Error details. Filled in only on error, when not NULL.
+ * @return
+ *   0 on success, non-zero error code otherwise.
+ */
+int
+rte_mtr_meter_enable(uint8_t port_id,
+	uint32_t mtr_id,
+	struct rte_mtr_error *error);
+
+/**
+ * MTR object meter profile update
+ *
+ * @param[in] port_id
+ *   The port identifier of the Ethernet device.
+ * @param[in] mtr_id
+ *   MTR object ID. Needs to be valid.
+ * @param[in] meter_profile_id
+ *   Meter profile ID for the current MTR object. Needs to be valid.
+ * @param[out] error
+ *   Error details. Filled in only on error, when not NULL.
+ * @return
+ *   0 on success, non-zero error code otherwise.
+ */
+int
+rte_mtr_meter_profile_update(uint8_t port_id,
+	uint32_t mtr_id,
+	uint32_t meter_profile_id,
+	struct rte_mtr_error *error);
+
+/**
+ * MTR object DSCP table update
+ *
+ * @param[in] port_id
+ *   The port identifier of the Ethernet device.
+ * @param[in] mtr_id
+ *   MTR object ID. Needs to be valid.
+ * @param[in] dscp_table
+ *   When non-NULL: it points to a pre-allocated and pre-populated table with
+ *   exactly 64 elements providing the input color for each value of the
+ *   IPv4/IPv6 Differentiated Services Code Point (DSCP) input packet field.
+ *   When NULL: it is equivalent to setting this parameter to an “all-green”
+ *   populated table (i.e. table with all the 64 elements set to green color).
+ * @param[out] error
+ *   Error details. Filled in only on error, when not NULL.
+ * @return
+ *   0 on success, non-zero error code otherwise.
+ */
+int
+rte_mtr_meter_dscp_table_update(uint8_t port_id,
+	uint32_t mtr_id,
+	enum rte_mtr_color *dscp_table,
+	struct rte_mtr_error *error);
+
+/**
+ * MTR object policer actions update
+ *
+ * @param[in] port_id
+ *   The port identifier of the Ethernet device.
+ * @param[in] mtr_id
+ *   MTR object ID. Needs to be valid.
+ * @param[in] action_mask
+ *   Bit mask indicating which policer actions need to be updated. One or more
+ *   policer actions can be updated in a single function invocation. To update
+ *   the policer action associated with color C, bit (1 << C) needs to be set in
+ *   *action_mask* and element at position C in the *actions* array needs to be
+ *   valid.
+ * @param[in] actions
+ *   Pre-allocated and pre-populated array of policer actions.
+ * @param[out] error
+ *   Error details. Filled in only on error, when not NULL.
+ * @return
+ *   0 on success, non-zero error code otherwise.
+ */
+int
+rte_mtr_policer_actions_update(uint8_t port_id,
+	uint32_t mtr_id,
+	uint32_t action_mask,
+	enum rte_mtr_policer_action *actions,
+	struct rte_mtr_error *error);
+
+/**
+ * MTR object enabled statistics counters update
+ *
+ * @param[in] port_id
+ *   The port identifier of the Ethernet device.
+ * @param[in] mtr_id
+ *   MTR object ID. Needs to be valid.
+ * @param[in] stats_mask
+ *   Mask of statistics counter types to be enabled for the current MTR object.
+ *   Any statistics counter type not included in this set is to be disabled for
+ *   the current MTR object.
+ * @param[out] error
+ *   Error details. Filled in only on error, when not NULL.
+ * @return
+ *   0 on success, non-zero error code otherwise.
+ *
+ * @see enum rte_mtr_stats_type
+ */
+int
+rte_mtr_stats_update(uint8_t port_id,
+	uint32_t mtr_id,
+	uint64_t stats_mask,
+	struct rte_mtr_error *error);
+
+/**
+ * MTR object statistics counters read
+ *
+ * @param[in] port_id
+ *   The port identifier of the Ethernet device.
+ * @param[in] mtr_id
+ *   MTR object ID. Needs to be valid.
+ * @param[out] stats
+ *   When non-NULL, it contains the current value for the statistics counters
+ *   enabled for the current MTR object.
+ * @param[out] stats_mask
+ *   When non-NULL, it contains the mask of statistics counter types that are
+ *   currently enabled for this MTR object, indicating which of the counters
+ *   retrieved with the *stats* structure are valid.
+ * @param[in] clear
+ *   When this parameter has a non-zero value, the statistics counters are
+ *   cleared (i.e. set to zero) immediately after they have been read,
+ *   otherwise the statistics counters are left untouched.
+ * @param[out] error
+ *   Error details. Filled in only on error, when not NULL.
+ * @return
+ *   0 on success, non-zero error code otherwise.
+ *
+ * @see enum rte_mtr_stats_type
+ */
+int
+rte_mtr_stats_read(uint8_t port_id,
+	uint32_t mtr_id,
+	struct rte_mtr_stats *stats,
+	uint64_t *stats_mask,
+	int clear,
+	struct rte_mtr_error *error);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __INCLUDE_RTE_MTR_H__ */
diff --git a/lib/librte_ether/rte_mtr_driver.h b/lib/librte_ether/rte_mtr_driver.h
new file mode 100644
index 0000000..bb7deed
--- /dev/null
+++ b/lib/librte_ether/rte_mtr_driver.h
@@ -0,0 +1,221 @@
+/*-
+ *   BSD LICENSE
+ *
+ *   Copyright(c) 2017 Intel Corporation. All rights reserved.
+ *   All rights reserved.
+ *
+ *   Redistribution and use in source and binary forms, with or without
+ *   modification, are permitted provided that the following conditions
+ *   are met:
+ *
+ *     * Redistributions of source code must retain the above copyright
+ *       notice, this list of conditions and the following disclaimer.
+ *     * Redistributions in binary form must reproduce the above copyright
+ *       notice, this list of conditions and the following disclaimer in
+ *       the documentation and/or other materials provided with the
+ *       distribution.
+ *     * Neither the name of Intel Corporation nor the names of its
+ *       contributors may be used to endorse or promote products derived
+ *       from this software without specific prior written permission.
+ *
+ *   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ *   "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ *   LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ *   A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ *   OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ *   LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ *   DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ *   THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ *   (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ *   OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef __INCLUDE_RTE_MTR_DRIVER_H__
+#define __INCLUDE_RTE_MTR_DRIVER_H__
+
+/**
+ * @file
+ * RTE Generic Traffic Metering and Policing API (Driver Side)
+ *
+ * This file provides implementation helpers for internal use by PMDs, they
+ * are not intended to be exposed to applications and are not subject to ABI
+ * versioning.
+ */
+
+#include <stdint.h>
+
+#include <rte_errno.h>
+#include "rte_ethdev.h"
+#include "rte_mtr.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+typedef int (*rte_mtr_capabilities_get_t)(struct rte_eth_dev *dev,
+	struct rte_mtr_capabilities *cap,
+	struct rte_mtr_error *error);
+/**< @internal MTR capabilities get */
+
+typedef int (*rte_mtr_meter_profile_add_t)(struct rte_eth_dev *dev,
+	uint32_t meter_profile_id,
+	struct rte_mtr_meter_profile *profile,
+	struct rte_mtr_error *error);
+/**< @internal MTR meter profile add */
+
+typedef int (*rte_mtr_meter_profile_delete_t)(struct rte_eth_dev *dev,
+	uint32_t meter_profile_id,
+	struct rte_mtr_error *error);
+/**< @internal MTR meter profile delete */
+
+typedef int (*rte_mtr_create_t)(struct rte_eth_dev *dev,
+	uint32_t mtr_id,
+	struct rte_mtr_params *params,
+	int shared,
+	struct rte_mtr_error *error);
+/**< @internal MTR object create */
+
+typedef int (*rte_mtr_destroy_t)(struct rte_eth_dev *dev,
+	uint32_t mtr_id,
+	struct rte_mtr_error *error);
+/**< @internal MTR object destroy */
+
+typedef int (*rte_mtr_meter_enable_t)(struct rte_eth_dev *dev,
+	uint32_t mtr_id,
+	struct rte_mtr_error *error);
+/**< @internal MTR object meter enable */
+
+typedef int (*rte_mtr_meter_disable_t)(struct rte_eth_dev *dev,
+	uint32_t mtr_id,
+	struct rte_mtr_error *error);
+/**< @internal MTR object meter disable */
+
+typedef int (*rte_mtr_meter_profile_update_t)(struct rte_eth_dev *dev,
+	uint32_t mtr_id,
+	uint32_t meter_profile_id,
+	struct rte_mtr_error *error);
+/**< @internal MTR object meter profile update */
+
+typedef int (*rte_mtr_meter_dscp_table_update_t)(struct rte_eth_dev *dev,
+	uint32_t mtr_id,
+	enum rte_mtr_color *dscp_table,
+	struct rte_mtr_error *error);
+/**< @internal MTR object meter DSCP table update */
+
+typedef int (*rte_mtr_policer_actions_update_t)(struct rte_eth_dev *dev,
+	uint32_t mtr_id,
+	uint32_t action_mask,
+	enum rte_mtr_policer_action *actions,
+	struct rte_mtr_error *error);
+/**< @internal MTR object policer action update*/
+
+typedef int (*rte_mtr_stats_update_t)(struct rte_eth_dev *dev,
+	uint32_t mtr_id,
+	uint64_t stats_mask,
+	struct rte_mtr_error *error);
+/**< @internal MTR object enabled stats update */
+
+typedef int (*rte_mtr_stats_read_t)(struct rte_eth_dev *dev,
+	uint32_t mtr_id,
+	struct rte_mtr_stats *stats,
+	uint64_t *stats_mask,
+	int clear,
+	struct rte_mtr_error *error);
+/**< @internal MTR object stats read */
+
+struct rte_mtr_ops {
+	/** MTR capabilities get */
+	rte_mtr_capabilities_get_t capabilities_get;
+
+	/** MTR meter profile add */
+	rte_mtr_meter_profile_add_t meter_profile_add;
+
+	/** MTR meter profile delete */
+	rte_mtr_meter_profile_delete_t meter_profile_delete;
+
+	/** MTR object create */
+	rte_mtr_create_t create;
+
+	/** MTR object destroy */
+	rte_mtr_destroy_t destroy;
+
+	/** MTR object meter enable */
+	rte_mtr_meter_enable_t meter_enable;
+
+	/** MTR object meter disable */
+	rte_mtr_meter_disable_t meter_disable;
+
+	/** MTR object meter profile update */
+	rte_mtr_meter_profile_update_t meter_profile_update;
+
+	/** MTR object meter DSCP table update */
+	rte_mtr_meter_dscp_table_update_t meter_dscp_table_update;
+
+	/** MTR object policer action update */
+	rte_mtr_policer_actions_update_t policer_actions_update;
+
+	/** MTR object enabled stats update */
+	rte_mtr_stats_update_t stats_update;
+
+	/** MTR object stats read */
+	rte_mtr_stats_read_t stats_read;
+};
+
+/**
+ * Initialize generic error structure.
+ *
+ * This function also sets rte_errno to a given value.
+ *
+ * @param[out] error
+ *   Pointer to error structure (may be NULL).
+ * @param[in] code
+ *   Related error code (rte_errno).
+ * @param[in] type
+ *   Cause field and error type.
+ * @param[in] cause
+ *   Object responsible for the error.
+ * @param[in] message
+ *   Human-readable error message.
+ *
+ * @return
+ *   Error code.
+ */
+static inline int
+rte_mtr_error_set(struct rte_mtr_error *error,
+		   int code,
+		   enum rte_mtr_error_type type,
+		   const void *cause,
+		   const char *message)
+{
+	if (error) {
+		*error = (struct rte_mtr_error){
+			.type = type,
+			.cause = cause,
+			.message = message,
+		};
+	}
+	rte_errno = code;
+	return code;
+}
+
+/**
+ * Get generic traffic metering and policing operations structure from a port
+ *
+ * @param[in] port_id
+ *   The port identifier of the Ethernet device.
+ * @param[out] error
+ *   Error details
+ *
+ * @return
+ *   The traffic metering and policing operations structure associated with
+ *   port_id on success, NULL otherwise.
+ */
+const struct rte_mtr_ops *
+rte_mtr_ops_get(uint8_t port_id, struct rte_mtr_error *error);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __INCLUDE_RTE_MTR_DRIVER_H__ */
-- 
2.7.4

^ permalink raw reply	[relevance 1%]

* Re: [dpdk-dev] [PATCH v2 03/12] cryptodev: avoid dependency on rte_vdev.h
  2017-09-28 13:55  2%   ` [dpdk-dev] [PATCH v2 03/12] cryptodev: avoid dependency on rte_vdev.h Jianfeng Tan
@ 2017-10-05 13:13  0%     ` Jan Blunck
  2017-10-09  1:04  0%       ` Tan, Jianfeng
  0 siblings, 1 reply; 200+ results
From: Jan Blunck @ 2017-10-05 13:13 UTC (permalink / raw)
  To: Jianfeng Tan
  Cc: dev, Bruce Richardson, Ananyev, Konstantin, De Lara Guarch,
	Pablo, Thomas Monjalon, yliu, Maxime Coquelin, Tetsuya Mukawa,
	Ferruh Yigit

On Thu, Sep 28, 2017 at 3:55 PM, Jianfeng Tan <jianfeng.tan@intel.com> wrote:
> The helper API, rte_cryptodev_vdev_pmd_init(), has a parameter of
> struct rte_vdev_device *, which needs to include rte_vdev.h.
>
> We will move vdev into drivers/bus, so we need to avoid such
> dependency. And also, we cannot break the ABI.
>
> This patch changes that pointer to void *, and defines an internal
> structure same with struct rte_vdev_device.
>

This code duplication is unnecessary. Also you are doing evil thinks
and define a type with the same name in multiple places. Look at my
series how to do this properly.


> Signed-off-by: Jianfeng Tan <jianfeng.tan@intel.com>
> ---
>  lib/librte_cryptodev/rte_cryptodev_pmd.c  |   9 +-
>  lib/librte_cryptodev/rte_cryptodev_vdev.c | 161 ++++++++++++++++++++++++++++++
>  lib/librte_cryptodev/rte_cryptodev_vdev.h |   3 +-
>  3 files changed, 169 insertions(+), 4 deletions(-)
>  create mode 100644 lib/librte_cryptodev/rte_cryptodev_vdev.c
>
> diff --git a/lib/librte_cryptodev/rte_cryptodev_pmd.c b/lib/librte_cryptodev/rte_cryptodev_pmd.c
> index a57faad..60b3980 100644
> --- a/lib/librte_cryptodev/rte_cryptodev_pmd.c
> +++ b/lib/librte_cryptodev/rte_cryptodev_pmd.c
> @@ -75,9 +75,14 @@ rte_cryptodev_vdev_parse_integer_arg(const char *key __rte_unused,
>         return 0;
>  }
>
> +struct vdev_device {
> +       TAILQ_ENTRY(rte_vdev_device) next;
> +       struct rte_device device;
> +};
> +
>  struct rte_cryptodev *
>  rte_cryptodev_vdev_pmd_init(const char *name, size_t dev_private_size,
> -               int socket_id, struct rte_vdev_device *vdev)
> +               int socket_id, void *vdev)
>  {
>         struct rte_cryptodev *cryptodev;
>
> @@ -99,7 +104,7 @@ rte_cryptodev_vdev_pmd_init(const char *name, size_t dev_private_size,
>                                         " data");
>         }
>
> -       cryptodev->device = &vdev->device;
> +       cryptodev->device = &((struct vdev_device *)vdev)->device;
>
>         /* initialise user call-back tail queue */
>         TAILQ_INIT(&(cryptodev->link_intr_cbs));
> diff --git a/lib/librte_cryptodev/rte_cryptodev_vdev.c b/lib/librte_cryptodev/rte_cryptodev_vdev.c
> new file mode 100644
> index 0000000..4af8d51
> --- /dev/null
> +++ b/lib/librte_cryptodev/rte_cryptodev_vdev.c
> @@ -0,0 +1,161 @@
> +/*-
> + *   BSD LICENSE
> + *
> + *   Copyright(c) 2017 Intel Corporation. All rights reserved.
> + *
> + *   Redistribution and use in source and binary forms, with or without
> + *   modification, are permitted provided that the following conditions
> + *   are met:
> + *
> + *     * Redistributions of source code must retain the above copyright
> + *       notice, this list of conditions and the following disclaimer.
> + *     * Redistributions in binary form must reproduce the above copyright
> + *       notice, this list of conditions and the following disclaimer in
> + *       the documentation and/or other materials provided with the
> + *       distribution.
> + *     * Neither the name of the copyright holder nor the names of its
> + *       contributors may be used to endorse or promote products derived
> + *       from this software without specific prior written permission.
> + *
> + *   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
> + *   "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
> + *   LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
> + *   A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
> + *   OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
> + *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
> + *   LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
> + *   DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
> + *   THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
> + *   (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
> + *   OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
> + */
> +
> +#include <sys/queue.h>
> +
> +#include "rte_cryptodev_vdev.h"
> +#include "rte_cryptodev_pci.h"
> +#include "rte_cryptodev_pmd.h"
> +
> +/**
> + * Parse name from argument
> + */
> +static int
> +rte_cryptodev_vdev_parse_name_arg(const char *key __rte_unused,
> +               const char *value, void *extra_args)
> +{
> +       struct rte_crypto_vdev_init_params *params = extra_args;
> +
> +       if (strlen(value) >= RTE_CRYPTODEV_NAME_MAX_LEN - 1) {
> +               CDEV_LOG_ERR("Invalid name %s, should be less than "
> +                               "%u bytes", value,
> +                               RTE_CRYPTODEV_NAME_MAX_LEN - 1);
> +               return -1;
> +       }
> +
> +       strncpy(params->name, value, RTE_CRYPTODEV_NAME_MAX_LEN);
> +
> +       return 0;
> +}
> +
> +/**
> + * Parse integer from argument
> + */
> +static int
> +rte_cryptodev_vdev_parse_integer_arg(const char *key __rte_unused,
> +               const char *value, void *extra_args)
> +{
> +       int *i = extra_args;
> +
> +       *i = atoi(value);
> +       if (*i < 0) {
> +               CDEV_LOG_ERR("Argument has to be positive.");
> +               return -1;
> +       }
> +
> +       return 0;
> +}
> +
> +struct vdev_device {
> +       TAILQ_ENTRY(rte_vdev_device) next;
> +       struct rte_device device;
> +};
> +
> +struct rte_cryptodev *
> +rte_cryptodev_vdev_pmd_init(const char *name, size_t dev_private_size,
> +               int socket_id, void *vdev)
> +{
> +       struct rte_cryptodev *cryptodev;
> +
> +       /* allocate device structure */
> +       cryptodev = rte_cryptodev_pmd_allocate(name, socket_id);
> +       if (cryptodev == NULL)
> +               return NULL;
> +
> +       /* allocate private device structure */
> +       if (rte_eal_process_type() == RTE_PROC_PRIMARY) {
> +               cryptodev->data->dev_private =
> +                               rte_zmalloc_socket("cryptodev device private",
> +                                               dev_private_size,
> +                                               RTE_CACHE_LINE_SIZE,
> +                                               socket_id);
> +
> +               if (cryptodev->data->dev_private == NULL)
> +                       rte_panic("Cannot allocate memzone for private device"
> +                                       " data");
> +       }
> +
> +       cryptodev->device = &((struct vdev_device *)vdev)->device;
> +
> +       /* initialise user call-back tail queue */
> +       TAILQ_INIT(&(cryptodev->link_intr_cbs));
> +
> +       return cryptodev;
> +}
> +
> +int
> +rte_cryptodev_vdev_parse_init_params(struct rte_crypto_vdev_init_params *params,
> +               const char *input_args)
> +{
> +       struct rte_kvargs *kvlist = NULL;
> +       int ret = 0;
> +
> +       if (params == NULL)
> +               return -EINVAL;
> +
> +       if (input_args) {
> +               kvlist = rte_kvargs_parse(input_args,
> +                               cryptodev_vdev_valid_params);
> +               if (kvlist == NULL)
> +                       return -1;
> +
> +               ret = rte_kvargs_process(kvlist,
> +                                       RTE_CRYPTODEV_VDEV_MAX_NB_QP_ARG,
> +                                       &rte_cryptodev_vdev_parse_integer_arg,
> +                                       &params->max_nb_queue_pairs);
> +               if (ret < 0)
> +                       goto free_kvlist;
> +
> +               ret = rte_kvargs_process(kvlist,
> +                                       RTE_CRYPTODEV_VDEV_MAX_NB_SESS_ARG,
> +                                       &rte_cryptodev_vdev_parse_integer_arg,
> +                                       &params->max_nb_sessions);
> +               if (ret < 0)
> +                       goto free_kvlist;
> +
> +               ret = rte_kvargs_process(kvlist, RTE_CRYPTODEV_VDEV_SOCKET_ID,
> +                                       &rte_cryptodev_vdev_parse_integer_arg,
> +                                       &params->socket_id);
> +               if (ret < 0)
> +                       goto free_kvlist;
> +
> +               ret = rte_kvargs_process(kvlist, RTE_CRYPTODEV_VDEV_NAME,
> +                                       &rte_cryptodev_vdev_parse_name_arg,
> +                                       params);
> +               if (ret < 0)
> +                       goto free_kvlist;
> +       }
> +
> +free_kvlist:
> +       rte_kvargs_free(kvlist);
> +       return ret;
> +}
> diff --git a/lib/librte_cryptodev/rte_cryptodev_vdev.h b/lib/librte_cryptodev/rte_cryptodev_vdev.h
> index 94ab9d3..1142d1d 100644
> --- a/lib/librte_cryptodev/rte_cryptodev_vdev.h
> +++ b/lib/librte_cryptodev/rte_cryptodev_vdev.h
> @@ -33,7 +33,6 @@
>  #ifndef _RTE_CRYPTODEV_VDEV_H_
>  #define _RTE_CRYPTODEV_VDEV_H_
>
> -#include <rte_vdev.h>
>  #include <inttypes.h>
>
>  #include "rte_cryptodev.h"
> @@ -80,7 +79,7 @@ struct rte_crypto_vdev_init_params {
>   */
>  struct rte_cryptodev *
>  rte_cryptodev_vdev_pmd_init(const char *name, size_t dev_private_size,
> -               int socket_id, struct rte_vdev_device *vdev);
> +               int socket_id, void *vdev);
>
>  /**
>   * @internal
> --
> 2.7.4
>

^ permalink raw reply	[relevance 0%]

* Re: [dpdk-dev] [PATCH v5] devtools: rework abi checker script
  2017-10-05  7:53 27%     ` [dpdk-dev] [PATCH v5] " Olivier Matz
@ 2017-10-05 13:15  4%       ` Neil Horman
  2017-11-07 23:24  4%       ` Thomas Monjalon
  1 sibling, 0 replies; 200+ results
From: Neil Horman @ 2017-10-05 13:15 UTC (permalink / raw)
  To: Olivier Matz; +Cc: dev, bruce.richardson

On Thu, Oct 05, 2017 at 09:53:27AM +0200, Olivier Matz wrote:
> The initial version of the script had some limitations:
> - cannot work on a non-clean workspace
> - environment variables are not documented
> - no compilation log in case of failure
> - return success even it abi is incompatible
> 
> This patch addresses these issues and rework the code.
> 
> Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
> Acked-by: Neil Horman <nhorman@tuxdriver.com>
> ---
> 
> v4->v5:
> - Add a log when shared lib has no public ABI
> 
> v3->v4:
> - clarify logs on incompatible abi
> - log when an error returned an error
> - [really] fix the report path
> - log the output of make config in the proper file
> 
> v2->v3:
> - fix when not launched from dpdk root dir
> - use "-Og -Wno-error" instead of "-O0"
> - fix typo in commit log
> 
> v1->v2:
> - use /usr/bin/env to find bash (which is required)
> - fix displayed path to html reports
> - reword help for -f option
> 
>  devtools/validate-abi.sh | 397 ++++++++++++++++++++++++-----------------------
>  1 file changed, 205 insertions(+), 192 deletions(-)
> 

To reiterate with updated logging
Acked-by: Neil Horman <nhorman@tuxdriver.com>

^ permalink raw reply	[relevance 4%]

* [dpdk-dev] [PATCH v7 0/9] Policy Based Power Control for Guest
  2017-10-05 12:25  2%     ` [dpdk-dev] [PATCH v6 " David Hunt
@ 2017-10-05 13:28  2%       ` David Hunt
  2017-10-05 13:54  0%         ` Ananyev, Konstantin
  2017-10-05 14:34  2%         ` [dpdk-dev] [PATCH v8 " David Hunt
  0 siblings, 2 replies; 200+ results
From: David Hunt @ 2017-10-05 13:28 UTC (permalink / raw)
  To: dev; +Cc: konstantin.ananyev, jingjing.wu, santosh.shukla

Policy Based Power Control for Guest

This patchset adds the facility for a guest VM to send a policy down to the
host that will allow the host to scale up/down cpu frequencies
depending on the policy criteria independently of the DPDK app running in
the guest.  This differs from the previous vm_power implementation where
individual scale up/down requests were send from the guest to the host via
virtio-serial.

V7 patchset changes:
  * Changed return code of rte_pmd_i40e_query_vfid_by_mac() from an
    int64_t to int

V6 patchset changes:
  * Fixed comments in header for rte_pmd_i40e_query_vfid_by_mac.
  * changed rte_pmd_i40e_query_vfid_by_mac return code from uint to int
    as it can return negative error codes.
  * Removed bool enum from channel_commands.h, including stdbool.h instead.
  * Added #define VM_MAX_NAME_SZ 32 to channel_commands.h
  * Renamed a few variables to be more readable.
  * Added returns in a few places if failed to get info on domain.
  * Fixed power_manager_init to keep track of num_freqs for each core.
  * In power_manager_scale_core_med(), changed a hardcoded '5' to instead
    be calculated from the centre of the frequency list
    (global_core_freq_info[core_num].num_freqs / 2)

V5 patchset changes:
  * Removed most of the #ifdef I40_PMD as it will be applicable to
    other PMDs in the future.
  * Changed the parameter of rte_pmd_i40e_query_vfid_by_mac from a uint64
    to a const struct ether_addr *, rather than casting it later in the
    function.

V4 patchset changes:
  * None, re-post to mailing list under the correct email thread.

V3 patchset changes:
  * Changed to using is_same_ether_addr() instead of looping through
    the mac address bytes to compare them.
  * Tweaked some comments and working in the i40e patch after review.
  * Added a patch to the set to add new i40e function to map file, so
    as to allow shared library builds. The power library API needs a cleanup
    in next release, so will add API/ABI warning for this cleanup in a
    separate patch.

V2 patchset changes:
  * Removed API's in ethdev layer.
  * Now just a single new API in the i40e driver for mapping VF MAC to
    VF index.
  * Moved new function from rte_rxtx.c to rte_pmd_i40e.c
  * Removed function for reading i40e register, moved to using the
    standard stats API.
  * Renamed i40e function to rte_pmd_i40e_query_vfid_by_mac
  * Cleaned up policy generation code.

It's a modification of the vm_power_manager app that runs in the host, and
the guest_vm_power_app example app that runs in the guest. This allows the
guest to send down a policy to the host via virtio-serial, which then allows
the host to scale up/down based on the criteria in the policy, resulting in
quicker scale up/down than individual requests coming from the guest.
It also means that the DPDK application running in the guest does not need
to be modified in any way, it is unaware that it's cores are being scaled
up/down, reducing the effort in implementing a power-aware infrastructure.

The usage model is as follows:
1. Set up the VF's and assign to the guest in the usual way.
2. run vm_power_manager on the host, creating a channel to the guest.
3. Start the guest_vm_power_mgr app on the guest, which establishes
   a virtio-serial channel to the host.
4. Send down the profile for the guest using the "send_profile now" command.
   There is an example profile hard-coded into guest_vm_power_mgr.
5. Stop the guest_vm_power_mgr and run your normal power-unaware application.
6. Send traffic into the VFs at varying traffic rates.
   Observe the frequency change on the host (turbostat -i 1)

The sequence of code changes are as follows:

A new function has been aded to the i40e driver to allow mapping of
a VF MAC to VF index.

Next we make an addition to librte_power that adds an extra command to allow
the passing of a policy structure from the guest to the host. This struct
contains information like busy/quiet hour, packet throughput thresholds, etc.

The next addition adds functionality to convert the virtual CPU (vcpU0 IDs to
physical CPU (pcpu) IDs so that the host can scale up/down the cores used
in the guest.

The remaining patches are functionality to process the policy, and take action
when the relevant trigger occurs to cause a frequency change.

[1/9] net/i40e: add API to convert VF MAC to VF id
[2/9] lib/librte_power: add extra msg type for policies
[3/9] examples/vm_power_mgr: add vcpu to pcpu mapping
[4/9] examples/vm_power_mgr: add scale to medium freq fn
[5/9] examples/vm_power_mgr: add policy to channels
[6/9] examples/vm_power_mgr: add port initialisation
[7/9] power: add send channel msg function to map file
[8/9] examples/guest_cli: add send policy to host
[9/9] examples/vm_power_mgr: set MAC address of VF

^ permalink raw reply	[relevance 2%]

* Re: [dpdk-dev] [PATCH v7 0/9] Policy Based Power Control for Guest
  2017-10-05 13:28  2%       ` [dpdk-dev] [PATCH v7 " David Hunt
@ 2017-10-05 13:54  0%         ` Ananyev, Konstantin
  2017-10-05 14:34  2%         ` [dpdk-dev] [PATCH v8 " David Hunt
  1 sibling, 0 replies; 200+ results
From: Ananyev, Konstantin @ 2017-10-05 13:54 UTC (permalink / raw)
  To: Hunt, David, dev; +Cc: Wu, Jingjing, santosh.shukla



> -----Original Message-----
> From: Hunt, David
> Sent: Thursday, October 5, 2017 2:28 PM
> To: dev@dpdk.org
> Cc: Ananyev, Konstantin <konstantin.ananyev@intel.com>; Wu, Jingjing <jingjing.wu@intel.com>; santosh.shukla@caviumnetworks.com
> Subject: [PATCH v7 0/9] Policy Based Power Control for Guest
> 
> Policy Based Power Control for Guest
> 
> This patchset adds the facility for a guest VM to send a policy down to the
> host that will allow the host to scale up/down cpu frequencies
> depending on the policy criteria independently of the DPDK app running in
> the guest.  This differs from the previous vm_power implementation where
> individual scale up/down requests were send from the guest to the host via
> virtio-serial.
> 
> V7 patchset changes:
>   * Changed return code of rte_pmd_i40e_query_vfid_by_mac() from an
>     int64_t to int
> 
> V6 patchset changes:
>   * Fixed comments in header for rte_pmd_i40e_query_vfid_by_mac.
>   * changed rte_pmd_i40e_query_vfid_by_mac return code from uint to int
>     as it can return negative error codes.
>   * Removed bool enum from channel_commands.h, including stdbool.h instead.
>   * Added #define VM_MAX_NAME_SZ 32 to channel_commands.h
>   * Renamed a few variables to be more readable.
>   * Added returns in a few places if failed to get info on domain.
>   * Fixed power_manager_init to keep track of num_freqs for each core.
>   * In power_manager_scale_core_med(), changed a hardcoded '5' to instead
>     be calculated from the centre of the frequency list
>     (global_core_freq_info[core_num].num_freqs / 2)
> 
> V5 patchset changes:
>   * Removed most of the #ifdef I40_PMD as it will be applicable to
>     other PMDs in the future.
>   * Changed the parameter of rte_pmd_i40e_query_vfid_by_mac from a uint64
>     to a const struct ether_addr *, rather than casting it later in the
>     function.
> 
> V4 patchset changes:
>   * None, re-post to mailing list under the correct email thread.
> 
> V3 patchset changes:
>   * Changed to using is_same_ether_addr() instead of looping through
>     the mac address bytes to compare them.
>   * Tweaked some comments and working in the i40e patch after review.
>   * Added a patch to the set to add new i40e function to map file, so
>     as to allow shared library builds. The power library API needs a cleanup
>     in next release, so will add API/ABI warning for this cleanup in a
>     separate patch.
> 
> V2 patchset changes:
>   * Removed API's in ethdev layer.
>   * Now just a single new API in the i40e driver for mapping VF MAC to
>     VF index.
>   * Moved new function from rte_rxtx.c to rte_pmd_i40e.c
>   * Removed function for reading i40e register, moved to using the
>     standard stats API.
>   * Renamed i40e function to rte_pmd_i40e_query_vfid_by_mac
>   * Cleaned up policy generation code.
> 
> It's a modification of the vm_power_manager app that runs in the host, and
> the guest_vm_power_app example app that runs in the guest. This allows the
> guest to send down a policy to the host via virtio-serial, which then allows
> the host to scale up/down based on the criteria in the policy, resulting in
> quicker scale up/down than individual requests coming from the guest.
> It also means that the DPDK application running in the guest does not need
> to be modified in any way, it is unaware that it's cores are being scaled
> up/down, reducing the effort in implementing a power-aware infrastructure.
> 
> The usage model is as follows:
> 1. Set up the VF's and assign to the guest in the usual way.
> 2. run vm_power_manager on the host, creating a channel to the guest.
> 3. Start the guest_vm_power_mgr app on the guest, which establishes
>    a virtio-serial channel to the host.
> 4. Send down the profile for the guest using the "send_profile now" command.
>    There is an example profile hard-coded into guest_vm_power_mgr.
> 5. Stop the guest_vm_power_mgr and run your normal power-unaware application.
> 6. Send traffic into the VFs at varying traffic rates.
>    Observe the frequency change on the host (turbostat -i 1)
> 
> The sequence of code changes are as follows:
> 
> A new function has been aded to the i40e driver to allow mapping of
> a VF MAC to VF index.
> 
> Next we make an addition to librte_power that adds an extra command to allow
> the passing of a policy structure from the guest to the host. This struct
> contains information like busy/quiet hour, packet throughput thresholds, etc.
> 
> The next addition adds functionality to convert the virtual CPU (vcpU0 IDs to
> physical CPU (pcpu) IDs so that the host can scale up/down the cores used
> in the guest.
> 
> The remaining patches are functionality to process the policy, and take action
> when the relevant trigger occurs to cause a frequency change.
> 
> [1/9] net/i40e: add API to convert VF MAC to VF id
> [2/9] lib/librte_power: add extra msg type for policies
> [3/9] examples/vm_power_mgr: add vcpu to pcpu mapping
> [4/9] examples/vm_power_mgr: add scale to medium freq fn
> [5/9] examples/vm_power_mgr: add policy to channels
> [6/9] examples/vm_power_mgr: add port initialisation
> [7/9] power: add send channel msg function to map file
> [8/9] examples/guest_cli: add send policy to host
> [9/9] examples/vm_power_mgr: set MAC address of VF

Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>

^ permalink raw reply	[relevance 0%]

* [dpdk-dev] [PATCH v8 0/9] Policy Based Power Control for Guest
  2017-10-05 13:28  2%       ` [dpdk-dev] [PATCH v7 " David Hunt
  2017-10-05 13:54  0%         ` Ananyev, Konstantin
@ 2017-10-05 14:34  2%         ` David Hunt
  2017-10-09 22:34  0%           ` Ferruh Yigit
  1 sibling, 1 reply; 200+ results
From: David Hunt @ 2017-10-05 14:34 UTC (permalink / raw)
  To: dev; +Cc: konstantin.ananyev, jingjing.wu, santosh.shukla

Policy Based Power Control for Guest

This patchset adds the facility for a guest VM to send a policy down to the
host that will allow the host to scale up/down cpu frequencies
depending on the policy criteria independently of the DPDK app running in
the guest.  This differs from the previous vm_power implementation where
individual scale up/down requests were send from the guest to the host via
virtio-serial.

V8 patchset changes:
  * Added Ack's and Reviewed-by's to individual patches in the set so as to
    keep patchwork A/R/T flags properly in sync.

V7 patchset changes:
  * Changed return code of rte_pmd_i40e_query_vfid_by_mac() from an
    int64_t to int

V6 patchset changes:
  * Fixed comments in header for rte_pmd_i40e_query_vfid_by_mac.
  * changed rte_pmd_i40e_query_vfid_by_mac return code from uint to int
    as it can return negative error codes.
  * Removed bool enum from channel_commands.h, including stdbool.h instead.
  * Added #define VM_MAX_NAME_SZ 32 to channel_commands.h
  * Renamed a few variables to be more readable.
  * Added returns in a few places if failed to get info on domain.
  * Fixed power_manager_init to keep track of num_freqs for each core.
  * In power_manager_scale_core_med(), changed a hardcoded '5' to instead
    be calculated from the centre of the frequency list
    (global_core_freq_info[core_num].num_freqs / 2)

V5 patchset changes:
  * Removed most of the #ifdef I40_PMD as it will be applicable to
    other PMDs in the future.
  * Changed the parameter of rte_pmd_i40e_query_vfid_by_mac from a uint64
    to a const struct ether_addr *, rather than casting it later in the
    function.

V4 patchset changes:
  * None, re-post to mailing list under the correct email thread.

V3 patchset changes:
  * Changed to using is_same_ether_addr() instead of looping through
    the mac address bytes to compare them.
  * Tweaked some comments and working in the i40e patch after review.
  * Added a patch to the set to add new i40e function to map file, so
    as to allow shared library builds. The power library API needs a cleanup
    in next release, so will add API/ABI warning for this cleanup in a
    separate patch.

V2 patchset changes:
  * Removed API's in ethdev layer.
  * Now just a single new API in the i40e driver for mapping VF MAC to
    VF index.
  * Moved new function from rte_rxtx.c to rte_pmd_i40e.c
  * Removed function for reading i40e register, moved to using the
    standard stats API.
  * Renamed i40e function to rte_pmd_i40e_query_vfid_by_mac
  * Cleaned up policy generation code.

It's a modification of the vm_power_manager app that runs in the host, and
the guest_vm_power_app example app that runs in the guest. This allows the
guest to send down a policy to the host via virtio-serial, which then allows
the host to scale up/down based on the criteria in the policy, resulting in
quicker scale up/down than individual requests coming from the guest.
It also means that the DPDK application running in the guest does not need
to be modified in any way, it is unaware that it's cores are being scaled
up/down, reducing the effort in implementing a power-aware infrastructure.

The usage model is as follows:
1. Set up the VF's and assign to the guest in the usual way.
2. run vm_power_manager on the host, creating a channel to the guest.
3. Start the guest_vm_power_mgr app on the guest, which establishes
   a virtio-serial channel to the host.
4. Send down the profile for the guest using the "send_profile now" command.
   There is an example profile hard-coded into guest_vm_power_mgr.
5. Stop the guest_vm_power_mgr and run your normal power-unaware application.
6. Send traffic into the VFs at varying traffic rates.
   Observe the frequency change on the host (turbostat -i 1)

The sequence of code changes are as follows:

A new function has been aded to the i40e driver to allow mapping of
a VF MAC to VF index.

Next we make an addition to librte_power that adds an extra command to allow
the passing of a policy structure from the guest to the host. This struct
contains information like busy/quiet hour, packet throughput thresholds, etc.

The next addition adds functionality to convert the virtual CPU (vcpU0 IDs to
physical CPU (pcpu) IDs so that the host can scale up/down the cores used
in the guest.

The remaining patches are functionality to process the policy, and take action
when the relevant trigger occurs to cause a frequency change.

[1/9] net/i40e: add API to convert VF MAC to VF id
[2/9] lib/librte_power: add extra msg type for policies
[3/9] examples/vm_power_mgr: add vcpu to pcpu mapping
[4/9] examples/vm_power_mgr: add scale to medium freq fn
[5/9] examples/vm_power_mgr: add policy to channels
[6/9] examples/vm_power_mgr: add port initialisation
[7/9] power: add send channel msg function to map file
[8/9] examples/guest_cli: add send policy to host
[9/9] examples/vm_power_mgr: set MAC address of VF

^ permalink raw reply	[relevance 2%]

* Re: [dpdk-dev] [RFC] Wireless Base Band Device (bbdev)
  2017-10-03 15:17  4%     ` Thomas Monjalon
  2017-10-04 17:11  0%       ` Flavio Leitner
@ 2017-10-05 21:55  0%       ` Mokhtar, Amr
  2017-10-05 22:22  0%         ` Thomas Monjalon
  1 sibling, 1 reply; 200+ results
From: Mokhtar, Amr @ 2017-10-05 21:55 UTC (permalink / raw)
  To: Thomas Monjalon; +Cc: dev, fbl, aconole, bluca



> -----Original Message-----
> From: Thomas Monjalon [mailto:thomas@monjalon.net]
> Sent: Tuesday 3 October 2017 16:18
> To: Mokhtar, Amr <amr.mokhtar@intel.com>
> Cc: dev@dpdk.org; fbl@redhat.com; aconole@redhat.com; bluca@debian.org
> Subject: Re: [dpdk-dev] [RFC] Wireless Base Band Device (bbdev)
> 
> 03/10/2017 16:29, Mokhtar, Amr:
> > From: Thomas Monjalon [mailto:thomas@monjalon.net]
> > > 25/08/2017 15:46, Amr Mokhtar:
> > > > +int
> > > > +rte_bbdev_configure(uint8_t dev_id, uint16_t num_queues,
> > > > +		const struct rte_bbdev_conf *conf);
> > >
> > > I am not convinced by the "configure all" function in ethdev.
> > > We break the ABI each time we add a new feature to configure.
> > > And it does not really help to have all configurations in one struct.
> > > Would you mind to split the struct rte_bbdev_conf and split the
> > > function accordingly?
> >
> > There is nothing to split tbh. The only parameter it has is the socket_id.
> > And in fact, it's optional, can be null. The only config we need is num_queues.
> 
> Indeed, there is nothing in this struct.
> If you need only to allocate queues, you just have to rename this function.
> 
> > I don't see in the near future that we may need to add more config params.
> > As a side, in the time of the implementation we were trying to avoid
> > any diversions from the current design ideology of ethdev and cryptodev.
> 
> There is no ideology in ethdev, just some mistakes ;)
> 
> > Can we leave it for consideration with future releases?
> 
> No it should be addressed from the beginning.
> 
> When you will need to add something more to configure port-wise, you should
> add a new function instead of breaking the ABI of the global conf struct.
> That's why the configure option should be more specialized.
> 
> Distro people were complaining about ABI breakage last week.
> This is exactly an example of how to avoid it from the beginning.
> 

Ok, got your point. I was looking at it from an API-only standpoint.
How about modifying it into?
int
rte_bbdev_setup_queues(uint16_t dev_id, uint16_t num_queues, int socket_id);

> 
> > > [...]
> > > > +struct __rte_cache_aligned rte_bbdev {
> > > > +	rte_bbdev_enqueue_ops_t enqueue_ops; /**< Enqueue function */
> > > > +	rte_bbdev_dequeue_ops_t dequeue_ops;  /**< Dequeue function */
> > > > +	const struct rte_bbdev_ops *dev_ops;  /**< Functions exported by
> > > > +PMD
> > > */
> > > > +	struct rte_bbdev_data *data;  /**< Pointer to device data */
> > > > +	bool attached;  /**< If device is currently attached or not */
> > >
> > > What "attached" means?
> > > I'm afraid you are trying to manage hotplug in the wrong layer.
> >
> > Hotplug is not supported in the current release.
> 
> It is not answering the question.
> What is an "attached" device?

"Attached" means that the PCI device was probed and the bbdev device slot is allocated.
For software devices, means that a virtual bbdev device (vdev) is allocated for bbdev.
Same way the "attached" approach used in cryptodev.

> 
> 
> > > [...]
> > > > +/** Structure specifying a single operation */ struct rte_bbdev_op {
> > > > +	enum rte_bbdev_op_type type;  /**< Type of this operation */
> > > > +	int status;  /**< Status of operation that was performed */
> > > > +	struct rte_mempool *mempool;  /**< Mempool which op instance is
> > > > +in
> > > */
> > > > +	void *opaque_data;  /**< Opaque pointer for user data */
> > > > +	/**
> > > > +	 * Anonymous union of operation-type specific parameters. When
> > > allocated
> > > > +	 * using rte_bbdev_op_pool_create(), space is allocated for the
> > > > +	 * parameters at the end of each rte_bbdev_op structure, and the
> > > > +	 * pointers here point to it.
> > > > +	 */
> > > > +	RTE_STD_C11
> > > > +	union {
> > > > +		void *generic;
> > > > +		struct rte_bbdev_op_turbo_dec *turbo_dec;
> > > > +		struct rte_bbdev_op_turbo_enc *turbo_enc;
> > > > +	};
> > > > +};
> > >
> > > I am not sure it is a good idea to fit every operations in the same
> > > struct and the same functions.
> >
> > Due to the fact that our design adopts this idea that a device can
> > support both the encode and decode operations.
> > Then, at the time of PMD registration, the enqueue functions is allocated.
> > This enqueue() function is common for both operations.
> > This fitted operation structure is essential for the driver to decide on the
> operation.
> 
> Sorry I do not understand why you must have a "generic operation".
> Please, could you try again to explain this design to someone not fully
> understanding how turbo enc/dec works?

Oh, sorry, I was not paying attention that you're referring to "void *generic"
It is just a place-holder for any other operation types. Can be removed if you like.

^ permalink raw reply	[relevance 0%]

* Re: [dpdk-dev] [RFC] Wireless Base Band Device (bbdev)
  2017-10-05 21:55  0%       ` Mokhtar, Amr
@ 2017-10-05 22:22  0%         ` Thomas Monjalon
  2017-10-06 23:27  0%           ` Mokhtar, Amr
  0 siblings, 1 reply; 200+ results
From: Thomas Monjalon @ 2017-10-05 22:22 UTC (permalink / raw)
  To: Mokhtar, Amr; +Cc: dev, fbl, aconole, bluca

05/10/2017 23:55, Mokhtar, Amr:
> From: Thomas Monjalon [mailto:thomas@monjalon.net]
> > 03/10/2017 16:29, Mokhtar, Amr:
> > > From: Thomas Monjalon [mailto:thomas@monjalon.net]
> > > > 25/08/2017 15:46, Amr Mokhtar:
> > > > > +int
> > > > > +rte_bbdev_configure(uint8_t dev_id, uint16_t num_queues,
> > > > > +		const struct rte_bbdev_conf *conf);
> > > >
> > > > I am not convinced by the "configure all" function in ethdev.
> > > > We break the ABI each time we add a new feature to configure.
> > > > And it does not really help to have all configurations in one struct.
> > > > Would you mind to split the struct rte_bbdev_conf and split the
> > > > function accordingly?
> > >
> > > There is nothing to split tbh. The only parameter it has is the socket_id.
> > > And in fact, it's optional, can be null. The only config we need is num_queues.
> > 
> > Indeed, there is nothing in this struct.
> > If you need only to allocate queues, you just have to rename this function.
> > 
> > > I don't see in the near future that we may need to add more config params.
> > > As a side, in the time of the implementation we were trying to avoid
> > > any diversions from the current design ideology of ethdev and cryptodev.
> > 
> > There is no ideology in ethdev, just some mistakes ;)
> > 
> > > Can we leave it for consideration with future releases?
> > 
> > No it should be addressed from the beginning.
> > 
> > When you will need to add something more to configure port-wise, you should
> > add a new function instead of breaking the ABI of the global conf struct.
> > That's why the configure option should be more specialized.
> > 
> > Distro people were complaining about ABI breakage last week.
> > This is exactly an example of how to avoid it from the beginning.
> > 
> 
> Ok, got your point. I was looking at it from an API-only standpoint.
> How about modifying it into?
> int
> rte_bbdev_setup_queues(uint16_t dev_id, uint16_t num_queues, int socket_id);

Yes OK

[...]
> > > > > +struct __rte_cache_aligned rte_bbdev {
> > > > > +	rte_bbdev_enqueue_ops_t enqueue_ops; /**< Enqueue function */
> > > > > +	rte_bbdev_dequeue_ops_t dequeue_ops;  /**< Dequeue function */
> > > > > +	const struct rte_bbdev_ops *dev_ops;  /**< Functions exported by
> > > > > +PMD
> > > > */
> > > > > +	struct rte_bbdev_data *data;  /**< Pointer to device data */
> > > > > +	bool attached;  /**< If device is currently attached or not */
> > > >
> > > > What "attached" means?
> > > > I'm afraid you are trying to manage hotplug in the wrong layer.
> > >
> > > Hotplug is not supported in the current release.
> > 
> > It is not answering the question.
> > What is an "attached" device?
> 
> "Attached" means that the PCI device was probed and the bbdev device slot is allocated.
> For software devices, means that a virtual bbdev device (vdev) is allocated for bbdev.
> Same way the "attached" approach used in cryptodev.

Not sure to understand.
If "attached" means "allocated", when is it false?

[...]
> > > > > +/** Structure specifying a single operation */ struct rte_bbdev_op {
> > > > > +	enum rte_bbdev_op_type type;  /**< Type of this operation */
> > > > > +	int status;  /**< Status of operation that was performed */
> > > > > +	struct rte_mempool *mempool;  /**< Mempool which op instance is
> > > > > +in
> > > > */
> > > > > +	void *opaque_data;  /**< Opaque pointer for user data */
> > > > > +	/**
> > > > > +	 * Anonymous union of operation-type specific parameters. When
> > > > allocated
> > > > > +	 * using rte_bbdev_op_pool_create(), space is allocated for the
> > > > > +	 * parameters at the end of each rte_bbdev_op structure, and the
> > > > > +	 * pointers here point to it.
> > > > > +	 */
> > > > > +	RTE_STD_C11
> > > > > +	union {
> > > > > +		void *generic;
> > > > > +		struct rte_bbdev_op_turbo_dec *turbo_dec;
> > > > > +		struct rte_bbdev_op_turbo_enc *turbo_enc;
> > > > > +	};
> > > > > +};
> > > >
> > > > I am not sure it is a good idea to fit every operations in the same
> > > > struct and the same functions.
> > >
> > > Due to the fact that our design adopts this idea that a device can
> > > support both the encode and decode operations.
> > > Then, at the time of PMD registration, the enqueue functions is allocated.
> > > This enqueue() function is common for both operations.
> > > This fitted operation structure is essential for the driver to decide on the
> > operation.
> > 
> > Sorry I do not understand why you must have a "generic operation".
> > Please, could you try again to explain this design to someone not fully
> > understanding how turbo enc/dec works?
> 
> Oh, sorry, I was not paying attention that you're referring to "void *generic"
> It is just a place-holder for any other operation types. Can be removed if you like.

No I was not referring to void *generic.
It is the same question as in the RFC.
I don't understand the benefit of grouping different things in an union.

^ permalink raw reply	[relevance 0%]

* Re: [dpdk-dev] [PATCH v6 0/5] increase port_id range
  2017-09-29  7:17  4%     ` [dpdk-dev] [PATCH v6 0/5] " Zhiyong Yang
  2017-09-29  7:17  7%       ` [dpdk-dev] [PATCH v6 1/5] net/bonding: remove bonding APIs using ABI versioning Zhiyong Yang
  2017-09-29  7:17  1%       ` [dpdk-dev] [PATCH v6 2/5] ethdev: increase port_id range Zhiyong Yang
@ 2017-10-06  2:15  0%       ` Ferruh Yigit
  2017-10-06 13:31  0%         ` Gaëtan Rivet
                           ` (3 more replies)
  2 siblings, 4 replies; 200+ results
From: Ferruh Yigit @ 2017-10-06  2:15 UTC (permalink / raw)
  To: Zhiyong Yang, dev; +Cc: thomas, Nelio Laranjeiro, Gaetan Rivet, Declan Doherty

On 9/29/2017 8:17 AM, Zhiyong Yang wrote:
> port_id is currently defined as uint8_t, which is limited to the range
> 0 to 255. A larger range is required for vdev scalability.
> 
> It is necessary for a redefinition of port_id to extend it from
> 1 bytes to 2 bytes. All ethdev APIs and usages related to port_id will
> be changed at the same time.
> 
> Discussion about port_id is the following thread.
> http://www.dpdk.org/dev/patchwork/patch/23208/
> 
> Changes in V2:
> 1. cover more PMDs to increase port_id range.
> 2. cover more examples to increase port_id range.
> 3. add 17.11 release note.
> 
> Changes in V3:
> 1.  cover mlx4 and mlx5.
> 2.  add to increase port_id range in test code.
> 3.  The patch "librte_mbuf: modify port initialization value" is merged
>     into the patchset.
> 
> Changes in V4:
> 1.  Add a patch to remove bonding APIs using ABI versioning according to
>     Ferruh's comments.
> 2.  Unify to use typedef portid_t in testpmd code.
> 3.  update release note deprecation doc in 2/5
> 4.  fix some issues according to comments.
> 
> Changes in V5:
> 1.  For 1/5, bond_mode_8023ad_conf_get_v1708() and bond_mode_8023ad_conf
>     _get() are merged into one function bond_mode_8023ad_conf_get.
> 
> Changes in V6:
> 1.  For 2/5, remove the unnecessary LIBABIVER in Makefile and update
>     the release notes "Shared Library Versions".
>     Note: The patchset have dependency on the following patch.
>     http://www.dpdk.org/dev/patchwork/patch/28738/
>     http://www.dpdk.org/dev/patchwork/patch/29219/
> 
> Note: 3/5 and 4/5 patches' building depends on 2/5 patch since 2/5 patch
> breaks lib/PMD API/ABI.
> 
> Zhiyong Yang (5):
>   net/bonding: remove bonding APIs using ABI versioning
>   ethdev: increase port_id range
>   examples: increase port_id range
>   test: increase port_id range
>   librte_mbuf: modify port initialization value

Series applied to dpdk-next-net/master, thanks.

There was merge conflict for:
rte_eth_bond_pmd.c
failsafe_private.h
mlx5_rxtx.h

Maintainers of these files cc'ed, can you please double check latest
files in next-net?

^ permalink raw reply	[relevance 0%]

* Re: [dpdk-dev] [PATCH v6 0/5] increase port_id range
  2017-10-06  2:15  0%       ` [dpdk-dev] [PATCH v6 0/5] " Ferruh Yigit
@ 2017-10-06 13:31  0%         ` Gaëtan Rivet
  2017-10-06 14:29  0%         ` Thomas Monjalon
                           ` (2 subsequent siblings)
  3 siblings, 0 replies; 200+ results
From: Gaëtan Rivet @ 2017-10-06 13:31 UTC (permalink / raw)
  To: Ferruh Yigit; +Cc: Zhiyong Yang, dev, thomas, Nelio Laranjeiro, Declan Doherty

On Fri, Oct 06, 2017 at 03:15:40AM +0100, Ferruh Yigit wrote:
> On 9/29/2017 8:17 AM, Zhiyong Yang wrote:
> > port_id is currently defined as uint8_t, which is limited to the range
> > 0 to 255. A larger range is required for vdev scalability.
> > 
> > It is necessary for a redefinition of port_id to extend it from
> > 1 bytes to 2 bytes. All ethdev APIs and usages related to port_id will
> > be changed at the same time.
> > 
> > Discussion about port_id is the following thread.
> > http://www.dpdk.org/dev/patchwork/patch/23208/
> > 
> > Changes in V2:
> > 1. cover more PMDs to increase port_id range.
> > 2. cover more examples to increase port_id range.
> > 3. add 17.11 release note.
> > 
> > Changes in V3:
> > 1.  cover mlx4 and mlx5.
> > 2.  add to increase port_id range in test code.
> > 3.  The patch "librte_mbuf: modify port initialization value" is merged
> >     into the patchset.
> > 
> > Changes in V4:
> > 1.  Add a patch to remove bonding APIs using ABI versioning according to
> >     Ferruh's comments.
> > 2.  Unify to use typedef portid_t in testpmd code.
> > 3.  update release note deprecation doc in 2/5
> > 4.  fix some issues according to comments.
> > 
> > Changes in V5:
> > 1.  For 1/5, bond_mode_8023ad_conf_get_v1708() and bond_mode_8023ad_conf
> >     _get() are merged into one function bond_mode_8023ad_conf_get.
> > 
> > Changes in V6:
> > 1.  For 2/5, remove the unnecessary LIBABIVER in Makefile and update
> >     the release notes "Shared Library Versions".
> >     Note: The patchset have dependency on the following patch.
> >     http://www.dpdk.org/dev/patchwork/patch/28738/
> >     http://www.dpdk.org/dev/patchwork/patch/29219/
> > 
> > Note: 3/5 and 4/5 patches' building depends on 2/5 patch since 2/5 patch
> > breaks lib/PMD API/ABI.
> > 
> > Zhiyong Yang (5):
> >   net/bonding: remove bonding APIs using ABI versioning
> >   ethdev: increase port_id range
> >   examples: increase port_id range
> >   test: increase port_id range
> >   librte_mbuf: modify port initialization value
> 
> Series applied to dpdk-next-net/master, thanks.
> 
> There was merge conflict for:
> rte_eth_bond_pmd.c
> failsafe_private.h
> mlx5_rxtx.h
> 
> Maintainers of these files cc'ed, can you please double check latest
> files in next-net?

Hello Ferruh,

The only potential conflicts I see are on the event callbacks

8<-----

int failsafe_eth_rmv_event_callback(uint16_t port_id,
                                    enum rte_eth_event_type type,
                                    void *arg, void *out);
int failsafe_eth_lsc_event_callback(uint16_t port_id,
                                    enum rte_eth_event_type event,
                                    void *cb_arg, void *out);
----->8

and I see no issue there on next-net.
Let me know if you want me to check something specific.

Regards,
-- 
Gaëtan Rivet
6WIND

^ permalink raw reply	[relevance 0%]

* Re: [dpdk-dev] [PATCH v6 0/5] increase port_id range
  2017-10-06  2:15  0%       ` [dpdk-dev] [PATCH v6 0/5] " Ferruh Yigit
  2017-10-06 13:31  0%         ` Gaëtan Rivet
@ 2017-10-06 14:29  0%         ` Thomas Monjalon
  2017-10-06 16:02  0%         ` Thomas Monjalon
  2017-10-11 21:21  0%         ` Ferruh Yigit
  3 siblings, 0 replies; 200+ results
From: Thomas Monjalon @ 2017-10-06 14:29 UTC (permalink / raw)
  To: Ferruh Yigit, Zhiyong Yang
  Cc: dev, Nelio Laranjeiro, Gaetan Rivet, Declan Doherty

06/10/2017 04:15, Ferruh Yigit:
> On 9/29/2017 8:17 AM, Zhiyong Yang wrote:
> > port_id is currently defined as uint8_t, which is limited to the range
> > 0 to 255. A larger range is required for vdev scalability.
> > 
> > It is necessary for a redefinition of port_id to extend it from
> > 1 bytes to 2 bytes. All ethdev APIs and usages related to port_id will
> > be changed at the same time.
> > 
> > Discussion about port_id is the following thread.
> > http://www.dpdk.org/dev/patchwork/patch/23208/
> > 
> > Changes in V2:
> > 1. cover more PMDs to increase port_id range.
> > 2. cover more examples to increase port_id range.
> > 3. add 17.11 release note.
> > 
> > Changes in V3:
> > 1.  cover mlx4 and mlx5.
> > 2.  add to increase port_id range in test code.
> > 3.  The patch "librte_mbuf: modify port initialization value" is merged
> >     into the patchset.
> > 
> > Changes in V4:
> > 1.  Add a patch to remove bonding APIs using ABI versioning according to
> >     Ferruh's comments.
> > 2.  Unify to use typedef portid_t in testpmd code.
> > 3.  update release note deprecation doc in 2/5
> > 4.  fix some issues according to comments.
> > 
> > Changes in V5:
> > 1.  For 1/5, bond_mode_8023ad_conf_get_v1708() and bond_mode_8023ad_conf
> >     _get() are merged into one function bond_mode_8023ad_conf_get.
> > 
> > Changes in V6:
> > 1.  For 2/5, remove the unnecessary LIBABIVER in Makefile and update
> >     the release notes "Shared Library Versions".
> >     Note: The patchset have dependency on the following patch.
> >     http://www.dpdk.org/dev/patchwork/patch/28738/
> >     http://www.dpdk.org/dev/patchwork/patch/29219/
> > 
> > Note: 3/5 and 4/5 patches' building depends on 2/5 patch since 2/5 patch
> > breaks lib/PMD API/ABI.
> > 
> > Zhiyong Yang (5):
> >   net/bonding: remove bonding APIs using ABI versioning
> >   ethdev: increase port_id range
> >   examples: increase port_id range
> >   test: increase port_id range
> >   librte_mbuf: modify port initialization value
> 
> Series applied to dpdk-next-net/master, thanks.

The patches 2, 3, 4 must be squashed, otherwise compilation fails.
Will squash in master branch.

^ permalink raw reply	[relevance 0%]

* [dpdk-dev] [PATCH V3 3/5] ethdev: add new api for traffic metering and policing
  @ 2017-10-06 14:45  1%   ` Cristian Dumitrescu
  0 siblings, 0 replies; 200+ results
From: Cristian Dumitrescu @ 2017-10-06 14:45 UTC (permalink / raw)
  To: dev
  Cc: thomas, adrien.mazarguil, jingjing.wu, hemant.agrawal,
	jerin.jacob, jasvinder.singh

This patch introduces new ethdev generic API for Traffic Metering and
Policing (MTR), which is yet another standard RX offload for Ethernet
devices.

Similar to rte_flow and rte_tm APIs, the configuration of MTR objects is
done in their own namespace (rte_mtr) within the librte_ether library.

Main features:
1. Traffic metering: determine the color for the current packet (green,
   yellow, red) based on history maintained by the MTR object. Supported
   algorithms: srTCM (RFC 2697), trTCM (RFC 2698 and RFC 4115).
2. Policing (per meter output color actions): re-color the packet (keep
   or change the meter output color) or drop the packet.
3. Statistics
4. Capability API

Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
---
Changes in v3:
- None

Changes in v2:
- Implemented input from Hemant:
     - Added support for RFC 4115 trTCM algorithm
     - Added support for meter pass-through mode: see API functions
       rte_mtr_meter_enable() and rte_mtr_meter_disable()
- Implemented input from Jerin:
     - Added capability API
- Implemented input from Thomas:
     - Added new API functions under the EXPERIMENTAL section in map file
- Improved the mechanism for MTR object chaining: each MTR object can be
  configured whther to read input color from a previous MTR object in the
  same flow (if any) of from DSCP traslation table
- Improved run-time update functions
- Doxygen: added more descriptions, small fixes

Changes in v1 (from RFC [1]):
- Implemented input from Thomas:
     - Added EXPERIMENTAL tag in rte_mtr.h and MANTAINERS for this new API
- Implemented input from Adrien:
     - Added more Doxygen comments to re-inforce relationship between MTR and
       flow
- Doxygen: added hook in doxy-api-index.md

[1] RFC: http://www.dpdk.org/ml/archives/dev/2017-May/066888.html

 MAINTAINERS                             |   4 +
 doc/api/doxy-api-index.md               |   1 +
 lib/librte_ether/Makefile               |   3 +
 lib/librte_ether/rte_ethdev_version.map |  18 +
 lib/librte_ether/rte_mtr.c              | 229 ++++++++++
 lib/librte_ether/rte_mtr.h              | 723 ++++++++++++++++++++++++++++++++
 lib/librte_ether/rte_mtr_driver.h       | 221 ++++++++++
 7 files changed, 1199 insertions(+)
 create mode 100644 lib/librte_ether/rte_mtr.c
 create mode 100644 lib/librte_ether/rte_mtr.h
 create mode 100644 lib/librte_ether/rte_mtr_driver.h

diff --git a/MAINTAINERS b/MAINTAINERS
index 5c3abf9..bce6b6f 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -260,6 +260,10 @@ M: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
 T: git://dpdk.org/next/dpdk-next-tm
 F: lib/librte_ether/rte_tm*
 
+Traffic Metering and Policing API - EXPERIMENTAL
+M: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
+F: lib/librte_ether/rte_mtr*
+
 Crypto API
 M: Declan Doherty <declan.doherty@intel.com>
 F: lib/librte_cryptodev/
diff --git a/doc/api/doxy-api-index.md b/doc/api/doxy-api-index.md
index 19e0d4f..b2342a9 100644
--- a/doc/api/doxy-api-index.md
+++ b/doc/api/doxy-api-index.md
@@ -41,6 +41,7 @@ The public API headers are grouped by topics:
   [ethctrl]            (@ref rte_eth_ctrl.h),
   [rte_flow]           (@ref rte_flow.h),
   [rte_tm]             (@ref rte_tm.h),
+  [rte_mtr]            (@ref rte_mtr.h),
   [cryptodev]          (@ref rte_cryptodev.h),
   [eventdev]           (@ref rte_eventdev.h),
   [metrics]            (@ref rte_metrics.h),
diff --git a/lib/librte_ether/Makefile b/lib/librte_ether/Makefile
index 201cb96..35ba5d9 100644
--- a/lib/librte_ether/Makefile
+++ b/lib/librte_ether/Makefile
@@ -46,6 +46,7 @@ LIBABIVER := 7
 SRCS-y += rte_ethdev.c
 SRCS-y += rte_flow.c
 SRCS-y += rte_tm.c
+SRCS-y += rte_mtr.c
 SRCS-y += ethdev_profile.c
 
 #
@@ -60,5 +61,7 @@ SYMLINK-y-include += rte_flow.h
 SYMLINK-y-include += rte_flow_driver.h
 SYMLINK-y-include += rte_tm.h
 SYMLINK-y-include += rte_tm_driver.h
+SYMLINK-y-include += rte_mtr.h
+SYMLINK-y-include += rte_mtr_driver.h
 
 include $(RTE_SDK)/mk/rte.lib.mk
diff --git a/lib/librte_ether/rte_ethdev_version.map b/lib/librte_ether/rte_ethdev_version.map
index 07f9e17..c8f59a0 100644
--- a/lib/librte_ether/rte_ethdev_version.map
+++ b/lib/librte_ether/rte_ethdev_version.map
@@ -194,3 +194,21 @@ DPDK_17.11 {
 	rte_eth_dev_reset;
 
 } DPDK_17.08;
+
+EXPERIMENTAL {
+	global:
+
+	rte_mtr_capabilities_get;
+	rte_mtr_meter_profile_add;
+	rte_mtr_meter_profile_delete;
+	rte_mtr_create;
+	rte_mtr_destroy;
+	rte_mtr_meter_enable;
+	rte_mtr_meter_disable;
+	rte_mtr_meter_profile_update;
+	rte_mtr_meter_dscp_table_update;
+	rte_mtr_policer_actions_update;
+	rte_mtr_stats_update;
+	rte_mtr_stats_read;
+
+} DPDK_17.11;
diff --git a/lib/librte_ether/rte_mtr.c b/lib/librte_ether/rte_mtr.c
new file mode 100644
index 0000000..6526a97
--- /dev/null
+++ b/lib/librte_ether/rte_mtr.c
@@ -0,0 +1,229 @@
+/*-
+ *   BSD LICENSE
+ *
+ *   Copyright(c) 2017 Intel Corporation. All rights reserved.
+ *   All rights reserved.
+ *
+ *   Redistribution and use in source and binary forms, with or without
+ *   modification, are permitted provided that the following conditions
+ *   are met:
+ *
+ *     * Redistributions of source code must retain the above copyright
+ *       notice, this list of conditions and the following disclaimer.
+ *     * Redistributions in binary form must reproduce the above copyright
+ *       notice, this list of conditions and the following disclaimer in
+ *       the documentation and/or other materials provided with the
+ *       distribution.
+ *     * Neither the name of Intel Corporation nor the names of its
+ *       contributors may be used to endorse or promote products derived
+ *       from this software without specific prior written permission.
+ *
+ *   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ *   "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ *   LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ *   A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ *   OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ *   LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ *   DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ *   THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ *   (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ *   OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include <stdint.h>
+
+#include <rte_errno.h>
+#include "rte_ethdev.h"
+#include "rte_mtr_driver.h"
+#include "rte_mtr.h"
+
+/* Get generic traffic metering & policing operations structure from a port. */
+const struct rte_mtr_ops *
+rte_mtr_ops_get(uint8_t port_id, struct rte_mtr_error *error)
+{
+	struct rte_eth_dev *dev = &rte_eth_devices[port_id];
+	const struct rte_mtr_ops *ops;
+
+	if (!rte_eth_dev_is_valid_port(port_id)) {
+		rte_mtr_error_set(error,
+			ENODEV,
+			RTE_MTR_ERROR_TYPE_UNSPECIFIED,
+			NULL,
+			rte_strerror(ENODEV));
+		return NULL;
+	}
+
+	if ((dev->dev_ops->mtr_ops_get == NULL) ||
+		(dev->dev_ops->mtr_ops_get(dev, &ops) != 0) ||
+		(ops == NULL)) {
+		rte_mtr_error_set(error,
+			ENOSYS,
+			RTE_MTR_ERROR_TYPE_UNSPECIFIED,
+			NULL,
+			rte_strerror(ENOSYS));
+		return NULL;
+	}
+
+	return ops;
+}
+
+#define RTE_MTR_FUNC(port_id, func)			\
+({							\
+	const struct rte_mtr_ops *ops =			\
+		rte_mtr_ops_get(port_id, error);		\
+	if (ops == NULL)					\
+		return -rte_errno;			\
+							\
+	if (ops->func == NULL)				\
+		return -rte_mtr_error_set(error,		\
+			ENOSYS,				\
+			RTE_MTR_ERROR_TYPE_UNSPECIFIED,	\
+			NULL,				\
+			rte_strerror(ENOSYS));		\
+							\
+	ops->func;					\
+})
+
+/* MTR capabilities get */
+int
+rte_mtr_capabilities_get(uint8_t port_id,
+	struct rte_mtr_capabilities *cap,
+	struct rte_mtr_error *error)
+{
+	struct rte_eth_dev *dev = &rte_eth_devices[port_id];
+	return RTE_MTR_FUNC(port_id, capabilities_get)(dev,
+		cap, error);
+}
+
+/* MTR meter profile add */
+int
+rte_mtr_meter_profile_add(uint8_t port_id,
+	uint32_t meter_profile_id,
+	struct rte_mtr_meter_profile *profile,
+	struct rte_mtr_error *error)
+{
+	struct rte_eth_dev *dev = &rte_eth_devices[port_id];
+	return RTE_MTR_FUNC(port_id, meter_profile_add)(dev,
+		meter_profile_id, profile, error);
+}
+
+/** MTR meter profile delete */
+int
+rte_mtr_meter_profile_delete(uint8_t port_id,
+	uint32_t meter_profile_id,
+	struct rte_mtr_error *error)
+{
+	struct rte_eth_dev *dev = &rte_eth_devices[port_id];
+	return RTE_MTR_FUNC(port_id, meter_profile_delete)(dev,
+		meter_profile_id, error);
+}
+
+/** MTR object create */
+int
+rte_mtr_create(uint8_t port_id,
+	uint32_t mtr_id,
+	struct rte_mtr_params *params,
+	int shared,
+	struct rte_mtr_error *error)
+{
+	struct rte_eth_dev *dev = &rte_eth_devices[port_id];
+	return RTE_MTR_FUNC(port_id, create)(dev,
+		mtr_id, params, shared, error);
+}
+
+/** MTR object destroy */
+int
+rte_mtr_destroy(uint8_t port_id,
+	uint32_t mtr_id,
+	struct rte_mtr_error *error)
+{
+	struct rte_eth_dev *dev = &rte_eth_devices[port_id];
+	return RTE_MTR_FUNC(port_id, destroy)(dev,
+		mtr_id, error);
+}
+
+/** MTR object meter enable */
+int
+rte_mtr_meter_enable(uint8_t port_id,
+	uint32_t mtr_id,
+	struct rte_mtr_error *error)
+{
+	struct rte_eth_dev *dev = &rte_eth_devices[port_id];
+	return RTE_MTR_FUNC(port_id, meter_enable)(dev,
+		mtr_id, error);
+}
+
+/** MTR object meter disable */
+int
+rte_mtr_meter_disable(uint8_t port_id,
+	uint32_t mtr_id,
+	struct rte_mtr_error *error)
+{
+	struct rte_eth_dev *dev = &rte_eth_devices[port_id];
+	return RTE_MTR_FUNC(port_id, meter_disable)(dev,
+		mtr_id, error);
+}
+
+/** MTR object meter profile update */
+int
+rte_mtr_meter_profile_update(uint8_t port_id,
+	uint32_t mtr_id,
+	uint32_t meter_profile_id,
+	struct rte_mtr_error *error)
+{
+	struct rte_eth_dev *dev = &rte_eth_devices[port_id];
+	return RTE_MTR_FUNC(port_id, meter_profile_update)(dev,
+		mtr_id, meter_profile_id, error);
+}
+
+/** MTR object meter DSCP table update */
+int
+rte_mtr_meter_dscp_table_update(uint8_t port_id,
+	uint32_t mtr_id,
+	enum rte_mtr_color *dscp_table,
+	struct rte_mtr_error *error)
+{
+	struct rte_eth_dev *dev = &rte_eth_devices[port_id];
+	return RTE_MTR_FUNC(port_id, meter_dscp_table_update)(dev,
+		mtr_id, dscp_table, error);
+}
+
+/** MTR object policer action update */
+int
+rte_mtr_policer_actions_update(uint8_t port_id,
+	uint32_t mtr_id,
+	uint32_t action_mask,
+	enum rte_mtr_policer_action *actions,
+	struct rte_mtr_error *error)
+{
+	struct rte_eth_dev *dev = &rte_eth_devices[port_id];
+	return RTE_MTR_FUNC(port_id, policer_actions_update)(dev,
+		mtr_id, action_mask, actions, error);
+}
+
+/** MTR object enabled stats update */
+int
+rte_mtr_stats_update(uint8_t port_id,
+	uint32_t mtr_id,
+	uint64_t stats_mask,
+	struct rte_mtr_error *error)
+{
+	struct rte_eth_dev *dev = &rte_eth_devices[port_id];
+	return RTE_MTR_FUNC(port_id, stats_update)(dev,
+		mtr_id, stats_mask, error);
+}
+
+/** MTR object stats read */
+int
+rte_mtr_stats_read(uint8_t port_id,
+	uint32_t mtr_id,
+	struct rte_mtr_stats *stats,
+	uint64_t *stats_mask,
+	int clear,
+	struct rte_mtr_error *error)
+{
+	struct rte_eth_dev *dev = &rte_eth_devices[port_id];
+	return RTE_MTR_FUNC(port_id, stats_read)(dev,
+		mtr_id, stats, stats_mask, clear, error);
+}
diff --git a/lib/librte_ether/rte_mtr.h b/lib/librte_ether/rte_mtr.h
new file mode 100644
index 0000000..f0f897f
--- /dev/null
+++ b/lib/librte_ether/rte_mtr.h
@@ -0,0 +1,723 @@
+/*-
+ *   BSD LICENSE
+ *
+ *   Copyright(c) 2017 Intel Corporation.
+ *   Copyright(c) 2017 NXP.
+ *   Copyright(c) 2017 Cavium.
+ *   All rights reserved.
+ *
+ *   Redistribution and use in source and binary forms, with or without
+ *   modification, are permitted provided that the following conditions
+ *   are met:
+ *
+ *     * Redistributions of source code must retain the above copyright
+ *       notice, this list of conditions and the following disclaimer.
+ *     * Redistributions in binary form must reproduce the above copyright
+ *       notice, this list of conditions and the following disclaimer in
+ *       the documentation and/or other materials provided with the
+ *       distribution.
+ *     * Neither the name of Intel Corporation nor the names of its
+ *       contributors may be used to endorse or promote products derived
+ *       from this software without specific prior written permission.
+ *
+ *   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ *   "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ *   LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ *   A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ *   OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ *   LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ *   DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ *   THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ *   (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ *   OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef __INCLUDE_RTE_MTR_H__
+#define __INCLUDE_RTE_MTR_H__
+
+/**
+ * @file
+ * RTE Generic Traffic Metering and Policing API
+ *
+ * This interface provides the ability to configure the traffic metering and
+ * policing (MTR) in a generic way.
+ *
+ * The processing done for each input packet hitting a MTR object is:
+ *    A) Traffic metering: The packet is assigned a color (the meter output
+ *       color), based on the previous history of the flow reflected in the
+ *       current state of the MTR object, according to the specific traffic
+ *       metering algorithm. The traffic metering algorithm can typically work
+ *       in color aware mode, in which case the input packet already has an
+ *       initial color (the input color), or in color blind mode, which is
+ *       equivalent to considering all input packets initially colored as green.
+ *    B) Policing: There is a separate policer action configured for each meter
+ *       output color, which can:
+ *          a) Drop the packet.
+ *          b) Keep the same packet color: the policer output color matches the
+ *             meter output color (essentially a no-op action).
+ *          c) Recolor the packet: the policer output color is different than
+ *             the meter output color.
+ *       The policer output color is the output color of the packet, which is
+ *       set in the packet meta-data (i.e. struct rte_mbuf::sched::color).
+ *    C) Statistics: The set of counters maintained for each MTR object is
+ *       configurable and subject to the implementation support. This set
+ *       includes the number of packets and bytes dropped or passed for each
+ *       output color.
+ *
+ * Once successfully created, an MTR object is linked to one or several flows
+ * through the meter action of the flow API.
+ *    A) Whether an MTR object is private to a flow or potentially shared by
+ *       several flows has to be specified at creation time.
+ *    B) Several meter actions can be potentially registered for the same flow.
+ *
+ * @warning
+ * @b EXPERIMENTAL: this API may change without prior notice
+ */
+#include <stdint.h>
+
+#include <rte_common.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * Color
+ */
+enum rte_mtr_color {
+	RTE_MTR_GREEN = 0, /**< Green */
+	RTE_MTR_YELLOW, /**< Yellow */
+	RTE_MTR_RED, /**< Red */
+	RTE_MTR_COLORS /**< Number of colors. */
+};
+
+/**
+ * Statistics counter type
+ */
+enum rte_mtr_stats_type {
+	/** Number of packets passed as green by the policer. */
+	RTE_MTR_STATS_N_PKTS_GREEN = 1 << 0,
+
+	/** Number of bytes passed as green by the policer. */
+	RTE_MTR_STATS_N_BYTES_GREEN = 1 << 1,
+
+	/** Number of packets passed as yellow by the policer. */
+	RTE_MTR_STATS_N_PKTS_YELLOW = 1 << 2,
+
+	/** Number of bytes passed as yellow by the policer. */
+	RTE_MTR_STATS_N_BYTES_YELLOW = 1 << 3,
+
+	/** Number of packets passed as red by the policer. */
+	RTE_MTR_STATS_N_PKTS_RED = 1 << 4,
+
+	/** Number of bytes passed as red by the policer. */
+	RTE_MTR_STATS_N_BYTES_RED = 1 << 5,
+
+	/** Number of packets dropped by the policer. */
+	RTE_MTR_STATS_N_PKTS_DROPPED = 1 << 6,
+
+	/** Number of bytes dropped by the policer. */
+	RTE_MTR_STATS_N_BYTES_DROPPED = 1 << 7,
+};
+
+/**
+ * Statistics counters
+ */
+struct rte_mtr_stats {
+	/** Number of packets passed by the policer (per color). */
+	uint64_t n_pkts[RTE_MTR_COLORS];
+
+	/** Number of bytes passed by the policer (per color). */
+	uint64_t n_bytes[RTE_MTR_COLORS];
+
+	/** Number of packets dropped by the policer. */
+	uint64_t n_pkts_dropped;
+
+	/** Number of bytes passed by the policer. */
+	uint64_t n_bytes_dropped;
+};
+
+/**
+ * Traffic metering algorithms
+ */
+enum rte_mtr_algorithm {
+	/** Single Rate Three Color Marker (srTCM) - IETF RFC 2697. */
+	RTE_MTR_SRTCM_RFC2697,
+
+	/** Two Rate Three Color Marker (trTCM) - IETF RFC 2698. */
+	RTE_MTR_TRTCM_RFC2698,
+
+	/** Two Rate Three Color Marker (trTCM) - IETF RFC 4115. */
+	RTE_MTR_TRTCM_RFC4115,
+};
+
+/**
+ * Meter profile
+ */
+struct rte_mtr_meter_profile {
+	/** Traffic metering algorithm. */
+	enum rte_mtr_algorithm alg;
+
+	RTE_STD_C11
+	union {
+		/** Items only valid when *alg* is set to srTCM - RFC 2697. */
+		struct {
+			/** Committed Information Rate (CIR) (bytes/second). */
+			uint64_t cir;
+
+			/** Committed Burst Size (CBS) (bytes). */
+			uint64_t cbs;
+
+			/** Excess Burst Size (EBS) (bytes). */
+			uint64_t ebs;
+		} srtcm_rfc2697;
+
+		/** Items only valid when *alg* is set to trTCM - RFC 2698. */
+		struct {
+			/** Committed Information Rate (CIR) (bytes/second). */
+			uint64_t cir;
+
+			/** Peak Information Rate (PIR) (bytes/second). */
+			uint64_t pir;
+
+			/** Committed Burst Size (CBS) (byes). */
+			uint64_t cbs;
+
+			/** Peak Burst Size (PBS) (bytes). */
+			uint64_t pbs;
+		} trtcm_rfc2698;
+
+		/** Items only valid when *alg* is set to trTCM - RFC 4115. */
+		struct {
+			/** Committed Information Rate (CIR) (bytes/second). */
+			uint64_t cir;
+
+			/** Excess Information Rate (EIR) (bytes/second). */
+			uint64_t eir;
+
+			/** Committed Burst Size (CBS) (byes). */
+			uint64_t cbs;
+
+			/** Excess Burst Size (EBS) (bytes). */
+			uint64_t ebs;
+		} trtcm_rfc4115;
+	};
+};
+
+/**
+ * Policer actions
+ */
+enum rte_mtr_policer_action {
+	/** Recolor the packet as green. */
+	MTR_POLICER_ACTION_COLOR_GREEN = 0,
+
+	/** Recolor the packet as yellow. */
+	MTR_POLICER_ACTION_COLOR_YELLOW,
+
+	/** Recolor the packet as red. */
+	MTR_POLICER_ACTION_COLOR_RED,
+
+	/** Drop the packet. */
+	MTR_POLICER_ACTION_DROP,
+};
+
+/**
+ * Parameters for each traffic metering & policing object
+ *
+ * @see enum rte_mtr_stats_type
+ */
+struct rte_mtr_params {
+	/** Meter profile ID. */
+	uint32_t meter_profile_id;
+
+	/** Meter input color in case of MTR object chaining. When non-zero: if
+	 * a previous MTR object is enabled in the same flow, then the color
+	 * determined by the latest MTR object in the same flow is used as the
+	 * input color by the current MTR object, otherwise the current MTR
+	 * object uses the *dscp_table* to determine the input color. When zero:
+	 * the color determined by any previous MTR object in same flow is
+	 * ignored by the current MTR object, which uses the *dscp_table* to
+	 * determine the input color.
+	 */
+	int use_prev_mtr_color;
+
+	/** Meter input color. When non-NULL: it points to a pre-allocated and
+	 * pre-populated table with exactly 64 elements providing the input
+	 * color for each value of the IPv4/IPv6 Differentiated Services Code
+	 * Point (DSCP) input packet field. When NULL: it is equivalent to
+	 * setting this parameter to an all-green populated table (i.e. table
+	 * with all the 64 elements set to green color). The color blind mode
+	 * is configured by setting *use_prev_mtr_color* to 0 and *dscp_table*
+	 * to either NULL or to an all-green populated table. When
+	 * *use_prev_mtr_color* is non-zero value or when *dscp_table* contains
+	 * at least one yellow or red color element, then the color aware mode
+	 * is configured.
+	 */
+	enum rte_mtr_color *dscp_table;
+
+	/** Non-zero to enable the meter, zero to disable the meter at the time
+	 * of MTR object creation.
+	 * @see rte_mtr_meter_disable()
+	 */
+	int meter_enable;
+
+	/** Policer actions (per meter output color). */
+	enum rte_mtr_policer_action action[RTE_MTR_COLORS];
+
+	/** Set of stats counters to be enabled.
+	 * @see enum rte_mtr_stats_type
+	 */
+	uint64_t stats_mask;
+};
+
+/**
+ * MTR capabilities
+ */
+struct rte_mtr_capabilities {
+	/** Maximum number of MTR objects. */
+	uint32_t n_max;
+
+	/** Maximum number of MTR objects that can be shared by multiple flows.
+	 * The value of zero indicates that shared MTR objects are not
+	 * supported. The maximum value is *n_max*.
+	 */
+	uint32_t n_shared_max;
+
+	/** When non-zero, this flag indicates that all the MTR objects that
+	 * cannot be shared by multiple flows have identical capability set.
+	 */
+	int identical;
+
+	/** When non-zero, this flag indicates that all the MTR objects that
+	 * can be shared by multiple flows have identical capability set.
+	 */
+	int shared_identical;
+
+	/** Maximum number of flows that can share the same MTR object. The
+	 * value of zero is invalid. The value of 1 means that shared MTR
+	 * objects not supported.
+	 */
+	uint32_t shared_n_flows_per_mtr_max;
+
+	/** Maximum number of MTR objects that can be part of the same flow. The
+	 * value of zero is invalid. The value of 1 indicates that MTR object
+	 * chaining is not supported. The maximum value is *n_max*.
+	 */
+	uint32_t chaining_n_mtrs_per_flow_max;
+
+	/**
+	 * When non-zero, it indicates that the packet color identified by one
+	 * MTR object can be used as the packet input color by any subsequent
+	 * MTR object from the same flow. When zero, it indicates that the color
+	 * determined by one MTR object is always ignored by any subsequent MTR
+	 * object from the same flow. Only valid when MTR chaining is supported,
+	 * i.e. *chaining_n_mtrs_per_flow_max* is greater than 1. When non-zero,
+	 * it also means that the color aware mode is supported by at least one
+	 * metering algorithm.
+	 */
+	int chaining_use_prev_mtr_color_supported;
+
+	/**
+	 * When non-zero, it indicates that the packet color identified by one
+	 * MTR object is always used as the packet input color by any subsequent
+	 * MTR object that is part of the same flow. When zero, it indicates
+	 * that whether the color determined by one MTR object is either ignored
+	 * or used as the packet input color by any subsequent MTR object from
+	 * the same flow is individually configurable for each MTR object. Only
+	 * valid when *chaining_use_prev_mtr_color_supported* is non-zero.
+	 */
+	int chaining_use_prev_mtr_color_enforced;
+
+	/** Maximum number of MTR objects that can have their meter configured
+	 * to run the srTCM RFC 2697 algorithm. The value of 0 indicates this
+	 * metering algorithm is not supported. The maximum value is *n_max*.
+	 */
+	uint32_t meter_srtcm_rfc2697_n_max;
+
+	/** Maximum number of MTR objects that can have their meter configured
+	 * to run the trTCM RFC 2698 algorithm. The value of 0 indicates this
+	 * metering algorithm is not supported. The maximum value is *n_max*.
+	 */
+	uint32_t meter_trtcm_rfc2698_n_max;
+
+	/** Maximum number of MTR objects that can have their meter configured
+	 * to run the trTCM RFC 4115 algorithm. The value of 0 indicates this
+	 * metering algorithm is not supported. The maximum value is *n_max*.
+	 */
+	uint32_t meter_trtcm_rfc4115_n_max;
+
+	/** Maximum traffic rate that can be metered by a single MTR object. For
+	 * srTCM RFC 2697, this is the maximum CIR rate. For trTCM RFC 2698,
+	 * this is the maximum PIR rate. For trTCM RFC 4115, this is the maximum
+	 * value for the sum of PIR and EIR rates.
+	 */
+	uint64_t meter_rate_max;
+
+	/**
+	 * When non-zero, it indicates that color aware mode is supported for
+	 * the srTCM RFC 2697 metering algorithm.
+	 */
+	int color_aware_srtcm_rfc2697_supported;
+
+	/**
+	 * When non-zero, it indicates that color aware mode is supported for
+	 * the trTCM RFC 2698 metering algorithm.
+	 */
+	int color_aware_trtcm_rfc2698_supported;
+
+	/**
+	 * When non-zero, it indicates that color aware mode is supported for
+	 * the trTCM RFC 4115 metering algorithm.
+	 */
+	int color_aware_trtcm_rfc4115_supported;
+
+	/** When non-zero, it indicates that the policer packet recolor actions
+	 * are supported.
+	 * @see enum rte_mtr_policer_action
+	 */
+	int policer_action_recolor_supported;
+
+	/** When non-zero, it indicates that the policer packet drop action is
+	 * supported.
+	 * @see enum rte_mtr_policer_action
+	 */
+	int policer_action_drop_supported;
+
+	/** Set of supported statistics counter types.
+	 * @see enum rte_mtr_stats_type
+	 */
+	uint64_t stats_mask;
+};
+
+/**
+ * Verbose error types.
+ *
+ * Most of them provide the type of the object referenced by struct
+ * rte_mtr_error::cause.
+ */
+enum rte_mtr_error_type {
+	RTE_MTR_ERROR_TYPE_NONE, /**< No error. */
+	RTE_MTR_ERROR_TYPE_UNSPECIFIED, /**< Cause unspecified. */
+	RTE_MTR_ERROR_TYPE_METER_PROFILE_ID,
+	RTE_MTR_ERROR_TYPE_METER_PROFILE,
+	RTE_MTR_ERROR_TYPE_MTR_ID,
+	RTE_MTR_ERROR_TYPE_MTR_PARAMS,
+	RTE_MTR_ERROR_TYPE_POLICER_ACTION_GREEN,
+	RTE_MTR_ERROR_TYPE_POLICER_ACTION_YELLOW,
+	RTE_MTR_ERROR_TYPE_POLICER_ACTION_RED,
+	RTE_MTR_ERROR_TYPE_STATS_MASK,
+	RTE_MTR_ERROR_TYPE_STATS,
+	RTE_MTR_ERROR_TYPE_SHARED,
+};
+
+/**
+ * Verbose error structure definition.
+ *
+ * This object is normally allocated by applications and set by PMDs, the
+ * message points to a constant string which does not need to be freed by
+ * the application, however its pointer can be considered valid only as long
+ * as its associated DPDK port remains configured. Closing the underlying
+ * device or unloading the PMD invalidates it.
+ *
+ * Both cause and message may be NULL regardless of the error type.
+ */
+struct rte_mtr_error {
+	enum rte_mtr_error_type type; /**< Cause field and error type. */
+	const void *cause; /**< Object responsible for the error. */
+	const char *message; /**< Human-readable error message. */
+};
+
+/**
+ * MTR capabilities get
+ *
+ * @param[in] port_id
+ *   The port identifier of the Ethernet device.
+ * @param[out] cap
+ *   MTR capabilities. Needs to be pre-allocated and valid.
+ * @param[out] error
+ *   Error details. Filled in only on error, when not NULL.
+ * @return
+ *   0 on success, non-zero error code otherwise.
+ */
+int
+rte_mtr_capabilities_get(uint8_t port_id,
+	struct rte_mtr_capabilities *cap,
+	struct rte_mtr_error *error);
+
+/**
+ * Meter profile add
+ *
+ * Create a new meter profile with ID set to *meter_profile_id*. The new profile
+ * is used to create one or several MTR objects.
+ *
+ * @param[in] port_id
+ *   The port identifier of the Ethernet device.
+ * @param[in] meter_profile_id
+ *   ID for the new meter profile. Needs to be unused by any of the existing
+ *   meter profiles added for the current port.
+ * @param[in] profile
+ *   Meter profile parameters. Needs to be pre-allocated and valid.
+ * @param[out] error
+ *   Error details. Filled in only on error, when not NULL.
+ * @return
+ *   0 on success, non-zero error code otherwise.
+ */
+int
+rte_mtr_meter_profile_add(uint8_t port_id,
+	uint32_t meter_profile_id,
+	struct rte_mtr_meter_profile *profile,
+	struct rte_mtr_error *error);
+
+/**
+ * Meter profile delete
+ *
+ * Delete an existing meter profile. This operation fails when there is
+ * currently at least one user (i.e. MTR object) of this profile.
+ *
+ * @param[in] port_id
+ *   The port identifier of the Ethernet device.
+ * @param[in] meter_profile_id
+ *   Meter profile ID. Needs to be the valid.
+ * @param[out] error
+ *   Error details. Filled in only on error, when not NULL.
+ * @return
+ *   0 on success, non-zero error code otherwise.
+ */
+int
+rte_mtr_meter_profile_delete(uint8_t port_id,
+	uint32_t meter_profile_id,
+	struct rte_mtr_error *error);
+
+/**
+ * MTR object create
+ *
+ * Create a new MTR object for the current port. This object is run as part of
+ * associated flow action for traffic metering and policing.
+ *
+ * @param[in] port_id
+ *   The port identifier of the Ethernet device.
+ * @param[in] mtr_id
+ *   MTR object ID. Needs to be unused by any of the existing MTR objects.
+ *   created for the current port.
+ * @param[in] params
+ *   MTR object params. Needs to be pre-allocated and valid.
+ * @param[in] shared
+ *   Non-zero when this MTR object can be shared by multiple flows, zero when
+ *   this MTR object can be used by a single flow.
+ * @param[out] error
+ *   Error details. Filled in only on error, when not NULL.
+ * @return
+ *   0 on success, non-zero error code otherwise.
+ *
+ * @see enum rte_flow_action_type::RTE_FLOW_ACTION_TYPE_METER
+ */
+int
+rte_mtr_create(uint8_t port_id,
+	uint32_t mtr_id,
+	struct rte_mtr_params *params,
+	int shared,
+	struct rte_mtr_error *error);
+
+/**
+ * MTR object destroy
+ *
+ * Delete an existing MTR object. This operation fails when there is currently
+ * at least one user (i.e. flow) of this MTR object.
+ *
+ * @param[in] port_id
+ *   The port identifier of the Ethernet device.
+ * @param[in] mtr_id
+ *   MTR object ID. Needs to be valid.
+ *   created for the current port.
+ * @param[out] error
+ *   Error details. Filled in only on error, when not NULL.
+ * @return
+ *   0 on success, non-zero error code otherwise.
+ */
+int
+rte_mtr_destroy(uint8_t port_id,
+	uint32_t mtr_id,
+	struct rte_mtr_error *error);
+
+/**
+ * MTR object meter disable
+ *
+ * Disable the meter of an existing MTR object. In disabled state, the meter of
+ * the current MTR object works in pass-through mode, meaning that for each
+ * input packet the meter output color is always the same as the input color. In
+ * particular, when the meter of the current MTR object is configured in color
+ * blind mode, the input color is always green, so the meter output color is
+ * also always green. Note that the policer and the statistics of the current
+ * MTR object are working as usual while the meter is disabled. No action is
+ * taken and this function returns successfully when the meter of the current
+ * MTR object is already disabled.
+ *
+ * @param[in] port_id
+ *   The port identifier of the Ethernet device.
+ * @param[in] mtr_id
+ *   MTR object ID.
+ * @param[out] error
+ *   Error details. Filled in only on error, when not NULL.
+ * @return
+ *   0 on success, non-zero error code otherwise.
+ */
+int
+rte_mtr_meter_disable(uint8_t port_id,
+	uint32_t mtr_id,
+	struct rte_mtr_error *error);
+
+/**
+ * MTR object meter enable
+ *
+ * Enable the meter of an existing MTR object. If the MTR object has its meter
+ * already enabled, then no action is taken and this function returns
+ * successfully.
+ *
+ * @param[in] port_id
+ *   The port identifier of the Ethernet device.
+ * @param[in] mtr_id
+ *   MTR object ID.
+ * @param[out] error
+ *   Error details. Filled in only on error, when not NULL.
+ * @return
+ *   0 on success, non-zero error code otherwise.
+ */
+int
+rte_mtr_meter_enable(uint8_t port_id,
+	uint32_t mtr_id,
+	struct rte_mtr_error *error);
+
+/**
+ * MTR object meter profile update
+ *
+ * @param[in] port_id
+ *   The port identifier of the Ethernet device.
+ * @param[in] mtr_id
+ *   MTR object ID. Needs to be valid.
+ * @param[in] meter_profile_id
+ *   Meter profile ID for the current MTR object. Needs to be valid.
+ * @param[out] error
+ *   Error details. Filled in only on error, when not NULL.
+ * @return
+ *   0 on success, non-zero error code otherwise.
+ */
+int
+rte_mtr_meter_profile_update(uint8_t port_id,
+	uint32_t mtr_id,
+	uint32_t meter_profile_id,
+	struct rte_mtr_error *error);
+
+/**
+ * MTR object DSCP table update
+ *
+ * @param[in] port_id
+ *   The port identifier of the Ethernet device.
+ * @param[in] mtr_id
+ *   MTR object ID. Needs to be valid.
+ * @param[in] dscp_table
+ *   When non-NULL: it points to a pre-allocated and pre-populated table with
+ *   exactly 64 elements providing the input color for each value of the
+ *   IPv4/IPv6 Differentiated Services Code Point (DSCP) input packet field.
+ *   When NULL: it is equivalent to setting this parameter to an “all-green”
+ *   populated table (i.e. table with all the 64 elements set to green color).
+ * @param[out] error
+ *   Error details. Filled in only on error, when not NULL.
+ * @return
+ *   0 on success, non-zero error code otherwise.
+ */
+int
+rte_mtr_meter_dscp_table_update(uint8_t port_id,
+	uint32_t mtr_id,
+	enum rte_mtr_color *dscp_table,
+	struct rte_mtr_error *error);
+
+/**
+ * MTR object policer actions update
+ *
+ * @param[in] port_id
+ *   The port identifier of the Ethernet device.
+ * @param[in] mtr_id
+ *   MTR object ID. Needs to be valid.
+ * @param[in] action_mask
+ *   Bit mask indicating which policer actions need to be updated. One or more
+ *   policer actions can be updated in a single function invocation. To update
+ *   the policer action associated with color C, bit (1 << C) needs to be set in
+ *   *action_mask* and element at position C in the *actions* array needs to be
+ *   valid.
+ * @param[in] actions
+ *   Pre-allocated and pre-populated array of policer actions.
+ * @param[out] error
+ *   Error details. Filled in only on error, when not NULL.
+ * @return
+ *   0 on success, non-zero error code otherwise.
+ */
+int
+rte_mtr_policer_actions_update(uint8_t port_id,
+	uint32_t mtr_id,
+	uint32_t action_mask,
+	enum rte_mtr_policer_action *actions,
+	struct rte_mtr_error *error);
+
+/**
+ * MTR object enabled statistics counters update
+ *
+ * @param[in] port_id
+ *   The port identifier of the Ethernet device.
+ * @param[in] mtr_id
+ *   MTR object ID. Needs to be valid.
+ * @param[in] stats_mask
+ *   Mask of statistics counter types to be enabled for the current MTR object.
+ *   Any statistics counter type not included in this set is to be disabled for
+ *   the current MTR object.
+ * @param[out] error
+ *   Error details. Filled in only on error, when not NULL.
+ * @return
+ *   0 on success, non-zero error code otherwise.
+ *
+ * @see enum rte_mtr_stats_type
+ */
+int
+rte_mtr_stats_update(uint8_t port_id,
+	uint32_t mtr_id,
+	uint64_t stats_mask,
+	struct rte_mtr_error *error);
+
+/**
+ * MTR object statistics counters read
+ *
+ * @param[in] port_id
+ *   The port identifier of the Ethernet device.
+ * @param[in] mtr_id
+ *   MTR object ID. Needs to be valid.
+ * @param[out] stats
+ *   When non-NULL, it contains the current value for the statistics counters
+ *   enabled for the current MTR object.
+ * @param[out] stats_mask
+ *   When non-NULL, it contains the mask of statistics counter types that are
+ *   currently enabled for this MTR object, indicating which of the counters
+ *   retrieved with the *stats* structure are valid.
+ * @param[in] clear
+ *   When this parameter has a non-zero value, the statistics counters are
+ *   cleared (i.e. set to zero) immediately after they have been read,
+ *   otherwise the statistics counters are left untouched.
+ * @param[out] error
+ *   Error details. Filled in only on error, when not NULL.
+ * @return
+ *   0 on success, non-zero error code otherwise.
+ *
+ * @see enum rte_mtr_stats_type
+ */
+int
+rte_mtr_stats_read(uint8_t port_id,
+	uint32_t mtr_id,
+	struct rte_mtr_stats *stats,
+	uint64_t *stats_mask,
+	int clear,
+	struct rte_mtr_error *error);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __INCLUDE_RTE_MTR_H__ */
diff --git a/lib/librte_ether/rte_mtr_driver.h b/lib/librte_ether/rte_mtr_driver.h
new file mode 100644
index 0000000..bb7deed
--- /dev/null
+++ b/lib/librte_ether/rte_mtr_driver.h
@@ -0,0 +1,221 @@
+/*-
+ *   BSD LICENSE
+ *
+ *   Copyright(c) 2017 Intel Corporation. All rights reserved.
+ *   All rights reserved.
+ *
+ *   Redistribution and use in source and binary forms, with or without
+ *   modification, are permitted provided that the following conditions
+ *   are met:
+ *
+ *     * Redistributions of source code must retain the above copyright
+ *       notice, this list of conditions and the following disclaimer.
+ *     * Redistributions in binary form must reproduce the above copyright
+ *       notice, this list of conditions and the following disclaimer in
+ *       the documentation and/or other materials provided with the
+ *       distribution.
+ *     * Neither the name of Intel Corporation nor the names of its
+ *       contributors may be used to endorse or promote products derived
+ *       from this software without specific prior written permission.
+ *
+ *   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ *   "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ *   LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ *   A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ *   OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ *   LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ *   DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ *   THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ *   (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ *   OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef __INCLUDE_RTE_MTR_DRIVER_H__
+#define __INCLUDE_RTE_MTR_DRIVER_H__
+
+/**
+ * @file
+ * RTE Generic Traffic Metering and Policing API (Driver Side)
+ *
+ * This file provides implementation helpers for internal use by PMDs, they
+ * are not intended to be exposed to applications and are not subject to ABI
+ * versioning.
+ */
+
+#include <stdint.h>
+
+#include <rte_errno.h>
+#include "rte_ethdev.h"
+#include "rte_mtr.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+typedef int (*rte_mtr_capabilities_get_t)(struct rte_eth_dev *dev,
+	struct rte_mtr_capabilities *cap,
+	struct rte_mtr_error *error);
+/**< @internal MTR capabilities get */
+
+typedef int (*rte_mtr_meter_profile_add_t)(struct rte_eth_dev *dev,
+	uint32_t meter_profile_id,
+	struct rte_mtr_meter_profile *profile,
+	struct rte_mtr_error *error);
+/**< @internal MTR meter profile add */
+
+typedef int (*rte_mtr_meter_profile_delete_t)(struct rte_eth_dev *dev,
+	uint32_t meter_profile_id,
+	struct rte_mtr_error *error);
+/**< @internal MTR meter profile delete */
+
+typedef int (*rte_mtr_create_t)(struct rte_eth_dev *dev,
+	uint32_t mtr_id,
+	struct rte_mtr_params *params,
+	int shared,
+	struct rte_mtr_error *error);
+/**< @internal MTR object create */
+
+typedef int (*rte_mtr_destroy_t)(struct rte_eth_dev *dev,
+	uint32_t mtr_id,
+	struct rte_mtr_error *error);
+/**< @internal MTR object destroy */
+
+typedef int (*rte_mtr_meter_enable_t)(struct rte_eth_dev *dev,
+	uint32_t mtr_id,
+	struct rte_mtr_error *error);
+/**< @internal MTR object meter enable */
+
+typedef int (*rte_mtr_meter_disable_t)(struct rte_eth_dev *dev,
+	uint32_t mtr_id,
+	struct rte_mtr_error *error);
+/**< @internal MTR object meter disable */
+
+typedef int (*rte_mtr_meter_profile_update_t)(struct rte_eth_dev *dev,
+	uint32_t mtr_id,
+	uint32_t meter_profile_id,
+	struct rte_mtr_error *error);
+/**< @internal MTR object meter profile update */
+
+typedef int (*rte_mtr_meter_dscp_table_update_t)(struct rte_eth_dev *dev,
+	uint32_t mtr_id,
+	enum rte_mtr_color *dscp_table,
+	struct rte_mtr_error *error);
+/**< @internal MTR object meter DSCP table update */
+
+typedef int (*rte_mtr_policer_actions_update_t)(struct rte_eth_dev *dev,
+	uint32_t mtr_id,
+	uint32_t action_mask,
+	enum rte_mtr_policer_action *actions,
+	struct rte_mtr_error *error);
+/**< @internal MTR object policer action update*/
+
+typedef int (*rte_mtr_stats_update_t)(struct rte_eth_dev *dev,
+	uint32_t mtr_id,
+	uint64_t stats_mask,
+	struct rte_mtr_error *error);
+/**< @internal MTR object enabled stats update */
+
+typedef int (*rte_mtr_stats_read_t)(struct rte_eth_dev *dev,
+	uint32_t mtr_id,
+	struct rte_mtr_stats *stats,
+	uint64_t *stats_mask,
+	int clear,
+	struct rte_mtr_error *error);
+/**< @internal MTR object stats read */
+
+struct rte_mtr_ops {
+	/** MTR capabilities get */
+	rte_mtr_capabilities_get_t capabilities_get;
+
+	/** MTR meter profile add */
+	rte_mtr_meter_profile_add_t meter_profile_add;
+
+	/** MTR meter profile delete */
+	rte_mtr_meter_profile_delete_t meter_profile_delete;
+
+	/** MTR object create */
+	rte_mtr_create_t create;
+
+	/** MTR object destroy */
+	rte_mtr_destroy_t destroy;
+
+	/** MTR object meter enable */
+	rte_mtr_meter_enable_t meter_enable;
+
+	/** MTR object meter disable */
+	rte_mtr_meter_disable_t meter_disable;
+
+	/** MTR object meter profile update */
+	rte_mtr_meter_profile_update_t meter_profile_update;
+
+	/** MTR object meter DSCP table update */
+	rte_mtr_meter_dscp_table_update_t meter_dscp_table_update;
+
+	/** MTR object policer action update */
+	rte_mtr_policer_actions_update_t policer_actions_update;
+
+	/** MTR object enabled stats update */
+	rte_mtr_stats_update_t stats_update;
+
+	/** MTR object stats read */
+	rte_mtr_stats_read_t stats_read;
+};
+
+/**
+ * Initialize generic error structure.
+ *
+ * This function also sets rte_errno to a given value.
+ *
+ * @param[out] error
+ *   Pointer to error structure (may be NULL).
+ * @param[in] code
+ *   Related error code (rte_errno).
+ * @param[in] type
+ *   Cause field and error type.
+ * @param[in] cause
+ *   Object responsible for the error.
+ * @param[in] message
+ *   Human-readable error message.
+ *
+ * @return
+ *   Error code.
+ */
+static inline int
+rte_mtr_error_set(struct rte_mtr_error *error,
+		   int code,
+		   enum rte_mtr_error_type type,
+		   const void *cause,
+		   const char *message)
+{
+	if (error) {
+		*error = (struct rte_mtr_error){
+			.type = type,
+			.cause = cause,
+			.message = message,
+		};
+	}
+	rte_errno = code;
+	return code;
+}
+
+/**
+ * Get generic traffic metering and policing operations structure from a port
+ *
+ * @param[in] port_id
+ *   The port identifier of the Ethernet device.
+ * @param[out] error
+ *   Error details
+ *
+ * @return
+ *   The traffic metering and policing operations structure associated with
+ *   port_id on success, NULL otherwise.
+ */
+const struct rte_mtr_ops *
+rte_mtr_ops_get(uint8_t port_id, struct rte_mtr_error *error);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __INCLUDE_RTE_MTR_DRIVER_H__ */
-- 
2.7.4

^ permalink raw reply	[relevance 1%]

* Re: [dpdk-dev] [PATCH v6 0/5] increase port_id range
  2017-10-06  2:15  0%       ` [dpdk-dev] [PATCH v6 0/5] " Ferruh Yigit
  2017-10-06 13:31  0%         ` Gaëtan Rivet
  2017-10-06 14:29  0%         ` Thomas Monjalon
@ 2017-10-06 16:02  0%         ` Thomas Monjalon
  2017-10-11 21:21  0%         ` Ferruh Yigit
  3 siblings, 0 replies; 200+ results
From: Thomas Monjalon @ 2017-10-06 16:02 UTC (permalink / raw)
  To: Ferruh Yigit, Nelio Laranjeiro
  Cc: dev, Zhiyong Yang, Gaetan Rivet, Declan Doherty

06/10/2017 04:15, Ferruh Yigit:
> On 9/29/2017 8:17 AM, Zhiyong Yang wrote:
> > Zhiyong Yang (5):
> >   net/bonding: remove bonding APIs using ABI versioning
> >   ethdev: increase port_id range
> >   examples: increase port_id range
> >   test: increase port_id range
> >   librte_mbuf: modify port initialization value
> 
> Series applied to dpdk-next-net/master, thanks.
> 
> There was merge conflict for:
> rte_eth_bond_pmd.c
> failsafe_private.h
> mlx5_rxtx.h
> 
> Maintainers of these files cc'ed, can you please double check latest
> files in next-net?

I have re-done the merge of this series in master because
it was wrong for mlx5, as notified by Nelio.

^ permalink raw reply	[relevance 0%]

* [dpdk-dev] ABI/API stability in DPDK
@ 2017-10-06 16:21  9% Mcnamara, John
  2017-10-06 16:27  4% ` Ferruh Yigit
  2017-10-06 17:15  4% ` Thomas Monjalon
  0 siblings, 2 replies; 200+ results
From: Mcnamara, John @ 2017-10-06 16:21 UTC (permalink / raw)
  To: dev; +Cc: Kevin Traynor, Stokes, Ian, Luca Boccassi

Hi,

At the recent DPDK 2017 Userspace in Dublin we had a discussion about API/ABI stability with representation from Intel, OVS-DPDK, Debian, Red Hat and plenty of input from the floor.


The main consensus after looking at different proposals was to maintain the current process (http://dpdk.org/doc/guides/contributing/versioning.html) but to try enforce it more rigidly.





The main points to come out of this discussion were:



1. That 3 Acks are still needed for deprecation and they should come from different companies.



2. ABI checks to be run as part of the CI/testing so that patches that break ABI are flagged early. Note, ABI checks can be run manually as follows: http://dpdk.org/doc/guides/contributing/versioning.html#running-the-abi-validator



3. New API's will be marked as experimental by default for 1 release minimum. This is to address the most common case for breakage which is in new APIs.


If I missed, or misrepresented, anything please update in a reply.

John

^ permalink raw reply	[relevance 9%]

* Re: [dpdk-dev] ABI/API stability in DPDK
  2017-10-06 16:21  9% [dpdk-dev] ABI/API stability in DPDK Mcnamara, John
@ 2017-10-06 16:27  4% ` Ferruh Yigit
  2017-10-06 17:15  4% ` Thomas Monjalon
  1 sibling, 0 replies; 200+ results
From: Ferruh Yigit @ 2017-10-06 16:27 UTC (permalink / raw)
  To: Mcnamara, John, dev; +Cc: Kevin Traynor, Stokes, Ian, Luca Boccassi

On 10/6/2017 5:21 PM, Mcnamara, John wrote:
> Hi,
> 
> At the recent DPDK 2017 Userspace in Dublin we had a discussion about API/ABI stability with representation from Intel, OVS-DPDK, Debian, Red Hat and plenty of input from the floor.
> 
> 
> The main consensus after looking at different proposals was to maintain the current process (http://dpdk.org/doc/guides/contributing/versioning.html) but to try enforce it more rigidly.
> 
> 
> 
> 
> 
> The main points to come out of this discussion were:
> 
> 
> 
> 1. That 3 Acks are still needed for deprecation and they should come from different companies.
> 
> 
> 
> 2. ABI checks to be run as part of the CI/testing so that patches that break ABI are flagged early. Note, ABI checks can be run manually as follows: http://dpdk.org/doc/guides/contributing/versioning.html#running-the-abi-validator
> 
> 
> 
> 3. New API's will be marked as experimental by default for 1 release minimum. This is to address the most common case for breakage which is in new APIs.

Do we have data for this? Is it really new APIs get broken?

> 
> 
> If I missed, or misrepresented, anything please update in a reply.
> 
> John
> 
> 

^ permalink raw reply	[relevance 4%]

* Re: [dpdk-dev] ABI/API stability in DPDK
  2017-10-06 16:21  9% [dpdk-dev] ABI/API stability in DPDK Mcnamara, John
  2017-10-06 16:27  4% ` Ferruh Yigit
@ 2017-10-06 17:15  4% ` Thomas Monjalon
  1 sibling, 0 replies; 200+ results
From: Thomas Monjalon @ 2017-10-06 17:15 UTC (permalink / raw)
  To: Mcnamara, John
  Cc: dev, Kevin Traynor, Stokes, Ian, Luca Boccassi, techboard,
	aconole, ktraynor

06/10/2017 18:21, Mcnamara, John:
> Hi,
> 
> At the recent DPDK 2017 Userspace in Dublin we had a discussion about API/ABI stability with representation from Intel, OVS-DPDK, Debian, Red Hat and plenty of input from the floor.
> 
> The main consensus after looking at different proposals was to maintain the current process (http://dpdk.org/doc/guides/contributing/versioning.html) but to try enforce it more rigidly.
> 
> The main points to come out of this discussion were:
> 
> 1. That 3 Acks are still needed for deprecation and they should come from different companies.
> 
> 2. ABI checks to be run as part of the CI/testing so that patches that break ABI are flagged early. Note, ABI checks can be run manually as follows: http://dpdk.org/doc/guides/contributing/versioning.html#running-the-abi-validator
> 
> 3. New API's will be marked as experimental by default for 1 release minimum. This is to address the most common case for breakage which is in new APIs.

Thanks for the summary, John.

The points 1 and 3 must be approved by the technical board.

^ permalink raw reply	[relevance 4%]

* Re: [dpdk-dev] [RFC] Wireless Base Band Device (bbdev)
  2017-10-05 22:22  0%         ` Thomas Monjalon
@ 2017-10-06 23:27  0%           ` Mokhtar, Amr
  2017-10-07 11:42  0%             ` Thomas Monjalon
  0 siblings, 1 reply; 200+ results
From: Mokhtar, Amr @ 2017-10-06 23:27 UTC (permalink / raw)
  To: Thomas Monjalon; +Cc: dev, fbl, aconole, bluca



> -----Original Message-----
> From: Thomas Monjalon [mailto:thomas@monjalon.net]
> Sent: Thursday 5 October 2017 23:23
> To: Mokhtar, Amr <amr.mokhtar@intel.com>
> Cc: dev@dpdk.org; fbl@redhat.com; aconole@redhat.com; bluca@debian.org
> Subject: Re: [dpdk-dev] [RFC] Wireless Base Band Device (bbdev)
> 
> 05/10/2017 23:55, Mokhtar, Amr:
> > From: Thomas Monjalon [mailto:thomas@monjalon.net]
> > > 03/10/2017 16:29, Mokhtar, Amr:
> > > > From: Thomas Monjalon [mailto:thomas@monjalon.net]
> > > > > 25/08/2017 15:46, Amr Mokhtar:
> > > > > > +int
> > > > > > +rte_bbdev_configure(uint8_t dev_id, uint16_t num_queues,
> > > > > > +		const struct rte_bbdev_conf *conf);
> > > > >
> > > > > I am not convinced by the "configure all" function in ethdev.
> > > > > We break the ABI each time we add a new feature to configure.
> > > > > And it does not really help to have all configurations in one struct.
> > > > > Would you mind to split the struct rte_bbdev_conf and split the
> > > > > function accordingly?
> > > >
> > > > There is nothing to split tbh. The only parameter it has is the socket_id.
> > > > And in fact, it's optional, can be null. The only config we need is
> num_queues.
> > >
> > > Indeed, there is nothing in this struct.
> > > If you need only to allocate queues, you just have to rename this function.
> > >
> > > > I don't see in the near future that we may need to add more config params.
> > > > As a side, in the time of the implementation we were trying to
> > > > avoid any diversions from the current design ideology of ethdev and
> cryptodev.
> > >
> > > There is no ideology in ethdev, just some mistakes ;)
> > >
> > > > Can we leave it for consideration with future releases?
> > >
> > > No it should be addressed from the beginning.
> > >
> > > When you will need to add something more to configure port-wise, you
> > > should add a new function instead of breaking the ABI of the global conf
> struct.
> > > That's why the configure option should be more specialized.
> > >
> > > Distro people were complaining about ABI breakage last week.
> > > This is exactly an example of how to avoid it from the beginning.
> > >
> >
> > Ok, got your point. I was looking at it from an API-only standpoint.
> > How about modifying it into?
> > int
> > rte_bbdev_setup_queues(uint16_t dev_id, uint16_t num_queues, int
> > socket_id);
> 
> Yes OK
> 
> [...]
> > > > > > +struct __rte_cache_aligned rte_bbdev {
> > > > > > +	rte_bbdev_enqueue_ops_t enqueue_ops; /**< Enqueue
> function */
> > > > > > +	rte_bbdev_dequeue_ops_t dequeue_ops;  /**< Dequeue
> function */
> > > > > > +	const struct rte_bbdev_ops *dev_ops;  /**< Functions
> > > > > > +exported by PMD
> > > > > */
> > > > > > +	struct rte_bbdev_data *data;  /**< Pointer to device data */
> > > > > > +	bool attached;  /**< If device is currently attached or not
> > > > > > +*/
> > > > >
> > > > > What "attached" means?
> > > > > I'm afraid you are trying to manage hotplug in the wrong layer.
> > > >
> > > > Hotplug is not supported in the current release.
> > >
> > > It is not answering the question.
> > > What is an "attached" device?
> >
> > "Attached" means that the PCI device was probed and the bbdev device slot is
> allocated.
> > For software devices, means that a virtual bbdev device (vdev) is allocated for
> bbdev.
> > Same way the "attached" approach used in cryptodev.
> 
> Not sure to understand.
> If "attached" means "allocated", when is it false?

Currently in bbdev, it is set to true and never goes false.
As I said the Hotplug feature is not fully supported in the current version. I can remove that flag for now.

But generally, it should be cleared to false when rte_pci_driver->remove function is called. (Hotplug?)

> 
> [...]
> > > > > > +/** Structure specifying a single operation */ struct rte_bbdev_op {
> > > > > > +	enum rte_bbdev_op_type type;  /**< Type of this operation */
> > > > > > +	int status;  /**< Status of operation that was performed */
> > > > > > +	struct rte_mempool *mempool;  /**< Mempool which op
> instance
> > > > > > +is in
> > > > > */
> > > > > > +	void *opaque_data;  /**< Opaque pointer for user data */
> > > > > > +	/**
> > > > > > +	 * Anonymous union of operation-type specific parameters.
> > > > > > +When
> > > > > allocated
> > > > > > +	 * using rte_bbdev_op_pool_create(), space is allocated for the
> > > > > > +	 * parameters at the end of each rte_bbdev_op structure, and
> the
> > > > > > +	 * pointers here point to it.
> > > > > > +	 */
> > > > > > +	RTE_STD_C11
> > > > > > +	union {
> > > > > > +		void *generic;
> > > > > > +		struct rte_bbdev_op_turbo_dec *turbo_dec;
> > > > > > +		struct rte_bbdev_op_turbo_enc *turbo_enc;
> > > > > > +	};
> > > > > > +};
> > > > >
> > > > > I am not sure it is a good idea to fit every operations in the
> > > > > same struct and the same functions.
> > > >
> > > > Due to the fact that our design adopts this idea that a device can
> > > > support both the encode and decode operations.
> > > > Then, at the time of PMD registration, the enqueue functions is allocated.
> > > > This enqueue() function is common for both operations.
> > > > This fitted operation structure is essential for the driver to
> > > > decide on the
> > > operation.
> > >
> > > Sorry I do not understand why you must have a "generic operation".
> > > Please, could you try again to explain this design to someone not
> > > fully understanding how turbo enc/dec works?
> >
> > Oh, sorry, I was not paying attention that you're referring to "void *generic"
> > It is just a place-holder for any other operation types. Can be removed if you
> like.
> 
> No I was not referring to void *generic.
> It is the same question as in the RFC.
> I don't understand the benefit of grouping different things in an union.

There is no benefit, this is a restriction because there is only one function pointer
for enq and another one for deq in the ops structure. Again for the same reason
of trying to keep things in sync with ethdev and cryptodev.
I've always wanted to make it as you proposed, that way it is more performant
(no checking for the type of operation.) If this is agreed, I will do it with all my pleasure :)

The optimum solution though IMHO would be to make the generic enq/deq function pointers
per queue, instead of being per device; that way every enqueue goes straight to
the queue-specific function that matches its operation type.
Notice that currently we have turbo_enc/turbo_dec, but in the future we may have more..

^ permalink raw reply	[relevance 0%]

* Re: [dpdk-dev] [RFC] Wireless Base Band Device (bbdev)
  2017-10-06 23:27  0%           ` Mokhtar, Amr
@ 2017-10-07 11:42  0%             ` Thomas Monjalon
  0 siblings, 0 replies; 200+ results
From: Thomas Monjalon @ 2017-10-07 11:42 UTC (permalink / raw)
  To: Mokhtar, Amr; +Cc: dev, fbl, aconole, bluca

07/10/2017 01:27, Mokhtar, Amr:
> 
> > -----Original Message-----
> > From: Thomas Monjalon [mailto:thomas@monjalon.net]
> > Sent: Thursday 5 October 2017 23:23
> > To: Mokhtar, Amr <amr.mokhtar@intel.com>
> > Cc: dev@dpdk.org; fbl@redhat.com; aconole@redhat.com; bluca@debian.org
> > Subject: Re: [dpdk-dev] [RFC] Wireless Base Band Device (bbdev)
> > 
> > 05/10/2017 23:55, Mokhtar, Amr:
> > > From: Thomas Monjalon [mailto:thomas@monjalon.net]
> > > > 03/10/2017 16:29, Mokhtar, Amr:
> > > > > From: Thomas Monjalon [mailto:thomas@monjalon.net]
> > > > > > 25/08/2017 15:46, Amr Mokhtar:
> > > > > > > +int
> > > > > > > +rte_bbdev_configure(uint8_t dev_id, uint16_t num_queues,
> > > > > > > +		const struct rte_bbdev_conf *conf);
> > > > > >
> > > > > > I am not convinced by the "configure all" function in ethdev.
> > > > > > We break the ABI each time we add a new feature to configure.
> > > > > > And it does not really help to have all configurations in one struct.
> > > > > > Would you mind to split the struct rte_bbdev_conf and split the
> > > > > > function accordingly?
> > > > >
> > > > > There is nothing to split tbh. The only parameter it has is the socket_id.
> > > > > And in fact, it's optional, can be null. The only config we need is
> > num_queues.
> > > >
> > > > Indeed, there is nothing in this struct.
> > > > If you need only to allocate queues, you just have to rename this function.
> > > >
> > > > > I don't see in the near future that we may need to add more config params.
> > > > > As a side, in the time of the implementation we were trying to
> > > > > avoid any diversions from the current design ideology of ethdev and
> > cryptodev.
> > > >
> > > > There is no ideology in ethdev, just some mistakes ;)
> > > >
> > > > > Can we leave it for consideration with future releases?
> > > >
> > > > No it should be addressed from the beginning.
> > > >
> > > > When you will need to add something more to configure port-wise, you
> > > > should add a new function instead of breaking the ABI of the global conf
> > struct.
> > > > That's why the configure option should be more specialized.
> > > >
> > > > Distro people were complaining about ABI breakage last week.
> > > > This is exactly an example of how to avoid it from the beginning.
> > > >
> > >
> > > Ok, got your point. I was looking at it from an API-only standpoint.
> > > How about modifying it into?
> > > int
> > > rte_bbdev_setup_queues(uint16_t dev_id, uint16_t num_queues, int
> > > socket_id);
> > 
> > Yes OK
> > 
> > [...]
> > > > > > > +struct __rte_cache_aligned rte_bbdev {
> > > > > > > +	rte_bbdev_enqueue_ops_t enqueue_ops; /**< Enqueue
> > function */
> > > > > > > +	rte_bbdev_dequeue_ops_t dequeue_ops;  /**< Dequeue
> > function */
> > > > > > > +	const struct rte_bbdev_ops *dev_ops;  /**< Functions
> > > > > > > +exported by PMD
> > > > > > */
> > > > > > > +	struct rte_bbdev_data *data;  /**< Pointer to device data */
> > > > > > > +	bool attached;  /**< If device is currently attached or not
> > > > > > > +*/
> > > > > >
> > > > > > What "attached" means?
> > > > > > I'm afraid you are trying to manage hotplug in the wrong layer.
> > > > >
> > > > > Hotplug is not supported in the current release.
> > > >
> > > > It is not answering the question.
> > > > What is an "attached" device?
> > >
> > > "Attached" means that the PCI device was probed and the bbdev device slot is
> > allocated.
> > > For software devices, means that a virtual bbdev device (vdev) is allocated for
> > bbdev.
> > > Same way the "attached" approach used in cryptodev.
> > 
> > Not sure to understand.
> > If "attached" means "allocated", when is it false?
> 
> Currently in bbdev, it is set to true and never goes false.
> As I said the Hotplug feature is not fully supported in the current version. I can remove that flag for now.
> 
> But generally, it should be cleared to false when rte_pci_driver->remove function is called. (Hotplug?)

Hotplug is still a work in progress in DPDK.
Please remove this flag if it is useless.
We will add something if needed when hotplug support will be better designed.

> > [...]
> > > > > > > +/** Structure specifying a single operation */ struct rte_bbdev_op {
> > > > > > > +	enum rte_bbdev_op_type type;  /**< Type of this operation */
> > > > > > > +	int status;  /**< Status of operation that was performed */
> > > > > > > +	struct rte_mempool *mempool;  /**< Mempool which op
> > instance
> > > > > > > +is in
> > > > > > */
> > > > > > > +	void *opaque_data;  /**< Opaque pointer for user data */
> > > > > > > +	/**
> > > > > > > +	 * Anonymous union of operation-type specific parameters.
> > > > > > > +When
> > > > > > allocated
> > > > > > > +	 * using rte_bbdev_op_pool_create(), space is allocated for the
> > > > > > > +	 * parameters at the end of each rte_bbdev_op structure, and
> > the
> > > > > > > +	 * pointers here point to it.
> > > > > > > +	 */
> > > > > > > +	RTE_STD_C11
> > > > > > > +	union {
> > > > > > > +		void *generic;
> > > > > > > +		struct rte_bbdev_op_turbo_dec *turbo_dec;
> > > > > > > +		struct rte_bbdev_op_turbo_enc *turbo_enc;
> > > > > > > +	};
> > > > > > > +};
> > > > > >
> > > > > > I am not sure it is a good idea to fit every operations in the
> > > > > > same struct and the same functions.
> > > > >
> > > > > Due to the fact that our design adopts this idea that a device can
> > > > > support both the encode and decode operations.
> > > > > Then, at the time of PMD registration, the enqueue functions is allocated.
> > > > > This enqueue() function is common for both operations.
> > > > > This fitted operation structure is essential for the driver to
> > > > > decide on the
> > > > operation.
> > > >
> > > > Sorry I do not understand why you must have a "generic operation".
> > > > Please, could you try again to explain this design to someone not
> > > > fully understanding how turbo enc/dec works?
> > >
> > > Oh, sorry, I was not paying attention that you're referring to "void *generic"
> > > It is just a place-holder for any other operation types. Can be removed if you
> > like.
> > 
> > No I was not referring to void *generic.
> > It is the same question as in the RFC.
> > I don't understand the benefit of grouping different things in an union.
> 
> There is no benefit, this is a restriction because there is only one function pointer
> for enq and another one for deq in the ops structure. Again for the same reason
> of trying to keep things in sync with ethdev and cryptodev.
> I've always wanted to make it as you proposed, that way it is more performant
> (no checking for the type of operation.) If this is agreed, I will do it with all my pleasure :)
> 
> The optimum solution though IMHO would be to make the generic enq/deq function pointers
> per queue, instead of being per device; that way every enqueue goes straight to
> the queue-specific function that matches its operation type.
> Notice that currently we have turbo_enc/turbo_dec, but in the future we may have more..

Please do not impose some restrictions to your API just because you want
to mimic ethdev.
Feel free to innovate :)

^ permalink raw reply	[relevance 0%]

* Re: [dpdk-dev] [PATCH v2 03/12] cryptodev: avoid dependency on rte_vdev.h
  2017-10-05 13:13  0%     ` Jan Blunck
@ 2017-10-09  1:04  0%       ` Tan, Jianfeng
  0 siblings, 0 replies; 200+ results
From: Tan, Jianfeng @ 2017-10-09  1:04 UTC (permalink / raw)
  To: Jan Blunck
  Cc: dev, Richardson, Bruce, Ananyev, Konstantin, De Lara Guarch,
	Pablo, Thomas Monjalon, yliu, Maxime Coquelin, Tetsuya Mukawa,
	Yigit, Ferruh

Hi Jan,

> -----Original Message-----
> From: jblunck@gmail.com [mailto:jblunck@gmail.com] On Behalf Of Jan
> Blunck
> Sent: Thursday, October 5, 2017 9:14 PM
> To: Tan, Jianfeng
> Cc: dev; Richardson, Bruce; Ananyev, Konstantin; De Lara Guarch, Pablo;
> Thomas Monjalon; yliu@fridaylinux.org; Maxime Coquelin; Tetsuya Mukawa;
> Yigit, Ferruh
> Subject: Re: [dpdk-dev] [PATCH v2 03/12] cryptodev: avoid dependency on
> rte_vdev.h
> 
> On Thu, Sep 28, 2017 at 3:55 PM, Jianfeng Tan <jianfeng.tan@intel.com>
> wrote:
> > The helper API, rte_cryptodev_vdev_pmd_init(), has a parameter of
> > struct rte_vdev_device *, which needs to include rte_vdev.h.
> >
> > We will move vdev into drivers/bus, so we need to avoid such
> > dependency. And also, we cannot break the ABI.
> >
> > This patch changes that pointer to void *, and defines an internal
> > structure same with struct rte_vdev_device.
> >
> 
> This code duplication is unnecessary. Also you are doing evil thinks
> and define a type with the same name in multiple places. Look at my
> series how to do this properly.
> 

Moving related things into header file is also my plan. Thank for doing that, I'll rebase on your patchset.

Thanks,
Jianfeng

^ permalink raw reply	[relevance 0%]

* [dpdk-dev] [PATCH 2/2] doc: update stats get API change
  @ 2017-10-09 16:12  4% ` Matan Azrad
  2017-10-10 20:20  1% ` [dpdk-dev] [PATCH v2] ethdev: add return value to stats get dev op Matan Azrad
  1 sibling, 0 replies; 200+ results
From: Matan Azrad @ 2017-10-09 16:12 UTC (permalink / raw)
  To: dev; +Cc: Ferruh Yigit

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset=y, Size: 1410 bytes --]

Updated change info in release_17.11.

Signed-off-by: Matan Azrad <matan@mellanox.com>
---
 doc/guides/rel_notes/release_17_11.rst | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/doc/guides/rel_notes/release_17_11.rst b/doc/guides/rel_notes/release_17_11.rst
index 36139e5..b62083d 100644
--- a/doc/guides/rel_notes/release_17_11.rst
+++ b/doc/guides/rel_notes/release_17_11.rst
@@ -75,7 +75,7 @@ New Features
   The Membership Library is an extension and generalization of a traditional
   filter (for example Bloom Filter) structure that has multiple usages in a wide
   variety of workloads and applications. In general, the Membership Library is a
-  data structure that provides a “set-summary” and responds to set-membership
+  data structure that provides a ���set-summary��� and responds to set-membership
   queries whether a certain member belongs to a set(s).
 
   See the :ref:`Membership Library <Member_Library>` documentation in
@@ -199,6 +199,12 @@ API Changes
 * ``rte_mem_phy2mch`` was used in Xen dom0 to obtain the physical address;
   remove this API as Xen dom0 support was removed.
 
+* **Add return value to stats_get dev op API**
+
+  The stats_get dev op API return value has been changed to be int.
+  By this way PMDs can return an error value in case of failure at stats
+  getting process time.
+
 
 ABI Changes
 -----------
-- 
1.8.3.1

^ permalink raw reply	[relevance 4%]

* Re: [dpdk-dev] [PATCH v8 0/9] Policy Based Power Control for Guest
  2017-10-05 14:34  2%         ` [dpdk-dev] [PATCH v8 " David Hunt
@ 2017-10-09 22:34  0%           ` Ferruh Yigit
  0 siblings, 0 replies; 200+ results
From: Ferruh Yigit @ 2017-10-09 22:34 UTC (permalink / raw)
  To: David Hunt, dev; +Cc: konstantin.ananyev, jingjing.wu, santosh.shukla

On 10/5/2017 3:34 PM, David Hunt wrote:
> Policy Based Power Control for Guest
> 
> This patchset adds the facility for a guest VM to send a policy down to the
> host that will allow the host to scale up/down cpu frequencies
> depending on the policy criteria independently of the DPDK app running in
> the guest.  This differs from the previous vm_power implementation where
> individual scale up/down requests were send from the guest to the host via
> virtio-serial.
> 
> V8 patchset changes:
>   * Added Ack's and Reviewed-by's to individual patches in the set so as to
>     keep patchwork A/R/T flags properly in sync.
> 
> V7 patchset changes:
>   * Changed return code of rte_pmd_i40e_query_vfid_by_mac() from an
>     int64_t to int
> 
> V6 patchset changes:
>   * Fixed comments in header for rte_pmd_i40e_query_vfid_by_mac.
>   * changed rte_pmd_i40e_query_vfid_by_mac return code from uint to int
>     as it can return negative error codes.
>   * Removed bool enum from channel_commands.h, including stdbool.h instead.
>   * Added #define VM_MAX_NAME_SZ 32 to channel_commands.h
>   * Renamed a few variables to be more readable.
>   * Added returns in a few places if failed to get info on domain.
>   * Fixed power_manager_init to keep track of num_freqs for each core.
>   * In power_manager_scale_core_med(), changed a hardcoded '5' to instead
>     be calculated from the centre of the frequency list
>     (global_core_freq_info[core_num].num_freqs / 2)
> 
> V5 patchset changes:
>   * Removed most of the #ifdef I40_PMD as it will be applicable to
>     other PMDs in the future.
>   * Changed the parameter of rte_pmd_i40e_query_vfid_by_mac from a uint64
>     to a const struct ether_addr *, rather than casting it later in the
>     function.
> 
> V4 patchset changes:
>   * None, re-post to mailing list under the correct email thread.
> 
> V3 patchset changes:
>   * Changed to using is_same_ether_addr() instead of looping through
>     the mac address bytes to compare them.
>   * Tweaked some comments and working in the i40e patch after review.
>   * Added a patch to the set to add new i40e function to map file, so
>     as to allow shared library builds. The power library API needs a cleanup
>     in next release, so will add API/ABI warning for this cleanup in a
>     separate patch.
> 
> V2 patchset changes:
>   * Removed API's in ethdev layer.
>   * Now just a single new API in the i40e driver for mapping VF MAC to
>     VF index.
>   * Moved new function from rte_rxtx.c to rte_pmd_i40e.c
>   * Removed function for reading i40e register, moved to using the
>     standard stats API.
>   * Renamed i40e function to rte_pmd_i40e_query_vfid_by_mac
>   * Cleaned up policy generation code.
> 
> It's a modification of the vm_power_manager app that runs in the host, and
> the guest_vm_power_app example app that runs in the guest. This allows the
> guest to send down a policy to the host via virtio-serial, which then allows
> the host to scale up/down based on the criteria in the policy, resulting in
> quicker scale up/down than individual requests coming from the guest.
> It also means that the DPDK application running in the guest does not need
> to be modified in any way, it is unaware that it's cores are being scaled
> up/down, reducing the effort in implementing a power-aware infrastructure.
> 
> The usage model is as follows:
> 1. Set up the VF's and assign to the guest in the usual way.
> 2. run vm_power_manager on the host, creating a channel to the guest.
> 3. Start the guest_vm_power_mgr app on the guest, which establishes
>    a virtio-serial channel to the host.
> 4. Send down the profile for the guest using the "send_profile now" command.
>    There is an example profile hard-coded into guest_vm_power_mgr.
> 5. Stop the guest_vm_power_mgr and run your normal power-unaware application.
> 6. Send traffic into the VFs at varying traffic rates.
>    Observe the frequency change on the host (turbostat -i 1)
> 
> The sequence of code changes are as follows:
> 
> A new function has been aded to the i40e driver to allow mapping of
> a VF MAC to VF index.
> 
> Next we make an addition to librte_power that adds an extra command to allow
> the passing of a policy structure from the guest to the host. This struct
> contains information like busy/quiet hour, packet throughput thresholds, etc.
> 
> The next addition adds functionality to convert the virtual CPU (vcpU0 IDs to
> physical CPU (pcpu) IDs so that the host can scale up/down the cores used
> in the guest.
> 
> The remaining patches are functionality to process the policy, and take action
> when the relevant trigger occurs to cause a frequency change.

Hi Dave,

Can you please rebase the set on top of latest main repo?
There are two set of changes:

1- There are more i40e updates in main repo, conflicts with this one.
2- Port id increased to 16 bits, there are some code still using uint8_t
in this patch

Thanks,
ferruh

^ permalink raw reply	[relevance 0%]

* Re: [dpdk-dev] [PATCH v3] rte_vhost: added user callbacks for socket open/close
  @ 2017-10-10  3:14  0%   ` Yuanhan Liu
  0 siblings, 0 replies; 200+ results
From: Yuanhan Liu @ 2017-10-10  3:14 UTC (permalink / raw)
  To: Dariusz Stojaczyk; +Cc: dev, Pawel Wodkowski, jfreimann, maxime.coquelin

On Wed, Aug 30, 2017 at 12:50:58PM +0200, Dariusz Stojaczyk wrote:
> Added new callbacks to notify about socket connection status.
> As destroy_device is used for virtqueue processing *pause* as well as
> connection close, the user has no distinction between those.
> 
> Consider the following scenario:
> rte_vhost: received SET_VRING_BASE message,
>            calling destroy_device() as usual
> 
> user:  end-user asks to remove the device (together with socket file),
>        OK, device is not *in use* - that's NOT the behavior we want
>        calling rte_vhost_driver_unregister() etc.
> 
> Instead of changing new_device/destroy_device callbacks and breaking
> the ABI, a set of new functions new_connection/destroy_connection
> has been added.
> 
> Signed-off-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
> ---
> v3: improved err-handling path and updated commit msg
> v2: also updated vhost_lib.rst

The doc update is missing. I have cherry-picked it from v2.

Applied to dpdk-next-virtio.

Thanks.

	--yliu

^ permalink raw reply	[relevance 0%]

* Re: [dpdk-dev] [PATCH] drivers: update DPAA2 libs ABIVER and build reproducibility
  @ 2017-10-10 15:48  5% ` Thomas Monjalon
  0 siblings, 0 replies; 200+ results
From: Thomas Monjalon @ 2017-10-10 15:48 UTC (permalink / raw)
  To: Hemant Agrawal; +Cc: dev, ferruh.yigit

10/10/2017 16:15, Hemant Agrawal:
> Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
> ---
>  drivers/bus/fslmc/Makefile        | 3 ++-
>  drivers/crypto/dpaa2_sec/Makefile | 3 ++-
>  drivers/event/dpaa2/Makefile      | 3 ++-
>  drivers/mempool/dpaa2/Makefile    | 3 ++-
>  drivers/net/dpaa2/Makefile        | 3 ++-
>  5 files changed, 10 insertions(+), 5 deletions(-)

Why are you changing LIBABIVER in all these libs?
Generally speaking, a driver should not upgrade its ABI version,
because it should have no interface.

The ABI version must be changed in the patch breaking the ABI.
If you do it later, it must be a fix with Fixes line.
This way we will have the reference to the code breaking the ABI.

^ permalink raw reply	[relevance 5%]

* Re: [dpdk-dev] [PATCH] eal: bus scan and probe never fail
  @ 2017-10-10 16:00  3%               ` Aaron Conole
  2017-10-11 22:34  0%                 ` Thomas Monjalon
  2017-10-12  5:39  0%                 ` Shreyansh Jain
  0 siblings, 2 replies; 200+ results
From: Aaron Conole @ 2017-10-10 16:00 UTC (permalink / raw)
  To: Shreyansh Jain
  Cc: Don Provan, Jan Blunck, Thomas Monjalon, dev, Hemant Agrawal

Shreyansh Jain <shreyansh.jain@nxp.com> writes:

> Hello Don,
>
> On Monday 09 October 2017 11:51 PM, Don Provan wrote:
>>> -----Original Message-----
>>> From: Shreyansh Jain [mailto:shreyansh.jain@nxp.com]
>>> Sent: Monday, October 09, 2017 4:10 AM
>>> To: Jan Blunck <jblunck@infradead.org>; Thomas Monjalon
>>> <thomas@monjalon.net>
>>> Cc: dev <dev@dpdk.org>; Hemant Agrawal <hemant.agrawal@nxp.com>
>>> Subject: Re: [dpdk-dev] [PATCH] eal: bus scan and probe never fail
>>>
>>> ...
>>> This is where I have disagreement/doubt.
>>> Reporting error code from rte_bus_scan would do two things:
>>>
>>> 1. rte_eal_init is not designed to ignore/log-only these errors - it
>>> would quit initialization. (But, this can be changed)
>>> 2. What should rte_eal_init do with this error? rte_bus_scan would have
>>> already printed the problematic bus->scan() failure.
>>
>> These practical problems confirm to me that the failure of a bus
>> scan is more of a strategic issue: when asking "which devices can
>> I use?", "none" is a perfectly valid answer that does not seem
>> like an error to me even when a failed bus scan is the reason for
>> that answer.
>
> I agree with this.
>
>>
>>  From the application's point of view, the potential error here
>> is that the device it wants to use isn't available. I don't see that
>> either the init function or the probe function will have enough
>> information to understand that application-level problem, so
>> they should leave it to the application to detect it.
>
> I think I understand you comment but just want to cross check again:
> Scan or probe error should simply be ignored by EAL layer and let the
> application take stance when it detects that the device it was looking
> for is missing. Is my understanding correct?
>
> I am trying to come a conclusion so that this patch can either be
> modified or pushed as it is. If the above understanding is correct, I
> don't see any changes required in the patch.

Does it make sense to introduce a way to query the results of the
various bus types for their status?  That way we can give the relevant
information to the application if it wants, and make the bus scanning
code *always* succeed?  This version shouldn't be an ABI breakage,
either (confirm?).

half-baked below (not tested or suitable - just an example):

---
diff --git a/lib/librte_eal/common/eal_common_bus.c b/lib/librte_eal/common/eal_common_bus.c
index a30a898..cd1ef1e 100644
--- a/lib/librte_eal/common/eal_common_bus.c
+++ b/lib/librte_eal/common/eal_common_bus.c
@@ -38,9 +38,23 @@
 
 #include "eal_private.h"
 
+struct rte_bus_failure {
+	struct rte_bus *bus;
+	int err;
+};
+
 struct rte_bus_list rte_bus_list =
 	TAILQ_HEAD_INITIALIZER(rte_bus_list);
 
+TAILQ_HEAD(rte_bus_scan_failure_list, rte_bus_failure);
+struct rte_bus_scan_failure_list rte_bus_scan_failure_list =
+	TAILQ_HEAD_INITIALIZER(rte_bus_failure);
+
+TAILQ_HEAD(rte_bus_probe_failure_list, rte_bus_failure);
+struct rte_bus_probe_failure_list rte_bus_probe_failure_list =
+	TAILQ_HEAD_INITIALIZER(rte_bus_failure);
+
+
 void
 rte_bus_register(struct rte_bus *bus)
 {
@@ -64,6 +78,26 @@ rte_bus_unregister(struct rte_bus *bus)
 	RTE_LOG(DEBUG, EAL, "Unregistered [%s] bus.\n", bus->name);
 }
 
+static void
+rte_bus_append_failed_scan(struct rte_bus *bus, int ret)
+{
+	struct rte_bus_failure *f = malloc(sizeof(struct rte_bus_failure));
+	if (!f) abort();
+	f->bus = bus;
+	f->ret = ret;
+	TAILQ_INSERT_TAIL(&rte_bus_scan_failure_list, f, next);
+}
+
+static void
+rte_bus_append_failed_scan(struct rte_bus *bus, int ret)
+{
+	struct rte_bus_failure *f = malloc(sizeof(struct rte_bus_failure));
+	if (!f) abort();
+	f->bus = bus;
+	f->ret = ret;
+	TAILQ_INSERT_TAIL(&rte_bus_probe_failure_list, f, next);
+}
+
 /* Scan all the buses for registered devices */
 int
 rte_bus_scan(void)
@@ -76,13 +110,33 @@ rte_bus_scan(void)
 		if (ret) {
 			RTE_LOG(ERR, EAL, "Scan for (%s) bus failed.\n",
 				bus->name);
-			return ret;
+			rte_bus_append_failed_scan(bus, ret);
 		}
 	}
 
 	return 0;
 }
 
+/* Seek through scan failures */
+void
+rte_bus_scan_errors(rte_bus_error_callback cb)
+{
+	struct rte_bus_failure *f = NULL;
+	TAILQ_FOREACH(f, &rte_bus_scan_failure_list, next) {
+		cb(f->bus, f->ret);
+	}
+}
+
+/* Seek through probe failures */
+void
+rte_bus_probe_errors(rte_bus_error_callback cb)
+{
+	struct rte_bus_failure *f = NULL;
+	TAILQ_FOREACH(f, &rte_bus_probe_failure_list, next) {
+		cb(f->bus, f->ret);
+	}
+}
+
 /* Probe all devices of all buses */
 int
 rte_bus_probe(void)
@@ -100,7 +154,7 @@ rte_bus_probe(void)
 		if (ret) {
 			RTE_LOG(ERR, EAL, "Bus (%s) probe failed.\n",
 				bus->name);
-			return ret;
+            rte_bus_append_failed_probe(bus, ret);
 		}
 	}
 
@@ -109,7 +163,7 @@ rte_bus_probe(void)
 		if (ret) {
 			RTE_LOG(ERR, EAL, "Bus (%s) probe failed.\n",
 				vbus->name);
-			return ret;
+            rte_bus_append_failed_probe(bus, ret);
 		}
 	}
 
diff --git a/lib/librte_eal/common/include/rte_bus.h b/lib/librte_eal/common/include/rte_bus.h
index 6fb0834..daddb28 100644
--- a/lib/librte_eal/common/include/rte_bus.h
+++ b/lib/librte_eal/common/include/rte_bus.h
@@ -231,6 +231,20 @@ void rte_bus_register(struct rte_bus *bus);
  */
 void rte_bus_unregister(struct rte_bus *bus);
 
+typedef void (*rte_bus_error_callback)(struct rte_bus *bus, int err);
+
+/**
+ * Search through all buses, invoking cb for each bus which reports scan
+ * error.
+ */
+void rte_bus_scan_errors(rte_bus_error_callback cb);
+
+/**
+ * Search through all buses, invoking cb for each bus which reports scan
+ * error.
+ */
+void rte_bus_probe_errors(rte_bus_error_callback cb);
+
 /**
  * Scan all the buses.
  *
-- 

^ permalink raw reply	[relevance 3%]

* [dpdk-dev] [PATCH v2] ethdev: add return value to stats get dev op
    2017-10-09 16:12  4% ` [dpdk-dev] [PATCH 2/2] doc: update stats get API change Matan Azrad
@ 2017-10-10 20:20  1% ` Matan Azrad
  1 sibling, 0 replies; 200+ results
From: Matan Azrad @ 2017-10-10 20:20 UTC (permalink / raw)
  To: dev; +Cc: Ferruh Yigit

The stats_get dev op API doesn't include return value, so PMD cannot
return an error in case of failure at stats getting process time.

Since PCI devices can be removed and there is a time between the
physical removal to the RMV interrupt, the user may get invalid stats
without any indication.

This patch changes the stats_get API return value to be int instead of
void.

All the net PMDs stats_get dev ops are adjusted by this patch.

Signed-off-by: Matan Azrad <matan@mellanox.com>
---

V2:
Rebased patch with next_net master.
Adjusted dpaa, octeontx and mrvl PMDs.
Merged release notes patch.

 doc/guides/rel_notes/release_17_11.rst    |  6 ++++++
 drivers/net/af_packet/rte_eth_af_packet.c |  3 ++-
 drivers/net/ark/ark_ethdev.c              |  9 +++++----
 drivers/net/ark/ark_ext.h                 |  2 +-
 drivers/net/ark/ark_global.h              |  2 +-
 drivers/net/avp/avp_ethdev.c              |  6 ++++--
 drivers/net/bnx2x/bnx2x_ethdev.c          |  4 +++-
 drivers/net/bnxt/bnxt_stats.c             | 16 ++++++++++++----
 drivers/net/bnxt/bnxt_stats.h             |  2 +-
 drivers/net/bonding/rte_eth_bond_pmd.c    |  4 +++-
 drivers/net/cxgbe/cxgbe_ethdev.c          |  3 ++-
 drivers/net/dpaa/dpaa_ethdev.c            |  3 ++-
 drivers/net/dpaa2/dpaa2_ethdev.c          | 10 +++++-----
 drivers/net/e1000/em_ethdev.c             |  7 ++++---
 drivers/net/e1000/igb_ethdev.c            | 14 ++++++++------
 drivers/net/ena/ena_ethdev.c              |  9 +++++----
 drivers/net/enic/enic.h                   |  2 +-
 drivers/net/enic/enic_ethdev.c            |  4 ++--
 drivers/net/enic/enic_main.c              |  8 +++++---
 drivers/net/failsafe/failsafe_ops.c       | 11 +++++++++--
 drivers/net/fm10k/fm10k_ethdev.c          |  3 ++-
 drivers/net/i40e/i40e_ethdev.c            |  5 +++--
 drivers/net/i40e/i40e_ethdev_vf.c         |  5 +++--
 drivers/net/ixgbe/ixgbe_ethdev.c          | 14 ++++++++------
 drivers/net/kni/rte_eth_kni.c             |  4 +++-
 drivers/net/liquidio/lio_ethdev.c         |  4 +++-
 drivers/net/mlx4/mlx4.h                   |  2 +-
 drivers/net/mlx4/mlx4_ethdev.c            |  3 ++-
 drivers/net/mlx5/mlx5.h                   |  2 +-
 drivers/net/mlx5/mlx5_stats.c             |  3 ++-
 drivers/net/mrvl/mrvl_ethdev.c            |  9 +++++++--
 drivers/net/nfp/nfp_net.c                 |  9 ++++++---
 drivers/net/null/rte_eth_null.c           |  6 ++++--
 drivers/net/octeontx/octeontx_ethdev.c    | 12 ++++++++----
 drivers/net/pcap/rte_eth_pcap.c           |  4 +++-
 drivers/net/qede/qede_ethdev.c            |  4 +++-
 drivers/net/ring/rte_eth_ring.c           |  4 +++-
 drivers/net/sfc/sfc_ethdev.c              |  7 +++++--
 drivers/net/szedata2/rte_eth_szedata2.c   |  4 +++-
 drivers/net/tap/rte_eth_tap.c             |  3 ++-
 drivers/net/thunderx/nicvf_ethdev.c       |  4 +++-
 drivers/net/vhost/rte_eth_vhost.c         |  4 +++-
 drivers/net/virtio/virtio_ethdev.c        |  6 ++++--
 drivers/net/vmxnet3/vmxnet3_ethdev.c      |  6 ++++--
 lib/librte_ether/rte_ethdev.c             |  3 +--
 lib/librte_ether/rte_ethdev.h             |  2 +-
 46 files changed, 169 insertions(+), 88 deletions(-)

diff --git a/doc/guides/rel_notes/release_17_11.rst b/doc/guides/rel_notes/release_17_11.rst
index c184f1e..0513b95 100644
--- a/doc/guides/rel_notes/release_17_11.rst
+++ b/doc/guides/rel_notes/release_17_11.rst
@@ -216,6 +216,12 @@ API Changes
 * ``rte_mem_phy2mch`` was used in Xen dom0 to obtain the physical address;
   remove this API as Xen dom0 support was removed.
 
+* **Add return value to stats_get dev op API**
+
+  The ``stats_get`` dev op API return value has been changed to be int.
+  By this way PMDs can return an error value in case of failure at stats
+  getting process time.
+
 
 ABI Changes
 -----------
diff --git a/drivers/net/af_packet/rte_eth_af_packet.c b/drivers/net/af_packet/rte_eth_af_packet.c
index 295b7a7..46b8250 100644
--- a/drivers/net/af_packet/rte_eth_af_packet.c
+++ b/drivers/net/af_packet/rte_eth_af_packet.c
@@ -331,7 +331,7 @@ struct pmd_internals {
 	dev_info->min_rx_bufsize = 0;
 }
 
-static void
+static int
 eth_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *igb_stats)
 {
 	unsigned i, imax;
@@ -364,6 +364,7 @@ struct pmd_internals {
 	igb_stats->opackets = tx_total;
 	igb_stats->oerrors = tx_err_total;
 	igb_stats->obytes = tx_bytes_total;
+	return 0;
 }
 
 static void
diff --git a/drivers/net/ark/ark_ethdev.c b/drivers/net/ark/ark_ethdev.c
index 0d60846..dae1f3d 100644
--- a/drivers/net/ark/ark_ethdev.c
+++ b/drivers/net/ark/ark_ethdev.c
@@ -65,7 +65,7 @@ static int eth_ark_dev_link_update(struct rte_eth_dev *dev,
 				   int wait_to_complete);
 static int eth_ark_dev_set_link_up(struct rte_eth_dev *dev);
 static int eth_ark_dev_set_link_down(struct rte_eth_dev *dev);
-static void eth_ark_dev_stats_get(struct rte_eth_dev *dev,
+static int eth_ark_dev_stats_get(struct rte_eth_dev *dev,
 				  struct rte_eth_stats *stats);
 static void eth_ark_dev_stats_reset(struct rte_eth_dev *dev);
 static void eth_ark_set_default_mac_addr(struct rte_eth_dev *dev,
@@ -241,7 +241,7 @@ static void eth_ark_macaddr_remove(struct rte_eth_dev *dev,
 		(int (*)(struct rte_eth_dev *, void *))
 		dlsym(ark->d_handle, "dev_set_link_down");
 	ark->user_ext.stats_get =
-		(void (*)(struct rte_eth_dev *, struct rte_eth_stats *,
+		(int (*)(struct rte_eth_dev *, struct rte_eth_stats *,
 			  void *))
 		dlsym(ark->d_handle, "stats_get");
 	ark->user_ext.stats_reset =
@@ -816,7 +816,7 @@ static void eth_ark_macaddr_remove(struct rte_eth_dev *dev,
 	return 0;
 }
 
-static void
+static int
 eth_ark_dev_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats)
 {
 	uint16_t i;
@@ -835,8 +835,9 @@ static void eth_ark_macaddr_remove(struct rte_eth_dev *dev,
 	for (i = 0; i < dev->data->nb_rx_queues; i++)
 		eth_rx_queue_stats_get(dev->data->rx_queues[i], stats);
 	if (ark->user_ext.stats_get)
-		ark->user_ext.stats_get(dev, stats,
+		return ark->user_ext.stats_get(dev, stats,
 			ark->user_data[dev->data->port_id]);
+	return 0;
 }
 
 static void
diff --git a/drivers/net/ark/ark_ext.h b/drivers/net/ark/ark_ext.h
index 63b7a26..d26c819 100644
--- a/drivers/net/ark/ark_ext.h
+++ b/drivers/net/ark/ark_ext.h
@@ -91,7 +91,7 @@ int dev_set_link_up(struct rte_eth_dev *dev,
 int dev_set_link_down(struct rte_eth_dev *dev,
 		      void *user_data);
 
-void stats_get(struct rte_eth_dev *dev,
+int stats_get(struct rte_eth_dev *dev,
 	       struct rte_eth_stats *stats,
 	       void *user_data);
 
diff --git a/drivers/net/ark/ark_global.h b/drivers/net/ark/ark_global.h
index 2a6375f..aef2cf7 100644
--- a/drivers/net/ark/ark_global.h
+++ b/drivers/net/ark/ark_global.h
@@ -97,7 +97,7 @@ struct ark_user_ext {
 	int (*link_update)(struct rte_eth_dev *, int wait_to_complete, void *);
 	int (*dev_set_link_up)(struct rte_eth_dev *, void *);
 	int (*dev_set_link_down)(struct rte_eth_dev *, void *);
-	void (*stats_get)(struct rte_eth_dev *, struct rte_eth_stats *, void *);
+	int (*stats_get)(struct rte_eth_dev *, struct rte_eth_stats *, void *);
 	void (*stats_reset)(struct rte_eth_dev *, void *);
 	void (*mac_addr_add)(struct rte_eth_dev *,
 						  struct ether_addr *,
diff --git a/drivers/net/avp/avp_ethdev.c b/drivers/net/avp/avp_ethdev.c
index b5cc955..b97a90c 100644
--- a/drivers/net/avp/avp_ethdev.c
+++ b/drivers/net/avp/avp_ethdev.c
@@ -107,7 +107,7 @@ static uint16_t avp_xmit_pkts(void *tx_queue,
 static void avp_dev_rx_queue_release(void *rxq);
 static void avp_dev_tx_queue_release(void *txq);
 
-static void avp_dev_stats_get(struct rte_eth_dev *dev,
+static int avp_dev_stats_get(struct rte_eth_dev *dev,
 			      struct rte_eth_stats *stats);
 static void avp_dev_stats_reset(struct rte_eth_dev *dev);
 
@@ -2241,7 +2241,7 @@ struct avp_queue {
 	}
 }
 
-static void
+static int
 avp_dev_stats_get(struct rte_eth_dev *eth_dev, struct rte_eth_stats *stats)
 {
 	struct avp_dev *avp = AVP_DEV_PRIVATE_TO_HW(eth_dev->data->dev_private);
@@ -2274,6 +2274,8 @@ struct avp_queue {
 			stats->q_errors[i] += txq->errors;
 		}
 	}
+
+	return 0;
 }
 
 static void
diff --git a/drivers/net/bnx2x/bnx2x_ethdev.c b/drivers/net/bnx2x/bnx2x_ethdev.c
index 6f62a37..95861a0 100644
--- a/drivers/net/bnx2x/bnx2x_ethdev.c
+++ b/drivers/net/bnx2x/bnx2x_ethdev.c
@@ -329,7 +329,7 @@ struct rte_bnx2x_xstats_name_off {
 	return old_link_status == dev->data->dev_link.link_status ? -1 : 0;
 }
 
-static void
+static int
 bnx2x_dev_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats)
 {
 	struct bnx2x_softc *sc = dev->data->dev_private;
@@ -389,6 +389,8 @@ struct rte_bnx2x_xstats_name_off {
 
 	stats->imissed = brb_drops + brb_truncates +
 			 brb_truncate_discard + stats->rx_nombuf;
+
+	return 0;
 }
 
 static int
diff --git a/drivers/net/bnxt/bnxt_stats.c b/drivers/net/bnxt/bnxt_stats.c
index 87feac6..fe83d37 100644
--- a/drivers/net/bnxt/bnxt_stats.c
+++ b/drivers/net/bnxt/bnxt_stats.c
@@ -228,9 +228,10 @@ void bnxt_free_stats(struct bnxt *bp)
 	}
 }
 
-void bnxt_stats_get_op(struct rte_eth_dev *eth_dev,
+int bnxt_stats_get_op(struct rte_eth_dev *eth_dev,
 			   struct rte_eth_stats *bnxt_stats)
 {
+	int rc = 0;
 	unsigned int i;
 	struct bnxt *bp = eth_dev->data->dev_private;
 
@@ -240,19 +241,26 @@ void bnxt_stats_get_op(struct rte_eth_dev *eth_dev,
 		struct bnxt_rx_queue *rxq = bp->rx_queues[i];
 		struct bnxt_cp_ring_info *cpr = rxq->cp_ring;
 
-		bnxt_hwrm_ctx_qstats(bp, cpr->hw_stats_ctx_id, i,
+		rc = bnxt_hwrm_ctx_qstats(bp, cpr->hw_stats_ctx_id, i,
 				     bnxt_stats, 1);
+		if (unlikely(rc))
+			return rc;
 	}
 
 	for (i = 0; i < bp->tx_cp_nr_rings; i++) {
 		struct bnxt_tx_queue *txq = bp->tx_queues[i];
 		struct bnxt_cp_ring_info *cpr = txq->cp_ring;
 
-		bnxt_hwrm_ctx_qstats(bp, cpr->hw_stats_ctx_id, i,
+		rc = bnxt_hwrm_ctx_qstats(bp, cpr->hw_stats_ctx_id, i,
 				     bnxt_stats, 0);
+		if (unlikely(rc))
+			return rc;
 	}
-	bnxt_hwrm_func_qstats(bp, 0xffff, bnxt_stats);
+	rc = bnxt_hwrm_func_qstats(bp, 0xffff, bnxt_stats);
+	if (unlikely(rc))
+		return rc;
 	bnxt_stats->rx_nombuf = rte_atomic64_read(&bp->rx_mbuf_alloc_fail);
+	return rc;
 }
 
 void bnxt_stats_reset_op(struct rte_eth_dev *eth_dev)
diff --git a/drivers/net/bnxt/bnxt_stats.h b/drivers/net/bnxt/bnxt_stats.h
index daeb3d9..51d16f5 100644
--- a/drivers/net/bnxt/bnxt_stats.h
+++ b/drivers/net/bnxt/bnxt_stats.h
@@ -37,7 +37,7 @@
 #include <rte_ethdev.h>
 
 void bnxt_free_stats(struct bnxt *bp);
-void bnxt_stats_get_op(struct rte_eth_dev *eth_dev,
+int bnxt_stats_get_op(struct rte_eth_dev *eth_dev,
 			   struct rte_eth_stats *bnxt_stats);
 void bnxt_stats_reset_op(struct rte_eth_dev *eth_dev);
 int bnxt_dev_xstats_get_names_op(__rte_unused struct rte_eth_dev *eth_dev,
diff --git a/drivers/net/bonding/rte_eth_bond_pmd.c b/drivers/net/bonding/rte_eth_bond_pmd.c
index 4bc5329..eb40348 100644
--- a/drivers/net/bonding/rte_eth_bond_pmd.c
+++ b/drivers/net/bonding/rte_eth_bond_pmd.c
@@ -2370,7 +2370,7 @@ struct bwg_slave {
 }
 
 
-static void
+static int
 bond_ethdev_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats)
 {
 	struct bond_dev_private *internals = dev->data->dev_private;
@@ -2398,6 +2398,8 @@ struct bwg_slave {
 		}
 
 	}
+
+	return 0;
 }
 
 static void
diff --git a/drivers/net/cxgbe/cxgbe_ethdev.c b/drivers/net/cxgbe/cxgbe_ethdev.c
index 7bca456..02b4f62 100644
--- a/drivers/net/cxgbe/cxgbe_ethdev.c
+++ b/drivers/net/cxgbe/cxgbe_ethdev.c
@@ -647,7 +647,7 @@ static void cxgbe_dev_rx_queue_release(void *q)
 /*
  * Get port statistics.
  */
-static void cxgbe_dev_stats_get(struct rte_eth_dev *eth_dev,
+static int cxgbe_dev_stats_get(struct rte_eth_dev *eth_dev,
 				struct rte_eth_stats *eth_stats)
 {
 	struct port_info *pi = (struct port_info *)(eth_dev->data->dev_private);
@@ -690,6 +690,7 @@ static void cxgbe_dev_stats_get(struct rte_eth_dev *eth_dev,
 		eth_stats->q_obytes[i] = txq->stats.tx_bytes;
 		eth_stats->q_errors[i] = txq->stats.mapping_err;
 	}
+	return 0;
 }
 
 /*
diff --git a/drivers/net/dpaa/dpaa_ethdev.c b/drivers/net/dpaa/dpaa_ethdev.c
index 9f33e44..551da20 100644
--- a/drivers/net/dpaa/dpaa_ethdev.c
+++ b/drivers/net/dpaa/dpaa_ethdev.c
@@ -283,7 +283,7 @@ static int dpaa_eth_link_update(struct rte_eth_dev *dev,
 	return 0;
 }
 
-static void dpaa_eth_stats_get(struct rte_eth_dev *dev,
+static int dpaa_eth_stats_get(struct rte_eth_dev *dev,
 			       struct rte_eth_stats *stats)
 {
 	struct dpaa_if *dpaa_intf = dev->data->dev_private;
@@ -291,6 +291,7 @@ static void dpaa_eth_stats_get(struct rte_eth_dev *dev,
 	PMD_INIT_FUNC_TRACE();
 
 	fman_if_stats_get(dpaa_intf->fif, stats);
+	return 0;
 }
 
 static void dpaa_eth_stats_reset(struct rte_eth_dev *dev)
diff --git a/drivers/net/dpaa2/dpaa2_ethdev.c b/drivers/net/dpaa2/dpaa2_ethdev.c
index 39c32b3..1ac607c 100644
--- a/drivers/net/dpaa2/dpaa2_ethdev.c
+++ b/drivers/net/dpaa2/dpaa2_ethdev.c
@@ -1061,7 +1061,7 @@ static int dpaa2_dev_link_update(struct rte_eth_dev *dev,
 			"error: Setting the MAC ADDR failed %d\n", ret);
 }
 static
-void dpaa2_dev_stats_get(struct rte_eth_dev *dev,
+int dpaa2_dev_stats_get(struct rte_eth_dev *dev,
 			 struct rte_eth_stats *stats)
 {
 	struct dpaa2_dev_priv *priv = dev->data->dev_private;
@@ -1076,12 +1076,12 @@ void dpaa2_dev_stats_get(struct rte_eth_dev *dev,
 
 	if (!dpni) {
 		RTE_LOG(ERR, PMD, "dpni is NULL\n");
-		return;
+		return -EINVAL;
 	}
 
 	if (!stats) {
 		RTE_LOG(ERR, PMD, "stats is NULL\n");
-		return;
+		return -EINVAL;
 	}
 
 	/*Get Counters from page_0*/
@@ -1116,11 +1116,11 @@ void dpaa2_dev_stats_get(struct rte_eth_dev *dev,
 	stats->oerrors = value.page_2.egress_discarded_frames;
 	stats->imissed = value.page_2.ingress_nobuffer_discards;
 
-	return;
+	return 0;
 
 err:
 	RTE_LOG(ERR, PMD, "Operation not completed:Error Code = %d\n", retcode);
-	return;
+	return retcode;
 };
 
 static int
diff --git a/drivers/net/e1000/em_ethdev.c b/drivers/net/e1000/em_ethdev.c
index a59947d..e724205 100644
--- a/drivers/net/e1000/em_ethdev.c
+++ b/drivers/net/e1000/em_ethdev.c
@@ -72,7 +72,7 @@
 static void eth_em_allmulticast_disable(struct rte_eth_dev *dev);
 static int eth_em_link_update(struct rte_eth_dev *dev,
 				int wait_to_complete);
-static void eth_em_stats_get(struct rte_eth_dev *dev,
+static int eth_em_stats_get(struct rte_eth_dev *dev,
 				struct rte_eth_stats *rte_stats);
 static void eth_em_stats_reset(struct rte_eth_dev *dev);
 static void eth_em_infos_get(struct rte_eth_dev *dev,
@@ -906,7 +906,7 @@ static int eth_em_pci_remove(struct rte_pci_device *pci_dev)
 }
 
 /* This function is based on em_update_stats_counters() in e1000/if_em.c */
-static void
+static int
 eth_em_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *rte_stats)
 {
 	struct e1000_hw *hw = E1000_DEV_PRIVATE_TO_HW(dev->data->dev_private);
@@ -1006,7 +1006,7 @@ static int eth_em_pci_remove(struct rte_pci_device *pci_dev)
 	}
 
 	if (rte_stats == NULL)
-		return;
+		return -EINVAL;
 
 	/* Rx Errors */
 	rte_stats->imissed = stats->mpc;
@@ -1021,6 +1021,7 @@ static int eth_em_pci_remove(struct rte_pci_device *pci_dev)
 	rte_stats->opackets = stats->gptc;
 	rte_stats->ibytes   = stats->gorc;
 	rte_stats->obytes   = stats->gotc;
+	return 0;
 }
 
 static void
diff --git a/drivers/net/e1000/igb_ethdev.c b/drivers/net/e1000/igb_ethdev.c
index 040dd9f..f3b1d70 100644
--- a/drivers/net/e1000/igb_ethdev.c
+++ b/drivers/net/e1000/igb_ethdev.c
@@ -112,7 +112,7 @@
 static void eth_igb_allmulticast_disable(struct rte_eth_dev *dev);
 static int  eth_igb_link_update(struct rte_eth_dev *dev,
 				int wait_to_complete);
-static void eth_igb_stats_get(struct rte_eth_dev *dev,
+static int eth_igb_stats_get(struct rte_eth_dev *dev,
 				struct rte_eth_stats *rte_stats);
 static int eth_igb_xstats_get(struct rte_eth_dev *dev,
 			      struct rte_eth_xstat *xstats, unsigned n);
@@ -188,7 +188,7 @@ static void eth_igb_default_mac_addr_set(struct rte_eth_dev *dev,
 static void igbvf_allmulticast_enable(struct rte_eth_dev *dev);
 static void igbvf_allmulticast_disable(struct rte_eth_dev *dev);
 static int eth_igbvf_link_update(struct e1000_hw *hw);
-static void eth_igbvf_stats_get(struct rte_eth_dev *dev,
+static int eth_igbvf_stats_get(struct rte_eth_dev *dev,
 				struct rte_eth_stats *rte_stats);
 static int eth_igbvf_xstats_get(struct rte_eth_dev *dev,
 				struct rte_eth_xstat *xstats, unsigned n);
@@ -1830,7 +1830,7 @@ static int eth_igbvf_pci_remove(struct rte_pci_device *pci_dev)
 	stats->tsctfc += E1000_READ_REG(hw, E1000_TSCTFC);
 }
 
-static void
+static int
 eth_igb_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *rte_stats)
 {
 	struct e1000_hw *hw = E1000_DEV_PRIVATE_TO_HW(dev->data->dev_private);
@@ -1840,7 +1840,7 @@ static int eth_igbvf_pci_remove(struct rte_pci_device *pci_dev)
 	igb_read_stats_registers(hw, stats);
 
 	if (rte_stats == NULL)
-		return;
+		return -EINVAL;
 
 	/* Rx Errors */
 	rte_stats->imissed = stats->mpc;
@@ -1855,6 +1855,7 @@ static int eth_igbvf_pci_remove(struct rte_pci_device *pci_dev)
 	rte_stats->opackets = stats->gptc;
 	rte_stats->ibytes   = stats->gorc;
 	rte_stats->obytes   = stats->gotc;
+	return 0;
 }
 
 static void
@@ -2095,7 +2096,7 @@ static int eth_igbvf_xstats_get_names(__rte_unused struct rte_eth_dev *dev,
 	return IGBVF_NB_XSTATS;
 }
 
-static void
+static int
 eth_igbvf_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *rte_stats)
 {
 	struct e1000_hw *hw = E1000_DEV_PRIVATE_TO_HW(dev->data->dev_private);
@@ -2105,12 +2106,13 @@ static int eth_igbvf_xstats_get_names(__rte_unused struct rte_eth_dev *dev,
 	igbvf_read_stats_registers(hw, hw_stats);
 
 	if (rte_stats == NULL)
-		return;
+		return -EINVAL;
 
 	rte_stats->ipackets = hw_stats->gprc;
 	rte_stats->ibytes = hw_stats->gorc;
 	rte_stats->opackets = hw_stats->gptc;
 	rte_stats->obytes = hw_stats->gotc;
+	return 0;
 }
 
 static void
diff --git a/drivers/net/ena/ena_ethdev.c b/drivers/net/ena/ena_ethdev.c
index 80ce1f3..a62c398 100644
--- a/drivers/net/ena/ena_ethdev.c
+++ b/drivers/net/ena/ena_ethdev.c
@@ -205,7 +205,7 @@ static uint16_t eth_ena_recv_pkts(void *rx_queue,
 static int ena_mtu_set(struct rte_eth_dev *dev, uint16_t mtu);
 static int ena_start(struct rte_eth_dev *dev);
 static void ena_close(struct rte_eth_dev *dev);
-static void ena_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats);
+static int ena_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats);
 static void ena_rx_queue_release_all(struct rte_eth_dev *dev);
 static void ena_tx_queue_release_all(struct rte_eth_dev *dev);
 static void ena_rx_queue_release(void *queue);
@@ -811,7 +811,7 @@ static void ena_stats_restart(struct rte_eth_dev *dev)
 	rte_atomic64_init(&adapter->drv_stats->rx_nombuf);
 }
 
-static void ena_stats_get(struct rte_eth_dev *dev,
+static int ena_stats_get(struct rte_eth_dev *dev,
 			  struct rte_eth_stats *stats)
 {
 	struct ena_admin_basic_stats ena_stats;
@@ -821,13 +821,13 @@ static void ena_stats_get(struct rte_eth_dev *dev,
 	int rc;
 
 	if (rte_eal_process_type() != RTE_PROC_PRIMARY)
-		return;
+		return -ENOTSUP;
 
 	memset(&ena_stats, 0, sizeof(ena_stats));
 	rc = ena_com_get_dev_basic_stats(ena_dev, &ena_stats);
 	if (unlikely(rc)) {
 		RTE_LOG(ERR, PMD, "Could not retrieve statistics from ENA");
-		return;
+		return rc;
 	}
 
 	/* Set of basic statistics from ENA */
@@ -846,6 +846,7 @@ static void ena_stats_get(struct rte_eth_dev *dev,
 	stats->ierrors = rte_atomic64_read(&adapter->drv_stats->ierrors);
 	stats->oerrors = rte_atomic64_read(&adapter->drv_stats->oerrors);
 	stats->rx_nombuf = rte_atomic64_read(&adapter->drv_stats->rx_nombuf);
+	return 0;
 }
 
 static int ena_mtu_set(struct rte_eth_dev *dev, uint16_t mtu)
diff --git a/drivers/net/enic/enic.h b/drivers/net/enic/enic.h
index e28f223..da0c176 100644
--- a/drivers/net/enic/enic.h
+++ b/drivers/net/enic/enic.h
@@ -287,7 +287,7 @@ extern int enic_alloc_rq(struct enic *enic, uint16_t queue_idx,
 extern int enic_disable(struct enic *enic);
 extern void enic_remove(struct enic *enic);
 extern int enic_get_link_status(struct enic *enic);
-extern void enic_dev_stats_get(struct enic *enic,
+extern int enic_dev_stats_get(struct enic *enic,
 	struct rte_eth_stats *r_stats);
 extern void enic_dev_stats_clear(struct enic *enic);
 extern void enic_add_packet_filter(struct enic *enic);
diff --git a/drivers/net/enic/enic_ethdev.c b/drivers/net/enic/enic_ethdev.c
index 33a3f87..5386b2a 100644
--- a/drivers/net/enic/enic_ethdev.c
+++ b/drivers/net/enic/enic_ethdev.c
@@ -468,13 +468,13 @@ static int enicpmd_dev_link_update(struct rte_eth_dev *eth_dev,
 	return enic_link_update(enic);
 }
 
-static void enicpmd_dev_stats_get(struct rte_eth_dev *eth_dev,
+static int enicpmd_dev_stats_get(struct rte_eth_dev *eth_dev,
 	struct rte_eth_stats *stats)
 {
 	struct enic *enic = pmd_priv(eth_dev);
 
 	ENICPMD_FUNC_TRACE();
-	enic_dev_stats_get(enic, stats);
+	return enic_dev_stats_get(enic, stats);
 }
 
 static void enicpmd_dev_stats_reset(struct rte_eth_dev *eth_dev)
diff --git a/drivers/net/enic/enic_main.c b/drivers/net/enic/enic_main.c
index 9b0439b..48cfb82 100644
--- a/drivers/net/enic/enic_main.c
+++ b/drivers/net/enic/enic_main.c
@@ -156,16 +156,17 @@ void enic_dev_stats_clear(struct enic *enic)
 	enic_clear_soft_stats(enic);
 }
 
-void enic_dev_stats_get(struct enic *enic, struct rte_eth_stats *r_stats)
+int enic_dev_stats_get(struct enic *enic, struct rte_eth_stats *r_stats)
 {
 	struct vnic_stats *stats;
 	struct enic_soft_stats *soft_stats = &enic->soft_stats;
 	int64_t rx_truncated;
 	uint64_t rx_packet_errors;
+	int ret = vnic_dev_stats_dump(enic->vdev, &stats);
 
-	if (vnic_dev_stats_dump(enic->vdev, &stats)) {
+	if (ret) {
 		dev_err(enic, "Error in getting stats\n");
-		return;
+		return ret;
 	}
 
 	/* The number of truncated packets can only be calculated by
@@ -191,6 +192,7 @@ void enic_dev_stats_get(struct enic *enic, struct rte_eth_stats *r_stats)
 	r_stats->imissed = stats->rx.rx_no_bufs + rx_truncated;
 
 	r_stats->rx_nombuf = rte_atomic64_read(&soft_stats->rx_nombuf);
+	return 0;
 }
 
 void enic_del_mac_address(struct enic *enic, int mac_index)
diff --git a/drivers/net/failsafe/failsafe_ops.c b/drivers/net/failsafe/failsafe_ops.c
index e0f1b0b..d360965 100644
--- a/drivers/net/failsafe/failsafe_ops.c
+++ b/drivers/net/failsafe/failsafe_ops.c
@@ -582,18 +582,25 @@
 	return -1;
 }
 
-static void
+static int
 fs_stats_get(struct rte_eth_dev *dev,
 	     struct rte_eth_stats *stats)
 {
 	struct sub_device *sdev;
 	uint8_t i;
+	int ret;
 
 	rte_memcpy(stats, &PRIV(dev)->stats_accumulator, sizeof(*stats));
 	FOREACH_SUBDEV_STATE(sdev, i, dev, DEV_ACTIVE) {
-		rte_eth_stats_get(PORT_ID(sdev), &sdev->stats_snapshot);
+		ret = rte_eth_stats_get(PORT_ID(sdev), &sdev->stats_snapshot);
+		if (ret) {
+			ERROR("Operation rte_eth_stats_get failed for sub_device %d with error %d",
+				  i, ret);
+			return ret;
+		}
 		failsafe_stats_increment(stats, &sdev->stats_snapshot);
 	}
+	return 0;
 }
 
 static void
diff --git a/drivers/net/fm10k/fm10k_ethdev.c b/drivers/net/fm10k/fm10k_ethdev.c
index 15ea2a5..2d351c1 100644
--- a/drivers/net/fm10k/fm10k_ethdev.c
+++ b/drivers/net/fm10k/fm10k_ethdev.c
@@ -1346,7 +1346,7 @@ static int fm10k_xstats_get_names(__rte_unused struct rte_eth_dev *dev,
 	return FM10K_NB_XSTATS;
 }
 
-static void
+static int
 fm10k_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats)
 {
 	uint64_t ipackets, opackets, ibytes, obytes;
@@ -1376,6 +1376,7 @@ static int fm10k_xstats_get_names(__rte_unused struct rte_eth_dev *dev,
 	stats->opackets = opackets;
 	stats->ibytes = ibytes;
 	stats->obytes = obytes;
+	return 0;
 }
 
 static void
diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c
index 536365d..f7dfb97 100644
--- a/drivers/net/i40e/i40e_ethdev.c
+++ b/drivers/net/i40e/i40e_ethdev.c
@@ -258,7 +258,7 @@
 static void i40e_dev_allmulticast_disable(struct rte_eth_dev *dev);
 static int i40e_dev_set_link_up(struct rte_eth_dev *dev);
 static int i40e_dev_set_link_down(struct rte_eth_dev *dev);
-static void i40e_dev_stats_get(struct rte_eth_dev *dev,
+static int i40e_dev_stats_get(struct rte_eth_dev *dev,
 			       struct rte_eth_stats *stats);
 static int i40e_dev_xstats_get(struct rte_eth_dev *dev,
 			       struct rte_eth_xstat *xstats, unsigned n);
@@ -2728,7 +2728,7 @@ static inline void i40e_GLQF_reg_init(struct i40e_hw *hw)
 }
 
 /* Get all statistics of a port */
-static void
+static int
 i40e_dev_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats)
 {
 	struct i40e_pf *pf = I40E_DEV_PRIVATE_TO_PF(dev->data->dev_private);
@@ -2828,6 +2828,7 @@ static inline void i40e_GLQF_reg_init(struct i40e_hw *hw)
 		    ns->checksum_error);
 	PMD_DRV_LOG(DEBUG, "fdir_match:               %"PRIu64"", ns->fd_sb_match);
 	PMD_DRV_LOG(DEBUG, "***************** PF stats end ********************");
+	return 0;
 }
 
 /* Reset the statistics */
diff --git a/drivers/net/i40e/i40e_ethdev_vf.c b/drivers/net/i40e/i40e_ethdev_vf.c
index 111ac39..a52321a 100644
--- a/drivers/net/i40e/i40e_ethdev_vf.c
+++ b/drivers/net/i40e/i40e_ethdev_vf.c
@@ -108,7 +108,7 @@ static void i40evf_dev_info_get(struct rte_eth_dev *dev,
 				struct rte_eth_dev_info *dev_info);
 static int i40evf_dev_link_update(struct rte_eth_dev *dev,
 				  int wait_to_complete);
-static void i40evf_dev_stats_get(struct rte_eth_dev *dev,
+static int i40evf_dev_stats_get(struct rte_eth_dev *dev,
 				struct rte_eth_stats *stats);
 static int i40evf_dev_xstats_get(struct rte_eth_dev *dev,
 				 struct rte_eth_xstat *xstats, unsigned n);
@@ -2230,7 +2230,7 @@ static int eth_i40evf_pci_remove(struct rte_pci_device *pci_dev)
 	};
 }
 
-static void
+static int
 i40evf_dev_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats)
 {
 	int ret;
@@ -2253,6 +2253,7 @@ static int eth_i40evf_pci_remove(struct rte_pci_device *pci_dev)
 	} else {
 		PMD_DRV_LOG(ERR, "Get statistics failed");
 	}
+	return ret;
 }
 
 static void
diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c
index a7d7acc..d22d7ac 100644
--- a/drivers/net/ixgbe/ixgbe_ethdev.c
+++ b/drivers/net/ixgbe/ixgbe_ethdev.c
@@ -176,7 +176,7 @@
 static void ixgbe_dev_allmulticast_disable(struct rte_eth_dev *dev);
 static int ixgbe_dev_link_update(struct rte_eth_dev *dev,
 				int wait_to_complete);
-static void ixgbe_dev_stats_get(struct rte_eth_dev *dev,
+static int ixgbe_dev_stats_get(struct rte_eth_dev *dev,
 				struct rte_eth_stats *stats);
 static int ixgbe_dev_xstats_get(struct rte_eth_dev *dev,
 				struct rte_eth_xstat *xstats, unsigned n);
@@ -269,7 +269,7 @@ static int ixgbevf_dev_link_update(struct rte_eth_dev *dev,
 static int  ixgbevf_dev_reset(struct rte_eth_dev *dev);
 static void ixgbevf_intr_disable(struct ixgbe_hw *hw);
 static void ixgbevf_intr_enable(struct ixgbe_hw *hw);
-static void ixgbevf_dev_stats_get(struct rte_eth_dev *dev,
+static int ixgbevf_dev_stats_get(struct rte_eth_dev *dev,
 		struct rte_eth_stats *stats);
 static void ixgbevf_dev_stats_reset(struct rte_eth_dev *dev);
 static int ixgbevf_vlan_filter_set(struct rte_eth_dev *dev,
@@ -3104,7 +3104,7 @@ static int eth_ixgbevf_pci_remove(struct rte_pci_device *pci_dev)
 /*
  * This function is based on ixgbe_update_stats_counters() in ixgbe/ixgbe.c
  */
-static void
+static int
 ixgbe_dev_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats)
 {
 	struct ixgbe_hw *hw =
@@ -3126,7 +3126,7 @@ static int eth_ixgbevf_pci_remove(struct rte_pci_device *pci_dev)
 			&total_qbrc, &total_qprc, &total_qprdc);
 
 	if (stats == NULL)
-		return;
+		return -EINVAL;
 
 	/* Fill out the rte_eth_stats statistics structure */
 	stats->ipackets = total_qprc;
@@ -3157,6 +3157,7 @@ static int eth_ixgbevf_pci_remove(struct rte_pci_device *pci_dev)
 
 	/* Tx Errors */
 	stats->oerrors  = 0;
+	return 0;
 }
 
 static void
@@ -3568,7 +3569,7 @@ static int ixgbevf_dev_xstats_get_names(__rte_unused struct rte_eth_dev *dev,
 	return IXGBEVF_NB_XSTATS;
 }
 
-static void
+static int
 ixgbevf_dev_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats)
 {
 	struct ixgbevf_hw_stats *hw_stats = (struct ixgbevf_hw_stats *)
@@ -3577,12 +3578,13 @@ static int ixgbevf_dev_xstats_get_names(__rte_unused struct rte_eth_dev *dev,
 	ixgbevf_update_stats(dev);
 
 	if (stats == NULL)
-		return;
+		return -EINVAL;
 
 	stats->ipackets = hw_stats->vfgprc;
 	stats->ibytes = hw_stats->vfgorc;
 	stats->opackets = hw_stats->vfgptc;
 	stats->obytes = hw_stats->vfgotc;
+	return 0;
 }
 
 static void
diff --git a/drivers/net/kni/rte_eth_kni.c b/drivers/net/kni/rte_eth_kni.c
index 72a2733..d290c79 100644
--- a/drivers/net/kni/rte_eth_kni.c
+++ b/drivers/net/kni/rte_eth_kni.c
@@ -283,7 +283,7 @@ struct pmd_internals {
 	return 0;
 }
 
-static void
+static int
 eth_kni_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats)
 {
 	unsigned long rx_packets_total = 0, rx_bytes_total = 0;
@@ -320,6 +320,8 @@ struct pmd_internals {
 	stats->opackets = tx_packets_total;
 	stats->obytes = tx_bytes_total;
 	stats->oerrors = tx_packets_err_total;
+
+	return 0;
 }
 
 static void
diff --git a/drivers/net/liquidio/lio_ethdev.c b/drivers/net/liquidio/lio_ethdev.c
index a3c8e67..5407e39 100644
--- a/drivers/net/liquidio/lio_ethdev.c
+++ b/drivers/net/liquidio/lio_ethdev.c
@@ -311,7 +311,7 @@ struct rte_lio_xstats_name_off {
 }
 
 /* Retrieve the device statistics (# packets in/out, # bytes in/out, etc */
-static void
+static int
 lio_dev_stats_get(struct rte_eth_dev *eth_dev,
 		  struct rte_eth_stats *stats)
 {
@@ -359,6 +359,8 @@ struct rte_lio_xstats_name_off {
 	stats->ibytes = bytes;
 	stats->ipackets = pkts;
 	stats->ierrors = drop;
+
+	return 0;
 }
 
 static void
diff --git a/drivers/net/mlx4/mlx4.h b/drivers/net/mlx4/mlx4.h
index 93e5502..9bd2acc 100644
--- a/drivers/net/mlx4/mlx4.h
+++ b/drivers/net/mlx4/mlx4.h
@@ -117,7 +117,7 @@ struct priv {
 int mlx4_mtu_set(struct rte_eth_dev *dev, uint16_t mtu);
 int mlx4_dev_set_link_down(struct rte_eth_dev *dev);
 int mlx4_dev_set_link_up(struct rte_eth_dev *dev);
-void mlx4_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats);
+int mlx4_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats);
 void mlx4_stats_reset(struct rte_eth_dev *dev);
 void mlx4_dev_infos_get(struct rte_eth_dev *dev,
 			struct rte_eth_dev_info *info);
diff --git a/drivers/net/mlx4/mlx4_ethdev.c b/drivers/net/mlx4/mlx4_ethdev.c
index a9e8059..8962be1 100644
--- a/drivers/net/mlx4/mlx4_ethdev.c
+++ b/drivers/net/mlx4/mlx4_ethdev.c
@@ -571,7 +571,7 @@
  * @param[out] stats
  *   Stats structure output buffer.
  */
-void
+int
 mlx4_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats)
 {
 	struct rte_eth_stats tmp;
@@ -613,6 +613,7 @@
 		tmp.oerrors += txq->stats.odropped;
 	}
 	*stats = tmp;
+	return 0;
 }
 
 /**
diff --git a/drivers/net/mlx5/mlx5.h b/drivers/net/mlx5/mlx5.h
index 643bab6..bcdcc26 100644
--- a/drivers/net/mlx5/mlx5.h
+++ b/drivers/net/mlx5/mlx5.h
@@ -236,7 +236,7 @@ int mlx5_dev_rss_reta_update(struct rte_eth_dev *,
 /* mlx5_stats.c */
 
 void priv_xstats_init(struct priv *);
-void mlx5_stats_get(struct rte_eth_dev *, struct rte_eth_stats *);
+int mlx5_stats_get(struct rte_eth_dev *, struct rte_eth_stats *);
 void mlx5_stats_reset(struct rte_eth_dev *);
 int mlx5_xstats_get(struct rte_eth_dev *,
 		    struct rte_eth_xstat *, unsigned int);
diff --git a/drivers/net/mlx5/mlx5_stats.c b/drivers/net/mlx5/mlx5_stats.c
index 6b4772c..5e225d3 100644
--- a/drivers/net/mlx5/mlx5_stats.c
+++ b/drivers/net/mlx5/mlx5_stats.c
@@ -318,7 +318,7 @@ struct mlx5_counter_ctrl {
  * @param[out] stats
  *   Stats structure output buffer.
  */
-void
+int
 mlx5_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats)
 {
 	struct priv *priv = mlx5_get_priv(dev);
@@ -373,6 +373,7 @@ struct mlx5_counter_ctrl {
 #endif
 	*stats = tmp;
 	priv_unlock(priv);
+	return 0;
 }
 
 /**
diff --git a/drivers/net/mrvl/mrvl_ethdev.c b/drivers/net/mrvl/mrvl_ethdev.c
index 46879a4..4beaa1d 100644
--- a/drivers/net/mrvl/mrvl_ethdev.c
+++ b/drivers/net/mrvl/mrvl_ethdev.c
@@ -845,8 +845,11 @@ struct mrvl_txq {
  *   Pointer to Ethernet device structure.
  * @param stats
  *   Stats structure output buffer.
+ *
+ * @return
+ *   0 on success, negative error value otherwise.
  */
-static void
+static int
 mrvl_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats)
 {
 	struct mrvl_priv *priv = dev->data->dev_private;
@@ -919,7 +922,7 @@ struct mrvl_txq {
 	ret = pp2_ppio_get_statistics(priv->ppio, &ppio_stats, 0);
 	if (unlikely(ret)) {
 		RTE_LOG(ERR, PMD, "Failed to update port statistics\n");
-		return;
+		return ret;
 	}
 
 	stats->ipackets += ppio_stats.rx_packets - drop_mac;
@@ -930,6 +933,8 @@ struct mrvl_txq {
 			  ppio_stats.rx_fifo_dropped +
 			  ppio_stats.rx_cls_dropped;
 	stats->ierrors = drop_mac;
+
+	return 0;
 }
 
 /**
diff --git a/drivers/net/nfp/nfp_net.c b/drivers/net/nfp/nfp_net.c
index 4ef9d2b..0917b9c 100644
--- a/drivers/net/nfp/nfp_net.c
+++ b/drivers/net/nfp/nfp_net.c
@@ -88,7 +88,7 @@ static int nfp_net_tx_queue_setup(struct rte_eth_dev *dev, uint16_t queue_idx,
 				  uint16_t nb_desc, unsigned int socket_id,
 				  const struct rte_eth_txconf *tx_conf);
 static int nfp_net_start(struct rte_eth_dev *dev);
-static void nfp_net_stats_get(struct rte_eth_dev *dev,
+static int nfp_net_stats_get(struct rte_eth_dev *dev,
 			      struct rte_eth_stats *stats);
 static void nfp_net_stats_reset(struct rte_eth_dev *dev);
 static void nfp_net_stop(struct rte_eth_dev *dev);
@@ -1027,7 +1027,7 @@ enum nfp_qcp_ptr {
 	return -1;
 }
 
-static void
+static int
 nfp_net_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats)
 {
 	int i;
@@ -1113,8 +1113,11 @@ enum nfp_qcp_ptr {
 
 	nfp_dev_stats.imissed -= hw->eth_stats_base.imissed;
 
-	if (stats)
+	if (stats) {
 		memcpy(stats, &nfp_dev_stats, sizeof(*stats));
+		return 0;
+	}
+	return -EINVAL;
 }
 
 static void
diff --git a/drivers/net/null/rte_eth_null.c b/drivers/net/null/rte_eth_null.c
index fa9313d..47c7b14 100644
--- a/drivers/net/null/rte_eth_null.c
+++ b/drivers/net/null/rte_eth_null.c
@@ -298,7 +298,7 @@ struct pmd_internals {
 	dev_info->flow_type_rss_offloads = internals->flow_type_rss_offloads;
 }
 
-static void
+static int
 eth_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *igb_stats)
 {
 	unsigned i, num_stats;
@@ -306,7 +306,7 @@ struct pmd_internals {
 	const struct pmd_internals *internal;
 
 	if ((dev == NULL) || (igb_stats == NULL))
-		return;
+		return -EINVAL;
 
 	internal = dev->data->dev_private;
 	num_stats = RTE_MIN((unsigned)RTE_ETHDEV_QUEUE_STAT_CNTRS,
@@ -333,6 +333,8 @@ struct pmd_internals {
 	igb_stats->ipackets = rx_total;
 	igb_stats->opackets = tx_total;
 	igb_stats->oerrors = tx_err_total;
+
+	return 0;
 }
 
 static void
diff --git a/drivers/net/octeontx/octeontx_ethdev.c b/drivers/net/octeontx/octeontx_ethdev.c
index d41904f..d5f236e 100644
--- a/drivers/net/octeontx/octeontx_ethdev.c
+++ b/drivers/net/octeontx/octeontx_ethdev.c
@@ -199,7 +199,7 @@ enum octeontx_link_speed {
 			nic->port_id, en ? "set" : "unset");
 }
 
-static void
+static int
 octeontx_port_stats(struct octeontx_nic *nic, struct rte_eth_stats *stats)
 {
 	octeontx_mbox_bgx_port_stats_t bgx_stats;
@@ -208,8 +208,10 @@ enum octeontx_link_speed {
 	PMD_INIT_FUNC_TRACE();
 
 	res = octeontx_bgx_port_stats(nic->port_id, &bgx_stats);
-	if (res < 0)
+	if (res < 0) {
 		octeontx_log_err("failed to get port stats %d", nic->port_id);
+		return res;
+	}
 
 	stats->ipackets = bgx_stats.rx_packets;
 	stats->ibytes = bgx_stats.rx_bytes;
@@ -221,6 +223,8 @@ enum octeontx_link_speed {
 
 	octeontx_log_dbg("port %d get stats done inpkts=%ld outpkts=%ld",
 			nic->port_id, stats->ipackets, stats->opackets);
+
+	return 0;
 }
 
 static void
@@ -574,13 +578,13 @@ enum octeontx_link_speed {
 	return octeontx_atomic_write_link_status(dev, &link);
 }
 
-static void
+static int
 octeontx_dev_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats)
 {
 	struct octeontx_nic *nic = octeontx_pmd_priv(dev);
 
 	PMD_INIT_FUNC_TRACE();
-	octeontx_port_stats(nic, stats);
+	return octeontx_port_stats(nic, stats);
 }
 
 static void
diff --git a/drivers/net/pcap/rte_eth_pcap.c b/drivers/net/pcap/rte_eth_pcap.c
index b51f16c..1b8a74e 100644
--- a/drivers/net/pcap/rte_eth_pcap.c
+++ b/drivers/net/pcap/rte_eth_pcap.c
@@ -560,7 +560,7 @@ struct pmd_devargs {
 	dev_info->min_rx_bufsize = 0;
 }
 
-static void
+static int
 eth_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats)
 {
 	unsigned int i;
@@ -592,6 +592,8 @@ struct pmd_devargs {
 	stats->opackets = tx_packets_total;
 	stats->obytes = tx_bytes_total;
 	stats->oerrors = tx_packets_err_total;
+
+	return 0;
 }
 
 static void
diff --git a/drivers/net/qede/qede_ethdev.c b/drivers/net/qede/qede_ethdev.c
index fe130d4..a238781 100644
--- a/drivers/net/qede/qede_ethdev.c
+++ b/drivers/net/qede/qede_ethdev.c
@@ -1460,7 +1460,7 @@ static void qede_dev_close(struct rte_eth_dev *eth_dev)
 		rte_eal_alarm_cancel(qede_poll_sp_sb_cb, (void *)eth_dev);
 }
 
-static void
+static int
 qede_get_stats(struct rte_eth_dev *eth_dev, struct rte_eth_stats *eth_stats)
 {
 	struct qede_dev *qdev = eth_dev->data->dev_private;
@@ -1544,6 +1544,8 @@ static void qede_dev_close(struct rte_eth_dev *eth_dev)
 		if (j == txq_stat_cntrs)
 			break;
 	}
+
+	return 0;
 }
 
 static unsigned
diff --git a/drivers/net/ring/rte_eth_ring.c b/drivers/net/ring/rte_eth_ring.c
index e3fa7b0..61473ca 100644
--- a/drivers/net/ring/rte_eth_ring.c
+++ b/drivers/net/ring/rte_eth_ring.c
@@ -190,7 +190,7 @@ struct pmd_internals {
 	dev_info->min_rx_bufsize = 0;
 }
 
-static void
+static int
 eth_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats)
 {
 	unsigned i;
@@ -214,6 +214,8 @@ struct pmd_internals {
 	stats->ipackets = rx_total;
 	stats->opackets = tx_total;
 	stats->oerrors = tx_err_total;
+
+	return 0;
 }
 
 static void
diff --git a/drivers/net/sfc/sfc_ethdev.c b/drivers/net/sfc/sfc_ethdev.c
index 7a57472..5b089dc 100644
--- a/drivers/net/sfc/sfc_ethdev.c
+++ b/drivers/net/sfc/sfc_ethdev.c
@@ -521,16 +521,18 @@
 	sfc_adapter_unlock(sa);
 }
 
-static void
+static int
 sfc_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats)
 {
 	struct sfc_adapter *sa = dev->data->dev_private;
 	struct sfc_port *port = &sa->port;
 	uint64_t *mac_stats;
+	int ret;
 
 	rte_spinlock_lock(&port->mac_stats_lock);
 
-	if (sfc_port_update_mac_stats(sa) != 0)
+	ret = sfc_port_update_mac_stats(sa);
+	if (ret != 0)
 		goto unlock;
 
 	mac_stats = port->mac_stats_buf;
@@ -587,6 +589,7 @@
 
 unlock:
 	rte_spinlock_unlock(&port->mac_stats_lock);
+	return ret;
 }
 
 static void
diff --git a/drivers/net/szedata2/rte_eth_szedata2.c b/drivers/net/szedata2/rte_eth_szedata2.c
index d141acf..c5486b7 100644
--- a/drivers/net/szedata2/rte_eth_szedata2.c
+++ b/drivers/net/szedata2/rte_eth_szedata2.c
@@ -1042,7 +1042,7 @@ struct pmd_internals {
 	dev_info->speed_capa = ETH_LINK_SPEED_100G;
 }
 
-static void
+static int
 eth_stats_get(struct rte_eth_dev *dev,
 		struct rte_eth_stats *stats)
 {
@@ -1077,6 +1077,8 @@ struct pmd_internals {
 	stats->ibytes = rx_total_bytes;
 	stats->obytes = tx_total_bytes;
 	stats->oerrors = tx_err_total;
+
+	return 0;
 }
 
 static void
diff --git a/drivers/net/tap/rte_eth_tap.c b/drivers/net/tap/rte_eth_tap.c
index 52380b4..61c6774 100644
--- a/drivers/net/tap/rte_eth_tap.c
+++ b/drivers/net/tap/rte_eth_tap.c
@@ -687,7 +687,7 @@ enum ioctl_mode {
 		 DEV_TX_OFFLOAD_TCP_CKSUM);
 }
 
-static void
+static int
 tap_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *tap_stats)
 {
 	unsigned int i, imax;
@@ -728,6 +728,7 @@ enum ioctl_mode {
 	tap_stats->opackets = tx_total;
 	tap_stats->oerrors = tx_err_total;
 	tap_stats->obytes = tx_bytes_total;
+	return 0;
 }
 
 static void
diff --git a/drivers/net/thunderx/nicvf_ethdev.c b/drivers/net/thunderx/nicvf_ethdev.c
index 4654a4c..551b371 100644
--- a/drivers/net/thunderx/nicvf_ethdev.c
+++ b/drivers/net/thunderx/nicvf_ethdev.c
@@ -242,7 +242,7 @@ static void nicvf_vf_stop(struct rte_eth_dev *dev, struct nicvf *nic,
 	return -ENOTSUP;
 }
 
-static void
+static int
 nicvf_dev_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats)
 {
 	uint16_t qidx;
@@ -332,6 +332,8 @@ static void nicvf_vf_stop(struct rte_eth_dev *dev, struct nicvf *nic,
 	stats->opackets += port_stats.tx_bcast_frames_ok;
 	stats->opackets += port_stats.tx_mcast_frames_ok;
 	stats->oerrors = port_stats.tx_drops;
+
+	return 0;
 }
 
 static const uint32_t *
diff --git a/drivers/net/vhost/rte_eth_vhost.c b/drivers/net/vhost/rte_eth_vhost.c
index 04179b4..3534649 100644
--- a/drivers/net/vhost/rte_eth_vhost.c
+++ b/drivers/net/vhost/rte_eth_vhost.c
@@ -890,7 +890,7 @@ struct vhost_xstats_name_off {
 	dev_info->min_rx_bufsize = 0;
 }
 
-static void
+static int
 eth_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats)
 {
 	unsigned i;
@@ -928,6 +928,8 @@ struct vhost_xstats_name_off {
 	stats->oerrors = tx_missed_total;
 	stats->ibytes = rx_total_bytes;
 	stats->obytes = tx_total_bytes;
+
+	return 0;
 }
 
 static void
diff --git a/drivers/net/virtio/virtio_ethdev.c b/drivers/net/virtio/virtio_ethdev.c
index e320811..8660074 100644
--- a/drivers/net/virtio/virtio_ethdev.c
+++ b/drivers/net/virtio/virtio_ethdev.c
@@ -76,7 +76,7 @@ static int virtio_dev_link_update(struct rte_eth_dev *dev,
 static void virtio_set_hwaddr(struct virtio_hw *hw);
 static void virtio_get_hwaddr(struct virtio_hw *hw);
 
-static void virtio_dev_stats_get(struct rte_eth_dev *dev,
+static int virtio_dev_stats_get(struct rte_eth_dev *dev,
 				 struct rte_eth_stats *stats);
 static int virtio_dev_xstats_get(struct rte_eth_dev *dev,
 				 struct rte_eth_xstat *xstats, unsigned n);
@@ -964,10 +964,12 @@ static int virtio_dev_xstats_get_names(struct rte_eth_dev *dev,
 	return count;
 }
 
-static void
+static int
 virtio_dev_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats)
 {
 	virtio_update_stats(dev, stats);
+
+	return 0;
 }
 
 static void
diff --git a/drivers/net/vmxnet3/vmxnet3_ethdev.c b/drivers/net/vmxnet3/vmxnet3_ethdev.c
index 1cc3ffd..58bc4f2 100644
--- a/drivers/net/vmxnet3/vmxnet3_ethdev.c
+++ b/drivers/net/vmxnet3/vmxnet3_ethdev.c
@@ -87,7 +87,7 @@ static int __vmxnet3_dev_link_update(struct rte_eth_dev *dev,
 static int vmxnet3_dev_link_update(struct rte_eth_dev *dev,
 				   int wait_to_complete);
 static void vmxnet3_hw_stats_save(struct vmxnet3_hw *hw);
-static void vmxnet3_dev_stats_get(struct rte_eth_dev *dev,
+static int vmxnet3_dev_stats_get(struct rte_eth_dev *dev,
 				  struct rte_eth_stats *stats);
 static int vmxnet3_dev_xstats_get_names(struct rte_eth_dev *dev,
 					struct rte_eth_xstat_name *xstats,
@@ -1034,7 +1034,7 @@ static int eth_vmxnet3_pci_remove(struct rte_pci_device *pci_dev)
 	return count;
 }
 
-static void
+static int
 vmxnet3_dev_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats)
 {
 	unsigned int i;
@@ -1080,6 +1080,8 @@ static int eth_vmxnet3_pci_remove(struct rte_pci_device *pci_dev)
 		stats->ierrors += rxStats.pktsRxError;
 		stats->rx_nombuf += rxStats.pktsRxOutOfBuf;
 	}
+
+	return 0;
 }
 
 static void
diff --git a/lib/librte_ether/rte_ethdev.c b/lib/librte_ether/rte_ethdev.c
index 3c5441e..d88f734 100644
--- a/lib/librte_ether/rte_ethdev.c
+++ b/lib/librte_ether/rte_ethdev.c
@@ -1531,8 +1531,7 @@ struct rte_eth_dev *
 
 	RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->stats_get, -ENOTSUP);
 	stats->rx_nombuf = dev->data->rx_mbuf_alloc_failed;
-	(*dev->dev_ops->stats_get)(dev, stats);
-	return 0;
+	return (*dev->dev_ops->stats_get)(dev, stats);
 }
 
 int
diff --git a/lib/librte_ether/rte_ethdev.h b/lib/librte_ether/rte_ethdev.h
index 8e928da..71e6b33 100644
--- a/lib/librte_ether/rte_ethdev.h
+++ b/lib/librte_ether/rte_ethdev.h
@@ -1207,7 +1207,7 @@ typedef int (*eth_link_update_t)(struct rte_eth_dev *dev,
 				int wait_to_complete);
 /**< @internal Get link speed, duplex mode and state (up/down) of an Ethernet device. */
 
-typedef void (*eth_stats_get_t)(struct rte_eth_dev *dev,
+typedef int (*eth_stats_get_t)(struct rte_eth_dev *dev,
 				struct rte_eth_stats *igb_stats);
 /**< @internal Get global I/O statistics of an Ethernet device. */
 
-- 
1.8.3.1

^ permalink raw reply	[relevance 1%]

* [dpdk-dev] next techboard meeting (13th, October)
@ 2017-10-11  9:36  3% Olivier MATZ
  2017-10-11 12:41  0% ` Wiles, Keith
  0 siblings, 1 reply; 200+ results
From: Olivier MATZ @ 2017-10-11  9:36 UTC (permalink / raw)
  To: dev, techboard

Hi all,

The next techboard meeting will happen on IRC #dpdk-board, at 3pm UTC,
this friday 13th of october.

The agenda is updated here:
    https://annuel.framapad.org/p/r.0c3cc4d1e011214183872a98f6b5c7db


1) ABI stability:
    - one LTS per year
    - 17.11 to be a LTS
    - every new API has the "experimental" tag
    - 3 Acks are needed for deprecation and they should come from different companies
  reference: http://dpdk.org/ml/archives/dev/2017-October/077937.html
  reference: http://dpdk.org/ml/archives/dev/2017-October/077935.html

2) update on license discussion concerning the optimized version of 64bit division
code from libdivide
  - any feedback from governing board?

3) update on IPSec offload (rte_security)
  - the conclusion on this topic was to post concerns/proposals on dpdk-dev
  - is there still something expected from techboard?

Olivier

^ permalink raw reply	[relevance 3%]

* Re: [dpdk-dev] [PATCH v1 1/7] ethdev: expose flow API error helper
  @ 2017-10-11 11:56  5%     ` Adrien Mazarguil
  2017-10-11 19:05  5%       ` Aaron Conole
  0 siblings, 1 reply; 200+ results
From: Adrien Mazarguil @ 2017-10-11 11:56 UTC (permalink / raw)
  To: Thomas Monjalon; +Cc: dev, Ferruh Yigit, Gaetan Rivet, aconole, fbl

On Wed, Oct 11, 2017 at 11:23:12AM +0200, Thomas Monjalon wrote:
> 05/10/2017 11:49, Adrien Mazarguil:
> > rte_flow_error_set() is a convenient helper to initialize error objects.
> > 
> > Since there is no fundamental reason to prevent applications from using it,
> > expose it through the public interface after modifying its return value
> > from positive to negative. This is done for consistency with the rest of
> > the public interface.
> > 
> > Documentation is updated accordingly.
> > 
> > Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
> > ---
> > --- a/lib/librte_ether/rte_flow.h
> > +++ b/lib/librte_ether/rte_flow.h
> >  /**
> > + * Initialize flow error structure.
> > + *
> > + * @param[out] error
> > + *   Pointer to flow error structure (may be NULL).
> > + * @param code
> > + *   Related error code (rte_errno).
> > + * @param type
> > + *   Cause field and error types.
> > + * @param cause
> > + *   Object responsible for the error.
> > + * @param message
> > + *   Human-readable error message.
> > + *
> > + * @return
> > + *   Negative error code (errno value) and rte_errno is set.
> > + */
> > +static inline int
> > +rte_flow_error_set(struct rte_flow_error *error,
> > +		   int code,
> > +		   enum rte_flow_error_type type,
> > +		   const void *cause,
> > +		   const char *message)
> 
> When calling this function, the performance is not critical.
> So it must not be an inline function.
> Please move it to the .c file and add it to the .map file.

I'll do it as part of moving this patch into my upcoming series for mlx4,
since it relies on the new return value.

Now for the record, I believe that static inlines, particularly short ones
that are not expected to be modified any time soon (provided they are
defined properly that is) are harmless.

Yes, that means modifying them, depending on what they do, may cause a
global ABI breakage of the underlying library which translates to a major
version bump, however exactly the same applies to some macros (in particular
the *_MAX ones), structure and other type definitions and so on.

What I'm getting at is, making this function part of the .map file won't
help all that much with the goal of reaching a stable ABI. Making it a
normal function on the other hand successfully prevents PMDs and
applications from considering its use in their data plane (flow rules
management from the data plane is likely the next step for rte_flow).

In my opinion, performance (even if hypothetical) matters more than ABI
stability, particularly since the current pattern is for the whole ABI to be
broken every other release. I think that with DPDK, ABI stability can only
be properly guaranteed in stable/maintenance releases but that effort is
vain in the master branch, affected by way too many changes for it to ever
become reality. This doesn't mean we shouldn't even try, however we
shouldn't restrict ourselves; when the ABI needs to be broken, so be it.

(end of rant, thanks for reading)

-- 
Adrien Mazarguil
6WIND

^ permalink raw reply	[relevance 5%]

* Re: [dpdk-dev] next techboard meeting (13th, October)
  2017-10-11  9:36  3% [dpdk-dev] next techboard meeting (13th, October) Olivier MATZ
@ 2017-10-11 12:41  0% ` Wiles, Keith
  2017-10-11 12:48  0%   ` [dpdk-dev] [dpdk-techboard] " Thomas Monjalon
  0 siblings, 1 reply; 200+ results
From: Wiles, Keith @ 2017-10-11 12:41 UTC (permalink / raw)
  To: Olivier MATZ; +Cc: dev, techboard



> On Oct 11, 2017, at 4:36 AM, Olivier MATZ <olivier.matz@6wind.com> wrote:
> 
> Hi all,
> 
> The next techboard meeting will happen on IRC #dpdk-board, at 3pm UTC,
> this friday 13th of october.
> 
> The agenda is updated here:
>    https://annuel.framapad.org/p/r.0c3cc4d1e011214183872a98f6b5c7db
> 
> 
> 1) ABI stability:
>    - one LTS per year
>    - 17.11 to be a LTS
>    - every new API has the "experimental" tag
>    - 3 Acks are needed for deprecation and they should come from different companies
>  reference: http://dpdk.org/ml/archives/dev/2017-October/077937.html
>  reference: http://dpdk.org/ml/archives/dev/2017-October/077935.html

I assume the person or company that pushes the notice can be one of the ACKs is this correct?

Also does the ACK need to come from a person working for a company or can this person be an independent developer? Maybe a very minor point, but someone that is working for a company could Ack independent of the company if so stated. Just be careful how you word the requirement, something like ‘Only one Ack per company or independent developer’ 

> 
> 2) update on license discussion concerning the optimized version of 64bit division
> code from libdivide
>  - any feedback from governing board?
> 
> 3) update on IPSec offload (rte_security)
>  - the conclusion on this topic was to post concerns/proposals on dpdk-dev
>  - is there still something expected from techboard?
> 
> Olivier

Regards,
Keith


^ permalink raw reply	[relevance 0%]

* Re: [dpdk-dev] [dpdk-techboard]  next techboard meeting (13th, October)
  2017-10-11 12:41  0% ` Wiles, Keith
@ 2017-10-11 12:48  0%   ` Thomas Monjalon
  2017-10-11 12:53  0%     ` Wiles, Keith
  0 siblings, 1 reply; 200+ results
From: Thomas Monjalon @ 2017-10-11 12:48 UTC (permalink / raw)
  To: dev; +Cc: techboard, Wiles, Keith, Olivier MATZ

11/10/2017 14:41, Wiles, Keith:
> > On Oct 11, 2017, at 4:36 AM, Olivier MATZ <olivier.matz@6wind.com> wrote:
> > 1) ABI stability:
> >    - one LTS per year
> >    - 17.11 to be a LTS
> >    - every new API has the "experimental" tag
> >    - 3 Acks are needed for deprecation and they should come from different companies
> >  reference: http://dpdk.org/ml/archives/dev/2017-October/077937.html
> >  reference: http://dpdk.org/ml/archives/dev/2017-October/077935.html
> 
> I assume the person or company that pushes the notice can be one of the ACKs is this correct?
> 
> Also does the ACK need to come from a person working for a company or can this person be an independent developer? Maybe a very minor point, but someone that is working for a company could Ack independent of the company if so stated. Just be careful how you word the requirement, something like ‘Only one Ack per company or independent developer’ 

As an open community, we should avoid sorting people per company.
I prefer talking about different areas of interest.
Anyway considering acks is a matter of confidence.
We cannot have strict rules, but we can provide some guidelines.

^ permalink raw reply	[relevance 0%]

* Re: [dpdk-dev] [dpdk-techboard]  next techboard meeting (13th, October)
  2017-10-11 12:48  0%   ` [dpdk-dev] [dpdk-techboard] " Thomas Monjalon
@ 2017-10-11 12:53  0%     ` Wiles, Keith
  0 siblings, 0 replies; 200+ results
From: Wiles, Keith @ 2017-10-11 12:53 UTC (permalink / raw)
  To: Thomas Monjalon; +Cc: DPDK, techboard, Olivier MATZ



> On Oct 11, 2017, at 7:48 AM, Thomas Monjalon <thomas@monjalon.net> wrote:
> 
> 11/10/2017 14:41, Wiles, Keith:
>>> On Oct 11, 2017, at 4:36 AM, Olivier MATZ <olivier.matz@6wind.com> wrote:
>>> 1) ABI stability:
>>>   - one LTS per year
>>>   - 17.11 to be a LTS
>>>   - every new API has the "experimental" tag
>>>   - 3 Acks are needed for deprecation and they should come from different companies
>>> reference: http://dpdk.org/ml/archives/dev/2017-October/077937.html
>>> reference: http://dpdk.org/ml/archives/dev/2017-October/077935.html
>> 
>> I assume the person or company that pushes the notice can be one of the ACKs is this correct?
>> 
>> Also does the ACK need to come from a person working for a company or can this person be an independent developer? Maybe a very minor point, but someone that is working for a company could Ack independent of the company if so stated. Just be careful how you word the requirement, something like ‘Only one Ack per company or independent developer’ 
> 
> As an open community, we should avoid sorting people per company.
> I prefer talking about different areas of interest.
> Anyway considering acks is a matter of confidence.
> We cannot have strict rules, but we can provide some guidelines.

Sounds reasonable.

Regards,
Keith


^ permalink raw reply	[relevance 0%]

* [dpdk-dev] [PATCH v9 0/9] Policy Based Power Control for Guest
    2017-10-03 14:08  3% ` [dpdk-dev] [PATCH v3 0/9] Policy Based Power Control for Guest David Hunt
@ 2017-10-11 16:18  2% ` David Hunt
  2017-10-12  0:23  0%   ` Ferruh Yigit
  1 sibling, 1 reply; 200+ results
From: David Hunt @ 2017-10-11 16:18 UTC (permalink / raw)
  To: dev; +Cc: konstantin.ananyev, jingjing.wu, santosh.shukla

Policy Based Power Control for Guest

This patchset adds the facility for a guest VM to send a policy down to the
host that will allow the host to scale up/down cpu frequencies
depending on the policy criteria independently of the DPDK app running in
the guest.  This differs from the previous vm_power implementation where
individual scale up/down requests were send from the guest to the host via
virtio-serial.

V9 patchset changes:
  * Rebased on top of the tip of the master branch
  * changed port_id from uint8 to uint16 due to changes elsewhere

V8 patchset changes:
  * Added Ack's and Reviewed-by's to individual patches in the set so as to
    keep patchwork A/R/T flags properly in sync.

V7 patchset changes:
  * Changed return code of rte_pmd_i40e_query_vfid_by_mac() from an
    int64_t to int

V6 patchset changes:
  * Fixed comments in header for rte_pmd_i40e_query_vfid_by_mac.
  * changed rte_pmd_i40e_query_vfid_by_mac return code from uint to int
    as it can return negative error codes.
  * Removed bool enum from channel_commands.h, including stdbool.h instead.
  * Added #define VM_MAX_NAME_SZ 32 to channel_commands.h
  * Renamed a few variables to be more readable.
  * Added returns in a few places if failed to get info on domain.
  * Fixed power_manager_init to keep track of num_freqs for each core.
  * In power_manager_scale_core_med(), changed a hardcoded '5' to instead
    be calculated from the centre of the frequency list
    (global_core_freq_info[core_num].num_freqs / 2)

V5 patchset changes:
  * Removed most of the #ifdef I40_PMD as it will be applicable to
    other PMDs in the future.
  * Changed the parameter of rte_pmd_i40e_query_vfid_by_mac from a uint64
    to a const struct ether_addr *, rather than casting it later in the
    function.

V4 patchset changes:
  * None, re-post to mailing list under the correct email thread.

V3 patchset changes:
  * Changed to using is_same_ether_addr() instead of looping through
    the mac address bytes to compare them.
  * Tweaked some comments and working in the i40e patch after review.
  * Added a patch to the set to add new i40e function to map file, so
    as to allow shared library builds. The power library API needs a cleanup
    in next release, so will add API/ABI warning for this cleanup in a
    separate patch.

V2 patchset changes:
  * Removed API's in ethdev layer.
  * Now just a single new API in the i40e driver for mapping VF MAC to
    VF index.
  * Moved new function from rte_rxtx.c to rte_pmd_i40e.c
  * Removed function for reading i40e register, moved to using the
    standard stats API.
  * Renamed i40e function to rte_pmd_i40e_query_vfid_by_mac
  * Cleaned up policy generation code.

It's a modification of the vm_power_manager app that runs in the host, and
the guest_vm_power_app example app that runs in the guest. This allows the
guest to send down a policy to the host via virtio-serial, which then allows
the host to scale up/down based on the criteria in the policy, resulting in
quicker scale up/down than individual requests coming from the guest.
It also means that the DPDK application running in the guest does not need
to be modified in any way, it is unaware that it's cores are being scaled
up/down, reducing the effort in implementing a power-aware infrastructure.

The usage model is as follows:
1. Set up the VF's and assign to the guest in the usual way.
2. run vm_power_manager on the host, creating a channel to the guest.
3. Start the guest_vm_power_mgr app on the guest, which establishes
   a virtio-serial channel to the host.
4. Send down the profile for the guest using the "send_profile now" command.
   There is an example profile hard-coded into guest_vm_power_mgr.
5. Stop the guest_vm_power_mgr and run your normal power-unaware application.
6. Send traffic into the VFs at varying traffic rates.
   Observe the frequency change on the host (turbostat -i 1)

The sequence of code changes are as follows:

A new function has been aded to the i40e driver to allow mapping of
a VF MAC to VF index.

Next we make an addition to librte_power that adds an extra command to allow
the passing of a policy structure from the guest to the host. This struct
contains information like busy/quiet hour, packet throughput thresholds, etc.

The next addition adds functionality to convert the virtual CPU (vcpU0 IDs to
physical CPU (pcpu) IDs so that the host can scale up/down the cores used
in the guest.

The remaining patches are functionality to process the policy, and take action
when the relevant trigger occurs to cause a frequency change.

[1/9] net/i40e: add API to convert VF MAC to VF id
[2/9] lib/librte_power: add extra msg type for policies
[3/9] examples/vm_power_mgr: add vcpu to pcpu mapping
[4/9] examples/vm_power_mgr: add scale to medium freq fn
[5/9] examples/vm_power_mgr: add policy to channels
[6/9] examples/vm_power_mgr: add port initialisation
[7/9] power: add send channel msg function to map file
[8/9] examples/guest_cli: add send policy to host
[9/9] examples/vm_power_mgr: set MAC address of VF

^ permalink raw reply	[relevance 2%]

* Re: [dpdk-dev] [PATCH v1 1/7] ethdev: expose flow API error helper
  2017-10-11 11:56  5%     ` Adrien Mazarguil
@ 2017-10-11 19:05  5%       ` Aaron Conole
  2017-10-12 13:37  4%         ` Neil Horman
  2017-10-12 14:02  5%         ` Adrien Mazarguil
  0 siblings, 2 replies; 200+ results
From: Aaron Conole @ 2017-10-11 19:05 UTC (permalink / raw)
  To: Adrien Mazarguil
  Cc: Thomas Monjalon, dev, Ferruh Yigit, Gaetan Rivet, fbl, Neil Horman

Adrien Mazarguil <adrien.mazarguil@6wind.com> writes:

> On Wed, Oct 11, 2017 at 11:23:12AM +0200, Thomas Monjalon wrote:
>> 05/10/2017 11:49, Adrien Mazarguil:
>> > rte_flow_error_set() is a convenient helper to initialize error objects.
>> > 
>> > Since there is no fundamental reason to prevent applications from using it,
>> > expose it through the public interface after modifying its return value
>> > from positive to negative. This is done for consistency with the rest of
>> > the public interface.
>> > 
>> > Documentation is updated accordingly.
>> > 
>> > Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
>> > ---
>> > --- a/lib/librte_ether/rte_flow.h
>> > +++ b/lib/librte_ether/rte_flow.h
>> >  /**
>> > + * Initialize flow error structure.
>> > + *
>> > + * @param[out] error
>> > + *   Pointer to flow error structure (may be NULL).
>> > + * @param code
>> > + *   Related error code (rte_errno).
>> > + * @param type
>> > + *   Cause field and error types.
>> > + * @param cause
>> > + *   Object responsible for the error.
>> > + * @param message
>> > + *   Human-readable error message.
>> > + *
>> > + * @return
>> > + *   Negative error code (errno value) and rte_errno is set.
>> > + */
>> > +static inline int
>> > +rte_flow_error_set(struct rte_flow_error *error,
>> > +		   int code,
>> > +		   enum rte_flow_error_type type,
>> > +		   const void *cause,
>> > +		   const char *message)
>> 
>> When calling this function, the performance is not critical.
>> So it must not be an inline function.
>> Please move it to the .c file and add it to the .map file.
>
> I'll do it as part of moving this patch into my upcoming series for mlx4,
> since it relies on the new return value.
>
> Now for the record, I believe that static inlines, particularly short ones
> that are not expected to be modified any time soon (provided they are
> defined properly that is) are harmless.
>
> Yes, that means modifying them, depending on what they do, may cause a
> global ABI breakage of the underlying library which translates to a major
> version bump, however exactly the same applies to some macros (in particular
> the *_MAX ones), structure and other type definitions and so on.

Sure.  I think if it's small and there's never a chance for it to
change, then it's okay.  But, as you point out - they are similar to
macros in that they are code directly added to the application.  There
is never a way to fix a bug or adjust some semantic behavior without
requiring a recompile.  That's a strong kind of binding.  Certainly we
would want that communicated as ABI, regardless of which .h/.c file the
function exists, yes?

> What I'm getting at is, making this function part of the .map file won't
> help all that much with the goal of reaching a stable ABI. Making it a
> normal function on the other hand successfully prevents PMDs and
> applications from considering its use in their data plane (flow rules
> management from the data plane is likely the next step for rte_flow).

I don't understand this point well.  There are two things - committing
to a stable ABI, and communicating information about that ABI.  Having
.map files doesn't do anything for a stable ABI.  It merely
communicates information.  The stability must come from the developer
community and maintainers.

> In my opinion, performance (even if hypothetical) matters more than ABI
> stability, particularly since the current pattern is for the whole ABI to be
> broken every other release. I think that with DPDK, ABI stability can only
> be properly guaranteed in stable/maintenance releases but that effort is
> vain in the master branch, affected by way too many changes for it to ever
> become reality. This doesn't mean we shouldn't even try, however we
> shouldn't restrict ourselves; when the ABI needs to be broken, so be it.

First, performance isn't hypothetical.  You have code which performs,
and have measured various metrics to show this, or you don't have data.
No voodoo required.  Hypothetical isn't even an argument when it comes
to predictable devices (like computers).  In the case above, you have a
non-performance critical function.  It's an error function.  It passes
strings around.  Performance cannot be a consideration here.

Second, it depends on where you want to view the boundary.  If a change is
internal to DPDK (meaning, the application is never expected to interact
with that area of code), then it shouldn't be part of ABI and changing
it to your hearts content should be fine.

*rant-on*

I see lots of projects which use DPDK, but I only know of three or so
projects which don't directly embed a copy of the DPDK source
tree.  I think this is a side effect of not having a stable ABI - it's
not possible to rely on easily upgrading the library, so people just
pick a version and never upgrade.  That's bad for everyone.  It results
in fewer contributions, and difficulty getting people to participate.
There's too much text like "Install DPDK 1.8.0. With other versions is
not guaranted it works properly" that is embedded in downstream users
(that comes from an actual project README).  Even at DPDK summit in
Dublin, one of the most vocal opponents to ABI stability admitted that
his company takes the code and never contributes it back.  That is
really not friendly.

This even has a different side effect - one of market penetration.  It's
difficult for distributions to support this model.  So, there will be
one or two packages they might pick up, with one or two versions.
Everything else is "roll your own."  And when it's more difficult than
'apt-get|yum|dnf|foo install' then users don't use it, and the cycle
continues.

I'll point out that I can take a number of compiled binaries from 20
years ago[0], and run on a modern kernel.  I wish I could take a
binary linked to DPDK from 5 months ago, and run it with today's DPDK.
I believe that *should* be the goal.  I am confident it's achievable.
But, I recognize it's hard and requires extra effort.

Anyway, apologies if I took some bait here, and sorry that I ranted off
on my own.

> (end of rant, thanks for reading)

[0]: https://www.complang.tuwien.ac.at/anton/linux-binary-compatibility.html

^ permalink raw reply	[relevance 5%]

* Re: [dpdk-dev] [PATCH v6 0/5] increase port_id range
  2017-10-06  2:15  0%       ` [dpdk-dev] [PATCH v6 0/5] " Ferruh Yigit
                           ` (2 preceding siblings ...)
  2017-10-06 16:02  0%         ` Thomas Monjalon
@ 2017-10-11 21:21  0%         ` Ferruh Yigit
  2017-10-12  1:33  0%           ` Yang, Zhiyong
  3 siblings, 1 reply; 200+ results
From: Ferruh Yigit @ 2017-10-11 21:21 UTC (permalink / raw)
  To: Zhiyong Yang, dev; +Cc: thomas, Nelio Laranjeiro, Gaetan Rivet, Declan Doherty

On 10/6/2017 3:15 AM, Ferruh Yigit wrote:
> On 9/29/2017 8:17 AM, Zhiyong Yang wrote:
>> port_id is currently defined as uint8_t, which is limited to the range
>> 0 to 255. A larger range is required for vdev scalability.
>>
>> It is necessary for a redefinition of port_id to extend it from
>> 1 bytes to 2 bytes. All ethdev APIs and usages related to port_id will
>> be changed at the same time.
>>
>> Discussion about port_id is the following thread.
>> http://www.dpdk.org/dev/patchwork/patch/23208/
>>
>> Changes in V2:
>> 1. cover more PMDs to increase port_id range.
>> 2. cover more examples to increase port_id range.
>> 3. add 17.11 release note.
>>
>> Changes in V3:
>> 1.  cover mlx4 and mlx5.
>> 2.  add to increase port_id range in test code.
>> 3.  The patch "librte_mbuf: modify port initialization value" is merged
>>     into the patchset.
>>
>> Changes in V4:
>> 1.  Add a patch to remove bonding APIs using ABI versioning according to
>>     Ferruh's comments.
>> 2.  Unify to use typedef portid_t in testpmd code.
>> 3.  update release note deprecation doc in 2/5
>> 4.  fix some issues according to comments.
>>
>> Changes in V5:
>> 1.  For 1/5, bond_mode_8023ad_conf_get_v1708() and bond_mode_8023ad_conf
>>     _get() are merged into one function bond_mode_8023ad_conf_get.
>>
>> Changes in V6:
>> 1.  For 2/5, remove the unnecessary LIBABIVER in Makefile and update
>>     the release notes "Shared Library Versions".
>>     Note: The patchset have dependency on the following patch.
>>     http://www.dpdk.org/dev/patchwork/patch/28738/
>>     http://www.dpdk.org/dev/patchwork/patch/29219/
>>
>> Note: 3/5 and 4/5 patches' building depends on 2/5 patch since 2/5 patch
>> breaks lib/PMD API/ABI.
>>
>> Zhiyong Yang (5):
>>   net/bonding: remove bonding APIs using ABI versioning
>>   ethdev: increase port_id range
>>   examples: increase port_id range
>>   test: increase port_id range
>>   librte_mbuf: modify port initialization value
> 
> Series applied to dpdk-next-net/master, thanks.

Hi Zhiyong,

I can see there are more "uint8_t port_id" usage in testpmd:

$ git grep -c "uint8_t port_id"
cmdline.c:93
config.c:7
testpmd.c:4
testpmd.h:8

I believe there can be false-positives, but can you please check and
send a fix patch if required?

Thanks,
ferruh

<...>

^ permalink raw reply	[relevance 0%]

* Re: [dpdk-dev] [PATCH] eal: bus scan and probe never fail
  2017-10-10 16:00  3%               ` Aaron Conole
@ 2017-10-11 22:34  0%                 ` Thomas Monjalon
  2017-10-12 13:08  0%                   ` Aaron Conole
  2017-10-12  5:39  0%                 ` Shreyansh Jain
  1 sibling, 1 reply; 200+ results
From: Thomas Monjalon @ 2017-10-11 22:34 UTC (permalink / raw)
  To: Aaron Conole; +Cc: dev, Shreyansh Jain, Don Provan, Jan Blunck, Hemant Agrawal

10/10/2017 18:00, Aaron Conole:
> Shreyansh Jain <shreyansh.jain@nxp.com> writes:
> 
> > Hello Don,
> >
> > On Monday 09 October 2017 11:51 PM, Don Provan wrote:
> >>> -----Original Message-----
> >>> From: Shreyansh Jain [mailto:shreyansh.jain@nxp.com]
> >>> Sent: Monday, October 09, 2017 4:10 AM
> >>> To: Jan Blunck <jblunck@infradead.org>; Thomas Monjalon
> >>> <thomas@monjalon.net>
> >>> Cc: dev <dev@dpdk.org>; Hemant Agrawal <hemant.agrawal@nxp.com>
> >>> Subject: Re: [dpdk-dev] [PATCH] eal: bus scan and probe never fail
> >>>
> >>> ...
> >>> This is where I have disagreement/doubt.
> >>> Reporting error code from rte_bus_scan would do two things:
> >>>
> >>> 1. rte_eal_init is not designed to ignore/log-only these errors - it
> >>> would quit initialization. (But, this can be changed)
> >>> 2. What should rte_eal_init do with this error? rte_bus_scan would have
> >>> already printed the problematic bus->scan() failure.
> >>
> >> These practical problems confirm to me that the failure of a bus
> >> scan is more of a strategic issue: when asking "which devices can
> >> I use?", "none" is a perfectly valid answer that does not seem
> >> like an error to me even when a failed bus scan is the reason for
> >> that answer.
> >
> > I agree with this.
> >
> >>
> >>  From the application's point of view, the potential error here
> >> is that the device it wants to use isn't available. I don't see that
> >> either the init function or the probe function will have enough
> >> information to understand that application-level problem, so
> >> they should leave it to the application to detect it.
> >
> > I think I understand you comment but just want to cross check again:
> > Scan or probe error should simply be ignored by EAL layer and let the
> > application take stance when it detects that the device it was looking
> > for is missing. Is my understanding correct?
> >
> > I am trying to come a conclusion so that this patch can either be
> > modified or pushed as it is. If the above understanding is correct, I
> > don't see any changes required in the patch.
> 
> Does it make sense to introduce a way to query the results of the
> various bus types for their status?  That way we can give the relevant
> information to the application if it wants, and make the bus scanning
> code *always* succeed?  This version shouldn't be an ABI breakage,
> either (confirm?).
> 
> half-baked below (not tested or suitable - just an example):

We are going to need notification callbacks for scan and probe anyway.
I think errors could be also notified with callbacks?

^ permalink raw reply	[relevance 0%]

* Re: [dpdk-dev] [PATCH v9 0/9] Policy Based Power Control for Guest
  2017-10-11 16:18  2% ` [dpdk-dev] [PATCH v9 " David Hunt
@ 2017-10-12  0:23  0%   ` Ferruh Yigit
  0 siblings, 0 replies; 200+ results
From: Ferruh Yigit @ 2017-10-12  0:23 UTC (permalink / raw)
  To: David Hunt, dev; +Cc: konstantin.ananyev, jingjing.wu, santosh.shukla

On 10/11/2017 5:18 PM, David Hunt wrote:
> Policy Based Power Control for Guest
> 
> This patchset adds the facility for a guest VM to send a policy down to the
> host that will allow the host to scale up/down cpu frequencies
> depending on the policy criteria independently of the DPDK app running in
> the guest.  This differs from the previous vm_power implementation where
> individual scale up/down requests were send from the guest to the host via
> virtio-serial.
> 
> V9 patchset changes:
>   * Rebased on top of the tip of the master branch
>   * changed port_id from uint8 to uint16 due to changes elsewhere
> 
> V8 patchset changes:
>   * Added Ack's and Reviewed-by's to individual patches in the set so as to
>     keep patchwork A/R/T flags properly in sync.
> 
> V7 patchset changes:
>   * Changed return code of rte_pmd_i40e_query_vfid_by_mac() from an
>     int64_t to int
> 
> V6 patchset changes:
>   * Fixed comments in header for rte_pmd_i40e_query_vfid_by_mac.
>   * changed rte_pmd_i40e_query_vfid_by_mac return code from uint to int
>     as it can return negative error codes.
>   * Removed bool enum from channel_commands.h, including stdbool.h instead.
>   * Added #define VM_MAX_NAME_SZ 32 to channel_commands.h
>   * Renamed a few variables to be more readable.
>   * Added returns in a few places if failed to get info on domain.
>   * Fixed power_manager_init to keep track of num_freqs for each core.
>   * In power_manager_scale_core_med(), changed a hardcoded '5' to instead
>     be calculated from the centre of the frequency list
>     (global_core_freq_info[core_num].num_freqs / 2)
> 
> V5 patchset changes:
>   * Removed most of the #ifdef I40_PMD as it will be applicable to
>     other PMDs in the future.
>   * Changed the parameter of rte_pmd_i40e_query_vfid_by_mac from a uint64
>     to a const struct ether_addr *, rather than casting it later in the
>     function.
> 
> V4 patchset changes:
>   * None, re-post to mailing list under the correct email thread.
> 
> V3 patchset changes:
>   * Changed to using is_same_ether_addr() instead of looping through
>     the mac address bytes to compare them.
>   * Tweaked some comments and working in the i40e patch after review.
>   * Added a patch to the set to add new i40e function to map file, so
>     as to allow shared library builds. The power library API needs a cleanup
>     in next release, so will add API/ABI warning for this cleanup in a
>     separate patch.
> 
> V2 patchset changes:
>   * Removed API's in ethdev layer.
>   * Now just a single new API in the i40e driver for mapping VF MAC to
>     VF index.
>   * Moved new function from rte_rxtx.c to rte_pmd_i40e.c
>   * Removed function for reading i40e register, moved to using the
>     standard stats API.
>   * Renamed i40e function to rte_pmd_i40e_query_vfid_by_mac
>   * Cleaned up policy generation code.
> 
> It's a modification of the vm_power_manager app that runs in the host, and
> the guest_vm_power_app example app that runs in the guest. This allows the
> guest to send down a policy to the host via virtio-serial, which then allows
> the host to scale up/down based on the criteria in the policy, resulting in
> quicker scale up/down than individual requests coming from the guest.
> It also means that the DPDK application running in the guest does not need
> to be modified in any way, it is unaware that it's cores are being scaled
> up/down, reducing the effort in implementing a power-aware infrastructure.
> 
> The usage model is as follows:
> 1. Set up the VF's and assign to the guest in the usual way.
> 2. run vm_power_manager on the host, creating a channel to the guest.
> 3. Start the guest_vm_power_mgr app on the guest, which establishes
>    a virtio-serial channel to the host.
> 4. Send down the profile for the guest using the "send_profile now" command.
>    There is an example profile hard-coded into guest_vm_power_mgr.
> 5. Stop the guest_vm_power_mgr and run your normal power-unaware application.
> 6. Send traffic into the VFs at varying traffic rates.
>    Observe the frequency change on the host (turbostat -i 1)
> 
> The sequence of code changes are as follows:
> 
> A new function has been aded to the i40e driver to allow mapping of
> a VF MAC to VF index.
> 
> Next we make an addition to librte_power that adds an extra command to allow
> the passing of a policy structure from the guest to the host. This struct
> contains information like busy/quiet hour, packet throughput thresholds, etc.
> 
> The next addition adds functionality to convert the virtual CPU (vcpU0 IDs to
> physical CPU (pcpu) IDs so that the host can scale up/down the cores used
> in the guest.
> 
> The remaining patches are functionality to process the policy, and take action
> when the relevant trigger occurs to cause a frequency change.

Applied to dpdk/master, thanks.

^ permalink raw reply	[relevance 0%]

* Re: [dpdk-dev] [PATCH v6 0/5] increase port_id range
  2017-10-11 21:21  0%         ` Ferruh Yigit
@ 2017-10-12  1:33  0%           ` Yang, Zhiyong
  0 siblings, 0 replies; 200+ results
From: Yang, Zhiyong @ 2017-10-12  1:33 UTC (permalink / raw)
  To: Yigit, Ferruh, dev
  Cc: thomas, Nelio Laranjeiro, Gaetan Rivet, Doherty, Declan

Hi ferruh,

> >> Zhiyong Yang (5):
> >>   net/bonding: remove bonding APIs using ABI versioning
> >>   ethdev: increase port_id range
> >>   examples: increase port_id range
> >>   test: increase port_id range
> >>   librte_mbuf: modify port initialization value
> >
> > Series applied to dpdk-next-net/master, thanks.
> 
> Hi Zhiyong,
> 
> I can see there are more "uint8_t port_id" usage in testpmd:
> 
> $ git grep -c "uint8_t port_id"
> cmdline.c:93
> config.c:7
> testpmd.c:4
> testpmd.h:8
> 
> I believe there can be false-positives, but can you please check and send a fix
> patch if required?
> 

Ok.

thanks
Zhiyong

> Thanks,
> ferruh
> 
> <...>

^ permalink raw reply	[relevance 0%]

* Re: [dpdk-dev] [PATCH] eal: bus scan and probe never fail
  2017-10-10 16:00  3%               ` Aaron Conole
  2017-10-11 22:34  0%                 ` Thomas Monjalon
@ 2017-10-12  5:39  0%                 ` Shreyansh Jain
  2017-10-12 13:20  0%                   ` Aaron Conole
  1 sibling, 1 reply; 200+ results
From: Shreyansh Jain @ 2017-10-12  5:39 UTC (permalink / raw)
  To: Aaron Conole; +Cc: Don Provan, Jan Blunck, Thomas Monjalon, dev, Hemant Agrawal

Hello Aaron,

On Tuesday 10 October 2017 09:30 PM, Aaron Conole wrote:
> Shreyansh Jain <shreyansh.jain@nxp.com> writes:
> 
>> Hello Don,
>>

[snip]

>>>
>>> These practical problems confirm to me that the failure of a bus
>>> scan is more of a strategic issue: when asking "which devices can
>>> I use?", "none" is a perfectly valid answer that does not seem
>>> like an error to me even when a failed bus scan is the reason for
>>> that answer.
>>
>> I agree with this.
>>
>>>
>>>   From the application's point of view, the potential error here
>>> is that the device it wants to use isn't available. I don't see that
>>> either the init function or the probe function will have enough
>>> information to understand that application-level problem, so
>>> they should leave it to the application to detect it.
>>
>> I think I understand you comment but just want to cross check again:
>> Scan or probe error should simply be ignored by EAL layer and let the
>> application take stance when it detects that the device it was looking
>> for is missing. Is my understanding correct?
>>
>> I am trying to come a conclusion so that this patch can either be
>> modified or pushed as it is. If the above understanding is correct, I
>> don't see any changes required in the patch.
> 
> Does it make sense to introduce a way to query the results of the
> various bus types for their status?  That way we can give the relevant
> information to the application if it wants, and make the bus scanning
> code *always* succeed?  This version shouldn't be an ABI breakage,
> either (confirm?).
> 
> half-baked below (not tested or suitable - just an example):
> 
> ---
> diff --git a/lib/librte_eal/common/eal_common_bus.c b/lib/librte_eal/common/eal_common_bus.c
> index a30a898..cd1ef1e 100644
> --- a/lib/librte_eal/common/eal_common_bus.c
> +++ b/lib/librte_eal/common/eal_common_bus.c
> @@ -38,9 +38,23 @@
>   
>   #include "eal_private.h"
>   
> +struct rte_bus_failure {
> +	struct rte_bus *bus;
> +	int err;
> +};
> +
>   struct rte_bus_list rte_bus_list =
>   	TAILQ_HEAD_INITIALIZER(rte_bus_list);
>   
> +TAILQ_HEAD(rte_bus_scan_failure_list, rte_bus_failure);
> +struct rte_bus_scan_failure_list rte_bus_scan_failure_list =
> +	TAILQ_HEAD_INITIALIZER(rte_bus_failure);
> +
> +TAILQ_HEAD(rte_bus_probe_failure_list, rte_bus_failure);
> +struct rte_bus_probe_failure_list rte_bus_probe_failure_list =
> +	TAILQ_HEAD_INITIALIZER(rte_bus_failure);
> +
> +
>   void
>   rte_bus_register(struct rte_bus *bus)
>   {
> @@ -64,6 +78,26 @@ rte_bus_unregister(struct rte_bus *bus)
>   	RTE_LOG(DEBUG, EAL, "Unregistered [%s] bus.\n", bus->name);
>   }
>   
> +static void
> +rte_bus_append_failed_scan(struct rte_bus *bus, int ret)
> +{
> +	struct rte_bus_failure *f = malloc(sizeof(struct rte_bus_failure));
> +	if (!f) abort();
> +	f->bus = bus;
> +	f->ret = ret;
> +	TAILQ_INSERT_TAIL(&rte_bus_scan_failure_list, f, next);
> +}
> +
> +static void
> +rte_bus_append_failed_scan(struct rte_bus *bus, int ret)
> +{
> +	struct rte_bus_failure *f = malloc(sizeof(struct rte_bus_failure));
> +	if (!f) abort();
> +	f->bus = bus;
> +	f->ret = ret;
> +	TAILQ_INSERT_TAIL(&rte_bus_probe_failure_list, f, next);
> +}
> +
>   /* Scan all the buses for registered devices */
>   int
>   rte_bus_scan(void)
> @@ -76,13 +110,33 @@ rte_bus_scan(void)
>   		if (ret) {
>   			RTE_LOG(ERR, EAL, "Scan for (%s) bus failed.\n",
>   				bus->name);
> -			return ret;
> +			rte_bus_append_failed_scan(bus, ret);
>   		}
>   	}
>   
>   	return 0;
>   }
>   
> +/* Seek through scan failures */
> +void
> +rte_bus_scan_errors(rte_bus_error_callback cb)
> +{
> +	struct rte_bus_failure *f = NULL;
> +	TAILQ_FOREACH(f, &rte_bus_scan_failure_list, next) {
> +		cb(f->bus, f->ret);
> +	}
> +}
> +
> +/* Seek through probe failures */
> +void
> +rte_bus_probe_errors(rte_bus_error_callback cb)
> +{
> +	struct rte_bus_failure *f = NULL;
> +	TAILQ_FOREACH(f, &rte_bus_probe_failure_list, next) {
> +		cb(f->bus, f->ret);
> +	}
> +}
> +
>   /* Probe all devices of all buses */
>   int
>   rte_bus_probe(void)
> @@ -100,7 +154,7 @@ rte_bus_probe(void)
>   		if (ret) {
>   			RTE_LOG(ERR, EAL, "Bus (%s) probe failed.\n",
>   				bus->name);
> -			return ret;
> +            rte_bus_append_failed_probe(bus, ret);
>   		}
>   	}
>   
> @@ -109,7 +163,7 @@ rte_bus_probe(void)
>   		if (ret) {
>   			RTE_LOG(ERR, EAL, "Bus (%s) probe failed.\n",
>   				vbus->name);
> -			return ret;
> +            rte_bus_append_failed_probe(bus, ret);
>   		}
>   	}
>   
> diff --git a/lib/librte_eal/common/include/rte_bus.h b/lib/librte_eal/common/include/rte_bus.h
> index 6fb0834..daddb28 100644
> --- a/lib/librte_eal/common/include/rte_bus.h
> +++ b/lib/librte_eal/common/include/rte_bus.h
> @@ -231,6 +231,20 @@ void rte_bus_register(struct rte_bus *bus);
>    */
>   void rte_bus_unregister(struct rte_bus *bus);
>   
> +typedef void (*rte_bus_error_callback)(struct rte_bus *bus, int err);
> +
> +/**
> + * Search through all buses, invoking cb for each bus which reports scan
> + * error.
> + */
> +void rte_bus_scan_errors(rte_bus_error_callback cb);
> +
> +/**
> + * Search through all buses, invoking cb for each bus which reports scan
> + * error.
> + */
> +void rte_bus_probe_errors(rte_bus_error_callback cb);
> +
>   /**
>    * Scan all the buses.
>    *
> 

I am assuming that that aim of this is to have a way so that application 
can query whether its device of interest is there or not. But, I think 
this (creating a list of scan errrors) would be overkill.

Even if we were to create a list of errors from scan/probe, how would 
that help an application? Is there some specific use-case that you are 
hinting at?

Application should worry about devices rather than how they are being 
detected (scan/probe etc). Application can use API like 
rte_eth_dev_get_port_by_name to query its specific device of interest. 
If the scan has failed, this API would be sufficient for the application 
to take counter-measures. Isn't that enough from a DPDK application 
perspective to move from init to I/O?

I am not discounting that there might be some higher use-cases where 
this list might come of us - but I can't think of one right now and I 
can't comment on this proposal in absence of that understanding - sorry.

^ permalink raw reply	[relevance 0%]

* [dpdk-dev] [PATCH v4 16/16] doc: add notes on EAL PCI API update
  @ 2017-10-12  8:17  4%     ` Gaetan Rivet
    1 sibling, 0 replies; 200+ results
From: Gaetan Rivet @ 2017-10-12  8:17 UTC (permalink / raw)
  To: dev; +Cc: Gaetan Rivet

Add a section related to EAL API changes to 17.11 release notes.

Signed-off-by: Gaetan Rivet <gaetan.rivet@6wind.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
---
 doc/guides/rel_notes/release_17_11.rst | 28 ++++++++++++++++++++++++++++
 1 file changed, 28 insertions(+)

diff --git a/doc/guides/rel_notes/release_17_11.rst b/doc/guides/rel_notes/release_17_11.rst
index 63b9869..ed3d6d8 100644
--- a/doc/guides/rel_notes/release_17_11.rst
+++ b/doc/guides/rel_notes/release_17_11.rst
@@ -232,6 +232,34 @@ API Changes
   By this way PMDs can return an error value in case of failure at stats
   getting process time.
 
+* **PCI bus API moved outside of the EAL**
+
+  The PCI bus previously implemented within the EAL has been moved.
+  A first part has been added as an RTE library providing PCI helpers to
+  parse device locations or other such utilities.
+  A second part consisting in the actual bus driver has been moved to its
+  proper subdirectory, without changing its functionalities.
+
+  As such, several PCI-related functions are not proposed by the EAL anymore:
+
+  * rte_pci_detach
+  * rte_pci_dump
+  * rte_pci_ioport_map
+  * rte_pci_ioport_read
+  * rte_pci_ioport_unmap
+  * rte_pci_ioport_write
+  * rte_pci_map_device
+  * rte_pci_probe
+  * rte_pci_probe_one
+  * rte_pci_read_config
+  * rte_pci_register
+  * rte_pci_scan
+  * rte_pci_unmap_device
+  * rte_pci_unregister
+  * rte_pci_write_config
+
+  These functions are made available either as part of ``librte_pci`` or
+  ``librte_bus_pci``.
 
 ABI Changes
 -----------
-- 
2.1.4

^ permalink raw reply	[relevance 4%]

* [dpdk-dev] [PATCH v1 0/8] Bus control framework
@ 2017-10-12  8:18  4% Gaetan Rivet
  2017-10-12  8:18  4% ` [dpdk-dev] [PATCH v1 2/8] bus: introduce opaque " Gaetan Rivet
  0 siblings, 1 reply; 200+ results
From: Gaetan Rivet @ 2017-10-12  8:18 UTC (permalink / raw)
  To: dev; +Cc: Gaetan Rivet

Probing policy was introduced in the previous release as a configuration item.
It was thus added to the generic bus structure, breaking its ABI.

In this release, the IOVA mode can be read from a bus to configure the
EAL. This new configuration element also broke the bus ABI when it was
added.

As new operators had to be implemented for the probe policy item, these
patches were developed to help mitigate this issue.

This control framework allows to expand the rte_bus API without breaking
its ABI. It is meant to be used with configuration elements that may
only be valid for a few buses, while the others would remain untouched
and unaware of the evolution.

A central control operator is used, similarly to the working of rte_flow
API in the ether layer. Each driver thus chooses to expose a set of
operators relevant to its implementation. The caller is then free to use
those if they are available.

Both Probe mode and IOVA mode operators are implemented for the PCI bus.

This patchset depends on:

Move PCI away from the EAL
http://dpdk.org/ml/archives/dev/2017-August/073512.html

Gaetan Rivet (8):
  bus: rename scan policy as probe policy
  bus: introduce opaque control framework
  bus: remove probe mode configuration structure
  bus: add probe mode setter
  bus/pci: implement ctrl operator
  bus: add IOVA mode as a ctrl operation
  bus/pci: implement IOVA mode getter
  bus: remove redundant IOVA mode getter

 drivers/bus/pci/bsd/pci.c                       |   9 +-
 drivers/bus/pci/include/rte_bus_pci.h           |  12 +--
 drivers/bus/pci/linux/pci.c                     |  20 ++--
 drivers/bus/pci/pci_common.c                    |  53 +++++++++-
 drivers/bus/pci/private.h                       |  13 +++
 lib/librte_eal/bsdapp/eal/rte_eal_version.map   |   1 -
 lib/librte_eal/common/eal_common_bus.c          |  57 +++++++++--
 lib/librte_eal/common/eal_common_devargs.c      |   8 --
 lib/librte_eal/common/eal_common_options.c      |  17 +---
 lib/librte_eal/common/include/rte_bus.h         | 127 ++++++++++++++++--------
 lib/librte_eal/linuxapp/eal/rte_eal_version.map |   1 -
 11 files changed, 222 insertions(+), 96 deletions(-)

-- 
2.1.4

^ permalink raw reply	[relevance 4%]

* [dpdk-dev] [PATCH v1 2/8] bus: introduce opaque control framework
  2017-10-12  8:18  4% [dpdk-dev] [PATCH v1 0/8] Bus control framework Gaetan Rivet
@ 2017-10-12  8:18  4% ` Gaetan Rivet
  0 siblings, 0 replies; 200+ results
From: Gaetan Rivet @ 2017-10-12  8:18 UTC (permalink / raw)
  To: dev; +Cc: Gaetan Rivet

New configuration elements are added to the buses. They make the ABI
unstable and will continue to do so.

This new control scheme allows to add new bus operators without
breaking the ABI and by only expanding the API.

This helps having more stability in core EAL subsystems, while allowing
flexibility for future evolutions.

Signed-off-by: Gaetan Rivet <gaetan.rivet@6wind.com>
---
 lib/librte_eal/common/eal_common_bus.c  |  9 +++++++
 lib/librte_eal/common/include/rte_bus.h | 46 +++++++++++++++++++++++++++++++++
 2 files changed, 55 insertions(+)

diff --git a/lib/librte_eal/common/eal_common_bus.c b/lib/librte_eal/common/eal_common_bus.c
index 3c66a02..65d7229 100644
--- a/lib/librte_eal/common/eal_common_bus.c
+++ b/lib/librte_eal/common/eal_common_bus.c
@@ -42,6 +42,13 @@
 struct rte_bus_list rte_bus_list =
 	TAILQ_HEAD_INITIALIZER(rte_bus_list);
 
+static rte_bus_ctrl_t
+rte_bus_default_ctrl(enum rte_bus_ctrl_op op __rte_unused,
+		     enum rte_bus_ctrl_item item __rte_unused)
+{
+	return NULL;
+}
+
 void
 rte_bus_register(struct rte_bus *bus)
 {
@@ -53,6 +60,8 @@ rte_bus_register(struct rte_bus *bus)
 	RTE_VERIFY(bus->find_device);
 	/* Buses supporting driver plug also require unplug. */
 	RTE_VERIFY(!bus->plug || bus->unplug);
+	if (bus->ctrl == NULL)
+		bus->ctrl = &rte_bus_default_ctrl;
 
 	TAILQ_INSERT_TAIL(&rte_bus_list, bus, next);
 	RTE_LOG(DEBUG, EAL, "Registered [%s] bus.\n", bus->name);
diff --git a/lib/librte_eal/common/include/rte_bus.h b/lib/librte_eal/common/include/rte_bus.h
index 331d954..bd3c28e 100644
--- a/lib/librte_eal/common/include/rte_bus.h
+++ b/lib/librte_eal/common/include/rte_bus.h
@@ -183,6 +183,51 @@ struct rte_bus_conf {
 	enum rte_bus_probe_mode probe_mode; /**< Probe policy. */
 };
 
+/**
+ * Bus configuration items.
+ */
+enum rte_bus_ctrl_item {
+	RTE_BUS_CTRL_PROBE_MODE = 0,
+	RTE_BUS_CTRL_ITEM_MAX,
+};
+
+/**
+ * Bus configuration operations.
+ */
+enum rte_bus_ctrl_op {
+	RTE_BUS_CTRL_GET = 0,
+	RTE_BUS_CTRL_SET,
+	RTE_BUS_CTRL_RESET,
+	RTE_BUS_CTRL_OP_MAX,
+};
+
+/**
+ * Operator for a particular rte_bus configuration item.
+ *
+ * @param arg
+ *    Operation parameter.
+ *
+ * @return
+ *	0 on success
+ *	!0 otherwise
+ */
+typedef int (*rte_bus_ctrl_t)(void *arg);
+
+/**
+ * Accessor to bus configuration operators.
+ *
+ * @param op
+ *	Operation type.
+ *
+ * @param item
+ *	Operation element.
+ *
+ * @return
+ *	Operator function on success.
+ *	NULL if this item is not supported.
+ */
+typedef rte_bus_ctrl_t (*rte_bus_ctrl_get_t)(enum rte_bus_ctrl_op op,
+					     enum rte_bus_ctrl_item item);
 
 /**
  * Get common iommu class of the all the devices on the bus. The bus may
@@ -211,6 +256,7 @@ struct rte_bus {
 	rte_bus_parse_t parse;       /**< Parse a device name */
 	struct rte_bus_conf conf;    /**< Bus configuration */
 	rte_bus_get_iommu_class_t get_iommu_class; /**< Get iommu class */
+	rte_bus_ctrl_get_t ctrl;     /**< Get control operators */
 };
 
 /**
-- 
2.1.4

^ permalink raw reply	[relevance 4%]

* [dpdk-dev] [PATCH v2 18/18] doc: remove devargs deprecation notices
  @ 2017-10-12  8:21 10%   ` Gaetan Rivet
    1 sibling, 0 replies; 200+ results
From: Gaetan Rivet @ 2017-10-12  8:21 UTC (permalink / raw)
  To: dev; +Cc: Gaetan Rivet

These actions have been enacted.

Signed-off-by: Gaetan Rivet <gaetan.rivet@6wind.com>
---
 doc/guides/rel_notes/deprecation.rst | 13 -------------
 1 file changed, 13 deletions(-)

diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst
index ef2264f..23faa19 100644
--- a/doc/guides/rel_notes/deprecation.rst
+++ b/doc/guides/rel_notes/deprecation.rst
@@ -16,19 +16,6 @@ Deprecation Notices
   - ``rte_set_log_type``, replaced by ``rte_log_set_level``
   - ``rte_get_log_type``, replaced by ``rte_log_get_level``
 
-* eal: several API and ABI changes are planned for ``rte_devargs`` in v17.11.
-  The format of device command line parameters will change. The bus will need
-  to be explicitly stated in the device declaration. The enum ``rte_devtype``
-  was used to identify a bus and will disappear.
-  The structure ``rte_devargs`` will change.
-  The ``rte_devargs_list`` will be made private.
-  The following functions are deprecated starting from 17.08 and will either be
-  modified or removed in 17.11:
-
-  - ``rte_eal_devargs_add``
-  - ``rte_eal_devargs_type_count``
-  - ``rte_eal_parse_devargs_str``, replaced by ``rte_eal_devargs_parse``
-
 * eal: An ABI change is planned for 17.11 to make DPDK aware of IOVA address
   translation scheme.
   Reference to phys address in EAL data-structure or functions may change to
-- 
2.1.4

^ permalink raw reply	[relevance 10%]

* Re: [dpdk-dev] [PATCH 1/2] reorder: fix ready buffers not being nulled out
  @ 2017-10-12  8:32  3% ` Bruce Richardson
  0 siblings, 0 replies; 200+ results
From: Bruce Richardson @ 2017-10-12  8:32 UTC (permalink / raw)
  To: Pavan Nikhilesh; +Cc: reshma.pattan, dev

On Tue, Sep 12, 2017 at 08:36:03PM +0530, Pavan Nikhilesh wrote:
> The ready buffers should be set to NULL when drained else it might
> result in double free (mempool put) when rte_reorder_free is called.
> 
> Fixes: b70b56032bff ("reorder: new library")
> 
> Signed-off-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com> ---
> lib/librte_reorder/rte_reorder.c | 1 + 1 file changed, 1 insertion(+)
> 
Rather than having an addition write for each entry going through the
reorder library, it should be possible to change free function so that
it only frees entries based on the index values.

In fact, a better solution to having reorder_free just blindly free the
mbufs would be to have reorder_free hand them back to the application,
or allow reorder_free to fail if the reorder buffer is non-empty. Making
such a change would be an ABI break, though.

/Bruce

^ permalink raw reply	[relevance 3%]

* [dpdk-dev] [PATCH v5 19/20] doc: add notes on EAL PCI API update
  @ 2017-10-12 10:45  4%       ` Gaetan Rivet
    1 sibling, 0 replies; 200+ results
From: Gaetan Rivet @ 2017-10-12 10:45 UTC (permalink / raw)
  To: dev; +Cc: Gaetan Rivet

Add a section related to EAL API changes to 17.11 release notes.

Signed-off-by: Gaetan Rivet <gaetan.rivet@6wind.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
---
 doc/guides/rel_notes/release_17_11.rst | 28 ++++++++++++++++++++++++++++
 1 file changed, 28 insertions(+)

diff --git a/doc/guides/rel_notes/release_17_11.rst b/doc/guides/rel_notes/release_17_11.rst
index 63b9869..ed3d6d8 100644
--- a/doc/guides/rel_notes/release_17_11.rst
+++ b/doc/guides/rel_notes/release_17_11.rst
@@ -232,6 +232,34 @@ API Changes
   By this way PMDs can return an error value in case of failure at stats
   getting process time.
 
+* **PCI bus API moved outside of the EAL**
+
+  The PCI bus previously implemented within the EAL has been moved.
+  A first part has been added as an RTE library providing PCI helpers to
+  parse device locations or other such utilities.
+  A second part consisting in the actual bus driver has been moved to its
+  proper subdirectory, without changing its functionalities.
+
+  As such, several PCI-related functions are not proposed by the EAL anymore:
+
+  * rte_pci_detach
+  * rte_pci_dump
+  * rte_pci_ioport_map
+  * rte_pci_ioport_read
+  * rte_pci_ioport_unmap
+  * rte_pci_ioport_write
+  * rte_pci_map_device
+  * rte_pci_probe
+  * rte_pci_probe_one
+  * rte_pci_read_config
+  * rte_pci_register
+  * rte_pci_scan
+  * rte_pci_unmap_device
+  * rte_pci_unregister
+  * rte_pci_write_config
+
+  These functions are made available either as part of ``librte_pci`` or
+  ``librte_bus_pci``.
 
 ABI Changes
 -----------
-- 
2.1.4

^ permalink raw reply	[relevance 4%]

* Re: [dpdk-dev] [PATCH] eal: bus scan and probe never fail
  2017-10-11 22:34  0%                 ` Thomas Monjalon
@ 2017-10-12 13:08  0%                   ` Aaron Conole
  0 siblings, 0 replies; 200+ results
From: Aaron Conole @ 2017-10-12 13:08 UTC (permalink / raw)
  To: Thomas Monjalon
  Cc: dev, Shreyansh Jain, Don Provan, Jan Blunck, Hemant Agrawal

Thomas Monjalon <thomas@monjalon.net> writes:

> 10/10/2017 18:00, Aaron Conole:
>> Shreyansh Jain <shreyansh.jain@nxp.com> writes:
>> 
>> > Hello Don,
>> >
>> > On Monday 09 October 2017 11:51 PM, Don Provan wrote:
>> >>> -----Original Message-----
>> >>> From: Shreyansh Jain [mailto:shreyansh.jain@nxp.com]
>> >>> Sent: Monday, October 09, 2017 4:10 AM
>> >>> To: Jan Blunck <jblunck@infradead.org>; Thomas Monjalon
>> >>> <thomas@monjalon.net>
>> >>> Cc: dev <dev@dpdk.org>; Hemant Agrawal <hemant.agrawal@nxp.com>
>> >>> Subject: Re: [dpdk-dev] [PATCH] eal: bus scan and probe never fail
>> >>>
>> >>> ...
>> >>> This is where I have disagreement/doubt.
>> >>> Reporting error code from rte_bus_scan would do two things:
>> >>>
>> >>> 1. rte_eal_init is not designed to ignore/log-only these errors - it
>> >>> would quit initialization. (But, this can be changed)
>> >>> 2. What should rte_eal_init do with this error? rte_bus_scan would have
>> >>> already printed the problematic bus->scan() failure.
>> >>
>> >> These practical problems confirm to me that the failure of a bus
>> >> scan is more of a strategic issue: when asking "which devices can
>> >> I use?", "none" is a perfectly valid answer that does not seem
>> >> like an error to me even when a failed bus scan is the reason for
>> >> that answer.
>> >
>> > I agree with this.
>> >
>> >>
>> >>  From the application's point of view, the potential error here
>> >> is that the device it wants to use isn't available. I don't see that
>> >> either the init function or the probe function will have enough
>> >> information to understand that application-level problem, so
>> >> they should leave it to the application to detect it.
>> >
>> > I think I understand you comment but just want to cross check again:
>> > Scan or probe error should simply be ignored by EAL layer and let the
>> > application take stance when it detects that the device it was looking
>> > for is missing. Is my understanding correct?
>> >
>> > I am trying to come a conclusion so that this patch can either be
>> > modified or pushed as it is. If the above understanding is correct, I
>> > don't see any changes required in the patch.
>> 
>> Does it make sense to introduce a way to query the results of the
>> various bus types for their status?  That way we can give the relevant
>> information to the application if it wants, and make the bus scanning
>> code *always* succeed?  This version shouldn't be an ABI breakage,
>> either (confirm?).
>> 
>> half-baked below (not tested or suitable - just an example):
>
> We are going to need notification callbacks for scan and probe anyway.
> I think errors could be also notified with callbacks?

Definitely.  That's part of my half-baked patch.  Call the error check
function and get a callback.  There's probably a better way to do it
than my patch.

^ permalink raw reply	[relevance 0%]

* Re: [dpdk-dev] [PATCH] eal: bus scan and probe never fail
  2017-10-12  5:39  0%                 ` Shreyansh Jain
@ 2017-10-12 13:20  0%                   ` Aaron Conole
  0 siblings, 0 replies; 200+ results
From: Aaron Conole @ 2017-10-12 13:20 UTC (permalink / raw)
  To: Shreyansh Jain
  Cc: Don Provan, Jan Blunck, Thomas Monjalon, dev, Hemant Agrawal

Shreyansh Jain <shreyansh.jain@nxp.com> writes:

> Hello Aaron,
>
> On Tuesday 10 October 2017 09:30 PM, Aaron Conole wrote:
>> Shreyansh Jain <shreyansh.jain@nxp.com> writes:
>>
>>> Hello Don,
>>>
>
> [snip]
>
>>>>
>>>> These practical problems confirm to me that the failure of a bus
>>>> scan is more of a strategic issue: when asking "which devices can
>>>> I use?", "none" is a perfectly valid answer that does not seem
>>>> like an error to me even when a failed bus scan is the reason for
>>>> that answer.
>>>
>>> I agree with this.
>>>
>>>>
>>>>   From the application's point of view, the potential error here
>>>> is that the device it wants to use isn't available. I don't see that
>>>> either the init function or the probe function will have enough
>>>> information to understand that application-level problem, so
>>>> they should leave it to the application to detect it.
>>>
>>> I think I understand you comment but just want to cross check again:
>>> Scan or probe error should simply be ignored by EAL layer and let the
>>> application take stance when it detects that the device it was looking
>>> for is missing. Is my understanding correct?
>>>
>>> I am trying to come a conclusion so that this patch can either be
>>> modified or pushed as it is. If the above understanding is correct, I
>>> don't see any changes required in the patch.
>>
>> Does it make sense to introduce a way to query the results of the
>> various bus types for their status?  That way we can give the relevant
>> information to the application if it wants, and make the bus scanning
>> code *always* succeed?  This version shouldn't be an ABI breakage,
>> either (confirm?).
>>
>> half-baked below (not tested or suitable - just an example):
>>
>> ---
>> diff --git a/lib/librte_eal/common/eal_common_bus.c b/lib/librte_eal/common/eal_common_bus.c
>> index a30a898..cd1ef1e 100644
>> --- a/lib/librte_eal/common/eal_common_bus.c
>> +++ b/lib/librte_eal/common/eal_common_bus.c
>> @@ -38,9 +38,23 @@
>>     #include "eal_private.h"
>>   +struct rte_bus_failure {
>> +	struct rte_bus *bus;
>> +	int err;
>> +};
>> +
>>   struct rte_bus_list rte_bus_list =
>>   	TAILQ_HEAD_INITIALIZER(rte_bus_list);
>>   +TAILQ_HEAD(rte_bus_scan_failure_list, rte_bus_failure);
>> +struct rte_bus_scan_failure_list rte_bus_scan_failure_list =
>> +	TAILQ_HEAD_INITIALIZER(rte_bus_failure);
>> +
>> +TAILQ_HEAD(rte_bus_probe_failure_list, rte_bus_failure);
>> +struct rte_bus_probe_failure_list rte_bus_probe_failure_list =
>> +	TAILQ_HEAD_INITIALIZER(rte_bus_failure);
>> +
>> +
>>   void
>>   rte_bus_register(struct rte_bus *bus)
>>   {
>> @@ -64,6 +78,26 @@ rte_bus_unregister(struct rte_bus *bus)
>>   	RTE_LOG(DEBUG, EAL, "Unregistered [%s] bus.\n", bus->name);
>>   }
>>   +static void
>> +rte_bus_append_failed_scan(struct rte_bus *bus, int ret)
>> +{
>> +	struct rte_bus_failure *f = malloc(sizeof(struct rte_bus_failure));
>> +	if (!f) abort();
>> +	f->bus = bus;
>> +	f->ret = ret;
>> +	TAILQ_INSERT_TAIL(&rte_bus_scan_failure_list, f, next);
>> +}
>> +
>> +static void
>> +rte_bus_append_failed_scan(struct rte_bus *bus, int ret)
>> +{
>> +	struct rte_bus_failure *f = malloc(sizeof(struct rte_bus_failure));
>> +	if (!f) abort();
>> +	f->bus = bus;
>> +	f->ret = ret;
>> +	TAILQ_INSERT_TAIL(&rte_bus_probe_failure_list, f, next);
>> +}
>> +
>>   /* Scan all the buses for registered devices */
>>   int
>>   rte_bus_scan(void)
>> @@ -76,13 +110,33 @@ rte_bus_scan(void)
>>   		if (ret) {
>>   			RTE_LOG(ERR, EAL, "Scan for (%s) bus failed.\n",
>>   				bus->name);
>> -			return ret;
>> +			rte_bus_append_failed_scan(bus, ret);
>>   		}
>>   	}
>>     	return 0;
>>   }
>>   +/* Seek through scan failures */
>> +void
>> +rte_bus_scan_errors(rte_bus_error_callback cb)
>> +{
>> +	struct rte_bus_failure *f = NULL;
>> +	TAILQ_FOREACH(f, &rte_bus_scan_failure_list, next) {
>> +		cb(f->bus, f->ret);
>> +	}
>> +}
>> +
>> +/* Seek through probe failures */
>> +void
>> +rte_bus_probe_errors(rte_bus_error_callback cb)
>> +{
>> +	struct rte_bus_failure *f = NULL;
>> +	TAILQ_FOREACH(f, &rte_bus_probe_failure_list, next) {
>> +		cb(f->bus, f->ret);
>> +	}
>> +}
>> +
>>   /* Probe all devices of all buses */
>>   int
>>   rte_bus_probe(void)
>> @@ -100,7 +154,7 @@ rte_bus_probe(void)
>>   		if (ret) {
>>   			RTE_LOG(ERR, EAL, "Bus (%s) probe failed.\n",
>>   				bus->name);
>> -			return ret;
>> +            rte_bus_append_failed_probe(bus, ret);
>>   		}
>>   	}
>>   @@ -109,7 +163,7 @@ rte_bus_probe(void)
>>   		if (ret) {
>>   			RTE_LOG(ERR, EAL, "Bus (%s) probe failed.\n",
>>   				vbus->name);
>> -			return ret;
>> +            rte_bus_append_failed_probe(bus, ret);
>>   		}
>>   	}
>>   diff --git a/lib/librte_eal/common/include/rte_bus.h
>> b/lib/librte_eal/common/include/rte_bus.h
>> index 6fb0834..daddb28 100644
>> --- a/lib/librte_eal/common/include/rte_bus.h
>> +++ b/lib/librte_eal/common/include/rte_bus.h
>> @@ -231,6 +231,20 @@ void rte_bus_register(struct rte_bus *bus);
>>    */
>>   void rte_bus_unregister(struct rte_bus *bus);
>>   +typedef void (*rte_bus_error_callback)(struct rte_bus *bus, int
>> err);
>> +
>> +/**
>> + * Search through all buses, invoking cb for each bus which reports scan
>> + * error.
>> + */
>> +void rte_bus_scan_errors(rte_bus_error_callback cb);
>> +
>> +/**
>> + * Search through all buses, invoking cb for each bus which reports scan
>> + * error.
>> + */
>> +void rte_bus_probe_errors(rte_bus_error_callback cb);
>> +
>>   /**
>>    * Scan all the buses.
>>    *
>>
>
> I am assuming that that aim of this is to have a way so that
> application can query whether its device of interest is there or
> not. But, I think this (creating a list of scan errrors) would be
> overkill.

No.  That can be done through a different query.

> Even if we were to create a list of errors from scan/probe, how would
> that help an application? Is there some specific use-case that you are
> hinting at?

Sure.  Let's assume that due to some permissions problem, /proc/bus/pci
doesn't exist for the application.  The entire PCI bus scan fails.  No
PCI devices are found.

In this case, how can the application even start to understand why the
device is missing?  I don't think parsing logs makes sense.  But if
there's a way to see that the PCI bus scan/probe failed, maybe the
application can start making corrective action (for instance, check that
/proc is mounted, and retry the bus probe/scan).

> Application should worry about devices rather than how they are being
> detected (scan/probe etc). Application can use API like
> rte_eth_dev_get_port_by_name to query its specific device of
> interest. If the scan has failed, this API would be sufficient for the
> application to take counter-measures. Isn't that enough from a DPDK
> application perspective to move from init to I/O?

I'm not sure what you're asking here.  I agree that bus probe/scan
shouldn't ever fail, and that we should pass from init to i/o asap.

> I am not discounting that there might be some higher use-cases where
> this list might come of us - but I can't think of one right now and I
> can't comment on this proposal in absence of that understanding -
> sorry.

Maybe the above helps?  Not sure if I described my thinking.

^ permalink raw reply	[relevance 0%]

* Re: [dpdk-dev] [PATCH v1 1/7] ethdev: expose flow API error helper
  2017-10-11 19:05  5%       ` Aaron Conole
@ 2017-10-12 13:37  4%         ` Neil Horman
  2017-10-12 14:02  5%         ` Adrien Mazarguil
  1 sibling, 0 replies; 200+ results
From: Neil Horman @ 2017-10-12 13:37 UTC (permalink / raw)
  To: Aaron Conole
  Cc: Adrien Mazarguil, Thomas Monjalon, dev, Ferruh Yigit, Gaetan Rivet, fbl

On Wed, Oct 11, 2017 at 03:05:47PM -0400, Aaron Conole wrote:
> Adrien Mazarguil <adrien.mazarguil@6wind.com> writes:
> 
> > On Wed, Oct 11, 2017 at 11:23:12AM +0200, Thomas Monjalon wrote:
> >> 05/10/2017 11:49, Adrien Mazarguil:
> >> > rte_flow_error_set() is a convenient helper to initialize error objects.
> >> > 
> >> > Since there is no fundamental reason to prevent applications from using it,
> >> > expose it through the public interface after modifying its return value
> >> > from positive to negative. This is done for consistency with the rest of
> >> > the public interface.
> >> > 
> >> > Documentation is updated accordingly.
> >> > 
> >> > Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
> >> > ---
> >> > --- a/lib/librte_ether/rte_flow.h
> >> > +++ b/lib/librte_ether/rte_flow.h
> >> >  /**
> >> > + * Initialize flow error structure.
> >> > + *
> >> > + * @param[out] error
> >> > + *   Pointer to flow error structure (may be NULL).
> >> > + * @param code
> >> > + *   Related error code (rte_errno).
> >> > + * @param type
> >> > + *   Cause field and error types.
> >> > + * @param cause
> >> > + *   Object responsible for the error.
> >> > + * @param message
> >> > + *   Human-readable error message.
> >> > + *
> >> > + * @return
> >> > + *   Negative error code (errno value) and rte_errno is set.
> >> > + */
> >> > +static inline int
> >> > +rte_flow_error_set(struct rte_flow_error *error,
> >> > +		   int code,
> >> > +		   enum rte_flow_error_type type,
> >> > +		   const void *cause,
> >> > +		   const char *message)
> >> 
> >> When calling this function, the performance is not critical.
> >> So it must not be an inline function.
> >> Please move it to the .c file and add it to the .map file.
> >
> > I'll do it as part of moving this patch into my upcoming series for mlx4,
> > since it relies on the new return value.
> >
> > Now for the record, I believe that static inlines, particularly short ones
> > that are not expected to be modified any time soon (provided they are
> > defined properly that is) are harmless.
> >
> > Yes, that means modifying them, depending on what they do, may cause a
> > global ABI breakage of the underlying library which translates to a major
> > version bump, however exactly the same applies to some macros (in particular
> > the *_MAX ones), structure and other type definitions and so on.
> 
> Sure.  I think if it's small and there's never a chance for it to
> change, then it's okay.  But, as you point out - they are similar to
> macros in that they are code directly added to the application.  There
> is never a way to fix a bug or adjust some semantic behavior without
> requiring a recompile.  That's a strong kind of binding.  Certainly we
> would want that communicated as ABI, regardless of which .h/.c file the
> function exists, yes?
> 
> > What I'm getting at is, making this function part of the .map file won't
> > help all that much with the goal of reaching a stable ABI. Making it a
> > normal function on the other hand successfully prevents PMDs and
> > applications from considering its use in their data plane (flow rules
> > management from the data plane is likely the next step for rte_flow).
> 
> I don't understand this point well.  There are two things - committing
> to a stable ABI, and communicating information about that ABI.  Having
> .map files doesn't do anything for a stable ABI.  It merely
> communicates information.  The stability must come from the developer
> community and maintainers.
> 
> > In my opinion, performance (even if hypothetical) matters more than ABI
> > stability, particularly since the current pattern is for the whole ABI to be
> > broken every other release. I think that with DPDK, ABI stability can only
> > be properly guaranteed in stable/maintenance releases but that effort is
> > vain in the master branch, affected by way too many changes for it to ever
> > become reality. This doesn't mean we shouldn't even try, however we
> > shouldn't restrict ourselves; when the ABI needs to be broken, so be it.
> 
> First, performance isn't hypothetical.  You have code which performs,
> and have measured various metrics to show this, or you don't have data.
> No voodoo required.  Hypothetical isn't even an argument when it comes
> to predictable devices (like computers).  In the case above, you have a
> non-performance critical function.  It's an error function.  It passes
> strings around.  Performance cannot be a consideration here.
> 
> Second, it depends on where you want to view the boundary.  If a change is
> internal to DPDK (meaning, the application is never expected to interact
> with that area of code), then it shouldn't be part of ABI and changing
> it to your hearts content should be fine.
> 
> *rant-on*
> 
> I see lots of projects which use DPDK, but I only know of three or so
> projects which don't directly embed a copy of the DPDK source
> tree.  I think this is a side effect of not having a stable ABI - it's
> not possible to rely on easily upgrading the library, so people just
> pick a version and never upgrade.  That's bad for everyone.  It results
> in fewer contributions, and difficulty getting people to participate.
> There's too much text like "Install DPDK 1.8.0. With other versions is
> not guaranted it works properly" that is embedded in downstream users
> (that comes from an actual project README).  Even at DPDK summit in
> Dublin, one of the most vocal opponents to ABI stability admitted that
> his company takes the code and never contributes it back.  That is
> really not friendly.
> 
> This even has a different side effect - one of market penetration.  It's
> difficult for distributions to support this model.  So, there will be
> one or two packages they might pick up, with one or two versions.
> Everything else is "roll your own."  And when it's more difficult than
> 'apt-get|yum|dnf|foo install' then users don't use it, and the cycle
> continues.
> 
> I'll point out that I can take a number of compiled binaries from 20
> years ago[0], and run on a modern kernel.  I wish I could take a
> binary linked to DPDK from 5 months ago, and run it with today's DPDK.
> I believe that *should* be the goal.  I am confident it's achievable.
> But, I recognize it's hard and requires extra effort.
> 
> Anyway, apologies if I took some bait here, and sorry that I ranted off
> on my own.
> 
I'll add a +1 here.  The degree to which the community is concerned about ABI
stability is reflected in the fact that no two major releases of DPDK have had
compatible ABI's.  While thats somewhat understandable from a developer
perspective (it really doesn't matter if you have a stable ABI if you always use
the latest version, in fact its a hinderance to doing your job), its potentially
catastrophic from a downstream consumer point of view.  No downstream consumer
is going to keep up with the latest version of DPDK on a consistent basis (I'm
going to guess that there are still users of DPDK 2.2 floating out there).  They
just embed a copy, get it working, and move on with their lives.  Thats
seemingly fine for as long as your foot print is small, but the second that you
hit a major bug or security issue in an old version and can't just upgrade the
DPDK without a major engineering effort, thats going to be a big problem, and
users will look elsewhere for a solution that offers both performance and
compatibility.  XDP and iovisor are already gaining ground on the performance
front, and offer that level of upgradability.

Neil

> > (end of rant, thanks for reading)
> 
> [0]: https://www.complang.tuwien.ac.at/anton/linux-binary-compatibility.html

^ permalink raw reply	[relevance 4%]

* Re: [dpdk-dev] [PATCH v1 1/7] ethdev: expose flow API error helper
  2017-10-11 19:05  5%       ` Aaron Conole
  2017-10-12 13:37  4%         ` Neil Horman
@ 2017-10-12 14:02  5%         ` Adrien Mazarguil
  1 sibling, 0 replies; 200+ results
From: Adrien Mazarguil @ 2017-10-12 14:02 UTC (permalink / raw)
  To: Aaron Conole
  Cc: Thomas Monjalon, dev, Ferruh Yigit, Gaetan Rivet, fbl, Neil Horman

On Wed, Oct 11, 2017 at 03:05:47PM -0400, Aaron Conole wrote:
> Adrien Mazarguil <adrien.mazarguil@6wind.com> writes:
> 
> > On Wed, Oct 11, 2017 at 11:23:12AM +0200, Thomas Monjalon wrote:
> >> 05/10/2017 11:49, Adrien Mazarguil:
> >> > rte_flow_error_set() is a convenient helper to initialize error objects.
> >> > 
> >> > Since there is no fundamental reason to prevent applications from using it,
> >> > expose it through the public interface after modifying its return value
> >> > from positive to negative. This is done for consistency with the rest of
> >> > the public interface.
> >> > 
> >> > Documentation is updated accordingly.
> >> > 
> >> > Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
> >> > ---
> >> > --- a/lib/librte_ether/rte_flow.h
> >> > +++ b/lib/librte_ether/rte_flow.h
> >> >  /**
> >> > + * Initialize flow error structure.
> >> > + *
> >> > + * @param[out] error
> >> > + *   Pointer to flow error structure (may be NULL).
> >> > + * @param code
> >> > + *   Related error code (rte_errno).
> >> > + * @param type
> >> > + *   Cause field and error types.
> >> > + * @param cause
> >> > + *   Object responsible for the error.
> >> > + * @param message
> >> > + *   Human-readable error message.
> >> > + *
> >> > + * @return
> >> > + *   Negative error code (errno value) and rte_errno is set.
> >> > + */
> >> > +static inline int
> >> > +rte_flow_error_set(struct rte_flow_error *error,
> >> > +		   int code,
> >> > +		   enum rte_flow_error_type type,
> >> > +		   const void *cause,
> >> > +		   const char *message)
> >> 
> >> When calling this function, the performance is not critical.
> >> So it must not be an inline function.
> >> Please move it to the .c file and add it to the .map file.
> >
> > I'll do it as part of moving this patch into my upcoming series for mlx4,
> > since it relies on the new return value.
> >
> > Now for the record, I believe that static inlines, particularly short ones
> > that are not expected to be modified any time soon (provided they are
> > defined properly that is) are harmless.
> >
> > Yes, that means modifying them, depending on what they do, may cause a
> > global ABI breakage of the underlying library which translates to a major
> > version bump, however exactly the same applies to some macros (in particular
> > the *_MAX ones), structure and other type definitions and so on.
> 
> Sure.  I think if it's small and there's never a chance for it to
> change, then it's okay.  But, as you point out - they are similar to
> macros in that they are code directly added to the application.  There
> is never a way to fix a bug or adjust some semantic behavior without
> requiring a recompile.  That's a strong kind of binding.  Certainly we
> would want that communicated as ABI, regardless of which .h/.c file the
> function exists, yes?

Yes, I entirely agree, I must admit the stated reasons behind my previous
message weren't super clear to begin with as I wrote it after some off-list
discussion.

My point is that static inlines must not be considered harmful for what they
are particularly in a project like DPDK where there is almost always a
performance trade-off depending on the use case. They must be considered on
a case basis, and not be forbidden outright with no possible discussion.

> > What I'm getting at is, making this function part of the .map file won't
> > help all that much with the goal of reaching a stable ABI. Making it a
> > normal function on the other hand successfully prevents PMDs and
> > applications from considering its use in their data plane (flow rules
> > management from the data plane is likely the next step for rte_flow).
> 
> I don't understand this point well.  There are two things - committing
> to a stable ABI, and communicating information about that ABI.  Having
> .map files doesn't do anything for a stable ABI.  It merely
> communicates information.  The stability must come from the developer
> community and maintainers.

Right, nothing against that. I was referring to the fact the .map file in
the case of a shared libray helps with ABI breakage by providing a kind of
run-time error check that ensures an application compiled against an older
version of a symbol is prevented from starting at all, thereby avoiding any
adverse effects later on.

However to benefit from that, some sort of symbol is necessary and that's
only possible on non-inline functions. Since we agree that this, in itself,
doesn't guarantee ABI stability due to other mandatory factors, I think it
cannot be the only ammunition to use against inline functions. Everything
must be considered.

> > In my opinion, performance (even if hypothetical) matters more than ABI
> > stability, particularly since the current pattern is for the whole ABI to be
> > broken every other release. I think that with DPDK, ABI stability can only
> > be properly guaranteed in stable/maintenance releases but that effort is
> > vain in the master branch, affected by way too many changes for it to ever
> > become reality. This doesn't mean we shouldn't even try, however we
> > shouldn't restrict ourselves; when the ABI needs to be broken, so be it.
> 
> First, performance isn't hypothetical.  You have code which performs,
> and have measured various metrics to show this, or you don't have data.
> No voodoo required.  Hypothetical isn't even an argument when it comes
> to predictable devices (like computers).  In the case above, you have a
> non-performance critical function.  It's an error function.  It passes
> strings around.  Performance cannot be a consideration here.
> 
> Second, it depends on where you want to view the boundary.  If a change is
> internal to DPDK (meaning, the application is never expected to interact
> with that area of code), then it shouldn't be part of ABI and changing
> it to your hearts content should be fine.

For the specific case of this function, it basically initializes a
structure. Now that's probably just me, but I believe initializers are a
nice thing to have inline so the compiler can optimize them away wherever it
thinks it's worth a few CPU cycles, somewhat like optimized memcpy's (that
was the possible performance gain I was thinking about).

This function should only change if the target structure changes, the ABI
breakage requiring the major ABI version bump in that case comes from the
structure change, not from the inline function itself.

You have a point with the fact the main change from the original code is the
return value sign update due to bad design. Had it been non-inline, only the
resulting symbol version would have changed, not that of the entire ABI.

Fortunately for this specific case again, that function was neither
versioned nor part of the public facing API until this commit. It would have
been an entirely different story otherwise.

> *rant-on*
> 
> I see lots of projects which use DPDK, but I only know of three or so
> projects which don't directly embed a copy of the DPDK source
> tree.  I think this is a side effect of not having a stable ABI - it's
> not possible to rely on easily upgrading the library, so people just
> pick a version and never upgrade.  That's bad for everyone.  It results
> in fewer contributions, and difficulty getting people to participate.
> There's too much text like "Install DPDK 1.8.0. With other versions is
> not guaranted it works properly" that is embedded in downstream users
> (that comes from an actual project README).  Even at DPDK summit in
> Dublin, one of the most vocal opponents to ABI stability admitted that
> his company takes the code and never contributes it back.  That is
> really not friendly.

I believe all the remaining "bare metal" handling code has been removed by
now, however the fact DPDK started as a framework to embed applications and
not as a shared library to link them against surely didn't help. There's a
lot of design leftovers from this era, such as EAL still snatching argv.

> This even has a different side effect - one of market penetration.  It's
> difficult for distributions to support this model.  So, there will be
> one or two packages they might pick up, with one or two versions.
> Everything else is "roll your own."  And when it's more difficult than
> 'apt-get|yum|dnf|foo install' then users don't use it, and the cycle
> continues.
> 
> I'll point out that I can take a number of compiled binaries from 20
> years ago[0], and run on a modern kernel.  I wish I could take a
> binary linked to DPDK from 5 months ago, and run it with today's DPDK.
> I believe that *should* be the goal.  I am confident it's achievable.
> But, I recognize it's hard and requires extra effort.

I do understand your points and the reasons behind them. My goal and the way
I see things as a PMD developer are likely why we're having this discussion,
so I'd like to summarize why the topic came up on my side:

- DPDK is all about performance *because* without much more performance than
  what can be achieved with a vanilla Linux kernel, it's only a pain to use
  compared to the much more comfortable (and stable) socket() API. Since no
  one would use it, there wouldn't be any market for it.

- Every CPU cycle counts. That makes DPDK difficult to use because we cannot
  get away with a friendly socket()-like API. Almost every aspect can be
  configured to tailor it to an application needs. This was historically
  done at compile time through .config options, now through run-time
  parameters with the unfortunate side effect of causing the number of TX/RX
  burst functions grow dangerously in many PMDs to maintain the same level
  of performance.

- ABI concerns mainly apply to shared libraries [1], which happens to be
  what Linux distributions want to use for very good reasons. The problem is
  that shared libraries, by their very nature are not as efficient thanks to
  PIC, relocations and so on. CPU-bound applications may actually prefer to
  link against static libraries to squeeze a handful more pps; DPDK cannot
  ignore this as it has a measurable performance impact for those.

Basically ABI stability is good, unless we want more performance on top of
more features. There is no end in sight to new features and associated API
changes/ABI breakages.

While I don't want to sound pessimistic, I don't think expecting things to
settle without killing DPDK is a realistic goal. That's why I was taking
maintenance/stable releases as an example; without new features, ABI
stability is almost guaranteed. Efforts could be diverted from the pursuit
of ABI stability in the master branch to improve maintenance ones.

> Anyway, apologies if I took some bait here, and sorry that I ranted off
> on my own.

No worries, I needed to vent a bit myself :)

Note, from the above comments it may not look like it but I'm actually
concerned about API/ABI stability where applicable, that was one of the
reasons behind the design of rte_flow (which can be extended safely without
wrecking ABIs in the process). Unfortunately several bad design choices led
to the need for the obligatory ABI breakage that will have to occur at some
point in the future.

> > (end of rant, thanks for reading)
> 
> [0]: https://www.complang.tuwien.ac.at/anton/linux-binary-compatibility.html

[1] Applications are pretty much guaranteed to be recompiled against static
    ones and encounter issues due to API changes first.

-- 
Adrien Mazarguil
6WIND

^ permalink raw reply	[relevance 5%]

* [dpdk-dev] [PATCH v7 1/4] cryptodev: remove crypto vdev init API
  @ 2017-10-13 11:51  4%   ` Jianfeng Tan
  2017-10-23 10:06  3%     ` De Lara Guarch, Pablo
  0 siblings, 1 reply; 200+ results
From: Jianfeng Tan @ 2017-10-13 11:51 UTC (permalink / raw)
  To: dev
  Cc: jblunck, bruce.richardson, konstantin.ananyev,
	pablo.de.lara.guarch, thomas, yliu, maxime.coquelin, mtetsuyah,
	ferruh.yigit, Jianfeng Tan

Remove rte_cryptodev_create_vdev() for duplication.

Signed-off-by: Jianfeng Tan <jianfeng.tan@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
---
 doc/guides/rel_notes/deprecation.rst           |  5 -----
 doc/guides/rel_notes/release_17_11.rst         |  2 ++
 lib/librte_cryptodev/Makefile                  |  2 +-
 lib/librte_cryptodev/rte_cryptodev.c           |  6 ------
 lib/librte_cryptodev/rte_cryptodev.h           | 17 -----------------
 lib/librte_cryptodev/rte_cryptodev_version.map |  1 -
 6 files changed, 3 insertions(+), 30 deletions(-)

diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst
index f4269f0..85a9287 100644
--- a/doc/guides/rel_notes/deprecation.rst
+++ b/doc/guides/rel_notes/deprecation.rst
@@ -78,11 +78,6 @@ Deprecation Notices
   ``rte_cryptodev`` respectively to support security protocol offloaded
   operations.
 
-* cryptodev: the following function is deprecated starting from 17.08 and will
-  be removed in 17.11:
-
-  - ``rte_cryptodev_create_vdev``
-
 * cryptodev: the following function will be static in 17.11 and included
   by all crypto drivers, therefore, will not be public:
 
diff --git a/doc/guides/rel_notes/release_17_11.rst b/doc/guides/rel_notes/release_17_11.rst
index 6a75ae0..6b405af 100644
--- a/doc/guides/rel_notes/release_17_11.rst
+++ b/doc/guides/rel_notes/release_17_11.rst
@@ -183,6 +183,8 @@ API Changes
 * ``rte_mem_phy2mch`` was used in Xen dom0 to obtain the physical address;
   remove this API as Xen dom0 support was removed.
 
+* ``rte_cryptodev_create_vdev`` was removed to avoid the dependency on vdev
+  in librte_cryptodev; instead, users can call rte_vdev_init() directly.
 
 ABI Changes
 -----------
diff --git a/lib/librte_cryptodev/Makefile b/lib/librte_cryptodev/Makefile
index 59d9a4e..47f466d 100644
--- a/lib/librte_cryptodev/Makefile
+++ b/lib/librte_cryptodev/Makefile
@@ -34,7 +34,7 @@ include $(RTE_SDK)/mk/rte.vars.mk
 LIB = librte_cryptodev.a
 
 # library version
-LIBABIVER := 3
+LIBABIVER := 4
 
 # build flags
 CFLAGS += -O3
diff --git a/lib/librte_cryptodev/rte_cryptodev.c b/lib/librte_cryptodev/rte_cryptodev.c
index 5e8f7f4..f2c55cc 100644
--- a/lib/librte_cryptodev/rte_cryptodev.c
+++ b/lib/librte_cryptodev/rte_cryptodev.c
@@ -377,12 +377,6 @@ rte_cryptodev_get_feature_name(uint64_t flag)
 	}
 }
 
-int
-rte_cryptodev_create_vdev(const char *name, const char *args)
-{
-	return rte_vdev_init(name, args);
-}
-
 struct rte_cryptodev *
 rte_cryptodev_pmd_get_dev(uint8_t dev_id)
 {
diff --git a/lib/librte_cryptodev/rte_cryptodev.h b/lib/librte_cryptodev/rte_cryptodev.h
index ad97ff9..c5d6939 100644
--- a/lib/librte_cryptodev/rte_cryptodev.h
+++ b/lib/librte_cryptodev/rte_cryptodev.h
@@ -433,23 +433,6 @@ struct rte_cryptodev_stats {
 /**< Max length of name of crypto PMD */
 
 /**
- * @deprecated
- *
- * Create a virtual crypto device
- *
- * @param	name	Cryptodev PMD name of device to be created.
- * @param	args	Options arguments for device.
- *
- * @return
- * - On successful creation of the cryptodev the device index is returned,
- *   which will be between 0 and rte_cryptodev_count().
- * - In the case of a failure, returns -1.
- */
-__rte_deprecated
-extern int
-rte_cryptodev_create_vdev(const char *name, const char *args);
-
-/**
  * Get the device identifier for the named crypto device.
  *
  * @param	name	device name to select the device structure.
diff --git a/lib/librte_cryptodev/rte_cryptodev_version.map b/lib/librte_cryptodev/rte_cryptodev_version.map
index abdbbda..b07f4ca 100644
--- a/lib/librte_cryptodev/rte_cryptodev_version.map
+++ b/lib/librte_cryptodev/rte_cryptodev_version.map
@@ -7,7 +7,6 @@ DPDK_16.04 {
 	rte_cryptodev_close;
 	rte_cryptodev_count;
 	rte_cryptodev_configure;
-	rte_cryptodev_create_vdev;
 	rte_cryptodev_get_dev_id;
 	rte_cryptodev_get_feature_name;
 	rte_cryptodev_info_get;
-- 
2.7.4

^ permalink raw reply	[relevance 4%]

* [dpdk-dev] [PATCH V4 3/5] ethdev: add new api for traffic metering and policing
  @ 2017-10-13 12:22  1%   ` Cristian Dumitrescu
  0 siblings, 0 replies; 200+ results
From: Cristian Dumitrescu @ 2017-10-13 12:22 UTC (permalink / raw)
  To: dev
  Cc: thomas, adrien.mazarguil, jingjing.wu, john.mcnamara,
	hemant.agrawal, jerin.jacob, jasvinder.singh

This patch introduces new ethdev generic API for Traffic Metering and
Policing (MTR), which is yet another standard RX offload for Ethernet
devices.

Similar to rte_flow and rte_tm APIs, the configuration of MTR objects is
done in their own namespace (rte_mtr) within the librte_ether library.

Main features:
1. Traffic metering: determine the color for the current packet (green,
   yellow, red) based on history maintained by the MTR object. Supported
   algorithms: srTCM (RFC 2697), trTCM (RFC 2698 and RFC 4115).
2. Policing (per meter output color actions): re-color the packet (keep
   or change the meter output color) or drop the packet.
3. Statistics
4. Capability API

Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
---
Changes in v4:
- Input from Hemant:
	- Added the NONE metering algorithm for meter pass-through mode
	- Reordered stats counter types per pkt and per byte
	- Copyright cosmetics
- Updated ethdev port_id from uint8_t to uint16_t

Changes in v3:
- None

Changes in v2:
- Implemented input from Hemant:
     - Added support for RFC 4115 trTCM algorithm
     - Added support for meter pass-through mode: see API functions
       rte_mtr_meter_enable() and rte_mtr_meter_disable()
- Implemented input from Jerin:
     - Added capability API
- Implemented input from Thomas:
     - Added new API functions under the EXPERIMENTAL section in map file
- Improved the mechanism for MTR object chaining: each MTR object can be
  configured whther to read input color from a previous MTR object in the
  same flow (if any) of from DSCP traslation table
- Improved run-time update functions
- Doxygen: added more descriptions, small fixes

Changes in v1 (from RFC [1]):
- Implemented input from Thomas:
     - Added EXPERIMENTAL tag in rte_mtr.h and MANTAINERS for this new API
- Implemented input from Adrien:
     - Added more Doxygen comments to re-inforce relationship between MTR and
       flow
- Doxygen: added hook in doxy-api-index.md

[1] RFC: http://www.dpdk.org/ml/archives/dev/2017-May/066888.html

 MAINTAINERS                             |   4 +
 doc/api/doxy-api-index.md               |   1 +
 lib/librte_ether/Makefile               |   3 +
 lib/librte_ether/rte_ethdev_version.map |  18 +
 lib/librte_ether/rte_mtr.c              | 229 ++++++++++
 lib/librte_ether/rte_mtr.h              | 730 ++++++++++++++++++++++++++++++++
 lib/librte_ether/rte_mtr_driver.h       | 221 ++++++++++
 7 files changed, 1206 insertions(+)
 create mode 100644 lib/librte_ether/rte_mtr.c
 create mode 100644 lib/librte_ether/rte_mtr.h
 create mode 100644 lib/librte_ether/rte_mtr_driver.h

diff --git a/MAINTAINERS b/MAINTAINERS
index c00d6d8..464ebac 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -255,6 +255,10 @@ M: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
 T: git://dpdk.org/next/dpdk-next-tm
 F: lib/librte_ether/rte_tm*
 
+Traffic Metering and Policing API - EXPERIMENTAL
+M: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
+F: lib/librte_ether/rte_mtr*
+
 Crypto API
 M: Declan Doherty <declan.doherty@intel.com>
 F: lib/librte_cryptodev/
diff --git a/doc/api/doxy-api-index.md b/doc/api/doxy-api-index.md
index 990815f..07d6f4a 100644
--- a/doc/api/doxy-api-index.md
+++ b/doc/api/doxy-api-index.md
@@ -41,6 +41,7 @@ The public API headers are grouped by topics:
   [ethctrl]            (@ref rte_eth_ctrl.h),
   [rte_flow]           (@ref rte_flow.h),
   [rte_tm]             (@ref rte_tm.h),
+  [rte_mtr]            (@ref rte_mtr.h),
   [cryptodev]          (@ref rte_cryptodev.h),
   [eventdev]           (@ref rte_eventdev.h),
   [event_eth_rx_adapter]   (@ref rte_event_eth_rx_adapter.h),
diff --git a/lib/librte_ether/Makefile b/lib/librte_ether/Makefile
index edcddf7..b2a93bf 100644
--- a/lib/librte_ether/Makefile
+++ b/lib/librte_ether/Makefile
@@ -46,6 +46,7 @@ LIBABIVER := 8
 SRCS-y += rte_ethdev.c
 SRCS-y += rte_flow.c
 SRCS-y += rte_tm.c
+SRCS-y += rte_mtr.c
 SRCS-y += ethdev_profile.c
 
 #
@@ -60,5 +61,7 @@ SYMLINK-y-include += rte_flow.h
 SYMLINK-y-include += rte_flow_driver.h
 SYMLINK-y-include += rte_tm.h
 SYMLINK-y-include += rte_tm_driver.h
+SYMLINK-y-include += rte_mtr.h
+SYMLINK-y-include += rte_mtr_driver.h
 
 include $(RTE_SDK)/mk/rte.lib.mk
diff --git a/lib/librte_ether/rte_ethdev_version.map b/lib/librte_ether/rte_ethdev_version.map
index e27f596..bc0bbc5 100644
--- a/lib/librte_ether/rte_ethdev_version.map
+++ b/lib/librte_ether/rte_ethdev_version.map
@@ -196,3 +196,21 @@ DPDK_17.11 {
 	rte_flow_error_set;
 
 } DPDK_17.08;
+
+EXPERIMENTAL {
+	global:
+
+	rte_mtr_capabilities_get;
+	rte_mtr_meter_profile_add;
+	rte_mtr_meter_profile_delete;
+	rte_mtr_create;
+	rte_mtr_destroy;
+	rte_mtr_meter_enable;
+	rte_mtr_meter_disable;
+	rte_mtr_meter_profile_update;
+	rte_mtr_meter_dscp_table_update;
+	rte_mtr_policer_actions_update;
+	rte_mtr_stats_update;
+	rte_mtr_stats_read;
+
+} DPDK_17.11;
diff --git a/lib/librte_ether/rte_mtr.c b/lib/librte_ether/rte_mtr.c
new file mode 100644
index 0000000..4f56f87
--- /dev/null
+++ b/lib/librte_ether/rte_mtr.c
@@ -0,0 +1,229 @@
+/*-
+ *   BSD LICENSE
+ *
+ *   Copyright(c) 2017 Intel Corporation. All rights reserved.
+ *   All rights reserved.
+ *
+ *   Redistribution and use in source and binary forms, with or without
+ *   modification, are permitted provided that the following conditions
+ *   are met:
+ *
+ *     * Redistributions of source code must retain the above copyright
+ *       notice, this list of conditions and the following disclaimer.
+ *     * Redistributions in binary form must reproduce the above copyright
+ *       notice, this list of conditions and the following disclaimer in
+ *       the documentation and/or other materials provided with the
+ *       distribution.
+ *     * Neither the name of Intel Corporation nor the names of its
+ *       contributors may be used to endorse or promote products derived
+ *       from this software without specific prior written permission.
+ *
+ *   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ *   "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ *   LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ *   A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ *   OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ *   LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ *   DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ *   THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ *   (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ *   OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include <stdint.h>
+
+#include <rte_errno.h>
+#include "rte_ethdev.h"
+#include "rte_mtr_driver.h"
+#include "rte_mtr.h"
+
+/* Get generic traffic metering & policing operations structure from a port. */
+const struct rte_mtr_ops *
+rte_mtr_ops_get(uint16_t port_id, struct rte_mtr_error *error)
+{
+	struct rte_eth_dev *dev = &rte_eth_devices[port_id];
+	const struct rte_mtr_ops *ops;
+
+	if (!rte_eth_dev_is_valid_port(port_id)) {
+		rte_mtr_error_set(error,
+			ENODEV,
+			RTE_MTR_ERROR_TYPE_UNSPECIFIED,
+			NULL,
+			rte_strerror(ENODEV));
+		return NULL;
+	}
+
+	if ((dev->dev_ops->mtr_ops_get == NULL) ||
+		(dev->dev_ops->mtr_ops_get(dev, &ops) != 0) ||
+		(ops == NULL)) {
+		rte_mtr_error_set(error,
+			ENOSYS,
+			RTE_MTR_ERROR_TYPE_UNSPECIFIED,
+			NULL,
+			rte_strerror(ENOSYS));
+		return NULL;
+	}
+
+	return ops;
+}
+
+#define RTE_MTR_FUNC(port_id, func)			\
+({							\
+	const struct rte_mtr_ops *ops =			\
+		rte_mtr_ops_get(port_id, error);		\
+	if (ops == NULL)					\
+		return -rte_errno;			\
+							\
+	if (ops->func == NULL)				\
+		return -rte_mtr_error_set(error,		\
+			ENOSYS,				\
+			RTE_MTR_ERROR_TYPE_UNSPECIFIED,	\
+			NULL,				\
+			rte_strerror(ENOSYS));		\
+							\
+	ops->func;					\
+})
+
+/* MTR capabilities get */
+int
+rte_mtr_capabilities_get(uint16_t port_id,
+	struct rte_mtr_capabilities *cap,
+	struct rte_mtr_error *error)
+{
+	struct rte_eth_dev *dev = &rte_eth_devices[port_id];
+	return RTE_MTR_FUNC(port_id, capabilities_get)(dev,
+		cap, error);
+}
+
+/* MTR meter profile add */
+int
+rte_mtr_meter_profile_add(uint16_t port_id,
+	uint32_t meter_profile_id,
+	struct rte_mtr_meter_profile *profile,
+	struct rte_mtr_error *error)
+{
+	struct rte_eth_dev *dev = &rte_eth_devices[port_id];
+	return RTE_MTR_FUNC(port_id, meter_profile_add)(dev,
+		meter_profile_id, profile, error);
+}
+
+/** MTR meter profile delete */
+int
+rte_mtr_meter_profile_delete(uint16_t port_id,
+	uint32_t meter_profile_id,
+	struct rte_mtr_error *error)
+{
+	struct rte_eth_dev *dev = &rte_eth_devices[port_id];
+	return RTE_MTR_FUNC(port_id, meter_profile_delete)(dev,
+		meter_profile_id, error);
+}
+
+/** MTR object create */
+int
+rte_mtr_create(uint16_t port_id,
+	uint32_t mtr_id,
+	struct rte_mtr_params *params,
+	int shared,
+	struct rte_mtr_error *error)
+{
+	struct rte_eth_dev *dev = &rte_eth_devices[port_id];
+	return RTE_MTR_FUNC(port_id, create)(dev,
+		mtr_id, params, shared, error);
+}
+
+/** MTR object destroy */
+int
+rte_mtr_destroy(uint16_t port_id,
+	uint32_t mtr_id,
+	struct rte_mtr_error *error)
+{
+	struct rte_eth_dev *dev = &rte_eth_devices[port_id];
+	return RTE_MTR_FUNC(port_id, destroy)(dev,
+		mtr_id, error);
+}
+
+/** MTR object meter enable */
+int
+rte_mtr_meter_enable(uint16_t port_id,
+	uint32_t mtr_id,
+	struct rte_mtr_error *error)
+{
+	struct rte_eth_dev *dev = &rte_eth_devices[port_id];
+	return RTE_MTR_FUNC(port_id, meter_enable)(dev,
+		mtr_id, error);
+}
+
+/** MTR object meter disable */
+int
+rte_mtr_meter_disable(uint16_t port_id,
+	uint32_t mtr_id,
+	struct rte_mtr_error *error)
+{
+	struct rte_eth_dev *dev = &rte_eth_devices[port_id];
+	return RTE_MTR_FUNC(port_id, meter_disable)(dev,
+		mtr_id, error);
+}
+
+/** MTR object meter profile update */
+int
+rte_mtr_meter_profile_update(uint16_t port_id,
+	uint32_t mtr_id,
+	uint32_t meter_profile_id,
+	struct rte_mtr_error *error)
+{
+	struct rte_eth_dev *dev = &rte_eth_devices[port_id];
+	return RTE_MTR_FUNC(port_id, meter_profile_update)(dev,
+		mtr_id, meter_profile_id, error);
+}
+
+/** MTR object meter DSCP table update */
+int
+rte_mtr_meter_dscp_table_update(uint16_t port_id,
+	uint32_t mtr_id,
+	enum rte_mtr_color *dscp_table,
+	struct rte_mtr_error *error)
+{
+	struct rte_eth_dev *dev = &rte_eth_devices[port_id];
+	return RTE_MTR_FUNC(port_id, meter_dscp_table_update)(dev,
+		mtr_id, dscp_table, error);
+}
+
+/** MTR object policer action update */
+int
+rte_mtr_policer_actions_update(uint16_t port_id,
+	uint32_t mtr_id,
+	uint32_t action_mask,
+	enum rte_mtr_policer_action *actions,
+	struct rte_mtr_error *error)
+{
+	struct rte_eth_dev *dev = &rte_eth_devices[port_id];
+	return RTE_MTR_FUNC(port_id, policer_actions_update)(dev,
+		mtr_id, action_mask, actions, error);
+}
+
+/** MTR object enabled stats update */
+int
+rte_mtr_stats_update(uint16_t port_id,
+	uint32_t mtr_id,
+	uint64_t stats_mask,
+	struct rte_mtr_error *error)
+{
+	struct rte_eth_dev *dev = &rte_eth_devices[port_id];
+	return RTE_MTR_FUNC(port_id, stats_update)(dev,
+		mtr_id, stats_mask, error);
+}
+
+/** MTR object stats read */
+int
+rte_mtr_stats_read(uint16_t port_id,
+	uint32_t mtr_id,
+	struct rte_mtr_stats *stats,
+	uint64_t *stats_mask,
+	int clear,
+	struct rte_mtr_error *error)
+{
+	struct rte_eth_dev *dev = &rte_eth_devices[port_id];
+	return RTE_MTR_FUNC(port_id, stats_read)(dev,
+		mtr_id, stats, stats_mask, clear, error);
+}
diff --git a/lib/librte_ether/rte_mtr.h b/lib/librte_ether/rte_mtr.h
new file mode 100644
index 0000000..f6b6ef3
--- /dev/null
+++ b/lib/librte_ether/rte_mtr.h
@@ -0,0 +1,730 @@
+/*-
+ *   BSD LICENSE
+ *
+ *   Copyright 2017 Intel Corporation
+ *   Copyright 2017 NXP
+ *   Copyright 2017 Cavium
+ *
+ *   Redistribution and use in source and binary forms, with or without
+ *   modification, are permitted provided that the following conditions
+ *   are met:
+ *
+ *     * Redistributions of source code must retain the above copyright
+ *       notice, this list of conditions and the following disclaimer.
+ *     * Redistributions in binary form must reproduce the above copyright
+ *       notice, this list of conditions and the following disclaimer in
+ *       the documentation and/or other materials provided with the
+ *       distribution.
+ *     * Neither the name of Intel Corporation nor the names of its
+ *       contributors may be used to endorse or promote products derived
+ *       from this software without specific prior written permission.
+ *
+ *   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ *   "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ *   LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ *   A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ *   OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ *   LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ *   DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ *   THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ *   (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ *   OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef __INCLUDE_RTE_MTR_H__
+#define __INCLUDE_RTE_MTR_H__
+
+/**
+ * @file
+ * RTE Generic Traffic Metering and Policing API
+ *
+ * This interface provides the ability to configure the traffic metering and
+ * policing (MTR) in a generic way.
+ *
+ * The processing done for each input packet hitting a MTR object is:
+ *    A) Traffic metering: The packet is assigned a color (the meter output
+ *       color), based on the previous history of the flow reflected in the
+ *       current state of the MTR object, according to the specific traffic
+ *       metering algorithm. The traffic metering algorithm can typically work
+ *       in color aware mode, in which case the input packet already has an
+ *       initial color (the input color), or in color blind mode, which is
+ *       equivalent to considering all input packets initially colored as green.
+ *    B) Policing: There is a separate policer action configured for each meter
+ *       output color, which can:
+ *          a) Drop the packet.
+ *          b) Keep the same packet color: the policer output color matches the
+ *             meter output color (essentially a no-op action).
+ *          c) Recolor the packet: the policer output color is different than
+ *             the meter output color.
+ *       The policer output color is the output color of the packet, which is
+ *       set in the packet meta-data (i.e. struct rte_mbuf::sched::color).
+ *    C) Statistics: The set of counters maintained for each MTR object is
+ *       configurable and subject to the implementation support. This set
+ *       includes the number of packets and bytes dropped or passed for each
+ *       output color.
+ *
+ * Once successfully created, an MTR object is linked to one or several flows
+ * through the meter action of the flow API.
+ *    A) Whether an MTR object is private to a flow or potentially shared by
+ *       several flows has to be specified at creation time.
+ *    B) Several meter actions can be potentially registered for the same flow.
+ *
+ * @warning
+ * @b EXPERIMENTAL: this API may change without prior notice
+ */
+#include <stdint.h>
+
+#include <rte_common.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * Color
+ */
+enum rte_mtr_color {
+	RTE_MTR_GREEN = 0, /**< Green */
+	RTE_MTR_YELLOW, /**< Yellow */
+	RTE_MTR_RED, /**< Red */
+	RTE_MTR_COLORS /**< Number of colors. */
+};
+
+/**
+ * Statistics counter type
+ */
+enum rte_mtr_stats_type {
+	/** Number of packets passed as green by the policer. */
+	RTE_MTR_STATS_N_PKTS_GREEN = 1 << 0,
+
+	/** Number of packets passed as yellow by the policer. */
+	RTE_MTR_STATS_N_PKTS_YELLOW = 1 << 1,
+
+	/** Number of packets passed as red by the policer. */
+	RTE_MTR_STATS_N_PKTS_RED = 1 << 2,
+
+	/** Number of packets dropped by the policer. */
+	RTE_MTR_STATS_N_PKTS_DROPPED = 1 << 3,
+
+	/** Number of bytes passed as green by the policer. */
+	RTE_MTR_STATS_N_BYTES_GREEN = 1 << 4,
+
+	/** Number of bytes passed as yellow by the policer. */
+	RTE_MTR_STATS_N_BYTES_YELLOW = 1 << 5,
+
+	/** Number of bytes passed as red by the policer. */
+	RTE_MTR_STATS_N_BYTES_RED = 1 << 6,
+
+	/** Number of bytes dropped by the policer. */
+	RTE_MTR_STATS_N_BYTES_DROPPED = 1 << 7,
+};
+
+/**
+ * Statistics counters
+ */
+struct rte_mtr_stats {
+	/** Number of packets passed by the policer (per color). */
+	uint64_t n_pkts[RTE_MTR_COLORS];
+
+	/** Number of bytes passed by the policer (per color). */
+	uint64_t n_bytes[RTE_MTR_COLORS];
+
+	/** Number of packets dropped by the policer. */
+	uint64_t n_pkts_dropped;
+
+	/** Number of bytes passed by the policer. */
+	uint64_t n_bytes_dropped;
+};
+
+/**
+ * Traffic metering algorithms
+ */
+enum rte_mtr_algorithm {
+	/** No traffic metering performed, the output color is the same as the
+	 * input color for every input packet. The meter of the MTR object is
+	 * working in pass-through mode, having same effect as meter disable.
+	 * @see rte_mtr_meter_disable()
+	 */
+	RTE_MTR_NONE = 0,
+
+	/** Single Rate Three Color Marker (srTCM) - IETF RFC 2697. */
+	RTE_MTR_SRTCM_RFC2697,
+
+	/** Two Rate Three Color Marker (trTCM) - IETF RFC 2698. */
+	RTE_MTR_TRTCM_RFC2698,
+
+	/** Two Rate Three Color Marker (trTCM) - IETF RFC 4115. */
+	RTE_MTR_TRTCM_RFC4115,
+};
+
+/**
+ * Meter profile
+ */
+struct rte_mtr_meter_profile {
+	/** Traffic metering algorithm. */
+	enum rte_mtr_algorithm alg;
+
+	RTE_STD_C11
+	union {
+		/** Items only valid when *alg* is set to srTCM - RFC 2697. */
+		struct {
+			/** Committed Information Rate (CIR) (bytes/second). */
+			uint64_t cir;
+
+			/** Committed Burst Size (CBS) (bytes). */
+			uint64_t cbs;
+
+			/** Excess Burst Size (EBS) (bytes). */
+			uint64_t ebs;
+		} srtcm_rfc2697;
+
+		/** Items only valid when *alg* is set to trTCM - RFC 2698. */
+		struct {
+			/** Committed Information Rate (CIR) (bytes/second). */
+			uint64_t cir;
+
+			/** Peak Information Rate (PIR) (bytes/second). */
+			uint64_t pir;
+
+			/** Committed Burst Size (CBS) (byes). */
+			uint64_t cbs;
+
+			/** Peak Burst Size (PBS) (bytes). */
+			uint64_t pbs;
+		} trtcm_rfc2698;
+
+		/** Items only valid when *alg* is set to trTCM - RFC 4115. */
+		struct {
+			/** Committed Information Rate (CIR) (bytes/second). */
+			uint64_t cir;
+
+			/** Excess Information Rate (EIR) (bytes/second). */
+			uint64_t eir;
+
+			/** Committed Burst Size (CBS) (byes). */
+			uint64_t cbs;
+
+			/** Excess Burst Size (EBS) (bytes). */
+			uint64_t ebs;
+		} trtcm_rfc4115;
+	};
+};
+
+/**
+ * Policer actions
+ */
+enum rte_mtr_policer_action {
+	/** Recolor the packet as green. */
+	MTR_POLICER_ACTION_COLOR_GREEN = 0,
+
+	/** Recolor the packet as yellow. */
+	MTR_POLICER_ACTION_COLOR_YELLOW,
+
+	/** Recolor the packet as red. */
+	MTR_POLICER_ACTION_COLOR_RED,
+
+	/** Drop the packet. */
+	MTR_POLICER_ACTION_DROP,
+};
+
+/**
+ * Parameters for each traffic metering & policing object
+ *
+ * @see enum rte_mtr_stats_type
+ */
+struct rte_mtr_params {
+	/** Meter profile ID. */
+	uint32_t meter_profile_id;
+
+	/** Meter input color in case of MTR object chaining. When non-zero: if
+	 * a previous MTR object is enabled in the same flow, then the color
+	 * determined by the latest MTR object in the same flow is used as the
+	 * input color by the current MTR object, otherwise the current MTR
+	 * object uses the *dscp_table* to determine the input color. When zero:
+	 * the color determined by any previous MTR object in same flow is
+	 * ignored by the current MTR object, which uses the *dscp_table* to
+	 * determine the input color.
+	 */
+	int use_prev_mtr_color;
+
+	/** Meter input color. When non-NULL: it points to a pre-allocated and
+	 * pre-populated table with exactly 64 elements providing the input
+	 * color for each value of the IPv4/IPv6 Differentiated Services Code
+	 * Point (DSCP) input packet field. When NULL: it is equivalent to
+	 * setting this parameter to an all-green populated table (i.e. table
+	 * with all the 64 elements set to green color). The color blind mode
+	 * is configured by setting *use_prev_mtr_color* to 0 and *dscp_table*
+	 * to either NULL or to an all-green populated table. When
+	 * *use_prev_mtr_color* is non-zero value or when *dscp_table* contains
+	 * at least one yellow or red color element, then the color aware mode
+	 * is configured.
+	 */
+	enum rte_mtr_color *dscp_table;
+
+	/** Non-zero to enable the meter, zero to disable the meter at the time
+	 * of MTR object creation. Ignored when the meter profile indicated by
+	 * *meter_profile_id* is set to NONE.
+	 * @see rte_mtr_meter_disable()
+	 */
+	int meter_enable;
+
+	/** Policer actions (per meter output color). */
+	enum rte_mtr_policer_action action[RTE_MTR_COLORS];
+
+	/** Set of stats counters to be enabled.
+	 * @see enum rte_mtr_stats_type
+	 */
+	uint64_t stats_mask;
+};
+
+/**
+ * MTR capabilities
+ */
+struct rte_mtr_capabilities {
+	/** Maximum number of MTR objects. */
+	uint32_t n_max;
+
+	/** Maximum number of MTR objects that can be shared by multiple flows.
+	 * The value of zero indicates that shared MTR objects are not
+	 * supported. The maximum value is *n_max*.
+	 */
+	uint32_t n_shared_max;
+
+	/** When non-zero, this flag indicates that all the MTR objects that
+	 * cannot be shared by multiple flows have identical capability set.
+	 */
+	int identical;
+
+	/** When non-zero, this flag indicates that all the MTR objects that
+	 * can be shared by multiple flows have identical capability set.
+	 */
+	int shared_identical;
+
+	/** Maximum number of flows that can share the same MTR object. The
+	 * value of zero is invalid. The value of 1 means that shared MTR
+	 * objects not supported.
+	 */
+	uint32_t shared_n_flows_per_mtr_max;
+
+	/** Maximum number of MTR objects that can be part of the same flow. The
+	 * value of zero is invalid. The value of 1 indicates that MTR object
+	 * chaining is not supported. The maximum value is *n_max*.
+	 */
+	uint32_t chaining_n_mtrs_per_flow_max;
+
+	/**
+	 * When non-zero, it indicates that the packet color identified by one
+	 * MTR object can be used as the packet input color by any subsequent
+	 * MTR object from the same flow. When zero, it indicates that the color
+	 * determined by one MTR object is always ignored by any subsequent MTR
+	 * object from the same flow. Only valid when MTR chaining is supported,
+	 * i.e. *chaining_n_mtrs_per_flow_max* is greater than 1. When non-zero,
+	 * it also means that the color aware mode is supported by at least one
+	 * metering algorithm.
+	 */
+	int chaining_use_prev_mtr_color_supported;
+
+	/**
+	 * When non-zero, it indicates that the packet color identified by one
+	 * MTR object is always used as the packet input color by any subsequent
+	 * MTR object that is part of the same flow. When zero, it indicates
+	 * that whether the color determined by one MTR object is either ignored
+	 * or used as the packet input color by any subsequent MTR object from
+	 * the same flow is individually configurable for each MTR object. Only
+	 * valid when *chaining_use_prev_mtr_color_supported* is non-zero.
+	 */
+	int chaining_use_prev_mtr_color_enforced;
+
+	/** Maximum number of MTR objects that can have their meter configured
+	 * to run the srTCM RFC 2697 algorithm. The value of 0 indicates this
+	 * metering algorithm is not supported. The maximum value is *n_max*.
+	 */
+	uint32_t meter_srtcm_rfc2697_n_max;
+
+	/** Maximum number of MTR objects that can have their meter configured
+	 * to run the trTCM RFC 2698 algorithm. The value of 0 indicates this
+	 * metering algorithm is not supported. The maximum value is *n_max*.
+	 */
+	uint32_t meter_trtcm_rfc2698_n_max;
+
+	/** Maximum number of MTR objects that can have their meter configured
+	 * to run the trTCM RFC 4115 algorithm. The value of 0 indicates this
+	 * metering algorithm is not supported. The maximum value is *n_max*.
+	 */
+	uint32_t meter_trtcm_rfc4115_n_max;
+
+	/** Maximum traffic rate that can be metered by a single MTR object. For
+	 * srTCM RFC 2697, this is the maximum CIR rate. For trTCM RFC 2698,
+	 * this is the maximum PIR rate. For trTCM RFC 4115, this is the maximum
+	 * value for the sum of PIR and EIR rates.
+	 */
+	uint64_t meter_rate_max;
+
+	/**
+	 * When non-zero, it indicates that color aware mode is supported for
+	 * the srTCM RFC 2697 metering algorithm.
+	 */
+	int color_aware_srtcm_rfc2697_supported;
+
+	/**
+	 * When non-zero, it indicates that color aware mode is supported for
+	 * the trTCM RFC 2698 metering algorithm.
+	 */
+	int color_aware_trtcm_rfc2698_supported;
+
+	/**
+	 * When non-zero, it indicates that color aware mode is supported for
+	 * the trTCM RFC 4115 metering algorithm.
+	 */
+	int color_aware_trtcm_rfc4115_supported;
+
+	/** When non-zero, it indicates that the policer packet recolor actions
+	 * are supported.
+	 * @see enum rte_mtr_policer_action
+	 */
+	int policer_action_recolor_supported;
+
+	/** When non-zero, it indicates that the policer packet drop action is
+	 * supported.
+	 * @see enum rte_mtr_policer_action
+	 */
+	int policer_action_drop_supported;
+
+	/** Set of supported statistics counter types.
+	 * @see enum rte_mtr_stats_type
+	 */
+	uint64_t stats_mask;
+};
+
+/**
+ * Verbose error types.
+ *
+ * Most of them provide the type of the object referenced by struct
+ * rte_mtr_error::cause.
+ */
+enum rte_mtr_error_type {
+	RTE_MTR_ERROR_TYPE_NONE, /**< No error. */
+	RTE_MTR_ERROR_TYPE_UNSPECIFIED, /**< Cause unspecified. */
+	RTE_MTR_ERROR_TYPE_METER_PROFILE_ID,
+	RTE_MTR_ERROR_TYPE_METER_PROFILE,
+	RTE_MTR_ERROR_TYPE_MTR_ID,
+	RTE_MTR_ERROR_TYPE_MTR_PARAMS,
+	RTE_MTR_ERROR_TYPE_POLICER_ACTION_GREEN,
+	RTE_MTR_ERROR_TYPE_POLICER_ACTION_YELLOW,
+	RTE_MTR_ERROR_TYPE_POLICER_ACTION_RED,
+	RTE_MTR_ERROR_TYPE_STATS_MASK,
+	RTE_MTR_ERROR_TYPE_STATS,
+	RTE_MTR_ERROR_TYPE_SHARED,
+};
+
+/**
+ * Verbose error structure definition.
+ *
+ * This object is normally allocated by applications and set by PMDs, the
+ * message points to a constant string which does not need to be freed by
+ * the application, however its pointer can be considered valid only as long
+ * as its associated DPDK port remains configured. Closing the underlying
+ * device or unloading the PMD invalidates it.
+ *
+ * Both cause and message may be NULL regardless of the error type.
+ */
+struct rte_mtr_error {
+	enum rte_mtr_error_type type; /**< Cause field and error type. */
+	const void *cause; /**< Object responsible for the error. */
+	const char *message; /**< Human-readable error message. */
+};
+
+/**
+ * MTR capabilities get
+ *
+ * @param[in] port_id
+ *   The port identifier of the Ethernet device.
+ * @param[out] cap
+ *   MTR capabilities. Needs to be pre-allocated and valid.
+ * @param[out] error
+ *   Error details. Filled in only on error, when not NULL.
+ * @return
+ *   0 on success, non-zero error code otherwise.
+ */
+int
+rte_mtr_capabilities_get(uint16_t port_id,
+	struct rte_mtr_capabilities *cap,
+	struct rte_mtr_error *error);
+
+/**
+ * Meter profile add
+ *
+ * Create a new meter profile with ID set to *meter_profile_id*. The new profile
+ * is used to create one or several MTR objects.
+ *
+ * @param[in] port_id
+ *   The port identifier of the Ethernet device.
+ * @param[in] meter_profile_id
+ *   ID for the new meter profile. Needs to be unused by any of the existing
+ *   meter profiles added for the current port.
+ * @param[in] profile
+ *   Meter profile parameters. Needs to be pre-allocated and valid.
+ * @param[out] error
+ *   Error details. Filled in only on error, when not NULL.
+ * @return
+ *   0 on success, non-zero error code otherwise.
+ */
+int
+rte_mtr_meter_profile_add(uint16_t port_id,
+	uint32_t meter_profile_id,
+	struct rte_mtr_meter_profile *profile,
+	struct rte_mtr_error *error);
+
+/**
+ * Meter profile delete
+ *
+ * Delete an existing meter profile. This operation fails when there is
+ * currently at least one user (i.e. MTR object) of this profile.
+ *
+ * @param[in] port_id
+ *   The port identifier of the Ethernet device.
+ * @param[in] meter_profile_id
+ *   Meter profile ID. Needs to be the valid.
+ * @param[out] error
+ *   Error details. Filled in only on error, when not NULL.
+ * @return
+ *   0 on success, non-zero error code otherwise.
+ */
+int
+rte_mtr_meter_profile_delete(uint16_t port_id,
+	uint32_t meter_profile_id,
+	struct rte_mtr_error *error);
+
+/**
+ * MTR object create
+ *
+ * Create a new MTR object for the current port. This object is run as part of
+ * associated flow action for traffic metering and policing.
+ *
+ * @param[in] port_id
+ *   The port identifier of the Ethernet device.
+ * @param[in] mtr_id
+ *   MTR object ID. Needs to be unused by any of the existing MTR objects.
+ *   created for the current port.
+ * @param[in] params
+ *   MTR object params. Needs to be pre-allocated and valid.
+ * @param[in] shared
+ *   Non-zero when this MTR object can be shared by multiple flows, zero when
+ *   this MTR object can be used by a single flow.
+ * @param[out] error
+ *   Error details. Filled in only on error, when not NULL.
+ * @return
+ *   0 on success, non-zero error code otherwise.
+ *
+ * @see enum rte_flow_action_type::RTE_FLOW_ACTION_TYPE_METER
+ */
+int
+rte_mtr_create(uint16_t port_id,
+	uint32_t mtr_id,
+	struct rte_mtr_params *params,
+	int shared,
+	struct rte_mtr_error *error);
+
+/**
+ * MTR object destroy
+ *
+ * Delete an existing MTR object. This operation fails when there is currently
+ * at least one user (i.e. flow) of this MTR object.
+ *
+ * @param[in] port_id
+ *   The port identifier of the Ethernet device.
+ * @param[in] mtr_id
+ *   MTR object ID. Needs to be valid.
+ *   created for the current port.
+ * @param[out] error
+ *   Error details. Filled in only on error, when not NULL.
+ * @return
+ *   0 on success, non-zero error code otherwise.
+ */
+int
+rte_mtr_destroy(uint16_t port_id,
+	uint32_t mtr_id,
+	struct rte_mtr_error *error);
+
+/**
+ * MTR object meter disable
+ *
+ * Disable the meter of an existing MTR object. In disabled state, the meter of
+ * the current MTR object works in pass-through mode, meaning that for each
+ * input packet the meter output color is always the same as the input color. In
+ * particular, when the meter of the current MTR object is configured in color
+ * blind mode, the input color is always green, so the meter output color is
+ * also always green. Note that the policer and the statistics of the current
+ * MTR object are working as usual while the meter is disabled. No action is
+ * taken and this function returns successfully when the meter of the current
+ * MTR object is already disabled.
+ *
+ * @param[in] port_id
+ *   The port identifier of the Ethernet device.
+ * @param[in] mtr_id
+ *   MTR object ID.
+ * @param[out] error
+ *   Error details. Filled in only on error, when not NULL.
+ * @return
+ *   0 on success, non-zero error code otherwise.
+ */
+int
+rte_mtr_meter_disable(uint16_t port_id,
+	uint32_t mtr_id,
+	struct rte_mtr_error *error);
+
+/**
+ * MTR object meter enable
+ *
+ * Enable the meter of an existing MTR object. If the MTR object has its meter
+ * already enabled, then no action is taken and this function returns
+ * successfully.
+ *
+ * @param[in] port_id
+ *   The port identifier of the Ethernet device.
+ * @param[in] mtr_id
+ *   MTR object ID.
+ * @param[out] error
+ *   Error details. Filled in only on error, when not NULL.
+ * @return
+ *   0 on success, non-zero error code otherwise.
+ */
+int
+rte_mtr_meter_enable(uint16_t port_id,
+	uint32_t mtr_id,
+	struct rte_mtr_error *error);
+
+/**
+ * MTR object meter profile update
+ *
+ * @param[in] port_id
+ *   The port identifier of the Ethernet device.
+ * @param[in] mtr_id
+ *   MTR object ID. Needs to be valid.
+ * @param[in] meter_profile_id
+ *   Meter profile ID for the current MTR object. Needs to be valid.
+ * @param[out] error
+ *   Error details. Filled in only on error, when not NULL.
+ * @return
+ *   0 on success, non-zero error code otherwise.
+ */
+int
+rte_mtr_meter_profile_update(uint16_t port_id,
+	uint32_t mtr_id,
+	uint32_t meter_profile_id,
+	struct rte_mtr_error *error);
+
+/**
+ * MTR object DSCP table update
+ *
+ * @param[in] port_id
+ *   The port identifier of the Ethernet device.
+ * @param[in] mtr_id
+ *   MTR object ID. Needs to be valid.
+ * @param[in] dscp_table
+ *   When non-NULL: it points to a pre-allocated and pre-populated table with
+ *   exactly 64 elements providing the input color for each value of the
+ *   IPv4/IPv6 Differentiated Services Code Point (DSCP) input packet field.
+ *   When NULL: it is equivalent to setting this parameter to an “all-green”
+ *   populated table (i.e. table with all the 64 elements set to green color).
+ * @param[out] error
+ *   Error details. Filled in only on error, when not NULL.
+ * @return
+ *   0 on success, non-zero error code otherwise.
+ */
+int
+rte_mtr_meter_dscp_table_update(uint16_t port_id,
+	uint32_t mtr_id,
+	enum rte_mtr_color *dscp_table,
+	struct rte_mtr_error *error);
+
+/**
+ * MTR object policer actions update
+ *
+ * @param[in] port_id
+ *   The port identifier of the Ethernet device.
+ * @param[in] mtr_id
+ *   MTR object ID. Needs to be valid.
+ * @param[in] action_mask
+ *   Bit mask indicating which policer actions need to be updated. One or more
+ *   policer actions can be updated in a single function invocation. To update
+ *   the policer action associated with color C, bit (1 << C) needs to be set in
+ *   *action_mask* and element at position C in the *actions* array needs to be
+ *   valid.
+ * @param[in] actions
+ *   Pre-allocated and pre-populated array of policer actions.
+ * @param[out] error
+ *   Error details. Filled in only on error, when not NULL.
+ * @return
+ *   0 on success, non-zero error code otherwise.
+ */
+int
+rte_mtr_policer_actions_update(uint16_t port_id,
+	uint32_t mtr_id,
+	uint32_t action_mask,
+	enum rte_mtr_policer_action *actions,
+	struct rte_mtr_error *error);
+
+/**
+ * MTR object enabled statistics counters update
+ *
+ * @param[in] port_id
+ *   The port identifier of the Ethernet device.
+ * @param[in] mtr_id
+ *   MTR object ID. Needs to be valid.
+ * @param[in] stats_mask
+ *   Mask of statistics counter types to be enabled for the current MTR object.
+ *   Any statistics counter type not included in this set is to be disabled for
+ *   the current MTR object.
+ * @param[out] error
+ *   Error details. Filled in only on error, when not NULL.
+ * @return
+ *   0 on success, non-zero error code otherwise.
+ *
+ * @see enum rte_mtr_stats_type
+ */
+int
+rte_mtr_stats_update(uint16_t port_id,
+	uint32_t mtr_id,
+	uint64_t stats_mask,
+	struct rte_mtr_error *error);
+
+/**
+ * MTR object statistics counters read
+ *
+ * @param[in] port_id
+ *   The port identifier of the Ethernet device.
+ * @param[in] mtr_id
+ *   MTR object ID. Needs to be valid.
+ * @param[out] stats
+ *   When non-NULL, it contains the current value for the statistics counters
+ *   enabled for the current MTR object.
+ * @param[out] stats_mask
+ *   When non-NULL, it contains the mask of statistics counter types that are
+ *   currently enabled for this MTR object, indicating which of the counters
+ *   retrieved with the *stats* structure are valid.
+ * @param[in] clear
+ *   When this parameter has a non-zero value, the statistics counters are
+ *   cleared (i.e. set to zero) immediately after they have been read,
+ *   otherwise the statistics counters are left untouched.
+ * @param[out] error
+ *   Error details. Filled in only on error, when not NULL.
+ * @return
+ *   0 on success, non-zero error code otherwise.
+ *
+ * @see enum rte_mtr_stats_type
+ */
+int
+rte_mtr_stats_read(uint16_t port_id,
+	uint32_t mtr_id,
+	struct rte_mtr_stats *stats,
+	uint64_t *stats_mask,
+	int clear,
+	struct rte_mtr_error *error);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __INCLUDE_RTE_MTR_H__ */
diff --git a/lib/librte_ether/rte_mtr_driver.h b/lib/librte_ether/rte_mtr_driver.h
new file mode 100644
index 0000000..6a289ef
--- /dev/null
+++ b/lib/librte_ether/rte_mtr_driver.h
@@ -0,0 +1,221 @@
+/*-
+ *   BSD LICENSE
+ *
+ *   Copyright(c) 2017 Intel Corporation. All rights reserved.
+ *   All rights reserved.
+ *
+ *   Redistribution and use in source and binary forms, with or without
+ *   modification, are permitted provided that the following conditions
+ *   are met:
+ *
+ *     * Redistributions of source code must retain the above copyright
+ *       notice, this list of conditions and the following disclaimer.
+ *     * Redistributions in binary form must reproduce the above copyright
+ *       notice, this list of conditions and the following disclaimer in
+ *       the documentation and/or other materials provided with the
+ *       distribution.
+ *     * Neither the name of Intel Corporation nor the names of its
+ *       contributors may be used to endorse or promote products derived
+ *       from this software without specific prior written permission.
+ *
+ *   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ *   "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ *   LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ *   A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ *   OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ *   LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ *   DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ *   THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ *   (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ *   OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef __INCLUDE_RTE_MTR_DRIVER_H__
+#define __INCLUDE_RTE_MTR_DRIVER_H__
+
+/**
+ * @file
+ * RTE Generic Traffic Metering and Policing API (Driver Side)
+ *
+ * This file provides implementation helpers for internal use by PMDs, they
+ * are not intended to be exposed to applications and are not subject to ABI
+ * versioning.
+ */
+
+#include <stdint.h>
+
+#include <rte_errno.h>
+#include "rte_ethdev.h"
+#include "rte_mtr.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+typedef int (*rte_mtr_capabilities_get_t)(struct rte_eth_dev *dev,
+	struct rte_mtr_capabilities *cap,
+	struct rte_mtr_error *error);
+/**< @internal MTR capabilities get */
+
+typedef int (*rte_mtr_meter_profile_add_t)(struct rte_eth_dev *dev,
+	uint32_t meter_profile_id,
+	struct rte_mtr_meter_profile *profile,
+	struct rte_mtr_error *error);
+/**< @internal MTR meter profile add */
+
+typedef int (*rte_mtr_meter_profile_delete_t)(struct rte_eth_dev *dev,
+	uint32_t meter_profile_id,
+	struct rte_mtr_error *error);
+/**< @internal MTR meter profile delete */
+
+typedef int (*rte_mtr_create_t)(struct rte_eth_dev *dev,
+	uint32_t mtr_id,
+	struct rte_mtr_params *params,
+	int shared,
+	struct rte_mtr_error *error);
+/**< @internal MTR object create */
+
+typedef int (*rte_mtr_destroy_t)(struct rte_eth_dev *dev,
+	uint32_t mtr_id,
+	struct rte_mtr_error *error);
+/**< @internal MTR object destroy */
+
+typedef int (*rte_mtr_meter_enable_t)(struct rte_eth_dev *dev,
+	uint32_t mtr_id,
+	struct rte_mtr_error *error);
+/**< @internal MTR object meter enable */
+
+typedef int (*rte_mtr_meter_disable_t)(struct rte_eth_dev *dev,
+	uint32_t mtr_id,
+	struct rte_mtr_error *error);
+/**< @internal MTR object meter disable */
+
+typedef int (*rte_mtr_meter_profile_update_t)(struct rte_eth_dev *dev,
+	uint32_t mtr_id,
+	uint32_t meter_profile_id,
+	struct rte_mtr_error *error);
+/**< @internal MTR object meter profile update */
+
+typedef int (*rte_mtr_meter_dscp_table_update_t)(struct rte_eth_dev *dev,
+	uint32_t mtr_id,
+	enum rte_mtr_color *dscp_table,
+	struct rte_mtr_error *error);
+/**< @internal MTR object meter DSCP table update */
+
+typedef int (*rte_mtr_policer_actions_update_t)(struct rte_eth_dev *dev,
+	uint32_t mtr_id,
+	uint32_t action_mask,
+	enum rte_mtr_policer_action *actions,
+	struct rte_mtr_error *error);
+/**< @internal MTR object policer action update*/
+
+typedef int (*rte_mtr_stats_update_t)(struct rte_eth_dev *dev,
+	uint32_t mtr_id,
+	uint64_t stats_mask,
+	struct rte_mtr_error *error);
+/**< @internal MTR object enabled stats update */
+
+typedef int (*rte_mtr_stats_read_t)(struct rte_eth_dev *dev,
+	uint32_t mtr_id,
+	struct rte_mtr_stats *stats,
+	uint64_t *stats_mask,
+	int clear,
+	struct rte_mtr_error *error);
+/**< @internal MTR object stats read */
+
+struct rte_mtr_ops {
+	/** MTR capabilities get */
+	rte_mtr_capabilities_get_t capabilities_get;
+
+	/** MTR meter profile add */
+	rte_mtr_meter_profile_add_t meter_profile_add;
+
+	/** MTR meter profile delete */
+	rte_mtr_meter_profile_delete_t meter_profile_delete;
+
+	/** MTR object create */
+	rte_mtr_create_t create;
+
+	/** MTR object destroy */
+	rte_mtr_destroy_t destroy;
+
+	/** MTR object meter enable */
+	rte_mtr_meter_enable_t meter_enable;
+
+	/** MTR object meter disable */
+	rte_mtr_meter_disable_t meter_disable;
+
+	/** MTR object meter profile update */
+	rte_mtr_meter_profile_update_t meter_profile_update;
+
+	/** MTR object meter DSCP table update */
+	rte_mtr_meter_dscp_table_update_t meter_dscp_table_update;
+
+	/** MTR object policer action update */
+	rte_mtr_policer_actions_update_t policer_actions_update;
+
+	/** MTR object enabled stats update */
+	rte_mtr_stats_update_t stats_update;
+
+	/** MTR object stats read */
+	rte_mtr_stats_read_t stats_read;
+};
+
+/**
+ * Initialize generic error structure.
+ *
+ * This function also sets rte_errno to a given value.
+ *
+ * @param[out] error
+ *   Pointer to error structure (may be NULL).
+ * @param[in] code
+ *   Related error code (rte_errno).
+ * @param[in] type
+ *   Cause field and error type.
+ * @param[in] cause
+ *   Object responsible for the error.
+ * @param[in] message
+ *   Human-readable error message.
+ *
+ * @return
+ *   Error code.
+ */
+static inline int
+rte_mtr_error_set(struct rte_mtr_error *error,
+		   int code,
+		   enum rte_mtr_error_type type,
+		   const void *cause,
+		   const char *message)
+{
+	if (error) {
+		*error = (struct rte_mtr_error){
+			.type = type,
+			.cause = cause,
+			.message = message,
+		};
+	}
+	rte_errno = code;
+	return code;
+}
+
+/**
+ * Get generic traffic metering and policing operations structure from a port
+ *
+ * @param[in] port_id
+ *   The port identifier of the Ethernet device.
+ * @param[out] error
+ *   Error details
+ *
+ * @return
+ *   The traffic metering and policing operations structure associated with
+ *   port_id on success, NULL otherwise.
+ */
+const struct rte_mtr_ops *
+rte_mtr_ops_get(uint16_t port_id, struct rte_mtr_error *error);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __INCLUDE_RTE_MTR_DRIVER_H__ */
-- 
2.7.4

^ permalink raw reply	[relevance 1%]

* Re: [dpdk-dev] [PATCH v2] doc: add note on hardware support deprecation
  2017-09-18 13:59 21% ` [dpdk-dev] [PATCH v2] " Bruce Richardson
@ 2017-10-13 20:46  0%   ` Thomas Monjalon
  0 siblings, 0 replies; 200+ results
From: Thomas Monjalon @ 2017-10-13 20:46 UTC (permalink / raw)
  To: Bruce Richardson; +Cc: dev, john.mcnamara

18/09/2017 15:59, Bruce Richardson:
> Following agreement at the DPDK Technical Board meeting [1], the policy
> that hardware support deprecation should be treated as though it were an
> ABI break needs to be documented in the contributors guide.
> 
> [1] http://dpdk.org/ml/archives/dev/2017-September/074613.html
> 
> Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
> Acked-by: John McNamara <john.mcnamara@intel.com>

Applied, thanks

^ permalink raw reply	[relevance 0%]

* [dpdk-dev] [PATCH] doc: fix highlight of bumped libs in release notes
@ 2017-10-14  0:09  3% Thomas Monjalon
  2017-10-16  8:33  0% ` Yang, Zhiyong
                   ` (2 more replies)
  0 siblings, 3 replies; 200+ results
From: Thomas Monjalon @ 2017-10-14  0:09 UTC (permalink / raw)
  To: dev

The libraries which have their ABI version increased in this release
must be prepended with a + sign to make them appear clearly.

Fixes: f8244c6399d9 ("ethdev: increase port id range")
Fixes: ec51443cc99a ("gso: add Generic Segmentation Offload API framework")

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
---
 doc/guides/rel_notes/release_17_11.rst | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)

diff --git a/doc/guides/rel_notes/release_17_11.rst b/doc/guides/rel_notes/release_17_11.rst
index 8db35f5e4..1235350e9 100644
--- a/doc/guides/rel_notes/release_17_11.rst
+++ b/doc/guides/rel_notes/release_17_11.rst
@@ -338,16 +338,16 @@ The libraries prepended with a plus sign were incremented in this version.
 .. code-block:: diff
 
      librte_acl.so.2
-     librte_bitratestats.so.2
+   + librte_bitratestats.so.2
      librte_cfgfile.so.2
      librte_cmdline.so.2
      librte_cryptodev.so.3
      librte_distributor.so.1
      librte_eal.so.5
-     librte_ethdev.so.8
-     librte_eventdev.so.3
+   + librte_ethdev.so.8
+   + librte_eventdev.so.3
      librte_gro.so.1
-     librte_gso.so.1
+   + librte_gso.so.1
      librte_hash.so.2
      librte_ip_frag.so.1
      librte_jobstats.so.1
@@ -360,12 +360,12 @@ The libraries prepended with a plus sign were incremented in this version.
      librte_meter.so.1
      librte_metrics.so.1
      librte_net.so.1
-     librte_pdump.so.2
+   + librte_pdump.so.2
      librte_pipeline.so.3
-     librte_pmd_bnxt.so.2
-     librte_pmd_bond.so.2
-     librte_pmd_i40e.so.2
-     librte_pmd_ixgbe.so.2
+   + librte_pmd_bnxt.so.2
+   + librte_pmd_bond.so.2
+   + librte_pmd_i40e.so.2
+   + librte_pmd_ixgbe.so.2
      librte_pmd_ring.so.2
    + librte_pmd_softnic.so.1
      librte_pmd_vhost.so.2
-- 
2.14.1

^ permalink raw reply	[relevance 3%]

* Re: [dpdk-dev] [PATCH] doc: fix highlight of bumped libs in release notes
  2017-10-14  0:09  3% [dpdk-dev] [PATCH] doc: fix highlight of bumped libs in release notes Thomas Monjalon
@ 2017-10-16  8:33  0% ` Yang, Zhiyong
  2017-10-18 20:57  0% ` Ferruh Yigit
  2017-10-23 10:15  3% ` [dpdk-dev] [PATCH v2] " Thomas Monjalon
  2 siblings, 0 replies; 200+ results
From: Yang, Zhiyong @ 2017-10-16  8:33 UTC (permalink / raw)
  To: Thomas Monjalon, dev



> -----Original Message-----
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Thomas Monjalon
> Sent: Saturday, October 14, 2017 8:10 AM
> To: dev@dpdk.org
> Subject: [dpdk-dev] [PATCH] doc: fix highlight of bumped libs in release notes
> 
> The libraries which have their ABI version increased in this release must be
> prepended with a + sign to make them appear clearly.
> 
> Fixes: f8244c6399d9 ("ethdev: increase port id range")
> Fixes: ec51443cc99a ("gso: add Generic Segmentation Offload API framework")
> 
> Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
> ---

Acked-by: Zhiyong Yang <zhiyong.yang@intel.com>

^ permalink raw reply	[relevance 0%]

* [dpdk-dev] [PATCH v1 2/2] event/octeontx: bump library version
  @ 2017-10-16 13:42  3% ` Santosh Shukla
  2017-10-17  9:50  0%   ` Hemant Agrawal
  2017-10-23 14:38  3%   ` Thomas Monjalon
  0 siblings, 2 replies; 200+ results
From: Santosh Shukla @ 2017-10-16 13:42 UTC (permalink / raw)
  To: dev; +Cc: olivier.matz, thomas, jerin.jacob, hemant.agrawal, Santosh Shukla

This commit bumps the library version to reflect the ABI change
caused by removing the below function from event/octeontx:
* octeontx_ssovf_info
* octeontx_ssovf_bar
* octeontx_ssovf_mbox_send

And moved to mempool/octeontx area.

Signed-off-by: Santosh Shukla <santosh.shukla@caviumnetworks.com>
---
 doc/guides/rel_notes/release_17_11.rst | 1 +
 drivers/event/octeontx/Makefile        | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/doc/guides/rel_notes/release_17_11.rst b/doc/guides/rel_notes/release_17_11.rst
index 8db35f5e4..eac2f677a 100644
--- a/doc/guides/rel_notes/release_17_11.rst
+++ b/doc/guides/rel_notes/release_17_11.rst
@@ -377,6 +377,7 @@ The libraries prepended with a plus sign were incremented in this version.
      librte_table.so.2
      librte_timer.so.1
      librte_vhost.so.3
+     librte_pmd_octeontx_ssovf.so.2
 
 
 Tested Platforms
diff --git a/drivers/event/octeontx/Makefile b/drivers/event/octeontx/Makefile
index 50434a384..08fc16775 100644
--- a/drivers/event/octeontx/Makefile
+++ b/drivers/event/octeontx/Makefile
@@ -42,7 +42,7 @@ CFLAGS += -I$(RTE_SDK)/drivers/mempool/octeontx/
 
 EXPORT_MAP := rte_pmd_octeontx_ssovf_version.map
 
-LIBABIVER := 1
+LIBABIVER := 2
 
 #
 # all source are stored in SRCS-y
-- 
2.13.0

^ permalink raw reply	[relevance 3%]

* Re: [dpdk-dev] [PATCH v1 2/2] event/octeontx: bump library version
  2017-10-16 13:42  3% ` [dpdk-dev] [PATCH v1 2/2] event/octeontx: bump library version Santosh Shukla
@ 2017-10-17  9:50  0%   ` Hemant Agrawal
  2017-10-23 14:38  3%   ` Thomas Monjalon
  1 sibling, 0 replies; 200+ results
From: Hemant Agrawal @ 2017-10-17  9:50 UTC (permalink / raw)
  To: Santosh Shukla, dev; +Cc: olivier.matz, thomas, jerin.jacob

On 10/16/2017 7:12 PM, Santosh Shukla wrote:
> This commit bumps the library version to reflect the ABI change
> caused by removing the below function from event/octeontx:
> * octeontx_ssovf_info
> * octeontx_ssovf_bar
> * octeontx_ssovf_mbox_send
>
> And moved to mempool/octeontx area.
>
> Signed-off-by: Santosh Shukla <santosh.shukla@caviumnetworks.com>
> ---
>  doc/guides/rel_notes/release_17_11.rst | 1 +
>  drivers/event/octeontx/Makefile        | 2 +-
>  2 files changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/doc/guides/rel_notes/release_17_11.rst b/doc/guides/rel_notes/release_17_11.rst
> index 8db35f5e4..eac2f677a 100644
> --- a/doc/guides/rel_notes/release_17_11.rst
> +++ b/doc/guides/rel_notes/release_17_11.rst
> @@ -377,6 +377,7 @@ The libraries prepended with a plus sign were incremented in this version.
>       librte_table.so.2
>       librte_timer.so.1
>       librte_vhost.so.3
> +     librte_pmd_octeontx_ssovf.so.2
>
>
>  Tested Platforms
> diff --git a/drivers/event/octeontx/Makefile b/drivers/event/octeontx/Makefile
> index 50434a384..08fc16775 100644
> --- a/drivers/event/octeontx/Makefile
> +++ b/drivers/event/octeontx/Makefile
> @@ -42,7 +42,7 @@ CFLAGS += -I$(RTE_SDK)/drivers/mempool/octeontx/
>
>  EXPORT_MAP := rte_pmd_octeontx_ssovf_version.map
>
> -LIBABIVER := 1
> +LIBABIVER := 2
>
>  #
>  # all source are stored in SRCS-y
>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>

^ permalink raw reply	[relevance 0%]

* Re: [dpdk-dev] [PATCH v2 00/18] devargs cleanup
  @ 2017-10-18  8:36  4%     ` Gaëtan Rivet
  0 siblings, 0 replies; 200+ results
From: Gaëtan Rivet @ 2017-10-18  8:36 UTC (permalink / raw)
  To: Aaron Conole; +Cc: dev

On Tue, Oct 17, 2017 at 02:18:02PM -0400, Aaron Conole wrote:
> Gaetan Rivet <gaetan.rivet@6wind.com> writes:
> 
> > The use of rte_devargs is inconsistent in the light of new functionalities
> > such as device hotplug.
> >
> > Most of its API is still experimental and needs stabilization.
> > Older functions were deprecated and need to be rewritten or removed.
> > The rte_devtype is meant to disappear.
> >
> > v2:
> >
> >   Big rework.
> >
> >   * Enact requiring bus name prepended in rte_devargs parsing functions.
> >   * Remove rte_devtype. Use new probe mode setter along with generic
> >     bus reference within rte_devargs.
> >   * Rework devargs parsing API.
> >     The function is now variadic, does not enforce bus rules on the devargs
> >     being inserted as the bus has been configured previously.
> >     Old parsing function is removed.
> >   * Expose bus guessing from device name.
> >     This uses the "parse" bus operator, which may be meant to disappear.
> >     This is optional, but nice to have in a transition period.
> >   * Introduce new --dev generic device declaration parameter.
> >
> > This patchset depends on:
> 
> It is weird to me that you introduce patch sets, and then introduce
> cleanups later?  Shouldn't we revise the existing patchsets?
> 
> Maybe I missed a discussion somewhere?
> 

No discussion missed :)

The way it happened here was that I started cleaning up the mess I did
last release in the rte_devargs to streamline somewhat the subsystem.

Several things needed to disappear:

 1. List of devargs manipulated by buses. With hotplug feature they had
    to be properly managed (i.e. freed on device unplug).

 2. rte_devtype, which was meant to disappear last release but was kept
    to smooth the transition to the new API.

 3. Different usages of devargs_add among applications / PMDs
    There had been some different last release about the exposed API,
    thus I made a compromise that could potentially benefit everyone.

Points 1 and 3 did not require additional work on the buses.
Point 2 however, required a way for buses to be configured in whitelist
/ blacklist mode. To clean up the rte_devtype, a configuration facility
is necessary.

While working on this facility, I found that I was once again breaking
the ABI of rte_bus, along with the IOVA configuration. I thought it
could be streamlined in a more stable way, thus I wrote the separate
patchset for a cleaner integration of these changes in this release.

All in all, the PCI move is not necessary but was sent a few weeks ago
already and it could be skipped with a small rework.

The bus control could be done in a more hackish way as well, without
having a whole separate patchset to introduce the control facility. I
wanted to propose a cleaner approach that could possibly keep the
rte_bus ABI stable for some time.

> > Move PCI away from the EAL
> > http://dpdk.org/ml/archives/dev/2017-August/073512.html
> >
> > Bus control framework
> > http://dpdk.org/ml/archives/dev/2017-October/078752.html
> >
> > Gaetan Rivet (18):
> >   eal: prepend busname on legacy device declaration
> >   eal: remove generic devtype
> >   devargs: introduce iterator
> >   devargs: introduce foreach macro
> >   vdev: do not reference devargs list
> >   bus/pci: do not reference devargs list
> >   test: remove devargs unit tests
> >   devargs: make devargs list private
> >   devargs: make parsing variadic
> >   devargs: require bus name prefix
> >   devargs: simplify implementation
> >   eal: add generic device declaration parameter
> >   bus: make device recognition function public
> >   net/failsafe: keep legacy sub-device declaration
> >   ether: use new devargs parsing function
> >   devargs: remove old devargs parsing function
> >   devargs: use proper prefix
> >   doc: remove devargs deprecation notices
> >
> >  MAINTAINERS                                     |   1 -
> >  app/test-pmd/cmdline.c                          |   2 +-
> >  doc/guides/rel_notes/deprecation.rst            |  13 ---
> >  drivers/bus/pci/pci_common.c                    |  22 +---
> >  drivers/net/failsafe/failsafe_args.c            |  11 +-
> >  examples/bond/main.c                            |   2 +-
> >  lib/librte_eal/bsdapp/eal/rte_eal_version.map   |  15 ++-
> >  lib/librte_eal/common/eal_common_dev.c          |  39 ++-----
> >  lib/librte_eal/common/eal_common_devargs.c      | 129 +++++++++--------------
> >  lib/librte_eal/common/eal_common_options.c      |  47 ++++++---
> >  lib/librte_eal/common/eal_common_vdev.c         |  11 +-
> >  lib/librte_eal/common/eal_options.h             |   2 +
> >  lib/librte_eal/common/include/rte_bus.h         |  12 +++
> >  lib/librte_eal/common/include/rte_dev.h         |   8 --
> >  lib/librte_eal/common/include/rte_devargs.h     | 120 ++++++++--------------
> >  lib/librte_eal/linuxapp/eal/rte_eal_version.map |  15 ++-
> >  lib/librte_ether/rte_ethdev.c                   |  11 +-
> >  test/test/Makefile                              |   1 -
> >  test/test/commands.c                            |   2 +-
> >  test/test/test_devargs.c                        | 131 ------------------------
> >  20 files changed, 186 insertions(+), 408 deletions(-)
> >  delete mode 100644 test/test/test_devargs.c

-- 
Gaëtan Rivet
6WIND

^ permalink raw reply	[relevance 4%]

* Re: [dpdk-dev] [PATCH] doc: fix highlight of bumped libs in release notes
  2017-10-14  0:09  3% [dpdk-dev] [PATCH] doc: fix highlight of bumped libs in release notes Thomas Monjalon
  2017-10-16  8:33  0% ` Yang, Zhiyong
@ 2017-10-18 20:57  0% ` Ferruh Yigit
  2017-10-23 10:13  0%   ` Thomas Monjalon
  2017-10-23 10:15  3% ` [dpdk-dev] [PATCH v2] " Thomas Monjalon
  2 siblings, 1 reply; 200+ results
From: Ferruh Yigit @ 2017-10-18 20:57 UTC (permalink / raw)
  To: Thomas Monjalon, dev

On 10/13/2017 5:09 PM, Thomas Monjalon wrote:
> The libraries which have their ABI version increased in this release
> must be prepended with a + sign to make them appear clearly.
> 
> Fixes: f8244c6399d9 ("ethdev: increase port id range")
> Fixes: ec51443cc99a ("gso: add Generic Segmentation Offload API framework")
> 
> Signed-off-by: Thomas Monjalon <thomas@monjalon.net>

<...>

> +   + librte_pmd_ixgbe.so.2
>       librte_pmd_ring.so.2
>     + librte_pmd_softnic.so.1
>       librte_pmd_vhost.so.2

librte_pmd_vhost.so.2 also requires a "+"

^ permalink raw reply	[relevance 0%]

* [dpdk-dev] [PATCH v3 5/6] doc: remove dpdk iova aware notice
    @ 2017-10-20 12:31 15%     ` Santosh Shukla
  2017-10-23 20:29  0%       ` Thomas Monjalon
  1 sibling, 1 reply; 200+ results
From: Santosh Shukla @ 2017-10-20 12:31 UTC (permalink / raw)
  To: dev
  Cc: olivier.matz, thomas, jerin.jacob, hemant.agrawal,
	anatoly.burakov, Santosh Shukla

Removed dpdk iova aware ABI deprecation notice,
and updated ABI change details in release_17.11.rst.

Signed-off-by: Santosh Shukla <santosh.shukla@caviumnetworks.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
---
 doc/guides/rel_notes/deprecation.rst   |  7 -------
 doc/guides/rel_notes/release_17_11.rst | 28 ++++++++++++++++++++++++++++
 2 files changed, 28 insertions(+), 7 deletions(-)

diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst
index 52058f580..d89d35320 100644
--- a/doc/guides/rel_notes/deprecation.rst
+++ b/doc/guides/rel_notes/deprecation.rst
@@ -29,13 +29,6 @@ Deprecation Notices
   - ``rte_eal_devargs_type_count``
   - ``rte_eal_parse_devargs_str``, replaced by ``rte_eal_devargs_parse``
 
-* eal: An ABI change is planned for 17.11 to make DPDK aware of IOVA address
-  translation scheme.
-  Reference to phys address in EAL data-structure or functions may change to
-  IOVA address or more appropriate name.
-  The change will be only for the name.
-  Functional aspects of the API or data-structure will remain same.
-
 * The mbuf flags PKT_RX_VLAN_PKT and PKT_RX_QINQ_PKT are deprecated and
   are respectively replaced by PKT_RX_VLAN_STRIPPED and
   PKT_RX_QINQ_STRIPPED, that are better described. The old flags and
diff --git a/doc/guides/rel_notes/release_17_11.rst b/doc/guides/rel_notes/release_17_11.rst
index 6f3b92bc5..5287e96c3 100644
--- a/doc/guides/rel_notes/release_17_11.rst
+++ b/doc/guides/rel_notes/release_17_11.rst
@@ -302,6 +302,34 @@ ABI Changes
   The size of the field ``port_id`` in the ``rte_eth_dev_data`` structure
   changed, as described in the `New Features` section.
 
+* **Following datatypes, structure member and function renamed to iova type.**
+
+  * Renamed ``phys_addr_t`` to ``iova_addr_t``.
+  * Renamed ``buf_physaddr`` to ``buf_iovaaddr`` for struct rte_mbuf.
+  * Renamed ``phys_addr`` to ``iova_addr`` for struct rte_memseg.
+  * The Following memory translation api renamed from:
+
+    * ``rte_mempool_populate_phys()``
+    * ``rte_mempool_populate_phys_tab()``
+    * ``rte_eal_using_phys_addrs()``
+    * ``rte_mem_virt2phy()``
+    * ``rte_dump_physmem_layout()``
+    * ``rte_eal_get_physmem_layout()``
+    * ``rte_eal_get_physmem_size()``
+    * ``rte_malloc_virt2phy()``
+    * ``rte_mem_phy2mch()``
+
+  * To the following iova types api:
+
+    * ``rte_mempool_populate_iova()``
+    * ``rte_mempool_populate_iova_tab()``
+    * ``rte_eal_using_iova_addrs()``
+    * ``rte_mem_virt2iova()``
+    * ``rte_dump_iovamem_layout()``
+    * ``rte_eal_get_iovamem_layout()``
+    * ``rte_eal_get_iovamem_size()``
+    * ``rte_malloc_virt2iova()``
+    * ``rte_mem_phy2iova()``
 
 Removed Items
 -------------
-- 
2.14.1

^ permalink raw reply	[relevance 15%]

* Re: [dpdk-dev] [PATCH v2 01/25] ethdev: introduce generic flow API
  @ 2017-10-23  8:53  0%     ` Zhao1, Wei
  0 siblings, 0 replies; 200+ results
From: Zhao1, Wei @ 2017-10-23  8:53 UTC (permalink / raw)
  To: Adrien Mazarguil; +Cc: dev, Adrien Mazarguil

Hi, Adrien



> -----Original Message-----
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Adrien Mazarguil
> Sent: Saturday, December 17, 2016 12:25 AM
> To: dev@dpdk.org
> Subject: [dpdk-dev] [PATCH v2 01/25] ethdev: introduce generic flow API
> 
> This new API supersedes all the legacy filter types described in rte_eth_ctrl.h.
> It is slightly higher level and as a result relies more on PMDs to process and
> validate flow rules.
> 
> Benefits:
> 
> - A unified API is easier to program for, applications do not have to be
>   written for a specific filter type which may or may not be supported by
>   the underlying device.
> 
> - The behavior of a flow rule is the same regardless of the underlying
>   device, applications do not need to be aware of hardware quirks.
> 
> - Extensible by design, API/ABI breakage should rarely occur if at all.
> 
> - Documentation is self-standing, no need to look up elsewhere.
> 
> Existing filter types will be deprecated and removed in the near future.
> 
> Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
> ---
>  MAINTAINERS                            |   4 +
>  doc/api/doxy-api-index.md              |   2 +
>  lib/librte_ether/Makefile              |   3 +
>  lib/librte_ether/rte_eth_ctrl.h        |   1 +
>  lib/librte_ether/rte_ether_version.map |  11 +
>  lib/librte_ether/rte_flow.c            | 159 +++++
>  lib/librte_ether/rte_flow.h            | 942 ++++++++++++++++++++++++++++
>  lib/librte_ether/rte_flow_driver.h     | 181 ++++++
>  8 files changed, 1303 insertions(+)
> 
> diff --git a/MAINTAINERS b/MAINTAINERS
> index 26d9590..5975cff 100644
> --- a/MAINTAINERS
> +++ b/MAINTAINERS
> @@ -243,6 +243,10 @@ M: Thomas Monjalon
> <thomas.monjalon@6wind.com>
>  F: lib/librte_ether/
>  F: scripts/test-null.sh
> 

+/**
+ * RTE_FLOW_ACTION_TYPE_RSS
+ *
+ * Similar to QUEUE, except RSS is additionally performed on packets to
+ * spread them among several queues according to the provided parameters.
+ *
+ * Note: RSS hash result is normally stored in the hash.rss mbuf field,
+ * however it conflicts with the MARK action as they share the same
+ * space. When both actions are specified, the RSS hash is discarded 
+and
+ * PKT_RX_RSS_HASH is not set in ol_flags. MARK has priority. The mbuf
+ * structure should eventually evolve to store both.
+ *
+ * Terminating by default.
+ */
+struct rte_flow_action_rss {
+	const struct rte_eth_rss_conf *rss_conf; /**< RSS parameters. */
+	uint16_t num; /**< Number of entries in queue[]. */
+	uint16_t queue[]; /**< Queues indices to use. */ };
+

I am plan for moving rss to rte_flow.
May I ask you some question for this struct of rte_flow_action_rss.
1. why do you use pointer mode for rss_conf, why not use " struct rte_eth_rss_conf  rss_conf "?
we need to fill these rss info which get from CLI to this struct, if we use the pointer mode, how can we fill in these info?

2. And also why the" const" is not need? We need a const ?How can we config this parameter?

3. what is your expect mode for CLI command for rss config? When I type in :
" flow create 0 pattern eth / tcp / end actions rss queues queue 0 /end "
Or " flow create 0 pattern eth / tcp / end actions rss queues {0 1 2} /end "
I get " Bad arguments ".

So, the right CLI command is ?

Thank you!

^ permalink raw reply	[relevance 0%]

* [dpdk-dev] [PATCH] eal: remove deprecated log functions
@ 2017-10-23  9:56 10% Olivier Matz
  0 siblings, 0 replies; 200+ results
From: Olivier Matz @ 2017-10-23  9:56 UTC (permalink / raw)
  To: dev; +Cc: thomas

Remove rte_set_log_level(), rte_get_log_level(),
rte_set_log_type(), and rte_get_log_type().

Also update librte_eal.so version in docuementation.
The LIBABIVER variable in eal has already been modified in
commit f26ab687a74f ("eal: remove Xen dom0 support").

Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
---
 doc/guides/rel_notes/deprecation.rst            |  8 -----
 doc/guides/rel_notes/release_17_11.rst          | 10 ++++++-
 lib/librte_eal/bsdapp/eal/rte_eal_version.map   |  4 ---
 lib/librte_eal/common/eal_common_log.c          | 40 -------------------------
 lib/librte_eal/common/include/rte_log.h         | 29 ------------------
 lib/librte_eal/linuxapp/eal/rte_eal_version.map |  4 ---
 6 files changed, 9 insertions(+), 86 deletions(-)

diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst
index 52058f580..0d9925126 100644
--- a/doc/guides/rel_notes/deprecation.rst
+++ b/doc/guides/rel_notes/deprecation.rst
@@ -8,14 +8,6 @@ API and ABI deprecation notices are to be posted here.
 Deprecation Notices
 -------------------
 
-* eal: the following functions are deprecated starting from 17.05 and will
-  be removed in 17.11:
-
-  - ``rte_set_log_level``, replaced by ``rte_log_set_global_level``
-  - ``rte_get_log_level``, replaced by ``rte_log_get_global_level``
-  - ``rte_set_log_type``, replaced by ``rte_log_set_level``
-  - ``rte_get_log_type``, replaced by ``rte_log_get_level``
-
 * eal: several API and ABI changes are planned for ``rte_devargs`` in v17.11.
   The format of device command line parameters will change. The bus will need
   to be explicitly stated in the device declaration. The enum ``rte_devtype``
diff --git a/doc/guides/rel_notes/release_17_11.rst b/doc/guides/rel_notes/release_17_11.rst
index 8db35f5e4..0370aed89 100644
--- a/doc/guides/rel_notes/release_17_11.rst
+++ b/doc/guides/rel_notes/release_17_11.rst
@@ -283,6 +283,14 @@ API Changes
   The function ``rte_cryptodev_allocate_driver()`` has been modified.
   An extra parameter ``struct cryptodev_driver *crypto_drv`` has been added.
 
+* **Removed deprecated functions to manage log level or type.**
+
+  The functions ``rte_set_log_level()``, ``rte_get_log_level()``,
+  ``rte_set_log_type()`` and ``rte_get_log_type()`` have been removed.
+  They are respectively replaced by ``rte_log_set_global_level()``,
+  ``rte_log_get_global_level()``, ``rte_log_set_level()`` and
+  ``rte_log_get_level()``.
+
 
 ABI Changes
 -----------
@@ -343,7 +351,7 @@ The libraries prepended with a plus sign were incremented in this version.
      librte_cmdline.so.2
      librte_cryptodev.so.3
      librte_distributor.so.1
-     librte_eal.so.5
+   + librte_eal.so.6
      librte_ethdev.so.8
      librte_eventdev.so.3
      librte_gro.so.1
diff --git a/lib/librte_eal/bsdapp/eal/rte_eal_version.map b/lib/librte_eal/bsdapp/eal/rte_eal_version.map
index 080896f73..7dc687f88 100644
--- a/lib/librte_eal/bsdapp/eal/rte_eal_version.map
+++ b/lib/librte_eal/bsdapp/eal/rte_eal_version.map
@@ -44,8 +44,6 @@ DPDK_2.0 {
 	rte_free;
 	rte_get_hpet_cycles;
 	rte_get_hpet_hz;
-	rte_get_log_level;
-	rte_get_log_type;
 	rte_get_tsc_hz;
 	rte_hexdump;
 	rte_intr_callback_register;
@@ -78,8 +76,6 @@ DPDK_2.0 {
 	rte_openlog_stream;
 	rte_realloc;
 	rte_set_application_usage_hook;
-	rte_set_log_level;
-	rte_set_log_type;
 	rte_socket_id;
 	rte_strerror;
 	rte_strsplit;
diff --git a/lib/librte_eal/common/eal_common_log.c b/lib/librte_eal/common/eal_common_log.c
index b62b0a6d6..be404136d 100644
--- a/lib/librte_eal/common/eal_common_log.c
+++ b/lib/librte_eal/common/eal_common_log.c
@@ -89,14 +89,6 @@ rte_log_set_global_level(uint32_t level)
 	rte_logs.level = (uint32_t)level;
 }
 
-/* Set global log level */
-/* replaced by rte_log_set_global_level */
-__rte_deprecated void
-rte_set_log_level(uint32_t level)
-{
-	rte_log_set_global_level(level);
-}
-
 /* Get global log level */
 uint32_t
 rte_log_get_global_level(void)
@@ -104,14 +96,6 @@ rte_log_get_global_level(void)
 	return rte_logs.level;
 }
 
-/* Get global log level */
-/* replaced by rte_log_get_global_level */
-uint32_t
-rte_get_log_level(void)
-{
-	return rte_log_get_global_level();
-}
-
 int
 rte_log_get_level(uint32_t type)
 {
@@ -121,30 +105,6 @@ rte_log_get_level(uint32_t type)
 	return rte_logs.dynamic_types[type].loglevel;
 }
 
-/* Set global log type */
-__rte_deprecated void
-rte_set_log_type(uint32_t type, int enable)
-{
-	if (type < RTE_LOGTYPE_FIRST_EXT_ID) {
-		if (enable)
-			rte_logs.type |= 1 << type;
-		else
-			rte_logs.type &= ~(1 << type);
-	}
-
-	if (enable)
-		rte_log_set_level(type, 0);
-	else
-		rte_log_set_level(type, RTE_LOG_DEBUG);
-}
-
-/* Get global log type */
-__rte_deprecated uint32_t
-rte_get_log_type(void)
-{
-	return rte_logs.type;
-}
-
 int
 rte_log_set_level(uint32_t type, uint32_t level)
 {
diff --git a/lib/librte_eal/common/include/rte_log.h b/lib/librte_eal/common/include/rte_log.h
index 2fa119983..16564d41b 100644
--- a/lib/librte_eal/common/include/rte_log.h
+++ b/lib/librte_eal/common/include/rte_log.h
@@ -139,12 +139,6 @@ int rte_openlog_stream(FILE *f);
 void rte_log_set_global_level(uint32_t level);
 
 /**
- * Deprecated, replaced by rte_log_set_global_level().
- */
-__rte_deprecated
-void rte_set_log_level(uint32_t level);
-
-/**
  * Get the global log level.
  *
  * @return
@@ -153,29 +147,6 @@ void rte_set_log_level(uint32_t level);
 uint32_t rte_log_get_global_level(void);
 
 /**
- * Deprecated, replaced by rte_log_get_global_level().
- */
-__rte_deprecated
-uint32_t rte_get_log_level(void);
-
-/**
- * Enable or disable the log type.
- *
- * @param type
- *   Log type, for example, RTE_LOGTYPE_EAL.
- * @param enable
- *   True for enable; false for disable.
- */
-__rte_deprecated
-void rte_set_log_type(uint32_t type, int enable);
-
-/**
- * Get the global log type.
- */
-__rte_deprecated
-uint32_t rte_get_log_type(void);
-
-/**
  * Get the log level for a given type.
  *
  * @param logtype
diff --git a/lib/librte_eal/linuxapp/eal/rte_eal_version.map b/lib/librte_eal/linuxapp/eal/rte_eal_version.map
index c173ccfdb..8802b288e 100644
--- a/lib/librte_eal/linuxapp/eal/rte_eal_version.map
+++ b/lib/librte_eal/linuxapp/eal/rte_eal_version.map
@@ -44,8 +44,6 @@ DPDK_2.0 {
 	rte_free;
 	rte_get_hpet_cycles;
 	rte_get_hpet_hz;
-	rte_get_log_level;
-	rte_get_log_type;
 	rte_get_tsc_hz;
 	rte_hexdump;
 	rte_intr_callback_register;
@@ -78,8 +76,6 @@ DPDK_2.0 {
 	rte_openlog_stream;
 	rte_realloc;
 	rte_set_application_usage_hook;
-	rte_set_log_level;
-	rte_set_log_type;
 	rte_socket_id;
 	rte_strerror;
 	rte_strsplit;
-- 
2.11.0

^ permalink raw reply	[relevance 10%]

* Re: [dpdk-dev] [PATCH v7 1/4] cryptodev: remove crypto vdev init API
  2017-10-13 11:51  4%   ` [dpdk-dev] [PATCH v7 1/4] cryptodev: remove crypto vdev init API Jianfeng Tan
@ 2017-10-23 10:06  3%     ` De Lara Guarch, Pablo
  0 siblings, 0 replies; 200+ results
From: De Lara Guarch, Pablo @ 2017-10-23 10:06 UTC (permalink / raw)
  To: Tan, Jianfeng, dev
  Cc: jblunck, Richardson, Bruce, Ananyev, Konstantin, thomas, yliu,
	maxime.coquelin, mtetsuyah, Yigit, Ferruh

Hi Jianfeng,

> -----Original Message-----
> From: Tan, Jianfeng
> Sent: Friday, October 13, 2017 12:52 PM
> To: dev@dpdk.org
> Cc: jblunck@infradead.org; Richardson, Bruce
> <bruce.richardson@intel.com>; Ananyev, Konstantin
> <konstantin.ananyev@intel.com>; De Lara Guarch, Pablo
> <pablo.de.lara.guarch@intel.com>; thomas@monjalon.net;
> yliu@fridaylinux.org; maxime.coquelin@redhat.com;
> mtetsuyah@gmail.com; Yigit, Ferruh <ferruh.yigit@intel.com>; Tan,
> Jianfeng <jianfeng.tan@intel.com>
> Subject: [PATCH v7 1/4] cryptodev: remove crypto vdev init API
> 
> Remove rte_cryptodev_create_vdev() for duplication.
> 
> Signed-off-by: Jianfeng Tan <jianfeng.tan@intel.com>
> Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>

...

> --- a/lib/librte_cryptodev/Makefile
> +++ b/lib/librte_cryptodev/Makefile
> @@ -34,7 +34,7 @@ include $(RTE_SDK)/mk/rte.vars.mk  LIB =
> librte_cryptodev.a
> 
>  # library version
> -LIBABIVER := 3
> +LIBABIVER := 4

Sorry for the late review.
Since you are bumping the ABI version, you should also change it in
"Share Library Versions", in release_17_11.rst.

Thanks,
Pablo

^ permalink raw reply	[relevance 3%]

* Re: [dpdk-dev] [PATCH] doc: fix highlight of bumped libs in release notes
  2017-10-18 20:57  0% ` Ferruh Yigit
@ 2017-10-23 10:13  0%   ` Thomas Monjalon
  0 siblings, 0 replies; 200+ results
From: Thomas Monjalon @ 2017-10-23 10:13 UTC (permalink / raw)
  To: Ferruh Yigit; +Cc: dev

18/10/2017 22:57, Ferruh Yigit:
> On 10/13/2017 5:09 PM, Thomas Monjalon wrote:
> > The libraries which have their ABI version increased in this release
> > must be prepended with a + sign to make them appear clearly.
> > 
> > Fixes: f8244c6399d9 ("ethdev: increase port id range")
> > Fixes: ec51443cc99a ("gso: add Generic Segmentation Offload API framework")
> > 
> > Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
> 
> <...>
> 
> > +   + librte_pmd_ixgbe.so.2
> >       librte_pmd_ring.so.2
> >     + librte_pmd_softnic.so.1
> >       librte_pmd_vhost.so.2
> 
> librte_pmd_vhost.so.2 also requires a "+"

Right, I send a v2, thanks

^ permalink raw reply	[relevance 0%]

* [dpdk-dev] [PATCH v2] doc: fix highlight of bumped libs in release notes
  2017-10-14  0:09  3% [dpdk-dev] [PATCH] doc: fix highlight of bumped libs in release notes Thomas Monjalon
  2017-10-16  8:33  0% ` Yang, Zhiyong
  2017-10-18 20:57  0% ` Ferruh Yigit
@ 2017-10-23 10:15  3% ` Thomas Monjalon
  2017-10-23 16:26  0%   ` Ferruh Yigit
  2 siblings, 1 reply; 200+ results
From: Thomas Monjalon @ 2017-10-23 10:15 UTC (permalink / raw)
  To: dev; +Cc: ferruh.yigit

The libraries which have their ABI version increased in this release
must be prepended with a + sign to make them appear clearly.

Fixes: f8244c6399d9 ("ethdev: increase port id range")
Fixes: ec51443cc99a ("gso: add Generic Segmentation Offload API framework")

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Zhiyong Yang <zhiyong.yang@intel.com>
---
v2: highlight vhost too
---
 doc/guides/rel_notes/release_17_11.rst | 20 ++++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)

diff --git a/doc/guides/rel_notes/release_17_11.rst b/doc/guides/rel_notes/release_17_11.rst
index 8db35f5e4..a8b113bb1 100644
--- a/doc/guides/rel_notes/release_17_11.rst
+++ b/doc/guides/rel_notes/release_17_11.rst
@@ -338,16 +338,16 @@ The libraries prepended with a plus sign were incremented in this version.
 .. code-block:: diff
 
      librte_acl.so.2
-     librte_bitratestats.so.2
+   + librte_bitratestats.so.2
      librte_cfgfile.so.2
      librte_cmdline.so.2
      librte_cryptodev.so.3
      librte_distributor.so.1
      librte_eal.so.5
-     librte_ethdev.so.8
-     librte_eventdev.so.3
+   + librte_ethdev.so.8
+   + librte_eventdev.so.3
      librte_gro.so.1
-     librte_gso.so.1
+   + librte_gso.so.1
      librte_hash.so.2
      librte_ip_frag.so.1
      librte_jobstats.so.1
@@ -360,15 +360,15 @@ The libraries prepended with a plus sign were incremented in this version.
      librte_meter.so.1
      librte_metrics.so.1
      librte_net.so.1
-     librte_pdump.so.2
+   + librte_pdump.so.2
      librte_pipeline.so.3
-     librte_pmd_bnxt.so.2
-     librte_pmd_bond.so.2
-     librte_pmd_i40e.so.2
-     librte_pmd_ixgbe.so.2
+   + librte_pmd_bnxt.so.2
+   + librte_pmd_bond.so.2
+   + librte_pmd_i40e.so.2
+   + librte_pmd_ixgbe.so.2
      librte_pmd_ring.so.2
    + librte_pmd_softnic.so.1
-     librte_pmd_vhost.so.2
+   + librte_pmd_vhost.so.2
      librte_port.so.3
      librte_power.so.1
      librte_reorder.so.1
-- 
2.14.2

^ permalink raw reply	[relevance 3%]

* [dpdk-dev] DPDK techboard minutes of October 13
@ 2017-10-23 11:50  3% Olivier MATZ
  0 siblings, 0 replies; 200+ results
From: Olivier MATZ @ 2017-10-23 11:50 UTC (permalink / raw)
  To: dev

Hi,

Here are the minutes of the last DPDK technical board meeting
held on 2017-10-13.

Attendees:
- Bruce Richardson
- Hemant Agrawal
- Jan Blunck
- Jerin Jacob
- Konstantin Ananyev
- Olivier Matz
- Stephen Hemminger
- Thomas Monjalon
- Yuanhan Liu

1) Vendor trees

   The proposal to introduce new next-net-* repositories for vendors drivers
   has been approved to optimize the process.

   - A specific maintainer for this tree will be in charge of reviewing
     and integrating the incoming patches.
   - The next-net maintainer still has the responsibility of re-checking
     that patches do not conflict with deprecations and DPDK evolutions
     in net drivers or ethdev. This will be described in the
     contributing guide.
   - This applies to the most active vendors, where the number of
     patches justifies the additional work.
   - These trees are restricted to network drivers.

2) API/ABI stability

   a) one LTS per year

      The techboard approved the proposal made at userspace of having
      one LTS per year. The next version (17.11) will be a LTS.

      - Luca Bocassi accepted to be LTS maintainer, he will maintain
        16.11.
      - Yuanhan Liu will manage 17.11.

    b) experimental APIs

       Every new API will have the "experimental" tag, meaning that
       the API is not guaranteed to follow the API deprecation
       process. This won't apply to changes on existing APIs.

       This tag will remain for at least one release, and it is the
       responsibility of the developer and maintainer to send a patch
       to remove it.

    c) enforce acknowledging of deprecation notices

       It was suggested to require 3 acks coming from different
       companies for deprecations. The techboard did not approved it.

       However, the techboard agreed that the ack of the maintainer of
       the related code has to be mandatory (and 3 acks will still be
       required, as of today). The techboard also recommends to have
       acks from different "areas of interest" (ex: nics vendors, cpu
       vendors, sw vendors, ...)

   [1] http://dpdk.org/ml/archives/dev/2017-October/077937.html
   [2] http://dpdk.org/ml/archives/dev/2017-October/077935.html

3) license of the optimized division code from libdivide

   The original author would like to keep the license of its code and
   declined to put it under BSD [3]. The techboard asks to remove this
   code and rewrite it as a BSD-licensed code. It could possibly be
   based on rte_reciprocal.

   [3] http://dpdk.org/ml/archives/dev/2017-October/077338.html

4) update on IPSec offload (rte_security)

   - Discussions are ongoing on the mailing list.
   - Target is rc2.
   - Since it's a new API, it will be marked experimental.

5) VF are broken with igb-uio

   A suggestion was made [4] to revert the initial patch, whose
   objective was to avoid to leave the devices in unknown state.
   It was suggested to give a chance to the fix [5] into rc1.

   [4] http://dpdk.org/ml/archives/dev/2017-October/079111.html
   [5] http://dpdk.org/ml/archives/dev/2017-October/079159.html

6) next chair

   Thomas will chair the next meeting as Stephen (next per alphabetical
   order) may be unavailable.

^ permalink raw reply	[relevance 3%]

* [dpdk-dev] [PATCH] mbuf: rename deprecated VLAN flags
@ 2017-10-23 12:16  2% Olivier Matz
  2017-10-25 15:12  2% ` [dpdk-dev] [PATCH v2] " Olivier Matz
  0 siblings, 1 reply; 200+ results
From: Olivier Matz @ 2017-10-23 12:16 UTC (permalink / raw)
  To: dev; +Cc: ferruh.yigit, thomas

PKT_RX_VLAN_PKT and PKT_RX_QINQ_PKT are deprecated for a while.
As explained in [1], these flags were kept to let the applications and
PMDs move to the new flag. There is also a need to support Rx vlan
offload without vlan strip (at least for the ixgbe driver).

This patch renames the old flags for this feature, knowing that some
PMDs were using PKT_RX_VLAN_PKT and PKT_RX_QINQ_PKT to indicate that
the vlan tci has been saved in the mbuf structure.

It is likely that some PMDs do not set the proper flags when doing vlan
offload, and it would be worth making a pass on all of them.

Link: [1] http://dpdk.org/ml/archives/dev/2017-June/067712.html
Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
---

An alternative would have been to keep PKT_RX_VLAN_PKT and
PKT_RX_QINQ_PKT and recycle them for this new feature.

I choosed this way (rename the flags) because:
- changing the name is a good way to highlight that something
  changed
- the old name was not that good (PKT_blabla_PKT)
- there was no reaction to the proposition in [1]

I'm also open to recycle the old name if we find good reasons
for it. It would make the patch smaller since there would be no
modification in drivers.

In both cases, it is important that PMD maintainers check
that their use of VLAN flags is correct. Example:
- vlan is not stripped and tci is saved: PKT_RX_VLAN
- vlan is stripped and tci is saved: PKT_RX_VLAN | PKT_RX_VLAN_STRIPPED
This can be completed by the packet type which describes the
packet data. I hope the API documentation is clear enough.

Ferruh, do you think you could check with PMD maintainers for next
version?

This patch has no impact on applications that do not
use the deprecated flags. For other applications, renaming
the flag would restore the same behavior. But, since we are
close to the release, applying it early after the release could
also be considered.


 doc/guides/rel_notes/deprecation.rst      |  5 -----
 doc/guides/rel_notes/release_17_11.rst    | 13 +++++++++++++
 drivers/net/af_packet/rte_eth_af_packet.c |  2 +-
 drivers/net/avp/avp_ethdev.c              |  4 ++--
 drivers/net/bnx2x/bnx2x_rxtx.c            |  2 +-
 drivers/net/bnxt/bnxt_rxr.c               |  4 ++--
 drivers/net/bonding/rte_eth_bond_pmd.c    |  2 +-
 drivers/net/cxgbe/sge.c                   |  4 ++--
 drivers/net/dpaa/dpaa_rxtx.c              |  2 +-
 drivers/net/dpaa2/dpaa2_rxtx.c            |  2 +-
 drivers/net/e1000/em_rxtx.c               |  6 +++---
 drivers/net/e1000/igb_rxtx.c              |  6 +++---
 drivers/net/enic/enic_rxtx.c              |  2 +-
 drivers/net/fm10k/fm10k_rxtx.c            |  8 ++++----
 drivers/net/fm10k/fm10k_rxtx_vec.c        |  4 ++--
 drivers/net/i40e/i40e_rxtx.c              |  2 +-
 drivers/net/i40e/i40e_rxtx_vec_altivec.c  |  2 +-
 drivers/net/i40e/i40e_rxtx_vec_neon.c     |  2 +-
 drivers/net/i40e/i40e_rxtx_vec_sse.c      |  2 +-
 drivers/net/ixgbe/ixgbe_ethdev.c          |  4 ++--
 drivers/net/ixgbe/ixgbe_rxtx.c            |  4 ++--
 drivers/net/ixgbe/ixgbe_rxtx_vec_neon.c   |  4 ++--
 drivers/net/ixgbe/ixgbe_rxtx_vec_sse.c    |  2 +-
 drivers/net/mlx5/mlx5_rxtx.c              |  2 +-
 drivers/net/mlx5/mlx5_rxtx_vec_neon.h     |  4 ++--
 drivers/net/mlx5/mlx5_rxtx_vec_sse.h      | 10 +++++-----
 drivers/net/nfp/nfp_net.c                 |  2 +-
 drivers/net/qede/qede_rxtx.c              |  4 ++--
 drivers/net/vmxnet3/vmxnet3_rxtx.c        |  3 ++-
 lib/librte_mbuf/rte_mbuf.c                |  5 +++--
 lib/librte_mbuf/rte_mbuf.h                | 27 +++++++++++++++------------
 lib/librte_net/rte_ether.h                |  2 +-
 32 files changed, 80 insertions(+), 67 deletions(-)

diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst
index 0d9925126..741c1e899 100644
--- a/doc/guides/rel_notes/deprecation.rst
+++ b/doc/guides/rel_notes/deprecation.rst
@@ -28,11 +28,6 @@ Deprecation Notices
   The change will be only for the name.
   Functional aspects of the API or data-structure will remain same.
 
-* The mbuf flags PKT_RX_VLAN_PKT and PKT_RX_QINQ_PKT are deprecated and
-  are respectively replaced by PKT_RX_VLAN_STRIPPED and
-  PKT_RX_QINQ_STRIPPED, that are better described. The old flags and
-  their behavior will be kept until 17.08 and will be removed in 17.11.
-
 * ethdev: Tx offloads will no longer be enabled by default in 17.11.
   Instead, the ``rte_eth_txmode`` structure will be extended with
   bit field to enable each Tx offload.
diff --git a/doc/guides/rel_notes/release_17_11.rst b/doc/guides/rel_notes/release_17_11.rst
index 0370aed89..702399ed8 100644
--- a/doc/guides/rel_notes/release_17_11.rst
+++ b/doc/guides/rel_notes/release_17_11.rst
@@ -291,6 +291,19 @@ API Changes
   ``rte_log_get_global_level()``, ``rte_log_set_level()`` and
   ``rte_log_get_level()``.
 
+* **Removed ``mbuf`` flags ``PKT_RX_VLAN_PKT`` and ``PKT_RX_QINQ_PKT``.**
+
+  The ``mbuf`` flags ``PKT_RX_VLAN_PKT`` and ``PKT_RX_QINQ_PKT`` have
+  been removed since their behavior were not properly described.
+
+* **Added ``mbuf`` flags ``PKT_RX_VLAN`` and ``PKT_RX_QINQ``.**
+
+  Two ``mbuf`` flags have been added to indicate that the VLAN
+  identifier has been saved in in the ``mbuf`` structure. For instance:
+
+  - if VLAN is not stripped and TCI is saved: ``PKT_RX_VLAN``
+  - if VLAN is stripped and TCI is saved: ``PKT_RX_VLAN | PKT_RX_VLAN_STRIPPED``
+
 
 ABI Changes
 -----------
diff --git a/drivers/net/af_packet/rte_eth_af_packet.c b/drivers/net/af_packet/rte_eth_af_packet.c
index 46b8250d0..dc1867057 100644
--- a/drivers/net/af_packet/rte_eth_af_packet.c
+++ b/drivers/net/af_packet/rte_eth_af_packet.c
@@ -167,7 +167,7 @@ eth_af_packet_rx(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)
 		/* check for vlan info */
 		if (ppd->tp_status & TP_STATUS_VLAN_VALID) {
 			mbuf->vlan_tci = ppd->tp_vlan_tci;
-			mbuf->ol_flags |= (PKT_RX_VLAN_PKT | PKT_RX_VLAN_STRIPPED);
+			mbuf->ol_flags |= (PKT_RX_VLAN | PKT_RX_VLAN_STRIPPED);
 		}
 
 		/* release incoming frame and advance ring buffer */
diff --git a/drivers/net/avp/avp_ethdev.c b/drivers/net/avp/avp_ethdev.c
index b97a90cea..43b33dbf2 100644
--- a/drivers/net/avp/avp_ethdev.c
+++ b/drivers/net/avp/avp_ethdev.c
@@ -1361,7 +1361,7 @@ avp_dev_copy_from_buffers(struct avp_dev *avp,
 	src_offset = 0;
 
 	if (pkt_buf->ol_flags & RTE_AVP_RX_VLAN_PKT) {
-		ol_flags = PKT_RX_VLAN_PKT;
+		ol_flags = PKT_RX_VLAN;
 		vlan_tci = pkt_buf->vlan_tci;
 	} else {
 		ol_flags = 0;
@@ -1619,7 +1619,7 @@ avp_recv_pkts(void *rx_queue,
 		m->port = avp->port_id;
 
 		if (pkt_buf->ol_flags & RTE_AVP_RX_VLAN_PKT) {
-			m->ol_flags = PKT_RX_VLAN_PKT;
+			m->ol_flags = PKT_RX_VLAN;
 			m->vlan_tci = pkt_buf->vlan_tci;
 		}
 
diff --git a/drivers/net/bnx2x/bnx2x_rxtx.c b/drivers/net/bnx2x/bnx2x_rxtx.c
index 5dd4aee7f..c72067f6f 100644
--- a/drivers/net/bnx2x/bnx2x_rxtx.c
+++ b/drivers/net/bnx2x/bnx2x_rxtx.c
@@ -422,7 +422,7 @@ bnx2x_recv_pkts(void *p_rxq, struct rte_mbuf **rx_pkts, uint16_t nb_pkts)
 		 */
 		if (cqe_fp->pars_flags.flags & PARSING_FLAGS_VLAN) {
 			rx_mb->vlan_tci = cqe_fp->vlan_tag;
-			rx_mb->ol_flags |= PKT_RX_VLAN_PKT;
+			rx_mb->ol_flags |= PKT_RX_VLAN;
 		}
 
 		rx_pkts[nb_rx] = rx_mb;
diff --git a/drivers/net/bnxt/bnxt_rxr.c b/drivers/net/bnxt/bnxt_rxr.c
index 153ca93ed..a677183f1 100644
--- a/drivers/net/bnxt/bnxt_rxr.c
+++ b/drivers/net/bnxt/bnxt_rxr.c
@@ -199,7 +199,7 @@ static void bnxt_tpa_start(struct bnxt_rx_queue *rxq,
 	if (tpa_start1->flags2 &
 	    rte_cpu_to_le_32(RX_TPA_START_CMPL_FLAGS2_META_FORMAT_VLAN)) {
 		mbuf->vlan_tci = rte_le_to_cpu_32(tpa_start1->metadata);
-		mbuf->ol_flags |= PKT_RX_VLAN_PKT;
+		mbuf->ol_flags |= PKT_RX_VLAN;
 	}
 	if (likely(tpa_start1->flags2 &
 		   rte_cpu_to_le_32(RX_TPA_START_CMPL_FLAGS2_L4_CS_CALC)))
@@ -464,7 +464,7 @@ static int bnxt_rx_pkt(struct rte_mbuf **rx_pkt,
 			(RX_PKT_CMPL_METADATA_VID_MASK |
 			RX_PKT_CMPL_METADATA_DE |
 			RX_PKT_CMPL_METADATA_PRI_MASK);
-		mbuf->ol_flags |= PKT_RX_VLAN_PKT;
+		mbuf->ol_flags |= PKT_RX_VLAN;
 	}
 
 	if (likely(RX_CMP_IP_CS_OK(rxcmp1)))
diff --git a/drivers/net/bonding/rte_eth_bond_pmd.c b/drivers/net/bonding/rte_eth_bond_pmd.c
index 3fbc1b123..c48993940 100644
--- a/drivers/net/bonding/rte_eth_bond_pmd.c
+++ b/drivers/net/bonding/rte_eth_bond_pmd.c
@@ -129,7 +129,7 @@ is_lacp_packets(uint16_t ethertype, uint8_t subtype, struct rte_mbuf *mbuf)
 {
 	const uint16_t ether_type_slow_be = rte_be_to_cpu_16(ETHER_TYPE_SLOW);
 
-	return !((mbuf->ol_flags & PKT_RX_VLAN_PKT) ? mbuf->vlan_tci : 0) &&
+	return !((mbuf->ol_flags & PKT_RX_VLAN) ? mbuf->vlan_tci : 0) &&
 		(ethertype == ether_type_slow_be &&
 		(subtype == SLOW_SUBTYPE_MARKER || subtype == SLOW_SUBTYPE_LACP));
 }
diff --git a/drivers/net/cxgbe/sge.c b/drivers/net/cxgbe/sge.c
index 5376fc500..33f7f0bc2 100644
--- a/drivers/net/cxgbe/sge.c
+++ b/drivers/net/cxgbe/sge.c
@@ -1405,7 +1405,7 @@ int t4_ethrx_handler(struct sge_rspq *q, const __be64 *rsp,
 	}
 
 	if (pkt->vlan_ex) {
-		mbuf->ol_flags |= PKT_RX_VLAN_PKT;
+		mbuf->ol_flags |= PKT_RX_VLAN;
 		mbuf->vlan_tci = ntohs(pkt->vlan);
 	}
 	rxq->stats.pkts++;
@@ -1550,7 +1550,7 @@ static int process_responses(struct sge_rspq *q, int budget,
 				}
 
 				if (cpl->vlan_ex) {
-					pkt->ol_flags |= PKT_RX_VLAN_PKT;
+					pkt->ol_flags |= PKT_RX_VLAN;
 					pkt->vlan_tci = ntohs(cpl->vlan);
 				}
 
diff --git a/drivers/net/dpaa/dpaa_rxtx.c b/drivers/net/dpaa/dpaa_rxtx.c
index 0433f3bb1..f7cfff798 100644
--- a/drivers/net/dpaa/dpaa_rxtx.c
+++ b/drivers/net/dpaa/dpaa_rxtx.c
@@ -219,7 +219,7 @@ static inline void dpaa_eth_packet_info(struct rte_mbuf *m,
 
 	/* Check if Vlan is present */
 	if (prs & DPAA_PARSE_VLAN_MASK)
-		m->ol_flags |= PKT_RX_VLAN_PKT;
+		m->ol_flags |= PKT_RX_VLAN;
 	/* Packet received without stripping the vlan */
 }
 
diff --git a/drivers/net/dpaa2/dpaa2_rxtx.c b/drivers/net/dpaa2/dpaa2_rxtx.c
index 7cfa73a8c..3f57dc227 100644
--- a/drivers/net/dpaa2/dpaa2_rxtx.c
+++ b/drivers/net/dpaa2/dpaa2_rxtx.c
@@ -122,7 +122,7 @@ dpaa2_dev_rx_offload(uint64_t hw_annot_addr, struct rte_mbuf *mbuf)
 
 	if (BIT_ISSET_AT_POS(annotation->word3,
 			     L2_VLAN_1_PRESENT | L2_VLAN_N_PRESENT))
-		mbuf->ol_flags |= PKT_RX_VLAN_PKT;
+		mbuf->ol_flags |= PKT_RX_VLAN;
 
 	if (BIT_ISSET_AT_POS(annotation->word8, DPAA2_ETH_FAS_L3CE))
 		mbuf->ol_flags |= PKT_RX_IP_CKSUM_BAD;
diff --git a/drivers/net/e1000/em_rxtx.c b/drivers/net/e1000/em_rxtx.c
index 92b66b0ea..d4d5fe6e1 100644
--- a/drivers/net/e1000/em_rxtx.c
+++ b/drivers/net/e1000/em_rxtx.c
@@ -675,7 +675,7 @@ rx_desc_status_to_pkt_flags(uint32_t rx_status)
 
 	/* Check if VLAN present */
 	pkt_flags = ((rx_status & E1000_RXD_STAT_VP) ?
-		PKT_RX_VLAN_PKT | PKT_RX_VLAN_STRIPPED : 0);
+		PKT_RX_VLAN | PKT_RX_VLAN_STRIPPED : 0);
 
 	return pkt_flags;
 }
@@ -830,7 +830,7 @@ eth_em_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts,
 		rxm->ol_flags = rxm->ol_flags |
 				rx_desc_error_to_pkt_flags(rxd.errors);
 
-		/* Only valid if PKT_RX_VLAN_PKT set in pkt_flags */
+		/* Only valid if PKT_RX_VLAN set in pkt_flags */
 		rxm->vlan_tci = rte_le_to_cpu_16(rxd.special);
 
 		/*
@@ -1056,7 +1056,7 @@ eth_em_recv_scattered_pkts(void *rx_queue, struct rte_mbuf **rx_pkts,
 		first_seg->ol_flags = first_seg->ol_flags |
 					rx_desc_error_to_pkt_flags(rxd.errors);
 
-		/* Only valid if PKT_RX_VLAN_PKT set in pkt_flags */
+		/* Only valid if PKT_RX_VLAN set in pkt_flags */
 		rxm->vlan_tci = rte_le_to_cpu_16(rxd.special);
 
 		/* Prefetch data of first segment, if configured to do so. */
diff --git a/drivers/net/e1000/igb_rxtx.c b/drivers/net/e1000/igb_rxtx.c
index 8a1e5b18e..d25ea048d 100644
--- a/drivers/net/e1000/igb_rxtx.c
+++ b/drivers/net/e1000/igb_rxtx.c
@@ -785,7 +785,7 @@ rx_desc_status_to_pkt_flags(uint32_t rx_status)
 
 	/* Check if VLAN present */
 	pkt_flags = ((rx_status & E1000_RXD_STAT_VP) ?
-		PKT_RX_VLAN_PKT | PKT_RX_VLAN_STRIPPED : 0);
+		PKT_RX_VLAN | PKT_RX_VLAN_STRIPPED : 0);
 
 #if defined(RTE_LIBRTE_IEEE1588)
 	if (rx_status & E1000_RXD_STAT_TMST)
@@ -946,7 +946,7 @@ eth_igb_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts,
 
 		rxm->hash.rss = rxd.wb.lower.hi_dword.rss;
 		hlen_type_rss = rte_le_to_cpu_32(rxd.wb.lower.lo_dword.data);
-		/* Only valid if PKT_RX_VLAN_PKT set in pkt_flags */
+		/* Only valid if PKT_RX_VLAN set in pkt_flags */
 		rxm->vlan_tci = rte_le_to_cpu_16(rxd.wb.upper.vlan);
 
 		pkt_flags = rx_desc_hlen_type_rss_to_pkt_flags(rxq, hlen_type_rss);
@@ -1180,7 +1180,7 @@ eth_igb_recv_scattered_pkts(void *rx_queue, struct rte_mbuf **rx_pkts,
 		first_seg->hash.rss = rxd.wb.lower.hi_dword.rss;
 
 		/*
-		 * The vlan_tci field is only valid when PKT_RX_VLAN_PKT is
+		 * The vlan_tci field is only valid when PKT_RX_VLAN is
 		 * set in the pkt_flags field.
 		 */
 		first_seg->vlan_tci = rte_le_to_cpu_16(rxd.wb.upper.vlan);
diff --git a/drivers/net/enic/enic_rxtx.c b/drivers/net/enic/enic_rxtx.c
index a39172f14..1d43bde9a 100644
--- a/drivers/net/enic/enic_rxtx.c
+++ b/drivers/net/enic/enic_rxtx.c
@@ -243,7 +243,7 @@ enic_cq_rx_to_pkt_flags(struct cq_desc *cqd, struct rte_mbuf *mbuf)
 
 	/* VLAN STRIPPED flag. The L2 packet type updated here also */
 	if (bwflags & CQ_ENET_RQ_DESC_FLAGS_VLAN_STRIPPED) {
-		pkt_flags |= PKT_RX_VLAN_PKT | PKT_RX_VLAN_STRIPPED;
+		pkt_flags |= PKT_RX_VLAN | PKT_RX_VLAN_STRIPPED;
 		mbuf->packet_type |= RTE_PTYPE_L2_ETHER;
 	} else {
 		if (vlan_tci != 0)
diff --git a/drivers/net/fm10k/fm10k_rxtx.c b/drivers/net/fm10k/fm10k_rxtx.c
index 4e84926f8..d6081e485 100644
--- a/drivers/net/fm10k/fm10k_rxtx.c
+++ b/drivers/net/fm10k/fm10k_rxtx.c
@@ -158,10 +158,10 @@ fm10k_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts,
 		 * Packets in fm10k device always carry at least one VLAN tag.
 		 * For those packets coming in without VLAN tag,
 		 * the port default VLAN tag will be used.
-		 * So, always PKT_RX_VLAN_PKT flag is set and vlan_tci
+		 * So, always PKT_RX_VLAN flag is set and vlan_tci
 		 * is valid for each RX packet's mbuf.
 		 */
-		mbuf->ol_flags |= PKT_RX_VLAN_PKT;
+		mbuf->ol_flags |= PKT_RX_VLAN;
 		mbuf->vlan_tci = desc.w.vlan;
 		/**
 		 * mbuf->vlan_tci_outer is an idle field in fm10k driver,
@@ -319,10 +319,10 @@ fm10k_recv_scattered_pkts(void *rx_queue, struct rte_mbuf **rx_pkts,
 		 * Packets in fm10k device always carry at least one VLAN tag.
 		 * For those packets coming in without VLAN tag,
 		 * the port default VLAN tag will be used.
-		 * So, always PKT_RX_VLAN_PKT flag is set and vlan_tci
+		 * So, always PKT_RX_VLAN flag is set and vlan_tci
 		 * is valid for each RX packet's mbuf.
 		 */
-		first_seg->ol_flags |= PKT_RX_VLAN_PKT;
+		first_seg->ol_flags |= PKT_RX_VLAN;
 		first_seg->vlan_tci = desc.w.vlan;
 		/**
 		 * mbuf->vlan_tci_outer is an idle field in fm10k driver,
diff --git a/drivers/net/fm10k/fm10k_rxtx_vec.c b/drivers/net/fm10k/fm10k_rxtx_vec.c
index d23bfe9b7..edc4ae16e 100644
--- a/drivers/net/fm10k/fm10k_rxtx_vec.c
+++ b/drivers/net/fm10k/fm10k_rxtx_vec.c
@@ -81,8 +81,8 @@ fm10k_desc_to_olflags_v(__m128i descs[4], struct rte_mbuf **rx_pkts)
 
 	const __m128i pkttype_msk = _mm_set_epi16(
 			0x0000, 0x0000, 0x0000, 0x0000,
-			PKT_RX_VLAN_PKT, PKT_RX_VLAN_PKT,
-			PKT_RX_VLAN_PKT, PKT_RX_VLAN_PKT);
+			PKT_RX_VLAN, PKT_RX_VLAN,
+			PKT_RX_VLAN, PKT_RX_VLAN);
 
 	/* mask everything except rss type */
 	const __m128i rsstype_msk = _mm_set_epi16(
diff --git a/drivers/net/i40e/i40e_rxtx.c b/drivers/net/i40e/i40e_rxtx.c
index f21c1c5d2..904d37f08 100644
--- a/drivers/net/i40e/i40e_rxtx.c
+++ b/drivers/net/i40e/i40e_rxtx.c
@@ -108,7 +108,7 @@ i40e_rxd_to_vlan_tci(struct rte_mbuf *mb, volatile union i40e_rx_desc *rxdp)
 {
 	if (rte_le_to_cpu_64(rxdp->wb.qword1.status_error_len) &
 		(1 << I40E_RX_DESC_STATUS_L2TAG1P_SHIFT)) {
-		mb->ol_flags |= PKT_RX_VLAN_PKT | PKT_RX_VLAN_STRIPPED;
+		mb->ol_flags |= PKT_RX_VLAN | PKT_RX_VLAN_STRIPPED;
 		mb->vlan_tci =
 			rte_le_to_cpu_16(rxdp->wb.qword0.lo_dword.l2tag1);
 		PMD_RX_LOG(DEBUG, "Descriptor l2tag1: %u",
diff --git a/drivers/net/i40e/i40e_rxtx_vec_altivec.c b/drivers/net/i40e/i40e_rxtx_vec_altivec.c
index f4036ea28..5ab9445ed 100644
--- a/drivers/net/i40e/i40e_rxtx_vec_altivec.c
+++ b/drivers/net/i40e/i40e_rxtx_vec_altivec.c
@@ -146,7 +146,7 @@ desc_to_olflags_v(vector unsigned long descs[4], struct rte_mbuf **rx_pkts)
 	/* map rss and vlan type to rss hash and vlan flag */
 	const vector unsigned char vlan_flags = (vector unsigned char){
 			0, 0, 0, 0,
-			PKT_RX_VLAN_PKT | PKT_RX_VLAN_STRIPPED, 0, 0, 0,
+			PKT_RX_VLAN | PKT_RX_VLAN_STRIPPED, 0, 0, 0,
 			0, 0, 0, 0,
 			0, 0, 0, 0};
 
diff --git a/drivers/net/i40e/i40e_rxtx_vec_neon.c b/drivers/net/i40e/i40e_rxtx_vec_neon.c
index 694e91f33..d0e604068 100644
--- a/drivers/net/i40e/i40e_rxtx_vec_neon.c
+++ b/drivers/net/i40e/i40e_rxtx_vec_neon.c
@@ -137,7 +137,7 @@ desc_to_olflags_v(struct i40e_rx_queue *rxq, uint64x2_t descs[4],
 	/* map rss and vlan type to rss hash and vlan flag */
 	const uint8x16_t vlan_flags = {
 			0, 0, 0, 0,
-			PKT_RX_VLAN_PKT | PKT_RX_VLAN_STRIPPED, 0, 0, 0,
+			PKT_RX_VLAN | PKT_RX_VLAN_STRIPPED, 0, 0, 0,
 			0, 0, 0, 0,
 			0, 0, 0, 0};
 
diff --git a/drivers/net/i40e/i40e_rxtx_vec_sse.c b/drivers/net/i40e/i40e_rxtx_vec_sse.c
index 779f14e53..86e16ddf9 100644
--- a/drivers/net/i40e/i40e_rxtx_vec_sse.c
+++ b/drivers/net/i40e/i40e_rxtx_vec_sse.c
@@ -151,7 +151,7 @@ desc_to_olflags_v(struct i40e_rx_queue *rxq, __m128i descs[4],
 	/* map rss and vlan type to rss hash and vlan flag */
 	const __m128i vlan_flags = _mm_set_epi8(0, 0, 0, 0,
 			0, 0, 0, 0,
-			0, 0, 0, PKT_RX_VLAN_PKT | PKT_RX_VLAN_STRIPPED,
+			0, 0, 0, PKT_RX_VLAN | PKT_RX_VLAN_STRIPPED,
 			0, 0, 0, 0);
 
 	const __m128i rss_flags = _mm_set_epi8(0, 0, 0, 0,
diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c
index 14b9c5303..a16921afd 100644
--- a/drivers/net/ixgbe/ixgbe_ethdev.c
+++ b/drivers/net/ixgbe/ixgbe_ethdev.c
@@ -1960,9 +1960,9 @@ ixgbe_vlan_hw_strip_bitmap_set(struct rte_eth_dev *dev, uint16_t queue, bool on)
 	rxq = dev->data->rx_queues[queue];
 
 	if (on)
-		rxq->vlan_flags = PKT_RX_VLAN_PKT | PKT_RX_VLAN_STRIPPED;
+		rxq->vlan_flags = PKT_RX_VLAN | PKT_RX_VLAN_STRIPPED;
 	else
-		rxq->vlan_flags = PKT_RX_VLAN_PKT;
+		rxq->vlan_flags = PKT_RX_VLAN;
 }
 
 static void
diff --git a/drivers/net/ixgbe/ixgbe_rxtx.c b/drivers/net/ixgbe/ixgbe_rxtx.c
index 0038dfbb4..ea2813a43 100644
--- a/drivers/net/ixgbe/ixgbe_rxtx.c
+++ b/drivers/net/ixgbe/ixgbe_rxtx.c
@@ -1849,7 +1849,7 @@ ixgbe_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts,
 		rxm->port = rxq->port_id;
 
 		pkt_info = rte_le_to_cpu_32(rxd.wb.lower.lo_dword.data);
-		/* Only valid if PKT_RX_VLAN_PKT set in pkt_flags */
+		/* Only valid if PKT_RX_VLAN set in pkt_flags */
 		rxm->vlan_tci = rte_le_to_cpu_16(rxd.wb.upper.vlan);
 
 		pkt_flags = rx_desc_status_to_pkt_flags(staterr, vlan_flags);
@@ -1940,7 +1940,7 @@ ixgbe_fill_cluster_head_buf(
 
 	head->port = rxq->port_id;
 
-	/* The vlan_tci field is only valid when PKT_RX_VLAN_PKT is
+	/* The vlan_tci field is only valid when PKT_RX_VLAN is
 	 * set in the pkt_flags field.
 	 */
 	head->vlan_tci = rte_le_to_cpu_16(desc->wb.upper.vlan);
diff --git a/drivers/net/ixgbe/ixgbe_rxtx_vec_neon.c b/drivers/net/ixgbe/ixgbe_rxtx_vec_neon.c
index 44de1caac..18e3d199f 100644
--- a/drivers/net/ixgbe/ixgbe_rxtx_vec_neon.c
+++ b/drivers/net/ixgbe/ixgbe_rxtx_vec_neon.c
@@ -126,8 +126,8 @@ desc_to_olflags_v(uint8x16x2_t sterr_tmp1, uint8x16x2_t sterr_tmp2,
 	} vol;
 
 	const uint8x16_t pkttype_msk = {
-			PKT_RX_VLAN_PKT, PKT_RX_VLAN_PKT,
-			PKT_RX_VLAN_PKT, PKT_RX_VLAN_PKT,
+			PKT_RX_VLAN, PKT_RX_VLAN,
+			PKT_RX_VLAN, PKT_RX_VLAN,
 			0x00, 0x00, 0x00, 0x00,
 			0x00, 0x00, 0x00, 0x00,
 			0x00, 0x00, 0x00, 0x00};
diff --git a/drivers/net/ixgbe/ixgbe_rxtx_vec_sse.c b/drivers/net/ixgbe/ixgbe_rxtx_vec_sse.c
index e704a7f35..fe6937bf3 100644
--- a/drivers/net/ixgbe/ixgbe_rxtx_vec_sse.c
+++ b/drivers/net/ixgbe/ixgbe_rxtx_vec_sse.c
@@ -397,7 +397,7 @@ _recv_raw_pkts_vec(struct ixgbe_rx_queue *rxq, struct rte_mbuf **rx_pkts,
 	sw_ring = &rxq->sw_ring[rxq->rx_tail];
 
 	/* ensure these 2 flags are in the lower 8 bits */
-	RTE_BUILD_BUG_ON((PKT_RX_VLAN_PKT | PKT_RX_VLAN_STRIPPED) > UINT8_MAX);
+	RTE_BUILD_BUG_ON((PKT_RX_VLAN | PKT_RX_VLAN_STRIPPED) > UINT8_MAX);
 	vlan_flags = rxq->vlan_flags & UINT8_MAX;
 
 	/* A. load 4 packet in one loop
diff --git a/drivers/net/mlx5/mlx5_rxtx.c b/drivers/net/mlx5/mlx5_rxtx.c
index 961967bf4..763d5bb59 100644
--- a/drivers/net/mlx5/mlx5_rxtx.c
+++ b/drivers/net/mlx5/mlx5_rxtx.c
@@ -1882,7 +1882,7 @@ mlx5_rx_burst(void *dpdk_rxq, struct rte_mbuf **pkts, uint16_t pkts_n)
 			if (rxq->vlan_strip &&
 			    (cqe->hdr_type_etc &
 			     rte_cpu_to_be_16(MLX5_CQE_VLAN_STRIPPED))) {
-				pkt->ol_flags |= PKT_RX_VLAN_PKT |
+				pkt->ol_flags |= PKT_RX_VLAN |
 					PKT_RX_VLAN_STRIPPED;
 				pkt->vlan_tci =
 					rte_be_to_cpu_16(cqe->vlan_info);
diff --git a/drivers/net/mlx5/mlx5_rxtx_vec_neon.h b/drivers/net/mlx5/mlx5_rxtx_vec_neon.h
index 4cb7f2889..da3c96f4a 100644
--- a/drivers/net/mlx5/mlx5_rxtx_vec_neon.h
+++ b/drivers/net/mlx5/mlx5_rxtx_vec_neon.h
@@ -572,7 +572,7 @@ rxq_cq_to_ptype_oflags_v(struct mlx5_rxq_data *rxq,
 	const uint32x4_t ptype_ol_mask = { 0x106, 0x106, 0x106, 0x106 };
 	const uint8x16_t cv_flag_sel = {
 		0,
-		(uint8_t)(PKT_RX_VLAN_PKT | PKT_RX_VLAN_STRIPPED),
+		(uint8_t)(PKT_RX_VLAN | PKT_RX_VLAN_STRIPPED),
 		(uint8_t)(PKT_RX_IP_CKSUM_GOOD >> 1),
 		0,
 		(uint8_t)(PKT_RX_L4_CKSUM_GOOD >> 1),
@@ -582,7 +582,7 @@ rxq_cq_to_ptype_oflags_v(struct mlx5_rxq_data *rxq,
 	};
 	const uint32x4_t cv_mask =
 		vdupq_n_u32(PKT_RX_IP_CKSUM_GOOD | PKT_RX_L4_CKSUM_GOOD |
-			    PKT_RX_VLAN_PKT | PKT_RX_VLAN_STRIPPED);
+			    PKT_RX_VLAN | PKT_RX_VLAN_STRIPPED);
 	const uint64x1_t mbuf_init = vld1_u64(&rxq->mbuf_initializer);
 	const uint64x1_t r32_mask = vcreate_u64(0xffffffff);
 	uint64x2_t rearm0, rearm1, rearm2, rearm3;
diff --git a/drivers/net/mlx5/mlx5_rxtx_vec_sse.h b/drivers/net/mlx5/mlx5_rxtx_vec_sse.h
index e9819b762..95e41d51a 100644
--- a/drivers/net/mlx5/mlx5_rxtx_vec_sse.h
+++ b/drivers/net/mlx5/mlx5_rxtx_vec_sse.h
@@ -563,17 +563,17 @@ rxq_cq_to_ptype_oflags_v(struct mlx5_rxq_data *rxq, __m128i cqes[4],
 			     (uint8_t)(PKT_RX_L4_CKSUM_GOOD >> 1),
 			     0,
 			     (uint8_t)(PKT_RX_IP_CKSUM_GOOD >> 1),
-			     (uint8_t)(PKT_RX_VLAN_PKT | PKT_RX_VLAN_STRIPPED),
+			     (uint8_t)(PKT_RX_VLAN | PKT_RX_VLAN_STRIPPED),
 			     0);
 	const __m128i cv_mask =
 		_mm_set_epi32(PKT_RX_IP_CKSUM_GOOD | PKT_RX_L4_CKSUM_GOOD |
-			      PKT_RX_VLAN_PKT | PKT_RX_VLAN_STRIPPED,
+			      PKT_RX_VLAN | PKT_RX_VLAN_STRIPPED,
 			      PKT_RX_IP_CKSUM_GOOD | PKT_RX_L4_CKSUM_GOOD |
-			      PKT_RX_VLAN_PKT | PKT_RX_VLAN_STRIPPED,
+			      PKT_RX_VLAN | PKT_RX_VLAN_STRIPPED,
 			      PKT_RX_IP_CKSUM_GOOD | PKT_RX_L4_CKSUM_GOOD |
-			      PKT_RX_VLAN_PKT | PKT_RX_VLAN_STRIPPED,
+			      PKT_RX_VLAN | PKT_RX_VLAN_STRIPPED,
 			      PKT_RX_IP_CKSUM_GOOD | PKT_RX_L4_CKSUM_GOOD |
-			      PKT_RX_VLAN_PKT | PKT_RX_VLAN_STRIPPED);
+			      PKT_RX_VLAN | PKT_RX_VLAN_STRIPPED);
 	const __m128i mbuf_init =
 		_mm_loadl_epi64((__m128i *)&rxq->mbuf_initializer);
 	__m128i rearm0, rearm1, rearm2, rearm3;
diff --git a/drivers/net/nfp/nfp_net.c b/drivers/net/nfp/nfp_net.c
index 0917b9c49..098dbcb62 100644
--- a/drivers/net/nfp/nfp_net.c
+++ b/drivers/net/nfp/nfp_net.c
@@ -2067,7 +2067,7 @@ nfp_net_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts, uint16_t nb_pkts)
 		if ((rxds->rxd.flags & PCIE_DESC_RX_VLAN) &&
 		    (hw->ctrl & NFP_NET_CFG_CTRL_RXVLAN)) {
 			mb->vlan_tci = rte_cpu_to_le_32(rxds->rxd.vlan);
-			mb->ol_flags |= PKT_RX_VLAN_PKT | PKT_RX_VLAN_STRIPPED;
+			mb->ol_flags |= PKT_RX_VLAN | PKT_RX_VLAN_STRIPPED;
 		}
 
 		/* Adding the mbuff to the mbuff array passed by the app */
diff --git a/drivers/net/qede/qede_rxtx.c b/drivers/net/qede/qede_rxtx.c
index 45b4aeb8a..f2b62e8bf 100644
--- a/drivers/net/qede/qede_rxtx.c
+++ b/drivers/net/qede/qede_rxtx.c
@@ -1276,14 +1276,14 @@ qede_recv_pkts(void *p_rxq, struct rte_mbuf **rx_pkts, uint16_t nb_pkts)
 		}
 
 		if (CQE_HAS_VLAN(parse_flag)) {
-			ol_flags |= PKT_RX_VLAN_PKT;
+			ol_flags |= PKT_RX_VLAN;
 			if (qdev->vlan_strip_flg) {
 				ol_flags |= PKT_RX_VLAN_STRIPPED;
 				rx_mb->vlan_tci = vlan_tci;
 			}
 		}
 		if (CQE_HAS_OUTER_VLAN(parse_flag)) {
-			ol_flags |= PKT_RX_QINQ_PKT;
+			ol_flags |= PKT_RX_QINQ;
 			if (qdev->vlan_strip_flg) {
 				rx_mb->vlan_tci = vlan_tci;
 				ol_flags |= PKT_RX_QINQ_STRIPPED;
diff --git a/drivers/net/vmxnet3/vmxnet3_rxtx.c b/drivers/net/vmxnet3/vmxnet3_rxtx.c
index c9a2df3f4..01c85f138 100644
--- a/drivers/net/vmxnet3/vmxnet3_rxtx.c
+++ b/drivers/net/vmxnet3/vmxnet3_rxtx.c
@@ -847,7 +847,8 @@ vmxnet3_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts, uint16_t nb_pkts)
 
 			/* Check for hardware stripped VLAN tag */
 			if (rcd->ts) {
-				start->ol_flags |= (PKT_RX_VLAN_PKT | PKT_RX_VLAN_STRIPPED);
+				start->ol_flags |= (PKT_RX_VLAN |
+						PKT_RX_VLAN_STRIPPED);
 				start->vlan_tci = rte_le_to_cpu_16((uint16_t)rcd->tci);
 			}
 
diff --git a/lib/librte_mbuf/rte_mbuf.c b/lib/librte_mbuf/rte_mbuf.c
index 0e18709d9..92fc704ee 100644
--- a/lib/librte_mbuf/rte_mbuf.c
+++ b/lib/librte_mbuf/rte_mbuf.c
@@ -308,7 +308,7 @@ const void *__rte_pktmbuf_read(const struct rte_mbuf *m, uint32_t off,
 const char *rte_get_rx_ol_flag_name(uint64_t mask)
 {
 	switch (mask) {
-	case PKT_RX_VLAN_PKT: return "PKT_RX_VLAN_PKT";
+	case PKT_RX_VLAN: return "PKT_RX_VLAN";
 	case PKT_RX_RSS_HASH: return "PKT_RX_RSS_HASH";
 	case PKT_RX_FDIR: return "PKT_RX_FDIR";
 	case PKT_RX_L4_CKSUM_BAD: return "PKT_RX_L4_CKSUM_BAD";
@@ -339,7 +339,7 @@ int
 rte_get_rx_ol_flag_list(uint64_t mask, char *buf, size_t buflen)
 {
 	const struct flag_mask rx_flags[] = {
-		{ PKT_RX_VLAN_PKT, PKT_RX_VLAN_PKT, NULL },
+		{ PKT_RX_VLAN, PKT_RX_VLAN, NULL },
 		{ PKT_RX_RSS_HASH, PKT_RX_RSS_HASH, NULL },
 		{ PKT_RX_FDIR, PKT_RX_FDIR, NULL },
 		{ PKT_RX_L4_CKSUM_BAD, PKT_RX_L4_CKSUM_MASK, NULL },
@@ -359,6 +359,7 @@ rte_get_rx_ol_flag_list(uint64_t mask, char *buf, size_t buflen)
 		{ PKT_RX_QINQ_STRIPPED, PKT_RX_QINQ_STRIPPED, NULL },
 		{ PKT_RX_LRO, PKT_RX_LRO, NULL },
 		{ PKT_RX_TIMESTAMP, PKT_RX_TIMESTAMP, NULL },
+		{ PKT_RX_QINQ, PKT_RX_QINQ, NULL },
 	};
 	const char *name;
 	unsigned int i;
diff --git a/lib/librte_mbuf/rte_mbuf.h b/lib/librte_mbuf/rte_mbuf.h
index cc380400d..5f250f364 100644
--- a/lib/librte_mbuf/rte_mbuf.h
+++ b/lib/librte_mbuf/rte_mbuf.h
@@ -89,12 +89,13 @@ extern "C" {
  */
 
 /**
- * RX packet is a 802.1q VLAN packet. This flag was set by PMDs when
- * the packet is recognized as a VLAN, but the behavior between PMDs
- * was not the same. This flag is kept for some time to avoid breaking
- * applications and should be replaced by PKT_RX_VLAN_STRIPPED.
+ * The RX packet is a 802.1q VLAN packet, and the tci has been
+ * saved in in mbuf->vlan_tci.
+ * If the flag PKT_RX_VLAN_STRIPPED is also present, the VLAN
+ * header has been stripped from mbuf data, else it is still
+ * present.
  */
-#define PKT_RX_VLAN_PKT      (1ULL << 0)
+#define PKT_RX_VLAN          (1ULL << 0)
 
 #define PKT_RX_RSS_HASH      (1ULL << 1)  /**< RX packet with RSS hash result. */
 #define PKT_RX_FDIR          (1ULL << 2)  /**< RX packet with FDIR match indicate. */
@@ -171,13 +172,6 @@ extern "C" {
 #define PKT_RX_QINQ_STRIPPED (1ULL << 15)
 
 /**
- * Deprecated.
- * RX packet with double VLAN stripped.
- * This flag is replaced by PKT_RX_QINQ_STRIPPED.
- */
-#define PKT_RX_QINQ_PKT      PKT_RX_QINQ_STRIPPED
-
-/**
  * When packets are coalesced by a hardware or virtual driver, this flag
  * can be set in the RX mbuf, meaning that the m->tso_segsz field is
  * valid and is set to the segment size of original packets.
@@ -189,6 +183,15 @@ extern "C" {
  */
 #define PKT_RX_TIMESTAMP     (1ULL << 17)
 
+/**
+ * The RX packet is a double VLAN, and the outer tci has been
+ * saved in in mbuf->vlan_tci_outer.
+ * If the flag PKT_RX_QINQ_STRIPPED is also present, both VLANs
+ * headers have been stripped from mbuf data, else they are still
+ * present.
+ */
+#define PKT_RX_QINQ          (1ULL << 18)
+
 /* add new RX flags here */
 
 /* add new TX flags here */
diff --git a/lib/librte_net/rte_ether.h b/lib/librte_net/rte_ether.h
index 917d42a1a..06d7b486c 100644
--- a/lib/librte_net/rte_ether.h
+++ b/lib/librte_net/rte_ether.h
@@ -358,7 +358,7 @@ static inline int rte_vlan_strip(struct rte_mbuf *m)
 		return -1;
 
 	struct vlan_hdr *vh = (struct vlan_hdr *)(eh + 1);
-	m->ol_flags |= PKT_RX_VLAN_PKT | PKT_RX_VLAN_STRIPPED;
+	m->ol_flags |= PKT_RX_VLAN | PKT_RX_VLAN_STRIPPED;
 	m->vlan_tci = rte_be_to_cpu_16(vh->vlan_tci);
 
 	/* Copy ether header over rather than moving whole packet */
-- 
2.11.0

^ permalink raw reply	[relevance 2%]

* Re: [dpdk-dev] [PATCH v1 2/2] event/octeontx: bump library version
  2017-10-16 13:42  3% ` [dpdk-dev] [PATCH v1 2/2] event/octeontx: bump library version Santosh Shukla
  2017-10-17  9:50  0%   ` Hemant Agrawal
@ 2017-10-23 14:38  3%   ` Thomas Monjalon
  1 sibling, 0 replies; 200+ results
From: Thomas Monjalon @ 2017-10-23 14:38 UTC (permalink / raw)
  To: Santosh Shukla; +Cc: dev, olivier.matz, jerin.jacob, hemant.agrawal

This change is rejected because this PMD has no API/ABI.

16/10/2017 15:42, Santosh Shukla:
> This commit bumps the library version to reflect the ABI change
> caused by removing the below function from event/octeontx:
> * octeontx_ssovf_info
> * octeontx_ssovf_bar
> * octeontx_ssovf_mbox_send
> 
> And moved to mempool/octeontx area.
> 
> Signed-off-by: Santosh Shukla <santosh.shukla@caviumnetworks.com>
> ---
>  doc/guides/rel_notes/release_17_11.rst | 1 +
>  drivers/event/octeontx/Makefile        | 2 +-
>  2 files changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/doc/guides/rel_notes/release_17_11.rst b/doc/guides/rel_notes/release_17_11.rst
> index 8db35f5e4..eac2f677a 100644
> --- a/doc/guides/rel_notes/release_17_11.rst
> +++ b/doc/guides/rel_notes/release_17_11.rst
> @@ -377,6 +377,7 @@ The libraries prepended with a plus sign were incremented in this version.
>       librte_table.so.2
>       librte_timer.so.1
>       librte_vhost.so.3
> +     librte_pmd_octeontx_ssovf.so.2
>  
>  
>  Tested Platforms
> diff --git a/drivers/event/octeontx/Makefile b/drivers/event/octeontx/Makefile
> index 50434a384..08fc16775 100644
> --- a/drivers/event/octeontx/Makefile
> +++ b/drivers/event/octeontx/Makefile
> @@ -42,7 +42,7 @@ CFLAGS += -I$(RTE_SDK)/drivers/mempool/octeontx/
>  
>  EXPORT_MAP := rte_pmd_octeontx_ssovf_version.map
>  
> -LIBABIVER := 1
> +LIBABIVER := 2
>  
>  #
>  # all source are stored in SRCS-y
> 

^ permalink raw reply	[relevance 3%]

* Re: [dpdk-dev] [PATCH v2] doc: fix highlight of bumped libs in release notes
  2017-10-23 10:15  3% ` [dpdk-dev] [PATCH v2] " Thomas Monjalon
@ 2017-10-23 16:26  0%   ` Ferruh Yigit
  2017-10-23 20:39  0%     ` Thomas Monjalon
  0 siblings, 1 reply; 200+ results
From: Ferruh Yigit @ 2017-10-23 16:26 UTC (permalink / raw)
  To: Thomas Monjalon, dev

On 10/23/2017 3:15 AM, Thomas Monjalon wrote:
> The libraries which have their ABI version increased in this release
> must be prepended with a + sign to make them appear clearly.
> 
> Fixes: f8244c6399d9 ("ethdev: increase port id range")
> Fixes: ec51443cc99a ("gso: add Generic Segmentation Offload API framework")
> 
> Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
> Acked-by: Zhiyong Yang <zhiyong.yang@intel.com>

Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>

^ permalink raw reply	[relevance 0%]

* Re: [dpdk-dev] [PATCH v3 5/6] doc: remove dpdk iova aware notice
  2017-10-20 12:31 15%     ` [dpdk-dev] [PATCH v3 5/6] doc: remove dpdk iova aware notice Santosh Shukla
@ 2017-10-23 20:29  0%       ` Thomas Monjalon
  2017-10-24  5:06  0%         ` santosh
  0 siblings, 1 reply; 200+ results
From: Thomas Monjalon @ 2017-10-23 20:29 UTC (permalink / raw)
  To: Santosh Shukla
  Cc: dev, olivier.matz, jerin.jacob, hemant.agrawal, anatoly.burakov

20/10/2017 14:31, Santosh Shukla:
> Removed dpdk iova aware ABI deprecation notice,
> and updated ABI change details in release_17.11.rst.
> 
> Signed-off-by: Santosh Shukla <santosh.shukla@caviumnetworks.com>
> Acked-by: John McNamara <john.mcnamara@intel.com>
> ---
> --- a/doc/guides/rel_notes/deprecation.rst
> +++ b/doc/guides/rel_notes/deprecation.rst
> -* eal: An ABI change is planned for 17.11 to make DPDK aware of IOVA address
> -  translation scheme.
> -  Reference to phys address in EAL data-structure or functions may change to
> -  IOVA address or more appropriate name.
> -  The change will be only for the name.
> -  Functional aspects of the API or data-structure will remain same.

Sorry, this series cannot be applied as is because it is breaking
more than EAL API. The API of mbuf and mempool are also changed.
We need to choose one of these three options:
	1/ accept to break all API in 17.11
	2/ postpone the whole series to 18.02
	3/ rename only EAL API in 17.11 and postpone mbuf/mempool

One more comment:
For such a large change, we should provide a script in devtools
to help porting the applications. I suggest a sed script.

^ permalink raw reply	[relevance 0%]

* Re: [dpdk-dev] [PATCH v2] doc: fix highlight of bumped libs in release notes
  2017-10-23 16:26  0%   ` Ferruh Yigit
@ 2017-10-23 20:39  0%     ` Thomas Monjalon
  0 siblings, 0 replies; 200+ results
From: Thomas Monjalon @ 2017-10-23 20:39 UTC (permalink / raw)
  To: dev; +Cc: Ferruh Yigit

23/10/2017 18:26, Ferruh Yigit:
> On 10/23/2017 3:15 AM, Thomas Monjalon wrote:
> > The libraries which have their ABI version increased in this release
> > must be prepended with a + sign to make them appear clearly.
> > 
> > Fixes: f8244c6399d9 ("ethdev: increase port id range")
> > Fixes: ec51443cc99a ("gso: add Generic Segmentation Offload API framework")
> > 
> > Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
> > Acked-by: Zhiyong Yang <zhiyong.yang@intel.com>
> 
> Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>

Applied

^ permalink raw reply	[relevance 0%]

* Re: [dpdk-dev] [PATCH v3 5/6] doc: remove dpdk iova aware notice
  2017-10-23 20:29  0%       ` Thomas Monjalon
@ 2017-10-24  5:06  0%         ` santosh
  2017-10-25  9:45  0%           ` Thomas Monjalon
  0 siblings, 1 reply; 200+ results
From: santosh @ 2017-10-24  5:06 UTC (permalink / raw)
  To: Thomas Monjalon
  Cc: dev, olivier.matz, jerin.jacob, hemant.agrawal, anatoly.burakov

Hi Thomas,


On Tuesday 24 October 2017 01:59 AM, Thomas Monjalon wrote:
> 20/10/2017 14:31, Santosh Shukla:
>> Removed dpdk iova aware ABI deprecation notice,
>> and updated ABI change details in release_17.11.rst.
>>
>> Signed-off-by: Santosh Shukla <santosh.shukla@caviumnetworks.com>
>> Acked-by: John McNamara <john.mcnamara@intel.com>
>> ---
>> --- a/doc/guides/rel_notes/deprecation.rst
>> +++ b/doc/guides/rel_notes/deprecation.rst
>> -* eal: An ABI change is planned for 17.11 to make DPDK aware of IOVA address
>> -  translation scheme.
>> -  Reference to phys address in EAL data-structure or functions may change to
>> -  IOVA address or more appropriate name.
>> -  The change will be only for the name.
>> -  Functional aspects of the API or data-structure will remain same.
> Sorry, this series cannot be applied as is because it is breaking
> more than EAL API. The API of mbuf and mempool are also changed.
> We need to choose one of these three options:
> 	1/ accept to break all API in 17.11
> 	2/ postpone the whole series to 18.02

Theme of series is to make dpdk iova aware so I would prefer option 1) or 2).
However I have no strong opinion on this topic. 
Lets get more opinion from others about option 1/2/3.

> 	3/ rename only EAL API in 17.11 and postpone mbuf/mempool
>
> One more comment:
> For such a large change, we should provide a script in devtools
> to help porting the applications. I suggest a sed script.

+1.
Thanks.

^ permalink raw reply	[relevance 0%]

* Re: [dpdk-dev] [PATCH v10 0/4] flow classification library
  @ 2017-10-24  8:40  3%     ` Iremonger, Bernard
  2017-10-24  9:23  0%       ` Mcnamara, John
  0 siblings, 1 reply; 200+ results
From: Iremonger, Bernard @ 2017-10-24  8:40 UTC (permalink / raw)
  To: Thomas Monjalon
  Cc: dev, Yigit, Ferruh, Ananyev, Konstantin, Dumitrescu, Cristian,
	adrien.mazarguil, Singh, Jasvinder, Mcnamara, John, Iremonger,
	Bernard

Hi Thomas,

> -----Original Message-----
> From: Thomas Monjalon [mailto:thomas@monjalon.net]
> Sent: Monday, October 23, 2017 9:59 PM
> To: Iremonger, Bernard <bernard.iremonger@intel.com>
> Cc: dev@dpdk.org; Yigit, Ferruh <ferruh.yigit@intel.com>; Ananyev,
> Konstantin <konstantin.ananyev@intel.com>; Dumitrescu, Cristian
> <cristian.dumitrescu@intel.com>; adrien.mazarguil@6wind.com; Singh,
> Jasvinder <jasvinder.singh@intel.com>; Mcnamara, John
> <john.mcnamara@intel.com>
> Subject: Re: [dpdk-dev] [PATCH v10 0/4] flow classification library
> 
> 23/10/2017 17:16, Bernard Iremonger:
> > The initial implementation is to provide counting of IPv4 five tuple
> > packets for UDP, TCP and SCTP, but the library is planned to be as generic
> as possible.
> >
> > The flow information provided by this library is missing to implement
> > full IPFIX features, but this is planned to be the initial step.
> >
> > Flows are defined using rte_flow, also measurements (actions) are
> provided by rte_flow.
> > To support more IPFIX measurements, the implementation may require
> > extending rte_flow in addition to extending this library.
> >
> > The library uses both flows and actions defined by rte_flow.h so this
> > library has a dependency on rte_flow.h
> >
> > This patch set also contains a set of unit tests for the Flow Classify
> > library, patch(4) and a patch(3) containing additional functions added to the
> packet burst generator code.
> >
> > For further steps, this library may be expanded to benefit from hardware
> filters for better performance.
> >
> > It will be more beneficial to shape this library to cover more use
> > cases, please feel free to comment on possible other use cases and desired
> functionalities.
> 
> I had some feedbacks that this library won't be ready for 17.11.
> So I did not review it.
> 
> I suppose you are OK to wait one more release and call for more reviewers?

This library was not ready for 17.11.RC1 having received some comments just before the RC1 deadline.
It was then targeted for RC2 and we have pulled out all the stops to get it ready for RC2.

It is now at v10 of the patch set, there have been no review comments from the community (apart from Intel), since RFC v3.

I think that there has been ample time for the community to review this patch set, calling for more reviewers at this point is not helpful.

The API's of the library are marked as experimental, so there will be no issues with ABI breakage, if there are requests for changes later.

I am not OK to wait one more release, I believe we have followed the process correctly.

Regards,

Bernard.

^ permalink raw reply	[relevance 3%]

* Re: [dpdk-dev] [PATCH v10 0/4] flow classification library
  2017-10-24  8:40  3%     ` Iremonger, Bernard
@ 2017-10-24  9:23  0%       ` Mcnamara, John
  2017-10-24  9:38  0%         ` Thomas Monjalon
  0 siblings, 1 reply; 200+ results
From: Mcnamara, John @ 2017-10-24  9:23 UTC (permalink / raw)
  To: Iremonger, Bernard, Thomas Monjalon
  Cc: dev, Yigit, Ferruh, Ananyev, Konstantin, Dumitrescu, Cristian,
	adrien.mazarguil, Singh, Jasvinder



> -----Original Message-----
> From: Iremonger, Bernard
> Sent: Tuesday, October 24, 2017 9:41 AM
> To: Thomas Monjalon <thomas@monjalon.net>
> Cc: dev@dpdk.org; Yigit, Ferruh <ferruh.yigit@intel.com>; Ananyev,
> Konstantin <konstantin.ananyev@intel.com>; Dumitrescu, Cristian
> <cristian.dumitrescu@intel.com>; adrien.mazarguil@6wind.com; Singh,
> Jasvinder <jasvinder.singh@intel.com>; Mcnamara, John
> <john.mcnamara@intel.com>; Iremonger, Bernard
> <bernard.iremonger@intel.com>
> Subject: RE: [dpdk-dev] [PATCH v10 0/4] flow classification library
> 
> Hi Thomas,
> 
> > -----Original Message-----
> > From: Thomas Monjalon [mailto:thomas@monjalon.net]
> > Sent: Monday, October 23, 2017 9:59 PM
> > To: Iremonger, Bernard <bernard.iremonger@intel.com>
> > Cc: dev@dpdk.org; Yigit, Ferruh <ferruh.yigit@intel.com>; Ananyev,
> > Konstantin <konstantin.ananyev@intel.com>; Dumitrescu, Cristian
> > <cristian.dumitrescu@intel.com>; adrien.mazarguil@6wind.com; Singh,
> > Jasvinder <jasvinder.singh@intel.com>; Mcnamara, John
> > <john.mcnamara@intel.com>
> > Subject: Re: [dpdk-dev] [PATCH v10 0/4] flow classification library
>
> > I suppose you are OK to wait one more release and call for more
> reviewers?
> 
> This library was not ready for 17.11.RC1 having received some comments
> just before the RC1 deadline.
> It was then targeted for RC2 and we have pulled out all the stops to get
> it ready for RC2.
> 
> It is now at v10 of the patch set, there have been no review comments from
> the community (apart from Intel), since RFC v3.
> 
> I think that there has been ample time for the community to review this
> patch set, calling for more reviewers at this point is not helpful.
> 
> The API's of the library are marked as experimental, so there will be no
> issues with ABI breakage, if there are requests for changes later.
> 
> I am not OK to wait one more release, I believe we have followed the
> process correctly.

+1 for inclusion in RC2.

John
 

^ permalink raw reply	[relevance 0%]

* Re: [dpdk-dev] [PATCH v10 0/4] flow classification library
  2017-10-24  9:23  0%       ` Mcnamara, John
@ 2017-10-24  9:38  0%         ` Thomas Monjalon
  2017-10-24  9:53  0%           ` Iremonger, Bernard
  0 siblings, 1 reply; 200+ results
From: Thomas Monjalon @ 2017-10-24  9:38 UTC (permalink / raw)
  To: Mcnamara, John, Iremonger, Bernard
  Cc: dev, Yigit, Ferruh, Ananyev, Konstantin, Dumitrescu, Cristian,
	adrien.mazarguil, Singh, Jasvinder

24/10/2017 11:23, Mcnamara, John:
> From: Iremonger, Bernard
> > 
> > Hi Thomas,
> > 
> > From: Thomas Monjalon [mailto:thomas@monjalon.net]
> >
> > > I suppose you are OK to wait one more release and call for more
> > reviewers?
> > 
> > This library was not ready for 17.11.RC1 having received some comments
> > just before the RC1 deadline.
> > It was then targeted for RC2 and we have pulled out all the stops to get
> > it ready for RC2.
> > 
> > It is now at v10 of the patch set, there have been no review comments from
> > the community (apart from Intel), since RFC v3.
> > 
> > I think that there has been ample time for the community to review this
> > patch set, calling for more reviewers at this point is not helpful.

I have to review some basic things in your series.
I did not take time to review it because I thought John told me it
would not make 17.11.

> > The API's of the library are marked as experimental, so there will be no
> > issues with ABI breakage, if there are requests for changes later.

It is not marked EXPERIMENTAL in the MAINTAINERS file.

> > I am not OK to wait one more release, I believe we have followed the
> > process correctly.

Yes, you followed the process.

> +1 for inclusion in RC2.

It is not common to add a new library in RC2.

When doing the RC1 announce, I did not mention this library
as a possible inclusion exception in RC2, and I had no feedback:
	http://dpdk.org/ml/archives/announce/2017-October/000153.html

I was really sure you were not targetting 17.11.
So I did not do the last pass review. Probably my mistake.

We are having a hard time with 17.11 release, so I would prefer avoiding
adding one more new library at this stage.

^ permalink raw reply	[relevance 0%]

* Re: [dpdk-dev] [PATCH v10 0/4] flow classification library
  2017-10-24  9:38  0%         ` Thomas Monjalon
@ 2017-10-24  9:53  0%           ` Iremonger, Bernard
  2017-10-24 10:25  0%             ` Thomas Monjalon
  0 siblings, 1 reply; 200+ results
From: Iremonger, Bernard @ 2017-10-24  9:53 UTC (permalink / raw)
  To: Thomas Monjalon, Mcnamara, John
  Cc: dev, Yigit, Ferruh, Ananyev, Konstantin, Dumitrescu, Cristian,
	adrien.mazarguil, Singh, Jasvinder, Iremonger, Bernard

Hi Thomas,

> -----Original Message-----
> From: Thomas Monjalon [mailto:thomas@monjalon.net]
> Sent: Tuesday, October 24, 2017 10:39 AM
> To: Mcnamara, John <john.mcnamara@intel.com>; Iremonger, Bernard
> <bernard.iremonger@intel.com>
> Cc: dev@dpdk.org; Yigit, Ferruh <ferruh.yigit@intel.com>; Ananyev,
> Konstantin <konstantin.ananyev@intel.com>; Dumitrescu, Cristian
> <cristian.dumitrescu@intel.com>; adrien.mazarguil@6wind.com; Singh,
> Jasvinder <jasvinder.singh@intel.com>
> Subject: Re: [dpdk-dev] [PATCH v10 0/4] flow classification library
> 
> 24/10/2017 11:23, Mcnamara, John:
> > From: Iremonger, Bernard
> > >
> > > Hi Thomas,
> > >
> > > From: Thomas Monjalon [mailto:thomas@monjalon.net]
> > >
> > > > I suppose you are OK to wait one more release and call for more
> > > reviewers?
> > >
> > > This library was not ready for 17.11.RC1 having received some
> > > comments just before the RC1 deadline.
> > > It was then targeted for RC2 and we have pulled out all the stops to
> > > get it ready for RC2.
> > >
> > > It is now at v10 of the patch set, there have been no review
> > > comments from the community (apart from Intel), since RFC v3.
> > >
> > > I think that there has been ample time for the community to review
> > > this patch set, calling for more reviewers at this point is not helpful.
> 
> I have to review some basic things in your series.
> I did not take time to review it because I thought John told me it would not
> make 17.11.
> 
> > > The API's of the library are marked as experimental, so there will
> > > be no issues with ABI breakage, if there are requests for changes later.
> 
> It is not marked EXPERIMENTAL in the MAINTAINERS file.

My mistake, it is marked as experimental in rte_flow_classify_version.map
I can send a v11 patch set if needed.
 
> > > I am not OK to wait one more release, I believe we have followed the
> > > process correctly.
> 
> Yes, you followed the process.
> 
> > +1 for inclusion in RC2.
> 
> It is not common to add a new library in RC2.
> 
> When doing the RC1 announce, I did not mention this library as a possible
> inclusion exception in RC2, and I had no feedback:
> 	http://dpdk.org/ml/archives/announce/2017-October/000153.html

I probably should have replied to this email.
 
> I was really sure you were not targetting 17.11.

We have always been targeting 17.11

> So I did not do the last pass review. Probably my mistake.
> 
> We are having a hard time with 17.11 release, so I would prefer avoiding
> adding one more new library at this stage.

This is a new library and should not impact anyone.

I believe we have followed the process, so I think it should not be deferred to 18.02.

Regards,

Bernard.

^ permalink raw reply	[relevance 0%]

* Re: [dpdk-dev] [PATCH v10 0/4] flow classification library
  2017-10-24  9:53  0%           ` Iremonger, Bernard
@ 2017-10-24 10:25  0%             ` Thomas Monjalon
  0 siblings, 0 replies; 200+ results
From: Thomas Monjalon @ 2017-10-24 10:25 UTC (permalink / raw)
  To: Iremonger, Bernard
  Cc: Mcnamara, John, dev, Yigit, Ferruh, Ananyev, Konstantin,
	Dumitrescu, Cristian, adrien.mazarguil, Singh, Jasvinder

24/10/2017 11:53, Iremonger, Bernard:
> Hi Thomas,
> 
> From: Thomas Monjalon [mailto:thomas@monjalon.net]
> > 24/10/2017 11:23, Mcnamara, John:
> > > From: Iremonger, Bernard
> > > >
> > > > Hi Thomas,
> > > >
> > > > From: Thomas Monjalon [mailto:thomas@monjalon.net]
> > > >
> > > > > I suppose you are OK to wait one more release and call for more
> > > > reviewers?
> > > >
> > > > This library was not ready for 17.11.RC1 having received some
> > > > comments just before the RC1 deadline.
> > > > It was then targeted for RC2 and we have pulled out all the stops to
> > > > get it ready for RC2.
> > > >
> > > > It is now at v10 of the patch set, there have been no review
> > > > comments from the community (apart from Intel), since RFC v3.
> > > >
> > > > I think that there has been ample time for the community to review
> > > > this patch set, calling for more reviewers at this point is not helpful.
> > 
> > I have to review some basic things in your series.
> > I did not take time to review it because I thought John told me it would not
> > make 17.11.
> > 
> > > > The API's of the library are marked as experimental, so there will
> > > > be no issues with ABI breakage, if there are requests for changes later.
> > 
> > It is not marked EXPERIMENTAL in the MAINTAINERS file.
> 
> My mistake, it is marked as experimental in rte_flow_classify_version.map
> I can send a v11 patch set if needed.
>  
> > > > I am not OK to wait one more release, I believe we have followed the
> > > > process correctly.
> > 
> > Yes, you followed the process.
> > 
> > > +1 for inclusion in RC2.
> > 
> > It is not common to add a new library in RC2.
> > 
> > When doing the RC1 announce, I did not mention this library as a possible
> > inclusion exception in RC2, and I had no feedback:
> > 	http://dpdk.org/ml/archives/announce/2017-October/000153.html
> 
> I probably should have replied to this email.
>  
> > I was really sure you were not targetting 17.11.
> 
> We have always been targeting 17.11
> 
> > So I did not do the last pass review. Probably my mistake.
> > 
> > We are having a hard time with 17.11 release, so I would prefer avoiding
> > adding one more new library at this stage.
> 
> This is a new library and should not impact anyone.
> 
> I believe we have followed the process, so I think it should not be deferred to 18.02.

OK, let's make a deal:
If you can address my comments in v11 and if there is no compilation issue,
then I will take it in RC2.

^ permalink raw reply	[relevance 0%]

* [dpdk-dev] [PATCH v5] ethdev: allow returning error on VLAN offload ops
  @ 2017-10-25  3:01  4% ` Ferruh Yigit
  0 siblings, 0 replies; 200+ results
From: Ferruh Yigit @ 2017-10-25  3:01 UTC (permalink / raw)
  To: John McNamara, Allain Legacy, Matt Peters, Stephen Hurd,
	Ajit Khaparde, Hemant Agrawal, Shreyansh Jain, Wenzhuo Lu,
	John Daley, Nelson Escobar, Jing Chen, Jingjing Wu, Beilei Xing,
	Konstantin Ananyev, Adrien Mazarguil, Nelio Laranjeiro,
	Yongseok Koh, Alejandro Lucero, Rasesh Mody, Harish Patil,
	Shahed Shaikh, Yuanhan Liu, Maxime Coquelin, Shrikrishna Khare,
	Thomas Monjalon
  Cc: dev, Ferruh Yigit, David Harton

From: David Harton <dharton@cisco.com>

Some devices may not support or fail setting VLAN offload
configuration based on dynamic circumstances so the
vlan_offload_set_t vector is modified to return an int so
the caller can determine success or not.

rte_eth_dev_set_vlan_offload is updated to return the
value provided by the vector when called along with restoring
the original offload configs on failure.

Existing vlan_offload_set_t vectors are modified to return
an int.  Majority of cases return 0 but a few that actually
can fail now return their failure codes.

Finally, a vlan_offload_set_t vector is added to virtio
to facilitate dynamically turning VLAN strip on or off.

Signed-off-by: David Harton <dharton@cisco.com>
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
---

v5
* rebase on latest next-net
* add ETH_VLAN_FILTER_MASK mask check to virtio

v4
* Modified commit message heading
* Moved rel_note comments from ABI to API section
* Renamed locals of rte_eth_dev_set_vlan_offload from 'org*' to 'orig*'

v3
* Fixed a format error.
* Apologies...need to figure out why checkpatches.pl keeps saying
  valid patch when I've got soft tabs.

v2
* Fixed a missed format error.
* Removed vlan offload vector call casts and replaced with checks
  for return values.

v1
* This is an ABI breakage that has been previously negotiated
  with Thomas and the proposed rel note change is included as well.
---
 doc/guides/rel_notes/release_17_11.rst |  7 +++++++
 drivers/net/avp/avp_ethdev.c           | 13 ++++++++++---
 drivers/net/bnxt/bnxt_ethdev.c         | 10 +++++++---
 drivers/net/dpaa2/dpaa2_ethdev.c       | 15 ++++++++++++---
 drivers/net/e1000/em_ethdev.c          | 13 ++++++++++---
 drivers/net/e1000/igb_ethdev.c         | 13 ++++++++++---
 drivers/net/enic/enic_ethdev.c         |  9 ++++++---
 drivers/net/fm10k/fm10k_ethdev.c       |  4 +++-
 drivers/net/i40e/i40e_ethdev.c         | 12 +++++++++---
 drivers/net/i40e/i40e_ethdev_vf.c      | 10 +++++-----
 drivers/net/ixgbe/ixgbe_ethdev.c       | 27 ++++++++++++++++++++-------
 drivers/net/mlx5/mlx5.h                |  2 +-
 drivers/net/mlx5/mlx5_vlan.c           |  6 ++++--
 drivers/net/nfp/nfp_net.c              | 12 +++++++-----
 drivers/net/qede/qede_ethdev.c         |  9 +++++++--
 drivers/net/virtio/virtio_ethdev.c     | 25 +++++++++++++++++++++++++
 drivers/net/vmxnet3/vmxnet3_ethdev.c   | 12 ++++++++----
 lib/librte_ether/rte_ethdev.c          | 12 +++++++++++-
 lib/librte_ether/rte_ethdev.h          |  2 +-
 19 files changed, 163 insertions(+), 50 deletions(-)

diff --git a/doc/guides/rel_notes/release_17_11.rst b/doc/guides/rel_notes/release_17_11.rst
index e505a4dcd..65ab4b767 100644
--- a/doc/guides/rel_notes/release_17_11.rst
+++ b/doc/guides/rel_notes/release_17_11.rst
@@ -322,6 +322,13 @@ API Changes
   ``rte_log_get_global_level()``, ``rte_log_set_level()`` and
   ``rte_log_get_level()``.
 
+* **Modified the vlan_offload_set_t function prototype in the ethdev library.**
+
+  Changed the function prototype of ``vlan_offload_set_t``.  The return value
+  has been changed from ``void`` to ``int`` so the caller to knows whether
+  the backing device supports the operation or if the operation was
+  successfully performed.
+
 
 ABI Changes
 -----------
diff --git a/drivers/net/avp/avp_ethdev.c b/drivers/net/avp/avp_ethdev.c
index b97a90cea..7853fbf15 100644
--- a/drivers/net/avp/avp_ethdev.c
+++ b/drivers/net/avp/avp_ethdev.c
@@ -70,7 +70,7 @@ static void avp_dev_stop(struct rte_eth_dev *dev);
 static void avp_dev_close(struct rte_eth_dev *dev);
 static void avp_dev_info_get(struct rte_eth_dev *dev,
 			     struct rte_eth_dev_info *dev_info);
-static void avp_vlan_offload_set(struct rte_eth_dev *dev, int mask);
+static int avp_vlan_offload_set(struct rte_eth_dev *dev, int mask);
 static int avp_dev_link_update(struct rte_eth_dev *dev, int wait_to_complete);
 static void avp_dev_promiscuous_enable(struct rte_eth_dev *dev);
 static void avp_dev_promiscuous_disable(struct rte_eth_dev *dev);
@@ -2031,7 +2031,12 @@ avp_dev_configure(struct rte_eth_dev *eth_dev)
 	mask = (ETH_VLAN_STRIP_MASK |
 		ETH_VLAN_FILTER_MASK |
 		ETH_VLAN_EXTEND_MASK);
-	avp_vlan_offload_set(eth_dev, mask);
+	ret = avp_vlan_offload_set(eth_dev, mask);
+	if (ret < 0) {
+		PMD_DRV_LOG(ERR, "VLAN offload set failed by host, ret=%d\n",
+			    ret);
+		goto unlock;
+	}
 
 	/* update device config */
 	memset(&config, 0, sizeof(config));
@@ -2214,7 +2219,7 @@ avp_dev_info_get(struct rte_eth_dev *eth_dev,
 	}
 }
 
-static void
+static int
 avp_vlan_offload_set(struct rte_eth_dev *eth_dev, int mask)
 {
 	struct avp_dev *avp = AVP_DEV_PRIVATE_TO_HW(eth_dev->data->dev_private);
@@ -2239,6 +2244,8 @@ avp_vlan_offload_set(struct rte_eth_dev *eth_dev, int mask)
 		if (eth_dev->data->dev_conf.rxmode.hw_vlan_extend)
 			PMD_DRV_LOG(ERR, "VLAN extend offload not supported\n");
 	}
+
+	return 0;
 }
 
 static int
diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
index c2d54efd8..ad50045ac 100644
--- a/drivers/net/bnxt/bnxt_ethdev.c
+++ b/drivers/net/bnxt/bnxt_ethdev.c
@@ -145,7 +145,7 @@ static const struct rte_pci_id bnxt_pci_id_map[] = {
 	ETH_RSS_NONFRAG_IPV6_TCP |	\
 	ETH_RSS_NONFRAG_IPV6_UDP)
 
-static void bnxt_vlan_offload_set_op(struct rte_eth_dev *dev, int mask);
+static int bnxt_vlan_offload_set_op(struct rte_eth_dev *dev, int mask);
 
 /***********************/
 
@@ -591,7 +591,9 @@ static int bnxt_dev_start_op(struct rte_eth_dev *eth_dev)
 		vlan_mask |= ETH_VLAN_FILTER_MASK;
 	if (eth_dev->data->dev_conf.rxmode.hw_vlan_strip)
 		vlan_mask |= ETH_VLAN_STRIP_MASK;
-	bnxt_vlan_offload_set_op(eth_dev, vlan_mask);
+	rc = bnxt_vlan_offload_set_op(eth_dev, vlan_mask);
+	if (rc)
+		goto error;
 
 	return 0;
 
@@ -1350,7 +1352,7 @@ static int bnxt_vlan_filter_set_op(struct rte_eth_dev *eth_dev,
 		return bnxt_del_vlan_filter(bp, vlan_id);
 }
 
-static void
+static int
 bnxt_vlan_offload_set_op(struct rte_eth_dev *dev, int mask)
 {
 	struct bnxt *bp = (struct bnxt *)dev->data->dev_private;
@@ -1382,6 +1384,8 @@ bnxt_vlan_offload_set_op(struct rte_eth_dev *dev, int mask)
 
 	if (mask & ETH_VLAN_EXTEND_MASK)
 		RTE_LOG(ERR, PMD, "Extend VLAN Not supported\n");
+
+	return 0;
 }
 
 static void
diff --git a/drivers/net/dpaa2/dpaa2_ethdev.c b/drivers/net/dpaa2/dpaa2_ethdev.c
index 1ac607cb0..881a209d8 100644
--- a/drivers/net/dpaa2/dpaa2_ethdev.c
+++ b/drivers/net/dpaa2/dpaa2_ethdev.c
@@ -162,7 +162,7 @@ dpaa2_vlan_filter_set(struct rte_eth_dev *dev, uint16_t vlan_id, int on)
 	return ret;
 }
 
-static void
+static int
 dpaa2_vlan_offload_set(struct rte_eth_dev *dev, int mask)
 {
 	struct dpaa2_dev_priv *priv = dev->data->dev_private;
@@ -188,6 +188,8 @@ dpaa2_vlan_offload_set(struct rte_eth_dev *dev, int mask)
 			RTE_LOG(INFO, PMD,
 				"VLAN extend offload not supported\n");
 	}
+
+	return 0;
 }
 
 static int
@@ -754,8 +756,15 @@ dpaa2_dev_start(struct rte_eth_dev *dev)
 		return ret;
 	}
 	/* VLAN Offload Settings */
-	if (priv->max_vlan_filters)
-		dpaa2_vlan_offload_set(dev, ETH_VLAN_FILTER_MASK);
+	if (priv->max_vlan_filters) {
+		ret = dpaa2_vlan_offload_set(dev, ETH_VLAN_FILTER_MASK);
+		if (ret) {
+			PMD_INIT_LOG(ERR, "Error to dpaa2_vlan_offload_set:"
+				     "code = %d\n", ret);
+			return ret;
+		}
+	}
+
 
 	/* if the interrupts were configured on this devices*/
 	if (intr_handle && (intr_handle->fd) &&
diff --git a/drivers/net/e1000/em_ethdev.c b/drivers/net/e1000/em_ethdev.c
index 6ebfa6d4c..770ab8141 100644
--- a/drivers/net/e1000/em_ethdev.c
+++ b/drivers/net/e1000/em_ethdev.c
@@ -99,7 +99,7 @@ static int eth_em_mtu_set(struct rte_eth_dev *dev, uint16_t mtu);
 
 static int eth_em_vlan_filter_set(struct rte_eth_dev *dev,
 		uint16_t vlan_id, int on);
-static void eth_em_vlan_offload_set(struct rte_eth_dev *dev, int mask);
+static int eth_em_vlan_offload_set(struct rte_eth_dev *dev, int mask);
 static void em_vlan_hw_filter_enable(struct rte_eth_dev *dev);
 static void em_vlan_hw_filter_disable(struct rte_eth_dev *dev);
 static void em_vlan_hw_strip_enable(struct rte_eth_dev *dev);
@@ -669,7 +669,12 @@ eth_em_start(struct rte_eth_dev *dev)
 
 	mask = ETH_VLAN_STRIP_MASK | ETH_VLAN_FILTER_MASK | \
 			ETH_VLAN_EXTEND_MASK;
-	eth_em_vlan_offload_set(dev, mask);
+	ret = eth_em_vlan_offload_set(dev, mask);
+	if (ret) {
+		PMD_INIT_LOG(ERR, "Unable to update vlan offload");
+		em_dev_clear_queues(dev);
+		return ret;
+	}
 
 	/* Set Interrupt Throttling Rate to maximum allowed value. */
 	E1000_WRITE_REG(hw, E1000_ITR, UINT16_MAX);
@@ -1449,7 +1454,7 @@ em_vlan_hw_strip_enable(struct rte_eth_dev *dev)
 	E1000_WRITE_REG(hw, E1000_CTRL, reg);
 }
 
-static void
+static int
 eth_em_vlan_offload_set(struct rte_eth_dev *dev, int mask)
 {
 	if(mask & ETH_VLAN_STRIP_MASK){
@@ -1465,6 +1470,8 @@ eth_em_vlan_offload_set(struct rte_eth_dev *dev, int mask)
 		else
 			em_vlan_hw_filter_disable(dev);
 	}
+
+	return 0;
 }
 
 /*
diff --git a/drivers/net/e1000/igb_ethdev.c b/drivers/net/e1000/igb_ethdev.c
index 003bdf0f6..53f160030 100644
--- a/drivers/net/e1000/igb_ethdev.c
+++ b/drivers/net/e1000/igb_ethdev.c
@@ -157,7 +157,7 @@ static int eth_igb_vlan_filter_set(struct rte_eth_dev *dev,
 static int eth_igb_vlan_tpid_set(struct rte_eth_dev *dev,
 				 enum rte_vlan_type vlan_type,
 				 uint16_t tpid_id);
-static void eth_igb_vlan_offload_set(struct rte_eth_dev *dev, int mask);
+static int eth_igb_vlan_offload_set(struct rte_eth_dev *dev, int mask);
 
 static void igb_vlan_hw_filter_enable(struct rte_eth_dev *dev);
 static void igb_vlan_hw_filter_disable(struct rte_eth_dev *dev);
@@ -1403,7 +1403,12 @@ eth_igb_start(struct rte_eth_dev *dev)
 	 */
 	mask = ETH_VLAN_STRIP_MASK | ETH_VLAN_FILTER_MASK | \
 			ETH_VLAN_EXTEND_MASK;
-	eth_igb_vlan_offload_set(dev, mask);
+	ret = eth_igb_vlan_offload_set(dev, mask);
+	if (ret) {
+		PMD_INIT_LOG(ERR, "Unable to set vlan offload");
+		igb_dev_clear_queues(dev);
+		return ret;
+	}
 
 	if (dev->data->dev_conf.rxmode.mq_mode == ETH_MQ_RX_VMDQ_ONLY) {
 		/* Enable VLAN filter since VMDq always use VLAN filter */
@@ -2720,7 +2725,7 @@ igb_vlan_hw_extend_enable(struct rte_eth_dev *dev)
 						2 * VLAN_TAG_SIZE);
 }
 
-static void
+static int
 eth_igb_vlan_offload_set(struct rte_eth_dev *dev, int mask)
 {
 	if(mask & ETH_VLAN_STRIP_MASK){
@@ -2743,6 +2748,8 @@ eth_igb_vlan_offload_set(struct rte_eth_dev *dev, int mask)
 		else
 			igb_vlan_hw_extend_disable(dev);
 	}
+
+	return 0;
 }
 
 
diff --git a/drivers/net/enic/enic_ethdev.c b/drivers/net/enic/enic_ethdev.c
index 5386b2ae3..c02f9b7b3 100644
--- a/drivers/net/enic/enic_ethdev.c
+++ b/drivers/net/enic/enic_ethdev.c
@@ -362,7 +362,7 @@ static int enicpmd_vlan_filter_set(struct rte_eth_dev *eth_dev,
 	return err;
 }
 
-static void enicpmd_vlan_offload_set(struct rte_eth_dev *eth_dev, int mask)
+static int enicpmd_vlan_offload_set(struct rte_eth_dev *eth_dev, int mask)
 {
 	struct enic *enic = pmd_priv(eth_dev);
 
@@ -386,6 +386,8 @@ static void enicpmd_vlan_offload_set(struct rte_eth_dev *eth_dev, int mask)
 		dev_warning(enic,
 			"Configuration of extended VLAN is not supported\n");
 	}
+
+	return 0;
 }
 
 static int enicpmd_dev_configure(struct rte_eth_dev *eth_dev)
@@ -410,9 +412,10 @@ static int enicpmd_dev_configure(struct rte_eth_dev *eth_dev)
 			eth_dev->data->dev_conf.rxmode.split_hdr_size);
 	}
 
-	enicpmd_vlan_offload_set(eth_dev, ETH_VLAN_STRIP_MASK);
 	enic->hw_ip_checksum = eth_dev->data->dev_conf.rxmode.hw_ip_checksum;
-	return 0;
+	ret = enicpmd_vlan_offload_set(eth_dev, ETH_VLAN_STRIP_MASK);
+
+	return ret;
 }
 
 /* Start the device.
diff --git a/drivers/net/fm10k/fm10k_ethdev.c b/drivers/net/fm10k/fm10k_ethdev.c
index 7baa9279d..46a312fad 100644
--- a/drivers/net/fm10k/fm10k_ethdev.c
+++ b/drivers/net/fm10k/fm10k_ethdev.c
@@ -1594,7 +1594,7 @@ fm10k_vlan_filter_set(struct rte_eth_dev *dev, uint16_t vlan_id, int on)
 	return 0;
 }
 
-static void
+static int
 fm10k_vlan_offload_set(struct rte_eth_dev *dev, int mask)
 {
 	if (mask & ETH_VLAN_STRIP_MASK) {
@@ -1613,6 +1613,8 @@ fm10k_vlan_offload_set(struct rte_eth_dev *dev, int mask)
 		if (!dev->data->dev_conf.rxmode.hw_vlan_filter)
 			PMD_INIT_LOG(ERR, "VLAN filter is always on in fm10k");
 	}
+
+	return 0;
 }
 
 /* Add/Remove a MAC address, and update filters to main VSI */
diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c
index 48db2dde3..86c43881b 100644
--- a/drivers/net/i40e/i40e_ethdev.c
+++ b/drivers/net/i40e/i40e_ethdev.c
@@ -276,7 +276,7 @@ static int i40e_vlan_filter_set(struct rte_eth_dev *dev,
 static int i40e_vlan_tpid_set(struct rte_eth_dev *dev,
 			      enum rte_vlan_type vlan_type,
 			      uint16_t tpid);
-static void i40e_vlan_offload_set(struct rte_eth_dev *dev, int mask);
+static int i40e_vlan_offload_set(struct rte_eth_dev *dev, int mask);
 static void i40e_vlan_strip_queue_set(struct rte_eth_dev *dev,
 				      uint16_t queue,
 				      int on);
@@ -3221,7 +3221,7 @@ i40e_vlan_tpid_set(struct rte_eth_dev *dev,
 	return ret;
 }
 
-static void
+static int
 i40e_vlan_offload_set(struct rte_eth_dev *dev, int mask)
 {
 	struct i40e_pf *pf = I40E_DEV_PRIVATE_TO_PF(dev->data->dev_private);
@@ -3254,6 +3254,8 @@ i40e_vlan_offload_set(struct rte_eth_dev *dev, int mask)
 		else
 			i40e_vsi_config_double_vlan(vsi, FALSE);
 	}
+
+	return 0;
 }
 
 static void
@@ -5314,7 +5316,11 @@ i40e_dev_init_vlan(struct rte_eth_dev *dev)
 
 	/* Apply vlan offload setting */
 	mask = ETH_VLAN_STRIP_MASK | ETH_VLAN_FILTER_MASK;
-	i40e_vlan_offload_set(dev, mask);
+	ret = i40e_vlan_offload_set(dev, mask);
+	if (ret) {
+		PMD_DRV_LOG(INFO, "Failed to update vlan offload");
+		return ret;
+	}
 
 	/* Apply double-vlan setting, not implemented yet */
 
diff --git a/drivers/net/i40e/i40e_ethdev_vf.c b/drivers/net/i40e/i40e_ethdev_vf.c
index 9f1487509..ca1d9f930 100644
--- a/drivers/net/i40e/i40e_ethdev_vf.c
+++ b/drivers/net/i40e/i40e_ethdev_vf.c
@@ -118,7 +118,7 @@ static int i40evf_dev_xstats_get_names(struct rte_eth_dev *dev,
 static void i40evf_dev_xstats_reset(struct rte_eth_dev *dev);
 static int i40evf_vlan_filter_set(struct rte_eth_dev *dev,
 				  uint16_t vlan_id, int on);
-static void i40evf_vlan_offload_set(struct rte_eth_dev *dev, int mask);
+static int i40evf_vlan_offload_set(struct rte_eth_dev *dev, int mask);
 static void i40evf_dev_close(struct rte_eth_dev *dev);
 static int  i40evf_dev_reset(struct rte_eth_dev *dev);
 static void i40evf_dev_promiscuous_enable(struct rte_eth_dev *dev);
@@ -1588,12 +1588,10 @@ static int
 i40evf_init_vlan(struct rte_eth_dev *dev)
 {
 	/* Apply vlan offload setting */
-	i40evf_vlan_offload_set(dev, ETH_VLAN_STRIP_MASK);
-
-	return I40E_SUCCESS;
+	return i40evf_vlan_offload_set(dev, ETH_VLAN_STRIP_MASK);
 }
 
-static void
+static int
 i40evf_vlan_offload_set(struct rte_eth_dev *dev, int mask)
 {
 	struct rte_eth_conf *dev_conf = &dev->data->dev_conf;
@@ -1606,6 +1604,8 @@ i40evf_vlan_offload_set(struct rte_eth_dev *dev, int mask)
 		else
 			i40evf_disable_vlan_strip(dev);
 	}
+
+	return 0;
 }
 
 static int
diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c
index 2ff904119..371998e42 100644
--- a/drivers/net/ixgbe/ixgbe_ethdev.c
+++ b/drivers/net/ixgbe/ixgbe_ethdev.c
@@ -219,7 +219,7 @@ static void ixgbe_vlan_hw_strip_bitmap_set(struct rte_eth_dev *dev,
 		uint16_t queue, bool on);
 static void ixgbe_vlan_strip_queue_set(struct rte_eth_dev *dev, uint16_t queue,
 		int on);
-static void ixgbe_vlan_offload_set(struct rte_eth_dev *dev, int mask);
+static int ixgbe_vlan_offload_set(struct rte_eth_dev *dev, int mask);
 static void ixgbe_vlan_hw_strip_enable(struct rte_eth_dev *dev, uint16_t queue);
 static void ixgbe_vlan_hw_strip_disable(struct rte_eth_dev *dev, uint16_t queue);
 static void ixgbe_vlan_hw_extend_enable(struct rte_eth_dev *dev);
@@ -276,7 +276,7 @@ static int ixgbevf_vlan_filter_set(struct rte_eth_dev *dev,
 		uint16_t vlan_id, int on);
 static void ixgbevf_vlan_strip_queue_set(struct rte_eth_dev *dev,
 		uint16_t queue, int on);
-static void ixgbevf_vlan_offload_set(struct rte_eth_dev *dev, int mask);
+static int ixgbevf_vlan_offload_set(struct rte_eth_dev *dev, int mask);
 static void ixgbevf_set_vfta_all(struct rte_eth_dev *dev, bool on);
 static int ixgbevf_dev_rx_queue_intr_enable(struct rte_eth_dev *dev,
 					    uint16_t queue_id);
@@ -2126,7 +2126,7 @@ ixgbe_vlan_hw_extend_enable(struct rte_eth_dev *dev)
 	 */
 }
 
-static void
+static int
 ixgbe_vlan_offload_set(struct rte_eth_dev *dev, int mask)
 {
 	if (mask & ETH_VLAN_STRIP_MASK) {
@@ -2149,6 +2149,8 @@ ixgbe_vlan_offload_set(struct rte_eth_dev *dev, int mask)
 		else
 			ixgbe_vlan_hw_extend_disable(dev);
 	}
+
+	return 0;
 }
 
 static void
@@ -2570,9 +2572,13 @@ ixgbe_dev_start(struct rte_eth_dev *dev)
 		goto error;
 	}
 
-    mask = ETH_VLAN_STRIP_MASK | ETH_VLAN_FILTER_MASK |
+	mask = ETH_VLAN_STRIP_MASK | ETH_VLAN_FILTER_MASK |
 		ETH_VLAN_EXTEND_MASK;
-	ixgbe_vlan_offload_set(dev, mask);
+	err = ixgbe_vlan_offload_set(dev, mask);
+	if (err) {
+		PMD_INIT_LOG(ERR, "Unable to set VLAN offload");
+		goto error;
+	}
 
 	if (dev->data->dev_conf.rxmode.mq_mode == ETH_MQ_RX_VMDQ_ONLY) {
 		/* Enable vlan filtering for VMDq */
@@ -5024,7 +5030,12 @@ ixgbevf_dev_start(struct rte_eth_dev *dev)
 	/* Set HW strip */
 	mask = ETH_VLAN_STRIP_MASK | ETH_VLAN_FILTER_MASK |
 		ETH_VLAN_EXTEND_MASK;
-	ixgbevf_vlan_offload_set(dev, mask);
+	err = ixgbevf_vlan_offload_set(dev, mask);
+	if (err) {
+		PMD_INIT_LOG(ERR, "Unable to set VLAN offload (%d)", err);
+		ixgbe_dev_clear_queues(dev);
+		return err;
+	}
 
 	ixgbevf_dev_rxtx_start(dev);
 
@@ -5213,7 +5224,7 @@ ixgbevf_vlan_strip_queue_set(struct rte_eth_dev *dev, uint16_t queue, int on)
 	ixgbe_vlan_hw_strip_bitmap_set(dev, queue, on);
 }
 
-static void
+static int
 ixgbevf_vlan_offload_set(struct rte_eth_dev *dev, int mask)
 {
 	struct ixgbe_hw *hw =
@@ -5228,6 +5239,8 @@ ixgbevf_vlan_offload_set(struct rte_eth_dev *dev, int mask)
 		for (i = 0; i < hw->mac.max_rx_queues; i++)
 			ixgbevf_vlan_strip_queue_set(dev, i, on);
 	}
+
+	return 0;
 }
 
 int
diff --git a/drivers/net/mlx5/mlx5.h b/drivers/net/mlx5/mlx5.h
index 3f452b2f0..e6a69b823 100644
--- a/drivers/net/mlx5/mlx5.h
+++ b/drivers/net/mlx5/mlx5.h
@@ -248,7 +248,7 @@ int mlx5_xstats_get_names(struct rte_eth_dev *,
 /* mlx5_vlan.c */
 
 int mlx5_vlan_filter_set(struct rte_eth_dev *, uint16_t, int);
-void mlx5_vlan_offload_set(struct rte_eth_dev *, int);
+int mlx5_vlan_offload_set(struct rte_eth_dev *, int);
 void mlx5_vlan_strip_queue_set(struct rte_eth_dev *, uint16_t, int);
 
 /* mlx5_trigger.c */
diff --git a/drivers/net/mlx5/mlx5_vlan.c b/drivers/net/mlx5/mlx5_vlan.c
index ed91d9b28..89874aabd 100644
--- a/drivers/net/mlx5/mlx5_vlan.c
+++ b/drivers/net/mlx5/mlx5_vlan.c
@@ -178,7 +178,7 @@ mlx5_vlan_strip_queue_set(struct rte_eth_dev *dev, uint16_t queue, int on)
  * @param mask
  *   VLAN offload bit mask.
  */
-void
+int
 mlx5_vlan_offload_set(struct rte_eth_dev *dev, int mask)
 {
 	struct priv *priv = dev->data->dev_private;
@@ -189,7 +189,7 @@ mlx5_vlan_offload_set(struct rte_eth_dev *dev, int mask)
 
 		if (!priv->hw_vlan_strip) {
 			ERROR("VLAN stripping is not supported");
-			return;
+			return 0;
 		}
 
 		/* Run on every RX queue and set/reset VLAN stripping. */
@@ -198,4 +198,6 @@ mlx5_vlan_offload_set(struct rte_eth_dev *dev, int mask)
 			priv_vlan_strip_queue_set(priv, i, hw_vlan_strip);
 		priv_unlock(priv);
 	}
+
+	return 0;
 }
diff --git a/drivers/net/nfp/nfp_net.c b/drivers/net/nfp/nfp_net.c
index 0917b9c49..71d4a8629 100644
--- a/drivers/net/nfp/nfp_net.c
+++ b/drivers/net/nfp/nfp_net.c
@@ -2306,11 +2306,12 @@ nfp_net_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts, uint16_t nb_pkts)
 	return i;
 }
 
-static void
+static int
 nfp_net_vlan_offload_set(struct rte_eth_dev *dev, int mask)
 {
 	uint32_t new_ctrl, update;
 	struct nfp_net_hw *hw;
+	int ret;
 
 	hw = NFP_NET_DEV_PRIVATE_TO_HW(dev->data->dev_private);
 	new_ctrl = 0;
@@ -2331,14 +2332,15 @@ nfp_net_vlan_offload_set(struct rte_eth_dev *dev, int mask)
 		new_ctrl = hw->ctrl & ~NFP_NET_CFG_CTRL_RXVLAN;
 
 	if (new_ctrl == 0)
-		return;
+		return 0;
 
 	update = NFP_NET_CFG_UPDATE_GEN;
 
-	if (nfp_net_reconfig(hw, new_ctrl, update) < 0)
-		return;
+	ret = nfp_net_reconfig(hw, new_ctrl, update);
+	if (!ret)
+		hw->ctrl = new_ctrl;
 
-	hw->ctrl = new_ctrl;
+	return ret;
 }
 
 /* Update Redirection Table(RETA) of Receive Side Scaling of Ethernet device */
diff --git a/drivers/net/qede/qede_ethdev.c b/drivers/net/qede/qede_ethdev.c
index 8b3f0ff7f..661d9381e 100644
--- a/drivers/net/qede/qede_ethdev.c
+++ b/drivers/net/qede/qede_ethdev.c
@@ -1005,7 +1005,7 @@ static int qede_vlan_filter_set(struct rte_eth_dev *eth_dev,
 	return rc;
 }
 
-static void qede_vlan_offload_set(struct rte_eth_dev *eth_dev, int mask)
+static int qede_vlan_offload_set(struct rte_eth_dev *eth_dev, int mask)
 {
 	struct qede_dev *qdev = QEDE_INIT_QDEV(eth_dev);
 	struct ecore_dev *edev = QEDE_INIT_EDEV(qdev);
@@ -1043,6 +1043,8 @@ static void qede_vlan_offload_set(struct rte_eth_dev *eth_dev, int mask)
 
 	DP_INFO(edev, "vlan offload mask %d vlan-strip %d vlan-filter %d\n",
 		mask, rxmode->hw_vlan_strip, rxmode->hw_vlan_filter);
+
+	return 0;
 }
 
 static void qede_prandom_bytes(uint32_t *buff)
@@ -1192,6 +1194,7 @@ static int qede_dev_configure(struct rte_eth_dev *eth_dev)
 	struct qede_dev *qdev = QEDE_INIT_QDEV(eth_dev);
 	struct ecore_dev *edev = QEDE_INIT_EDEV(qdev);
 	struct rte_eth_rxmode *rxmode = &eth_dev->data->dev_conf.rxmode;
+	int ret;
 
 	PMD_INIT_FUNC_TRACE(edev);
 
@@ -1262,9 +1265,11 @@ static int qede_dev_configure(struct rte_eth_dev *eth_dev)
 	qdev->new_mtu = qdev->mtu;
 
 	/* Enable VLAN offloads by default */
-	qede_vlan_offload_set(eth_dev, ETH_VLAN_STRIP_MASK  |
+	ret = qede_vlan_offload_set(eth_dev, ETH_VLAN_STRIP_MASK  |
 			ETH_VLAN_FILTER_MASK |
 			ETH_VLAN_EXTEND_MASK);
+	if (ret)
+		return ret;
 
 	DP_INFO(edev, "Device configured with RSS=%d TSS=%d\n",
 			QEDE_RSS_COUNT(qdev), QEDE_TSS_COUNT(qdev));
diff --git a/drivers/net/virtio/virtio_ethdev.c b/drivers/net/virtio/virtio_ethdev.c
index bfbd73770..2e4a49ea9 100644
--- a/drivers/net/virtio/virtio_ethdev.c
+++ b/drivers/net/virtio/virtio_ethdev.c
@@ -73,6 +73,7 @@ static void virtio_dev_info_get(struct rte_eth_dev *dev,
 				struct rte_eth_dev_info *dev_info);
 static int virtio_dev_link_update(struct rte_eth_dev *dev,
 	int wait_to_complete);
+static int virtio_dev_vlan_offload_set(struct rte_eth_dev *dev, int mask);
 
 static void virtio_set_hwaddr(struct virtio_hw *hw);
 static void virtio_get_hwaddr(struct virtio_hw *hw);
@@ -779,6 +780,7 @@ static const struct eth_dev_ops virtio_eth_dev_ops = {
 	.stats_reset             = virtio_dev_stats_reset,
 	.xstats_reset            = virtio_dev_stats_reset,
 	.link_update             = virtio_dev_link_update,
+	.vlan_offload_set        = virtio_dev_vlan_offload_set,
 	.rx_queue_setup          = virtio_dev_rx_queue_setup,
 	.rx_queue_intr_enable    = virtio_dev_rx_queue_intr_enable,
 	.rx_queue_intr_disable   = virtio_dev_rx_queue_intr_disable,
@@ -1953,6 +1955,29 @@ virtio_dev_link_update(struct rte_eth_dev *dev, __rte_unused int wait_to_complet
 	return (old.link_status == link.link_status) ? -1 : 0;
 }
 
+static int
+virtio_dev_vlan_offload_set(struct rte_eth_dev *dev, int mask)
+{
+	const struct rte_eth_rxmode *rxmode = &dev->data->dev_conf.rxmode;
+	struct virtio_hw *hw = dev->data->dev_private;
+
+	if (mask & ETH_VLAN_FILTER_MASK) {
+		if (rxmode->hw_vlan_filter &&
+				!vtpci_with_feature(hw, VIRTIO_NET_F_CTRL_VLAN)) {
+
+			PMD_DRV_LOG(NOTICE,
+				"vlan filtering not available on this host");
+
+			return -ENOTSUP;
+		}
+	}
+
+	if (mask & ETH_VLAN_STRIP_MASK)
+		hw->vlan_strip = rxmode->hw_vlan_strip;
+
+	return 0;
+}
+
 static void
 virtio_dev_info_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info)
 {
diff --git a/drivers/net/vmxnet3/vmxnet3_ethdev.c b/drivers/net/vmxnet3/vmxnet3_ethdev.c
index 58bc4f2f2..cde112301 100644
--- a/drivers/net/vmxnet3/vmxnet3_ethdev.c
+++ b/drivers/net/vmxnet3/vmxnet3_ethdev.c
@@ -100,7 +100,7 @@ static const uint32_t *
 vmxnet3_dev_supported_ptypes_get(struct rte_eth_dev *dev);
 static int vmxnet3_dev_vlan_filter_set(struct rte_eth_dev *dev,
 				       uint16_t vid, int on);
-static void vmxnet3_dev_vlan_offload_set(struct rte_eth_dev *dev, int mask);
+static int vmxnet3_dev_vlan_offload_set(struct rte_eth_dev *dev, int mask);
 static void vmxnet3_mac_addr_set(struct rte_eth_dev *dev,
 				 struct ether_addr *mac_addr);
 static void vmxnet3_interrupt_handler(void *param);
@@ -730,8 +730,10 @@ vmxnet3_setup_driver_shared(struct rte_eth_dev *dev)
 		devRead->rssConfDesc.confPA  = hw->rss_confPA;
 	}
 
-	vmxnet3_dev_vlan_offload_set(dev,
-				     ETH_VLAN_STRIP_MASK | ETH_VLAN_FILTER_MASK);
+	ret = vmxnet3_dev_vlan_offload_set(dev,
+			ETH_VLAN_STRIP_MASK | ETH_VLAN_FILTER_MASK);
+	if (ret)
+		return ret;
 
 	vmxnet3_write_mac(hw, dev->data->mac_addrs->addr_bytes);
 
@@ -1279,7 +1281,7 @@ vmxnet3_dev_vlan_filter_set(struct rte_eth_dev *dev, uint16_t vid, int on)
 	return 0;
 }
 
-static void
+static int
 vmxnet3_dev_vlan_offload_set(struct rte_eth_dev *dev, int mask)
 {
 	struct vmxnet3_hw *hw = dev->data->dev_private;
@@ -1305,6 +1307,8 @@ vmxnet3_dev_vlan_offload_set(struct rte_eth_dev *dev, int mask)
 		VMXNET3_WRITE_BAR1_REG(hw, VMXNET3_REG_CMD,
 				       VMXNET3_CMD_UPDATE_VLAN_FILTERS);
 	}
+
+	return 0;
 }
 
 static void
diff --git a/lib/librte_ether/rte_ethdev.c b/lib/librte_ether/rte_ethdev.c
index 0b13a58db..94c2fe2f1 100644
--- a/lib/librte_ether/rte_ethdev.c
+++ b/lib/librte_ether/rte_ethdev.c
@@ -2180,10 +2180,14 @@ rte_eth_dev_set_vlan_offload(uint16_t port_id, int offload_mask)
 	int ret = 0;
 	int mask = 0;
 	int cur, org = 0;
+	uint64_t orig_offloads;
 
 	RTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -ENODEV);
 	dev = &rte_eth_devices[port_id];
 
+	/* save original values in case of failure */
+	orig_offloads = dev->data->dev_conf.rxmode.offloads;
+
 	/*check which option changed by application*/
 	cur = !!(offload_mask & ETH_VLAN_STRIP_OFFLOAD);
 	org = !!(dev->data->dev_conf.rxmode.offloads &
@@ -2236,7 +2240,13 @@ rte_eth_dev_set_vlan_offload(uint16_t port_id, int offload_mask)
 	 */
 	rte_eth_convert_rx_offloads(dev->data->dev_conf.rxmode.offloads,
 				    &dev->data->dev_conf.rxmode);
-	(*dev->dev_ops->vlan_offload_set)(dev, mask);
+	ret = (*dev->dev_ops->vlan_offload_set)(dev, mask);
+	if (ret) {
+		/* hit an error restore  original values */
+		dev->data->dev_conf.rxmode.offloads = orig_offloads;
+		rte_eth_convert_rx_offloads(dev->data->dev_conf.rxmode.offloads,
+					    &dev->data->dev_conf.rxmode);
+	}
 
 	return ret;
 }
diff --git a/lib/librte_ether/rte_ethdev.h b/lib/librte_ether/rte_ethdev.h
index 2a0129a2a..be74b2af2 100644
--- a/lib/librte_ether/rte_ethdev.h
+++ b/lib/librte_ether/rte_ethdev.h
@@ -1323,7 +1323,7 @@ typedef int (*vlan_tpid_set_t)(struct rte_eth_dev *dev,
 			       enum rte_vlan_type type, uint16_t tpid);
 /**< @internal set the outer/inner VLAN-TPID by an Ethernet device. */
 
-typedef void (*vlan_offload_set_t)(struct rte_eth_dev *dev, int mask);
+typedef int (*vlan_offload_set_t)(struct rte_eth_dev *dev, int mask);
 /**< @internal set VLAN offload function by an Ethernet device. */
 
 typedef int (*vlan_pvid_set_t)(struct rte_eth_dev *dev,
-- 
2.13.6

^ permalink raw reply	[relevance 4%]

* Re: [dpdk-dev] [PATCH v3 5/6] doc: remove dpdk iova aware notice
  2017-10-24  5:06  0%         ` santosh
@ 2017-10-25  9:45  0%           ` Thomas Monjalon
  2017-10-25  9:50  3%             ` Richardson, Bruce
  0 siblings, 1 reply; 200+ results
From: Thomas Monjalon @ 2017-10-25  9:45 UTC (permalink / raw)
  To: santosh; +Cc: dev, olivier.matz, jerin.jacob, hemant.agrawal, anatoly.burakov

Hi Santosh,

24/10/2017 07:06, santosh:
> Hi Thomas,
> 
> 
> On Tuesday 24 October 2017 01:59 AM, Thomas Monjalon wrote:
> > 20/10/2017 14:31, Santosh Shukla:
> >> Removed dpdk iova aware ABI deprecation notice,
> >> and updated ABI change details in release_17.11.rst.
> >>
> >> Signed-off-by: Santosh Shukla <santosh.shukla@caviumnetworks.com>
> >> Acked-by: John McNamara <john.mcnamara@intel.com>
> >> ---
> >> --- a/doc/guides/rel_notes/deprecation.rst
> >> +++ b/doc/guides/rel_notes/deprecation.rst
> >> -* eal: An ABI change is planned for 17.11 to make DPDK aware of IOVA address
> >> -  translation scheme.
> >> -  Reference to phys address in EAL data-structure or functions may change to
> >> -  IOVA address or more appropriate name.
> >> -  The change will be only for the name.
> >> -  Functional aspects of the API or data-structure will remain same.
> > Sorry, this series cannot be applied as is because it is breaking
> > more than EAL API. The API of mbuf and mempool are also changed.
> > We need to choose one of these three options:
> > 	1/ accept to break all API in 17.11
> > 	2/ postpone the whole series to 18.02
> 
> Theme of series is to make dpdk iova aware so I would prefer option 1) or 2).
> However I have no strong opinion on this topic. 
> Lets get more opinion from others about option 1/2/3.
> 
> > 	3/ rename only EAL API in 17.11 and postpone mbuf/mempool

After discussing with Olivier it appeared there is a fourth solution.
We should not break any API (EAL, mbuf, mempool).

I would like to merge these changes in RC2, but keeping compatibility
with old names:
- When you rename a function or a type, you can define a macro for the
old name, alias the new name.
- When you rename a struct field, you can make an anonymous union
to allow both names.

Then we can deprecate the old names and remove them later.

Are you able to do these small changes today please?

^ permalink raw reply	[relevance 0%]

* Re: [dpdk-dev] [PATCH v3 5/6] doc: remove dpdk iova aware notice
  2017-10-25  9:45  0%           ` Thomas Monjalon
@ 2017-10-25  9:50  3%             ` Richardson, Bruce
  2017-10-25 10:01  3%               ` Thomas Monjalon
  0 siblings, 1 reply; 200+ results
From: Richardson, Bruce @ 2017-10-25  9:50 UTC (permalink / raw)
  To: Thomas Monjalon, santosh
  Cc: dev, olivier.matz, jerin.jacob, hemant.agrawal, Burakov, Anatoly



> -----Original Message-----
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Thomas Monjalon
> Sent: Wednesday, October 25, 2017 10:46 AM
> To: santosh <santosh.shukla@caviumnetworks.com>
> Cc: dev@dpdk.org; olivier.matz@6wind.com; jerin.jacob@caviumnetworks.com;
> hemant.agrawal@nxp.com; Burakov, Anatoly <anatoly.burakov@intel.com>
> Subject: Re: [dpdk-dev] [PATCH v3 5/6] doc: remove dpdk iova aware notice
> 
> Hi Santosh,
> 
> 24/10/2017 07:06, santosh:
> > Hi Thomas,
> >
> >
> > On Tuesday 24 October 2017 01:59 AM, Thomas Monjalon wrote:
> > > 20/10/2017 14:31, Santosh Shukla:
> > >> Removed dpdk iova aware ABI deprecation notice, and updated ABI
> > >> change details in release_17.11.rst.
> > >>
> > >> Signed-off-by: Santosh Shukla <santosh.shukla@caviumnetworks.com>
> > >> Acked-by: John McNamara <john.mcnamara@intel.com>
> > >> ---
> > >> --- a/doc/guides/rel_notes/deprecation.rst
> > >> +++ b/doc/guides/rel_notes/deprecation.rst
> > >> -* eal: An ABI change is planned for 17.11 to make DPDK aware of
> > >> IOVA address
> > >> -  translation scheme.
> > >> -  Reference to phys address in EAL data-structure or functions may
> > >> change to
> > >> -  IOVA address or more appropriate name.
> > >> -  The change will be only for the name.
> > >> -  Functional aspects of the API or data-structure will remain same.
> > > Sorry, this series cannot be applied as is because it is breaking
> > > more than EAL API. The API of mbuf and mempool are also changed.
> > > We need to choose one of these three options:
> > > 	1/ accept to break all API in 17.11
> > > 	2/ postpone the whole series to 18.02
> >
> > Theme of series is to make dpdk iova aware so I would prefer option 1)
> or 2).
> > However I have no strong opinion on this topic.
> > Lets get more opinion from others about option 1/2/3.
> >
> > > 	3/ rename only EAL API in 17.11 and postpone mbuf/mempool
> 
> After discussing with Olivier it appeared there is a fourth solution.
> We should not break any API (EAL, mbuf, mempool).
> 
> I would like to merge these changes in RC2, but keeping compatibility with
> old names:
> - When you rename a function or a type, you can define a macro for the old
> name, alias the new name.

Note: using a macro doesn't prevent the ABI being broken if you rename a public function. You'll need to use function versioning too.

^ permalink raw reply	[relevance 3%]

* Re: [dpdk-dev] [PATCH v3 5/6] doc: remove dpdk iova aware notice
  2017-10-25  9:50  3%             ` Richardson, Bruce
@ 2017-10-25 10:01  3%               ` Thomas Monjalon
  2017-10-25 10:05  4%                 ` Bruce Richardson
  0 siblings, 1 reply; 200+ results
From: Thomas Monjalon @ 2017-10-25 10:01 UTC (permalink / raw)
  To: Richardson, Bruce
  Cc: santosh, dev, olivier.matz, jerin.jacob, hemant.agrawal, Burakov,
	Anatoly

25/10/2017 11:50, Richardson, Bruce:
> 
> > -----Original Message-----
> > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Thomas Monjalon
> > Sent: Wednesday, October 25, 2017 10:46 AM
> > To: santosh <santosh.shukla@caviumnetworks.com>
> > Cc: dev@dpdk.org; olivier.matz@6wind.com; jerin.jacob@caviumnetworks.com;
> > hemant.agrawal@nxp.com; Burakov, Anatoly <anatoly.burakov@intel.com>
> > Subject: Re: [dpdk-dev] [PATCH v3 5/6] doc: remove dpdk iova aware notice
> > 
> > Hi Santosh,
> > 
> > 24/10/2017 07:06, santosh:
> > > Hi Thomas,
> > >
> > >
> > > On Tuesday 24 October 2017 01:59 AM, Thomas Monjalon wrote:
> > > > 20/10/2017 14:31, Santosh Shukla:
> > > >> Removed dpdk iova aware ABI deprecation notice, and updated ABI
> > > >> change details in release_17.11.rst.
> > > >>
> > > >> Signed-off-by: Santosh Shukla <santosh.shukla@caviumnetworks.com>
> > > >> Acked-by: John McNamara <john.mcnamara@intel.com>
> > > >> ---
> > > >> --- a/doc/guides/rel_notes/deprecation.rst
> > > >> +++ b/doc/guides/rel_notes/deprecation.rst
> > > >> -* eal: An ABI change is planned for 17.11 to make DPDK aware of
> > > >> IOVA address
> > > >> -  translation scheme.
> > > >> -  Reference to phys address in EAL data-structure or functions may
> > > >> change to
> > > >> -  IOVA address or more appropriate name.
> > > >> -  The change will be only for the name.
> > > >> -  Functional aspects of the API or data-structure will remain same.
> > > > Sorry, this series cannot be applied as is because it is breaking
> > > > more than EAL API. The API of mbuf and mempool are also changed.
> > > > We need to choose one of these three options:
> > > > 	1/ accept to break all API in 17.11
> > > > 	2/ postpone the whole series to 18.02
> > >
> > > Theme of series is to make dpdk iova aware so I would prefer option 1)
> > or 2).
> > > However I have no strong opinion on this topic.
> > > Lets get more opinion from others about option 1/2/3.
> > >
> > > > 	3/ rename only EAL API in 17.11 and postpone mbuf/mempool
> > 
> > After discussing with Olivier it appeared there is a fourth solution.
> > We should not break any API (EAL, mbuf, mempool).
> > 
> > I would like to merge these changes in RC2, but keeping compatibility with
> > old names:
> > - When you rename a function or a type, you can define a macro for the old
> > name, alias the new name.
> 
> Note: using a macro doesn't prevent the ABI being broken if you rename a public function. You'll need to use function versioning too.

True
We can use an inline function to avoid ABI breakage.

^ permalink raw reply	[relevance 3%]

* Re: [dpdk-dev] [PATCH v3 5/6] doc: remove dpdk iova aware notice
  2017-10-25 10:01  3%               ` Thomas Monjalon
@ 2017-10-25 10:05  4%                 ` Bruce Richardson
  2017-10-25 10:12  0%                   ` Thomas Monjalon
  0 siblings, 1 reply; 200+ results
From: Bruce Richardson @ 2017-10-25 10:05 UTC (permalink / raw)
  To: Thomas Monjalon
  Cc: santosh, dev, olivier.matz, jerin.jacob, hemant.agrawal, Burakov,
	Anatoly

On Wed, Oct 25, 2017 at 12:01:26PM +0200, Thomas Monjalon wrote:
> 25/10/2017 11:50, Richardson, Bruce:
> > 
> > > -----Original Message-----
> > > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Thomas Monjalon
> > > Sent: Wednesday, October 25, 2017 10:46 AM
> > > To: santosh <santosh.shukla@caviumnetworks.com>
> > > Cc: dev@dpdk.org; olivier.matz@6wind.com; jerin.jacob@caviumnetworks.com;
> > > hemant.agrawal@nxp.com; Burakov, Anatoly <anatoly.burakov@intel.com>
> > > Subject: Re: [dpdk-dev] [PATCH v3 5/6] doc: remove dpdk iova aware notice
> > > 
> > > Hi Santosh,
> > > 
> > > 24/10/2017 07:06, santosh:
> > > > Hi Thomas,
> > > >
> > > >
> > > > On Tuesday 24 October 2017 01:59 AM, Thomas Monjalon wrote:
> > > > > 20/10/2017 14:31, Santosh Shukla:
> > > > >> Removed dpdk iova aware ABI deprecation notice, and updated ABI
> > > > >> change details in release_17.11.rst.
> > > > >>
> > > > >> Signed-off-by: Santosh Shukla <santosh.shukla@caviumnetworks.com>
> > > > >> Acked-by: John McNamara <john.mcnamara@intel.com>
> > > > >> ---
> > > > >> --- a/doc/guides/rel_notes/deprecation.rst
> > > > >> +++ b/doc/guides/rel_notes/deprecation.rst
> > > > >> -* eal: An ABI change is planned for 17.11 to make DPDK aware of
> > > > >> IOVA address
> > > > >> -  translation scheme.
> > > > >> -  Reference to phys address in EAL data-structure or functions may
> > > > >> change to
> > > > >> -  IOVA address or more appropriate name.
> > > > >> -  The change will be only for the name.
> > > > >> -  Functional aspects of the API or data-structure will remain same.
> > > > > Sorry, this series cannot be applied as is because it is breaking
> > > > > more than EAL API. The API of mbuf and mempool are also changed.
> > > > > We need to choose one of these three options:
> > > > > 	1/ accept to break all API in 17.11
> > > > > 	2/ postpone the whole series to 18.02
> > > >
> > > > Theme of series is to make dpdk iova aware so I would prefer option 1)
> > > or 2).
> > > > However I have no strong opinion on this topic.
> > > > Lets get more opinion from others about option 1/2/3.
> > > >
> > > > > 	3/ rename only EAL API in 17.11 and postpone mbuf/mempool
> > > 
> > > After discussing with Olivier it appeared there is a fourth solution.
> > > We should not break any API (EAL, mbuf, mempool).
> > > 
> > > I would like to merge these changes in RC2, but keeping compatibility with
> > > old names:
> > > - When you rename a function or a type, you can define a macro for the old
> > > name, alias the new name.
> > 
> > Note: using a macro doesn't prevent the ABI being broken if you rename a public function. You'll need to use function versioning too.
> 
> True
> We can use an inline function to avoid ABI breakage.

Nope, inline function won't work either, since that ends up the same as
the macro and compiled into the end app, not the library ABI. You
need a public non-inline wrapper function to keep ABI, or else function
renaming via symbol versioning/mapping.

^ permalink raw reply	[relevance 4%]

* Re: [dpdk-dev] [PATCH v3 5/6] doc: remove dpdk iova aware notice
  2017-10-25 10:05  4%                 ` Bruce Richardson
@ 2017-10-25 10:12  0%                   ` Thomas Monjalon
  2017-10-25 10:32  0%                     ` Bruce Richardson
  0 siblings, 1 reply; 200+ results
From: Thomas Monjalon @ 2017-10-25 10:12 UTC (permalink / raw)
  To: Bruce Richardson
  Cc: santosh, dev, olivier.matz, jerin.jacob, hemant.agrawal, Burakov,
	Anatoly

25/10/2017 12:05, Bruce Richardson:
> On Wed, Oct 25, 2017 at 12:01:26PM +0200, Thomas Monjalon wrote:
> > 25/10/2017 11:50, Richardson, Bruce:
> > > From: Thomas Monjalon
> > > > > On Tuesday 24 October 2017 01:59 AM, Thomas Monjalon wrote:
> > > > > > 20/10/2017 14:31, Santosh Shukla:
> > > > > >> Removed dpdk iova aware ABI deprecation notice, and updated ABI
> > > > > >> change details in release_17.11.rst.
> > > > > >>
> > > > > >> Signed-off-by: Santosh Shukla <santosh.shukla@caviumnetworks.com>
> > > > > >> Acked-by: John McNamara <john.mcnamara@intel.com>
> > > > > >> ---
> > > > > >> --- a/doc/guides/rel_notes/deprecation.rst
> > > > > >> +++ b/doc/guides/rel_notes/deprecation.rst
> > > > > >> -* eal: An ABI change is planned for 17.11 to make DPDK aware of
> > > > > >> IOVA address
> > > > > >> -  translation scheme.
> > > > > >> -  Reference to phys address in EAL data-structure or functions may
> > > > > >> change to
> > > > > >> -  IOVA address or more appropriate name.
> > > > > >> -  The change will be only for the name.
> > > > > >> -  Functional aspects of the API or data-structure will remain same.
> > > > > > Sorry, this series cannot be applied as is because it is breaking
> > > > > > more than EAL API. The API of mbuf and mempool are also changed.
> > > > > > We need to choose one of these three options:
> > > > > > 	1/ accept to break all API in 17.11
> > > > > > 	2/ postpone the whole series to 18.02
> > > > >
> > > > > Theme of series is to make dpdk iova aware so I would prefer option 1)
> > > > or 2).
> > > > > However I have no strong opinion on this topic.
> > > > > Lets get more opinion from others about option 1/2/3.
> > > > >
> > > > > > 	3/ rename only EAL API in 17.11 and postpone mbuf/mempool
> > > > 
> > > > After discussing with Olivier it appeared there is a fourth solution.
> > > > We should not break any API (EAL, mbuf, mempool).
> > > > 
> > > > I would like to merge these changes in RC2, but keeping compatibility with
> > > > old names:
> > > > - When you rename a function or a type, you can define a macro for the old
> > > > name, alias the new name.
> > > 
> > > Note: using a macro doesn't prevent the ABI being broken if you rename a public function. You'll need to use function versioning too.
> > 
> > True
> > We can use an inline function to avoid ABI breakage.
> 
> Nope, inline function won't work either, since that ends up the same as
> the macro and compiled into the end app, not the library ABI. You
> need a public non-inline wrapper function to keep ABI, or else function
> renaming via symbol versioning/mapping.

Ah ah ah, I'm writing before thinking :)
Yes, the function must not be inlined.

And generally speaking it is not an issue,
even for performance critical functions.
Adding one more function call in the path is not a bad thing
for deprecated functions.
I've seen another project (don't remember which one) adding a
sleep() in deprecated functions and increasing the sleep time
at each new release :)

^ permalink raw reply	[relevance 0%]

* Re: [dpdk-dev] [PATCH v3 5/6] doc: remove dpdk iova aware notice
  2017-10-25 10:12  0%                   ` Thomas Monjalon
@ 2017-10-25 10:32  0%                     ` Bruce Richardson
  0 siblings, 0 replies; 200+ results
From: Bruce Richardson @ 2017-10-25 10:32 UTC (permalink / raw)
  To: Thomas Monjalon
  Cc: santosh, dev, olivier.matz, jerin.jacob, hemant.agrawal, Burakov,
	Anatoly

On Wed, Oct 25, 2017 at 12:12:57PM +0200, Thomas Monjalon wrote:
> 25/10/2017 12:05, Bruce Richardson:
> > On Wed, Oct 25, 2017 at 12:01:26PM +0200, Thomas Monjalon wrote:
> > > 25/10/2017 11:50, Richardson, Bruce:
> > > > From: Thomas Monjalon
> > > > > > On Tuesday 24 October 2017 01:59 AM, Thomas Monjalon wrote:
> > > > > > > 20/10/2017 14:31, Santosh Shukla:
> > > > > > >> Removed dpdk iova aware ABI deprecation notice, and updated ABI
> > > > > > >> change details in release_17.11.rst.
> > > > > > >>
> > > > > > >> Signed-off-by: Santosh Shukla <santosh.shukla@caviumnetworks.com>
> > > > > > >> Acked-by: John McNamara <john.mcnamara@intel.com>
> > > > > > >> ---
> > > > > > >> --- a/doc/guides/rel_notes/deprecation.rst
> > > > > > >> +++ b/doc/guides/rel_notes/deprecation.rst
> > > > > > >> -* eal: An ABI change is planned for 17.11 to make DPDK aware of
> > > > > > >> IOVA address
> > > > > > >> -  translation scheme.
> > > > > > >> -  Reference to phys address in EAL data-structure or functions may
> > > > > > >> change to
> > > > > > >> -  IOVA address or more appropriate name.
> > > > > > >> -  The change will be only for the name.
> > > > > > >> -  Functional aspects of the API or data-structure will remain same.
> > > > > > > Sorry, this series cannot be applied as is because it is breaking
> > > > > > > more than EAL API. The API of mbuf and mempool are also changed.
> > > > > > > We need to choose one of these three options:
> > > > > > > 	1/ accept to break all API in 17.11
> > > > > > > 	2/ postpone the whole series to 18.02
> > > > > >
> > > > > > Theme of series is to make dpdk iova aware so I would prefer option 1)
> > > > > or 2).
> > > > > > However I have no strong opinion on this topic.
> > > > > > Lets get more opinion from others about option 1/2/3.
> > > > > >
> > > > > > > 	3/ rename only EAL API in 17.11 and postpone mbuf/mempool
> > > > > 
> > > > > After discussing with Olivier it appeared there is a fourth solution.
> > > > > We should not break any API (EAL, mbuf, mempool).
> > > > > 
> > > > > I would like to merge these changes in RC2, but keeping compatibility with
> > > > > old names:
> > > > > - When you rename a function or a type, you can define a macro for the old
> > > > > name, alias the new name.
> > > > 
> > > > Note: using a macro doesn't prevent the ABI being broken if you rename a public function. You'll need to use function versioning too.
> > > 
> > > True
> > > We can use an inline function to avoid ABI breakage.
> > 
> > Nope, inline function won't work either, since that ends up the same as
> > the macro and compiled into the end app, not the library ABI. You
> > need a public non-inline wrapper function to keep ABI, or else function
> > renaming via symbol versioning/mapping.
> 
> Ah ah ah, I'm writing before thinking :)
> Yes, the function must not be inlined.
> 
> And generally speaking it is not an issue,
> even for performance critical functions.
> Adding one more function call in the path is not a bad thing
> for deprecated functions.
> I've seen another project (don't remember which one) adding a
> sleep() in deprecated functions and increasing the sleep time
> at each new release :)

Genius!!

^ permalink raw reply	[relevance 0%]

* [dpdk-dev] [PATCH v2 1/3] cryptodev: add new APIs to assist PMD initialisation
  @ 2017-10-25 12:00  3%   ` Declan Doherty
  2017-10-25 12:00  1%   ` [dpdk-dev] [PATCH v2 2/3] cryptodev: break dependency on virtual device bus Declan Doherty
  2017-10-25 12:00  3%   ` [dpdk-dev] [PATCH v2 3/3] cryptodev: break dependency on PCI " Declan Doherty
  2 siblings, 0 replies; 200+ results
From: Declan Doherty @ 2017-10-25 12:00 UTC (permalink / raw)
  To: dev; +Cc: Declan Doherty

Adds new PMD assist functions which are bus independent for driver to
create and destroy new device instances.

Also includes function to parse parameters which can be passed to
driver on device initialisation.

Signed-off-by: Declan Doherty <declan.doherty@intel.com>
---
 doc/guides/rel_notes/release_17_11.rst         |   6 +
 lib/librte_cryptodev/rte_cryptodev.h           |   8 +-
 lib/librte_cryptodev/rte_cryptodev_pmd.c       | 168 +++++++++++++++++++++++++
 lib/librte_cryptodev/rte_cryptodev_pmd.h       |  86 +++++++++++++
 lib/librte_cryptodev/rte_cryptodev_version.map |   3 +
 5 files changed, 267 insertions(+), 4 deletions(-)

diff --git a/doc/guides/rel_notes/release_17_11.rst b/doc/guides/rel_notes/release_17_11.rst
index e4e98f7..0a90db4 100644
--- a/doc/guides/rel_notes/release_17_11.rst
+++ b/doc/guides/rel_notes/release_17_11.rst
@@ -291,6 +291,12 @@ API Changes
   ``rte_log_get_global_level()``, ``rte_log_set_level()`` and
   ``rte_log_get_level()``.
 
+* **Add bus agnostic functions to crytpodev for PMD initialisation**
+
+  Adds new PMD assist functions ``rte_cryptodev_pmd_parse_input_args()``,
+  ``rte_cryptodev_pmd_create()`` and ``rte_cryptodev_pmd_destroy()`` which
+  are bus independent for driver to manage creation and destruction of new
+  device instances.
 
 ABI Changes
 -----------
diff --git a/lib/librte_cryptodev/rte_cryptodev.h b/lib/librte_cryptodev/rte_cryptodev.h
index fd0e3f1..e054c50 100644
--- a/lib/librte_cryptodev/rte_cryptodev.h
+++ b/lib/librte_cryptodev/rte_cryptodev.h
@@ -60,10 +60,10 @@ extern const char **rte_cyptodev_names;
 		RTE_FMT("%s() line %u: " RTE_FMT_HEAD(__VA_ARGS__,) "\n", \
 			__func__, __LINE__, RTE_FMT_TAIL(__VA_ARGS__,)))
 
-#define CDEV_PMD_LOG_ERR(dev, ...) \
-	RTE_LOG(ERR, CRYPTODEV, \
-		RTE_FMT("[%s] %s() line %u: " RTE_FMT_HEAD(__VA_ARGS__,) "\n", \
-			dev, __func__, __LINE__, RTE_FMT_TAIL(__VA_ARGS__,)))
+#define CDEV_LOG_INFO(...) \
+	RTE_LOG(INFO, CRYPTODEV, \
+		RTE_FMT(RTE_FMT_HEAD(__VA_ARGS__,) "\n", \
+			RTE_FMT_TAIL(__VA_ARGS__,)))
 
 #ifdef RTE_LIBRTE_CRYPTODEV_DEBUG
 #define CDEV_LOG_DEBUG(...) \
diff --git a/lib/librte_cryptodev/rte_cryptodev_pmd.c b/lib/librte_cryptodev/rte_cryptodev_pmd.c
index a57faad..ca6d459 100644
--- a/lib/librte_cryptodev/rte_cryptodev_pmd.c
+++ b/lib/librte_cryptodev/rte_cryptodev_pmd.c
@@ -40,6 +40,174 @@
  * Parse name from argument
  */
 static int
+rte_cryptodev_pmd_parse_name_arg(const char *key __rte_unused,
+		const char *value, void *extra_args)
+{
+	struct rte_cryptodev_pmd_init_params *params = extra_args;
+	int n;
+
+	n = snprintf(params->name, RTE_CRYPTODEV_NAME_MAX_LEN, "%s",value);
+	if (n >= RTE_CRYPTODEV_NAME_MAX_LEN)
+		return -EINVAL;
+
+	return 0;
+}
+
+/**
+ * Parse unsigned integer from argument
+ */
+static int
+rte_cryptodev_pmd_parse_uint_arg(const char *key __rte_unused,
+		const char *value, void *extra_args)
+{
+	int i;
+	char *end;
+	errno = 0;
+
+	i = strtol(value, &end, 10);
+	if (*end != 0 || errno != 0 || i < 0)
+		return -EINVAL;
+
+	*((uint32_t *)extra_args) = i;
+	return 0;
+}
+
+int
+rte_cryptodev_pmd_parse_input_args(
+		struct rte_cryptodev_pmd_init_params *params,
+		const char *args)
+{
+	struct rte_kvargs *kvlist = NULL;
+	int ret = 0;
+
+	if (params == NULL)
+		return -EINVAL;
+
+	if (args) {
+		kvlist = rte_kvargs_parse(args,	cryptodev_pmd_valid_params);
+		if (kvlist == NULL)
+			return -EINVAL;
+
+		ret = rte_kvargs_process(kvlist,
+				RTE_CRYPTODEV_PMD_MAX_NB_QP_ARG,
+				&rte_cryptodev_pmd_parse_uint_arg,
+				&params->max_nb_queue_pairs);
+		if (ret < 0)
+			goto free_kvlist;
+
+		ret = rte_kvargs_process(kvlist,
+				RTE_CRYPTODEV_PMD_MAX_NB_SESS_ARG,
+				&rte_cryptodev_pmd_parse_uint_arg,
+				&params->max_nb_sessions);
+		if (ret < 0)
+			goto free_kvlist;
+
+		ret = rte_kvargs_process(kvlist,
+				RTE_CRYPTODEV_PMD_SOCKET_ID_ARG,
+				&rte_cryptodev_pmd_parse_uint_arg,
+				&params->socket_id);
+		if (ret < 0)
+			goto free_kvlist;
+
+		ret = rte_kvargs_process(kvlist,
+				RTE_CRYPTODEV_PMD_NAME_ARG,
+				&rte_cryptodev_pmd_parse_name_arg,
+				params);
+		if (ret < 0)
+			goto free_kvlist;
+	}
+
+free_kvlist:
+	rte_kvargs_free(kvlist);
+	return ret;
+}
+
+struct rte_cryptodev *
+rte_cryptodev_pmd_create(const char *name,
+		struct rte_device *device,
+		struct rte_cryptodev_pmd_init_params *params)
+{
+	struct rte_cryptodev *cryptodev;
+
+	if (params->name[0] != '\0') {
+		CDEV_LOG_INFO("[%s] User specified device name = %s\n",
+				device->driver->name, params->name);
+		name = params->name;
+	}
+
+	CDEV_LOG_INFO("[%s] - Creating cryptodev %s\n",
+			device->driver->name, name);
+
+	CDEV_LOG_INFO("[%s] - Initialisation parameters - name: %s,"
+			"socket id: %d, max queue pairs: %u, max sessions: %u",
+			device->driver->name, name,
+			params->socket_id, params->max_nb_queue_pairs,
+			params->max_nb_sessions);
+
+	/* allocate device structure */
+	cryptodev = rte_cryptodev_pmd_allocate(name, params->socket_id);
+	if (cryptodev == NULL) {
+		CDEV_LOG_ERR("[%s] Failed to allocate crypto device for %s",
+				device->driver->name, name);
+		return NULL;
+	}
+
+	/* allocate private device structure */
+	if (rte_eal_process_type() == RTE_PROC_PRIMARY) {
+		cryptodev->data->dev_private =
+				rte_zmalloc_socket("cryptodev device private",
+						params->private_data_size,
+						RTE_CACHE_LINE_SIZE,
+						params->socket_id);
+
+		if (cryptodev->data->dev_private == NULL) {
+			CDEV_LOG_ERR("[%s] Cannot allocate memory for "
+					"cryptodev %s private data",
+					device->driver->name, name);
+
+			rte_cryptodev_pmd_release_device(cryptodev);
+			return NULL;
+		}
+	}
+
+	cryptodev->device = device;
+
+	/* initialise user call-back tail queue */
+	TAILQ_INIT(&(cryptodev->link_intr_cbs));
+
+	return cryptodev;
+}
+
+
+
+int
+rte_cryptodev_pmd_destroy(struct rte_cryptodev *cryptodev)
+{
+	int retval;
+
+	CDEV_LOG_INFO("[%s] Closing crypto device %s",
+			cryptodev->device->driver->name,
+			cryptodev->device->name);
+
+	/* free crypto device */
+	retval = rte_cryptodev_pmd_release_device(cryptodev);
+	if (retval)
+		return retval;
+
+	if (rte_eal_process_type() == RTE_PROC_PRIMARY)
+		rte_free(cryptodev->data->dev_private);
+
+
+	cryptodev->device = NULL;
+	cryptodev->data = NULL;
+
+	return 0;
+}
+
+/**
+ * Parse name from argument
+ */
+static int
 rte_cryptodev_vdev_parse_name_arg(const char *key __rte_unused,
 		const char *value, void *extra_args)
 {
diff --git a/lib/librte_cryptodev/rte_cryptodev_pmd.h b/lib/librte_cryptodev/rte_cryptodev_pmd.h
index ba074e1..744405e 100644
--- a/lib/librte_cryptodev/rte_cryptodev_pmd.h
+++ b/lib/librte_cryptodev/rte_cryptodev_pmd.h
@@ -56,6 +56,35 @@ extern "C" {
 #include "rte_crypto.h"
 #include "rte_cryptodev.h"
 
+
+#define RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_QUEUE_PAIRS	8
+#define RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_SESSIONS	2048
+
+#define RTE_CRYPTODEV_PMD_NAME_ARG			("name")
+#define RTE_CRYPTODEV_PMD_MAX_NB_QP_ARG			("max_nb_queue_pairs")
+#define RTE_CRYPTODEV_PMD_MAX_NB_SESS_ARG		("max_nb_sessions")
+#define RTE_CRYPTODEV_PMD_SOCKET_ID_ARG			("socket_id")
+
+
+static const char * const cryptodev_pmd_valid_params[] = {
+	RTE_CRYPTODEV_PMD_NAME_ARG,
+	RTE_CRYPTODEV_PMD_MAX_NB_QP_ARG,
+	RTE_CRYPTODEV_PMD_MAX_NB_SESS_ARG,
+	RTE_CRYPTODEV_PMD_SOCKET_ID_ARG
+};
+
+/**
+ * @internal
+ * Initialisation parameters for crypto devices
+ */
+struct rte_cryptodev_pmd_init_params {
+	char name[RTE_CRYPTODEV_NAME_MAX_LEN];
+	size_t private_data_size;
+	int socket_id;
+	unsigned int max_nb_queue_pairs;
+	unsigned int max_nb_sessions;
+};
+
 /** Global structure used for maintaining state of allocated crypto devices */
 struct rte_cryptodev_global {
 	struct rte_cryptodev *devs;	/**< Device information array */
@@ -392,6 +421,63 @@ rte_cryptodev_pmd_allocate(const char *name, int socket_id);
 extern int
 rte_cryptodev_pmd_release_device(struct rte_cryptodev *cryptodev);
 
+
+/**
+ * @internal
+ *
+ * PMD assist function to parse initialisation arguments for crypto driver
+ * when creating a new crypto PMD device instance.
+ *
+ * PMD driver should set default values for that PMD before calling function,
+ * these default values will be over-written with successfully parsed values
+ * from args string.
+ *
+ * @param	params	parsed PMD initialisation parameters
+ * @param	args	input argument string to parse
+ *
+ * @return
+ *  - 0 on success
+ *  - errno on failure
+ */
+int
+rte_cryptodev_pmd_parse_input_args(
+		struct rte_cryptodev_pmd_init_params *params,
+		const char *args);
+
+/**
+ * @internal
+ *
+ * PMD assist function to provide boiler plate code for crypto driver to create
+ * and allocate resources for a new crypto PMD device instance.
+ *
+ * @param	name	crypto device name.
+ * @param	device	base device instance
+ * @param	params	PMD initialisation parameters
+ *
+ * @return
+ *  - crypto device instance on success
+ *  - NULL on creation failure
+ */
+struct rte_cryptodev *
+rte_cryptodev_pmd_create(const char *name,
+		struct rte_device *device,
+		struct rte_cryptodev_pmd_init_params *params);
+
+/**
+ * @internal
+ *
+ * PMD assist function to provide boiler plate code for crypto driver to
+ * destroy and free resources associated with a crypto PMD device instance.
+ *
+ * @param	cryptodev	crypto device handle.
+ *
+ * @return
+ *  - 0 on success
+ *  - errno on failure
+ */
+int
+rte_cryptodev_pmd_destroy(struct rte_cryptodev *cryptodev);
+
 /**
  * Executes all the user application registered callbacks for the specific
  * device.
diff --git a/lib/librte_cryptodev/rte_cryptodev_version.map b/lib/librte_cryptodev/rte_cryptodev_version.map
index 919b6cc..a0ea7bf 100644
--- a/lib/librte_cryptodev/rte_cryptodev_version.map
+++ b/lib/librte_cryptodev/rte_cryptodev_version.map
@@ -84,5 +84,8 @@ DPDK_17.11 {
 	global:
 
 	rte_cryptodev_name_get;
+	rte_cryptodev_pmd_create;
+	rte_cryptodev_pmd_destroy;
+	rte_cryptodev_pmd_parse_input_args;
 
 } DPDK_17.08;
-- 
2.9.4

^ permalink raw reply	[relevance 3%]

* [dpdk-dev] [PATCH v2 3/3] cryptodev: break dependency on PCI device bus
    2017-10-25 12:00  3%   ` [dpdk-dev] [PATCH v2 1/3] cryptodev: add new APIs to assist PMD initialisation Declan Doherty
  2017-10-25 12:00  1%   ` [dpdk-dev] [PATCH v2 2/3] cryptodev: break dependency on virtual device bus Declan Doherty
@ 2017-10-25 12:00  3%   ` Declan Doherty
  2 siblings, 0 replies; 200+ results
From: Declan Doherty @ 2017-10-25 12:00 UTC (permalink / raw)
  To: dev; +Cc: Declan Doherty

Removes any dependency of librte_cryptodev on the PCI device
infrastructure code and removes the functions which were virtual
device specific.

Updates QAT crypto PMD to remove dependencies on rte_cryptodev_pci.h
and replaces those calls with the new bus independent functions.

Signed-off-by: Declan Doherty <declan.doherty@intel.com>
---
 doc/guides/rel_notes/release_17_11.rst         |  7 ++
 drivers/crypto/qat/qat_crypto.c                |  3 +-
 drivers/crypto/qat/rte_qat_cryptodev.c         | 55 +++++++++++----
 lib/librte_cryptodev/Makefile                  |  1 -
 lib/librte_cryptodev/rte_cryptodev_pci.h       | 92 -------------------------
 lib/librte_cryptodev/rte_cryptodev_pmd.c       | 95 --------------------------
 lib/librte_cryptodev/rte_cryptodev_version.map |  2 -
 7 files changed, 52 insertions(+), 203 deletions(-)
 delete mode 100644 lib/librte_cryptodev/rte_cryptodev_pci.h

diff --git a/doc/guides/rel_notes/release_17_11.rst b/doc/guides/rel_notes/release_17_11.rst
index 7755768..78170e1 100644
--- a/doc/guides/rel_notes/release_17_11.rst
+++ b/doc/guides/rel_notes/release_17_11.rst
@@ -305,6 +305,13 @@ API Changes
   and have been replaced by non bus specific functions
   ``rte_cryptodev_pmd_parse_input_args()`` and ``rte_cryptodev_pmd_create()``.
 
+* **Removed PCI device bus specific functions from librte_cryptodev.**
+
+  The functions ``rte_cryptodev_pci_generic_probe()`` and
+  ``rte_cryptodev_pci_generic_remove()`` have been removed from librte_cryptodev
+  and have been replaced by non bus specific functions
+  ``rte_cryptodev_pmd_create()`` and ``rte_cryptodev_pmd_destroy()``.
+
 ABI Changes
 -----------
 
diff --git a/drivers/crypto/qat/qat_crypto.c b/drivers/crypto/qat/qat_crypto.c
index ae73c78..87f232e 100644
--- a/drivers/crypto/qat/qat_crypto.c
+++ b/drivers/crypto/qat/qat_crypto.c
@@ -58,8 +58,9 @@
 #include <rte_spinlock.h>
 #include <rte_hexdump.h>
 #include <rte_crypto_sym.h>
-#include <rte_cryptodev_pci.h>
 #include <rte_byteorder.h>
+#include <rte_pci.h>
+
 #include <openssl/evp.h>
 
 #include "qat_logs.h"
diff --git a/drivers/crypto/qat/rte_qat_cryptodev.c b/drivers/crypto/qat/rte_qat_cryptodev.c
index 3d9f3c8..701c5a6 100644
--- a/drivers/crypto/qat/rte_qat_cryptodev.c
+++ b/drivers/crypto/qat/rte_qat_cryptodev.c
@@ -34,8 +34,8 @@
 #include <rte_common.h>
 #include <rte_dev.h>
 #include <rte_malloc.h>
+#include <rte_pci.h>
 #include <rte_cryptodev_pmd.h>
-#include <rte_cryptodev_pci.h>
 
 #include "qat_crypto.h"
 #include "qat_logs.h"
@@ -97,15 +97,18 @@ static const struct rte_pci_id pci_id_qat_map[] = {
 };
 
 static int
-crypto_qat_dev_init(struct rte_cryptodev *cryptodev)
+crypto_qat_create(const char *name, struct rte_pci_device *pci_dev,
+		struct rte_cryptodev_pmd_init_params *init_params)
 {
+	struct rte_cryptodev *cryptodev;
 	struct qat_pmd_private *internals;
 
 	PMD_INIT_FUNC_TRACE();
-	PMD_DRV_LOG(DEBUG, "Found crypto device at %02x:%02x.%x",
-		RTE_DEV_TO_PCI(cryptodev->device)->addr.bus,
-		RTE_DEV_TO_PCI(cryptodev->device)->addr.devid,
-		RTE_DEV_TO_PCI(cryptodev->device)->addr.function);
+
+	cryptodev = rte_cryptodev_pmd_create(name, &pci_dev->device,
+			init_params);
+	if (cryptodev == NULL)
+		return -ENODEV;
 
 	cryptodev->driver_id = cryptodev_qat_driver_id;
 	cryptodev->dev_ops = &crypto_qat_ops;
@@ -119,8 +122,8 @@ crypto_qat_dev_init(struct rte_cryptodev *cryptodev)
 			RTE_CRYPTODEV_FF_MBUF_SCATTER_GATHER;
 
 	internals = cryptodev->data->dev_private;
-	internals->max_nb_sessions = RTE_QAT_PMD_MAX_NB_SESSIONS;
-	switch (RTE_DEV_TO_PCI(cryptodev->device)->id.device_id) {
+	internals->max_nb_sessions = init_params->max_nb_sessions;
+	switch (pci_dev->id.device_id) {
 	case 0x0443:
 		internals->qat_dev_gen = QAT_GEN1;
 		internals->qat_dev_capabilities = qat_gen1_capabilities;
@@ -151,15 +154,43 @@ crypto_qat_dev_init(struct rte_cryptodev *cryptodev)
 }
 
 static int crypto_qat_pci_probe(struct rte_pci_driver *pci_drv __rte_unused,
-	struct rte_pci_device *pci_dev)
+		struct rte_pci_device *pci_dev)
 {
-	return rte_cryptodev_pci_generic_probe(pci_dev,
-		sizeof(struct qat_pmd_private), crypto_qat_dev_init);
+	struct rte_cryptodev_pmd_init_params init_params = {
+		.name = "",
+		.socket_id = rte_socket_id(),
+		.private_data_size = sizeof(struct qat_pmd_private),
+		.max_nb_sessions = RTE_QAT_PMD_MAX_NB_SESSIONS
+	};
+	char name[RTE_CRYPTODEV_NAME_MAX_LEN];
+
+	PMD_DRV_LOG(DEBUG, "Found QAT device at %02x:%02x.%x",
+			pci_dev->addr.bus,
+			pci_dev->addr.devid,
+			pci_dev->addr.function);
+
+	rte_pci_device_name(&pci_dev->addr, name, sizeof(name));
+
+	return crypto_qat_create(name, pci_dev, &init_params);
 }
 
 static int crypto_qat_pci_remove(struct rte_pci_device *pci_dev)
 {
-	return rte_cryptodev_pci_generic_remove(pci_dev, NULL);
+	struct rte_cryptodev *cryptodev;
+	char cryptodev_name[RTE_CRYPTODEV_NAME_MAX_LEN];
+
+	if (pci_dev == NULL)
+		return -EINVAL;
+
+	rte_pci_device_name(&pci_dev->addr, cryptodev_name,
+			sizeof(cryptodev_name));
+
+	cryptodev = rte_cryptodev_pmd_get_named_dev(cryptodev_name);
+	if (cryptodev == NULL)
+		return -ENODEV;
+
+	/* free crypto device */
+	return rte_cryptodev_pmd_destroy(cryptodev);
 }
 
 static struct rte_pci_driver rte_qat_pmd = {
diff --git a/lib/librte_cryptodev/Makefile b/lib/librte_cryptodev/Makefile
index 0e019ed..ee00e8c 100644
--- a/lib/librte_cryptodev/Makefile
+++ b/lib/librte_cryptodev/Makefile
@@ -50,7 +50,6 @@ SYMLINK-y-include += rte_crypto.h
 SYMLINK-y-include += rte_crypto_sym.h
 SYMLINK-y-include += rte_cryptodev.h
 SYMLINK-y-include += rte_cryptodev_pmd.h
-SYMLINK-y-include += rte_cryptodev_pci.h
 
 # versioning export map
 EXPORT_MAP := rte_cryptodev_version.map
diff --git a/lib/librte_cryptodev/rte_cryptodev_pci.h b/lib/librte_cryptodev/rte_cryptodev_pci.h
deleted file mode 100644
index 67eda96..0000000
--- a/lib/librte_cryptodev/rte_cryptodev_pci.h
+++ /dev/null
@@ -1,92 +0,0 @@
-/*-
- *   BSD LICENSE
- *
- *   Copyright(c) 2017 Intel Corporation. All rights reserved.
- *
- *   Redistribution and use in source and binary forms, with or without
- *   modification, are permitted provided that the following conditions
- *   are met:
- *
- *     * Redistributions of source code must retain the above copyright
- *       notice, this list of conditions and the following disclaimer.
- *     * Redistributions in binary form must reproduce the above copyright
- *       notice, this list of conditions and the following disclaimer in
- *       the documentation and/or other materials provided with the
- *       distribution.
- *     * Neither the name of the copyright holder nor the names of its
- *       contributors may be used to endorse or promote products derived
- *       from this software without specific prior written permission.
- *
- *   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- *   "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- *   LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- *   A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- *   OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- *   LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- *   DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- *   THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- *   (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- *   OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef _RTE_CRYPTODEV_PCI_H_
-#define _RTE_CRYPTODEV_PCI_H_
-
-#include <rte_pci.h>
-#include "rte_cryptodev.h"
-
-/**
- * Initialisation function of a crypto driver invoked for each matching
- * crypto PCI device detected during the PCI probing phase.
- *
- * @param	dev	The dev pointer is the address of the *rte_cryptodev*
- *			structure associated with the matching device and which
- *			has been [automatically] allocated in the
- *			*rte_crypto_devices* array.
- *
- * @return
- *   - 0: Success, the device is properly initialised by the driver.
- *        In particular, the driver MUST have set up the *dev_ops* pointer
- *        of the *dev* structure.
- *   - <0: Error code of the device initialisation failure.
- */
-typedef int (*cryptodev_pci_init_t)(struct rte_cryptodev *dev);
-
-/**
- * Finalisation function of a driver invoked for each matching
- * PCI device detected during the PCI closing phase.
- *
- * @param	dev	The dev pointer is the address of the *rte_cryptodev*
- *			structure associated with the matching device and which
- *			has been [automatically] allocated in the
- *			*rte_crypto_devices* array.
- *
- *  * @return
- *   - 0: Success, the device is properly finalised by the driver.
- *        In particular, the driver MUST free the *dev_ops* pointer
- *        of the *dev* structure.
- *   - <0: Error code of the device initialisation failure.
- */
-typedef int (*cryptodev_pci_uninit_t)(struct rte_cryptodev *dev);
-
-/**
- * @internal
- * Wrapper for use by pci drivers as a .probe function to attach to a crypto
- * interface.
- */
-int
-rte_cryptodev_pci_generic_probe(struct rte_pci_device *pci_dev,
-			size_t private_data_size,
-			cryptodev_pci_init_t dev_init);
-
-/**
- * @internal
- * Wrapper for use by pci drivers as a .remove function to detach a crypto
- * interface.
- */
-int
-rte_cryptodev_pci_generic_remove(struct rte_pci_device *pci_dev,
-		cryptodev_pci_uninit_t dev_uninit);
-
-#endif /* _RTE_CRYPTODEV_PCI_H_ */
diff --git a/lib/librte_cryptodev/rte_cryptodev_pmd.c b/lib/librte_cryptodev/rte_cryptodev_pmd.c
index 0b5741a..8d4b78a 100644
--- a/lib/librte_cryptodev/rte_cryptodev_pmd.c
+++ b/lib/librte_cryptodev/rte_cryptodev_pmd.c
@@ -32,7 +32,6 @@
 
 #include <rte_malloc.h>
 
-#include "rte_cryptodev_pci.h"
 #include "rte_cryptodev_pmd.h"
 
 /**
@@ -177,8 +176,6 @@ rte_cryptodev_pmd_create(const char *name,
 	return cryptodev;
 }
 
-
-
 int
 rte_cryptodev_pmd_destroy(struct rte_cryptodev *cryptodev)
 {
@@ -203,95 +200,3 @@ rte_cryptodev_pmd_destroy(struct rte_cryptodev *cryptodev)
 	return 0;
 }
 
-int
-rte_cryptodev_pci_generic_probe(struct rte_pci_device *pci_dev,
-			size_t private_data_size,
-			cryptodev_pci_init_t dev_init)
-{
-	struct rte_cryptodev *cryptodev;
-
-	char cryptodev_name[RTE_CRYPTODEV_NAME_MAX_LEN];
-
-	int retval;
-
-	rte_pci_device_name(&pci_dev->addr, cryptodev_name,
-			sizeof(cryptodev_name));
-
-	cryptodev = rte_cryptodev_pmd_allocate(cryptodev_name, rte_socket_id());
-	if (cryptodev == NULL)
-		return -ENOMEM;
-
-	if (rte_eal_process_type() == RTE_PROC_PRIMARY) {
-		cryptodev->data->dev_private =
-				rte_zmalloc_socket(
-						"cryptodev private structure",
-						private_data_size,
-						RTE_CACHE_LINE_SIZE,
-						rte_socket_id());
-
-		if (cryptodev->data->dev_private == NULL)
-			rte_panic("Cannot allocate memzone for private "
-					"device data");
-	}
-
-	cryptodev->device = &pci_dev->device;
-
-	/* init user callbacks */
-	TAILQ_INIT(&(cryptodev->link_intr_cbs));
-
-	/* Invoke PMD device initialization function */
-	RTE_FUNC_PTR_OR_ERR_RET(*dev_init, -EINVAL);
-	retval = dev_init(cryptodev);
-	if (retval == 0)
-		return 0;
-
-	CDEV_LOG_ERR("driver %s: crypto_dev_init(vendor_id=0x%x device_id=0x%x)"
-			" failed", pci_dev->device.driver->name,
-			(unsigned int) pci_dev->id.vendor_id,
-			(unsigned int) pci_dev->id.device_id);
-
-	if (rte_eal_process_type() == RTE_PROC_PRIMARY)
-		rte_free(cryptodev->data->dev_private);
-
-	/* free crypto device */
-	rte_cryptodev_pmd_release_device(cryptodev);
-
-	return -ENXIO;
-}
-
-int
-rte_cryptodev_pci_generic_remove(struct rte_pci_device *pci_dev,
-		cryptodev_pci_uninit_t dev_uninit)
-{
-	struct rte_cryptodev *cryptodev;
-	char cryptodev_name[RTE_CRYPTODEV_NAME_MAX_LEN];
-	int ret;
-
-	if (pci_dev == NULL)
-		return -EINVAL;
-
-	rte_pci_device_name(&pci_dev->addr, cryptodev_name,
-			sizeof(cryptodev_name));
-
-	cryptodev = rte_cryptodev_pmd_get_named_dev(cryptodev_name);
-	if (cryptodev == NULL)
-		return -ENODEV;
-
-	/* Invoke PMD device uninit function */
-	if (dev_uninit) {
-		ret = dev_uninit(cryptodev);
-		if (ret)
-			return ret;
-	}
-
-	/* free crypto device */
-	rte_cryptodev_pmd_release_device(cryptodev);
-
-	if (rte_eal_process_type() == RTE_PROC_PRIMARY)
-		rte_free(cryptodev->data->dev_private);
-
-	cryptodev->device = NULL;
-	cryptodev->data = NULL;
-
-	return 0;
-}
diff --git a/lib/librte_cryptodev/rte_cryptodev_version.map b/lib/librte_cryptodev/rte_cryptodev_version.map
index d3e4515..4355166 100644
--- a/lib/librte_cryptodev/rte_cryptodev_version.map
+++ b/lib/librte_cryptodev/rte_cryptodev_version.map
@@ -68,8 +68,6 @@ DPDK_17.08 {
 	rte_cryptodev_get_aead_algo_enum;
 	rte_cryptodev_get_header_session_size;
 	rte_cryptodev_get_private_session_size;
-	rte_cryptodev_pci_generic_probe;
-	rte_cryptodev_pci_generic_remove;
 	rte_cryptodev_sym_capability_check_aead;
 	rte_cryptodev_sym_session_init;
 	rte_cryptodev_sym_session_clear;
-- 
2.9.4

^ permalink raw reply	[relevance 3%]

* [dpdk-dev] [PATCH v2 2/3] cryptodev: break dependency on virtual device bus
    2017-10-25 12:00  3%   ` [dpdk-dev] [PATCH v2 1/3] cryptodev: add new APIs to assist PMD initialisation Declan Doherty
@ 2017-10-25 12:00  1%   ` Declan Doherty
  2017-10-25 12:00  3%   ` [dpdk-dev] [PATCH v2 3/3] cryptodev: break dependency on PCI " Declan Doherty
  2 siblings, 0 replies; 200+ results
From: Declan Doherty @ 2017-10-25 12:00 UTC (permalink / raw)
  To: dev; +Cc: Declan Doherty

Removes any dependency of librte_cryptodev on the virtual device
infrastructure code and removes the functions which were virtual
device specific.

Updates all virtual PMDs to remove dependencies on rte_cryptodev_vdev.h
and replaces those calls with the new bus independent functions.

Signed-off-by: Declan Doherty <declan.doherty@intel.com>
---
 doc/guides/rel_notes/deprecation.rst           |   5 --
 doc/guides/rel_notes/release_17_11.rst         |   7 ++
 drivers/crypto/aesni_gcm/aesni_gcm_pmd.c       |  56 ++++--------
 drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c     |  73 +++++++--------
 drivers/crypto/armv8/rte_armv8_pmd.c           |  41 +++------
 drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c    |  11 +--
 drivers/crypto/dpaa_sec/dpaa_sec.c             |  14 +--
 drivers/crypto/kasumi/rte_kasumi_pmd.c         |  49 ++++------
 drivers/crypto/mrvl/rte_mrvl_pmd.c             |  56 ++++--------
 drivers/crypto/null/null_crypto_pmd.c          |  72 ++++++---------
 drivers/crypto/openssl/rte_openssl_pmd.c       |  42 +++------
 drivers/crypto/scheduler/scheduler_pmd.c       |  45 +++-------
 drivers/crypto/scheduler/scheduler_pmd_ops.c   |   3 +-
 drivers/crypto/snow3g/rte_snow3g_pmd.c         |  41 +++------
 drivers/crypto/zuc/rte_zuc_pmd.c               |  41 +++------
 lib/librte_cryptodev/Makefile                  |   1 -
 lib/librte_cryptodev/rte_cryptodev_pmd.c       | 120 -------------------------
 lib/librte_cryptodev/rte_cryptodev_vdev.h      | 100 ---------------------
 lib/librte_cryptodev/rte_cryptodev_version.map |   2 -
 19 files changed, 190 insertions(+), 589 deletions(-)
 delete mode 100644 lib/librte_cryptodev/rte_cryptodev_vdev.h

diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst
index 0d99251..ffd5e24 100644
--- a/doc/guides/rel_notes/deprecation.rst
+++ b/doc/guides/rel_notes/deprecation.rst
@@ -71,11 +71,6 @@ Deprecation Notices
 
   - ``rte_cryptodev_create_vdev``
 
-* cryptodev: the following function will be static in 17.11 and included
-  by all crypto drivers, therefore, will not be public:
-
-  - ``rte_cryptodev_vdev_pmd_init``
-
 * librte_meter: The API will change to accommodate configuration profiles.
   Most of the API functions will have an additional opaque parameter.
 
diff --git a/doc/guides/rel_notes/release_17_11.rst b/doc/guides/rel_notes/release_17_11.rst
index 0a90db4..7755768 100644
--- a/doc/guides/rel_notes/release_17_11.rst
+++ b/doc/guides/rel_notes/release_17_11.rst
@@ -298,6 +298,13 @@ API Changes
   are bus independent for driver to manage creation and destruction of new
   device instances.
 
+* **Removed virtual device bus specific functions from librte_cryptodev.**
+
+  The functions ``rte_cryptodev_vdev_parse_init_params()`` and
+  ``rte_cryptodev_vdev_pmd_init()`` have been removed from librte_cryptodev
+  and have been replaced by non bus specific functions
+  ``rte_cryptodev_pmd_parse_input_args()`` and ``rte_cryptodev_pmd_create()``.
+
 ABI Changes
 -----------
 
diff --git a/drivers/crypto/aesni_gcm/aesni_gcm_pmd.c b/drivers/crypto/aesni_gcm/aesni_gcm_pmd.c
index 29c14e5..1d18217 100644
--- a/drivers/crypto/aesni_gcm/aesni_gcm_pmd.c
+++ b/drivers/crypto/aesni_gcm/aesni_gcm_pmd.c
@@ -35,7 +35,6 @@
 #include <rte_hexdump.h>
 #include <rte_cryptodev.h>
 #include <rte_cryptodev_pmd.h>
-#include <rte_cryptodev_vdev.h>
 #include <rte_vdev.h>
 #include <rte_malloc.h>
 #include <rte_cpuflags.h>
@@ -486,22 +485,24 @@ static int aesni_gcm_remove(struct rte_vdev_device *vdev);
 static int
 aesni_gcm_create(const char *name,
 		struct rte_vdev_device *vdev,
-		struct rte_crypto_vdev_init_params *init_params)
+		struct rte_cryptodev_pmd_init_params *init_params)
 {
 	struct rte_cryptodev *dev;
 	struct aesni_gcm_private *internals;
 	enum aesni_gcm_vector_mode vector_mode;
 
-	if (init_params->name[0] == '\0')
-		snprintf(init_params->name, sizeof(init_params->name),
-				"%s", name);
-
 	/* Check CPU for support for AES instruction set */
 	if (!rte_cpu_get_flag_enabled(RTE_CPUFLAG_AES)) {
 		GCM_LOG_ERR("AES instructions not supported by CPU");
 		return -EFAULT;
 	}
 
+	dev = rte_cryptodev_pmd_create(name, &vdev->device, init_params);
+	if (dev == NULL) {
+		GCM_LOG_ERR("driver %s: create failed", init_params->name);
+		return -ENODEV;
+	}
+
 	/* Check CPU for supported vector instruction set */
 	if (rte_cpu_get_flag_enabled(RTE_CPUFLAG_AVX2))
 		vector_mode = RTE_AESNI_GCM_AVX2;
@@ -510,14 +511,6 @@ aesni_gcm_create(const char *name,
 	else
 		vector_mode = RTE_AESNI_GCM_SSE;
 
-	dev = rte_cryptodev_vdev_pmd_init(init_params->name,
-			sizeof(struct aesni_gcm_private), init_params->socket_id,
-			vdev);
-	if (dev == NULL) {
-		GCM_LOG_ERR("failed to create cryptodev vdev");
-		goto init_error;
-	}
-
 	dev->driver_id = cryptodev_driver_id;
 	dev->dev_ops = rte_aesni_gcm_pmd_ops;
 
@@ -552,22 +545,17 @@ aesni_gcm_create(const char *name,
 	internals->max_nb_sessions = init_params->max_nb_sessions;
 
 	return 0;
-
-init_error:
-	GCM_LOG_ERR("driver %s: create failed", init_params->name);
-
-	aesni_gcm_remove(vdev);
-	return -EFAULT;
 }
 
 static int
 aesni_gcm_probe(struct rte_vdev_device *vdev)
 {
-	struct rte_crypto_vdev_init_params init_params = {
-		RTE_CRYPTODEV_VDEV_DEFAULT_MAX_NB_QUEUE_PAIRS,
-		RTE_CRYPTODEV_VDEV_DEFAULT_MAX_NB_SESSIONS,
+	struct rte_cryptodev_pmd_init_params init_params = {
+		"",
+		sizeof(struct aesni_gcm_private),
 		rte_socket_id(),
-		{0}
+		RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_QUEUE_PAIRS,
+		RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_SESSIONS
 	};
 	const char *name;
 	const char *input_args;
@@ -576,17 +564,7 @@ aesni_gcm_probe(struct rte_vdev_device *vdev)
 	if (name == NULL)
 		return -EINVAL;
 	input_args = rte_vdev_device_args(vdev);
-	rte_cryptodev_vdev_parse_init_params(&init_params, input_args);
-
-	RTE_LOG(INFO, PMD, "Initialising %s on NUMA node %d\n", name,
-			init_params.socket_id);
-	if (init_params.name[0] != '\0')
-		RTE_LOG(INFO, PMD, "  User defined name = %s\n",
-			init_params.name);
-	RTE_LOG(INFO, PMD, "  Max number of queue pairs = %d\n",
-			init_params.max_nb_queue_pairs);
-	RTE_LOG(INFO, PMD, "  Max number of sessions = %d\n",
-			init_params.max_nb_sessions);
+	rte_cryptodev_pmd_parse_input_args(&init_params, input_args);
 
 	return aesni_gcm_create(name, vdev, &init_params);
 }
@@ -594,16 +572,18 @@ aesni_gcm_probe(struct rte_vdev_device *vdev)
 static int
 aesni_gcm_remove(struct rte_vdev_device *vdev)
 {
+	struct rte_cryptodev *cryptodev;
 	const char *name;
 
 	name = rte_vdev_device_name(vdev);
 	if (name == NULL)
 		return -EINVAL;
 
-	GCM_LOG_INFO("Closing AESNI crypto device %s on numa socket %u\n",
-			name, rte_socket_id());
+	cryptodev = rte_cryptodev_pmd_get_named_dev(name);
+	if (cryptodev == NULL)
+		return -ENODEV;
 
-	return 0;
+	return rte_cryptodev_pmd_destroy(cryptodev);
 }
 
 static struct rte_vdev_driver aesni_gcm_pmd_drv = {
diff --git a/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c b/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c
index 49242fc..a589557 100644
--- a/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c
+++ b/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c
@@ -36,7 +36,6 @@
 #include <rte_hexdump.h>
 #include <rte_cryptodev.h>
 #include <rte_cryptodev_pmd.h>
-#include <rte_cryptodev_vdev.h>
 #include <rte_vdev.h>
 #include <rte_malloc.h>
 #include <rte_cpuflags.h>
@@ -715,15 +714,23 @@ static int cryptodev_aesni_mb_remove(struct rte_vdev_device *vdev);
 static int
 cryptodev_aesni_mb_create(const char *name,
 			struct rte_vdev_device *vdev,
-			struct rte_crypto_vdev_init_params *init_params)
+			struct rte_cryptodev_pmd_init_params *init_params)
 {
 	struct rte_cryptodev *dev;
 	struct aesni_mb_private *internals;
 	enum aesni_mb_vector_mode vector_mode;
 
-	if (init_params->name[0] == '\0')
-		snprintf(init_params->name, sizeof(init_params->name),
-				"%s", name);
+	/* Check CPU for support for AES instruction set */
+	if (!rte_cpu_get_flag_enabled(RTE_CPUFLAG_AES)) {
+		MB_LOG_ERR("AES instructions not supported by CPU");
+		return -EFAULT;
+	}
+
+	dev = rte_cryptodev_pmd_create(name, &vdev->device, init_params);
+	if (dev == NULL) {
+		MB_LOG_ERR("failed to create cryptodev vdev");
+		return -ENODEV;
+	}
 
 	/* Check CPU for supported vector instruction set */
 	if (rte_cpu_get_flag_enabled(RTE_CPUFLAG_AVX512F))
@@ -735,14 +742,6 @@ cryptodev_aesni_mb_create(const char *name,
 	else
 		vector_mode = RTE_AESNI_MB_SSE;
 
-	dev = rte_cryptodev_vdev_pmd_init(init_params->name,
-			sizeof(struct aesni_mb_private), init_params->socket_id,
-			vdev);
-	if (dev == NULL) {
-		MB_LOG_ERR("failed to create cryptodev vdev");
-		goto init_error;
-	}
-
 	dev->driver_id = cryptodev_driver_id;
 	dev->dev_ops = rte_aesni_mb_pmd_ops;
 
@@ -779,41 +778,33 @@ cryptodev_aesni_mb_create(const char *name,
 	internals->max_nb_sessions = init_params->max_nb_sessions;
 
 	return 0;
-init_error:
-	MB_LOG_ERR("driver %s: cryptodev_aesni_create failed",
-			init_params->name);
-
-	cryptodev_aesni_mb_remove(vdev);
-	return -EFAULT;
 }
 
 static int
 cryptodev_aesni_mb_probe(struct rte_vdev_device *vdev)
 {
-	struct rte_crypto_vdev_init_params init_params = {
-		RTE_CRYPTODEV_VDEV_DEFAULT_MAX_NB_QUEUE_PAIRS,
-		RTE_CRYPTODEV_VDEV_DEFAULT_MAX_NB_SESSIONS,
+	struct rte_cryptodev_pmd_init_params init_params = {
+		"",
+		sizeof(struct aesni_mb_private),
 		rte_socket_id(),
-		""
+		RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_QUEUE_PAIRS,
+		RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_SESSIONS
 	};
-	const char *name;
-	const char *input_args;
+	const char *name, *args;
+	int retval;
 
 	name = rte_vdev_device_name(vdev);
 	if (name == NULL)
 		return -EINVAL;
-	input_args = rte_vdev_device_args(vdev);
-	rte_cryptodev_vdev_parse_init_params(&init_params, input_args);
-
-	RTE_LOG(INFO, PMD, "Initialising %s on NUMA node %d\n", name,
-			init_params.socket_id);
-	if (init_params.name[0] != '\0')
-		RTE_LOG(INFO, PMD, "  User defined name = %s\n",
-			init_params.name);
-	RTE_LOG(INFO, PMD, "  Max number of queue pairs = %d\n",
-			init_params.max_nb_queue_pairs);
-	RTE_LOG(INFO, PMD, "  Max number of sessions = %d\n",
-			init_params.max_nb_sessions);
+
+	args = rte_vdev_device_args(vdev);
+
+	retval = rte_cryptodev_pmd_parse_input_args(&init_params, args);
+	if (retval) {
+		MB_LOG_ERR("Failed to parse initialisation arguments[%s]\n",
+				args);
+		return -EINVAL;
+	}
 
 	return cryptodev_aesni_mb_create(name, vdev, &init_params);
 }
@@ -821,16 +812,18 @@ cryptodev_aesni_mb_probe(struct rte_vdev_device *vdev)
 static int
 cryptodev_aesni_mb_remove(struct rte_vdev_device *vdev)
 {
+	struct rte_cryptodev *cryptodev;
 	const char *name;
 
 	name = rte_vdev_device_name(vdev);
 	if (name == NULL)
 		return -EINVAL;
 
-	RTE_LOG(INFO, PMD, "Closing AESNI crypto device %s on numa socket %u\n",
-			name, rte_socket_id());
+	cryptodev = rte_cryptodev_pmd_get_named_dev(name);
+	if (cryptodev == NULL)
+		return -ENODEV;
 
-	return 0;
+	return rte_cryptodev_pmd_destroy(cryptodev);
 }
 
 static struct rte_vdev_driver cryptodev_aesni_mb_pmd_drv = {
diff --git a/drivers/crypto/armv8/rte_armv8_pmd.c b/drivers/crypto/armv8/rte_armv8_pmd.c
index dbe6bee..2d2f3ff 100644
--- a/drivers/crypto/armv8/rte_armv8_pmd.c
+++ b/drivers/crypto/armv8/rte_armv8_pmd.c
@@ -36,7 +36,6 @@
 #include <rte_hexdump.h>
 #include <rte_cryptodev.h>
 #include <rte_cryptodev_pmd.h>
-#include <rte_cryptodev_vdev.h>
 #include <rte_vdev.h>
 #include <rte_malloc.h>
 #include <rte_cpuflags.h>
@@ -759,7 +758,7 @@ armv8_crypto_pmd_dequeue_burst(void *queue_pair, struct rte_crypto_op **ops,
 static int
 cryptodev_armv8_crypto_create(const char *name,
 			struct rte_vdev_device *vdev,
-			struct rte_crypto_vdev_init_params *init_params)
+			struct rte_cryptodev_pmd_init_params *init_params)
 {
 	struct rte_cryptodev *dev;
 	struct armv8_crypto_private *internals;
@@ -786,14 +785,7 @@ cryptodev_armv8_crypto_create(const char *name,
 		return -EFAULT;
 	}
 
-	if (init_params->name[0] == '\0')
-		snprintf(init_params->name, sizeof(init_params->name),
-				"%s", name);
-
-	dev = rte_cryptodev_vdev_pmd_init(init_params->name,
-				sizeof(struct armv8_crypto_private),
-				init_params->socket_id,
-				vdev);
+	dev = rte_cryptodev_pmd_create(name, &vdev->device, init_params);
 	if (dev == NULL) {
 		ARMV8_CRYPTO_LOG_ERR("failed to create cryptodev vdev");
 		goto init_error;
@@ -832,11 +824,12 @@ cryptodev_armv8_crypto_create(const char *name,
 static int
 cryptodev_armv8_crypto_init(struct rte_vdev_device *vdev)
 {
-	struct rte_crypto_vdev_init_params init_params = {
-		RTE_CRYPTODEV_VDEV_DEFAULT_MAX_NB_QUEUE_PAIRS,
-		RTE_CRYPTODEV_VDEV_DEFAULT_MAX_NB_SESSIONS,
+	struct rte_cryptodev_pmd_init_params init_params = {
+		"",
+		sizeof(struct armv8_crypto_private),
 		rte_socket_id(),
-		{0}
+		RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_QUEUE_PAIRS,
+		RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_SESSIONS
 	};
 	const char *name;
 	const char *input_args;
@@ -845,18 +838,7 @@ cryptodev_armv8_crypto_init(struct rte_vdev_device *vdev)
 	if (name == NULL)
 		return -EINVAL;
 	input_args = rte_vdev_device_args(vdev);
-	rte_cryptodev_vdev_parse_init_params(&init_params, input_args);
-
-	RTE_LOG(INFO, PMD, "Initialising %s on NUMA node %d\n", name,
-			init_params.socket_id);
-	if (init_params.name[0] != '\0') {
-		RTE_LOG(INFO, PMD, "  User defined name = %s\n",
-			init_params.name);
-	}
-	RTE_LOG(INFO, PMD, "  Max number of queue pairs = %d\n",
-			init_params.max_nb_queue_pairs);
-	RTE_LOG(INFO, PMD, "  Max number of sessions = %d\n",
-			init_params.max_nb_sessions);
+	rte_cryptodev_pmd_parse_input_args(&init_params, input_args);
 
 	return cryptodev_armv8_crypto_create(name, vdev, &init_params);
 }
@@ -865,6 +847,7 @@ cryptodev_armv8_crypto_init(struct rte_vdev_device *vdev)
 static int
 cryptodev_armv8_crypto_uninit(struct rte_vdev_device *vdev)
 {
+	struct rte_cryptodev *cryptodev;
 	const char *name;
 
 	name = rte_vdev_device_name(vdev);
@@ -875,7 +858,11 @@ cryptodev_armv8_crypto_uninit(struct rte_vdev_device *vdev)
 		"Closing ARMv8 crypto device %s on numa socket %u\n",
 		name, rte_socket_id());
 
-	return 0;
+	cryptodev = rte_cryptodev_pmd_get_named_dev(name);
+	if (cryptodev == NULL)
+		return -ENODEV;
+
+	return rte_cryptodev_pmd_destroy(cryptodev);
 }
 
 static struct rte_vdev_driver armv8_crypto_pmd_drv = {
diff --git a/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c b/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
index c67548e..dd19b9b 100644
--- a/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
+++ b/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
@@ -2016,16 +2016,7 @@ cryptodev_dpaa2_sec_remove(struct rte_dpaa2_device *dpaa2_dev)
 	if (ret)
 		return ret;
 
-	/* free crypto device */
-	rte_cryptodev_pmd_release_device(cryptodev);
-
-	if (rte_eal_process_type() == RTE_PROC_PRIMARY)
-		rte_free(cryptodev->data->dev_private);
-
-	cryptodev->device = NULL;
-	cryptodev->data = NULL;
-
-	return 0;
+	return rte_cryptodev_pmd_destroy(cryptodev);
 }
 
 static struct rte_dpaa2_driver rte_dpaa2_sec_driver = {
diff --git a/drivers/crypto/dpaa_sec/dpaa_sec.c b/drivers/crypto/dpaa_sec/dpaa_sec.c
index 26a29a4..30a2a38 100644
--- a/drivers/crypto/dpaa_sec/dpaa_sec.c
+++ b/drivers/crypto/dpaa_sec/dpaa_sec.c
@@ -1529,19 +1529,7 @@ cryptodev_dpaa_sec_remove(struct rte_dpaa_device *dpaa_dev)
 	if (ret)
 		return ret;
 
-	/* free crypto device */
-	rte_cryptodev_pmd_release_device(cryptodev);
-
-	if (rte_eal_process_type() == RTE_PROC_PRIMARY)
-		rte_free(cryptodev->data->dev_private);
-
-	PMD_INIT_LOG(INFO, "Closing dpaa crypto device %s",
-		     cryptodev->data->name);
-
-	cryptodev->device = NULL;
-	cryptodev->data = NULL;
-
-	return 0;
+	return rte_cryptodev_pmd_destroy(cryptodev);
 }
 
 static struct rte_dpaa_driver rte_dpaa_sec_driver = {
diff --git a/drivers/crypto/kasumi/rte_kasumi_pmd.c b/drivers/crypto/kasumi/rte_kasumi_pmd.c
index 7a00bd3..7c1b56b 100644
--- a/drivers/crypto/kasumi/rte_kasumi_pmd.c
+++ b/drivers/crypto/kasumi/rte_kasumi_pmd.c
@@ -35,7 +35,6 @@
 #include <rte_hexdump.h>
 #include <rte_cryptodev.h>
 #include <rte_cryptodev_pmd.h>
-#include <rte_cryptodev_vdev.h>
 #include <rte_vdev.h>
 #include <rte_malloc.h>
 #include <rte_cpuflags.h>
@@ -553,15 +552,17 @@ static int cryptodev_kasumi_remove(struct rte_vdev_device *vdev);
 static int
 cryptodev_kasumi_create(const char *name,
 			struct rte_vdev_device *vdev,
-			struct rte_crypto_vdev_init_params *init_params)
+			struct rte_cryptodev_pmd_init_params *init_params)
 {
 	struct rte_cryptodev *dev;
 	struct kasumi_private *internals;
 	uint64_t cpu_flags = 0;
 
-	if (init_params->name[0] == '\0')
-		snprintf(init_params->name, sizeof(init_params->name),
-				"%s", name);
+	dev = rte_cryptodev_pmd_create(name, &vdev->device, init_params);
+	if (dev == NULL) {
+		KASUMI_LOG_ERR("failed to create cryptodev vdev");
+		goto init_error;
+	}
 
 	/* Check CPU for supported vector instruction set */
 	if (rte_cpu_get_flag_enabled(RTE_CPUFLAG_AVX))
@@ -569,14 +570,6 @@ cryptodev_kasumi_create(const char *name,
 	else
 		cpu_flags |= RTE_CRYPTODEV_FF_CPU_SSE;
 
-	dev = rte_cryptodev_vdev_pmd_init(init_params->name,
-			sizeof(struct kasumi_private), init_params->socket_id,
-			vdev);
-	if (dev == NULL) {
-		KASUMI_LOG_ERR("failed to create cryptodev vdev");
-		goto init_error;
-	}
-
 	dev->driver_id = cryptodev_driver_id;
 	dev->dev_ops = rte_kasumi_pmd_ops;
 
@@ -605,11 +598,12 @@ cryptodev_kasumi_create(const char *name,
 static int
 cryptodev_kasumi_probe(struct rte_vdev_device *vdev)
 {
-	struct rte_crypto_vdev_init_params init_params = {
-		RTE_CRYPTODEV_VDEV_DEFAULT_MAX_NB_QUEUE_PAIRS,
-		RTE_CRYPTODEV_VDEV_DEFAULT_MAX_NB_SESSIONS,
+	struct rte_cryptodev_pmd_init_params init_params = {
+		"",
+		sizeof(struct kasumi_private),
 		rte_socket_id(),
-		{0}
+		RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_QUEUE_PAIRS,
+		RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_SESSIONS
 	};
 	const char *name;
 	const char *input_args;
@@ -619,17 +613,7 @@ cryptodev_kasumi_probe(struct rte_vdev_device *vdev)
 		return -EINVAL;
 	input_args = rte_vdev_device_args(vdev);
 
-	rte_cryptodev_vdev_parse_init_params(&init_params, input_args);
-
-	RTE_LOG(INFO, PMD, "Initialising %s on NUMA node %d\n", name,
-			init_params.socket_id);
-	if (init_params.name[0] != '\0')
-		RTE_LOG(INFO, PMD, "  User defined name = %s\n",
-			init_params.name);
-	RTE_LOG(INFO, PMD, "  Max number of queue pairs = %d\n",
-			init_params.max_nb_queue_pairs);
-	RTE_LOG(INFO, PMD, "  Max number of sessions = %d\n",
-			init_params.max_nb_sessions);
+	rte_cryptodev_pmd_parse_input_args(&init_params, input_args);
 
 	return cryptodev_kasumi_create(name, vdev, &init_params);
 }
@@ -637,17 +621,18 @@ cryptodev_kasumi_probe(struct rte_vdev_device *vdev)
 static int
 cryptodev_kasumi_remove(struct rte_vdev_device *vdev)
 {
+	struct rte_cryptodev *cryptodev;
 	const char *name;
 
 	name = rte_vdev_device_name(vdev);
 	if (name == NULL)
 		return -EINVAL;
 
-	RTE_LOG(INFO, PMD, "Closing KASUMI crypto device %s"
-			" on numa socket %u\n",
-			name, rte_socket_id());
+	cryptodev = rte_cryptodev_pmd_get_named_dev(name);
+	if (cryptodev == NULL)
+		return -ENODEV;
 
-	return 0;
+	return rte_cryptodev_pmd_destroy(cryptodev);
 }
 
 static struct rte_vdev_driver cryptodev_kasumi_pmd_drv = {
diff --git a/drivers/crypto/mrvl/rte_mrvl_pmd.c b/drivers/crypto/mrvl/rte_mrvl_pmd.c
index 6a9c8da..63895c5 100644
--- a/drivers/crypto/mrvl/rte_mrvl_pmd.c
+++ b/drivers/crypto/mrvl/rte_mrvl_pmd.c
@@ -36,7 +36,6 @@
 #include <rte_hexdump.h>
 #include <rte_cryptodev.h>
 #include <rte_cryptodev_pmd.h>
-#include <rte_cryptodev_vdev.h>
 #include <rte_vdev.h>
 #include <rte_malloc.h>
 #include <rte_cpuflags.h>
@@ -720,26 +719,14 @@ mrvl_crypto_pmd_dequeue_burst(void *queue_pair,
 static int
 cryptodev_mrvl_crypto_create(const char *name,
 		struct rte_vdev_device *vdev,
-		struct rte_crypto_vdev_init_params *init_params)
+		struct rte_cryptodev_pmd_init_params *init_params)
 {
 	struct rte_cryptodev *dev;
 	struct mrvl_crypto_private *internals;
 	struct sam_init_params	sam_params;
 	int ret;
 
-	if (init_params->name[0] == '\0') {
-		ret = rte_cryptodev_pmd_create_dev_name(
-				init_params->name, name);
-
-		if (ret < 0) {
-			MRVL_CRYPTO_LOG_ERR("failed to create unique name");
-			return ret;
-		}
-	}
-
-	dev = rte_cryptodev_vdev_pmd_init(init_params->name,
-				sizeof(struct mrvl_crypto_private),
-				init_params->socket_id, vdev);
+	dev = rte_cryptodev_pmd_create(name, &vdev->device, init_params);
 	if (dev == NULL) {
 		MRVL_CRYPTO_LOG_ERR("failed to create cryptodev vdev");
 		goto init_error;
@@ -796,40 +783,28 @@ cryptodev_mrvl_crypto_create(const char *name,
 static int
 cryptodev_mrvl_crypto_init(struct rte_vdev_device *vdev)
 {
-	struct rte_crypto_vdev_init_params init_params = { };
-	const char *name;
-	const char *input_args;
+	struct rte_cryptodev_pmd_init_params init_params = { };
+	const char *name, *args;
 	int ret;
 
 	name = rte_vdev_device_name(vdev);
 	if (name == NULL)
 		return -EINVAL;
-	input_args = rte_vdev_device_args(vdev);
-
-	if (!input_args)
-		return -EINVAL;
+	args = rte_vdev_device_args(vdev);
 
+	init_params.private_data_size = sizeof(struct mrvl_crypto_private);
 	init_params.max_nb_queue_pairs = sam_get_num_inst() * SAM_HW_RING_NUM;
 	init_params.max_nb_sessions =
-		RTE_CRYPTODEV_VDEV_DEFAULT_MAX_NB_SESSIONS;
+		RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_SESSIONS;
 	init_params.socket_id = rte_socket_id();
 
-	ret = rte_cryptodev_vdev_parse_init_params(&init_params, input_args);
+	ret = rte_cryptodev_pmd_parse_input_args(&init_params, args);
 	if (ret) {
-		RTE_LOG(ERR, PMD, "Failed to parse input arguments\n");
-		return ret;
-	}
-
-	RTE_LOG(INFO, PMD, "Initialising %s on NUMA node %d\n", name,
-			init_params.socket_id);
-	if (init_params.name[0] != '\0') {
-		RTE_LOG(INFO, PMD, "  User defined name = %s\n",
-			init_params.name);
+		RTE_LOG(ERR, PMD,
+			"Failed to parse initialisation arguments[%s]\n",
+			args);
+		return -EINVAL;
 	}
-	RTE_LOG(INFO, PMD, "  Max number of queue pairs = %d\n",
-			init_params.max_nb_queue_pairs);
-	RTE_LOG(INFO, PMD, "  Max number of sessions = %d\n",
-			init_params.max_nb_sessions);
 
 	return cryptodev_mrvl_crypto_create(name, vdev, &init_params);
 }
@@ -843,6 +818,7 @@ cryptodev_mrvl_crypto_init(struct rte_vdev_device *vdev)
 static int
 cryptodev_mrvl_crypto_uninit(struct rte_vdev_device *vdev)
 {
+	struct rte_cryptodev *cryptodev;
 	const char *name = rte_vdev_device_name(vdev);
 
 	if (name == NULL)
@@ -854,7 +830,11 @@ cryptodev_mrvl_crypto_uninit(struct rte_vdev_device *vdev)
 
 	sam_deinit();
 
-	return 0;
+	cryptodev = rte_cryptodev_pmd_get_named_dev(name);
+	if (cryptodev == NULL)
+		return -ENODEV;
+
+	return rte_cryptodev_pmd_destroy(cryptodev);
 }
 
 /**
diff --git a/drivers/crypto/null/null_crypto_pmd.c b/drivers/crypto/null/null_crypto_pmd.c
index d5d2bb3..4b9a58a 100644
--- a/drivers/crypto/null/null_crypto_pmd.c
+++ b/drivers/crypto/null/null_crypto_pmd.c
@@ -33,7 +33,6 @@
 #include <rte_common.h>
 #include <rte_config.h>
 #include <rte_cryptodev_pmd.h>
-#include <rte_cryptodev_vdev.h>
 #include <rte_vdev.h>
 #include <rte_malloc.h>
 
@@ -183,28 +182,19 @@ null_crypto_pmd_dequeue_burst(void *queue_pair, struct rte_crypto_op **ops,
 	return nb_dequeued;
 }
 
-static int cryptodev_null_remove(const char *name);
-
 /** Create crypto device */
 static int
 cryptodev_null_create(const char *name,
 		struct rte_vdev_device *vdev,
-		struct rte_crypto_vdev_init_params *init_params)
+		struct rte_cryptodev_pmd_init_params *init_params)
 {
 	struct rte_cryptodev *dev;
 	struct null_crypto_private *internals;
 
-	if (init_params->name[0] == '\0')
-		snprintf(init_params->name, sizeof(init_params->name),
-				"%s", name);
-
-	dev = rte_cryptodev_vdev_pmd_init(init_params->name,
-			sizeof(struct null_crypto_private),
-			init_params->socket_id,
-			vdev);
+	dev = rte_cryptodev_pmd_create(name, &vdev->device, init_params);
 	if (dev == NULL) {
 		NULL_CRYPTO_LOG_ERR("failed to create cryptodev vdev");
-		goto init_error;
+		return -EFAULT;
 	}
 
 	dev->driver_id = cryptodev_driver_id;
@@ -224,61 +214,53 @@ cryptodev_null_create(const char *name,
 	internals->max_nb_sessions = init_params->max_nb_sessions;
 
 	return 0;
-
-init_error:
-	NULL_CRYPTO_LOG_ERR("driver %s: cryptodev_null_create failed",
-			init_params->name);
-	cryptodev_null_remove(init_params->name);
-
-	return -EFAULT;
 }
 
 /** Initialise null crypto device */
 static int
 cryptodev_null_probe(struct rte_vdev_device *dev)
 {
-	struct rte_crypto_vdev_init_params init_params = {
-		RTE_CRYPTODEV_VDEV_DEFAULT_MAX_NB_QUEUE_PAIRS,
-		RTE_CRYPTODEV_VDEV_DEFAULT_MAX_NB_SESSIONS,
+	struct rte_cryptodev_pmd_init_params init_params = {
+		"",
+		sizeof(struct null_crypto_private),
 		rte_socket_id(),
-		{0}
+		RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_QUEUE_PAIRS,
+		RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_SESSIONS
 	};
-	const char *name;
+	const char *name, *args;
+	int retval;
 
 	name = rte_vdev_device_name(dev);
 	if (name == NULL)
 		return -EINVAL;
 
-	RTE_LOG(INFO, PMD, "Initialising %s on NUMA node %d\n",
-		name, init_params.socket_id);
-	if (init_params.name[0] != '\0')
-		RTE_LOG(INFO, PMD, "  User defined name = %s\n",
-			init_params.name);
-	RTE_LOG(INFO, PMD, "  Max number of queue pairs = %d\n",
-			init_params.max_nb_queue_pairs);
-	RTE_LOG(INFO, PMD, "  Max number of sessions = %d\n",
-			init_params.max_nb_sessions);
+	args = rte_vdev_device_args(dev);
+
+	retval = rte_cryptodev_pmd_parse_input_args(&init_params, args);
+	if (retval) {
+		RTE_LOG(ERR, PMD,
+			"Failed to parse initialisation arguments[%s]\n", args);
+		return -EINVAL;
+	}
 
 	return cryptodev_null_create(name, dev, &init_params);
 }
 
-/** Uninitialise null crypto device */
 static int
-cryptodev_null_remove(const char *name)
+cryptodev_null_remove_dev(struct rte_vdev_device *vdev)
 {
+	struct rte_cryptodev *cryptodev;
+	const char *name;
+
+	name = rte_vdev_device_name(vdev);
 	if (name == NULL)
 		return -EINVAL;
 
-	RTE_LOG(INFO, PMD, "Closing null crypto device %s on numa socket %u\n",
-			name, rte_socket_id());
+	cryptodev = rte_cryptodev_pmd_get_named_dev(name);
+	if (cryptodev == NULL)
+		return -ENODEV;
 
-	return 0;
-}
-
-static int
-cryptodev_null_remove_dev(struct rte_vdev_device *dev)
-{
-	return cryptodev_null_remove(rte_vdev_device_name(dev));
+	return rte_cryptodev_pmd_destroy(cryptodev);
 }
 
 static struct rte_vdev_driver cryptodev_null_pmd_drv = {
diff --git a/drivers/crypto/openssl/rte_openssl_pmd.c b/drivers/crypto/openssl/rte_openssl_pmd.c
index 95c0236..25c1154 100644
--- a/drivers/crypto/openssl/rte_openssl_pmd.c
+++ b/drivers/crypto/openssl/rte_openssl_pmd.c
@@ -34,7 +34,6 @@
 #include <rte_hexdump.h>
 #include <rte_cryptodev.h>
 #include <rte_cryptodev_pmd.h>
-#include <rte_cryptodev_vdev.h>
 #include <rte_vdev.h>
 #include <rte_malloc.h>
 #include <rte_cpuflags.h>
@@ -1668,19 +1667,12 @@ openssl_pmd_dequeue_burst(void *queue_pair, struct rte_crypto_op **ops,
 static int
 cryptodev_openssl_create(const char *name,
 			struct rte_vdev_device *vdev,
-			struct rte_crypto_vdev_init_params *init_params)
+			struct rte_cryptodev_pmd_init_params *init_params)
 {
 	struct rte_cryptodev *dev;
 	struct openssl_private *internals;
 
-	if (init_params->name[0] == '\0')
-		snprintf(init_params->name, sizeof(init_params->name),
-				"%s", name);
-
-	dev = rte_cryptodev_vdev_pmd_init(init_params->name,
-			sizeof(struct openssl_private),
-			init_params->socket_id,
-			vdev);
+	dev = rte_cryptodev_pmd_create(name, &vdev->device, init_params);
 	if (dev == NULL) {
 		OPENSSL_LOG_ERR("failed to create cryptodev vdev");
 		goto init_error;
@@ -1718,11 +1710,12 @@ cryptodev_openssl_create(const char *name,
 static int
 cryptodev_openssl_probe(struct rte_vdev_device *vdev)
 {
-	struct rte_crypto_vdev_init_params init_params = {
-		RTE_CRYPTODEV_VDEV_DEFAULT_MAX_NB_QUEUE_PAIRS,
-		RTE_CRYPTODEV_VDEV_DEFAULT_MAX_NB_SESSIONS,
+	struct rte_cryptodev_pmd_init_params init_params = {
+		"",
+		sizeof(struct openssl_private),
 		rte_socket_id(),
-		{0}
+		RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_QUEUE_PAIRS,
+		RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_SESSIONS
 	};
 	const char *name;
 	const char *input_args;
@@ -1732,17 +1725,7 @@ cryptodev_openssl_probe(struct rte_vdev_device *vdev)
 		return -EINVAL;
 	input_args = rte_vdev_device_args(vdev);
 
-	rte_cryptodev_vdev_parse_init_params(&init_params, input_args);
-
-	RTE_LOG(INFO, PMD, "Initialising %s on NUMA node %d\n", name,
-			init_params.socket_id);
-	if (init_params.name[0] != '\0')
-		RTE_LOG(INFO, PMD, "  User defined name = %s\n",
-			init_params.name);
-	RTE_LOG(INFO, PMD, "  Max number of queue pairs = %d\n",
-			init_params.max_nb_queue_pairs);
-	RTE_LOG(INFO, PMD, "  Max number of sessions = %d\n",
-			init_params.max_nb_sessions);
+	rte_cryptodev_pmd_parse_input_args(&init_params, input_args);
 
 	return cryptodev_openssl_create(name, vdev, &init_params);
 }
@@ -1751,17 +1734,18 @@ cryptodev_openssl_probe(struct rte_vdev_device *vdev)
 static int
 cryptodev_openssl_remove(struct rte_vdev_device *vdev)
 {
+	struct rte_cryptodev *cryptodev;
 	const char *name;
 
 	name = rte_vdev_device_name(vdev);
 	if (name == NULL)
 		return -EINVAL;
 
-	RTE_LOG(INFO, PMD,
-		"Closing OPENSSL crypto device %s on numa socket %u\n",
-		name, rte_socket_id());
+	cryptodev = rte_cryptodev_pmd_get_named_dev(name);
+	if (cryptodev == NULL)
+		return -ENODEV;
 
-	return 0;
+	return rte_cryptodev_pmd_destroy(cryptodev);
 }
 
 static struct rte_vdev_driver cryptodev_openssl_pmd_drv = {
diff --git a/drivers/crypto/scheduler/scheduler_pmd.c b/drivers/crypto/scheduler/scheduler_pmd.c
index 3170f7f..40ab304 100644
--- a/drivers/crypto/scheduler/scheduler_pmd.c
+++ b/drivers/crypto/scheduler/scheduler_pmd.c
@@ -33,7 +33,6 @@
 #include <rte_hexdump.h>
 #include <rte_cryptodev.h>
 #include <rte_cryptodev_pmd.h>
-#include <rte_cryptodev_vdev.h>
 #include <rte_vdev.h>
 #include <rte_malloc.h>
 #include <rte_cpuflags.h>
@@ -45,7 +44,7 @@
 uint8_t cryptodev_driver_id;
 
 struct scheduler_init_params {
-	struct rte_crypto_vdev_init_params def_p;
+	struct rte_cryptodev_pmd_init_params def_p;
 	uint32_t nb_slaves;
 	enum rte_cryptodev_scheduler_mode mode;
 	uint32_t enable_ordering;
@@ -107,21 +106,18 @@ cryptodev_scheduler_create(const char *name,
 	uint32_t i;
 	int ret;
 
-	if (init_params->def_p.name[0] == '\0')
-		snprintf(init_params->def_p.name,
-				sizeof(init_params->def_p.name),
-				"%s", name);
-
-	dev = rte_cryptodev_vdev_pmd_init(init_params->def_p.name,
-			sizeof(struct scheduler_ctx),
-			init_params->def_p.socket_id,
-			vdev);
+	dev = rte_cryptodev_pmd_create(name, &vdev->device,
+			&init_params->def_p);
 	if (dev == NULL) {
 		CS_LOG_ERR("driver %s: failed to create cryptodev vdev",
 			name);
 		return -EFAULT;
 	}
 
+	if (init_params->wcmask != 0)
+		RTE_LOG(INFO, PMD, "  workers core mask = %"PRIx64"\n",
+			init_params->wcmask);
+
 	dev->driver_id = cryptodev_driver_id;
 	dev->dev_ops = rte_crypto_scheduler_pmd_ops;
 
@@ -240,10 +236,7 @@ cryptodev_scheduler_remove(struct rte_vdev_device *vdev)
 					sched_ctx->slaves[i].dev_id);
 	}
 
-	RTE_LOG(INFO, PMD, "Closing Crypto Scheduler device %s on numa "
-		"socket %u\n", name, rte_socket_id());
-
-	return 0;
+	return rte_cryptodev_pmd_destroy(dev);
 }
 
 /** Parse integer from integer argument */
@@ -304,7 +297,7 @@ static int
 parse_name_arg(const char *key __rte_unused,
 		const char *value, void *extra_args)
 {
-	struct rte_crypto_vdev_init_params *params = extra_args;
+	struct rte_cryptodev_pmd_init_params *params = extra_args;
 
 	if (strlen(value) >= RTE_CRYPTODEV_NAME_MAX_LEN - 1) {
 		CS_LOG_ERR("Invalid name %s, should be less than "
@@ -462,10 +455,11 @@ cryptodev_scheduler_probe(struct rte_vdev_device *vdev)
 {
 	struct scheduler_init_params init_params = {
 		.def_p = {
-			RTE_CRYPTODEV_VDEV_DEFAULT_MAX_NB_QUEUE_PAIRS,
-			RTE_CRYPTODEV_VDEV_DEFAULT_MAX_NB_SESSIONS,
+			"",
+			sizeof(struct scheduler_ctx),
 			rte_socket_id(),
-			""
+			RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_QUEUE_PAIRS,
+			RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_SESSIONS
 		},
 		.nb_slaves = 0,
 		.mode = CDEV_SCHED_MODE_NOT_SET,
@@ -481,19 +475,6 @@ cryptodev_scheduler_probe(struct rte_vdev_device *vdev)
 	scheduler_parse_init_params(&init_params,
 				    rte_vdev_device_args(vdev));
 
-	RTE_LOG(INFO, PMD, "Initialising %s on NUMA node %d\n",
-			name,
-			init_params.def_p.socket_id);
-	RTE_LOG(INFO, PMD, "  Max number of queue pairs = %d\n",
-			init_params.def_p.max_nb_queue_pairs);
-	RTE_LOG(INFO, PMD, "  Max number of sessions = %d\n",
-			init_params.def_p.max_nb_sessions);
-	if (init_params.def_p.name[0] != '\0')
-		RTE_LOG(INFO, PMD, "  User defined name = %s\n",
-			init_params.def_p.name);
-	if (init_params.wcmask != 0)
-		RTE_LOG(INFO, PMD, "  workers core mask = %"PRIx64"\n",
-			init_params.wcmask);
 
 	return cryptodev_scheduler_create(name,
 					vdev,
diff --git a/drivers/crypto/scheduler/scheduler_pmd_ops.c b/drivers/crypto/scheduler/scheduler_pmd_ops.c
index d379534..fef686f 100644
--- a/drivers/crypto/scheduler/scheduler_pmd_ops.c
+++ b/drivers/crypto/scheduler/scheduler_pmd_ops.c
@@ -37,7 +37,6 @@
 #include <rte_dev.h>
 #include <rte_cryptodev.h>
 #include <rte_cryptodev_pmd.h>
-#include <rte_cryptodev_vdev.h>
 #include <rte_reorder.h>
 
 #include "scheduler_pmd_private.h"
@@ -347,7 +346,7 @@ scheduler_pmd_info_get(struct rte_cryptodev *dev,
 {
 	struct scheduler_ctx *sched_ctx = dev->data->dev_private;
 	uint32_t max_nb_sessions = sched_ctx->nb_slaves ?
-			UINT32_MAX : RTE_CRYPTODEV_VDEV_DEFAULT_MAX_NB_SESSIONS;
+			UINT32_MAX : RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_SESSIONS;
 	uint32_t i;
 
 	if (!dev_info)
diff --git a/drivers/crypto/snow3g/rte_snow3g_pmd.c b/drivers/crypto/snow3g/rte_snow3g_pmd.c
index 8e1d1ec..fe7bb86 100644
--- a/drivers/crypto/snow3g/rte_snow3g_pmd.c
+++ b/drivers/crypto/snow3g/rte_snow3g_pmd.c
@@ -35,7 +35,6 @@
 #include <rte_hexdump.h>
 #include <rte_cryptodev.h>
 #include <rte_cryptodev_pmd.h>
-#include <rte_cryptodev_vdev.h>
 #include <rte_vdev.h>
 #include <rte_malloc.h>
 #include <rte_cpuflags.h>
@@ -559,19 +558,13 @@ static int cryptodev_snow3g_remove(struct rte_vdev_device *vdev);
 static int
 cryptodev_snow3g_create(const char *name,
 			struct rte_vdev_device *vdev,
-			struct rte_crypto_vdev_init_params *init_params)
+			struct rte_cryptodev_pmd_init_params *init_params)
 {
 	struct rte_cryptodev *dev;
 	struct snow3g_private *internals;
 	uint64_t cpu_flags = RTE_CRYPTODEV_FF_CPU_SSE;
 
-	if (init_params->name[0] == '\0')
-		snprintf(init_params->name, sizeof(init_params->name),
-				"%s", name);
-
-	dev = rte_cryptodev_vdev_pmd_init(init_params->name,
-			sizeof(struct snow3g_private), init_params->socket_id,
-			vdev);
+	dev = rte_cryptodev_pmd_create(name, &vdev->device, init_params);
 	if (dev == NULL) {
 		SNOW3G_LOG_ERR("failed to create cryptodev vdev");
 		goto init_error;
@@ -605,11 +598,12 @@ cryptodev_snow3g_create(const char *name,
 static int
 cryptodev_snow3g_probe(struct rte_vdev_device *vdev)
 {
-	struct rte_crypto_vdev_init_params init_params = {
-		RTE_CRYPTODEV_VDEV_DEFAULT_MAX_NB_QUEUE_PAIRS,
-		RTE_CRYPTODEV_VDEV_DEFAULT_MAX_NB_SESSIONS,
+	struct rte_cryptodev_pmd_init_params init_params = {
+		"",
+		sizeof(struct snow3g_private),
 		rte_socket_id(),
-		{0}
+		RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_QUEUE_PAIRS,
+		RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_SESSIONS
 	};
 	const char *name;
 	const char *input_args;
@@ -619,17 +613,7 @@ cryptodev_snow3g_probe(struct rte_vdev_device *vdev)
 		return -EINVAL;
 	input_args = rte_vdev_device_args(vdev);
 
-	rte_cryptodev_vdev_parse_init_params(&init_params, input_args);
-
-	RTE_LOG(INFO, PMD, "Initialising %s on NUMA node %d\n", name,
-			init_params.socket_id);
-	if (init_params.name[0] != '\0')
-		RTE_LOG(INFO, PMD, "  User defined name = %s\n",
-			init_params.name);
-	RTE_LOG(INFO, PMD, "  Max number of queue pairs = %d\n",
-			init_params.max_nb_queue_pairs);
-	RTE_LOG(INFO, PMD, "  Max number of sessions = %d\n",
-			init_params.max_nb_sessions);
+	rte_cryptodev_pmd_parse_input_args(&init_params, input_args);
 
 	return cryptodev_snow3g_create(name, vdev, &init_params);
 }
@@ -637,17 +621,18 @@ cryptodev_snow3g_probe(struct rte_vdev_device *vdev)
 static int
 cryptodev_snow3g_remove(struct rte_vdev_device *vdev)
 {
+	struct rte_cryptodev *cryptodev;
 	const char *name;
 
 	name = rte_vdev_device_name(vdev);
 	if (name == NULL)
 		return -EINVAL;
 
-	RTE_LOG(INFO, PMD, "Closing SNOW 3G crypto device %s"
-			" on numa socket %u\n",
-			name, rte_socket_id());
+	cryptodev = rte_cryptodev_pmd_get_named_dev(name);
+	if (cryptodev == NULL)
+		return -ENODEV;
 
-	return 0;
+	return rte_cryptodev_pmd_destroy(cryptodev);
 }
 
 static struct rte_vdev_driver cryptodev_snow3g_pmd_drv = {
diff --git a/drivers/crypto/zuc/rte_zuc_pmd.c b/drivers/crypto/zuc/rte_zuc_pmd.c
index f1f9291..b99f6ec 100644
--- a/drivers/crypto/zuc/rte_zuc_pmd.c
+++ b/drivers/crypto/zuc/rte_zuc_pmd.c
@@ -35,7 +35,6 @@
 #include <rte_hexdump.h>
 #include <rte_cryptodev.h>
 #include <rte_cryptodev_pmd.h>
-#include <rte_cryptodev_vdev.h>
 #include <rte_vdev.h>
 #include <rte_malloc.h>
 #include <rte_cpuflags.h>
@@ -463,19 +462,14 @@ static int cryptodev_zuc_remove(struct rte_vdev_device *vdev);
 static int
 cryptodev_zuc_create(const char *name,
 		struct rte_vdev_device *vdev,
-		struct rte_crypto_vdev_init_params *init_params)
+		struct rte_cryptodev_pmd_init_params *init_params)
 {
 	struct rte_cryptodev *dev;
 	struct zuc_private *internals;
 	uint64_t cpu_flags = RTE_CRYPTODEV_FF_CPU_SSE;
 
-	if (init_params->name[0] == '\0')
-		snprintf(init_params->name, sizeof(init_params->name),
-				"%s", name);
 
-	dev = rte_cryptodev_vdev_pmd_init(init_params->name,
-			sizeof(struct zuc_private), init_params->socket_id,
-			vdev);
+	dev = rte_cryptodev_pmd_create(name, &vdev->device, init_params);
 	if (dev == NULL) {
 		ZUC_LOG_ERR("failed to create cryptodev vdev");
 		goto init_error;
@@ -509,11 +503,12 @@ cryptodev_zuc_create(const char *name,
 static int
 cryptodev_zuc_probe(struct rte_vdev_device *vdev)
 {
-	struct rte_crypto_vdev_init_params init_params = {
-		RTE_CRYPTODEV_VDEV_DEFAULT_MAX_NB_QUEUE_PAIRS,
-		RTE_CRYPTODEV_VDEV_DEFAULT_MAX_NB_SESSIONS,
+	struct rte_cryptodev_pmd_init_params init_params = {
+		"",
+		sizeof(struct zuc_private),
 		rte_socket_id(),
-		{0}
+		RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_QUEUE_PAIRS,
+		RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_SESSIONS
 	};
 	const char *name;
 	const char *input_args;
@@ -523,17 +518,7 @@ cryptodev_zuc_probe(struct rte_vdev_device *vdev)
 		return -EINVAL;
 	input_args = rte_vdev_device_args(vdev);
 
-	rte_cryptodev_vdev_parse_init_params(&init_params, input_args);
-
-	RTE_LOG(INFO, PMD, "Initialising %s on NUMA node %d\n", name,
-			init_params.socket_id);
-	if (init_params.name[0] != '\0')
-		RTE_LOG(INFO, PMD, "  User defined name = %s\n",
-			init_params.name);
-	RTE_LOG(INFO, PMD, "  Max number of queue pairs = %d\n",
-			init_params.max_nb_queue_pairs);
-	RTE_LOG(INFO, PMD, "  Max number of sessions = %d\n",
-			init_params.max_nb_sessions);
+	rte_cryptodev_pmd_parse_input_args(&init_params, input_args);
 
 	return cryptodev_zuc_create(name, vdev, &init_params);
 }
@@ -541,17 +526,19 @@ cryptodev_zuc_probe(struct rte_vdev_device *vdev)
 static int
 cryptodev_zuc_remove(struct rte_vdev_device *vdev)
 {
+
+	struct rte_cryptodev *cryptodev;
 	const char *name;
 
 	name = rte_vdev_device_name(vdev);
 	if (name == NULL)
 		return -EINVAL;
 
-	RTE_LOG(INFO, PMD, "Closing ZUC crypto device %s"
-			" on numa socket %u\n",
-			name, rte_socket_id());
+	cryptodev = rte_cryptodev_pmd_get_named_dev(name);
+	if (cryptodev == NULL)
+		return -ENODEV;
 
-	return 0;
+	return rte_cryptodev_pmd_destroy(cryptodev);
 }
 
 static struct rte_vdev_driver cryptodev_zuc_pmd_drv = {
diff --git a/lib/librte_cryptodev/Makefile b/lib/librte_cryptodev/Makefile
index bb58ea1..0e019ed 100644
--- a/lib/librte_cryptodev/Makefile
+++ b/lib/librte_cryptodev/Makefile
@@ -50,7 +50,6 @@ SYMLINK-y-include += rte_crypto.h
 SYMLINK-y-include += rte_crypto_sym.h
 SYMLINK-y-include += rte_cryptodev.h
 SYMLINK-y-include += rte_cryptodev_pmd.h
-SYMLINK-y-include += rte_cryptodev_vdev.h
 SYMLINK-y-include += rte_cryptodev_pci.h
 
 # versioning export map
diff --git a/lib/librte_cryptodev/rte_cryptodev_pmd.c b/lib/librte_cryptodev/rte_cryptodev_pmd.c
index ca6d459..0b5741a 100644
--- a/lib/librte_cryptodev/rte_cryptodev_pmd.c
+++ b/lib/librte_cryptodev/rte_cryptodev_pmd.c
@@ -32,7 +32,6 @@
 
 #include <rte_malloc.h>
 
-#include "rte_cryptodev_vdev.h"
 #include "rte_cryptodev_pci.h"
 #include "rte_cryptodev_pmd.h"
 
@@ -204,125 +203,6 @@ rte_cryptodev_pmd_destroy(struct rte_cryptodev *cryptodev)
 	return 0;
 }
 
-/**
- * Parse name from argument
- */
-static int
-rte_cryptodev_vdev_parse_name_arg(const char *key __rte_unused,
-		const char *value, void *extra_args)
-{
-	struct rte_crypto_vdev_init_params *params = extra_args;
-
-	if (strlen(value) >= RTE_CRYPTODEV_NAME_MAX_LEN - 1) {
-		CDEV_LOG_ERR("Invalid name %s, should be less than "
-				"%u bytes", value,
-				RTE_CRYPTODEV_NAME_MAX_LEN - 1);
-		return -1;
-	}
-
-	strncpy(params->name, value, RTE_CRYPTODEV_NAME_MAX_LEN);
-
-	return 0;
-}
-
-/**
- * Parse integer from argument
- */
-static int
-rte_cryptodev_vdev_parse_integer_arg(const char *key __rte_unused,
-		const char *value, void *extra_args)
-{
-	int *i = extra_args;
-
-	*i = atoi(value);
-	if (*i < 0) {
-		CDEV_LOG_ERR("Argument has to be positive.");
-		return -1;
-	}
-
-	return 0;
-}
-
-struct rte_cryptodev *
-rte_cryptodev_vdev_pmd_init(const char *name, size_t dev_private_size,
-		int socket_id, struct rte_vdev_device *vdev)
-{
-	struct rte_cryptodev *cryptodev;
-
-	/* allocate device structure */
-	cryptodev = rte_cryptodev_pmd_allocate(name, socket_id);
-	if (cryptodev == NULL)
-		return NULL;
-
-	/* allocate private device structure */
-	if (rte_eal_process_type() == RTE_PROC_PRIMARY) {
-		cryptodev->data->dev_private =
-				rte_zmalloc_socket("cryptodev device private",
-						dev_private_size,
-						RTE_CACHE_LINE_SIZE,
-						socket_id);
-
-		if (cryptodev->data->dev_private == NULL)
-			rte_panic("Cannot allocate memzone for private device"
-					" data");
-	}
-
-	cryptodev->device = &vdev->device;
-
-	/* initialise user call-back tail queue */
-	TAILQ_INIT(&(cryptodev->link_intr_cbs));
-
-	return cryptodev;
-}
-
-int
-rte_cryptodev_vdev_parse_init_params(struct rte_crypto_vdev_init_params *params,
-		const char *input_args)
-{
-	struct rte_kvargs *kvlist = NULL;
-	int ret = 0;
-
-	if (params == NULL)
-		return -EINVAL;
-
-	if (input_args) {
-		kvlist = rte_kvargs_parse(input_args,
-				cryptodev_vdev_valid_params);
-		if (kvlist == NULL)
-			return -1;
-
-		ret = rte_kvargs_process(kvlist,
-					RTE_CRYPTODEV_VDEV_MAX_NB_QP_ARG,
-					&rte_cryptodev_vdev_parse_integer_arg,
-					&params->max_nb_queue_pairs);
-		if (ret < 0)
-			goto free_kvlist;
-
-		ret = rte_kvargs_process(kvlist,
-					RTE_CRYPTODEV_VDEV_MAX_NB_SESS_ARG,
-					&rte_cryptodev_vdev_parse_integer_arg,
-					&params->max_nb_sessions);
-		if (ret < 0)
-			goto free_kvlist;
-
-		ret = rte_kvargs_process(kvlist, RTE_CRYPTODEV_VDEV_SOCKET_ID,
-					&rte_cryptodev_vdev_parse_integer_arg,
-					&params->socket_id);
-		if (ret < 0)
-			goto free_kvlist;
-
-		ret = rte_kvargs_process(kvlist, RTE_CRYPTODEV_VDEV_NAME,
-					&rte_cryptodev_vdev_parse_name_arg,
-					params);
-		if (ret < 0)
-			goto free_kvlist;
-	}
-
-free_kvlist:
-	rte_kvargs_free(kvlist);
-	return ret;
-}
-
 int
 rte_cryptodev_pci_generic_probe(struct rte_pci_device *pci_dev,
 			size_t private_data_size,
diff --git a/lib/librte_cryptodev/rte_cryptodev_vdev.h b/lib/librte_cryptodev/rte_cryptodev_vdev.h
deleted file mode 100644
index 94ab9d3..0000000
--- a/lib/librte_cryptodev/rte_cryptodev_vdev.h
+++ /dev/null
@@ -1,100 +0,0 @@
-/*-
- *   BSD LICENSE
- *
- *   Copyright(c) 2017 Intel Corporation. All rights reserved.
- *
- *   Redistribution and use in source and binary forms, with or without
- *   modification, are permitted provided that the following conditions
- *   are met:
- *
- *     * Redistributions of source code must retain the above copyright
- *       notice, this list of conditions and the following disclaimer.
- *     * Redistributions in binary form must reproduce the above copyright
- *       notice, this list of conditions and the following disclaimer in
- *       the documentation and/or other materials provided with the
- *       distribution.
- *     * Neither the name of the copyright holder nor the names of its
- *       contributors may be used to endorse or promote products derived
- *       from this software without specific prior written permission.
- *
- *   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- *   "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- *   LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- *   A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- *   OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- *   LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- *   DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- *   THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- *   (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- *   OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef _RTE_CRYPTODEV_VDEV_H_
-#define _RTE_CRYPTODEV_VDEV_H_
-
-#include <rte_vdev.h>
-#include <inttypes.h>
-
-#include "rte_cryptodev.h"
-
-#define RTE_CRYPTODEV_VDEV_DEFAULT_MAX_NB_QUEUE_PAIRS	8
-#define RTE_CRYPTODEV_VDEV_DEFAULT_MAX_NB_SESSIONS	2048
-
-#define RTE_CRYPTODEV_VDEV_NAME				("name")
-#define RTE_CRYPTODEV_VDEV_MAX_NB_QP_ARG		("max_nb_queue_pairs")
-#define RTE_CRYPTODEV_VDEV_MAX_NB_SESS_ARG		("max_nb_sessions")
-#define RTE_CRYPTODEV_VDEV_SOCKET_ID			("socket_id")
-
-static const char * const cryptodev_vdev_valid_params[] = {
-	RTE_CRYPTODEV_VDEV_NAME,
-	RTE_CRYPTODEV_VDEV_MAX_NB_QP_ARG,
-	RTE_CRYPTODEV_VDEV_MAX_NB_SESS_ARG,
-	RTE_CRYPTODEV_VDEV_SOCKET_ID
-};
-
-/**
- * @internal
- * Initialisation parameters for virtual crypto devices
- */
-struct rte_crypto_vdev_init_params {
-	unsigned int max_nb_queue_pairs;
-	unsigned int max_nb_sessions;
-	uint8_t socket_id;
-	char name[RTE_CRYPTODEV_NAME_MAX_LEN];
-};
-
-/**
- * @internal
- * Creates a new virtual crypto device and returns the pointer
- * to that device.
- *
- * @param	name			PMD type name
- * @param	dev_private_size	Size of crypto PMDs private data
- * @param	socket_id		Socket to allocate resources on.
- * @param	vdev			Pointer to virtual device structure.
- *
- * @return
- *   - Cryptodev pointer if device is successfully created.
- *   - NULL if device cannot be created.
- */
-struct rte_cryptodev *
-rte_cryptodev_vdev_pmd_init(const char *name, size_t dev_private_size,
-		int socket_id, struct rte_vdev_device *vdev);
-
-/**
- * @internal
- * Parse virtual device initialisation parameters input arguments
- *
- * @params	params		Initialisation parameters with defaults set.
- * @params	input_args	Command line arguments
- *
- * @return
- * 0 on successful parse
- * <0 on failure to parse
- */
-int
-rte_cryptodev_vdev_parse_init_params(struct rte_crypto_vdev_init_params *params,
-		const char *input_args);
-
-#endif /* _RTE_CRYPTODEV_VDEV_H_ */
diff --git a/lib/librte_cryptodev/rte_cryptodev_version.map b/lib/librte_cryptodev/rte_cryptodev_version.map
index a0ea7bf..d3e4515 100644
--- a/lib/librte_cryptodev/rte_cryptodev_version.map
+++ b/lib/librte_cryptodev/rte_cryptodev_version.map
@@ -73,8 +73,6 @@ DPDK_17.08 {
 	rte_cryptodev_sym_capability_check_aead;
 	rte_cryptodev_sym_session_init;
 	rte_cryptodev_sym_session_clear;
-	rte_cryptodev_vdev_parse_init_params;
-	rte_cryptodev_vdev_pmd_init;
 	rte_crypto_aead_algorithm_strings;
 	rte_crypto_aead_operation_strings;
 
-- 
2.9.4

^ permalink raw reply	[relevance 1%]

* [dpdk-dev] [PATCH] eal: fix version map experimental export section
@ 2017-10-25 12:29  4% Harry van Haaren
  2017-11-06 23:07  0% ` Thomas Monjalon
  0 siblings, 1 reply; 200+ results
From: Harry van Haaren @ 2017-10-25 12:29 UTC (permalink / raw)
  To: dev; +Cc: thomas, Harry van Haaren, santosh.shukla

Before this commit, the EXPERIMENTAL version of ABI
derived from the DPDK_17.08 tag. In parallel there
was a DPDK_17.11 tag.

Experimental map should always derive from the latest ABI,
so this patch moves the 17.11 section above EXPERIMENTAL,
and updates EXPERIMENTAL to derive from the 17.11 map.

Fixes: aadc3eb002d3 ("pci: export match function")
Cc: santosh.shukla@caviumnetworks.com

Signed-off-by: Harry van Haaren <harry.van.haaren@intel.com>
---
 lib/librte_eal/rte_eal_version.map | 28 ++++++++++++++--------------
 1 file changed, 14 insertions(+), 14 deletions(-)

diff --git a/lib/librte_eal/rte_eal_version.map b/lib/librte_eal/rte_eal_version.map
index 8802b28..c0df978 100644
--- a/lib/librte_eal/rte_eal_version.map
+++ b/lib/librte_eal/rte_eal_version.map
@@ -201,6 +201,19 @@ DPDK_17.08 {
 
 } DPDK_17.05;
 
+DPDK_17.11 {
+	global:
+
+	rte_bus_get_iommu_class;
+	rte_eal_iova_mode;
+	rte_eal_mbuf_default_mempool_ops;
+	rte_lcore_has_role;
+	rte_memcpy_ptr;
+	rte_pci_get_iommu_class;
+	rte_pci_match;
+
+} DPDK_17.08;
+
 EXPERIMENTAL {
 	global:
 
@@ -234,17 +247,4 @@ EXPERIMENTAL {
 	rte_service_set_stats_enable;
 	rte_service_start_with_defaults;
 
-} DPDK_17.08;
-
-DPDK_17.11 {
-	global:
-
-	rte_bus_get_iommu_class;
-	rte_eal_iova_mode;
-	rte_eal_mbuf_default_mempool_ops;
-	rte_lcore_has_role;
-	rte_memcpy_ptr;
-	rte_pci_get_iommu_class;
-	rte_pci_match;
-
-} DPDK_17.08;
+} DPDK_17.11;
-- 
2.7.4

^ permalink raw reply	[relevance 4%]

* [dpdk-dev] [PATCH v2] mbuf: rename deprecated VLAN flags
  2017-10-23 12:16  2% [dpdk-dev] [PATCH] mbuf: rename deprecated VLAN flags Olivier Matz
@ 2017-10-25 15:12  2% ` Olivier Matz
  0 siblings, 0 replies; 200+ results
From: Olivier Matz @ 2017-10-25 15:12 UTC (permalink / raw)
  To: dev; +Cc: ferruh.yigit, thomas

PKT_RX_VLAN_PKT and PKT_RX_QINQ_PKT are deprecated for a while.
As explained in [1], these flags were kept to let the applications and
PMDs move to the new flag. There is also a need to support Rx vlan
offload without vlan strip (at least for the ixgbe driver).

This patch renames the old flags for this feature, knowing that some
PMDs were using PKT_RX_VLAN_PKT and PKT_RX_QINQ_PKT to indicate that
the vlan tci has been saved in the mbuf structure.

It is likely that some PMDs do not set the proper flags when doing vlan
offload, and it would be worth making a pass on all of them.

Link: [1] http://dpdk.org/ml/archives/dev/2017-June/067712.html
Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
---

v1->v2
- rebase on latest net-next
- clarify api documentation to highlight that when using the
  flag PKT_RX_xyz_STRIPPED, then PKT_RX_xyz must be set too.

 doc/guides/rel_notes/deprecation.rst      |  5 -----
 doc/guides/rel_notes/release_17_11.rst    | 13 ++++++++++++
 drivers/net/af_packet/rte_eth_af_packet.c |  2 +-
 drivers/net/avp/avp_ethdev.c              |  4 ++--
 drivers/net/bnx2x/bnx2x_rxtx.c            |  2 +-
 drivers/net/bnxt/bnxt_rxr.c               |  4 ++--
 drivers/net/bonding/rte_eth_bond_pmd.c    |  2 +-
 drivers/net/cxgbe/sge.c                   |  4 ++--
 drivers/net/dpaa/dpaa_rxtx.c              |  2 +-
 drivers/net/dpaa2/dpaa2_rxtx.c            |  2 +-
 drivers/net/e1000/em_rxtx.c               |  6 +++---
 drivers/net/e1000/igb_rxtx.c              |  6 +++---
 drivers/net/enic/enic_rxtx.c              |  2 +-
 drivers/net/fm10k/fm10k_rxtx.c            |  8 ++++----
 drivers/net/fm10k/fm10k_rxtx_vec.c        |  4 ++--
 drivers/net/i40e/i40e_rxtx.c              |  2 +-
 drivers/net/i40e/i40e_rxtx_vec_altivec.c  |  2 +-
 drivers/net/i40e/i40e_rxtx_vec_neon.c     |  2 +-
 drivers/net/i40e/i40e_rxtx_vec_sse.c      |  2 +-
 drivers/net/ixgbe/ixgbe_ethdev.c          |  4 ++--
 drivers/net/ixgbe/ixgbe_rxtx.c            |  4 ++--
 drivers/net/ixgbe/ixgbe_rxtx_vec_neon.c   |  4 ++--
 drivers/net/ixgbe/ixgbe_rxtx_vec_sse.c    |  2 +-
 drivers/net/mlx5/mlx5_rxtx.c              |  2 +-
 drivers/net/mlx5/mlx5_rxtx_vec_neon.h     |  4 ++--
 drivers/net/mlx5/mlx5_rxtx_vec_sse.h      | 10 +++++-----
 drivers/net/nfp/nfp_net.c                 |  2 +-
 drivers/net/qede/qede_rxtx.c              |  2 +-
 drivers/net/vmxnet3/vmxnet3_rxtx.c        |  3 ++-
 lib/librte_mbuf/rte_mbuf.c                |  5 +++--
 lib/librte_mbuf/rte_mbuf.h                | 33 ++++++++++++++++++-------------
 lib/librte_net/rte_ether.h                |  2 +-
 32 files changed, 83 insertions(+), 68 deletions(-)

diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst
index 3a5d09366..d14fd021c 100644
--- a/doc/guides/rel_notes/deprecation.rst
+++ b/doc/guides/rel_notes/deprecation.rst
@@ -28,11 +28,6 @@ Deprecation Notices
   The change will be only for the name.
   Functional aspects of the API or data-structure will remain same.
 
-* The mbuf flags PKT_RX_VLAN_PKT and PKT_RX_QINQ_PKT are deprecated and
-  are respectively replaced by PKT_RX_VLAN_STRIPPED and
-  PKT_RX_QINQ_STRIPPED, that are better described. The old flags and
-  their behavior will be kept until 17.08 and will be removed in 17.11.
-
 * ethdev: Tx offloads will no longer be enabled by default in 17.11.
   Instead, the ``rte_eth_txmode`` structure will be extended with
   bit field to enable each Tx offload.
diff --git a/doc/guides/rel_notes/release_17_11.rst b/doc/guides/rel_notes/release_17_11.rst
index e505a4dcd..ffe74030b 100644
--- a/doc/guides/rel_notes/release_17_11.rst
+++ b/doc/guides/rel_notes/release_17_11.rst
@@ -322,6 +322,19 @@ API Changes
   ``rte_log_get_global_level()``, ``rte_log_set_level()`` and
   ``rte_log_get_level()``.
 
+* **Removed ``mbuf`` flags ``PKT_RX_VLAN_PKT`` and ``PKT_RX_QINQ_PKT``.**
+
+  The ``mbuf`` flags ``PKT_RX_VLAN_PKT`` and ``PKT_RX_QINQ_PKT`` have
+  been removed since their behavior were not properly described.
+
+* **Added ``mbuf`` flags ``PKT_RX_VLAN`` and ``PKT_RX_QINQ``.**
+
+  Two ``mbuf`` flags have been added to indicate that the VLAN
+  identifier has been saved in in the ``mbuf`` structure. For instance:
+
+  - if VLAN is not stripped and TCI is saved: ``PKT_RX_VLAN``
+  - if VLAN is stripped and TCI is saved: ``PKT_RX_VLAN | PKT_RX_VLAN_STRIPPED``
+
 
 ABI Changes
 -----------
diff --git a/drivers/net/af_packet/rte_eth_af_packet.c b/drivers/net/af_packet/rte_eth_af_packet.c
index 46b8250d0..dc1867057 100644
--- a/drivers/net/af_packet/rte_eth_af_packet.c
+++ b/drivers/net/af_packet/rte_eth_af_packet.c
@@ -167,7 +167,7 @@ eth_af_packet_rx(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)
 		/* check for vlan info */
 		if (ppd->tp_status & TP_STATUS_VLAN_VALID) {
 			mbuf->vlan_tci = ppd->tp_vlan_tci;
-			mbuf->ol_flags |= (PKT_RX_VLAN_PKT | PKT_RX_VLAN_STRIPPED);
+			mbuf->ol_flags |= (PKT_RX_VLAN | PKT_RX_VLAN_STRIPPED);
 		}
 
 		/* release incoming frame and advance ring buffer */
diff --git a/drivers/net/avp/avp_ethdev.c b/drivers/net/avp/avp_ethdev.c
index b97a90cea..43b33dbf2 100644
--- a/drivers/net/avp/avp_ethdev.c
+++ b/drivers/net/avp/avp_ethdev.c
@@ -1361,7 +1361,7 @@ avp_dev_copy_from_buffers(struct avp_dev *avp,
 	src_offset = 0;
 
 	if (pkt_buf->ol_flags & RTE_AVP_RX_VLAN_PKT) {
-		ol_flags = PKT_RX_VLAN_PKT;
+		ol_flags = PKT_RX_VLAN;
 		vlan_tci = pkt_buf->vlan_tci;
 	} else {
 		ol_flags = 0;
@@ -1619,7 +1619,7 @@ avp_recv_pkts(void *rx_queue,
 		m->port = avp->port_id;
 
 		if (pkt_buf->ol_flags & RTE_AVP_RX_VLAN_PKT) {
-			m->ol_flags = PKT_RX_VLAN_PKT;
+			m->ol_flags = PKT_RX_VLAN;
 			m->vlan_tci = pkt_buf->vlan_tci;
 		}
 
diff --git a/drivers/net/bnx2x/bnx2x_rxtx.c b/drivers/net/bnx2x/bnx2x_rxtx.c
index 5dd4aee7f..c72067f6f 100644
--- a/drivers/net/bnx2x/bnx2x_rxtx.c
+++ b/drivers/net/bnx2x/bnx2x_rxtx.c
@@ -422,7 +422,7 @@ bnx2x_recv_pkts(void *p_rxq, struct rte_mbuf **rx_pkts, uint16_t nb_pkts)
 		 */
 		if (cqe_fp->pars_flags.flags & PARSING_FLAGS_VLAN) {
 			rx_mb->vlan_tci = cqe_fp->vlan_tag;
-			rx_mb->ol_flags |= PKT_RX_VLAN_PKT;
+			rx_mb->ol_flags |= PKT_RX_VLAN;
 		}
 
 		rx_pkts[nb_rx] = rx_mb;
diff --git a/drivers/net/bnxt/bnxt_rxr.c b/drivers/net/bnxt/bnxt_rxr.c
index d68d26f17..30891b74f 100644
--- a/drivers/net/bnxt/bnxt_rxr.c
+++ b/drivers/net/bnxt/bnxt_rxr.c
@@ -199,7 +199,7 @@ static void bnxt_tpa_start(struct bnxt_rx_queue *rxq,
 	if (tpa_start1->flags2 &
 	    rte_cpu_to_le_32(RX_TPA_START_CMPL_FLAGS2_META_FORMAT_VLAN)) {
 		mbuf->vlan_tci = rte_le_to_cpu_32(tpa_start1->metadata);
-		mbuf->ol_flags |= PKT_RX_VLAN_PKT;
+		mbuf->ol_flags |= PKT_RX_VLAN;
 	}
 	if (likely(tpa_start1->flags2 &
 		   rte_cpu_to_le_32(RX_TPA_START_CMPL_FLAGS2_L4_CS_CALC)))
@@ -464,7 +464,7 @@ static int bnxt_rx_pkt(struct rte_mbuf **rx_pkt,
 			(RX_PKT_CMPL_METADATA_VID_MASK |
 			RX_PKT_CMPL_METADATA_DE |
 			RX_PKT_CMPL_METADATA_PRI_MASK);
-		mbuf->ol_flags |= PKT_RX_VLAN_PKT;
+		mbuf->ol_flags |= PKT_RX_VLAN;
 	}
 
 	if (likely(RX_CMP_IP_CS_OK(rxcmp1)))
diff --git a/drivers/net/bonding/rte_eth_bond_pmd.c b/drivers/net/bonding/rte_eth_bond_pmd.c
index 3fbc1b123..c48993940 100644
--- a/drivers/net/bonding/rte_eth_bond_pmd.c
+++ b/drivers/net/bonding/rte_eth_bond_pmd.c
@@ -129,7 +129,7 @@ is_lacp_packets(uint16_t ethertype, uint8_t subtype, struct rte_mbuf *mbuf)
 {
 	const uint16_t ether_type_slow_be = rte_be_to_cpu_16(ETHER_TYPE_SLOW);
 
-	return !((mbuf->ol_flags & PKT_RX_VLAN_PKT) ? mbuf->vlan_tci : 0) &&
+	return !((mbuf->ol_flags & PKT_RX_VLAN) ? mbuf->vlan_tci : 0) &&
 		(ethertype == ether_type_slow_be &&
 		(subtype == SLOW_SUBTYPE_MARKER || subtype == SLOW_SUBTYPE_LACP));
 }
diff --git a/drivers/net/cxgbe/sge.c b/drivers/net/cxgbe/sge.c
index 5376fc500..33f7f0bc2 100644
--- a/drivers/net/cxgbe/sge.c
+++ b/drivers/net/cxgbe/sge.c
@@ -1405,7 +1405,7 @@ int t4_ethrx_handler(struct sge_rspq *q, const __be64 *rsp,
 	}
 
 	if (pkt->vlan_ex) {
-		mbuf->ol_flags |= PKT_RX_VLAN_PKT;
+		mbuf->ol_flags |= PKT_RX_VLAN;
 		mbuf->vlan_tci = ntohs(pkt->vlan);
 	}
 	rxq->stats.pkts++;
@@ -1550,7 +1550,7 @@ static int process_responses(struct sge_rspq *q, int budget,
 				}
 
 				if (cpl->vlan_ex) {
-					pkt->ol_flags |= PKT_RX_VLAN_PKT;
+					pkt->ol_flags |= PKT_RX_VLAN;
 					pkt->vlan_tci = ntohs(cpl->vlan);
 				}
 
diff --git a/drivers/net/dpaa/dpaa_rxtx.c b/drivers/net/dpaa/dpaa_rxtx.c
index 0433f3bb1..f7cfff798 100644
--- a/drivers/net/dpaa/dpaa_rxtx.c
+++ b/drivers/net/dpaa/dpaa_rxtx.c
@@ -219,7 +219,7 @@ static inline void dpaa_eth_packet_info(struct rte_mbuf *m,
 
 	/* Check if Vlan is present */
 	if (prs & DPAA_PARSE_VLAN_MASK)
-		m->ol_flags |= PKT_RX_VLAN_PKT;
+		m->ol_flags |= PKT_RX_VLAN;
 	/* Packet received without stripping the vlan */
 }
 
diff --git a/drivers/net/dpaa2/dpaa2_rxtx.c b/drivers/net/dpaa2/dpaa2_rxtx.c
index 7cfa73a8c..3f57dc227 100644
--- a/drivers/net/dpaa2/dpaa2_rxtx.c
+++ b/drivers/net/dpaa2/dpaa2_rxtx.c
@@ -122,7 +122,7 @@ dpaa2_dev_rx_offload(uint64_t hw_annot_addr, struct rte_mbuf *mbuf)
 
 	if (BIT_ISSET_AT_POS(annotation->word3,
 			     L2_VLAN_1_PRESENT | L2_VLAN_N_PRESENT))
-		mbuf->ol_flags |= PKT_RX_VLAN_PKT;
+		mbuf->ol_flags |= PKT_RX_VLAN;
 
 	if (BIT_ISSET_AT_POS(annotation->word8, DPAA2_ETH_FAS_L3CE))
 		mbuf->ol_flags |= PKT_RX_IP_CKSUM_BAD;
diff --git a/drivers/net/e1000/em_rxtx.c b/drivers/net/e1000/em_rxtx.c
index 92b66b0ea..d4d5fe6e1 100644
--- a/drivers/net/e1000/em_rxtx.c
+++ b/drivers/net/e1000/em_rxtx.c
@@ -675,7 +675,7 @@ rx_desc_status_to_pkt_flags(uint32_t rx_status)
 
 	/* Check if VLAN present */
 	pkt_flags = ((rx_status & E1000_RXD_STAT_VP) ?
-		PKT_RX_VLAN_PKT | PKT_RX_VLAN_STRIPPED : 0);
+		PKT_RX_VLAN | PKT_RX_VLAN_STRIPPED : 0);
 
 	return pkt_flags;
 }
@@ -830,7 +830,7 @@ eth_em_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts,
 		rxm->ol_flags = rxm->ol_flags |
 				rx_desc_error_to_pkt_flags(rxd.errors);
 
-		/* Only valid if PKT_RX_VLAN_PKT set in pkt_flags */
+		/* Only valid if PKT_RX_VLAN set in pkt_flags */
 		rxm->vlan_tci = rte_le_to_cpu_16(rxd.special);
 
 		/*
@@ -1056,7 +1056,7 @@ eth_em_recv_scattered_pkts(void *rx_queue, struct rte_mbuf **rx_pkts,
 		first_seg->ol_flags = first_seg->ol_flags |
 					rx_desc_error_to_pkt_flags(rxd.errors);
 
-		/* Only valid if PKT_RX_VLAN_PKT set in pkt_flags */
+		/* Only valid if PKT_RX_VLAN set in pkt_flags */
 		rxm->vlan_tci = rte_le_to_cpu_16(rxd.special);
 
 		/* Prefetch data of first segment, if configured to do so. */
diff --git a/drivers/net/e1000/igb_rxtx.c b/drivers/net/e1000/igb_rxtx.c
index 8a1e5b18e..d25ea048d 100644
--- a/drivers/net/e1000/igb_rxtx.c
+++ b/drivers/net/e1000/igb_rxtx.c
@@ -785,7 +785,7 @@ rx_desc_status_to_pkt_flags(uint32_t rx_status)
 
 	/* Check if VLAN present */
 	pkt_flags = ((rx_status & E1000_RXD_STAT_VP) ?
-		PKT_RX_VLAN_PKT | PKT_RX_VLAN_STRIPPED : 0);
+		PKT_RX_VLAN | PKT_RX_VLAN_STRIPPED : 0);
 
 #if defined(RTE_LIBRTE_IEEE1588)
 	if (rx_status & E1000_RXD_STAT_TMST)
@@ -946,7 +946,7 @@ eth_igb_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts,
 
 		rxm->hash.rss = rxd.wb.lower.hi_dword.rss;
 		hlen_type_rss = rte_le_to_cpu_32(rxd.wb.lower.lo_dword.data);
-		/* Only valid if PKT_RX_VLAN_PKT set in pkt_flags */
+		/* Only valid if PKT_RX_VLAN set in pkt_flags */
 		rxm->vlan_tci = rte_le_to_cpu_16(rxd.wb.upper.vlan);
 
 		pkt_flags = rx_desc_hlen_type_rss_to_pkt_flags(rxq, hlen_type_rss);
@@ -1180,7 +1180,7 @@ eth_igb_recv_scattered_pkts(void *rx_queue, struct rte_mbuf **rx_pkts,
 		first_seg->hash.rss = rxd.wb.lower.hi_dword.rss;
 
 		/*
-		 * The vlan_tci field is only valid when PKT_RX_VLAN_PKT is
+		 * The vlan_tci field is only valid when PKT_RX_VLAN is
 		 * set in the pkt_flags field.
 		 */
 		first_seg->vlan_tci = rte_le_to_cpu_16(rxd.wb.upper.vlan);
diff --git a/drivers/net/enic/enic_rxtx.c b/drivers/net/enic/enic_rxtx.c
index a39172f14..1d43bde9a 100644
--- a/drivers/net/enic/enic_rxtx.c
+++ b/drivers/net/enic/enic_rxtx.c
@@ -243,7 +243,7 @@ enic_cq_rx_to_pkt_flags(struct cq_desc *cqd, struct rte_mbuf *mbuf)
 
 	/* VLAN STRIPPED flag. The L2 packet type updated here also */
 	if (bwflags & CQ_ENET_RQ_DESC_FLAGS_VLAN_STRIPPED) {
-		pkt_flags |= PKT_RX_VLAN_PKT | PKT_RX_VLAN_STRIPPED;
+		pkt_flags |= PKT_RX_VLAN | PKT_RX_VLAN_STRIPPED;
 		mbuf->packet_type |= RTE_PTYPE_L2_ETHER;
 	} else {
 		if (vlan_tci != 0)
diff --git a/drivers/net/fm10k/fm10k_rxtx.c b/drivers/net/fm10k/fm10k_rxtx.c
index 4e84926f8..d6081e485 100644
--- a/drivers/net/fm10k/fm10k_rxtx.c
+++ b/drivers/net/fm10k/fm10k_rxtx.c
@@ -158,10 +158,10 @@ fm10k_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts,
 		 * Packets in fm10k device always carry at least one VLAN tag.
 		 * For those packets coming in without VLAN tag,
 		 * the port default VLAN tag will be used.
-		 * So, always PKT_RX_VLAN_PKT flag is set and vlan_tci
+		 * So, always PKT_RX_VLAN flag is set and vlan_tci
 		 * is valid for each RX packet's mbuf.
 		 */
-		mbuf->ol_flags |= PKT_RX_VLAN_PKT;
+		mbuf->ol_flags |= PKT_RX_VLAN;
 		mbuf->vlan_tci = desc.w.vlan;
 		/**
 		 * mbuf->vlan_tci_outer is an idle field in fm10k driver,
@@ -319,10 +319,10 @@ fm10k_recv_scattered_pkts(void *rx_queue, struct rte_mbuf **rx_pkts,
 		 * Packets in fm10k device always carry at least one VLAN tag.
 		 * For those packets coming in without VLAN tag,
 		 * the port default VLAN tag will be used.
-		 * So, always PKT_RX_VLAN_PKT flag is set and vlan_tci
+		 * So, always PKT_RX_VLAN flag is set and vlan_tci
 		 * is valid for each RX packet's mbuf.
 		 */
-		first_seg->ol_flags |= PKT_RX_VLAN_PKT;
+		first_seg->ol_flags |= PKT_RX_VLAN;
 		first_seg->vlan_tci = desc.w.vlan;
 		/**
 		 * mbuf->vlan_tci_outer is an idle field in fm10k driver,
diff --git a/drivers/net/fm10k/fm10k_rxtx_vec.c b/drivers/net/fm10k/fm10k_rxtx_vec.c
index d23bfe9b7..edc4ae16e 100644
--- a/drivers/net/fm10k/fm10k_rxtx_vec.c
+++ b/drivers/net/fm10k/fm10k_rxtx_vec.c
@@ -81,8 +81,8 @@ fm10k_desc_to_olflags_v(__m128i descs[4], struct rte_mbuf **rx_pkts)
 
 	const __m128i pkttype_msk = _mm_set_epi16(
 			0x0000, 0x0000, 0x0000, 0x0000,
-			PKT_RX_VLAN_PKT, PKT_RX_VLAN_PKT,
-			PKT_RX_VLAN_PKT, PKT_RX_VLAN_PKT);
+			PKT_RX_VLAN, PKT_RX_VLAN,
+			PKT_RX_VLAN, PKT_RX_VLAN);
 
 	/* mask everything except rss type */
 	const __m128i rsstype_msk = _mm_set_epi16(
diff --git a/drivers/net/i40e/i40e_rxtx.c b/drivers/net/i40e/i40e_rxtx.c
index f21c1c5d2..904d37f08 100644
--- a/drivers/net/i40e/i40e_rxtx.c
+++ b/drivers/net/i40e/i40e_rxtx.c
@@ -108,7 +108,7 @@ i40e_rxd_to_vlan_tci(struct rte_mbuf *mb, volatile union i40e_rx_desc *rxdp)
 {
 	if (rte_le_to_cpu_64(rxdp->wb.qword1.status_error_len) &
 		(1 << I40E_RX_DESC_STATUS_L2TAG1P_SHIFT)) {
-		mb->ol_flags |= PKT_RX_VLAN_PKT | PKT_RX_VLAN_STRIPPED;
+		mb->ol_flags |= PKT_RX_VLAN | PKT_RX_VLAN_STRIPPED;
 		mb->vlan_tci =
 			rte_le_to_cpu_16(rxdp->wb.qword0.lo_dword.l2tag1);
 		PMD_RX_LOG(DEBUG, "Descriptor l2tag1: %u",
diff --git a/drivers/net/i40e/i40e_rxtx_vec_altivec.c b/drivers/net/i40e/i40e_rxtx_vec_altivec.c
index f4036ea28..5ab9445ed 100644
--- a/drivers/net/i40e/i40e_rxtx_vec_altivec.c
+++ b/drivers/net/i40e/i40e_rxtx_vec_altivec.c
@@ -146,7 +146,7 @@ desc_to_olflags_v(vector unsigned long descs[4], struct rte_mbuf **rx_pkts)
 	/* map rss and vlan type to rss hash and vlan flag */
 	const vector unsigned char vlan_flags = (vector unsigned char){
 			0, 0, 0, 0,
-			PKT_RX_VLAN_PKT | PKT_RX_VLAN_STRIPPED, 0, 0, 0,
+			PKT_RX_VLAN | PKT_RX_VLAN_STRIPPED, 0, 0, 0,
 			0, 0, 0, 0,
 			0, 0, 0, 0};
 
diff --git a/drivers/net/i40e/i40e_rxtx_vec_neon.c b/drivers/net/i40e/i40e_rxtx_vec_neon.c
index 694e91f33..d0e604068 100644
--- a/drivers/net/i40e/i40e_rxtx_vec_neon.c
+++ b/drivers/net/i40e/i40e_rxtx_vec_neon.c
@@ -137,7 +137,7 @@ desc_to_olflags_v(struct i40e_rx_queue *rxq, uint64x2_t descs[4],
 	/* map rss and vlan type to rss hash and vlan flag */
 	const uint8x16_t vlan_flags = {
 			0, 0, 0, 0,
-			PKT_RX_VLAN_PKT | PKT_RX_VLAN_STRIPPED, 0, 0, 0,
+			PKT_RX_VLAN | PKT_RX_VLAN_STRIPPED, 0, 0, 0,
 			0, 0, 0, 0,
 			0, 0, 0, 0};
 
diff --git a/drivers/net/i40e/i40e_rxtx_vec_sse.c b/drivers/net/i40e/i40e_rxtx_vec_sse.c
index 779f14e53..86e16ddf9 100644
--- a/drivers/net/i40e/i40e_rxtx_vec_sse.c
+++ b/drivers/net/i40e/i40e_rxtx_vec_sse.c
@@ -151,7 +151,7 @@ desc_to_olflags_v(struct i40e_rx_queue *rxq, __m128i descs[4],
 	/* map rss and vlan type to rss hash and vlan flag */
 	const __m128i vlan_flags = _mm_set_epi8(0, 0, 0, 0,
 			0, 0, 0, 0,
-			0, 0, 0, PKT_RX_VLAN_PKT | PKT_RX_VLAN_STRIPPED,
+			0, 0, 0, PKT_RX_VLAN | PKT_RX_VLAN_STRIPPED,
 			0, 0, 0, 0);
 
 	const __m128i rss_flags = _mm_set_epi8(0, 0, 0, 0,
diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c
index 2ff904119..3c6e29594 100644
--- a/drivers/net/ixgbe/ixgbe_ethdev.c
+++ b/drivers/net/ixgbe/ixgbe_ethdev.c
@@ -1960,9 +1960,9 @@ ixgbe_vlan_hw_strip_bitmap_set(struct rte_eth_dev *dev, uint16_t queue, bool on)
 	rxq = dev->data->rx_queues[queue];
 
 	if (on)
-		rxq->vlan_flags = PKT_RX_VLAN_PKT | PKT_RX_VLAN_STRIPPED;
+		rxq->vlan_flags = PKT_RX_VLAN | PKT_RX_VLAN_STRIPPED;
 	else
-		rxq->vlan_flags = PKT_RX_VLAN_PKT;
+		rxq->vlan_flags = PKT_RX_VLAN;
 }
 
 static void
diff --git a/drivers/net/ixgbe/ixgbe_rxtx.c b/drivers/net/ixgbe/ixgbe_rxtx.c
index 0038dfbb4..ea2813a43 100644
--- a/drivers/net/ixgbe/ixgbe_rxtx.c
+++ b/drivers/net/ixgbe/ixgbe_rxtx.c
@@ -1849,7 +1849,7 @@ ixgbe_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts,
 		rxm->port = rxq->port_id;
 
 		pkt_info = rte_le_to_cpu_32(rxd.wb.lower.lo_dword.data);
-		/* Only valid if PKT_RX_VLAN_PKT set in pkt_flags */
+		/* Only valid if PKT_RX_VLAN set in pkt_flags */
 		rxm->vlan_tci = rte_le_to_cpu_16(rxd.wb.upper.vlan);
 
 		pkt_flags = rx_desc_status_to_pkt_flags(staterr, vlan_flags);
@@ -1940,7 +1940,7 @@ ixgbe_fill_cluster_head_buf(
 
 	head->port = rxq->port_id;
 
-	/* The vlan_tci field is only valid when PKT_RX_VLAN_PKT is
+	/* The vlan_tci field is only valid when PKT_RX_VLAN is
 	 * set in the pkt_flags field.
 	 */
 	head->vlan_tci = rte_le_to_cpu_16(desc->wb.upper.vlan);
diff --git a/drivers/net/ixgbe/ixgbe_rxtx_vec_neon.c b/drivers/net/ixgbe/ixgbe_rxtx_vec_neon.c
index 44de1caac..18e3d199f 100644
--- a/drivers/net/ixgbe/ixgbe_rxtx_vec_neon.c
+++ b/drivers/net/ixgbe/ixgbe_rxtx_vec_neon.c
@@ -126,8 +126,8 @@ desc_to_olflags_v(uint8x16x2_t sterr_tmp1, uint8x16x2_t sterr_tmp2,
 	} vol;
 
 	const uint8x16_t pkttype_msk = {
-			PKT_RX_VLAN_PKT, PKT_RX_VLAN_PKT,
-			PKT_RX_VLAN_PKT, PKT_RX_VLAN_PKT,
+			PKT_RX_VLAN, PKT_RX_VLAN,
+			PKT_RX_VLAN, PKT_RX_VLAN,
 			0x00, 0x00, 0x00, 0x00,
 			0x00, 0x00, 0x00, 0x00,
 			0x00, 0x00, 0x00, 0x00};
diff --git a/drivers/net/ixgbe/ixgbe_rxtx_vec_sse.c b/drivers/net/ixgbe/ixgbe_rxtx_vec_sse.c
index e704a7f35..fe6937bf3 100644
--- a/drivers/net/ixgbe/ixgbe_rxtx_vec_sse.c
+++ b/drivers/net/ixgbe/ixgbe_rxtx_vec_sse.c
@@ -397,7 +397,7 @@ _recv_raw_pkts_vec(struct ixgbe_rx_queue *rxq, struct rte_mbuf **rx_pkts,
 	sw_ring = &rxq->sw_ring[rxq->rx_tail];
 
 	/* ensure these 2 flags are in the lower 8 bits */
-	RTE_BUILD_BUG_ON((PKT_RX_VLAN_PKT | PKT_RX_VLAN_STRIPPED) > UINT8_MAX);
+	RTE_BUILD_BUG_ON((PKT_RX_VLAN | PKT_RX_VLAN_STRIPPED) > UINT8_MAX);
 	vlan_flags = rxq->vlan_flags & UINT8_MAX;
 
 	/* A. load 4 packet in one loop
diff --git a/drivers/net/mlx5/mlx5_rxtx.c b/drivers/net/mlx5/mlx5_rxtx.c
index 67e7e0639..af0a75546 100644
--- a/drivers/net/mlx5/mlx5_rxtx.c
+++ b/drivers/net/mlx5/mlx5_rxtx.c
@@ -1884,7 +1884,7 @@ mlx5_rx_burst(void *dpdk_rxq, struct rte_mbuf **pkts, uint16_t pkts_n)
 			if (rxq->vlan_strip &&
 			    (cqe->hdr_type_etc &
 			     rte_cpu_to_be_16(MLX5_CQE_VLAN_STRIPPED))) {
-				pkt->ol_flags |= PKT_RX_VLAN_PKT |
+				pkt->ol_flags |= PKT_RX_VLAN |
 					PKT_RX_VLAN_STRIPPED;
 				pkt->vlan_tci =
 					rte_be_to_cpu_16(cqe->vlan_info);
diff --git a/drivers/net/mlx5/mlx5_rxtx_vec_neon.h b/drivers/net/mlx5/mlx5_rxtx_vec_neon.h
index 4cb7f2889..da3c96f4a 100644
--- a/drivers/net/mlx5/mlx5_rxtx_vec_neon.h
+++ b/drivers/net/mlx5/mlx5_rxtx_vec_neon.h
@@ -572,7 +572,7 @@ rxq_cq_to_ptype_oflags_v(struct mlx5_rxq_data *rxq,
 	const uint32x4_t ptype_ol_mask = { 0x106, 0x106, 0x106, 0x106 };
 	const uint8x16_t cv_flag_sel = {
 		0,
-		(uint8_t)(PKT_RX_VLAN_PKT | PKT_RX_VLAN_STRIPPED),
+		(uint8_t)(PKT_RX_VLAN | PKT_RX_VLAN_STRIPPED),
 		(uint8_t)(PKT_RX_IP_CKSUM_GOOD >> 1),
 		0,
 		(uint8_t)(PKT_RX_L4_CKSUM_GOOD >> 1),
@@ -582,7 +582,7 @@ rxq_cq_to_ptype_oflags_v(struct mlx5_rxq_data *rxq,
 	};
 	const uint32x4_t cv_mask =
 		vdupq_n_u32(PKT_RX_IP_CKSUM_GOOD | PKT_RX_L4_CKSUM_GOOD |
-			    PKT_RX_VLAN_PKT | PKT_RX_VLAN_STRIPPED);
+			    PKT_RX_VLAN | PKT_RX_VLAN_STRIPPED);
 	const uint64x1_t mbuf_init = vld1_u64(&rxq->mbuf_initializer);
 	const uint64x1_t r32_mask = vcreate_u64(0xffffffff);
 	uint64x2_t rearm0, rearm1, rearm2, rearm3;
diff --git a/drivers/net/mlx5/mlx5_rxtx_vec_sse.h b/drivers/net/mlx5/mlx5_rxtx_vec_sse.h
index e9819b762..95e41d51a 100644
--- a/drivers/net/mlx5/mlx5_rxtx_vec_sse.h
+++ b/drivers/net/mlx5/mlx5_rxtx_vec_sse.h
@@ -563,17 +563,17 @@ rxq_cq_to_ptype_oflags_v(struct mlx5_rxq_data *rxq, __m128i cqes[4],
 			     (uint8_t)(PKT_RX_L4_CKSUM_GOOD >> 1),
 			     0,
 			     (uint8_t)(PKT_RX_IP_CKSUM_GOOD >> 1),
-			     (uint8_t)(PKT_RX_VLAN_PKT | PKT_RX_VLAN_STRIPPED),
+			     (uint8_t)(PKT_RX_VLAN | PKT_RX_VLAN_STRIPPED),
 			     0);
 	const __m128i cv_mask =
 		_mm_set_epi32(PKT_RX_IP_CKSUM_GOOD | PKT_RX_L4_CKSUM_GOOD |
-			      PKT_RX_VLAN_PKT | PKT_RX_VLAN_STRIPPED,
+			      PKT_RX_VLAN | PKT_RX_VLAN_STRIPPED,
 			      PKT_RX_IP_CKSUM_GOOD | PKT_RX_L4_CKSUM_GOOD |
-			      PKT_RX_VLAN_PKT | PKT_RX_VLAN_STRIPPED,
+			      PKT_RX_VLAN | PKT_RX_VLAN_STRIPPED,
 			      PKT_RX_IP_CKSUM_GOOD | PKT_RX_L4_CKSUM_GOOD |
-			      PKT_RX_VLAN_PKT | PKT_RX_VLAN_STRIPPED,
+			      PKT_RX_VLAN | PKT_RX_VLAN_STRIPPED,
 			      PKT_RX_IP_CKSUM_GOOD | PKT_RX_L4_CKSUM_GOOD |
-			      PKT_RX_VLAN_PKT | PKT_RX_VLAN_STRIPPED);
+			      PKT_RX_VLAN | PKT_RX_VLAN_STRIPPED);
 	const __m128i mbuf_init =
 		_mm_loadl_epi64((__m128i *)&rxq->mbuf_initializer);
 	__m128i rearm0, rearm1, rearm2, rearm3;
diff --git a/drivers/net/nfp/nfp_net.c b/drivers/net/nfp/nfp_net.c
index 0917b9c49..098dbcb62 100644
--- a/drivers/net/nfp/nfp_net.c
+++ b/drivers/net/nfp/nfp_net.c
@@ -2067,7 +2067,7 @@ nfp_net_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts, uint16_t nb_pkts)
 		if ((rxds->rxd.flags & PCIE_DESC_RX_VLAN) &&
 		    (hw->ctrl & NFP_NET_CFG_CTRL_RXVLAN)) {
 			mb->vlan_tci = rte_cpu_to_le_32(rxds->rxd.vlan);
-			mb->ol_flags |= PKT_RX_VLAN_PKT | PKT_RX_VLAN_STRIPPED;
+			mb->ol_flags |= PKT_RX_VLAN | PKT_RX_VLAN_STRIPPED;
 		}
 
 		/* Adding the mbuff to the mbuff array passed by the app */
diff --git a/drivers/net/qede/qede_rxtx.c b/drivers/net/qede/qede_rxtx.c
index aba51aba6..49de13b48 100644
--- a/drivers/net/qede/qede_rxtx.c
+++ b/drivers/net/qede/qede_rxtx.c
@@ -1450,7 +1450,7 @@ qede_recv_pkts(void *p_rxq, struct rte_mbuf **rx_pkts, uint16_t nb_pkts)
 		if (CQE_HAS_VLAN(parse_flag) ||
 		    CQE_HAS_OUTER_VLAN(parse_flag)) {
 			/* Note: FW doesn't indicate Q-in-Q packet */
-			ol_flags |= PKT_RX_VLAN_PKT;
+			ol_flags |= PKT_RX_VLAN;
 			if (qdev->vlan_strip_flg) {
 				ol_flags |= PKT_RX_VLAN_STRIPPED;
 				rx_mb->vlan_tci = vlan_tci;
diff --git a/drivers/net/vmxnet3/vmxnet3_rxtx.c b/drivers/net/vmxnet3/vmxnet3_rxtx.c
index c9a2df3f4..01c85f138 100644
--- a/drivers/net/vmxnet3/vmxnet3_rxtx.c
+++ b/drivers/net/vmxnet3/vmxnet3_rxtx.c
@@ -847,7 +847,8 @@ vmxnet3_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts, uint16_t nb_pkts)
 
 			/* Check for hardware stripped VLAN tag */
 			if (rcd->ts) {
-				start->ol_flags |= (PKT_RX_VLAN_PKT | PKT_RX_VLAN_STRIPPED);
+				start->ol_flags |= (PKT_RX_VLAN |
+						PKT_RX_VLAN_STRIPPED);
 				start->vlan_tci = rte_le_to_cpu_16((uint16_t)rcd->tci);
 			}
 
diff --git a/lib/librte_mbuf/rte_mbuf.c b/lib/librte_mbuf/rte_mbuf.c
index 0e18709d9..92fc704ee 100644
--- a/lib/librte_mbuf/rte_mbuf.c
+++ b/lib/librte_mbuf/rte_mbuf.c
@@ -308,7 +308,7 @@ const void *__rte_pktmbuf_read(const struct rte_mbuf *m, uint32_t off,
 const char *rte_get_rx_ol_flag_name(uint64_t mask)
 {
 	switch (mask) {
-	case PKT_RX_VLAN_PKT: return "PKT_RX_VLAN_PKT";
+	case PKT_RX_VLAN: return "PKT_RX_VLAN";
 	case PKT_RX_RSS_HASH: return "PKT_RX_RSS_HASH";
 	case PKT_RX_FDIR: return "PKT_RX_FDIR";
 	case PKT_RX_L4_CKSUM_BAD: return "PKT_RX_L4_CKSUM_BAD";
@@ -339,7 +339,7 @@ int
 rte_get_rx_ol_flag_list(uint64_t mask, char *buf, size_t buflen)
 {
 	const struct flag_mask rx_flags[] = {
-		{ PKT_RX_VLAN_PKT, PKT_RX_VLAN_PKT, NULL },
+		{ PKT_RX_VLAN, PKT_RX_VLAN, NULL },
 		{ PKT_RX_RSS_HASH, PKT_RX_RSS_HASH, NULL },
 		{ PKT_RX_FDIR, PKT_RX_FDIR, NULL },
 		{ PKT_RX_L4_CKSUM_BAD, PKT_RX_L4_CKSUM_MASK, NULL },
@@ -359,6 +359,7 @@ rte_get_rx_ol_flag_list(uint64_t mask, char *buf, size_t buflen)
 		{ PKT_RX_QINQ_STRIPPED, PKT_RX_QINQ_STRIPPED, NULL },
 		{ PKT_RX_LRO, PKT_RX_LRO, NULL },
 		{ PKT_RX_TIMESTAMP, PKT_RX_TIMESTAMP, NULL },
+		{ PKT_RX_QINQ, PKT_RX_QINQ, NULL },
 	};
 	const char *name;
 	unsigned int i;
diff --git a/lib/librte_mbuf/rte_mbuf.h b/lib/librte_mbuf/rte_mbuf.h
index cc380400d..9094095fd 100644
--- a/lib/librte_mbuf/rte_mbuf.h
+++ b/lib/librte_mbuf/rte_mbuf.h
@@ -89,12 +89,13 @@ extern "C" {
  */
 
 /**
- * RX packet is a 802.1q VLAN packet. This flag was set by PMDs when
- * the packet is recognized as a VLAN, but the behavior between PMDs
- * was not the same. This flag is kept for some time to avoid breaking
- * applications and should be replaced by PKT_RX_VLAN_STRIPPED.
+ * The RX packet is a 802.1q VLAN packet, and the tci has been
+ * saved in in mbuf->vlan_tci.
+ * If the flag PKT_RX_VLAN_STRIPPED is also present, the VLAN
+ * header has been stripped from mbuf data, else it is still
+ * present.
  */
-#define PKT_RX_VLAN_PKT      (1ULL << 0)
+#define PKT_RX_VLAN          (1ULL << 0)
 
 #define PKT_RX_RSS_HASH      (1ULL << 1)  /**< RX packet with RSS hash result. */
 #define PKT_RX_FDIR          (1ULL << 2)  /**< RX packet with FDIR match indicate. */
@@ -123,6 +124,7 @@ extern "C" {
  * A vlan has been stripped by the hardware and its tci is saved in
  * mbuf->vlan_tci. This can only happen if vlan stripping is enabled
  * in the RX configuration of the PMD.
+ * When PKT_RX_VLAN_STRIPPED is set, PKT_RX_VLAN must also be set.
  */
 #define PKT_RX_VLAN_STRIPPED (1ULL << 6)
 
@@ -165,19 +167,13 @@ extern "C" {
  * The 2 vlans have been stripped by the hardware and their tci are
  * saved in mbuf->vlan_tci (inner) and mbuf->vlan_tci_outer (outer).
  * This can only happen if vlan stripping is enabled in the RX
- * configuration of the PMD. If this flag is set, PKT_RX_VLAN_STRIPPED
- * must also be set.
+ * configuration of the PMD. If this flag is set,
+ * When PKT_RX_QINQ_STRIPPED is set, the flags (PKT_RX_VLAN |
+ * PKT_RX_VLAN_STRIPPED | PKT_RX_QINQ) must also be set.
  */
 #define PKT_RX_QINQ_STRIPPED (1ULL << 15)
 
 /**
- * Deprecated.
- * RX packet with double VLAN stripped.
- * This flag is replaced by PKT_RX_QINQ_STRIPPED.
- */
-#define PKT_RX_QINQ_PKT      PKT_RX_QINQ_STRIPPED
-
-/**
  * When packets are coalesced by a hardware or virtual driver, this flag
  * can be set in the RX mbuf, meaning that the m->tso_segsz field is
  * valid and is set to the segment size of original packets.
@@ -189,6 +185,15 @@ extern "C" {
  */
 #define PKT_RX_TIMESTAMP     (1ULL << 17)
 
+/**
+ * The RX packet is a double VLAN, and the outer tci has been
+ * saved in in mbuf->vlan_tci_outer.
+ * If the flag PKT_RX_QINQ_STRIPPED is also present, both VLANs
+ * headers have been stripped from mbuf data, else they are still
+ * present.
+ */
+#define PKT_RX_QINQ          (1ULL << 18)
+
 /* add new RX flags here */
 
 /* add new TX flags here */
diff --git a/lib/librte_net/rte_ether.h b/lib/librte_net/rte_ether.h
index 917d42a1a..06d7b486c 100644
--- a/lib/librte_net/rte_ether.h
+++ b/lib/librte_net/rte_ether.h
@@ -358,7 +358,7 @@ static inline int rte_vlan_strip(struct rte_mbuf *m)
 		return -1;
 
 	struct vlan_hdr *vh = (struct vlan_hdr *)(eh + 1);
-	m->ol_flags |= PKT_RX_VLAN_PKT | PKT_RX_VLAN_STRIPPED;
+	m->ol_flags |= PKT_RX_VLAN | PKT_RX_VLAN_STRIPPED;
 	m->vlan_tci = rte_be_to_cpu_16(vh->vlan_tci);
 
 	/* Copy ether header over rather than moving whole packet */
-- 
2.11.0

^ permalink raw reply	[relevance 2%]

* [dpdk-dev] [PATCH v8 1/4] cryptodev: remove crypto vdev init API
  @ 2017-10-25 17:10  4%   ` Jianfeng Tan
  2017-10-25 17:10  1%   ` [dpdk-dev] [PATCH v8 3/4] bus/vdev: move to vdev bus to drivers/bus Jianfeng Tan
  1 sibling, 0 replies; 200+ results
From: Jianfeng Tan @ 2017-10-25 17:10 UTC (permalink / raw)
  To: dev
  Cc: jblunck, bruce.richardson, konstantin.ananyev,
	pablo.de.lara.guarch, thomas, yliu, maxime.coquelin, mtetsuyah,
	ferruh.yigit, Jianfeng Tan

Remove rte_cryptodev_create_vdev() for duplication.

Signed-off-by: Jianfeng Tan <jianfeng.tan@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
---
 doc/guides/rel_notes/deprecation.rst           |  5 -----
 doc/guides/rel_notes/release_17_11.rst         |  4 +++-
 lib/librte_cryptodev/Makefile                  |  2 +-
 lib/librte_cryptodev/rte_cryptodev.c           |  6 ------
 lib/librte_cryptodev/rte_cryptodev.h           | 17 -----------------
 lib/librte_cryptodev/rte_cryptodev_version.map |  1 -
 6 files changed, 4 insertions(+), 31 deletions(-)

diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst
index 3a5d093..6d859c0 100644
--- a/doc/guides/rel_notes/deprecation.rst
+++ b/doc/guides/rel_notes/deprecation.rst
@@ -66,11 +66,6 @@ Deprecation Notices
   ``rte_cryptodev`` respectively to support security protocol offloaded
   operations.
 
-* cryptodev: the following function is deprecated starting from 17.08 and will
-  be removed in 17.11:
-
-  - ``rte_cryptodev_create_vdev``
-
 * cryptodev: the following function will be static in 17.11 and included
   by all crypto drivers, therefore, will not be public:
 
diff --git a/doc/guides/rel_notes/release_17_11.rst b/doc/guides/rel_notes/release_17_11.rst
index 3298ef5..898f7a5 100644
--- a/doc/guides/rel_notes/release_17_11.rst
+++ b/doc/guides/rel_notes/release_17_11.rst
@@ -297,6 +297,8 @@ API Changes
   ``rte_log_get_global_level()``, ``rte_log_set_level()`` and
   ``rte_log_get_level()``.
 
+* ``rte_cryptodev_create_vdev`` was removed to avoid the dependency on vdev
+  in librte_cryptodev; instead, users can call rte_vdev_init() directly.
 
 ABI Changes
 -----------
@@ -355,7 +357,7 @@ The libraries prepended with a plus sign were incremented in this version.
    + librte_bitratestats.so.2
      librte_cfgfile.so.2
      librte_cmdline.so.2
-     librte_cryptodev.so.3
+     librte_cryptodev.so.4
      librte_distributor.so.1
    + librte_eal.so.6
    + librte_ethdev.so.8
diff --git a/lib/librte_cryptodev/Makefile b/lib/librte_cryptodev/Makefile
index 455151f..9569c99 100644
--- a/lib/librte_cryptodev/Makefile
+++ b/lib/librte_cryptodev/Makefile
@@ -34,7 +34,7 @@ include $(RTE_SDK)/mk/rte.vars.mk
 LIB = librte_cryptodev.a
 
 # library version
-LIBABIVER := 3
+LIBABIVER := 4
 
 # build flags
 CFLAGS += -O3
diff --git a/lib/librte_cryptodev/rte_cryptodev.c b/lib/librte_cryptodev/rte_cryptodev.c
index 21da40e..279b861 100644
--- a/lib/librte_cryptodev/rte_cryptodev.c
+++ b/lib/librte_cryptodev/rte_cryptodev.c
@@ -377,12 +377,6 @@ rte_cryptodev_get_feature_name(uint64_t flag)
 	}
 }
 
-int
-rte_cryptodev_create_vdev(const char *name, const char *args)
-{
-	return rte_vdev_init(name, args);
-}
-
 struct rte_cryptodev *
 rte_cryptodev_pmd_get_dev(uint8_t dev_id)
 {
diff --git a/lib/librte_cryptodev/rte_cryptodev.h b/lib/librte_cryptodev/rte_cryptodev.h
index b74bbdd..f8341cf 100644
--- a/lib/librte_cryptodev/rte_cryptodev.h
+++ b/lib/librte_cryptodev/rte_cryptodev.h
@@ -433,23 +433,6 @@ struct rte_cryptodev_stats {
 /**< Max length of name of crypto PMD */
 
 /**
- * @deprecated
- *
- * Create a virtual crypto device
- *
- * @param	name	Cryptodev PMD name of device to be created.
- * @param	args	Options arguments for device.
- *
- * @return
- * - On successful creation of the cryptodev the device index is returned,
- *   which will be between 0 and rte_cryptodev_count().
- * - In the case of a failure, returns -1.
- */
-__rte_deprecated
-extern int
-rte_cryptodev_create_vdev(const char *name, const char *args);
-
-/**
  * Get the device identifier for the named crypto device.
  *
  * @param	name	device name to select the device structure.
diff --git a/lib/librte_cryptodev/rte_cryptodev_version.map b/lib/librte_cryptodev/rte_cryptodev_version.map
index 874c1b5..f148872 100644
--- a/lib/librte_cryptodev/rte_cryptodev_version.map
+++ b/lib/librte_cryptodev/rte_cryptodev_version.map
@@ -7,7 +7,6 @@ DPDK_16.04 {
 	rte_cryptodev_close;
 	rte_cryptodev_count;
 	rte_cryptodev_configure;
-	rte_cryptodev_create_vdev;
 	rte_cryptodev_get_dev_id;
 	rte_cryptodev_get_feature_name;
 	rte_cryptodev_info_get;
-- 
2.7.4

^ permalink raw reply	[relevance 4%]

* [dpdk-dev] [PATCH v8 3/4] bus/vdev: move to vdev bus to drivers/bus
    2017-10-25 17:10  4%   ` [dpdk-dev] [PATCH v8 1/4] cryptodev: remove crypto vdev init API Jianfeng Tan
@ 2017-10-25 17:10  1%   ` Jianfeng Tan
  2017-10-25 21:32  3%     ` De Lara Guarch, Pablo
  1 sibling, 1 reply; 200+ results
From: Jianfeng Tan @ 2017-10-25 17:10 UTC (permalink / raw)
  To: dev
  Cc: jblunck, bruce.richardson, konstantin.ananyev,
	pablo.de.lara.guarch, thomas, yliu, maxime.coquelin, mtetsuyah,
	ferruh.yigit, Jianfeng Tan

Move the vdev bus from lib/librte_eal to drivers/bus.

As the crypto vdev helper function refers to data structure
in rte_vdev.h, so we move those helper function into drivers/bus
too.

Signed-off-by: Jianfeng Tan <jianfeng.tan@intel.com>
---
 config/common_base                        |   5 +
 doc/guides/rel_notes/release_17_11.rst    |  10 +-
 drivers/bus/Makefile                      |   3 +
 drivers/bus/vdev/Makefile                 |  55 +++++
 drivers/bus/vdev/rte_bus_vdev_version.map |   8 +
 drivers/bus/vdev/rte_vdev.h               | 153 +++++++++++++
 drivers/bus/vdev/vdev.c                   | 344 ++++++++++++++++++++++++++++++
 drivers/crypto/Makefile                   |   1 +
 drivers/event/Makefile                    |   2 +-
 drivers/net/Makefile                      |   2 +-
 lib/librte_eal/bsdapp/eal/Makefile        |   3 +-
 lib/librte_eal/common/Makefile            |   2 +-
 lib/librte_eal/common/eal_common_vdev.c   | 342 -----------------------------
 lib/librte_eal/common/include/rte_dev.h   |  24 +--
 lib/librte_eal/common/include/rte_vdev.h  | 131 ------------
 lib/librte_eal/linuxapp/eal/Makefile      |   3 +-
 lib/librte_eal/rte_eal_version.map        |   4 -
 mk/rte.app.mk                             |   1 +
 test/test/test_cryptodev.c                |   1 +
 test/test/test_event_eth_rx_adapter.c     |   1 +
 test/test/test_eventdev.c                 |   1 +
 test/test/test_eventdev_octeontx.c        |   1 +
 test/test/test_eventdev_sw.c              |   1 +
 test/test/test_link_bonding_rssconf.c     |   1 +
 24 files changed, 591 insertions(+), 508 deletions(-)
 create mode 100644 drivers/bus/vdev/Makefile
 create mode 100644 drivers/bus/vdev/rte_bus_vdev_version.map
 create mode 100644 drivers/bus/vdev/rte_vdev.h
 create mode 100644 drivers/bus/vdev/vdev.c
 delete mode 100644 lib/librte_eal/common/eal_common_vdev.c
 delete mode 100644 lib/librte_eal/common/include/rte_vdev.h

diff --git a/config/common_base b/config/common_base
index 4ddde59..65b13e5 100644
--- a/config/common_base
+++ b/config/common_base
@@ -800,3 +800,8 @@ CONFIG_RTE_APP_CRYPTO_PERF=y
 # Compile the eventdev application
 #
 CONFIG_RTE_APP_EVENTDEV=y
+
+#
+# Compile the vdev bus
+#
+CONFIG_RTE_LIBRTE_VDEV_BUS=y
diff --git a/doc/guides/rel_notes/release_17_11.rst b/doc/guides/rel_notes/release_17_11.rst
index 898f7a5..79f810a 100644
--- a/doc/guides/rel_notes/release_17_11.rst
+++ b/doc/guides/rel_notes/release_17_11.rst
@@ -300,6 +300,13 @@ API Changes
 * ``rte_cryptodev_create_vdev`` was removed to avoid the dependency on vdev
   in librte_cryptodev; instead, users can call rte_vdev_init() directly.
 
+* **Moved the following APIs from eal library to bus_vdev library**
+
+  * ``rte_vdev_init``
+  * ``rte_vdev_register``
+  * ``rte_vdev_uninit``
+  * ``rte_vdev_unregister``
+
 ABI Changes
 -----------
 
@@ -355,11 +362,12 @@ The libraries prepended with a plus sign were incremented in this version.
 
      librte_acl.so.2
    + librte_bitratestats.so.2
+   + librte_bus_vdev.so.1
      librte_cfgfile.so.2
      librte_cmdline.so.2
      librte_cryptodev.so.4
      librte_distributor.so.1
-   + librte_eal.so.6
+   + librte_eal.so.7
    + librte_ethdev.so.8
    + librte_eventdev.so.3
    + librte_flow_classify.so.1
diff --git a/drivers/bus/Makefile b/drivers/bus/Makefile
index 4b29e3d..cb12d19 100644
--- a/drivers/bus/Makefile
+++ b/drivers/bus/Makefile
@@ -36,4 +36,7 @@ DIRS-$(CONFIG_RTE_LIBRTE_DPAA_BUS) += dpaa
 
 DIRS-$(CONFIG_RTE_LIBRTE_FSLMC_BUS) += fslmc
 
+DIRS-$(CONFIG_RTE_LIBRTE_VDEV_BUS) += vdev
+DEPDIRS-vdev = $(core-libs)
+
 include $(RTE_SDK)/mk/rte.subdir.mk
diff --git a/drivers/bus/vdev/Makefile b/drivers/bus/vdev/Makefile
new file mode 100644
index 0000000..6c48ba0
--- /dev/null
+++ b/drivers/bus/vdev/Makefile
@@ -0,0 +1,55 @@
+#   BSD LICENSE
+#
+#   Copyright(c) 2017 Intel Corporation. All rights reserved.
+#   All rights reserved.
+#
+#   Redistribution and use in source and binary forms, with or without
+#   modification, are permitted provided that the following conditions
+#   are met:
+#
+#     * Redistributions of source code must retain the above copyright
+#       notice, this list of conditions and the following disclaimer.
+#     * Redistributions in binary form must reproduce the above copyright
+#       notice, this list of conditions and the following disclaimer in
+#       the documentation and/or other materials provided with the
+#       distribution.
+#     * Neither the name of Intel Corporation nor the names of its
+#       contributors may be used to endorse or promote products derived
+#       from this software without specific prior written permission.
+#
+#   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+#   "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+#   LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+#   A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+#   OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+#   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+#   LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+#   DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+#   THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+#   (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+#   OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+include $(RTE_SDK)/mk/rte.vars.mk
+
+#
+# library name
+#
+LIB = librte_bus_vdev.a
+
+CFLAGS += -O3
+CFLAGS += $(WERROR_FLAGS)
+
+# versioning export map
+EXPORT_MAP := rte_bus_vdev_version.map
+
+# library version
+LIBABIVER := 1
+
+SRCS-y += vdev.c
+
+#
+# Export include files
+#
+SYMLINK-y-include += rte_vdev.h
+
+include $(RTE_SDK)/mk/rte.lib.mk
diff --git a/drivers/bus/vdev/rte_bus_vdev_version.map b/drivers/bus/vdev/rte_bus_vdev_version.map
new file mode 100644
index 0000000..6ccb789
--- /dev/null
+++ b/drivers/bus/vdev/rte_bus_vdev_version.map
@@ -0,0 +1,8 @@
+DPDK_17.11 {
+	global:
+
+	rte_vdev_init;
+	rte_vdev_register;
+	rte_vdev_uninit;
+	rte_vdev_unregister;
+};
diff --git a/drivers/bus/vdev/rte_vdev.h b/drivers/bus/vdev/rte_vdev.h
new file mode 100644
index 0000000..41762b8
--- /dev/null
+++ b/drivers/bus/vdev/rte_vdev.h
@@ -0,0 +1,153 @@
+/*-
+ *   BSD LICENSE
+ *
+ *   Copyright(c) 2016 RehiveTech. All rights reserved.
+ *
+ *   Redistribution and use in source and binary forms, with or without
+ *   modification, are permitted provided that the following conditions
+ *   are met:
+ *
+ *     * Redistributions of source code must retain the above copyright
+ *       notice, this list of conditions and the following disclaimer.
+ *     * Redistributions in binary form must reproduce the above copyright
+ *       notice, this list of conditions and the following disclaimer in
+ *       the documentation and/or other materials provided with the
+ *       distribution.
+ *     * Neither the name of RehiveTech nor the names of its
+ *       contributors may be used to endorse or promote products derived
+ *       from this software without specific prior written permission.
+ *
+ *   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ *   "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ *   LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ *   A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ *   OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ *   LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ *   DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ *   THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ *   (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ *   OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef RTE_VDEV_H
+#define RTE_VDEV_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include <sys/queue.h>
+#include <rte_dev.h>
+#include <rte_devargs.h>
+
+struct rte_vdev_device {
+	TAILQ_ENTRY(rte_vdev_device) next;      /**< Next attached vdev */
+	struct rte_device device;               /**< Inherit core device */
+};
+
+/**
+ * @internal
+ * Helper macro for drivers that need to convert to struct rte_vdev_device.
+ */
+#define RTE_DEV_TO_VDEV(ptr) \
+	container_of(ptr, struct rte_vdev_device, device)
+
+static inline const char *
+rte_vdev_device_name(const struct rte_vdev_device *dev)
+{
+	if (dev && dev->device.name)
+		return dev->device.name;
+	return NULL;
+}
+
+static inline const char *
+rte_vdev_device_args(const struct rte_vdev_device *dev)
+{
+	if (dev && dev->device.devargs)
+		return dev->device.devargs->args;
+	return "";
+}
+
+/** Double linked list of virtual device drivers. */
+TAILQ_HEAD(vdev_driver_list, rte_vdev_driver);
+
+/**
+ * Probe function called for each virtual device driver once.
+ */
+typedef int (rte_vdev_probe_t)(struct rte_vdev_device *dev);
+
+/**
+ * Remove function called for each virtual device driver once.
+ */
+typedef int (rte_vdev_remove_t)(struct rte_vdev_device *dev);
+
+/**
+ * A virtual device driver abstraction.
+ */
+struct rte_vdev_driver {
+	TAILQ_ENTRY(rte_vdev_driver) next; /**< Next in list. */
+	struct rte_driver driver;      /**< Inherited general driver. */
+	rte_vdev_probe_t *probe;       /**< Virtual device probe function. */
+	rte_vdev_remove_t *remove;     /**< Virtual device remove function. */
+};
+
+/**
+ * Register a virtual device driver.
+ *
+ * @param driver
+ *   A pointer to a rte_vdev_driver structure describing the driver
+ *   to be registered.
+ */
+void rte_vdev_register(struct rte_vdev_driver *driver);
+
+/**
+ * Unregister a virtual device driver.
+ *
+ * @param driver
+ *   A pointer to a rte_vdev_driver structure describing the driver
+ *   to be unregistered.
+ */
+void rte_vdev_unregister(struct rte_vdev_driver *driver);
+
+#define RTE_PMD_REGISTER_VDEV(nm, vdrv)\
+RTE_INIT(vdrvinitfn_ ##vdrv);\
+static const char *vdrvinit_ ## nm ## _alias;\
+static void vdrvinitfn_ ##vdrv(void)\
+{\
+	(vdrv).driver.name = RTE_STR(nm);\
+	(vdrv).driver.alias = vdrvinit_ ## nm ## _alias;\
+	rte_vdev_register(&vdrv);\
+} \
+RTE_PMD_EXPORT_NAME(nm, __COUNTER__)
+
+#define RTE_PMD_REGISTER_ALIAS(nm, alias)\
+static const char *vdrvinit_ ## nm ## _alias = RTE_STR(alias)
+
+/**
+ * Initialize a driver specified by name.
+ *
+ * @param name
+ *   The pointer to a driver name to be initialized.
+ * @param args
+ *   The pointer to arguments used by driver initialization.
+ * @return
+ *  0 on success, negative on error
+ */
+int rte_vdev_init(const char *name, const char *args);
+
+/**
+ * Uninitalize a driver specified by name.
+ *
+ * @param name
+ *   The pointer to a driver name to be initialized.
+ * @return
+ *  0 on success, negative on error
+ */
+int rte_vdev_uninit(const char *name);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/drivers/bus/vdev/vdev.c b/drivers/bus/vdev/vdev.c
new file mode 100644
index 0000000..a16eb71
--- /dev/null
+++ b/drivers/bus/vdev/vdev.c
@@ -0,0 +1,344 @@
+/*-
+ *   BSD LICENSE
+ *
+ *   Copyright(c) 2016 RehiveTech. All rights reserved.
+ *
+ *   Redistribution and use in source and binary forms, with or without
+ *   modification, are permitted provided that the following conditions
+ *   are met:
+ *
+ *     * Redistributions of source code must retain the above copyright
+ *       notice, this list of conditions and the following disclaimer.
+ *     * Redistributions in binary form must reproduce the above copyright
+ *       notice, this list of conditions and the following disclaimer in
+ *       the documentation and/or other materials provided with the
+ *       distribution.
+ *     * Neither the name of RehiveTech nor the names of its
+ *       contributors may be used to endorse or promote products derived
+ *       from this software without specific prior written permission.
+ *
+ *   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ *   "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ *   LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ *   A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ *   OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ *   LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ *   DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ *   THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ *   (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ *   OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include <string.h>
+#include <inttypes.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <stdint.h>
+#include <stdbool.h>
+#include <sys/queue.h>
+
+#include <rte_eal.h>
+#include <rte_dev.h>
+#include <rte_bus.h>
+#include <rte_common.h>
+#include <rte_devargs.h>
+#include <rte_memory.h>
+#include <rte_errno.h>
+
+#include "rte_vdev.h"
+
+/* Forward declare to access virtual bus name */
+static struct rte_bus rte_vdev_bus;
+
+/** Double linked list of virtual device drivers. */
+TAILQ_HEAD(vdev_device_list, rte_vdev_device);
+
+static struct vdev_device_list vdev_device_list =
+	TAILQ_HEAD_INITIALIZER(vdev_device_list);
+struct vdev_driver_list vdev_driver_list =
+	TAILQ_HEAD_INITIALIZER(vdev_driver_list);
+
+/* register a driver */
+void
+rte_vdev_register(struct rte_vdev_driver *driver)
+{
+	TAILQ_INSERT_TAIL(&vdev_driver_list, driver, next);
+}
+
+/* unregister a driver */
+void
+rte_vdev_unregister(struct rte_vdev_driver *driver)
+{
+	TAILQ_REMOVE(&vdev_driver_list, driver, next);
+}
+
+static int
+vdev_parse(const char *name, void *addr)
+{
+	struct rte_vdev_driver **out = addr;
+	struct rte_vdev_driver *driver = NULL;
+
+	TAILQ_FOREACH(driver, &vdev_driver_list, next) {
+		if (strncmp(driver->driver.name, name,
+			    strlen(driver->driver.name)) == 0)
+			break;
+		if (driver->driver.alias &&
+		    strncmp(driver->driver.alias, name,
+			    strlen(driver->driver.alias)) == 0)
+			break;
+	}
+	if (driver != NULL &&
+	    addr != NULL)
+		*out = driver;
+	return driver == NULL;
+}
+
+static int
+vdev_probe_all_drivers(struct rte_vdev_device *dev)
+{
+	const char *name;
+	struct rte_vdev_driver *driver;
+	int ret;
+
+	name = rte_vdev_device_name(dev);
+
+	RTE_LOG(DEBUG, EAL, "Search driver %s to probe device %s\n", name,
+		rte_vdev_device_name(dev));
+
+	if (vdev_parse(name, &driver))
+		return -1;
+	dev->device.driver = &driver->driver;
+	ret = driver->probe(dev);
+	if (ret)
+		dev->device.driver = NULL;
+	return ret;
+}
+
+static struct rte_vdev_device *
+find_vdev(const char *name)
+{
+	struct rte_vdev_device *dev;
+
+	if (!name)
+		return NULL;
+
+	TAILQ_FOREACH(dev, &vdev_device_list, next) {
+		const char *devname = rte_vdev_device_name(dev);
+
+		if (!strncmp(devname, name, strlen(name)))
+			return dev;
+	}
+
+	return NULL;
+}
+
+static struct rte_devargs *
+alloc_devargs(const char *name, const char *args)
+{
+	struct rte_devargs *devargs;
+	int ret;
+
+	devargs = calloc(1, sizeof(*devargs));
+	if (!devargs)
+		return NULL;
+
+	devargs->bus = &rte_vdev_bus;
+	if (args)
+		devargs->args = strdup(args);
+	else
+		devargs->args = strdup("");
+
+	ret = snprintf(devargs->name, sizeof(devargs->name), "%s", name);
+	if (ret < 0 || ret >= (int)sizeof(devargs->name)) {
+		free(devargs->args);
+		free(devargs);
+		return NULL;
+	}
+
+	return devargs;
+}
+
+int
+rte_vdev_init(const char *name, const char *args)
+{
+	struct rte_vdev_device *dev;
+	struct rte_devargs *devargs;
+	int ret;
+
+	if (name == NULL)
+		return -EINVAL;
+
+	dev = find_vdev(name);
+	if (dev)
+		return -EEXIST;
+
+	devargs = alloc_devargs(name, args);
+	if (!devargs)
+		return -ENOMEM;
+
+	dev = calloc(1, sizeof(*dev));
+	if (!dev) {
+		ret = -ENOMEM;
+		goto fail;
+	}
+
+	dev->device.devargs = devargs;
+	dev->device.numa_node = SOCKET_ID_ANY;
+	dev->device.name = devargs->name;
+
+	ret = vdev_probe_all_drivers(dev);
+	if (ret) {
+		if (ret > 0)
+			RTE_LOG(ERR, EAL, "no driver found for %s\n", name);
+		goto fail;
+	}
+
+	TAILQ_INSERT_TAIL(&devargs_list, devargs, next);
+
+	TAILQ_INSERT_TAIL(&vdev_device_list, dev, next);
+	return 0;
+
+fail:
+	free(devargs->args);
+	free(devargs);
+	free(dev);
+	return ret;
+}
+
+static int
+vdev_remove_driver(struct rte_vdev_device *dev)
+{
+	const char *name = rte_vdev_device_name(dev);
+	const struct rte_vdev_driver *driver;
+
+	if (!dev->device.driver) {
+		RTE_LOG(DEBUG, EAL, "no driver attach to device %s\n", name);
+		return 1;
+	}
+
+	driver = container_of(dev->device.driver, const struct rte_vdev_driver,
+		driver);
+	return driver->remove(dev);
+}
+
+int
+rte_vdev_uninit(const char *name)
+{
+	struct rte_vdev_device *dev;
+	struct rte_devargs *devargs;
+	int ret;
+
+	if (name == NULL)
+		return -EINVAL;
+
+	dev = find_vdev(name);
+	if (!dev)
+		return -ENOENT;
+
+	devargs = dev->device.devargs;
+
+	ret = vdev_remove_driver(dev);
+	if (ret)
+		return ret;
+
+	TAILQ_REMOVE(&vdev_device_list, dev, next);
+
+	TAILQ_REMOVE(&devargs_list, devargs, next);
+
+	free(devargs->args);
+	free(devargs);
+	free(dev);
+	return 0;
+}
+
+static int
+vdev_scan(void)
+{
+	struct rte_vdev_device *dev;
+	struct rte_devargs *devargs;
+
+	/* for virtual devices we scan the devargs_list populated via cmdline */
+	TAILQ_FOREACH(devargs, &devargs_list, next) {
+
+		if (devargs->bus != &rte_vdev_bus)
+			continue;
+
+		dev = find_vdev(devargs->name);
+		if (dev)
+			continue;
+
+		dev = calloc(1, sizeof(*dev));
+		if (!dev)
+			return -1;
+
+		dev->device.devargs = devargs;
+		dev->device.numa_node = SOCKET_ID_ANY;
+		dev->device.name = devargs->name;
+
+		TAILQ_INSERT_TAIL(&vdev_device_list, dev, next);
+	}
+
+	return 0;
+}
+
+static int
+vdev_probe(void)
+{
+	struct rte_vdev_device *dev;
+
+	/* call the init function for each virtual device */
+	TAILQ_FOREACH(dev, &vdev_device_list, next) {
+
+		if (dev->device.driver)
+			continue;
+
+		if (vdev_probe_all_drivers(dev)) {
+			RTE_LOG(ERR, EAL, "failed to initialize %s device\n",
+				rte_vdev_device_name(dev));
+			return -1;
+		}
+	}
+
+	return 0;
+}
+
+static struct rte_device *
+vdev_find_device(const struct rte_device *start, rte_dev_cmp_t cmp,
+		 const void *data)
+{
+	struct rte_vdev_device *dev;
+
+	TAILQ_FOREACH(dev, &vdev_device_list, next) {
+		if (start && &dev->device == start) {
+			start = NULL;
+			continue;
+		}
+		if (cmp(&dev->device, data) == 0)
+			return &dev->device;
+	}
+	return NULL;
+}
+
+static int
+vdev_plug(struct rte_device *dev)
+{
+	return vdev_probe_all_drivers(RTE_DEV_TO_VDEV(dev));
+}
+
+static int
+vdev_unplug(struct rte_device *dev)
+{
+	return rte_vdev_uninit(dev->name);
+}
+
+static struct rte_bus rte_vdev_bus = {
+	.scan = vdev_scan,
+	.probe = vdev_probe,
+	.find_device = vdev_find_device,
+	.plug = vdev_plug,
+	.unplug = vdev_unplug,
+	.parse = vdev_parse,
+};
+
+RTE_REGISTER_BUS(vdev, rte_vdev_bus);
diff --git a/drivers/crypto/Makefile b/drivers/crypto/Makefile
index d551541..1cb4cdb 100644
--- a/drivers/crypto/Makefile
+++ b/drivers/crypto/Makefile
@@ -32,6 +32,7 @@
 include $(RTE_SDK)/mk/rte.vars.mk
 
 core-libs := librte_eal librte_mbuf librte_mempool librte_ring librte_cryptodev
+core-libs += librte_bus_vdev
 
 DIRS-$(CONFIG_RTE_LIBRTE_PMD_AESNI_GCM) += aesni_gcm
 DIRS-$(CONFIG_RTE_LIBRTE_PMD_AESNI_MB) += aesni_mb
diff --git a/drivers/event/Makefile b/drivers/event/Makefile
index 05dec1b..9c9ae82 100644
--- a/drivers/event/Makefile
+++ b/drivers/event/Makefile
@@ -31,7 +31,7 @@
 
 include $(RTE_SDK)/mk/rte.vars.mk
 
-core-libs := librte_eal librte_ether librte_eventdev
+core-libs := librte_eal librte_ether librte_eventdev librte_bus_vdev
 
 DIRS-$(CONFIG_RTE_LIBRTE_PMD_SKELETON_EVENTDEV) += skeleton
 DIRS-$(CONFIG_RTE_LIBRTE_PMD_SW_EVENTDEV) += sw
diff --git a/drivers/net/Makefile b/drivers/net/Makefile
index cf33233..00be153 100644
--- a/drivers/net/Makefile
+++ b/drivers/net/Makefile
@@ -37,7 +37,7 @@ ifeq ($(CONFIG_RTE_LIBRTE_THUNDERX_NICVF_PMD),d)
 endif
 
 core-libs := librte_eal librte_mbuf librte_mempool librte_ring librte_ether
-core-libs += librte_net librte_kvargs
+core-libs += librte_net librte_kvargs librte_bus_vdev
 
 DIRS-$(CONFIG_RTE_LIBRTE_PMD_AF_PACKET) += af_packet
 DIRS-$(CONFIG_RTE_LIBRTE_ARK_PMD) += ark
diff --git a/lib/librte_eal/bsdapp/eal/Makefile b/lib/librte_eal/bsdapp/eal/Makefile
index 351fa57..25a48d1 100644
--- a/lib/librte_eal/bsdapp/eal/Makefile
+++ b/lib/librte_eal/bsdapp/eal/Makefile
@@ -48,7 +48,7 @@ LDLIBS += -lgcc_s
 
 EXPORT_MAP := ../../rte_eal_version.map
 
-LIBABIVER := 6
+LIBABIVER := 7
 
 # specific to bsdapp exec-env
 SRCS-$(CONFIG_RTE_EXEC_ENV_BSDAPP) := eal.c
@@ -68,7 +68,6 @@ SRCS-$(CONFIG_RTE_EXEC_ENV_BSDAPP) += eal_common_timer.c
 SRCS-$(CONFIG_RTE_EXEC_ENV_BSDAPP) += eal_common_memzone.c
 SRCS-$(CONFIG_RTE_EXEC_ENV_BSDAPP) += eal_common_log.c
 SRCS-$(CONFIG_RTE_EXEC_ENV_BSDAPP) += eal_common_launch.c
-SRCS-$(CONFIG_RTE_EXEC_ENV_BSDAPP) += eal_common_vdev.c
 SRCS-$(CONFIG_RTE_EXEC_ENV_BSDAPP) += eal_common_pci.c
 SRCS-$(CONFIG_RTE_EXEC_ENV_BSDAPP) += eal_common_pci_uio.c
 SRCS-$(CONFIG_RTE_EXEC_ENV_BSDAPP) += eal_common_memory.c
diff --git a/lib/librte_eal/common/Makefile b/lib/librte_eal/common/Makefile
index 6f5b3f3..2fb5635 100644
--- a/lib/librte_eal/common/Makefile
+++ b/lib/librte_eal/common/Makefile
@@ -39,7 +39,7 @@ INC += rte_per_lcore.h rte_random.h
 INC += rte_tailq.h rte_interrupts.h rte_alarm.h
 INC += rte_string_fns.h rte_version.h
 INC += rte_eal_memconfig.h rte_malloc_heap.h
-INC += rte_hexdump.h rte_devargs.h rte_bus.h rte_dev.h rte_vdev.h
+INC += rte_hexdump.h rte_devargs.h rte_bus.h rte_dev.h
 INC += rte_pci_dev_feature_defs.h rte_pci_dev_features.h
 INC += rte_malloc.h rte_keepalive.h rte_time.h
 INC += rte_service.h rte_service_component.h
diff --git a/lib/librte_eal/common/eal_common_vdev.c b/lib/librte_eal/common/eal_common_vdev.c
deleted file mode 100644
index f7e547a..0000000
--- a/lib/librte_eal/common/eal_common_vdev.c
+++ /dev/null
@@ -1,342 +0,0 @@
-/*-
- *   BSD LICENSE
- *
- *   Copyright(c) 2016 RehiveTech. All rights reserved.
- *
- *   Redistribution and use in source and binary forms, with or without
- *   modification, are permitted provided that the following conditions
- *   are met:
- *
- *     * Redistributions of source code must retain the above copyright
- *       notice, this list of conditions and the following disclaimer.
- *     * Redistributions in binary form must reproduce the above copyright
- *       notice, this list of conditions and the following disclaimer in
- *       the documentation and/or other materials provided with the
- *       distribution.
- *     * Neither the name of RehiveTech nor the names of its
- *       contributors may be used to endorse or promote products derived
- *       from this software without specific prior written permission.
- *
- *   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- *   "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- *   LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- *   A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- *   OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- *   LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- *   DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- *   THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- *   (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- *   OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include <string.h>
-#include <inttypes.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <stdint.h>
-#include <stdbool.h>
-#include <sys/queue.h>
-
-#include <rte_eal.h>
-#include <rte_dev.h>
-#include <rte_bus.h>
-#include <rte_vdev.h>
-#include <rte_common.h>
-#include <rte_devargs.h>
-#include <rte_memory.h>
-#include <rte_errno.h>
-
-/* Forward declare to access virtual bus name */
-static struct rte_bus rte_vdev_bus;
-
-/** Double linked list of virtual device drivers. */
-TAILQ_HEAD(vdev_device_list, rte_vdev_device);
-
-static struct vdev_device_list vdev_device_list =
-	TAILQ_HEAD_INITIALIZER(vdev_device_list);
-struct vdev_driver_list vdev_driver_list =
-	TAILQ_HEAD_INITIALIZER(vdev_driver_list);
-
-/* register a driver */
-void
-rte_vdev_register(struct rte_vdev_driver *driver)
-{
-	TAILQ_INSERT_TAIL(&vdev_driver_list, driver, next);
-}
-
-/* unregister a driver */
-void
-rte_vdev_unregister(struct rte_vdev_driver *driver)
-{
-	TAILQ_REMOVE(&vdev_driver_list, driver, next);
-}
-
-static int
-vdev_parse(const char *name, void *addr)
-{
-	struct rte_vdev_driver **out = addr;
-	struct rte_vdev_driver *driver = NULL;
-
-	TAILQ_FOREACH(driver, &vdev_driver_list, next) {
-		if (strncmp(driver->driver.name, name,
-			    strlen(driver->driver.name)) == 0)
-			break;
-		if (driver->driver.alias &&
-		    strncmp(driver->driver.alias, name,
-			    strlen(driver->driver.alias)) == 0)
-			break;
-	}
-	if (driver != NULL &&
-	    addr != NULL)
-		*out = driver;
-	return driver == NULL;
-}
-
-static int
-vdev_probe_all_drivers(struct rte_vdev_device *dev)
-{
-	const char *name;
-	struct rte_vdev_driver *driver;
-	int ret;
-
-	name = rte_vdev_device_name(dev);
-
-	RTE_LOG(DEBUG, EAL, "Search driver %s to probe device %s\n", name,
-		rte_vdev_device_name(dev));
-
-	if (vdev_parse(name, &driver))
-		return -1;
-	dev->device.driver = &driver->driver;
-	ret = driver->probe(dev);
-	if (ret)
-		dev->device.driver = NULL;
-	return ret;
-}
-
-static struct rte_vdev_device *
-find_vdev(const char *name)
-{
-	struct rte_vdev_device *dev;
-
-	if (!name)
-		return NULL;
-
-	TAILQ_FOREACH(dev, &vdev_device_list, next) {
-		const char *devname = rte_vdev_device_name(dev);
-		if (!strncmp(devname, name, strlen(name)))
-			return dev;
-	}
-
-	return NULL;
-}
-
-static struct rte_devargs *
-alloc_devargs(const char *name, const char *args)
-{
-	struct rte_devargs *devargs;
-	int ret;
-
-	devargs = calloc(1, sizeof(*devargs));
-	if (!devargs)
-		return NULL;
-
-	devargs->bus = &rte_vdev_bus;
-	if (args)
-		devargs->args = strdup(args);
-	else
-		devargs->args = strdup("");
-
-	ret = snprintf(devargs->name, sizeof(devargs->name), "%s", name);
-	if (ret < 0 || ret >= (int)sizeof(devargs->name)) {
-		free(devargs->args);
-		free(devargs);
-		return NULL;
-	}
-
-	return devargs;
-}
-
-int
-rte_vdev_init(const char *name, const char *args)
-{
-	struct rte_vdev_device *dev;
-	struct rte_devargs *devargs;
-	int ret;
-
-	if (name == NULL)
-		return -EINVAL;
-
-	dev = find_vdev(name);
-	if (dev)
-		return -EEXIST;
-
-	devargs = alloc_devargs(name, args);
-	if (!devargs)
-		return -ENOMEM;
-
-	dev = calloc(1, sizeof(*dev));
-	if (!dev) {
-		ret = -ENOMEM;
-		goto fail;
-	}
-
-	dev->device.devargs = devargs;
-	dev->device.numa_node = SOCKET_ID_ANY;
-	dev->device.name = devargs->name;
-
-	ret = vdev_probe_all_drivers(dev);
-	if (ret) {
-		if (ret > 0)
-			RTE_LOG(ERR, EAL, "no driver found for %s\n", name);
-		goto fail;
-	}
-
-	TAILQ_INSERT_TAIL(&devargs_list, devargs, next);
-
-	TAILQ_INSERT_TAIL(&vdev_device_list, dev, next);
-	return 0;
-
-fail:
-	free(devargs->args);
-	free(devargs);
-	free(dev);
-	return ret;
-}
-
-static int
-vdev_remove_driver(struct rte_vdev_device *dev)
-{
-	const char *name = rte_vdev_device_name(dev);
-	const struct rte_vdev_driver *driver;
-
-	if (!dev->device.driver) {
-		RTE_LOG(DEBUG, EAL, "no driver attach to device %s\n", name);
-		return 1;
-	}
-
-	driver = container_of(dev->device.driver, const struct rte_vdev_driver,
-		driver);
-	return driver->remove(dev);
-}
-
-int
-rte_vdev_uninit(const char *name)
-{
-	struct rte_vdev_device *dev;
-	struct rte_devargs *devargs;
-	int ret;
-
-	if (name == NULL)
-		return -EINVAL;
-
-	dev = find_vdev(name);
-	if (!dev)
-		return -ENOENT;
-
-	devargs = dev->device.devargs;
-
-	ret = vdev_remove_driver(dev);
-	if (ret)
-		return ret;
-
-	TAILQ_REMOVE(&vdev_device_list, dev, next);
-
-	TAILQ_REMOVE(&devargs_list, devargs, next);
-
-	free(devargs->args);
-	free(devargs);
-	free(dev);
-	return 0;
-}
-
-static int
-vdev_scan(void)
-{
-	struct rte_vdev_device *dev;
-	struct rte_devargs *devargs;
-
-	/* for virtual devices we scan the devargs_list populated via cmdline */
-	TAILQ_FOREACH(devargs, &devargs_list, next) {
-
-		if (devargs->bus != &rte_vdev_bus)
-			continue;
-
-		dev = find_vdev(devargs->name);
-		if (dev)
-			continue;
-
-		dev = calloc(1, sizeof(*dev));
-		if (!dev)
-			return -1;
-
-		dev->device.devargs = devargs;
-		dev->device.numa_node = SOCKET_ID_ANY;
-		dev->device.name = devargs->name;
-
-		TAILQ_INSERT_TAIL(&vdev_device_list, dev, next);
-	}
-
-	return 0;
-}
-
-static int
-vdev_probe(void)
-{
-	struct rte_vdev_device *dev;
-
-	/* call the init function for each virtual device */
-	TAILQ_FOREACH(dev, &vdev_device_list, next) {
-
-		if (dev->device.driver)
-			continue;
-
-		if (vdev_probe_all_drivers(dev)) {
-			RTE_LOG(ERR, EAL, "failed to initialize %s device\n",
-				rte_vdev_device_name(dev));
-			return -1;
-		}
-	}
-
-	return 0;
-}
-
-static struct rte_device *
-vdev_find_device(const struct rte_device *start, rte_dev_cmp_t cmp,
-		 const void *data)
-{
-	struct rte_vdev_device *dev;
-
-	TAILQ_FOREACH(dev, &vdev_device_list, next) {
-		if (start && &dev->device == start) {
-			start = NULL;
-			continue;
-		}
-		if (cmp(&dev->device, data) == 0)
-			return &dev->device;
-	}
-	return NULL;
-}
-
-static int
-vdev_plug(struct rte_device *dev)
-{
-	return vdev_probe_all_drivers(RTE_DEV_TO_VDEV(dev));
-}
-
-static int
-vdev_unplug(struct rte_device *dev)
-{
-	return rte_vdev_uninit(dev->name);
-}
-
-static struct rte_bus rte_vdev_bus = {
-	.scan = vdev_scan,
-	.probe = vdev_probe,
-	.find_device = vdev_find_device,
-	.plug = vdev_plug,
-	.unplug = vdev_unplug,
-	.parse = vdev_parse,
-};
-
-RTE_REGISTER_BUS(vdev, rte_vdev_bus);
diff --git a/lib/librte_eal/common/include/rte_dev.h b/lib/librte_eal/common/include/rte_dev.h
index 4c4ac7e..8088dcc 100644
--- a/lib/librte_eal/common/include/rte_dev.h
+++ b/lib/librte_eal/common/include/rte_dev.h
@@ -170,28 +170,6 @@ struct rte_device {
 };
 
 /**
- * Initialize a driver specified by name.
- *
- * @param name
- *   The pointer to a driver name to be initialized.
- * @param args
- *   The pointer to arguments used by driver initialization.
- * @return
- *  0 on success, negative on error
- */
-int rte_vdev_init(const char *name, const char *args);
-
-/**
- * Uninitalize a driver specified by name.
- *
- * @param name
- *   The pointer to a driver name to be initialized.
- * @return
- *  0 on success, negative on error
- */
-int rte_vdev_uninit(const char *name);
-
-/**
  * Attach a device to a registered driver.
  *
  * @param name
@@ -316,4 +294,4 @@ __attribute__((used)) = str
 }
 #endif
 
-#endif /* _RTE_VDEV_H_ */
+#endif /* _RTE_DEV_H_ */
diff --git a/lib/librte_eal/common/include/rte_vdev.h b/lib/librte_eal/common/include/rte_vdev.h
deleted file mode 100644
index 29f5a52..0000000
--- a/lib/librte_eal/common/include/rte_vdev.h
+++ /dev/null
@@ -1,131 +0,0 @@
-/*-
- *   BSD LICENSE
- *
- *   Copyright(c) 2016 RehiveTech. All rights reserved.
- *
- *   Redistribution and use in source and binary forms, with or without
- *   modification, are permitted provided that the following conditions
- *   are met:
- *
- *     * Redistributions of source code must retain the above copyright
- *       notice, this list of conditions and the following disclaimer.
- *     * Redistributions in binary form must reproduce the above copyright
- *       notice, this list of conditions and the following disclaimer in
- *       the documentation and/or other materials provided with the
- *       distribution.
- *     * Neither the name of RehiveTech nor the names of its
- *       contributors may be used to endorse or promote products derived
- *       from this software without specific prior written permission.
- *
- *   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- *   "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- *   LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- *   A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- *   OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- *   LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- *   DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- *   THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- *   (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- *   OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef RTE_VDEV_H
-#define RTE_VDEV_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include <sys/queue.h>
-#include <rte_dev.h>
-#include <rte_devargs.h>
-
-struct rte_vdev_device {
-	TAILQ_ENTRY(rte_vdev_device) next;      /**< Next attached vdev */
-	struct rte_device device;               /**< Inherit core device */
-};
-
-/**
- * @internal
- * Helper macro for drivers that need to convert to struct rte_vdev_device.
- */
-#define RTE_DEV_TO_VDEV(ptr) \
-	container_of(ptr, struct rte_vdev_device, device)
-
-static inline const char *
-rte_vdev_device_name(const struct rte_vdev_device *dev)
-{
-	if (dev && dev->device.name)
-		return dev->device.name;
-	return NULL;
-}
-
-static inline const char *
-rte_vdev_device_args(const struct rte_vdev_device *dev)
-{
-	if (dev && dev->device.devargs)
-		return dev->device.devargs->args;
-	return "";
-}
-
-/** Double linked list of virtual device drivers. */
-TAILQ_HEAD(vdev_driver_list, rte_vdev_driver);
-
-/**
- * Probe function called for each virtual device driver once.
- */
-typedef int (rte_vdev_probe_t)(struct rte_vdev_device *dev);
-
-/**
- * Remove function called for each virtual device driver once.
- */
-typedef int (rte_vdev_remove_t)(struct rte_vdev_device *dev);
-
-/**
- * A virtual device driver abstraction.
- */
-struct rte_vdev_driver {
-	TAILQ_ENTRY(rte_vdev_driver) next; /**< Next in list. */
-	struct rte_driver driver;      /**< Inherited general driver. */
-	rte_vdev_probe_t *probe;       /**< Virtual device probe function. */
-	rte_vdev_remove_t *remove;     /**< Virtual device remove function. */
-};
-
-/**
- * Register a virtual device driver.
- *
- * @param driver
- *   A pointer to a rte_vdev_driver structure describing the driver
- *   to be registered.
- */
-void rte_vdev_register(struct rte_vdev_driver *driver);
-
-/**
- * Unregister a virtual device driver.
- *
- * @param driver
- *   A pointer to a rte_vdev_driver structure describing the driver
- *   to be unregistered.
- */
-void rte_vdev_unregister(struct rte_vdev_driver *driver);
-
-#define RTE_PMD_REGISTER_VDEV(nm, vdrv)\
-RTE_INIT(vdrvinitfn_ ##vdrv);\
-static const char *vdrvinit_ ## nm ## _alias;\
-static void vdrvinitfn_ ##vdrv(void)\
-{\
-	(vdrv).driver.name = RTE_STR(nm);\
-	(vdrv).driver.alias = vdrvinit_ ## nm ## _alias;\
-	rte_vdev_register(&vdrv);\
-} \
-RTE_PMD_EXPORT_NAME(nm, __COUNTER__)
-
-#define RTE_PMD_REGISTER_ALIAS(nm, alias)\
-static const char *vdrvinit_ ## nm ## _alias = RTE_STR(alias)
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
diff --git a/lib/librte_eal/linuxapp/eal/Makefile b/lib/librte_eal/linuxapp/eal/Makefile
index 965da6e..eef80eb 100644
--- a/lib/librte_eal/linuxapp/eal/Makefile
+++ b/lib/librte_eal/linuxapp/eal/Makefile
@@ -37,7 +37,7 @@ ARCH_DIR ?= $(RTE_ARCH)
 EXPORT_MAP := ../../rte_eal_version.map
 VPATH += $(RTE_SDK)/lib/librte_eal/common/arch/$(ARCH_DIR)
 
-LIBABIVER := 6
+LIBABIVER := 7
 
 VPATH += $(RTE_SDK)/lib/librte_eal/common
 
@@ -77,7 +77,6 @@ SRCS-$(CONFIG_RTE_EXEC_ENV_LINUXAPP) += eal_common_timer.c
 SRCS-$(CONFIG_RTE_EXEC_ENV_LINUXAPP) += eal_common_memzone.c
 SRCS-$(CONFIG_RTE_EXEC_ENV_LINUXAPP) += eal_common_log.c
 SRCS-$(CONFIG_RTE_EXEC_ENV_LINUXAPP) += eal_common_launch.c
-SRCS-$(CONFIG_RTE_EXEC_ENV_LINUXAPP) += eal_common_vdev.c
 SRCS-$(CONFIG_RTE_EXEC_ENV_LINUXAPP) += eal_common_pci.c
 SRCS-$(CONFIG_RTE_EXEC_ENV_LINUXAPP) += eal_common_pci_uio.c
 SRCS-$(CONFIG_RTE_EXEC_ENV_LINUXAPP) += eal_common_memory.c
diff --git a/lib/librte_eal/rte_eal_version.map b/lib/librte_eal/rte_eal_version.map
index 8eb53ab..f9edb29 100644
--- a/lib/librte_eal/rte_eal_version.map
+++ b/lib/librte_eal/rte_eal_version.map
@@ -181,10 +181,6 @@ DPDK_17.05 {
 	rte_pci_unmap_device;
 	rte_pci_unregister;
 	rte_pci_write_config;
-	rte_vdev_init;
-	rte_vdev_register;
-	rte_vdev_uninit;
-	rte_vdev_unregister;
 	vfio_get_container_fd;
 	vfio_get_group_fd;
 	vfio_get_group_no;
diff --git a/mk/rte.app.mk b/mk/rte.app.mk
index 482656c..6780f4f 100644
--- a/mk/rte.app.mk
+++ b/mk/rte.app.mk
@@ -99,6 +99,7 @@ _LDLIBS-$(CONFIG_RTE_LIBRTE_MEMPOOL)        += -lrte_mempool
 _LDLIBS-$(CONFIG_RTE_DRIVER_MEMPOOL_RING)   += -lrte_mempool_ring
 _LDLIBS-$(CONFIG_RTE_LIBRTE_RING)           += -lrte_ring
 _LDLIBS-$(CONFIG_RTE_LIBRTE_EAL)            += -lrte_eal
+_LDLIBS-$(CONFIG_RTE_LIBRTE_VDEV_BUS)       += -lrte_bus_vdev
 _LDLIBS-$(CONFIG_RTE_LIBRTE_CMDLINE)        += -lrte_cmdline
 _LDLIBS-$(CONFIG_RTE_LIBRTE_REORDER)        += -lrte_reorder
 _LDLIBS-$(CONFIG_RTE_LIBRTE_SCHED)          += -lrte_sched
diff --git a/test/test/test_cryptodev.c b/test/test/test_cryptodev.c
index a926779..2e80062 100644
--- a/test/test/test_cryptodev.c
+++ b/test/test/test_cryptodev.c
@@ -36,6 +36,7 @@
 #include <rte_malloc.h>
 #include <rte_memcpy.h>
 #include <rte_pause.h>
+#include <rte_vdev.h>
 
 #include <rte_crypto.h>
 #include <rte_cryptodev.h>
diff --git a/test/test/test_event_eth_rx_adapter.c b/test/test/test_event_eth_rx_adapter.c
index 56ed1f8..c0b864b 100644
--- a/test/test/test_event_eth_rx_adapter.c
+++ b/test/test/test_event_eth_rx_adapter.c
@@ -35,6 +35,7 @@
 #include <rte_mbuf.h>
 #include <rte_ethdev.h>
 #include <rte_eventdev.h>
+#include <rte_vdev.h>
 
 #include <rte_event_eth_rx_adapter.h>
 
diff --git a/test/test/test_eventdev.c b/test/test/test_eventdev.c
index d6ade78..e3d36f3 100644
--- a/test/test/test_eventdev.c
+++ b/test/test/test_eventdev.c
@@ -37,6 +37,7 @@
 #include <rte_memcpy.h>
 #include <rte_eventdev.h>
 #include <rte_dev.h>
+#include <rte_vdev.h>
 
 #include "test.h"
 
diff --git a/test/test/test_eventdev_octeontx.c b/test/test/test_eventdev_octeontx.c
index b88b0d2..ecae3e9 100644
--- a/test/test/test_eventdev_octeontx.c
+++ b/test/test/test_eventdev_octeontx.c
@@ -45,6 +45,7 @@
 #include <rte_lcore.h>
 #include <rte_per_lcore.h>
 #include <rte_random.h>
+#include <rte_vdev.h>
 
 #include "test.h"
 
diff --git a/test/test/test_eventdev_sw.c b/test/test/test_eventdev_sw.c
index 7219886..385e743 100644
--- a/test/test/test_eventdev_sw.c
+++ b/test/test/test_eventdev_sw.c
@@ -49,6 +49,7 @@
 #include <rte_cycles.h>
 #include <rte_eventdev.h>
 #include <rte_pause.h>
+#include <rte_vdev.h>
 
 #include "test.h"
 
diff --git a/test/test/test_link_bonding_rssconf.c b/test/test/test_link_bonding_rssconf.c
index 7dccc6e..6199188 100644
--- a/test/test/test_link_bonding_rssconf.c
+++ b/test/test/test_link_bonding_rssconf.c
@@ -48,6 +48,7 @@
 #include <rte_log.h>
 #include <rte_lcore.h>
 #include <rte_memory.h>
+#include <rte_vdev.h>
 
 #include <rte_string_fns.h>
 #include <rte_errno.h>
-- 
2.7.4

^ permalink raw reply	[relevance 1%]

* Re: [dpdk-dev] [PATCH v8 3/4] bus/vdev: move to vdev bus to drivers/bus
  2017-10-25 17:10  1%   ` [dpdk-dev] [PATCH v8 3/4] bus/vdev: move to vdev bus to drivers/bus Jianfeng Tan
@ 2017-10-25 21:32  3%     ` De Lara Guarch, Pablo
  0 siblings, 0 replies; 200+ results
From: De Lara Guarch, Pablo @ 2017-10-25 21:32 UTC (permalink / raw)
  To: Tan, Jianfeng, dev
  Cc: jblunck, Richardson, Bruce, Ananyev, Konstantin, thomas, yliu,
	maxime.coquelin, mtetsuyah, Yigit, Ferruh

Hi Jianfeng,

> -----Original Message-----
> From: Tan, Jianfeng
> Sent: Wednesday, October 25, 2017 6:11 PM
> To: dev@dpdk.org
> Cc: jblunck@infradead.org; Richardson, Bruce
> <bruce.richardson@intel.com>; Ananyev, Konstantin
> <konstantin.ananyev@intel.com>; De Lara Guarch, Pablo
> <pablo.de.lara.guarch@intel.com>; thomas@monjalon.net;
> yliu@fridaylinux.org; maxime.coquelin@redhat.com;
> mtetsuyah@gmail.com; Yigit, Ferruh <ferruh.yigit@intel.com>; Tan,
> Jianfeng <jianfeng.tan@intel.com>
> Subject: [PATCH v8 3/4] bus/vdev: move to vdev bus to drivers/bus
> 
> Move the vdev bus from lib/librte_eal to drivers/bus.
> 
> As the crypto vdev helper function refers to data structure in rte_vdev.h, so
> we move those helper function into drivers/bus too.
> 
> Signed-off-by: Jianfeng Tan <jianfeng.tan@intel.com>

...

>  ABI Changes
>  -----------
> 
> @@ -355,11 +362,12 @@ The libraries prepended with a plus sign were
> incremented in this version.
> 
>       librte_acl.so.2
>     + librte_bitratestats.so.2
> +   + librte_bus_vdev.so.1
>       librte_cfgfile.so.2
>       librte_cmdline.so.2
>       librte_cryptodev.so.4
>       librte_distributor.so.1
> -   + librte_eal.so.6
> +   + librte_eal.so.7

EAL ABI version has been bumped already in this release,
so there is no need to do it again.

^ permalink raw reply	[relevance 3%]

* [dpdk-dev] [PATCH v7 24/25] doc: add notes on EAL PCI API update
  @ 2017-10-25 22:38  4%         ` Gaetan Rivet
    1 sibling, 0 replies; 200+ results
From: Gaetan Rivet @ 2017-10-25 22:38 UTC (permalink / raw)
  To: dev; +Cc: Gaetan Rivet

Add a section related to EAL API changes to 17.11 release notes.

Signed-off-by: Gaetan Rivet <gaetan.rivet@6wind.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
---
 doc/guides/rel_notes/release_17_11.rst | 28 ++++++++++++++++++++++++++++
 1 file changed, 28 insertions(+)

diff --git a/doc/guides/rel_notes/release_17_11.rst b/doc/guides/rel_notes/release_17_11.rst
index 3298ef5..5aa0f4d 100644
--- a/doc/guides/rel_notes/release_17_11.rst
+++ b/doc/guides/rel_notes/release_17_11.rst
@@ -297,6 +297,34 @@ API Changes
   ``rte_log_get_global_level()``, ``rte_log_set_level()`` and
   ``rte_log_get_level()``.
 
+* **PCI bus API moved outside of the EAL**
+
+  The PCI bus previously implemented within the EAL has been moved.
+  A first part has been added as an RTE library providing PCI helpers to
+  parse device locations or other such utilities.
+  A second part consisting in the actual bus driver has been moved to its
+  proper subdirectory, without changing its functionalities.
+
+  As such, several PCI-related functions are not proposed by the EAL anymore:
+
+  * rte_pci_detach
+  * rte_pci_dump
+  * rte_pci_ioport_map
+  * rte_pci_ioport_read
+  * rte_pci_ioport_unmap
+  * rte_pci_ioport_write
+  * rte_pci_map_device
+  * rte_pci_probe
+  * rte_pci_probe_one
+  * rte_pci_read_config
+  * rte_pci_register
+  * rte_pci_scan
+  * rte_pci_unmap_device
+  * rte_pci_unregister
+  * rte_pci_write_config
+
+  These functions are made available either as part of ``librte_pci`` or
+  ``librte_bus_pci``.
 
 ABI Changes
 -----------
-- 
2.1.4

^ permalink raw reply	[relevance 4%]

* [dpdk-dev] [PATCH v8 24/25] doc: add notes on EAL PCI API update
  @ 2017-10-26 10:06  4%           ` Gaetan Rivet
  0 siblings, 0 replies; 200+ results
From: Gaetan Rivet @ 2017-10-26 10:06 UTC (permalink / raw)
  To: dev; +Cc: Gaetan Rivet

Add a section related to EAL API changes to 17.11 release notes.

Signed-off-by: Gaetan Rivet <gaetan.rivet@6wind.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
---
 doc/guides/rel_notes/release_17_11.rst | 28 ++++++++++++++++++++++++++++
 1 file changed, 28 insertions(+)

diff --git a/doc/guides/rel_notes/release_17_11.rst b/doc/guides/rel_notes/release_17_11.rst
index 93f94fc..6619711 100644
--- a/doc/guides/rel_notes/release_17_11.rst
+++ b/doc/guides/rel_notes/release_17_11.rst
@@ -369,6 +369,34 @@ API Changes
   the backing device supports the operation or if the operation was
   successfully performed.
 
+* **PCI bus API moved outside of the EAL**
+
+  The PCI bus previously implemented within the EAL has been moved.
+  A first part has been added as an RTE library providing PCI helpers to
+  parse device locations or other such utilities.
+  A second part consisting in the actual bus driver has been moved to its
+  proper subdirectory, without changing its functionalities.
+
+  As such, several PCI-related functions are not proposed by the EAL anymore:
+
+  * rte_pci_detach
+  * rte_pci_dump
+  * rte_pci_ioport_map
+  * rte_pci_ioport_read
+  * rte_pci_ioport_unmap
+  * rte_pci_ioport_write
+  * rte_pci_map_device
+  * rte_pci_probe
+  * rte_pci_probe_one
+  * rte_pci_read_config
+  * rte_pci_register
+  * rte_pci_scan
+  * rte_pci_unmap_device
+  * rte_pci_unregister
+  * rte_pci_write_config
+
+  These functions are made available either as part of ``librte_pci`` or
+  ``librte_bus_pci``.
 
 ABI Changes
 -----------
-- 
2.1.4

^ permalink raw reply	[relevance 4%]

* [dpdk-dev] [PATCH v9 1/4] cryptodev: remove crypto vdev init API
  @ 2017-10-27  1:06  4%   ` Jianfeng Tan
  2017-10-27  1:06  1%   ` [dpdk-dev] [PATCH v9 3/4] bus/vdev: move to vdev bus to drivers/bus Jianfeng Tan
  1 sibling, 0 replies; 200+ results
From: Jianfeng Tan @ 2017-10-27  1:06 UTC (permalink / raw)
  To: dev
  Cc: jblunck, bruce.richardson, konstantin.ananyev,
	pablo.de.lara.guarch, thomas, yliu, maxime.coquelin, mtetsuyah,
	ferruh.yigit, Jianfeng Tan

Remove rte_cryptodev_create_vdev() for duplication.

Signed-off-by: Jianfeng Tan <jianfeng.tan@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
---
 doc/guides/rel_notes/deprecation.rst           |  5 -----
 doc/guides/rel_notes/release_17_11.rst         |  2 ++
 lib/librte_cryptodev/rte_cryptodev.c           |  6 ------
 lib/librte_cryptodev/rte_cryptodev.h           | 17 -----------------
 lib/librte_cryptodev/rte_cryptodev_version.map |  1 -
 5 files changed, 2 insertions(+), 29 deletions(-)

diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst
index 3a5d093..6d859c0 100644
--- a/doc/guides/rel_notes/deprecation.rst
+++ b/doc/guides/rel_notes/deprecation.rst
@@ -66,11 +66,6 @@ Deprecation Notices
   ``rte_cryptodev`` respectively to support security protocol offloaded
   operations.
 
-* cryptodev: the following function is deprecated starting from 17.08 and will
-  be removed in 17.11:
-
-  - ``rte_cryptodev_create_vdev``
-
 * cryptodev: the following function will be static in 17.11 and included
   by all crypto drivers, therefore, will not be public:
 
diff --git a/doc/guides/rel_notes/release_17_11.rst b/doc/guides/rel_notes/release_17_11.rst
index 3298ef5..06de87b 100644
--- a/doc/guides/rel_notes/release_17_11.rst
+++ b/doc/guides/rel_notes/release_17_11.rst
@@ -297,6 +297,8 @@ API Changes
   ``rte_log_get_global_level()``, ``rte_log_set_level()`` and
   ``rte_log_get_level()``.
 
+* ``rte_cryptodev_create_vdev`` was removed to avoid the dependency on vdev
+  in librte_cryptodev; instead, users can call rte_vdev_init() directly.
 
 ABI Changes
 -----------
diff --git a/lib/librte_cryptodev/rte_cryptodev.c b/lib/librte_cryptodev/rte_cryptodev.c
index 21da40e..279b861 100644
--- a/lib/librte_cryptodev/rte_cryptodev.c
+++ b/lib/librte_cryptodev/rte_cryptodev.c
@@ -377,12 +377,6 @@ rte_cryptodev_get_feature_name(uint64_t flag)
 	}
 }
 
-int
-rte_cryptodev_create_vdev(const char *name, const char *args)
-{
-	return rte_vdev_init(name, args);
-}
-
 struct rte_cryptodev *
 rte_cryptodev_pmd_get_dev(uint8_t dev_id)
 {
diff --git a/lib/librte_cryptodev/rte_cryptodev.h b/lib/librte_cryptodev/rte_cryptodev.h
index b74bbdd..f8341cf 100644
--- a/lib/librte_cryptodev/rte_cryptodev.h
+++ b/lib/librte_cryptodev/rte_cryptodev.h
@@ -433,23 +433,6 @@ struct rte_cryptodev_stats {
 /**< Max length of name of crypto PMD */
 
 /**
- * @deprecated
- *
- * Create a virtual crypto device
- *
- * @param	name	Cryptodev PMD name of device to be created.
- * @param	args	Options arguments for device.
- *
- * @return
- * - On successful creation of the cryptodev the device index is returned,
- *   which will be between 0 and rte_cryptodev_count().
- * - In the case of a failure, returns -1.
- */
-__rte_deprecated
-extern int
-rte_cryptodev_create_vdev(const char *name, const char *args);
-
-/**
  * Get the device identifier for the named crypto device.
  *
  * @param	name	device name to select the device structure.
diff --git a/lib/librte_cryptodev/rte_cryptodev_version.map b/lib/librte_cryptodev/rte_cryptodev_version.map
index 874c1b5..f148872 100644
--- a/lib/librte_cryptodev/rte_cryptodev_version.map
+++ b/lib/librte_cryptodev/rte_cryptodev_version.map
@@ -7,7 +7,6 @@ DPDK_16.04 {
 	rte_cryptodev_close;
 	rte_cryptodev_count;
 	rte_cryptodev_configure;
-	rte_cryptodev_create_vdev;
 	rte_cryptodev_get_dev_id;
 	rte_cryptodev_get_feature_name;
 	rte_cryptodev_info_get;
-- 
2.7.4

^ permalink raw reply	[relevance 4%]

* [dpdk-dev] [PATCH v9 3/4] bus/vdev: move to vdev bus to drivers/bus
    2017-10-27  1:06  4%   ` [dpdk-dev] [PATCH v9 1/4] cryptodev: remove crypto vdev init API Jianfeng Tan
@ 2017-10-27  1:06  1%   ` Jianfeng Tan
  1 sibling, 0 replies; 200+ results
From: Jianfeng Tan @ 2017-10-27  1:06 UTC (permalink / raw)
  To: dev
  Cc: jblunck, bruce.richardson, konstantin.ananyev,
	pablo.de.lara.guarch, thomas, yliu, maxime.coquelin, mtetsuyah,
	ferruh.yigit, Jianfeng Tan

Move the vdev bus from lib/librte_eal to drivers/bus.

As the crypto vdev helper function refers to data structure
in rte_vdev.h, so we move those helper function into drivers/bus
too.

Signed-off-by: Jianfeng Tan <jianfeng.tan@intel.com>
---
 config/common_base                        |   5 +
 doc/guides/rel_notes/release_17_11.rst    |   8 +
 drivers/bus/Makefile                      |   4 +-
 drivers/bus/vdev/Makefile                 |  57 +++++
 drivers/bus/vdev/rte_bus_vdev_version.map |   8 +
 drivers/bus/vdev/rte_vdev.h               | 153 +++++++++++++
 drivers/bus/vdev/vdev.c                   | 344 ++++++++++++++++++++++++++++++
 drivers/crypto/Makefile                   |   1 +
 drivers/event/Makefile                    |   2 +-
 drivers/net/Makefile                      |   2 +-
 lib/librte_eal/bsdapp/eal/Makefile        |   3 +-
 lib/librte_eal/common/Makefile            |   2 +-
 lib/librte_eal/common/eal_common_vdev.c   | 342 -----------------------------
 lib/librte_eal/common/include/rte_dev.h   |  24 +--
 lib/librte_eal/common/include/rte_vdev.h  | 131 ------------
 lib/librte_eal/linuxapp/eal/Makefile      |   3 +-
 lib/librte_eal/rte_eal_version.map        |   4 -
 mk/rte.app.mk                             |   1 +
 test/test/test_cryptodev.c                |   1 +
 test/test/test_event_eth_rx_adapter.c     |   1 +
 test/test/test_eventdev.c                 |   1 +
 test/test/test_eventdev_octeontx.c        |   1 +
 test/test/test_eventdev_sw.c              |   1 +
 test/test/test_link_bonding_rssconf.c     |   1 +
 24 files changed, 591 insertions(+), 509 deletions(-)
 create mode 100644 drivers/bus/vdev/Makefile
 create mode 100644 drivers/bus/vdev/rte_bus_vdev_version.map
 create mode 100644 drivers/bus/vdev/rte_vdev.h
 create mode 100644 drivers/bus/vdev/vdev.c
 delete mode 100644 lib/librte_eal/common/eal_common_vdev.c
 delete mode 100644 lib/librte_eal/common/include/rte_vdev.h

diff --git a/config/common_base b/config/common_base
index 4ddde59..65b13e5 100644
--- a/config/common_base
+++ b/config/common_base
@@ -800,3 +800,8 @@ CONFIG_RTE_APP_CRYPTO_PERF=y
 # Compile the eventdev application
 #
 CONFIG_RTE_APP_EVENTDEV=y
+
+#
+# Compile the vdev bus
+#
+CONFIG_RTE_LIBRTE_VDEV_BUS=y
diff --git a/doc/guides/rel_notes/release_17_11.rst b/doc/guides/rel_notes/release_17_11.rst
index 06de87b..58d4c58 100644
--- a/doc/guides/rel_notes/release_17_11.rst
+++ b/doc/guides/rel_notes/release_17_11.rst
@@ -300,6 +300,13 @@ API Changes
 * ``rte_cryptodev_create_vdev`` was removed to avoid the dependency on vdev
   in librte_cryptodev; instead, users can call rte_vdev_init() directly.
 
+* **Moved the following APIs from eal library to bus_vdev library**
+
+  * ``rte_vdev_init``
+  * ``rte_vdev_register``
+  * ``rte_vdev_uninit``
+  * ``rte_vdev_unregister``
+
 ABI Changes
 -----------
 
@@ -355,6 +362,7 @@ The libraries prepended with a plus sign were incremented in this version.
 
      librte_acl.so.2
    + librte_bitratestats.so.2
+   + librte_bus_vdev.so.1
      librte_cfgfile.so.2
      librte_cmdline.so.2
      librte_cryptodev.so.3
diff --git a/drivers/bus/Makefile b/drivers/bus/Makefile
index 4b29e3d..038e10c 100644
--- a/drivers/bus/Makefile
+++ b/drivers/bus/Makefile
@@ -30,10 +30,10 @@
 
 include $(RTE_SDK)/mk/rte.vars.mk
 
-core-libs := librte_eal librte_mbuf librte_mempool librte_ring librte_ether
-
 DIRS-$(CONFIG_RTE_LIBRTE_DPAA_BUS) += dpaa
 
 DIRS-$(CONFIG_RTE_LIBRTE_FSLMC_BUS) += fslmc
 
+DIRS-$(CONFIG_RTE_LIBRTE_VDEV_BUS) += vdev
+
 include $(RTE_SDK)/mk/rte.subdir.mk
diff --git a/drivers/bus/vdev/Makefile b/drivers/bus/vdev/Makefile
new file mode 100644
index 0000000..fe31654
--- /dev/null
+++ b/drivers/bus/vdev/Makefile
@@ -0,0 +1,57 @@
+#   BSD LICENSE
+#
+#   Copyright(c) 2017 Intel Corporation. All rights reserved.
+#   All rights reserved.
+#
+#   Redistribution and use in source and binary forms, with or without
+#   modification, are permitted provided that the following conditions
+#   are met:
+#
+#     * Redistributions of source code must retain the above copyright
+#       notice, this list of conditions and the following disclaimer.
+#     * Redistributions in binary form must reproduce the above copyright
+#       notice, this list of conditions and the following disclaimer in
+#       the documentation and/or other materials provided with the
+#       distribution.
+#     * Neither the name of Intel Corporation nor the names of its
+#       contributors may be used to endorse or promote products derived
+#       from this software without specific prior written permission.
+#
+#   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+#   "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+#   LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+#   A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+#   OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+#   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+#   LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+#   DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+#   THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+#   (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+#   OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+include $(RTE_SDK)/mk/rte.vars.mk
+
+#
+# library name
+#
+LIB = librte_bus_vdev.a
+
+CFLAGS += -O3
+CFLAGS += $(WERROR_FLAGS)
+
+# versioning export map
+EXPORT_MAP := rte_bus_vdev_version.map
+
+# library version
+LIBABIVER := 1
+
+SRCS-y += vdev.c
+
+LDLIBS += -lrte_eal
+
+#
+# Export include files
+#
+SYMLINK-y-include += rte_vdev.h
+
+include $(RTE_SDK)/mk/rte.lib.mk
diff --git a/drivers/bus/vdev/rte_bus_vdev_version.map b/drivers/bus/vdev/rte_bus_vdev_version.map
new file mode 100644
index 0000000..6ccb789
--- /dev/null
+++ b/drivers/bus/vdev/rte_bus_vdev_version.map
@@ -0,0 +1,8 @@
+DPDK_17.11 {
+	global:
+
+	rte_vdev_init;
+	rte_vdev_register;
+	rte_vdev_uninit;
+	rte_vdev_unregister;
+};
diff --git a/drivers/bus/vdev/rte_vdev.h b/drivers/bus/vdev/rte_vdev.h
new file mode 100644
index 0000000..41762b8
--- /dev/null
+++ b/drivers/bus/vdev/rte_vdev.h
@@ -0,0 +1,153 @@
+/*-
+ *   BSD LICENSE
+ *
+ *   Copyright(c) 2016 RehiveTech. All rights reserved.
+ *
+ *   Redistribution and use in source and binary forms, with or without
+ *   modification, are permitted provided that the following conditions
+ *   are met:
+ *
+ *     * Redistributions of source code must retain the above copyright
+ *       notice, this list of conditions and the following disclaimer.
+ *     * Redistributions in binary form must reproduce the above copyright
+ *       notice, this list of conditions and the following disclaimer in
+ *       the documentation and/or other materials provided with the
+ *       distribution.
+ *     * Neither the name of RehiveTech nor the names of its
+ *       contributors may be used to endorse or promote products derived
+ *       from this software without specific prior written permission.
+ *
+ *   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ *   "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ *   LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ *   A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ *   OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ *   LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ *   DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ *   THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ *   (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ *   OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef RTE_VDEV_H
+#define RTE_VDEV_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include <sys/queue.h>
+#include <rte_dev.h>
+#include <rte_devargs.h>
+
+struct rte_vdev_device {
+	TAILQ_ENTRY(rte_vdev_device) next;      /**< Next attached vdev */
+	struct rte_device device;               /**< Inherit core device */
+};
+
+/**
+ * @internal
+ * Helper macro for drivers that need to convert to struct rte_vdev_device.
+ */
+#define RTE_DEV_TO_VDEV(ptr) \
+	container_of(ptr, struct rte_vdev_device, device)
+
+static inline const char *
+rte_vdev_device_name(const struct rte_vdev_device *dev)
+{
+	if (dev && dev->device.name)
+		return dev->device.name;
+	return NULL;
+}
+
+static inline const char *
+rte_vdev_device_args(const struct rte_vdev_device *dev)
+{
+	if (dev && dev->device.devargs)
+		return dev->device.devargs->args;
+	return "";
+}
+
+/** Double linked list of virtual device drivers. */
+TAILQ_HEAD(vdev_driver_list, rte_vdev_driver);
+
+/**
+ * Probe function called for each virtual device driver once.
+ */
+typedef int (rte_vdev_probe_t)(struct rte_vdev_device *dev);
+
+/**
+ * Remove function called for each virtual device driver once.
+ */
+typedef int (rte_vdev_remove_t)(struct rte_vdev_device *dev);
+
+/**
+ * A virtual device driver abstraction.
+ */
+struct rte_vdev_driver {
+	TAILQ_ENTRY(rte_vdev_driver) next; /**< Next in list. */
+	struct rte_driver driver;      /**< Inherited general driver. */
+	rte_vdev_probe_t *probe;       /**< Virtual device probe function. */
+	rte_vdev_remove_t *remove;     /**< Virtual device remove function. */
+};
+
+/**
+ * Register a virtual device driver.
+ *
+ * @param driver
+ *   A pointer to a rte_vdev_driver structure describing the driver
+ *   to be registered.
+ */
+void rte_vdev_register(struct rte_vdev_driver *driver);
+
+/**
+ * Unregister a virtual device driver.
+ *
+ * @param driver
+ *   A pointer to a rte_vdev_driver structure describing the driver
+ *   to be unregistered.
+ */
+void rte_vdev_unregister(struct rte_vdev_driver *driver);
+
+#define RTE_PMD_REGISTER_VDEV(nm, vdrv)\
+RTE_INIT(vdrvinitfn_ ##vdrv);\
+static const char *vdrvinit_ ## nm ## _alias;\
+static void vdrvinitfn_ ##vdrv(void)\
+{\
+	(vdrv).driver.name = RTE_STR(nm);\
+	(vdrv).driver.alias = vdrvinit_ ## nm ## _alias;\
+	rte_vdev_register(&vdrv);\
+} \
+RTE_PMD_EXPORT_NAME(nm, __COUNTER__)
+
+#define RTE_PMD_REGISTER_ALIAS(nm, alias)\
+static const char *vdrvinit_ ## nm ## _alias = RTE_STR(alias)
+
+/**
+ * Initialize a driver specified by name.
+ *
+ * @param name
+ *   The pointer to a driver name to be initialized.
+ * @param args
+ *   The pointer to arguments used by driver initialization.
+ * @return
+ *  0 on success, negative on error
+ */
+int rte_vdev_init(const char *name, const char *args);
+
+/**
+ * Uninitalize a driver specified by name.
+ *
+ * @param name
+ *   The pointer to a driver name to be initialized.
+ * @return
+ *  0 on success, negative on error
+ */
+int rte_vdev_uninit(const char *name);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/drivers/bus/vdev/vdev.c b/drivers/bus/vdev/vdev.c
new file mode 100644
index 0000000..a16eb71
--- /dev/null
+++ b/drivers/bus/vdev/vdev.c
@@ -0,0 +1,344 @@
+/*-
+ *   BSD LICENSE
+ *
+ *   Copyright(c) 2016 RehiveTech. All rights reserved.
+ *
+ *   Redistribution and use in source and binary forms, with or without
+ *   modification, are permitted provided that the following conditions
+ *   are met:
+ *
+ *     * Redistributions of source code must retain the above copyright
+ *       notice, this list of conditions and the following disclaimer.
+ *     * Redistributions in binary form must reproduce the above copyright
+ *       notice, this list of conditions and the following disclaimer in
+ *       the documentation and/or other materials provided with the
+ *       distribution.
+ *     * Neither the name of RehiveTech nor the names of its
+ *       contributors may be used to endorse or promote products derived
+ *       from this software without specific prior written permission.
+ *
+ *   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ *   "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ *   LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ *   A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ *   OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ *   LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ *   DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ *   THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ *   (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ *   OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include <string.h>
+#include <inttypes.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <stdint.h>
+#include <stdbool.h>
+#include <sys/queue.h>
+
+#include <rte_eal.h>
+#include <rte_dev.h>
+#include <rte_bus.h>
+#include <rte_common.h>
+#include <rte_devargs.h>
+#include <rte_memory.h>
+#include <rte_errno.h>
+
+#include "rte_vdev.h"
+
+/* Forward declare to access virtual bus name */
+static struct rte_bus rte_vdev_bus;
+
+/** Double linked list of virtual device drivers. */
+TAILQ_HEAD(vdev_device_list, rte_vdev_device);
+
+static struct vdev_device_list vdev_device_list =
+	TAILQ_HEAD_INITIALIZER(vdev_device_list);
+struct vdev_driver_list vdev_driver_list =
+	TAILQ_HEAD_INITIALIZER(vdev_driver_list);
+
+/* register a driver */
+void
+rte_vdev_register(struct rte_vdev_driver *driver)
+{
+	TAILQ_INSERT_TAIL(&vdev_driver_list, driver, next);
+}
+
+/* unregister a driver */
+void
+rte_vdev_unregister(struct rte_vdev_driver *driver)
+{
+	TAILQ_REMOVE(&vdev_driver_list, driver, next);
+}
+
+static int
+vdev_parse(const char *name, void *addr)
+{
+	struct rte_vdev_driver **out = addr;
+	struct rte_vdev_driver *driver = NULL;
+
+	TAILQ_FOREACH(driver, &vdev_driver_list, next) {
+		if (strncmp(driver->driver.name, name,
+			    strlen(driver->driver.name)) == 0)
+			break;
+		if (driver->driver.alias &&
+		    strncmp(driver->driver.alias, name,
+			    strlen(driver->driver.alias)) == 0)
+			break;
+	}
+	if (driver != NULL &&
+	    addr != NULL)
+		*out = driver;
+	return driver == NULL;
+}
+
+static int
+vdev_probe_all_drivers(struct rte_vdev_device *dev)
+{
+	const char *name;
+	struct rte_vdev_driver *driver;
+	int ret;
+
+	name = rte_vdev_device_name(dev);
+
+	RTE_LOG(DEBUG, EAL, "Search driver %s to probe device %s\n", name,
+		rte_vdev_device_name(dev));
+
+	if (vdev_parse(name, &driver))
+		return -1;
+	dev->device.driver = &driver->driver;
+	ret = driver->probe(dev);
+	if (ret)
+		dev->device.driver = NULL;
+	return ret;
+}
+
+static struct rte_vdev_device *
+find_vdev(const char *name)
+{
+	struct rte_vdev_device *dev;
+
+	if (!name)
+		return NULL;
+
+	TAILQ_FOREACH(dev, &vdev_device_list, next) {
+		const char *devname = rte_vdev_device_name(dev);
+
+		if (!strncmp(devname, name, strlen(name)))
+			return dev;
+	}
+
+	return NULL;
+}
+
+static struct rte_devargs *
+alloc_devargs(const char *name, const char *args)
+{
+	struct rte_devargs *devargs;
+	int ret;
+
+	devargs = calloc(1, sizeof(*devargs));
+	if (!devargs)
+		return NULL;
+
+	devargs->bus = &rte_vdev_bus;
+	if (args)
+		devargs->args = strdup(args);
+	else
+		devargs->args = strdup("");
+
+	ret = snprintf(devargs->name, sizeof(devargs->name), "%s", name);
+	if (ret < 0 || ret >= (int)sizeof(devargs->name)) {
+		free(devargs->args);
+		free(devargs);
+		return NULL;
+	}
+
+	return devargs;
+}
+
+int
+rte_vdev_init(const char *name, const char *args)
+{
+	struct rte_vdev_device *dev;
+	struct rte_devargs *devargs;
+	int ret;
+
+	if (name == NULL)
+		return -EINVAL;
+
+	dev = find_vdev(name);
+	if (dev)
+		return -EEXIST;
+
+	devargs = alloc_devargs(name, args);
+	if (!devargs)
+		return -ENOMEM;
+
+	dev = calloc(1, sizeof(*dev));
+	if (!dev) {
+		ret = -ENOMEM;
+		goto fail;
+	}
+
+	dev->device.devargs = devargs;
+	dev->device.numa_node = SOCKET_ID_ANY;
+	dev->device.name = devargs->name;
+
+	ret = vdev_probe_all_drivers(dev);
+	if (ret) {
+		if (ret > 0)
+			RTE_LOG(ERR, EAL, "no driver found for %s\n", name);
+		goto fail;
+	}
+
+	TAILQ_INSERT_TAIL(&devargs_list, devargs, next);
+
+	TAILQ_INSERT_TAIL(&vdev_device_list, dev, next);
+	return 0;
+
+fail:
+	free(devargs->args);
+	free(devargs);
+	free(dev);
+	return ret;
+}
+
+static int
+vdev_remove_driver(struct rte_vdev_device *dev)
+{
+	const char *name = rte_vdev_device_name(dev);
+	const struct rte_vdev_driver *driver;
+
+	if (!dev->device.driver) {
+		RTE_LOG(DEBUG, EAL, "no driver attach to device %s\n", name);
+		return 1;
+	}
+
+	driver = container_of(dev->device.driver, const struct rte_vdev_driver,
+		driver);
+	return driver->remove(dev);
+}
+
+int
+rte_vdev_uninit(const char *name)
+{
+	struct rte_vdev_device *dev;
+	struct rte_devargs *devargs;
+	int ret;
+
+	if (name == NULL)
+		return -EINVAL;
+
+	dev = find_vdev(name);
+	if (!dev)
+		return -ENOENT;
+
+	devargs = dev->device.devargs;
+
+	ret = vdev_remove_driver(dev);
+	if (ret)
+		return ret;
+
+	TAILQ_REMOVE(&vdev_device_list, dev, next);
+
+	TAILQ_REMOVE(&devargs_list, devargs, next);
+
+	free(devargs->args);
+	free(devargs);
+	free(dev);
+	return 0;
+}
+
+static int
+vdev_scan(void)
+{
+	struct rte_vdev_device *dev;
+	struct rte_devargs *devargs;
+
+	/* for virtual devices we scan the devargs_list populated via cmdline */
+	TAILQ_FOREACH(devargs, &devargs_list, next) {
+
+		if (devargs->bus != &rte_vdev_bus)
+			continue;
+
+		dev = find_vdev(devargs->name);
+		if (dev)
+			continue;
+
+		dev = calloc(1, sizeof(*dev));
+		if (!dev)
+			return -1;
+
+		dev->device.devargs = devargs;
+		dev->device.numa_node = SOCKET_ID_ANY;
+		dev->device.name = devargs->name;
+
+		TAILQ_INSERT_TAIL(&vdev_device_list, dev, next);
+	}
+
+	return 0;
+}
+
+static int
+vdev_probe(void)
+{
+	struct rte_vdev_device *dev;
+
+	/* call the init function for each virtual device */
+	TAILQ_FOREACH(dev, &vdev_device_list, next) {
+
+		if (dev->device.driver)
+			continue;
+
+		if (vdev_probe_all_drivers(dev)) {
+			RTE_LOG(ERR, EAL, "failed to initialize %s device\n",
+				rte_vdev_device_name(dev));
+			return -1;
+		}
+	}
+
+	return 0;
+}
+
+static struct rte_device *
+vdev_find_device(const struct rte_device *start, rte_dev_cmp_t cmp,
+		 const void *data)
+{
+	struct rte_vdev_device *dev;
+
+	TAILQ_FOREACH(dev, &vdev_device_list, next) {
+		if (start && &dev->device == start) {
+			start = NULL;
+			continue;
+		}
+		if (cmp(&dev->device, data) == 0)
+			return &dev->device;
+	}
+	return NULL;
+}
+
+static int
+vdev_plug(struct rte_device *dev)
+{
+	return vdev_probe_all_drivers(RTE_DEV_TO_VDEV(dev));
+}
+
+static int
+vdev_unplug(struct rte_device *dev)
+{
+	return rte_vdev_uninit(dev->name);
+}
+
+static struct rte_bus rte_vdev_bus = {
+	.scan = vdev_scan,
+	.probe = vdev_probe,
+	.find_device = vdev_find_device,
+	.plug = vdev_plug,
+	.unplug = vdev_unplug,
+	.parse = vdev_parse,
+};
+
+RTE_REGISTER_BUS(vdev, rte_vdev_bus);
diff --git a/drivers/crypto/Makefile b/drivers/crypto/Makefile
index d551541..1cb4cdb 100644
--- a/drivers/crypto/Makefile
+++ b/drivers/crypto/Makefile
@@ -32,6 +32,7 @@
 include $(RTE_SDK)/mk/rte.vars.mk
 
 core-libs := librte_eal librte_mbuf librte_mempool librte_ring librte_cryptodev
+core-libs += librte_bus_vdev
 
 DIRS-$(CONFIG_RTE_LIBRTE_PMD_AESNI_GCM) += aesni_gcm
 DIRS-$(CONFIG_RTE_LIBRTE_PMD_AESNI_MB) += aesni_mb
diff --git a/drivers/event/Makefile b/drivers/event/Makefile
index 05dec1b..9c9ae82 100644
--- a/drivers/event/Makefile
+++ b/drivers/event/Makefile
@@ -31,7 +31,7 @@
 
 include $(RTE_SDK)/mk/rte.vars.mk
 
-core-libs := librte_eal librte_ether librte_eventdev
+core-libs := librte_eal librte_ether librte_eventdev librte_bus_vdev
 
 DIRS-$(CONFIG_RTE_LIBRTE_PMD_SKELETON_EVENTDEV) += skeleton
 DIRS-$(CONFIG_RTE_LIBRTE_PMD_SW_EVENTDEV) += sw
diff --git a/drivers/net/Makefile b/drivers/net/Makefile
index cf33233..00be153 100644
--- a/drivers/net/Makefile
+++ b/drivers/net/Makefile
@@ -37,7 +37,7 @@ ifeq ($(CONFIG_RTE_LIBRTE_THUNDERX_NICVF_PMD),d)
 endif
 
 core-libs := librte_eal librte_mbuf librte_mempool librte_ring librte_ether
-core-libs += librte_net librte_kvargs
+core-libs += librte_net librte_kvargs librte_bus_vdev
 
 DIRS-$(CONFIG_RTE_LIBRTE_PMD_AF_PACKET) += af_packet
 DIRS-$(CONFIG_RTE_LIBRTE_ARK_PMD) += ark
diff --git a/lib/librte_eal/bsdapp/eal/Makefile b/lib/librte_eal/bsdapp/eal/Makefile
index 351fa57..25a48d1 100644
--- a/lib/librte_eal/bsdapp/eal/Makefile
+++ b/lib/librte_eal/bsdapp/eal/Makefile
@@ -48,7 +48,7 @@ LDLIBS += -lgcc_s
 
 EXPORT_MAP := ../../rte_eal_version.map
 
-LIBABIVER := 6
+LIBABIVER := 7
 
 # specific to bsdapp exec-env
 SRCS-$(CONFIG_RTE_EXEC_ENV_BSDAPP) := eal.c
@@ -68,7 +68,6 @@ SRCS-$(CONFIG_RTE_EXEC_ENV_BSDAPP) += eal_common_timer.c
 SRCS-$(CONFIG_RTE_EXEC_ENV_BSDAPP) += eal_common_memzone.c
 SRCS-$(CONFIG_RTE_EXEC_ENV_BSDAPP) += eal_common_log.c
 SRCS-$(CONFIG_RTE_EXEC_ENV_BSDAPP) += eal_common_launch.c
-SRCS-$(CONFIG_RTE_EXEC_ENV_BSDAPP) += eal_common_vdev.c
 SRCS-$(CONFIG_RTE_EXEC_ENV_BSDAPP) += eal_common_pci.c
 SRCS-$(CONFIG_RTE_EXEC_ENV_BSDAPP) += eal_common_pci_uio.c
 SRCS-$(CONFIG_RTE_EXEC_ENV_BSDAPP) += eal_common_memory.c
diff --git a/lib/librte_eal/common/Makefile b/lib/librte_eal/common/Makefile
index 6f5b3f3..2fb5635 100644
--- a/lib/librte_eal/common/Makefile
+++ b/lib/librte_eal/common/Makefile
@@ -39,7 +39,7 @@ INC += rte_per_lcore.h rte_random.h
 INC += rte_tailq.h rte_interrupts.h rte_alarm.h
 INC += rte_string_fns.h rte_version.h
 INC += rte_eal_memconfig.h rte_malloc_heap.h
-INC += rte_hexdump.h rte_devargs.h rte_bus.h rte_dev.h rte_vdev.h
+INC += rte_hexdump.h rte_devargs.h rte_bus.h rte_dev.h
 INC += rte_pci_dev_feature_defs.h rte_pci_dev_features.h
 INC += rte_malloc.h rte_keepalive.h rte_time.h
 INC += rte_service.h rte_service_component.h
diff --git a/lib/librte_eal/common/eal_common_vdev.c b/lib/librte_eal/common/eal_common_vdev.c
deleted file mode 100644
index f7e547a..0000000
--- a/lib/librte_eal/common/eal_common_vdev.c
+++ /dev/null
@@ -1,342 +0,0 @@
-/*-
- *   BSD LICENSE
- *
- *   Copyright(c) 2016 RehiveTech. All rights reserved.
- *
- *   Redistribution and use in source and binary forms, with or without
- *   modification, are permitted provided that the following conditions
- *   are met:
- *
- *     * Redistributions of source code must retain the above copyright
- *       notice, this list of conditions and the following disclaimer.
- *     * Redistributions in binary form must reproduce the above copyright
- *       notice, this list of conditions and the following disclaimer in
- *       the documentation and/or other materials provided with the
- *       distribution.
- *     * Neither the name of RehiveTech nor the names of its
- *       contributors may be used to endorse or promote products derived
- *       from this software without specific prior written permission.
- *
- *   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- *   "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- *   LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- *   A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- *   OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- *   LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- *   DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- *   THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- *   (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- *   OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include <string.h>
-#include <inttypes.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <stdint.h>
-#include <stdbool.h>
-#include <sys/queue.h>
-
-#include <rte_eal.h>
-#include <rte_dev.h>
-#include <rte_bus.h>
-#include <rte_vdev.h>
-#include <rte_common.h>
-#include <rte_devargs.h>
-#include <rte_memory.h>
-#include <rte_errno.h>
-
-/* Forward declare to access virtual bus name */
-static struct rte_bus rte_vdev_bus;
-
-/** Double linked list of virtual device drivers. */
-TAILQ_HEAD(vdev_device_list, rte_vdev_device);
-
-static struct vdev_device_list vdev_device_list =
-	TAILQ_HEAD_INITIALIZER(vdev_device_list);
-struct vdev_driver_list vdev_driver_list =
-	TAILQ_HEAD_INITIALIZER(vdev_driver_list);
-
-/* register a driver */
-void
-rte_vdev_register(struct rte_vdev_driver *driver)
-{
-	TAILQ_INSERT_TAIL(&vdev_driver_list, driver, next);
-}
-
-/* unregister a driver */
-void
-rte_vdev_unregister(struct rte_vdev_driver *driver)
-{
-	TAILQ_REMOVE(&vdev_driver_list, driver, next);
-}
-
-static int
-vdev_parse(const char *name, void *addr)
-{
-	struct rte_vdev_driver **out = addr;
-	struct rte_vdev_driver *driver = NULL;
-
-	TAILQ_FOREACH(driver, &vdev_driver_list, next) {
-		if (strncmp(driver->driver.name, name,
-			    strlen(driver->driver.name)) == 0)
-			break;
-		if (driver->driver.alias &&
-		    strncmp(driver->driver.alias, name,
-			    strlen(driver->driver.alias)) == 0)
-			break;
-	}
-	if (driver != NULL &&
-	    addr != NULL)
-		*out = driver;
-	return driver == NULL;
-}
-
-static int
-vdev_probe_all_drivers(struct rte_vdev_device *dev)
-{
-	const char *name;
-	struct rte_vdev_driver *driver;
-	int ret;
-
-	name = rte_vdev_device_name(dev);
-
-	RTE_LOG(DEBUG, EAL, "Search driver %s to probe device %s\n", name,
-		rte_vdev_device_name(dev));
-
-	if (vdev_parse(name, &driver))
-		return -1;
-	dev->device.driver = &driver->driver;
-	ret = driver->probe(dev);
-	if (ret)
-		dev->device.driver = NULL;
-	return ret;
-}
-
-static struct rte_vdev_device *
-find_vdev(const char *name)
-{
-	struct rte_vdev_device *dev;
-
-	if (!name)
-		return NULL;
-
-	TAILQ_FOREACH(dev, &vdev_device_list, next) {
-		const char *devname = rte_vdev_device_name(dev);
-		if (!strncmp(devname, name, strlen(name)))
-			return dev;
-	}
-
-	return NULL;
-}
-
-static struct rte_devargs *
-alloc_devargs(const char *name, const char *args)
-{
-	struct rte_devargs *devargs;
-	int ret;
-
-	devargs = calloc(1, sizeof(*devargs));
-	if (!devargs)
-		return NULL;
-
-	devargs->bus = &rte_vdev_bus;
-	if (args)
-		devargs->args = strdup(args);
-	else
-		devargs->args = strdup("");
-
-	ret = snprintf(devargs->name, sizeof(devargs->name), "%s", name);
-	if (ret < 0 || ret >= (int)sizeof(devargs->name)) {
-		free(devargs->args);
-		free(devargs);
-		return NULL;
-	}
-
-	return devargs;
-}
-
-int
-rte_vdev_init(const char *name, const char *args)
-{
-	struct rte_vdev_device *dev;
-	struct rte_devargs *devargs;
-	int ret;
-
-	if (name == NULL)
-		return -EINVAL;
-
-	dev = find_vdev(name);
-	if (dev)
-		return -EEXIST;
-
-	devargs = alloc_devargs(name, args);
-	if (!devargs)
-		return -ENOMEM;
-
-	dev = calloc(1, sizeof(*dev));
-	if (!dev) {
-		ret = -ENOMEM;
-		goto fail;
-	}
-
-	dev->device.devargs = devargs;
-	dev->device.numa_node = SOCKET_ID_ANY;
-	dev->device.name = devargs->name;
-
-	ret = vdev_probe_all_drivers(dev);
-	if (ret) {
-		if (ret > 0)
-			RTE_LOG(ERR, EAL, "no driver found for %s\n", name);
-		goto fail;
-	}
-
-	TAILQ_INSERT_TAIL(&devargs_list, devargs, next);
-
-	TAILQ_INSERT_TAIL(&vdev_device_list, dev, next);
-	return 0;
-
-fail:
-	free(devargs->args);
-	free(devargs);
-	free(dev);
-	return ret;
-}
-
-static int
-vdev_remove_driver(struct rte_vdev_device *dev)
-{
-	const char *name = rte_vdev_device_name(dev);
-	const struct rte_vdev_driver *driver;
-
-	if (!dev->device.driver) {
-		RTE_LOG(DEBUG, EAL, "no driver attach to device %s\n", name);
-		return 1;
-	}
-
-	driver = container_of(dev->device.driver, const struct rte_vdev_driver,
-		driver);
-	return driver->remove(dev);
-}
-
-int
-rte_vdev_uninit(const char *name)
-{
-	struct rte_vdev_device *dev;
-	struct rte_devargs *devargs;
-	int ret;
-
-	if (name == NULL)
-		return -EINVAL;
-
-	dev = find_vdev(name);
-	if (!dev)
-		return -ENOENT;
-
-	devargs = dev->device.devargs;
-
-	ret = vdev_remove_driver(dev);
-	if (ret)
-		return ret;
-
-	TAILQ_REMOVE(&vdev_device_list, dev, next);
-
-	TAILQ_REMOVE(&devargs_list, devargs, next);
-
-	free(devargs->args);
-	free(devargs);
-	free(dev);
-	return 0;
-}
-
-static int
-vdev_scan(void)
-{
-	struct rte_vdev_device *dev;
-	struct rte_devargs *devargs;
-
-	/* for virtual devices we scan the devargs_list populated via cmdline */
-	TAILQ_FOREACH(devargs, &devargs_list, next) {
-
-		if (devargs->bus != &rte_vdev_bus)
-			continue;
-
-		dev = find_vdev(devargs->name);
-		if (dev)
-			continue;
-
-		dev = calloc(1, sizeof(*dev));
-		if (!dev)
-			return -1;
-
-		dev->device.devargs = devargs;
-		dev->device.numa_node = SOCKET_ID_ANY;
-		dev->device.name = devargs->name;
-
-		TAILQ_INSERT_TAIL(&vdev_device_list, dev, next);
-	}
-
-	return 0;
-}
-
-static int
-vdev_probe(void)
-{
-	struct rte_vdev_device *dev;
-
-	/* call the init function for each virtual device */
-	TAILQ_FOREACH(dev, &vdev_device_list, next) {
-
-		if (dev->device.driver)
-			continue;
-
-		if (vdev_probe_all_drivers(dev)) {
-			RTE_LOG(ERR, EAL, "failed to initialize %s device\n",
-				rte_vdev_device_name(dev));
-			return -1;
-		}
-	}
-
-	return 0;
-}
-
-static struct rte_device *
-vdev_find_device(const struct rte_device *start, rte_dev_cmp_t cmp,
-		 const void *data)
-{
-	struct rte_vdev_device *dev;
-
-	TAILQ_FOREACH(dev, &vdev_device_list, next) {
-		if (start && &dev->device == start) {
-			start = NULL;
-			continue;
-		}
-		if (cmp(&dev->device, data) == 0)
-			return &dev->device;
-	}
-	return NULL;
-}
-
-static int
-vdev_plug(struct rte_device *dev)
-{
-	return vdev_probe_all_drivers(RTE_DEV_TO_VDEV(dev));
-}
-
-static int
-vdev_unplug(struct rte_device *dev)
-{
-	return rte_vdev_uninit(dev->name);
-}
-
-static struct rte_bus rte_vdev_bus = {
-	.scan = vdev_scan,
-	.probe = vdev_probe,
-	.find_device = vdev_find_device,
-	.plug = vdev_plug,
-	.unplug = vdev_unplug,
-	.parse = vdev_parse,
-};
-
-RTE_REGISTER_BUS(vdev, rte_vdev_bus);
diff --git a/lib/librte_eal/common/include/rte_dev.h b/lib/librte_eal/common/include/rte_dev.h
index 4c4ac7e..8088dcc 100644
--- a/lib/librte_eal/common/include/rte_dev.h
+++ b/lib/librte_eal/common/include/rte_dev.h
@@ -170,28 +170,6 @@ struct rte_device {
 };
 
 /**
- * Initialize a driver specified by name.
- *
- * @param name
- *   The pointer to a driver name to be initialized.
- * @param args
- *   The pointer to arguments used by driver initialization.
- * @return
- *  0 on success, negative on error
- */
-int rte_vdev_init(const char *name, const char *args);
-
-/**
- * Uninitalize a driver specified by name.
- *
- * @param name
- *   The pointer to a driver name to be initialized.
- * @return
- *  0 on success, negative on error
- */
-int rte_vdev_uninit(const char *name);
-
-/**
  * Attach a device to a registered driver.
  *
  * @param name
@@ -316,4 +294,4 @@ __attribute__((used)) = str
 }
 #endif
 
-#endif /* _RTE_VDEV_H_ */
+#endif /* _RTE_DEV_H_ */
diff --git a/lib/librte_eal/common/include/rte_vdev.h b/lib/librte_eal/common/include/rte_vdev.h
deleted file mode 100644
index 29f5a52..0000000
--- a/lib/librte_eal/common/include/rte_vdev.h
+++ /dev/null
@@ -1,131 +0,0 @@
-/*-
- *   BSD LICENSE
- *
- *   Copyright(c) 2016 RehiveTech. All rights reserved.
- *
- *   Redistribution and use in source and binary forms, with or without
- *   modification, are permitted provided that the following conditions
- *   are met:
- *
- *     * Redistributions of source code must retain the above copyright
- *       notice, this list of conditions and the following disclaimer.
- *     * Redistributions in binary form must reproduce the above copyright
- *       notice, this list of conditions and the following disclaimer in
- *       the documentation and/or other materials provided with the
- *       distribution.
- *     * Neither the name of RehiveTech nor the names of its
- *       contributors may be used to endorse or promote products derived
- *       from this software without specific prior written permission.
- *
- *   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- *   "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- *   LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- *   A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- *   OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- *   LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- *   DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- *   THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- *   (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- *   OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef RTE_VDEV_H
-#define RTE_VDEV_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include <sys/queue.h>
-#include <rte_dev.h>
-#include <rte_devargs.h>
-
-struct rte_vdev_device {
-	TAILQ_ENTRY(rte_vdev_device) next;      /**< Next attached vdev */
-	struct rte_device device;               /**< Inherit core device */
-};
-
-/**
- * @internal
- * Helper macro for drivers that need to convert to struct rte_vdev_device.
- */
-#define RTE_DEV_TO_VDEV(ptr) \
-	container_of(ptr, struct rte_vdev_device, device)
-
-static inline const char *
-rte_vdev_device_name(const struct rte_vdev_device *dev)
-{
-	if (dev && dev->device.name)
-		return dev->device.name;
-	return NULL;
-}
-
-static inline const char *
-rte_vdev_device_args(const struct rte_vdev_device *dev)
-{
-	if (dev && dev->device.devargs)
-		return dev->device.devargs->args;
-	return "";
-}
-
-/** Double linked list of virtual device drivers. */
-TAILQ_HEAD(vdev_driver_list, rte_vdev_driver);
-
-/**
- * Probe function called for each virtual device driver once.
- */
-typedef int (rte_vdev_probe_t)(struct rte_vdev_device *dev);
-
-/**
- * Remove function called for each virtual device driver once.
- */
-typedef int (rte_vdev_remove_t)(struct rte_vdev_device *dev);
-
-/**
- * A virtual device driver abstraction.
- */
-struct rte_vdev_driver {
-	TAILQ_ENTRY(rte_vdev_driver) next; /**< Next in list. */
-	struct rte_driver driver;      /**< Inherited general driver. */
-	rte_vdev_probe_t *probe;       /**< Virtual device probe function. */
-	rte_vdev_remove_t *remove;     /**< Virtual device remove function. */
-};
-
-/**
- * Register a virtual device driver.
- *
- * @param driver
- *   A pointer to a rte_vdev_driver structure describing the driver
- *   to be registered.
- */
-void rte_vdev_register(struct rte_vdev_driver *driver);
-
-/**
- * Unregister a virtual device driver.
- *
- * @param driver
- *   A pointer to a rte_vdev_driver structure describing the driver
- *   to be unregistered.
- */
-void rte_vdev_unregister(struct rte_vdev_driver *driver);
-
-#define RTE_PMD_REGISTER_VDEV(nm, vdrv)\
-RTE_INIT(vdrvinitfn_ ##vdrv);\
-static const char *vdrvinit_ ## nm ## _alias;\
-static void vdrvinitfn_ ##vdrv(void)\
-{\
-	(vdrv).driver.name = RTE_STR(nm);\
-	(vdrv).driver.alias = vdrvinit_ ## nm ## _alias;\
-	rte_vdev_register(&vdrv);\
-} \
-RTE_PMD_EXPORT_NAME(nm, __COUNTER__)
-
-#define RTE_PMD_REGISTER_ALIAS(nm, alias)\
-static const char *vdrvinit_ ## nm ## _alias = RTE_STR(alias)
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
diff --git a/lib/librte_eal/linuxapp/eal/Makefile b/lib/librte_eal/linuxapp/eal/Makefile
index 965da6e..eef80eb 100644
--- a/lib/librte_eal/linuxapp/eal/Makefile
+++ b/lib/librte_eal/linuxapp/eal/Makefile
@@ -37,7 +37,7 @@ ARCH_DIR ?= $(RTE_ARCH)
 EXPORT_MAP := ../../rte_eal_version.map
 VPATH += $(RTE_SDK)/lib/librte_eal/common/arch/$(ARCH_DIR)
 
-LIBABIVER := 6
+LIBABIVER := 7
 
 VPATH += $(RTE_SDK)/lib/librte_eal/common
 
@@ -77,7 +77,6 @@ SRCS-$(CONFIG_RTE_EXEC_ENV_LINUXAPP) += eal_common_timer.c
 SRCS-$(CONFIG_RTE_EXEC_ENV_LINUXAPP) += eal_common_memzone.c
 SRCS-$(CONFIG_RTE_EXEC_ENV_LINUXAPP) += eal_common_log.c
 SRCS-$(CONFIG_RTE_EXEC_ENV_LINUXAPP) += eal_common_launch.c
-SRCS-$(CONFIG_RTE_EXEC_ENV_LINUXAPP) += eal_common_vdev.c
 SRCS-$(CONFIG_RTE_EXEC_ENV_LINUXAPP) += eal_common_pci.c
 SRCS-$(CONFIG_RTE_EXEC_ENV_LINUXAPP) += eal_common_pci_uio.c
 SRCS-$(CONFIG_RTE_EXEC_ENV_LINUXAPP) += eal_common_memory.c
diff --git a/lib/librte_eal/rte_eal_version.map b/lib/librte_eal/rte_eal_version.map
index 8eb53ab..f9edb29 100644
--- a/lib/librte_eal/rte_eal_version.map
+++ b/lib/librte_eal/rte_eal_version.map
@@ -181,10 +181,6 @@ DPDK_17.05 {
 	rte_pci_unmap_device;
 	rte_pci_unregister;
 	rte_pci_write_config;
-	rte_vdev_init;
-	rte_vdev_register;
-	rte_vdev_uninit;
-	rte_vdev_unregister;
 	vfio_get_container_fd;
 	vfio_get_group_fd;
 	vfio_get_group_no;
diff --git a/mk/rte.app.mk b/mk/rte.app.mk
index 482656c..6780f4f 100644
--- a/mk/rte.app.mk
+++ b/mk/rte.app.mk
@@ -99,6 +99,7 @@ _LDLIBS-$(CONFIG_RTE_LIBRTE_MEMPOOL)        += -lrte_mempool
 _LDLIBS-$(CONFIG_RTE_DRIVER_MEMPOOL_RING)   += -lrte_mempool_ring
 _LDLIBS-$(CONFIG_RTE_LIBRTE_RING)           += -lrte_ring
 _LDLIBS-$(CONFIG_RTE_LIBRTE_EAL)            += -lrte_eal
+_LDLIBS-$(CONFIG_RTE_LIBRTE_VDEV_BUS)       += -lrte_bus_vdev
 _LDLIBS-$(CONFIG_RTE_LIBRTE_CMDLINE)        += -lrte_cmdline
 _LDLIBS-$(CONFIG_RTE_LIBRTE_REORDER)        += -lrte_reorder
 _LDLIBS-$(CONFIG_RTE_LIBRTE_SCHED)          += -lrte_sched
diff --git a/test/test/test_cryptodev.c b/test/test/test_cryptodev.c
index a926779..2e80062 100644
--- a/test/test/test_cryptodev.c
+++ b/test/test/test_cryptodev.c
@@ -36,6 +36,7 @@
 #include <rte_malloc.h>
 #include <rte_memcpy.h>
 #include <rte_pause.h>
+#include <rte_vdev.h>
 
 #include <rte_crypto.h>
 #include <rte_cryptodev.h>
diff --git a/test/test/test_event_eth_rx_adapter.c b/test/test/test_event_eth_rx_adapter.c
index 56ed1f8..c0b864b 100644
--- a/test/test/test_event_eth_rx_adapter.c
+++ b/test/test/test_event_eth_rx_adapter.c
@@ -35,6 +35,7 @@
 #include <rte_mbuf.h>
 #include <rte_ethdev.h>
 #include <rte_eventdev.h>
+#include <rte_vdev.h>
 
 #include <rte_event_eth_rx_adapter.h>
 
diff --git a/test/test/test_eventdev.c b/test/test/test_eventdev.c
index d6ade78..e3d36f3 100644
--- a/test/test/test_eventdev.c
+++ b/test/test/test_eventdev.c
@@ -37,6 +37,7 @@
 #include <rte_memcpy.h>
 #include <rte_eventdev.h>
 #include <rte_dev.h>
+#include <rte_vdev.h>
 
 #include "test.h"
 
diff --git a/test/test/test_eventdev_octeontx.c b/test/test/test_eventdev_octeontx.c
index b88b0d2..ecae3e9 100644
--- a/test/test/test_eventdev_octeontx.c
+++ b/test/test/test_eventdev_octeontx.c
@@ -45,6 +45,7 @@
 #include <rte_lcore.h>
 #include <rte_per_lcore.h>
 #include <rte_random.h>
+#include <rte_vdev.h>
 
 #include "test.h"
 
diff --git a/test/test/test_eventdev_sw.c b/test/test/test_eventdev_sw.c
index 7219886..385e743 100644
--- a/test/test/test_eventdev_sw.c
+++ b/test/test/test_eventdev_sw.c
@@ -49,6 +49,7 @@
 #include <rte_cycles.h>
 #include <rte_eventdev.h>
 #include <rte_pause.h>
+#include <rte_vdev.h>
 
 #include "test.h"
 
diff --git a/test/test/test_link_bonding_rssconf.c b/test/test/test_link_bonding_rssconf.c
index 7dccc6e..6199188 100644
--- a/test/test/test_link_bonding_rssconf.c
+++ b/test/test/test_link_bonding_rssconf.c
@@ -48,6 +48,7 @@
 #include <rte_log.h>
 #include <rte_lcore.h>
 #include <rte_memory.h>
+#include <rte_vdev.h>
 
 #include <rte_string_fns.h>
 #include <rte_errno.h>
-- 
2.7.4

^ permalink raw reply	[relevance 1%]

* [dpdk-dev] [PATCH v10 1/4] cryptodev: remove crypto vdev init API
  @ 2017-10-27  3:23  4%   ` Jianfeng Tan
  2017-10-27  3:23  1%   ` [dpdk-dev] [PATCH v10 3/4] bus/vdev: move to vdev bus to drivers/bus Jianfeng Tan
  1 sibling, 0 replies; 200+ results
From: Jianfeng Tan @ 2017-10-27  3:23 UTC (permalink / raw)
  To: dev
  Cc: jblunck, bruce.richardson, konstantin.ananyev,
	pablo.de.lara.guarch, thomas, yliu, maxime.coquelin, mtetsuyah,
	ferruh.yigit, Jianfeng Tan

Remove rte_cryptodev_create_vdev() for duplication.

Signed-off-by: Jianfeng Tan <jianfeng.tan@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
---
 doc/guides/rel_notes/deprecation.rst           |  5 -----
 doc/guides/rel_notes/release_17_11.rst         |  2 ++
 lib/librte_cryptodev/rte_cryptodev.c           |  6 ------
 lib/librte_cryptodev/rte_cryptodev.h           | 17 -----------------
 lib/librte_cryptodev/rte_cryptodev_version.map |  1 -
 5 files changed, 2 insertions(+), 29 deletions(-)

diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst
index a93c3e1..9120121 100644
--- a/doc/guides/rel_notes/deprecation.rst
+++ b/doc/guides/rel_notes/deprecation.rst
@@ -60,10 +60,5 @@ Deprecation Notices
   ``rte_cryptodev`` respectively to support security protocol offloaded
   operations.
 
-* cryptodev: the following function is deprecated starting from 17.08 and will
-  be removed in 17.11:
-
-  - ``rte_cryptodev_create_vdev``
-
 * librte_meter: The API will change to accommodate configuration profiles.
   Most of the API functions will have an additional opaque parameter.
diff --git a/doc/guides/rel_notes/release_17_11.rst b/doc/guides/rel_notes/release_17_11.rst
index b96b236..bab5d73 100644
--- a/doc/guides/rel_notes/release_17_11.rst
+++ b/doc/guides/rel_notes/release_17_11.rst
@@ -403,6 +403,8 @@ API Changes
   the backing device supports the operation or if the operation was
   successfully performed.
 
+* ``rte_cryptodev_create_vdev`` was removed to avoid the dependency on vdev
+  in librte_cryptodev; instead, users can call rte_vdev_init() directly.
 
 ABI Changes
 -----------
diff --git a/lib/librte_cryptodev/rte_cryptodev.c b/lib/librte_cryptodev/rte_cryptodev.c
index 8063211..973c8db 100644
--- a/lib/librte_cryptodev/rte_cryptodev.c
+++ b/lib/librte_cryptodev/rte_cryptodev.c
@@ -377,12 +377,6 @@ rte_cryptodev_get_feature_name(uint64_t flag)
 	}
 }
 
-int
-rte_cryptodev_create_vdev(const char *name, const char *args)
-{
-	return rte_vdev_init(name, args);
-}
-
 struct rte_cryptodev *
 rte_cryptodev_pmd_get_dev(uint8_t dev_id)
 {
diff --git a/lib/librte_cryptodev/rte_cryptodev.h b/lib/librte_cryptodev/rte_cryptodev.h
index a0d3a12..2c1377b 100644
--- a/lib/librte_cryptodev/rte_cryptodev.h
+++ b/lib/librte_cryptodev/rte_cryptodev.h
@@ -435,23 +435,6 @@ struct rte_cryptodev_stats {
 /**< Max length of name of crypto PMD */
 
 /**
- * @deprecated
- *
- * Create a virtual crypto device
- *
- * @param	name	Cryptodev PMD name of device to be created.
- * @param	args	Options arguments for device.
- *
- * @return
- * - On successful creation of the cryptodev the device index is returned,
- *   which will be between 0 and rte_cryptodev_count().
- * - In the case of a failure, returns -1.
- */
-__rte_deprecated
-extern int
-rte_cryptodev_create_vdev(const char *name, const char *args);
-
-/**
  * Get the device identifier for the named crypto device.
  *
  * @param	name	device name to select the device structure.
diff --git a/lib/librte_cryptodev/rte_cryptodev_version.map b/lib/librte_cryptodev/rte_cryptodev_version.map
index e82296c..eb47308 100644
--- a/lib/librte_cryptodev/rte_cryptodev_version.map
+++ b/lib/librte_cryptodev/rte_cryptodev_version.map
@@ -7,7 +7,6 @@ DPDK_16.04 {
 	rte_cryptodev_close;
 	rte_cryptodev_count;
 	rte_cryptodev_configure;
-	rte_cryptodev_create_vdev;
 	rte_cryptodev_get_dev_id;
 	rte_cryptodev_get_feature_name;
 	rte_cryptodev_info_get;
-- 
2.7.4

^ permalink raw reply	[relevance 4%]

* [dpdk-dev] [PATCH v10 3/4] bus/vdev: move to vdev bus to drivers/bus
    2017-10-27  3:23  4%   ` [dpdk-dev] [PATCH v10 1/4] cryptodev: remove crypto vdev init API Jianfeng Tan
@ 2017-10-27  3:23  1%   ` Jianfeng Tan
  1 sibling, 0 replies; 200+ results
From: Jianfeng Tan @ 2017-10-27  3:23 UTC (permalink / raw)
  To: dev
  Cc: jblunck, bruce.richardson, konstantin.ananyev,
	pablo.de.lara.guarch, thomas, yliu, maxime.coquelin, mtetsuyah,
	ferruh.yigit, Jianfeng Tan

Move the vdev bus from lib/librte_eal to drivers/bus.

As the crypto vdev helper function refers to data structure
in rte_vdev.h, so we move those helper function into drivers/bus
too.

Signed-off-by: Jianfeng Tan <jianfeng.tan@intel.com>
---
 config/common_base                        |   5 +
 doc/guides/rel_notes/release_17_11.rst    |   8 +
 drivers/bus/Makefile                      |   4 +-
 drivers/bus/vdev/Makefile                 |  57 +++++
 drivers/bus/vdev/rte_bus_vdev_version.map |   8 +
 drivers/bus/vdev/rte_vdev.h               | 153 +++++++++++++
 drivers/bus/vdev/vdev.c                   | 344 ++++++++++++++++++++++++++++++
 drivers/crypto/Makefile                   |   1 +
 drivers/event/Makefile                    |   2 +-
 drivers/net/Makefile                      |   2 +-
 lib/librte_eal/bsdapp/eal/Makefile        |   3 +-
 lib/librte_eal/common/Makefile            |   2 +-
 lib/librte_eal/common/eal_common_vdev.c   | 342 -----------------------------
 lib/librte_eal/common/include/rte_dev.h   |  24 +--
 lib/librte_eal/common/include/rte_vdev.h  | 131 ------------
 lib/librte_eal/linuxapp/eal/Makefile      |   3 +-
 lib/librte_eal/rte_eal_version.map        |   4 -
 mk/rte.app.mk                             |   1 +
 test/test/test_cryptodev.c                |   1 +
 test/test/test_event_eth_rx_adapter.c     |   1 +
 test/test/test_eventdev.c                 |   1 +
 test/test/test_eventdev_octeontx.c        |   1 +
 test/test/test_eventdev_sw.c              |   1 +
 test/test/test_link_bonding_rssconf.c     |   1 +
 24 files changed, 591 insertions(+), 509 deletions(-)
 create mode 100644 drivers/bus/vdev/Makefile
 create mode 100644 drivers/bus/vdev/rte_bus_vdev_version.map
 create mode 100644 drivers/bus/vdev/rte_vdev.h
 create mode 100644 drivers/bus/vdev/vdev.c
 delete mode 100644 lib/librte_eal/common/eal_common_vdev.c
 delete mode 100644 lib/librte_eal/common/include/rte_vdev.h

diff --git a/config/common_base b/config/common_base
index 82ee754..d39e657 100644
--- a/config/common_base
+++ b/config/common_base
@@ -814,3 +814,8 @@ CONFIG_RTE_APP_CRYPTO_PERF=y
 # Compile the eventdev application
 #
 CONFIG_RTE_APP_EVENTDEV=y
+
+#
+# Compile the vdev bus
+#
+CONFIG_RTE_LIBRTE_VDEV_BUS=y
diff --git a/doc/guides/rel_notes/release_17_11.rst b/doc/guides/rel_notes/release_17_11.rst
index bab5d73..08b1c3d 100644
--- a/doc/guides/rel_notes/release_17_11.rst
+++ b/doc/guides/rel_notes/release_17_11.rst
@@ -406,6 +406,13 @@ API Changes
 * ``rte_cryptodev_create_vdev`` was removed to avoid the dependency on vdev
   in librte_cryptodev; instead, users can call rte_vdev_init() directly.
 
+* **Moved the following APIs from eal library to bus_vdev library**
+
+  * ``rte_vdev_init``
+  * ``rte_vdev_register``
+  * ``rte_vdev_uninit``
+  * ``rte_vdev_unregister``
+
 ABI Changes
 -----------
 
@@ -461,6 +468,7 @@ The libraries prepended with a plus sign were incremented in this version.
 
      librte_acl.so.2
    + librte_bitratestats.so.2
+   + librte_bus_vdev.so.1
      librte_cfgfile.so.2
      librte_cmdline.so.2
    + librte_cryptodev.so.4
diff --git a/drivers/bus/Makefile b/drivers/bus/Makefile
index a220d27..6c7e203 100644
--- a/drivers/bus/Makefile
+++ b/drivers/bus/Makefile
@@ -30,12 +30,12 @@
 
 include $(RTE_SDK)/mk/rte.vars.mk
 
-core-libs := librte_eal librte_mbuf librte_mempool librte_ring librte_ether
-
 DIRS-$(CONFIG_RTE_LIBRTE_DPAA_BUS) += dpaa
 
 DIRS-$(CONFIG_RTE_LIBRTE_FSLMC_BUS) += fslmc
 
 DIRS-$(CONFIG_RTE_LIBRTE_PCI_BUS) += pci
 
+DIRS-$(CONFIG_RTE_LIBRTE_VDEV_BUS) += vdev
+
 include $(RTE_SDK)/mk/rte.subdir.mk
diff --git a/drivers/bus/vdev/Makefile b/drivers/bus/vdev/Makefile
new file mode 100644
index 0000000..fe31654
--- /dev/null
+++ b/drivers/bus/vdev/Makefile
@@ -0,0 +1,57 @@
+#   BSD LICENSE
+#
+#   Copyright(c) 2017 Intel Corporation. All rights reserved.
+#   All rights reserved.
+#
+#   Redistribution and use in source and binary forms, with or without
+#   modification, are permitted provided that the following conditions
+#   are met:
+#
+#     * Redistributions of source code must retain the above copyright
+#       notice, this list of conditions and the following disclaimer.
+#     * Redistributions in binary form must reproduce the above copyright
+#       notice, this list of conditions and the following disclaimer in
+#       the documentation and/or other materials provided with the
+#       distribution.
+#     * Neither the name of Intel Corporation nor the names of its
+#       contributors may be used to endorse or promote products derived
+#       from this software without specific prior written permission.
+#
+#   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+#   "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+#   LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+#   A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+#   OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+#   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+#   LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+#   DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+#   THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+#   (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+#   OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+include $(RTE_SDK)/mk/rte.vars.mk
+
+#
+# library name
+#
+LIB = librte_bus_vdev.a
+
+CFLAGS += -O3
+CFLAGS += $(WERROR_FLAGS)
+
+# versioning export map
+EXPORT_MAP := rte_bus_vdev_version.map
+
+# library version
+LIBABIVER := 1
+
+SRCS-y += vdev.c
+
+LDLIBS += -lrte_eal
+
+#
+# Export include files
+#
+SYMLINK-y-include += rte_vdev.h
+
+include $(RTE_SDK)/mk/rte.lib.mk
diff --git a/drivers/bus/vdev/rte_bus_vdev_version.map b/drivers/bus/vdev/rte_bus_vdev_version.map
new file mode 100644
index 0000000..6ccb789
--- /dev/null
+++ b/drivers/bus/vdev/rte_bus_vdev_version.map
@@ -0,0 +1,8 @@
+DPDK_17.11 {
+	global:
+
+	rte_vdev_init;
+	rte_vdev_register;
+	rte_vdev_uninit;
+	rte_vdev_unregister;
+};
diff --git a/drivers/bus/vdev/rte_vdev.h b/drivers/bus/vdev/rte_vdev.h
new file mode 100644
index 0000000..41762b8
--- /dev/null
+++ b/drivers/bus/vdev/rte_vdev.h
@@ -0,0 +1,153 @@
+/*-
+ *   BSD LICENSE
+ *
+ *   Copyright(c) 2016 RehiveTech. All rights reserved.
+ *
+ *   Redistribution and use in source and binary forms, with or without
+ *   modification, are permitted provided that the following conditions
+ *   are met:
+ *
+ *     * Redistributions of source code must retain the above copyright
+ *       notice, this list of conditions and the following disclaimer.
+ *     * Redistributions in binary form must reproduce the above copyright
+ *       notice, this list of conditions and the following disclaimer in
+ *       the documentation and/or other materials provided with the
+ *       distribution.
+ *     * Neither the name of RehiveTech nor the names of its
+ *       contributors may be used to endorse or promote products derived
+ *       from this software without specific prior written permission.
+ *
+ *   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ *   "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ *   LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ *   A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ *   OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ *   LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ *   DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ *   THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ *   (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ *   OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef RTE_VDEV_H
+#define RTE_VDEV_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include <sys/queue.h>
+#include <rte_dev.h>
+#include <rte_devargs.h>
+
+struct rte_vdev_device {
+	TAILQ_ENTRY(rte_vdev_device) next;      /**< Next attached vdev */
+	struct rte_device device;               /**< Inherit core device */
+};
+
+/**
+ * @internal
+ * Helper macro for drivers that need to convert to struct rte_vdev_device.
+ */
+#define RTE_DEV_TO_VDEV(ptr) \
+	container_of(ptr, struct rte_vdev_device, device)
+
+static inline const char *
+rte_vdev_device_name(const struct rte_vdev_device *dev)
+{
+	if (dev && dev->device.name)
+		return dev->device.name;
+	return NULL;
+}
+
+static inline const char *
+rte_vdev_device_args(const struct rte_vdev_device *dev)
+{
+	if (dev && dev->device.devargs)
+		return dev->device.devargs->args;
+	return "";
+}
+
+/** Double linked list of virtual device drivers. */
+TAILQ_HEAD(vdev_driver_list, rte_vdev_driver);
+
+/**
+ * Probe function called for each virtual device driver once.
+ */
+typedef int (rte_vdev_probe_t)(struct rte_vdev_device *dev);
+
+/**
+ * Remove function called for each virtual device driver once.
+ */
+typedef int (rte_vdev_remove_t)(struct rte_vdev_device *dev);
+
+/**
+ * A virtual device driver abstraction.
+ */
+struct rte_vdev_driver {
+	TAILQ_ENTRY(rte_vdev_driver) next; /**< Next in list. */
+	struct rte_driver driver;      /**< Inherited general driver. */
+	rte_vdev_probe_t *probe;       /**< Virtual device probe function. */
+	rte_vdev_remove_t *remove;     /**< Virtual device remove function. */
+};
+
+/**
+ * Register a virtual device driver.
+ *
+ * @param driver
+ *   A pointer to a rte_vdev_driver structure describing the driver
+ *   to be registered.
+ */
+void rte_vdev_register(struct rte_vdev_driver *driver);
+
+/**
+ * Unregister a virtual device driver.
+ *
+ * @param driver
+ *   A pointer to a rte_vdev_driver structure describing the driver
+ *   to be unregistered.
+ */
+void rte_vdev_unregister(struct rte_vdev_driver *driver);
+
+#define RTE_PMD_REGISTER_VDEV(nm, vdrv)\
+RTE_INIT(vdrvinitfn_ ##vdrv);\
+static const char *vdrvinit_ ## nm ## _alias;\
+static void vdrvinitfn_ ##vdrv(void)\
+{\
+	(vdrv).driver.name = RTE_STR(nm);\
+	(vdrv).driver.alias = vdrvinit_ ## nm ## _alias;\
+	rte_vdev_register(&vdrv);\
+} \
+RTE_PMD_EXPORT_NAME(nm, __COUNTER__)
+
+#define RTE_PMD_REGISTER_ALIAS(nm, alias)\
+static const char *vdrvinit_ ## nm ## _alias = RTE_STR(alias)
+
+/**
+ * Initialize a driver specified by name.
+ *
+ * @param name
+ *   The pointer to a driver name to be initialized.
+ * @param args
+ *   The pointer to arguments used by driver initialization.
+ * @return
+ *  0 on success, negative on error
+ */
+int rte_vdev_init(const char *name, const char *args);
+
+/**
+ * Uninitalize a driver specified by name.
+ *
+ * @param name
+ *   The pointer to a driver name to be initialized.
+ * @return
+ *  0 on success, negative on error
+ */
+int rte_vdev_uninit(const char *name);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/drivers/bus/vdev/vdev.c b/drivers/bus/vdev/vdev.c
new file mode 100644
index 0000000..a16eb71
--- /dev/null
+++ b/drivers/bus/vdev/vdev.c
@@ -0,0 +1,344 @@
+/*-
+ *   BSD LICENSE
+ *
+ *   Copyright(c) 2016 RehiveTech. All rights reserved.
+ *
+ *   Redistribution and use in source and binary forms, with or without
+ *   modification, are permitted provided that the following conditions
+ *   are met:
+ *
+ *     * Redistributions of source code must retain the above copyright
+ *       notice, this list of conditions and the following disclaimer.
+ *     * Redistributions in binary form must reproduce the above copyright
+ *       notice, this list of conditions and the following disclaimer in
+ *       the documentation and/or other materials provided with the
+ *       distribution.
+ *     * Neither the name of RehiveTech nor the names of its
+ *       contributors may be used to endorse or promote products derived
+ *       from this software without specific prior written permission.
+ *
+ *   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ *   "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ *   LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ *   A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ *   OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ *   LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ *   DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ *   THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ *   (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ *   OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include <string.h>
+#include <inttypes.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <stdint.h>
+#include <stdbool.h>
+#include <sys/queue.h>
+
+#include <rte_eal.h>
+#include <rte_dev.h>
+#include <rte_bus.h>
+#include <rte_common.h>
+#include <rte_devargs.h>
+#include <rte_memory.h>
+#include <rte_errno.h>
+
+#include "rte_vdev.h"
+
+/* Forward declare to access virtual bus name */
+static struct rte_bus rte_vdev_bus;
+
+/** Double linked list of virtual device drivers. */
+TAILQ_HEAD(vdev_device_list, rte_vdev_device);
+
+static struct vdev_device_list vdev_device_list =
+	TAILQ_HEAD_INITIALIZER(vdev_device_list);
+struct vdev_driver_list vdev_driver_list =
+	TAILQ_HEAD_INITIALIZER(vdev_driver_list);
+
+/* register a driver */
+void
+rte_vdev_register(struct rte_vdev_driver *driver)
+{
+	TAILQ_INSERT_TAIL(&vdev_driver_list, driver, next);
+}
+
+/* unregister a driver */
+void
+rte_vdev_unregister(struct rte_vdev_driver *driver)
+{
+	TAILQ_REMOVE(&vdev_driver_list, driver, next);
+}
+
+static int
+vdev_parse(const char *name, void *addr)
+{
+	struct rte_vdev_driver **out = addr;
+	struct rte_vdev_driver *driver = NULL;
+
+	TAILQ_FOREACH(driver, &vdev_driver_list, next) {
+		if (strncmp(driver->driver.name, name,
+			    strlen(driver->driver.name)) == 0)
+			break;
+		if (driver->driver.alias &&
+		    strncmp(driver->driver.alias, name,
+			    strlen(driver->driver.alias)) == 0)
+			break;
+	}
+	if (driver != NULL &&
+	    addr != NULL)
+		*out = driver;
+	return driver == NULL;
+}
+
+static int
+vdev_probe_all_drivers(struct rte_vdev_device *dev)
+{
+	const char *name;
+	struct rte_vdev_driver *driver;
+	int ret;
+
+	name = rte_vdev_device_name(dev);
+
+	RTE_LOG(DEBUG, EAL, "Search driver %s to probe device %s\n", name,
+		rte_vdev_device_name(dev));
+
+	if (vdev_parse(name, &driver))
+		return -1;
+	dev->device.driver = &driver->driver;
+	ret = driver->probe(dev);
+	if (ret)
+		dev->device.driver = NULL;
+	return ret;
+}
+
+static struct rte_vdev_device *
+find_vdev(const char *name)
+{
+	struct rte_vdev_device *dev;
+
+	if (!name)
+		return NULL;
+
+	TAILQ_FOREACH(dev, &vdev_device_list, next) {
+		const char *devname = rte_vdev_device_name(dev);
+
+		if (!strncmp(devname, name, strlen(name)))
+			return dev;
+	}
+
+	return NULL;
+}
+
+static struct rte_devargs *
+alloc_devargs(const char *name, const char *args)
+{
+	struct rte_devargs *devargs;
+	int ret;
+
+	devargs = calloc(1, sizeof(*devargs));
+	if (!devargs)
+		return NULL;
+
+	devargs->bus = &rte_vdev_bus;
+	if (args)
+		devargs->args = strdup(args);
+	else
+		devargs->args = strdup("");
+
+	ret = snprintf(devargs->name, sizeof(devargs->name), "%s", name);
+	if (ret < 0 || ret >= (int)sizeof(devargs->name)) {
+		free(devargs->args);
+		free(devargs);
+		return NULL;
+	}
+
+	return devargs;
+}
+
+int
+rte_vdev_init(const char *name, const char *args)
+{
+	struct rte_vdev_device *dev;
+	struct rte_devargs *devargs;
+	int ret;
+
+	if (name == NULL)
+		return -EINVAL;
+
+	dev = find_vdev(name);
+	if (dev)
+		return -EEXIST;
+
+	devargs = alloc_devargs(name, args);
+	if (!devargs)
+		return -ENOMEM;
+
+	dev = calloc(1, sizeof(*dev));
+	if (!dev) {
+		ret = -ENOMEM;
+		goto fail;
+	}
+
+	dev->device.devargs = devargs;
+	dev->device.numa_node = SOCKET_ID_ANY;
+	dev->device.name = devargs->name;
+
+	ret = vdev_probe_all_drivers(dev);
+	if (ret) {
+		if (ret > 0)
+			RTE_LOG(ERR, EAL, "no driver found for %s\n", name);
+		goto fail;
+	}
+
+	TAILQ_INSERT_TAIL(&devargs_list, devargs, next);
+
+	TAILQ_INSERT_TAIL(&vdev_device_list, dev, next);
+	return 0;
+
+fail:
+	free(devargs->args);
+	free(devargs);
+	free(dev);
+	return ret;
+}
+
+static int
+vdev_remove_driver(struct rte_vdev_device *dev)
+{
+	const char *name = rte_vdev_device_name(dev);
+	const struct rte_vdev_driver *driver;
+
+	if (!dev->device.driver) {
+		RTE_LOG(DEBUG, EAL, "no driver attach to device %s\n", name);
+		return 1;
+	}
+
+	driver = container_of(dev->device.driver, const struct rte_vdev_driver,
+		driver);
+	return driver->remove(dev);
+}
+
+int
+rte_vdev_uninit(const char *name)
+{
+	struct rte_vdev_device *dev;
+	struct rte_devargs *devargs;
+	int ret;
+
+	if (name == NULL)
+		return -EINVAL;
+
+	dev = find_vdev(name);
+	if (!dev)
+		return -ENOENT;
+
+	devargs = dev->device.devargs;
+
+	ret = vdev_remove_driver(dev);
+	if (ret)
+		return ret;
+
+	TAILQ_REMOVE(&vdev_device_list, dev, next);
+
+	TAILQ_REMOVE(&devargs_list, devargs, next);
+
+	free(devargs->args);
+	free(devargs);
+	free(dev);
+	return 0;
+}
+
+static int
+vdev_scan(void)
+{
+	struct rte_vdev_device *dev;
+	struct rte_devargs *devargs;
+
+	/* for virtual devices we scan the devargs_list populated via cmdline */
+	TAILQ_FOREACH(devargs, &devargs_list, next) {
+
+		if (devargs->bus != &rte_vdev_bus)
+			continue;
+
+		dev = find_vdev(devargs->name);
+		if (dev)
+			continue;
+
+		dev = calloc(1, sizeof(*dev));
+		if (!dev)
+			return -1;
+
+		dev->device.devargs = devargs;
+		dev->device.numa_node = SOCKET_ID_ANY;
+		dev->device.name = devargs->name;
+
+		TAILQ_INSERT_TAIL(&vdev_device_list, dev, next);
+	}
+
+	return 0;
+}
+
+static int
+vdev_probe(void)
+{
+	struct rte_vdev_device *dev;
+
+	/* call the init function for each virtual device */
+	TAILQ_FOREACH(dev, &vdev_device_list, next) {
+
+		if (dev->device.driver)
+			continue;
+
+		if (vdev_probe_all_drivers(dev)) {
+			RTE_LOG(ERR, EAL, "failed to initialize %s device\n",
+				rte_vdev_device_name(dev));
+			return -1;
+		}
+	}
+
+	return 0;
+}
+
+static struct rte_device *
+vdev_find_device(const struct rte_device *start, rte_dev_cmp_t cmp,
+		 const void *data)
+{
+	struct rte_vdev_device *dev;
+
+	TAILQ_FOREACH(dev, &vdev_device_list, next) {
+		if (start && &dev->device == start) {
+			start = NULL;
+			continue;
+		}
+		if (cmp(&dev->device, data) == 0)
+			return &dev->device;
+	}
+	return NULL;
+}
+
+static int
+vdev_plug(struct rte_device *dev)
+{
+	return vdev_probe_all_drivers(RTE_DEV_TO_VDEV(dev));
+}
+
+static int
+vdev_unplug(struct rte_device *dev)
+{
+	return rte_vdev_uninit(dev->name);
+}
+
+static struct rte_bus rte_vdev_bus = {
+	.scan = vdev_scan,
+	.probe = vdev_probe,
+	.find_device = vdev_find_device,
+	.plug = vdev_plug,
+	.unplug = vdev_unplug,
+	.parse = vdev_parse,
+};
+
+RTE_REGISTER_BUS(vdev, rte_vdev_bus);
diff --git a/drivers/crypto/Makefile b/drivers/crypto/Makefile
index d551541..1cb4cdb 100644
--- a/drivers/crypto/Makefile
+++ b/drivers/crypto/Makefile
@@ -32,6 +32,7 @@
 include $(RTE_SDK)/mk/rte.vars.mk
 
 core-libs := librte_eal librte_mbuf librte_mempool librte_ring librte_cryptodev
+core-libs += librte_bus_vdev
 
 DIRS-$(CONFIG_RTE_LIBRTE_PMD_AESNI_GCM) += aesni_gcm
 DIRS-$(CONFIG_RTE_LIBRTE_PMD_AESNI_MB) += aesni_mb
diff --git a/drivers/event/Makefile b/drivers/event/Makefile
index 05dec1b..9c9ae82 100644
--- a/drivers/event/Makefile
+++ b/drivers/event/Makefile
@@ -31,7 +31,7 @@
 
 include $(RTE_SDK)/mk/rte.vars.mk
 
-core-libs := librte_eal librte_ether librte_eventdev
+core-libs := librte_eal librte_ether librte_eventdev librte_bus_vdev
 
 DIRS-$(CONFIG_RTE_LIBRTE_PMD_SKELETON_EVENTDEV) += skeleton
 DIRS-$(CONFIG_RTE_LIBRTE_PMD_SW_EVENTDEV) += sw
diff --git a/drivers/net/Makefile b/drivers/net/Makefile
index cf33233..00be153 100644
--- a/drivers/net/Makefile
+++ b/drivers/net/Makefile
@@ -37,7 +37,7 @@ ifeq ($(CONFIG_RTE_LIBRTE_THUNDERX_NICVF_PMD),d)
 endif
 
 core-libs := librte_eal librte_mbuf librte_mempool librte_ring librte_ether
-core-libs += librte_net librte_kvargs
+core-libs += librte_net librte_kvargs librte_bus_vdev
 
 DIRS-$(CONFIG_RTE_LIBRTE_PMD_AF_PACKET) += af_packet
 DIRS-$(CONFIG_RTE_LIBRTE_ARK_PMD) += ark
diff --git a/lib/librte_eal/bsdapp/eal/Makefile b/lib/librte_eal/bsdapp/eal/Makefile
index 934c12b..5d9ace9 100644
--- a/lib/librte_eal/bsdapp/eal/Makefile
+++ b/lib/librte_eal/bsdapp/eal/Makefile
@@ -48,7 +48,7 @@ LDLIBS += -lgcc_s
 
 EXPORT_MAP := ../../rte_eal_version.map
 
-LIBABIVER := 6
+LIBABIVER := 7
 
 # specific to bsdapp exec-env
 SRCS-$(CONFIG_RTE_EXEC_ENV_BSDAPP) := eal.c
@@ -67,7 +67,6 @@ SRCS-$(CONFIG_RTE_EXEC_ENV_BSDAPP) += eal_common_timer.c
 SRCS-$(CONFIG_RTE_EXEC_ENV_BSDAPP) += eal_common_memzone.c
 SRCS-$(CONFIG_RTE_EXEC_ENV_BSDAPP) += eal_common_log.c
 SRCS-$(CONFIG_RTE_EXEC_ENV_BSDAPP) += eal_common_launch.c
-SRCS-$(CONFIG_RTE_EXEC_ENV_BSDAPP) += eal_common_vdev.c
 SRCS-$(CONFIG_RTE_EXEC_ENV_BSDAPP) += eal_common_memory.c
 SRCS-$(CONFIG_RTE_EXEC_ENV_BSDAPP) += eal_common_tailqs.c
 SRCS-$(CONFIG_RTE_EXEC_ENV_BSDAPP) += eal_common_errno.c
diff --git a/lib/librte_eal/common/Makefile b/lib/librte_eal/common/Makefile
index 16a2f26..9effd0d 100644
--- a/lib/librte_eal/common/Makefile
+++ b/lib/librte_eal/common/Makefile
@@ -39,7 +39,7 @@ INC += rte_per_lcore.h rte_random.h
 INC += rte_tailq.h rte_interrupts.h rte_alarm.h
 INC += rte_string_fns.h rte_version.h
 INC += rte_eal_memconfig.h rte_malloc_heap.h
-INC += rte_hexdump.h rte_devargs.h rte_bus.h rte_dev.h rte_vdev.h
+INC += rte_hexdump.h rte_devargs.h rte_bus.h rte_dev.h
 INC += rte_pci_dev_feature_defs.h rte_pci_dev_features.h
 INC += rte_malloc.h rte_keepalive.h rte_time.h
 INC += rte_service.h rte_service_component.h
diff --git a/lib/librte_eal/common/eal_common_vdev.c b/lib/librte_eal/common/eal_common_vdev.c
deleted file mode 100644
index f7e547a..0000000
--- a/lib/librte_eal/common/eal_common_vdev.c
+++ /dev/null
@@ -1,342 +0,0 @@
-/*-
- *   BSD LICENSE
- *
- *   Copyright(c) 2016 RehiveTech. All rights reserved.
- *
- *   Redistribution and use in source and binary forms, with or without
- *   modification, are permitted provided that the following conditions
- *   are met:
- *
- *     * Redistributions of source code must retain the above copyright
- *       notice, this list of conditions and the following disclaimer.
- *     * Redistributions in binary form must reproduce the above copyright
- *       notice, this list of conditions and the following disclaimer in
- *       the documentation and/or other materials provided with the
- *       distribution.
- *     * Neither the name of RehiveTech nor the names of its
- *       contributors may be used to endorse or promote products derived
- *       from this software without specific prior written permission.
- *
- *   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- *   "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- *   LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- *   A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- *   OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- *   LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- *   DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- *   THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- *   (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- *   OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include <string.h>
-#include <inttypes.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <stdint.h>
-#include <stdbool.h>
-#include <sys/queue.h>
-
-#include <rte_eal.h>
-#include <rte_dev.h>
-#include <rte_bus.h>
-#include <rte_vdev.h>
-#include <rte_common.h>
-#include <rte_devargs.h>
-#include <rte_memory.h>
-#include <rte_errno.h>
-
-/* Forward declare to access virtual bus name */
-static struct rte_bus rte_vdev_bus;
-
-/** Double linked list of virtual device drivers. */
-TAILQ_HEAD(vdev_device_list, rte_vdev_device);
-
-static struct vdev_device_list vdev_device_list =
-	TAILQ_HEAD_INITIALIZER(vdev_device_list);
-struct vdev_driver_list vdev_driver_list =
-	TAILQ_HEAD_INITIALIZER(vdev_driver_list);
-
-/* register a driver */
-void
-rte_vdev_register(struct rte_vdev_driver *driver)
-{
-	TAILQ_INSERT_TAIL(&vdev_driver_list, driver, next);
-}
-
-/* unregister a driver */
-void
-rte_vdev_unregister(struct rte_vdev_driver *driver)
-{
-	TAILQ_REMOVE(&vdev_driver_list, driver, next);
-}
-
-static int
-vdev_parse(const char *name, void *addr)
-{
-	struct rte_vdev_driver **out = addr;
-	struct rte_vdev_driver *driver = NULL;
-
-	TAILQ_FOREACH(driver, &vdev_driver_list, next) {
-		if (strncmp(driver->driver.name, name,
-			    strlen(driver->driver.name)) == 0)
-			break;
-		if (driver->driver.alias &&
-		    strncmp(driver->driver.alias, name,
-			    strlen(driver->driver.alias)) == 0)
-			break;
-	}
-	if (driver != NULL &&
-	    addr != NULL)
-		*out = driver;
-	return driver == NULL;
-}
-
-static int
-vdev_probe_all_drivers(struct rte_vdev_device *dev)
-{
-	const char *name;
-	struct rte_vdev_driver *driver;
-	int ret;
-
-	name = rte_vdev_device_name(dev);
-
-	RTE_LOG(DEBUG, EAL, "Search driver %s to probe device %s\n", name,
-		rte_vdev_device_name(dev));
-
-	if (vdev_parse(name, &driver))
-		return -1;
-	dev->device.driver = &driver->driver;
-	ret = driver->probe(dev);
-	if (ret)
-		dev->device.driver = NULL;
-	return ret;
-}
-
-static struct rte_vdev_device *
-find_vdev(const char *name)
-{
-	struct rte_vdev_device *dev;
-
-	if (!name)
-		return NULL;
-
-	TAILQ_FOREACH(dev, &vdev_device_list, next) {
-		const char *devname = rte_vdev_device_name(dev);
-		if (!strncmp(devname, name, strlen(name)))
-			return dev;
-	}
-
-	return NULL;
-}
-
-static struct rte_devargs *
-alloc_devargs(const char *name, const char *args)
-{
-	struct rte_devargs *devargs;
-	int ret;
-
-	devargs = calloc(1, sizeof(*devargs));
-	if (!devargs)
-		return NULL;
-
-	devargs->bus = &rte_vdev_bus;
-	if (args)
-		devargs->args = strdup(args);
-	else
-		devargs->args = strdup("");
-
-	ret = snprintf(devargs->name, sizeof(devargs->name), "%s", name);
-	if (ret < 0 || ret >= (int)sizeof(devargs->name)) {
-		free(devargs->args);
-		free(devargs);
-		return NULL;
-	}
-
-	return devargs;
-}
-
-int
-rte_vdev_init(const char *name, const char *args)
-{
-	struct rte_vdev_device *dev;
-	struct rte_devargs *devargs;
-	int ret;
-
-	if (name == NULL)
-		return -EINVAL;
-
-	dev = find_vdev(name);
-	if (dev)
-		return -EEXIST;
-
-	devargs = alloc_devargs(name, args);
-	if (!devargs)
-		return -ENOMEM;
-
-	dev = calloc(1, sizeof(*dev));
-	if (!dev) {
-		ret = -ENOMEM;
-		goto fail;
-	}
-
-	dev->device.devargs = devargs;
-	dev->device.numa_node = SOCKET_ID_ANY;
-	dev->device.name = devargs->name;
-
-	ret = vdev_probe_all_drivers(dev);
-	if (ret) {
-		if (ret > 0)
-			RTE_LOG(ERR, EAL, "no driver found for %s\n", name);
-		goto fail;
-	}
-
-	TAILQ_INSERT_TAIL(&devargs_list, devargs, next);
-
-	TAILQ_INSERT_TAIL(&vdev_device_list, dev, next);
-	return 0;
-
-fail:
-	free(devargs->args);
-	free(devargs);
-	free(dev);
-	return ret;
-}
-
-static int
-vdev_remove_driver(struct rte_vdev_device *dev)
-{
-	const char *name = rte_vdev_device_name(dev);
-	const struct rte_vdev_driver *driver;
-
-	if (!dev->device.driver) {
-		RTE_LOG(DEBUG, EAL, "no driver attach to device %s\n", name);
-		return 1;
-	}
-
-	driver = container_of(dev->device.driver, const struct rte_vdev_driver,
-		driver);
-	return driver->remove(dev);
-}
-
-int
-rte_vdev_uninit(const char *name)
-{
-	struct rte_vdev_device *dev;
-	struct rte_devargs *devargs;
-	int ret;
-
-	if (name == NULL)
-		return -EINVAL;
-
-	dev = find_vdev(name);
-	if (!dev)
-		return -ENOENT;
-
-	devargs = dev->device.devargs;
-
-	ret = vdev_remove_driver(dev);
-	if (ret)
-		return ret;
-
-	TAILQ_REMOVE(&vdev_device_list, dev, next);
-
-	TAILQ_REMOVE(&devargs_list, devargs, next);
-
-	free(devargs->args);
-	free(devargs);
-	free(dev);
-	return 0;
-}
-
-static int
-vdev_scan(void)
-{
-	struct rte_vdev_device *dev;
-	struct rte_devargs *devargs;
-
-	/* for virtual devices we scan the devargs_list populated via cmdline */
-	TAILQ_FOREACH(devargs, &devargs_list, next) {
-
-		if (devargs->bus != &rte_vdev_bus)
-			continue;
-
-		dev = find_vdev(devargs->name);
-		if (dev)
-			continue;
-
-		dev = calloc(1, sizeof(*dev));
-		if (!dev)
-			return -1;
-
-		dev->device.devargs = devargs;
-		dev->device.numa_node = SOCKET_ID_ANY;
-		dev->device.name = devargs->name;
-
-		TAILQ_INSERT_TAIL(&vdev_device_list, dev, next);
-	}
-
-	return 0;
-}
-
-static int
-vdev_probe(void)
-{
-	struct rte_vdev_device *dev;
-
-	/* call the init function for each virtual device */
-	TAILQ_FOREACH(dev, &vdev_device_list, next) {
-
-		if (dev->device.driver)
-			continue;
-
-		if (vdev_probe_all_drivers(dev)) {
-			RTE_LOG(ERR, EAL, "failed to initialize %s device\n",
-				rte_vdev_device_name(dev));
-			return -1;
-		}
-	}
-
-	return 0;
-}
-
-static struct rte_device *
-vdev_find_device(const struct rte_device *start, rte_dev_cmp_t cmp,
-		 const void *data)
-{
-	struct rte_vdev_device *dev;
-
-	TAILQ_FOREACH(dev, &vdev_device_list, next) {
-		if (start && &dev->device == start) {
-			start = NULL;
-			continue;
-		}
-		if (cmp(&dev->device, data) == 0)
-			return &dev->device;
-	}
-	return NULL;
-}
-
-static int
-vdev_plug(struct rte_device *dev)
-{
-	return vdev_probe_all_drivers(RTE_DEV_TO_VDEV(dev));
-}
-
-static int
-vdev_unplug(struct rte_device *dev)
-{
-	return rte_vdev_uninit(dev->name);
-}
-
-static struct rte_bus rte_vdev_bus = {
-	.scan = vdev_scan,
-	.probe = vdev_probe,
-	.find_device = vdev_find_device,
-	.plug = vdev_plug,
-	.unplug = vdev_unplug,
-	.parse = vdev_parse,
-};
-
-RTE_REGISTER_BUS(vdev, rte_vdev_bus);
diff --git a/lib/librte_eal/common/include/rte_dev.h b/lib/librte_eal/common/include/rte_dev.h
index 4c4ac7e..8088dcc 100644
--- a/lib/librte_eal/common/include/rte_dev.h
+++ b/lib/librte_eal/common/include/rte_dev.h
@@ -170,28 +170,6 @@ struct rte_device {
 };
 
 /**
- * Initialize a driver specified by name.
- *
- * @param name
- *   The pointer to a driver name to be initialized.
- * @param args
- *   The pointer to arguments used by driver initialization.
- * @return
- *  0 on success, negative on error
- */
-int rte_vdev_init(const char *name, const char *args);
-
-/**
- * Uninitalize a driver specified by name.
- *
- * @param name
- *   The pointer to a driver name to be initialized.
- * @return
- *  0 on success, negative on error
- */
-int rte_vdev_uninit(const char *name);
-
-/**
  * Attach a device to a registered driver.
  *
  * @param name
@@ -316,4 +294,4 @@ __attribute__((used)) = str
 }
 #endif
 
-#endif /* _RTE_VDEV_H_ */
+#endif /* _RTE_DEV_H_ */
diff --git a/lib/librte_eal/common/include/rte_vdev.h b/lib/librte_eal/common/include/rte_vdev.h
deleted file mode 100644
index 29f5a52..0000000
--- a/lib/librte_eal/common/include/rte_vdev.h
+++ /dev/null
@@ -1,131 +0,0 @@
-/*-
- *   BSD LICENSE
- *
- *   Copyright(c) 2016 RehiveTech. All rights reserved.
- *
- *   Redistribution and use in source and binary forms, with or without
- *   modification, are permitted provided that the following conditions
- *   are met:
- *
- *     * Redistributions of source code must retain the above copyright
- *       notice, this list of conditions and the following disclaimer.
- *     * Redistributions in binary form must reproduce the above copyright
- *       notice, this list of conditions and the following disclaimer in
- *       the documentation and/or other materials provided with the
- *       distribution.
- *     * Neither the name of RehiveTech nor the names of its
- *       contributors may be used to endorse or promote products derived
- *       from this software without specific prior written permission.
- *
- *   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- *   "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- *   LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- *   A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- *   OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- *   LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- *   DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- *   THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- *   (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- *   OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef RTE_VDEV_H
-#define RTE_VDEV_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include <sys/queue.h>
-#include <rte_dev.h>
-#include <rte_devargs.h>
-
-struct rte_vdev_device {
-	TAILQ_ENTRY(rte_vdev_device) next;      /**< Next attached vdev */
-	struct rte_device device;               /**< Inherit core device */
-};
-
-/**
- * @internal
- * Helper macro for drivers that need to convert to struct rte_vdev_device.
- */
-#define RTE_DEV_TO_VDEV(ptr) \
-	container_of(ptr, struct rte_vdev_device, device)
-
-static inline const char *
-rte_vdev_device_name(const struct rte_vdev_device *dev)
-{
-	if (dev && dev->device.name)
-		return dev->device.name;
-	return NULL;
-}
-
-static inline const char *
-rte_vdev_device_args(const struct rte_vdev_device *dev)
-{
-	if (dev && dev->device.devargs)
-		return dev->device.devargs->args;
-	return "";
-}
-
-/** Double linked list of virtual device drivers. */
-TAILQ_HEAD(vdev_driver_list, rte_vdev_driver);
-
-/**
- * Probe function called for each virtual device driver once.
- */
-typedef int (rte_vdev_probe_t)(struct rte_vdev_device *dev);
-
-/**
- * Remove function called for each virtual device driver once.
- */
-typedef int (rte_vdev_remove_t)(struct rte_vdev_device *dev);
-
-/**
- * A virtual device driver abstraction.
- */
-struct rte_vdev_driver {
-	TAILQ_ENTRY(rte_vdev_driver) next; /**< Next in list. */
-	struct rte_driver driver;      /**< Inherited general driver. */
-	rte_vdev_probe_t *probe;       /**< Virtual device probe function. */
-	rte_vdev_remove_t *remove;     /**< Virtual device remove function. */
-};
-
-/**
- * Register a virtual device driver.
- *
- * @param driver
- *   A pointer to a rte_vdev_driver structure describing the driver
- *   to be registered.
- */
-void rte_vdev_register(struct rte_vdev_driver *driver);
-
-/**
- * Unregister a virtual device driver.
- *
- * @param driver
- *   A pointer to a rte_vdev_driver structure describing the driver
- *   to be unregistered.
- */
-void rte_vdev_unregister(struct rte_vdev_driver *driver);
-
-#define RTE_PMD_REGISTER_VDEV(nm, vdrv)\
-RTE_INIT(vdrvinitfn_ ##vdrv);\
-static const char *vdrvinit_ ## nm ## _alias;\
-static void vdrvinitfn_ ##vdrv(void)\
-{\
-	(vdrv).driver.name = RTE_STR(nm);\
-	(vdrv).driver.alias = vdrvinit_ ## nm ## _alias;\
-	rte_vdev_register(&vdrv);\
-} \
-RTE_PMD_EXPORT_NAME(nm, __COUNTER__)
-
-#define RTE_PMD_REGISTER_ALIAS(nm, alias)\
-static const char *vdrvinit_ ## nm ## _alias = RTE_STR(alias)
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
diff --git a/lib/librte_eal/linuxapp/eal/Makefile b/lib/librte_eal/linuxapp/eal/Makefile
index 1d3a42d..2975c25c 100644
--- a/lib/librte_eal/linuxapp/eal/Makefile
+++ b/lib/librte_eal/linuxapp/eal/Makefile
@@ -37,7 +37,7 @@ ARCH_DIR ?= $(RTE_ARCH)
 EXPORT_MAP := ../../rte_eal_version.map
 VPATH += $(RTE_SDK)/lib/librte_eal/common/arch/$(ARCH_DIR)
 
-LIBABIVER := 6
+LIBABIVER := 7
 
 VPATH += $(RTE_SDK)/lib/librte_eal/common
 
@@ -74,7 +74,6 @@ SRCS-$(CONFIG_RTE_EXEC_ENV_LINUXAPP) += eal_common_timer.c
 SRCS-$(CONFIG_RTE_EXEC_ENV_LINUXAPP) += eal_common_memzone.c
 SRCS-$(CONFIG_RTE_EXEC_ENV_LINUXAPP) += eal_common_log.c
 SRCS-$(CONFIG_RTE_EXEC_ENV_LINUXAPP) += eal_common_launch.c
-SRCS-$(CONFIG_RTE_EXEC_ENV_LINUXAPP) += eal_common_vdev.c
 SRCS-$(CONFIG_RTE_EXEC_ENV_LINUXAPP) += eal_common_memory.c
 SRCS-$(CONFIG_RTE_EXEC_ENV_LINUXAPP) += eal_common_tailqs.c
 SRCS-$(CONFIG_RTE_EXEC_ENV_LINUXAPP) += eal_common_errno.c
diff --git a/lib/librte_eal/rte_eal_version.map b/lib/librte_eal/rte_eal_version.map
index d2a4ff9..5966a03 100644
--- a/lib/librte_eal/rte_eal_version.map
+++ b/lib/librte_eal/rte_eal_version.map
@@ -166,10 +166,6 @@ DPDK_17.05 {
 	rte_log_set_global_level;
 	rte_log_set_level;
 	rte_log_set_level_regexp;
-	rte_vdev_init;
-	rte_vdev_register;
-	rte_vdev_uninit;
-	rte_vdev_unregister;
 	vfio_get_container_fd;
 	vfio_get_group_fd;
 	vfio_get_group_no;
diff --git a/mk/rte.app.mk b/mk/rte.app.mk
index 047121d..de2f557 100644
--- a/mk/rte.app.mk
+++ b/mk/rte.app.mk
@@ -101,6 +101,7 @@ _LDLIBS-$(CONFIG_RTE_DRIVER_MEMPOOL_RING)   += -lrte_mempool_ring
 _LDLIBS-$(CONFIG_RTE_LIBRTE_RING)           += -lrte_ring
 _LDLIBS-$(CONFIG_RTE_LIBRTE_PCI)            += -lrte_pci
 _LDLIBS-$(CONFIG_RTE_LIBRTE_EAL)            += -lrte_eal
+_LDLIBS-$(CONFIG_RTE_LIBRTE_VDEV_BUS)       += -lrte_bus_vdev
 _LDLIBS-$(CONFIG_RTE_LIBRTE_CMDLINE)        += -lrte_cmdline
 _LDLIBS-$(CONFIG_RTE_LIBRTE_REORDER)        += -lrte_reorder
 _LDLIBS-$(CONFIG_RTE_LIBRTE_SCHED)          += -lrte_sched
diff --git a/test/test/test_cryptodev.c b/test/test/test_cryptodev.c
index 72988c5..9045873 100644
--- a/test/test/test_cryptodev.c
+++ b/test/test/test_cryptodev.c
@@ -36,6 +36,7 @@
 #include <rte_malloc.h>
 #include <rte_memcpy.h>
 #include <rte_pause.h>
+#include <rte_vdev.h>
 
 #include <rte_crypto.h>
 #include <rte_cryptodev.h>
diff --git a/test/test/test_event_eth_rx_adapter.c b/test/test/test_event_eth_rx_adapter.c
index 56ed1f8..c0b864b 100644
--- a/test/test/test_event_eth_rx_adapter.c
+++ b/test/test/test_event_eth_rx_adapter.c
@@ -35,6 +35,7 @@
 #include <rte_mbuf.h>
 #include <rte_ethdev.h>
 #include <rte_eventdev.h>
+#include <rte_vdev.h>
 
 #include <rte_event_eth_rx_adapter.h>
 
diff --git a/test/test/test_eventdev.c b/test/test/test_eventdev.c
index 4118b75..a56f5a2 100644
--- a/test/test/test_eventdev.c
+++ b/test/test/test_eventdev.c
@@ -37,6 +37,7 @@
 #include <rte_memcpy.h>
 #include <rte_eventdev.h>
 #include <rte_dev.h>
+#include <rte_vdev.h>
 
 #include "test.h"
 
diff --git a/test/test/test_eventdev_octeontx.c b/test/test/test_eventdev_octeontx.c
index b88b0d2..ecae3e9 100644
--- a/test/test/test_eventdev_octeontx.c
+++ b/test/test/test_eventdev_octeontx.c
@@ -45,6 +45,7 @@
 #include <rte_lcore.h>
 #include <rte_per_lcore.h>
 #include <rte_random.h>
+#include <rte_vdev.h>
 
 #include "test.h"
 
diff --git a/test/test/test_eventdev_sw.c b/test/test/test_eventdev_sw.c
index 5c7751b..5e41140 100644
--- a/test/test/test_eventdev_sw.c
+++ b/test/test/test_eventdev_sw.c
@@ -51,6 +51,7 @@
 #include <rte_pause.h>
 #include <rte_service.h>
 #include <rte_service_component.h>
+#include <rte_vdev.h>
 
 #include "test.h"
 
diff --git a/test/test/test_link_bonding_rssconf.c b/test/test/test_link_bonding_rssconf.c
index 7dccc6e..6199188 100644
--- a/test/test/test_link_bonding_rssconf.c
+++ b/test/test/test_link_bonding_rssconf.c
@@ -48,6 +48,7 @@
 #include <rte_log.h>
 #include <rte_lcore.h>
 #include <rte_memory.h>
+#include <rte_vdev.h>
 
 #include <rte_string_fns.h>
 #include <rte_errno.h>
-- 
2.7.4

^ permalink raw reply	[relevance 1%]

* [dpdk-dev] [PATCH v11 1/4] cryptodev: remove crypto vdev init API
  @ 2017-10-30  8:28  4%   ` Jianfeng Tan
  2017-10-30  8:28  1%   ` [dpdk-dev] [PATCH v11 3/4] bus/vdev: move to vdev bus to drivers/bus Jianfeng Tan
  1 sibling, 0 replies; 200+ results
From: Jianfeng Tan @ 2017-10-30  8:28 UTC (permalink / raw)
  To: dev
  Cc: jblunck, bruce.richardson, konstantin.ananyev,
	pablo.de.lara.guarch, thomas, yliu, maxime.coquelin, mtetsuyah,
	ferruh.yigit, Jianfeng Tan

Remove rte_cryptodev_create_vdev() for duplication.

Signed-off-by: Jianfeng Tan <jianfeng.tan@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
---
 doc/guides/rel_notes/deprecation.rst           |  5 -----
 doc/guides/rel_notes/release_17_11.rst         |  2 ++
 lib/librte_cryptodev/rte_cryptodev.c           |  6 ------
 lib/librte_cryptodev/rte_cryptodev.h           | 17 -----------------
 lib/librte_cryptodev/rte_cryptodev_version.map |  1 -
 5 files changed, 2 insertions(+), 29 deletions(-)

diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst
index a93c3e1..9120121 100644
--- a/doc/guides/rel_notes/deprecation.rst
+++ b/doc/guides/rel_notes/deprecation.rst
@@ -60,10 +60,5 @@ Deprecation Notices
   ``rte_cryptodev`` respectively to support security protocol offloaded
   operations.
 
-* cryptodev: the following function is deprecated starting from 17.08 and will
-  be removed in 17.11:
-
-  - ``rte_cryptodev_create_vdev``
-
 * librte_meter: The API will change to accommodate configuration profiles.
   Most of the API functions will have an additional opaque parameter.
diff --git a/doc/guides/rel_notes/release_17_11.rst b/doc/guides/rel_notes/release_17_11.rst
index b96b236..bab5d73 100644
--- a/doc/guides/rel_notes/release_17_11.rst
+++ b/doc/guides/rel_notes/release_17_11.rst
@@ -403,6 +403,8 @@ API Changes
   the backing device supports the operation or if the operation was
   successfully performed.
 
+* ``rte_cryptodev_create_vdev`` was removed to avoid the dependency on vdev
+  in librte_cryptodev; instead, users can call rte_vdev_init() directly.
 
 ABI Changes
 -----------
diff --git a/lib/librte_cryptodev/rte_cryptodev.c b/lib/librte_cryptodev/rte_cryptodev.c
index 8063211..973c8db 100644
--- a/lib/librte_cryptodev/rte_cryptodev.c
+++ b/lib/librte_cryptodev/rte_cryptodev.c
@@ -377,12 +377,6 @@ rte_cryptodev_get_feature_name(uint64_t flag)
 	}
 }
 
-int
-rte_cryptodev_create_vdev(const char *name, const char *args)
-{
-	return rte_vdev_init(name, args);
-}
-
 struct rte_cryptodev *
 rte_cryptodev_pmd_get_dev(uint8_t dev_id)
 {
diff --git a/lib/librte_cryptodev/rte_cryptodev.h b/lib/librte_cryptodev/rte_cryptodev.h
index a0d3a12..2c1377b 100644
--- a/lib/librte_cryptodev/rte_cryptodev.h
+++ b/lib/librte_cryptodev/rte_cryptodev.h
@@ -435,23 +435,6 @@ struct rte_cryptodev_stats {
 /**< Max length of name of crypto PMD */
 
 /**
- * @deprecated
- *
- * Create a virtual crypto device
- *
- * @param	name	Cryptodev PMD name of device to be created.
- * @param	args	Options arguments for device.
- *
- * @return
- * - On successful creation of the cryptodev the device index is returned,
- *   which will be between 0 and rte_cryptodev_count().
- * - In the case of a failure, returns -1.
- */
-__rte_deprecated
-extern int
-rte_cryptodev_create_vdev(const char *name, const char *args);
-
-/**
  * Get the device identifier for the named crypto device.
  *
  * @param	name	device name to select the device structure.
diff --git a/lib/librte_cryptodev/rte_cryptodev_version.map b/lib/librte_cryptodev/rte_cryptodev_version.map
index e82296c..eb47308 100644
--- a/lib/librte_cryptodev/rte_cryptodev_version.map
+++ b/lib/librte_cryptodev/rte_cryptodev_version.map
@@ -7,7 +7,6 @@ DPDK_16.04 {
 	rte_cryptodev_close;
 	rte_cryptodev_count;
 	rte_cryptodev_configure;
-	rte_cryptodev_create_vdev;
 	rte_cryptodev_get_dev_id;
 	rte_cryptodev_get_feature_name;
 	rte_cryptodev_info_get;
-- 
2.7.4

^ permalink raw reply	[relevance 4%]

* [dpdk-dev] [PATCH v11 3/4] bus/vdev: move to vdev bus to drivers/bus
    2017-10-30  8:28  4%   ` [dpdk-dev] [PATCH v11 1/4] cryptodev: remove crypto vdev init API Jianfeng Tan
@ 2017-10-30  8:28  1%   ` Jianfeng Tan
  1 sibling, 0 replies; 200+ results
From: Jianfeng Tan @ 2017-10-30  8:28 UTC (permalink / raw)
  To: dev
  Cc: jblunck, bruce.richardson, konstantin.ananyev,
	pablo.de.lara.guarch, thomas, yliu, maxime.coquelin, mtetsuyah,
	ferruh.yigit, Jianfeng Tan

Move the vdev bus from lib/librte_eal to drivers/bus.

As the crypto vdev helper function refers to data structure
in rte_vdev.h, so we move those helper function into drivers/bus
too.

Signed-off-by: Jianfeng Tan <jianfeng.tan@intel.com>
---
 config/common_base                          |   5 +
 doc/guides/rel_notes/release_17_11.rst      |   9 +
 drivers/bus/Makefile                        |   4 +-
 drivers/bus/vdev/Makefile                   |  57 +++++
 drivers/bus/vdev/rte_bus_vdev.h             | 153 +++++++++++++
 drivers/bus/vdev/rte_bus_vdev_version.map   |   8 +
 drivers/bus/vdev/vdev.c                     | 344 ++++++++++++++++++++++++++++
 drivers/crypto/Makefile                     |   1 +
 drivers/crypto/aesni_gcm/aesni_gcm_pmd.c    |   2 +-
 drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c  |   2 +-
 drivers/crypto/armv8/rte_armv8_pmd.c        |   2 +-
 drivers/crypto/kasumi/rte_kasumi_pmd.c      |   2 +-
 drivers/crypto/mrvl/rte_mrvl_pmd.c          |   2 +-
 drivers/crypto/null/null_crypto_pmd.c       |   2 +-
 drivers/crypto/openssl/rte_openssl_pmd.c    |   2 +-
 drivers/crypto/scheduler/scheduler_pmd.c    |   2 +-
 drivers/crypto/snow3g/rte_snow3g_pmd.c      |   2 +-
 drivers/crypto/zuc/rte_zuc_pmd.c            |   2 +-
 drivers/event/Makefile                      |   2 +-
 drivers/event/dpaa2/dpaa2_eventdev.c        |   2 +-
 drivers/event/octeontx/ssovf_evdev.c        |   2 +-
 drivers/event/skeleton/skeleton_eventdev.c  |   2 +-
 drivers/event/sw/sw_evdev.c                 |   2 +-
 drivers/net/Makefile                        |   2 +-
 drivers/net/af_packet/rte_eth_af_packet.c   |   2 +-
 drivers/net/bonding/rte_eth_bond_api.c      |   2 +-
 drivers/net/bonding/rte_eth_bond_pmd.c      |   2 +-
 drivers/net/failsafe/failsafe.c             |   2 +-
 drivers/net/kni/rte_eth_kni.c               |   2 +-
 drivers/net/mrvl/mrvl_ethdev.c              |   2 +-
 drivers/net/null/rte_eth_null.c             |   2 +-
 drivers/net/octeontx/octeontx_ethdev.c      |   2 +-
 drivers/net/pcap/rte_eth_pcap.c             |   2 +-
 drivers/net/ring/rte_eth_ring.c             |   2 +-
 drivers/net/softnic/rte_eth_softnic.c       |   2 +-
 drivers/net/tap/rte_eth_tap.c               |   2 +-
 drivers/net/vhost/rte_eth_vhost.c           |   2 +-
 drivers/net/virtio/virtio_user_ethdev.c     |   2 +-
 lib/librte_eal/bsdapp/eal/Makefile          |   3 +-
 lib/librte_eal/common/.eal_common_dev.c.swp | Bin 0 -> 16384 bytes
 lib/librte_eal/common/Makefile              |   2 +-
 lib/librte_eal/common/eal_common_vdev.c     | 342 ---------------------------
 lib/librte_eal/common/include/rte_dev.h     |  24 +-
 lib/librte_eal/common/include/rte_vdev.h    | 131 -----------
 lib/librte_eal/linuxapp/eal/Makefile        |   3 +-
 lib/librte_eal/rte_eal_version.map          |   4 -
 lib/librte_ether/rte_ethdev_vdev.h          |   2 +-
 lib/librte_eventdev/rte_eventdev_pmd_vdev.h |   2 +-
 mk/rte.app.mk                               |   1 +
 test/test/autotest_data.pyc                 | Bin 0 -> 6122 bytes
 test/test/autotest_test_funcs.pyc           | Bin 0 -> 6812 bytes
 test/test/test_cryptodev.c                  |   1 +
 test/test/test_event_eth_rx_adapter.c       |   1 +
 test/test/test_eventdev.c                   |   1 +
 test/test/test_eventdev_octeontx.c          |   1 +
 test/test/test_eventdev_sw.c                |   1 +
 test/test/test_link_bonding_rssconf.c       |   1 +
 57 files changed, 622 insertions(+), 539 deletions(-)
 create mode 100644 drivers/bus/vdev/Makefile
 create mode 100644 drivers/bus/vdev/rte_bus_vdev.h
 create mode 100644 drivers/bus/vdev/rte_bus_vdev_version.map
 create mode 100644 drivers/bus/vdev/vdev.c
 create mode 100644 lib/librte_eal/common/.eal_common_dev.c.swp
 delete mode 100644 lib/librte_eal/common/eal_common_vdev.c
 delete mode 100644 lib/librte_eal/common/include/rte_vdev.h
 create mode 100644 test/test/autotest_data.pyc
 create mode 100644 test/test/autotest_test_funcs.pyc

diff --git a/config/common_base b/config/common_base
index 82ee754..d39e657 100644
--- a/config/common_base
+++ b/config/common_base
@@ -814,3 +814,8 @@ CONFIG_RTE_APP_CRYPTO_PERF=y
 # Compile the eventdev application
 #
 CONFIG_RTE_APP_EVENTDEV=y
+
+#
+# Compile the vdev bus
+#
+CONFIG_RTE_LIBRTE_VDEV_BUS=y
diff --git a/doc/guides/rel_notes/release_17_11.rst b/doc/guides/rel_notes/release_17_11.rst
index bab5d73..8f76ecd 100644
--- a/doc/guides/rel_notes/release_17_11.rst
+++ b/doc/guides/rel_notes/release_17_11.rst
@@ -406,6 +406,14 @@ API Changes
 * ``rte_cryptodev_create_vdev`` was removed to avoid the dependency on vdev
   in librte_cryptodev; instead, users can call rte_vdev_init() directly.
 
+* **Moved vdev bus APIs outside of the EAL**
+
+  Moved the following APIs from ``librte_eal`` to ``librte_bus_vdev``:
+  * ``rte_vdev_init``
+  * ``rte_vdev_register``
+  * ``rte_vdev_uninit``
+  * ``rte_vdev_unregister``
+
 ABI Changes
 -----------
 
@@ -461,6 +469,7 @@ The libraries prepended with a plus sign were incremented in this version.
 
      librte_acl.so.2
    + librte_bitratestats.so.2
+   + librte_bus_vdev.so.1
      librte_cfgfile.so.2
      librte_cmdline.so.2
    + librte_cryptodev.so.4
diff --git a/drivers/bus/Makefile b/drivers/bus/Makefile
index a220d27..6c7e203 100644
--- a/drivers/bus/Makefile
+++ b/drivers/bus/Makefile
@@ -30,12 +30,12 @@
 
 include $(RTE_SDK)/mk/rte.vars.mk
 
-core-libs := librte_eal librte_mbuf librte_mempool librte_ring librte_ether
-
 DIRS-$(CONFIG_RTE_LIBRTE_DPAA_BUS) += dpaa
 
 DIRS-$(CONFIG_RTE_LIBRTE_FSLMC_BUS) += fslmc
 
 DIRS-$(CONFIG_RTE_LIBRTE_PCI_BUS) += pci
 
+DIRS-$(CONFIG_RTE_LIBRTE_VDEV_BUS) += vdev
+
 include $(RTE_SDK)/mk/rte.subdir.mk
diff --git a/drivers/bus/vdev/Makefile b/drivers/bus/vdev/Makefile
new file mode 100644
index 0000000..84bd724
--- /dev/null
+++ b/drivers/bus/vdev/Makefile
@@ -0,0 +1,57 @@
+#   BSD LICENSE
+#
+#   Copyright(c) 2017 Intel Corporation. All rights reserved.
+#   All rights reserved.
+#
+#   Redistribution and use in source and binary forms, with or without
+#   modification, are permitted provided that the following conditions
+#   are met:
+#
+#     * Redistributions of source code must retain the above copyright
+#       notice, this list of conditions and the following disclaimer.
+#     * Redistributions in binary form must reproduce the above copyright
+#       notice, this list of conditions and the following disclaimer in
+#       the documentation and/or other materials provided with the
+#       distribution.
+#     * Neither the name of Intel Corporation nor the names of its
+#       contributors may be used to endorse or promote products derived
+#       from this software without specific prior written permission.
+#
+#   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+#   "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+#   LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+#   A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+#   OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+#   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+#   LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+#   DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+#   THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+#   (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+#   OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+include $(RTE_SDK)/mk/rte.vars.mk
+
+#
+# library name
+#
+LIB = librte_bus_vdev.a
+
+CFLAGS += -O3
+CFLAGS += $(WERROR_FLAGS)
+
+# versioning export map
+EXPORT_MAP := rte_bus_vdev_version.map
+
+# library version
+LIBABIVER := 1
+
+SRCS-y += vdev.c
+
+LDLIBS += -lrte_eal
+
+#
+# Export include files
+#
+SYMLINK-y-include += rte_bus_vdev.h
+
+include $(RTE_SDK)/mk/rte.lib.mk
diff --git a/drivers/bus/vdev/rte_bus_vdev.h b/drivers/bus/vdev/rte_bus_vdev.h
new file mode 100644
index 0000000..41762b8
--- /dev/null
+++ b/drivers/bus/vdev/rte_bus_vdev.h
@@ -0,0 +1,153 @@
+/*-
+ *   BSD LICENSE
+ *
+ *   Copyright(c) 2016 RehiveTech. All rights reserved.
+ *
+ *   Redistribution and use in source and binary forms, with or without
+ *   modification, are permitted provided that the following conditions
+ *   are met:
+ *
+ *     * Redistributions of source code must retain the above copyright
+ *       notice, this list of conditions and the following disclaimer.
+ *     * Redistributions in binary form must reproduce the above copyright
+ *       notice, this list of conditions and the following disclaimer in
+ *       the documentation and/or other materials provided with the
+ *       distribution.
+ *     * Neither the name of RehiveTech nor the names of its
+ *       contributors may be used to endorse or promote products derived
+ *       from this software without specific prior written permission.
+ *
+ *   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ *   "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ *   LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ *   A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ *   OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ *   LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ *   DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ *   THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ *   (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ *   OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef RTE_VDEV_H
+#define RTE_VDEV_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include <sys/queue.h>
+#include <rte_dev.h>
+#include <rte_devargs.h>
+
+struct rte_vdev_device {
+	TAILQ_ENTRY(rte_vdev_device) next;      /**< Next attached vdev */
+	struct rte_device device;               /**< Inherit core device */
+};
+
+/**
+ * @internal
+ * Helper macro for drivers that need to convert to struct rte_vdev_device.
+ */
+#define RTE_DEV_TO_VDEV(ptr) \
+	container_of(ptr, struct rte_vdev_device, device)
+
+static inline const char *
+rte_vdev_device_name(const struct rte_vdev_device *dev)
+{
+	if (dev && dev->device.name)
+		return dev->device.name;
+	return NULL;
+}
+
+static inline const char *
+rte_vdev_device_args(const struct rte_vdev_device *dev)
+{
+	if (dev && dev->device.devargs)
+		return dev->device.devargs->args;
+	return "";
+}
+
+/** Double linked list of virtual device drivers. */
+TAILQ_HEAD(vdev_driver_list, rte_vdev_driver);
+
+/**
+ * Probe function called for each virtual device driver once.
+ */
+typedef int (rte_vdev_probe_t)(struct rte_vdev_device *dev);
+
+/**
+ * Remove function called for each virtual device driver once.
+ */
+typedef int (rte_vdev_remove_t)(struct rte_vdev_device *dev);
+
+/**
+ * A virtual device driver abstraction.
+ */
+struct rte_vdev_driver {
+	TAILQ_ENTRY(rte_vdev_driver) next; /**< Next in list. */
+	struct rte_driver driver;      /**< Inherited general driver. */
+	rte_vdev_probe_t *probe;       /**< Virtual device probe function. */
+	rte_vdev_remove_t *remove;     /**< Virtual device remove function. */
+};
+
+/**
+ * Register a virtual device driver.
+ *
+ * @param driver
+ *   A pointer to a rte_vdev_driver structure describing the driver
+ *   to be registered.
+ */
+void rte_vdev_register(struct rte_vdev_driver *driver);
+
+/**
+ * Unregister a virtual device driver.
+ *
+ * @param driver
+ *   A pointer to a rte_vdev_driver structure describing the driver
+ *   to be unregistered.
+ */
+void rte_vdev_unregister(struct rte_vdev_driver *driver);
+
+#define RTE_PMD_REGISTER_VDEV(nm, vdrv)\
+RTE_INIT(vdrvinitfn_ ##vdrv);\
+static const char *vdrvinit_ ## nm ## _alias;\
+static void vdrvinitfn_ ##vdrv(void)\
+{\
+	(vdrv).driver.name = RTE_STR(nm);\
+	(vdrv).driver.alias = vdrvinit_ ## nm ## _alias;\
+	rte_vdev_register(&vdrv);\
+} \
+RTE_PMD_EXPORT_NAME(nm, __COUNTER__)
+
+#define RTE_PMD_REGISTER_ALIAS(nm, alias)\
+static const char *vdrvinit_ ## nm ## _alias = RTE_STR(alias)
+
+/**
+ * Initialize a driver specified by name.
+ *
+ * @param name
+ *   The pointer to a driver name to be initialized.
+ * @param args
+ *   The pointer to arguments used by driver initialization.
+ * @return
+ *  0 on success, negative on error
+ */
+int rte_vdev_init(const char *name, const char *args);
+
+/**
+ * Uninitalize a driver specified by name.
+ *
+ * @param name
+ *   The pointer to a driver name to be initialized.
+ * @return
+ *  0 on success, negative on error
+ */
+int rte_vdev_uninit(const char *name);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/drivers/bus/vdev/rte_bus_vdev_version.map b/drivers/bus/vdev/rte_bus_vdev_version.map
new file mode 100644
index 0000000..6ccb789
--- /dev/null
+++ b/drivers/bus/vdev/rte_bus_vdev_version.map
@@ -0,0 +1,8 @@
+DPDK_17.11 {
+	global:
+
+	rte_vdev_init;
+	rte_vdev_register;
+	rte_vdev_uninit;
+	rte_vdev_unregister;
+};
diff --git a/drivers/bus/vdev/vdev.c b/drivers/bus/vdev/vdev.c
new file mode 100644
index 0000000..04ed49b
--- /dev/null
+++ b/drivers/bus/vdev/vdev.c
@@ -0,0 +1,344 @@
+/*-
+ *   BSD LICENSE
+ *
+ *   Copyright(c) 2016 RehiveTech. All rights reserved.
+ *
+ *   Redistribution and use in source and binary forms, with or without
+ *   modification, are permitted provided that the following conditions
+ *   are met:
+ *
+ *     * Redistributions of source code must retain the above copyright
+ *       notice, this list of conditions and the following disclaimer.
+ *     * Redistributions in binary form must reproduce the above copyright
+ *       notice, this list of conditions and the following disclaimer in
+ *       the documentation and/or other materials provided with the
+ *       distribution.
+ *     * Neither the name of RehiveTech nor the names of its
+ *       contributors may be used to endorse or promote products derived
+ *       from this software without specific prior written permission.
+ *
+ *   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ *   "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ *   LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ *   A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ *   OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ *   LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ *   DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ *   THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ *   (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ *   OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include <string.h>
+#include <inttypes.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <stdint.h>
+#include <stdbool.h>
+#include <sys/queue.h>
+
+#include <rte_eal.h>
+#include <rte_dev.h>
+#include <rte_bus.h>
+#include <rte_common.h>
+#include <rte_devargs.h>
+#include <rte_memory.h>
+#include <rte_errno.h>
+
+#include "rte_bus_vdev.h"
+
+/* Forward declare to access virtual bus name */
+static struct rte_bus rte_vdev_bus;
+
+/** Double linked list of virtual device drivers. */
+TAILQ_HEAD(vdev_device_list, rte_vdev_device);
+
+static struct vdev_device_list vdev_device_list =
+	TAILQ_HEAD_INITIALIZER(vdev_device_list);
+struct vdev_driver_list vdev_driver_list =
+	TAILQ_HEAD_INITIALIZER(vdev_driver_list);
+
+/* register a driver */
+void
+rte_vdev_register(struct rte_vdev_driver *driver)
+{
+	TAILQ_INSERT_TAIL(&vdev_driver_list, driver, next);
+}
+
+/* unregister a driver */
+void
+rte_vdev_unregister(struct rte_vdev_driver *driver)
+{
+	TAILQ_REMOVE(&vdev_driver_list, driver, next);
+}
+
+static int
+vdev_parse(const char *name, void *addr)
+{
+	struct rte_vdev_driver **out = addr;
+	struct rte_vdev_driver *driver = NULL;
+
+	TAILQ_FOREACH(driver, &vdev_driver_list, next) {
+		if (strncmp(driver->driver.name, name,
+			    strlen(driver->driver.name)) == 0)
+			break;
+		if (driver->driver.alias &&
+		    strncmp(driver->driver.alias, name,
+			    strlen(driver->driver.alias)) == 0)
+			break;
+	}
+	if (driver != NULL &&
+	    addr != NULL)
+		*out = driver;
+	return driver == NULL;
+}
+
+static int
+vdev_probe_all_drivers(struct rte_vdev_device *dev)
+{
+	const char *name;
+	struct rte_vdev_driver *driver;
+	int ret;
+
+	name = rte_vdev_device_name(dev);
+
+	RTE_LOG(DEBUG, EAL, "Search driver %s to probe device %s\n", name,
+		rte_vdev_device_name(dev));
+
+	if (vdev_parse(name, &driver))
+		return -1;
+	dev->device.driver = &driver->driver;
+	ret = driver->probe(dev);
+	if (ret)
+		dev->device.driver = NULL;
+	return ret;
+}
+
+static struct rte_vdev_device *
+find_vdev(const char *name)
+{
+	struct rte_vdev_device *dev;
+
+	if (!name)
+		return NULL;
+
+	TAILQ_FOREACH(dev, &vdev_device_list, next) {
+		const char *devname = rte_vdev_device_name(dev);
+
+		if (!strncmp(devname, name, strlen(name)))
+			return dev;
+	}
+
+	return NULL;
+}
+
+static struct rte_devargs *
+alloc_devargs(const char *name, const char *args)
+{
+	struct rte_devargs *devargs;
+	int ret;
+
+	devargs = calloc(1, sizeof(*devargs));
+	if (!devargs)
+		return NULL;
+
+	devargs->bus = &rte_vdev_bus;
+	if (args)
+		devargs->args = strdup(args);
+	else
+		devargs->args = strdup("");
+
+	ret = snprintf(devargs->name, sizeof(devargs->name), "%s", name);
+	if (ret < 0 || ret >= (int)sizeof(devargs->name)) {
+		free(devargs->args);
+		free(devargs);
+		return NULL;
+	}
+
+	return devargs;
+}
+
+int
+rte_vdev_init(const char *name, const char *args)
+{
+	struct rte_vdev_device *dev;
+	struct rte_devargs *devargs;
+	int ret;
+
+	if (name == NULL)
+		return -EINVAL;
+
+	dev = find_vdev(name);
+	if (dev)
+		return -EEXIST;
+
+	devargs = alloc_devargs(name, args);
+	if (!devargs)
+		return -ENOMEM;
+
+	dev = calloc(1, sizeof(*dev));
+	if (!dev) {
+		ret = -ENOMEM;
+		goto fail;
+	}
+
+	dev->device.devargs = devargs;
+	dev->device.numa_node = SOCKET_ID_ANY;
+	dev->device.name = devargs->name;
+
+	ret = vdev_probe_all_drivers(dev);
+	if (ret) {
+		if (ret > 0)
+			RTE_LOG(ERR, EAL, "no driver found for %s\n", name);
+		goto fail;
+	}
+
+	TAILQ_INSERT_TAIL(&devargs_list, devargs, next);
+
+	TAILQ_INSERT_TAIL(&vdev_device_list, dev, next);
+	return 0;
+
+fail:
+	free(devargs->args);
+	free(devargs);
+	free(dev);
+	return ret;
+}
+
+static int
+vdev_remove_driver(struct rte_vdev_device *dev)
+{
+	const char *name = rte_vdev_device_name(dev);
+	const struct rte_vdev_driver *driver;
+
+	if (!dev->device.driver) {
+		RTE_LOG(DEBUG, EAL, "no driver attach to device %s\n", name);
+		return 1;
+	}
+
+	driver = container_of(dev->device.driver, const struct rte_vdev_driver,
+		driver);
+	return driver->remove(dev);
+}
+
+int
+rte_vdev_uninit(const char *name)
+{
+	struct rte_vdev_device *dev;
+	struct rte_devargs *devargs;
+	int ret;
+
+	if (name == NULL)
+		return -EINVAL;
+
+	dev = find_vdev(name);
+	if (!dev)
+		return -ENOENT;
+
+	devargs = dev->device.devargs;
+
+	ret = vdev_remove_driver(dev);
+	if (ret)
+		return ret;
+
+	TAILQ_REMOVE(&vdev_device_list, dev, next);
+
+	TAILQ_REMOVE(&devargs_list, devargs, next);
+
+	free(devargs->args);
+	free(devargs);
+	free(dev);
+	return 0;
+}
+
+static int
+vdev_scan(void)
+{
+	struct rte_vdev_device *dev;
+	struct rte_devargs *devargs;
+
+	/* for virtual devices we scan the devargs_list populated via cmdline */
+	TAILQ_FOREACH(devargs, &devargs_list, next) {
+
+		if (devargs->bus != &rte_vdev_bus)
+			continue;
+
+		dev = find_vdev(devargs->name);
+		if (dev)
+			continue;
+
+		dev = calloc(1, sizeof(*dev));
+		if (!dev)
+			return -1;
+
+		dev->device.devargs = devargs;
+		dev->device.numa_node = SOCKET_ID_ANY;
+		dev->device.name = devargs->name;
+
+		TAILQ_INSERT_TAIL(&vdev_device_list, dev, next);
+	}
+
+	return 0;
+}
+
+static int
+vdev_probe(void)
+{
+	struct rte_vdev_device *dev;
+
+	/* call the init function for each virtual device */
+	TAILQ_FOREACH(dev, &vdev_device_list, next) {
+
+		if (dev->device.driver)
+			continue;
+
+		if (vdev_probe_all_drivers(dev)) {
+			RTE_LOG(ERR, EAL, "failed to initialize %s device\n",
+				rte_vdev_device_name(dev));
+			return -1;
+		}
+	}
+
+	return 0;
+}
+
+static struct rte_device *
+vdev_find_device(const struct rte_device *start, rte_dev_cmp_t cmp,
+		 const void *data)
+{
+	struct rte_vdev_device *dev;
+
+	TAILQ_FOREACH(dev, &vdev_device_list, next) {
+		if (start && &dev->device == start) {
+			start = NULL;
+			continue;
+		}
+		if (cmp(&dev->device, data) == 0)
+			return &dev->device;
+	}
+	return NULL;
+}
+
+static int
+vdev_plug(struct rte_device *dev)
+{
+	return vdev_probe_all_drivers(RTE_DEV_TO_VDEV(dev));
+}
+
+static int
+vdev_unplug(struct rte_device *dev)
+{
+	return rte_vdev_uninit(dev->name);
+}
+
+static struct rte_bus rte_vdev_bus = {
+	.scan = vdev_scan,
+	.probe = vdev_probe,
+	.find_device = vdev_find_device,
+	.plug = vdev_plug,
+	.unplug = vdev_unplug,
+	.parse = vdev_parse,
+};
+
+RTE_REGISTER_BUS(vdev, rte_vdev_bus);
diff --git a/drivers/crypto/Makefile b/drivers/crypto/Makefile
index d551541..1cb4cdb 100644
--- a/drivers/crypto/Makefile
+++ b/drivers/crypto/Makefile
@@ -32,6 +32,7 @@
 include $(RTE_SDK)/mk/rte.vars.mk
 
 core-libs := librte_eal librte_mbuf librte_mempool librte_ring librte_cryptodev
+core-libs += librte_bus_vdev
 
 DIRS-$(CONFIG_RTE_LIBRTE_PMD_AESNI_GCM) += aesni_gcm
 DIRS-$(CONFIG_RTE_LIBRTE_PMD_AESNI_MB) += aesni_mb
diff --git a/drivers/crypto/aesni_gcm/aesni_gcm_pmd.c b/drivers/crypto/aesni_gcm/aesni_gcm_pmd.c
index 1d18217..88554c3 100644
--- a/drivers/crypto/aesni_gcm/aesni_gcm_pmd.c
+++ b/drivers/crypto/aesni_gcm/aesni_gcm_pmd.c
@@ -35,7 +35,7 @@
 #include <rte_hexdump.h>
 #include <rte_cryptodev.h>
 #include <rte_cryptodev_pmd.h>
-#include <rte_vdev.h>
+#include <rte_bus_vdev.h>
 #include <rte_malloc.h>
 #include <rte_cpuflags.h>
 #include <rte_byteorder.h>
diff --git a/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c b/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c
index a589557..7004389 100644
--- a/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c
+++ b/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c
@@ -36,7 +36,7 @@
 #include <rte_hexdump.h>
 #include <rte_cryptodev.h>
 #include <rte_cryptodev_pmd.h>
-#include <rte_vdev.h>
+#include <rte_bus_vdev.h>
 #include <rte_malloc.h>
 #include <rte_cpuflags.h>
 
diff --git a/drivers/crypto/armv8/rte_armv8_pmd.c b/drivers/crypto/armv8/rte_armv8_pmd.c
index 2d2f3ff..97719f2 100644
--- a/drivers/crypto/armv8/rte_armv8_pmd.c
+++ b/drivers/crypto/armv8/rte_armv8_pmd.c
@@ -36,7 +36,7 @@
 #include <rte_hexdump.h>
 #include <rte_cryptodev.h>
 #include <rte_cryptodev_pmd.h>
-#include <rte_vdev.h>
+#include <rte_bus_vdev.h>
 #include <rte_malloc.h>
 #include <rte_cpuflags.h>
 
diff --git a/drivers/crypto/kasumi/rte_kasumi_pmd.c b/drivers/crypto/kasumi/rte_kasumi_pmd.c
index 7c1b56b..e76821d 100644
--- a/drivers/crypto/kasumi/rte_kasumi_pmd.c
+++ b/drivers/crypto/kasumi/rte_kasumi_pmd.c
@@ -35,7 +35,7 @@
 #include <rte_hexdump.h>
 #include <rte_cryptodev.h>
 #include <rte_cryptodev_pmd.h>
-#include <rte_vdev.h>
+#include <rte_bus_vdev.h>
 #include <rte_malloc.h>
 #include <rte_cpuflags.h>
 
diff --git a/drivers/crypto/mrvl/rte_mrvl_pmd.c b/drivers/crypto/mrvl/rte_mrvl_pmd.c
index 63895c5..1f09d7d 100644
--- a/drivers/crypto/mrvl/rte_mrvl_pmd.c
+++ b/drivers/crypto/mrvl/rte_mrvl_pmd.c
@@ -36,7 +36,7 @@
 #include <rte_hexdump.h>
 #include <rte_cryptodev.h>
 #include <rte_cryptodev_pmd.h>
-#include <rte_vdev.h>
+#include <rte_bus_vdev.h>
 #include <rte_malloc.h>
 #include <rte_cpuflags.h>
 
diff --git a/drivers/crypto/null/null_crypto_pmd.c b/drivers/crypto/null/null_crypto_pmd.c
index 4b9a58a..62a2802 100644
--- a/drivers/crypto/null/null_crypto_pmd.c
+++ b/drivers/crypto/null/null_crypto_pmd.c
@@ -33,7 +33,7 @@
 #include <rte_common.h>
 #include <rte_config.h>
 #include <rte_cryptodev_pmd.h>
-#include <rte_vdev.h>
+#include <rte_bus_vdev.h>
 #include <rte_malloc.h>
 
 #include "null_crypto_pmd_private.h"
diff --git a/drivers/crypto/openssl/rte_openssl_pmd.c b/drivers/crypto/openssl/rte_openssl_pmd.c
index 25c1154..06e1a6d 100644
--- a/drivers/crypto/openssl/rte_openssl_pmd.c
+++ b/drivers/crypto/openssl/rte_openssl_pmd.c
@@ -34,7 +34,7 @@
 #include <rte_hexdump.h>
 #include <rte_cryptodev.h>
 #include <rte_cryptodev_pmd.h>
-#include <rte_vdev.h>
+#include <rte_bus_vdev.h>
 #include <rte_malloc.h>
 #include <rte_cpuflags.h>
 
diff --git a/drivers/crypto/scheduler/scheduler_pmd.c b/drivers/crypto/scheduler/scheduler_pmd.c
index 40ab304..acdf636 100644
--- a/drivers/crypto/scheduler/scheduler_pmd.c
+++ b/drivers/crypto/scheduler/scheduler_pmd.c
@@ -33,7 +33,7 @@
 #include <rte_hexdump.h>
 #include <rte_cryptodev.h>
 #include <rte_cryptodev_pmd.h>
-#include <rte_vdev.h>
+#include <rte_bus_vdev.h>
 #include <rte_malloc.h>
 #include <rte_cpuflags.h>
 #include <rte_reorder.h>
diff --git a/drivers/crypto/snow3g/rte_snow3g_pmd.c b/drivers/crypto/snow3g/rte_snow3g_pmd.c
index fe7bb86..2738b2c 100644
--- a/drivers/crypto/snow3g/rte_snow3g_pmd.c
+++ b/drivers/crypto/snow3g/rte_snow3g_pmd.c
@@ -35,7 +35,7 @@
 #include <rte_hexdump.h>
 #include <rte_cryptodev.h>
 #include <rte_cryptodev_pmd.h>
-#include <rte_vdev.h>
+#include <rte_bus_vdev.h>
 #include <rte_malloc.h>
 #include <rte_cpuflags.h>
 
diff --git a/drivers/crypto/zuc/rte_zuc_pmd.c b/drivers/crypto/zuc/rte_zuc_pmd.c
index b99f6ec..1f4ca7b 100644
--- a/drivers/crypto/zuc/rte_zuc_pmd.c
+++ b/drivers/crypto/zuc/rte_zuc_pmd.c
@@ -35,7 +35,7 @@
 #include <rte_hexdump.h>
 #include <rte_cryptodev.h>
 #include <rte_cryptodev_pmd.h>
-#include <rte_vdev.h>
+#include <rte_bus_vdev.h>
 #include <rte_malloc.h>
 #include <rte_cpuflags.h>
 
diff --git a/drivers/event/Makefile b/drivers/event/Makefile
index 05dec1b..9c9ae82 100644
--- a/drivers/event/Makefile
+++ b/drivers/event/Makefile
@@ -31,7 +31,7 @@
 
 include $(RTE_SDK)/mk/rte.vars.mk
 
-core-libs := librte_eal librte_ether librte_eventdev
+core-libs := librte_eal librte_ether librte_eventdev librte_bus_vdev
 
 DIRS-$(CONFIG_RTE_LIBRTE_PMD_SKELETON_EVENTDEV) += skeleton
 DIRS-$(CONFIG_RTE_LIBRTE_PMD_SW_EVENTDEV) += sw
diff --git a/drivers/event/dpaa2/dpaa2_eventdev.c b/drivers/event/dpaa2/dpaa2_eventdev.c
index 45e2ebc..c293087 100644
--- a/drivers/event/dpaa2/dpaa2_eventdev.c
+++ b/drivers/event/dpaa2/dpaa2_eventdev.c
@@ -52,7 +52,7 @@
 #include <rte_memory.h>
 #include <rte_memzone.h>
 #include <rte_pci.h>
-#include <rte_vdev.h>
+#include <rte_bus_vdev.h>
 #include <rte_ethdev.h>
 #include <rte_event_eth_rx_adapter.h>
 
diff --git a/drivers/event/octeontx/ssovf_evdev.c b/drivers/event/octeontx/ssovf_evdev.c
index cfbd958..7606b60 100644
--- a/drivers/event/octeontx/ssovf_evdev.c
+++ b/drivers/event/octeontx/ssovf_evdev.c
@@ -43,7 +43,7 @@
 #include <rte_malloc.h>
 #include <rte_memory.h>
 #include <rte_memzone.h>
-#include <rte_vdev.h>
+#include <rte_bus_vdev.h>
 
 #include "ssovf_evdev.h"
 
diff --git a/drivers/event/skeleton/skeleton_eventdev.c b/drivers/event/skeleton/skeleton_eventdev.c
index 4d1a1da..70bb186 100644
--- a/drivers/event/skeleton/skeleton_eventdev.c
+++ b/drivers/event/skeleton/skeleton_eventdev.c
@@ -47,7 +47,7 @@
 #include <rte_memory.h>
 #include <rte_memzone.h>
 #include <rte_lcore.h>
-#include <rte_vdev.h>
+#include <rte_bus_vdev.h>
 
 #include "skeleton_eventdev.h"
 
diff --git a/drivers/event/sw/sw_evdev.c b/drivers/event/sw/sw_evdev.c
index 178f169..0b54afa 100644
--- a/drivers/event/sw/sw_evdev.c
+++ b/drivers/event/sw/sw_evdev.c
@@ -33,7 +33,7 @@
 #include <inttypes.h>
 #include <string.h>
 
-#include <rte_vdev.h>
+#include <rte_bus_vdev.h>
 #include <rte_memzone.h>
 #include <rte_kvargs.h>
 #include <rte_ring.h>
diff --git a/drivers/net/Makefile b/drivers/net/Makefile
index cf33233..00be153 100644
--- a/drivers/net/Makefile
+++ b/drivers/net/Makefile
@@ -37,7 +37,7 @@ ifeq ($(CONFIG_RTE_LIBRTE_THUNDERX_NICVF_PMD),d)
 endif
 
 core-libs := librte_eal librte_mbuf librte_mempool librte_ring librte_ether
-core-libs += librte_net librte_kvargs
+core-libs += librte_net librte_kvargs librte_bus_vdev
 
 DIRS-$(CONFIG_RTE_LIBRTE_PMD_AF_PACKET) += af_packet
 DIRS-$(CONFIG_RTE_LIBRTE_ARK_PMD) += ark
diff --git a/drivers/net/af_packet/rte_eth_af_packet.c b/drivers/net/af_packet/rte_eth_af_packet.c
index 28e6a94..fa84eb9 100644
--- a/drivers/net/af_packet/rte_eth_af_packet.c
+++ b/drivers/net/af_packet/rte_eth_af_packet.c
@@ -41,7 +41,7 @@
 #include <rte_ethdev_vdev.h>
 #include <rte_malloc.h>
 #include <rte_kvargs.h>
-#include <rte_vdev.h>
+#include <rte_bus_vdev.h>
 
 #include <linux/if_ether.h>
 #include <linux/if_packet.h>
diff --git a/drivers/net/bonding/rte_eth_bond_api.c b/drivers/net/bonding/rte_eth_bond_api.c
index 8c602f8..980e636 100644
--- a/drivers/net/bonding/rte_eth_bond_api.c
+++ b/drivers/net/bonding/rte_eth_bond_api.c
@@ -37,7 +37,7 @@
 #include <rte_malloc.h>
 #include <rte_ethdev.h>
 #include <rte_tcp.h>
-#include <rte_vdev.h>
+#include <rte_bus_vdev.h>
 #include <rte_kvargs.h>
 
 #include "rte_eth_bond.h"
diff --git a/drivers/net/bonding/rte_eth_bond_pmd.c b/drivers/net/bonding/rte_eth_bond_pmd.c
index af33529..9f66dfc 100644
--- a/drivers/net/bonding/rte_eth_bond_pmd.c
+++ b/drivers/net/bonding/rte_eth_bond_pmd.c
@@ -43,7 +43,7 @@
 #include <rte_ip_frag.h>
 #include <rte_devargs.h>
 #include <rte_kvargs.h>
-#include <rte_vdev.h>
+#include <rte_bus_vdev.h>
 #include <rte_alarm.h>
 #include <rte_cycles.h>
 
diff --git a/drivers/net/failsafe/failsafe.c b/drivers/net/failsafe/failsafe.c
index 6006bef..6bc5aba 100644
--- a/drivers/net/failsafe/failsafe.c
+++ b/drivers/net/failsafe/failsafe.c
@@ -37,7 +37,7 @@
 #include <rte_ethdev_vdev.h>
 #include <rte_devargs.h>
 #include <rte_kvargs.h>
-#include <rte_vdev.h>
+#include <rte_bus_vdev.h>
 
 #include "failsafe_private.h"
 
diff --git a/drivers/net/kni/rte_eth_kni.c b/drivers/net/kni/rte_eth_kni.c
index d68ff7a..36e90fd 100644
--- a/drivers/net/kni/rte_eth_kni.c
+++ b/drivers/net/kni/rte_eth_kni.c
@@ -40,7 +40,7 @@
 #include <rte_kni.h>
 #include <rte_kvargs.h>
 #include <rte_malloc.h>
-#include <rte_vdev.h>
+#include <rte_bus_vdev.h>
 
 /* Only single queue supported */
 #define KNI_MAX_QUEUE_PER_PORT 1
diff --git a/drivers/net/mrvl/mrvl_ethdev.c b/drivers/net/mrvl/mrvl_ethdev.c
index 03d9fec..c60ee37 100644
--- a/drivers/net/mrvl/mrvl_ethdev.c
+++ b/drivers/net/mrvl/mrvl_ethdev.c
@@ -36,7 +36,7 @@
 #include <rte_kvargs.h>
 #include <rte_log.h>
 #include <rte_malloc.h>
-#include <rte_vdev.h>
+#include <rte_bus_vdev.h>
 
 /* Unluckily, container_of is defined by both DPDK and MUSDK,
  * we'll declare only one version.
diff --git a/drivers/net/null/rte_eth_null.c b/drivers/net/null/rte_eth_null.c
index 3433c9c..032c30e 100644
--- a/drivers/net/null/rte_eth_null.c
+++ b/drivers/net/null/rte_eth_null.c
@@ -36,7 +36,7 @@
 #include <rte_ethdev_vdev.h>
 #include <rte_malloc.h>
 #include <rte_memcpy.h>
-#include <rte_vdev.h>
+#include <rte_bus_vdev.h>
 #include <rte_kvargs.h>
 #include <rte_spinlock.h>
 
diff --git a/drivers/net/octeontx/octeontx_ethdev.c b/drivers/net/octeontx/octeontx_ethdev.c
index 86de5d1..bd24ec3 100644
--- a/drivers/net/octeontx/octeontx_ethdev.c
+++ b/drivers/net/octeontx/octeontx_ethdev.c
@@ -44,7 +44,7 @@
 #include <rte_kvargs.h>
 #include <rte_malloc.h>
 #include <rte_prefetch.h>
-#include <rte_vdev.h>
+#include <rte_bus_vdev.h>
 
 #include "octeontx_ethdev.h"
 #include "octeontx_rxtx.h"
diff --git a/drivers/net/pcap/rte_eth_pcap.c b/drivers/net/pcap/rte_eth_pcap.c
index 3205df8..f683d3a 100644
--- a/drivers/net/pcap/rte_eth_pcap.c
+++ b/drivers/net/pcap/rte_eth_pcap.c
@@ -44,7 +44,7 @@
 #include <rte_kvargs.h>
 #include <rte_malloc.h>
 #include <rte_mbuf.h>
-#include <rte_vdev.h>
+#include <rte_bus_vdev.h>
 
 #define RTE_ETH_PCAP_SNAPSHOT_LEN 65535
 #define RTE_ETH_PCAP_SNAPLEN ETHER_MAX_JUMBO_FRAME_LEN
diff --git a/drivers/net/ring/rte_eth_ring.c b/drivers/net/ring/rte_eth_ring.c
index d82d207..cdc3cc1 100644
--- a/drivers/net/ring/rte_eth_ring.c
+++ b/drivers/net/ring/rte_eth_ring.c
@@ -38,7 +38,7 @@
 #include <rte_memcpy.h>
 #include <rte_memzone.h>
 #include <rte_string_fns.h>
-#include <rte_vdev.h>
+#include <rte_bus_vdev.h>
 #include <rte_kvargs.h>
 #include <rte_errno.h>
 
diff --git a/drivers/net/softnic/rte_eth_softnic.c b/drivers/net/softnic/rte_eth_softnic.c
index abb617a..3e47c2f 100644
--- a/drivers/net/softnic/rte_eth_softnic.c
+++ b/drivers/net/softnic/rte_eth_softnic.c
@@ -38,7 +38,7 @@
 #include <rte_ethdev.h>
 #include <rte_ethdev_vdev.h>
 #include <rte_malloc.h>
-#include <rte_vdev.h>
+#include <rte_bus_vdev.h>
 #include <rte_kvargs.h>
 #include <rte_errno.h>
 #include <rte_ring.h>
diff --git a/drivers/net/tap/rte_eth_tap.c b/drivers/net/tap/rte_eth_tap.c
index 64dd3b0..6b27679 100644
--- a/drivers/net/tap/rte_eth_tap.c
+++ b/drivers/net/tap/rte_eth_tap.c
@@ -39,7 +39,7 @@
 #include <rte_ethdev.h>
 #include <rte_ethdev_vdev.h>
 #include <rte_malloc.h>
-#include <rte_vdev.h>
+#include <rte_bus_vdev.h>
 #include <rte_kvargs.h>
 #include <rte_net.h>
 #include <rte_debug.h>
diff --git a/drivers/net/vhost/rte_eth_vhost.c b/drivers/net/vhost/rte_eth_vhost.c
index f98c980..53f61f0 100644
--- a/drivers/net/vhost/rte_eth_vhost.c
+++ b/drivers/net/vhost/rte_eth_vhost.c
@@ -39,7 +39,7 @@
 #include <rte_ethdev_vdev.h>
 #include <rte_malloc.h>
 #include <rte_memcpy.h>
-#include <rte_vdev.h>
+#include <rte_bus_vdev.h>
 #include <rte_kvargs.h>
 #include <rte_vhost.h>
 #include <rte_spinlock.h>
diff --git a/drivers/net/virtio/virtio_user_ethdev.c b/drivers/net/virtio/virtio_user_ethdev.c
index 0cfa27b..7be57ce 100644
--- a/drivers/net/virtio/virtio_user_ethdev.c
+++ b/drivers/net/virtio/virtio_user_ethdev.c
@@ -40,7 +40,7 @@
 #include <rte_malloc.h>
 #include <rte_kvargs.h>
 #include <rte_ethdev_vdev.h>
-#include <rte_vdev.h>
+#include <rte_bus_vdev.h>
 #include <rte_alarm.h>
 
 #include "virtio_ethdev.h"
diff --git a/lib/librte_eal/bsdapp/eal/Makefile b/lib/librte_eal/bsdapp/eal/Makefile
index 934c12b..5d9ace9 100644
--- a/lib/librte_eal/bsdapp/eal/Makefile
+++ b/lib/librte_eal/bsdapp/eal/Makefile
@@ -48,7 +48,7 @@ LDLIBS += -lgcc_s
 
 EXPORT_MAP := ../../rte_eal_version.map
 
-LIBABIVER := 6
+LIBABIVER := 7
 
 # specific to bsdapp exec-env
 SRCS-$(CONFIG_RTE_EXEC_ENV_BSDAPP) := eal.c
@@ -67,7 +67,6 @@ SRCS-$(CONFIG_RTE_EXEC_ENV_BSDAPP) += eal_common_timer.c
 SRCS-$(CONFIG_RTE_EXEC_ENV_BSDAPP) += eal_common_memzone.c
 SRCS-$(CONFIG_RTE_EXEC_ENV_BSDAPP) += eal_common_log.c
 SRCS-$(CONFIG_RTE_EXEC_ENV_BSDAPP) += eal_common_launch.c
-SRCS-$(CONFIG_RTE_EXEC_ENV_BSDAPP) += eal_common_vdev.c
 SRCS-$(CONFIG_RTE_EXEC_ENV_BSDAPP) += eal_common_memory.c
 SRCS-$(CONFIG_RTE_EXEC_ENV_BSDAPP) += eal_common_tailqs.c
 SRCS-$(CONFIG_RTE_EXEC_ENV_BSDAPP) += eal_common_errno.c
diff --git a/lib/librte_eal/common/.eal_common_dev.c.swp b/lib/librte_eal/common/.eal_common_dev.c.swp
new file mode 100644
index 0000000000000000000000000000000000000000..86626d122c3c6ce6980bc1ff0419c99ff5647222
GIT binary patch
literal 16384
zcmeI2Ym6IL6~`wj(6~v%qX_X3;>J;ky?7sKLn|fO4PJY8cZ%0uX2!c+NM(&Z<K1cP
z8E0m^VQDC+P$(3{LwtY=Xak4>f={%i`A}6zNQjq&RKbU~Qom5~6e4L6MbMW2xp&4M
zd%f9&FH~q&`mODm>vPZjpL6frIpg}&va-l-nm8)q?{$*&#JP*B-#Bucbn5VKDKH#5
zy5nDQsrcTh8+U9b-3fz}Yj!YccFfzyH%x0|vSrr^FR*Hs(VA?y?Y8So;%!a5t)bCG
zV`tMzi$sA$fgKgNR=VN(BU9AuVEO>N?hVx)zmYUZ6i5_E6i5_E6i5_E6i5_E6i5{K
z|4|_5?3O-);p`5FbVvBQYv}c=@bl^L_3Y63@MH3lD3B<SD3B<SD3B<SD3B<SD3B<S
zD3B<SD3B=d3RJ)_C21f0dLtD8@cciz|Nr-ECF#%L58zwiF0c+P@OJQ<{gU)k@Dp$r
zyc_)KT1h$wZUu8-H#iUD9&o`s!83a$=}X{d@bWb{4;*k1JeiWD&jA_a!F#|scni1+
z{ACY(0>1@62Hyc+0B6A+pbiX>2K&K2aN%l6`WtuxoCiMu-v{@CPl0>DNiYr4-~f=o
zORtfn7s2D;G4LSxHn<a<1mj=~WWmd?hF{>j;C}E~@M%y4`@mlC!mA|d5%4hhCO8Kk
z0H=WqRzU@n!7*?(_&bU&7r_PaD{vls6r2V%a0+|?oCMc^e;|g>gXh4L;Md@b;A3C|
z1i%LtI0y~^iu-jS{+DX38y*{TjJ9<g3DNAfTJ$@N8Xd?qT*nWXXi@L_ITk;FR)Yr&
zZ_Uq2eqaQ4Bm9yieOO9)R?zhvhL__~DwV?b#%IWUmOiSwTq{-PGqS4Yn4B-=Si0!h
z8<xi!hU2&aGp)dAtg~R<!rKkIVX@31KYPka=cJU~WEq&v@;=x!gOB4gU8mFPu4T{|
z9Y`rS5P2{zmn*tfUD~GK*{;u;U8fP)uEVHnzuW1!__>OS-pE<%F4hH`o@V80sgz}y
zNQ3<-<>h?o@<v+_!))4)N&d5@>x~{Los9LE;-4A)ng;J`^!-|WlVS&rMvuPd)d<lQ
zXTxaOX4G}Zb2n_$GACj~hv~Qj(8CGBsQQ7|ZQz4&hK<1^$|l}G{M?5pm55~~);bL7
z7)2|dEd5X+eCeVHyb<tJuzlt_t<8RTxMoWQg&EM0ergns!jHV)GG4?hN{aC3NVRo0
zpuDLWrYV9<DVk&AKWy^s4wC=_XtX==X6a7DPG?D;DR%ZO8_|IL3R@sw2ePskm(-=E
zMb$CtEsF&%<GEt=vL!Y(4j=Ll_ov2{WQ>^bVgK9tw?#*m9?BaeFNEs0Ehq3<lti%{
zq7I@YBB4TIqeEgU#qxuOuw6EZbQoBqM6`xhDX}iaR-!OE=vypABFcQVh<{c1%D6I=
z&Ed*MNsZ_auaYsRVVKq_O6q8Z+;B0s#<;10Jiml1QGy-`la9M<inZ}TxbjG;$uZ{N
zZg-dv!-^&_RGUPSUurnv$pO!{43Q?BWnSi3aiy`HMyqRDEKNV_>%dtfuqM{iu`?%V
z!nNGBiS?O&bAHgY>fMot`P>`Teq-xFBn%ylnf5pR$<tk{3qRsLB8<Ui$KtJfZl6Fr
zY-h*`KQL{V8zoWM7-Ot5$Mgk7V_IcSU&*U7E?vuVnJIHDUtCr+xhPu5Y^kDY%B)gS
z^i?{fRSOHOm|x7#%M-#<MkyCc)uK|KXJvW5q|D3Zg3Kx^tLO`|x&m8SmRA*x8YpF!
zFR!wdJZx3<sEev53sd+)MdjU;l)UIO$5s|(GDP1kRLZ)VFX%a@>8euDS*#g4)GMkk
z3>EWwK1V(*sg*fJ*N)Ts*(!XHH4T<@T&$~0x>6};*+OLnLswZL4?l|V4@2i}3R5Lz
zQPFW+ujI&Dp{mM@a+&+CRcAF_(W|=5<|~z=MxAJ~x~vpr^jLy$G(uR-2~*mVTu^9(
zAm1V{E|v1?D)$ki(&YD5VH77rZ8g@HH3!dih6}&2Qdud(TXe<MP;joIYHU{KVw7Yy
zhf^eSQBh@*N-6i>6_g^nfeXS^o-O57T`5%I3tOtHh_#GZ$@s2TDCLz!xi~?(mn%Fw
zbfzujOC=<ZjLw%<Rb_r5bSkbAomMbD1*##n)I0_zb14>OwXlGXVQjh92oDbm+!juy
z^N5g^<|k<!@-0g$MGeE+YL$i;X5WxZ1KACO6ue~&zsP1+2S<PmC>3RBNTH953V(!4
zm@lm9xozy>aOw8lW^l&vEOy2Y*4-|4SsklkH?d{Ja)Hao8P5&^%V8bMYumn$y;wL?
z$PCsqOwf8aa6O;3jZId!Sl7p@hpVFHm^f-N*uaIS?FJUTn%I~4xXjSHX-58xv9g8U
zvB{)sCtv5?CR3ciYO#XrVbg~_EZ+q7TVT`CWOm?3HW)K)S}owrppX1=>^Ar{P?*8C
zWD;JvyvH_HM9(%_{mUa)f;{P)#_khWkepDgg?^}W4BoV<GoNpCsGp|WYPn~yVv#eA
zmSMLsCfkV&jWN}Vd+FmGtJ{v@ZPK2p&Dvd<_AH?j_7*T{)ZGmWeRVcHdu=_4OflLK
z|JOeCLb%l<49s`C9<G-S7Z;AuqriZtqumi6Q3kcG;F$Q-c1=nlE_V()5QLu62Z?0%
zb|Ell1l(p{wZ5dn&Y)aeW~3LX7Wzm#%$R_<C89K@oD0(#c7&;XtHrp2J_PnH59t@G
zP>8h6G_vgasUt_(jVoAYm^P8$rp44aZ?+{tC)hT<2p49xB9^s+j0IAf92=MD{y&TR
z(-htJ;{HE+zW*HV@h^f$!2{r4un1<ragYN4!ae^#!3*FK@OAK2@CnccI+zF3-~@OR
z*bRP;y1=90Vek;R53GWl!A;;OxB=_}e?`sUY48+y415oK1>6Jf1|J8ffC^568Spmn
zdhilz3@?H|0;)Uw68r*u27C}qgDLP1un(lb9&iD*h-blr;LG4{a2M!;+kg#j1v&6m
zupjINyTJ3PQ~Vx03w{Ug2VVo91P(Ak15AS~xPThPGvI0P6nGp^J);fY4_3f3V1Viw
zKSP{;1RerE1owf@0~Hj&o55Z{@!SKFzeIsVfkc5sfgKbWE=oo<Alzb8v7qKzZES+5
zz9R|>I8JYP!Sa7vzwA|tMpR<rg+!`kt@Vlly^1N7TcUwbF%uu-l@}UXR7K_WM0}=V
zA{9AN$cWWEaxqIo#iD+Rl`52%uJq1D)mBln9W1)CI=1&H{|uIUxy`V7tQxw-3EZer
z{dEVO;`XVtxHxn!*26aSR{BPiD7=D1<snh(9$gWFSFsb+$*B5PRE-QXF<!?B-Ha+r
zqB<W1HeN#&UNk++%7o*xJdc;4jtRN=DbwI-9ljr*iPt$VcV1B0j%>pVeEk@9B<P!J
z{!<uj+yP$qTyyDet=F8wbfuFjtOU~yg2>UKETM-2@QK`r5_-!+fe~(q=2Uww%FB^o
zQBLfXOCl*p%sTPl0Dcan6aP#(H$Jo7TpKFB4Nkh$R{uvn4)O6ECBrlGGQKe!aNEJ1
zOOW9?f-vpe<*<Q{fm?E(e(;_$O=Mor5Q$4d_my9i7jb~EPR5{M_=tx>xZ!PNj^vnc
zf5>v1nK4)uqk{=bIf`E22HEdfk$8O_RtBGP^(GWTLhZTE;WXH?u0+p|u3&Ma%)9KR
zjW>=hJ6jxh1uSgwM~3mm4Em95D0~|TVQiJdiKrkxcp|?1VHJokbD^>9z(b^HS)_+F
z@y5Ln#t%l}jIW7dzWEM{O-|4ZGqYtmc<y+}KX%B^9rDvTnwC5ZsFr|-ns7Syz=ke|
zI5KiQaJwy&$C~FUN<BQ+qD6{&-{xTmU#>*9#*!S4QRjF;*7lqh*W;;6y3F3i@ZbPZ
Nz%;1^3>J<{{{d!`pU?mR

literal 0
HcmV?d00001

diff --git a/lib/librte_eal/common/Makefile b/lib/librte_eal/common/Makefile
index 16a2f26..9effd0d 100644
--- a/lib/librte_eal/common/Makefile
+++ b/lib/librte_eal/common/Makefile
@@ -39,7 +39,7 @@ INC += rte_per_lcore.h rte_random.h
 INC += rte_tailq.h rte_interrupts.h rte_alarm.h
 INC += rte_string_fns.h rte_version.h
 INC += rte_eal_memconfig.h rte_malloc_heap.h
-INC += rte_hexdump.h rte_devargs.h rte_bus.h rte_dev.h rte_vdev.h
+INC += rte_hexdump.h rte_devargs.h rte_bus.h rte_dev.h
 INC += rte_pci_dev_feature_defs.h rte_pci_dev_features.h
 INC += rte_malloc.h rte_keepalive.h rte_time.h
 INC += rte_service.h rte_service_component.h
diff --git a/lib/librte_eal/common/eal_common_vdev.c b/lib/librte_eal/common/eal_common_vdev.c
deleted file mode 100644
index f7e547a..0000000
--- a/lib/librte_eal/common/eal_common_vdev.c
+++ /dev/null
@@ -1,342 +0,0 @@
-/*-
- *   BSD LICENSE
- *
- *   Copyright(c) 2016 RehiveTech. All rights reserved.
- *
- *   Redistribution and use in source and binary forms, with or without
- *   modification, are permitted provided that the following conditions
- *   are met:
- *
- *     * Redistributions of source code must retain the above copyright
- *       notice, this list of conditions and the following disclaimer.
- *     * Redistributions in binary form must reproduce the above copyright
- *       notice, this list of conditions and the following disclaimer in
- *       the documentation and/or other materials provided with the
- *       distribution.
- *     * Neither the name of RehiveTech nor the names of its
- *       contributors may be used to endorse or promote products derived
- *       from this software without specific prior written permission.
- *
- *   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- *   "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- *   LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- *   A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- *   OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- *   LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- *   DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- *   THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- *   (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- *   OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include <string.h>
-#include <inttypes.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <stdint.h>
-#include <stdbool.h>
-#include <sys/queue.h>
-
-#include <rte_eal.h>
-#include <rte_dev.h>
-#include <rte_bus.h>
-#include <rte_vdev.h>
-#include <rte_common.h>
-#include <rte_devargs.h>
-#include <rte_memory.h>
-#include <rte_errno.h>
-
-/* Forward declare to access virtual bus name */
-static struct rte_bus rte_vdev_bus;
-
-/** Double linked list of virtual device drivers. */
-TAILQ_HEAD(vdev_device_list, rte_vdev_device);
-
-static struct vdev_device_list vdev_device_list =
-	TAILQ_HEAD_INITIALIZER(vdev_device_list);
-struct vdev_driver_list vdev_driver_list =
-	TAILQ_HEAD_INITIALIZER(vdev_driver_list);
-
-/* register a driver */
-void
-rte_vdev_register(struct rte_vdev_driver *driver)
-{
-	TAILQ_INSERT_TAIL(&vdev_driver_list, driver, next);
-}
-
-/* unregister a driver */
-void
-rte_vdev_unregister(struct rte_vdev_driver *driver)
-{
-	TAILQ_REMOVE(&vdev_driver_list, driver, next);
-}
-
-static int
-vdev_parse(const char *name, void *addr)
-{
-	struct rte_vdev_driver **out = addr;
-	struct rte_vdev_driver *driver = NULL;
-
-	TAILQ_FOREACH(driver, &vdev_driver_list, next) {
-		if (strncmp(driver->driver.name, name,
-			    strlen(driver->driver.name)) == 0)
-			break;
-		if (driver->driver.alias &&
-		    strncmp(driver->driver.alias, name,
-			    strlen(driver->driver.alias)) == 0)
-			break;
-	}
-	if (driver != NULL &&
-	    addr != NULL)
-		*out = driver;
-	return driver == NULL;
-}
-
-static int
-vdev_probe_all_drivers(struct rte_vdev_device *dev)
-{
-	const char *name;
-	struct rte_vdev_driver *driver;
-	int ret;
-
-	name = rte_vdev_device_name(dev);
-
-	RTE_LOG(DEBUG, EAL, "Search driver %s to probe device %s\n", name,
-		rte_vdev_device_name(dev));
-
-	if (vdev_parse(name, &driver))
-		return -1;
-	dev->device.driver = &driver->driver;
-	ret = driver->probe(dev);
-	if (ret)
-		dev->device.driver = NULL;
-	return ret;
-}
-
-static struct rte_vdev_device *
-find_vdev(const char *name)
-{
-	struct rte_vdev_device *dev;
-
-	if (!name)
-		return NULL;
-
-	TAILQ_FOREACH(dev, &vdev_device_list, next) {
-		const char *devname = rte_vdev_device_name(dev);
-		if (!strncmp(devname, name, strlen(name)))
-			return dev;
-	}
-
-	return NULL;
-}
-
-static struct rte_devargs *
-alloc_devargs(const char *name, const char *args)
-{
-	struct rte_devargs *devargs;
-	int ret;
-
-	devargs = calloc(1, sizeof(*devargs));
-	if (!devargs)
-		return NULL;
-
-	devargs->bus = &rte_vdev_bus;
-	if (args)
-		devargs->args = strdup(args);
-	else
-		devargs->args = strdup("");
-
-	ret = snprintf(devargs->name, sizeof(devargs->name), "%s", name);
-	if (ret < 0 || ret >= (int)sizeof(devargs->name)) {
-		free(devargs->args);
-		free(devargs);
-		return NULL;
-	}
-
-	return devargs;
-}
-
-int
-rte_vdev_init(const char *name, const char *args)
-{
-	struct rte_vdev_device *dev;
-	struct rte_devargs *devargs;
-	int ret;
-
-	if (name == NULL)
-		return -EINVAL;
-
-	dev = find_vdev(name);
-	if (dev)
-		return -EEXIST;
-
-	devargs = alloc_devargs(name, args);
-	if (!devargs)
-		return -ENOMEM;
-
-	dev = calloc(1, sizeof(*dev));
-	if (!dev) {
-		ret = -ENOMEM;
-		goto fail;
-	}
-
-	dev->device.devargs = devargs;
-	dev->device.numa_node = SOCKET_ID_ANY;
-	dev->device.name = devargs->name;
-
-	ret = vdev_probe_all_drivers(dev);
-	if (ret) {
-		if (ret > 0)
-			RTE_LOG(ERR, EAL, "no driver found for %s\n", name);
-		goto fail;
-	}
-
-	TAILQ_INSERT_TAIL(&devargs_list, devargs, next);
-
-	TAILQ_INSERT_TAIL(&vdev_device_list, dev, next);
-	return 0;
-
-fail:
-	free(devargs->args);
-	free(devargs);
-	free(dev);
-	return ret;
-}
-
-static int
-vdev_remove_driver(struct rte_vdev_device *dev)
-{
-	const char *name = rte_vdev_device_name(dev);
-	const struct rte_vdev_driver *driver;
-
-	if (!dev->device.driver) {
-		RTE_LOG(DEBUG, EAL, "no driver attach to device %s\n", name);
-		return 1;
-	}
-
-	driver = container_of(dev->device.driver, const struct rte_vdev_driver,
-		driver);
-	return driver->remove(dev);
-}
-
-int
-rte_vdev_uninit(const char *name)
-{
-	struct rte_vdev_device *dev;
-	struct rte_devargs *devargs;
-	int ret;
-
-	if (name == NULL)
-		return -EINVAL;
-
-	dev = find_vdev(name);
-	if (!dev)
-		return -ENOENT;
-
-	devargs = dev->device.devargs;
-
-	ret = vdev_remove_driver(dev);
-	if (ret)
-		return ret;
-
-	TAILQ_REMOVE(&vdev_device_list, dev, next);
-
-	TAILQ_REMOVE(&devargs_list, devargs, next);
-
-	free(devargs->args);
-	free(devargs);
-	free(dev);
-	return 0;
-}
-
-static int
-vdev_scan(void)
-{
-	struct rte_vdev_device *dev;
-	struct rte_devargs *devargs;
-
-	/* for virtual devices we scan the devargs_list populated via cmdline */
-	TAILQ_FOREACH(devargs, &devargs_list, next) {
-
-		if (devargs->bus != &rte_vdev_bus)
-			continue;
-
-		dev = find_vdev(devargs->name);
-		if (dev)
-			continue;
-
-		dev = calloc(1, sizeof(*dev));
-		if (!dev)
-			return -1;
-
-		dev->device.devargs = devargs;
-		dev->device.numa_node = SOCKET_ID_ANY;
-		dev->device.name = devargs->name;
-
-		TAILQ_INSERT_TAIL(&vdev_device_list, dev, next);
-	}
-
-	return 0;
-}
-
-static int
-vdev_probe(void)
-{
-	struct rte_vdev_device *dev;
-
-	/* call the init function for each virtual device */
-	TAILQ_FOREACH(dev, &vdev_device_list, next) {
-
-		if (dev->device.driver)
-			continue;
-
-		if (vdev_probe_all_drivers(dev)) {
-			RTE_LOG(ERR, EAL, "failed to initialize %s device\n",
-				rte_vdev_device_name(dev));
-			return -1;
-		}
-	}
-
-	return 0;
-}
-
-static struct rte_device *
-vdev_find_device(const struct rte_device *start, rte_dev_cmp_t cmp,
-		 const void *data)
-{
-	struct rte_vdev_device *dev;
-
-	TAILQ_FOREACH(dev, &vdev_device_list, next) {
-		if (start && &dev->device == start) {
-			start = NULL;
-			continue;
-		}
-		if (cmp(&dev->device, data) == 0)
-			return &dev->device;
-	}
-	return NULL;
-}
-
-static int
-vdev_plug(struct rte_device *dev)
-{
-	return vdev_probe_all_drivers(RTE_DEV_TO_VDEV(dev));
-}
-
-static int
-vdev_unplug(struct rte_device *dev)
-{
-	return rte_vdev_uninit(dev->name);
-}
-
-static struct rte_bus rte_vdev_bus = {
-	.scan = vdev_scan,
-	.probe = vdev_probe,
-	.find_device = vdev_find_device,
-	.plug = vdev_plug,
-	.unplug = vdev_unplug,
-	.parse = vdev_parse,
-};
-
-RTE_REGISTER_BUS(vdev, rte_vdev_bus);
diff --git a/lib/librte_eal/common/include/rte_dev.h b/lib/librte_eal/common/include/rte_dev.h
index 4c4ac7e..8088dcc 100644
--- a/lib/librte_eal/common/include/rte_dev.h
+++ b/lib/librte_eal/common/include/rte_dev.h
@@ -170,28 +170,6 @@ struct rte_device {
 };
 
 /**
- * Initialize a driver specified by name.
- *
- * @param name
- *   The pointer to a driver name to be initialized.
- * @param args
- *   The pointer to arguments used by driver initialization.
- * @return
- *  0 on success, negative on error
- */
-int rte_vdev_init(const char *name, const char *args);
-
-/**
- * Uninitalize a driver specified by name.
- *
- * @param name
- *   The pointer to a driver name to be initialized.
- * @return
- *  0 on success, negative on error
- */
-int rte_vdev_uninit(const char *name);
-
-/**
  * Attach a device to a registered driver.
  *
  * @param name
@@ -316,4 +294,4 @@ __attribute__((used)) = str
 }
 #endif
 
-#endif /* _RTE_VDEV_H_ */
+#endif /* _RTE_DEV_H_ */
diff --git a/lib/librte_eal/common/include/rte_vdev.h b/lib/librte_eal/common/include/rte_vdev.h
deleted file mode 100644
index 29f5a52..0000000
--- a/lib/librte_eal/common/include/rte_vdev.h
+++ /dev/null
@@ -1,131 +0,0 @@
-/*-
- *   BSD LICENSE
- *
- *   Copyright(c) 2016 RehiveTech. All rights reserved.
- *
- *   Redistribution and use in source and binary forms, with or without
- *   modification, are permitted provided that the following conditions
- *   are met:
- *
- *     * Redistributions of source code must retain the above copyright
- *       notice, this list of conditions and the following disclaimer.
- *     * Redistributions in binary form must reproduce the above copyright
- *       notice, this list of conditions and the following disclaimer in
- *       the documentation and/or other materials provided with the
- *       distribution.
- *     * Neither the name of RehiveTech nor the names of its
- *       contributors may be used to endorse or promote products derived
- *       from this software without specific prior written permission.
- *
- *   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- *   "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- *   LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- *   A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- *   OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- *   LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- *   DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- *   THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- *   (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- *   OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef RTE_VDEV_H
-#define RTE_VDEV_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include <sys/queue.h>
-#include <rte_dev.h>
-#include <rte_devargs.h>
-
-struct rte_vdev_device {
-	TAILQ_ENTRY(rte_vdev_device) next;      /**< Next attached vdev */
-	struct rte_device device;               /**< Inherit core device */
-};
-
-/**
- * @internal
- * Helper macro for drivers that need to convert to struct rte_vdev_device.
- */
-#define RTE_DEV_TO_VDEV(ptr) \
-	container_of(ptr, struct rte_vdev_device, device)
-
-static inline const char *
-rte_vdev_device_name(const struct rte_vdev_device *dev)
-{
-	if (dev && dev->device.name)
-		return dev->device.name;
-	return NULL;
-}
-
-static inline const char *
-rte_vdev_device_args(const struct rte_vdev_device *dev)
-{
-	if (dev && dev->device.devargs)
-		return dev->device.devargs->args;
-	return "";
-}
-
-/** Double linked list of virtual device drivers. */
-TAILQ_HEAD(vdev_driver_list, rte_vdev_driver);
-
-/**
- * Probe function called for each virtual device driver once.
- */
-typedef int (rte_vdev_probe_t)(struct rte_vdev_device *dev);
-
-/**
- * Remove function called for each virtual device driver once.
- */
-typedef int (rte_vdev_remove_t)(struct rte_vdev_device *dev);
-
-/**
- * A virtual device driver abstraction.
- */
-struct rte_vdev_driver {
-	TAILQ_ENTRY(rte_vdev_driver) next; /**< Next in list. */
-	struct rte_driver driver;      /**< Inherited general driver. */
-	rte_vdev_probe_t *probe;       /**< Virtual device probe function. */
-	rte_vdev_remove_t *remove;     /**< Virtual device remove function. */
-};
-
-/**
- * Register a virtual device driver.
- *
- * @param driver
- *   A pointer to a rte_vdev_driver structure describing the driver
- *   to be registered.
- */
-void rte_vdev_register(struct rte_vdev_driver *driver);
-
-/**
- * Unregister a virtual device driver.
- *
- * @param driver
- *   A pointer to a rte_vdev_driver structure describing the driver
- *   to be unregistered.
- */
-void rte_vdev_unregister(struct rte_vdev_driver *driver);
-
-#define RTE_PMD_REGISTER_VDEV(nm, vdrv)\
-RTE_INIT(vdrvinitfn_ ##vdrv);\
-static const char *vdrvinit_ ## nm ## _alias;\
-static void vdrvinitfn_ ##vdrv(void)\
-{\
-	(vdrv).driver.name = RTE_STR(nm);\
-	(vdrv).driver.alias = vdrvinit_ ## nm ## _alias;\
-	rte_vdev_register(&vdrv);\
-} \
-RTE_PMD_EXPORT_NAME(nm, __COUNTER__)
-
-#define RTE_PMD_REGISTER_ALIAS(nm, alias)\
-static const char *vdrvinit_ ## nm ## _alias = RTE_STR(alias)
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
diff --git a/lib/librte_eal/linuxapp/eal/Makefile b/lib/librte_eal/linuxapp/eal/Makefile
index 1d3a42d..2975c25c 100644
--- a/lib/librte_eal/linuxapp/eal/Makefile
+++ b/lib/librte_eal/linuxapp/eal/Makefile
@@ -37,7 +37,7 @@ ARCH_DIR ?= $(RTE_ARCH)
 EXPORT_MAP := ../../rte_eal_version.map
 VPATH += $(RTE_SDK)/lib/librte_eal/common/arch/$(ARCH_DIR)
 
-LIBABIVER := 6
+LIBABIVER := 7
 
 VPATH += $(RTE_SDK)/lib/librte_eal/common
 
@@ -74,7 +74,6 @@ SRCS-$(CONFIG_RTE_EXEC_ENV_LINUXAPP) += eal_common_timer.c
 SRCS-$(CONFIG_RTE_EXEC_ENV_LINUXAPP) += eal_common_memzone.c
 SRCS-$(CONFIG_RTE_EXEC_ENV_LINUXAPP) += eal_common_log.c
 SRCS-$(CONFIG_RTE_EXEC_ENV_LINUXAPP) += eal_common_launch.c
-SRCS-$(CONFIG_RTE_EXEC_ENV_LINUXAPP) += eal_common_vdev.c
 SRCS-$(CONFIG_RTE_EXEC_ENV_LINUXAPP) += eal_common_memory.c
 SRCS-$(CONFIG_RTE_EXEC_ENV_LINUXAPP) += eal_common_tailqs.c
 SRCS-$(CONFIG_RTE_EXEC_ENV_LINUXAPP) += eal_common_errno.c
diff --git a/lib/librte_eal/rte_eal_version.map b/lib/librte_eal/rte_eal_version.map
index d2a4ff9..5966a03 100644
--- a/lib/librte_eal/rte_eal_version.map
+++ b/lib/librte_eal/rte_eal_version.map
@@ -166,10 +166,6 @@ DPDK_17.05 {
 	rte_log_set_global_level;
 	rte_log_set_level;
 	rte_log_set_level_regexp;
-	rte_vdev_init;
-	rte_vdev_register;
-	rte_vdev_uninit;
-	rte_vdev_unregister;
 	vfio_get_container_fd;
 	vfio_get_group_fd;
 	vfio_get_group_no;
diff --git a/lib/librte_ether/rte_ethdev_vdev.h b/lib/librte_ether/rte_ethdev_vdev.h
index 4d2c3e2..ff92e6e 100644
--- a/lib/librte_ether/rte_ethdev_vdev.h
+++ b/lib/librte_ether/rte_ethdev_vdev.h
@@ -35,7 +35,7 @@
 #define _RTE_ETHDEV_VDEV_H_
 
 #include <rte_malloc.h>
-#include <rte_vdev.h>
+#include <rte_bus_vdev.h>
 #include <rte_ethdev.h>
 
 /**
diff --git a/lib/librte_eventdev/rte_eventdev_pmd_vdev.h b/lib/librte_eventdev/rte_eventdev_pmd_vdev.h
index 135e8b8..56232de 100644
--- a/lib/librte_eventdev/rte_eventdev_pmd_vdev.h
+++ b/lib/librte_eventdev/rte_eventdev_pmd_vdev.h
@@ -48,7 +48,7 @@ extern "C" {
 
 #include <rte_debug.h>
 #include <rte_eal.h>
-#include <rte_vdev.h>
+#include <rte_bus_vdev.h>
 
 #include "rte_eventdev_pmd.h"
 
diff --git a/mk/rte.app.mk b/mk/rte.app.mk
index 047121d..de2f557 100644
--- a/mk/rte.app.mk
+++ b/mk/rte.app.mk
@@ -101,6 +101,7 @@ _LDLIBS-$(CONFIG_RTE_DRIVER_MEMPOOL_RING)   += -lrte_mempool_ring
 _LDLIBS-$(CONFIG_RTE_LIBRTE_RING)           += -lrte_ring
 _LDLIBS-$(CONFIG_RTE_LIBRTE_PCI)            += -lrte_pci
 _LDLIBS-$(CONFIG_RTE_LIBRTE_EAL)            += -lrte_eal
+_LDLIBS-$(CONFIG_RTE_LIBRTE_VDEV_BUS)       += -lrte_bus_vdev
 _LDLIBS-$(CONFIG_RTE_LIBRTE_CMDLINE)        += -lrte_cmdline
 _LDLIBS-$(CONFIG_RTE_LIBRTE_REORDER)        += -lrte_reorder
 _LDLIBS-$(CONFIG_RTE_LIBRTE_SCHED)          += -lrte_sched
diff --git a/test/test/autotest_data.pyc b/test/test/autotest_data.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..e2e917de5c2ffd5315f7d32c484f4fa4659a25a6
GIT binary patch
literal 6122
zcmb_f340vH5$%<PWyuG|nEP6efG~)~vc22{AsZ0Zie+UC7?Nc))4LjLE>HJLh&z}B
z5|W>iUzZ;M^}5#6J^Rh<mpHbi@$`H3s=I2ctJ|~xIkvd^@9w9*82>p=|Gq`P>Vv~V
z1oYDokr1&ESA}R`JR_opxE#!ip9q@~!JK)S72&K1?hwHt(U$Z!FK#qMa9Fg%IT0*~
zU{SP#BO*9TECI)8^iL5SXZlX2PcVIGlD>=SlQrtQnLbrR-^291HS~Q<-(N#N!1RL^
z^l)AT4^aRV?87GP;E^KWM_Kk5%gC@CaFglBnLa#8Kf&~qOjGj8>Zh3gL&chq?5CN2
zriNZ(`q>)#G}F)3(9biyTtN>hj&VL-D9WJamcffGK2ssa!dI9+TSK2?`g{%DX8NTX
z`emkHsi9wG`n3vrNCi2L>-8e8H{7`1Wbq#>#E9!HrdMm|x0zn6p)W9fv4(z!>33`B
z_n2O<pq;qh=lZ==)b9q%IxJh9tiVmCKdA7EfV)h8SVQ-i-m0N5GyPEoJ*56J{uEb=
zPf;qdk6HXlg%~UQl<BKA^k+<eUPJ$h=|9)deWt&tpq+(#oa^l(*FMXF3K^CxnI6>8
zL#B5s=pl6`$`<vht4B<C4teTp#nihjj;h4ey~nAJCuIrC(&@5nQg)qX`E;2wG8`e=
z-D4vb?@br)7vfS?e97X2>Ef@d#b2}do9W_jIa+%Je8;lyr^|krl>LQeKTen3n3Vm*
zvcFE3{jEB}pIQ9Nbn)M-#s6UOul3^L5pngXp!0rf>0flQ2!EqLOAUI{bMzQS={Ao5
zoi_Inyv@?@8vUxL>7nU|3bKKUpr3Dr_(tF+vO6PkIxT0#7LB)-;BQksO3#)$P_01j
zg}zjH*D`J;X&}wxbVwE=#4JlQ^w5|ql1Y#L5xkZ|^p;CCiu95J@lY%DXzir2Y-ulP
z4MW`uvS4?4kLGD<sWd;lkxnt{2cGs`$PV-ok|m?KuTp<kYV{0U(cOx!Qzsio8*>dG
z3n_*C2muuAH4`;OMj;OyLeGdBLY$((mRa^Dr9_D5m#})1%4=zum{^p~d&mXH0-ol-
zJ%MC0zZuAj<X0hoqM_&MIn2{h)<2_>yKXKA;g=!8G~<qp)BHf)N#nHxKa#3>GfigY
zn_et6NZ*kCf`s3-G>*L_Foy4p65lxN$t=ya!fo|(7|Y!H1Ec{JUX0ZRxjh<|tpY%0
ztBZM_q-84!sBG1ddU8fuzdNG|l-8Xl)|rXVVAk7RwAh|h=_vQ5wFFAlXVAh{-+@@E
zu#}VS6)FlL&a_QtImy-yCX7wu3n%J+!g|sRTKjpZWiz6hEDQ2|U{-L91RLql`CvdI
zLafb6Le{z;H3yOB8X^oo8yVCZpCI&#%vI>-2H+lp*780AFRpGh2O$-V*~8_fN-ydU
zCYE9B%gey(j45F29bvrZsU7PR$POWejg#oJp`c8wqhzwt?N|+fD2oe;GWqIu+SbJ6
zD~sFK1|Nn#mY*G1tMSJo%-SI<WcO8?IK=^wzA8X#3H6rF!^A0ZVAKf+vv$}VtC5$-
zc49ytpu)-t`&{?~ydcW%+PW11$o#O7aQ%4^)s8hXAsNit-Alp_wbgJr%TsF3PF>wY
zR19j&SP?SV*&Yq7YalTp)&^g>EA!>ZPje?*fYGxIY^|a1m9hn-lq)9-=glrVyP{Ch
zTUnTtw+&D=M(q@L6Z-Z6?Xffu+-`vtZ4+)_Yi>H(>iWiqHb~RSyfC_Mt&pQ}KU|K&
z$+Ga{0H8I;8rBo)O!+9&PO7m6Ix842%$<na>R~c5-4^>amom}0m-tS>qLU1$9rrC+
zcv9oa&C)co@r)}MVA*n2r*Y^z>qF&u2DFCAGL99geP_=C&Bmy;MS1pQV5bI<%b>7u
zLVd}6-1a&1al4%h&GIh71g0*s*vd_IR((^yQK)p&PboicteDXAojCC^xBMM<QGgU6
zyDS`-a*vWtcM5ZqpFgu=diKRJNHdjB6?}%9iawLp9j+b)srJ<=8W*0_zReE^$IyDf
z<zY7oO$WHNIne=#u$G9J`jYv&wBrUL?ldM*)WS?508Mi`%iXii?0QFL9b)n15FHUp
z^$?B86}o1nC&b{`TSp5-n7(e@JU}DU_bZ)XXB4*91<u|q-KP@@AFYcwn>;{<wDzX$
zz^d>0S=h%Zn9J)X1QxHZb=R9?*m^>UV^5CEx<!te-`$J*d$B@0Wrvrpbei;IeIc=~
zt@W}<4BwDULLQ_c-=Qiqf*xY6trujKHwHcqvf4vKt@MF(6t;zn%_Y-@i4z*L+`RSm
z&Gi|*MVV`C4^wG$k3bGQIw1-Ve0ijku!k9XNM8?)tA`tO?<_qu_DAOBbPUOe9rHaE
z+g8IiNt1q^fxR=Ew_E)m0Cx53aT<&w`Q{V!t}?nyoM<f0Ei5b?nr+NCj?Lm}{?6R`
z+wnQ0y)C}xi*>Nq|7V4_%ftNt9NDeT{NH5q)IvGilbY(W&Ew?Ss>e3wYJZcw<Nq+$
HXUD$-S%8l+

literal 0
HcmV?d00001

diff --git a/test/test/autotest_test_funcs.pyc b/test/test/autotest_test_funcs.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..794b45b4e9a79cc3ddbd08d5031d78e4c7a2387a
GIT binary patch
literal 6812
zcmcgxOK%)m8NF3)x4UCI?_?54GL=jc+8GBwA|$X#G?^s8fW|S^Mwub9Os8+zuDH9}
zsau^m$PtSS5<4VTgM?VkmRTT##BL<S9*Grf_yH4X7A#nXbH3YMUDfS&fEd!<*Y{QD
zKI)wB`|eHQACm`e{$}aJy6XIM@%J74%m+v`zK&`r^+RM_^${|T(gn%5N{>jUp!BF@
zMwBi}W>o1h$rP0?NoGvxvSdmGtX2*HJba0Ni**iIz;6`4Tlkp($&OMFkvi(RqZ}46
zEWQ}Cpb}R-EU0yihVLkPIL}<QgQlX|bX9y)=|if@a#_mXSNgCmk4w3x^bu9nM=^_I
z7-`XrAzcnk;@$n88Sm!5RSO$|Hb+pt)oM0tk@lii;;psXkxuwT5;lWYI|)C++(QQy
zvYccDIX)Y5S>|x3<lSHFKD-igvF2dfvTT7?LewaMuD0v-z?cdl1l1>gued90rg;$C
zHgW);pcT$CDIqaIq#I!rBt;a0?X94m$P~6R`Q`WCzjOBo%N5Q$;ajS2gbkgPS;V%j
zMzyAWJ`PN~kyKExBr#t{Zf2v^3}%vAG_xKiGkQyJUVW^C$1{A?Cbf3b5+F&|+ELwn
zb?a%uz0<*34UntdE`&A5ktk=<nQ%_wH<JE@Nn9R(!X&=E9FxGFsw{p{cH3@-Y%_W)
zVM2HFx#d2WEPLnkmHXVW{aW56uynh*m9CAOW%y#aHdzbzniaB^-y)M=i=)VU(FWMw
zQ3Yr(BB3e@Y6sdJQJV!(1ylff@_|wHu&AD6{1J5;N`3CCXJ`;XZ8|D$ib5<hM5GUN
z!GQ+wagm$_pAbp?T2W3M?4XoCRr(ktb{w010@GeJ?;_pWcxo1Ax9`th{YLHT+RBw_
zuMtEG6_!`7Oig=_!#K&en^t`@NLE9=U_1FhQQ_~HNRIYnHzAQZ<`5DJ(Yya{O?xK%
zaj>$N(nGOG^3p}jBt?cELx#$TZkO>gtzEN_soG1WIVKAA$V8tgK3U;Yt_kbHC=pFI
zYe{`WRJ<Oy+FPa~-BQ*{OB}32*3vzUbg(VPiaWDkoaP=hgJvs!nzH&GRGD)~$m*hd
zPSkp)quCRA?Q+UonDG4#yat$jP@E~)mh}kR|5OQxdQ@CPm-5yfU{@ZFsCBp?I3I8u
zI<VY!gqk0!rAKFk>m@0FLX$@9qI!tlGUjPG9Vlv3srY9ih26VgY8@!+SiTqrRS>AZ
zh)9M&6}nJXP%lM5RHPNu8AUN+w0rslM0FCIWG&cUlr~>Nx9<dvM$21^TTQRtiUY5!
zH}AZe%Qrs>lZ`O);-KD+P53zQ8jzo{kM^Fj8swW24=3&^<BzDdR;+{Ay19^y-A$sY
z(E2sj^O!xTjA&lbJWNv}-@FDfvAn^jaTkLxvRIDWL7(3I3HG4f_Bl?!!o+OA3S(zt
zpYz-=Rnd!?tuW&INOe_Z<t!5A6!DpK%J>xcaZkALiiHX1P54GCP5z=xPg!!svv4a?
zrTrZRtF*kv{v;avo2cWJ8nf=eYOF5N81x0dvns4#dUR5Jkrm3P!-Qfr_X{Ea5TQVG
z7HU%D`$q<t6r!!PYJt+A7AghR_w-39<_)az^%XM%ly5g$4{8nXNgO6tB3@G43?i=;
zdCi(hf;g`;tCvo=3u*`xPXovLruPx&)z$+qG+r|_CXCis`Xk4l4kU6MCMk&#`_;7P
zK>uf1`HZ$-At`ZisnhZq>FukO=%C^!IU%)CWu}o(Nc}RRXi_ObLS;&8q$8r7yZR*n
za`H)!E6Cui0*-F`)Wz+U?{?i8yo|(WIK=eMG<{yndZ{1L5mf09pdhH~vYc@qT~_xv
zCJsh&66$~eGXuiIPlYCA(NF}-cdE-bmzL%hydaKSvDdT&6kpM6tApKP9W>vid49ng
zXyz+h-u(!b5rD)iLn0{~kBeKN3C(cxb!@uuiNp5suHSak_BUGVtBugu^A8J6v%at7
zqvrswNo_beV=f{=Y*Y~2?UW0oAoF6yLAR32@(F9VX-7yqiI9$CVL8fmxFF}`9v6gS
zy+iV-*v%VCziAJ}mSBrYdnj8n9blOM3V@#|eLf5DbEPk&0OS7#z-LOol?C{-(idU0
zixdY_FdC_ZanFisd(?$nj=yj_Q=CwGGBXG|<Eew0y8ye)OU_b+O@jBb%lw+7FWEs4
z$u`_^^kr3jdUwDfjVcC#&&CECO17ai&~V5$l-0ecq#Vc5Us2T$c5v@;L`Hh)Q0w-F
z;xlKb%w<N?3K`T>(l4AH+>IQSQ1OL>o;X6;)-_k1#IMTs<7yMz@Y2y0RprWnZ&!NT
zWoMlAa0BwT%g5mnr6zqGV<Hj;2)rafZo7Ia1+m-nvAZK1PLP0r*#F2A9E^fV{#1}p
zb!t*%V4fDtk6nEw#k5=ex!S>G?85&bn8hw8DuMY|!Thpd7S$l;3s=7lPyV^W_Z~J2
zaGc-a0vCCf+lQL&V|p6a?kW_rXig!mCbc;6cvTa7Cc*uL@p#E#`tNx%QLTh=G*aSF
ztur1pL1Hh5p?mXUYO~D`Y9_3A#(obIqp9V+iocLX<S?tXM&m)PzUhVfdKz)papRQq
ziU>1uaeVdwV9&5LcZR;!Mi{qh5ihQ`YOx9I9aBiRYTinFGz9Scbx$&@*sWQwa!F5n
zm-N(1$OF7wxmY-9tw)J>!<(O589=$7L7D5J<N@Y93vg|A5Fk5^`5r*XBV-<BK7&Fd
zYUh`(;hI<9s7336CWv?ShO8!!fG)BS&SPp2L3Uxv%P#2}!KPOF!z{WP4*%bItsx#U
z1NOhhAHtT*3`m*X2r#Tm<`oa?l6il_x@2CE?SfehIkfdTcpGf?9oXnSdlz})+Y{EM
zoSDrR=kmq*eDNAQBm#OZ*DxRw4lEt0{W|#3?1=43BZl9j#{3EiB8E;}V9#|UdzN@Y
z#0P!KZZ@`%yHnJh#^)@ej8TNR2y$_+T67K~HzsA~i)pEhT(-4W9!GDq*hqy|h_t<h
zpP_lB<3>7oqyLIP1Ch$Ob=lUrAySz@oG=MH&;8l+`rev#c};n<zT1@qzy@yo{sZCh
z@!Yi?pOyQBK5EK6dLIq<i!lr_V;mw=!kojp<$8wKZxc>>;pSG#oE|Cbi!AsbAO2A$
zyj=2mRPcF!<X>PyXVIIZ<X-P`zXZT<He0&g2ySo$nd3yUe7IaHA1hxdUo4+3Z~O}Z
C_uuIN

literal 0
HcmV?d00001

diff --git a/test/test/test_cryptodev.c b/test/test/test_cryptodev.c
index 72988c5..a83b361 100644
--- a/test/test/test_cryptodev.c
+++ b/test/test/test_cryptodev.c
@@ -36,6 +36,7 @@
 #include <rte_malloc.h>
 #include <rte_memcpy.h>
 #include <rte_pause.h>
+#include <rte_bus_vdev.h>
 
 #include <rte_crypto.h>
 #include <rte_cryptodev.h>
diff --git a/test/test/test_event_eth_rx_adapter.c b/test/test/test_event_eth_rx_adapter.c
index 56ed1f8..90a5c64 100644
--- a/test/test/test_event_eth_rx_adapter.c
+++ b/test/test/test_event_eth_rx_adapter.c
@@ -35,6 +35,7 @@
 #include <rte_mbuf.h>
 #include <rte_ethdev.h>
 #include <rte_eventdev.h>
+#include <rte_bus_vdev.h>
 
 #include <rte_event_eth_rx_adapter.h>
 
diff --git a/test/test/test_eventdev.c b/test/test/test_eventdev.c
index 4118b75..ba39cba 100644
--- a/test/test/test_eventdev.c
+++ b/test/test/test_eventdev.c
@@ -37,6 +37,7 @@
 #include <rte_memcpy.h>
 #include <rte_eventdev.h>
 #include <rte_dev.h>
+#include <rte_bus_vdev.h>
 
 #include "test.h"
 
diff --git a/test/test/test_eventdev_octeontx.c b/test/test/test_eventdev_octeontx.c
index b88b0d2..dbc36d9 100644
--- a/test/test/test_eventdev_octeontx.c
+++ b/test/test/test_eventdev_octeontx.c
@@ -45,6 +45,7 @@
 #include <rte_lcore.h>
 #include <rte_per_lcore.h>
 #include <rte_random.h>
+#include <rte_bus_vdev.h>
 
 #include "test.h"
 
diff --git a/test/test/test_eventdev_sw.c b/test/test/test_eventdev_sw.c
index 5c7751b..f6a3fa3 100644
--- a/test/test/test_eventdev_sw.c
+++ b/test/test/test_eventdev_sw.c
@@ -51,6 +51,7 @@
 #include <rte_pause.h>
 #include <rte_service.h>
 #include <rte_service_component.h>
+#include <rte_bus_vdev.h>
 
 #include "test.h"
 
diff --git a/test/test/test_link_bonding_rssconf.c b/test/test/test_link_bonding_rssconf.c
index 7dccc6e..54cbf12 100644
--- a/test/test/test_link_bonding_rssconf.c
+++ b/test/test/test_link_bonding_rssconf.c
@@ -48,6 +48,7 @@
 #include <rte_log.h>
 #include <rte_lcore.h>
 #include <rte_memory.h>
+#include <rte_bus_vdev.h>
 
 #include <rte_string_fns.h>
 #include <rte_errno.h>
-- 
2.7.4

^ permalink raw reply	[relevance 1%]

* [dpdk-dev] rte_security deprecation
@ 2017-10-30 11:06  3% Thomas Monjalon
  2017-10-30 11:30  0% ` Akhil Goyal
  0 siblings, 1 reply; 200+ results
From: Thomas Monjalon @ 2017-10-30 11:06 UTC (permalink / raw)
  To: akhil.goyal; +Cc: pablo.de.lara.guarch, declan.doherty, dev

Hi,

The deprecation notice for rte_security was not removed:
	http://dpdk.org/commit/be7c7cce25

Please submit a patch to remove it and explain what was really done.
The API and ABI changes must be described in the release notes.

Thanks

^ permalink raw reply	[relevance 3%]

* Re: [dpdk-dev] rte_security deprecation
  2017-10-30 11:06  3% [dpdk-dev] rte_security deprecation Thomas Monjalon
@ 2017-10-30 11:30  0% ` Akhil Goyal
  0 siblings, 0 replies; 200+ results
From: Akhil Goyal @ 2017-10-30 11:30 UTC (permalink / raw)
  To: Thomas Monjalon; +Cc: pablo.de.lara.guarch, declan.doherty, dev

Hi Thomas,
On 10/30/2017 4:36 PM, Thomas Monjalon wrote:
> Hi,
> 
> The deprecation notice for rte_security was not removed:
> 	http://dpdk.org/commit/be7c7cce25
> 
> Please submit a patch to remove it and explain what was really done.
> The API and ABI changes must be described in the release notes.
> 
> Thanks
> 

Will do that shortly. Thanks for reminding this.

-Akhil

^ permalink raw reply	[relevance 0%]

* [dpdk-dev] [PATCH] doc: update release notes for rte_security
@ 2017-10-30 12:27  8% Akhil Goyal
  2017-10-30 14:22  0% ` Thomas Monjalon
  2017-11-07  6:44  8% ` [dpdk-dev] [PATCH v2] " Akhil Goyal
  0 siblings, 2 replies; 200+ results
From: Akhil Goyal @ 2017-10-30 12:27 UTC (permalink / raw)
  To: dev
  Cc: declan.doherty, pablo.de.lara.guarch, hemant.agrawal,
	radu.nicolau, borisp, aviadye, thomas, jerin.jacob,
	john.mcnamara, konstantin.ananyev, Akhil Goyal

Removed the deprication notice for ABI breakage and updated
release notes for rte_security.

Signed-off-by: Akhil Goyal <akhil.goyal@nxp.com>
---
 doc/guides/prog_guide/rte_security.rst |  2 ++
 doc/guides/rel_notes/deprecation.rst   | 10 ----------
 doc/guides/rel_notes/release_17_11.rst | 33 +++++++++++++++++++++++++++++++++
 3 files changed, 35 insertions(+), 10 deletions(-)

diff --git a/doc/guides/prog_guide/rte_security.rst b/doc/guides/prog_guide/rte_security.rst
index 71be036..ef6ed0f 100644
--- a/doc/guides/prog_guide/rte_security.rst
+++ b/doc/guides/prog_guide/rte_security.rst
@@ -28,6 +28,8 @@
     OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
 
+.. _security_library:
+
 Security Library
 ================
 
diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst
index a93c3e1..b8dff0e 100644
--- a/doc/guides/rel_notes/deprecation.rst
+++ b/doc/guides/rel_notes/deprecation.rst
@@ -50,16 +50,6 @@ Deprecation Notices
   Target release for removal of the legacy API will be defined once most
   PMDs have switched to rte_flow.
 
-* ethdev: new parameters - ``rte_security_capabilities`` and
-  ``rte_security_ops`` will be added to ``rte_eth_dev_info`` and
-  ``rte_eth_dev`` respectively  to support security operations like
-  ipsec inline.
-
-* cryptodev: new parameters - ``rte_security_capabilities`` and
-  ``rte_security_ops`` will be added to ``rte_cryptodev_info`` and
-  ``rte_cryptodev`` respectively to support security protocol offloaded
-  operations.
-
 * cryptodev: the following function is deprecated starting from 17.08 and will
   be removed in 17.11:
 
diff --git a/doc/guides/rel_notes/release_17_11.rst b/doc/guides/rel_notes/release_17_11.rst
index b96b236..132a916 100644
--- a/doc/guides/rel_notes/release_17_11.rst
+++ b/doc/guides/rel_notes/release_17_11.rst
@@ -208,6 +208,29 @@ New Features
   applications to classify an input packet by matching it against a set of flow
   rules. It uses the librte_table API to manage the flow rules.
 
+* **Added the Security Offload Library.**
+
+  Added an experimental library - rte_security. It provide security APIs for
+  protocols like IPSec using inline ipsec offload to ethernet device or full
+  protocol offload with lookaside crypto device.
+
+  See the :ref:`Security Library <Security_Library>` documentation in
+  the Programmers Guide document, for more information.
+
+* **Updated DPAA2_SEC crypto driver.**
+
+  Updated dpaa2_sec crypto PMD to support rte_security lookaside protocol
+  offload for IPSec.
+
+* **Updated IXGBE ethernet driver.**
+
+  Updated ixgbe ethernet PMD to support rte_security inline IPSec offload.
+
+* **Updated ipsec-secgw application**
+
+  Updated ipsec-secgw sample application to support rte_security actions for
+  ipsec inline and full protocol offload using lookaside crypto offload.
+
 
 Resolved Issues
 ---------------
@@ -422,6 +445,16 @@ ABI Changes
   The size of the field ``port_id`` in the ``rte_eth_dev_data`` structure
   changed, as described in the `New Features` section.
 
+* **New parameter added to rte_eth_dev.**
+
+  New parameter ``security_ctx``  added to ``rte_eth_dev`` to support security
+  operations like IPSec inline.
+
+* **New parameter added to rte_cryptodev.**
+
+  New parameter ``security_ctx``  added to ``rte_cryptodev`` to support security
+  operations like lookaside crypto.
+
 
 Removed Items
 -------------
-- 
2.9.3

^ permalink raw reply	[relevance 8%]

* Re: [dpdk-dev] [PATCH] doc: update release notes for rte_security
  2017-10-30 12:27  8% [dpdk-dev] [PATCH] doc: update release notes for rte_security Akhil Goyal
@ 2017-10-30 14:22  0% ` Thomas Monjalon
  2017-11-01  6:20  0%   ` Akhil Goyal
  2017-11-07  6:44  8% ` [dpdk-dev] [PATCH v2] " Akhil Goyal
  1 sibling, 1 reply; 200+ results
From: Thomas Monjalon @ 2017-10-30 14:22 UTC (permalink / raw)
  To: Akhil Goyal, john.mcnamara
  Cc: dev, declan.doherty, pablo.de.lara.guarch, hemant.agrawal,
	radu.nicolau, borisp, aviadye, jerin.jacob, konstantin.ananyev

30/10/2017 13:27, Akhil Goyal:
> Removed the deprication notice for ABI breakage and updated
> release notes for rte_security.
> 
> Signed-off-by: Akhil Goyal <akhil.goyal@nxp.com>
> ---
> +.. _security_library:
> +
>  Security Library
>  ================
[...]
> +* **Added the Security Offload Library.**
> +
> +  Added an experimental library - rte_security. It provide security APIs for
> +  protocols like IPSec using inline ipsec offload to ethernet device or full
> +  protocol offload with lookaside crypto device.
> +
> +  See the :ref:`Security Library <Security_Library>` documentation in
> +  the Programmers Guide document, for more information.

I think the reference to the programmer's guide is not so useful.
I prefer avoiding it because it won't work in PDF format.

John, any opinion?

^ permalink raw reply	[relevance 0%]

* Re: [dpdk-dev] [PATCH] doc: update release notes for rte_security
  2017-10-30 14:22  0% ` Thomas Monjalon
@ 2017-11-01  6:20  0%   ` Akhil Goyal
  2017-11-02 16:36  0%     ` Mcnamara, John
  0 siblings, 1 reply; 200+ results
From: Akhil Goyal @ 2017-11-01  6:20 UTC (permalink / raw)
  To: Thomas Monjalon, john.mcnamara
  Cc: dev, declan.doherty, pablo.de.lara.guarch, hemant.agrawal,
	radu.nicolau, borisp, aviadye, jerin.jacob, konstantin.ananyev

Hi Thomas,
On 10/30/2017 7:52 PM, Thomas Monjalon wrote:
> 30/10/2017 13:27, Akhil Goyal:
>> Removed the deprication notice for ABI breakage and updated
>> release notes for rte_security.
>>
>> Signed-off-by: Akhil Goyal <akhil.goyal@nxp.com>
>> ---
>> +.. _security_library:
>> +
>>   Security Library
>>   ================
> [...]
>> +* **Added the Security Offload Library.**
>> +
>> +  Added an experimental library - rte_security. It provide security APIs for
>> +  protocols like IPSec using inline ipsec offload to ethernet device or full
>> +  protocol offload with lookaside crypto device.
>> +
>> +  See the :ref:`Security Library <Security_Library>` documentation in
>> +  the Programmers Guide document, for more information.
> 
> I think the reference to the programmer's guide is not so useful.
> I prefer avoiding it because it won't work in PDF format.
> 
> John, any opinion?
> 

I added this reference as there was another one in the release notes 
already for membership library.

I will remove reference to security library, if it is not required. 
Please let me know.

Thanks,
Akhil

^ permalink raw reply	[relevance 0%]

* Re: [dpdk-dev] [PATCH] doc: update release notes for rte_security
  2017-11-01  6:20  0%   ` Akhil Goyal
@ 2017-11-02 16:36  0%     ` Mcnamara, John
  0 siblings, 0 replies; 200+ results
From: Mcnamara, John @ 2017-11-02 16:36 UTC (permalink / raw)
  To: Akhil Goyal, Thomas Monjalon
  Cc: dev, Doherty, Declan, De Lara Guarch, Pablo, hemant.agrawal,
	Nicolau, Radu, borisp, aviadye, jerin.jacob, Ananyev, Konstantin



> -----Original Message-----
> From: Akhil Goyal [mailto:akhil.goyal@nxp.com]
> Sent: Wednesday, November 1, 2017 6:21 AM
> To: Thomas Monjalon <thomas@monjalon.net>; Mcnamara, John
> <john.mcnamara@intel.com>
> Cc: dev@dpdk.org; Doherty, Declan <declan.doherty@intel.com>; De Lara
> Guarch, Pablo <pablo.de.lara.guarch@intel.com>; hemant.agrawal@nxp.com;
> Nicolau, Radu <radu.nicolau@intel.com>; borisp@mellanox.com;
> aviadye@mellanox.com; jerin.jacob@caviumnetworks.com; Ananyev, Konstantin
> <konstantin.ananyev@intel.com>
> Subject: Re: [PATCH] doc: update release notes for rte_security
> 
> Hi Thomas,
> On 10/30/2017 7:52 PM, Thomas Monjalon wrote:
> > 30/10/2017 13:27, Akhil Goyal:
> >> Removed the deprication notice for ABI breakage and updated release
> >> notes for rte_security.
> >>
> >> Signed-off-by: Akhil Goyal <akhil.goyal@nxp.com>
> >> ---
> >> +.. _security_library:
> >> +
> >>   Security Library
> >>   ================
> > [...]
> >> +* **Added the Security Offload Library.**
> >> +
> >> +  Added an experimental library - rte_security. It provide security
> >> + APIs for  protocols like IPSec using inline ipsec offload to
> >> + ethernet device or full  protocol offload with lookaside crypto
> device.
> >> +
> >> +  See the :ref:`Security Library <Security_Library>` documentation
> >> + in  the Programmers Guide document, for more information.
> >
> > I think the reference to the programmer's guide is not so useful.
> > I prefer avoiding it because it won't work in PDF format.
> >
> > John, any opinion?
> >
> 
> I added this reference as there was another one in the release notes
> already for membership library.
> 
> I will remove reference to security library, if it is not required.
> Please let me know.
> 

You could refer to it without a link:

    See the "Security_Library" section of the DPDK Programmers Guide document,
    for more information.

John


^ permalink raw reply	[relevance 0%]

* Re: [dpdk-dev] [PATCH ] examples/l3fwd: fix aliasing in port grouping
  @ 2017-11-03  5:42  3%         ` Guduri Prathyusha
  0 siblings, 0 replies; 200+ results
From: Guduri Prathyusha @ 2017-11-03  5:42 UTC (permalink / raw)
  To: konstantin.ananyev
  Cc: dev, guduri.prathyusha, guduriprathyusha, tomasz.kantecki,
	konstantin.ananyev

On Fri, Nov 03, 2017 at 11:21:43AM +0800, Jianbo.Liu@arm.com wrote:
> The 11/02/2017 15:52, Ananyev, Konstantin wrote:
> >
> >
> > > -----Original Message-----
> > > From: Guduri Prathyusha [mailto:gprathyusha@caviumnetworks.com]
> > > Sent: Thursday, November 2, 2017 3:34 PM
> > > To: Ananyev, Konstantin <konstantin.ananyev@intel.com>
> > > Cc: dev@dpdk.org; Jianbo.Liu@arm.com; guduriprathyusha@gmail.com; Kantecki, Tomasz <tomasz.kantecki@intel.com>
> > > Subject: Re: [dpdk-dev] [PATCH ] examples/l3fwd: fix aliasing in port grouping
> > >
> > > On Thu, Nov 02, 2017 at 02:46:43PM +0000, Ananyev, Konstantin wrote:
> > > > Hi,
> > > Hi
> > > >
> > > > > -----Original Message-----
> > > > > From: Guduri Prathyusha [mailto:gprathyusha@caviumnetworks.com]
> > > > > Sent: Thursday, November 2, 2017 2:31 PM
> > > > > To: Kantecki, Tomasz <tomasz.kantecki@intel.com>
> > > > > Cc: Jianbo.Liu@arm.com; guduriprathyusha@gmail.com; Ananyev, Konstantin <konstantin.ananyev@intel.com>; dev@dpdk.org; Guduri
> > > > > Prathyusha <gprathyusha@caviumnetworks.com>
> > > > > Subject: [dpdk-dev] [PATCH ] examples/l3fwd: fix aliasing in port grouping
> > > > >
> > > > > With -f-strict-aliasing enabled by default from -O2, gcc > 5.x gives
>
> May I ask the detail version about the gcc you are using?
>
Am using gcc provided by ubuntu rootfs

root@localhost:~/dpdk# gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/aarch64-linux-gnu/5/lto-wrapper
Target: aarch64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu/Linaro
5.4.0-6ubuntu1~16.04.4'
--with-bugurl=file:///usr/share/doc/gcc-5/README.Bugs
--enable-languages=c,ada,c++,java,go,d,fortran,objc,obj-c++
--prefix=/usr --program-suffix=-5 --enable-shared
--enable-linker-build-id --libexecdir=/usr/lib
--without-included-gettext --enable-threads=posix --libdir=/usr/lib
--enable-nls --with-sysroot=/ --enable-clocale=gnu
--enable-libstdcxx-debug --enable-libstdcxx-time=yes
--with-default-libstdcxx-abi=new --enable-gnu-unique-object
--disable-libquadmath --enable-plugin --with-system-zlib
--disable-browser-plugin --enable-java-awt=gtk --enable-gtk-cairo
--with-java-home=/usr/lib/jvm/java-1.5.0-gcj-5-arm64/jre
--enable-java-home
--with-jvm-root-dir=/usr/lib/jvm/java-1.5.0-gcj-5-arm64
--with-jvm-jar-dir=/usr/lib/jvm-exports/java-1.5.0-gcj-5-arm64
--with-arch-directory=aarch64
--with-ecj-jar=/usr/share/java/eclipse-ecj.jar --enable-multiarch
--enable-fix-cortex-a53-843419 --disable-werror
--enable-checking=release --build=aarch64-linux-gnu
--host=aarch64-linux-gnu --target=aarch64-linux-gnu
Thread model: posix
gcc version 5.4.0 20160609 (Ubuntu/Linaro 5.4.0-6ubuntu1~16.04.4)

> > > > > undefined behavior in port_groupx4. 'pn' and 'pnum' are two different
> > > > > pointers pointing to same chunk of memory and with -f-strict-aliasing the
> > > > > pointers are assumed to be pointing to different memory and compiler
> > > > > reorders instructions that depend on pnum and pn. This breaks port
> > > > > grouping algorithm.
> > > > >
> > > > > This patch eliminates the usage of union and uses memcpy for copying
> > > > > gptbl[v].pnum to pn. memcpy when applied on built_in constant size does
> > > > > not call its library implementation but uses appropriate LD and ST
> > > > > instructions directly and hence no performance overhead.
> > > > >
> > > > > Fixes: 569b290cdb36 ("examples/l3fwd: add NEON implementation")
> > > > > Fixes: af1694d94bf1 ("examples/l3fwd: fix crash with gcc 5")
> > > > > Signed-off-by: Guduri Prathyusha <gprathyusha@caviumnetworks.com>
> > > > > ---
> > > > >  examples/l3fwd/l3fwd_neon.h | 11 +++--------
> > > > >  examples/l3fwd/l3fwd_sse.h  | 11 +++--------
> > > > >  2 files changed, 6 insertions(+), 16 deletions(-)
> > > > >
> > > > > diff --git a/examples/l3fwd/l3fwd_neon.h b/examples/l3fwd/l3fwd_neon.h
> > > > > index 4bc161394..10a602a04 100644
> > > > > --- a/examples/l3fwd/l3fwd_neon.h
> > > > > +++ b/examples/l3fwd/l3fwd_neon.h
> > > > > @@ -100,11 +100,6 @@ static inline uint16_t *
> > > > >  port_groupx4(uint16_t pn[FWDSTEP + 1], uint16_t *lp, uint16x8_t dp1,
> > > > >              uint16x8_t dp2)
> > > > >  {
> > > > > -       union {
> > > > > -               uint16_t u16[FWDSTEP + 1];
> > > > > -               uint64_t u64;
> > > > > -       } *pnum = (void *)pn;
> > > > > -
> > > > >         int32_t v;
> > > > >         uint16x8_t mask = {1, 2, 4, 8, 0, 0, 0, 0};
> > > > >
> > > > > @@ -117,9 +112,9 @@ port_groupx4(uint16_t pn[FWDSTEP + 1], uint16_t *lp, uint16x8_t dp1,
> > > > >
> > > > >         /* if dest port value has changed. */
> > > > >         if (v != GRPMSK) {
> > > > > -               pnum->u64 = gptbl[v].pnum;
> > > > > -               pnum->u16[FWDSTEP] = 1;
> > > > > -               lp = pnum->u16 + gptbl[v].idx;
> > > > > +               rte_memcpy(pn, &gptbl[v].pnum, sizeof(gptbl[v].pnum));
> > > > > +               pn[FWDSTEP] = 1;
> > > > > +               lp = pn + gptbl[v].idx;
> > > > >         }
> > > > >
> > > > >         return lp;
> > > > > diff --git a/examples/l3fwd/l3fwd_sse.h b/examples/l3fwd/l3fwd_sse.h
> > > > > index 831760f02..79a71d77e 100644
> > > > > --- a/examples/l3fwd/l3fwd_sse.h
> > > > > +++ b/examples/l3fwd/l3fwd_sse.h
> > > > > @@ -98,11 +98,6 @@ processx4_step3(struct rte_mbuf *pkt[FWDSTEP], uint16_t dst_port[FWDSTEP])
> > > > >  static inline uint16_t *
> > > > >  port_groupx4(uint16_t pn[FWDSTEP + 1], uint16_t *lp, __m128i dp1, __m128i dp2)
> > > > >  {
> > > > > -       union {
> > > > > -               uint16_t u16[FWDSTEP + 1];
> > > > > -               uint64_t u64;
> > > > > -       } *pnum = (void *)pn;
> > > > > -
> > > > >         int32_t v;
> > > > >
> > > > >         dp1 = _mm_cmpeq_epi16(dp1, dp2);
> > > > > @@ -114,9 +109,9 @@ port_groupx4(uint16_t pn[FWDSTEP + 1], uint16_t *lp, __m128i dp1, __m128i dp2)
> > > > >
> > > > >         /* if dest port value has changed. */
> > > > >         if (v != GRPMSK) {
> > > > > -               pnum->u64 = gptbl[v].pnum;
> > > > > -               pnum->u16[FWDSTEP] = 1;
> > > > > -               lp = pnum->u16 + gptbl[v].idx;
> > > > > +               rte_memcpy(pn, &gptbl[v].pnum, sizeof(gptbl[v].pnum));
> > > > > +               pn[FWDSTEP] = 1;
> > > > > +               lp = pn + gptbl[v].idx;
> > > >
> > > > Could you explain a bit more here - which exactly instructions were reordered
> > > > and what kind of problems did it cause?
> > > > Specially on IA?
> > >
> > > This issue is observed on ARM since ARM gcc is more aggressive in
> > > reordering than x86 gcc.
> >
> > Ok, then if x86 is not affected why to modify l3fwd_sse.h at all?
> > Unless there is a reproducible problem with x86 -
> > my preference would be to keep that file intact.
> >
> > > In ARM when v != GRPMSK, the following
> > > instructions ordering is not guarenteed because of strict aliasing.
> > >
> > > lp[0] += gptbl[v].lpv;
> > > pnum->u64 = gptbl[v].pnum;
> > > pnum->u16[FWDSTEP] = 1;
> > > lp = pnum->u16 + gptbl[v].idx;
> >
> > Ok, so what in particular is reordered by the compiler:
> >
> >  lp[0] += gptbl[v].lpv; (1)
> >  pnum->u64 = gptbl[v].pnum; (2)
> >  pnum->u16[FWDSTEP] = 1;   (3)
> >  lp = pnum->u16 + gptbl[v].idx; (4)
> >
> > (2) and (3)?
> > If so I am not sure how it could be a problem:
> > they do stores to the different locations.
> > (1) and (4) as I can see shouldn't be reordered.
> > Anyway - if you think this a compiler reordering issue,
> > then adding rte_compiler_barrier() should fix the issue, right?
>
> Agree.
>
Yes, rte_compiler_barrier() solves the issue. I will spin a V2 if you
are ok with it.
> >
> > >
> > > That results in wrong lp[0] updation.
> > > memcpy in this case will avoid this problem.
> > >
> > > > In any case I don't think using rte_memcpy is a good thing to use here:
> > > > it is a huge inline function - way too much to copy just 64 bit variable.
> > >
> > > I agree that rte_memcpy is overhead in this case but how about using
> > > memcpy that will not use library implementation if the size is constant.
> > > memcpy with constant size uses built_in_memcpy that does not add
> > > performance overhead.
> >
> > On x86 rte_memcpy() doesn't call libc memcpy() at all - it is a separate function:
> > ib/librte_eal/common/include/arch/x86/rte_memcpy.h
> >
> > >
> > > Thoughts?
> >
> > As I said - if x86 is  not affected - please keep l3fwd_sse.h intact.
> > If it does (still not sure how) - check would compiler barrier help here.
> > Konstantin
> >
>
> --
> IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.

^ permalink raw reply	[relevance 3%]

* Re: [dpdk-dev] [PATCH v3 4/6] eal/memory: rename memory API to iova types
  @ 2017-11-03 11:11  4%       ` Thomas Monjalon
  2017-11-03 11:35  0%         ` santosh
  0 siblings, 1 reply; 200+ results
From: Thomas Monjalon @ 2017-11-03 11:11 UTC (permalink / raw)
  To: Santosh Shukla
  Cc: dev, olivier.matz, jerin.jacob, hemant.agrawal, anatoly.burakov

20/10/2017 14:31, Santosh Shukla:
> Renamed memory translational api to _iova types.
> The following api renamed from:
> 
> rte_mempool_populate_phys()
> rte_mempool_populate_phys_tab()

These functions still have "physical addresses" in their description.
It is not consistent.

Please provide ABI compatibility for mempool functions.

> rte_eal_using_phys_addrs()

Why renaming rte_eal_using_phys_addrs?
I think we need to review how it is used.
Maybe it requires a rework.

> rte_mem_virt2phy()
> rte_dump_physmem_layout()
> rte_eal_get_physmem_layout()
> rte_eal_get_physmem_size()

Those 3 functions deal with physical memory layout.
I don't see a need to rename them.

But the dump function needs a change to avoid printing
"phys" even in VA case.

> rte_malloc_virt2phy()
> rte_mem_phy2mch()

This last function was removed with Xen.
It is wrong to rename it in the release notes.
It should just be removed from the map file (I will send a patch).

> To the following iova types api:
> 
> rte_mempool_populate_iova()
> rte_mempool_populate_iova_tab()
> rte_eal_using_iova_addrs()
> rte_mem_virt2iova()
[...]
> rte_malloc_virt2iova()

I am not convinced by the names virt2iova.
I sounds like "virt to virt".
What about "virt2io" or "virt2io_addr"?

As the ABI is broken in EAL 17.11, we do not care about compatibility.
But we must keep an alias to the old function name in order to allow
a smooth API transition for applications.
I suggest to add static inline functions with the old names and set
the deprecated attribute.

^ permalink raw reply	[relevance 4%]

* Re: [dpdk-dev] [PATCH] mem: remove old function from symbol list
  @ 2017-11-03 11:34  3% ` Gonzalez Monroy, Sergio
  2017-11-03 13:52  0%   ` Thomas Monjalon
  0 siblings, 1 reply; 200+ results
From: Gonzalez Monroy, Sergio @ 2017-11-03 11:34 UTC (permalink / raw)
  To: Thomas Monjalon, jianfeng.tan; +Cc: dev, bluca

Hi Thomas,

I reckon you need to bump ABI version when you remove public symbol from 
.map file.

Thanks,
Sergio

On 03/11/2017 11:24, Thomas Monjalon wrote:
> The function rte_mem_phy2mch() was removed with the support
> of Xen dom0.
>
> Fixes: a7cb2e20d23c ("mem: remove API to get physical address in dom0")
>
> Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
> ---
>   lib/librte_eal/rte_eal_version.map | 1 -
>   1 file changed, 1 deletion(-)
>
> diff --git a/lib/librte_eal/rte_eal_version.map b/lib/librte_eal/rte_eal_version.map
> index d2a4ff974..7c9bdc2ae 100644
> --- a/lib/librte_eal/rte_eal_version.map
> +++ b/lib/librte_eal/rte_eal_version.map
> @@ -62,7 +62,6 @@ DPDK_2.0 {
>   	rte_malloc_validate;
>   	rte_malloc_virt2phy;
>   	rte_mem_lock_page;
> -	rte_mem_phy2mch;
>   	rte_mem_virt2phy;
>   	rte_memdump;
>   	rte_memory_get_nchannel;

^ permalink raw reply	[relevance 3%]

* Re: [dpdk-dev] [PATCH v3 4/6] eal/memory: rename memory API to iova types
  2017-11-03 11:11  4%       ` Thomas Monjalon
@ 2017-11-03 11:35  0%         ` santosh
  2017-11-03 13:58  0%           ` Thomas Monjalon
  0 siblings, 1 reply; 200+ results
From: santosh @ 2017-11-03 11:35 UTC (permalink / raw)
  To: Thomas Monjalon
  Cc: dev, olivier.matz, jerin.jacob, hemant.agrawal, anatoly.burakov


On Friday 03 November 2017 04:41 PM, Thomas Monjalon wrote:
> 20/10/2017 14:31, Santosh Shukla:
>> Renamed memory translational api to _iova types.
>> The following api renamed from:
>>
>> rte_mempool_populate_phys()
>> rte_mempool_populate_phys_tab()
> These functions still have "physical addresses" in their description.
> It is not consistent.
>
> Please provide ABI compatibility for mempool functions.
>
>> rte_eal_using_phys_addrs()
> Why renaming rte_eal_using_phys_addrs?
> I think we need to review how it is used.
> Maybe it requires a rework.
>
>> rte_mem_virt2phy()
>> rte_dump_physmem_layout()
>> rte_eal_get_physmem_layout()
>> rte_eal_get_physmem_size()
> Those 3 functions deal with physical memory layout.
> I don't see a need to rename them.

In iova=va mode, those api will have va address.

> But the dump function needs a change to avoid printing
> "phys" even in VA case.
>
>> rte_malloc_virt2phy()
>> rte_mem_phy2mch()
> This last function was removed with Xen.
> It is wrong to rename it in the release notes.
> It should just be removed from the map file (I will send a patch).
>
>> To the following iova types api:
>>
>> rte_mempool_populate_iova()
>> rte_mempool_populate_iova_tab()
>> rte_eal_using_iova_addrs()
>> rte_mem_virt2iova()
> [...]
>> rte_malloc_virt2iova()
> I am not convinced by the names virt2iova.
> I sounds like "virt to virt".
> What about "virt2io" or "virt2io_addr"?

no, iova can be _pa or _va, its an io_addr indeed but
I prefer virt2iova, same mentioned in deprecation notice (no strong opinion),

More suggestion on naming pl.?

> As the ABI is broken in EAL 17.11, we do not care about compatibility.
> But we must keep an alias to the old function name in order to allow
> a smooth API transition for applications.
> I suggest to add static inline functions with the old names and set
> the deprecated attribute.

ok, Will address in 18.02.

Thanks.

^ permalink raw reply	[relevance 0%]

* Re: [dpdk-dev] [PATCH] mem: remove old function from symbol list
  2017-11-03 11:34  3% ` Gonzalez Monroy, Sergio
@ 2017-11-03 13:52  0%   ` Thomas Monjalon
  0 siblings, 0 replies; 200+ results
From: Thomas Monjalon @ 2017-11-03 13:52 UTC (permalink / raw)
  To: Gonzalez Monroy, Sergio; +Cc: jianfeng.tan, dev, bluca

03/11/2017 12:34, Gonzalez Monroy, Sergio:
> Hi Thomas,
> 
> I reckon you need to bump ABI version when you remove public symbol from 
> .map file.

Yes, of course, unless it has already been dumped:
	http://dpdk.org/commit/f26ab687a74


> On 03/11/2017 11:24, Thomas Monjalon wrote:
> > The function rte_mem_phy2mch() was removed with the support
> > of Xen dom0.
> >
> > Fixes: a7cb2e20d23c ("mem: remove API to get physical address in dom0")
> >
> > Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
> > ---
> >   lib/librte_eal/rte_eal_version.map | 1 -
> >   1 file changed, 1 deletion(-)
> >
> > diff --git a/lib/librte_eal/rte_eal_version.map b/lib/librte_eal/rte_eal_version.map
> > index d2a4ff974..7c9bdc2ae 100644
> > --- a/lib/librte_eal/rte_eal_version.map
> > +++ b/lib/librte_eal/rte_eal_version.map
> > @@ -62,7 +62,6 @@ DPDK_2.0 {
> >   	rte_malloc_validate;
> >   	rte_malloc_virt2phy;
> >   	rte_mem_lock_page;
> > -	rte_mem_phy2mch;
> >   	rte_mem_virt2phy;
> >   	rte_memdump;
> >   	rte_memory_get_nchannel;
> 
> 

^ permalink raw reply	[relevance 0%]

* Re: [dpdk-dev] [PATCH v3 4/6] eal/memory: rename memory API to iova types
  2017-11-03 11:35  0%         ` santosh
@ 2017-11-03 13:58  0%           ` Thomas Monjalon
  2017-11-03 15:22  0%             ` [dpdk-dev] [PATCH v3 4/6] eal/memory: rename memory API to iovatypes Jonas Pfefferle1
  0 siblings, 1 reply; 200+ results
From: Thomas Monjalon @ 2017-11-03 13:58 UTC (permalink / raw)
  To: santosh; +Cc: dev, olivier.matz, jerin.jacob, hemant.agrawal, anatoly.burakov

03/11/2017 12:35, santosh:
> On Friday 03 November 2017 04:41 PM, Thomas Monjalon wrote:
> > 20/10/2017 14:31, Santosh Shukla:
> >> Renamed memory translational api to _iova types.
> >> The following api renamed from:
> >>
> >> rte_mempool_populate_phys()
> >> rte_mempool_populate_phys_tab()
> > These functions still have "physical addresses" in their description.
> > It is not consistent.
> >
> > Please provide ABI compatibility for mempool functions.
> >
> >> rte_eal_using_phys_addrs()
> > Why renaming rte_eal_using_phys_addrs?
> > I think we need to review how it is used.
> > Maybe it requires a rework.
> >
> >> rte_mem_virt2phy()
> >> rte_dump_physmem_layout()
> >> rte_eal_get_physmem_layout()
> >> rte_eal_get_physmem_size()
> > Those 3 functions deal with physical memory layout.
> > I don't see a need to rename them.
> 
> In iova=va mode, those api will have va address.

Yes addresses can be virtual.
But it is still physically segmented.

> > But the dump function needs a change to avoid printing
> > "phys" even in VA case.
> >
> >> rte_malloc_virt2phy()
> >> rte_mem_phy2mch()
> > This last function was removed with Xen.
> > It is wrong to rename it in the release notes.
> > It should just be removed from the map file (I will send a patch).
> >
> >> To the following iova types api:
> >>
> >> rte_mempool_populate_iova()
> >> rte_mempool_populate_iova_tab()
> >> rte_eal_using_iova_addrs()
> >> rte_mem_virt2iova()
> > [...]
> >> rte_malloc_virt2iova()
> > I am not convinced by the names virt2iova.
> > I sounds like "virt to virt".
> > What about "virt2io" or "virt2io_addr"?
> 
> no, iova can be _pa or _va, its an io_addr indeed but
> I prefer virt2iova, same mentioned in deprecation notice (no strong opinion),
> 
> More suggestion on naming pl.?

I like virt2io_addr but virt2iova is not so bad.
I agree with Santosh that we need more opinions.

> > As the ABI is broken in EAL 17.11, we do not care about compatibility.
> > But we must keep an alias to the old function name in order to allow
> > a smooth API transition for applications.
> > I suggest to add static inline functions with the old names and set
> > the deprecated attribute.
> 
> ok, Will address in 18.02.

I would prefer these changes made in 17.11 as announced.
As you are not willing to work on it, I am trying to send some
updated patches.

^ permalink raw reply	[relevance 0%]

* Re: [dpdk-dev] [PATCH v3 4/6] eal/memory: rename memory API to iovatypes
  2017-11-03 13:58  0%           ` Thomas Monjalon
@ 2017-11-03 15:22  0%             ` Jonas Pfefferle1
  0 siblings, 0 replies; 200+ results
From: Jonas Pfefferle1 @ 2017-11-03 15:22 UTC (permalink / raw)
  To: Thomas Monjalon
  Cc: santosh, dev, olivier.matz, jerin.jacob, hemant.agrawal, anatoly.burakov

"dev" <dev-bounces@dpdk.org> wrote on 11/03/2017 02:58:43 PM:

> From: Thomas Monjalon <thomas@monjalon.net>
> To: santosh <santosh.shukla@caviumnetworks.com>
> Cc: dev@dpdk.org, olivier.matz@6wind.com,
> jerin.jacob@caviumnetworks.com, hemant.agrawal@nxp.com,
> anatoly.burakov@intel.com
> Date: 11/03/2017 02:59 PM
> Subject: Re: [dpdk-dev] [PATCH v3 4/6] eal/memory: rename memory API
> to iova types
> Sent by: "dev" <dev-bounces@dpdk.org>
>
> 03/11/2017 12:35, santosh:
> > On Friday 03 November 2017 04:41 PM, Thomas Monjalon wrote:
> > > 20/10/2017 14:31, Santosh Shukla:
> > >> Renamed memory translational api to _iova types.
> > >> The following api renamed from:
> > >>
> > >> rte_mempool_populate_phys()
> > >> rte_mempool_populate_phys_tab()
> > > These functions still have "physical addresses" in their description.
> > > It is not consistent.
> > >
> > > Please provide ABI compatibility for mempool functions.
> > >
> > >> rte_eal_using_phys_addrs()
> > > Why renaming rte_eal_using_phys_addrs?
> > > I think we need to review how it is used.
> > > Maybe it requires a rework.
> > >
> > >> rte_mem_virt2phy()
> > >> rte_dump_physmem_layout()
> > >> rte_eal_get_physmem_layout()
> > >> rte_eal_get_physmem_size()
> > > Those 3 functions deal with physical memory layout.
> > > I don't see a need to rename them.
> >
> > In iova=va mode, those api will have va address.
>
> Yes addresses can be virtual.
> But it is still physically segmented.
>
> > > But the dump function needs a change to avoid printing
> > > "phys" even in VA case.
> > >
> > >> rte_malloc_virt2phy()
> > >> rte_mem_phy2mch()
> > > This last function was removed with Xen.
> > > It is wrong to rename it in the release notes.
> > > It should just be removed from the map file (I will send a patch).
> > >
> > >> To the following iova types api:
> > >>
> > >> rte_mempool_populate_iova()
> > >> rte_mempool_populate_iova_tab()
> > >> rte_eal_using_iova_addrs()
> > >> rte_mem_virt2iova()
> > > [...]
> > >> rte_malloc_virt2iova()
> > > I am not convinced by the names virt2iova.
> > > I sounds like "virt to virt".
> > > What about "virt2io" or "virt2io_addr"?
> >
> > no, iova can be _pa or _va, its an io_addr indeed but
> > I prefer virt2iova, same mentioned in deprecation notice (no
> strong opinion),
> >
> > More suggestion on naming pl.?
>
> I like virt2io_addr but virt2iova is not so bad.
> I agree with Santosh that we need more opinions.

virt2iova +1

Another suggestion va2iova to be consistent with the names

>
> > > As the ABI is broken in EAL 17.11, we do not care about
compatibility.
> > > But we must keep an alias to the old function name in order to allow
> > > a smooth API transition for applications.
> > > I suggest to add static inline functions with the old names and set
> > > the deprecated attribute.
> >
> > ok, Will address in 18.02.
>
> I would prefer these changes made in 17.11 as announced.
> As you are not willing to work on it, I am trying to send some
> updated patches.
>

^ permalink raw reply	[relevance 0%]

* [dpdk-dev] [PATCH v1] i40e: highlight change to flexible payload for RSS config
@ 2017-11-03 15:24  5% John McNamara
  2017-11-04 19:41  0% ` Chilikin, Andrey
  0 siblings, 1 reply; 200+ results
From: John McNamara @ 2017-11-03 15:24 UTC (permalink / raw)
  To: dev; +Cc: kirill.rybalchenko, andrey.chilikin, John McNamara

Add deprecation notice to highlight a future change in the
default configuration behavior for flexible payload for RSS.

Signed-off-by: John McNamara <john.mcnamara@intel.com>
---
 doc/guides/rel_notes/deprecation.rst | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst
index a93c3e1..9e9caa6 100644
--- a/doc/guides/rel_notes/deprecation.rst
+++ b/doc/guides/rel_notes/deprecation.rst
@@ -67,3 +67,9 @@ Deprecation Notices
 
 * librte_meter: The API will change to accommodate configuration profiles.
   Most of the API functions will have an additional opaque parameter.
+
+* i40e: The default flexible payload configuration which extracts the first 16
+  bytes of the payload for RSS will be deprecated starting from 18.02. If
+  required the previous behavior can be configured using existing flow
+  director APIs. There is no ABI/API break. This change will just remove a
+  global configuration setting and require explicit configuration.
-- 
2.7.5

^ permalink raw reply	[relevance 5%]

* Re: [dpdk-dev] [PATCH v1] i40e: highlight change to flexible payload for RSS config
  2017-11-03 15:24  5% [dpdk-dev] [PATCH v1] i40e: highlight change to flexible payload for RSS config John McNamara
@ 2017-11-04 19:41  0% ` Chilikin, Andrey
  0 siblings, 0 replies; 200+ results
From: Chilikin, Andrey @ 2017-11-04 19:41 UTC (permalink / raw)
  To: Mcnamara, John, dev; +Cc: Rybalchenko, Kirill

> -----Original Message-----
> From: Mcnamara, John
> Sent: Friday, November 3, 2017 3:24 PM
> To: dev@dpdk.org
> Cc: Rybalchenko, Kirill <kirill.rybalchenko@intel.com>; Chilikin, Andrey
> <andrey.chilikin@intel.com>; Mcnamara, John <john.mcnamara@intel.com>
> Subject: [PATCH v1] i40e: highlight change to flexible payload for RSS config
> 
> Add deprecation notice to highlight a future change in the
> default configuration behavior for flexible payload for RSS.
> 
> Signed-off-by: John McNamara <john.mcnamara@intel.com>
> ---
>  doc/guides/rel_notes/deprecation.rst | 6 ++++++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/doc/guides/rel_notes/deprecation.rst
> b/doc/guides/rel_notes/deprecation.rst
> index a93c3e1..9e9caa6 100644
> --- a/doc/guides/rel_notes/deprecation.rst
> +++ b/doc/guides/rel_notes/deprecation.rst
> @@ -67,3 +67,9 @@ Deprecation Notices
> 
>  * librte_meter: The API will change to accommodate configuration profiles.
>    Most of the API functions will have an additional opaque parameter.
> +
> +* i40e: The default flexible payload configuration which extracts the first 16
> +  bytes of the payload for RSS will be deprecated starting from 18.02. If
> +  required the previous behavior can be configured using existing flow
> +  director APIs. There is no ABI/API break. This change will just remove a
> +  global configuration setting and require explicit configuration.
> --
> 2.7.5

Acked-by: Andrey Chilikin <andrey.chilikin@intel.com>

^ permalink raw reply	[relevance 0%]

* [dpdk-dev] [PATCH v4 00/15] make DPDK IOVA aware
      @ 2017-11-06  1:41  2% ` Thomas Monjalon
  2017-11-06  1:41 10%   ` [dpdk-dev] [PATCH v4 15/15] doc: add IOVA aware API changes in release notes Thomas Monjalon
  2 siblings, 1 reply; 200+ results
From: Thomas Monjalon @ 2017-11-06  1:41 UTC (permalink / raw)
  To: Santosh Shukla; +Cc: olivier.matz, sergio.gonzalez.monroy, anatoly.burakov, dev

This v4 is a big rework to complete the patches sent by Santosh.
The core components for memory handling (memseg, malloc, memzone,
mempool, mbuf) are almost fully updated for IOVA awareness.
It will ease maintenance and upcoming reworks; that's why we should push
it in 17.11 LTS.

The most important changes in this revision v4 are:
- No API break: everything is aliased to keep old names during next
  releases. It will ease apps migration, waiting for major ABI break.
- Rename type from iova_addr_t to rte_iova_t.
- Convert memzone field.
- Convert mempool fields.
- Convert mbuf address helpers.
- Reword doxygen comments and variable names in functions.

In PMDs, only the address type is renamed.
All PMDs will require some attention to transition to IOVA scheme.
KNI and NXP bus drivers are not reworded.

Santosh Shukla (5):
  mem: rename segment address from physical to IOVA
  malloc: use pointer diff macro in IOVA mapping
  mbuf: rename physical address to IOVA
  cryptodev: rename physical address type to IOVA
  drivers/net: rename physical address type to IOVA

Thomas Monjalon (10):
  mem: hide physical address error in VA mode
  mem: introduce IOVA type
  mem: rename address mapping function to IOVA
  malloc: rename address mapping function to IOVA
  memzone: rename address from physical to IOVA
  mempool: rename addresses from physical to IOVA
  mempool: rename address mapping function to IOVA
  mempool: rename populate functions to IOVA
  mbuf: rename data address helpers to IOVA
  doc: add IOVA aware API changes in release notes

 app/test-crypto-perf/cperf_ops.c                 |   6 +-
 app/test-crypto-perf/cperf_test_common.c         |   6 +-
 app/test-crypto-perf/cperf_test_vector_parsing.c |   4 +-
 app/test-crypto-perf/cperf_test_vectors.c        |   6 +-
 app/test-crypto-perf/cperf_test_vectors.h        |   4 +-
 doc/guides/prog_guide/cryptodev_lib.rst          |   6 +-
 doc/guides/prog_guide/img/mbuf1.svg              |   2 +-
 doc/guides/rel_notes/deprecation.rst             |   7 --
 doc/guides/rel_notes/release_17_11.rst           |  17 ++++
 drivers/bus/dpaa/base/qbman/qman.c               |   2 +-
 drivers/bus/dpaa/base/qbman/qman.h               |   2 +-
 drivers/bus/fslmc/portal/dpaa2_hw_pvt.h          |   2 +-
 drivers/crypto/dpaa_sec/dpaa_sec.c               |  28 +++---
 drivers/crypto/mrvl/rte_mrvl_pmd.c               |   4 +-
 drivers/crypto/qat/qat_adf/qat_algs.h            |   6 +-
 drivers/crypto/qat/qat_crypto.c                  |  22 ++---
 drivers/crypto/qat/qat_crypto.h                  |   2 +-
 drivers/crypto/qat/qat_qp.c                      |   8 +-
 drivers/mempool/dpaa/dpaa_mempool.c              |   4 +-
 drivers/mempool/dpaa2/dpaa2_hw_mempool.c         |   4 +-
 drivers/mempool/dpaa2/dpaa2_hw_mempool.h         |   2 +-
 drivers/mempool/octeontx/octeontx_fpavf.c        |   4 +-
 drivers/mempool/octeontx/rte_mempool_octeontx.c  |   2 +-
 drivers/net/ark/ark_ddm.c                        |   2 +-
 drivers/net/ark/ark_ddm.h                        |   4 +-
 drivers/net/ark/ark_ethdev_rx.c                  |  24 ++---
 drivers/net/ark/ark_ethdev_tx.c                  |   8 +-
 drivers/net/ark/ark_mpu.c                        |   2 +-
 drivers/net/ark/ark_mpu.h                        |   4 +-
 drivers/net/ark/ark_udm.c                        |   2 +-
 drivers/net/ark/ark_udm.h                        |   4 +-
 drivers/net/avp/avp_ethdev.c                     |   2 +-
 drivers/net/avp/rte_avp_common.h                 |  20 ++--
 drivers/net/bnx2x/bnx2x.c                        |  44 ++++-----
 drivers/net/bnx2x/bnx2x.h                        |  22 ++---
 drivers/net/bnx2x/bnx2x_rxtx.c                   |  14 +--
 drivers/net/bnx2x/bnx2x_stats.c                  |   2 +-
 drivers/net/bnx2x/bnx2x_vfpf.c                   |   2 +-
 drivers/net/bnx2x/ecore_sp.h                     |   2 +-
 drivers/net/bnxt/bnxt.h                          |  10 +-
 drivers/net/bnxt/bnxt_cpr.h                      |   4 +-
 drivers/net/bnxt/bnxt_ethdev.c                   |  14 +--
 drivers/net/bnxt/bnxt_hwrm.c                     |  26 +++---
 drivers/net/bnxt/bnxt_ring.c                     |  10 +-
 drivers/net/bnxt/bnxt_ring.h                     |   4 +-
 drivers/net/bnxt/bnxt_rxr.h                      |   4 +-
 drivers/net/bnxt/bnxt_txr.h                      |   2 +-
 drivers/net/bnxt/bnxt_vnic.c                     |   8 +-
 drivers/net/bnxt/bnxt_vnic.h                     |   6 +-
 drivers/net/cxgbe/sge.c                          |   6 +-
 drivers/net/dpaa/dpaa_rxtx.c                     |   6 +-
 drivers/net/e1000/em_rxtx.c                      |  12 +--
 drivers/net/e1000/igb_rxtx.c                     |  12 +--
 drivers/net/ena/base/ena_plat_dpdk.h             |   4 +-
 drivers/net/ena/ena_ethdev.c                     |   6 +-
 drivers/net/enic/enic_main.c                     |   8 +-
 drivers/net/enic/enic_rxtx.c                     |   6 +-
 drivers/net/fm10k/fm10k.h                        |   4 +-
 drivers/net/fm10k/fm10k_ethdev.c                 |   4 +-
 drivers/net/fm10k/fm10k_rxtx_vec.c               |   4 +-
 drivers/net/i40e/i40e_ethdev.c                   |   2 +-
 drivers/net/i40e/i40e_fdir.c                     |   2 +-
 drivers/net/i40e/i40e_rxtx.c                     |  22 ++---
 drivers/net/i40e/i40e_rxtx_vec_altivec.c         |   4 +-
 drivers/net/i40e/i40e_rxtx_vec_neon.c            |   6 +-
 drivers/net/i40e/i40e_rxtx_vec_sse.c             |   6 +-
 drivers/net/ixgbe/ixgbe_rxtx.c                   |  18 ++--
 drivers/net/ixgbe/ixgbe_rxtx_vec_neon.c          |   6 +-
 drivers/net/ixgbe/ixgbe_rxtx_vec_sse.c           |   6 +-
 drivers/net/liquidio/lio_rxtx.c                  |  20 ++--
 drivers/net/liquidio/lio_rxtx.h                  |   6 +-
 drivers/net/mrvl/mrvl_ethdev.c                   |   8 +-
 drivers/net/nfp/nfp_net.c                        |   8 +-
 drivers/net/octeontx/base/octeontx_pkovf.c       |   4 +-
 drivers/net/octeontx/octeontx_rxtx.c             |   2 +-
 drivers/net/qede/base/bcm_osal.c                 |  10 +-
 drivers/net/qede/base/bcm_osal.h                 |   2 +-
 drivers/net/qede/qede_fdir.c                     |   2 +-
 drivers/net/qede/qede_rxtx.c                     |  16 ++--
 drivers/net/sfc/efsys.h                          |   2 +-
 drivers/net/sfc/sfc.c                            |   4 +-
 drivers/net/sfc/sfc_ef10_rx.c                    |   4 +-
 drivers/net/sfc/sfc_ef10_tx.c                    |   6 +-
 drivers/net/sfc/sfc_rx.c                         |   2 +-
 drivers/net/sfc/sfc_tso.c                        |   4 +-
 drivers/net/sfc/sfc_tx.c                         |   2 +-
 drivers/net/thunderx/base/nicvf_hw.c             |   2 +-
 drivers/net/thunderx/base/nicvf_hw.h             |   2 +-
 drivers/net/thunderx/base/nicvf_hw_defs.h        |   6 +-
 drivers/net/thunderx/nicvf_ethdev.c              |  10 +-
 drivers/net/thunderx/nicvf_ethdev.h              |   6 +-
 drivers/net/thunderx/nicvf_rxtx.h                |   4 +-
 drivers/net/thunderx/nicvf_struct.h              |   6 +-
 drivers/net/virtio/virtio_ethdev.c               |  10 +-
 drivers/net/virtio/virtio_rxtx.h                 |   4 +-
 drivers/net/virtio/virtqueue.h                   |   6 +-
 drivers/net/vmxnet3/vmxnet3_ethdev.c             |  10 +-
 drivers/net/vmxnet3/vmxnet3_rxtx.c               |   8 +-
 examples/ipsec-secgw/esp.c                       |  12 +--
 examples/l2fwd-crypto/main.c                     |   8 +-
 lib/librte_cryptodev/rte_crypto.h                |   2 +-
 lib/librte_cryptodev/rte_crypto_sym.h            |   6 +-
 lib/librte_cryptodev/rte_cryptodev.c             |   2 +-
 lib/librte_cryptodev/rte_cryptodev.h             |   2 +-
 lib/librte_eal/bsdapp/eal/eal_memory.c           |  15 ++-
 lib/librte_eal/common/eal_common_memory.c        |   4 +-
 lib/librte_eal/common/eal_common_memzone.c       |   6 +-
 lib/librte_eal/common/include/rte_malloc.h       |  17 +++-
 lib/librte_eal/common/include/rte_memory.h       |  28 +++++-
 lib/librte_eal/common/include/rte_memzone.h      |   6 +-
 lib/librte_eal/common/rte_malloc.c               |  22 ++---
 lib/librte_eal/linuxapp/eal/eal_memory.c         |  40 ++++----
 lib/librte_eal/linuxapp/eal/eal_vfio.c           |   6 +-
 lib/librte_eal/rte_eal_version.map               |   3 +-
 lib/librte_kni/rte_kni.c                         |   2 +-
 lib/librte_mbuf/rte_mbuf.c                       |   6 +-
 lib/librte_mbuf/rte_mbuf.h                       |  53 ++++++++---
 lib/librte_mempool/rte_mempool.c                 | 111 +++++++++++++----------
 lib/librte_mempool/rte_mempool.h                 |  86 +++++++++++-------
 lib/librte_mempool/rte_mempool_ops.c             |   4 +-
 lib/librte_mempool/rte_mempool_version.map       |   2 +
 lib/librte_vhost/vhost.h                         |   2 +-
 lib/librte_vhost/vhost_user.c                    |   4 +-
 lib/librte_vhost/virtio_net.c                    |   2 +-
 test/test/test_cryptodev.c                       |  42 ++++-----
 test/test/test_cryptodev.h                       |   4 +-
 test/test/test_mbuf.c                            |   2 +-
 test/test/test_mempool.c                         |   4 +-
 test/test/test_memzone.c                         |  80 ++++++++--------
 129 files changed, 708 insertions(+), 591 deletions(-)

-- 
2.14.2

^ permalink raw reply	[relevance 2%]

* [dpdk-dev] [PATCH v4 15/15] doc: add IOVA aware API changes in release notes
  2017-11-06  1:41  2% ` [dpdk-dev] [PATCH v4 00/15] make DPDK IOVA aware Thomas Monjalon
@ 2017-11-06  1:41 10%   ` Thomas Monjalon
  2017-11-06  5:56  0%     ` santosh
  2017-11-06  8:50  0%     ` Mcnamara, John
  0 siblings, 2 replies; 200+ results
From: Thomas Monjalon @ 2017-11-06  1:41 UTC (permalink / raw)
  To: Santosh Shukla; +Cc: olivier.matz, sergio.gonzalez.monroy, anatoly.burakov, dev

The wording changes have been done in the API without breaking
the ABI. The deprecated fields and symbols can be removed later
when an another ABI change will be required.
The deprecation notice can be removed.

The release notes describe the new available API with IOVA wording.

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
---
 doc/guides/rel_notes/deprecation.rst   |  7 -------
 doc/guides/rel_notes/release_17_11.rst | 17 +++++++++++++++++
 2 files changed, 17 insertions(+), 7 deletions(-)

diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst
index a93c3e170..817f19213 100644
--- a/doc/guides/rel_notes/deprecation.rst
+++ b/doc/guides/rel_notes/deprecation.rst
@@ -21,13 +21,6 @@ Deprecation Notices
   - ``rte_eal_devargs_type_count``
   - ``rte_eal_parse_devargs_str``, replaced by ``rte_eal_devargs_parse``
 
-* eal: An ABI change is planned for 17.11 to make DPDK aware of IOVA address
-  translation scheme.
-  Reference to phys address in EAL data-structure or functions may change to
-  IOVA address or more appropriate name.
-  The change will be only for the name.
-  Functional aspects of the API or data-structure will remain same.
-
 * pci: Several exposed functions are misnamed.
   The following functions are deprecated starting from v17.11 and are replaced:
 
diff --git a/doc/guides/rel_notes/release_17_11.rst b/doc/guides/rel_notes/release_17_11.rst
index b96b23614..85505fa8e 100644
--- a/doc/guides/rel_notes/release_17_11.rst
+++ b/doc/guides/rel_notes/release_17_11.rst
@@ -321,6 +321,23 @@ API Changes
 * ``rte_mem_phy2mch`` was used in Xen dom0 to obtain the physical address;
   remove this API as Xen dom0 support was removed.
 
+* **Some data type, structure members and functions related to physical address
+  are deprecated and have new alias with IOVA wording.**
+
+  * ``phys_addr_t`` can be often replaced by ``rte_iova_t`` of same size.
+  * ``RTE_BAD_PHYS_ADDR`` is often replaced by ``RTE_BAD_IOVA`` of same value.
+  * ``rte_memseg.phys_addr`` is aliased with ``rte_memseg.iova_addr``.
+  * ``rte_mem_virt2phy()`` can often be replaced by ``rte_mem_virt2iova``.
+  * ``rte_malloc_virt2phy`` is aliased with ``rte_malloc_virt2iova``.
+  * ``rte_memzone.phys_addr`` is aliased with ``rte_memzone.iova``.
+  * ``rte_mempool_objhdr.physaddr`` is aliased with ``rte_mempool_objhdr.iova``.
+  * ``rte_mempool_memhdr.phys_addr`` is aliased with ``rte_mempool_memhdr.iova``.
+  * ``rte_mempool_virt2phy()`` can be replaced by ``rte_mempool_virt2iova()``.
+  * ``rte_mempool_populate_phys*()`` are aliased with ``rte_mempool_populate_iova*()``
+  * ``rte_mbuf.buf_physaddr`` is aliased with ``rte_mbuf.buf_iova``.
+  * ``rte_mbuf_data_dma_addr*()`` are aliased with ``rte_mbuf_data_iova*()``.
+  * ``rte_pktmbuf_mtophys*`` are aliased with ``rte_pktmbuf_iova*()``.
+
 * **PCI bus API moved outside of the EAL**
 
   The PCI bus previously implemented within the EAL has been moved.
-- 
2.14.2

^ permalink raw reply	[relevance 10%]

* Re: [dpdk-dev] [PATCH v4 15/15] doc: add IOVA aware API changes in release notes
  2017-11-06  1:41 10%   ` [dpdk-dev] [PATCH v4 15/15] doc: add IOVA aware API changes in release notes Thomas Monjalon
@ 2017-11-06  5:56  0%     ` santosh
  2017-11-06  8:50  0%     ` Mcnamara, John
  1 sibling, 0 replies; 200+ results
From: santosh @ 2017-11-06  5:56 UTC (permalink / raw)
  To: Thomas Monjalon
  Cc: olivier.matz, sergio.gonzalez.monroy, anatoly.burakov, dev


On Monday 06 November 2017 07:11 AM, Thomas Monjalon wrote:
> The wording changes have been done in the API without breaking
> the ABI. The deprecated fields and symbols can be removed later
> when an another ABI change will be required.
> The deprecation notice can be removed.
>
> The release notes describe the new available API with IOVA wording.
>
> Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
> ---

Acked-by: Santosh Shukla <santosh.shukla@caviumnetworks.com>

^ permalink raw reply	[relevance 0%]

* Re: [dpdk-dev] [PATCH v4 15/15] doc: add IOVA aware API changes in release notes
  2017-11-06  1:41 10%   ` [dpdk-dev] [PATCH v4 15/15] doc: add IOVA aware API changes in release notes Thomas Monjalon
  2017-11-06  5:56  0%     ` santosh
@ 2017-11-06  8:50  0%     ` Mcnamara, John
  1 sibling, 0 replies; 200+ results
From: Mcnamara, John @ 2017-11-06  8:50 UTC (permalink / raw)
  To: Thomas Monjalon, Santosh Shukla
  Cc: olivier.matz, Gonzalez Monroy, Sergio, Burakov, Anatoly, dev



> -----Original Message-----
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Thomas Monjalon
> Sent: Monday, November 6, 2017 1:42 AM
> To: Santosh Shukla <santosh.shukla@caviumnetworks.com>
> Cc: olivier.matz@6wind.com; Gonzalez Monroy, Sergio
> <sergio.gonzalez.monroy@intel.com>; Burakov, Anatoly
> <anatoly.burakov@intel.com>; dev@dpdk.org
> Subject: [dpdk-dev] [PATCH v4 15/15] doc: add IOVA aware API changes in
> release notes
> 
> The wording changes have been done in the API without breaking the ABI.
> The deprecated fields and symbols can be removed later when an another ABI
> change will be required.
> The deprecation notice can be removed.
> 
> The release notes describe the new available API with IOVA wording.
> 
> Signed-off-by: Thomas Monjalon <thomas@monjalon.net>

Acked-by: John McNamara <john.mcnamara@intel.com>

^ permalink raw reply	[relevance 0%]

* [dpdk-dev] [PATCH] mempool: increase ABI version
@ 2017-11-06 11:08  7% Thomas Monjalon
  2017-11-06 11:33  4% ` santosh
  0 siblings, 1 reply; 200+ results
From: Thomas Monjalon @ 2017-11-06 11:08 UTC (permalink / raw)
  To: olivier.matz, santosh.shukla; +Cc: dev

API and ABI of mempool library has been changed in 17.11.

Fixes: 02604520b2f2 ("mempool: remove unused flags argument")
Fixes: 0cc0f8aaa35d ("mempool: change flags from int to unsigned int")
Fixes: 6eac187bff30 ("mempool: add flags arg in xmem size and usage")

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
---
 doc/guides/rel_notes/release_17_11.rst | 2 +-
 lib/librte_mempool/Makefile            | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/doc/guides/rel_notes/release_17_11.rst b/doc/guides/rel_notes/release_17_11.rst
index 85505fa8e..b7546e605 100644
--- a/doc/guides/rel_notes/release_17_11.rst
+++ b/doc/guides/rel_notes/release_17_11.rst
@@ -494,7 +494,7 @@ The libraries prepended with a plus sign were incremented in this version.
      librte_latencystats.so.1
      librte_lpm.so.2
      librte_mbuf.so.3
-     librte_mempool.so.2
+   + librte_mempool.so.3
      librte_meter.so.1
      librte_metrics.so.1
      librte_net.so.1
diff --git a/lib/librte_mempool/Makefile b/lib/librte_mempool/Makefile
index bafd1b9a0..46654e32e 100644
--- a/lib/librte_mempool/Makefile
+++ b/lib/librte_mempool/Makefile
@@ -39,7 +39,7 @@ LDLIBS += -lrte_eal -lrte_ring
 
 EXPORT_MAP := rte_mempool_version.map
 
-LIBABIVER := 2
+LIBABIVER := 3
 
 # all source are stored in SRCS-y
 SRCS-$(CONFIG_RTE_LIBRTE_MEMPOOL) +=  rte_mempool.c
-- 
2.14.2

^ permalink raw reply	[relevance 7%]

* Re: [dpdk-dev] [PATCH] mempool: increase ABI version
  2017-11-06 11:08  7% [dpdk-dev] [PATCH] mempool: increase ABI version Thomas Monjalon
@ 2017-11-06 11:33  4% ` santosh
  2017-11-06 22:59  4%   ` Thomas Monjalon
  0 siblings, 1 reply; 200+ results
From: santosh @ 2017-11-06 11:33 UTC (permalink / raw)
  To: Thomas Monjalon, olivier.matz; +Cc: dev



On Monday 06 November 2017 04:38 PM, Thomas Monjalon wrote:
> API and ABI of mempool library has been changed in 17.11.
>
> Fixes: 02604520b2f2 ("mempool: remove unused flags argument")
> Fixes: 0cc0f8aaa35d ("mempool: change flags from int to unsigned int")
> Fixes: 6eac187bff30 ("mempool: add flags arg in xmem size and usage")
>
> Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
> ---

Acked-by: Santosh Shukla <santosh.shukla@caviumnetworks.com>

^ permalink raw reply	[relevance 4%]

* [dpdk-dev] [PATCH] doc: update ABI/API policy
@ 2017-11-06 11:28 28% Bruce Richardson
  2017-11-06 14:48  4% ` Mcnamara, John
                   ` (2 more replies)
  0 siblings, 3 replies; 200+ results
From: Bruce Richardson @ 2017-11-06 11:28 UTC (permalink / raw)
  To: john.mcnamara; +Cc: dev, Bruce Richardson

Following agreement at the DPDK Technical Board meeting of 2017-10-13 [1],
update the documentation with the ABI/API policy changes.

[1] http://dpdk.org/ml/archives/dev/2017-October/079961.html

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
---
 doc/guides/contributing/versioning.rst | 19 ++++++++++++++++++-
 1 file changed, 18 insertions(+), 1 deletion(-)

diff --git a/doc/guides/contributing/versioning.rst b/doc/guides/contributing/versioning.rst
index 8d0fdb777..a1d8492a1 100644
--- a/doc/guides/contributing/versioning.rst
+++ b/doc/guides/contributing/versioning.rst
@@ -13,7 +13,9 @@ General Guidelines
 ------------------
 
 #. Whenever possible, ABI should be preserved
-#. The libraries marked in experimental state may change without constraint.
+#. Libraries or APIs marked in ``experimental`` state may change without constraint.
+#. New API will be marked as ``experimental`` for at least one release to allow
+   any issues found by users of the new API to be fixed quickly
 #. The addition of symbols is generally not problematic
 #. The modification of symbols can generally be managed with versioning
 #. The removal of symbols generally is an ABI break and requires bumping of the
@@ -41,6 +43,13 @@ ABI versions are set at the time of major release labeling, and the ABI may
 change multiple times, without warning, between the last release label and the
 HEAD label of the git tree.
 
+APIs marked as ``experimental`` are not considered part of the ABI and may
+change without warning at any time.  Since changes to APIs are most likely
+immediately after their introduction, as users begin to take advantage of
+those new API and start finding issues with them, new DPDK APIs will be
+automatically marked as ``experimental`` to allow for a period of stabilization
+before they become part of a tracked ABI.
+
 ABI versions, once released, are available until such time as their
 deprecation has been noted in the Release Notes for at least one major release
 cycle. For example consider the case where the ABI for DPDK 2.0 has been
@@ -58,6 +67,14 @@ being provided. The requirements for doing so are:
 #. At least 3 acknowledgments of the need to do so must be made on the
    dpdk.org mailing list.
 
+   - The acknowledgment of the maintainer of the component is mandatory, or if
+     no maintainer is available for the component, the tree/sub-tree maintainer
+     for that component must be acknowledge the ABI change instead.
+
+   - It is also recommended that acknowledgments from different "areas of
+     interest" be sought for each deprecation, for example: from NIC vendors,
+     CPU vendors, end-users, etc.
+
 #. The changes (including an alternative map file) must be gated with
    the ``RTE_NEXT_ABI`` option, and provided with a deprecation notice at the
    same time.
-- 
2.13.6

^ permalink raw reply	[relevance 28%]

* Re: [dpdk-dev] [PATCH] doc: update ABI/API policy
  2017-11-06 11:28 28% [dpdk-dev] [PATCH] doc: update ABI/API policy Bruce Richardson
@ 2017-11-06 14:48  4% ` Mcnamara, John
  2017-11-11 11:37  4%   ` Thomas Monjalon
  2017-11-07  6:05  4% ` Yuanhan Liu
  2017-11-08 19:09  4% ` Kevin Traynor
  2 siblings, 1 reply; 200+ results
From: Mcnamara, John @ 2017-11-06 14:48 UTC (permalink / raw)
  To: Richardson, Bruce; +Cc: dev



> -----Original Message-----
> From: Richardson, Bruce
> Sent: Monday, November 6, 2017 11:28 AM
> To: Mcnamara, John <john.mcnamara@intel.com>
> Cc: dev@dpdk.org; Richardson, Bruce <bruce.richardson@intel.com>
> Subject: [PATCH] doc: update ABI/API policy
> 
> Following agreement at the DPDK Technical Board meeting of 2017-10-13 [1],
> update the documentation with the ABI/API policy changes.
> 
> [1] http://dpdk.org/ml/archives/dev/2017-October/079961.html
> 
> Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
> ---
>  doc/guides/contributing/versioning.rst | 19 ++++++++++++++++++-
>  1 file changed, 18 insertions(+), 1 deletion(-)
> 
> diff --git a/doc/guides/contributing/versioning.rst
> b/doc/guides/contributing/versioning.rst
> index 8d0fdb777..a1d8492a1 100644
> --- a/doc/guides/contributing/versioning.rst
> +++ b/doc/guides/contributing/versioning.rst
> @@ -13,7 +13,9 @@ General Guidelines
>  ------------------
> 
>  #. Whenever possible, ABI should be preserved -#. The libraries marked in
> experimental state may change without constraint.
> +#. Libraries or APIs marked in ``experimental`` state may change without
> constraint.
> +#. New API will be marked as ``experimental`` for at least one release to

s/API/APIs/


> +APIs marked as ``experimental`` are not considered part of the ABI and
> +may change without warning at any time.  Since changes to APIs are most
> +likely immediately after their introduction, as users begin to take
> +advantage of those new API and start finding issues with them, new DPDK

s/API/APIs/


> +   - The acknowledgment of the maintainer of the component is mandatory, or if
> +     no maintainer is available for the component, the tree/sub-tree maintainer
> +     for that component must be acknowledge the ABI change instead.

s/must be/must/

Apart from that:

Acked-by: John McNamara <john.mcnamara@intel.com>

^ permalink raw reply	[relevance 4%]

* Re: [dpdk-dev] [PATCH] mempool: increase ABI version
  2017-11-06 11:33  4% ` santosh
@ 2017-11-06 22:59  4%   ` Thomas Monjalon
  0 siblings, 0 replies; 200+ results
From: Thomas Monjalon @ 2017-11-06 22:59 UTC (permalink / raw)
  To: santosh, olivier.matz; +Cc: dev

06/11/2017 12:33, santosh:
> 
> On Monday 06 November 2017 04:38 PM, Thomas Monjalon wrote:
> > API and ABI of mempool library has been changed in 17.11.
> >
> > Fixes: 02604520b2f2 ("mempool: remove unused flags argument")
> > Fixes: 0cc0f8aaa35d ("mempool: change flags from int to unsigned int")
> > Fixes: 6eac187bff30 ("mempool: add flags arg in xmem size and usage")
> >
> > Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
> > ---
> 
> Acked-by: Santosh Shukla <santosh.shukla@caviumnetworks.com>

Applied

^ permalink raw reply	[relevance 4%]

* Re: [dpdk-dev] [PATCH] eal: fix version map experimental export section
  2017-10-25 12:29  4% [dpdk-dev] [PATCH] eal: fix version map experimental export section Harry van Haaren
@ 2017-11-06 23:07  0% ` Thomas Monjalon
  0 siblings, 0 replies; 200+ results
From: Thomas Monjalon @ 2017-11-06 23:07 UTC (permalink / raw)
  To: Harry van Haaren; +Cc: dev, santosh.shukla

25/10/2017 14:29, Harry van Haaren:
> Before this commit, the EXPERIMENTAL version of ABI
> derived from the DPDK_17.08 tag. In parallel there
> was a DPDK_17.11 tag.
> 
> Experimental map should always derive from the latest ABI,
> so this patch moves the 17.11 section above EXPERIMENTAL,
> and updates EXPERIMENTAL to derive from the 17.11 map.
> 
> Fixes: aadc3eb002d3 ("pci: export match function")
> Cc: santosh.shukla@caviumnetworks.com
> 
> Signed-off-by: Harry van Haaren <harry.van.haaren@intel.com>

Rebased and applied, thanks

^ permalink raw reply	[relevance 0%]

* [dpdk-dev] [dpdk-techboard] [DRAFT] DPDK techboard minutes of October 26
@ 2017-11-07  3:08  3% Thomas Monjalon
  0 siblings, 0 replies; 200+ results
From: Thomas Monjalon @ 2017-11-07  3:08 UTC (permalink / raw)
  To: dev; +Cc: techboard

Hi,

Here are the minutes of the last DPDK technical board meeting
held on 2017-10-26.

Attendees:
- Bruce Richardson
- Hemant Agrawal
- Jerin Jacob
- Konstantin Ananyev
- Stephen Hemminger
- Thomas Monjalon
- Yuanhan Liu

1) update on ABI stability guidelines

Bruce takes the action to update the guidelines (or delegate this task),
according to recent techboard decision:
	http://dpdk.org/ml/archives/dev/2017-October/079961.html

2) update on license discussion

The Linux Foundation made an audit about licenses.
Jan Blunck (as the current techboard representative) is supposed to meet
with them and propose an action plan.
It is going to be a long term plan.

3) The techboard is not allowed to disclose this item.

A private meeting will be organized.

4) next chair, recurring meeting date?

The next meetings should happen at a recurring fixed day and time.
A poll will be organized in the techboard.

Yuanhan will lead the next meeting.

A technical panel session will be organized during the US summit,
including a lot of techboard members.

^ permalink raw reply	[relevance 3%]

* [dpdk-dev] [dpdk-techboard] DPDK techboard minutes of October 26
@ 2017-11-07  3:09  3% Thomas Monjalon
  0 siblings, 0 replies; 200+ results
From: Thomas Monjalon @ 2017-11-07  3:09 UTC (permalink / raw)
  To: dev; +Cc: techboard

Hi,

Here are the minutes of the latest DPDK technical board meeting
held on 2017-10-26.

Attendees:
- Bruce Richardson
- Hemant Agrawal
- Jerin Jacob
- Konstantin Ananyev
- Stephen Hemminger
- Thomas Monjalon
- Yuanhan Liu

1) update on ABI stability guidelines

Bruce takes the action to update the guidelines (or delegate this task),
according to recent techboard decision:
	http://dpdk.org/ml/archives/dev/2017-October/079961.html

2) update on license discussion

The Linux Foundation made an audit about licenses.
Jan Blunck (as the current techboard representative) is supposed to meet
with them and propose an action plan.
It is going to be a long term plan.

3) The techboard is not allowed to disclose this item.

A private meeting will be organized.

4) next chair, recurring meeting date?

The next meetings should happen at a recurring fixed day and time.
A poll will be organized in the techboard.

Yuanhan will lead the next meeting.

A technical panel session will be organized during the US summit,
including a lot of techboard members.

^ permalink raw reply	[relevance 3%]

* Re: [dpdk-dev] [PATCH] doc: update ABI/API policy
  2017-11-06 11:28 28% [dpdk-dev] [PATCH] doc: update ABI/API policy Bruce Richardson
  2017-11-06 14:48  4% ` Mcnamara, John
@ 2017-11-07  6:05  4% ` Yuanhan Liu
  2017-11-08 19:09  4% ` Kevin Traynor
  2 siblings, 0 replies; 200+ results
From: Yuanhan Liu @ 2017-11-07  6:05 UTC (permalink / raw)
  To: Bruce Richardson; +Cc: john.mcnamara, dev

On Mon, Nov 06, 2017 at 11:28:06AM +0000, Bruce Richardson wrote:
> Following agreement at the DPDK Technical Board meeting of 2017-10-13 [1],
> update the documentation with the ABI/API policy changes.
> 
> [1] http://dpdk.org/ml/archives/dev/2017-October/079961.html
> 
> Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>

Acked-by: Yuanhan Liu <yliu@fridaylinux.org>

	--yliu

^ permalink raw reply	[relevance 4%]

* [dpdk-dev] [PATCH v2] doc: update release notes for rte_security
  2017-10-30 12:27  8% [dpdk-dev] [PATCH] doc: update release notes for rte_security Akhil Goyal
  2017-10-30 14:22  0% ` Thomas Monjalon
@ 2017-11-07  6:44  8% ` Akhil Goyal
  2017-11-08  1:07  0%   ` Thomas Monjalon
  1 sibling, 1 reply; 200+ results
From: Akhil Goyal @ 2017-11-07  6:44 UTC (permalink / raw)
  To: dev
  Cc: declan.doherty, pablo.de.lara.guarch, hemant.agrawal,
	radu.nicolau, borisp, aviadye, thomas, jerin.jacob,
	john.mcnamara, konstantin.ananyev, Akhil Goyal

Removed the deprication notice for ABI breakage and updated
release notes for rte_security.

Signed-off-by: Akhil Goyal <akhil.goyal@nxp.com>
---
Changes in v2: incorporated comment from John

 doc/guides/rel_notes/deprecation.rst   | 10 ----------
 doc/guides/rel_notes/release_17_11.rst | 33 +++++++++++++++++++++++++++++++++
 2 files changed, 33 insertions(+), 10 deletions(-)

diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst
index a93c3e1..b8dff0e 100644
--- a/doc/guides/rel_notes/deprecation.rst
+++ b/doc/guides/rel_notes/deprecation.rst
@@ -50,16 +50,6 @@ Deprecation Notices
   Target release for removal of the legacy API will be defined once most
   PMDs have switched to rte_flow.
 
-* ethdev: new parameters - ``rte_security_capabilities`` and
-  ``rte_security_ops`` will be added to ``rte_eth_dev_info`` and
-  ``rte_eth_dev`` respectively  to support security operations like
-  ipsec inline.
-
-* cryptodev: new parameters - ``rte_security_capabilities`` and
-  ``rte_security_ops`` will be added to ``rte_cryptodev_info`` and
-  ``rte_cryptodev`` respectively to support security protocol offloaded
-  operations.
-
 * cryptodev: the following function is deprecated starting from 17.08 and will
   be removed in 17.11:
 
diff --git a/doc/guides/rel_notes/release_17_11.rst b/doc/guides/rel_notes/release_17_11.rst
index b96b236..13cc2d9 100644
--- a/doc/guides/rel_notes/release_17_11.rst
+++ b/doc/guides/rel_notes/release_17_11.rst
@@ -208,6 +208,29 @@ New Features
   applications to classify an input packet by matching it against a set of flow
   rules. It uses the librte_table API to manage the flow rules.
 
+* **Added the Security Offload Library.**
+
+  Added an experimental library - rte_security. It provide security APIs for
+  protocols like IPSec using inline ipsec offload to ethernet device or full
+  protocol offload with lookaside crypto device.
+
+  See the "Security_Library" section of the DPDK Programmers Guide document,
+  for more information.
+
+* **Updated DPAA2_SEC crypto driver.**
+
+  Updated dpaa2_sec crypto PMD to support rte_security lookaside protocol
+  offload for IPSec.
+
+* **Updated IXGBE ethernet driver.**
+
+  Updated ixgbe ethernet PMD to support rte_security inline IPSec offload.
+
+* **Updated ipsec-secgw application**
+
+  Updated ipsec-secgw sample application to support rte_security actions for
+  ipsec inline and full protocol offload using lookaside crypto offload.
+
 
 Resolved Issues
 ---------------
@@ -422,6 +445,16 @@ ABI Changes
   The size of the field ``port_id`` in the ``rte_eth_dev_data`` structure
   changed, as described in the `New Features` section.
 
+* **New parameter added to rte_eth_dev.**
+
+  New parameter ``security_ctx``  added to ``rte_eth_dev`` to support security
+  operations like IPSec inline.
+
+* **New parameter added to rte_cryptodev.**
+
+  New parameter ``security_ctx``  added to ``rte_cryptodev`` to support security
+  operations like lookaside crypto.
+
 
 Removed Items
 -------------
-- 
2.9.3

^ permalink raw reply	[relevance 8%]

* [dpdk-dev] [PATCH v12 1/4] cryptodev: remove crypto vdev init API
  @ 2017-11-07  6:54  4%   ` Jianfeng Tan
  2017-11-07  6:54  1%   ` [dpdk-dev] [PATCH v12 3/4] bus/vdev: move to vdev bus to drivers/bus Jianfeng Tan
  1 sibling, 0 replies; 200+ results
From: Jianfeng Tan @ 2017-11-07  6:54 UTC (permalink / raw)
  To: dev
  Cc: jblunck, bruce.richardson, konstantin.ananyev,
	pablo.de.lara.guarch, thomas, yliu, maxime.coquelin, mtetsuyah,
	ferruh.yigit, Jianfeng Tan

Remove rte_cryptodev_create_vdev() for duplication.

Signed-off-by: Jianfeng Tan <jianfeng.tan@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
---
 doc/guides/rel_notes/deprecation.rst           |  5 -----
 doc/guides/rel_notes/release_17_11.rst         |  2 ++
 lib/librte_cryptodev/rte_cryptodev.c           |  6 ------
 lib/librte_cryptodev/rte_cryptodev.h           | 17 -----------------
 lib/librte_cryptodev/rte_cryptodev_version.map |  1 -
 5 files changed, 2 insertions(+), 29 deletions(-)

diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst
index 817f192..d38ce5c 100644
--- a/doc/guides/rel_notes/deprecation.rst
+++ b/doc/guides/rel_notes/deprecation.rst
@@ -53,10 +53,5 @@ Deprecation Notices
   ``rte_cryptodev`` respectively to support security protocol offloaded
   operations.
 
-* cryptodev: the following function is deprecated starting from 17.08 and will
-  be removed in 17.11:
-
-  - ``rte_cryptodev_create_vdev``
-
 * librte_meter: The API will change to accommodate configuration profiles.
   Most of the API functions will have an additional opaque parameter.
diff --git a/doc/guides/rel_notes/release_17_11.rst b/doc/guides/rel_notes/release_17_11.rst
index 4846448..158a9ca 100644
--- a/doc/guides/rel_notes/release_17_11.rst
+++ b/doc/guides/rel_notes/release_17_11.rst
@@ -431,6 +431,8 @@ API Changes
   the backing device supports the operation or if the operation was
   successfully performed.
 
+* ``rte_cryptodev_create_vdev`` was removed to avoid the dependency on vdev
+  in librte_cryptodev; instead, users can call rte_vdev_init() directly.
 
 ABI Changes
 -----------
diff --git a/lib/librte_cryptodev/rte_cryptodev.c b/lib/librte_cryptodev/rte_cryptodev.c
index e5f2876..b40c028 100644
--- a/lib/librte_cryptodev/rte_cryptodev.c
+++ b/lib/librte_cryptodev/rte_cryptodev.c
@@ -377,12 +377,6 @@ rte_cryptodev_get_feature_name(uint64_t flag)
 	}
 }
 
-int
-rte_cryptodev_create_vdev(const char *name, const char *args)
-{
-	return rte_vdev_init(name, args);
-}
-
 struct rte_cryptodev *
 rte_cryptodev_pmd_get_dev(uint8_t dev_id)
 {
diff --git a/lib/librte_cryptodev/rte_cryptodev.h b/lib/librte_cryptodev/rte_cryptodev.h
index a25bff9..dade554 100644
--- a/lib/librte_cryptodev/rte_cryptodev.h
+++ b/lib/librte_cryptodev/rte_cryptodev.h
@@ -435,23 +435,6 @@ struct rte_cryptodev_stats {
 /**< Max length of name of crypto PMD */
 
 /**
- * @deprecated
- *
- * Create a virtual crypto device
- *
- * @param	name	Cryptodev PMD name of device to be created.
- * @param	args	Options arguments for device.
- *
- * @return
- * - On successful creation of the cryptodev the device index is returned,
- *   which will be between 0 and rte_cryptodev_count().
- * - In the case of a failure, returns -1.
- */
-__rte_deprecated
-extern int
-rte_cryptodev_create_vdev(const char *name, const char *args);
-
-/**
  * Get the device identifier for the named crypto device.
  *
  * @param	name	device name to select the device structure.
diff --git a/lib/librte_cryptodev/rte_cryptodev_version.map b/lib/librte_cryptodev/rte_cryptodev_version.map
index e82296c..eb47308 100644
--- a/lib/librte_cryptodev/rte_cryptodev_version.map
+++ b/lib/librte_cryptodev/rte_cryptodev_version.map
@@ -7,7 +7,6 @@ DPDK_16.04 {
 	rte_cryptodev_close;
 	rte_cryptodev_count;
 	rte_cryptodev_configure;
-	rte_cryptodev_create_vdev;
 	rte_cryptodev_get_dev_id;
 	rte_cryptodev_get_feature_name;
 	rte_cryptodev_info_get;
-- 
2.7.4

^ permalink raw reply	[relevance 4%]

* [dpdk-dev] [PATCH v12 3/4] bus/vdev: move to vdev bus to drivers/bus
    2017-11-07  6:54  4%   ` [dpdk-dev] [PATCH v12 1/4] cryptodev: remove crypto vdev init API Jianfeng Tan
@ 2017-11-07  6:54  1%   ` Jianfeng Tan
  1 sibling, 0 replies; 200+ results
From: Jianfeng Tan @ 2017-11-07  6:54 UTC (permalink / raw)
  To: dev
  Cc: jblunck, bruce.richardson, konstantin.ananyev,
	pablo.de.lara.guarch, thomas, yliu, maxime.coquelin, mtetsuyah,
	ferruh.yigit, Jianfeng Tan

Move the vdev bus from lib/librte_eal to drivers/bus.

As the crypto vdev helper function refers to data structure
in rte_vdev.h, so we move those helper function into drivers/bus
too.

Signed-off-by: Jianfeng Tan <jianfeng.tan@intel.com>
---
 config/common_base                          |   5 +
 doc/guides/rel_notes/release_17_11.rst      |   9 +
 drivers/bus/Makefile                        |   2 +
 drivers/bus/vdev/Makefile                   |  57 +++++
 drivers/bus/vdev/rte_bus_vdev.h             | 153 +++++++++++++
 drivers/bus/vdev/rte_bus_vdev_version.map   |   8 +
 drivers/bus/vdev/vdev.c                     | 344 ++++++++++++++++++++++++++++
 drivers/crypto/aesni_gcm/Makefile           |   1 +
 drivers/crypto/aesni_gcm/aesni_gcm_pmd.c    |   2 +-
 drivers/crypto/aesni_mb/Makefile            |   1 +
 drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c  |   2 +-
 drivers/crypto/armv8/Makefile               |   1 +
 drivers/crypto/armv8/rte_armv8_pmd.c        |   2 +-
 drivers/crypto/kasumi/Makefile              |   1 +
 drivers/crypto/kasumi/rte_kasumi_pmd.c      |   2 +-
 drivers/crypto/mrvl/Makefile                |   1 +
 drivers/crypto/mrvl/rte_mrvl_pmd.c          |   2 +-
 drivers/crypto/null/Makefile                |   1 +
 drivers/crypto/null/null_crypto_pmd.c       |   2 +-
 drivers/crypto/openssl/Makefile             |   1 +
 drivers/crypto/openssl/rte_openssl_pmd.c    |   2 +-
 drivers/crypto/scheduler/Makefile           |   1 +
 drivers/crypto/scheduler/scheduler_pmd.c    |   2 +-
 drivers/crypto/snow3g/Makefile              |   1 +
 drivers/crypto/snow3g/rte_snow3g_pmd.c      |   2 +-
 drivers/crypto/zuc/Makefile                 |   1 +
 drivers/crypto/zuc/rte_zuc_pmd.c            |   2 +-
 drivers/event/dpaa2/Makefile                |   1 +
 drivers/event/dpaa2/dpaa2_eventdev.c        |   2 +-
 drivers/event/octeontx/Makefile             |   1 +
 drivers/event/octeontx/ssovf_evdev.c        |   2 +-
 drivers/event/skeleton/Makefile             |   1 +
 drivers/event/skeleton/skeleton_eventdev.c  |   2 +-
 drivers/event/sw/Makefile                   |   1 +
 drivers/event/sw/sw_evdev.c                 |   2 +-
 drivers/net/af_packet/Makefile              |   1 +
 drivers/net/af_packet/rte_eth_af_packet.c   |   2 +-
 drivers/net/bonding/Makefile                |   1 +
 drivers/net/bonding/rte_eth_bond_api.c      |   2 +-
 drivers/net/bonding/rte_eth_bond_pmd.c      |   2 +-
 drivers/net/failsafe/Makefile               |   1 +
 drivers/net/failsafe/failsafe.c             |   2 +-
 drivers/net/kni/Makefile                    |   1 +
 drivers/net/kni/rte_eth_kni.c               |   2 +-
 drivers/net/mrvl/Makefile                   |   1 +
 drivers/net/mrvl/mrvl_ethdev.c              |   2 +-
 drivers/net/null/Makefile                   |   1 +
 drivers/net/null/rte_eth_null.c             |   2 +-
 drivers/net/octeontx/Makefile               |   1 +
 drivers/net/octeontx/octeontx_ethdev.c      |   2 +-
 drivers/net/pcap/Makefile                   |   1 +
 drivers/net/pcap/rte_eth_pcap.c             |   2 +-
 drivers/net/ring/Makefile                   |   1 +
 drivers/net/ring/rte_eth_ring.c             |   2 +-
 drivers/net/softnic/Makefile                |   1 +
 drivers/net/softnic/rte_eth_softnic.c       |   2 +-
 drivers/net/tap/Makefile                    |   1 +
 drivers/net/tap/rte_eth_tap.c               |   2 +-
 drivers/net/vhost/Makefile                  |   1 +
 drivers/net/vhost/rte_eth_vhost.c           |   2 +-
 drivers/net/virtio/Makefile                 |   3 +
 drivers/net/virtio/virtio_user_ethdev.c     |   2 +-
 lib/librte_eal/bsdapp/eal/Makefile          |   1 -
 lib/librte_eal/common/Makefile              |   2 +-
 lib/librte_eal/common/eal_common_vdev.c     | 342 ---------------------------
 lib/librte_eal/common/include/rte_dev.h     |  24 +-
 lib/librte_eal/common/include/rte_vdev.h    | 131 -----------
 lib/librte_eal/linuxapp/eal/Makefile        |   1 -
 lib/librte_eal/rte_eal_version.map          |   4 -
 lib/librte_ether/rte_ethdev_vdev.h          |   2 +-
 lib/librte_eventdev/rte_eventdev_pmd_vdev.h |   2 +-
 mk/rte.app.mk                               |   1 +
 test/test/test_cryptodev.c                  |   1 +
 test/test/test_event_eth_rx_adapter.c       |   1 +
 test/test/test_eventdev.c                   |   1 +
 test/test/test_eventdev_octeontx.c          |   1 +
 test/test/test_eventdev_sw.c                |   1 +
 test/test/test_link_bonding_rssconf.c       |   1 +
 78 files changed, 646 insertions(+), 533 deletions(-)
 create mode 100644 drivers/bus/vdev/Makefile
 create mode 100644 drivers/bus/vdev/rte_bus_vdev.h
 create mode 100644 drivers/bus/vdev/rte_bus_vdev_version.map
 create mode 100644 drivers/bus/vdev/vdev.c
 delete mode 100644 lib/librte_eal/common/eal_common_vdev.c
 delete mode 100644 lib/librte_eal/common/include/rte_vdev.h

diff --git a/config/common_base b/config/common_base
index 82ee754..9ae5ec3 100644
--- a/config/common_base
+++ b/config/common_base
@@ -158,6 +158,11 @@ CONFIG_RTE_ETHDEV_TX_PREPARE_NOOP=n
 CONFIG_RTE_LIBRTE_PCI_BUS=y
 
 #
+# Compile the vdev bus
+#
+CONFIG_RTE_LIBRTE_VDEV_BUS=y
+
+#
 # Compile burst-oriented Amazon ENA PMD driver
 #
 CONFIG_RTE_LIBRTE_ENA_PMD=y
diff --git a/doc/guides/rel_notes/release_17_11.rst b/doc/guides/rel_notes/release_17_11.rst
index 158a9ca..714234a 100644
--- a/doc/guides/rel_notes/release_17_11.rst
+++ b/doc/guides/rel_notes/release_17_11.rst
@@ -434,6 +434,14 @@ API Changes
 * ``rte_cryptodev_create_vdev`` was removed to avoid the dependency on vdev
   in librte_cryptodev; instead, users can call rte_vdev_init() directly.
 
+* **Moved vdev bus APIs outside of the EAL**
+
+  Moved the following APIs from ``librte_eal`` to ``librte_bus_vdev``:
+  * ``rte_vdev_init``
+  * ``rte_vdev_register``
+  * ``rte_vdev_uninit``
+  * ``rte_vdev_unregister``
+
 ABI Changes
 -----------
 
@@ -489,6 +497,7 @@ The libraries prepended with a plus sign were incremented in this version.
 
      librte_acl.so.2
    + librte_bitratestats.so.2
+   + librte_bus_vdev.so.1
      librte_cfgfile.so.2
      librte_cmdline.so.2
    + librte_cryptodev.so.4
diff --git a/drivers/bus/Makefile b/drivers/bus/Makefile
index e3fbc50..d9fe4c4 100644
--- a/drivers/bus/Makefile
+++ b/drivers/bus/Makefile
@@ -34,4 +34,6 @@ DIRS-$(CONFIG_RTE_LIBRTE_DPAA_BUS) += dpaa
 DIRS-$(CONFIG_RTE_LIBRTE_FSLMC_BUS) += fslmc
 DIRS-$(CONFIG_RTE_LIBRTE_PCI_BUS) += pci
 
+DIRS-$(CONFIG_RTE_LIBRTE_VDEV_BUS) += vdev
+
 include $(RTE_SDK)/mk/rte.subdir.mk
diff --git a/drivers/bus/vdev/Makefile b/drivers/bus/vdev/Makefile
new file mode 100644
index 0000000..84bd724
--- /dev/null
+++ b/drivers/bus/vdev/Makefile
@@ -0,0 +1,57 @@
+#   BSD LICENSE
+#
+#   Copyright(c) 2017 Intel Corporation. All rights reserved.
+#   All rights reserved.
+#
+#   Redistribution and use in source and binary forms, with or without
+#   modification, are permitted provided that the following conditions
+#   are met:
+#
+#     * Redistributions of source code must retain the above copyright
+#       notice, this list of conditions and the following disclaimer.
+#     * Redistributions in binary form must reproduce the above copyright
+#       notice, this list of conditions and the following disclaimer in
+#       the documentation and/or other materials provided with the
+#       distribution.
+#     * Neither the name of Intel Corporation nor the names of its
+#       contributors may be used to endorse or promote products derived
+#       from this software without specific prior written permission.
+#
+#   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+#   "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+#   LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+#   A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+#   OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+#   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+#   LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+#   DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+#   THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+#   (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+#   OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+include $(RTE_SDK)/mk/rte.vars.mk
+
+#
+# library name
+#
+LIB = librte_bus_vdev.a
+
+CFLAGS += -O3
+CFLAGS += $(WERROR_FLAGS)
+
+# versioning export map
+EXPORT_MAP := rte_bus_vdev_version.map
+
+# library version
+LIBABIVER := 1
+
+SRCS-y += vdev.c
+
+LDLIBS += -lrte_eal
+
+#
+# Export include files
+#
+SYMLINK-y-include += rte_bus_vdev.h
+
+include $(RTE_SDK)/mk/rte.lib.mk
diff --git a/drivers/bus/vdev/rte_bus_vdev.h b/drivers/bus/vdev/rte_bus_vdev.h
new file mode 100644
index 0000000..41762b8
--- /dev/null
+++ b/drivers/bus/vdev/rte_bus_vdev.h
@@ -0,0 +1,153 @@
+/*-
+ *   BSD LICENSE
+ *
+ *   Copyright(c) 2016 RehiveTech. All rights reserved.
+ *
+ *   Redistribution and use in source and binary forms, with or without
+ *   modification, are permitted provided that the following conditions
+ *   are met:
+ *
+ *     * Redistributions of source code must retain the above copyright
+ *       notice, this list of conditions and the following disclaimer.
+ *     * Redistributions in binary form must reproduce the above copyright
+ *       notice, this list of conditions and the following disclaimer in
+ *       the documentation and/or other materials provided with the
+ *       distribution.
+ *     * Neither the name of RehiveTech nor the names of its
+ *       contributors may be used to endorse or promote products derived
+ *       from this software without specific prior written permission.
+ *
+ *   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ *   "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ *   LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ *   A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ *   OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ *   LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ *   DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ *   THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ *   (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ *   OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef RTE_VDEV_H
+#define RTE_VDEV_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include <sys/queue.h>
+#include <rte_dev.h>
+#include <rte_devargs.h>
+
+struct rte_vdev_device {
+	TAILQ_ENTRY(rte_vdev_device) next;      /**< Next attached vdev */
+	struct rte_device device;               /**< Inherit core device */
+};
+
+/**
+ * @internal
+ * Helper macro for drivers that need to convert to struct rte_vdev_device.
+ */
+#define RTE_DEV_TO_VDEV(ptr) \
+	container_of(ptr, struct rte_vdev_device, device)
+
+static inline const char *
+rte_vdev_device_name(const struct rte_vdev_device *dev)
+{
+	if (dev && dev->device.name)
+		return dev->device.name;
+	return NULL;
+}
+
+static inline const char *
+rte_vdev_device_args(const struct rte_vdev_device *dev)
+{
+	if (dev && dev->device.devargs)
+		return dev->device.devargs->args;
+	return "";
+}
+
+/** Double linked list of virtual device drivers. */
+TAILQ_HEAD(vdev_driver_list, rte_vdev_driver);
+
+/**
+ * Probe function called for each virtual device driver once.
+ */
+typedef int (rte_vdev_probe_t)(struct rte_vdev_device *dev);
+
+/**
+ * Remove function called for each virtual device driver once.
+ */
+typedef int (rte_vdev_remove_t)(struct rte_vdev_device *dev);
+
+/**
+ * A virtual device driver abstraction.
+ */
+struct rte_vdev_driver {
+	TAILQ_ENTRY(rte_vdev_driver) next; /**< Next in list. */
+	struct rte_driver driver;      /**< Inherited general driver. */
+	rte_vdev_probe_t *probe;       /**< Virtual device probe function. */
+	rte_vdev_remove_t *remove;     /**< Virtual device remove function. */
+};
+
+/**
+ * Register a virtual device driver.
+ *
+ * @param driver
+ *   A pointer to a rte_vdev_driver structure describing the driver
+ *   to be registered.
+ */
+void rte_vdev_register(struct rte_vdev_driver *driver);
+
+/**
+ * Unregister a virtual device driver.
+ *
+ * @param driver
+ *   A pointer to a rte_vdev_driver structure describing the driver
+ *   to be unregistered.
+ */
+void rte_vdev_unregister(struct rte_vdev_driver *driver);
+
+#define RTE_PMD_REGISTER_VDEV(nm, vdrv)\
+RTE_INIT(vdrvinitfn_ ##vdrv);\
+static const char *vdrvinit_ ## nm ## _alias;\
+static void vdrvinitfn_ ##vdrv(void)\
+{\
+	(vdrv).driver.name = RTE_STR(nm);\
+	(vdrv).driver.alias = vdrvinit_ ## nm ## _alias;\
+	rte_vdev_register(&vdrv);\
+} \
+RTE_PMD_EXPORT_NAME(nm, __COUNTER__)
+
+#define RTE_PMD_REGISTER_ALIAS(nm, alias)\
+static const char *vdrvinit_ ## nm ## _alias = RTE_STR(alias)
+
+/**
+ * Initialize a driver specified by name.
+ *
+ * @param name
+ *   The pointer to a driver name to be initialized.
+ * @param args
+ *   The pointer to arguments used by driver initialization.
+ * @return
+ *  0 on success, negative on error
+ */
+int rte_vdev_init(const char *name, const char *args);
+
+/**
+ * Uninitalize a driver specified by name.
+ *
+ * @param name
+ *   The pointer to a driver name to be initialized.
+ * @return
+ *  0 on success, negative on error
+ */
+int rte_vdev_uninit(const char *name);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/drivers/bus/vdev/rte_bus_vdev_version.map b/drivers/bus/vdev/rte_bus_vdev_version.map
new file mode 100644
index 0000000..6ccb789
--- /dev/null
+++ b/drivers/bus/vdev/rte_bus_vdev_version.map
@@ -0,0 +1,8 @@
+DPDK_17.11 {
+	global:
+
+	rte_vdev_init;
+	rte_vdev_register;
+	rte_vdev_uninit;
+	rte_vdev_unregister;
+};
diff --git a/drivers/bus/vdev/vdev.c b/drivers/bus/vdev/vdev.c
new file mode 100644
index 0000000..04ed49b
--- /dev/null
+++ b/drivers/bus/vdev/vdev.c
@@ -0,0 +1,344 @@
+/*-
+ *   BSD LICENSE
+ *
+ *   Copyright(c) 2016 RehiveTech. All rights reserved.
+ *
+ *   Redistribution and use in source and binary forms, with or without
+ *   modification, are permitted provided that the following conditions
+ *   are met:
+ *
+ *     * Redistributions of source code must retain the above copyright
+ *       notice, this list of conditions and the following disclaimer.
+ *     * Redistributions in binary form must reproduce the above copyright
+ *       notice, this list of conditions and the following disclaimer in
+ *       the documentation and/or other materials provided with the
+ *       distribution.
+ *     * Neither the name of RehiveTech nor the names of its
+ *       contributors may be used to endorse or promote products derived
+ *       from this software without specific prior written permission.
+ *
+ *   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ *   "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ *   LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ *   A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ *   OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ *   LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ *   DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ *   THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ *   (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ *   OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include <string.h>
+#include <inttypes.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <stdint.h>
+#include <stdbool.h>
+#include <sys/queue.h>
+
+#include <rte_eal.h>
+#include <rte_dev.h>
+#include <rte_bus.h>
+#include <rte_common.h>
+#include <rte_devargs.h>
+#include <rte_memory.h>
+#include <rte_errno.h>
+
+#include "rte_bus_vdev.h"
+
+/* Forward declare to access virtual bus name */
+static struct rte_bus rte_vdev_bus;
+
+/** Double linked list of virtual device drivers. */
+TAILQ_HEAD(vdev_device_list, rte_vdev_device);
+
+static struct vdev_device_list vdev_device_list =
+	TAILQ_HEAD_INITIALIZER(vdev_device_list);
+struct vdev_driver_list vdev_driver_list =
+	TAILQ_HEAD_INITIALIZER(vdev_driver_list);
+
+/* register a driver */
+void
+rte_vdev_register(struct rte_vdev_driver *driver)
+{
+	TAILQ_INSERT_TAIL(&vdev_driver_list, driver, next);
+}
+
+/* unregister a driver */
+void
+rte_vdev_unregister(struct rte_vdev_driver *driver)
+{
+	TAILQ_REMOVE(&vdev_driver_list, driver, next);
+}
+
+static int
+vdev_parse(const char *name, void *addr)
+{
+	struct rte_vdev_driver **out = addr;
+	struct rte_vdev_driver *driver = NULL;
+
+	TAILQ_FOREACH(driver, &vdev_driver_list, next) {
+		if (strncmp(driver->driver.name, name,
+			    strlen(driver->driver.name)) == 0)
+			break;
+		if (driver->driver.alias &&
+		    strncmp(driver->driver.alias, name,
+			    strlen(driver->driver.alias)) == 0)
+			break;
+	}
+	if (driver != NULL &&
+	    addr != NULL)
+		*out = driver;
+	return driver == NULL;
+}
+
+static int
+vdev_probe_all_drivers(struct rte_vdev_device *dev)
+{
+	const char *name;
+	struct rte_vdev_driver *driver;
+	int ret;
+
+	name = rte_vdev_device_name(dev);
+
+	RTE_LOG(DEBUG, EAL, "Search driver %s to probe device %s\n", name,
+		rte_vdev_device_name(dev));
+
+	if (vdev_parse(name, &driver))
+		return -1;
+	dev->device.driver = &driver->driver;
+	ret = driver->probe(dev);
+	if (ret)
+		dev->device.driver = NULL;
+	return ret;
+}
+
+static struct rte_vdev_device *
+find_vdev(const char *name)
+{
+	struct rte_vdev_device *dev;
+
+	if (!name)
+		return NULL;
+
+	TAILQ_FOREACH(dev, &vdev_device_list, next) {
+		const char *devname = rte_vdev_device_name(dev);
+
+		if (!strncmp(devname, name, strlen(name)))
+			return dev;
+	}
+
+	return NULL;
+}
+
+static struct rte_devargs *
+alloc_devargs(const char *name, const char *args)
+{
+	struct rte_devargs *devargs;
+	int ret;
+
+	devargs = calloc(1, sizeof(*devargs));
+	if (!devargs)
+		return NULL;
+
+	devargs->bus = &rte_vdev_bus;
+	if (args)
+		devargs->args = strdup(args);
+	else
+		devargs->args = strdup("");
+
+	ret = snprintf(devargs->name, sizeof(devargs->name), "%s", name);
+	if (ret < 0 || ret >= (int)sizeof(devargs->name)) {
+		free(devargs->args);
+		free(devargs);
+		return NULL;
+	}
+
+	return devargs;
+}
+
+int
+rte_vdev_init(const char *name, const char *args)
+{
+	struct rte_vdev_device *dev;
+	struct rte_devargs *devargs;
+	int ret;
+
+	if (name == NULL)
+		return -EINVAL;
+
+	dev = find_vdev(name);
+	if (dev)
+		return -EEXIST;
+
+	devargs = alloc_devargs(name, args);
+	if (!devargs)
+		return -ENOMEM;
+
+	dev = calloc(1, sizeof(*dev));
+	if (!dev) {
+		ret = -ENOMEM;
+		goto fail;
+	}
+
+	dev->device.devargs = devargs;
+	dev->device.numa_node = SOCKET_ID_ANY;
+	dev->device.name = devargs->name;
+
+	ret = vdev_probe_all_drivers(dev);
+	if (ret) {
+		if (ret > 0)
+			RTE_LOG(ERR, EAL, "no driver found for %s\n", name);
+		goto fail;
+	}
+
+	TAILQ_INSERT_TAIL(&devargs_list, devargs, next);
+
+	TAILQ_INSERT_TAIL(&vdev_device_list, dev, next);
+	return 0;
+
+fail:
+	free(devargs->args);
+	free(devargs);
+	free(dev);
+	return ret;
+}
+
+static int
+vdev_remove_driver(struct rte_vdev_device *dev)
+{
+	const char *name = rte_vdev_device_name(dev);
+	const struct rte_vdev_driver *driver;
+
+	if (!dev->device.driver) {
+		RTE_LOG(DEBUG, EAL, "no driver attach to device %s\n", name);
+		return 1;
+	}
+
+	driver = container_of(dev->device.driver, const struct rte_vdev_driver,
+		driver);
+	return driver->remove(dev);
+}
+
+int
+rte_vdev_uninit(const char *name)
+{
+	struct rte_vdev_device *dev;
+	struct rte_devargs *devargs;
+	int ret;
+
+	if (name == NULL)
+		return -EINVAL;
+
+	dev = find_vdev(name);
+	if (!dev)
+		return -ENOENT;
+
+	devargs = dev->device.devargs;
+
+	ret = vdev_remove_driver(dev);
+	if (ret)
+		return ret;
+
+	TAILQ_REMOVE(&vdev_device_list, dev, next);
+
+	TAILQ_REMOVE(&devargs_list, devargs, next);
+
+	free(devargs->args);
+	free(devargs);
+	free(dev);
+	return 0;
+}
+
+static int
+vdev_scan(void)
+{
+	struct rte_vdev_device *dev;
+	struct rte_devargs *devargs;
+
+	/* for virtual devices we scan the devargs_list populated via cmdline */
+	TAILQ_FOREACH(devargs, &devargs_list, next) {
+
+		if (devargs->bus != &rte_vdev_bus)
+			continue;
+
+		dev = find_vdev(devargs->name);
+		if (dev)
+			continue;
+
+		dev = calloc(1, sizeof(*dev));
+		if (!dev)
+			return -1;
+
+		dev->device.devargs = devargs;
+		dev->device.numa_node = SOCKET_ID_ANY;
+		dev->device.name = devargs->name;
+
+		TAILQ_INSERT_TAIL(&vdev_device_list, dev, next);
+	}
+
+	return 0;
+}
+
+static int
+vdev_probe(void)
+{
+	struct rte_vdev_device *dev;
+
+	/* call the init function for each virtual device */
+	TAILQ_FOREACH(dev, &vdev_device_list, next) {
+
+		if (dev->device.driver)
+			continue;
+
+		if (vdev_probe_all_drivers(dev)) {
+			RTE_LOG(ERR, EAL, "failed to initialize %s device\n",
+				rte_vdev_device_name(dev));
+			return -1;
+		}
+	}
+
+	return 0;
+}
+
+static struct rte_device *
+vdev_find_device(const struct rte_device *start, rte_dev_cmp_t cmp,
+		 const void *data)
+{
+	struct rte_vdev_device *dev;
+
+	TAILQ_FOREACH(dev, &vdev_device_list, next) {
+		if (start && &dev->device == start) {
+			start = NULL;
+			continue;
+		}
+		if (cmp(&dev->device, data) == 0)
+			return &dev->device;
+	}
+	return NULL;
+}
+
+static int
+vdev_plug(struct rte_device *dev)
+{
+	return vdev_probe_all_drivers(RTE_DEV_TO_VDEV(dev));
+}
+
+static int
+vdev_unplug(struct rte_device *dev)
+{
+	return rte_vdev_uninit(dev->name);
+}
+
+static struct rte_bus rte_vdev_bus = {
+	.scan = vdev_scan,
+	.probe = vdev_probe,
+	.find_device = vdev_find_device,
+	.plug = vdev_plug,
+	.unplug = vdev_unplug,
+	.parse = vdev_parse,
+};
+
+RTE_REGISTER_BUS(vdev, rte_vdev_bus);
diff --git a/drivers/crypto/aesni_gcm/Makefile b/drivers/crypto/aesni_gcm/Makefile
index 44979a4..ddfec4c 100644
--- a/drivers/crypto/aesni_gcm/Makefile
+++ b/drivers/crypto/aesni_gcm/Makefile
@@ -55,6 +55,7 @@ CFLAGS += -I$(AESNI_MULTI_BUFFER_LIB_PATH)/include
 LDLIBS += -L$(AESNI_MULTI_BUFFER_LIB_PATH) -lIPSec_MB
 LDLIBS += -lrte_eal -lrte_mbuf -lrte_mempool -lrte_ring
 LDLIBS += -lrte_cryptodev
+LDLIBS += -lrte_bus_vdev
 
 # library source files
 SRCS-$(CONFIG_RTE_LIBRTE_PMD_AESNI_GCM) += aesni_gcm_pmd.c
diff --git a/drivers/crypto/aesni_gcm/aesni_gcm_pmd.c b/drivers/crypto/aesni_gcm/aesni_gcm_pmd.c
index 444cfa2..08dcacc 100644
--- a/drivers/crypto/aesni_gcm/aesni_gcm_pmd.c
+++ b/drivers/crypto/aesni_gcm/aesni_gcm_pmd.c
@@ -34,7 +34,7 @@
 #include <rte_hexdump.h>
 #include <rte_cryptodev.h>
 #include <rte_cryptodev_pmd.h>
-#include <rte_vdev.h>
+#include <rte_bus_vdev.h>
 #include <rte_malloc.h>
 #include <rte_cpuflags.h>
 #include <rte_byteorder.h>
diff --git a/drivers/crypto/aesni_mb/Makefile b/drivers/crypto/aesni_mb/Makefile
index 7c7e970..a49f06f 100644
--- a/drivers/crypto/aesni_mb/Makefile
+++ b/drivers/crypto/aesni_mb/Makefile
@@ -55,6 +55,7 @@ CFLAGS += -I$(AESNI_MULTI_BUFFER_LIB_PATH)/include
 LDLIBS += -L$(AESNI_MULTI_BUFFER_LIB_PATH) -lIPSec_MB
 LDLIBS += -lrte_eal -lrte_mbuf -lrte_mempool -lrte_ring
 LDLIBS += -lrte_cryptodev
+LDLIBS += -lrte_bus_vdev
 
 # library source files
 SRCS-$(CONFIG_RTE_LIBRTE_PMD_AESNI_MB) += rte_aesni_mb_pmd.c
diff --git a/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c b/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c
index a589557..7004389 100644
--- a/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c
+++ b/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c
@@ -36,7 +36,7 @@
 #include <rte_hexdump.h>
 #include <rte_cryptodev.h>
 #include <rte_cryptodev_pmd.h>
-#include <rte_vdev.h>
+#include <rte_bus_vdev.h>
 #include <rte_malloc.h>
 #include <rte_cpuflags.h>
 
diff --git a/drivers/crypto/armv8/Makefile b/drivers/crypto/armv8/Makefile
index 8bf60e2..79c260f 100644
--- a/drivers/crypto/armv8/Makefile
+++ b/drivers/crypto/armv8/Makefile
@@ -59,6 +59,7 @@ CFLAGS += -I$(ARMV8_CRYPTO_LIB_PATH)/asm/include
 LDLIBS += -L$(ARMV8_CRYPTO_LIB_PATH) -larmv8_crypto
 LDLIBS += -lrte_eal -lrte_mbuf -lrte_mempool -lrte_ring
 LDLIBS += -lrte_cryptodev
+LDLIBS += -lrte_bus_vdev
 
 # library source files
 SRCS-$(CONFIG_RTE_LIBRTE_PMD_ARMV8_CRYPTO) += rte_armv8_pmd.c
diff --git a/drivers/crypto/armv8/rte_armv8_pmd.c b/drivers/crypto/armv8/rte_armv8_pmd.c
index 2d2f3ff..97719f2 100644
--- a/drivers/crypto/armv8/rte_armv8_pmd.c
+++ b/drivers/crypto/armv8/rte_armv8_pmd.c
@@ -36,7 +36,7 @@
 #include <rte_hexdump.h>
 #include <rte_cryptodev.h>
 #include <rte_cryptodev_pmd.h>
-#include <rte_vdev.h>
+#include <rte_bus_vdev.h>
 #include <rte_malloc.h>
 #include <rte_cpuflags.h>
 
diff --git a/drivers/crypto/kasumi/Makefile b/drivers/crypto/kasumi/Makefile
index b9daf45..cf56b7a 100644
--- a/drivers/crypto/kasumi/Makefile
+++ b/drivers/crypto/kasumi/Makefile
@@ -56,6 +56,7 @@ CFLAGS += -I$(LIBSSO_KASUMI_PATH)/build
 LDLIBS += -L$(LIBSSO_KASUMI_PATH)/build -lsso_kasumi
 LDLIBS += -lrte_eal -lrte_mbuf -lrte_mempool -lrte_ring
 LDLIBS += -lrte_cryptodev
+LDLIBS += -lrte_bus_vdev
 
 # library source files
 SRCS-$(CONFIG_RTE_LIBRTE_PMD_KASUMI) += rte_kasumi_pmd.c
diff --git a/drivers/crypto/kasumi/rte_kasumi_pmd.c b/drivers/crypto/kasumi/rte_kasumi_pmd.c
index b677e54..f5db5e3 100644
--- a/drivers/crypto/kasumi/rte_kasumi_pmd.c
+++ b/drivers/crypto/kasumi/rte_kasumi_pmd.c
@@ -34,7 +34,7 @@
 #include <rte_hexdump.h>
 #include <rte_cryptodev.h>
 #include <rte_cryptodev_pmd.h>
-#include <rte_vdev.h>
+#include <rte_bus_vdev.h>
 #include <rte_malloc.h>
 #include <rte_cpuflags.h>
 
diff --git a/drivers/crypto/mrvl/Makefile b/drivers/crypto/mrvl/Makefile
index abf4035..3532f7c 100644
--- a/drivers/crypto/mrvl/Makefile
+++ b/drivers/crypto/mrvl/Makefile
@@ -57,6 +57,7 @@ EXPORT_MAP := rte_mrvl_pmd_version.map
 
 # external library dependencies
 LDLIBS += -L$(LIBMUSDK_PATH)/lib -lmusdk
+LDLIBS += -lrte_bus_vdev
 
 # library source files
 SRCS-$(CONFIG_RTE_LIBRTE_PMD_MRVL_CRYPTO) += rte_mrvl_pmd.c
diff --git a/drivers/crypto/mrvl/rte_mrvl_pmd.c b/drivers/crypto/mrvl/rte_mrvl_pmd.c
index f778a80..31f3fe5 100644
--- a/drivers/crypto/mrvl/rte_mrvl_pmd.c
+++ b/drivers/crypto/mrvl/rte_mrvl_pmd.c
@@ -36,7 +36,7 @@
 #include <rte_hexdump.h>
 #include <rte_cryptodev.h>
 #include <rte_cryptodev_pmd.h>
-#include <rte_vdev.h>
+#include <rte_bus_vdev.h>
 #include <rte_malloc.h>
 #include <rte_cpuflags.h>
 
diff --git a/drivers/crypto/null/Makefile b/drivers/crypto/null/Makefile
index b368161..49ada09 100644
--- a/drivers/crypto/null/Makefile
+++ b/drivers/crypto/null/Makefile
@@ -39,6 +39,7 @@ CFLAGS += -O3
 CFLAGS += $(WERROR_FLAGS)
 LDLIBS += -lrte_eal -lrte_mbuf -lrte_mempool -lrte_ring
 LDLIBS += -lrte_cryptodev
+LDLIBS += -lrte_bus_vdev
 
 # library version
 LIBABIVER := 1
diff --git a/drivers/crypto/null/null_crypto_pmd.c b/drivers/crypto/null/null_crypto_pmd.c
index 3f2a90d..f031d3b 100644
--- a/drivers/crypto/null/null_crypto_pmd.c
+++ b/drivers/crypto/null/null_crypto_pmd.c
@@ -32,7 +32,7 @@
 
 #include <rte_common.h>
 #include <rte_cryptodev_pmd.h>
-#include <rte_vdev.h>
+#include <rte_bus_vdev.h>
 #include <rte_malloc.h>
 
 #include "null_crypto_pmd_private.h"
diff --git a/drivers/crypto/openssl/Makefile b/drivers/crypto/openssl/Makefile
index 85e5d87..1a00643 100644
--- a/drivers/crypto/openssl/Makefile
+++ b/drivers/crypto/openssl/Makefile
@@ -47,6 +47,7 @@ EXPORT_MAP := rte_pmd_openssl_version.map
 LDLIBS += -lcrypto
 LDLIBS += -lrte_eal -lrte_mbuf -lrte_mempool -lrte_ring
 LDLIBS += -lrte_cryptodev
+LDLIBS += -lrte_bus_vdev
 
 # library source files
 SRCS-$(CONFIG_RTE_LIBRTE_PMD_OPENSSL) += rte_openssl_pmd.c
diff --git a/drivers/crypto/openssl/rte_openssl_pmd.c b/drivers/crypto/openssl/rte_openssl_pmd.c
index 25c1154..06e1a6d 100644
--- a/drivers/crypto/openssl/rte_openssl_pmd.c
+++ b/drivers/crypto/openssl/rte_openssl_pmd.c
@@ -34,7 +34,7 @@
 #include <rte_hexdump.h>
 #include <rte_cryptodev.h>
 #include <rte_cryptodev_pmd.h>
-#include <rte_vdev.h>
+#include <rte_bus_vdev.h>
 #include <rte_malloc.h>
 #include <rte_cpuflags.h>
 
diff --git a/drivers/crypto/scheduler/Makefile b/drivers/crypto/scheduler/Makefile
index b1a468e..123b0f6 100644
--- a/drivers/crypto/scheduler/Makefile
+++ b/drivers/crypto/scheduler/Makefile
@@ -38,6 +38,7 @@ CFLAGS += -O3
 CFLAGS += $(WERROR_FLAGS)
 LDLIBS += -lrte_eal -lrte_mbuf -lrte_mempool -lrte_ring
 LDLIBS += -lrte_cryptodev -lrte_kvargs -lrte_reorder
+LDLIBS += -lrte_bus_vdev
 
 # library version
 LIBABIVER := 1
diff --git a/drivers/crypto/scheduler/scheduler_pmd.c b/drivers/crypto/scheduler/scheduler_pmd.c
index 40ab304..acdf636 100644
--- a/drivers/crypto/scheduler/scheduler_pmd.c
+++ b/drivers/crypto/scheduler/scheduler_pmd.c
@@ -33,7 +33,7 @@
 #include <rte_hexdump.h>
 #include <rte_cryptodev.h>
 #include <rte_cryptodev_pmd.h>
-#include <rte_vdev.h>
+#include <rte_bus_vdev.h>
 #include <rte_malloc.h>
 #include <rte_cpuflags.h>
 #include <rte_reorder.h>
diff --git a/drivers/crypto/snow3g/Makefile b/drivers/crypto/snow3g/Makefile
index 1fb0571..183c6ce 100644
--- a/drivers/crypto/snow3g/Makefile
+++ b/drivers/crypto/snow3g/Makefile
@@ -56,6 +56,7 @@ CFLAGS += -I$(LIBSSO_SNOW3G_PATH)/build
 LDLIBS += -L$(LIBSSO_SNOW3G_PATH)/build -lsso_snow3g
 LDLIBS += -lrte_eal -lrte_mbuf -lrte_mempool -lrte_ring
 LDLIBS += -lrte_cryptodev
+LDLIBS += -lrte_bus_vdev
 
 # library source files
 SRCS-$(CONFIG_RTE_LIBRTE_PMD_SNOW3G) += rte_snow3g_pmd.c
diff --git a/drivers/crypto/snow3g/rte_snow3g_pmd.c b/drivers/crypto/snow3g/rte_snow3g_pmd.c
index 094ddc4..4cc9a94 100644
--- a/drivers/crypto/snow3g/rte_snow3g_pmd.c
+++ b/drivers/crypto/snow3g/rte_snow3g_pmd.c
@@ -34,7 +34,7 @@
 #include <rte_hexdump.h>
 #include <rte_cryptodev.h>
 #include <rte_cryptodev_pmd.h>
-#include <rte_vdev.h>
+#include <rte_bus_vdev.h>
 #include <rte_malloc.h>
 #include <rte_cpuflags.h>
 
diff --git a/drivers/crypto/zuc/Makefile b/drivers/crypto/zuc/Makefile
index 9d03cf0..af77bc8 100644
--- a/drivers/crypto/zuc/Makefile
+++ b/drivers/crypto/zuc/Makefile
@@ -56,6 +56,7 @@ CFLAGS += -I$(LIBSSO_ZUC_PATH)/build
 LDLIBS += -L$(LIBSSO_ZUC_PATH)/build -lsso_zuc
 LDLIBS += -lrte_eal -lrte_mbuf -lrte_mempool -lrte_ring
 LDLIBS += -lrte_cryptodev
+LDLIBS += -lrte_bus_vdev
 
 # library source files
 SRCS-$(CONFIG_RTE_LIBRTE_PMD_ZUC) += rte_zuc_pmd.c
diff --git a/drivers/crypto/zuc/rte_zuc_pmd.c b/drivers/crypto/zuc/rte_zuc_pmd.c
index 5c1f71f..590224b 100644
--- a/drivers/crypto/zuc/rte_zuc_pmd.c
+++ b/drivers/crypto/zuc/rte_zuc_pmd.c
@@ -34,7 +34,7 @@
 #include <rte_hexdump.h>
 #include <rte_cryptodev.h>
 #include <rte_cryptodev_pmd.h>
-#include <rte_vdev.h>
+#include <rte_bus_vdev.h>
 #include <rte_malloc.h>
 #include <rte_cpuflags.h>
 
diff --git a/drivers/event/dpaa2/Makefile b/drivers/event/dpaa2/Makefile
index d268e33..f34eebf 100644
--- a/drivers/event/dpaa2/Makefile
+++ b/drivers/event/dpaa2/Makefile
@@ -46,6 +46,7 @@ CFLAGS += -I$(RTE_SDK)/drivers/mempool/dpaa2
 CFLAGS += -I$(RTE_SDK)/drivers/event/dpaa2
 CFLAGS += -I$(RTE_SDK)/lib/librte_eal/linuxapp/eal
 LDLIBS += -lrte_eal -lrte_eventdev -lrte_bus_fslmc -lrte_pmd_dpaa2
+LDLIBS += -lrte_bus_vdev
 CFLAGS += -I$(RTE_SDK)/drivers/net/dpaa2
 CFLAGS += -I$(RTE_SDK)/drivers/net/dpaa2/mc
 
diff --git a/drivers/event/dpaa2/dpaa2_eventdev.c b/drivers/event/dpaa2/dpaa2_eventdev.c
index a23c734..eeeb231 100644
--- a/drivers/event/dpaa2/dpaa2_eventdev.c
+++ b/drivers/event/dpaa2/dpaa2_eventdev.c
@@ -51,7 +51,7 @@
 #include <rte_memcpy.h>
 #include <rte_memory.h>
 #include <rte_pci.h>
-#include <rte_vdev.h>
+#include <rte_bus_vdev.h>
 #include <rte_ethdev.h>
 #include <rte_event_eth_rx_adapter.h>
 
diff --git a/drivers/event/octeontx/Makefile b/drivers/event/octeontx/Makefile
index ae901a3..fdf1b73 100644
--- a/drivers/event/octeontx/Makefile
+++ b/drivers/event/octeontx/Makefile
@@ -43,6 +43,7 @@ CFLAGS += -I$(RTE_SDK)/drivers/net/octeontx/
 
 LDLIBS += -lrte_eal -lrte_eventdev -lrte_mempool_octeontx
 LDLIBS += -lrte_bus_pci
+LDLIBS += -lrte_bus_vdev
 
 EXPORT_MAP := rte_pmd_octeontx_ssovf_version.map
 
diff --git a/drivers/event/octeontx/ssovf_evdev.c b/drivers/event/octeontx/ssovf_evdev.c
index ca866ea..117b145 100644
--- a/drivers/event/octeontx/ssovf_evdev.c
+++ b/drivers/event/octeontx/ssovf_evdev.c
@@ -42,7 +42,7 @@
 #include <rte_log.h>
 #include <rte_malloc.h>
 #include <rte_memory.h>
-#include <rte_vdev.h>
+#include <rte_bus_vdev.h>
 
 #include "ssovf_evdev.h"
 
diff --git a/drivers/event/skeleton/Makefile b/drivers/event/skeleton/Makefile
index 65e1641..a24738b 100644
--- a/drivers/event/skeleton/Makefile
+++ b/drivers/event/skeleton/Makefile
@@ -40,6 +40,7 @@ LIB = librte_pmd_skeleton_event.a
 CFLAGS += $(WERROR_FLAGS)
 LDLIBS += -lrte_eal -lrte_eventdev
 LDLIBS += -lrte_pci -lrte_bus_pci
+LDLIBS += -lrte_bus_vdev
 
 EXPORT_MAP := rte_pmd_skeleton_event_version.map
 
diff --git a/drivers/event/skeleton/skeleton_eventdev.c b/drivers/event/skeleton/skeleton_eventdev.c
index a014dcf..bb554c3 100644
--- a/drivers/event/skeleton/skeleton_eventdev.c
+++ b/drivers/event/skeleton/skeleton_eventdev.c
@@ -46,7 +46,7 @@
 #include <rte_malloc.h>
 #include <rte_memory.h>
 #include <rte_lcore.h>
-#include <rte_vdev.h>
+#include <rte_bus_vdev.h>
 
 #include "skeleton_eventdev.h"
 
diff --git a/drivers/event/sw/Makefile b/drivers/event/sw/Makefile
index 61a108c..2f2b67b 100644
--- a/drivers/event/sw/Makefile
+++ b/drivers/event/sw/Makefile
@@ -44,6 +44,7 @@ CFLAGS += -Wno-missing-field-initializers
 endif
 endif
 LDLIBS += -lrte_eal -lrte_eventdev -lrte_kvargs -lrte_ring
+LDLIBS += -lrte_bus_vdev
 
 # library version
 LIBABIVER := 1
diff --git a/drivers/event/sw/sw_evdev.c b/drivers/event/sw/sw_evdev.c
index 1ba0fb6..fd11079 100644
--- a/drivers/event/sw/sw_evdev.c
+++ b/drivers/event/sw/sw_evdev.c
@@ -33,7 +33,7 @@
 #include <inttypes.h>
 #include <string.h>
 
-#include <rte_vdev.h>
+#include <rte_bus_vdev.h>
 #include <rte_kvargs.h>
 #include <rte_ring.h>
 #include <rte_errno.h>
diff --git a/drivers/net/af_packet/Makefile b/drivers/net/af_packet/Makefile
index b97c2a6..bb37d67 100644
--- a/drivers/net/af_packet/Makefile
+++ b/drivers/net/af_packet/Makefile
@@ -46,6 +46,7 @@ CFLAGS += -O3
 CFLAGS += $(WERROR_FLAGS)
 LDLIBS += -lrte_eal -lrte_mbuf -lrte_mempool -lrte_ring
 LDLIBS += -lrte_ethdev -lrte_net -lrte_kvargs
+LDLIBS += -lrte_bus_vdev
 
 #
 # all source are stored in SRCS-y
diff --git a/drivers/net/af_packet/rte_eth_af_packet.c b/drivers/net/af_packet/rte_eth_af_packet.c
index 28e6a94..fa84eb9 100644
--- a/drivers/net/af_packet/rte_eth_af_packet.c
+++ b/drivers/net/af_packet/rte_eth_af_packet.c
@@ -41,7 +41,7 @@
 #include <rte_ethdev_vdev.h>
 #include <rte_malloc.h>
 #include <rte_kvargs.h>
-#include <rte_vdev.h>
+#include <rte_bus_vdev.h>
 
 #include <linux/if_ether.h>
 #include <linux/if_packet.h>
diff --git a/drivers/net/bonding/Makefile b/drivers/net/bonding/Makefile
index b86b240..dea1bd5 100644
--- a/drivers/net/bonding/Makefile
+++ b/drivers/net/bonding/Makefile
@@ -41,6 +41,7 @@ CFLAGS += $(WERROR_FLAGS)
 LDLIBS += -lrte_eal -lrte_mbuf -lrte_mempool -lrte_ring
 LDLIBS += -lrte_ethdev -lrte_net -lrte_kvargs -lrte_cmdline
 LDLIBS += -lrte_pci -lrte_bus_pci
+LDLIBS += -lrte_bus_vdev
 
 EXPORT_MAP := rte_pmd_bond_version.map
 
diff --git a/drivers/net/bonding/rte_eth_bond_api.c b/drivers/net/bonding/rte_eth_bond_api.c
index 8c602f8..980e636 100644
--- a/drivers/net/bonding/rte_eth_bond_api.c
+++ b/drivers/net/bonding/rte_eth_bond_api.c
@@ -37,7 +37,7 @@
 #include <rte_malloc.h>
 #include <rte_ethdev.h>
 #include <rte_tcp.h>
-#include <rte_vdev.h>
+#include <rte_bus_vdev.h>
 #include <rte_kvargs.h>
 
 #include "rte_eth_bond.h"
diff --git a/drivers/net/bonding/rte_eth_bond_pmd.c b/drivers/net/bonding/rte_eth_bond_pmd.c
index 53d8e98..fe23289 100644
--- a/drivers/net/bonding/rte_eth_bond_pmd.c
+++ b/drivers/net/bonding/rte_eth_bond_pmd.c
@@ -43,7 +43,7 @@
 #include <rte_ip_frag.h>
 #include <rte_devargs.h>
 #include <rte_kvargs.h>
-#include <rte_vdev.h>
+#include <rte_bus_vdev.h>
 #include <rte_alarm.h>
 #include <rte_cycles.h>
 
diff --git a/drivers/net/failsafe/Makefile b/drivers/net/failsafe/Makefile
index e533d54..ea2a8fe 100644
--- a/drivers/net/failsafe/Makefile
+++ b/drivers/net/failsafe/Makefile
@@ -60,5 +60,6 @@ CFLAGS += -Wno-strict-prototypes
 CFLAGS += -pedantic
 LDLIBS += -lrte_eal -lrte_mbuf -lrte_mempool -lrte_ring
 LDLIBS += -lrte_ethdev -lrte_net -lrte_kvargs
+LDLIBS += -lrte_bus_vdev
 
 include $(RTE_SDK)/mk/rte.lib.mk
diff --git a/drivers/net/failsafe/failsafe.c b/drivers/net/failsafe/failsafe.c
index 6006bef..6bc5aba 100644
--- a/drivers/net/failsafe/failsafe.c
+++ b/drivers/net/failsafe/failsafe.c
@@ -37,7 +37,7 @@
 #include <rte_ethdev_vdev.h>
 #include <rte_devargs.h>
 #include <rte_kvargs.h>
-#include <rte_vdev.h>
+#include <rte_bus_vdev.h>
 
 #include "failsafe_private.h"
 
diff --git a/drivers/net/kni/Makefile b/drivers/net/kni/Makefile
index 00d099f..a3f51f9 100644
--- a/drivers/net/kni/Makefile
+++ b/drivers/net/kni/Makefile
@@ -40,6 +40,7 @@ CFLAGS += $(WERROR_FLAGS)
 LDLIBS += -lpthread
 LDLIBS += -lrte_eal -lrte_mbuf -lrte_mempool -lrte_ring
 LDLIBS += -lrte_ethdev -lrte_net -lrte_kvargs -lrte_kni
+LDLIBS += -lrte_bus_vdev
 
 EXPORT_MAP := rte_pmd_kni_version.map
 
diff --git a/drivers/net/kni/rte_eth_kni.c b/drivers/net/kni/rte_eth_kni.c
index d68ff7a..36e90fd 100644
--- a/drivers/net/kni/rte_eth_kni.c
+++ b/drivers/net/kni/rte_eth_kni.c
@@ -40,7 +40,7 @@
 #include <rte_kni.h>
 #include <rte_kvargs.h>
 #include <rte_malloc.h>
-#include <rte_vdev.h>
+#include <rte_bus_vdev.h>
 
 /* Only single queue supported */
 #define KNI_MAX_QUEUE_PER_PORT 1
diff --git a/drivers/net/mrvl/Makefile b/drivers/net/mrvl/Makefile
index a313055..815c3ba 100644
--- a/drivers/net/mrvl/Makefile
+++ b/drivers/net/mrvl/Makefile
@@ -59,6 +59,7 @@ LDLIBS += -L$(LIBMUSDK_PATH)/lib
 LDLIBS += -lmusdk
 LDLIBS += -lrte_eal -lrte_mbuf -lrte_mempool -lrte_ring
 LDLIBS += -lrte_ethdev -lrte_net -lrte_kvargs -lrte_cfgfile
+LDLIBS += -lrte_bus_vdev
 
 # library source files
 SRCS-$(CONFIG_RTE_LIBRTE_MRVL_PMD) += mrvl_ethdev.c
diff --git a/drivers/net/mrvl/mrvl_ethdev.c b/drivers/net/mrvl/mrvl_ethdev.c
index a897ba0..2936165 100644
--- a/drivers/net/mrvl/mrvl_ethdev.c
+++ b/drivers/net/mrvl/mrvl_ethdev.c
@@ -36,7 +36,7 @@
 #include <rte_kvargs.h>
 #include <rte_log.h>
 #include <rte_malloc.h>
-#include <rte_vdev.h>
+#include <rte_bus_vdev.h>
 
 /* Unluckily, container_of is defined by both DPDK and MUSDK,
  * we'll declare only one version.
diff --git a/drivers/net/null/Makefile b/drivers/net/null/Makefile
index c2404f4..9331cca 100644
--- a/drivers/net/null/Makefile
+++ b/drivers/net/null/Makefile
@@ -40,6 +40,7 @@ CFLAGS += -O3
 CFLAGS += $(WERROR_FLAGS)
 LDLIBS += -lrte_eal -lrte_mbuf -lrte_mempool -lrte_ring
 LDLIBS += -lrte_ethdev -lrte_net -lrte_kvargs
+LDLIBS += -lrte_bus_vdev
 
 EXPORT_MAP := rte_pmd_null_version.map
 
diff --git a/drivers/net/null/rte_eth_null.c b/drivers/net/null/rte_eth_null.c
index 3433c9c..032c30e 100644
--- a/drivers/net/null/rte_eth_null.c
+++ b/drivers/net/null/rte_eth_null.c
@@ -36,7 +36,7 @@
 #include <rte_ethdev_vdev.h>
 #include <rte_malloc.h>
 #include <rte_memcpy.h>
-#include <rte_vdev.h>
+#include <rte_bus_vdev.h>
 #include <rte_kvargs.h>
 #include <rte_spinlock.h>
 
diff --git a/drivers/net/octeontx/Makefile b/drivers/net/octeontx/Makefile
index 078fcd4..9c27fdf 100644
--- a/drivers/net/octeontx/Makefile
+++ b/drivers/net/octeontx/Makefile
@@ -74,5 +74,6 @@ LDLIBS += -lrte_ethdev -lrte_net -lrte_kvargs
 LDLIBS += -lrte_mempool_octeontx
 LDLIBS += -lrte_eventdev
 LDLIBS += -lrte_bus_pci
+LDLIBS += -lrte_bus_vdev
 
 include $(RTE_SDK)/mk/rte.lib.mk
diff --git a/drivers/net/octeontx/octeontx_ethdev.c b/drivers/net/octeontx/octeontx_ethdev.c
index 86de5d1..bd24ec3 100644
--- a/drivers/net/octeontx/octeontx_ethdev.c
+++ b/drivers/net/octeontx/octeontx_ethdev.c
@@ -44,7 +44,7 @@
 #include <rte_kvargs.h>
 #include <rte_malloc.h>
 #include <rte_prefetch.h>
-#include <rte_vdev.h>
+#include <rte_bus_vdev.h>
 
 #include "octeontx_ethdev.h"
 #include "octeontx_rxtx.h"
diff --git a/drivers/net/pcap/Makefile b/drivers/net/pcap/Makefile
index 9ea9670..b6487d4 100644
--- a/drivers/net/pcap/Makefile
+++ b/drivers/net/pcap/Makefile
@@ -42,6 +42,7 @@ CFLAGS += $(WERROR_FLAGS)
 LDLIBS += -lpcap
 LDLIBS += -lrte_eal -lrte_mbuf -lrte_mempool -lrte_ring
 LDLIBS += -lrte_ethdev -lrte_net -lrte_kvargs
+LDLIBS += -lrte_bus_vdev
 
 EXPORT_MAP := rte_pmd_pcap_version.map
 
diff --git a/drivers/net/pcap/rte_eth_pcap.c b/drivers/net/pcap/rte_eth_pcap.c
index 3205df8..f683d3a 100644
--- a/drivers/net/pcap/rte_eth_pcap.c
+++ b/drivers/net/pcap/rte_eth_pcap.c
@@ -44,7 +44,7 @@
 #include <rte_kvargs.h>
 #include <rte_malloc.h>
 #include <rte_mbuf.h>
-#include <rte_vdev.h>
+#include <rte_bus_vdev.h>
 
 #define RTE_ETH_PCAP_SNAPSHOT_LEN 65535
 #define RTE_ETH_PCAP_SNAPLEN ETHER_MAX_JUMBO_FRAME_LEN
diff --git a/drivers/net/ring/Makefile b/drivers/net/ring/Makefile
index 9edd7d5..085ffa5 100644
--- a/drivers/net/ring/Makefile
+++ b/drivers/net/ring/Makefile
@@ -40,6 +40,7 @@ CFLAGS += -O3
 CFLAGS += $(WERROR_FLAGS)
 LDLIBS += -lrte_eal -lrte_mbuf -lrte_mempool -lrte_ring
 LDLIBS += -lrte_ethdev -lrte_net -lrte_kvargs
+LDLIBS += -lrte_bus_vdev
 
 EXPORT_MAP := rte_pmd_ring_version.map
 
diff --git a/drivers/net/ring/rte_eth_ring.c b/drivers/net/ring/rte_eth_ring.c
index 76355a1..a73c631 100644
--- a/drivers/net/ring/rte_eth_ring.c
+++ b/drivers/net/ring/rte_eth_ring.c
@@ -37,7 +37,7 @@
 #include <rte_malloc.h>
 #include <rte_memcpy.h>
 #include <rte_string_fns.h>
-#include <rte_vdev.h>
+#include <rte_bus_vdev.h>
 #include <rte_kvargs.h>
 #include <rte_errno.h>
 
diff --git a/drivers/net/softnic/Makefile b/drivers/net/softnic/Makefile
index 4b15f00..09ed62e 100644
--- a/drivers/net/softnic/Makefile
+++ b/drivers/net/softnic/Makefile
@@ -40,6 +40,7 @@ CFLAGS += -O3
 CFLAGS += $(WERROR_FLAGS)
 LDLIBS += -lrte_eal -lrte_mbuf -lrte_mempool -lrte_ring
 LDLIBS += -lrte_ethdev -lrte_net -lrte_kvargs -lrte_sched
+LDLIBS += -lrte_bus_vdev
 
 EXPORT_MAP := rte_pmd_eth_softnic_version.map
 
diff --git a/drivers/net/softnic/rte_eth_softnic.c b/drivers/net/softnic/rte_eth_softnic.c
index abb617a..3e47c2f 100644
--- a/drivers/net/softnic/rte_eth_softnic.c
+++ b/drivers/net/softnic/rte_eth_softnic.c
@@ -38,7 +38,7 @@
 #include <rte_ethdev.h>
 #include <rte_ethdev_vdev.h>
 #include <rte_malloc.h>
-#include <rte_vdev.h>
+#include <rte_bus_vdev.h>
 #include <rte_kvargs.h>
 #include <rte_errno.h>
 #include <rte_ring.h>
diff --git a/drivers/net/tap/Makefile b/drivers/net/tap/Makefile
index b5c5a35..405b49e 100644
--- a/drivers/net/tap/Makefile
+++ b/drivers/net/tap/Makefile
@@ -45,6 +45,7 @@ CFLAGS += -I.
 CFLAGS += $(WERROR_FLAGS)
 LDLIBS += -lrte_eal -lrte_mbuf -lrte_mempool -lrte_ring
 LDLIBS += -lrte_ethdev -lrte_net -lrte_kvargs -lrte_hash
+LDLIBS += -lrte_bus_vdev
 
 #
 # all source are stored in SRCS-y
diff --git a/drivers/net/tap/rte_eth_tap.c b/drivers/net/tap/rte_eth_tap.c
index 64dd3b0..6b27679 100644
--- a/drivers/net/tap/rte_eth_tap.c
+++ b/drivers/net/tap/rte_eth_tap.c
@@ -39,7 +39,7 @@
 #include <rte_ethdev.h>
 #include <rte_ethdev_vdev.h>
 #include <rte_malloc.h>
-#include <rte_vdev.h>
+#include <rte_bus_vdev.h>
 #include <rte_kvargs.h>
 #include <rte_net.h>
 #include <rte_debug.h>
diff --git a/drivers/net/vhost/Makefile b/drivers/net/vhost/Makefile
index 1085a52..c411745 100644
--- a/drivers/net/vhost/Makefile
+++ b/drivers/net/vhost/Makefile
@@ -39,6 +39,7 @@ LIB = librte_pmd_vhost.a
 LDLIBS += -lpthread
 LDLIBS += -lrte_eal -lrte_mbuf -lrte_mempool -lrte_ring
 LDLIBS += -lrte_ethdev -lrte_net -lrte_kvargs -lrte_vhost
+LDLIBS += -lrte_bus_vdev
 
 CFLAGS += -O3
 CFLAGS += $(WERROR_FLAGS)
diff --git a/drivers/net/vhost/rte_eth_vhost.c b/drivers/net/vhost/rte_eth_vhost.c
index f98c980..53f61f0 100644
--- a/drivers/net/vhost/rte_eth_vhost.c
+++ b/drivers/net/vhost/rte_eth_vhost.c
@@ -39,7 +39,7 @@
 #include <rte_ethdev_vdev.h>
 #include <rte_malloc.h>
 #include <rte_memcpy.h>
-#include <rte_vdev.h>
+#include <rte_bus_vdev.h>
 #include <rte_kvargs.h>
 #include <rte_vhost.h>
 #include <rte_spinlock.h>
diff --git a/drivers/net/virtio/Makefile b/drivers/net/virtio/Makefile
index 32e99da..f2b5d1c 100644
--- a/drivers/net/virtio/Makefile
+++ b/drivers/net/virtio/Makefile
@@ -41,6 +41,9 @@ CFLAGS += $(WERROR_FLAGS)
 LDLIBS += -lrte_eal -lrte_mbuf -lrte_mempool -lrte_ring
 LDLIBS += -lrte_ethdev -lrte_net -lrte_kvargs
 LDLIBS += -lrte_bus_pci
+ifeq ($(CONFIG_RTE_VIRTIO_USER),y)
+LDLIBS += -lrte_bus_vdev
+endif
 
 EXPORT_MAP := rte_pmd_virtio_version.map
 
diff --git a/drivers/net/virtio/virtio_user_ethdev.c b/drivers/net/virtio/virtio_user_ethdev.c
index 0cfa27b..7be57ce 100644
--- a/drivers/net/virtio/virtio_user_ethdev.c
+++ b/drivers/net/virtio/virtio_user_ethdev.c
@@ -40,7 +40,7 @@
 #include <rte_malloc.h>
 #include <rte_kvargs.h>
 #include <rte_ethdev_vdev.h>
-#include <rte_vdev.h>
+#include <rte_bus_vdev.h>
 #include <rte_alarm.h>
 
 #include "virtio_ethdev.h"
diff --git a/lib/librte_eal/bsdapp/eal/Makefile b/lib/librte_eal/bsdapp/eal/Makefile
index eb94f3e..afa117d 100644
--- a/lib/librte_eal/bsdapp/eal/Makefile
+++ b/lib/librte_eal/bsdapp/eal/Makefile
@@ -67,7 +67,6 @@ SRCS-$(CONFIG_RTE_EXEC_ENV_BSDAPP) += eal_common_timer.c
 SRCS-$(CONFIG_RTE_EXEC_ENV_BSDAPP) += eal_common_memzone.c
 SRCS-$(CONFIG_RTE_EXEC_ENV_BSDAPP) += eal_common_log.c
 SRCS-$(CONFIG_RTE_EXEC_ENV_BSDAPP) += eal_common_launch.c
-SRCS-$(CONFIG_RTE_EXEC_ENV_BSDAPP) += eal_common_vdev.c
 SRCS-$(CONFIG_RTE_EXEC_ENV_BSDAPP) += eal_common_memory.c
 SRCS-$(CONFIG_RTE_EXEC_ENV_BSDAPP) += eal_common_tailqs.c
 SRCS-$(CONFIG_RTE_EXEC_ENV_BSDAPP) += eal_common_errno.c
diff --git a/lib/librte_eal/common/Makefile b/lib/librte_eal/common/Makefile
index 16a2f26..9effd0d 100644
--- a/lib/librte_eal/common/Makefile
+++ b/lib/librte_eal/common/Makefile
@@ -39,7 +39,7 @@ INC += rte_per_lcore.h rte_random.h
 INC += rte_tailq.h rte_interrupts.h rte_alarm.h
 INC += rte_string_fns.h rte_version.h
 INC += rte_eal_memconfig.h rte_malloc_heap.h
-INC += rte_hexdump.h rte_devargs.h rte_bus.h rte_dev.h rte_vdev.h
+INC += rte_hexdump.h rte_devargs.h rte_bus.h rte_dev.h
 INC += rte_pci_dev_feature_defs.h rte_pci_dev_features.h
 INC += rte_malloc.h rte_keepalive.h rte_time.h
 INC += rte_service.h rte_service_component.h
diff --git a/lib/librte_eal/common/eal_common_vdev.c b/lib/librte_eal/common/eal_common_vdev.c
deleted file mode 100644
index f7e547a..0000000
--- a/lib/librte_eal/common/eal_common_vdev.c
+++ /dev/null
@@ -1,342 +0,0 @@
-/*-
- *   BSD LICENSE
- *
- *   Copyright(c) 2016 RehiveTech. All rights reserved.
- *
- *   Redistribution and use in source and binary forms, with or without
- *   modification, are permitted provided that the following conditions
- *   are met:
- *
- *     * Redistributions of source code must retain the above copyright
- *       notice, this list of conditions and the following disclaimer.
- *     * Redistributions in binary form must reproduce the above copyright
- *       notice, this list of conditions and the following disclaimer in
- *       the documentation and/or other materials provided with the
- *       distribution.
- *     * Neither the name of RehiveTech nor the names of its
- *       contributors may be used to endorse or promote products derived
- *       from this software without specific prior written permission.
- *
- *   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- *   "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- *   LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- *   A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- *   OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- *   LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- *   DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- *   THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- *   (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- *   OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include <string.h>
-#include <inttypes.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <stdint.h>
-#include <stdbool.h>
-#include <sys/queue.h>
-
-#include <rte_eal.h>
-#include <rte_dev.h>
-#include <rte_bus.h>
-#include <rte_vdev.h>
-#include <rte_common.h>
-#include <rte_devargs.h>
-#include <rte_memory.h>
-#include <rte_errno.h>
-
-/* Forward declare to access virtual bus name */
-static struct rte_bus rte_vdev_bus;
-
-/** Double linked list of virtual device drivers. */
-TAILQ_HEAD(vdev_device_list, rte_vdev_device);
-
-static struct vdev_device_list vdev_device_list =
-	TAILQ_HEAD_INITIALIZER(vdev_device_list);
-struct vdev_driver_list vdev_driver_list =
-	TAILQ_HEAD_INITIALIZER(vdev_driver_list);
-
-/* register a driver */
-void
-rte_vdev_register(struct rte_vdev_driver *driver)
-{
-	TAILQ_INSERT_TAIL(&vdev_driver_list, driver, next);
-}
-
-/* unregister a driver */
-void
-rte_vdev_unregister(struct rte_vdev_driver *driver)
-{
-	TAILQ_REMOVE(&vdev_driver_list, driver, next);
-}
-
-static int
-vdev_parse(const char *name, void *addr)
-{
-	struct rte_vdev_driver **out = addr;
-	struct rte_vdev_driver *driver = NULL;
-
-	TAILQ_FOREACH(driver, &vdev_driver_list, next) {
-		if (strncmp(driver->driver.name, name,
-			    strlen(driver->driver.name)) == 0)
-			break;
-		if (driver->driver.alias &&
-		    strncmp(driver->driver.alias, name,
-			    strlen(driver->driver.alias)) == 0)
-			break;
-	}
-	if (driver != NULL &&
-	    addr != NULL)
-		*out = driver;
-	return driver == NULL;
-}
-
-static int
-vdev_probe_all_drivers(struct rte_vdev_device *dev)
-{
-	const char *name;
-	struct rte_vdev_driver *driver;
-	int ret;
-
-	name = rte_vdev_device_name(dev);
-
-	RTE_LOG(DEBUG, EAL, "Search driver %s to probe device %s\n", name,
-		rte_vdev_device_name(dev));
-
-	if (vdev_parse(name, &driver))
-		return -1;
-	dev->device.driver = &driver->driver;
-	ret = driver->probe(dev);
-	if (ret)
-		dev->device.driver = NULL;
-	return ret;
-}
-
-static struct rte_vdev_device *
-find_vdev(const char *name)
-{
-	struct rte_vdev_device *dev;
-
-	if (!name)
-		return NULL;
-
-	TAILQ_FOREACH(dev, &vdev_device_list, next) {
-		const char *devname = rte_vdev_device_name(dev);
-		if (!strncmp(devname, name, strlen(name)))
-			return dev;
-	}
-
-	return NULL;
-}
-
-static struct rte_devargs *
-alloc_devargs(const char *name, const char *args)
-{
-	struct rte_devargs *devargs;
-	int ret;
-
-	devargs = calloc(1, sizeof(*devargs));
-	if (!devargs)
-		return NULL;
-
-	devargs->bus = &rte_vdev_bus;
-	if (args)
-		devargs->args = strdup(args);
-	else
-		devargs->args = strdup("");
-
-	ret = snprintf(devargs->name, sizeof(devargs->name), "%s", name);
-	if (ret < 0 || ret >= (int)sizeof(devargs->name)) {
-		free(devargs->args);
-		free(devargs);
-		return NULL;
-	}
-
-	return devargs;
-}
-
-int
-rte_vdev_init(const char *name, const char *args)
-{
-	struct rte_vdev_device *dev;
-	struct rte_devargs *devargs;
-	int ret;
-
-	if (name == NULL)
-		return -EINVAL;
-
-	dev = find_vdev(name);
-	if (dev)
-		return -EEXIST;
-
-	devargs = alloc_devargs(name, args);
-	if (!devargs)
-		return -ENOMEM;
-
-	dev = calloc(1, sizeof(*dev));
-	if (!dev) {
-		ret = -ENOMEM;
-		goto fail;
-	}
-
-	dev->device.devargs = devargs;
-	dev->device.numa_node = SOCKET_ID_ANY;
-	dev->device.name = devargs->name;
-
-	ret = vdev_probe_all_drivers(dev);
-	if (ret) {
-		if (ret > 0)
-			RTE_LOG(ERR, EAL, "no driver found for %s\n", name);
-		goto fail;
-	}
-
-	TAILQ_INSERT_TAIL(&devargs_list, devargs, next);
-
-	TAILQ_INSERT_TAIL(&vdev_device_list, dev, next);
-	return 0;
-
-fail:
-	free(devargs->args);
-	free(devargs);
-	free(dev);
-	return ret;
-}
-
-static int
-vdev_remove_driver(struct rte_vdev_device *dev)
-{
-	const char *name = rte_vdev_device_name(dev);
-	const struct rte_vdev_driver *driver;
-
-	if (!dev->device.driver) {
-		RTE_LOG(DEBUG, EAL, "no driver attach to device %s\n", name);
-		return 1;
-	}
-
-	driver = container_of(dev->device.driver, const struct rte_vdev_driver,
-		driver);
-	return driver->remove(dev);
-}
-
-int
-rte_vdev_uninit(const char *name)
-{
-	struct rte_vdev_device *dev;
-	struct rte_devargs *devargs;
-	int ret;
-
-	if (name == NULL)
-		return -EINVAL;
-
-	dev = find_vdev(name);
-	if (!dev)
-		return -ENOENT;
-
-	devargs = dev->device.devargs;
-
-	ret = vdev_remove_driver(dev);
-	if (ret)
-		return ret;
-
-	TAILQ_REMOVE(&vdev_device_list, dev, next);
-
-	TAILQ_REMOVE(&devargs_list, devargs, next);
-
-	free(devargs->args);
-	free(devargs);
-	free(dev);
-	return 0;
-}
-
-static int
-vdev_scan(void)
-{
-	struct rte_vdev_device *dev;
-	struct rte_devargs *devargs;
-
-	/* for virtual devices we scan the devargs_list populated via cmdline */
-	TAILQ_FOREACH(devargs, &devargs_list, next) {
-
-		if (devargs->bus != &rte_vdev_bus)
-			continue;
-
-		dev = find_vdev(devargs->name);
-		if (dev)
-			continue;
-
-		dev = calloc(1, sizeof(*dev));
-		if (!dev)
-			return -1;
-
-		dev->device.devargs = devargs;
-		dev->device.numa_node = SOCKET_ID_ANY;
-		dev->device.name = devargs->name;
-
-		TAILQ_INSERT_TAIL(&vdev_device_list, dev, next);
-	}
-
-	return 0;
-}
-
-static int
-vdev_probe(void)
-{
-	struct rte_vdev_device *dev;
-
-	/* call the init function for each virtual device */
-	TAILQ_FOREACH(dev, &vdev_device_list, next) {
-
-		if (dev->device.driver)
-			continue;
-
-		if (vdev_probe_all_drivers(dev)) {
-			RTE_LOG(ERR, EAL, "failed to initialize %s device\n",
-				rte_vdev_device_name(dev));
-			return -1;
-		}
-	}
-
-	return 0;
-}
-
-static struct rte_device *
-vdev_find_device(const struct rte_device *start, rte_dev_cmp_t cmp,
-		 const void *data)
-{
-	struct rte_vdev_device *dev;
-
-	TAILQ_FOREACH(dev, &vdev_device_list, next) {
-		if (start && &dev->device == start) {
-			start = NULL;
-			continue;
-		}
-		if (cmp(&dev->device, data) == 0)
-			return &dev->device;
-	}
-	return NULL;
-}
-
-static int
-vdev_plug(struct rte_device *dev)
-{
-	return vdev_probe_all_drivers(RTE_DEV_TO_VDEV(dev));
-}
-
-static int
-vdev_unplug(struct rte_device *dev)
-{
-	return rte_vdev_uninit(dev->name);
-}
-
-static struct rte_bus rte_vdev_bus = {
-	.scan = vdev_scan,
-	.probe = vdev_probe,
-	.find_device = vdev_find_device,
-	.plug = vdev_plug,
-	.unplug = vdev_unplug,
-	.parse = vdev_parse,
-};
-
-RTE_REGISTER_BUS(vdev, rte_vdev_bus);
diff --git a/lib/librte_eal/common/include/rte_dev.h b/lib/librte_eal/common/include/rte_dev.h
index c3f7246..9342e0c 100644
--- a/lib/librte_eal/common/include/rte_dev.h
+++ b/lib/librte_eal/common/include/rte_dev.h
@@ -169,28 +169,6 @@ struct rte_device {
 };
 
 /**
- * Initialize a driver specified by name.
- *
- * @param name
- *   The pointer to a driver name to be initialized.
- * @param args
- *   The pointer to arguments used by driver initialization.
- * @return
- *  0 on success, negative on error
- */
-int rte_vdev_init(const char *name, const char *args);
-
-/**
- * Uninitalize a driver specified by name.
- *
- * @param name
- *   The pointer to a driver name to be initialized.
- * @return
- *  0 on success, negative on error
- */
-int rte_vdev_uninit(const char *name);
-
-/**
  * Attach a device to a registered driver.
  *
  * @param name
@@ -315,4 +293,4 @@ __attribute__((used)) = str
 }
 #endif
 
-#endif /* _RTE_VDEV_H_ */
+#endif /* _RTE_DEV_H_ */
diff --git a/lib/librte_eal/common/include/rte_vdev.h b/lib/librte_eal/common/include/rte_vdev.h
deleted file mode 100644
index 29f5a52..0000000
--- a/lib/librte_eal/common/include/rte_vdev.h
+++ /dev/null
@@ -1,131 +0,0 @@
-/*-
- *   BSD LICENSE
- *
- *   Copyright(c) 2016 RehiveTech. All rights reserved.
- *
- *   Redistribution and use in source and binary forms, with or without
- *   modification, are permitted provided that the following conditions
- *   are met:
- *
- *     * Redistributions of source code must retain the above copyright
- *       notice, this list of conditions and the following disclaimer.
- *     * Redistributions in binary form must reproduce the above copyright
- *       notice, this list of conditions and the following disclaimer in
- *       the documentation and/or other materials provided with the
- *       distribution.
- *     * Neither the name of RehiveTech nor the names of its
- *       contributors may be used to endorse or promote products derived
- *       from this software without specific prior written permission.
- *
- *   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- *   "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- *   LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- *   A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- *   OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- *   LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- *   DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- *   THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- *   (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- *   OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef RTE_VDEV_H
-#define RTE_VDEV_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include <sys/queue.h>
-#include <rte_dev.h>
-#include <rte_devargs.h>
-
-struct rte_vdev_device {
-	TAILQ_ENTRY(rte_vdev_device) next;      /**< Next attached vdev */
-	struct rte_device device;               /**< Inherit core device */
-};
-
-/**
- * @internal
- * Helper macro for drivers that need to convert to struct rte_vdev_device.
- */
-#define RTE_DEV_TO_VDEV(ptr) \
-	container_of(ptr, struct rte_vdev_device, device)
-
-static inline const char *
-rte_vdev_device_name(const struct rte_vdev_device *dev)
-{
-	if (dev && dev->device.name)
-		return dev->device.name;
-	return NULL;
-}
-
-static inline const char *
-rte_vdev_device_args(const struct rte_vdev_device *dev)
-{
-	if (dev && dev->device.devargs)
-		return dev->device.devargs->args;
-	return "";
-}
-
-/** Double linked list of virtual device drivers. */
-TAILQ_HEAD(vdev_driver_list, rte_vdev_driver);
-
-/**
- * Probe function called for each virtual device driver once.
- */
-typedef int (rte_vdev_probe_t)(struct rte_vdev_device *dev);
-
-/**
- * Remove function called for each virtual device driver once.
- */
-typedef int (rte_vdev_remove_t)(struct rte_vdev_device *dev);
-
-/**
- * A virtual device driver abstraction.
- */
-struct rte_vdev_driver {
-	TAILQ_ENTRY(rte_vdev_driver) next; /**< Next in list. */
-	struct rte_driver driver;      /**< Inherited general driver. */
-	rte_vdev_probe_t *probe;       /**< Virtual device probe function. */
-	rte_vdev_remove_t *remove;     /**< Virtual device remove function. */
-};
-
-/**
- * Register a virtual device driver.
- *
- * @param driver
- *   A pointer to a rte_vdev_driver structure describing the driver
- *   to be registered.
- */
-void rte_vdev_register(struct rte_vdev_driver *driver);
-
-/**
- * Unregister a virtual device driver.
- *
- * @param driver
- *   A pointer to a rte_vdev_driver structure describing the driver
- *   to be unregistered.
- */
-void rte_vdev_unregister(struct rte_vdev_driver *driver);
-
-#define RTE_PMD_REGISTER_VDEV(nm, vdrv)\
-RTE_INIT(vdrvinitfn_ ##vdrv);\
-static const char *vdrvinit_ ## nm ## _alias;\
-static void vdrvinitfn_ ##vdrv(void)\
-{\
-	(vdrv).driver.name = RTE_STR(nm);\
-	(vdrv).driver.alias = vdrvinit_ ## nm ## _alias;\
-	rte_vdev_register(&vdrv);\
-} \
-RTE_PMD_EXPORT_NAME(nm, __COUNTER__)
-
-#define RTE_PMD_REGISTER_ALIAS(nm, alias)\
-static const char *vdrvinit_ ## nm ## _alias = RTE_STR(alias)
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
diff --git a/lib/librte_eal/linuxapp/eal/Makefile b/lib/librte_eal/linuxapp/eal/Makefile
index 919d371..5a7b8b2 100644
--- a/lib/librte_eal/linuxapp/eal/Makefile
+++ b/lib/librte_eal/linuxapp/eal/Makefile
@@ -74,7 +74,6 @@ SRCS-$(CONFIG_RTE_EXEC_ENV_LINUXAPP) += eal_common_timer.c
 SRCS-$(CONFIG_RTE_EXEC_ENV_LINUXAPP) += eal_common_memzone.c
 SRCS-$(CONFIG_RTE_EXEC_ENV_LINUXAPP) += eal_common_log.c
 SRCS-$(CONFIG_RTE_EXEC_ENV_LINUXAPP) += eal_common_launch.c
-SRCS-$(CONFIG_RTE_EXEC_ENV_LINUXAPP) += eal_common_vdev.c
 SRCS-$(CONFIG_RTE_EXEC_ENV_LINUXAPP) += eal_common_memory.c
 SRCS-$(CONFIG_RTE_EXEC_ENV_LINUXAPP) += eal_common_tailqs.c
 SRCS-$(CONFIG_RTE_EXEC_ENV_LINUXAPP) += eal_common_errno.c
diff --git a/lib/librte_eal/rte_eal_version.map b/lib/librte_eal/rte_eal_version.map
index 5521d01..f4f46c1 100644
--- a/lib/librte_eal/rte_eal_version.map
+++ b/lib/librte_eal/rte_eal_version.map
@@ -163,10 +163,6 @@ DPDK_17.05 {
 	rte_log_set_global_level;
 	rte_log_set_level;
 	rte_log_set_level_regexp;
-	rte_vdev_init;
-	rte_vdev_register;
-	rte_vdev_uninit;
-	rte_vdev_unregister;
 	vfio_get_container_fd;
 	vfio_get_group_fd;
 	vfio_get_group_no;
diff --git a/lib/librte_ether/rte_ethdev_vdev.h b/lib/librte_ether/rte_ethdev_vdev.h
index 4d2c3e2..ff92e6e 100644
--- a/lib/librte_ether/rte_ethdev_vdev.h
+++ b/lib/librte_ether/rte_ethdev_vdev.h
@@ -35,7 +35,7 @@
 #define _RTE_ETHDEV_VDEV_H_
 
 #include <rte_malloc.h>
-#include <rte_vdev.h>
+#include <rte_bus_vdev.h>
 #include <rte_ethdev.h>
 
 /**
diff --git a/lib/librte_eventdev/rte_eventdev_pmd_vdev.h b/lib/librte_eventdev/rte_eventdev_pmd_vdev.h
index 135e8b8..56232de 100644
--- a/lib/librte_eventdev/rte_eventdev_pmd_vdev.h
+++ b/lib/librte_eventdev/rte_eventdev_pmd_vdev.h
@@ -48,7 +48,7 @@ extern "C" {
 
 #include <rte_debug.h>
 #include <rte_eal.h>
-#include <rte_vdev.h>
+#include <rte_bus_vdev.h>
 
 #include "rte_eventdev_pmd.h"
 
diff --git a/mk/rte.app.mk b/mk/rte.app.mk
index 047121d..6a6a745 100644
--- a/mk/rte.app.mk
+++ b/mk/rte.app.mk
@@ -110,6 +110,7 @@ _LDLIBS-$(CONFIG_RTE_LIBRTE_KNI)            += -lrte_kni
 endif
 
 _LDLIBS-$(CONFIG_RTE_LIBRTE_PCI_BUS)        += -lrte_bus_pci
+_LDLIBS-$(CONFIG_RTE_LIBRTE_VDEV_BUS)       += -lrte_bus_vdev
 
 ifeq ($(CONFIG_RTE_BUILD_SHARED_LIB),n)
 # plugins (link only if static libraries)
diff --git a/test/test/test_cryptodev.c b/test/test/test_cryptodev.c
index 060b498..1bed65d 100644
--- a/test/test/test_cryptodev.c
+++ b/test/test/test_cryptodev.c
@@ -36,6 +36,7 @@
 #include <rte_malloc.h>
 #include <rte_memcpy.h>
 #include <rte_pause.h>
+#include <rte_bus_vdev.h>
 
 #include <rte_crypto.h>
 #include <rte_cryptodev.h>
diff --git a/test/test/test_event_eth_rx_adapter.c b/test/test/test_event_eth_rx_adapter.c
index 56ed1f8..90a5c64 100644
--- a/test/test/test_event_eth_rx_adapter.c
+++ b/test/test/test_event_eth_rx_adapter.c
@@ -35,6 +35,7 @@
 #include <rte_mbuf.h>
 #include <rte_ethdev.h>
 #include <rte_eventdev.h>
+#include <rte_bus_vdev.h>
 
 #include <rte_event_eth_rx_adapter.h>
 
diff --git a/test/test/test_eventdev.c b/test/test/test_eventdev.c
index 4118b75..ba39cba 100644
--- a/test/test/test_eventdev.c
+++ b/test/test/test_eventdev.c
@@ -37,6 +37,7 @@
 #include <rte_memcpy.h>
 #include <rte_eventdev.h>
 #include <rte_dev.h>
+#include <rte_bus_vdev.h>
 
 #include "test.h"
 
diff --git a/test/test/test_eventdev_octeontx.c b/test/test/test_eventdev_octeontx.c
index b88b0d2..dbc36d9 100644
--- a/test/test/test_eventdev_octeontx.c
+++ b/test/test/test_eventdev_octeontx.c
@@ -45,6 +45,7 @@
 #include <rte_lcore.h>
 #include <rte_per_lcore.h>
 #include <rte_random.h>
+#include <rte_bus_vdev.h>
 
 #include "test.h"
 
diff --git a/test/test/test_eventdev_sw.c b/test/test/test_eventdev_sw.c
index 01aa4d9..f524b6f 100644
--- a/test/test/test_eventdev_sw.c
+++ b/test/test/test_eventdev_sw.c
@@ -50,6 +50,7 @@
 #include <rte_pause.h>
 #include <rte_service.h>
 #include <rte_service_component.h>
+#include <rte_bus_vdev.h>
 
 #include "test.h"
 
diff --git a/test/test/test_link_bonding_rssconf.c b/test/test/test_link_bonding_rssconf.c
index 7dccc6e..54cbf12 100644
--- a/test/test/test_link_bonding_rssconf.c
+++ b/test/test/test_link_bonding_rssconf.c
@@ -48,6 +48,7 @@
 #include <rte_log.h>
 #include <rte_lcore.h>
 #include <rte_memory.h>
+#include <rte_bus_vdev.h>
 
 #include <rte_string_fns.h>
 #include <rte_errno.h>
-- 
2.7.4

^ permalink raw reply	[relevance 1%]

* Re: [dpdk-dev] [PATCH v5] devtools: rework abi checker script
  2017-10-05  7:53 27%     ` [dpdk-dev] [PATCH v5] " Olivier Matz
  2017-10-05 13:15  4%       ` Neil Horman
@ 2017-11-07 23:24  4%       ` Thomas Monjalon
  1 sibling, 0 replies; 200+ results
From: Thomas Monjalon @ 2017-11-07 23:24 UTC (permalink / raw)
  To: Olivier Matz; +Cc: dev, nhorman, bruce.richardson

05/10/2017 09:53, Olivier Matz:
> The initial version of the script had some limitations:
> - cannot work on a non-clean workspace
> - environment variables are not documented
> - no compilation log in case of failure
> - return success even it abi is incompatible
> 
> This patch addresses these issues and rework the code.
> 
> Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
> Acked-by: Neil Horman <nhorman@tuxdriver.com>

Applied, thanks

^ permalink raw reply	[relevance 4%]

* Re: [dpdk-dev] [PATCH v2] doc: update release notes for rte_security
  2017-11-07  6:44  8% ` [dpdk-dev] [PATCH v2] " Akhil Goyal
@ 2017-11-08  1:07  0%   ` Thomas Monjalon
  0 siblings, 0 replies; 200+ results
From: Thomas Monjalon @ 2017-11-08  1:07 UTC (permalink / raw)
  To: Akhil Goyal
  Cc: dev, declan.doherty, pablo.de.lara.guarch, hemant.agrawal,
	radu.nicolau, borisp, aviadye, jerin.jacob, john.mcnamara,
	konstantin.ananyev

07/11/2017 07:44, Akhil Goyal:
> Removed the deprication notice for ABI breakage and updated
> release notes for rte_security.
> 
> Signed-off-by: Akhil Goyal <akhil.goyal@nxp.com>

Applied, thanks

^ permalink raw reply	[relevance 0%]

* [dpdk-dev] [PATCH] doc: postpone devargs clean-up
@ 2017-11-08  9:53 16% Gaetan Rivet
  0 siblings, 0 replies; 200+ results
From: Gaetan Rivet @ 2017-11-08  9:53 UTC (permalink / raw)
  To: dev; +Cc: Gaetan Rivet

These changes were planned for 17.11 but were proposed too late.
Postpone those to v18.02 instead.

Signed-off-by: Gaetan Rivet <gaetan.rivet@6wind.com>
---

The related series:

[PATCH v2 00/18] devargs cleanup
http://dpdk.org/ml/archives/dev/2017-October/078761.html

 doc/guides/rel_notes/deprecation.rst | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst
index 7fcebf1..a89a394 100644
--- a/doc/guides/rel_notes/deprecation.rst
+++ b/doc/guides/rel_notes/deprecation.rst
@@ -8,14 +8,14 @@ API and ABI deprecation notices are to be posted here.
 Deprecation Notices
 -------------------
 
-* eal: several API and ABI changes are planned for ``rte_devargs`` in v17.11.
+* eal: several API and ABI changes are planned for ``rte_devargs`` in v18.02.
   The format of device command line parameters will change. The bus will need
   to be explicitly stated in the device declaration. The enum ``rte_devtype``
   was used to identify a bus and will disappear.
   The structure ``rte_devargs`` will change.
   The ``rte_devargs_list`` will be made private.
   The following functions are deprecated starting from 17.08 and will either be
-  modified or removed in 17.11:
+  modified or removed in 18.02:
 
   - ``rte_eal_devargs_add``
   - ``rte_eal_devargs_type_count``
-- 
2.1.4

^ permalink raw reply	[relevance 16%]

* Re: [dpdk-dev] [PATCH] doc: update ABI/API policy
  2017-11-06 11:28 28% [dpdk-dev] [PATCH] doc: update ABI/API policy Bruce Richardson
  2017-11-06 14:48  4% ` Mcnamara, John
  2017-11-07  6:05  4% ` Yuanhan Liu
@ 2017-11-08 19:09  4% ` Kevin Traynor
  2 siblings, 0 replies; 200+ results
From: Kevin Traynor @ 2017-11-08 19:09 UTC (permalink / raw)
  To: Bruce Richardson, john.mcnamara; +Cc: dev

On 11/06/2017 11:28 AM, Bruce Richardson wrote:
> Following agreement at the DPDK Technical Board meeting of 2017-10-13 [1],
> update the documentation with the ABI/API policy changes.
> 
> [1] http://dpdk.org/ml/archives/dev/2017-October/079961.html
> 
> Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>

Acked-by: Kevin Traynor <ktraynor@redhat.com>

^ permalink raw reply	[relevance 4%]

* [dpdk-dev] [RFC] cmdline: rework as a wrapper to libedit
@ 2017-11-09 13:43  1% Adrien Mazarguil
  2017-11-15  4:12  0% ` Wiles, Keith
  0 siblings, 1 reply; 200+ results
From: Adrien Mazarguil @ 2017-11-09 13:43 UTC (permalink / raw)
  To: Olivier Matz, Jingjing Wu; +Cc: dev, Thomas Monjalon, Ferruh Yigit

This patch removes all code associated with symbols not internally relied
on by other DPDK components, makes struct cmdline opaque and then proceeds
to re-implement the remaining functionality as a wrapper to the editline
library (also known as libedit) [1].

Besides adding a new external dependency to its users, its large impact on
librte_cmdline's API/ABI also warrants a major version number bump.

While librte_cmdline served DPDK well all these years as a small, easy to
use and self-sufficient interactive command-line handler, it started to
show its limits with testpmd's flow (rte_flow) command, which required
support for dynamic tokens and very long commands.

This is the main motivation behind this rework. Long commands often need to
be displayed on multiple lines, which are not properly supported by
librte_cmdline's limited terminal handling capabilities, resulting in a
rather frustrating user experience.

Testpmd being one of the main tools used by PMD developers and given flow
command lines won't get any shorter, this issue had to be addressed.

Three options were considered:

- Fixing and enhancing librte_cmdline.

  The amount of work necessary to add support for edition on multiple lines
  was deemed significant and the result would still have lacked in some
  areas, such as working backspace/delete keys in all terminals (i.e. full
  termcap support).

- Making testpmd directly rely on a more capable library.

  All testpmd commands rely on the cmdline_parse interface provided by
  librte_cmdline. This approach would have required either a complete
  rewrite or importing the missing bits from librte_cmdline to wrap them
  around the new library, which naturally led to...

- Converting librte_cmdline as a wrapper to a more capable library.

  Let's be honest, interactive command line handling isn't what makes DPDK
  shine. It's also far removed from its core functionality, but is still
  necessary in order to easily implement test and example programs; the
  cmdline_parse interface is particularly good at this.

  DPDK actually only relies on cmdline_parse. By removing all the other
  unused interfaces, implementing what remains on top of a different
  terminal-handling library would be quick and easy.

This last approach was chosen for the stated reasons. Libedit is
well-known, BSD-licensed, widely available [2], used by many projects, does
everything needed and more [3].

This rework results in the following changes:

- Removed circular buffer management interface for command history
  (cmdline_cirbuf.c), command history being handled by libedit.
- Removed raw command-line interpreter (cmdline_rdline.c).
- Removed raw terminal handler (cmdline_vt100.c).
- Removed all test/example code for the above.
- Re-implemented high level interactive and non-interactive command-line
  handlers (cmdline.c and cmdline_socket.c) on top of libedit using its
  native interface, not its readline compatibility layer.
- Made struct cmdline opaque so that applications relying on librte_cmdline
  do not need to include any libedit headers.
- The only visible change for most applications besides being linked to
  libedit is they do not have to include cmdline_rdline.h anymore.

As an added bonus, terminal resizing is now automatically handled.

In the future, cmdline_parse could use libedit's advanced tokenizer as
well to interpret quoted strings and escape sequences.

[1] http://thrysoee.dk/editline/
[2] It usually goes by the name "libedit" in Linux distributions.
[3] http://netbsd.gw.com/cgi-bin/man-cgi?editline++NetBSD-current

Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
---
 app/test-pmd/cmdline.c                          |    1 -
 examples/bond/main.c                            |    1 -
 examples/cmdline/commands.c                     |    1 -
 examples/cmdline/main.c                         |    1 -
 .../ip_pipeline/pipeline/pipeline_common_fe.c   |    1 -
 .../ip_pipeline/pipeline/pipeline_firewall.c    |    1 -
 .../pipeline/pipeline_flow_actions.c            |    1 -
 .../pipeline/pipeline_flow_classification.c     |    1 -
 examples/ip_pipeline/thread_fe.c                |    1 -
 examples/multi_process/simple_mp/main.c         |    1 -
 examples/multi_process/simple_mp/mp_commands.c  |    1 -
 examples/qos_sched/cmdline.c                    |    1 -
 examples/quota_watermark/qwctl/commands.c       |    1 -
 examples/quota_watermark/qwctl/qwctl.c          |    1 -
 .../guest_cli/vm_power_cli_guest.c              |    1 -
 examples/vm_power_manager/vm_power_cli.c        |    1 -
 lib/librte_cmdline/Makefile                     |   10 +-
 lib/librte_cmdline/cmdline.c                    |  385 +++--
 lib/librte_cmdline/cmdline.h                    |   22 +-
 lib/librte_cmdline/cmdline_cirbuf.c             |  466 ------
 lib/librte_cmdline/cmdline_cirbuf.h             |  245 ----
 lib/librte_cmdline/cmdline_parse.c              |    7 +-
 lib/librte_cmdline/cmdline_rdline.c             |  697 ---------
 lib/librte_cmdline/cmdline_rdline.h             |  255 ----
 lib/librte_cmdline/cmdline_socket.c             |   36 +-
 lib/librte_cmdline/cmdline_vt100.c              |  185 ---
 lib/librte_cmdline/cmdline_vt100.h              |  153 --
 lib/librte_cmdline/rte_cmdline_version.map      |   41 +-
 mk/rte.app.mk                                   |    2 +
 test/cmdline_test/cmdline_test.c                |    1 -
 test/cmdline_test/commands.c                    |   69 -
 test/test/Makefile                              |    1 -
 test/test/commands.c                            |    1 -
 test/test/test.c                                |    1 -
 test/test/test_cmdline.c                        |    9 -
 test/test/test_cmdline.h                        |    6 -
 test/test/test_cmdline_cirbuf.c                 | 1330 ------------------
 test/test/test_cmdline_lib.c                    |  117 +-
 38 files changed, 293 insertions(+), 3762 deletions(-)

diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c
index f71d963..9fe625c 100644
--- a/app/test-pmd/cmdline.c
+++ b/app/test-pmd/cmdline.c
@@ -77,7 +77,6 @@
 #include <rte_flow.h>
 #include <rte_gro.h>
 
-#include <cmdline_rdline.h>
 #include <cmdline_parse.h>
 #include <cmdline_parse_num.h>
 #include <cmdline_parse_string.h>
diff --git a/examples/bond/main.c b/examples/bond/main.c
index 8e3b1f3..d903314 100644
--- a/examples/bond/main.c
+++ b/examples/bond/main.c
@@ -71,7 +71,6 @@
 #include <rte_arp.h>
 #include <rte_spinlock.h>
 
-#include <cmdline_rdline.h>
 #include <cmdline_parse.h>
 #include <cmdline_parse_num.h>
 #include <cmdline_parse_string.h>
diff --git a/examples/cmdline/commands.c b/examples/cmdline/commands.c
index f3ba247..e8fa7f0 100644
--- a/examples/cmdline/commands.c
+++ b/examples/cmdline/commands.c
@@ -74,7 +74,6 @@
 	#endif
 #endif
 
-#include <cmdline_rdline.h>
 #include <cmdline_parse.h>
 #include <cmdline_parse_ipaddr.h>
 #include <cmdline_parse_num.h>
diff --git a/examples/cmdline/main.c b/examples/cmdline/main.c
index c6de944..c229f50 100644
--- a/examples/cmdline/main.c
+++ b/examples/cmdline/main.c
@@ -65,7 +65,6 @@
 #include <termios.h>
 #include <sys/queue.h>
 
-#include <cmdline_rdline.h>
 #include <cmdline_parse.h>
 #include <cmdline_socket.h>
 #include <cmdline.h>
diff --git a/examples/ip_pipeline/pipeline/pipeline_common_fe.c b/examples/ip_pipeline/pipeline/pipeline_common_fe.c
index 7521187..f1df197 100644
--- a/examples/ip_pipeline/pipeline/pipeline_common_fe.c
+++ b/examples/ip_pipeline/pipeline/pipeline_common_fe.c
@@ -37,7 +37,6 @@
 
 #include <rte_common.h>
 #include <rte_malloc.h>
-#include <cmdline_rdline.h>
 #include <cmdline_parse.h>
 #include <cmdline_parse_num.h>
 #include <cmdline_parse_string.h>
diff --git a/examples/ip_pipeline/pipeline/pipeline_firewall.c b/examples/ip_pipeline/pipeline/pipeline_firewall.c
index a82e552..e49d9ca 100644
--- a/examples/ip_pipeline/pipeline/pipeline_firewall.c
+++ b/examples/ip_pipeline/pipeline/pipeline_firewall.c
@@ -41,7 +41,6 @@
 #include <rte_common.h>
 #include <rte_hexdump.h>
 #include <rte_malloc.h>
-#include <cmdline_rdline.h>
 #include <cmdline_parse.h>
 #include <cmdline_parse_num.h>
 #include <cmdline_parse_string.h>
diff --git a/examples/ip_pipeline/pipeline/pipeline_flow_actions.c b/examples/ip_pipeline/pipeline/pipeline_flow_actions.c
index 349db6b..0f680db 100644
--- a/examples/ip_pipeline/pipeline/pipeline_flow_actions.c
+++ b/examples/ip_pipeline/pipeline/pipeline_flow_actions.c
@@ -40,7 +40,6 @@
 #include <rte_common.h>
 #include <rte_hexdump.h>
 #include <rte_malloc.h>
-#include <cmdline_rdline.h>
 #include <cmdline_parse.h>
 #include <cmdline_parse_num.h>
 #include <cmdline_parse_string.h>
diff --git a/examples/ip_pipeline/pipeline/pipeline_flow_classification.c b/examples/ip_pipeline/pipeline/pipeline_flow_classification.c
index 70b1938..b9e4ed5 100644
--- a/examples/ip_pipeline/pipeline/pipeline_flow_classification.c
+++ b/examples/ip_pipeline/pipeline/pipeline_flow_classification.c
@@ -40,7 +40,6 @@
 #include <rte_common.h>
 #include <rte_hexdump.h>
 #include <rte_malloc.h>
-#include <cmdline_rdline.h>
 #include <cmdline_parse.h>
 #include <cmdline_parse_num.h>
 #include <cmdline_parse_string.h>
diff --git a/examples/ip_pipeline/thread_fe.c b/examples/ip_pipeline/thread_fe.c
index 4590c2b..4f54094 100644
--- a/examples/ip_pipeline/thread_fe.c
+++ b/examples/ip_pipeline/thread_fe.c
@@ -1,7 +1,6 @@
 #include <rte_common.h>
 #include <rte_ring.h>
 #include <rte_malloc.h>
-#include <cmdline_rdline.h>
 #include <cmdline_parse.h>
 #include <cmdline_parse_num.h>
 #include <cmdline_parse_string.h>
diff --git a/examples/multi_process/simple_mp/main.c b/examples/multi_process/simple_mp/main.c
index 62537b0..c0fc6ea 100644
--- a/examples/multi_process/simple_mp/main.c
+++ b/examples/multi_process/simple_mp/main.c
@@ -64,7 +64,6 @@
 #include <rte_ring.h>
 #include <rte_log.h>
 #include <rte_mempool.h>
-#include <cmdline_rdline.h>
 #include <cmdline_parse.h>
 #include <cmdline_parse_string.h>
 #include <cmdline_socket.h>
diff --git a/examples/multi_process/simple_mp/mp_commands.c b/examples/multi_process/simple_mp/mp_commands.c
index ef6dc58..264dea2 100644
--- a/examples/multi_process/simple_mp/mp_commands.c
+++ b/examples/multi_process/simple_mp/mp_commands.c
@@ -54,7 +54,6 @@
 #include <rte_mempool.h>
 #include <rte_string_fns.h>
 
-#include <cmdline_rdline.h>
 #include <cmdline_parse.h>
 #include <cmdline_parse_string.h>
 #include <cmdline_socket.h>
diff --git a/examples/qos_sched/cmdline.c b/examples/qos_sched/cmdline.c
index b62d165..c2a4f6b 100644
--- a/examples/qos_sched/cmdline.c
+++ b/examples/qos_sched/cmdline.c
@@ -36,7 +36,6 @@
 #include <inttypes.h>
 #include <string.h>
 
-#include <cmdline_rdline.h>
 #include <cmdline_parse.h>
 #include <cmdline_parse_num.h>
 #include <cmdline_parse_string.h>
diff --git a/examples/quota_watermark/qwctl/commands.c b/examples/quota_watermark/qwctl/commands.c
index 5cac0e1..a30a35c 100644
--- a/examples/quota_watermark/qwctl/commands.c
+++ b/examples/quota_watermark/qwctl/commands.c
@@ -36,7 +36,6 @@
 #include <string.h>
 #include <termios.h>
 
-#include <cmdline_rdline.h>
 #include <cmdline_parse.h>
 #include <cmdline_parse_num.h>
 #include <cmdline_parse_string.h>
diff --git a/examples/quota_watermark/qwctl/qwctl.c b/examples/quota_watermark/qwctl/qwctl.c
index 18ec17a..2831667 100644
--- a/examples/quota_watermark/qwctl/qwctl.c
+++ b/examples/quota_watermark/qwctl/qwctl.c
@@ -42,7 +42,6 @@
 #include <rte_log.h>
 #include <rte_memzone.h>
 
-#include <cmdline_rdline.h>
 #include <cmdline_parse.h>
 #include <cmdline_socket.h>
 #include <cmdline.h>
diff --git a/examples/vm_power_manager/guest_cli/vm_power_cli_guest.c b/examples/vm_power_manager/guest_cli/vm_power_cli_guest.c
index 63f711e..83cd215 100644
--- a/examples/vm_power_manager/guest_cli/vm_power_cli_guest.c
+++ b/examples/vm_power_manager/guest_cli/vm_power_cli_guest.c
@@ -37,7 +37,6 @@
 #include <stdio.h>
 #include <termios.h>
 
-#include <cmdline_rdline.h>
 #include <cmdline_parse.h>
 #include <cmdline_parse_string.h>
 #include <cmdline_parse_num.h>
diff --git a/examples/vm_power_manager/vm_power_cli.c b/examples/vm_power_manager/vm_power_cli.c
index 6f234fb..d013715 100644
--- a/examples/vm_power_manager/vm_power_cli.c
+++ b/examples/vm_power_manager/vm_power_cli.c
@@ -39,7 +39,6 @@
 #include <termios.h>
 #include <errno.h>
 
-#include <cmdline_rdline.h>
 #include <cmdline_parse.h>
 #include <cmdline_parse_string.h>
 #include <cmdline_parse_num.h>
diff --git a/lib/librte_cmdline/Makefile b/lib/librte_cmdline/Makefile
index 2c48e62..35c8972 100644
--- a/lib/librte_cmdline/Makefile
+++ b/lib/librte_cmdline/Makefile
@@ -38,28 +38,24 @@ CFLAGS += $(WERROR_FLAGS) -I$(SRCDIR) -O3
 
 EXPORT_MAP := rte_cmdline_version.map
 
-LIBABIVER := 2
+LIBABIVER := 3
 
 # all source are stored in SRCS-y
 SRCS-$(CONFIG_RTE_LIBRTE_CMDLINE) := cmdline.c
-SRCS-$(CONFIG_RTE_LIBRTE_CMDLINE) += cmdline_cirbuf.c
 SRCS-$(CONFIG_RTE_LIBRTE_CMDLINE) += cmdline_parse.c
 SRCS-$(CONFIG_RTE_LIBRTE_CMDLINE) += cmdline_parse_etheraddr.c
 SRCS-$(CONFIG_RTE_LIBRTE_CMDLINE) += cmdline_parse_ipaddr.c
 SRCS-$(CONFIG_RTE_LIBRTE_CMDLINE) += cmdline_parse_num.c
 SRCS-$(CONFIG_RTE_LIBRTE_CMDLINE) += cmdline_parse_string.c
-SRCS-$(CONFIG_RTE_LIBRTE_CMDLINE) += cmdline_rdline.c
-SRCS-$(CONFIG_RTE_LIBRTE_CMDLINE) += cmdline_vt100.c
 SRCS-$(CONFIG_RTE_LIBRTE_CMDLINE) += cmdline_socket.c
 SRCS-$(CONFIG_RTE_LIBRTE_CMDLINE) += cmdline_parse_portlist.c
 
-CFLAGS += -D_GNU_SOURCE
 LDLIBS += -lrte_eal
 
 # install includes
 INCS := cmdline.h cmdline_parse.h cmdline_parse_num.h cmdline_parse_ipaddr.h
-INCS += cmdline_parse_etheraddr.h cmdline_parse_string.h cmdline_rdline.h
-INCS += cmdline_vt100.h cmdline_socket.h cmdline_cirbuf.h cmdline_parse_portlist.h
+INCS += cmdline_parse_etheraddr.h cmdline_parse_string.h
+INCS += cmdline_socket.h cmdline_parse_portlist.h
 SYMLINK-$(CONFIG_RTE_LIBRTE_CMDLINE)-include := $(INCS)
 
 include $(RTE_SDK)/mk/rte.lib.mk
diff --git a/lib/librte_cmdline/cmdline.c b/lib/librte_cmdline/cmdline.c
index d749165..1c19546 100644
--- a/lib/librte_cmdline/cmdline.c
+++ b/lib/librte_cmdline/cmdline.c
@@ -58,79 +58,181 @@
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
+#include <ctype.h>
+#include <histedit.h>
+#include <stdint.h>
 #include <stdio.h>
 #include <string.h>
 #include <unistd.h>
 #include <stdlib.h>
 #include <stdarg.h>
-#include <inttypes.h>
 #include <fcntl.h>
 #include <poll.h>
 #include <errno.h>
-#include <termios.h>
-#include <netinet/in.h>
-
-#include <rte_string_fns.h>
 
 #include "cmdline_parse.h"
-#include "cmdline_rdline.h"
 #include "cmdline.h"
 
-static void
-cmdline_valid_buffer(struct rdline *rdl, const char *buf,
-		     __attribute__((unused)) unsigned int size)
+struct cmdline {
+	char *line;
+	FILE *f_in;
+	FILE *f_out;
+	cmdline_parse_ctx_t *ctx;
+	EditLine *el;
+	History *hist;
+	HistEvent histev;
+	uint32_t eof:1;
+	uint32_t error:1;
+	char prompt[RDLINE_PROMPT_SIZE];
+};
+
+void
+cmdline_set_prompt(struct cmdline *cl, const char *prompt)
 {
-	struct cmdline *cl = rdl->opaque;
-	int ret;
-	ret = cmdline_parse(cl, buf);
-	if (ret == CMDLINE_PARSE_AMBIGUOUS)
-		cmdline_printf(cl, "Ambiguous command\n");
-	else if (ret == CMDLINE_PARSE_NOMATCH)
-		cmdline_printf(cl, "Command not found\n");
-	else if (ret == CMDLINE_PARSE_BAD_ARGS)
-		cmdline_printf(cl, "Bad arguments\n");
+	if (!cl || !prompt)
+		return;
+	snprintf(cl->prompt, sizeof(cl->prompt), "%s", prompt);
 }
 
-static int
-cmdline_complete_buffer(struct rdline *rdl, const char *buf,
-			char *dstbuf, unsigned int dstsize,
-			int *state)
+void *
+cmdline_ctx_get(struct cmdline *cl)
 {
-	struct cmdline *cl = rdl->opaque;
-	return cmdline_complete(cl, buf, state, dstbuf, dstsize);
+	if (!cl)
+		return NULL;
+	return cl->ctx;
 }
 
-int
-cmdline_write_char(struct rdline *rdl, char c)
+static char *
+cmdline_el_prompt(EditLine *el)
 {
-	int ret = -1;
 	struct cmdline *cl;
 
-	if (!rdl)
-		return -1;
-
-	cl = rdl->opaque;
+	if (el_get(el, EL_CLIENTDATA, &cl))
+		return NULL;
+	return cl->prompt;
+}
 
-	if (cl->s_out >= 0)
-		ret = write(cl->s_out, &c, 1);
+static unsigned char
+cmdline_el_execute(EditLine *el, int c)
+{
+	const LineInfo *li = el_line(el);
+	size_t len = li->lastchar - li->buffer;
+	char *line;
+	struct cmdline *cl;
+	int ret;
 
-	return ret;
+	(void)c;
+	if (el_get(el, EL_CLIENTDATA, &cl))
+		return CC_FATAL;
+	line = realloc(cl->line, len + 2);
+	if (!line) {
+		cl->error = 1;
+		return CC_FATAL;
+	}
+	cl->line = line;
+	memcpy(line, li->buffer, len);
+	line[len] = '\n';
+	line[len + 1] = '\0';
+	fputs("\r\n", cl->f_out);
+	ret = cmdline_parse(cl, line);
+	if (ret == CMDLINE_PARSE_AMBIGUOUS)
+		fprintf(cl->f_out, "Ambiguous command\r\n");
+	else if (ret == CMDLINE_PARSE_NOMATCH)
+		fprintf(cl->f_out, "Command not found\r\n");
+	else if (ret == CMDLINE_PARSE_BAD_ARGS)
+		fprintf(cl->f_out, "Bad arguments\r\n");
+	if (cl->error)
+		return CC_FATAL;
+	if (cl->eof)
+		return CC_EOF;
+	if (len) {
+		line[len] = '\0';
+		history(cl->hist, &cl->histev, H_ENTER, line);
+	}
+	return CC_NEWLINE;
 }
 
+static unsigned char
+cmdline_el_complete(EditLine *el, int c)
+{
+	const LineInfo *li = el_line(el);
+	size_t pos = li->cursor - li->buffer;
+	char *line;
+	struct cmdline *cl;
+	char complete_buf[RDLINE_COMPLETE_SIZE];
+	int complete_state;
+	int ret;
 
-void
-cmdline_set_prompt(struct cmdline *cl, const char *prompt)
+	if (el_get(el, EL_CLIENTDATA, &cl))
+		return CC_FATAL;
+	line = realloc(cl->line, pos + 1);
+	if (!line) {
+		cl->error = 1;
+		return CC_FATAL;
+	}
+	cl->line = line;
+	memcpy(line, li->buffer, pos);
+	line[pos] = '\0';
+	if (c == '\t')
+		complete_state = 0;
+	else
+		complete_state = -1;
+	/* see in parse.h for help on complete() */
+	ret = cmdline_complete(cl, line, &complete_state,
+			       complete_buf, sizeof(complete_buf));
+	/* no completion or error */
+	if (ret <= 0)
+		return CC_ARGHACK;
+	/* string must be NUL-terminated */
+	if (strnlen(complete_buf, sizeof(complete_buf)) == sizeof(complete_buf))
+		return CC_ERROR;
+	/* add chars */
+	if (ret == CMDLINE_PARSE_COMPLETED_BUFFER) {
+		/* if in the middle of a token, remove its suffix first */
+		for (pos = 0; li->cursor + pos != li->lastchar; pos++)
+			if (isblank(li->cursor[pos]))
+				break;
+		el_cursor(el, pos);
+		el_deletestr(el, pos);
+		if (el_insertstr(el, complete_buf))
+			return CC_ERROR;
+		return CC_REFRESH;
+	}
+	/* choice */
+	fputs("\r\n", cl->f_out);
+	while (ret) {
+		fputc(' ', cl->f_out);
+		fputs(complete_buf, cl->f_out);
+		fputs("\r\n", cl->f_out);
+		ret = cmdline_complete(cl, line, &complete_state,
+				       complete_buf, sizeof(complete_buf));
+	}
+	el_set(el, EL_REFRESH);
+	return CC_REDISPLAY;
+}
+
+static unsigned char
+cmdline_el_delete_next_char_or_eof(EditLine *el, int c)
 {
-	if (!cl || !prompt)
-		return;
-	snprintf(cl->prompt, sizeof(cl->prompt), "%s", prompt);
+	const LineInfo *li = el_line(el);
+	struct cmdline *cl;
+
+	(void)c;
+	if (el_get(el, EL_CLIENTDATA, &cl))
+		return CC_FATAL;
+	if (li->buffer == li->lastchar) {
+		cl->eof = 1;
+		return CC_EOF;
+	}
+	el_cursor(el, 1);
+	el_deletestr(el, 1);
+	return CC_REFRESH;
 }
 
 struct cmdline *
 cmdline_new(cmdline_parse_ctx_t *ctx, const char *prompt, int s_in, int s_out)
 {
 	struct cmdline *cl;
-	int ret;
 
 	if (!ctx || !prompt)
 		return NULL;
@@ -139,36 +241,89 @@ cmdline_new(cmdline_parse_ctx_t *ctx, const char *prompt, int s_in, int s_out)
 	if (cl == NULL)
 		return NULL;
 	memset(cl, 0, sizeof(struct cmdline));
-	cl->s_in = s_in;
-	cl->s_out = s_out;
+	cl->line = NULL;
+	s_in = dup(s_in);
+	s_out = s_out != -1 ? dup(s_out) : open("/dev/null", O_WRONLY);
+	if (s_in == -1 || s_out == -1)
+		goto error;
+	cl->f_in = fdopen(s_in, "rb");
+	cl->f_out = fdopen(s_out, "wb");
+	if (!cl->f_in || !cl->f_out)
+		goto error;
 	cl->ctx = ctx;
-
-	ret = rdline_init(&cl->rdl, cmdline_write_char, cmdline_valid_buffer,
-			cmdline_complete_buffer);
-	if (ret != 0) {
-		free(cl);
-		return NULL;
-	}
-
-	cl->rdl.opaque = cl;
+	cl->el = el_init("dpdk", cl->f_in, cl->f_out, stderr);
+	if (!cl->el)
+		goto error;
+	if (el_set(cl->el, EL_CLIENTDATA, cl))
+		goto error;
 	cmdline_set_prompt(cl, prompt);
-	rdline_newline(&cl->rdl, cl->prompt);
-
+	if (el_set(cl->el, EL_PROMPT, cmdline_el_prompt))
+		goto error;
+	if (el_set(cl->el, EL_EDITOR, "emacs"))
+		goto error;
+	if (el_set(cl->el, EL_SIGNAL, 1))
+		goto error;
+	cl->hist = history_init();
+	if (!cl->hist)
+		goto error;
+	if (history(cl->hist, &cl->histev, H_SETSIZE,
+		    RDLINE_HISTORY_MAX_LINE) < 0)
+		goto error;
+	if (history(cl->hist, &cl->histev, H_SETUNIQUE, 1))
+		goto error;
+	if (el_set(cl->el, EL_HIST, history, cl->hist))
+		goto error;
+	if (el_set(cl->el, EL_ADDFN, "ed-execute", "Execute command",
+		   cmdline_el_execute))
+		goto error;
+	if (el_set(cl->el, EL_BIND, "^J", "ed-execute", NULL))
+		goto error;
+	if (el_set(cl->el, EL_BIND, "^M", "ed-execute", NULL))
+		goto error;
+	if (el_set(cl->el, EL_ADDFN, "ed-complete", "Complete argument",
+		   cmdline_el_complete))
+		goto error;
+	if (el_set(cl->el, EL_BIND, "^I", "ed-complete", NULL))
+		goto error;
+	if (el_set(cl->el, EL_BIND, "?", "ed-complete", NULL))
+		goto error;
+	if (el_set(cl->el, EL_ADDFN, "ed-delete-next-char-or-eof",
+		   "Delete next character or assume EOF",
+		   cmdline_el_delete_next_char_or_eof))
+		goto error;
+	if (el_set(cl->el, EL_BIND, "^D",
+		   "ed-delete-next-char-or-eof", NULL))
+		goto error;
+	if (el_set(cl->el, EL_BIND, "^W", "ed-delete-prev-word", NULL))
+		goto error;
 	return cl;
+error:
+	if (cl->hist)
+		history_end(cl->hist);
+	if (cl->el)
+		el_end(cl->el);
+	if (cl->f_out)
+		fclose(cl->f_out);
+	else if (s_out != -1)
+		close(s_out);
+	if (cl->f_in)
+		fclose(cl->f_in);
+	else if (s_in != -1)
+		close(s_in);
+	free(cl);
+	return NULL;
 }
 
 void
 cmdline_free(struct cmdline *cl)
 {
-	dprintf("called\n");
-
 	if (!cl)
 		return;
-
-	if (cl->s_in > 2)
-		close(cl->s_in);
-	if (cl->s_out != cl->s_in && cl->s_out > 2)
-		close(cl->s_out);
+	history_end(cl->hist);
+	el_end(cl->el);
+	fclose(cl->f_out);
+	fclose(cl->f_in);
+	free(cl->line);
 	free(cl);
 }
 
@@ -180,70 +335,23 @@ cmdline_printf(const struct cmdline *cl, const char *fmt, ...)
 	if (!cl || !fmt)
 		return;
 
-#ifdef _GNU_SOURCE
-	if (cl->s_out < 0)
-		return;
-	va_start(ap, fmt);
-	vdprintf(cl->s_out, fmt, ap);
-	va_end(ap);
-#else
-	int ret;
-	char *buf;
-
-	if (cl->s_out < 0)
-		return;
-
-	buf = malloc(BUFSIZ);
-	if (buf == NULL)
-		return;
 	va_start(ap, fmt);
-	ret = vsnprintf(buf, BUFSIZ, fmt, ap);
+	vfprintf(cl->f_out, fmt, ap);
 	va_end(ap);
-	if (ret < 0) {
-		free(buf);
-		return;
-	}
-	if (ret >= BUFSIZ)
-		ret = BUFSIZ - 1;
-	ret = write(cl->s_out, buf, ret);
-	(void)ret;
-	free(buf);
-#endif
 }
 
 int
 cmdline_in(struct cmdline *cl, const char *buf, int size)
 {
-	const char *history, *buffer;
-	size_t histlen, buflen;
-	int ret = 0;
-	int i, same;
+	int i;
 
 	if (!cl || !buf)
 		return -1;
 
 	for (i=0; i<size; i++) {
-		ret = rdline_char_in(&cl->rdl, buf[i]);
-
-		if (ret == RDLINE_RES_VALIDATED) {
-			buffer = rdline_get_buffer(&cl->rdl);
-			history = rdline_get_history_item(&cl->rdl, 0);
-			if (history) {
-				histlen = strnlen(history, RDLINE_BUF_SIZE);
-				same = !memcmp(buffer, history, histlen) &&
-					buffer[histlen] == '\n';
-			}
-			else
-				same = 0;
-			buflen = strnlen(buffer, RDLINE_BUF_SIZE);
-			if (buflen > 1 && !same)
-				rdline_add_history(&cl->rdl, buffer);
-			rdline_newline(&cl->rdl, cl->prompt);
-		}
-		else if (ret == RDLINE_RES_EOF)
-			return -1;
-		else if (ret == RDLINE_RES_EXITED)
-			return -1;
+		char tmp[2] = { buf[i], '\0' };
+
+		el_push(cl->el, tmp);
 	}
 	return i;
 }
@@ -253,7 +361,7 @@ cmdline_quit(struct cmdline *cl)
 {
 	if (!cl)
 		return;
-	rdline_quit(&cl->rdl);
+	cl->eof = 1;
 }
 
 int
@@ -261,48 +369,49 @@ cmdline_poll(struct cmdline *cl)
 {
 	struct pollfd pfd;
 	int status;
-	ssize_t read_status;
-	char c;
+	int read_status;
+	int flags;
 
 	if (!cl)
 		return -EINVAL;
-	else if (cl->rdl.status == RDLINE_EXITED)
+	else if (cl->error)
+		return RDLINE_ERROR;
+	else if (cl->eof)
 		return RDLINE_EXITED;
 
-	pfd.fd = cl->s_in;
+	pfd.fd = fileno(cl->f_in);
 	pfd.events = POLLIN;
 	pfd.revents = 0;
 
 	status = poll(&pfd, 1, 0);
 	if (status < 0)
-		return status;
-	else if (status > 0) {
-		c = -1;
-		read_status = read(cl->s_in, &c, 1);
-		if (read_status < 0)
-			return read_status;
-
-		status = cmdline_in(cl, &c, 1);
-		if (status < 0 && cl->rdl.status != RDLINE_EXITED)
-			return status;
-	}
-
-	return cl->rdl.status;
+		return RDLINE_ERROR;
+	if (!status)
+		return RDLINE_RUNNING;
+	flags = fcntl(pfd.fd, F_GETFL);
+	if (!(flags & O_NONBLOCK))
+		fcntl(pfd.fd, F_SETFL, flags | O_NONBLOCK);
+	if (!el_gets(cl->el, &read_status) && read_status == -1)
+		cl->error = 1;
+	if (!(flags & O_NONBLOCK))
+		fcntl(pfd.fd, F_SETFL, flags);
+	return cl->error ? RDLINE_ERROR :
+		cl->eof ? RDLINE_EXITED :
+		RDLINE_RUNNING;
 }
 
 void
 cmdline_interact(struct cmdline *cl)
 {
-	char c;
-
 	if (!cl)
 		return;
 
-	c = -1;
-	while (1) {
-		if (read(cl->s_in, &c, 1) <= 0)
-			break;
-		if (cmdline_in(cl, &c, 1) < 0)
-			break;
+	while (!cl->error && !cl->eof) {
+		int read_status;
+
+		if (el_gets(cl->el, &read_status))
+			continue;
+		if (read_status == -1)
+			cl->error = 1;
 	}
 }
diff --git a/lib/librte_cmdline/cmdline.h b/lib/librte_cmdline/cmdline.h
index 65d73b0..4507268 100644
--- a/lib/librte_cmdline/cmdline.h
+++ b/lib/librte_cmdline/cmdline.h
@@ -61,8 +61,6 @@
 #ifndef _CMDLINE_H_
 #define _CMDLINE_H_
 
-#include <termios.h>
-#include <cmdline_rdline.h>
 #include <cmdline_parse.h>
 
 /**
@@ -75,22 +73,26 @@
 extern "C" {
 #endif
 
-struct cmdline {
-	int s_in;
-	int s_out;
-	cmdline_parse_ctx_t *ctx;
-	struct rdline rdl;
-	char prompt[RDLINE_PROMPT_SIZE];
-	struct termios oldterm;
+#define RDLINE_PROMPT_SIZE 32
+#define RDLINE_HISTORY_MAX_LINE 64
+#define RDLINE_COMPLETE_SIZE 128
+
+enum rdline_status {
+	RDLINE_ERROR = -1,
+	RDLINE_INIT,
+	RDLINE_RUNNING,
+	RDLINE_EXITED,
 };
 
+struct cmdline;
+
+void *cmdline_ctx_get(struct cmdline *cl);
 struct cmdline *cmdline_new(cmdline_parse_ctx_t *ctx, const char *prompt, int s_in, int s_out);
 void cmdline_set_prompt(struct cmdline *cl, const char *prompt);
 void cmdline_free(struct cmdline *cl);
 void cmdline_printf(const struct cmdline *cl, const char *fmt, ...)
 	__attribute__((format(printf,2,3)));
 int cmdline_in(struct cmdline *cl, const char *buf, int size);
-int cmdline_write_char(struct rdline *rdl, char c);
 
 /**
  * This function is nonblocking equivalent of ``cmdline_interact()``. It polls
diff --git a/lib/librte_cmdline/cmdline_cirbuf.c b/lib/librte_cmdline/cmdline_cirbuf.c
deleted file mode 100644
index f506f88..0000000
--- a/lib/librte_cmdline/cmdline_cirbuf.c
+++ /dev/null
@@ -1,466 +0,0 @@
-/*-
- *   BSD LICENSE
- *
- *   Copyright(c) 2010-2014 Intel Corporation. All rights reserved.
- *   All rights reserved.
- *
- *   Redistribution and use in source and binary forms, with or without
- *   modification, are permitted provided that the following conditions
- *   are met:
- *
- *     * Redistributions of source code must retain the above copyright
- *       notice, this list of conditions and the following disclaimer.
- *     * Redistributions in binary form must reproduce the above copyright
- *       notice, this list of conditions and the following disclaimer in
- *       the documentation and/or other materials provided with the
- *       distribution.
- *     * Neither the name of Intel Corporation nor the names of its
- *       contributors may be used to endorse or promote products derived
- *       from this software without specific prior written permission.
- *
- *   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- *   "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- *   LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- *   A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- *   OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- *   LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- *   DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- *   THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- *   (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- *   OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/*
- * Copyright (c) 2009, Olivier MATZ <zer0@droids-corp.org>
- * All rights reserved.
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- *     * Redistributions of source code must retain the above copyright
- *       notice, this list of conditions and the following disclaimer.
- *     * Redistributions in binary form must reproduce the above copyright
- *       notice, this list of conditions and the following disclaimer in the
- *       documentation and/or other materials provided with the distribution.
- *     * Neither the name of the University of California, Berkeley nor the
- *       names of its contributors may be used to endorse or promote products
- *       derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE REGENTS AND CONTRIBUTORS BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include <string.h>
-#include <errno.h>
-#include <stdio.h>
-
-#include "cmdline_cirbuf.h"
-
-
-int
-cirbuf_init(struct cirbuf *cbuf, char *buf, unsigned int start, unsigned int maxlen)
-{
-	if (!cbuf || !buf)
-		return -EINVAL;
-	cbuf->maxlen = maxlen;
-	cbuf->len = 0;
-	cbuf->start = start;
-	cbuf->end = start;
-	cbuf->buf = buf;
-	return 0;
-}
-
-/* multiple add */
-
-int
-cirbuf_add_buf_head(struct cirbuf *cbuf, const char *c, unsigned int n)
-{
-	unsigned int e;
-
-	if (!cbuf || !c || !n || n > CIRBUF_GET_FREELEN(cbuf))
-		return -EINVAL;
-
-	e = CIRBUF_IS_EMPTY(cbuf) ? 1 : 0;
-
-	if (n < cbuf->start + e) {
-		dprintf("s[%d] -> d[%d] (%d)\n", 0, cbuf->start - n + e, n);
-		memcpy(cbuf->buf + cbuf->start - n + e, c, n);
-	}
-	else {
-		dprintf("s[%d] -> d[%d] (%d)\n", + n - (cbuf->start + e), 0,
-			cbuf->start + e);
-		dprintf("s[%d] -> d[%d] (%d)\n", cbuf->maxlen - n +
-			(cbuf->start + e), 0, n - (cbuf->start + e));
-		memcpy(cbuf->buf, c  + n - (cbuf->start + e) , cbuf->start + e);
-		memcpy(cbuf->buf + cbuf->maxlen - n + (cbuf->start + e), c,
-		       n - (cbuf->start + e));
-	}
-	cbuf->len += n;
-	cbuf->start += (cbuf->maxlen - n + e);
-	cbuf->start %= cbuf->maxlen;
-	return n;
-}
-
-/* multiple add */
-
-int
-cirbuf_add_buf_tail(struct cirbuf *cbuf, const char *c, unsigned int n)
-{
-	unsigned int e;
-
-	if (!cbuf || !c || !n || n > CIRBUF_GET_FREELEN(cbuf))
-		return -EINVAL;
-
-	e = CIRBUF_IS_EMPTY(cbuf) ? 1 : 0;
-
-	if (n < cbuf->maxlen - cbuf->end - 1 + e) {
-		dprintf("s[%d] -> d[%d] (%d)\n", 0, cbuf->end + !e, n);
-		memcpy(cbuf->buf + cbuf->end + !e, c, n);
-	}
-	else {
-		dprintf("s[%d] -> d[%d] (%d)\n", cbuf->end + !e, 0,
-			cbuf->maxlen - cbuf->end - 1 + e);
-		dprintf("s[%d] -> d[%d] (%d)\n", cbuf->maxlen - cbuf->end - 1 +
-			e, 0, n - cbuf->maxlen + cbuf->end + 1 - e);
-		memcpy(cbuf->buf + cbuf->end + !e, c, cbuf->maxlen -
-		       cbuf->end - 1 + e);
-		memcpy(cbuf->buf, c + cbuf->maxlen - cbuf->end - 1 + e,
-		       n - cbuf->maxlen + cbuf->end + 1 - e);
-	}
-	cbuf->len += n;
-	cbuf->end += n - e;
-	cbuf->end %= cbuf->maxlen;
-	return n;
-}
-
-/* add at head */
-
-static inline void
-__cirbuf_add_head(struct cirbuf * cbuf, char c)
-{
-	if (!CIRBUF_IS_EMPTY(cbuf)) {
-		cbuf->start += (cbuf->maxlen - 1);
-		cbuf->start %= cbuf->maxlen;
-	}
-	cbuf->buf[cbuf->start] = c;
-	cbuf->len ++;
-}
-
-int
-cirbuf_add_head_safe(struct cirbuf * cbuf, char c)
-{
-	if (cbuf && !CIRBUF_IS_FULL(cbuf)) {
-		__cirbuf_add_head(cbuf, c);
-		return 0;
-	}
-	return -EINVAL;
-}
-
-void
-cirbuf_add_head(struct cirbuf * cbuf, char c)
-{
-	__cirbuf_add_head(cbuf, c);
-}
-
-/* add at tail */
-
-static inline void
-__cirbuf_add_tail(struct cirbuf * cbuf, char c)
-{
-	if (!CIRBUF_IS_EMPTY(cbuf)) {
-		cbuf->end ++;
-		cbuf->end %= cbuf->maxlen;
-	}
-	cbuf->buf[cbuf->end] = c;
-	cbuf->len ++;
-}
-
-int
-cirbuf_add_tail_safe(struct cirbuf * cbuf, char c)
-{
-	if (cbuf && !CIRBUF_IS_FULL(cbuf)) {
-		__cirbuf_add_tail(cbuf, c);
-		return 0;
-	}
-	return -EINVAL;
-}
-
-void
-cirbuf_add_tail(struct cirbuf * cbuf, char c)
-{
-	__cirbuf_add_tail(cbuf, c);
-}
-
-
-static inline void
-__cirbuf_shift_left(struct cirbuf *cbuf)
-{
-	unsigned int i;
-	char tmp = cbuf->buf[cbuf->start];
-
-	for (i=0 ; i<cbuf->len ; i++) {
-		cbuf->buf[(cbuf->start+i)%cbuf->maxlen] =
-			cbuf->buf[(cbuf->start+i+1)%cbuf->maxlen];
-	}
-	cbuf->buf[(cbuf->start-1+cbuf->maxlen)%cbuf->maxlen] = tmp;
-	cbuf->start += (cbuf->maxlen - 1);
-	cbuf->start %= cbuf->maxlen;
-	cbuf->end += (cbuf->maxlen - 1);
-	cbuf->end %= cbuf->maxlen;
-}
-
-static inline void
-__cirbuf_shift_right(struct cirbuf *cbuf)
-{
-	unsigned int i;
-	char tmp = cbuf->buf[cbuf->end];
-
-	for (i=0 ; i<cbuf->len ; i++) {
-		cbuf->buf[(cbuf->end+cbuf->maxlen-i)%cbuf->maxlen] =
-			cbuf->buf[(cbuf->end+cbuf->maxlen-i-1)%cbuf->maxlen];
-	}
-	cbuf->buf[(cbuf->end+1)%cbuf->maxlen] = tmp;
-	cbuf->start += 1;
-	cbuf->start %= cbuf->maxlen;
-	cbuf->end += 1;
-	cbuf->end %= cbuf->maxlen;
-}
-
-/* XXX we could do a better algorithm here... */
-int
-cirbuf_align_left(struct cirbuf * cbuf)
-{
-	if (!cbuf)
-		return -EINVAL;
-
-	if (cbuf->start < cbuf->maxlen/2) {
-		while (cbuf->start != 0) {
-			__cirbuf_shift_left(cbuf);
-		}
-	}
-	else {
-		while (cbuf->start != 0) {
-			__cirbuf_shift_right(cbuf);
-		}
-	}
-
-	return 0;
-}
-
-/* XXX we could do a better algorithm here... */
-int
-cirbuf_align_right(struct cirbuf * cbuf)
-{
-	if (!cbuf)
-		return -EINVAL;
-
-	if (cbuf->start >= cbuf->maxlen/2) {
-		while (cbuf->end != cbuf->maxlen-1) {
-			__cirbuf_shift_left(cbuf);
-		}
-	}
-	else {
-		while (cbuf->start != cbuf->maxlen-1) {
-			__cirbuf_shift_right(cbuf);
-		}
-	}
-
-	return 0;
-}
-
-/* buffer del */
-
-int
-cirbuf_del_buf_head(struct cirbuf *cbuf, unsigned int size)
-{
-	if (!cbuf || !size || size > CIRBUF_GET_LEN(cbuf))
-		return -EINVAL;
-
-	cbuf->len -= size;
-	if (CIRBUF_IS_EMPTY(cbuf)) {
-		cbuf->start += size - 1;
-		cbuf->start %= cbuf->maxlen;
-	}
-	else {
-		cbuf->start += size;
-		cbuf->start %= cbuf->maxlen;
-	}
-	return 0;
-}
-
-/* buffer del */
-
-int
-cirbuf_del_buf_tail(struct cirbuf *cbuf, unsigned int size)
-{
-	if (!cbuf || !size || size > CIRBUF_GET_LEN(cbuf))
-		return -EINVAL;
-
-	cbuf->len -= size;
-	if (CIRBUF_IS_EMPTY(cbuf)) {
-		cbuf->end  += (cbuf->maxlen - size + 1);
-		cbuf->end %= cbuf->maxlen;
-	}
-	else {
-		cbuf->end  += (cbuf->maxlen - size);
-		cbuf->end %= cbuf->maxlen;
-	}
-	return 0;
-}
-
-/* del at head */
-
-static inline void
-__cirbuf_del_head(struct cirbuf * cbuf)
-{
-	cbuf->len --;
-	if (!CIRBUF_IS_EMPTY(cbuf)) {
-		cbuf->start ++;
-		cbuf->start %= cbuf->maxlen;
-	}
-}
-
-int
-cirbuf_del_head_safe(struct cirbuf * cbuf)
-{
-	if (cbuf && !CIRBUF_IS_EMPTY(cbuf)) {
-		__cirbuf_del_head(cbuf);
-		return 0;
-	}
-	return -EINVAL;
-}
-
-void
-cirbuf_del_head(struct cirbuf * cbuf)
-{
-	__cirbuf_del_head(cbuf);
-}
-
-/* del at tail */
-
-static inline void
-__cirbuf_del_tail(struct cirbuf * cbuf)
-{
-	cbuf->len --;
-	if (!CIRBUF_IS_EMPTY(cbuf)) {
-		cbuf->end  += (cbuf->maxlen - 1);
-		cbuf->end %= cbuf->maxlen;
-	}
-}
-
-int
-cirbuf_del_tail_safe(struct cirbuf * cbuf)
-{
-	if (cbuf && !CIRBUF_IS_EMPTY(cbuf)) {
-		__cirbuf_del_tail(cbuf);
-		return 0;
-	}
-	return -EINVAL;
-}
-
-void
-cirbuf_del_tail(struct cirbuf * cbuf)
-{
-	__cirbuf_del_tail(cbuf);
-}
-
-/* convert to buffer */
-
-int
-cirbuf_get_buf_head(struct cirbuf *cbuf, char *c, unsigned int size)
-{
-	unsigned int n;
-
-	if (!cbuf || !c)
-		return -EINVAL;
-
-	n = (size < CIRBUF_GET_LEN(cbuf)) ? size : CIRBUF_GET_LEN(cbuf);
-
-	if (!n)
-		return 0;
-
-	if (cbuf->start <= cbuf->end) {
-		dprintf("s[%d] -> d[%d] (%d)\n", cbuf->start, 0, n);
-		memcpy(c, cbuf->buf + cbuf->start , n);
-	}
-	else {
-		/* check if we need to go from end to the beginning */
-		if (n <= cbuf->maxlen - cbuf->start) {
-			dprintf("s[%d] -> d[%d] (%d)\n", 0, cbuf->start, n);
-			memcpy(c, cbuf->buf + cbuf->start , n);
-		}
-		else {
-			dprintf("s[%d] -> d[%d] (%d)\n", cbuf->start, 0,
-				cbuf->maxlen - cbuf->start);
-			dprintf("s[%d] -> d[%d] (%d)\n", 0, cbuf->maxlen - cbuf->start,
-				n - cbuf->maxlen + cbuf->start);
-			memcpy(c, cbuf->buf + cbuf->start , cbuf->maxlen - cbuf->start);
-			memcpy(c + cbuf->maxlen - cbuf->start, cbuf->buf,
-				   n - cbuf->maxlen + cbuf->start);
-		}
-	}
-	return n;
-}
-
-/* convert to buffer */
-
-int
-cirbuf_get_buf_tail(struct cirbuf *cbuf, char *c, unsigned int size)
-{
-	unsigned int n;
-
-	if (!cbuf || !c)
-		return -EINVAL;
-
-	n = (size < CIRBUF_GET_LEN(cbuf)) ? size : CIRBUF_GET_LEN(cbuf);
-
-	if (!n)
-		return 0;
-
-	if (cbuf->start <= cbuf->end) {
-		dprintf("s[%d] -> d[%d] (%d)\n", cbuf->end - n + 1, 0, n);
-		memcpy(c, cbuf->buf + cbuf->end - n + 1, n);
-	}
-	else {
-		/* check if we need to go from end to the beginning */
-		if (n <= cbuf->end + 1) {
-			dprintf("s[%d] -> d[%d] (%d)\n", 0, cbuf->end - n + 1, n);
-			memcpy(c, cbuf->buf + cbuf->end - n + 1, n);
-		}
-		else {
-			dprintf("s[%d] -> d[%d] (%d)\n", 0,
-				cbuf->maxlen - cbuf->start, cbuf->end + 1);
-			dprintf("s[%d] -> d[%d] (%d)\n",
-				cbuf->maxlen - n + cbuf->end + 1, 0, n - cbuf->end - 1);
-			memcpy(c + cbuf->maxlen - cbuf->start,
-					       cbuf->buf, cbuf->end + 1);
-			memcpy(c, cbuf->buf + cbuf->maxlen - n + cbuf->end +1,
-				   n - cbuf->end - 1);
-		}
-	}
-	return n;
-}
-
-/* get head or get tail */
-
-char
-cirbuf_get_head(struct cirbuf * cbuf)
-{
-	return cbuf->buf[cbuf->start];
-}
-
-/* get head or get tail */
-
-char
-cirbuf_get_tail(struct cirbuf * cbuf)
-{
-	return cbuf->buf[cbuf->end];
-}
diff --git a/lib/librte_cmdline/cmdline_cirbuf.h b/lib/librte_cmdline/cmdline_cirbuf.h
deleted file mode 100644
index 6321dec..0000000
--- a/lib/librte_cmdline/cmdline_cirbuf.h
+++ /dev/null
@@ -1,245 +0,0 @@
-/*-
- *   BSD LICENSE
- *
- *   Copyright(c) 2010-2014 Intel Corporation. All rights reserved.
- *   All rights reserved.
- *
- *   Redistribution and use in source and binary forms, with or without
- *   modification, are permitted provided that the following conditions
- *   are met:
- *
- *     * Redistributions of source code must retain the above copyright
- *       notice, this list of conditions and the following disclaimer.
- *     * Redistributions in binary form must reproduce the above copyright
- *       notice, this list of conditions and the following disclaimer in
- *       the documentation and/or other materials provided with the
- *       distribution.
- *     * Neither the name of Intel Corporation nor the names of its
- *       contributors may be used to endorse or promote products derived
- *       from this software without specific prior written permission.
- *
- *   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- *   "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- *   LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- *   A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- *   OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- *   LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- *   DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- *   THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- *   (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- *   OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/*
- * Copyright (c) 2009, Olivier MATZ <zer0@droids-corp.org>
- * All rights reserved.
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- *     * Redistributions of source code must retain the above copyright
- *       notice, this list of conditions and the following disclaimer.
- *     * Redistributions in binary form must reproduce the above copyright
- *       notice, this list of conditions and the following disclaimer in the
- *       documentation and/or other materials provided with the distribution.
- *     * Neither the name of the University of California, Berkeley nor the
- *       names of its contributors may be used to endorse or promote products
- *       derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE REGENTS AND CONTRIBUTORS BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef _CIRBUF_H_
-#define _CIRBUF_H_
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/**
- * This structure is the header of a cirbuf type.
- */
-struct cirbuf {
-	unsigned int maxlen;    /**< total len of the fifo (number of elements) */
-	unsigned int start;     /**< indice of the first elt */
-	unsigned int end;       /**< indice of the last elt */
-	unsigned int len;       /**< current len of fifo */
-	char *buf;
-};
-
-#ifdef RTE_LIBRTE_CMDLINE_DEBUG
-#define dprintf_(fmt, ...) printf("line %3.3d - " fmt "%.0s", __LINE__, __VA_ARGS__)
-#define dprintf(...) dprintf_(__VA_ARGS__, "dummy")
-#else
-#define dprintf(...) (void)0
-#endif
-
-
-/**
- * Init the circular buffer
- */
-int cirbuf_init(struct cirbuf *cbuf, char *buf, unsigned int start, unsigned int maxlen);
-
-
-/**
- * Return 1 if the circular buffer is full
- */
-#define CIRBUF_IS_FULL(cirbuf) ((cirbuf)->maxlen == (cirbuf)->len)
-
-/**
- * Return 1 if the circular buffer is empty
- */
-#define CIRBUF_IS_EMPTY(cirbuf) ((cirbuf)->len == 0)
-
-/**
- * return current size of the circular buffer (number of used elements)
- */
-#define CIRBUF_GET_LEN(cirbuf) ((cirbuf)->len)
-
-/**
- * return size of the circular buffer (used + free elements)
- */
-#define CIRBUF_GET_MAXLEN(cirbuf) ((cirbuf)->maxlen)
-
-/**
- * return the number of free elts
- */
-#define CIRBUF_GET_FREELEN(cirbuf) ((cirbuf)->maxlen - (cirbuf)->len)
-
-/**
- * Iterator for a circular buffer
- *   c: struct cirbuf pointer
- *   i: an integer type internally used in the macro
- *   e: char that takes the value for each iteration
- */
-#define CIRBUF_FOREACH(c, i, e)                                 \
-	for ( i=0, e=(c)->buf[(c)->start] ;                     \
-		i<((c)->len) ;                                  \
-		i ++,  e=(c)->buf[((c)->start+i)%((c)->maxlen)])
-
-
-/**
- * Add a character at head of the circular buffer. Return 0 on success, or
- * a negative value on error.
- */
-int cirbuf_add_head_safe(struct cirbuf *cbuf, char c);
-
-/**
- * Add a character at head of the circular buffer. You _must_ check that you
- * have enough free space in the buffer before calling this func.
- */
-void cirbuf_add_head(struct cirbuf *cbuf, char c);
-
-/**
- * Add a character at tail of the circular buffer. Return 0 on success, or
- * a negative value on error.
- */
-int cirbuf_add_tail_safe(struct cirbuf *cbuf, char c);
-
-/**
- * Add a character at tail of the circular buffer. You _must_ check that you
- * have enough free space in the buffer before calling this func.
- */
-void cirbuf_add_tail(struct cirbuf *cbuf, char c);
-
-/**
- * Remove a char at the head of the circular buffer. Return 0 on
- * success, or a negative value on error.
- */
-int cirbuf_del_head_safe(struct cirbuf *cbuf);
-
-/**
- * Remove a char at the head of the circular buffer. You _must_ check
- * that buffer is not empty before calling the function.
- */
-void cirbuf_del_head(struct cirbuf *cbuf);
-
-/**
- * Remove a char at the tail of the circular buffer. Return 0 on
- * success, or a negative value on error.
- */
-int cirbuf_del_tail_safe(struct cirbuf *cbuf);
-
-/**
- * Remove a char at the tail of the circular buffer. You _must_ check
- * that buffer is not empty before calling the function.
- */
-void cirbuf_del_tail(struct cirbuf *cbuf);
-
-/**
- * Return the head of the circular buffer. You _must_ check that
- * buffer is not empty before calling the function.
- */
-char cirbuf_get_head(struct cirbuf *cbuf);
-
-/**
- * Return the tail of the circular buffer. You _must_ check that
- * buffer is not empty before calling the function.
- */
-char cirbuf_get_tail(struct cirbuf *cbuf);
-
-/**
- * Add a buffer at head of the circular buffer. 'c' is a pointer to a
- * buffer, and n is the number of char to add. Return the number of
- * copied bytes on success, or a negative value on error.
- */
-int cirbuf_add_buf_head(struct cirbuf *cbuf, const char *c, unsigned int n);
-
-/**
- * Add a buffer at tail of the circular buffer. 'c' is a pointer to a
- * buffer, and n is the number of char to add. Return the number of
- * copied bytes on success, or a negative value on error.
- */
-int cirbuf_add_buf_tail(struct cirbuf *cbuf, const char *c, unsigned int n);
-
-/**
- * Remove chars at the head of the circular buffer. Return 0 on
- * success, or a negative value on error.
- */
-int cirbuf_del_buf_head(struct cirbuf *cbuf, unsigned int size);
-
-/**
- * Remove chars at the tail of the circular buffer. Return 0 on
- * success, or a negative value on error.
- */
-int cirbuf_del_buf_tail(struct cirbuf *cbuf, unsigned int size);
-
-/**
- * Copy a maximum of 'size' characters from the head of the circular
- * buffer to a flat one pointed by 'c'. Return the number of copied
- * chars.
- */
-int cirbuf_get_buf_head(struct cirbuf *cbuf, char *c, unsigned int size);
-
-/**
- * Copy a maximum of 'size' characters from the tail of the circular
- * buffer to a flat one pointed by 'c'. Return the number of copied
- * chars.
- */
-int cirbuf_get_buf_tail(struct cirbuf *cbuf, char *c, unsigned int size);
-
-
-/**
- * Set the start of the data to the index 0 of the internal buffer.
- */
-int cirbuf_align_left(struct cirbuf *cbuf);
-
-/**
- * Set the end of the data to the last index of the internal buffer.
- */
-int cirbuf_align_right(struct cirbuf *cbuf);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _CIRBUF_H_ */
diff --git a/lib/librte_cmdline/cmdline_parse.c b/lib/librte_cmdline/cmdline_parse.c
index 3e12ee5..0cc0b57 100644
--- a/lib/librte_cmdline/cmdline_parse.c
+++ b/lib/librte_cmdline/cmdline_parse.c
@@ -70,7 +70,6 @@
 
 #include <rte_string_fns.h>
 
-#include "cmdline_rdline.h"
 #include "cmdline_parse.h"
 #include "cmdline.h"
 
@@ -267,7 +266,7 @@ cmdline_parse(struct cmdline *cl, const char * buf)
 	if (!cl || !buf)
 		return CMDLINE_PARSE_BAD_ARGS;
 
-	ctx = cl->ctx;
+	ctx = cmdline_ctx_get(cl);
 
 	/*
 	 * - look if the buffer contains at least one line
@@ -386,7 +385,7 @@ cmdline_complete(struct cmdline *cl, const char *buf, int *state,
 	if (!cl || !buf || !state || !dst)
 		return -1;
 
-	ctx = cl->ctx;
+	ctx = cmdline_ctx_get(cl);
 
 	debug_printf("%s called\n", __func__);
 	memset(&token_hdr, 0, sizeof(token_hdr));
@@ -398,7 +397,7 @@ cmdline_complete(struct cmdline *cl, const char *buf, int *state,
 		if (isblank2(buf[i]) && !isblank2(buf[i+1]))
 			partial_tok = buf+i+1;
 	}
-	partial_tok_len = strnlen(partial_tok, RDLINE_BUF_SIZE);
+	partial_tok_len = strlen(partial_tok);
 
 	/* first call -> do a first pass */
 	if (*state <= 0) {
diff --git a/lib/librte_cmdline/cmdline_rdline.c b/lib/librte_cmdline/cmdline_rdline.c
deleted file mode 100644
index 1ef2258..0000000
--- a/lib/librte_cmdline/cmdline_rdline.c
+++ /dev/null
@@ -1,697 +0,0 @@
-/*-
- *   BSD LICENSE
- *
- *   Copyright(c) 2010-2014 Intel Corporation. All rights reserved.
- *   All rights reserved.
- *
- *   Redistribution and use in source and binary forms, with or without
- *   modification, are permitted provided that the following conditions
- *   are met:
- *
- *     * Redistributions of source code must retain the above copyright
- *       notice, this list of conditions and the following disclaimer.
- *     * Redistributions in binary form must reproduce the above copyright
- *       notice, this list of conditions and the following disclaimer in
- *       the documentation and/or other materials provided with the
- *       distribution.
- *     * Neither the name of Intel Corporation nor the names of its
- *       contributors may be used to endorse or promote products derived
- *       from this software without specific prior written permission.
- *
- *   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- *   "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- *   LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- *   A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- *   OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- *   LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- *   DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- *   THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- *   (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- *   OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/*
- * Copyright (c) 2009, Olivier MATZ <zer0@droids-corp.org>
- * All rights reserved.
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- *     * Redistributions of source code must retain the above copyright
- *       notice, this list of conditions and the following disclaimer.
- *     * Redistributions in binary form must reproduce the above copyright
- *       notice, this list of conditions and the following disclaimer in the
- *       documentation and/or other materials provided with the distribution.
- *     * Neither the name of the University of California, Berkeley nor the
- *       names of its contributors may be used to endorse or promote products
- *       derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE REGENTS AND CONTRIBUTORS BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include <stdlib.h>
-#include <stdio.h>
-#include <stdint.h>
-#include <string.h>
-#include <stdarg.h>
-#include <errno.h>
-#include <ctype.h>
-
-#include "cmdline_cirbuf.h"
-#include "cmdline_rdline.h"
-
-static void rdline_puts(struct rdline *rdl, const char *buf);
-static void rdline_miniprintf(struct rdline *rdl,
-			      const char *buf, unsigned int val);
-
-static void rdline_remove_old_history_item(struct rdline *rdl);
-static void rdline_remove_first_history_item(struct rdline *rdl);
-static unsigned int rdline_get_history_size(struct rdline *rdl);
-
-
-/* isblank() needs _XOPEN_SOURCE >= 600 || _ISOC99_SOURCE, so use our
- * own. */
-static int
-isblank2(char c)
-{
-	if (c == ' ' ||
-	    c == '\t' )
-		return 1;
-	return 0;
-}
-
-int
-rdline_init(struct rdline *rdl,
-		 rdline_write_char_t *write_char,
-		 rdline_validate_t *validate,
-		 rdline_complete_t *complete)
-{
-	if (!rdl || !write_char || !validate || !complete)
-		return -EINVAL;
-	memset(rdl, 0, sizeof(*rdl));
-	rdl->validate = validate;
-	rdl->complete = complete;
-	rdl->write_char = write_char;
-	rdl->status = RDLINE_INIT;
-	return cirbuf_init(&rdl->history, rdl->history_buf, 0, RDLINE_HISTORY_BUF_SIZE);
-}
-
-void
-rdline_newline(struct rdline *rdl, const char *prompt)
-{
-	unsigned int i;
-
-	if (!rdl || !prompt)
-		return;
-
-	vt100_init(&rdl->vt100);
-	cirbuf_init(&rdl->left, rdl->left_buf, 0, RDLINE_BUF_SIZE);
-	cirbuf_init(&rdl->right, rdl->right_buf, 0, RDLINE_BUF_SIZE);
-
-	rdl->prompt_size = strnlen(prompt, RDLINE_PROMPT_SIZE-1);
-	if (prompt != rdl->prompt)
-		memcpy(rdl->prompt, prompt, rdl->prompt_size);
-	rdl->prompt[RDLINE_PROMPT_SIZE-1] = '\0';
-
-	for (i=0 ; i<rdl->prompt_size ; i++)
-		rdl->write_char(rdl, rdl->prompt[i]);
-	rdl->status = RDLINE_RUNNING;
-
-	rdl->history_cur_line = -1;
-}
-
-void
-rdline_stop(struct rdline *rdl)
-{
-	if (!rdl)
-		return;
-	rdl->status = RDLINE_INIT;
-}
-
-void
-rdline_quit(struct rdline *rdl)
-{
-	if (!rdl)
-		return;
-	rdl->status = RDLINE_EXITED;
-}
-
-void
-rdline_restart(struct rdline *rdl)
-{
-	if (!rdl)
-		return;
-	rdl->status = RDLINE_RUNNING;
-}
-
-void
-rdline_reset(struct rdline *rdl)
-{
-	if (!rdl)
-		return;
-	vt100_init(&rdl->vt100);
-	cirbuf_init(&rdl->left, rdl->left_buf, 0, RDLINE_BUF_SIZE);
-	cirbuf_init(&rdl->right, rdl->right_buf, 0, RDLINE_BUF_SIZE);
-
-	rdl->status = RDLINE_RUNNING;
-
-	rdl->history_cur_line = -1;
-}
-
-const char *
-rdline_get_buffer(struct rdline *rdl)
-{
-	if (!rdl)
-		return NULL;
-	unsigned int len_l, len_r;
-	cirbuf_align_left(&rdl->left);
-	cirbuf_align_left(&rdl->right);
-
-	len_l = CIRBUF_GET_LEN(&rdl->left);
-	len_r = CIRBUF_GET_LEN(&rdl->right);
-	memcpy(rdl->left_buf+len_l, rdl->right_buf, len_r);
-
-	rdl->left_buf[len_l + len_r] = '\n';
-	rdl->left_buf[len_l + len_r + 1] = '\0';
-	return rdl->left_buf;
-}
-
-static void
-display_right_buffer(struct rdline *rdl, int force)
-{
-	unsigned int i;
-	char tmp;
-
-	if (!force && CIRBUF_IS_EMPTY(&rdl->right))
-		return;
-
-	rdline_puts(rdl, vt100_clear_right);
-	CIRBUF_FOREACH(&rdl->right, i, tmp) {
-		rdl->write_char(rdl, tmp);
-	}
-	if (!CIRBUF_IS_EMPTY(&rdl->right))
-		rdline_miniprintf(rdl, vt100_multi_left,
-				  CIRBUF_GET_LEN(&rdl->right));
-}
-
-void
-rdline_redisplay(struct rdline *rdl)
-{
-	unsigned int i;
-	char tmp;
-
-	if (!rdl)
-		return;
-
-	rdline_puts(rdl, vt100_home);
-	for (i=0 ; i<rdl->prompt_size ; i++)
-		rdl->write_char(rdl, rdl->prompt[i]);
-	CIRBUF_FOREACH(&rdl->left, i, tmp) {
-		rdl->write_char(rdl, tmp);
-	}
-	display_right_buffer(rdl, 1);
-}
-
-int
-rdline_char_in(struct rdline *rdl, char c)
-{
-	unsigned int i;
-	int cmd;
-	char tmp;
-	char *buf;
-
-	if (!rdl)
-		return -EINVAL;
-
-	if (rdl->status == RDLINE_EXITED)
-		return RDLINE_RES_EXITED;
-	if (rdl->status != RDLINE_RUNNING)
-		return RDLINE_RES_NOT_RUNNING;
-
-	cmd = vt100_parser(&rdl->vt100, c);
-	if (cmd == -2)
-		return RDLINE_RES_SUCCESS;
-
-	if (cmd >= 0) {
-		switch (cmd) {
-		/* move caret 1 char to the left */
-		case CMDLINE_KEY_CTRL_B:
-		case CMDLINE_KEY_LEFT_ARR:
-			if (CIRBUF_IS_EMPTY(&rdl->left))
-				break;
-			tmp = cirbuf_get_tail(&rdl->left);
-			cirbuf_del_tail(&rdl->left);
-			cirbuf_add_head(&rdl->right, tmp);
-			rdline_puts(rdl, vt100_left_arr);
-			break;
-
-		/* move caret 1 char to the right */
-		case CMDLINE_KEY_CTRL_F:
-		case CMDLINE_KEY_RIGHT_ARR:
-			if (CIRBUF_IS_EMPTY(&rdl->right))
-				break;
-			tmp = cirbuf_get_head(&rdl->right);
-			cirbuf_del_head(&rdl->right);
-			cirbuf_add_tail(&rdl->left, tmp);
-			rdline_puts(rdl, vt100_right_arr);
-			break;
-
-		/* move caret 1 word to the left */
-		/* keyboard equivalent: Alt+B */
-		case CMDLINE_KEY_WLEFT:
-			while (! CIRBUF_IS_EMPTY(&rdl->left) &&
-			       (tmp = cirbuf_get_tail(&rdl->left)) &&
-			       isblank2(tmp)) {
-				rdline_puts(rdl, vt100_left_arr);
-				cirbuf_del_tail(&rdl->left);
-				cirbuf_add_head(&rdl->right, tmp);
-			}
-			while (! CIRBUF_IS_EMPTY(&rdl->left) &&
-			       (tmp = cirbuf_get_tail(&rdl->left)) &&
-			       !isblank2(tmp)) {
-				rdline_puts(rdl, vt100_left_arr);
-				cirbuf_del_tail(&rdl->left);
-				cirbuf_add_head(&rdl->right, tmp);
-			}
-			break;
-
-		/* move caret 1 word to the right */
-		/* keyboard equivalent: Alt+F */
-		case CMDLINE_KEY_WRIGHT:
-			while (! CIRBUF_IS_EMPTY(&rdl->right) &&
-			       (tmp = cirbuf_get_head(&rdl->right)) &&
-			       isblank2(tmp)) {
-				rdline_puts(rdl, vt100_right_arr);
-				cirbuf_del_head(&rdl->right);
-				cirbuf_add_tail(&rdl->left, tmp);
-			}
-			while (! CIRBUF_IS_EMPTY(&rdl->right) &&
-			       (tmp = cirbuf_get_head(&rdl->right)) &&
-			       !isblank2(tmp)) {
-				rdline_puts(rdl, vt100_right_arr);
-				cirbuf_del_head(&rdl->right);
-				cirbuf_add_tail(&rdl->left, tmp);
-			}
-			break;
-
-		/* move caret to the left */
-		case CMDLINE_KEY_CTRL_A:
-			if (CIRBUF_IS_EMPTY(&rdl->left))
-				break;
-			rdline_miniprintf(rdl, vt100_multi_left,
-						CIRBUF_GET_LEN(&rdl->left));
-			while (! CIRBUF_IS_EMPTY(&rdl->left)) {
-				tmp = cirbuf_get_tail(&rdl->left);
-				cirbuf_del_tail(&rdl->left);
-				cirbuf_add_head(&rdl->right, tmp);
-			}
-			break;
-
-		/* move caret to the right */
-		case CMDLINE_KEY_CTRL_E:
-			if (CIRBUF_IS_EMPTY(&rdl->right))
-				break;
-			rdline_miniprintf(rdl, vt100_multi_right,
-						CIRBUF_GET_LEN(&rdl->right));
-			while (! CIRBUF_IS_EMPTY(&rdl->right)) {
-				tmp = cirbuf_get_head(&rdl->right);
-				cirbuf_del_head(&rdl->right);
-				cirbuf_add_tail(&rdl->left, tmp);
-			}
-			break;
-
-		/* delete 1 char from the left */
-		case CMDLINE_KEY_BKSPACE:
-			if(!cirbuf_del_tail_safe(&rdl->left)) {
-				rdline_puts(rdl, vt100_bs);
-				display_right_buffer(rdl, 1);
-			}
-			break;
-
-		/* delete 1 char from the right */
-		case CMDLINE_KEY_SUPPR:
-		case CMDLINE_KEY_CTRL_D:
-			if (cmd == CMDLINE_KEY_CTRL_D &&
-			    CIRBUF_IS_EMPTY(&rdl->left) &&
-			    CIRBUF_IS_EMPTY(&rdl->right)) {
-				return RDLINE_RES_EOF;
-			}
-			if (!cirbuf_del_head_safe(&rdl->right)) {
-				display_right_buffer(rdl, 1);
-			}
-			break;
-
-		/* delete 1 word from the left */
-		case CMDLINE_KEY_META_BKSPACE:
-		case CMDLINE_KEY_CTRL_W:
-			while (! CIRBUF_IS_EMPTY(&rdl->left) && isblank2(cirbuf_get_tail(&rdl->left))) {
-				rdline_puts(rdl, vt100_bs);
-				cirbuf_del_tail(&rdl->left);
-			}
-			while (! CIRBUF_IS_EMPTY(&rdl->left) && !isblank2(cirbuf_get_tail(&rdl->left))) {
-				rdline_puts(rdl, vt100_bs);
-				cirbuf_del_tail(&rdl->left);
-			}
-			display_right_buffer(rdl, 1);
-			break;
-
-		/* delete 1 word from the right */
-		case CMDLINE_KEY_META_D:
-			while (! CIRBUF_IS_EMPTY(&rdl->right) && isblank2(cirbuf_get_head(&rdl->right)))
-				cirbuf_del_head(&rdl->right);
-			while (! CIRBUF_IS_EMPTY(&rdl->right) && !isblank2(cirbuf_get_head(&rdl->right)))
-				cirbuf_del_head(&rdl->right);
-			display_right_buffer(rdl, 1);
-			break;
-
-		/* set kill buffer to contents on the right side of caret */
-		case CMDLINE_KEY_CTRL_K:
-			cirbuf_get_buf_head(&rdl->right, rdl->kill_buf, RDLINE_BUF_SIZE);
-			rdl->kill_size = CIRBUF_GET_LEN(&rdl->right);
-			cirbuf_del_buf_head(&rdl->right, rdl->kill_size);
-			rdline_puts(rdl, vt100_clear_right);
-			break;
-
-		/* paste contents of kill buffer to the left side of caret */
-		case CMDLINE_KEY_CTRL_Y:
-			i=0;
-			while(CIRBUF_GET_LEN(&rdl->right) + CIRBUF_GET_LEN(&rdl->left) <
-			      RDLINE_BUF_SIZE &&
-			      i < rdl->kill_size) {
-				cirbuf_add_tail(&rdl->left, rdl->kill_buf[i]);
-				rdl->write_char(rdl, rdl->kill_buf[i]);
-				i++;
-			}
-			display_right_buffer(rdl, 0);
-			break;
-
-		/* clear and newline */
-		case CMDLINE_KEY_CTRL_C:
-			rdline_puts(rdl, "\r\n");
-			rdline_newline(rdl, rdl->prompt);
-			break;
-
-		/* redisplay (helps when prompt is lost in other output) */
-		case CMDLINE_KEY_CTRL_L:
-			rdline_redisplay(rdl);
-			break;
-
-		/* autocomplete */
-		case CMDLINE_KEY_TAB:
-		case CMDLINE_KEY_HELP:
-			cirbuf_align_left(&rdl->left);
-			rdl->left_buf[CIRBUF_GET_LEN(&rdl->left)] = '\0';
-			if (rdl->complete) {
-				char tmp_buf[BUFSIZ];
-				int complete_state;
-				int ret;
-				unsigned int tmp_size;
-
-				if (cmd == CMDLINE_KEY_TAB)
-					complete_state = 0;
-				else
-					complete_state = -1;
-
-				/* see in parse.h for help on complete() */
-				ret = rdl->complete(rdl, rdl->left_buf,
-						    tmp_buf, sizeof(tmp_buf),
-						    &complete_state);
-				/* no completion or error */
-				if (ret <= 0) {
-					return RDLINE_RES_COMPLETE;
-				}
-
-				tmp_size = strnlen(tmp_buf, sizeof(tmp_buf));
-				/* add chars */
-				if (ret == RDLINE_RES_COMPLETE) {
-					i=0;
-					while(CIRBUF_GET_LEN(&rdl->right) + CIRBUF_GET_LEN(&rdl->left) <
-					      RDLINE_BUF_SIZE &&
-					      i < tmp_size) {
-						cirbuf_add_tail(&rdl->left, tmp_buf[i]);
-						rdl->write_char(rdl, tmp_buf[i]);
-						i++;
-					}
-					display_right_buffer(rdl, 1);
-					return RDLINE_RES_COMPLETE; /* ?? */
-				}
-
-				/* choice */
-				rdline_puts(rdl, "\r\n");
-				while (ret) {
-					rdl->write_char(rdl, ' ');
-					for (i=0 ; tmp_buf[i] ; i++)
-						rdl->write_char(rdl, tmp_buf[i]);
-					rdline_puts(rdl, "\r\n");
-					ret = rdl->complete(rdl, rdl->left_buf,
-							    tmp_buf, sizeof(tmp_buf),
-							    &complete_state);
-				}
-
-				rdline_redisplay(rdl);
-			}
-			return RDLINE_RES_COMPLETE;
-
-		/* complete buffer */
-		case CMDLINE_KEY_RETURN:
-		case CMDLINE_KEY_RETURN2:
-			rdline_get_buffer(rdl);
-			rdl->status = RDLINE_INIT;
-			rdline_puts(rdl, "\r\n");
-			if (rdl->history_cur_line != -1)
-				rdline_remove_first_history_item(rdl);
-
-			if (rdl->validate)
-				rdl->validate(rdl, rdl->left_buf, CIRBUF_GET_LEN(&rdl->left)+2);
-			/* user may have stopped rdline */
-			if (rdl->status == RDLINE_EXITED)
-				return RDLINE_RES_EXITED;
-			return RDLINE_RES_VALIDATED;
-
-		/* previous element in history */
-		case CMDLINE_KEY_UP_ARR:
-		case CMDLINE_KEY_CTRL_P:
-			if (rdl->history_cur_line == 0) {
-				rdline_remove_first_history_item(rdl);
-			}
-			if (rdl->history_cur_line <= 0) {
-				rdline_add_history(rdl, rdline_get_buffer(rdl));
-				rdl->history_cur_line = 0;
-			}
-
-			buf = rdline_get_history_item(rdl, rdl->history_cur_line + 1);
-			if (!buf)
-				break;
-
-			rdl->history_cur_line ++;
-			vt100_init(&rdl->vt100);
-			cirbuf_init(&rdl->left, rdl->left_buf, 0, RDLINE_BUF_SIZE);
-			cirbuf_init(&rdl->right, rdl->right_buf, 0, RDLINE_BUF_SIZE);
-			cirbuf_add_buf_tail(&rdl->left, buf, strnlen(buf, RDLINE_BUF_SIZE));
-			rdline_redisplay(rdl);
-			break;
-
-		/* next element in history */
-		case CMDLINE_KEY_DOWN_ARR:
-		case CMDLINE_KEY_CTRL_N:
-			if (rdl->history_cur_line - 1 < 0)
-				break;
-
-			rdl->history_cur_line --;
-			buf = rdline_get_history_item(rdl, rdl->history_cur_line);
-			if (!buf)
-				break;
-			vt100_init(&rdl->vt100);
-			cirbuf_init(&rdl->left, rdl->left_buf, 0, RDLINE_BUF_SIZE);
-			cirbuf_init(&rdl->right, rdl->right_buf, 0, RDLINE_BUF_SIZE);
-			cirbuf_add_buf_tail(&rdl->left, buf, strnlen(buf, RDLINE_BUF_SIZE));
-			rdline_redisplay(rdl);
-
-			break;
-
-
-		default:
-			break;
-		}
-
-		return RDLINE_RES_SUCCESS;
-	}
-
-	if (!isprint((int)c))
-		return RDLINE_RES_SUCCESS;
-
-	/* standard chars */
-	if (CIRBUF_GET_LEN(&rdl->left) + CIRBUF_GET_LEN(&rdl->right) >= RDLINE_BUF_SIZE)
-		return RDLINE_RES_SUCCESS;
-
-	if (cirbuf_add_tail_safe(&rdl->left, c))
-		return RDLINE_RES_SUCCESS;
-
-	rdl->write_char(rdl, c);
-	display_right_buffer(rdl, 0);
-
-	return RDLINE_RES_SUCCESS;
-}
-
-
-/* HISTORY */
-
-static void
-rdline_remove_old_history_item(struct rdline * rdl)
-{
-	char tmp;
-
-	while (! CIRBUF_IS_EMPTY(&rdl->history) ) {
-		tmp = cirbuf_get_head(&rdl->history);
-		cirbuf_del_head(&rdl->history);
-		if (!tmp)
-			break;
-	}
-}
-
-static void
-rdline_remove_first_history_item(struct rdline * rdl)
-{
-	char tmp;
-
-	if ( CIRBUF_IS_EMPTY(&rdl->history) ) {
-		return;
-	}
-	else {
-		cirbuf_del_tail(&rdl->history);
-	}
-
-	while (! CIRBUF_IS_EMPTY(&rdl->history) ) {
-		tmp = cirbuf_get_tail(&rdl->history);
-		if (!tmp)
-			break;
-		cirbuf_del_tail(&rdl->history);
-	}
-}
-
-static unsigned int
-rdline_get_history_size(struct rdline * rdl)
-{
-	unsigned int i, tmp, ret=0;
-
-	CIRBUF_FOREACH(&rdl->history, i, tmp) {
-		if (tmp == 0)
-			ret ++;
-	}
-
-	return ret;
-}
-
-char *
-rdline_get_history_item(struct rdline * rdl, unsigned int idx)
-{
-	unsigned int len, i, tmp;
-
-	if (!rdl)
-		return NULL;
-
-	len = rdline_get_history_size(rdl);
-	if ( idx >= len ) {
-		return NULL;
-	}
-
-	cirbuf_align_left(&rdl->history);
-
-	CIRBUF_FOREACH(&rdl->history, i, tmp) {
-		if ( idx == len - 1) {
-			return rdl->history_buf + i;
-		}
-		if (tmp == 0)
-			len --;
-	}
-
-	return NULL;
-}
-
-int
-rdline_add_history(struct rdline * rdl, const char * buf)
-{
-	unsigned int len, i;
-
-	if (!rdl || !buf)
-		return -EINVAL;
-
-	len = strnlen(buf, RDLINE_BUF_SIZE);
-	for (i=0; i<len ; i++) {
-		if (buf[i] == '\n') {
-			len = i;
-			break;
-		}
-	}
-
-	if ( len >= RDLINE_HISTORY_BUF_SIZE )
-		return -1;
-
-	while ( len >= CIRBUF_GET_FREELEN(&rdl->history) ) {
-		rdline_remove_old_history_item(rdl);
-	}
-
-	cirbuf_add_buf_tail(&rdl->history, buf, len);
-	cirbuf_add_tail(&rdl->history, 0);
-
-	return 0;
-}
-
-void
-rdline_clear_history(struct rdline * rdl)
-{
-	if (!rdl)
-		return;
-	cirbuf_init(&rdl->history, rdl->history_buf, 0, RDLINE_HISTORY_BUF_SIZE);
-}
-
-
-/* STATIC USEFUL FUNCS */
-
-static void
-rdline_puts(struct rdline * rdl, const char * buf)
-{
-	char c;
-	while ( (c = *(buf++)) != '\0' ) {
-		rdl->write_char(rdl, c);
-	}
-}
-
-/* a very very basic printf with one arg and one format 'u' */
-static void
-rdline_miniprintf(struct rdline *rdl, const char * buf, unsigned int val)
-{
-	char c, started=0, div=100;
-
-	while ( (c=*(buf++)) ) {
-		if (c != '%') {
-			rdl->write_char(rdl, c);
-			continue;
-		}
-		c = *(buf++);
-		if (c != 'u') {
-			rdl->write_char(rdl, '%');
-			rdl->write_char(rdl, c);
-			continue;
-		}
-		/* val is never more than 255 */
-		while (div) {
-			c = (char)(val / div);
-			if (c || started) {
-				rdl->write_char(rdl, (char)(c+'0'));
-				started = 1;
-			}
-			val %= div;
-			div /= 10;
-		}
-	}
-}
diff --git a/lib/librte_cmdline/cmdline_rdline.h b/lib/librte_cmdline/cmdline_rdline.h
deleted file mode 100644
index 72e2dad..0000000
--- a/lib/librte_cmdline/cmdline_rdline.h
+++ /dev/null
@@ -1,255 +0,0 @@
-/*-
- *   BSD LICENSE
- *
- *   Copyright(c) 2010-2014 Intel Corporation. All rights reserved.
- *   All rights reserved.
- *
- *   Redistribution and use in source and binary forms, with or without
- *   modification, are permitted provided that the following conditions
- *   are met:
- *
- *     * Redistributions of source code must retain the above copyright
- *       notice, this list of conditions and the following disclaimer.
- *     * Redistributions in binary form must reproduce the above copyright
- *       notice, this list of conditions and the following disclaimer in
- *       the documentation and/or other materials provided with the
- *       distribution.
- *     * Neither the name of Intel Corporation nor the names of its
- *       contributors may be used to endorse or promote products derived
- *       from this software without specific prior written permission.
- *
- *   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- *   "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- *   LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- *   A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- *   OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- *   LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- *   DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- *   THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- *   (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- *   OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/*
- * Copyright (c) 2009, Olivier MATZ <zer0@droids-corp.org>
- * All rights reserved.
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- *     * Redistributions of source code must retain the above copyright
- *       notice, this list of conditions and the following disclaimer.
- *     * Redistributions in binary form must reproduce the above copyright
- *       notice, this list of conditions and the following disclaimer in the
- *       documentation and/or other materials provided with the distribution.
- *     * Neither the name of the University of California, Berkeley nor the
- *       names of its contributors may be used to endorse or promote products
- *       derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE REGENTS AND CONTRIBUTORS BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef _RDLINE_H_
-#define _RDLINE_H_
-
-/**
- * This file is a small equivalent to the GNU readline library, but it
- * was originally designed for small systems, like Atmel AVR
- * microcontrollers (8 bits). Indeed, we don't use any malloc that is
- * sometimes not implemented (or just not recommended) on such
- * systems.
- *
- * Obviously, it does not support as many things as the GNU readline,
- * but at least it supports some interesting features like a kill
- * buffer and a command history.
- *
- * It also have a feature that does not have the GNU readline (as far
- * as I know): we can have several instances of it running at the same
- * time, even on a monothread program, since it works with callbacks.
- *
- * The lib is designed for a client-side or a server-side use:
- * - server-side: the server receives all data from a socket, including
- *   control chars, like arrows, tabulations, ... The client is
- *   very simple, it can be a telnet or a minicom through a serial line.
- * - client-side: the client receives its data through its stdin for
- *   instance.
- */
-
-#include <stdio.h>
-#include <cmdline_cirbuf.h>
-#include <cmdline_vt100.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/* configuration */
-#define RDLINE_BUF_SIZE 512
-#define RDLINE_PROMPT_SIZE  32
-#define RDLINE_VT100_BUF_SIZE  8
-#define RDLINE_HISTORY_BUF_SIZE BUFSIZ
-#define RDLINE_HISTORY_MAX_LINE 64
-
-enum rdline_status {
-	RDLINE_INIT,
-	RDLINE_RUNNING,
-	RDLINE_EXITED
-};
-
-struct rdline;
-
-typedef int (rdline_write_char_t)(struct rdline *rdl, char);
-typedef void (rdline_validate_t)(struct rdline *rdl,
-				 const char *buf, unsigned int size);
-typedef int (rdline_complete_t)(struct rdline *rdl, const char *buf,
-				char *dstbuf, unsigned int dstsize,
-				int *state);
-
-struct rdline {
-	enum rdline_status status;
-	/* rdline bufs */
-	struct cirbuf left;
-	struct cirbuf right;
-	char left_buf[RDLINE_BUF_SIZE+2]; /* reserve 2 chars for the \n\0 */
-	char right_buf[RDLINE_BUF_SIZE];
-
-	char prompt[RDLINE_PROMPT_SIZE];
-	unsigned int prompt_size;
-
-	char kill_buf[RDLINE_BUF_SIZE];
-	unsigned int kill_size;
-
-	/* history */
-	struct cirbuf history;
-	char history_buf[RDLINE_HISTORY_BUF_SIZE];
-	int history_cur_line;
-
-	/* callbacks and func pointers */
-	rdline_write_char_t *write_char;
-	rdline_validate_t *validate;
-	rdline_complete_t *complete;
-
-	/* vt100 parser */
-	struct cmdline_vt100 vt100;
-
-	/* opaque pointer */
-	void *opaque;
-};
-
-/**
- * Init fields for a struct rdline. Call this only once at the beginning
- * of your program.
- * \param rdl A pointer to an uninitialized struct rdline
- * \param write_char The function used by the function to write a character
- * \param validate A pointer to the function to execute when the
- *                 user validates the buffer.
- * \param complete A pointer to the function to execute when the
- *                 user completes the buffer.
- */
-int rdline_init(struct rdline *rdl,
-		 rdline_write_char_t *write_char,
-		 rdline_validate_t *validate,
-		 rdline_complete_t *complete);
-
-
-/**
- * Init the current buffer, and display a prompt.
- * \param rdl A pointer to a struct rdline
- * \param prompt A string containing the prompt
- */
-void rdline_newline(struct rdline *rdl, const char *prompt);
-
-/**
- * Call it and all received chars will be ignored.
- * \param rdl A pointer to a struct rdline
- */
-void rdline_stop(struct rdline *rdl);
-
-/**
- * Same than rdline_stop() except that next calls to rdline_char_in()
- * will return RDLINE_RES_EXITED.
- * \param rdl A pointer to a struct rdline
- */
-void rdline_quit(struct rdline *rdl);
-
-/**
- * Restart after a call to rdline_stop() or rdline_quit()
- * \param rdl A pointer to a struct rdline
- */
-void rdline_restart(struct rdline *rdl);
-
-/**
- * Redisplay the current buffer
- * \param rdl A pointer to a struct rdline
- */
-void rdline_redisplay(struct rdline *rdl);
-
-/**
- * Reset the current buffer and setup for a new line.
- *  \param rdl A pointer to a struct rdline
- */
-void rdline_reset(struct rdline *rdl);
-
-
-/* return status for rdline_char_in() */
-#define RDLINE_RES_SUCCESS       0
-#define RDLINE_RES_VALIDATED     1
-#define RDLINE_RES_COMPLETE      2
-#define RDLINE_RES_NOT_RUNNING  -1
-#define RDLINE_RES_EOF          -2
-#define RDLINE_RES_EXITED       -3
-
-/**
- * append a char to the readline buffer.
- * Return RDLINE_RES_VALIDATE when the line has been validated.
- * Return RDLINE_RES_COMPLETE when the user asked to complete the buffer.
- * Return RDLINE_RES_NOT_RUNNING if it is not running.
- * Return RDLINE_RES_EOF if EOF (ctrl-d on an empty line).
- * Else return RDLINE_RES_SUCCESS.
- * XXX error case when the buffer is full ?
- *
- * \param rdl A pointer to a struct rdline
- * \param c The character to append
- */
-int rdline_char_in(struct rdline *rdl, char c);
-
-/**
- * Return the current buffer, terminated by '\0'.
- * \param rdl A pointer to a struct rdline
- */
-const char *rdline_get_buffer(struct rdline *rdl);
-
-
-/**
- * Add the buffer to history.
- * return < 0 on error.
- * \param rdl A pointer to a struct rdline
- * \param buf A buffer that is terminated by '\0'
- */
-int rdline_add_history(struct rdline *rdl, const char *buf);
-
-/**
- * Clear current history
- * \param rdl A pointer to a struct rdline
- */
-void rdline_clear_history(struct rdline *rdl);
-
-/**
- * Get the i-th history item
- */
-char *rdline_get_history_item(struct rdline *rdl, unsigned int i);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _RDLINE_H_ */
diff --git a/lib/librte_cmdline/cmdline_socket.c b/lib/librte_cmdline/cmdline_socket.c
index 3fc243b..11524b5 100644
--- a/lib/librte_cmdline/cmdline_socket.c
+++ b/lib/librte_cmdline/cmdline_socket.c
@@ -58,23 +58,18 @@
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#include <stdio.h>
-#include <string.h>
+#include <stddef.h>
 #include <unistd.h>
-#include <stdlib.h>
-#include <stdarg.h>
-#include <inttypes.h>
 #include <fcntl.h>
-#include <termios.h>
 
 #include "cmdline_parse.h"
-#include "cmdline_rdline.h"
 #include "cmdline_socket.h"
 #include "cmdline.h"
 
 struct cmdline *
 cmdline_file_new(cmdline_parse_ctx_t *ctx, const char *prompt, const char *path)
 {
+	struct cmdline *cl;
 	int fd;
 
 	/* everything else is checked in cmdline_new() */
@@ -83,37 +78,22 @@ cmdline_file_new(cmdline_parse_ctx_t *ctx, const char *prompt, const char *path)
 
 	fd = open(path, O_RDONLY, 0);
 	if (fd < 0) {
-		dprintf("open() failed\n");
 		return NULL;
 	}
-	return cmdline_new(ctx, prompt, fd, -1);
+	cl = cmdline_new(ctx, prompt, fd, -1);
+	/* cmdline_new() duplicates fd */
+	close(fd);
+	return cl;
 }
 
 struct cmdline *
 cmdline_stdin_new(cmdline_parse_ctx_t *ctx, const char *prompt)
 {
-	struct cmdline *cl;
-	struct termios oldterm, term;
-
-	tcgetattr(0, &oldterm);
-	memcpy(&term, &oldterm, sizeof(term));
-	term.c_lflag &= ~(ICANON | ECHO | ISIG);
-	tcsetattr(0, TCSANOW, &term);
-	setbuf(stdin, NULL);
-
-	cl = cmdline_new(ctx, prompt, 0, 1);
-
-	if (cl)
-		memcpy(&cl->oldterm, &oldterm, sizeof(term));
-
-	return cl;
+	return cmdline_new(ctx, prompt, 0, 1);
 }
 
 void
 cmdline_stdin_exit(struct cmdline *cl)
 {
-	if (!cl)
-		return;
-
-	tcsetattr(fileno(stdin), TCSANOW, &cl->oldterm);
+	cmdline_free(cl);
 }
diff --git a/lib/librte_cmdline/cmdline_vt100.c b/lib/librte_cmdline/cmdline_vt100.c
deleted file mode 100644
index a253e8b..0000000
--- a/lib/librte_cmdline/cmdline_vt100.c
+++ /dev/null
@@ -1,185 +0,0 @@
-/*-
- *   BSD LICENSE
- *
- *   Copyright(c) 2010-2014 Intel Corporation. All rights reserved.
- *   All rights reserved.
- *
- *   Redistribution and use in source and binary forms, with or without
- *   modification, are permitted provided that the following conditions
- *   are met:
- *
- *     * Redistributions of source code must retain the above copyright
- *       notice, this list of conditions and the following disclaimer.
- *     * Redistributions in binary form must reproduce the above copyright
- *       notice, this list of conditions and the following disclaimer in
- *       the documentation and/or other materials provided with the
- *       distribution.
- *     * Neither the name of Intel Corporation nor the names of its
- *       contributors may be used to endorse or promote products derived
- *       from this software without specific prior written permission.
- *
- *   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- *   "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- *   LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- *   A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- *   OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- *   LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- *   DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- *   THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- *   (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- *   OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/*
- * Copyright (c) 2009, Olivier MATZ <zer0@droids-corp.org>
- * All rights reserved.
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- *     * Redistributions of source code must retain the above copyright
- *       notice, this list of conditions and the following disclaimer.
- *     * Redistributions in binary form must reproduce the above copyright
- *       notice, this list of conditions and the following disclaimer in the
- *       documentation and/or other materials provided with the distribution.
- *     * Neither the name of the University of California, Berkeley nor the
- *       names of its contributors may be used to endorse or promote products
- *       derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE REGENTS AND CONTRIBUTORS BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include <stdlib.h>
-#include <stdint.h>
-#include <stdio.h>
-#include <string.h>
-#include <stdarg.h>
-#include <ctype.h>
-#include <termios.h>
-
-#include "cmdline_vt100.h"
-
-const char *cmdline_vt100_commands[] = {
-	vt100_up_arr,
-	vt100_down_arr,
-	vt100_right_arr,
-	vt100_left_arr,
-	"\177",
-	"\n",
-	"\001",
-	"\005",
-	"\013",
-	"\031",
-	"\003",
-	"\006",
-	"\002",
-	vt100_suppr,
-	vt100_tab,
-	"\004",
-	"\014",
-	"\r",
-	"\033\177",
-	vt100_word_left,
-	vt100_word_right,
-	"?",
-	"\027",
-	"\020",
-	"\016",
-	"\033\144",
-};
-
-void
-vt100_init(struct cmdline_vt100 *vt)
-{
-	if (!vt)
-		return;
-	vt->state = CMDLINE_VT100_INIT;
-}
-
-
-static int
-match_command(char *buf, unsigned int size)
-{
-	const char *cmd;
-	size_t cmdlen;
-	unsigned int i = 0;
-
-	for (i=0 ; i<sizeof(cmdline_vt100_commands)/sizeof(const char *) ; i++) {
-		cmd = *(cmdline_vt100_commands + i);
-
-		cmdlen = strnlen(cmd, CMDLINE_VT100_BUF_SIZE);
-		if (size == cmdlen &&
-		    !strncmp(buf, cmd, cmdlen)) {
-			return i;
-		}
-	}
-
-	return -1;
-}
-
-int
-vt100_parser(struct cmdline_vt100 *vt, char ch)
-{
-	unsigned int size;
-	uint8_t c = (uint8_t) ch;
-
-	if (!vt)
-		return -1;
-
-	if (vt->bufpos >= CMDLINE_VT100_BUF_SIZE) {
-		vt->state = CMDLINE_VT100_INIT;
-		vt->bufpos = 0;
-	}
-
-	vt->buf[vt->bufpos++] = c;
-	size = vt->bufpos;
-
-	switch (vt->state) {
-	case CMDLINE_VT100_INIT:
-		if (c == 033) {
-			vt->state = CMDLINE_VT100_ESCAPE;
-		}
-		else {
-			vt->bufpos = 0;
-			goto match_command;
-		}
-		break;
-
-	case CMDLINE_VT100_ESCAPE:
-		if (c == 0133) {
-			vt->state = CMDLINE_VT100_ESCAPE_CSI;
-		}
-		else if (c >= 060 && c <= 0177) { /* XXX 0177 ? */
-			vt->bufpos = 0;
-			vt->state = CMDLINE_VT100_INIT;
-			goto match_command;
-		}
-		break;
-
-	case CMDLINE_VT100_ESCAPE_CSI:
-		if (c >= 0100 && c <= 0176) {
-			vt->bufpos = 0;
-			vt->state = CMDLINE_VT100_INIT;
-			goto match_command;
-		}
-		break;
-
-	default:
-		vt->bufpos = 0;
-		break;
-	}
-
-	return -2;
-
- match_command:
-	return match_command(vt->buf, size);
-}
diff --git a/lib/librte_cmdline/cmdline_vt100.h b/lib/librte_cmdline/cmdline_vt100.h
deleted file mode 100644
index 963add8..0000000
--- a/lib/librte_cmdline/cmdline_vt100.h
+++ /dev/null
@@ -1,153 +0,0 @@
-/*-
- *   BSD LICENSE
- *
- *   Copyright(c) 2010-2014 Intel Corporation. All rights reserved.
- *   All rights reserved.
- *
- *   Redistribution and use in source and binary forms, with or without
- *   modification, are permitted provided that the following conditions
- *   are met:
- *
- *     * Redistributions of source code must retain the above copyright
- *       notice, this list of conditions and the following disclaimer.
- *     * Redistributions in binary form must reproduce the above copyright
- *       notice, this list of conditions and the following disclaimer in
- *       the documentation and/or other materials provided with the
- *       distribution.
- *     * Neither the name of Intel Corporation nor the names of its
- *       contributors may be used to endorse or promote products derived
- *       from this software without specific prior written permission.
- *
- *   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- *   "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- *   LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- *   A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- *   OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- *   LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- *   DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- *   THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- *   (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- *   OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/*
- * Copyright (c) 2009, Olivier MATZ <zer0@droids-corp.org>
- * All rights reserved.
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- *     * Redistributions of source code must retain the above copyright
- *       notice, this list of conditions and the following disclaimer.
- *     * Redistributions in binary form must reproduce the above copyright
- *       notice, this list of conditions and the following disclaimer in the
- *       documentation and/or other materials provided with the distribution.
- *     * Neither the name of the University of California, Berkeley nor the
- *       names of its contributors may be used to endorse or promote products
- *       derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE REGENTS AND CONTRIBUTORS BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef _CMDLINE_VT100_H_
-#define _CMDLINE_VT100_H_
-
-#include <stdint.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#define vt100_bell         "\007"
-#define vt100_bs           "\010"
-#define vt100_bs_clear     "\010 \010"
-#define vt100_tab          "\011"
-#define vt100_crnl         "\012\015"
-#define vt100_clear_right  "\033[0K"
-#define vt100_clear_left   "\033[1K"
-#define vt100_clear_down   "\033[0J"
-#define vt100_clear_up     "\033[1J"
-#define vt100_clear_line   "\033[2K"
-#define vt100_clear_screen "\033[2J"
-#define vt100_up_arr       "\033\133\101"
-#define vt100_down_arr     "\033\133\102"
-#define vt100_right_arr    "\033\133\103"
-#define vt100_left_arr     "\033\133\104"
-#define vt100_multi_right  "\033\133%uC"
-#define vt100_multi_left   "\033\133%uD"
-#define vt100_suppr        "\033\133\063\176"
-#define vt100_home         "\033M\033E"
-#define vt100_word_left    "\033\142"
-#define vt100_word_right   "\033\146"
-
-/* Result of parsing : it must be synchronized with
- * cmdline_vt100_commands[] in vt100.c */
-#define CMDLINE_KEY_UP_ARR 0
-#define CMDLINE_KEY_DOWN_ARR 1
-#define CMDLINE_KEY_RIGHT_ARR 2
-#define CMDLINE_KEY_LEFT_ARR 3
-#define CMDLINE_KEY_BKSPACE 4
-#define CMDLINE_KEY_RETURN 5
-#define CMDLINE_KEY_CTRL_A 6
-#define CMDLINE_KEY_CTRL_E 7
-#define CMDLINE_KEY_CTRL_K 8
-#define CMDLINE_KEY_CTRL_Y 9
-#define CMDLINE_KEY_CTRL_C 10
-#define CMDLINE_KEY_CTRL_F 11
-#define CMDLINE_KEY_CTRL_B 12
-#define CMDLINE_KEY_SUPPR 13
-#define CMDLINE_KEY_TAB 14
-#define CMDLINE_KEY_CTRL_D 15
-#define CMDLINE_KEY_CTRL_L 16
-#define CMDLINE_KEY_RETURN2 17
-#define CMDLINE_KEY_META_BKSPACE 18
-#define CMDLINE_KEY_WLEFT 19
-#define CMDLINE_KEY_WRIGHT 20
-#define CMDLINE_KEY_HELP 21
-#define CMDLINE_KEY_CTRL_W 22
-#define CMDLINE_KEY_CTRL_P 23
-#define CMDLINE_KEY_CTRL_N 24
-#define CMDLINE_KEY_META_D 25
-
-extern const char *cmdline_vt100_commands[];
-
-enum cmdline_vt100_parser_state {
-	CMDLINE_VT100_INIT,
-	CMDLINE_VT100_ESCAPE,
-	CMDLINE_VT100_ESCAPE_CSI
-};
-
-#define CMDLINE_VT100_BUF_SIZE 8
-struct cmdline_vt100 {
-	uint8_t bufpos;
-	char buf[CMDLINE_VT100_BUF_SIZE];
-	enum cmdline_vt100_parser_state state;
-};
-
-/**
- * Init
- */
-void vt100_init(struct cmdline_vt100 *vt);
-
-/**
- * Input a new character.
- * Return -1 if the character is not part of a control sequence
- * Return -2 if c is not the last char of a control sequence
- * Else return the index in vt100_commands[]
- */
-int vt100_parser(struct cmdline_vt100 *vt, char c);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
diff --git a/lib/librte_cmdline/rte_cmdline_version.map b/lib/librte_cmdline/rte_cmdline_version.map
index 04bcb38..3133199 100644
--- a/lib/librte_cmdline/rte_cmdline_version.map
+++ b/lib/librte_cmdline/rte_cmdline_version.map
@@ -1,25 +1,6 @@
 DPDK_2.0 {
 	global:
 
-	cirbuf_add_buf_head;
-	cirbuf_add_buf_tail;
-	cirbuf_add_head;
-	cirbuf_add_head_safe;
-	cirbuf_add_tail;
-	cirbuf_add_tail_safe;
-	cirbuf_align_left;
-	cirbuf_align_right;
-	cirbuf_del_buf_head;
-	cirbuf_del_buf_tail;
-	cirbuf_del_head;
-	cirbuf_del_head_safe;
-	cirbuf_del_tail;
-	cirbuf_del_tail_safe;
-	cirbuf_get_buf_head;
-	cirbuf_get_buf_tail;
-	cirbuf_get_head;
-	cirbuf_get_tail;
-	cirbuf_init;
 	cmdline_complete;
 	cmdline_complete_get_elt_string;
 	cmdline_complete_get_nb_string;
@@ -50,21 +31,6 @@ DPDK_2.0 {
 	cmdline_token_num_ops;
 	cmdline_token_portlist_ops;
 	cmdline_token_string_ops;
-	cmdline_write_char;
-	rdline_add_history;
-	rdline_char_in;
-	rdline_clear_history;
-	rdline_get_buffer;
-	rdline_get_history_item;
-	rdline_init;
-	rdline_newline;
-	rdline_quit;
-	rdline_redisplay;
-	rdline_reset;
-	rdline_restart;
-	rdline_stop;
-	vt100_init;
-	vt100_parser;
 
 	local: *;
 };
@@ -75,3 +41,10 @@ DPDK_2.1 {
 	cmdline_poll;
 
 } DPDK_2.0;
+
+DPDK_18.02 {
+	global:
+
+	cmdline_ctx_get;
+
+} DPDK_2.1;
diff --git a/mk/rte.app.mk b/mk/rte.app.mk
index 6a6a745..504bb4e 100644
--- a/mk/rte.app.mk
+++ b/mk/rte.app.mk
@@ -102,6 +102,8 @@ _LDLIBS-$(CONFIG_RTE_LIBRTE_RING)           += -lrte_ring
 _LDLIBS-$(CONFIG_RTE_LIBRTE_PCI)            += -lrte_pci
 _LDLIBS-$(CONFIG_RTE_LIBRTE_EAL)            += -lrte_eal
 _LDLIBS-$(CONFIG_RTE_LIBRTE_CMDLINE)        += -lrte_cmdline
+
+_LDLIBS-$(CONFIG_RTE_LIBRTE_CMDLINE)        += $(shell pkg-config --libs libedit)
 _LDLIBS-$(CONFIG_RTE_LIBRTE_REORDER)        += -lrte_reorder
 _LDLIBS-$(CONFIG_RTE_LIBRTE_SCHED)          += -lrte_sched
 
diff --git a/test/cmdline_test/cmdline_test.c b/test/cmdline_test/cmdline_test.c
index 716b5f1..595efa5 100644
--- a/test/cmdline_test/cmdline_test.c
+++ b/test/cmdline_test/cmdline_test.c
@@ -41,7 +41,6 @@
 #include <ctype.h>
 #include <sys/queue.h>
 
-#include <cmdline_rdline.h>
 #include <cmdline_parse.h>
 #include <cmdline_socket.h>
 #include <cmdline.h>
diff --git a/test/cmdline_test/commands.c b/test/cmdline_test/commands.c
index 404f51a..8481af9 100644
--- a/test/cmdline_test/commands.c
+++ b/test/cmdline_test/commands.c
@@ -36,7 +36,6 @@
 #include <termios.h>
 #include <inttypes.h>
 
-#include <cmdline_rdline.h>
 #include <cmdline_parse.h>
 #include <cmdline_parse_string.h>
 #include <cmdline_parse_num.h>
@@ -306,72 +305,6 @@ cmdline_parse_inst_t cmd_ambig_2 = {
 
 
 
-/*** get_history_bufsize ***/
-/* command that displays total space in history buffer
- * this will be useful for testing history (to fill it up just enough to
- * remove the last entry, we need to know how big it is).
- */
-
-struct cmd_get_history_bufsize_result {
-	cmdline_fixed_string_t str;
-};
-
-static void
-cmd_get_history_bufsize_parsed(__attribute__((unused)) void *parsed_result,
-		struct cmdline *cl,
-		__attribute__((unused)) void *data)
-{
-	cmdline_printf(cl, "History buffer size: %zu\n",
-			sizeof(cl->rdl.history_buf));
-}
-
-cmdline_parse_token_string_t cmd_get_history_bufsize_tok =
-	TOKEN_STRING_INITIALIZER(struct cmd_get_history_bufsize_result, str,
-				 "get_history_bufsize");
-
-cmdline_parse_inst_t cmd_get_history_bufsize = {
-	.f = cmd_get_history_bufsize_parsed,  /* function to call */
-	.data = NULL,      /* 2nd arg of func */
-	.help_str = "command that displays total space in history buffer",
-	.tokens = {        /* token list, NULL terminated */
-		(void *)&cmd_get_history_bufsize_tok,
-		NULL,
-	},
-};
-
-
-
-/*** clear_history ***/
-/* clears history buffer */
-
-struct cmd_clear_history_result {
-	cmdline_fixed_string_t str;
-};
-
-static void
-cmd_clear_history_parsed(__attribute__((unused)) void *parsed_result,
-		struct cmdline *cl,
-		__attribute__((unused)) void *data)
-{
-	rdline_clear_history(&cl->rdl);
-}
-
-cmdline_parse_token_string_t cmd_clear_history_tok =
-	TOKEN_STRING_INITIALIZER(struct cmd_clear_history_result, str,
-				 "clear_history");
-
-cmdline_parse_inst_t cmd_clear_history = {
-	.f = cmd_clear_history_parsed,  /* function to call */
-	.data = NULL,      /* 2nd arg of func */
-	.help_str = "clear command history",
-	.tokens = {        /* token list, NULL terminated */
-		(void *)&cmd_clear_history_tok,
-		NULL,
-	},
-};
-
-
-
 /****************/
 
 cmdline_parse_ctx_t main_ctx[] = {
@@ -381,8 +314,6 @@ cmdline_parse_ctx_t main_ctx[] = {
 		(cmdline_parse_inst_t *)&cmd_single,
 		(cmdline_parse_inst_t *)&cmd_single_long,
 		(cmdline_parse_inst_t *)&cmd_num,
-		(cmdline_parse_inst_t *)&cmd_get_history_bufsize,
-		(cmdline_parse_inst_t *)&cmd_clear_history,
 		(cmdline_parse_inst_t *)&cmd_autocomplete_1,
 		(cmdline_parse_inst_t *)&cmd_autocomplete_2,
 	NULL,
diff --git a/test/test/Makefile b/test/test/Makefile
index bb54c98..49e907c 100644
--- a/test/test/Makefile
+++ b/test/test/Makefile
@@ -164,7 +164,6 @@ SRCS-$(CONFIG_RTE_LIBRTE_CMDLINE) += test_cmdline_num.c
 SRCS-$(CONFIG_RTE_LIBRTE_CMDLINE) += test_cmdline_etheraddr.c
 SRCS-$(CONFIG_RTE_LIBRTE_CMDLINE) += test_cmdline_portlist.c
 SRCS-$(CONFIG_RTE_LIBRTE_CMDLINE) += test_cmdline_ipaddr.c
-SRCS-$(CONFIG_RTE_LIBRTE_CMDLINE) += test_cmdline_cirbuf.c
 SRCS-$(CONFIG_RTE_LIBRTE_CMDLINE) += test_cmdline_string.c
 SRCS-$(CONFIG_RTE_LIBRTE_CMDLINE) += test_cmdline_lib.c
 
diff --git a/test/test/commands.c b/test/test/commands.c
index 4097a33..21a4a06 100644
--- a/test/test/commands.c
+++ b/test/test/commands.c
@@ -66,7 +66,6 @@
 #include <rte_mbuf.h>
 #include <rte_devargs.h>
 
-#include <cmdline_rdline.h>
 #include <cmdline_parse.h>
 #include <cmdline_parse_ipaddr.h>
 #include <cmdline_parse_num.h>
diff --git a/test/test/test.c b/test/test/test.c
index 0e6ff7c..6f48892 100644
--- a/test/test/test.c
+++ b/test/test/test.c
@@ -42,7 +42,6 @@
 #include <sys/queue.h>
 
 #ifdef RTE_LIBRTE_CMDLINE
-#include <cmdline_rdline.h>
 #include <cmdline_parse.h>
 #include <cmdline_socket.h>
 #include <cmdline.h>
diff --git a/test/test/test_cmdline.c b/test/test/test_cmdline.c
index 38c7256..056b569 100644
--- a/test/test/test_cmdline.c
+++ b/test/test/test_cmdline.c
@@ -74,15 +74,6 @@ test_cmdline(void)
 		return -1;
 	if (test_parse_string_invalid_param() < 0)
 		return -1;
-	printf("Testing circular buffer...\n");
-	if (test_cirbuf_char() < 0)
-		return -1;
-	if (test_cirbuf_string() < 0)
-		return -1;
-	if (test_cirbuf_align() < 0)
-		return -1;
-	if (test_cirbuf_invalid_param() < 0)
-		return -1;
 	printf("Testing library functions...\n");
 	if (test_cmdline_lib() < 0)
 		return -1;
diff --git a/test/test/test_cmdline.h b/test/test/test_cmdline.h
index 0ee91c1..b55caa9 100644
--- a/test/test/test_cmdline.h
+++ b/test/test/test_cmdline.h
@@ -61,12 +61,6 @@ int test_parse_string_valid(void);
 int test_parse_string_invalid_data(void);
 int test_parse_string_invalid_param(void);
 
-/* cmdline_cirbuf tests */
-int test_cirbuf_invalid_param(void);
-int test_cirbuf_char(void);
-int test_cirbuf_string(void);
-int test_cirbuf_align(void);
-
 /* test the rest of the library */
 int test_cmdline_lib(void);
 
diff --git a/test/test/test_cmdline_cirbuf.c b/test/test/test_cmdline_cirbuf.c
deleted file mode 100644
index 2c32145..0000000
--- a/test/test/test_cmdline_cirbuf.c
+++ /dev/null
@@ -1,1330 +0,0 @@
-/*-
- *   BSD LICENSE
- *
- *   Copyright(c) 2010-2014 Intel Corporation. All rights reserved.
- *   All rights reserved.
- *
- *   Redistribution and use in source and binary forms, with or without
- *   modification, are permitted provided that the following conditions
- *   are met:
- *
- *     * Redistributions of source code must retain the above copyright
- *       notice, this list of conditions and the following disclaimer.
- *     * Redistributions in binary form must reproduce the above copyright
- *       notice, this list of conditions and the following disclaimer in
- *       the documentation and/or other materials provided with the
- *       distribution.
- *     * Neither the name of Intel Corporation nor the names of its
- *       contributors may be used to endorse or promote products derived
- *       from this software without specific prior written permission.
- *
- *   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- *   "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- *   LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- *   A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- *   OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- *   LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- *   DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- *   THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- *   (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- *   OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
-#include <rte_string_fns.h>
-
-#include <cmdline_cirbuf.h>
-
-#include "test_cmdline.h"
-
-/* different length strings */
-#define CIRBUF_STR_HEAD " HEAD"
-#define CIRBUF_STR_TAIL "TAIL"
-
-/* miscellaneous tests - they make bullseye happy */
-static int
-test_cirbuf_string_misc(void)
-{
-	struct cirbuf cb;
-	char buf[CMDLINE_TEST_BUFSIZE];
-	char tmp[CMDLINE_TEST_BUFSIZE];
-
-	/* initialize buffers */
-	memset(buf, 0, sizeof(buf));
-	memset(tmp, 0, sizeof(tmp));
-
-	/*
-	 * initialize circular buffer
-	 */
-	if (cirbuf_init(&cb, buf, 0, sizeof(buf)) < 0) {
-		printf("Error: failed to initialize circular buffer!\n");
-		return -1;
-	}
-
-	/*
-	 * add strings to head and tail, but read only tail
-	 * this results in read operation that does not transcend
-	 * from buffer end to buffer beginning (in other words,
-	 * strlen <= cb->maxlen - cb->end)
-	 */
-
-	/* add string to head */
-	if (cirbuf_add_buf_head(&cb, CIRBUF_STR_HEAD, sizeof(CIRBUF_STR_HEAD))
-			!= (sizeof(CIRBUF_STR_HEAD))) {
-		printf("Error: failed to add string to head!\n");
-		return -1;
-	}
-	/* add string to tail */
-	if (cirbuf_add_buf_tail(&cb, CIRBUF_STR_TAIL, sizeof(CIRBUF_STR_TAIL))
-			!= (sizeof(CIRBUF_STR_TAIL))) {
-		printf("Error: failed to add string to head!\n");
-		return -1;
-	}
-	/* read string from tail */
-	if (cirbuf_get_buf_tail(&cb, tmp, sizeof(CIRBUF_STR_TAIL))
-			!= (sizeof(CIRBUF_STR_TAIL))) {
-		printf("Error: failed to get string from tail!\n");
-		return -1;
-	}
-	/* verify string */
-	if (strncmp(tmp, CIRBUF_STR_TAIL, sizeof(CIRBUF_STR_TAIL)) != 0) {
-		printf("Error: tail strings do not match!\n");
-		return -1;
-	}
-	/* clear buffers */
-	memset(tmp, 0, sizeof(tmp));
-	memset(buf, 0, sizeof(buf));
-
-
-
-	/*
-	 * add a string to buffer when start/end is at end of buffer
-	 */
-
-	/*
-	 * reinitialize circular buffer with start at the end of cirbuf
-	 */
-	if (cirbuf_init(&cb, buf, CMDLINE_TEST_BUFSIZE - 2, sizeof(buf)) < 0) {
-		printf("Error: failed to reinitialize circular buffer!\n");
-		return -1;
-	}
-
-
-	/* add string to tail */
-	if (cirbuf_add_buf_tail(&cb, CIRBUF_STR_TAIL, sizeof(CIRBUF_STR_TAIL))
-			!= (sizeof(CIRBUF_STR_TAIL))) {
-		printf("Error: failed to add string to tail!\n");
-		return -1;
-	}
-	/* read string from tail */
-	if (cirbuf_get_buf_tail(&cb, tmp, sizeof(CIRBUF_STR_TAIL))
-			!= (sizeof(CIRBUF_STR_TAIL))) {
-		printf("Error: failed to get string from tail!\n");
-		return -1;
-	}
-	/* verify string */
-	if (strncmp(tmp, CIRBUF_STR_TAIL, sizeof(CIRBUF_STR_TAIL)) != 0) {
-		printf("Error: tail strings do not match!\n");
-		return -1;
-	}
-	/* clear tmp buffer */
-	memset(tmp, 0, sizeof(tmp));
-
-
-	/* add string to head */
-	if (cirbuf_add_buf_head(&cb, CIRBUF_STR_HEAD, sizeof(CIRBUF_STR_HEAD))
-			!= (sizeof(CIRBUF_STR_HEAD))) {
-		printf("Error: failed to add string to head!\n");
-		return -1;
-	}
-	/* read string from tail */
-	if (cirbuf_get_buf_head(&cb, tmp, sizeof(CIRBUF_STR_HEAD))
-			!= (sizeof(CIRBUF_STR_HEAD))) {
-		printf("Error: failed to get string from head!\n");
-		return -1;
-	}
-	/* verify string */
-	if (strncmp(tmp, CIRBUF_STR_HEAD, sizeof(CIRBUF_STR_HEAD)) != 0) {
-		printf("Error: headstrings do not match!\n");
-		return -1;
-	}
-
-	return 0;
-}
-
-/* test adding and deleting strings */
-static int
-test_cirbuf_string_add_del(void)
-{
-	struct cirbuf cb;
-	char buf[CMDLINE_TEST_BUFSIZE];
-	char tmp[CMDLINE_TEST_BUFSIZE];
-
-	/* initialize buffers */
-	memset(buf, 0, sizeof(buf));
-	memset(tmp, 0, sizeof(tmp));
-
-	/*
-	 * initialize circular buffer
-	 */
-	if (cirbuf_init(&cb, buf, 0, sizeof(buf)) < 0) {
-		printf("Error: failed to initialize circular buffer!\n");
-		return -1;
-	}
-
-	/* add string to head */
-	if (cirbuf_add_buf_head(&cb, CIRBUF_STR_HEAD, sizeof(CIRBUF_STR_HEAD))
-			!= (sizeof(CIRBUF_STR_HEAD))) {
-		printf("Error: failed to add string to head!\n");
-		return -1;
-	}
-	/* read string from head */
-	if (cirbuf_get_buf_head(&cb, tmp, sizeof(CIRBUF_STR_HEAD))
-			!= (sizeof(CIRBUF_STR_HEAD))) {
-		printf("Error: failed to get string from head!\n");
-		return -1;
-	}
-	/* verify string */
-	if (strncmp(tmp, CIRBUF_STR_HEAD, sizeof(CIRBUF_STR_HEAD)) != 0) {
-		printf("Error: head strings do not match!\n");
-		return -1;
-	}
-	/* clear tmp buffer */
-	memset(tmp, 0, sizeof(tmp));
-	/* read string from tail */
-	if (cirbuf_get_buf_tail(&cb, tmp, sizeof(CIRBUF_STR_HEAD))
-			!= (sizeof(CIRBUF_STR_HEAD))) {
-		printf("Error: failed to get string from head!\n");
-		return -1;
-	}
-	/* verify string */
-	if (strncmp(tmp, CIRBUF_STR_HEAD, sizeof(CIRBUF_STR_HEAD)) != 0) {
-		printf("Error: head strings do not match!\n");
-		return -1;
-	}
-	/* delete string from head*/
-	if (cirbuf_del_buf_head(&cb, sizeof(CIRBUF_STR_HEAD)) < 0) {
-		printf("Error: failed to delete string from head!\n");
-		return -1;
-	}
-	/* verify string was deleted */
-	if (cirbuf_del_head_safe(&cb) == 0) {
-		printf("Error: buffer should have been empty!\n");
-		return -1;
-	}
-	/* clear tmp buffer */
-	memset(tmp, 0, sizeof(tmp));
-
-
-
-	/*
-	 * reinitialize circular buffer
-	 */
-	memset(buf, 0, sizeof(buf));
-	if (cirbuf_init(&cb, buf, 0, sizeof(buf)) < 0) {
-		printf("Error: failed to reinitialize circular buffer!\n");
-		return -1;
-	}
-
-	/* add string to tail */
-	if (cirbuf_add_buf_tail(&cb, CIRBUF_STR_TAIL, sizeof(CIRBUF_STR_TAIL))
-			!= (sizeof(CIRBUF_STR_TAIL))) {
-		printf("Error: failed to add string to tail!\n");
-		return -1;
-	}
-	/* get string from tail */
-	if (cirbuf_get_buf_tail(&cb, tmp, sizeof(CIRBUF_STR_TAIL))
-			!= (sizeof(CIRBUF_STR_TAIL))) {
-		printf("Error: failed to get string from tail!\n");
-		return -1;
-	}
-	/* verify string */
-	if (strncmp(tmp, CIRBUF_STR_TAIL, sizeof(CIRBUF_STR_TAIL)) != 0) {
-		printf("Error: tail strings do not match!\n");
-		return -1;
-	}
-	/* clear tmp buffer */
-	memset(tmp, 0, sizeof(tmp));
-	/* get string from head */
-	if (cirbuf_get_buf_head(&cb, tmp, sizeof(CIRBUF_STR_TAIL))
-			!= (sizeof(CIRBUF_STR_TAIL))) {
-		printf("Error: failed to get string from tail!\n");
-		return -1;
-	}
-	/* verify string */
-	if (strncmp(tmp, CIRBUF_STR_TAIL, sizeof(CIRBUF_STR_TAIL)) != 0) {
-		printf("Error: tail strings do not match!\n");
-		return -1;
-	}
-	/* delete string from tail */
-	if (cirbuf_del_buf_tail(&cb, sizeof(CIRBUF_STR_TAIL)) < 0) {
-		printf("Error: failed to delete string from tail!\n");
-		return -1;
-	}
-	/* verify string was deleted */
-	if (cirbuf_del_tail_safe(&cb) == 0) {
-		printf("Error: buffer should have been empty!\n");
-		return -1;
-	}
-
-	return 0;
-}
-
-/* test adding from head and deleting from tail, and vice versa */
-static int
-test_cirbuf_string_add_del_reverse(void)
-{
-	struct cirbuf cb;
-	char buf[CMDLINE_TEST_BUFSIZE];
-	char tmp[CMDLINE_TEST_BUFSIZE];
-
-	/* initialize buffers */
-	memset(buf, 0, sizeof(buf));
-	memset(tmp, 0, sizeof(tmp));
-
-	/*
-	 * initialize circular buffer
-	 */
-	if (cirbuf_init(&cb, buf, 0, sizeof(buf)) < 0) {
-		printf("Error: failed to initialize circular buffer!\n");
-		return -1;
-	}
-
-	/* add string to head */
-	if (cirbuf_add_buf_head(&cb, CIRBUF_STR_HEAD, sizeof(CIRBUF_STR_HEAD))
-			!= (sizeof(CIRBUF_STR_HEAD))) {
-		printf("Error: failed to add string to head!\n");
-		return -1;
-	}
-	/* delete string from tail */
-	if (cirbuf_del_buf_tail(&cb, sizeof(CIRBUF_STR_HEAD)) < 0) {
-		printf("Error: failed to delete string from tail!\n");
-		return -1;
-	}
-	/* verify string was deleted */
-	if (cirbuf_del_tail_safe(&cb) == 0) {
-		printf("Error: buffer should have been empty!\n");
-		return -1;
-	}
-	/* clear tmp buffer */
-	memset(tmp, 0, sizeof(tmp));
-
-	/*
-	 * reinitialize circular buffer
-	 */
-	memset(buf, 0, sizeof(buf));
-	if (cirbuf_init(&cb, buf, 0, sizeof(buf)) < 0) {
-		printf("Error: failed to reinitialize circular buffer!\n");
-		return -1;
-	}
-
-	/* add string to tail */
-	if (cirbuf_add_buf_tail(&cb, CIRBUF_STR_TAIL, sizeof(CIRBUF_STR_TAIL))
-			!= (sizeof(CIRBUF_STR_TAIL))) {
-		printf("Error: failed to add string to tail!\n");
-		return -1;
-	}
-	/* delete string from head */
-	if (cirbuf_del_buf_head(&cb, sizeof(CIRBUF_STR_TAIL)) < 0) {
-		printf("Error: failed to delete string from head!\n");
-		return -1;
-	}
-	/* verify string was deleted */
-	if (cirbuf_del_head_safe(&cb) == 0) {
-		printf("Error: buffer should have been empty!\n");
-		return -1;
-	}
-
-	return 0;
-}
-
-/* try to write more than available */
-static int
-test_cirbuf_string_add_boundaries(void)
-{
-	struct cirbuf cb;
-	char buf[CMDLINE_TEST_BUFSIZE];
-	unsigned i;
-
-	/* initialize buffers */
-	memset(buf, 0, sizeof(buf));
-
-	/*
-	 * initialize circular buffer
-	 */
-	if (cirbuf_init(&cb, buf, 0, sizeof(buf)) < 0) {
-		printf("Error: failed to initialize circular buffer!\n");
-		return -1;
-	}
-
-	/* fill the buffer from tail */
-	for (i = 0; i < CMDLINE_TEST_BUFSIZE - sizeof(CIRBUF_STR_TAIL) + 1; i++)
-		cirbuf_add_tail_safe(&cb, 't');
-
-	/* try adding a string to tail */
-	if (cirbuf_add_buf_tail(&cb, CIRBUF_STR_TAIL, sizeof(CIRBUF_STR_TAIL))
-			> 0) {
-		printf("Error: buffer should have been full!\n");
-		return -1;
-	}
-	/* try adding a string to head */
-	if (cirbuf_add_buf_head(&cb, CIRBUF_STR_TAIL, sizeof(CIRBUF_STR_TAIL))
-			> 0) {
-		printf("Error: buffer should have been full!\n");
-		return -1;
-	}
-
-	/*
-	 * reinitialize circular buffer
-	 */
-	memset(buf, 0, sizeof(buf));
-	if (cirbuf_init(&cb, buf, 0, sizeof(buf)) < 0) {
-		printf("Error: failed to reinitialize circular buffer!\n");
-		return -1;
-	}
-
-	/* fill the buffer from head */
-	for (i = 0; i < CMDLINE_TEST_BUFSIZE - sizeof(CIRBUF_STR_HEAD) + 1; i++)
-		cirbuf_add_head_safe(&cb, 'h');
-
-	/* try adding a string to head */
-	if (cirbuf_add_buf_head(&cb, CIRBUF_STR_HEAD, sizeof(CIRBUF_STR_HEAD))
-			> 0) {
-		printf("Error: buffer should have been full!\n");
-		return -1;
-	}
-	/* try adding a string to tail */
-	if (cirbuf_add_buf_tail(&cb, CIRBUF_STR_HEAD, sizeof(CIRBUF_STR_HEAD))
-			> 0) {
-		printf("Error: buffer should have been full!\n");
-		return -1;
-	}
-
-	return 0;
-}
-
-/* try to read/delete more than written */
-static int
-test_cirbuf_string_get_del_boundaries(void)
-{
-	struct cirbuf cb;
-	char buf[CMDLINE_TEST_BUFSIZE];
-	char tmp[CMDLINE_TEST_BUFSIZE];
-
-	/* initialize buffers */
-	memset(buf, 0, sizeof(buf));
-	memset(tmp, 0, sizeof(tmp));
-
-	/*
-	 * initialize circular buffer
-	 */
-	if (cirbuf_init(&cb, buf, 0, sizeof(buf)) < 0) {
-		printf("Error: failed to initialize circular buffer!\n");
-		return -1;
-	}
-
-
-	/* add string to head */
-	if (cirbuf_add_buf_head(&cb, CIRBUF_STR_HEAD, sizeof(CIRBUF_STR_HEAD))
-				!= (sizeof(CIRBUF_STR_HEAD))) {
-		printf("Error: failed to add string to head!\n");
-		return -1;
-	}
-	/* read more than written (head) */
-	if (cirbuf_get_buf_head(&cb, tmp, sizeof(CIRBUF_STR_HEAD) + 1)
-			!= sizeof(CIRBUF_STR_HEAD)) {
-		printf("Error: unexpected result when reading too much data!\n");
-		return -1;
-	}
-	/* read more than written (tail) */
-	if (cirbuf_get_buf_tail(&cb, tmp, sizeof(CIRBUF_STR_HEAD) + 1)
-			!= sizeof(CIRBUF_STR_HEAD)) {
-		printf("Error: unexpected result when reading too much data!\n");
-		return -1;
-	}
-	/* delete more than written (head) */
-	if (cirbuf_del_buf_head(&cb, sizeof(CIRBUF_STR_HEAD) + 1) == 0) {
-		printf("Error: unexpected result when deleting too much data!\n");
-		return -1;
-	}
-	/* delete more than written (tail) */
-	if (cirbuf_del_buf_tail(&cb, sizeof(CIRBUF_STR_HEAD) + 1) == 0) {
-		printf("Error: unexpected result when deleting too much data!\n");
-		return -1;
-	}
-
-	/*
-	 * reinitialize circular buffer
-	 */
-	memset(buf, 0, sizeof(buf));
-	if (cirbuf_init(&cb, buf, 0, sizeof(buf)) < 0) {
-		printf("Error: failed to reinitialize circular buffer!\n");
-		return -1;
-	}
-
-	/* add string to tail */
-	if (cirbuf_add_buf_tail(&cb, CIRBUF_STR_TAIL, sizeof(CIRBUF_STR_TAIL))
-				!= (sizeof(CIRBUF_STR_TAIL))) {
-		printf("Error: failed to add string to tail!\n");
-		return -1;
-	}
-	/* read more than written (tail) */
-	if (cirbuf_get_buf_tail(&cb, tmp, sizeof(CIRBUF_STR_TAIL) + 1)
-			!= sizeof(CIRBUF_STR_TAIL)) {
-		printf("Error: unexpected result when reading too much data!\n");
-		return -1;
-	}
-	/* read more than written (head) */
-	if (cirbuf_get_buf_head(&cb, tmp, sizeof(CIRBUF_STR_TAIL) + 1)
-			!= sizeof(CIRBUF_STR_TAIL)) {
-		printf("Error: unexpected result when reading too much data!\n");
-		return -1;
-	}
-	/* delete more than written (tail) */
-	if (cirbuf_del_buf_tail(&cb, sizeof(CIRBUF_STR_TAIL) + 1) == 0) {
-		printf("Error: unexpected result when deleting too much data!\n");
-		return -1;
-	}
-	/* delete more than written (head) */
-	if (cirbuf_del_buf_tail(&cb, sizeof(CIRBUF_STR_TAIL) + 1) == 0) {
-		printf("Error: unexpected result when deleting too much data!\n");
-		return -1;
-	}
-
-	return 0;
-}
-
-/* try to read/delete less than written */
-static int
-test_cirbuf_string_get_del_partial(void)
-{
-	struct cirbuf cb;
-	char buf[CMDLINE_TEST_BUFSIZE];
-	char tmp[CMDLINE_TEST_BUFSIZE];
-	char tmp2[CMDLINE_TEST_BUFSIZE];
-
-	/* initialize buffers */
-	memset(buf, 0, sizeof(buf));
-	memset(tmp, 0, sizeof(tmp));
-	memset(tmp2, 0, sizeof(tmp));
-
-	snprintf(tmp2, sizeof(tmp2), "%s", CIRBUF_STR_HEAD);
-
-	/*
-	 * initialize circular buffer
-	 */
-	if (cirbuf_init(&cb, buf, 0, sizeof(buf)) < 0) {
-		printf("Error: failed to initialize circular buffer!\n");
-		return -1;
-	}
-
-	/* add string to head */
-	if (cirbuf_add_buf_head(&cb, CIRBUF_STR_HEAD, sizeof(CIRBUF_STR_HEAD))
-				!= (sizeof(CIRBUF_STR_HEAD))) {
-		printf("Error: failed to add string to head!\n");
-		return -1;
-	}
-	/* read less than written (head) */
-	if (cirbuf_get_buf_head(&cb, tmp, sizeof(CIRBUF_STR_HEAD) - 1)
-			!= sizeof(CIRBUF_STR_HEAD) - 1) {
-		printf("Error: unexpected result when reading from head!\n");
-		return -1;
-	}
-	/* verify string */
-	if (strncmp(tmp, tmp2, sizeof(CIRBUF_STR_HEAD) - 1) != 0) {
-		printf("Error: strings mismatch!\n");
-		return -1;
-	}
-	memset(tmp, 0, sizeof(tmp));
-	/* read less than written (tail) */
-	if (cirbuf_get_buf_tail(&cb, tmp, sizeof(CIRBUF_STR_HEAD) - 1)
-			!= sizeof(CIRBUF_STR_HEAD) - 1) {
-		printf("Error: unexpected result when reading from tail!\n");
-		return -1;
-	}
-	/* verify string */
-	if (strncmp(tmp, &tmp2[1], sizeof(CIRBUF_STR_HEAD) - 1) != 0) {
-		printf("Error: strings mismatch!\n");
-		return -1;
-	}
-
-	/*
-	 * verify correct deletion
-	 */
-
-	/* clear buffer */
-	memset(tmp, 0, sizeof(tmp));
-
-	/* delete less than written (head) */
-	if (cirbuf_del_buf_head(&cb, 1) != 0) {
-		printf("Error: delete from head failed!\n");
-		return -1;
-	}
-	/* read from head */
-	if (cirbuf_get_buf_head(&cb, tmp, sizeof(CIRBUF_STR_HEAD) - 1)
-			!= sizeof(CIRBUF_STR_HEAD) - 1) {
-		printf("Error: unexpected result when reading from head!\n");
-		return -1;
-	}
-	/* since we deleted from head, first char should be deleted */
-	if (strncmp(tmp, &tmp2[1], sizeof(CIRBUF_STR_HEAD) - 1) != 0) {
-		printf("Error: strings mismatch!\n");
-		return -1;
-	}
-	/* clear buffer */
-	memset(tmp, 0, sizeof(tmp));
-
-	/* delete less than written (tail) */
-	if (cirbuf_del_buf_tail(&cb, 1) != 0) {
-		printf("Error: delete from tail failed!\n");
-		return -1;
-	}
-	/* read from tail */
-	if (cirbuf_get_buf_tail(&cb, tmp, sizeof(CIRBUF_STR_HEAD) - 2)
-			!= sizeof(CIRBUF_STR_HEAD) - 2) {
-		printf("Error: unexpected result when reading from head!\n");
-		return -1;
-	}
-	/* since we deleted from tail, last char should be deleted */
-	if (strncmp(tmp, &tmp2[1], sizeof(CIRBUF_STR_HEAD) - 2) != 0) {
-		printf("Error: strings mismatch!\n");
-		return -1;
-	}
-
-	return 0;
-}
-
-/* test cmdline_cirbuf char add/del functions */
-static int
-test_cirbuf_char_add_del(void)
-{
-	struct cirbuf cb;
-	char buf[CMDLINE_TEST_BUFSIZE];
-	char tmp[CMDLINE_TEST_BUFSIZE];
-
-	/* clear buffer */
-	memset(buf, 0, sizeof(buf));
-	memset(tmp, 0, sizeof(tmp));
-
-	/*
-	 * initialize circular buffer
-	 */
-	if (cirbuf_init(&cb, buf, 0, sizeof(buf)) < 0) {
-		printf("Error: failed to initialize circular buffer!\n");
-		return -1;
-	}
-
-	/*
-	 * try to delete something from cirbuf. since it's empty,
-	 * these should fail.
-	 */
-	if (cirbuf_del_head_safe(&cb) == 0) {
-		printf("Error: deleting from empty cirbuf head succeeded!\n");
-		return -1;
-	}
-	if (cirbuf_del_tail_safe(&cb) == 0) {
-		printf("Error: deleting from empty cirbuf tail succeeded!\n");
-		return -1;
-	}
-
-	/*
-	 * add, verify and delete. these should pass.
-	 */
-	if (cirbuf_add_head_safe(&cb,'h') < 0) {
-		printf("Error: adding to cirbuf head failed!\n");
-		return -1;
-	}
-	if (cirbuf_get_head(&cb) != 'h') {
-		printf("Error: wrong head content!\n");
-		return -1;
-	}
-	if (cirbuf_del_head_safe(&cb) < 0) {
-		printf("Error: deleting from cirbuf head failed!\n");
-		return -1;
-	}
-	if (cirbuf_add_tail_safe(&cb,'t') < 0) {
-		printf("Error: adding to cirbuf tail failed!\n");
-		return -1;
-	}
-	if (cirbuf_get_tail(&cb) != 't') {
-		printf("Error: wrong tail content!\n");
-		return -1;
-	}
-	if (cirbuf_del_tail_safe(&cb) < 0) {
-		printf("Error: deleting from cirbuf tail failed!\n");
-		return -1;
-	}
-	/* do the same for unsafe versions. those are void. */
-	cirbuf_add_head(&cb,'h');
-	if (cirbuf_get_head(&cb) != 'h') {
-		printf("Error: wrong head content!\n");
-		return -1;
-	}
-	cirbuf_del_head(&cb);
-
-	/* test if char has been deleted. we can't call cirbuf_get_head
-	 * because it's unsafe, but we can call cirbuf_get_buf_head.
-	 */
-	if (cirbuf_get_buf_head(&cb, tmp, 1) > 0) {
-		printf("Error: buffer should have been empty!\n");
-		return -1;
-	}
-
-	cirbuf_add_tail(&cb,'t');
-	if (cirbuf_get_tail(&cb) != 't') {
-		printf("Error: wrong tail content!\n");
-		return -1;
-	}
-	cirbuf_del_tail(&cb);
-
-	/* test if char has been deleted. we can't call cirbuf_get_tail
-	 * because it's unsafe, but we can call cirbuf_get_buf_tail.
-	 */
-	if (cirbuf_get_buf_tail(&cb, tmp, 1) > 0) {
-		printf("Error: buffer should have been empty!\n");
-		return -1;
-	}
-
-	return 0;
-}
-
-/* test filling up buffer with chars */
-static int
-test_cirbuf_char_fill(void)
-{
-	struct cirbuf cb;
-	char buf[CMDLINE_TEST_BUFSIZE];
-	unsigned i;
-
-	/* clear buffer */
-	memset(buf, 0, sizeof(buf));
-
-	/*
-	 * initialize circular buffer
-	 */
-	if (cirbuf_init(&cb, buf, 0, sizeof(buf)) < 0) {
-		printf("Error: failed to initialize circular buffer!\n");
-		return -1;
-	}
-
-	/*
-	 * fill the buffer from head or tail, verify contents, test boundaries
-	 * and clear the buffer
-	 */
-
-	/* fill the buffer from tail */
-	for (i = 0; i < CMDLINE_TEST_BUFSIZE; i++)
-		cirbuf_add_tail_safe(&cb, 't');
-	/* verify that contents of the buffer are what they are supposed to be */
-	for (i = 0; i < sizeof(buf); i++) {
-		if (buf[i] != 't') {
-			printf("Error: wrong content in buffer!\n");
-			return -1;
-		}
-	}
-	/* try to add to a full buffer from tail */
-	if (cirbuf_add_tail_safe(&cb, 't') == 0) {
-		printf("Error: buffer should have been full!\n");
-		return -1;
-	}
-	/* try to add to a full buffer from head */
-	if (cirbuf_add_head_safe(&cb, 'h') == 0) {
-		printf("Error: buffer should have been full!\n");
-		return -1;
-	}
-	/* delete buffer from tail */
-	for(i = 0; i < CMDLINE_TEST_BUFSIZE; i++)
-		cirbuf_del_tail_safe(&cb);
-	/* try to delete from an empty buffer */
-	if (cirbuf_del_tail_safe(&cb) >= 0) {
-		printf("Error: buffer should have been empty!\n");
-		return -1;
-	}
-
-	/* fill the buffer from head */
-	for (i = 0; i < CMDLINE_TEST_BUFSIZE; i++)
-		cirbuf_add_head_safe(&cb, 'h');
-	/* verify that contents of the buffer are what they are supposed to be */
-	for (i = 0; i < sizeof(buf); i++) {
-		if (buf[i] != 'h') {
-			printf("Error: wrong content in buffer!\n");
-			return -1;
-		}
-	}
-	/* try to add to a full buffer from head */
-	if (cirbuf_add_head_safe(&cb,'h') >= 0) {
-		printf("Error: buffer should have been full!\n");
-		return -1;
-	}
-	/* try to add to a full buffer from tail */
-	if (cirbuf_add_tail_safe(&cb, 't') == 0) {
-		printf("Error: buffer should have been full!\n");
-		return -1;
-	}
-	/* delete buffer from head */
-	for(i = 0; i < CMDLINE_TEST_BUFSIZE; i++)
-		cirbuf_del_head_safe(&cb);
-	/* try to delete from an empty buffer */
-	if (cirbuf_del_head_safe(&cb) >= 0) {
-		printf("Error: buffer should have been empty!\n");
-		return -1;
-	}
-
-	/*
-	 * fill the buffer from both head and tail, with alternating characters,
-	 * verify contents and clear the buffer
-	 */
-
-	/* fill half of buffer from tail */
-	for (i = 0; i < CMDLINE_TEST_BUFSIZE / 2; i++)
-		cirbuf_add_tail_safe(&cb, (char) (i % 2 ? 't' : 'T'));
-	/* fill other half of the buffer from head */
-	for (i = 0; i < CMDLINE_TEST_BUFSIZE / 2; i++)
-		cirbuf_add_head_safe(&cb, (char) (i % 2 ? 'H' : 'h')); /* added in reverse */
-
-	/* verify that contents of the buffer are what they are supposed to be */
-	for (i = 0; i < sizeof(buf) / 2; i++) {
-		if (buf[i] != (char) (i % 2 ? 't' : 'T')) {
-			printf("Error: wrong content in buffer at %u!\n", i);
-			return -1;
-		}
-	}
-	for (i = sizeof(buf) / 2; i < sizeof(buf); i++) {
-		if (buf[i] != (char) (i % 2 ? 'h' : 'H')) {
-			printf("Error: wrong content in buffer %u!\n", i);
-			return -1;
-		}
-	}
-
-	return 0;
-}
-
-/* test left alignment */
-static int
-test_cirbuf_align_left(void)
-{
-#define HALF_OFFSET CMDLINE_TEST_BUFSIZE / 2
-#define SMALL_OFFSET HALF_OFFSET / 2
-/* resulting buffer lengths for each of the test cases */
-#define LEN1 HALF_OFFSET - SMALL_OFFSET - 1
-#define LEN2 HALF_OFFSET + SMALL_OFFSET + 2
-#define LEN3 HALF_OFFSET - SMALL_OFFSET
-#define LEN4 HALF_OFFSET + SMALL_OFFSET - 1
-
-	struct cirbuf cb;
-	char buf[CMDLINE_TEST_BUFSIZE];
-	char tmp[CMDLINE_TEST_BUFSIZE];
-	unsigned i;
-
-	/*
-	 * align left when start < end and start in left half
-	 */
-
-	/*
-	 * initialize circular buffer
-	 */
-	memset(buf, 0, sizeof(buf));
-	if (cirbuf_init(&cb, buf, 0, sizeof(buf)) < 0) {
-		printf("Error: failed to initialize circular buffer!\n");
-		return -1;
-	}
-
-	/* push end into left half */
-	for (i = 0; i < HALF_OFFSET - 1; i++)
-		cirbuf_add_tail_safe(&cb, 't');
-
-	/* push start into left half < end */
-	for (i = 0; i < SMALL_OFFSET; i++)
-		cirbuf_del_head_safe(&cb);
-
-	/* align */
-	if (cirbuf_align_left(&cb) < 0) {
-		printf("Error: alignment failed!\n");
-		return -1;
-	}
-
-	/* verify result */
-	if (cb.start != 0 || cb.len != LEN1 || cb.end != cb.len - 1) {
-		printf("Error: buffer alignment is wrong!\n");
-		return -1;
-	}
-
-	/*
-	 * align left when start > end and start in left half
-	 */
-
-	/*
-	 * reinitialize circular buffer
-	 */
-	memset(buf, 0, sizeof(buf));
-	if (cirbuf_init(&cb, buf, 0, sizeof(buf)) < 0) {
-		printf("Error: failed to reinitialize circular buffer!\n");
-		return -1;
-	}
-
-	/* push start into left half */
-	for (i = 0; i < HALF_OFFSET + 2; i++)
-		cirbuf_add_head_safe(&cb, 'h');
-
-	/* push end into left half > start */
-	for (i = 0; i < SMALL_OFFSET; i++)
-		cirbuf_add_tail_safe(&cb, 't');
-
-	/* align */
-	if (cirbuf_align_left(&cb) < 0) {
-		printf("Error: alignment failed!\n");
-		return -1;
-	}
-
-	/* verify result */
-	if (cb.start != 0 || cb.len != LEN2 || cb.end != cb.len - 1) {
-		printf("Error: buffer alignment is wrong!");
-		return -1;
-	}
-
-	/*
-	 * align left when start < end and start in right half
-	 */
-
-	/*
-	 * reinitialize circular buffer
-	 */
-	memset(buf, 0, sizeof(buf));
-	if (cirbuf_init(&cb, buf, 0, sizeof(buf)) < 0) {
-		printf("Error: failed to reinitialize circular buffer!\n");
-		return -1;
-	}
-
-	/* push start into the right half */
-	for (i = 0; i < HALF_OFFSET; i++)
-		cirbuf_add_head_safe(&cb, 'h');
-
-	/* push end into left half > start */
-	for (i = 0; i < SMALL_OFFSET; i++)
-		cirbuf_del_tail_safe(&cb);
-
-	/* align */
-	if (cirbuf_align_left(&cb) < 0) {
-		printf("Error: alignment failed!\n");
-		return -1;
-	}
-
-	/* verify result */
-	if (cb.start != 0 || cb.len != LEN3 || cb.end != cb.len - 1) {
-		printf("Error: buffer alignment is wrong!");
-		return -1;
-	}
-
-	/*
-	 * align left when start > end and start in right half
-	 */
-
-	/*
-	 * reinitialize circular buffer
-	 */
-	memset(buf, 0, sizeof(buf));
-	if (cirbuf_init(&cb, buf, 0, sizeof(buf)) < 0) {
-		printf("Error: failed to reinitialize circular buffer!\n");
-		return -1;
-	}
-
-	/* push start into the right half */
-	for (i = 0; i < HALF_OFFSET - 1; i++)
-		cirbuf_add_head_safe(&cb, 'h');
-
-	/* push end into left half < start */
-	for (i = 0; i < SMALL_OFFSET; i++)
-		cirbuf_add_tail_safe(&cb, 't');
-
-	/* align */
-	if (cirbuf_align_left(&cb) < 0) {
-		printf("Error: alignment failed!\n");
-		return -1;
-	}
-
-	/* verify result */
-	if (cb.start != 0 || cb.len != LEN4 ||
-			cb.end != cb.len - 1) {
-		printf("Error: buffer alignment is wrong!");
-		return -1;
-	}
-
-	/*
-	 * Verify that alignment doesn't corrupt data
-	 */
-
-	/*
-	 * reinitialize circular buffer
-	 */
-	memset(buf, 0, sizeof(buf));
-	if (cirbuf_init(&cb, buf, 0, sizeof(buf)) < 0) {
-		printf("Error: failed to reinitialize circular buffer!\n");
-		return -1;
-	}
-
-	/* add string to tail and head */
-	if (cirbuf_add_buf_head(&cb, CIRBUF_STR_HEAD,
-			sizeof(CIRBUF_STR_HEAD)) < 0 || cirbuf_add_buf_tail(&cb,
-					CIRBUF_STR_TAIL, sizeof(CIRBUF_STR_TAIL)) < 0) {
-		printf("Error: failed to add strings!\n");
-		return -1;
-	}
-
-	/* align */
-	if (cirbuf_align_left(&cb) < 0) {
-		printf("Error: alignment failed!\n");
-		return -1;
-	}
-
-	/* get string from head */
-	if (cirbuf_get_buf_head(&cb, tmp,
-			sizeof(CIRBUF_STR_HEAD) + sizeof(CIRBUF_STR_TAIL)) < 0) {
-		printf("Error: failed to read string from head!\n");
-		return -1;
-	}
-
-	/* verify string */
-	if (strncmp(tmp, CIRBUF_STR_HEAD "\0" CIRBUF_STR_TAIL,
-			sizeof(CIRBUF_STR_HEAD) + sizeof(CIRBUF_STR_TAIL)) != 0) {
-		printf("Error: strings mismatch!\n");
-		return -1;
-	}
-
-	/* reset tmp buffer */
-	memset(tmp, 0, sizeof(tmp));
-
-	/* get string from tail */
-	if (cirbuf_get_buf_tail(&cb, tmp,
-			sizeof(CIRBUF_STR_HEAD) + sizeof(CIRBUF_STR_TAIL)) < 0) {
-		printf("Error: failed to read string from head!\n");
-		return -1;
-	}
-
-	/* verify string */
-	if (strncmp(tmp, CIRBUF_STR_HEAD "\0" CIRBUF_STR_TAIL,
-			sizeof(CIRBUF_STR_HEAD) + sizeof(CIRBUF_STR_TAIL)) != 0) {
-		printf("Error: strings mismatch!\n");
-		return -1;
-	}
-
-	return 0;
-}
-
-/* test right alignment */
-static int
-test_cirbuf_align_right(void)
-{
-#define END_OFFSET CMDLINE_TEST_BUFSIZE - 1
-	struct cirbuf cb;
-	char buf[CMDLINE_TEST_BUFSIZE];
-	char tmp[CMDLINE_TEST_BUFSIZE];
-	unsigned i;
-
-
-	/*
-	 * align right when start < end and start in left half
-	 */
-
-	/*
-	 * initialize circular buffer
-	 */
-	memset(buf, 0, sizeof(buf));
-	if (cirbuf_init(&cb, buf, 0, sizeof(buf)) < 0) {
-		printf("Error: failed to initialize circular buffer!\n");
-		return -1;
-	}
-
-	/* push end into left half */
-	for (i = 0; i < HALF_OFFSET - 1; i++)
-		cirbuf_add_tail_safe(&cb, 't');
-
-	/* push start into left half < end */
-	for (i = 0; i < SMALL_OFFSET; i++)
-		cirbuf_del_head_safe(&cb);
-
-	/* align */
-	cirbuf_align_right(&cb);
-
-	/* verify result */
-	if (cb.start != END_OFFSET || cb.len != LEN1 || cb.end != cb.len - 2) {
-		printf("Error: buffer alignment is wrong!\n");
-		return -1;
-	}
-
-	/*
-	 * align right when start > end and start in left half
-	 */
-
-	/*
-	 * reinitialize circular buffer
-	 */
-	memset(buf, 0, sizeof(buf));
-	if (cirbuf_init(&cb, buf, 0, sizeof(buf)) < 0) {
-		printf("Error: failed to reinitialize circular buffer!\n");
-		return -1;
-	}
-
-	/* push start into left half */
-	for (i = 0; i < HALF_OFFSET + 2; i++)
-		cirbuf_add_head_safe(&cb, 'h');
-
-	/* push end into left half > start */
-	for (i = 0; i < SMALL_OFFSET; i++)
-		cirbuf_add_tail_safe(&cb, 't');
-
-	/* align */
-	cirbuf_align_right(&cb);
-
-	/* verify result */
-	if (cb.start != END_OFFSET || cb.len != LEN2 || cb.end != cb.len - 2) {
-		printf("Error: buffer alignment is wrong!");
-		return -1;
-	}
-
-	/*
-	 * align right when start < end and start in right half
-	 */
-
-	/*
-	 * reinitialize circular buffer
-	 */
-	memset(buf, 0, sizeof(buf));
-	if (cirbuf_init(&cb, buf, 0, sizeof(buf)) < 0) {
-		printf("Error: failed to reinitialize circular buffer!\n");
-		return -1;
-	}
-
-	/* push start into the right half */
-	for (i = 0; i < HALF_OFFSET; i++)
-		cirbuf_add_head_safe(&cb, 'h');
-
-	/* push end into left half > start */
-	for (i = 0; i < SMALL_OFFSET; i++)
-		cirbuf_del_tail_safe(&cb);
-
-	/* align */
-	cirbuf_align_right(&cb);
-
-	/* verify result */
-	if (cb.end != END_OFFSET || cb.len != LEN3 || cb.start != cb.end - cb.len + 1) {
-		printf("Error: buffer alignment is wrong!");
-		return -1;
-	}
-
-	/*
-	 * align right when start > end and start in right half
-	 */
-
-	/*
-	 * reinitialize circular buffer
-	 */
-	memset(buf, 0, sizeof(buf));
-	if (cirbuf_init(&cb, buf, 0, sizeof(buf)) < 0) {
-		printf("Error: failed to reinitialize circular buffer!\n");
-		return -1;
-	}
-
-	/* push start into the right half */
-	for (i = 0; i < HALF_OFFSET - 1; i++)
-		cirbuf_add_head_safe(&cb, 'h');
-
-	/* push end into left half < start */
-	for (i = 0; i < SMALL_OFFSET; i++)
-		cirbuf_add_tail_safe(&cb, 't');
-
-	/* align */
-	cirbuf_align_right(&cb);
-
-	/* verify result */
-	if (cb.end != END_OFFSET || cb.len != LEN4 || cb.start != cb.end - cb.len + 1) {
-		printf("Error: buffer alignment is wrong!");
-		return -1;
-	}
-
-	/*
-	 * Verify that alignment doesn't corrupt data
-	 */
-
-	/*
-	 * reinitialize circular buffer
-	 */
-	memset(buf, 0, sizeof(buf));
-	if (cirbuf_init(&cb, buf, 0, sizeof(buf)) < 0) {
-		printf("Error: failed to reinitialize circular buffer!\n");
-		return -1;
-	}
-
-	/* add string to tail and head */
-	if (cirbuf_add_buf_tail(&cb, CIRBUF_STR_TAIL,
-			sizeof(CIRBUF_STR_TAIL)) < 0 || cirbuf_add_buf_head(&cb,
-					CIRBUF_STR_HEAD, sizeof(CIRBUF_STR_HEAD)) < 0) {
-		printf("Error: failed to add strings!\n");
-		return -1;
-	}
-
-	/* align */
-	if (cirbuf_align_right(&cb) < 0) {
-		printf("Error: alignment failed!\n");
-		return -1;
-	}
-
-	/* get string from head */
-	if (cirbuf_get_buf_head(&cb, tmp,
-			sizeof(CIRBUF_STR_HEAD) + sizeof(CIRBUF_STR_TAIL)) < 0) {
-		printf("Error: failed to read string from head!\n");
-		return -1;
-	}
-
-	/* verify string */
-	if (strncmp(tmp, CIRBUF_STR_HEAD "\0" CIRBUF_STR_TAIL,
-			sizeof(CIRBUF_STR_HEAD) + sizeof(CIRBUF_STR_TAIL)) != 0) {
-		printf("Error: strings mismatch!\n");
-		return -1;
-	}
-
-	/* reset tmp buffer */
-	memset(tmp, 0, sizeof(tmp));
-
-	/* get string from tail */
-	if (cirbuf_get_buf_tail(&cb, tmp,
-			sizeof(CIRBUF_STR_HEAD) + sizeof(CIRBUF_STR_TAIL)) < 0) {
-		printf("Error: failed to read string from head!\n");
-		return -1;
-	}
-	/* verify string */
-	if (strncmp(tmp, CIRBUF_STR_HEAD "\0" CIRBUF_STR_TAIL,
-			sizeof(CIRBUF_STR_HEAD) + sizeof(CIRBUF_STR_TAIL)) != 0) {
-		printf("Error: strings mismatch!\n");
-		return -1;
-	}
-
-	return 0;
-}
-
-/* call functions with invalid parameters */
-int
-test_cirbuf_invalid_param(void)
-{
-	struct cirbuf cb;
-	char buf[CMDLINE_TEST_BUFSIZE];
-
-	/* null cirbuf */
-	if (cirbuf_init(0, buf, 0, sizeof(buf)) == 0)
-		return -1;
-	/* null buffer */
-	if (cirbuf_init(&cb, 0, 0, sizeof(buf)) == 0)
-		return -1;
-	/* null cirbuf */
-	if (cirbuf_add_head_safe(0, 'h') == 0)
-		return -1;
-	if (cirbuf_add_tail_safe(0, 't') == 0)
-		return -1;
-	if (cirbuf_del_head_safe(0) == 0)
-		return -1;
-	if (cirbuf_del_tail_safe(0) == 0)
-		return -1;
-	/* null buffer */
-	if (cirbuf_add_buf_head(&cb, 0, 0) == 0)
-		return -1;
-	if (cirbuf_add_buf_tail(&cb, 0, 0) == 0)
-		return -1;
-	/* null cirbuf */
-	if (cirbuf_add_buf_head(0, buf, 0) == 0)
-		return -1;
-	if (cirbuf_add_buf_tail(0, buf, 0) == 0)
-		return -1;
-	/* null size */
-	if (cirbuf_add_buf_head(&cb, buf, 0) == 0)
-		return -1;
-	if (cirbuf_add_buf_tail(&cb, buf, 0) == 0)
-		return -1;
-	/* null cirbuf */
-	if (cirbuf_del_buf_head(0, 0) == 0)
-		return -1;
-	if (cirbuf_del_buf_tail(0, 0) == 0)
-		return -1;
-	/* null size */
-	if (cirbuf_del_buf_head(&cb, 0) == 0)
-		return -1;
-	if (cirbuf_del_buf_tail(&cb, 0) == 0)
-		return -1;
-	/* null cirbuf */
-	if (cirbuf_get_buf_head(0, 0, 0) == 0)
-		return -1;
-	if (cirbuf_get_buf_tail(0, 0, 0) == 0)
-		return -1;
-	/* null buffer */
-	if (cirbuf_get_buf_head(&cb, 0, 0) == 0)
-		return -1;
-	if (cirbuf_get_buf_tail(&cb, 0, 0) == 0)
-		return -1;
-	/* null size, this is valid but should return 0 */
-	if (cirbuf_get_buf_head(&cb, buf, 0) != 0)
-		return -1;
-	if (cirbuf_get_buf_tail(&cb, buf, 0) != 0)
-		return -1;
-	/* null cirbuf */
-	if (cirbuf_align_left(0) == 0)
-		return -1;
-	if (cirbuf_align_right(0) == 0)
-		return -1;
-
-	return 0;
-}
-
-/* test cmdline_cirbuf char functions */
-int
-test_cirbuf_char(void)
-{
-	int ret;
-
-	ret = test_cirbuf_char_add_del();
-	if (ret < 0)
-		return -1;
-
-	ret = test_cirbuf_char_fill();
-	if (ret < 0)
-		return -1;
-
-	return 0;
-}
-
-/* test cmdline_cirbuf string functions */
-int
-test_cirbuf_string(void)
-{
-	if (test_cirbuf_string_add_del() < 0)
-		return -1;
-
-	if (test_cirbuf_string_add_del_reverse() < 0)
-		return -1;
-
-	if (test_cirbuf_string_add_boundaries() < 0)
-		return -1;
-
-	if (test_cirbuf_string_get_del_boundaries() < 0)
-		return -1;
-
-	if (test_cirbuf_string_get_del_partial() < 0)
-		return -1;
-
-	if (test_cirbuf_string_misc() < 0)
-		return -1;
-
-	return 0;
-}
-
-/* test cmdline_cirbuf align functions */
-int
-test_cirbuf_align(void)
-{
-	if (test_cirbuf_align_left() < 0)
-		return -1;
-	if (test_cirbuf_align_right() < 0)
-		return -1;
-	return 0;
-}
diff --git a/test/test/test_cmdline_lib.c b/test/test/test_cmdline_lib.c
index 65b823a..93a80d0 100644
--- a/test/test/test_cmdline_lib.c
+++ b/test/test/test_cmdline_lib.c
@@ -41,8 +41,6 @@
 #include <ctype.h>
 #include <sys/queue.h>
 
-#include <cmdline_vt100.h>
-#include <cmdline_rdline.h>
 #include <cmdline_parse.h>
 #include <cmdline_socket.h>
 #include <cmdline.h>
@@ -50,113 +48,41 @@
 #include "test_cmdline.h"
 
 /****************************************************************/
-/* static functions required for some tests */
-static void
-valid_buffer(__attribute__((unused))struct rdline *rdl,
-			__attribute__((unused))const char *buf,
-			__attribute__((unused)) unsigned int size)
-{
-}
-
-static int
-complete_buffer(__attribute__((unused)) struct rdline *rdl,
-			__attribute__((unused)) const char *buf,
-			__attribute__((unused)) char *dstbuf,
-			__attribute__((unused)) unsigned int dstsize,
-			__attribute__((unused)) int *state)
-{
-	return 0;
-}
-
-/****************************************************************/
 
 static int
 test_cmdline_parse_fns(void)
 {
-	struct cmdline cl;
+	struct cmdline *cl;
 	int i = 0;
 	char dst[CMDLINE_TEST_BUFSIZE];
 
+	cl = cmdline_new(NULL, "prompt", 0, 1);
+	if (!cl)
+		goto error;
 	if (cmdline_parse(NULL, "buffer") >= 0)
 		goto error;
-	if (cmdline_parse(&cl, NULL) >= 0)
+	if (cmdline_parse(cl, NULL) >= 0)
 		goto error;
 
 	if (cmdline_complete(NULL, "buffer", &i, dst, sizeof(dst)) >= 0)
 		goto error;
-	if (cmdline_complete(&cl, NULL, &i, dst, sizeof(dst)) >= 0)
+	if (cmdline_complete(cl, NULL, &i, dst, sizeof(dst)) >= 0)
 		goto error;
-	if (cmdline_complete(&cl, "buffer", NULL, dst, sizeof(dst)) >= 0)
+	if (cmdline_complete(cl, "buffer", NULL, dst, sizeof(dst)) >= 0)
 		goto error;
-	if (cmdline_complete(&cl, "buffer", &i, NULL, sizeof(dst)) >= 0)
+	if (cmdline_complete(cl, "buffer", &i, NULL, sizeof(dst)) >= 0)
 		goto error;
 
 	return 0;
 
 error:
+	if (cl)
+		cmdline_free(cl);
 	printf("Error: function accepted null parameter!\n");
 	return -1;
 }
 
 static int
-test_cmdline_rdline_fns(void)
-{
-	struct rdline rdl;
-	rdline_write_char_t *wc = &cmdline_write_char;
-	rdline_validate_t *v = &valid_buffer;
-	rdline_complete_t *c = &complete_buffer;
-
-	if (rdline_init(NULL, wc, v, c) >= 0)
-		goto error;
-	if (rdline_init(&rdl, NULL, v, c) >= 0)
-		goto error;
-	if (rdline_init(&rdl, wc, NULL, c) >= 0)
-		goto error;
-	if (rdline_init(&rdl, wc, v, NULL) >= 0)
-		goto error;
-	if (rdline_char_in(NULL, 0) >= 0)
-		goto error;
-	if (rdline_get_buffer(NULL) != NULL)
-		goto error;
-	if (rdline_add_history(NULL, "history") >= 0)
-		goto error;
-	if (rdline_add_history(&rdl, NULL) >= 0)
-		goto error;
-	if (rdline_get_history_item(NULL, 0) != NULL)
-		goto error;
-
-	/* void functions */
-	rdline_newline(NULL, "prompt");
-	rdline_newline(&rdl, NULL);
-	rdline_stop(NULL);
-	rdline_quit(NULL);
-	rdline_restart(NULL);
-	rdline_redisplay(NULL);
-	rdline_reset(NULL);
-	rdline_clear_history(NULL);
-
-	return 0;
-
-error:
-	printf("Error: function accepted null parameter!\n");
-	return -1;
-}
-
-static int
-test_cmdline_vt100_fns(void)
-{
-	if (vt100_parser(NULL, 0) >= 0) {
-		printf("Error: function accepted null parameter!\n");
-		return -1;
-	}
-
-	/* void functions */
-	vt100_init(NULL);
-
-	return 0;
-}
-
-static int
 test_cmdline_socket_fns(void)
 {
 	cmdline_parse_ctx_t ctx;
@@ -193,7 +119,7 @@ static int
 test_cmdline_fns(void)
 {
 	cmdline_parse_ctx_t ctx;
-	struct cmdline cl, *tmp;
+	struct cmdline *tmp;
 
 	memset(&ctx, 0, sizeof(ctx));
 	tmp = cmdline_new(&ctx, "test", -1, -1);
@@ -206,10 +132,6 @@ test_cmdline_fns(void)
 		goto error;
 	if (cmdline_in(NULL, "buffer", CMDLINE_TEST_BUFSIZE) >= 0)
 		goto error;
-	if (cmdline_in(&cl, NULL, CMDLINE_TEST_BUFSIZE) >= 0)
-		goto error;
-	if (cmdline_write_char(NULL, 0) >= 0)
-		goto error;
 
 	/* void functions */
 	cmdline_set_prompt(NULL, "prompt");
@@ -220,16 +142,6 @@ test_cmdline_fns(void)
 	cmdline_interact(NULL);
 	cmdline_quit(NULL);
 
-	/* check if void calls change anything when they should fail */
-	cl = *tmp;
-
-	cmdline_printf(&cl, NULL);
-	if (memcmp(&cl, tmp, sizeof(cl))) goto mismatch;
-	cmdline_set_prompt(&cl, NULL);
-	if (memcmp(&cl, tmp, sizeof(cl))) goto mismatch;
-	cmdline_in(&cl, NULL, CMDLINE_TEST_BUFSIZE);
-	if (memcmp(&cl, tmp, sizeof(cl))) goto mismatch;
-
 	cmdline_free(tmp);
 
 	return 0;
@@ -237,9 +149,6 @@ test_cmdline_fns(void)
 error:
 	printf("Error: function accepted null parameter!\n");
 	return -1;
-mismatch:
-	printf("Error: data changed!\n");
-	return -1;
 }
 
 /* test library functions. the point of these tests is not so much to test
@@ -251,10 +160,6 @@ test_cmdline_lib(void)
 {
 	if (test_cmdline_parse_fns() < 0)
 		return -1;
-	if (test_cmdline_rdline_fns() < 0)
-		return -1;
-	if (test_cmdline_vt100_fns() < 0)
-		return -1;
 	if (test_cmdline_socket_fns() < 0)
 		return -1;
 	if (test_cmdline_fns() < 0)
-- 
2.1.4

^ permalink raw reply	[relevance 1%]

* [dpdk-dev] [PATCH v1] doc: update release notes for 17.11
@ 2017-11-10 12:27  4% John McNamara
  0 siblings, 0 replies; 200+ results
From: John McNamara @ 2017-11-10 12:27 UTC (permalink / raw)
  To: dev; +Cc: John McNamara

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 24297 bytes --]

Fix grammar, spelling and formatting of DPDK 17.11 release notes.

Signed-off-by: John McNamara <john.mcnamara@intel.com>
---
 doc/guides/rel_notes/release_17_11.rst | 327 +++++++++++++++------------------
 1 file changed, 152 insertions(+), 175 deletions(-)

diff --git a/doc/guides/rel_notes/release_17_11.rst b/doc/guides/rel_notes/release_17_11.rst
index e6e4407..b31b6bc 100644
--- a/doc/guides/rel_notes/release_17_11.rst
+++ b/doc/guides/rel_notes/release_17_11.rst
@@ -43,40 +43,39 @@ New Features
 
 * **Extended port_id range from uint8_t to uint16_t.**
 
-  Increased port_id range from 8 bits to 16 bits in order to support more than
-  256 ports in dpdk. All ethdev APIs which have port_id as parameter are changed
-  in the meantime.
+  Increased the ``port_id`` range from 8 bits to 16 bits in order to support
+  more than 256 ports in DPDK. All ethdev APIs which have ``port_id`` as
+  parameter have been changed.
 
 * **Modified the return type of rte_eth_stats_reset.**
 
-  Changed return type of ``rte_eth_stats_reset`` from ``void`` to ``int``
-  so the caller may know whether a device supports the operation or not
+  Changed return type of ``rte_eth_stats_reset`` from ``void`` to ``int`` so
+  that the caller can determine whether a device supports the operation or not
   and if the operation was carried out.
 
 * **Added a new driver for Marvell Armada 7k/8k devices.**
 
-  Added the new mrvl net driver for Marvell Armada 7k/8k devices. See the
-  "Network Interface Controller Drivers" document for more details on this new
-  driver.
+  Added the new ``mrvl`` net driver for Marvell Armada 7k/8k devices. See the
+  :doc:`../nics/mrvl` NIC guide for more details on this new driver.
 
 * **Updated mlx5 driver.**
 
   Updated the mlx5 driver including the following changes:
 
-   * Enabled PMD to run on top of upstream linux kernel and rdma-core libs.
-     By that removed the dependency on specific Mellanox OFED libraries.
+   * Enabled the PMD to run on top of upstream Linux kernel and rdma-core
+     libs, removing the dependency on specific Mellanox OFED libraries.
    * Improved PMD latency performance.
    * Improved PMD memory footprint.
-   * Supported vectorized Rx/Tx burst for ARMv8.
-   * Supported secondary process.
-   * Supported flow counters.
-   * Supported Rx hardware timestamp offload.
-   * Supported device removal event.
+   * Added support for vectorized Rx/Tx burst for ARMv8.
+   * Added support for secondary process.
+   * Added support for flow counters.
+   * Added support for Rx hardware timestamp offload.
+   * Added support for device removal event.
 
 * **Added SoftNIC PMD.**
 
-  Added new SoftNIC PMD. This virtual device offers applications a software
-  fallback support for traffic management.
+  Added a new SoftNIC PMD. This virtual device provides applications with
+  software fallback support for traffic management.
 
 * **Added support for NXP DPAA Devices.**
 
@@ -86,24 +85,23 @@ New Features
   * DPAA Mempool driver for supporting offloaded packet memory pool
   * DPAA PMD for DPAA devices
 
-  See the "Network Interface Controller Drivers" document for more details of
-  this new driver.
+  See the :doc:`../nics/dpaa` document for more details of this new driver.
 
 * **Updated support for Cavium OCTEONTX Device.**
 
-  Updated support for Cavium's OCTEONTX device(CN83xx). This includes:
+  Updated support for Cavium's OCTEONTX device (CN83xx). This includes:
 
   * OCTEONTX Mempool driver for supporting offloaded packet memory pool
   * OCTEONTX Ethdev PMD
   * OCTEONTX Eventdev-Ethdev Rx adapter
 
-  See the "Network Interface Controller Drivers" document for more details of
-  this new driver.
+  See the :doc:`../nics/octeontx` document for more details of this new driver.
 
-* **nfp: Added PF support.**
+* **Added PF support to the Netronome NFP PMD.**
 
-  Previously Netronome's NFP PMD had just support for VFs. PF support is
-  just as a basic DPDK port and has no VF management yet.
+  Added PF support to the Netronome NFP PMD. Previously the NFP PMD only
+  supported VFs. PF support is just as a basic DPDK port and has no VF
+  management yet.
 
   PF support comes with firmware upload support which allows the PMD to
   independently work from kernel netdev NFP drivers.
@@ -117,113 +115,115 @@ New Features
    * Support for Flow API
    * Support for Tx and Rx descriptor status functions
 
-* **Add bus agnostic functions to cryptodev for PMD initialisation**
+* **Added bus agnostic functions to cryptodev for PMD initialization**
 
-  Adds new PMD assist functions ``rte_cryptodev_pmd_parse_input_args()``,
-  ``rte_cryptodev_pmd_create()`` and ``rte_cryptodev_pmd_destroy()`` which
-  are bus independent for driver to manage creation and destruction of new
-  device instances.
+  Added new PMD assist, bus independent, functions
+  ``rte_cryptodev_pmd_parse_input_args()``, ``rte_cryptodev_pmd_create()`` and
+  ``rte_cryptodev_pmd_destroy()`` for drivers to manage creation and
+  destruction of new device instances.
 
 * **Updated QAT crypto PMD.**
 
-  Performance enhancements:
+  Added several performance enhancements:
 
   * Removed atomics from the internal queue pair structure.
-  * Coalesce writes to HEAD CSR on response processing.
-  * Coalesce writes to TAIL CSR on request processing.
+  * Added coalesce writes to HEAD CSR on response processing.
+  * Added coalesce writes to TAIL CSR on request processing.
 
-  Additional support for:
-
-  * AES CCM algorithm.
+  In addition support was added for the AES CCM algorithm.
 
 * **Updated the AESNI MB PMD.**
 
   The AESNI MB PMD has been updated with additional support for:
 
-  * DES CBC algorithm.
-  * DES DOCSIS BPI algorithm.
+  * The DES CBC algorithm.
+  * The DES DOCSIS BPI algorithm.
 
-  This requires the IPSec Multi-buffer library 0.47. For more details,
-  check out the AESNI MB PMD documenation.
+  This change requires version 0.47 of the IPSec Multi-buffer library. For
+  more details see the :doc:`../cryptodevs/aesni_mb` documentation.
 
 * **Updated the OpenSSL PMD.**
 
   The OpenSSL PMD has been updated with additional support for:
 
-  * DES CBC algorithm.
-  * AES CCM algorithm.
+  * The DES CBC algorithm.
+  * The AES CCM algorithm.
 
 * **Added NXP DPAA SEC crypto PMD.**
 
-  A new "dpaa_sec" hardware based crypto PMD for NXP DPAA devices has been
-  added. See the "Crypto Device Drivers" document for more details on this
-  driver.
+  A new ``dpaa_sec`` hardware based crypto PMD for NXP DPAA devices has been
+  added. See the :doc:`../cryptodevs/dpaa_sec` document for more details.
 
 * **Added MRVL crypto PMD.**
 
   A new crypto PMD has been added, which provides several ciphering and hashing
   algorithms. All cryptography operations use the MUSDK library crypto API.
+  See the :doc:`../cryptodevs/mrvl` document for more details.
 
 * **Add new benchmarking mode to dpdk-test-crypto-perf application.**
 
-  Added new "PMD cyclecount" benchmark mode to dpdk-test-crypto-perf application
-  that displays more detailed breakdown of CPU cycles used by hardware
+  Added a new "PMD cyclecount" benchmark mode to the ``dpdk-test-crypto-perf``
+  application to display a detailed breakdown of CPU cycles used by hardware
   acceleration.
 
 * **Added the Security Offload Library.**
 
-  Added an experimental library - rte_security. It provide security APIs for
-  protocols like IPSec using inline ipsec offload to ethernet device or full
-  protocol offload with lookaside crypto device.
+  Added an experimental library - ``rte_security``. This provide security APIs
+  for protocols like IPSec using inline ipsec offload to ethernet devices or
+  full protocol offload with lookaside crypto devices.
 
-  See the "Security_Library" section of the DPDK Programmers Guide document,
-  for more information.
+  See the :doc:`../prog_guide/rte_security` section of the DPDK Programmers
+  Guide document for more information.
 
-* **Updated DPAA2_SEC crypto driver.**
+* **Updated the DPAA2_SEC crypto driver to support rte_security.**
 
-  Updated dpaa2_sec crypto PMD to support rte_security lookaside protocol
-  offload for IPSec.
+  Updated the ``dpaa2_sec`` crypto PMD to support ``rte_security`` lookaside
+  protocol offload for IPSec.
 
-* **Updated IXGBE ethernet driver.**
+* **Updated the IXGBE ethernet driver to support rte_security.**
 
-  Updated ixgbe ethernet PMD to support rte_security inline IPSec offload.
+  Updated ixgbe ethernet PMD to support ``rte_security`` inline IPSec offload.
 
-* **Updated ipsec-secgw application**
+* **Updated ipsec-secgw application to support rte_security.**
 
-  Updated ipsec-secgw sample application to support rte_security actions for
-  ipsec inline and full protocol offload using lookaside crypto offload.
+  Updated the ``ipsec-secgw`` sample application to support ``rte_security``
+  actions for ipsec inline and full protocol offload using lookaside crypto
+  offload.
 
 * **Added IOMMU support to libvhost-user**
 
-  Implemented device IOTLB in Vhost-user backend, and enabled Virtio's IOMMU
-  feature. The feature is disabled by default, and can be enabled by setting
-  RTE_VHOST_USER_IOMMU_SUPPORT flag at vhost device registration time.
+  Implemented device IOTLB in the Vhost-user backend, and enabled Virtio's
+  IOMMU feature. The feature is disabled by default, and can be enabled by
+  setting ``RTE_VHOST_USER_IOMMU_SUPPORT`` flag at vhost device registration
+  time.
 
 * **Added the Event Ethernet Adapter Library.**
 
-  Added the Event Ethernet Adapter library. It provices APIs for
-  eventdev applications to configure the ethdev to eventdev packet flow.
+  Added the Event Ethernet Adapter library. This library provides APIs for
+  eventdev applications to configure the ethdev for eventdev packet flow.
 
-* **Updated DPAA2 Event PMD.**
+* **Updated DPAA2 Event PMD for the Event Ethernet Adapter.**
 
-  Added support for eventdev ethernet adapter for DPAA2.
+  Added support for the eventdev ethernet adapter for DPAA2.
 
 * **Added Membership library (rte_member).**
 
-  Added membership library. It provides an API for DPDK applications to insert a
-  new member, delete an existing member, or query the existence of a member in a
-  given set, or a group of sets. For the case of a group of sets the library
-  will return not only whether the element has been inserted before in one of
-  the sets but also which set it belongs to.
+  Added a new data structure library called the Membership Library.
 
   The Membership Library is an extension and generalization of a traditional
-  filter (for example Bloom Filter) structure that has multiple usages in a wide
-  variety of workloads and applications. In general, the Membership Library is a
-  data structure that provides a “set-summary” and responds to set-membership
-  queries whether a certain member belongs to a set(s).
+  filter (for example Bloom Filter) structure that has multiple usages in a
+  wide variety of workloads and applications. In general, the Membership
+  Library is a data structure that provides a "set-summary" and responds to
+  set-membership queries whether a certain member belongs to a set(s).
+
+  The library provides APIs for DPDK applications to insert a new member,
+  delete an existing member, and query the existence of a member in a given
+  set, or a group of sets. For the case of a group of sets the library will
+  return not only whether the element has been inserted in one of the sets but
+  also which set it belongs to.
 
-  See the :ref:`Membership Library <Member_Library>` documentation in
-  the Programmers Guide document, for more information.
+  See the :doc:`../prog_guide/member_lib` documentation in the Programmers
+  Guide, for more information.
 
 * **Added the Generic Segmentation Offload Library.**
 
@@ -243,9 +243,9 @@ New Features
 
 * **Added the Flow Classification Library.**
 
-  Added the Flow Classification library, it provides an API for DPDK
-  applications to classify an input packet by matching it against a set of flow
-  rules. It uses the librte_table API to manage the flow rules.
+  Added an experimental Flow Classification library to provide APIs for DPDK
+  applications to classify an input packet by matching it against a set of
+  flow rules. It uses the ``librte_table`` API to manage the flow rules.
 
 
 Resolved Issues
@@ -268,9 +268,6 @@ Resolved Issues
    =========================================================
 
 
-EAL
-~~~
-
 * **Service core fails to call service callback due to atomic lock**
 
   In a specific configuration of multi-thread unsafe services and service
@@ -279,36 +276,6 @@ EAL
   looked like another thread was executing the service callback. The logic for
   atomic locking of the services has been fixed and refactored for readability.
 
-Drivers
-~~~~~~~
-
-
-Libraries
-~~~~~~~~~
-
-
-Examples
-~~~~~~~~
-
-
-Other
-~~~~~
-
-
-Known Issues
-------------
-
-.. This section should contain new known issues in this release. Sample format:
-
-   * **Add title in present tense with full stop.**
-
-     Add a short 1-2 sentence description of the known issue in the present
-     tense. Add information on any known workarounds.
-
-   This section is a comment. do not overwrite or remove it.
-   Also, make sure to start the actual text at the margin.
-   =========================================================
-
 
 API Changes
 -----------
@@ -323,43 +290,46 @@ API Changes
    Also, make sure to start the actual text at the margin.
    =========================================================
 
-* **Ethdev device name length increased**
+* **Ethdev device name length increased.**
 
-  The size of internal device name is increased to 64 characters
-  to allow for storing longer bus specific name.
+  The size of internal device name has been increased to 64 characters
+  to allow for storing longer bus specific names.
 
-* **Ethdev flag RTE_ETH_DEV_DETACHABLE was removed**
+* **Removed the Ethdev RTE_ETH_DEV_DETACHABLE flag.**
 
-  This flag is not necessary anymore, with the new hotplug implementation.
-  It is now removed from the ether library. Its semantic is expressed at the bus
-  and PMD level.
+  Removed the Ethdev ``RTE_ETH_DEV_DETACHABLE`` flag. This flag is not
+  required anymore, with the new hotplug implementation. It has been removed
+  from the ether library. Its semantics are now expressed at the bus and PMD
+  level.
 
 * **Service cores API updated for usability**
 
-  The service cores API has been changed, removing pointers from the API
-  where possible, instead using integer IDs to identify each service. This
-  simplifed application code, aids debugging, and provides better
+  The service cores API has been changed, removing pointers from the API where
+  possible, and instead using integer IDs to identify each service. This
+  simplifies application code, aids debugging, and provides better
   encapsulation. A summary of the main changes made is as follows:
 
   * Services identified by ID not by ``rte_service_spec`` pointer
   * Reduced API surface by using ``set`` functions instead of enable/disable
   * Reworked ``rte_service_register`` to provide the service ID to registrar
-  * Rework start and stop APIs into ``rte_service_runstate_set``
-  * Added API to set runstate of service implementation to indicate readyness
+  * Reworked start and stop APIs into ``rte_service_runstate_set``
+  * Added API to set runstate of service implementation to indicate readiness
 
-* **The following changes made in mempool library**
+* **The following changes have been made in the mempool library**
 
-  * Moved ``flags`` datatype from int to unsigned int for ``rte_mempool``.
+  * Moved ``flags`` datatype from ``int`` to ``unsigned int`` for
+    ``rte_mempool``.
   * Removed ``__rte_unused int flag`` param from ``rte_mempool_generic_put``
     and ``rte_mempool_generic_get`` API.
   * Added ``flags`` param in ``rte_mempool_xmem_size`` and
     ``rte_mempool_xmem_usage``.
+  * ``rte_mem_phy2mch`` was used in Xen dom0 to obtain the physical address;
+    remove this API as Xen dom0 support was removed.
 
-* ``rte_mem_phy2mch`` was used in Xen dom0 to obtain the physical address;
-  remove this API as Xen dom0 support was removed.
+* **Added IOVA aliases related to physical address handling.**
 
-* **Some data type, structure members and functions related to physical address
-  are deprecated and have new alias with IOVA wording.**
+  Some data types, structure members and functions related to physical address
+  handling are deprecated and have new aliases with IOVA wording. For example:
 
   * ``phys_addr_t`` can be often replaced by ``rte_iova_t`` of same size.
   * ``RTE_BAD_PHYS_ADDR`` is often replaced by ``RTE_BAD_IOVA`` of same value.
@@ -367,10 +337,13 @@ API Changes
   * ``rte_mem_virt2phy()`` can often be replaced by ``rte_mem_virt2iova``.
   * ``rte_malloc_virt2phy`` is aliased with ``rte_malloc_virt2iova``.
   * ``rte_memzone.phys_addr`` is aliased with ``rte_memzone.iova``.
-  * ``rte_mempool_objhdr.physaddr`` is aliased with ``rte_mempool_objhdr.iova``.
-  * ``rte_mempool_memhdr.phys_addr`` is aliased with ``rte_mempool_memhdr.iova``.
+  * ``rte_mempool_objhdr.physaddr`` is aliased with
+    ``rte_mempool_objhdr.iova``.
+  * ``rte_mempool_memhdr.phys_addr`` is aliased with
+    ``rte_mempool_memhdr.iova``.
   * ``rte_mempool_virt2phy()`` can be replaced by ``rte_mempool_virt2iova()``.
-  * ``rte_mempool_populate_phys*()`` are aliased with ``rte_mempool_populate_iova*()``
+  * ``rte_mempool_populate_phys*()`` are aliased with
+    ``rte_mempool_populate_iova*()``
   * ``rte_mbuf.buf_physaddr`` is aliased with ``rte_mbuf.buf_iova``.
   * ``rte_mbuf_data_dma_addr*()`` are aliased with ``rte_mbuf_data_iova*()``.
   * ``rte_pktmbuf_mtophys*`` are aliased with ``rte_pktmbuf_iova*()``.
@@ -380,26 +353,26 @@ API Changes
   The PCI bus previously implemented within the EAL has been moved.
   A first part has been added as an RTE library providing PCI helpers to
   parse device locations or other such utilities.
-  A second part consisting in the actual bus driver has been moved to its
+  A second part consisting of the actual bus driver has been moved to its
   proper subdirectory, without changing its functionalities.
 
-  As such, several PCI-related functions are not proposed by the EAL anymore:
-
-  * rte_pci_detach
-  * rte_pci_dump
-  * rte_pci_ioport_map
-  * rte_pci_ioport_read
-  * rte_pci_ioport_unmap
-  * rte_pci_ioport_write
-  * rte_pci_map_device
-  * rte_pci_probe
-  * rte_pci_probe_one
-  * rte_pci_read_config
-  * rte_pci_register
-  * rte_pci_scan
-  * rte_pci_unmap_device
-  * rte_pci_unregister
-  * rte_pci_write_config
+  As such, several PCI-related functions are not exposed by the EAL anymore:
+
+  * ``rte_pci_detach``
+  * ``rte_pci_dump``
+  * ``rte_pci_ioport_map``
+  * ``rte_pci_ioport_read``
+  * ``rte_pci_ioport_unmap``
+  * ``rte_pci_ioport_write``
+  * ``rte_pci_map_device``
+  * ``rte_pci_probe``
+  * ``rte_pci_probe_one``
+  * ``rte_pci_read_config``
+  * ``rte_pci_register``
+  * ``rte_pci_scan``
+  * ``rte_pci_unmap_device``
+  * ``rte_pci_unregister``
+  * ``rte_pci_write_config``
 
   These functions are made available either as part of ``librte_pci`` or
   ``librte_bus_pci``.
@@ -407,6 +380,7 @@ API Changes
 * **Moved vdev bus APIs outside of the EAL**
 
   Moved the following APIs from ``librte_eal`` to ``librte_bus_vdev``:
+
   * ``rte_vdev_init``
   * ``rte_vdev_register``
   * ``rte_vdev_uninit``
@@ -415,13 +389,14 @@ API Changes
 * **Add return value to stats_get dev op API**
 
   The ``stats_get`` dev op API return value has been changed to be int.
-  By this way PMDs can return an error value in case of failure at stats
+  In this way PMDs can return an error value in case of failure at stats
   getting process time.
 
-* **Modified the rte_cryptodev_allocate_driver function in the cryptodev library.**
+* **Modified the rte_cryptodev_allocate_driver function.**
 
-  The function ``rte_cryptodev_allocate_driver()`` has been modified.
-  An extra parameter ``struct cryptodev_driver *crypto_drv`` has been added.
+  Modified the ``rte_cryptodev_allocate_driver()`` function in the cryptodev
+  library. An extra parameter ``struct cryptodev_driver *crypto_drv`` has been
+  added.
 
 * **Removed virtual device bus specific functions from librte_cryptodev.**
 
@@ -430,8 +405,9 @@ API Changes
   and have been replaced by non bus specific functions
   ``rte_cryptodev_pmd_parse_input_args()`` and ``rte_cryptodev_pmd_create()``.
 
-* ``rte_cryptodev_create_vdev`` was removed to avoid the dependency on vdev
-  in librte_cryptodev; instead, users can call rte_vdev_init() directly.
+  The ``rte_cryptodev_create_vdev()`` function was removed to avoid the
+  dependency on vdev in librte_cryptodev; instead, users can call
+  ``rte_vdev_init()`` directly.
 
 * **Removed PCI device bus specific functions from librte_cryptodev.**
 
@@ -444,29 +420,30 @@ API Changes
 
   The functions ``rte_set_log_level()``, ``rte_get_log_level()``,
   ``rte_set_log_type()`` and ``rte_get_log_type()`` have been removed.
+
   They are respectively replaced by ``rte_log_set_global_level()``,
   ``rte_log_get_global_level()``, ``rte_log_set_level()`` and
   ``rte_log_get_level()``.
 
-* **Removed ``mbuf`` flags ``PKT_RX_VLAN_PKT`` and ``PKT_RX_QINQ_PKT``.**
+* **Removed mbuf flags PKT_RX_VLAN_PKT and PKT_RX_QINQ_PKT.**
 
   The ``mbuf`` flags ``PKT_RX_VLAN_PKT`` and ``PKT_RX_QINQ_PKT`` have
-  been removed since their behavior were not properly described.
+  been removed since their behavior was not properly described.
 
-* **Added ``mbuf`` flags ``PKT_RX_VLAN`` and ``PKT_RX_QINQ``.**
+* **Added mbuf flags PKT_RX_VLAN and PKT_RX_QINQ.**
 
   Two ``mbuf`` flags have been added to indicate that the VLAN
   identifier has been saved in in the ``mbuf`` structure. For instance:
 
-  - if VLAN is not stripped and TCI is saved: ``PKT_RX_VLAN``
-  - if VLAN is stripped and TCI is saved: ``PKT_RX_VLAN | PKT_RX_VLAN_STRIPPED``
+  - If VLAN is not stripped and TCI is saved: ``PKT_RX_VLAN``
+  - If VLAN is stripped and TCI is saved: ``PKT_RX_VLAN | PKT_RX_VLAN_STRIPPED``
 
 * **Modified the vlan_offload_set_t function prototype in the ethdev library.**
 
-  Changed the function prototype of ``vlan_offload_set_t``.  The return value
-  has been changed from ``void`` to ``int`` so the caller to knows whether
-  the backing device supports the operation or if the operation was
-  successfully performed.
+  Modified the ``vlan_offload_set_t`` function prototype in the ethdev
+  library.  The return value has been changed from ``void`` to ``int`` so the
+  caller can determine whether the backing device supports the operation or if
+  the operation was successfully performed.
 
 
 ABI Changes
@@ -485,17 +462,17 @@ ABI Changes
 * **Extended port_id range.**
 
   The size of the field ``port_id`` in the ``rte_eth_dev_data`` structure
-  changed, as described in the `New Features` section.
+  has changed, as described in the `New Features` section above.
 
 * **New parameter added to rte_eth_dev.**
 
-  New parameter ``security_ctx``  added to ``rte_eth_dev`` to support security
-  operations like IPSec inline.
+  A new parameter ``security_ctx`` has been added to ``rte_eth_dev`` to
+  support security operations like IPSec inline.
 
 * **New parameter added to rte_cryptodev.**
 
-  New parameter ``security_ctx``  added to ``rte_cryptodev`` to support security
-  operations like lookaside crypto.
+  A new parameter ``security_ctx`` has been added to ``rte_cryptodev`` to
+  support security operations like lookaside crypto.
 
 
 Removed Items
@@ -510,10 +487,10 @@ Removed Items
    Also, make sure to start the actual text at the margin.
    =========================================================
 
-* Xen dom0 in EAL was removed, as well as xenvirt PMD and vhost_xen.
+* Xen dom0 in EAL has been removed, as well as the xenvirt PMD and vhost_xen.
 
 * The crypto performance unit tests have been removed,
-  replaced by the dpdk-test-crypto-perf application.
+  replaced by the ``dpdk-test-crypto-perf`` application.
 
 
 Shared Library Versions
-- 
2.7.5

^ permalink raw reply	[relevance 4%]

* Re: [dpdk-dev] [PATCH] doc: update ABI/API policy
  2017-11-06 14:48  4% ` Mcnamara, John
@ 2017-11-11 11:37  4%   ` Thomas Monjalon
  0 siblings, 0 replies; 200+ results
From: Thomas Monjalon @ 2017-11-11 11:37 UTC (permalink / raw)
  To: Richardson, Bruce; +Cc: dev, Mcnamara, John

06/11/2017 15:48, Mcnamara, John:
> From: Richardson, Bruce
> > 
> > Following agreement at the DPDK Technical Board meeting of 2017-10-13 [1],
> > update the documentation with the ABI/API policy changes.
> > 
> > [1] http://dpdk.org/ml/archives/dev/2017-October/079961.html
> > 
> > Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
> > ---
> >  doc/guides/contributing/versioning.rst | 19 ++++++++++++++++++-
> >  1 file changed, 18 insertions(+), 1 deletion(-)
> > 
> > diff --git a/doc/guides/contributing/versioning.rst
> > b/doc/guides/contributing/versioning.rst
> > index 8d0fdb777..a1d8492a1 100644
> > --- a/doc/guides/contributing/versioning.rst
> > +++ b/doc/guides/contributing/versioning.rst
> > @@ -13,7 +13,9 @@ General Guidelines
> >  ------------------
> > 
> >  #. Whenever possible, ABI should be preserved -#. The libraries marked in
> > experimental state may change without constraint.
> > +#. Libraries or APIs marked in ``experimental`` state may change without
> > constraint.
> > +#. New API will be marked as ``experimental`` for at least one release to
> 
> s/API/APIs/
> 
> 
> > +APIs marked as ``experimental`` are not considered part of the ABI and
> > +may change without warning at any time.  Since changes to APIs are most
> > +likely immediately after their introduction, as users begin to take
> > +advantage of those new API and start finding issues with them, new DPDK
> 
> s/API/APIs/
> 
> 
> > +   - The acknowledgment of the maintainer of the component is mandatory, or if
> > +     no maintainer is available for the component, the tree/sub-tree maintainer
> > +     for that component must be acknowledge the ABI change instead.
> 
> s/must be/must/
> 
> Apart from that:
> 
> Acked-by: John McNamara <john.mcnamara@intel.com>

Acked-by: Thomas Monjalon <thomas@monjalon.net>

Applied with suggested changes, thanks

^ permalink raw reply	[relevance 4%]

* Re: [dpdk-dev] [RFC] cmdline: rework as a wrapper to libedit
  2017-11-09 13:43  1% [dpdk-dev] [RFC] cmdline: rework as a wrapper to libedit Adrien Mazarguil
@ 2017-11-15  4:12  0% ` Wiles, Keith
  2017-11-15  8:04  0%   ` Olivier MATZ
  0 siblings, 1 reply; 200+ results
From: Wiles, Keith @ 2017-11-15  4:12 UTC (permalink / raw)
  To: Adrien Mazarguil
  Cc: Olivier Matz, Wu, Jingjing, dev, Thomas Monjalon, Yigit, Ferruh



> On Nov 9, 2017, at 5:43 AM, Adrien Mazarguil <adrien.mazarguil@6wind.com> wrote:
> 
> This patch removes all code associated with symbols not internally relied
> on by other DPDK components, makes struct cmdline opaque and then proceeds
> to re-implement the remaining functionality as a wrapper to the editline
> library (also known as libedit) [1].
> 
> Besides adding a new external dependency to its users, its large impact on
> librte_cmdline's API/ABI also warrants a major version number bump.
> 
> While librte_cmdline served DPDK well all these years as a small, easy to
> use and self-sufficient interactive command-line handler, it started to
> show its limits with testpmd's flow (rte_flow) command, which required
> support for dynamic tokens and very long commands.
> 
> This is the main motivation behind this rework. Long commands often need to
> be displayed on multiple lines, which are not properly supported by
> librte_cmdline's limited terminal handling capabilities, resulting in a
> rather frustrating user experience.
> 
> Testpmd being one of the main tools used by PMD developers and given flow
> command lines won't get any shorter, this issue had to be addressed.
> 
> Three options were considered:
> 
> - Fixing and enhancing librte_cmdline.
> 
>  The amount of work necessary to add support for edition on multiple lines
>  was deemed significant and the result would still have lacked in some
>  areas, such as working backspace/delete keys in all terminals (i.e. full
>  termcap support).
> 
> - Making testpmd directly rely on a more capable library.
> 
>  All testpmd commands rely on the cmdline_parse interface provided by
>  librte_cmdline. This approach would have required either a complete
>  rewrite or importing the missing bits from librte_cmdline to wrap them
>  around the new library, which naturally led to...
> 
> - Converting librte_cmdline as a wrapper to a more capable library.
> 
>  Let's be honest, interactive command line handling isn't what makes DPDK
>  shine. It's also far removed from its core functionality, but is still
>  necessary in order to easily implement test and example programs; the
>  cmdline_parse interface is particularly good at this.
> 
>  DPDK actually only relies on cmdline_parse. By removing all the other
>  unused interfaces, implementing what remains on top of a different
>  terminal-handling library would be quick and easy.
> 
> This last approach was chosen for the stated reasons. Libedit is
> well-known, BSD-licensed, widely available [2], used by many projects, does
> everything needed and more [3].
> 
> This rework results in the following changes:
> 
> - Removed circular buffer management interface for command history
>  (cmdline_cirbuf.c), command history being handled by libedit.
> - Removed raw command-line interpreter (cmdline_rdline.c).
> - Removed raw terminal handler (cmdline_vt100.c).
> - Removed all test/example code for the above.
> - Re-implemented high level interactive and non-interactive command-line
>  handlers (cmdline.c and cmdline_socket.c) on top of libedit using its
>  native interface, not its readline compatibility layer.
> - Made struct cmdline opaque so that applications relying on librte_cmdline
>  do not need to include any libedit headers.
> - The only visible change for most applications besides being linked to
>  libedit is they do not have to include cmdline_rdline.h anymore.
> 
> As an added bonus, terminal resizing is now automatically handled.
> 
> In the future, cmdline_parse could use libedit's advanced tokenizer as
> well to interpret quoted strings and escape sequences.
> 

I do agree that cmdline is getting pretty old and using libedit is one solution around the long commands, but it has a lot more problems IMO.

I do not agree it has severed DPDK well, just look at test-pmd and the hoops people have to jump thru to get a new command or variation of an existing command integrated into test-pmd it is very difficult. Also if you look at the command sets in test-pmd they are very odd in that similar commands can some times be set up completely different as cmdline is too rigid and difficult to use.

I had decided to not use the circular buffer code in cmdline as it did have a few problems for what I wanted and decided to write a standard gap buffer scheme used in most editors for lines. I had looked at libedit at one point decided I did not want another dependence for DPDK. I expect even my version does not solve the long line problem, but we can convert to libedit. (and toss my pretty code :-)

Fixing the long line problem is a very minor issue compared to everything else wrong with cmdline. I would suggest we look at CLI and improve it instead. We can add libedit to CLI and then finish testing the CLI with test-pmd. The first time I converted test-pmd I did remove and simplify the commands, but I was afraid that would cause a lot of problems for testing and scripts that people have written, but it is possible to fix these problems too.


I do not think fixing cmdline is the best answer and working to convert over to CLI is the better answer here.


Regards,
Keith

^ permalink raw reply	[relevance 0%]

* Re: [dpdk-dev] [RFC] cmdline: rework as a wrapper to libedit
  2017-11-15  4:12  0% ` Wiles, Keith
@ 2017-11-15  8:04  0%   ` Olivier MATZ
  0 siblings, 0 replies; 200+ results
From: Olivier MATZ @ 2017-11-15  8:04 UTC (permalink / raw)
  To: Wiles, Keith
  Cc: Adrien Mazarguil, Wu, Jingjing, dev, Thomas Monjalon, Yigit, Ferruh

Hi,

On Wed, Nov 15, 2017 at 04:12:07AM +0000, Wiles, Keith wrote:
> 
> 
> > On Nov 9, 2017, at 5:43 AM, Adrien Mazarguil <adrien.mazarguil@6wind.com> wrote:
> > 
> > This patch removes all code associated with symbols not internally relied
> > on by other DPDK components, makes struct cmdline opaque and then proceeds
> > to re-implement the remaining functionality as a wrapper to the editline
> > library (also known as libedit) [1].
> > 
> > Besides adding a new external dependency to its users, its large impact on
> > librte_cmdline's API/ABI also warrants a major version number bump.
> > 
> > While librte_cmdline served DPDK well all these years as a small, easy to
> > use and self-sufficient interactive command-line handler, it started to
> > show its limits with testpmd's flow (rte_flow) command, which required
> > support for dynamic tokens and very long commands.
> > 
> > This is the main motivation behind this rework. Long commands often need to
> > be displayed on multiple lines, which are not properly supported by
> > librte_cmdline's limited terminal handling capabilities, resulting in a
> > rather frustrating user experience.
> > 
> > Testpmd being one of the main tools used by PMD developers and given flow
> > command lines won't get any shorter, this issue had to be addressed.
> > 
> > Three options were considered:
> > 
> > - Fixing and enhancing librte_cmdline.
> > 
> >  The amount of work necessary to add support for edition on multiple lines
> >  was deemed significant and the result would still have lacked in some
> >  areas, such as working backspace/delete keys in all terminals (i.e. full
> >  termcap support).
> > 
> > - Making testpmd directly rely on a more capable library.
> > 
> >  All testpmd commands rely on the cmdline_parse interface provided by
> >  librte_cmdline. This approach would have required either a complete
> >  rewrite or importing the missing bits from librte_cmdline to wrap them
> >  around the new library, which naturally led to...
> > 
> > - Converting librte_cmdline as a wrapper to a more capable library.
> > 
> >  Let's be honest, interactive command line handling isn't what makes DPDK
> >  shine. It's also far removed from its core functionality, but is still
> >  necessary in order to easily implement test and example programs; the
> >  cmdline_parse interface is particularly good at this.
> > 
> >  DPDK actually only relies on cmdline_parse. By removing all the other
> >  unused interfaces, implementing what remains on top of a different
> >  terminal-handling library would be quick and easy.
> > 
> > This last approach was chosen for the stated reasons. Libedit is
> > well-known, BSD-licensed, widely available [2], used by many projects, does
> > everything needed and more [3].
> > 
> > This rework results in the following changes:
> > 
> > - Removed circular buffer management interface for command history
> >  (cmdline_cirbuf.c), command history being handled by libedit.
> > - Removed raw command-line interpreter (cmdline_rdline.c).
> > - Removed raw terminal handler (cmdline_vt100.c).
> > - Removed all test/example code for the above.
> > - Re-implemented high level interactive and non-interactive command-line
> >  handlers (cmdline.c and cmdline_socket.c) on top of libedit using its
> >  native interface, not its readline compatibility layer.
> > - Made struct cmdline opaque so that applications relying on librte_cmdline
> >  do not need to include any libedit headers.
> > - The only visible change for most applications besides being linked to
> >  libedit is they do not have to include cmdline_rdline.h anymore.
> > 
> > As an added bonus, terminal resizing is now automatically handled.
> > 
> > In the future, cmdline_parse could use libedit's advanced tokenizer as
> > well to interpret quoted strings and escape sequences.
> > 
> 
> I do agree that cmdline is getting pretty old and using libedit is one solution around the long commands, but it has a lot more problems IMO.
> 
> I do not agree it has severed DPDK well, just look at test-pmd and the hoops people have to jump thru to get a new command or variation of an existing command integrated into test-pmd it is very difficult. Also if you look at the command sets in test-pmd they are very odd in that similar commands can some times be set up completely different as cmdline is too rigid and difficult to use.
> 
> I had decided to not use the circular buffer code in cmdline as it did have a few problems for what I wanted and decided to write a standard gap buffer scheme used in most editors for lines. I had looked at libedit at one point decided I did not want another dependence for DPDK. I expect even my version does not solve the long line problem, but we can convert to libedit. (and toss my pretty code :-)
> 
> Fixing the long line problem is a very minor issue compared to everything else wrong with cmdline. I would suggest we look at CLI and improve it instead. We can add libedit to CLI and then finish testing the CLI with test-pmd. The first time I converted test-pmd I did remove and simplify the commands, but I was afraid that would cause a lot of problems for testing and scripts that people have written, but it is possible to fix these problems too.
> 
> 
> I do not think fixing cmdline is the best answer and working to convert over to CLI is the better answer here.

On my side, I think this patch goes in the correct direction:
- it solves an issue of the command line library
- it replaces a specific dpdk code by a well-known library which is widely used

Olivier

^ permalink raw reply	[relevance 0%]

Results 3401-3600 of ~18000   |  | reverse | sort options + mbox downloads above
-- links below jump to the message on this page --
2016-11-16 16:23     [dpdk-dev] [PATCH 00/22] Generic flow API (rte_flow) Adrien Mazarguil
2016-12-16 16:24     ` [dpdk-dev] [PATCH v2 00/25] " Adrien Mazarguil
2016-12-16 16:24       ` [dpdk-dev] [PATCH v2 01/25] ethdev: introduce generic flow API Adrien Mazarguil
2017-10-23  8:53  0%     ` Zhao1, Wei
2017-05-15 19:57     [dpdk-dev] [PATCH] test/crypto: remove crypto perf tests Pablo de Lara
2017-10-04  6:48  1% ` [dpdk-dev] [PATCH v2] " Pablo de Lara
2017-08-10 13:29     [dpdk-dev] [PATCH v4 1/2] ethdev: add return code to rte_eth_stats_reset() David Harton
2017-09-01  2:26     ` [dpdk-dev] [PATCH v5] " David Harton
2017-09-19 17:14  0%   ` Ferruh Yigit
2017-09-20 14:01  0%     ` David Harton (dharton)
2017-09-20 16:55  0%       ` Ferruh Yigit
2017-09-20 14:11  3%   ` [dpdk-dev] [PATCH v6] " David C Harton
2017-08-12 10:22     [dpdk-dev] [PATCH] eal: bus scan and probe never fail Shreyansh Jain
2017-10-05 23:21     ` Thomas Monjalon
2017-10-06 13:12       ` Shreyansh Jain
2017-10-06 13:37         ` Thomas Monjalon
2017-10-06 17:34           ` Jan Blunck
2017-10-09 11:10             ` Shreyansh Jain
2017-10-09 18:21               ` Don Provan
2017-10-10  5:00                 ` Shreyansh Jain
2017-10-10 16:00  3%               ` Aaron Conole
2017-10-11 22:34  0%                 ` Thomas Monjalon
2017-10-12 13:08  0%                   ` Aaron Conole
2017-10-12  5:39  0%                 ` Shreyansh Jain
2017-10-12 13:20  0%                   ` Aaron Conole
2017-08-14 15:15     [dpdk-dev] [PATCH v1 0/4] make dpdk iova aware Santosh Shukla
2017-08-14 15:15     ` [dpdk-dev] [PATCH v1 4/4] doc: remove dpdk iova aware notice Santosh Shukla
2017-09-18 18:44  0%   ` Mcnamara, John
2017-09-05 10:31     ` [dpdk-dev] [PATCH v2 0/5] make dpdk iova aware Santosh Shukla
2017-09-05 10:31       ` [dpdk-dev] [PATCH v2 5/5] doc: remove dpdk iova aware notice Santosh Shukla
2017-09-19 13:38  0%     ` Mcnamara, John
2017-10-20 12:31       ` [dpdk-dev] [PATCH v3 0/6] make dpdk iova aware Santosh Shukla
2017-10-20 12:31         ` [dpdk-dev] [PATCH v3 4/6] eal/memory: rename memory API to iova types Santosh Shukla
2017-11-03 11:11  4%       ` Thomas Monjalon
2017-11-03 11:35  0%         ` santosh
2017-11-03 13:58  0%           ` Thomas Monjalon
2017-11-03 15:22  0%             ` [dpdk-dev] [PATCH v3 4/6] eal/memory: rename memory API to iovatypes Jonas Pfefferle1
2017-10-20 12:31 15%     ` [dpdk-dev] [PATCH v3 5/6] doc: remove dpdk iova aware notice Santosh Shukla
2017-10-23 20:29  0%       ` Thomas Monjalon
2017-10-24  5:06  0%         ` santosh
2017-10-25  9:45  0%           ` Thomas Monjalon
2017-10-25  9:50  3%             ` Richardson, Bruce
2017-10-25 10:01  3%               ` Thomas Monjalon
2017-10-25 10:05  4%                 ` Bruce Richardson
2017-10-25 10:12  0%                   ` Thomas Monjalon
2017-10-25 10:32  0%                     ` Bruce Richardson
2017-11-06  1:41  2% ` [dpdk-dev] [PATCH v4 00/15] make DPDK IOVA aware Thomas Monjalon
2017-11-06  1:41 10%   ` [dpdk-dev] [PATCH v4 15/15] doc: add IOVA aware API changes in release notes Thomas Monjalon
2017-11-06  5:56  0%     ` santosh
2017-11-06  8:50  0%     ` Mcnamara, John
2017-08-17 16:11     [dpdk-dev] [RFC PATCH 0/1] eventtimer: introduce event timer wheel Jerin Jacob
2017-09-22 15:17     ` [dpdk-dev] [RFC PATCH v2 0/1] eventtimer: introduce event timer adapter Erik Gabriel Carrillo
2017-09-22 15:17  1%   ` [dpdk-dev] [RFC PATCH v2 1/1] " Erik Gabriel Carrillo
2017-08-22 16:24     [dpdk-dev] [PATCH v2] vhost: added user callbacks for socket open/close Dariusz Stojaczyk
2017-08-30 10:50     ` [dpdk-dev] [PATCH v3] rte_vhost: " Dariusz Stojaczyk
2017-10-10  3:14  0%   ` Yuanhan Liu
2017-08-25  9:40     [dpdk-dev] [PATCH 00/12] support to run vdev in the secondary process Jianfeng Tan
2017-08-25  9:40     ` [dpdk-dev] [PATCH 04/12] vdev: move to drivers/bus Jianfeng Tan
2017-08-29 13:04       ` Gaëtan Rivet
2017-08-29 22:47         ` Tan, Jianfeng
2017-09-18 11:47  0%       ` De Lara Guarch, Pablo
2017-09-19  6:01  0%         ` Tan, Jianfeng
2017-09-28 13:55  2% ` [dpdk-dev] [PATCH v2 00/12] support to run vdev in the secondary process Jianfeng Tan
2017-09-28 13:55  2%   ` [dpdk-dev] [PATCH v2 03/12] cryptodev: avoid dependency on rte_vdev.h Jianfeng Tan
2017-10-05 13:13  0%     ` Jan Blunck
2017-10-09  1:04  0%       ` Tan, Jianfeng
2017-08-25 13:46     [dpdk-dev] [RFC] Wireless Base Band Device (bbdev) Amr Mokhtar
2017-09-21 14:56  3% ` Thomas Monjalon
2017-10-03 14:29  0%   ` Mokhtar, Amr
2017-10-03 15:17  4%     ` Thomas Monjalon
2017-10-04 17:11  0%       ` Flavio Leitner
2017-10-05 21:55  0%       ` Mokhtar, Amr
2017-10-05 22:22  0%         ` Thomas Monjalon
2017-10-06 23:27  0%           ` Mokhtar, Amr
2017-10-07 11:42  0%             ` Thomas Monjalon
2017-08-25 16:07     [dpdk-dev] [PATCH 0/6] devargs cleanup Gaetan Rivet
2017-10-12  8:21     ` [dpdk-dev] [PATCH v2 00/18] " Gaetan Rivet
2017-10-12  8:21 10%   ` [dpdk-dev] [PATCH v2 18/18] doc: remove devargs deprecation notices Gaetan Rivet
2017-10-17 18:18       ` [dpdk-dev] [PATCH v2 00/18] devargs cleanup Aaron Conole
2017-10-18  8:36  4%     ` Gaëtan Rivet
2017-08-26  0:06     [dpdk-dev] [PATCH 1/3] ethdev: add new eth_dev_ops function for mtr ops get Cristian Dumitrescu
2017-10-05 13:09     ` [dpdk-dev] [PATCH V2 0/5] rte_mtr: generic ethdev api for metering and policing Cristian Dumitrescu
2017-10-05 13:09  1%   ` [dpdk-dev] [PATCH V2 3/5] ethdev: add new api for traffic " Cristian Dumitrescu
2017-09-01  2:36     [dpdk-dev] [PATCH v4] ethdev: allow returning error on VLAN offload configuration David Harton
2017-10-25  3:01  4% ` [dpdk-dev] [PATCH v5] ethdev: allow returning error on VLAN offload ops Ferruh Yigit
2017-09-01 15:02     [dpdk-dev] [PATCH v2 0/4] net/i40e: implement dynamic mapping of flow types to pctypes Kirill Rybalchenko
2017-09-20 14:32     ` [dpdk-dev] [PATCH v3 0/6] " Kirill Rybalchenko
2017-09-20 14:33  4%   ` [dpdk-dev] [PATCH v3 3/6] net/i40e: implement dynamic mapping of sw flow types to hw pctypes Kirill Rybalchenko
2017-09-25  9:44  0%     ` Xing, Beilei
2017-10-02 15:08       ` [dpdk-dev] [PATCH v4 0/5] net/i40e: implement dynamic mapping of flow types to pctypes Kirill Rybalchenko
2017-10-02 15:08  3%     ` [dpdk-dev] [PATCH v4 2/5] net/i40e: implement dynamic mapping of sw flow types to hw pctypes Kirill Rybalchenko
2017-10-04 12:52         ` [dpdk-dev] [PATCH v5 0/5] net/i40e: implement dynamic mapping of flow types to pctypes Kirill Rybalchenko
2017-10-04 12:52  3%       ` [dpdk-dev] [PATCH v5 2/5] net/i40e: implement dynamic mapping of sw flow types to hw pctypes Kirill Rybalchenko
2017-09-09 14:47     [dpdk-dev] [PATCH v3 0/4] increase port_id range Zhiyong Yang
2017-09-21  8:32  4% ` [dpdk-dev] [PATCH v4 0/5] " Zhiyong Yang
2017-09-21  8:32  8%   ` [dpdk-dev] [PATCH v4 1/5] net/bonding: remove bonding APIs using ABI versioning Zhiyong Yang
2017-09-21 10:36  4%     ` Ferruh Yigit
2017-09-22  2:02  4%       ` Yang, Zhiyong
2017-09-21  8:32  1%   ` [dpdk-dev] [PATCH v4 2/5] ethdev: increase port_id range Zhiyong Yang
2017-09-25  3:22  4%   ` [dpdk-dev] [PATCH v5 0/5] " Zhiyong Yang
2017-09-25  3:22  7%     ` [dpdk-dev] [PATCH v5 1/5] net/bonding: remove bonding APIs using ABI versioning Zhiyong Yang
2017-09-25 11:34  4%       ` Ferruh Yigit
2017-09-25  3:22  1%     ` [dpdk-dev] [PATCH v5 2/5] ethdev: increase port_id range Zhiyong Yang
2017-09-29  7:17  4%     ` [dpdk-dev] [PATCH v6 0/5] " Zhiyong Yang
2017-09-29  7:17  7%       ` [dpdk-dev] [PATCH v6 1/5] net/bonding: remove bonding APIs using ABI versioning Zhiyong Yang
2017-09-29  7:17  1%       ` [dpdk-dev] [PATCH v6 2/5] ethdev: increase port_id range Zhiyong Yang
2017-10-06  2:15  0%       ` [dpdk-dev] [PATCH v6 0/5] " Ferruh Yigit
2017-10-06 13:31  0%         ` Gaëtan Rivet
2017-10-06 14:29  0%         ` Thomas Monjalon
2017-10-06 16:02  0%         ` Thomas Monjalon
2017-10-11 21:21  0%         ` Ferruh Yigit
2017-10-12  1:33  0%           ` Yang, Zhiyong
2017-09-11  8:18     [dpdk-dev] [PATCH v2] devtools: rework abi checker script Olivier MATZ
2017-09-11  8:46     ` [dpdk-dev] [PATCH v3] " Olivier Matz
2017-09-13 15:00       ` Neil Horman
2017-09-19  9:15  7%     ` Olivier MATZ
2017-09-20  9:12 27%   ` [dpdk-dev] [PATCH v4] " Olivier Matz
2017-09-21 15:40  7%     ` Neil Horman
2017-09-25  9:11  9%       ` Olivier MATZ
2017-09-25 11:21  4%         ` Neil Horman
2017-10-05  7:53 27%     ` [dpdk-dev] [PATCH v5] " Olivier Matz
2017-10-05 13:15  4%       ` Neil Horman
2017-11-07 23:24  4%       ` Thomas Monjalon
2017-09-11 13:44     [dpdk-dev] [PATCH] net/nfp: remove firmware ABI check Alejandro Lucero
2017-09-18 19:00  4% ` Ferruh Yigit
2017-09-12 15:06     [dpdk-dev] [PATCH 1/2] reorder: fix ready buffers not being nulled out Pavan Nikhilesh
2017-10-12  8:32  3% ` Bruce Richardson
2017-09-13 10:44     [dpdk-dev] [PATCH v2 1/4] lib/librte_power: add turbo boost API David Hunt
2017-10-03 14:08  3% ` [dpdk-dev] [PATCH v3 0/9] Policy Based Power Control for Guest David Hunt
2017-10-11 16:18  2% ` [dpdk-dev] [PATCH v9 " David Hunt
2017-10-12  0:23  0%   ` Ferruh Yigit
2017-09-13 22:05     [dpdk-dev] [PATCH v3 0/3] timer library enhancement Erik Gabriel Carrillo
2017-09-19 17:02     ` [dpdk-dev] [PATCH v4 " Erik Gabriel Carrillo
2017-09-19 17:02  3%   ` [dpdk-dev] [PATCH v4 3/3] doc: update timer lib docs Erik Gabriel Carrillo
2017-09-14  8:26     [dpdk-dev] [PATCH 00/11] introduce security offload library Akhil Goyal
2017-09-14  8:26     ` [dpdk-dev] [PATCH 05/11] lib/librte_mbuf: add security crypto flags and mbuf fields Akhil Goyal
2017-09-18  7:54       ` Boris Pismenny
2017-09-20  9:43  4%     ` Olivier MATZ
2017-09-14 14:55     [dpdk-dev] [PATCH] ethdev: fix LIBABIVER Ferruh Yigit
2017-09-27  2:06     ` Yang, Zhiyong
2017-10-04 21:54  3%   ` Thomas Monjalon
2017-09-14 16:08     [dpdk-dev] [PATCH v4 0/4] eventdev: add attribute based get APIs Harry van Haaren
2017-09-20 13:35  4% ` [dpdk-dev] [PATCH v5 0/5] Harry van Haaren
2017-09-20 13:36  3%   ` [dpdk-dev] [PATCH v5 4/5] eventdev: add device started attribute Harry van Haaren
2017-09-20 13:36  4%   ` [dpdk-dev] [PATCH v5 5/5] eventdev: bump library version Harry van Haaren
2017-09-15 13:41     [dpdk-dev] [PATCH] doc: add note on hardware support deprecation Bruce Richardson
2017-09-18 13:49  0% ` Mcnamara, John
2017-09-18 13:59 21% ` [dpdk-dev] [PATCH v2] " Bruce Richardson
2017-10-13 20:46  0%   ` Thomas Monjalon
2017-09-17  6:54     [dpdk-dev] [PATCH v4 0/3] ethdev new offloads API Shahaf Shuler
2017-09-28 18:54  4% ` [dpdk-dev] [PATCH v5 " Shahaf Shuler
2017-10-04  8:17  4%   ` [dpdk-dev] [PATCH v6 0/4] " Shahaf Shuler
2017-10-04 16:12  0%     ` Ananyev, Konstantin
2017-10-05  0:55  0%       ` Ferruh Yigit
2017-09-18  9:31     [dpdk-dev] [PATCH v2 00/14] Move PCI away from the EAL Gaetan Rivet
2017-09-25 15:23     ` [dpdk-dev] [PATCH v3 00/13] " Gaetan Rivet
2017-09-25 15:24  4%   ` [dpdk-dev] [PATCH v3 13/13] doc: add notes on EAL PCI API update Gaetan Rivet
2017-10-12  8:17       ` [dpdk-dev] [PATCH v4 00/16] Move PCI away from the EAL Gaetan Rivet
2017-10-12  8:17  4%     ` [dpdk-dev] [PATCH v4 16/16] doc: add notes on EAL PCI API update Gaetan Rivet
2017-10-12 10:45         ` [dpdk-dev] [PATCH v5 00/20] Move PCI away from the EAL Gaetan Rivet
2017-10-12 10:45  4%       ` [dpdk-dev] [PATCH v5 19/20] doc: add notes on EAL PCI API update Gaetan Rivet
2017-10-25 22:38           ` [dpdk-dev] [PATCH v7 00/25] Move PCI away from the EAL Gaetan Rivet
2017-10-25 22:38  4%         ` [dpdk-dev] [PATCH v7 24/25] doc: add notes on EAL PCI API update Gaetan Rivet
2017-10-26 10:05             ` [dpdk-dev] [PATCH v8 00/25] Move PCI away from the EAL Gaetan Rivet
2017-10-26 10:06  4%           ` [dpdk-dev] [PATCH v8 24/25] doc: add notes on EAL PCI API update Gaetan Rivet
2017-09-22 10:47     [dpdk-dev] DPDK Community Survey 2017 Jain, Deepak K
2017-09-28 13:58  3% ` Kevin Traynor
2017-09-22 18:09  1% [dpdk-dev] [pull-request] next-net 17.11 PRE-RC1 Ferruh Yigit
2017-09-25 12:27     [dpdk-dev] [PATCH v2] Policy Based Power Control for Guest David Hunt
2017-10-04  9:15  2% ` [dpdk-dev] [PATCH v4] " David Hunt
2017-10-04 15:25  2%   ` [dpdk-dev] [PATCH v5 0/9] " David Hunt
2017-10-05 12:25  2%     ` [dpdk-dev] [PATCH v6 " David Hunt
2017-10-05 13:28  2%       ` [dpdk-dev] [PATCH v7 " David Hunt
2017-10-05 13:54  0%         ` Ananyev, Konstantin
2017-10-05 14:34  2%         ` [dpdk-dev] [PATCH v8 " David Hunt
2017-10-09 22:34  0%           ` Ferruh Yigit
2017-09-28  2:17     [dpdk-dev] [PATCH v4 0/8] GPT-C and GTP-U enabling Beilei Xing
2017-09-29  5:18     ` [dpdk-dev] [PATCH v6 " Beilei Xing
2017-09-29  5:18       ` [dpdk-dev] [PATCH v6 4/8] ethdev: add GTP items to support flow API Beilei Xing
2017-09-29  8:15         ` Sean Harte
2017-09-29  8:54           ` Xing, Beilei
2017-09-29  9:29             ` Sean Harte
2017-10-02 12:27               ` Adrien Mazarguil
2017-10-03  8:56                 ` Sean Harte
2017-10-05  8:06                   ` Wu, Jingjing
2017-10-05  8:30  3%                 ` Adrien Mazarguil
2017-10-05  8:39  0%                   ` Wu, Jingjing
2017-10-02 12:20     [dpdk-dev] [PATCH] lib/power: add turbo functions to version.map David Hunt
2017-10-02 14:55     ` Thomas Monjalon
2017-10-02 15:06       ` Hunt, David
2017-10-02 15:39         ` Thomas Monjalon
2017-10-02 16:25  3%       ` Hunt, David
2017-10-02 16:52  0%         ` Thomas Monjalon
2017-10-03 14:59     [dpdk-dev] [PATCH v5 0/3] run-time Linking support Xiaoyun Li
2017-10-04 22:58     ` [dpdk-dev] [PATCH v6 " Xiaoyun Li
2017-10-04 22:58       ` [dpdk-dev] [PATCH v6 1/3] eal/x86: run-time dispatch over memcpy Xiaoyun Li
2017-10-05  9:37         ` Ananyev, Konstantin
2017-10-05 11:19           ` Li, Xiaoyun
2017-10-05 11:26  3%         ` Richardson, Bruce
2017-10-05  9:49     [dpdk-dev] [PATCH v1 0/7] Flow API helpers enhancements Adrien Mazarguil
2017-10-05  9:49     ` [dpdk-dev] [PATCH v1 1/7] ethdev: expose flow API error helper Adrien Mazarguil
2017-10-11  9:23       ` Thomas Monjalon
2017-10-11 11:56  5%     ` Adrien Mazarguil
2017-10-11 19:05  5%       ` Aaron Conole
2017-10-12 13:37  4%         ` Neil Horman
2017-10-12 14:02  5%         ` Adrien Mazarguil
2017-10-05 13:09     [dpdk-dev] [PATCH V2 1/5] ethdev: add new flow action for metering and policing Cristian Dumitrescu
2017-10-06 14:45     ` [dpdk-dev] [PATCH V3 0/5] rte_mtr: generic ethdev api " Cristian Dumitrescu
2017-10-06 14:45  1%   ` [dpdk-dev] [PATCH V3 3/5] ethdev: add new api for traffic " Cristian Dumitrescu
2017-10-06 14:45     [dpdk-dev] [PATCH V3 1/5] ethdev: add new flow action for " Cristian Dumitrescu
2017-10-13 12:22     ` [dpdk-dev] [PATCH V4 0/5] rte_mtr: generic ethdev api " Cristian Dumitrescu
2017-10-13 12:22  1%   ` [dpdk-dev] [PATCH V4 3/5] ethdev: add new api for traffic " Cristian Dumitrescu
2017-10-06 16:21  9% [dpdk-dev] ABI/API stability in DPDK Mcnamara, John
2017-10-06 16:27  4% ` Ferruh Yigit
2017-10-06 17:15  4% ` Thomas Monjalon
2017-10-09  3:20     [dpdk-dev] [PATCH v3 0/5] move vdev into drivers/bus Jianfeng Tan
2017-10-13 11:51     ` [dpdk-dev] [PATCH v7 0/4] " Jianfeng Tan
2017-10-13 11:51  4%   ` [dpdk-dev] [PATCH v7 1/4] cryptodev: remove crypto vdev init API Jianfeng Tan
2017-10-23 10:06  3%     ` De Lara Guarch, Pablo
2017-10-25 17:10     ` [dpdk-dev] [PATCH v8 0/4] move vdev into drivers/bus Jianfeng Tan
2017-10-25 17:10  4%   ` [dpdk-dev] [PATCH v8 1/4] cryptodev: remove crypto vdev init API Jianfeng Tan
2017-10-25 17:10  1%   ` [dpdk-dev] [PATCH v8 3/4] bus/vdev: move to vdev bus to drivers/bus Jianfeng Tan
2017-10-25 21:32  3%     ` De Lara Guarch, Pablo
2017-10-27  1:06     ` [dpdk-dev] [PATCH v0 0/4] move vdev into drivers/bus Jianfeng Tan
2017-10-27  1:06  4%   ` [dpdk-dev] [PATCH v9 1/4] cryptodev: remove crypto vdev init API Jianfeng Tan
2017-10-27  1:06  1%   ` [dpdk-dev] [PATCH v9 3/4] bus/vdev: move to vdev bus to drivers/bus Jianfeng Tan
2017-10-27  3:23     ` [dpdk-dev] [PATCH v10 0/4] move vdev into drivers/bus Jianfeng Tan
2017-10-27  3:23  4%   ` [dpdk-dev] [PATCH v10 1/4] cryptodev: remove crypto vdev init API Jianfeng Tan
2017-10-27  3:23  1%   ` [dpdk-dev] [PATCH v10 3/4] bus/vdev: move to vdev bus to drivers/bus Jianfeng Tan
2017-10-30  8:28     ` [dpdk-dev] [PATCH v11 0/4] move vdev into drivers/bus Jianfeng Tan
2017-10-30  8:28  4%   ` [dpdk-dev] [PATCH v11 1/4] cryptodev: remove crypto vdev init API Jianfeng Tan
2017-10-30  8:28  1%   ` [dpdk-dev] [PATCH v11 3/4] bus/vdev: move to vdev bus to drivers/bus Jianfeng Tan
2017-11-07  6:54     ` [dpdk-dev] [PATCH v12 0/4] move vdev into drivers/bus Jianfeng Tan
2017-11-07  6:54  4%   ` [dpdk-dev] [PATCH v12 1/4] cryptodev: remove crypto vdev init API Jianfeng Tan
2017-11-07  6:54  1%   ` [dpdk-dev] [PATCH v12 3/4] bus/vdev: move to vdev bus to drivers/bus Jianfeng Tan
2017-10-09 16:12     [dpdk-dev] [PATCH 1/2] ethdev: add return value to stats get dev op Matan Azrad
2017-10-09 16:12  4% ` [dpdk-dev] [PATCH 2/2] doc: update stats get API change Matan Azrad
2017-10-10 20:20  1% ` [dpdk-dev] [PATCH v2] ethdev: add return value to stats get dev op Matan Azrad
2017-10-10 14:15     [dpdk-dev] [PATCH] drivers: update DPAA2 libs ABIVER and build reproducibility Hemant Agrawal
2017-10-10 15:48  5% ` Thomas Monjalon
2017-10-11  9:36  3% [dpdk-dev] next techboard meeting (13th, October) Olivier MATZ
2017-10-11 12:41  0% ` Wiles, Keith
2017-10-11 12:48  0%   ` [dpdk-dev] [dpdk-techboard] " Thomas Monjalon
2017-10-11 12:53  0%     ` Wiles, Keith
2017-10-12  8:18  4% [dpdk-dev] [PATCH v1 0/8] Bus control framework Gaetan Rivet
2017-10-12  8:18  4% ` [dpdk-dev] [PATCH v1 2/8] bus: introduce opaque " Gaetan Rivet
2017-10-14  0:09  3% [dpdk-dev] [PATCH] doc: fix highlight of bumped libs in release notes Thomas Monjalon
2017-10-16  8:33  0% ` Yang, Zhiyong
2017-10-18 20:57  0% ` Ferruh Yigit
2017-10-23 10:13  0%   ` Thomas Monjalon
2017-10-23 10:15  3% ` [dpdk-dev] [PATCH v2] " Thomas Monjalon
2017-10-23 16:26  0%   ` Ferruh Yigit
2017-10-23 20:39  0%     ` Thomas Monjalon
2017-10-16 13:42     [dpdk-dev] [PATCH v1 1/2] mempool/octeontx: move mbox from event to mempool Santosh Shukla
2017-10-16 13:42  3% ` [dpdk-dev] [PATCH v1 2/2] event/octeontx: bump library version Santosh Shukla
2017-10-17  9:50  0%   ` Hemant Agrawal
2017-10-23 14:38  3%   ` Thomas Monjalon
2017-10-20 21:21     [dpdk-dev] [PATCH 0/3] Break dependency on bus infrastructure* Declan Doherty
2017-10-25 12:00     ` [dpdk-dev] [PATCH v2 0/3] Break cryptodev dependency on bus infrastructure Declan Doherty
2017-10-25 12:00  3%   ` [dpdk-dev] [PATCH v2 1/3] cryptodev: add new APIs to assist PMD initialisation Declan Doherty
2017-10-25 12:00  1%   ` [dpdk-dev] [PATCH v2 2/3] cryptodev: break dependency on virtual device bus Declan Doherty
2017-10-25 12:00  3%   ` [dpdk-dev] [PATCH v2 3/3] cryptodev: break dependency on PCI " Declan Doherty
2017-10-22 13:32     [dpdk-dev] [PATCH v9 0/4] flow classification library Bernard Iremonger
2017-10-23 15:16     ` [dpdk-dev] [PATCH v10 " Bernard Iremonger
2017-10-23 20:59       ` Thomas Monjalon
2017-10-24  8:40  3%     ` Iremonger, Bernard
2017-10-24  9:23  0%       ` Mcnamara, John
2017-10-24  9:38  0%         ` Thomas Monjalon
2017-10-24  9:53  0%           ` Iremonger, Bernard
2017-10-24 10:25  0%             ` Thomas Monjalon
2017-10-23  9:56 10% [dpdk-dev] [PATCH] eal: remove deprecated log functions Olivier Matz
2017-10-23 11:50  3% [dpdk-dev] DPDK techboard minutes of October 13 Olivier MATZ
2017-10-23 12:16  2% [dpdk-dev] [PATCH] mbuf: rename deprecated VLAN flags Olivier Matz
2017-10-25 15:12  2% ` [dpdk-dev] [PATCH v2] " Olivier Matz
2017-10-25 12:29  4% [dpdk-dev] [PATCH] eal: fix version map experimental export section Harry van Haaren
2017-11-06 23:07  0% ` Thomas Monjalon
2017-10-30 11:06  3% [dpdk-dev] rte_security deprecation Thomas Monjalon
2017-10-30 11:30  0% ` Akhil Goyal
2017-10-30 12:27  8% [dpdk-dev] [PATCH] doc: update release notes for rte_security Akhil Goyal
2017-10-30 14:22  0% ` Thomas Monjalon
2017-11-01  6:20  0%   ` Akhil Goyal
2017-11-02 16:36  0%     ` Mcnamara, John
2017-11-07  6:44  8% ` [dpdk-dev] [PATCH v2] " Akhil Goyal
2017-11-08  1:07  0%   ` Thomas Monjalon
2017-11-02 14:31     [dpdk-dev] [PATCH ] examples/l3fwd: fix aliasing in port grouping Guduri Prathyusha
2017-11-02 14:46     ` Ananyev, Konstantin
2017-11-02 15:33       ` Guduri Prathyusha
2017-11-02 15:52         ` Ananyev, Konstantin
2017-11-03  3:21           ` Jianbo.Liu
2017-11-03  5:42  3%         ` Guduri Prathyusha
2017-11-03 11:24     [dpdk-dev] [PATCH] mem: remove old function from symbol list Thomas Monjalon
2017-11-03 11:34  3% ` Gonzalez Monroy, Sergio
2017-11-03 13:52  0%   ` Thomas Monjalon
2017-11-03 15:24  5% [dpdk-dev] [PATCH v1] i40e: highlight change to flexible payload for RSS config John McNamara
2017-11-04 19:41  0% ` Chilikin, Andrey
2017-11-06 11:08  7% [dpdk-dev] [PATCH] mempool: increase ABI version Thomas Monjalon
2017-11-06 11:33  4% ` santosh
2017-11-06 22:59  4%   ` Thomas Monjalon
2017-11-06 11:28 28% [dpdk-dev] [PATCH] doc: update ABI/API policy Bruce Richardson
2017-11-06 14:48  4% ` Mcnamara, John
2017-11-11 11:37  4%   ` Thomas Monjalon
2017-11-07  6:05  4% ` Yuanhan Liu
2017-11-08 19:09  4% ` Kevin Traynor
2017-11-07  3:08  3% [dpdk-dev] [dpdk-techboard] [DRAFT] DPDK techboard minutes of October 26 Thomas Monjalon
2017-11-07  3:09  3% [dpdk-dev] [dpdk-techboard] " Thomas Monjalon
2017-11-08  9:53 16% [dpdk-dev] [PATCH] doc: postpone devargs clean-up Gaetan Rivet
2017-11-09 13:43  1% [dpdk-dev] [RFC] cmdline: rework as a wrapper to libedit Adrien Mazarguil
2017-11-15  4:12  0% ` Wiles, Keith
2017-11-15  8:04  0%   ` Olivier MATZ
2017-11-10 12:27  4% [dpdk-dev] [PATCH v1] doc: update release notes for 17.11 John McNamara

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